fix(dashboard, medusa): mark shipped flow (#8065)

* fix: mark shipped routing

* fix: naming
This commit is contained in:
Frane Polić
2024-07-10 19:37:12 +02:00
committed by GitHub
parent e778870c68
commit b289510b46
11 changed files with 87 additions and 19 deletions
+19
View File
@@ -1,4 +1,5 @@
import {
AdminCreateOrderShipment,
FindParams,
HttpTypes,
PaginatedResponse,
@@ -77,4 +78,22 @@ export class Order {
}
)
}
async createShipment(
id: string,
fulfillmentId: string,
body: HttpTypes.AdminCreateOrderShipment,
query?: SelectParams,
headers?: ClientHeaders
) {
return await this.client.fetch<{ order: HttpTypes.AdminOrder }>(
`/admin/orders/${id}/fulfillments/${fulfillmentId}/shipments`,
{
method: "POST",
headers,
body,
query,
}
)
}
}