/** * ADRFlow Validation Schemas * * Zod schemas for runtime validation of inputs. * These schemas ensure type safety at runtime boundaries. * * @module adrflow/core/schemas */ import { z } from 'zod'; /** * ADR ID format: ADR-XXXX (4 or more digits) */ export declare const ADRIdSchema: z.ZodString; /** * ADR Status enum */ export declare const ADRStatusSchema: z.ZodEnum<["proposed", "accepted", "deprecated", "superseded"]>; /** * Decision Category enum */ export declare const DecisionCategorySchema: z.ZodEnum<["technology", "architecture", "api_design", "data_model", "security", "performance", "refactoring", "dependency", "infrastructure", "testing", "other"]>; /** * Alternative schema */ export declare const AlternativeSchema: z.ZodObject<{ name: z.ZodString; description: z.ZodDefault; pros: z.ZodDefault>; cons: z.ZodDefault>; whyNotChosen: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; description: string; pros: string[]; cons: string[]; whyNotChosen?: string | undefined; }, { name: string; description?: string | undefined; pros?: string[] | undefined; cons?: string[] | undefined; whyNotChosen?: string | undefined; }>; /** * Confidence Level enum */ export declare const ConfidenceLevelSchema: z.ZodEnum<["high", "medium", "low", "experimental"]>; /** * Significance Level enum */ export declare const SignificanceLevelSchema: z.ZodEnum<["critical", "high", "medium", "low"]>; /** * Decision driver schema */ export declare const DecisionDriverSchema: z.ZodObject<{ type: z.ZodEnum<["requirement", "constraint", "assumption", "risk", "goal"]>; description: z.ZodString; priority: z.ZodOptional>; }, "strip", z.ZodTypeAny, { description: string; type: "requirement" | "constraint" | "assumption" | "risk" | "goal"; priority?: "must-have" | "should-have" | "nice-to-have" | undefined; }, { description: string; type: "requirement" | "constraint" | "assumption" | "risk" | "goal"; priority?: "must-have" | "should-have" | "nice-to-have" | undefined; }>; /** * Consequence schema */ export declare const ConsequenceSchema: z.ZodObject<{ type: z.ZodEnum<["positive", "negative", "neutral"]>; description: z.ZodString; timeframe: z.ZodOptional>; affectedParties: z.ZodOptional>; }, "strip", z.ZodTypeAny, { description: string; type: "positive" | "negative" | "neutral"; timeframe?: "immediate" | "short-term" | "long-term" | undefined; affectedParties?: string[] | undefined; }, { description: string; type: "positive" | "negative" | "neutral"; timeframe?: "immediate" | "short-term" | "long-term" | undefined; affectedParties?: string[] | undefined; }>; /** * Related file schema */ export declare const RelatedFileSchema: z.ZodObject<{ path: z.ZodString; changeType: z.ZodEnum<["created", "modified", "deleted", "renamed"]>; linesChanged: z.ZodOptional; }, "strip", z.ZodTypeAny, { path: string; changeType: "created" | "modified" | "deleted" | "renamed"; linesChanged?: number | undefined; }, { path: string; changeType: "created" | "modified" | "deleted" | "renamed"; linesChanged?: number | undefined; }>; /** * Source reference schema */ export declare const SourceReferenceSchema: z.ZodObject<{ type: z.ZodEnum<["claude_session", "cursor_session", "manual", "imported"]>; sourceId: z.ZodOptional; capturedAt: z.ZodDate; }, "strip", z.ZodTypeAny, { type: "claude_session" | "cursor_session" | "manual" | "imported"; capturedAt: Date; sourceId?: string | undefined; }, { type: "claude_session" | "cursor_session" | "manual" | "imported"; capturedAt: Date; sourceId?: string | undefined; }>; /** * Full ADR schema */ export declare const ADRSchema: z.ZodObject<{ id: z.ZodString; title: z.ZodString; status: z.ZodEnum<["proposed", "accepted", "deprecated", "superseded"]>; category: z.ZodEnum<["technology", "architecture", "api_design", "data_model", "security", "performance", "refactoring", "dependency", "infrastructure", "testing", "other"]>; createdAt: z.ZodDate; updatedAt: z.ZodDate; context: z.ZodString; decision: z.ZodString; alternatives: z.ZodDefault; pros: z.ZodDefault>; cons: z.ZodDefault>; whyNotChosen: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; description: string; pros: string[]; cons: string[]; whyNotChosen?: string | undefined; }, { name: string; description?: string | undefined; pros?: string[] | undefined; cons?: string[] | undefined; whyNotChosen?: string | undefined; }>, "many">>; consequences: z.ZodDefault; description: z.ZodString; timeframe: z.ZodOptional>; affectedParties: z.ZodOptional>; }, "strip", z.ZodTypeAny, { description: string; type: "positive" | "negative" | "neutral"; timeframe?: "immediate" | "short-term" | "long-term" | undefined; affectedParties?: string[] | undefined; }, { description: string; type: "positive" | "negative" | "neutral"; timeframe?: "immediate" | "short-term" | "long-term" | undefined; affectedParties?: string[] | undefined; }>, "many">>; relatedFiles: z.ZodDefault; linesChanged: z.ZodOptional; }, "strip", z.ZodTypeAny, { path: string; changeType: "created" | "modified" | "deleted" | "renamed"; linesChanged?: number | undefined; }, { path: string; changeType: "created" | "modified" | "deleted" | "renamed"; linesChanged?: number | undefined; }>, "many">>; source: z.ZodObject<{ type: z.ZodEnum<["claude_session", "cursor_session", "manual", "imported"]>; sourceId: z.ZodOptional; capturedAt: z.ZodDate; }, "strip", z.ZodTypeAny, { type: "claude_session" | "cursor_session" | "manual" | "imported"; capturedAt: Date; sourceId?: string | undefined; }, { type: "claude_session" | "cursor_session" | "manual" | "imported"; capturedAt: Date; sourceId?: string | undefined; }>; tags: z.ZodDefault>; supersedes: z.ZodOptional; supersededBy: z.ZodOptional; confidence: z.ZodOptional>; significance: z.ZodOptional>; drivers: z.ZodOptional; description: z.ZodString; priority: z.ZodOptional>; }, "strip", z.ZodTypeAny, { description: string; type: "requirement" | "constraint" | "assumption" | "risk" | "goal"; priority?: "must-have" | "should-have" | "nice-to-have" | undefined; }, { description: string; type: "requirement" | "constraint" | "assumption" | "risk" | "goal"; priority?: "must-have" | "should-have" | "nice-to-have" | undefined; }>, "many">>; decisionMakers: z.ZodOptional>; stakeholders: z.ZodOptional>; reviewDate: z.ZodOptional; risks: z.ZodOptional>; assumptions: z.ZodOptional>; }, "strip", z.ZodTypeAny, { status: "proposed" | "accepted" | "deprecated" | "superseded"; id: string; title: string; category: "technology" | "architecture" | "api_design" | "data_model" | "security" | "performance" | "refactoring" | "dependency" | "infrastructure" | "testing" | "other"; createdAt: Date; updatedAt: Date; context: string; decision: string; alternatives: { name: string; description: string; pros: string[]; cons: string[]; whyNotChosen?: string | undefined; }[]; consequences: { description: string; type: "positive" | "negative" | "neutral"; timeframe?: "immediate" | "short-term" | "long-term" | undefined; affectedParties?: string[] | undefined; }[]; relatedFiles: { path: string; changeType: "created" | "modified" | "deleted" | "renamed"; linesChanged?: number | undefined; }[]; source: { type: "claude_session" | "cursor_session" | "manual" | "imported"; capturedAt: Date; sourceId?: string | undefined; }; tags: string[]; supersedes?: string | undefined; supersededBy?: string | undefined; confidence?: "high" | "medium" | "low" | "experimental" | undefined; significance?: "high" | "medium" | "low" | "critical" | undefined; drivers?: { description: string; type: "requirement" | "constraint" | "assumption" | "risk" | "goal"; priority?: "must-have" | "should-have" | "nice-to-have" | undefined; }[] | undefined; decisionMakers?: string[] | undefined; stakeholders?: string[] | undefined; reviewDate?: Date | undefined; risks?: string[] | undefined; assumptions?: string[] | undefined; }, { status: "proposed" | "accepted" | "deprecated" | "superseded"; id: string; title: string; category: "technology" | "architecture" | "api_design" | "data_model" | "security" | "performance" | "refactoring" | "dependency" | "infrastructure" | "testing" | "other"; createdAt: Date; updatedAt: Date; context: string; decision: string; source: { type: "claude_session" | "cursor_session" | "manual" | "imported"; capturedAt: Date; sourceId?: string | undefined; }; alternatives?: { name: string; description?: string | undefined; pros?: string[] | undefined; cons?: string[] | undefined; whyNotChosen?: string | undefined; }[] | undefined; consequences?: { description: string; type: "positive" | "negative" | "neutral"; timeframe?: "immediate" | "short-term" | "long-term" | undefined; affectedParties?: string[] | undefined; }[] | undefined; relatedFiles?: { path: string; changeType: "created" | "modified" | "deleted" | "renamed"; linesChanged?: number | undefined; }[] | undefined; tags?: string[] | undefined; supersedes?: string | undefined; supersededBy?: string | undefined; confidence?: "high" | "medium" | "low" | "experimental" | undefined; significance?: "high" | "medium" | "low" | "critical" | undefined; drivers?: { description: string; type: "requirement" | "constraint" | "assumption" | "risk" | "goal"; priority?: "must-have" | "should-have" | "nice-to-have" | undefined; }[] | undefined; decisionMakers?: string[] | undefined; stakeholders?: string[] | undefined; reviewDate?: Date | undefined; risks?: string[] | undefined; assumptions?: string[] | undefined; }>; /** * Create ADR input schema */ export declare const CreateADRInputSchema: z.ZodObject<{ title: z.ZodString; context: z.ZodString; decision: z.ZodString; category: z.ZodDefault>>; alternatives: z.ZodDefault; pros: z.ZodDefault>; cons: z.ZodDefault>; whyNotChosen: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; description: string; pros: string[]; cons: string[]; whyNotChosen?: string | undefined; }, { name: string; description?: string | undefined; pros?: string[] | undefined; cons?: string[] | undefined; whyNotChosen?: string | undefined; }>, "many">>>; consequences: z.ZodDefault; description: z.ZodString; timeframe: z.ZodOptional>; affectedParties: z.ZodOptional>; }, "strip", z.ZodTypeAny, { description: string; type: "positive" | "negative" | "neutral"; timeframe?: "immediate" | "short-term" | "long-term" | undefined; affectedParties?: string[] | undefined; }, { description: string; type: "positive" | "negative" | "neutral"; timeframe?: "immediate" | "short-term" | "long-term" | undefined; affectedParties?: string[] | undefined; }>, "many">>>; relatedFiles: z.ZodDefault; linesChanged: z.ZodOptional; }, "strip", z.ZodTypeAny, { path: string; changeType: "created" | "modified" | "deleted" | "renamed"; linesChanged?: number | undefined; }, { path: string; changeType: "created" | "modified" | "deleted" | "renamed"; linesChanged?: number | undefined; }>, "many">>>; tags: z.ZodDefault>>; supersedes: z.ZodOptional; source: z.ZodOptional>; sourceId: z.ZodOptional; }, "strip", z.ZodTypeAny, { type?: "claude_session" | "cursor_session" | "manual" | "imported" | undefined; sourceId?: string | undefined; }, { type?: "claude_session" | "cursor_session" | "manual" | "imported" | undefined; sourceId?: string | undefined; }>>; confidence: z.ZodOptional>; significance: z.ZodOptional>; drivers: z.ZodOptional; description: z.ZodString; priority: z.ZodOptional>; }, "strip", z.ZodTypeAny, { description: string; type: "requirement" | "constraint" | "assumption" | "risk" | "goal"; priority?: "must-have" | "should-have" | "nice-to-have" | undefined; }, { description: string; type: "requirement" | "constraint" | "assumption" | "risk" | "goal"; priority?: "must-have" | "should-have" | "nice-to-have" | undefined; }>, "many">>; decisionMakers: z.ZodOptional>; stakeholders: z.ZodOptional>; reviewDate: z.ZodOptional; risks: z.ZodOptional>; assumptions: z.ZodOptional>; }, "strip", z.ZodTypeAny, { title: string; category: "technology" | "architecture" | "api_design" | "data_model" | "security" | "performance" | "refactoring" | "dependency" | "infrastructure" | "testing" | "other"; context: string; decision: string; alternatives: { name: string; description: string; pros: string[]; cons: string[]; whyNotChosen?: string | undefined; }[]; consequences: { description: string; type: "positive" | "negative" | "neutral"; timeframe?: "immediate" | "short-term" | "long-term" | undefined; affectedParties?: string[] | undefined; }[]; relatedFiles: { path: string; changeType: "created" | "modified" | "deleted" | "renamed"; linesChanged?: number | undefined; }[]; tags: string[]; source?: { type?: "claude_session" | "cursor_session" | "manual" | "imported" | undefined; sourceId?: string | undefined; } | undefined; supersedes?: string | undefined; confidence?: "high" | "medium" | "low" | "experimental" | undefined; significance?: "high" | "medium" | "low" | "critical" | undefined; drivers?: { description: string; type: "requirement" | "constraint" | "assumption" | "risk" | "goal"; priority?: "must-have" | "should-have" | "nice-to-have" | undefined; }[] | undefined; decisionMakers?: string[] | undefined; stakeholders?: string[] | undefined; reviewDate?: Date | undefined; risks?: string[] | undefined; assumptions?: string[] | undefined; }, { title: string; context: string; decision: string; category?: "technology" | "architecture" | "api_design" | "data_model" | "security" | "performance" | "refactoring" | "dependency" | "infrastructure" | "testing" | "other" | undefined; alternatives?: { name: string; description?: string | undefined; pros?: string[] | undefined; cons?: string[] | undefined; whyNotChosen?: string | undefined; }[] | undefined; consequences?: { description: string; type: "positive" | "negative" | "neutral"; timeframe?: "immediate" | "short-term" | "long-term" | undefined; affectedParties?: string[] | undefined; }[] | undefined; relatedFiles?: { path: string; changeType: "created" | "modified" | "deleted" | "renamed"; linesChanged?: number | undefined; }[] | undefined; source?: { type?: "claude_session" | "cursor_session" | "manual" | "imported" | undefined; sourceId?: string | undefined; } | undefined; tags?: string[] | undefined; supersedes?: string | undefined; confidence?: "high" | "medium" | "low" | "experimental" | undefined; significance?: "high" | "medium" | "low" | "critical" | undefined; drivers?: { description: string; type: "requirement" | "constraint" | "assumption" | "risk" | "goal"; priority?: "must-have" | "should-have" | "nice-to-have" | undefined; }[] | undefined; decisionMakers?: string[] | undefined; stakeholders?: string[] | undefined; reviewDate?: Date | undefined; risks?: string[] | undefined; assumptions?: string[] | undefined; }>; /** * Update ADR input schema */ export declare const UpdateADRInputSchema: z.ZodObject<{ id: z.ZodString; status: z.ZodOptional>; title: z.ZodOptional; context: z.ZodOptional; decision: z.ZodOptional; category: z.ZodOptional>; alternatives: z.ZodOptional; pros: z.ZodDefault>; cons: z.ZodDefault>; whyNotChosen: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; description: string; pros: string[]; cons: string[]; whyNotChosen?: string | undefined; }, { name: string; description?: string | undefined; pros?: string[] | undefined; cons?: string[] | undefined; whyNotChosen?: string | undefined; }>, "many">>; consequences: z.ZodOptional; description: z.ZodString; timeframe: z.ZodOptional>; affectedParties: z.ZodOptional>; }, "strip", z.ZodTypeAny, { description: string; type: "positive" | "negative" | "neutral"; timeframe?: "immediate" | "short-term" | "long-term" | undefined; affectedParties?: string[] | undefined; }, { description: string; type: "positive" | "negative" | "neutral"; timeframe?: "immediate" | "short-term" | "long-term" | undefined; affectedParties?: string[] | undefined; }>, "many">>; relatedFiles: z.ZodOptional; linesChanged: z.ZodOptional; }, "strip", z.ZodTypeAny, { path: string; changeType: "created" | "modified" | "deleted" | "renamed"; linesChanged?: number | undefined; }, { path: string; changeType: "created" | "modified" | "deleted" | "renamed"; linesChanged?: number | undefined; }>, "many">>; tags: z.ZodOptional>; supersededBy: z.ZodOptional; }, "strip", z.ZodTypeAny, { id: string; status?: "proposed" | "accepted" | "deprecated" | "superseded" | undefined; title?: string | undefined; category?: "technology" | "architecture" | "api_design" | "data_model" | "security" | "performance" | "refactoring" | "dependency" | "infrastructure" | "testing" | "other" | undefined; context?: string | undefined; decision?: string | undefined; alternatives?: { name: string; description: string; pros: string[]; cons: string[]; whyNotChosen?: string | undefined; }[] | undefined; consequences?: { description: string; type: "positive" | "negative" | "neutral"; timeframe?: "immediate" | "short-term" | "long-term" | undefined; affectedParties?: string[] | undefined; }[] | undefined; relatedFiles?: { path: string; changeType: "created" | "modified" | "deleted" | "renamed"; linesChanged?: number | undefined; }[] | undefined; tags?: string[] | undefined; supersededBy?: string | undefined; }, { id: string; status?: "proposed" | "accepted" | "deprecated" | "superseded" | undefined; title?: string | undefined; category?: "technology" | "architecture" | "api_design" | "data_model" | "security" | "performance" | "refactoring" | "dependency" | "infrastructure" | "testing" | "other" | undefined; context?: string | undefined; decision?: string | undefined; alternatives?: { name: string; description?: string | undefined; pros?: string[] | undefined; cons?: string[] | undefined; whyNotChosen?: string | undefined; }[] | undefined; consequences?: { description: string; type: "positive" | "negative" | "neutral"; timeframe?: "immediate" | "short-term" | "long-term" | undefined; affectedParties?: string[] | undefined; }[] | undefined; relatedFiles?: { path: string; changeType: "created" | "modified" | "deleted" | "renamed"; linesChanged?: number | undefined; }[] | undefined; tags?: string[] | undefined; supersededBy?: string | undefined; }>; /** * Search options schema */ export declare const SearchOptionsSchema: z.ZodObject<{ limit: z.ZodDefault>; offset: z.ZodDefault>; status: z.ZodOptional>; category: z.ZodOptional>; tags: z.ZodOptional>; since: z.ZodOptional; until: z.ZodOptional; }, "strip", z.ZodTypeAny, { limit: number; offset: number; status?: "proposed" | "accepted" | "deprecated" | "superseded" | undefined; category?: "technology" | "architecture" | "api_design" | "data_model" | "security" | "performance" | "refactoring" | "dependency" | "infrastructure" | "testing" | "other" | undefined; tags?: string[] | undefined; since?: Date | undefined; until?: Date | undefined; }, { status?: "proposed" | "accepted" | "deprecated" | "superseded" | undefined; category?: "technology" | "architecture" | "api_design" | "data_model" | "security" | "performance" | "refactoring" | "dependency" | "infrastructure" | "testing" | "other" | undefined; tags?: string[] | undefined; limit?: number | undefined; offset?: number | undefined; since?: Date | undefined; until?: Date | undefined; }>; /** * Timeline options schema */ export declare const TimelineOptionsSchema: z.ZodObject<{ limit: z.ZodDefault>; before: z.ZodOptional; after: z.ZodOptional; order: z.ZodDefault>>; }, "strip", z.ZodTypeAny, { limit: number; order: "asc" | "desc"; before?: Date | undefined; after?: Date | undefined; }, { limit?: number | undefined; before?: Date | undefined; after?: Date | undefined; order?: "asc" | "desc" | undefined; }>; /** * Search query schema */ export declare const SearchQuerySchema: z.ZodString; /** * Ask question schema */ export declare const AskQuestionSchema: z.ZodString; export type ValidatedCreateADRInput = z.infer; export type ValidatedUpdateADRInput = z.infer; export type ValidatedSearchOptions = z.infer; export type ValidatedTimelineOptions = z.infer; //# sourceMappingURL=schemas.d.ts.map