feat(core-flows,dashboard,types,fulfillment,medusa): uses requires shipping throughout lifecycle (#9170)

what:

- uses requires shipping throughout lifecycle

https://github.com/user-attachments/assets/d5ba89d3-5ea0-49c4-b2d5-490c4764933e
This commit is contained in:
Riqwan Thamir
2024-09-24 08:26:22 +00:00
committed by GitHub
parent e54b339324
commit 69f6645716
22 changed files with 490 additions and 108 deletions
@@ -1,4 +1,5 @@
import { createOrderFulfillmentWorkflow } from "@medusajs/core-flows"
import { AdditionalData, HttpTypes } from "@medusajs/types"
import {
ContainerRegistrationKeys,
remoteQueryObjectFromString,
@@ -8,7 +9,6 @@ import {
MedusaResponse,
} from "../../../../../types/routing"
import { AdminOrderCreateFulfillmentType } from "../../validators"
import { AdditionalData, HttpTypes } from "@medusajs/types"
export const POST = async (
req: AuthenticatedMedusaRequest<
@@ -18,20 +18,16 @@ export const POST = async (
) => {
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
const variables = { id: req.params.id }
const input = {
...req.validatedBody,
order_id: req.params.id,
}
await createOrderFulfillmentWorkflow(req.scope).run({
input,
input: {
...req.validatedBody,
order_id: req.params.id,
},
})
const queryObject = remoteQueryObjectFromString({
entryPoint: "order",
variables,
variables: { id: req.params.id },
fields: req.remoteQueryConfig.fields,
})