Skip to main content

Variable: intentSchema

const intentSchema: ZodObject<{ analyticalTask: ZodEnum<{ change-over-time: "change-over-time"; comparison: "comparison"; composition: "composition"; coverage: "coverage"; distribution: "distribution"; feature-lookup: "feature-lookup"; normalized-comparison: "normalized-comparison"; outlier-detection: "outlier-detection"; ranking: "ranking"; }>; categoryId: ZodOptional<ZodString>; datasetId: ZodOptional<ZodString>; denominatorMetricId: ZodOptional<ZodString>; filters: ZodOptional<ZodArray<ZodObject<{ field: ZodString; op: ZodEnum<{ eq: "eq"; gt: "gt"; gte: "gte"; in: "in"; lt: "lt"; lte: "lte"; neq: "neq"; not-in: "not-in"; }>; value: ZodUnion<readonly [ZodString, ZodNumber, ZodArray<ZodUnion<readonly [..., ...]>>]>; }, $strict>>>; geographyId: ZodString; metricId: ZodString; rationale: ZodOptional<ZodString>; schemaVersion: ZodNumber; time: ZodOptional<ZodObject<{ end: ZodOptional<ZodUnion<[ZodISODate, ZodISODateTime]>>; start: ZodOptional<ZodUnion<[ZodISODate, ZodISODateTime]>>; }, $strict>>; }, $strict>

Defined in: intent/schema.ts:56

AnalyticalIntent's Zod schema (PRD-005 plan D1/D2), authored directly — no hand-maintained JSON Schema document is kept anywhere in this package; getIntentJSONSchema() derives one via z.toJSONSchema on demand.

metricId/geographyId/categoryId/denominatorMetricId are bare strings at this layer: shape validation only. Whether they resolve against a Catalog, and whether categoryId/denominatorMetricId are required given the resolved metric/task, is validateIntent's job (D4/D6/D7), which needs the catalog this schema never sees.