Files
pokemon-inventory/packages/validation/inventory.js
T
fragginwagon 12eced8b19
Quality / test (push) Canceled after 0s
feat: add seller-scoped bulk archive
Add the first bulk inventory operation through a validated, CSRF-protected API route with lifecycle and ownership enforcement, tests, and implementation-status documentation.
2026-09-09 23:11:48 -04:00

16 lines
368 B
JavaScript

import { z } from 'zod';
export const createInventoryItemSchema = z
.object({
productId: z.uuid(),
conditionId: z.uuid(),
notes: z.string().trim().max(10000).optional(),
})
.strict();
export const bulkArchiveInventorySchema = z
.object({
action: z.literal('ARCHIVE'),
inventoryItemIds: z.array(z.uuid()).min(1).max(100),
})
.strict();