25 lines
784 B
TypeScript
25 lines
784 B
TypeScript
import { z } from 'zod';
|
|
import { text } from '../common/input';
|
|
import { pageSchema } from '../identity/identity.schemas';
|
|
|
|
export const createArtworkSchema = z
|
|
.object({
|
|
accountId: z.uuid(),
|
|
name: text(160, 3),
|
|
placement: z.enum(['LABEL', 'PACKAGING', 'CANDLE', 'OTHER']),
|
|
brief: text(1000, 3),
|
|
})
|
|
.strict();
|
|
export const artworkDecisionSchema = z
|
|
.object({
|
|
outcome: z.enum(['APPROVED', 'REJECTED']),
|
|
note: text(500, 3),
|
|
})
|
|
.strict();
|
|
export const artworkQuerySchema = pageSchema
|
|
.extend({ accountId: z.uuid().optional() })
|
|
.strict();
|
|
export type CreateArtworkInput = z.infer<typeof createArtworkSchema>;
|
|
export type ArtworkDecisionInput = z.infer<typeof artworkDecisionSchema>;
|
|
export type ArtworkQuery = z.infer<typeof artworkQuerySchema>;
|