@pactosigna/schemas 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/document-type-patterns-JuAGFi_j.d.ts +64 -0
- package/dist/document-type-patterns.d.ts +1 -59
- package/dist/index.d.ts +1803 -3
- package/dist/index.js +1348 -177
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,1806 @@
|
|
|
1
|
-
export { AcceptabilityStatusSchema, AnomalyCategory, AnomalyCategorySchema, AnomalyDisposition, AnomalyDispositionSchema, AnomalyFrontmatter, AnomalyFrontmatterSchema, AnomalySeverity, AnomalySeveritySchema, AuditFinding, AuditFindingClassification, AuditFindingClassificationSchema, AuditFindingSchema, AuditReportFrontmatter, AuditReportFrontmatterSchema, AuditScheduleFrontmatter, AuditScheduleFrontmatterSchema, AuditStatus, AuditStatusSchema, CHANGE_DOCUMENT_TYPES, ChangeDocumentType, ClinicalEvaluationPlanFrontmatter, ClinicalEvaluationPlanFrontmatterSchema, ClinicalEvaluationReportFrontmatter, ClinicalEvaluationReportFrontmatterSchema, CybersecurityPlanFrontmatter, CybersecurityPlanFrontmatterSchema, DEVICE_DOCUMENT_TYPES, DOCUMENT_TYPES, DesignReviewFrontmatter, DesignReviewFrontmatterSchema, DeviceDocumentType, DocumentStatusSchema, DocumentTypeSchema, HarmFrontmatter, HarmFrontmatterSchema, HazardCategoryFrontmatter, HazardCategoryFrontmatterSchema, HazardFrontmatter, HazardFrontmatterSchema, HazardousSituationFrontmatter, HazardousSituationFrontmatterSchema, IntendedUseFrontmatter, IntendedUseFrontmatterSchema, LINK_TYPES, LabelingFrontmatter, LabelingFrontmatterSchema, LinkTypeSchema, ManagementReviewAttendee, ManagementReviewAttendeeSchema, ManagementReviewFrontmatter, ManagementReviewFrontmatterSchema, Mitigation, MitigationSchema, MitigationTargetSchema, PlannedAuditEntry, PlannedAuditEntrySchema, PostMarketFeedbackCategorySchema, PostMarketFeedbackFrontmatter, PostMarketFeedbackFrontmatterSchema, PostMarketFeedbackSeveritySchema, PostMarketSurveillancePlanFrontmatter, PostMarketSurveillancePlanFrontmatterSchema, ProductDevelopmentPlanFrontmatter, ProductDevelopmentPlanFrontmatterSchema, QMS_DOCUMENT_TYPES, QmsDocumentType, REQUIRED_SECTIONS, RegulatoryFrameworkSchema, ReleaseNotesAudience, ReleaseNotesAudienceSchema, ReleaseNotesFrontmatter, ReleaseNotesFrontmatterSchema, ReleasePlanFrontmatter, ReleasePlanFrontmatterSchema, ReleaseReviewConfig, ReleaseReviewConfigSchema, RepoConfig, RepoConfigSchema, RequirementFormat, RequirementFormatSchema, RequirementFrontmatter, RequirementFrontmatterSchema, RequirementFulfillmentType, RequirementFulfillmentTypeSchema, RequirementType, RequirementTypeSchema, RetentionPolicy, RetentionPolicySchema, RiskDocumentStatus, RiskDocumentStatusSchema, RiskEntryFrontmatter, RiskEntryFrontmatterSchema, RiskGapCodeSchema, RiskGapSeveritySchema, RiskManagementPlanFrontmatter, RiskManagementPlanFrontmatterSchema, RiskMatrixConfig, RiskMatrixConfigSchema, SafetyClassSchema, SbomFrontmatter, SbomFrontmatterSchema, SoftwareDevelopmentPlanFrontmatter, SoftwareDevelopmentPlanFrontmatterSchema, SoftwareMaintenancePlanFrontmatter, SoftwareMaintenancePlanFrontmatterSchema, SoftwareTestPlanFrontmatter, SoftwareTestPlanFrontmatterSchema, SoupRegisterFrontmatter, SoupRegisterFrontmatterSchema, SummativeEvaluationFrontmatter, SummativeEvaluationFrontmatterSchema, TaskAnalysisFrontmatter, TaskAnalysisFrontmatterSchema, TestPhase, TestPhaseSchema, TestProtocolFrontmatter, TestProtocolFrontmatterSchema, TestReportFrontmatter, TestReportFrontmatterSchema, UsabilityEvaluationFrontmatter, UsabilityEvaluationFrontmatterSchema, UsabilityPlanFrontmatter, UsabilityPlanFrontmatterSchema, UseSpecificationFrontmatter, UseSpecificationFrontmatterSchema, UserNeedFrontmatter, UserNeedFrontmatterSchema, UserNeedPriority, UserNeedPrioritySchema, getEffectiveRetentionYears, isChangeDocumentType, isDeviceDocumentType, isQmsDocumentType, isWithinRetentionPeriod } from '@pactosigna/shared';
|
|
2
1
|
import { z } from 'zod';
|
|
3
|
-
|
|
2
|
+
import { D as DocumentType, L as LinkType } from './document-type-patterns-JuAGFi_j.js';
|
|
3
|
+
export { F as FOLDER_RULES, a as FolderRule, J as JSON_SBOM_FOLDERS, N as NON_REGULATED_FOLDERS, f as findFolderRule, i as inferDocumentType } from './document-type-patterns-JuAGFi_j.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Common Zod enum schemas shared across multiple schema files.
|
|
7
|
+
*
|
|
8
|
+
* Extracted from index.ts to avoid circular dependencies when other
|
|
9
|
+
* schema files (e.g. frameworks.ts) need to reference these enums
|
|
10
|
+
* while also being re-exported from index.ts.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
declare const RegulatoryFrameworkSchema: z.ZodEnum<["ISO_13485", "IEC_62304", "FDA_21_CFR_820", "QMSR", "EU_MDR", "ISO_14971", "AI_ACT"]>;
|
|
14
|
+
declare const SafetyClassSchema: z.ZodEnum<["A", "B", "C"]>;
|
|
15
|
+
declare const DocumentTypeSchema: z.ZodEnum<["user_need", "requirement", "architecture", "detailed_design", "test_protocol", "test_report", "sop", "work_instruction", "policy", "usability_risk", "software_risk", "security_risk", "haz_soe_software", "haz_soe_security", "hazardous_situation", "harm", "hazard_category", "usability_plan", "use_specification", "task_analysis", "usability_evaluation", "summative_evaluation", "risk_management_plan", "software_development_plan", "software_maintenance_plan", "soup_register", "anomaly", "cybersecurity_plan", "sbom", "clinical_evaluation_plan", "clinical_evaluation_report", "post_market_surveillance_plan", "post_market_feedback", "labeling", "product_development_plan", "intended_use", "release_plan", "design_review", "release_notes", "supplier", "audit_schedule", "audit_report", "management_review", "software_test_plan"]>;
|
|
16
|
+
declare const DocumentStatusSchema: z.ZodEnum<["draft", "in_review", "approved", "obsolete", "example"]>;
|
|
17
|
+
declare const LinkTypeSchema: z.ZodEnum<["derives_from", "implements", "verified_by", "mitigates", "parent_of", "related_to", "leads_to", "results_in", "analyzes"]>;
|
|
18
|
+
declare const AcceptabilityStatusSchema: z.ZodEnum<["acceptable", "review_required", "unacceptable"]>;
|
|
19
|
+
|
|
20
|
+
declare const RiskDocumentStatusSchema: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
21
|
+
declare const MitigationTargetSchema: z.ZodEnum<["sequence_probability", "harm_probability", "severity"]>;
|
|
22
|
+
declare const RiskGapCodeSchema: z.ZodEnum<["hazard_no_situation", "situation_no_harm", "hazard_not_analyzed", "missing_mitigation", "broken_mitigation_link", "control_not_approved", "missing_risk_benefit", "risk_missing_safety_chain", "risk_broken_safety_chain", "wrong_probability_dimension", "missing_frontmatter", "requirement_no_architecture", "architecture_no_segregation", "architecture_no_parent", "haz_missing_category", "haz_invalid_category", "category_not_approved"]>;
|
|
23
|
+
declare const RiskGapSeveritySchema: z.ZodEnum<["error", "warning"]>;
|
|
24
|
+
declare const MitigationSchema: z.ZodObject<{
|
|
25
|
+
control: z.ZodString;
|
|
26
|
+
reduces: z.ZodEnum<["sequence_probability", "harm_probability", "severity"]>;
|
|
27
|
+
for_harm: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
control: string;
|
|
30
|
+
reduces: "sequence_probability" | "harm_probability" | "severity";
|
|
31
|
+
for_harm?: string | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
control: string;
|
|
34
|
+
reduces: "sequence_probability" | "harm_probability" | "severity";
|
|
35
|
+
for_harm?: string | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
declare const RiskEntryFrontmatterSchema: z.ZodEffects<z.ZodObject<{
|
|
38
|
+
type: z.ZodEnum<["software_risk", "usability_risk", "security_risk"]>;
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
title: z.ZodString;
|
|
41
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
42
|
+
analyzes: z.ZodString;
|
|
43
|
+
hazardous_situation: z.ZodString;
|
|
44
|
+
harm_assessments: z.ZodArray<z.ZodObject<{
|
|
45
|
+
harm: z.ZodString;
|
|
46
|
+
inherent_probability: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
inherent_exploitability: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
residual_probability: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
residual_exploitability: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
residual_severity_override: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
harm: string;
|
|
53
|
+
inherent_probability?: number | undefined;
|
|
54
|
+
inherent_exploitability?: number | undefined;
|
|
55
|
+
residual_probability?: number | undefined;
|
|
56
|
+
residual_exploitability?: number | undefined;
|
|
57
|
+
residual_severity_override?: number | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
harm: string;
|
|
60
|
+
inherent_probability?: number | undefined;
|
|
61
|
+
inherent_exploitability?: number | undefined;
|
|
62
|
+
residual_probability?: number | undefined;
|
|
63
|
+
residual_exploitability?: number | undefined;
|
|
64
|
+
residual_severity_override?: number | undefined;
|
|
65
|
+
}>, "many">;
|
|
66
|
+
mitigations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
67
|
+
control: z.ZodString;
|
|
68
|
+
reduces: z.ZodEnum<["sequence_probability", "harm_probability", "severity"]>;
|
|
69
|
+
for_harm: z.ZodOptional<z.ZodString>;
|
|
70
|
+
}, "strip", z.ZodTypeAny, {
|
|
71
|
+
control: string;
|
|
72
|
+
reduces: "sequence_probability" | "harm_probability" | "severity";
|
|
73
|
+
for_harm?: string | undefined;
|
|
74
|
+
}, {
|
|
75
|
+
control: string;
|
|
76
|
+
reduces: "sequence_probability" | "harm_probability" | "severity";
|
|
77
|
+
for_harm?: string | undefined;
|
|
78
|
+
}>, "many">>;
|
|
79
|
+
cvss_score: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
cvss_vector: z.ZodOptional<z.ZodString>;
|
|
81
|
+
}, "strip", z.ZodTypeAny, {
|
|
82
|
+
type: "software_risk" | "usability_risk" | "security_risk";
|
|
83
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
84
|
+
id: string;
|
|
85
|
+
title: string;
|
|
86
|
+
analyzes: string;
|
|
87
|
+
hazardous_situation: string;
|
|
88
|
+
harm_assessments: {
|
|
89
|
+
harm: string;
|
|
90
|
+
inherent_probability?: number | undefined;
|
|
91
|
+
inherent_exploitability?: number | undefined;
|
|
92
|
+
residual_probability?: number | undefined;
|
|
93
|
+
residual_exploitability?: number | undefined;
|
|
94
|
+
residual_severity_override?: number | undefined;
|
|
95
|
+
}[];
|
|
96
|
+
mitigations?: {
|
|
97
|
+
control: string;
|
|
98
|
+
reduces: "sequence_probability" | "harm_probability" | "severity";
|
|
99
|
+
for_harm?: string | undefined;
|
|
100
|
+
}[] | undefined;
|
|
101
|
+
cvss_score?: number | undefined;
|
|
102
|
+
cvss_vector?: string | undefined;
|
|
103
|
+
}, {
|
|
104
|
+
type: "software_risk" | "usability_risk" | "security_risk";
|
|
105
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
106
|
+
id: string;
|
|
107
|
+
title: string;
|
|
108
|
+
analyzes: string;
|
|
109
|
+
hazardous_situation: string;
|
|
110
|
+
harm_assessments: {
|
|
111
|
+
harm: string;
|
|
112
|
+
inherent_probability?: number | undefined;
|
|
113
|
+
inherent_exploitability?: number | undefined;
|
|
114
|
+
residual_probability?: number | undefined;
|
|
115
|
+
residual_exploitability?: number | undefined;
|
|
116
|
+
residual_severity_override?: number | undefined;
|
|
117
|
+
}[];
|
|
118
|
+
mitigations?: {
|
|
119
|
+
control: string;
|
|
120
|
+
reduces: "sequence_probability" | "harm_probability" | "severity";
|
|
121
|
+
for_harm?: string | undefined;
|
|
122
|
+
}[] | undefined;
|
|
123
|
+
cvss_score?: number | undefined;
|
|
124
|
+
cvss_vector?: string | undefined;
|
|
125
|
+
}>, {
|
|
126
|
+
type: "software_risk" | "usability_risk" | "security_risk";
|
|
127
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
128
|
+
id: string;
|
|
129
|
+
title: string;
|
|
130
|
+
analyzes: string;
|
|
131
|
+
hazardous_situation: string;
|
|
132
|
+
harm_assessments: {
|
|
133
|
+
harm: string;
|
|
134
|
+
inherent_probability?: number | undefined;
|
|
135
|
+
inherent_exploitability?: number | undefined;
|
|
136
|
+
residual_probability?: number | undefined;
|
|
137
|
+
residual_exploitability?: number | undefined;
|
|
138
|
+
residual_severity_override?: number | undefined;
|
|
139
|
+
}[];
|
|
140
|
+
mitigations?: {
|
|
141
|
+
control: string;
|
|
142
|
+
reduces: "sequence_probability" | "harm_probability" | "severity";
|
|
143
|
+
for_harm?: string | undefined;
|
|
144
|
+
}[] | undefined;
|
|
145
|
+
cvss_score?: number | undefined;
|
|
146
|
+
cvss_vector?: string | undefined;
|
|
147
|
+
}, {
|
|
148
|
+
type: "software_risk" | "usability_risk" | "security_risk";
|
|
149
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
150
|
+
id: string;
|
|
151
|
+
title: string;
|
|
152
|
+
analyzes: string;
|
|
153
|
+
hazardous_situation: string;
|
|
154
|
+
harm_assessments: {
|
|
155
|
+
harm: string;
|
|
156
|
+
inherent_probability?: number | undefined;
|
|
157
|
+
inherent_exploitability?: number | undefined;
|
|
158
|
+
residual_probability?: number | undefined;
|
|
159
|
+
residual_exploitability?: number | undefined;
|
|
160
|
+
residual_severity_override?: number | undefined;
|
|
161
|
+
}[];
|
|
162
|
+
mitigations?: {
|
|
163
|
+
control: string;
|
|
164
|
+
reduces: "sequence_probability" | "harm_probability" | "severity";
|
|
165
|
+
for_harm?: string | undefined;
|
|
166
|
+
}[] | undefined;
|
|
167
|
+
cvss_score?: number | undefined;
|
|
168
|
+
cvss_vector?: string | undefined;
|
|
169
|
+
}>;
|
|
170
|
+
declare const HazardFrontmatterSchema: z.ZodObject<{
|
|
171
|
+
type: z.ZodEnum<["haz_soe_software", "haz_soe_security"]>;
|
|
172
|
+
id: z.ZodString;
|
|
173
|
+
title: z.ZodString;
|
|
174
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
175
|
+
leads_to: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
176
|
+
failure_mode: z.ZodOptional<z.ZodString>;
|
|
177
|
+
cause: z.ZodOptional<z.ZodString>;
|
|
178
|
+
detection_method: z.ZodOptional<z.ZodString>;
|
|
179
|
+
threat_category: z.ZodOptional<z.ZodString>;
|
|
180
|
+
attack_vector: z.ZodOptional<z.ZodString>;
|
|
181
|
+
hazard_category: z.ZodOptional<z.ZodString>;
|
|
182
|
+
}, "strip", z.ZodTypeAny, {
|
|
183
|
+
type: "haz_soe_software" | "haz_soe_security";
|
|
184
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
185
|
+
id: string;
|
|
186
|
+
title: string;
|
|
187
|
+
leads_to?: string[] | undefined;
|
|
188
|
+
failure_mode?: string | undefined;
|
|
189
|
+
cause?: string | undefined;
|
|
190
|
+
detection_method?: string | undefined;
|
|
191
|
+
threat_category?: string | undefined;
|
|
192
|
+
attack_vector?: string | undefined;
|
|
193
|
+
hazard_category?: string | undefined;
|
|
194
|
+
}, {
|
|
195
|
+
type: "haz_soe_software" | "haz_soe_security";
|
|
196
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
197
|
+
id: string;
|
|
198
|
+
title: string;
|
|
199
|
+
leads_to?: string[] | undefined;
|
|
200
|
+
failure_mode?: string | undefined;
|
|
201
|
+
cause?: string | undefined;
|
|
202
|
+
detection_method?: string | undefined;
|
|
203
|
+
threat_category?: string | undefined;
|
|
204
|
+
attack_vector?: string | undefined;
|
|
205
|
+
hazard_category?: string | undefined;
|
|
206
|
+
}>;
|
|
207
|
+
declare const HazardCategoryFrontmatterSchema: z.ZodObject<{
|
|
208
|
+
type: z.ZodLiteral<"hazard_category">;
|
|
209
|
+
id: z.ZodString;
|
|
210
|
+
title: z.ZodString;
|
|
211
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
212
|
+
source: z.ZodOptional<z.ZodString>;
|
|
213
|
+
}, "strip", z.ZodTypeAny, {
|
|
214
|
+
type: "hazard_category";
|
|
215
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
216
|
+
id: string;
|
|
217
|
+
title: string;
|
|
218
|
+
source?: string | undefined;
|
|
219
|
+
}, {
|
|
220
|
+
type: "hazard_category";
|
|
221
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
222
|
+
id: string;
|
|
223
|
+
title: string;
|
|
224
|
+
source?: string | undefined;
|
|
225
|
+
}>;
|
|
226
|
+
declare const HazardousSituationFrontmatterSchema: z.ZodObject<{
|
|
227
|
+
type: z.ZodLiteral<"hazardous_situation">;
|
|
228
|
+
id: z.ZodString;
|
|
229
|
+
title: z.ZodString;
|
|
230
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
231
|
+
results_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
232
|
+
}, "strip", z.ZodTypeAny, {
|
|
233
|
+
type: "hazardous_situation";
|
|
234
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
235
|
+
id: string;
|
|
236
|
+
title: string;
|
|
237
|
+
results_in?: string[] | undefined;
|
|
238
|
+
}, {
|
|
239
|
+
type: "hazardous_situation";
|
|
240
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
241
|
+
id: string;
|
|
242
|
+
title: string;
|
|
243
|
+
results_in?: string[] | undefined;
|
|
244
|
+
}>;
|
|
245
|
+
declare const HarmFrontmatterSchema: z.ZodObject<{
|
|
246
|
+
type: z.ZodLiteral<"harm">;
|
|
247
|
+
id: z.ZodString;
|
|
248
|
+
title: z.ZodString;
|
|
249
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
250
|
+
severity: z.ZodNumber;
|
|
251
|
+
category: z.ZodOptional<z.ZodString>;
|
|
252
|
+
}, "strip", z.ZodTypeAny, {
|
|
253
|
+
severity: number;
|
|
254
|
+
type: "harm";
|
|
255
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
256
|
+
id: string;
|
|
257
|
+
title: string;
|
|
258
|
+
category?: string | undefined;
|
|
259
|
+
}, {
|
|
260
|
+
severity: number;
|
|
261
|
+
type: "harm";
|
|
262
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
263
|
+
id: string;
|
|
264
|
+
title: string;
|
|
265
|
+
category?: string | undefined;
|
|
266
|
+
}>;
|
|
267
|
+
declare const RiskMatrixConfigSchema: z.ZodObject<{
|
|
268
|
+
version: z.ZodNumber;
|
|
269
|
+
labels: z.ZodObject<{
|
|
270
|
+
severity: z.ZodArray<z.ZodString, "many">;
|
|
271
|
+
probability: z.ZodArray<z.ZodString, "many">;
|
|
272
|
+
exploitability: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
273
|
+
}, "strip", z.ZodTypeAny, {
|
|
274
|
+
severity: string[];
|
|
275
|
+
probability: string[];
|
|
276
|
+
exploitability?: string[] | undefined;
|
|
277
|
+
}, {
|
|
278
|
+
severity: string[];
|
|
279
|
+
probability: string[];
|
|
280
|
+
exploitability?: string[] | undefined;
|
|
281
|
+
}>;
|
|
282
|
+
acceptability: z.ZodObject<{
|
|
283
|
+
unacceptable: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">;
|
|
284
|
+
review_required: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">>;
|
|
285
|
+
}, "strip", z.ZodTypeAny, {
|
|
286
|
+
unacceptable: [number, number][];
|
|
287
|
+
review_required?: [number, number][] | undefined;
|
|
288
|
+
}, {
|
|
289
|
+
unacceptable: [number, number][];
|
|
290
|
+
review_required?: [number, number][] | undefined;
|
|
291
|
+
}>;
|
|
292
|
+
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
293
|
+
unacceptable: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">;
|
|
294
|
+
review_required: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">>;
|
|
295
|
+
}, "strip", z.ZodTypeAny, {
|
|
296
|
+
unacceptable: [number, number][];
|
|
297
|
+
review_required?: [number, number][] | undefined;
|
|
298
|
+
}, {
|
|
299
|
+
unacceptable: [number, number][];
|
|
300
|
+
review_required?: [number, number][] | undefined;
|
|
301
|
+
}>>>;
|
|
302
|
+
}, "strip", z.ZodTypeAny, {
|
|
303
|
+
version: number;
|
|
304
|
+
labels: {
|
|
305
|
+
severity: string[];
|
|
306
|
+
probability: string[];
|
|
307
|
+
exploitability?: string[] | undefined;
|
|
308
|
+
};
|
|
309
|
+
acceptability: {
|
|
310
|
+
unacceptable: [number, number][];
|
|
311
|
+
review_required?: [number, number][] | undefined;
|
|
312
|
+
};
|
|
313
|
+
overrides?: Record<string, {
|
|
314
|
+
unacceptable: [number, number][];
|
|
315
|
+
review_required?: [number, number][] | undefined;
|
|
316
|
+
}> | undefined;
|
|
317
|
+
}, {
|
|
318
|
+
version: number;
|
|
319
|
+
labels: {
|
|
320
|
+
severity: string[];
|
|
321
|
+
probability: string[];
|
|
322
|
+
exploitability?: string[] | undefined;
|
|
323
|
+
};
|
|
324
|
+
acceptability: {
|
|
325
|
+
unacceptable: [number, number][];
|
|
326
|
+
review_required?: [number, number][] | undefined;
|
|
327
|
+
};
|
|
328
|
+
overrides?: Record<string, {
|
|
329
|
+
unacceptable: [number, number][];
|
|
330
|
+
review_required?: [number, number][] | undefined;
|
|
331
|
+
}> | undefined;
|
|
332
|
+
}>;
|
|
333
|
+
type RiskDocumentStatus = z.infer<typeof RiskDocumentStatusSchema>;
|
|
334
|
+
type Mitigation = z.infer<typeof MitigationSchema>;
|
|
335
|
+
type RiskEntryFrontmatter = z.infer<typeof RiskEntryFrontmatterSchema>;
|
|
336
|
+
type HazardFrontmatter = z.infer<typeof HazardFrontmatterSchema>;
|
|
337
|
+
type HazardousSituationFrontmatter = z.infer<typeof HazardousSituationFrontmatterSchema>;
|
|
338
|
+
type HazardCategoryFrontmatter = z.infer<typeof HazardCategoryFrontmatterSchema>;
|
|
339
|
+
type HarmFrontmatter = z.infer<typeof HarmFrontmatterSchema>;
|
|
340
|
+
type RiskMatrixConfig = z.infer<typeof RiskMatrixConfigSchema>;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Zod schemas for IEC 62366 Usability Engineering document types.
|
|
344
|
+
*
|
|
345
|
+
* These schemas validate frontmatter for usability engineering artifacts:
|
|
346
|
+
* - Usability Plan (UEP-*)
|
|
347
|
+
* - Use Specification (US-*)
|
|
348
|
+
* - Task Analysis (TA-*)
|
|
349
|
+
* - Usability Evaluation (UE-*)
|
|
350
|
+
* - Summative Evaluation (SE-*)
|
|
351
|
+
*
|
|
352
|
+
* Content-heavy fields have been moved to markdown sections.
|
|
353
|
+
* Only fields needed for computation/filtering remain in frontmatter.
|
|
354
|
+
*/
|
|
355
|
+
|
|
356
|
+
declare const UsabilityPlanFrontmatterSchema: z.ZodObject<{
|
|
357
|
+
type: z.ZodLiteral<"usability_plan">;
|
|
358
|
+
id: z.ZodString;
|
|
359
|
+
title: z.ZodString;
|
|
360
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
361
|
+
author: z.ZodOptional<z.ZodString>;
|
|
362
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
363
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
364
|
+
}, "strip", z.ZodTypeAny, {
|
|
365
|
+
type: "usability_plan";
|
|
366
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
367
|
+
id: string;
|
|
368
|
+
title: string;
|
|
369
|
+
author?: string | undefined;
|
|
370
|
+
reviewers?: string[] | undefined;
|
|
371
|
+
approvers?: string[] | undefined;
|
|
372
|
+
}, {
|
|
373
|
+
type: "usability_plan";
|
|
374
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
375
|
+
id: string;
|
|
376
|
+
title: string;
|
|
377
|
+
author?: string | undefined;
|
|
378
|
+
reviewers?: string[] | undefined;
|
|
379
|
+
approvers?: string[] | undefined;
|
|
380
|
+
}>;
|
|
381
|
+
declare const UseSpecificationFrontmatterSchema: z.ZodObject<{
|
|
382
|
+
type: z.ZodLiteral<"use_specification">;
|
|
383
|
+
id: z.ZodString;
|
|
384
|
+
title: z.ZodString;
|
|
385
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
386
|
+
user_group: z.ZodString;
|
|
387
|
+
author: z.ZodOptional<z.ZodString>;
|
|
388
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
389
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
390
|
+
}, "strip", z.ZodTypeAny, {
|
|
391
|
+
type: "use_specification";
|
|
392
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
393
|
+
id: string;
|
|
394
|
+
title: string;
|
|
395
|
+
user_group: string;
|
|
396
|
+
author?: string | undefined;
|
|
397
|
+
reviewers?: string[] | undefined;
|
|
398
|
+
approvers?: string[] | undefined;
|
|
399
|
+
}, {
|
|
400
|
+
type: "use_specification";
|
|
401
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
402
|
+
id: string;
|
|
403
|
+
title: string;
|
|
404
|
+
user_group: string;
|
|
405
|
+
author?: string | undefined;
|
|
406
|
+
reviewers?: string[] | undefined;
|
|
407
|
+
approvers?: string[] | undefined;
|
|
408
|
+
}>;
|
|
409
|
+
declare const TaskAnalysisFrontmatterSchema: z.ZodObject<{
|
|
410
|
+
type: z.ZodLiteral<"task_analysis">;
|
|
411
|
+
id: z.ZodString;
|
|
412
|
+
title: z.ZodString;
|
|
413
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
414
|
+
user_group: z.ZodString;
|
|
415
|
+
critical_task: z.ZodBoolean;
|
|
416
|
+
author: z.ZodOptional<z.ZodString>;
|
|
417
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
418
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
419
|
+
}, "strip", z.ZodTypeAny, {
|
|
420
|
+
type: "task_analysis";
|
|
421
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
422
|
+
id: string;
|
|
423
|
+
title: string;
|
|
424
|
+
user_group: string;
|
|
425
|
+
critical_task: boolean;
|
|
426
|
+
author?: string | undefined;
|
|
427
|
+
reviewers?: string[] | undefined;
|
|
428
|
+
approvers?: string[] | undefined;
|
|
429
|
+
}, {
|
|
430
|
+
type: "task_analysis";
|
|
431
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
432
|
+
id: string;
|
|
433
|
+
title: string;
|
|
434
|
+
user_group: string;
|
|
435
|
+
critical_task: boolean;
|
|
436
|
+
author?: string | undefined;
|
|
437
|
+
reviewers?: string[] | undefined;
|
|
438
|
+
approvers?: string[] | undefined;
|
|
439
|
+
}>;
|
|
440
|
+
declare const UsabilityEvaluationFrontmatterSchema: z.ZodObject<{
|
|
441
|
+
type: z.ZodLiteral<"usability_evaluation">;
|
|
442
|
+
id: z.ZodString;
|
|
443
|
+
title: z.ZodString;
|
|
444
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
445
|
+
result: z.ZodOptional<z.ZodEnum<["pass", "fail", "pass_with_findings"]>>;
|
|
446
|
+
author: z.ZodOptional<z.ZodString>;
|
|
447
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
448
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
449
|
+
}, "strip", z.ZodTypeAny, {
|
|
450
|
+
type: "usability_evaluation";
|
|
451
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
452
|
+
id: string;
|
|
453
|
+
title: string;
|
|
454
|
+
author?: string | undefined;
|
|
455
|
+
reviewers?: string[] | undefined;
|
|
456
|
+
approvers?: string[] | undefined;
|
|
457
|
+
result?: "pass" | "fail" | "pass_with_findings" | undefined;
|
|
458
|
+
}, {
|
|
459
|
+
type: "usability_evaluation";
|
|
460
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
461
|
+
id: string;
|
|
462
|
+
title: string;
|
|
463
|
+
author?: string | undefined;
|
|
464
|
+
reviewers?: string[] | undefined;
|
|
465
|
+
approvers?: string[] | undefined;
|
|
466
|
+
result?: "pass" | "fail" | "pass_with_findings" | undefined;
|
|
467
|
+
}>;
|
|
468
|
+
declare const SummativeEvaluationFrontmatterSchema: z.ZodObject<{
|
|
469
|
+
type: z.ZodLiteral<"summative_evaluation">;
|
|
470
|
+
id: z.ZodString;
|
|
471
|
+
title: z.ZodString;
|
|
472
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
473
|
+
result: z.ZodOptional<z.ZodEnum<["pass", "fail", "pass_with_findings"]>>;
|
|
474
|
+
author: z.ZodOptional<z.ZodString>;
|
|
475
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
476
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
477
|
+
}, "strip", z.ZodTypeAny, {
|
|
478
|
+
type: "summative_evaluation";
|
|
479
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
480
|
+
id: string;
|
|
481
|
+
title: string;
|
|
482
|
+
author?: string | undefined;
|
|
483
|
+
reviewers?: string[] | undefined;
|
|
484
|
+
approvers?: string[] | undefined;
|
|
485
|
+
result?: "pass" | "fail" | "pass_with_findings" | undefined;
|
|
486
|
+
}, {
|
|
487
|
+
type: "summative_evaluation";
|
|
488
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
489
|
+
id: string;
|
|
490
|
+
title: string;
|
|
491
|
+
author?: string | undefined;
|
|
492
|
+
reviewers?: string[] | undefined;
|
|
493
|
+
approvers?: string[] | undefined;
|
|
494
|
+
result?: "pass" | "fail" | "pass_with_findings" | undefined;
|
|
495
|
+
}>;
|
|
496
|
+
type UsabilityPlanFrontmatter = z.infer<typeof UsabilityPlanFrontmatterSchema>;
|
|
497
|
+
type UseSpecificationFrontmatter = z.infer<typeof UseSpecificationFrontmatterSchema>;
|
|
498
|
+
type TaskAnalysisFrontmatter = z.infer<typeof TaskAnalysisFrontmatterSchema>;
|
|
499
|
+
type UsabilityEvaluationFrontmatter = z.infer<typeof UsabilityEvaluationFrontmatterSchema>;
|
|
500
|
+
type SummativeEvaluationFrontmatter = z.infer<typeof SummativeEvaluationFrontmatterSchema>;
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Zod schema for ISO 14971 Risk Management Plan document type.
|
|
504
|
+
*
|
|
505
|
+
* Validates frontmatter for risk management plan artifacts (RMP-*).
|
|
506
|
+
* Content fields (device_description, safety_class, team, etc.) are now
|
|
507
|
+
* markdown sections, not frontmatter. Safety class comes from pactosigna.yml.
|
|
508
|
+
*/
|
|
509
|
+
|
|
510
|
+
declare const RiskManagementPlanFrontmatterSchema: z.ZodObject<{
|
|
511
|
+
type: z.ZodLiteral<"risk_management_plan">;
|
|
512
|
+
id: z.ZodString;
|
|
513
|
+
title: z.ZodString;
|
|
514
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
515
|
+
author: z.ZodOptional<z.ZodString>;
|
|
516
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
517
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
518
|
+
}, "strip", z.ZodTypeAny, {
|
|
519
|
+
type: "risk_management_plan";
|
|
520
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
521
|
+
id: string;
|
|
522
|
+
title: string;
|
|
523
|
+
author?: string | undefined;
|
|
524
|
+
reviewers?: string[] | undefined;
|
|
525
|
+
approvers?: string[] | undefined;
|
|
526
|
+
}, {
|
|
527
|
+
type: "risk_management_plan";
|
|
528
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
529
|
+
id: string;
|
|
530
|
+
title: string;
|
|
531
|
+
author?: string | undefined;
|
|
532
|
+
reviewers?: string[] | undefined;
|
|
533
|
+
approvers?: string[] | undefined;
|
|
534
|
+
}>;
|
|
535
|
+
type RiskManagementPlanFrontmatter = z.infer<typeof RiskManagementPlanFrontmatterSchema>;
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Zod schemas for IEC 62304 Software Lifecycle document types.
|
|
539
|
+
*/
|
|
540
|
+
|
|
541
|
+
declare const SoftwareDevelopmentPlanFrontmatterSchema: z.ZodObject<{
|
|
542
|
+
type: z.ZodLiteral<"software_development_plan">;
|
|
543
|
+
id: z.ZodString;
|
|
544
|
+
title: z.ZodString;
|
|
545
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
546
|
+
author: z.ZodOptional<z.ZodString>;
|
|
547
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
548
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
549
|
+
}, "strip", z.ZodTypeAny, {
|
|
550
|
+
type: "software_development_plan";
|
|
551
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
552
|
+
id: string;
|
|
553
|
+
title: string;
|
|
554
|
+
author?: string | undefined;
|
|
555
|
+
reviewers?: string[] | undefined;
|
|
556
|
+
approvers?: string[] | undefined;
|
|
557
|
+
}, {
|
|
558
|
+
type: "software_development_plan";
|
|
559
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
560
|
+
id: string;
|
|
561
|
+
title: string;
|
|
562
|
+
author?: string | undefined;
|
|
563
|
+
reviewers?: string[] | undefined;
|
|
564
|
+
approvers?: string[] | undefined;
|
|
565
|
+
}>;
|
|
566
|
+
declare const SoftwareMaintenancePlanFrontmatterSchema: z.ZodObject<{
|
|
567
|
+
type: z.ZodLiteral<"software_maintenance_plan">;
|
|
568
|
+
id: z.ZodString;
|
|
569
|
+
title: z.ZodString;
|
|
570
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
571
|
+
author: z.ZodOptional<z.ZodString>;
|
|
572
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
573
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
574
|
+
}, "strip", z.ZodTypeAny, {
|
|
575
|
+
type: "software_maintenance_plan";
|
|
576
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
577
|
+
id: string;
|
|
578
|
+
title: string;
|
|
579
|
+
author?: string | undefined;
|
|
580
|
+
reviewers?: string[] | undefined;
|
|
581
|
+
approvers?: string[] | undefined;
|
|
582
|
+
}, {
|
|
583
|
+
type: "software_maintenance_plan";
|
|
584
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
585
|
+
id: string;
|
|
586
|
+
title: string;
|
|
587
|
+
author?: string | undefined;
|
|
588
|
+
reviewers?: string[] | undefined;
|
|
589
|
+
approvers?: string[] | undefined;
|
|
590
|
+
}>;
|
|
591
|
+
declare const SoupRegisterFrontmatterSchema: z.ZodObject<{
|
|
592
|
+
type: z.ZodLiteral<"soup_register">;
|
|
593
|
+
id: z.ZodString;
|
|
594
|
+
title: z.ZodString;
|
|
595
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
596
|
+
author: z.ZodOptional<z.ZodString>;
|
|
597
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
598
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
599
|
+
}, "strip", z.ZodTypeAny, {
|
|
600
|
+
type: "soup_register";
|
|
601
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
602
|
+
id: string;
|
|
603
|
+
title: string;
|
|
604
|
+
author?: string | undefined;
|
|
605
|
+
reviewers?: string[] | undefined;
|
|
606
|
+
approvers?: string[] | undefined;
|
|
607
|
+
}, {
|
|
608
|
+
type: "soup_register";
|
|
609
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
610
|
+
id: string;
|
|
611
|
+
title: string;
|
|
612
|
+
author?: string | undefined;
|
|
613
|
+
reviewers?: string[] | undefined;
|
|
614
|
+
approvers?: string[] | undefined;
|
|
615
|
+
}>;
|
|
616
|
+
declare const SoftwareTestPlanFrontmatterSchema: z.ZodObject<{
|
|
617
|
+
type: z.ZodLiteral<"software_test_plan">;
|
|
618
|
+
id: z.ZodString;
|
|
619
|
+
title: z.ZodString;
|
|
620
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
621
|
+
author: z.ZodOptional<z.ZodString>;
|
|
622
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
623
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
624
|
+
}, "strip", z.ZodTypeAny, {
|
|
625
|
+
type: "software_test_plan";
|
|
626
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
627
|
+
id: string;
|
|
628
|
+
title: string;
|
|
629
|
+
author?: string | undefined;
|
|
630
|
+
reviewers?: string[] | undefined;
|
|
631
|
+
approvers?: string[] | undefined;
|
|
632
|
+
}, {
|
|
633
|
+
type: "software_test_plan";
|
|
634
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
635
|
+
id: string;
|
|
636
|
+
title: string;
|
|
637
|
+
author?: string | undefined;
|
|
638
|
+
reviewers?: string[] | undefined;
|
|
639
|
+
approvers?: string[] | undefined;
|
|
640
|
+
}>;
|
|
641
|
+
type SoftwareDevelopmentPlanFrontmatter = z.infer<typeof SoftwareDevelopmentPlanFrontmatterSchema>;
|
|
642
|
+
type SoftwareMaintenancePlanFrontmatter = z.infer<typeof SoftwareMaintenancePlanFrontmatterSchema>;
|
|
643
|
+
type SoupRegisterFrontmatter = z.infer<typeof SoupRegisterFrontmatterSchema>;
|
|
644
|
+
type SoftwareTestPlanFrontmatter = z.infer<typeof SoftwareTestPlanFrontmatterSchema>;
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* Zod schemas for IEC 62304 §9 Software Problem Resolution (Anomaly) document type.
|
|
648
|
+
*
|
|
649
|
+
* `status` = document approval lifecycle (draft → approved), shared with other doc types.
|
|
650
|
+
* `disposition` = problem resolution state (open → resolved/deferred/will_not_fix).
|
|
651
|
+
*/
|
|
652
|
+
|
|
653
|
+
declare const AnomalyCategorySchema: z.ZodEnum<["bug", "security_vulnerability", "regression", "performance"]>;
|
|
654
|
+
declare const AnomalySeveritySchema: z.ZodEnum<["critical", "major", "minor"]>;
|
|
655
|
+
declare const AnomalyDispositionSchema: z.ZodEnum<["open", "investigating", "resolved", "deferred", "will_not_fix"]>;
|
|
656
|
+
declare const AnomalyFrontmatterSchema: z.ZodObject<{
|
|
657
|
+
type: z.ZodLiteral<"anomaly">;
|
|
658
|
+
id: z.ZodString;
|
|
659
|
+
title: z.ZodString;
|
|
660
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
661
|
+
category: z.ZodEnum<["bug", "security_vulnerability", "regression", "performance"]>;
|
|
662
|
+
severity: z.ZodEnum<["critical", "major", "minor"]>;
|
|
663
|
+
disposition: z.ZodEnum<["open", "investigating", "resolved", "deferred", "will_not_fix"]>;
|
|
664
|
+
affected_version: z.ZodOptional<z.ZodString>;
|
|
665
|
+
author: z.ZodOptional<z.ZodString>;
|
|
666
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
667
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
668
|
+
}, "strip", z.ZodTypeAny, {
|
|
669
|
+
severity: "critical" | "major" | "minor";
|
|
670
|
+
type: "anomaly";
|
|
671
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
672
|
+
id: string;
|
|
673
|
+
title: string;
|
|
674
|
+
category: "performance" | "bug" | "security_vulnerability" | "regression";
|
|
675
|
+
disposition: "open" | "investigating" | "resolved" | "deferred" | "will_not_fix";
|
|
676
|
+
author?: string | undefined;
|
|
677
|
+
reviewers?: string[] | undefined;
|
|
678
|
+
approvers?: string[] | undefined;
|
|
679
|
+
affected_version?: string | undefined;
|
|
680
|
+
}, {
|
|
681
|
+
severity: "critical" | "major" | "minor";
|
|
682
|
+
type: "anomaly";
|
|
683
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
684
|
+
id: string;
|
|
685
|
+
title: string;
|
|
686
|
+
category: "performance" | "bug" | "security_vulnerability" | "regression";
|
|
687
|
+
disposition: "open" | "investigating" | "resolved" | "deferred" | "will_not_fix";
|
|
688
|
+
author?: string | undefined;
|
|
689
|
+
reviewers?: string[] | undefined;
|
|
690
|
+
approvers?: string[] | undefined;
|
|
691
|
+
affected_version?: string | undefined;
|
|
692
|
+
}>;
|
|
693
|
+
type AnomalyCategory = z.infer<typeof AnomalyCategorySchema>;
|
|
694
|
+
type AnomalySeverity = z.infer<typeof AnomalySeveritySchema>;
|
|
695
|
+
type AnomalyDisposition = z.infer<typeof AnomalyDispositionSchema>;
|
|
696
|
+
type AnomalyFrontmatter = z.infer<typeof AnomalyFrontmatterSchema>;
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Zod schemas for IEC 81001-5-1 Cybersecurity document types.
|
|
700
|
+
*/
|
|
701
|
+
|
|
702
|
+
declare const CybersecurityPlanFrontmatterSchema: z.ZodObject<{
|
|
703
|
+
type: z.ZodLiteral<"cybersecurity_plan">;
|
|
704
|
+
id: z.ZodString;
|
|
705
|
+
title: z.ZodString;
|
|
706
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
707
|
+
author: z.ZodOptional<z.ZodString>;
|
|
708
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
709
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
710
|
+
}, "strip", z.ZodTypeAny, {
|
|
711
|
+
type: "cybersecurity_plan";
|
|
712
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
713
|
+
id: string;
|
|
714
|
+
title: string;
|
|
715
|
+
author?: string | undefined;
|
|
716
|
+
reviewers?: string[] | undefined;
|
|
717
|
+
approvers?: string[] | undefined;
|
|
718
|
+
}, {
|
|
719
|
+
type: "cybersecurity_plan";
|
|
720
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
721
|
+
id: string;
|
|
722
|
+
title: string;
|
|
723
|
+
author?: string | undefined;
|
|
724
|
+
reviewers?: string[] | undefined;
|
|
725
|
+
approvers?: string[] | undefined;
|
|
726
|
+
}>;
|
|
727
|
+
declare const SbomFrontmatterSchema: z.ZodObject<{
|
|
728
|
+
type: z.ZodLiteral<"sbom">;
|
|
729
|
+
id: z.ZodString;
|
|
730
|
+
title: z.ZodString;
|
|
731
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
732
|
+
author: z.ZodOptional<z.ZodString>;
|
|
733
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
734
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
735
|
+
}, "strip", z.ZodTypeAny, {
|
|
736
|
+
type: "sbom";
|
|
737
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
738
|
+
id: string;
|
|
739
|
+
title: string;
|
|
740
|
+
author?: string | undefined;
|
|
741
|
+
reviewers?: string[] | undefined;
|
|
742
|
+
approvers?: string[] | undefined;
|
|
743
|
+
}, {
|
|
744
|
+
type: "sbom";
|
|
745
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
746
|
+
id: string;
|
|
747
|
+
title: string;
|
|
748
|
+
author?: string | undefined;
|
|
749
|
+
reviewers?: string[] | undefined;
|
|
750
|
+
approvers?: string[] | undefined;
|
|
751
|
+
}>;
|
|
752
|
+
type CybersecurityPlanFrontmatter = z.infer<typeof CybersecurityPlanFrontmatterSchema>;
|
|
753
|
+
type SbomFrontmatter = z.infer<typeof SbomFrontmatterSchema>;
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* Zod schemas for Clinical (MDR / FDA) document types.
|
|
757
|
+
*/
|
|
758
|
+
|
|
759
|
+
declare const ClinicalEvaluationPlanFrontmatterSchema: z.ZodObject<{
|
|
760
|
+
type: z.ZodLiteral<"clinical_evaluation_plan">;
|
|
761
|
+
id: z.ZodString;
|
|
762
|
+
title: z.ZodString;
|
|
763
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
764
|
+
author: z.ZodOptional<z.ZodString>;
|
|
765
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
766
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
767
|
+
}, "strip", z.ZodTypeAny, {
|
|
768
|
+
type: "clinical_evaluation_plan";
|
|
769
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
770
|
+
id: string;
|
|
771
|
+
title: string;
|
|
772
|
+
author?: string | undefined;
|
|
773
|
+
reviewers?: string[] | undefined;
|
|
774
|
+
approvers?: string[] | undefined;
|
|
775
|
+
}, {
|
|
776
|
+
type: "clinical_evaluation_plan";
|
|
777
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
778
|
+
id: string;
|
|
779
|
+
title: string;
|
|
780
|
+
author?: string | undefined;
|
|
781
|
+
reviewers?: string[] | undefined;
|
|
782
|
+
approvers?: string[] | undefined;
|
|
783
|
+
}>;
|
|
784
|
+
declare const ClinicalEvaluationReportFrontmatterSchema: z.ZodObject<{
|
|
785
|
+
type: z.ZodLiteral<"clinical_evaluation_report">;
|
|
786
|
+
id: z.ZodString;
|
|
787
|
+
title: z.ZodString;
|
|
788
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
789
|
+
author: z.ZodOptional<z.ZodString>;
|
|
790
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
791
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
792
|
+
}, "strip", z.ZodTypeAny, {
|
|
793
|
+
type: "clinical_evaluation_report";
|
|
794
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
795
|
+
id: string;
|
|
796
|
+
title: string;
|
|
797
|
+
author?: string | undefined;
|
|
798
|
+
reviewers?: string[] | undefined;
|
|
799
|
+
approvers?: string[] | undefined;
|
|
800
|
+
}, {
|
|
801
|
+
type: "clinical_evaluation_report";
|
|
802
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
803
|
+
id: string;
|
|
804
|
+
title: string;
|
|
805
|
+
author?: string | undefined;
|
|
806
|
+
reviewers?: string[] | undefined;
|
|
807
|
+
approvers?: string[] | undefined;
|
|
808
|
+
}>;
|
|
809
|
+
type ClinicalEvaluationPlanFrontmatter = z.infer<typeof ClinicalEvaluationPlanFrontmatterSchema>;
|
|
810
|
+
type ClinicalEvaluationReportFrontmatter = z.infer<typeof ClinicalEvaluationReportFrontmatterSchema>;
|
|
811
|
+
|
|
812
|
+
/**
|
|
813
|
+
* Zod schema for MDR Art. 83 Post-Market Surveillance document type.
|
|
814
|
+
*/
|
|
815
|
+
|
|
816
|
+
declare const PostMarketSurveillancePlanFrontmatterSchema: z.ZodObject<{
|
|
817
|
+
type: z.ZodLiteral<"post_market_surveillance_plan">;
|
|
818
|
+
id: z.ZodString;
|
|
819
|
+
title: z.ZodString;
|
|
820
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
821
|
+
author: z.ZodOptional<z.ZodString>;
|
|
822
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
823
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
824
|
+
}, "strip", z.ZodTypeAny, {
|
|
825
|
+
type: "post_market_surveillance_plan";
|
|
826
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
827
|
+
id: string;
|
|
828
|
+
title: string;
|
|
829
|
+
author?: string | undefined;
|
|
830
|
+
reviewers?: string[] | undefined;
|
|
831
|
+
approvers?: string[] | undefined;
|
|
832
|
+
}, {
|
|
833
|
+
type: "post_market_surveillance_plan";
|
|
834
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
835
|
+
id: string;
|
|
836
|
+
title: string;
|
|
837
|
+
author?: string | undefined;
|
|
838
|
+
reviewers?: string[] | undefined;
|
|
839
|
+
approvers?: string[] | undefined;
|
|
840
|
+
}>;
|
|
841
|
+
type PostMarketSurveillancePlanFrontmatter = z.infer<typeof PostMarketSurveillancePlanFrontmatterSchema>;
|
|
842
|
+
declare const PostMarketFeedbackCategorySchema: z.ZodEnum<["complaint", "field_observation", "clinical_followup", "trend_report"]>;
|
|
843
|
+
declare const PostMarketFeedbackSeveritySchema: z.ZodEnum<["low", "medium", "high", "critical"]>;
|
|
844
|
+
declare const PostMarketFeedbackFrontmatterSchema: z.ZodObject<{
|
|
845
|
+
type: z.ZodLiteral<"post_market_feedback">;
|
|
846
|
+
id: z.ZodString;
|
|
847
|
+
title: z.ZodString;
|
|
848
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
849
|
+
category: z.ZodEnum<["complaint", "field_observation", "clinical_followup", "trend_report"]>;
|
|
850
|
+
severity: z.ZodEnum<["low", "medium", "high", "critical"]>;
|
|
851
|
+
device: z.ZodOptional<z.ZodString>;
|
|
852
|
+
reporting_period: z.ZodOptional<z.ZodString>;
|
|
853
|
+
author: z.ZodOptional<z.ZodString>;
|
|
854
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
855
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
856
|
+
}, "strip", z.ZodTypeAny, {
|
|
857
|
+
severity: "low" | "medium" | "high" | "critical";
|
|
858
|
+
type: "post_market_feedback";
|
|
859
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
860
|
+
id: string;
|
|
861
|
+
title: string;
|
|
862
|
+
category: "complaint" | "field_observation" | "clinical_followup" | "trend_report";
|
|
863
|
+
author?: string | undefined;
|
|
864
|
+
reviewers?: string[] | undefined;
|
|
865
|
+
approvers?: string[] | undefined;
|
|
866
|
+
device?: string | undefined;
|
|
867
|
+
reporting_period?: string | undefined;
|
|
868
|
+
}, {
|
|
869
|
+
severity: "low" | "medium" | "high" | "critical";
|
|
870
|
+
type: "post_market_feedback";
|
|
871
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
872
|
+
id: string;
|
|
873
|
+
title: string;
|
|
874
|
+
category: "complaint" | "field_observation" | "clinical_followup" | "trend_report";
|
|
875
|
+
author?: string | undefined;
|
|
876
|
+
reviewers?: string[] | undefined;
|
|
877
|
+
approvers?: string[] | undefined;
|
|
878
|
+
device?: string | undefined;
|
|
879
|
+
reporting_period?: string | undefined;
|
|
880
|
+
}>;
|
|
881
|
+
type PostMarketFeedbackFrontmatter = z.infer<typeof PostMarketFeedbackFrontmatterSchema>;
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* Zod schema for MDR Annex I Labeling document type.
|
|
885
|
+
*/
|
|
886
|
+
|
|
887
|
+
declare const LabelingFrontmatterSchema: z.ZodObject<{
|
|
888
|
+
type: z.ZodLiteral<"labeling">;
|
|
889
|
+
id: z.ZodString;
|
|
890
|
+
title: z.ZodString;
|
|
891
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
892
|
+
label_type: z.ZodOptional<z.ZodEnum<["ifu", "product_label", "packaging_label"]>>;
|
|
893
|
+
author: z.ZodOptional<z.ZodString>;
|
|
894
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
895
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
896
|
+
}, "strip", z.ZodTypeAny, {
|
|
897
|
+
type: "labeling";
|
|
898
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
899
|
+
id: string;
|
|
900
|
+
title: string;
|
|
901
|
+
author?: string | undefined;
|
|
902
|
+
reviewers?: string[] | undefined;
|
|
903
|
+
approvers?: string[] | undefined;
|
|
904
|
+
label_type?: "ifu" | "product_label" | "packaging_label" | undefined;
|
|
905
|
+
}, {
|
|
906
|
+
type: "labeling";
|
|
907
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
908
|
+
id: string;
|
|
909
|
+
title: string;
|
|
910
|
+
author?: string | undefined;
|
|
911
|
+
reviewers?: string[] | undefined;
|
|
912
|
+
approvers?: string[] | undefined;
|
|
913
|
+
label_type?: "ifu" | "product_label" | "packaging_label" | undefined;
|
|
914
|
+
}>;
|
|
915
|
+
type LabelingFrontmatter = z.infer<typeof LabelingFrontmatterSchema>;
|
|
916
|
+
|
|
917
|
+
/**
|
|
918
|
+
* Zod schemas for Product-level document types (ISO 13485 §7.3).
|
|
919
|
+
*/
|
|
920
|
+
|
|
921
|
+
declare const ProductDevelopmentPlanFrontmatterSchema: z.ZodObject<{
|
|
922
|
+
type: z.ZodLiteral<"product_development_plan">;
|
|
923
|
+
id: z.ZodString;
|
|
924
|
+
title: z.ZodString;
|
|
925
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
926
|
+
author: z.ZodOptional<z.ZodString>;
|
|
927
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
928
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
929
|
+
}, "strip", z.ZodTypeAny, {
|
|
930
|
+
type: "product_development_plan";
|
|
931
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
932
|
+
id: string;
|
|
933
|
+
title: string;
|
|
934
|
+
author?: string | undefined;
|
|
935
|
+
reviewers?: string[] | undefined;
|
|
936
|
+
approvers?: string[] | undefined;
|
|
937
|
+
}, {
|
|
938
|
+
type: "product_development_plan";
|
|
939
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
940
|
+
id: string;
|
|
941
|
+
title: string;
|
|
942
|
+
author?: string | undefined;
|
|
943
|
+
reviewers?: string[] | undefined;
|
|
944
|
+
approvers?: string[] | undefined;
|
|
945
|
+
}>;
|
|
946
|
+
declare const IntendedUseFrontmatterSchema: z.ZodObject<{
|
|
947
|
+
type: z.ZodLiteral<"intended_use">;
|
|
948
|
+
id: z.ZodString;
|
|
949
|
+
title: z.ZodString;
|
|
950
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
951
|
+
author: z.ZodOptional<z.ZodString>;
|
|
952
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
953
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
954
|
+
}, "strip", z.ZodTypeAny, {
|
|
955
|
+
type: "intended_use";
|
|
956
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
957
|
+
id: string;
|
|
958
|
+
title: string;
|
|
959
|
+
author?: string | undefined;
|
|
960
|
+
reviewers?: string[] | undefined;
|
|
961
|
+
approvers?: string[] | undefined;
|
|
962
|
+
}, {
|
|
963
|
+
type: "intended_use";
|
|
964
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
965
|
+
id: string;
|
|
966
|
+
title: string;
|
|
967
|
+
author?: string | undefined;
|
|
968
|
+
reviewers?: string[] | undefined;
|
|
969
|
+
approvers?: string[] | undefined;
|
|
970
|
+
}>;
|
|
971
|
+
type ProductDevelopmentPlanFrontmatter = z.infer<typeof ProductDevelopmentPlanFrontmatterSchema>;
|
|
972
|
+
type IntendedUseFrontmatter = z.infer<typeof IntendedUseFrontmatterSchema>;
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* Zod schemas for User Need document frontmatter (ISO 13485 §7.3.2).
|
|
976
|
+
*
|
|
977
|
+
* User needs are design inputs that capture WHAT a user or stakeholder needs
|
|
978
|
+
* from the system. They are the top of the traceability chain:
|
|
979
|
+
* User Need → Product Requirement → Software Requirement → Implementation → Test
|
|
980
|
+
*
|
|
981
|
+
* Note: document type (`docType: 'user_need'`) is inferred from the repository
|
|
982
|
+
* folder path at sync time and is NOT a frontmatter field authors need to write.
|
|
983
|
+
*/
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* ISO 13485 §7.3.2 — user need priority classification.
|
|
987
|
+
* Maps to MoSCoW prioritization for design input triage.
|
|
988
|
+
*/
|
|
989
|
+
declare const UserNeedPrioritySchema: z.ZodEnum<["must_have", "should_have", "nice_to_have"]>;
|
|
990
|
+
declare const UserNeedFrontmatterSchema: z.ZodObject<{
|
|
991
|
+
id: z.ZodString;
|
|
992
|
+
title: z.ZodString;
|
|
993
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
994
|
+
/** Validated if present — ensures frontmatter doesn't misidentify the document type */
|
|
995
|
+
type: z.ZodOptional<z.ZodLiteral<"user_need">>;
|
|
996
|
+
/** The user role or stakeholder (e.g., "Quality Manager", "Developer") */
|
|
997
|
+
stakeholder: z.ZodOptional<z.ZodString>;
|
|
998
|
+
/** MoSCoW priority classification */
|
|
999
|
+
priority: z.ZodOptional<z.ZodEnum<["must_have", "should_have", "nice_to_have"]>>;
|
|
1000
|
+
/** Where this need originated (e.g., "ISO 13485 §7.3", "user interview") */
|
|
1001
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1002
|
+
/** IDs of product requirements derived from this need */
|
|
1003
|
+
derives: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1004
|
+
author: z.ZodOptional<z.ZodString>;
|
|
1005
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1006
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1007
|
+
}, "strip", z.ZodTypeAny, {
|
|
1008
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
1009
|
+
id: string;
|
|
1010
|
+
title: string;
|
|
1011
|
+
type?: "user_need" | undefined;
|
|
1012
|
+
source?: string | undefined;
|
|
1013
|
+
author?: string | undefined;
|
|
1014
|
+
reviewers?: string[] | undefined;
|
|
1015
|
+
approvers?: string[] | undefined;
|
|
1016
|
+
stakeholder?: string | undefined;
|
|
1017
|
+
priority?: "must_have" | "should_have" | "nice_to_have" | undefined;
|
|
1018
|
+
derives?: string[] | undefined;
|
|
1019
|
+
}, {
|
|
1020
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
1021
|
+
id: string;
|
|
1022
|
+
title: string;
|
|
1023
|
+
type?: "user_need" | undefined;
|
|
1024
|
+
source?: string | undefined;
|
|
1025
|
+
author?: string | undefined;
|
|
1026
|
+
reviewers?: string[] | undefined;
|
|
1027
|
+
approvers?: string[] | undefined;
|
|
1028
|
+
stakeholder?: string | undefined;
|
|
1029
|
+
priority?: "must_have" | "should_have" | "nice_to_have" | undefined;
|
|
1030
|
+
derives?: string[] | undefined;
|
|
1031
|
+
}>;
|
|
1032
|
+
type UserNeedPriority = z.infer<typeof UserNeedPrioritySchema>;
|
|
1033
|
+
type UserNeedFrontmatter = z.infer<typeof UserNeedFrontmatterSchema>;
|
|
1034
|
+
|
|
1035
|
+
/**
|
|
1036
|
+
* Zod schemas for Requirement document frontmatter (IEC 62304 §5.2.2, ISO 13485 §7.3.3).
|
|
1037
|
+
*
|
|
1038
|
+
* Note: document type (`docType: 'requirement'`) and category (`product` vs `software`)
|
|
1039
|
+
* are both inferred from the repository folder path at sync time and are NOT
|
|
1040
|
+
* frontmatter fields authors need to write.
|
|
1041
|
+
*/
|
|
1042
|
+
|
|
1043
|
+
/**
|
|
1044
|
+
* IEC 62304 §5.2.2 — software requirement classification.
|
|
1045
|
+
* Only meaningful for SRS (category='software') documents; optional for PRS.
|
|
1046
|
+
*/
|
|
1047
|
+
declare const RequirementTypeSchema: z.ZodEnum<["functional", "interface", "performance", "security", "usability", "safety", "regulatory"]>;
|
|
1048
|
+
/**
|
|
1049
|
+
* Authoring format for requirement documents.
|
|
1050
|
+
* - standard: traditional "The system shall..." style with ## Requirements + ## Verification Criteria
|
|
1051
|
+
* - user_story: agile "As a [role] I want..." style with ## User Story + ## Acceptance Criteria (BDD/Gherkin)
|
|
1052
|
+
*/
|
|
1053
|
+
declare const RequirementFormatSchema: z.ZodEnum<["standard", "user_story"]>;
|
|
1054
|
+
/**
|
|
1055
|
+
* ISO 13485 §7.3.3 — how a PRS design input is fulfilled.
|
|
1056
|
+
* Only meaningful on PRS (category='product') documents; ignored on SRS.
|
|
1057
|
+
* Default (when omitted) is 'software' — existing PRS without this field are unaffected.
|
|
1058
|
+
*
|
|
1059
|
+
* - software: Fulfilled by SRS → code (default; existing behaviour)
|
|
1060
|
+
* - labeling: Fulfilled by an IFU or label design document
|
|
1061
|
+
* - clinical: Fulfilled by a clinical evaluation report
|
|
1062
|
+
* - usability: Fulfilled by a summative evaluation or use specification
|
|
1063
|
+
* - regulatory_doc: Fulfilled by a compliance document (e.g. HIPAA risk analysis)
|
|
1064
|
+
* - process: Fulfilled by an SOP or work instruction
|
|
1065
|
+
*/
|
|
1066
|
+
declare const RequirementFulfillmentTypeSchema: z.ZodEnum<["software", "labeling", "clinical", "usability", "regulatory_doc", "process"]>;
|
|
1067
|
+
declare const RequirementFrontmatterSchema: z.ZodObject<{
|
|
1068
|
+
id: z.ZodString;
|
|
1069
|
+
title: z.ZodString;
|
|
1070
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
1071
|
+
/** IEC 62304 §5.2.2 — requirement classification (required for SRS, optional for PRS) */
|
|
1072
|
+
req_type: z.ZodOptional<z.ZodEnum<["functional", "interface", "performance", "security", "usability", "safety", "regulatory"]>>;
|
|
1073
|
+
/** Authoring convention — controls which required sections are checked */
|
|
1074
|
+
format: z.ZodOptional<z.ZodEnum<["standard", "user_story"]>>;
|
|
1075
|
+
/** ISO 13485 §7.3.3 — how this PRS design input is fulfilled (PRS only, defaults to 'software') */
|
|
1076
|
+
fulfillment_type: z.ZodOptional<z.ZodEnum<["software", "labeling", "clinical", "usability", "regulatory_doc", "process"]>>;
|
|
1077
|
+
author: z.ZodOptional<z.ZodString>;
|
|
1078
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1079
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1080
|
+
/** Upstream traceability — IDs of documents this requirement traces from (e.g., UN for PRS, PRS for SRS) */
|
|
1081
|
+
traces_from: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1082
|
+
/** Downstream traceability — IDs of documents this requirement traces to (e.g., SRS for PRS) */
|
|
1083
|
+
traces_to: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1084
|
+
}, "strip", z.ZodTypeAny, {
|
|
1085
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
1086
|
+
id: string;
|
|
1087
|
+
title: string;
|
|
1088
|
+
author?: string | undefined;
|
|
1089
|
+
reviewers?: string[] | undefined;
|
|
1090
|
+
approvers?: string[] | undefined;
|
|
1091
|
+
req_type?: "safety" | "performance" | "usability" | "regulatory" | "functional" | "interface" | "security" | undefined;
|
|
1092
|
+
format?: "standard" | "user_story" | undefined;
|
|
1093
|
+
fulfillment_type?: "labeling" | "usability" | "software" | "clinical" | "regulatory_doc" | "process" | undefined;
|
|
1094
|
+
traces_from?: string[] | undefined;
|
|
1095
|
+
traces_to?: string[] | undefined;
|
|
1096
|
+
}, {
|
|
1097
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
1098
|
+
id: string;
|
|
1099
|
+
title: string;
|
|
1100
|
+
author?: string | undefined;
|
|
1101
|
+
reviewers?: string[] | undefined;
|
|
1102
|
+
approvers?: string[] | undefined;
|
|
1103
|
+
req_type?: "safety" | "performance" | "usability" | "regulatory" | "functional" | "interface" | "security" | undefined;
|
|
1104
|
+
format?: "standard" | "user_story" | undefined;
|
|
1105
|
+
fulfillment_type?: "labeling" | "usability" | "software" | "clinical" | "regulatory_doc" | "process" | undefined;
|
|
1106
|
+
traces_from?: string[] | undefined;
|
|
1107
|
+
traces_to?: string[] | undefined;
|
|
1108
|
+
}>;
|
|
1109
|
+
type RequirementType = z.infer<typeof RequirementTypeSchema>;
|
|
1110
|
+
type RequirementFormat = z.infer<typeof RequirementFormatSchema>;
|
|
1111
|
+
type RequirementFulfillmentType = z.infer<typeof RequirementFulfillmentTypeSchema>;
|
|
1112
|
+
type RequirementFrontmatter = z.infer<typeof RequirementFrontmatterSchema>;
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* Zod schemas for Test document types (protocols and reports).
|
|
1116
|
+
*/
|
|
1117
|
+
|
|
1118
|
+
declare const TestProtocolFrontmatterSchema: z.ZodObject<{
|
|
1119
|
+
type: z.ZodLiteral<"test_protocol">;
|
|
1120
|
+
id: z.ZodString;
|
|
1121
|
+
title: z.ZodString;
|
|
1122
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
1123
|
+
author: z.ZodOptional<z.ZodString>;
|
|
1124
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1125
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1126
|
+
}, "strip", z.ZodTypeAny, {
|
|
1127
|
+
type: "test_protocol";
|
|
1128
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
1129
|
+
id: string;
|
|
1130
|
+
title: string;
|
|
1131
|
+
author?: string | undefined;
|
|
1132
|
+
reviewers?: string[] | undefined;
|
|
1133
|
+
approvers?: string[] | undefined;
|
|
1134
|
+
}, {
|
|
1135
|
+
type: "test_protocol";
|
|
1136
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
1137
|
+
id: string;
|
|
1138
|
+
title: string;
|
|
1139
|
+
author?: string | undefined;
|
|
1140
|
+
reviewers?: string[] | undefined;
|
|
1141
|
+
approvers?: string[] | undefined;
|
|
1142
|
+
}>;
|
|
1143
|
+
declare const TestPhaseSchema: z.ZodEnum<["verification", "production"]>;
|
|
1144
|
+
declare const TestReportFrontmatterSchema: z.ZodObject<{
|
|
1145
|
+
type: z.ZodLiteral<"test_report">;
|
|
1146
|
+
id: z.ZodString;
|
|
1147
|
+
title: z.ZodString;
|
|
1148
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
1149
|
+
author: z.ZodOptional<z.ZodString>;
|
|
1150
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1151
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1152
|
+
release_version: z.ZodOptional<z.ZodString>;
|
|
1153
|
+
test_phase: z.ZodOptional<z.ZodEnum<["verification", "production"]>>;
|
|
1154
|
+
}, "strip", z.ZodTypeAny, {
|
|
1155
|
+
type: "test_report";
|
|
1156
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
1157
|
+
id: string;
|
|
1158
|
+
title: string;
|
|
1159
|
+
author?: string | undefined;
|
|
1160
|
+
reviewers?: string[] | undefined;
|
|
1161
|
+
approvers?: string[] | undefined;
|
|
1162
|
+
release_version?: string | undefined;
|
|
1163
|
+
test_phase?: "verification" | "production" | undefined;
|
|
1164
|
+
}, {
|
|
1165
|
+
type: "test_report";
|
|
1166
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
1167
|
+
id: string;
|
|
1168
|
+
title: string;
|
|
1169
|
+
author?: string | undefined;
|
|
1170
|
+
reviewers?: string[] | undefined;
|
|
1171
|
+
approvers?: string[] | undefined;
|
|
1172
|
+
release_version?: string | undefined;
|
|
1173
|
+
test_phase?: "verification" | "production" | undefined;
|
|
1174
|
+
}>;
|
|
1175
|
+
type TestPhase = z.infer<typeof TestPhaseSchema>;
|
|
1176
|
+
type TestProtocolFrontmatter = z.infer<typeof TestProtocolFrontmatterSchema>;
|
|
1177
|
+
type TestReportFrontmatter = z.infer<typeof TestReportFrontmatterSchema>;
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* Zod schema for the pactosigna.yml repository config file.
|
|
1181
|
+
*
|
|
1182
|
+
* This file lives at the root of a connected device repository and
|
|
1183
|
+
* declares device identity, safety classification, regulatory
|
|
1184
|
+
* classification metadata, and release review signing requirements.
|
|
1185
|
+
* The sync engine reads it and applies the config to the Device entity.
|
|
1186
|
+
*/
|
|
1187
|
+
|
|
1188
|
+
declare const ReleaseReviewConfigSchema: z.ZodObject<{
|
|
1189
|
+
required_departments: z.ZodArray<z.ZodString, "many">;
|
|
1190
|
+
final_approver: z.ZodString;
|
|
1191
|
+
}, "strip", z.ZodTypeAny, {
|
|
1192
|
+
final_approver: string;
|
|
1193
|
+
required_departments: string[];
|
|
1194
|
+
}, {
|
|
1195
|
+
final_approver: string;
|
|
1196
|
+
required_departments: string[];
|
|
1197
|
+
}>;
|
|
1198
|
+
type ReleaseReviewConfig = z.infer<typeof ReleaseReviewConfigSchema>;
|
|
1199
|
+
declare const RepoConfigSchema: z.ZodObject<{
|
|
1200
|
+
device: z.ZodObject<{
|
|
1201
|
+
name: z.ZodString;
|
|
1202
|
+
safety_class: z.ZodEnum<["A", "B", "C"]>;
|
|
1203
|
+
classification: z.ZodOptional<z.ZodObject<{
|
|
1204
|
+
eu: z.ZodOptional<z.ZodString>;
|
|
1205
|
+
us: z.ZodOptional<z.ZodString>;
|
|
1206
|
+
}, "strip", z.ZodTypeAny, {
|
|
1207
|
+
eu?: string | undefined;
|
|
1208
|
+
us?: string | undefined;
|
|
1209
|
+
}, {
|
|
1210
|
+
eu?: string | undefined;
|
|
1211
|
+
us?: string | undefined;
|
|
1212
|
+
}>>;
|
|
1213
|
+
udi_device_identifier: z.ZodOptional<z.ZodString>;
|
|
1214
|
+
}, "strip", z.ZodTypeAny, {
|
|
1215
|
+
safety_class: "A" | "B" | "C";
|
|
1216
|
+
name: string;
|
|
1217
|
+
classification?: {
|
|
1218
|
+
eu?: string | undefined;
|
|
1219
|
+
us?: string | undefined;
|
|
1220
|
+
} | undefined;
|
|
1221
|
+
udi_device_identifier?: string | undefined;
|
|
1222
|
+
}, {
|
|
1223
|
+
safety_class: "A" | "B" | "C";
|
|
1224
|
+
name: string;
|
|
1225
|
+
classification?: {
|
|
1226
|
+
eu?: string | undefined;
|
|
1227
|
+
us?: string | undefined;
|
|
1228
|
+
} | undefined;
|
|
1229
|
+
udi_device_identifier?: string | undefined;
|
|
1230
|
+
}>;
|
|
1231
|
+
release_review: z.ZodOptional<z.ZodObject<{
|
|
1232
|
+
required_departments: z.ZodArray<z.ZodString, "many">;
|
|
1233
|
+
final_approver: z.ZodString;
|
|
1234
|
+
}, "strip", z.ZodTypeAny, {
|
|
1235
|
+
final_approver: string;
|
|
1236
|
+
required_departments: string[];
|
|
1237
|
+
}, {
|
|
1238
|
+
final_approver: string;
|
|
1239
|
+
required_departments: string[];
|
|
1240
|
+
}>>;
|
|
1241
|
+
}, "strip", z.ZodTypeAny, {
|
|
1242
|
+
device: {
|
|
1243
|
+
safety_class: "A" | "B" | "C";
|
|
1244
|
+
name: string;
|
|
1245
|
+
classification?: {
|
|
1246
|
+
eu?: string | undefined;
|
|
1247
|
+
us?: string | undefined;
|
|
1248
|
+
} | undefined;
|
|
1249
|
+
udi_device_identifier?: string | undefined;
|
|
1250
|
+
};
|
|
1251
|
+
release_review?: {
|
|
1252
|
+
final_approver: string;
|
|
1253
|
+
required_departments: string[];
|
|
1254
|
+
} | undefined;
|
|
1255
|
+
}, {
|
|
1256
|
+
device: {
|
|
1257
|
+
safety_class: "A" | "B" | "C";
|
|
1258
|
+
name: string;
|
|
1259
|
+
classification?: {
|
|
1260
|
+
eu?: string | undefined;
|
|
1261
|
+
us?: string | undefined;
|
|
1262
|
+
} | undefined;
|
|
1263
|
+
udi_device_identifier?: string | undefined;
|
|
1264
|
+
};
|
|
1265
|
+
release_review?: {
|
|
1266
|
+
final_approver: string;
|
|
1267
|
+
required_departments: string[];
|
|
1268
|
+
} | undefined;
|
|
1269
|
+
}>;
|
|
1270
|
+
type RepoConfig = z.infer<typeof RepoConfigSchema>;
|
|
1271
|
+
|
|
1272
|
+
/**
|
|
1273
|
+
* Change Management Schemas
|
|
1274
|
+
*
|
|
1275
|
+
* Frontmatter schemas and parsed body types for release_plan, design_review,
|
|
1276
|
+
* and release_notes document types. These types are consumed by the sync
|
|
1277
|
+
* engine body parsers and the gap detection system.
|
|
1278
|
+
*/
|
|
1279
|
+
|
|
1280
|
+
declare const ReleasePlanFrontmatterSchema: z.ZodObject<{
|
|
1281
|
+
id: z.ZodString;
|
|
1282
|
+
title: z.ZodString;
|
|
1283
|
+
type: z.ZodOptional<z.ZodLiteral<"release_plan">>;
|
|
1284
|
+
status: z.ZodOptional<z.ZodString>;
|
|
1285
|
+
author: z.ZodOptional<z.ZodString>;
|
|
1286
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1287
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1288
|
+
version: z.ZodOptional<z.ZodString>;
|
|
1289
|
+
target_date: z.ZodOptional<z.ZodString>;
|
|
1290
|
+
}, "strip", z.ZodTypeAny, {
|
|
1291
|
+
id: string;
|
|
1292
|
+
title: string;
|
|
1293
|
+
type?: "release_plan" | undefined;
|
|
1294
|
+
status?: string | undefined;
|
|
1295
|
+
version?: string | undefined;
|
|
1296
|
+
author?: string | undefined;
|
|
1297
|
+
reviewers?: string[] | undefined;
|
|
1298
|
+
approvers?: string[] | undefined;
|
|
1299
|
+
target_date?: string | undefined;
|
|
1300
|
+
}, {
|
|
1301
|
+
id: string;
|
|
1302
|
+
title: string;
|
|
1303
|
+
type?: "release_plan" | undefined;
|
|
1304
|
+
status?: string | undefined;
|
|
1305
|
+
version?: string | undefined;
|
|
1306
|
+
author?: string | undefined;
|
|
1307
|
+
reviewers?: string[] | undefined;
|
|
1308
|
+
approvers?: string[] | undefined;
|
|
1309
|
+
target_date?: string | undefined;
|
|
1310
|
+
}>;
|
|
1311
|
+
type ReleasePlanFrontmatter = z.infer<typeof ReleasePlanFrontmatterSchema>;
|
|
1312
|
+
declare const DesignReviewFrontmatterSchema: z.ZodObject<{
|
|
1313
|
+
id: z.ZodString;
|
|
1314
|
+
title: z.ZodString;
|
|
1315
|
+
type: z.ZodOptional<z.ZodLiteral<"design_review">>;
|
|
1316
|
+
status: z.ZodOptional<z.ZodString>;
|
|
1317
|
+
author: z.ZodOptional<z.ZodString>;
|
|
1318
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1319
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1320
|
+
/** Optional link to a Release Plan document (e.g. "RP-001") */
|
|
1321
|
+
release_plan: z.ZodOptional<z.ZodString>;
|
|
1322
|
+
/** Acknowledged suspected links — one-up/one-down neighbor analysis */
|
|
1323
|
+
suspected_links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1324
|
+
triggered_by: z.ZodString;
|
|
1325
|
+
neighbors: z.ZodArray<z.ZodObject<{
|
|
1326
|
+
document: z.ZodString;
|
|
1327
|
+
direction: z.ZodEnum<["upstream", "downstream"]>;
|
|
1328
|
+
disposition: z.ZodEnum<["included_in_release", "not_impacted"]>;
|
|
1329
|
+
/** Required when disposition is 'not_impacted' */
|
|
1330
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
1331
|
+
}, "strip", z.ZodTypeAny, {
|
|
1332
|
+
disposition: "included_in_release" | "not_impacted";
|
|
1333
|
+
document: string;
|
|
1334
|
+
direction: "upstream" | "downstream";
|
|
1335
|
+
rationale?: string | undefined;
|
|
1336
|
+
}, {
|
|
1337
|
+
disposition: "included_in_release" | "not_impacted";
|
|
1338
|
+
document: string;
|
|
1339
|
+
direction: "upstream" | "downstream";
|
|
1340
|
+
rationale?: string | undefined;
|
|
1341
|
+
}>, "many">;
|
|
1342
|
+
}, "strip", z.ZodTypeAny, {
|
|
1343
|
+
triggered_by: string;
|
|
1344
|
+
neighbors: {
|
|
1345
|
+
disposition: "included_in_release" | "not_impacted";
|
|
1346
|
+
document: string;
|
|
1347
|
+
direction: "upstream" | "downstream";
|
|
1348
|
+
rationale?: string | undefined;
|
|
1349
|
+
}[];
|
|
1350
|
+
}, {
|
|
1351
|
+
triggered_by: string;
|
|
1352
|
+
neighbors: {
|
|
1353
|
+
disposition: "included_in_release" | "not_impacted";
|
|
1354
|
+
document: string;
|
|
1355
|
+
direction: "upstream" | "downstream";
|
|
1356
|
+
rationale?: string | undefined;
|
|
1357
|
+
}[];
|
|
1358
|
+
}>, "many">>;
|
|
1359
|
+
}, "strip", z.ZodTypeAny, {
|
|
1360
|
+
id: string;
|
|
1361
|
+
title: string;
|
|
1362
|
+
type?: "design_review" | undefined;
|
|
1363
|
+
status?: string | undefined;
|
|
1364
|
+
author?: string | undefined;
|
|
1365
|
+
reviewers?: string[] | undefined;
|
|
1366
|
+
approvers?: string[] | undefined;
|
|
1367
|
+
release_plan?: string | undefined;
|
|
1368
|
+
suspected_links?: {
|
|
1369
|
+
triggered_by: string;
|
|
1370
|
+
neighbors: {
|
|
1371
|
+
disposition: "included_in_release" | "not_impacted";
|
|
1372
|
+
document: string;
|
|
1373
|
+
direction: "upstream" | "downstream";
|
|
1374
|
+
rationale?: string | undefined;
|
|
1375
|
+
}[];
|
|
1376
|
+
}[] | undefined;
|
|
1377
|
+
}, {
|
|
1378
|
+
id: string;
|
|
1379
|
+
title: string;
|
|
1380
|
+
type?: "design_review" | undefined;
|
|
1381
|
+
status?: string | undefined;
|
|
1382
|
+
author?: string | undefined;
|
|
1383
|
+
reviewers?: string[] | undefined;
|
|
1384
|
+
approvers?: string[] | undefined;
|
|
1385
|
+
release_plan?: string | undefined;
|
|
1386
|
+
suspected_links?: {
|
|
1387
|
+
triggered_by: string;
|
|
1388
|
+
neighbors: {
|
|
1389
|
+
disposition: "included_in_release" | "not_impacted";
|
|
1390
|
+
document: string;
|
|
1391
|
+
direction: "upstream" | "downstream";
|
|
1392
|
+
rationale?: string | undefined;
|
|
1393
|
+
}[];
|
|
1394
|
+
}[] | undefined;
|
|
1395
|
+
}>;
|
|
1396
|
+
type DesignReviewFrontmatter = z.infer<typeof DesignReviewFrontmatterSchema>;
|
|
1397
|
+
declare const ReleaseNotesAudienceSchema: z.ZodEnum<["customer", "technical"]>;
|
|
1398
|
+
type ReleaseNotesAudience = z.infer<typeof ReleaseNotesAudienceSchema>;
|
|
1399
|
+
declare const ReleaseNotesFrontmatterSchema: z.ZodObject<{
|
|
1400
|
+
id: z.ZodString;
|
|
1401
|
+
title: z.ZodString;
|
|
1402
|
+
type: z.ZodOptional<z.ZodLiteral<"release_notes">>;
|
|
1403
|
+
status: z.ZodEnum<["draft", "in_review", "approved", "effective", "archived", "example"]>;
|
|
1404
|
+
author: z.ZodOptional<z.ZodString>;
|
|
1405
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1406
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1407
|
+
audience: z.ZodEnum<["customer", "technical"]>;
|
|
1408
|
+
release_version: z.ZodString;
|
|
1409
|
+
}, "strip", z.ZodTypeAny, {
|
|
1410
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
1411
|
+
id: string;
|
|
1412
|
+
title: string;
|
|
1413
|
+
release_version: string;
|
|
1414
|
+
audience: "customer" | "technical";
|
|
1415
|
+
type?: "release_notes" | undefined;
|
|
1416
|
+
author?: string | undefined;
|
|
1417
|
+
reviewers?: string[] | undefined;
|
|
1418
|
+
approvers?: string[] | undefined;
|
|
1419
|
+
}, {
|
|
1420
|
+
status: "draft" | "in_review" | "approved" | "effective" | "archived" | "example";
|
|
1421
|
+
id: string;
|
|
1422
|
+
title: string;
|
|
1423
|
+
release_version: string;
|
|
1424
|
+
audience: "customer" | "technical";
|
|
1425
|
+
type?: "release_notes" | undefined;
|
|
1426
|
+
author?: string | undefined;
|
|
1427
|
+
reviewers?: string[] | undefined;
|
|
1428
|
+
approvers?: string[] | undefined;
|
|
1429
|
+
}>;
|
|
1430
|
+
type ReleaseNotesFrontmatter = z.infer<typeof ReleaseNotesFrontmatterSchema>;
|
|
1431
|
+
|
|
1432
|
+
/**
|
|
1433
|
+
* Retention policy schema for FDA 21 CFR Part 11 §11.10(c) and ESIGN §7001(d) compliance.
|
|
1434
|
+
*
|
|
1435
|
+
* Organizations must retain regulated records for a configurable period.
|
|
1436
|
+
* The default retention period is 10 years, which covers most FDA regulatory
|
|
1437
|
+
* requirements. Per-record-type overrides allow stricter retention where needed.
|
|
1438
|
+
*/
|
|
1439
|
+
declare const RetentionPolicySchema: z.ZodObject<{
|
|
1440
|
+
/** Default retention period in years for all record types */
|
|
1441
|
+
defaultPeriodYears: z.ZodDefault<z.ZodNumber>;
|
|
1442
|
+
/**
|
|
1443
|
+
* Optional per-record-type overrides (e.g., { "release": 15, "signature": 20 }).
|
|
1444
|
+
* Keys are record type identifiers; values are retention periods in years.
|
|
1445
|
+
*/
|
|
1446
|
+
byRecordType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1447
|
+
}, "strip", z.ZodTypeAny, {
|
|
1448
|
+
defaultPeriodYears: number;
|
|
1449
|
+
byRecordType?: Record<string, number> | undefined;
|
|
1450
|
+
}, {
|
|
1451
|
+
defaultPeriodYears?: number | undefined;
|
|
1452
|
+
byRecordType?: Record<string, number> | undefined;
|
|
1453
|
+
}>;
|
|
1454
|
+
type RetentionPolicy = z.infer<typeof RetentionPolicySchema>;
|
|
1455
|
+
/**
|
|
1456
|
+
* Determines whether a record is still within its retention period.
|
|
1457
|
+
*
|
|
1458
|
+
* A record is within retention if the current date is strictly before the
|
|
1459
|
+
* retention expiry date (createdAt + retentionYears). Records exactly at
|
|
1460
|
+
* the boundary are considered expired (retention period has elapsed).
|
|
1461
|
+
*
|
|
1462
|
+
* @param createdAt - The date the record was created
|
|
1463
|
+
* @param retentionYears - The retention period in years
|
|
1464
|
+
* @param now - Optional current date for testing (defaults to new Date())
|
|
1465
|
+
* @returns true if the record must be retained (cannot be deleted)
|
|
1466
|
+
*/
|
|
1467
|
+
declare function isWithinRetentionPeriod(createdAt: Date, retentionYears: number, now?: Date): boolean;
|
|
1468
|
+
/**
|
|
1469
|
+
* Resolves the effective retention period for a given record type.
|
|
1470
|
+
*
|
|
1471
|
+
* Checks the per-record-type overrides first, then falls back to the
|
|
1472
|
+
* default period. If no policy is provided, returns the regulatory
|
|
1473
|
+
* default of 10 years.
|
|
1474
|
+
*
|
|
1475
|
+
* @param policy - The organization's retention policy (or undefined)
|
|
1476
|
+
* @param recordType - The type of record to look up
|
|
1477
|
+
* @returns The retention period in years
|
|
1478
|
+
*/
|
|
1479
|
+
declare function getEffectiveRetentionYears(policy: RetentionPolicy | undefined, recordType: string): number;
|
|
1480
|
+
|
|
1481
|
+
/**
|
|
1482
|
+
* Internal Audit Management Schemas (ISO 13485 §8.2.2)
|
|
1483
|
+
*
|
|
1484
|
+
* Frontmatter schemas for audit_schedule and audit_report document types.
|
|
1485
|
+
* Consumed by the sync engine for validation and gap detection.
|
|
1486
|
+
*/
|
|
1487
|
+
|
|
1488
|
+
declare const AuditFindingClassificationSchema: z.ZodEnum<["observation", "minor_nc", "major_nc"]>;
|
|
1489
|
+
type AuditFindingClassification = z.infer<typeof AuditFindingClassificationSchema>;
|
|
1490
|
+
declare const AuditStatusSchema: z.ZodEnum<["planned", "in_progress", "completed", "cancelled"]>;
|
|
1491
|
+
type AuditStatus = z.infer<typeof AuditStatusSchema>;
|
|
1492
|
+
declare const PlannedAuditEntrySchema: z.ZodObject<{
|
|
1493
|
+
audit_id: z.ZodString;
|
|
1494
|
+
process_area: z.ZodString;
|
|
1495
|
+
clause: z.ZodOptional<z.ZodString>;
|
|
1496
|
+
planned_date: z.ZodString;
|
|
1497
|
+
auditor: z.ZodString;
|
|
1498
|
+
status: z.ZodEnum<["planned", "in_progress", "completed", "cancelled"]>;
|
|
1499
|
+
}, "strip", z.ZodTypeAny, {
|
|
1500
|
+
auditor: string;
|
|
1501
|
+
status: "in_progress" | "completed" | "cancelled" | "planned";
|
|
1502
|
+
audit_id: string;
|
|
1503
|
+
process_area: string;
|
|
1504
|
+
planned_date: string;
|
|
1505
|
+
clause?: string | undefined;
|
|
1506
|
+
}, {
|
|
1507
|
+
auditor: string;
|
|
1508
|
+
status: "in_progress" | "completed" | "cancelled" | "planned";
|
|
1509
|
+
audit_id: string;
|
|
1510
|
+
process_area: string;
|
|
1511
|
+
planned_date: string;
|
|
1512
|
+
clause?: string | undefined;
|
|
1513
|
+
}>;
|
|
1514
|
+
type PlannedAuditEntry = z.infer<typeof PlannedAuditEntrySchema>;
|
|
1515
|
+
declare const AuditScheduleFrontmatterSchema: z.ZodObject<{
|
|
1516
|
+
id: z.ZodString;
|
|
1517
|
+
title: z.ZodString;
|
|
1518
|
+
type: z.ZodOptional<z.ZodLiteral<"audit_schedule">>;
|
|
1519
|
+
status: z.ZodOptional<z.ZodString>;
|
|
1520
|
+
author: z.ZodOptional<z.ZodString>;
|
|
1521
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1522
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1523
|
+
cycle_year: z.ZodNumber;
|
|
1524
|
+
audits: z.ZodArray<z.ZodObject<{
|
|
1525
|
+
audit_id: z.ZodString;
|
|
1526
|
+
process_area: z.ZodString;
|
|
1527
|
+
clause: z.ZodOptional<z.ZodString>;
|
|
1528
|
+
planned_date: z.ZodString;
|
|
1529
|
+
auditor: z.ZodString;
|
|
1530
|
+
status: z.ZodEnum<["planned", "in_progress", "completed", "cancelled"]>;
|
|
1531
|
+
}, "strip", z.ZodTypeAny, {
|
|
1532
|
+
auditor: string;
|
|
1533
|
+
status: "in_progress" | "completed" | "cancelled" | "planned";
|
|
1534
|
+
audit_id: string;
|
|
1535
|
+
process_area: string;
|
|
1536
|
+
planned_date: string;
|
|
1537
|
+
clause?: string | undefined;
|
|
1538
|
+
}, {
|
|
1539
|
+
auditor: string;
|
|
1540
|
+
status: "in_progress" | "completed" | "cancelled" | "planned";
|
|
1541
|
+
audit_id: string;
|
|
1542
|
+
process_area: string;
|
|
1543
|
+
planned_date: string;
|
|
1544
|
+
clause?: string | undefined;
|
|
1545
|
+
}>, "many">;
|
|
1546
|
+
}, "strip", z.ZodTypeAny, {
|
|
1547
|
+
id: string;
|
|
1548
|
+
title: string;
|
|
1549
|
+
cycle_year: number;
|
|
1550
|
+
audits: {
|
|
1551
|
+
auditor: string;
|
|
1552
|
+
status: "in_progress" | "completed" | "cancelled" | "planned";
|
|
1553
|
+
audit_id: string;
|
|
1554
|
+
process_area: string;
|
|
1555
|
+
planned_date: string;
|
|
1556
|
+
clause?: string | undefined;
|
|
1557
|
+
}[];
|
|
1558
|
+
type?: "audit_schedule" | undefined;
|
|
1559
|
+
status?: string | undefined;
|
|
1560
|
+
author?: string | undefined;
|
|
1561
|
+
reviewers?: string[] | undefined;
|
|
1562
|
+
approvers?: string[] | undefined;
|
|
1563
|
+
}, {
|
|
1564
|
+
id: string;
|
|
1565
|
+
title: string;
|
|
1566
|
+
cycle_year: number;
|
|
1567
|
+
audits: {
|
|
1568
|
+
auditor: string;
|
|
1569
|
+
status: "in_progress" | "completed" | "cancelled" | "planned";
|
|
1570
|
+
audit_id: string;
|
|
1571
|
+
process_area: string;
|
|
1572
|
+
planned_date: string;
|
|
1573
|
+
clause?: string | undefined;
|
|
1574
|
+
}[];
|
|
1575
|
+
type?: "audit_schedule" | undefined;
|
|
1576
|
+
status?: string | undefined;
|
|
1577
|
+
author?: string | undefined;
|
|
1578
|
+
reviewers?: string[] | undefined;
|
|
1579
|
+
approvers?: string[] | undefined;
|
|
1580
|
+
}>;
|
|
1581
|
+
type AuditScheduleFrontmatter = z.infer<typeof AuditScheduleFrontmatterSchema>;
|
|
1582
|
+
declare const AuditFindingSchema: z.ZodObject<{
|
|
1583
|
+
finding_id: z.ZodString;
|
|
1584
|
+
classification: z.ZodEnum<["observation", "minor_nc", "major_nc"]>;
|
|
1585
|
+
description: z.ZodString;
|
|
1586
|
+
capa_id: z.ZodOptional<z.ZodString>;
|
|
1587
|
+
}, "strip", z.ZodTypeAny, {
|
|
1588
|
+
classification: "observation" | "minor_nc" | "major_nc";
|
|
1589
|
+
finding_id: string;
|
|
1590
|
+
description: string;
|
|
1591
|
+
capa_id?: string | undefined;
|
|
1592
|
+
}, {
|
|
1593
|
+
classification: "observation" | "minor_nc" | "major_nc";
|
|
1594
|
+
finding_id: string;
|
|
1595
|
+
description: string;
|
|
1596
|
+
capa_id?: string | undefined;
|
|
1597
|
+
}>;
|
|
1598
|
+
type AuditFinding = z.infer<typeof AuditFindingSchema>;
|
|
1599
|
+
declare const AuditReportFrontmatterSchema: z.ZodObject<{
|
|
1600
|
+
id: z.ZodString;
|
|
1601
|
+
title: z.ZodString;
|
|
1602
|
+
type: z.ZodOptional<z.ZodLiteral<"audit_report">>;
|
|
1603
|
+
status: z.ZodOptional<z.ZodString>;
|
|
1604
|
+
author: z.ZodOptional<z.ZodString>;
|
|
1605
|
+
reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1606
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1607
|
+
audit_date: z.ZodString;
|
|
1608
|
+
audit_id: z.ZodOptional<z.ZodString>;
|
|
1609
|
+
process_area: z.ZodString;
|
|
1610
|
+
clause: z.ZodOptional<z.ZodString>;
|
|
1611
|
+
auditor: z.ZodString;
|
|
1612
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
1613
|
+
finding_id: z.ZodString;
|
|
1614
|
+
classification: z.ZodEnum<["observation", "minor_nc", "major_nc"]>;
|
|
1615
|
+
description: z.ZodString;
|
|
1616
|
+
capa_id: z.ZodOptional<z.ZodString>;
|
|
1617
|
+
}, "strip", z.ZodTypeAny, {
|
|
1618
|
+
classification: "observation" | "minor_nc" | "major_nc";
|
|
1619
|
+
finding_id: string;
|
|
1620
|
+
description: string;
|
|
1621
|
+
capa_id?: string | undefined;
|
|
1622
|
+
}, {
|
|
1623
|
+
classification: "observation" | "minor_nc" | "major_nc";
|
|
1624
|
+
finding_id: string;
|
|
1625
|
+
description: string;
|
|
1626
|
+
capa_id?: string | undefined;
|
|
1627
|
+
}>, "many">;
|
|
1628
|
+
findings_major: z.ZodOptional<z.ZodNumber>;
|
|
1629
|
+
findings_minor: z.ZodOptional<z.ZodNumber>;
|
|
1630
|
+
findings_observations: z.ZodOptional<z.ZodNumber>;
|
|
1631
|
+
}, "strip", z.ZodTypeAny, {
|
|
1632
|
+
auditor: string;
|
|
1633
|
+
id: string;
|
|
1634
|
+
title: string;
|
|
1635
|
+
process_area: string;
|
|
1636
|
+
audit_date: string;
|
|
1637
|
+
findings: {
|
|
1638
|
+
classification: "observation" | "minor_nc" | "major_nc";
|
|
1639
|
+
finding_id: string;
|
|
1640
|
+
description: string;
|
|
1641
|
+
capa_id?: string | undefined;
|
|
1642
|
+
}[];
|
|
1643
|
+
type?: "audit_report" | undefined;
|
|
1644
|
+
status?: string | undefined;
|
|
1645
|
+
author?: string | undefined;
|
|
1646
|
+
reviewers?: string[] | undefined;
|
|
1647
|
+
approvers?: string[] | undefined;
|
|
1648
|
+
audit_id?: string | undefined;
|
|
1649
|
+
clause?: string | undefined;
|
|
1650
|
+
findings_major?: number | undefined;
|
|
1651
|
+
findings_minor?: number | undefined;
|
|
1652
|
+
findings_observations?: number | undefined;
|
|
1653
|
+
}, {
|
|
1654
|
+
auditor: string;
|
|
1655
|
+
id: string;
|
|
1656
|
+
title: string;
|
|
1657
|
+
process_area: string;
|
|
1658
|
+
audit_date: string;
|
|
1659
|
+
findings: {
|
|
1660
|
+
classification: "observation" | "minor_nc" | "major_nc";
|
|
1661
|
+
finding_id: string;
|
|
1662
|
+
description: string;
|
|
1663
|
+
capa_id?: string | undefined;
|
|
1664
|
+
}[];
|
|
1665
|
+
type?: "audit_report" | undefined;
|
|
1666
|
+
status?: string | undefined;
|
|
1667
|
+
author?: string | undefined;
|
|
1668
|
+
reviewers?: string[] | undefined;
|
|
1669
|
+
approvers?: string[] | undefined;
|
|
1670
|
+
audit_id?: string | undefined;
|
|
1671
|
+
clause?: string | undefined;
|
|
1672
|
+
findings_major?: number | undefined;
|
|
1673
|
+
findings_minor?: number | undefined;
|
|
1674
|
+
findings_observations?: number | undefined;
|
|
1675
|
+
}>;
|
|
1676
|
+
type AuditReportFrontmatter = z.infer<typeof AuditReportFrontmatterSchema>;
|
|
1677
|
+
|
|
1678
|
+
declare const ManagementReviewAttendeeSchema: z.ZodObject<{
|
|
1679
|
+
name: z.ZodString;
|
|
1680
|
+
role: z.ZodString;
|
|
1681
|
+
}, "strip", z.ZodTypeAny, {
|
|
1682
|
+
name: string;
|
|
1683
|
+
role: string;
|
|
1684
|
+
}, {
|
|
1685
|
+
name: string;
|
|
1686
|
+
role: string;
|
|
1687
|
+
}>;
|
|
1688
|
+
type ManagementReviewAttendee = z.infer<typeof ManagementReviewAttendeeSchema>;
|
|
1689
|
+
declare const ManagementReviewFrontmatterSchema: z.ZodObject<{
|
|
1690
|
+
id: z.ZodString;
|
|
1691
|
+
title: z.ZodString;
|
|
1692
|
+
type: z.ZodOptional<z.ZodLiteral<"management_review">>;
|
|
1693
|
+
version: z.ZodOptional<z.ZodString>;
|
|
1694
|
+
status: z.ZodOptional<z.ZodEnum<["draft", "scheduled", "completed"]>>;
|
|
1695
|
+
review_date: z.ZodString;
|
|
1696
|
+
review_period: z.ZodObject<{
|
|
1697
|
+
from: z.ZodString;
|
|
1698
|
+
to: z.ZodString;
|
|
1699
|
+
}, "strip", z.ZodTypeAny, {
|
|
1700
|
+
to: string;
|
|
1701
|
+
from: string;
|
|
1702
|
+
}, {
|
|
1703
|
+
to: string;
|
|
1704
|
+
from: string;
|
|
1705
|
+
}>;
|
|
1706
|
+
attendees: z.ZodArray<z.ZodObject<{
|
|
1707
|
+
name: z.ZodString;
|
|
1708
|
+
role: z.ZodString;
|
|
1709
|
+
}, "strip", z.ZodTypeAny, {
|
|
1710
|
+
name: string;
|
|
1711
|
+
role: string;
|
|
1712
|
+
}, {
|
|
1713
|
+
name: string;
|
|
1714
|
+
role: string;
|
|
1715
|
+
}>, "many">;
|
|
1716
|
+
data_snapshot_date: z.ZodOptional<z.ZodString>;
|
|
1717
|
+
next_review_date: z.ZodOptional<z.ZodString>;
|
|
1718
|
+
}, "strip", z.ZodTypeAny, {
|
|
1719
|
+
id: string;
|
|
1720
|
+
title: string;
|
|
1721
|
+
review_date: string;
|
|
1722
|
+
review_period: {
|
|
1723
|
+
to: string;
|
|
1724
|
+
from: string;
|
|
1725
|
+
};
|
|
1726
|
+
attendees: {
|
|
1727
|
+
name: string;
|
|
1728
|
+
role: string;
|
|
1729
|
+
}[];
|
|
1730
|
+
type?: "management_review" | undefined;
|
|
1731
|
+
status?: "draft" | "completed" | "scheduled" | undefined;
|
|
1732
|
+
version?: string | undefined;
|
|
1733
|
+
data_snapshot_date?: string | undefined;
|
|
1734
|
+
next_review_date?: string | undefined;
|
|
1735
|
+
}, {
|
|
1736
|
+
id: string;
|
|
1737
|
+
title: string;
|
|
1738
|
+
review_date: string;
|
|
1739
|
+
review_period: {
|
|
1740
|
+
to: string;
|
|
1741
|
+
from: string;
|
|
1742
|
+
};
|
|
1743
|
+
attendees: {
|
|
1744
|
+
name: string;
|
|
1745
|
+
role: string;
|
|
1746
|
+
}[];
|
|
1747
|
+
type?: "management_review" | undefined;
|
|
1748
|
+
status?: "draft" | "completed" | "scheduled" | undefined;
|
|
1749
|
+
version?: string | undefined;
|
|
1750
|
+
data_snapshot_date?: string | undefined;
|
|
1751
|
+
next_review_date?: string | undefined;
|
|
1752
|
+
}>;
|
|
1753
|
+
type ManagementReviewFrontmatter = z.infer<typeof ManagementReviewFrontmatterSchema>;
|
|
1754
|
+
|
|
1755
|
+
/**
|
|
1756
|
+
* Document type constants for QMS and Device bounded contexts.
|
|
1757
|
+
*
|
|
1758
|
+
* QMS documents are company-wide quality procedures.
|
|
1759
|
+
* Device documents are product-specific documentation.
|
|
1760
|
+
*/
|
|
1761
|
+
declare const QMS_DOCUMENT_TYPES: readonly ["sop", "policy", "work_instruction", "supplier", "audit_schedule", "audit_report", "management_review"];
|
|
1762
|
+
declare const DEVICE_DOCUMENT_TYPES: readonly ["user_need", "requirement", "architecture", "detailed_design", "test_protocol", "test_report", "usability_risk", "software_risk", "security_risk", "hazardous_situation", "harm", "haz_soe_software", "haz_soe_security", "hazard_category", "usability_plan", "use_specification", "task_analysis", "usability_evaluation", "summative_evaluation", "risk_management_plan", "software_development_plan", "software_maintenance_plan", "soup_register", "anomaly", "cybersecurity_plan", "sbom", "clinical_evaluation_plan", "clinical_evaluation_report", "post_market_surveillance_plan", "post_market_feedback", "labeling", "product_development_plan", "intended_use", "release_plan", "design_review", "release_notes", "software_test_plan"];
|
|
1763
|
+
type QmsDocumentType = (typeof QMS_DOCUMENT_TYPES)[number];
|
|
1764
|
+
type DeviceDocumentType = (typeof DEVICE_DOCUMENT_TYPES)[number];
|
|
1765
|
+
/**
|
|
1766
|
+
* Change document types that have standalone sign-off flows.
|
|
1767
|
+
* These are filtered out of the generic Documents page and shown
|
|
1768
|
+
* in their own dedicated navigation sections.
|
|
1769
|
+
*/
|
|
1770
|
+
declare const CHANGE_DOCUMENT_TYPES: readonly ["design_review", "release_plan"];
|
|
1771
|
+
type ChangeDocumentType = (typeof CHANGE_DOCUMENT_TYPES)[number];
|
|
1772
|
+
/**
|
|
1773
|
+
* Check if a document type is a change document with standalone sign-off
|
|
1774
|
+
*/
|
|
1775
|
+
declare function isChangeDocumentType(type: string): type is ChangeDocumentType;
|
|
1776
|
+
/**
|
|
1777
|
+
* Check if a document type belongs to QMS context
|
|
1778
|
+
*/
|
|
1779
|
+
declare function isQmsDocumentType(type: string): type is QmsDocumentType;
|
|
1780
|
+
/**
|
|
1781
|
+
* Check if a document type belongs to Device context
|
|
1782
|
+
*/
|
|
1783
|
+
declare function isDeviceDocumentType(type: string): type is DeviceDocumentType;
|
|
1784
|
+
|
|
1785
|
+
/**
|
|
1786
|
+
* Human-readable labels for document types
|
|
1787
|
+
*/
|
|
1788
|
+
declare const DOCUMENT_TYPES: Record<DocumentType, string>;
|
|
1789
|
+
/**
|
|
1790
|
+
* Human-readable labels for link types
|
|
1791
|
+
*/
|
|
1792
|
+
declare const LINK_TYPES: Record<LinkType, string>;
|
|
1793
|
+
/**
|
|
1794
|
+
* Required H2 sections per document type.
|
|
1795
|
+
*
|
|
1796
|
+
* The sync engine checks documents against this registry and generates
|
|
1797
|
+
* 'missing_section' gaps (severity: warning) for any absent headings.
|
|
1798
|
+
* Matching is case-insensitive and uses substring containment
|
|
1799
|
+
* (so "## Scope (v2.1)" matches "Scope").
|
|
1800
|
+
*
|
|
1801
|
+
* Generic mechanism: any document type can register required sections here.
|
|
1802
|
+
*/
|
|
1803
|
+
declare const REQUIRED_SECTIONS: Partial<Record<DocumentType, string[]>>;
|
|
4
1804
|
|
|
5
1805
|
/**
|
|
6
1806
|
* Schema Map — maps document type strings to their Zod frontmatter schemas.
|
|
@@ -87,4 +1887,4 @@ declare function validateDirectory(dirPath: string, options?: {
|
|
|
87
1887
|
exclude?: string[];
|
|
88
1888
|
}): DirectoryValidationResult;
|
|
89
1889
|
|
|
90
|
-
export { type DirectoryValidationResult, SCHEMA_MAP, type StructureError, type StructureWarning, type ValidationResult, getSchemaForDocumentType, validateDirectory, validateDocument };
|
|
1890
|
+
export { AcceptabilityStatusSchema, type AnomalyCategory, AnomalyCategorySchema, type AnomalyDisposition, AnomalyDispositionSchema, type AnomalyFrontmatter, AnomalyFrontmatterSchema, type AnomalySeverity, AnomalySeveritySchema, type AuditFinding, type AuditFindingClassification, AuditFindingClassificationSchema, AuditFindingSchema, type AuditReportFrontmatter, AuditReportFrontmatterSchema, type AuditScheduleFrontmatter, AuditScheduleFrontmatterSchema, type AuditStatus, AuditStatusSchema, CHANGE_DOCUMENT_TYPES, type ChangeDocumentType, type ClinicalEvaluationPlanFrontmatter, ClinicalEvaluationPlanFrontmatterSchema, type ClinicalEvaluationReportFrontmatter, ClinicalEvaluationReportFrontmatterSchema, type CybersecurityPlanFrontmatter, CybersecurityPlanFrontmatterSchema, DEVICE_DOCUMENT_TYPES, DOCUMENT_TYPES, type DesignReviewFrontmatter, DesignReviewFrontmatterSchema, type DeviceDocumentType, type DirectoryValidationResult, DocumentStatusSchema, DocumentTypeSchema, type HarmFrontmatter, HarmFrontmatterSchema, type HazardCategoryFrontmatter, HazardCategoryFrontmatterSchema, type HazardFrontmatter, HazardFrontmatterSchema, type HazardousSituationFrontmatter, HazardousSituationFrontmatterSchema, type IntendedUseFrontmatter, IntendedUseFrontmatterSchema, LINK_TYPES, type LabelingFrontmatter, LabelingFrontmatterSchema, LinkTypeSchema, type ManagementReviewAttendee, ManagementReviewAttendeeSchema, type ManagementReviewFrontmatter, ManagementReviewFrontmatterSchema, type Mitigation, MitigationSchema, MitigationTargetSchema, type PlannedAuditEntry, PlannedAuditEntrySchema, PostMarketFeedbackCategorySchema, type PostMarketFeedbackFrontmatter, PostMarketFeedbackFrontmatterSchema, PostMarketFeedbackSeveritySchema, type PostMarketSurveillancePlanFrontmatter, PostMarketSurveillancePlanFrontmatterSchema, type ProductDevelopmentPlanFrontmatter, ProductDevelopmentPlanFrontmatterSchema, QMS_DOCUMENT_TYPES, type QmsDocumentType, REQUIRED_SECTIONS, RegulatoryFrameworkSchema, type ReleaseNotesAudience, ReleaseNotesAudienceSchema, type ReleaseNotesFrontmatter, ReleaseNotesFrontmatterSchema, type ReleasePlanFrontmatter, ReleasePlanFrontmatterSchema, type ReleaseReviewConfig, ReleaseReviewConfigSchema, type RepoConfig, RepoConfigSchema, type RequirementFormat, RequirementFormatSchema, type RequirementFrontmatter, RequirementFrontmatterSchema, type RequirementFulfillmentType, RequirementFulfillmentTypeSchema, type RequirementType, RequirementTypeSchema, type RetentionPolicy, RetentionPolicySchema, type RiskDocumentStatus, RiskDocumentStatusSchema, type RiskEntryFrontmatter, RiskEntryFrontmatterSchema, RiskGapCodeSchema, RiskGapSeveritySchema, type RiskManagementPlanFrontmatter, RiskManagementPlanFrontmatterSchema, type RiskMatrixConfig, RiskMatrixConfigSchema, SCHEMA_MAP, SafetyClassSchema, type SbomFrontmatter, SbomFrontmatterSchema, type SoftwareDevelopmentPlanFrontmatter, SoftwareDevelopmentPlanFrontmatterSchema, type SoftwareMaintenancePlanFrontmatter, SoftwareMaintenancePlanFrontmatterSchema, type SoftwareTestPlanFrontmatter, SoftwareTestPlanFrontmatterSchema, type SoupRegisterFrontmatter, SoupRegisterFrontmatterSchema, type StructureError, type StructureWarning, type SummativeEvaluationFrontmatter, SummativeEvaluationFrontmatterSchema, type TaskAnalysisFrontmatter, TaskAnalysisFrontmatterSchema, type TestPhase, TestPhaseSchema, type TestProtocolFrontmatter, TestProtocolFrontmatterSchema, type TestReportFrontmatter, TestReportFrontmatterSchema, type UsabilityEvaluationFrontmatter, UsabilityEvaluationFrontmatterSchema, type UsabilityPlanFrontmatter, UsabilityPlanFrontmatterSchema, type UseSpecificationFrontmatter, UseSpecificationFrontmatterSchema, type UserNeedFrontmatter, UserNeedFrontmatterSchema, type UserNeedPriority, UserNeedPrioritySchema, type ValidationResult, getEffectiveRetentionYears, getSchemaForDocumentType, isChangeDocumentType, isDeviceDocumentType, isQmsDocumentType, isWithinRetentionPeriod, validateDirectory, validateDocument };
|