Variable rawEventSchemaConst
rawEventSchema: ZodObject<
{
externalId: ZodOptional<ZodString>;
title: ZodString;
startDate: ZodString;
endDate: ZodOptional<ZodString>;
venue: ZodString;
address: ZodOptional<ZodString>;
description: ZodOptional<ZodString>;
category: ZodOptional<
ZodEnum<
[
"concert",
"theater",
"sport",
"community",
"festival",
"exhibition",
"workshop",
"other",
],
>,
>;
buyUrl: ZodOptional<ZodEffects<ZodString, string, string>>;
sourceUrl: ZodOptional<ZodEffects<ZodString, string, string>>;
price: ZodOptional<ZodNumber>;
currency: ZodOptional<ZodString>;
cancelled: ZodOptional<ZodBoolean>;
},
"strip",
ZodTypeAny,
{
externalId?: string;
title: string;
startDate: string;
endDate?: string;
venue: string;
address?: string;
description?: string;
category?: | "theater"
| "other"
| "concert"
| "sport"
| "community"
| "festival"
| "exhibition"
| "workshop";
buyUrl?: string;
sourceUrl?: string;
price?: number;
currency?: string;
cancelled?: boolean;
},
{
externalId?: string;
title: string;
startDate: string;
endDate?: string;
venue: string;
address?: string;
description?: string;
category?: | "theater"
| "other"
| "concert"
| "sport"
| "community"
| "festival"
| "exhibition"
| "workshop";
buyUrl?: string;
sourceUrl?: string;
price?: number;
currency?: string;
cancelled?: boolean;
},
> = ...
One listing as an adapter read it. Sanity validation: a row that fails this goes to the needs-attention quarantine, never to the clean diff.