feat(medusa): ordem items endpoint (#9646)

This commit is contained in:
Carlos R. L. Rodrigues
2024-10-18 05:59:24 -03:00
committed by GitHub
parent 0a37675f0e
commit 2a98be6b65
16 changed files with 202 additions and 19 deletions
@@ -22,6 +22,7 @@ export const getOrderDetailWorkflow = createWorkflow(
input: WorkflowData<{
fields: string[]
order_id: string
version?: number
}>
): WorkflowResponse<OrderDetailDTO> => {
const fields = transform(input, ({ fields }) => {
@@ -38,7 +39,10 @@ export const getOrderDetailWorkflow = createWorkflow(
const order: OrderDTO = useRemoteQueryStep({
entry_point: "orders",
fields,
variables: { id: input.order_id },
variables: {
id: input.order_id,
version: input.version,
},
list: false,
throw_if_key_not_found: true,
})