fix(types, medusa): fixes to draft order request types (#8949)

- remove the `name` filter for orders (couldn't find any `name` property in the order data model).
- Remove the `order_id` property of a shipping method in the request body type for creating a draft order
- Update the types of `fulfillment_status` and `payment_status` in the order filters to showcase the possible status values.
This commit is contained in:
Shahed Nasser
2024-09-02 20:09:41 +03:00
committed by GitHub
parent d88e6474e9
commit 29555ae518
2 changed files with 3 additions and 5 deletions

View File

@@ -16,7 +16,6 @@ export const AdminGetOrdersParams = createFindParams({
}).merge(
z.object({
id: z.union([z.string(), z.array(z.string())]).optional(),
name: z.union([z.string(), z.array(z.string())]).optional(),
$and: z.lazy(() => AdminGetOrdersParams.array()).optional(),
$or: z.lazy(() => AdminGetOrdersParams.array()).optional(),
})
@@ -28,7 +27,6 @@ enum Status {
const ShippingMethod = z.object({
shipping_method_id: z.string().nullish(),
order_id: z.string().nullish(),
name: z.string(),
shipping_option_id: z.string(),
data: z.record(z.string(), z.unknown()).optional(),