File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export const GetMIResponseResourceSchema = z
1212 quantity : z . string ( ) ,
1313 specificationId : z . string ( ) . optional ( ) ,
1414 groupId : z . string ( ) . optional ( ) ,
15- stockRemaining : z . number ( ) . optional ( )
15+ stockRemaining : z . number ( ) . optional ( ) ,
1616 } )
1717 . strict ( ) ,
1818 } )
@@ -22,8 +22,7 @@ export const GetMIResponseSchema = makeDocumentSchema(
2222 GetMIResponseResourceSchema ,
2323) ;
2424
25- export type GetMIResponse = z . infer < typeof PostMIResponseSchema > ;
26-
25+ export type GetMIResponse = z . infer < typeof GetMIResponseSchema > ;
2726
2827export const PostMIRequestResourceSchema = z
2928 . object ( {
Original file line number Diff line number Diff line change 11import { MIBase } from "@internal/datastore/src" ;
22import {
3+ GetMIResponse ,
4+ GetMIResponseResourceSchema ,
35 IncomingMI ,
46 PostMIRequest ,
57 PostMIResponse ,
68 PostMIResponseSchema ,
7- GetMIResponse ,
8- GetMIResponseResourceSchema
99} from "../contracts/mi" ;
1010
1111export function mapToMI (
@@ -49,5 +49,5 @@ export function mapToGetMIResponse(mi: MIBase): GetMIResponse {
4949 stockRemaining : mi . stockRemaining ,
5050 } ,
5151 } ,
52- } )
52+ } ) ;
5353}
Original file line number Diff line number Diff line change 11import { IncomingMI } from "../../contracts/mi" ;
2- import { postMI } from "../mi-operations" ;
2+ import { postMI } from "../mi-operations" ;
33
44describe ( "postMI function" , ( ) => {
55 const incomingMi : IncomingMI = {
Original file line number Diff line number Diff line change 11import { MIRepository } from "@internal/datastore/src/mi-repository" ;
2- import { IncomingMI , PostMIResponse , GetMIResponse } from "../contracts/mi" ;
3- import { mapToPostMIResponse , mapToGetMIResponse } from "../mappers/mi-mapper" ;
2+ import { GetMIResponse , IncomingMI , PostMIResponse } from "../contracts/mi" ;
3+ import { mapToGetMIResponse , mapToPostMIResponse } from "../mappers/mi-mapper" ;
44
55export const postMI = async (
66 incomingMi : IncomingMI ,
You can’t perform that action at this time.
0 commit comments