Backfill the completed acquisitions, sales, dashboard, pricing, search, public detail, worker, migration, contracts, validation, tests, and implementation-status changes into one verified application slice.
32 lines
793 B
JavaScript
32 lines
793 B
JavaScript
import { z } from "zod";
|
|
|
|
export const createPricingObservationSchema = z
|
|
.object({
|
|
productId: z.uuid(),
|
|
inventoryItemId: z.uuid(),
|
|
providerId: z.string().trim().min(1).max(100),
|
|
priceMinor: z.int().positive(),
|
|
currency: z
|
|
.string()
|
|
.trim()
|
|
.regex(/^[A-Za-z]{3}$/)
|
|
.optional(),
|
|
sourceIdentifier: z.string().trim().min(1).max(255),
|
|
conditionId: z.uuid(),
|
|
sourceUrl: z.string().trim().url().optional(),
|
|
qualityScore: z.int().min(0).max(100).optional(),
|
|
})
|
|
.strict();
|
|
|
|
export const createMarketValueOverrideSchema = z
|
|
.object({
|
|
valueMinor: z.int().nonnegative(),
|
|
currency: z
|
|
.string()
|
|
.trim()
|
|
.regex(/^[A-Za-z]{3}$/)
|
|
.optional(),
|
|
reason: z.string().trim().min(3).max(1000),
|
|
})
|
|
.strict();
|