chore: add compare_at_unit_price when price list price is retrieved (#9564)
* chore: add compare_at_unit_price when price list price is retrieved * chore: add test for update item + more fixes along the way * chore: fix tests * chore: add refresh spec * Apply suggestions from code review Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com> * chore: use undefined checker * chore: switch to map --------- Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>
This commit is contained in:
@@ -37,8 +37,9 @@ export const AdminPostOrderEditsAddItemsReqSchema = z.object({
|
||||
z.object({
|
||||
variant_id: z.string(),
|
||||
quantity: z.number(),
|
||||
unit_price: z.number().optional(),
|
||||
internal_note: z.string().optional(),
|
||||
unit_price: z.number().nullish(),
|
||||
compare_at_unit_price: z.number().nullish(),
|
||||
internal_note: z.string().nullish(),
|
||||
allow_backorder: z.boolean().optional(),
|
||||
metadata: z.record(z.unknown()).optional(),
|
||||
})
|
||||
@@ -51,7 +52,8 @@ export type AdminPostOrderEditsAddItemsReqSchemaType = z.infer<
|
||||
|
||||
export const AdminPostOrderEditsItemsActionReqSchema = z.object({
|
||||
quantity: z.number().optional(),
|
||||
unit_price: z.number().optional(),
|
||||
unit_price: z.number().nullish(),
|
||||
compare_at_unit_price: z.number().nullish(),
|
||||
internal_note: z.string().nullish().optional(),
|
||||
})
|
||||
|
||||
@@ -61,7 +63,8 @@ export type AdminPostOrderEditsItemsActionReqSchemaType = z.infer<
|
||||
|
||||
export const AdminPostOrderEditsUpdateItemQuantityReqSchema = z.object({
|
||||
quantity: z.number(),
|
||||
unit_price: z.number().optional(),
|
||||
unit_price: z.number().nullish(),
|
||||
compare_at_unit_price: z.number().nullish(),
|
||||
internal_note: z.string().nullish().optional(),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user