@@ -13,4 +13,17 @@ export const bulkArchiveInventorySchema = z
|
||||
action: z.literal('ARCHIVE'),
|
||||
inventoryItemIds: z.array(z.uuid()).min(1).max(100),
|
||||
})
|
||||
.strict();
|
||||
.strict();
|
||||
|
||||
export const bulkPricingRefreshInventorySchema = z
|
||||
.object({
|
||||
action: z.literal('PRICING_REFRESH'),
|
||||
inventoryItemIds: z.array(z.uuid()).min(1).max(100),
|
||||
providerId: z.string().trim().min(1).max(100).optional(),
|
||||
})
|
||||
.strict();
|
||||
|
||||
export const bulkInventorySchema = z.discriminatedUnion('action', [
|
||||
bulkArchiveInventorySchema,
|
||||
bulkPricingRefreshInventorySchema,
|
||||
]);
|
||||
Reference in New Issue
Block a user