@pactosigna/schemas 0.1.0

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/index.js ADDED
@@ -0,0 +1,1156 @@
1
+ // ../shared/dist/schemas/index.js
2
+ import { z as z20 } from "zod";
3
+
4
+ // ../shared/dist/schemas/risk.js
5
+ import { z } from "zod";
6
+ var RiskDocumentStatusSchema = z.enum([
7
+ "draft",
8
+ "in_review",
9
+ "approved",
10
+ "effective",
11
+ "archived",
12
+ "example"
13
+ ]);
14
+ var MitigationTargetSchema = z.enum([
15
+ "sequence_probability",
16
+ "harm_probability",
17
+ "severity"
18
+ ]);
19
+ var RiskGapCodeSchema = z.enum([
20
+ "hazard_no_situation",
21
+ "situation_no_harm",
22
+ "hazard_not_analyzed",
23
+ "missing_mitigation",
24
+ "broken_mitigation_link",
25
+ "control_not_approved",
26
+ "missing_risk_benefit",
27
+ "severity_mismatch",
28
+ "probability_mismatch",
29
+ "missing_frontmatter"
30
+ ]);
31
+ var RiskGapSeveritySchema = z.enum(["error", "warning"]);
32
+ var MitigationSchema = z.object({
33
+ control: z.string().min(1),
34
+ reduces: MitigationTargetSchema
35
+ });
36
+ var RiskEntryFrontmatterSchema = z.object({
37
+ type: z.enum(["software_risk", "usability_risk", "security_risk"]),
38
+ id: z.string().min(1),
39
+ title: z.string().min(1),
40
+ status: RiskDocumentStatusSchema,
41
+ analyzes: z.string().min(1),
42
+ hazardous_situation: z.string().min(1),
43
+ harm: z.string().min(1),
44
+ inherent_severity: z.number().int().min(1).max(5),
45
+ inherent_probability: z.number().int().min(1).max(5).optional(),
46
+ inherent_exploitability: z.number().int().min(1).max(5).optional(),
47
+ mitigations: z.array(MitigationSchema).optional(),
48
+ residual_severity: z.number().int().min(1).max(5).optional(),
49
+ residual_probability: z.number().int().min(1).max(5).optional(),
50
+ residual_exploitability: z.number().int().min(1).max(5).optional()
51
+ });
52
+ var HazardFrontmatterSchema = z.object({
53
+ type: z.enum(["haz_soe_software", "haz_soe_security"]),
54
+ id: z.string().min(1),
55
+ title: z.string().min(1),
56
+ status: RiskDocumentStatusSchema,
57
+ leads_to: z.array(z.string()).optional(),
58
+ // sFMEA fields
59
+ failure_mode: z.string().optional(),
60
+ cause: z.string().optional(),
61
+ detection_method: z.string().optional(),
62
+ // STRIDE fields
63
+ threat_category: z.string().optional(),
64
+ attack_vector: z.string().optional()
65
+ });
66
+ var HazardousSituationFrontmatterSchema = z.object({
67
+ type: z.literal("hazardous_situation"),
68
+ id: z.string().min(1),
69
+ title: z.string().min(1),
70
+ status: RiskDocumentStatusSchema,
71
+ probability: z.number().int().min(1).max(5),
72
+ results_in: z.array(z.string()).optional()
73
+ });
74
+ var HarmFrontmatterSchema = z.object({
75
+ type: z.literal("harm"),
76
+ id: z.string().min(1),
77
+ title: z.string().min(1),
78
+ status: RiskDocumentStatusSchema,
79
+ severity: z.number().int().min(1).max(5),
80
+ category: z.string().optional()
81
+ });
82
+ var RiskMatrixConfigSchema = z.object({
83
+ version: z.number(),
84
+ labels: z.object({
85
+ severity: z.array(z.string()).length(5),
86
+ probability: z.array(z.string()).length(5),
87
+ exploitability: z.array(z.string()).length(5).optional()
88
+ }),
89
+ acceptability: z.object({
90
+ unacceptable: z.array(z.tuple([z.number(), z.number()])),
91
+ review_required: z.array(z.tuple([z.number(), z.number()])).optional()
92
+ }),
93
+ overrides: z.record(z.object({
94
+ unacceptable: z.array(z.tuple([z.number(), z.number()])),
95
+ review_required: z.array(z.tuple([z.number(), z.number()])).optional()
96
+ })).optional()
97
+ });
98
+
99
+ // ../shared/dist/schemas/usability.js
100
+ import { z as z2 } from "zod";
101
+ var UsabilityPlanFrontmatterSchema = z2.object({
102
+ type: z2.literal("usability_plan"),
103
+ id: z2.string().min(1),
104
+ title: z2.string().min(1),
105
+ status: RiskDocumentStatusSchema,
106
+ author: z2.string().optional(),
107
+ reviewers: z2.array(z2.string()).optional(),
108
+ approvers: z2.array(z2.string()).optional()
109
+ });
110
+ var UseSpecificationFrontmatterSchema = z2.object({
111
+ type: z2.literal("use_specification"),
112
+ id: z2.string().min(1),
113
+ title: z2.string().min(1),
114
+ status: RiskDocumentStatusSchema,
115
+ user_group: z2.string().min(1),
116
+ author: z2.string().optional(),
117
+ reviewers: z2.array(z2.string()).optional(),
118
+ approvers: z2.array(z2.string()).optional()
119
+ });
120
+ var TaskAnalysisFrontmatterSchema = z2.object({
121
+ type: z2.literal("task_analysis"),
122
+ id: z2.string().min(1),
123
+ title: z2.string().min(1),
124
+ status: RiskDocumentStatusSchema,
125
+ user_group: z2.string().min(1),
126
+ critical_task: z2.boolean(),
127
+ max_harm_severity: z2.number().int().min(1).max(5).optional(),
128
+ author: z2.string().optional(),
129
+ reviewers: z2.array(z2.string()).optional(),
130
+ approvers: z2.array(z2.string()).optional()
131
+ });
132
+ var UsabilityEvaluationFrontmatterSchema = z2.object({
133
+ type: z2.literal("usability_evaluation"),
134
+ id: z2.string().min(1),
135
+ title: z2.string().min(1),
136
+ status: RiskDocumentStatusSchema,
137
+ result: z2.enum(["pass", "fail", "pass_with_findings"]).optional(),
138
+ author: z2.string().optional(),
139
+ reviewers: z2.array(z2.string()).optional(),
140
+ approvers: z2.array(z2.string()).optional()
141
+ });
142
+ var SummativeEvaluationFrontmatterSchema = z2.object({
143
+ type: z2.literal("summative_evaluation"),
144
+ id: z2.string().min(1),
145
+ title: z2.string().min(1),
146
+ status: RiskDocumentStatusSchema,
147
+ result: z2.enum(["pass", "fail", "pass_with_findings"]).optional(),
148
+ author: z2.string().optional(),
149
+ reviewers: z2.array(z2.string()).optional(),
150
+ approvers: z2.array(z2.string()).optional()
151
+ });
152
+
153
+ // ../shared/dist/schemas/risk-management-plan.js
154
+ import { z as z3 } from "zod";
155
+ var RiskManagementPlanFrontmatterSchema = z3.object({
156
+ type: z3.literal("risk_management_plan"),
157
+ id: z3.string().min(1),
158
+ title: z3.string().min(1),
159
+ status: RiskDocumentStatusSchema,
160
+ author: z3.string().optional(),
161
+ reviewers: z3.array(z3.string()).optional(),
162
+ approvers: z3.array(z3.string()).optional()
163
+ });
164
+
165
+ // ../shared/dist/schemas/software-lifecycle.js
166
+ import { z as z4 } from "zod";
167
+ var SoftwareDevelopmentPlanFrontmatterSchema = z4.object({
168
+ type: z4.literal("software_development_plan"),
169
+ id: z4.string().min(1),
170
+ title: z4.string().min(1),
171
+ status: RiskDocumentStatusSchema,
172
+ author: z4.string().optional(),
173
+ reviewers: z4.array(z4.string()).optional(),
174
+ approvers: z4.array(z4.string()).optional()
175
+ });
176
+ var SoftwareMaintenancePlanFrontmatterSchema = z4.object({
177
+ type: z4.literal("software_maintenance_plan"),
178
+ id: z4.string().min(1),
179
+ title: z4.string().min(1),
180
+ status: RiskDocumentStatusSchema,
181
+ author: z4.string().optional(),
182
+ reviewers: z4.array(z4.string()).optional(),
183
+ approvers: z4.array(z4.string()).optional()
184
+ });
185
+ var SoupRegisterFrontmatterSchema = z4.object({
186
+ type: z4.literal("soup_register"),
187
+ id: z4.string().min(1),
188
+ title: z4.string().min(1),
189
+ status: RiskDocumentStatusSchema,
190
+ author: z4.string().optional(),
191
+ reviewers: z4.array(z4.string()).optional(),
192
+ approvers: z4.array(z4.string()).optional()
193
+ });
194
+
195
+ // ../shared/dist/schemas/anomaly.js
196
+ import { z as z5 } from "zod";
197
+ var AnomalyCategorySchema = z5.enum([
198
+ "bug",
199
+ "security_vulnerability",
200
+ "regression",
201
+ "performance"
202
+ ]);
203
+ var AnomalySeveritySchema = z5.enum(["critical", "major", "minor"]);
204
+ var AnomalyDispositionSchema = z5.enum([
205
+ "open",
206
+ "investigating",
207
+ "resolved",
208
+ "deferred",
209
+ "will_not_fix"
210
+ ]);
211
+ var AnomalyFrontmatterSchema = z5.object({
212
+ type: z5.literal("anomaly"),
213
+ id: z5.string().min(1),
214
+ title: z5.string().min(1),
215
+ status: RiskDocumentStatusSchema,
216
+ category: AnomalyCategorySchema,
217
+ severity: AnomalySeveritySchema,
218
+ disposition: AnomalyDispositionSchema,
219
+ affected_version: z5.string().optional(),
220
+ author: z5.string().optional(),
221
+ reviewers: z5.array(z5.string()).optional(),
222
+ approvers: z5.array(z5.string()).optional()
223
+ });
224
+
225
+ // ../shared/dist/schemas/cybersecurity.js
226
+ import { z as z6 } from "zod";
227
+ var CybersecurityPlanFrontmatterSchema = z6.object({
228
+ type: z6.literal("cybersecurity_plan"),
229
+ id: z6.string().min(1),
230
+ title: z6.string().min(1),
231
+ status: RiskDocumentStatusSchema,
232
+ author: z6.string().optional(),
233
+ reviewers: z6.array(z6.string()).optional(),
234
+ approvers: z6.array(z6.string()).optional()
235
+ });
236
+ var SbomFrontmatterSchema = z6.object({
237
+ type: z6.literal("sbom"),
238
+ id: z6.string().min(1),
239
+ title: z6.string().min(1),
240
+ status: RiskDocumentStatusSchema,
241
+ author: z6.string().optional(),
242
+ reviewers: z6.array(z6.string()).optional(),
243
+ approvers: z6.array(z6.string()).optional()
244
+ });
245
+
246
+ // ../shared/dist/schemas/clinical.js
247
+ import { z as z7 } from "zod";
248
+ var ClinicalEvaluationPlanFrontmatterSchema = z7.object({
249
+ type: z7.literal("clinical_evaluation_plan"),
250
+ id: z7.string().min(1),
251
+ title: z7.string().min(1),
252
+ status: RiskDocumentStatusSchema,
253
+ author: z7.string().optional(),
254
+ reviewers: z7.array(z7.string()).optional(),
255
+ approvers: z7.array(z7.string()).optional()
256
+ });
257
+ var ClinicalEvaluationReportFrontmatterSchema = z7.object({
258
+ type: z7.literal("clinical_evaluation_report"),
259
+ id: z7.string().min(1),
260
+ title: z7.string().min(1),
261
+ status: RiskDocumentStatusSchema,
262
+ author: z7.string().optional(),
263
+ reviewers: z7.array(z7.string()).optional(),
264
+ approvers: z7.array(z7.string()).optional()
265
+ });
266
+
267
+ // ../shared/dist/schemas/post-market.js
268
+ import { z as z8 } from "zod";
269
+ var PostMarketSurveillancePlanFrontmatterSchema = z8.object({
270
+ type: z8.literal("post_market_surveillance_plan"),
271
+ id: z8.string().min(1),
272
+ title: z8.string().min(1),
273
+ status: RiskDocumentStatusSchema,
274
+ author: z8.string().optional(),
275
+ reviewers: z8.array(z8.string()).optional(),
276
+ approvers: z8.array(z8.string()).optional()
277
+ });
278
+ var PostMarketFeedbackCategorySchema = z8.enum([
279
+ "complaint",
280
+ "field_observation",
281
+ "clinical_followup",
282
+ "trend_report"
283
+ ]);
284
+ var PostMarketFeedbackSeveritySchema = z8.enum(["low", "medium", "high", "critical"]);
285
+ var PostMarketFeedbackFrontmatterSchema = z8.object({
286
+ type: z8.literal("post_market_feedback"),
287
+ id: z8.string().min(1),
288
+ title: z8.string().min(1),
289
+ status: RiskDocumentStatusSchema,
290
+ category: PostMarketFeedbackCategorySchema,
291
+ severity: PostMarketFeedbackSeveritySchema,
292
+ device: z8.string().optional(),
293
+ reporting_period: z8.string().optional(),
294
+ author: z8.string().optional(),
295
+ reviewers: z8.array(z8.string()).optional(),
296
+ approvers: z8.array(z8.string()).optional()
297
+ });
298
+
299
+ // ../shared/dist/schemas/labeling.js
300
+ import { z as z9 } from "zod";
301
+ var LabelingFrontmatterSchema = z9.object({
302
+ type: z9.literal("labeling"),
303
+ id: z9.string().min(1),
304
+ title: z9.string().min(1),
305
+ status: RiskDocumentStatusSchema,
306
+ label_type: z9.enum(["ifu", "product_label", "packaging_label"]).optional(),
307
+ author: z9.string().optional(),
308
+ reviewers: z9.array(z9.string()).optional(),
309
+ approvers: z9.array(z9.string()).optional()
310
+ });
311
+
312
+ // ../shared/dist/schemas/product.js
313
+ import { z as z10 } from "zod";
314
+ var ProductDevelopmentPlanFrontmatterSchema = z10.object({
315
+ type: z10.literal("product_development_plan"),
316
+ id: z10.string().min(1),
317
+ title: z10.string().min(1),
318
+ status: RiskDocumentStatusSchema,
319
+ author: z10.string().optional(),
320
+ reviewers: z10.array(z10.string()).optional(),
321
+ approvers: z10.array(z10.string()).optional()
322
+ });
323
+ var IntendedUseFrontmatterSchema = z10.object({
324
+ type: z10.literal("intended_use"),
325
+ id: z10.string().min(1),
326
+ title: z10.string().min(1),
327
+ status: RiskDocumentStatusSchema,
328
+ author: z10.string().optional(),
329
+ reviewers: z10.array(z10.string()).optional(),
330
+ approvers: z10.array(z10.string()).optional()
331
+ });
332
+
333
+ // ../shared/dist/schemas/user-need.js
334
+ import { z as z11 } from "zod";
335
+ var UserNeedPrioritySchema = z11.enum(["must_have", "should_have", "nice_to_have"]);
336
+ var UserNeedFrontmatterSchema = z11.object({
337
+ id: z11.string().min(1),
338
+ title: z11.string().min(1),
339
+ status: RiskDocumentStatusSchema,
340
+ /** Validated if present — ensures frontmatter doesn't misidentify the document type */
341
+ type: z11.literal("user_need").optional(),
342
+ /** The user role or stakeholder (e.g., "Quality Manager", "Developer") */
343
+ stakeholder: z11.string().optional(),
344
+ /** MoSCoW priority classification */
345
+ priority: UserNeedPrioritySchema.optional(),
346
+ /** Where this need originated (e.g., "ISO 13485 §7.3", "user interview") */
347
+ source: z11.string().optional(),
348
+ /** IDs of product requirements derived from this need */
349
+ derives: z11.array(z11.string()).optional(),
350
+ author: z11.string().optional(),
351
+ reviewers: z11.array(z11.string()).optional(),
352
+ approvers: z11.array(z11.string()).optional()
353
+ });
354
+
355
+ // ../shared/dist/schemas/requirement.js
356
+ import { z as z12 } from "zod";
357
+ var RequirementTypeSchema = z12.enum([
358
+ "functional",
359
+ "interface",
360
+ "performance",
361
+ "security",
362
+ "usability",
363
+ "safety",
364
+ "regulatory"
365
+ ]);
366
+ var RequirementFormatSchema = z12.enum(["standard", "user_story"]);
367
+ var RequirementFulfillmentTypeSchema = z12.enum([
368
+ "software",
369
+ "labeling",
370
+ "clinical",
371
+ "usability",
372
+ "regulatory_doc",
373
+ "process"
374
+ ]);
375
+ var RequirementFrontmatterSchema = z12.object({
376
+ id: z12.string().min(1),
377
+ title: z12.string().min(1),
378
+ status: RiskDocumentStatusSchema,
379
+ /** IEC 62304 §5.2.2 — requirement classification (required for SRS, optional for PRS) */
380
+ req_type: RequirementTypeSchema.optional(),
381
+ /** Authoring convention — controls which required sections are checked */
382
+ format: RequirementFormatSchema.optional(),
383
+ /** ISO 13485 §7.3.3 — how this PRS design input is fulfilled (PRS only, defaults to 'software') */
384
+ fulfillment_type: RequirementFulfillmentTypeSchema.optional(),
385
+ author: z12.string().optional(),
386
+ reviewers: z12.array(z12.string()).optional(),
387
+ approvers: z12.array(z12.string()).optional()
388
+ });
389
+
390
+ // ../shared/dist/schemas/test-documents.js
391
+ import { z as z13 } from "zod";
392
+ var TestProtocolFrontmatterSchema = z13.object({
393
+ type: z13.literal("test_protocol"),
394
+ id: z13.string().min(1),
395
+ title: z13.string().min(1),
396
+ status: RiskDocumentStatusSchema,
397
+ author: z13.string().optional(),
398
+ reviewers: z13.array(z13.string()).optional(),
399
+ approvers: z13.array(z13.string()).optional()
400
+ });
401
+ var TestPhaseSchema = z13.enum(["verification", "production"]);
402
+ var TestReportFrontmatterSchema = z13.object({
403
+ type: z13.literal("test_report"),
404
+ id: z13.string().min(1),
405
+ title: z13.string().min(1),
406
+ status: RiskDocumentStatusSchema,
407
+ author: z13.string().optional(),
408
+ reviewers: z13.array(z13.string()).optional(),
409
+ approvers: z13.array(z13.string()).optional(),
410
+ release_version: z13.string().optional(),
411
+ test_phase: TestPhaseSchema.optional()
412
+ });
413
+
414
+ // ../shared/dist/schemas/repo-config.js
415
+ import { z as z14 } from "zod";
416
+ var ReleaseReviewConfigSchema = z14.object({
417
+ required_departments: z14.array(z14.string().min(1)).min(1),
418
+ final_approver: z14.string().min(1)
419
+ });
420
+ var RepoConfigSchema = z14.object({
421
+ device: z14.object({
422
+ name: z14.string().min(1),
423
+ safety_class: z14.enum(["A", "B", "C"]),
424
+ classification: z14.object({
425
+ eu: z14.string().optional(),
426
+ us: z14.string().optional()
427
+ }).optional(),
428
+ udi_device_identifier: z14.string().optional()
429
+ }),
430
+ release_review: ReleaseReviewConfigSchema.optional()
431
+ });
432
+
433
+ // ../shared/dist/schemas/qms-device.js
434
+ import { z as z15 } from "zod";
435
+ var OwnerTypeSchema = z15.enum(["qms", "device"]);
436
+ var DocumentSnapshotSchema = z15.object({
437
+ documentId: z15.string(),
438
+ commitSha: z15.string(),
439
+ documentPath: z15.string(),
440
+ documentTitle: z15.string(),
441
+ documentType: z15.string(),
442
+ previousReleasedCommitSha: z15.string().optional(),
443
+ changeType: z15.enum(["added", "modified", "unchanged"]),
444
+ changeDescription: z15.string().optional()
445
+ });
446
+ var QmsDocumentTypeSchema = z15.enum(["sop", "policy", "work_instruction"]);
447
+ var DeviceDocumentTypeSchema = z15.enum([
448
+ "user_need",
449
+ "requirement",
450
+ "architecture",
451
+ "detailed_design",
452
+ "test_protocol",
453
+ "test_report",
454
+ "usability_risk",
455
+ "software_risk",
456
+ "security_risk",
457
+ "hazardous_situation",
458
+ "harm",
459
+ "haz_soe_software",
460
+ "haz_soe_security",
461
+ // Usability engineering (IEC 62366)
462
+ "usability_plan",
463
+ "use_specification",
464
+ "task_analysis",
465
+ "usability_evaluation",
466
+ "summative_evaluation",
467
+ // Risk management (ISO 14971)
468
+ "risk_management_plan",
469
+ // Software lifecycle (IEC 62304)
470
+ "software_development_plan",
471
+ "software_maintenance_plan",
472
+ "soup_register",
473
+ // Problem resolution (IEC 62304 §9)
474
+ "anomaly",
475
+ // Cybersecurity (IEC 81001-5-1)
476
+ "cybersecurity_plan",
477
+ "sbom",
478
+ // Clinical (MDR / FDA)
479
+ "clinical_evaluation_plan",
480
+ "clinical_evaluation_report",
481
+ // Post-market surveillance (MDR Art. 83)
482
+ "post_market_surveillance_plan",
483
+ "post_market_feedback",
484
+ // Labeling (MDR Annex I)
485
+ "labeling",
486
+ // Product (ISO 13485 §7.3)
487
+ "product_development_plan",
488
+ "intended_use",
489
+ // Release management (IEC 62304 §5.7)
490
+ "release_plan",
491
+ // Change management (ISO 13485 §7.3.5)
492
+ "design_review",
493
+ "release_notes"
494
+ ]);
495
+
496
+ // ../shared/dist/schemas/change-management.js
497
+ import { z as z16 } from "zod";
498
+ var ReleasePlanFrontmatterSchema = z16.object({
499
+ id: z16.string().min(1),
500
+ title: z16.string().min(1),
501
+ type: z16.literal("release_plan").optional(),
502
+ status: z16.string().optional(),
503
+ author: z16.string().optional(),
504
+ reviewers: z16.array(z16.string()).optional(),
505
+ approvers: z16.array(z16.string()).optional(),
506
+ version: z16.string().optional(),
507
+ target_date: z16.string().optional()
508
+ });
509
+ var DesignReviewFrontmatterSchema = z16.object({
510
+ id: z16.string().min(1),
511
+ title: z16.string().min(1),
512
+ type: z16.literal("design_review").optional(),
513
+ status: z16.string().optional(),
514
+ author: z16.string().optional(),
515
+ reviewers: z16.array(z16.string()).optional(),
516
+ approvers: z16.array(z16.string()).optional(),
517
+ /** Optional link to a Release Plan document (e.g. "RP-001") */
518
+ release_plan: z16.string().optional()
519
+ });
520
+ var ReleaseNotesAudienceSchema = z16.enum(["customer", "technical"]);
521
+ var ReleaseNotesFrontmatterSchema = z16.object({
522
+ id: z16.string().min(1),
523
+ title: z16.string().min(1),
524
+ type: z16.literal("release_notes").optional(),
525
+ status: RiskDocumentStatusSchema,
526
+ author: z16.string().optional(),
527
+ reviewers: z16.array(z16.string()).optional(),
528
+ approvers: z16.array(z16.string()).optional(),
529
+ audience: ReleaseNotesAudienceSchema,
530
+ release_version: z16.string().min(1)
531
+ });
532
+
533
+ // ../shared/dist/schemas/retention-policy.js
534
+ import { z as z17 } from "zod";
535
+ var RetentionPolicySchema = z17.object({
536
+ /** Default retention period in years for all record types */
537
+ defaultPeriodYears: z17.number().int().min(1).max(30).default(10),
538
+ /**
539
+ * Optional per-record-type overrides (e.g., { "release": 15, "signature": 20 }).
540
+ * Keys are record type identifiers; values are retention periods in years.
541
+ */
542
+ byRecordType: z17.record(z17.string(), z17.number().int().min(1).max(30)).optional()
543
+ });
544
+ function isWithinRetentionPeriod(createdAt, retentionYears, now = /* @__PURE__ */ new Date()) {
545
+ const retentionEnd = new Date(createdAt);
546
+ retentionEnd.setFullYear(retentionEnd.getFullYear() + retentionYears);
547
+ return now < retentionEnd;
548
+ }
549
+ function getEffectiveRetentionYears(policy, recordType) {
550
+ const DEFAULT_RETENTION_YEARS = 10;
551
+ if (!policy) {
552
+ return DEFAULT_RETENTION_YEARS;
553
+ }
554
+ return policy.byRecordType?.[recordType] ?? policy.defaultPeriodYears;
555
+ }
556
+
557
+ // ../shared/dist/schemas/audit.js
558
+ import { z as z18 } from "zod";
559
+ var AuditFindingClassificationSchema = z18.enum(["observation", "minor_nc", "major_nc"]);
560
+ var AuditStatusSchema = z18.enum(["planned", "in_progress", "completed", "cancelled"]);
561
+ var PlannedAuditEntrySchema = z18.object({
562
+ audit_id: z18.string().min(1),
563
+ process_area: z18.string().min(1),
564
+ clause: z18.string().optional(),
565
+ planned_date: z18.string().min(1),
566
+ auditor: z18.string().min(1),
567
+ status: AuditStatusSchema
568
+ });
569
+ var AuditScheduleFrontmatterSchema = z18.object({
570
+ id: z18.string().min(1),
571
+ title: z18.string().min(1),
572
+ type: z18.literal("audit_schedule").optional(),
573
+ status: z18.string().optional(),
574
+ author: z18.string().optional(),
575
+ reviewers: z18.array(z18.string()).optional(),
576
+ approvers: z18.array(z18.string()).optional(),
577
+ cycle_year: z18.number().int().min(2e3).max(2100),
578
+ audits: z18.array(PlannedAuditEntrySchema).min(1)
579
+ });
580
+ var AuditFindingSchema = z18.object({
581
+ finding_id: z18.string().min(1),
582
+ classification: AuditFindingClassificationSchema,
583
+ description: z18.string().min(1),
584
+ capa_id: z18.string().optional()
585
+ });
586
+ var AuditReportFrontmatterSchema = z18.object({
587
+ id: z18.string().min(1),
588
+ title: z18.string().min(1),
589
+ type: z18.literal("audit_report").optional(),
590
+ status: z18.string().optional(),
591
+ author: z18.string().optional(),
592
+ reviewers: z18.array(z18.string()).optional(),
593
+ approvers: z18.array(z18.string()).optional(),
594
+ audit_date: z18.string().min(1),
595
+ audit_id: z18.string().optional(),
596
+ process_area: z18.string().min(1),
597
+ clause: z18.string().optional(),
598
+ auditor: z18.string().min(1),
599
+ findings: z18.array(AuditFindingSchema),
600
+ findings_major: z18.number().int().min(0).optional(),
601
+ findings_minor: z18.number().int().min(0).optional(),
602
+ findings_observations: z18.number().int().min(0).optional()
603
+ });
604
+
605
+ // ../shared/dist/schemas/management-review.js
606
+ import { z as z19 } from "zod";
607
+ var ManagementReviewAttendeeSchema = z19.object({
608
+ name: z19.string().min(1),
609
+ role: z19.string().min(1)
610
+ });
611
+ var ManagementReviewFrontmatterSchema = z19.object({
612
+ id: z19.string().min(1),
613
+ title: z19.string().min(1),
614
+ type: z19.literal("management_review").optional(),
615
+ version: z19.string().optional(),
616
+ status: z19.enum(["draft", "scheduled", "completed"]).optional(),
617
+ review_date: z19.string().min(1),
618
+ review_period: z19.object({
619
+ from: z19.string().min(1),
620
+ to: z19.string().min(1)
621
+ }),
622
+ attendees: z19.array(ManagementReviewAttendeeSchema).min(1),
623
+ data_snapshot_date: z19.string().optional(),
624
+ next_review_date: z19.string().optional()
625
+ });
626
+
627
+ // ../shared/dist/schemas/index.js
628
+ var RegulatoryFrameworkSchema = z20.enum(["ISO_13485", "IEC_62304", "FDA_21_CFR_820"]);
629
+ var SafetyClassSchema = z20.enum(["A", "B", "C"]);
630
+ var DocumentTypeSchema = z20.enum([
631
+ "user_need",
632
+ "requirement",
633
+ "architecture",
634
+ "detailed_design",
635
+ "test_protocol",
636
+ "test_report",
637
+ "sop",
638
+ "work_instruction",
639
+ "policy",
640
+ "usability_risk",
641
+ "software_risk",
642
+ "security_risk",
643
+ // Risk document types
644
+ "haz_soe_software",
645
+ "haz_soe_security",
646
+ "hazardous_situation",
647
+ "harm",
648
+ // Usability engineering (IEC 62366)
649
+ "usability_plan",
650
+ "use_specification",
651
+ "task_analysis",
652
+ "usability_evaluation",
653
+ "summative_evaluation",
654
+ // Risk management (ISO 14971)
655
+ "risk_management_plan",
656
+ // Software lifecycle (IEC 62304)
657
+ "software_development_plan",
658
+ "software_maintenance_plan",
659
+ "soup_register",
660
+ // Problem resolution (IEC 62304 §9)
661
+ "anomaly",
662
+ // Cybersecurity (IEC 81001-5-1)
663
+ "cybersecurity_plan",
664
+ "sbom",
665
+ // Clinical (MDR / FDA)
666
+ "clinical_evaluation_plan",
667
+ "clinical_evaluation_report",
668
+ // Post-market surveillance (MDR Art. 83)
669
+ "post_market_surveillance_plan",
670
+ "post_market_feedback",
671
+ // Labeling (MDR Annex I)
672
+ "labeling",
673
+ // Product (ISO 13485 §7.3)
674
+ "product_development_plan",
675
+ "intended_use",
676
+ // Release management (IEC 62304 §5.7)
677
+ "release_plan",
678
+ // Change management (ISO 13485 §7.3.5)
679
+ "design_review",
680
+ "release_notes",
681
+ // Supplier management (ISO 13485 §7.4)
682
+ "supplier",
683
+ // Internal audit management (ISO 13485 §8.2.2)
684
+ "audit_schedule",
685
+ "audit_report",
686
+ // Management review (ISO 13485 §5.6)
687
+ "management_review",
688
+ // Report document types
689
+ "report"
690
+ ]);
691
+ var DocumentStatusSchema = z20.enum([
692
+ "draft",
693
+ "in_review",
694
+ "approved",
695
+ "obsolete",
696
+ "example"
697
+ ]);
698
+ var LinkTypeSchema = z20.enum([
699
+ "derives_from",
700
+ "implements",
701
+ "verified_by",
702
+ "mitigates",
703
+ "parent_of",
704
+ "related_to",
705
+ // New risk link types
706
+ "leads_to",
707
+ "results_in",
708
+ "analyzes"
709
+ ]);
710
+ var AcceptabilityStatusSchema = z20.enum(["acceptable", "review_required", "unacceptable"]);
711
+ var MemberRoleSchema = z20.enum(["admin", "member"]);
712
+ var MemberStatusSchema = z20.enum(["active", "suspended", "removed"]);
713
+ var EmailAddressSchema = z20.object({
714
+ value: z20.string().email(),
715
+ verified: z20.boolean()
716
+ });
717
+ var ReviewerRuleSchema = z20.object({
718
+ documentType: DocumentTypeSchema,
719
+ requiredDepartments: z20.array(z20.string()),
720
+ finalApproverDepartment: z20.string()
721
+ });
722
+ var SyncStatusSchema = z20.enum(["active", "paused", "error"]);
723
+ var AuditActionSchema = z20.enum([
724
+ "organization.created",
725
+ "organization.settings_updated",
726
+ "organization.checklist_template_updated",
727
+ "member.invited",
728
+ "member.invite_declined",
729
+ "member.joined",
730
+ "member.role_changed",
731
+ "member.removed",
732
+ "member.password_reset_forced",
733
+ "repository.connected",
734
+ "repository.disconnected",
735
+ "repository.sync_triggered",
736
+ "repository.updated",
737
+ "repository.assigned",
738
+ "repository.unassigned",
739
+ "document.synced",
740
+ "document.removed",
741
+ "release.created",
742
+ "release.updated",
743
+ "release.deleted",
744
+ "release.withdrawn",
745
+ "release.submitted_for_review",
746
+ "release.signature_added",
747
+ "release.approved",
748
+ "release.published",
749
+ "release.checklist_updated",
750
+ "release.signing_obligations_rederived",
751
+ "signature.created",
752
+ "signature.attempt_failed",
753
+ "signature.lockout_triggered",
754
+ "signing_request.created",
755
+ "signing_request.sent",
756
+ "signing_request.viewed",
757
+ "signing_request.signed",
758
+ "signing_request.declined",
759
+ "signing_request.cancelled",
760
+ "signing_request.expired",
761
+ "signing_request.reminded",
762
+ "training.assigned",
763
+ "training.completed",
764
+ "training.settings_updated",
765
+ "training.quiz_submitted",
766
+ "training.quiz_passed",
767
+ "training.quiz_failed",
768
+ "training.overdue_notified",
769
+ "change_control.created",
770
+ "change_control.updated",
771
+ "change_control.deleted",
772
+ "change_control.submitted",
773
+ "change_control.approved",
774
+ "change_control.effective",
775
+ "dco.created",
776
+ "dco.updated",
777
+ "dco.deleted",
778
+ "dco.submitted",
779
+ "dco.obligation_fulfilled",
780
+ "dco.approved",
781
+ "dco.effective",
782
+ "design_review.created",
783
+ "design_review.updated",
784
+ "design_review.deleted",
785
+ "design_review.submitted",
786
+ "design_review.signature_added",
787
+ "design_review.signed",
788
+ "design_review.cancelled",
789
+ "capa.created",
790
+ "capa.updated",
791
+ "capa.deleted",
792
+ "capa.investigation_started",
793
+ "capa.implementation_started",
794
+ "capa.verification_started",
795
+ "capa.closed",
796
+ "capa.cancelled",
797
+ "capa.action_added",
798
+ "capa.action_updated",
799
+ "capa.action_removed",
800
+ "nc.created",
801
+ "nc.updated",
802
+ "nc.deleted",
803
+ "nc.investigation_started",
804
+ "nc.disposition_set",
805
+ "nc.concession_approved",
806
+ "nc.closed",
807
+ "nc.cancelled",
808
+ "nc.escalated_to_capa"
809
+ ]);
810
+ var ResourceTypeSchema = z20.enum([
811
+ "organization",
812
+ "member",
813
+ "invite",
814
+ "repository",
815
+ "document",
816
+ "release",
817
+ "signature",
818
+ "training",
819
+ "training_task",
820
+ "training_settings",
821
+ "change_control",
822
+ "dco",
823
+ "design_review",
824
+ "signing_request",
825
+ "capa",
826
+ "nonconformance"
827
+ ]);
828
+ var ReleaseTypeSchema = z20.enum(["qms", "device", "combined"]);
829
+ var ReleaseStatusSchema = z20.enum(["draft", "in_review", "approved", "published"]);
830
+ var SignatureTypeSchema = z20.enum(["author", "dept_reviewer", "final_approver", "trainee"]);
831
+ var ChangeTypeSchema = z20.enum(["added", "modified", "deleted"]);
832
+ var SigningRequestStatusSchema = z20.enum([
833
+ "sent",
834
+ "partially_signed",
835
+ "completed",
836
+ "expired",
837
+ "cancelled"
838
+ ]);
839
+ var SignerStatusSchema = z20.enum(["pending", "viewed", "signed", "declined"]);
840
+ var FieldTypeSchema = z20.enum(["signature", "initials", "date"]);
841
+
842
+ // ../shared/dist/constants/risk-matrix.js
843
+ var RISK_DOCUMENT_TYPES = [
844
+ "software_risk",
845
+ "usability_risk",
846
+ "security_risk"
847
+ ];
848
+ var HAZARD_DOCUMENT_TYPES = ["haz_soe_software", "haz_soe_security"];
849
+ var ALL_RISK_RELATED_DOCUMENT_TYPES = [
850
+ ...RISK_DOCUMENT_TYPES,
851
+ ...HAZARD_DOCUMENT_TYPES,
852
+ "hazardous_situation",
853
+ "harm"
854
+ ];
855
+
856
+ // ../shared/dist/constants/document-types.js
857
+ var QMS_DOCUMENT_TYPES = [
858
+ "sop",
859
+ "policy",
860
+ "work_instruction",
861
+ "supplier",
862
+ "report"
863
+ ];
864
+ var DEVICE_DOCUMENT_TYPES = [
865
+ "user_need",
866
+ "requirement",
867
+ "architecture",
868
+ "detailed_design",
869
+ "test_protocol",
870
+ "test_report",
871
+ "usability_risk",
872
+ "software_risk",
873
+ "security_risk",
874
+ "hazardous_situation",
875
+ "harm",
876
+ "haz_soe_software",
877
+ "haz_soe_security",
878
+ // Usability engineering (IEC 62366)
879
+ "usability_plan",
880
+ "use_specification",
881
+ "task_analysis",
882
+ "usability_evaluation",
883
+ "summative_evaluation",
884
+ // Risk management (ISO 14971)
885
+ "risk_management_plan",
886
+ // Software lifecycle (IEC 62304)
887
+ "software_development_plan",
888
+ "software_maintenance_plan",
889
+ "soup_register",
890
+ // Problem resolution (IEC 62304 §9)
891
+ "anomaly",
892
+ // Cybersecurity (IEC 81001-5-1)
893
+ "cybersecurity_plan",
894
+ "sbom",
895
+ // Clinical (MDR / FDA)
896
+ "clinical_evaluation_plan",
897
+ "clinical_evaluation_report",
898
+ // Post-market surveillance (MDR Art. 83)
899
+ "post_market_surveillance_plan",
900
+ "post_market_feedback",
901
+ // Labeling (MDR Annex I)
902
+ "labeling",
903
+ // Product (ISO 13485 §7.3)
904
+ "product_development_plan",
905
+ "intended_use",
906
+ // Release management (IEC 62304 §5.7)
907
+ "release_plan",
908
+ // Change management (ISO 13485 §7.3.5)
909
+ "design_review",
910
+ "release_notes"
911
+ ];
912
+ var CHANGE_DOCUMENT_TYPES = ["design_review", "release_plan"];
913
+ function isChangeDocumentType(type) {
914
+ return CHANGE_DOCUMENT_TYPES.includes(type);
915
+ }
916
+ function isQmsDocumentType(type) {
917
+ return QMS_DOCUMENT_TYPES.includes(type);
918
+ }
919
+ function isDeviceDocumentType(type) {
920
+ return DEVICE_DOCUMENT_TYPES.includes(type);
921
+ }
922
+
923
+ // ../shared/dist/constants/index.js
924
+ var DOCUMENT_TYPES = {
925
+ user_need: "User Need",
926
+ requirement: "Requirement",
927
+ architecture: "Architecture",
928
+ detailed_design: "Detailed Design",
929
+ test_protocol: "Test Protocol",
930
+ test_report: "Test Report",
931
+ sop: "SOP",
932
+ work_instruction: "Work Instruction",
933
+ policy: "Policy",
934
+ usability_risk: "Usability Risk",
935
+ software_risk: "Software Risk",
936
+ security_risk: "Security Risk",
937
+ // Risk document types
938
+ haz_soe_software: "Hazard (Software)",
939
+ haz_soe_security: "Hazard (Security)",
940
+ hazardous_situation: "Hazardous Situation",
941
+ harm: "Harm",
942
+ // Usability engineering (IEC 62366)
943
+ usability_plan: "Usability Plan",
944
+ use_specification: "Use Specification",
945
+ task_analysis: "Task Analysis",
946
+ usability_evaluation: "Usability Evaluation",
947
+ summative_evaluation: "Summative Evaluation",
948
+ // Risk management (ISO 14971)
949
+ risk_management_plan: "Risk Management Plan",
950
+ // Software lifecycle (IEC 62304)
951
+ software_development_plan: "Software Development Plan",
952
+ software_maintenance_plan: "Software Maintenance Plan",
953
+ soup_register: "SOUP Register",
954
+ // Problem resolution (IEC 62304 §9)
955
+ anomaly: "Anomaly",
956
+ // Cybersecurity (IEC 81001-5-1)
957
+ cybersecurity_plan: "Cybersecurity Plan",
958
+ sbom: "SBOM",
959
+ // Clinical (MDR / FDA)
960
+ clinical_evaluation_plan: "Clinical Evaluation Plan",
961
+ clinical_evaluation_report: "Clinical Evaluation Report",
962
+ // Post-market surveillance (MDR Art. 83)
963
+ post_market_surveillance_plan: "Post-Market Surveillance Plan",
964
+ post_market_feedback: "Post-Market Feedback",
965
+ // Labeling (MDR Annex I)
966
+ labeling: "Labeling",
967
+ // Product (ISO 13485 §7.3)
968
+ product_development_plan: "Product Development Plan",
969
+ intended_use: "Intended Use",
970
+ // Release management (IEC 62304 §5.7)
971
+ release_plan: "Release Plan",
972
+ // Change management (ISO 13485 §7.3.5)
973
+ design_review: "Design Review",
974
+ release_notes: "Release Notes",
975
+ // Supplier management (ISO 13485 §7.4)
976
+ supplier: "Supplier",
977
+ // Internal audit management (ISO 13485 §8.2.2)
978
+ audit_schedule: "Audit Schedule",
979
+ audit_report: "Audit Report",
980
+ // Management review (ISO 13485 §5.6)
981
+ management_review: "Management Review",
982
+ // Report document types
983
+ report: "Report"
984
+ };
985
+ var LINK_TYPES = {
986
+ derives_from: "Derives From",
987
+ implements: "Implements",
988
+ verified_by: "Verified By",
989
+ mitigates: "Mitigates",
990
+ parent_of: "Parent Of",
991
+ related_to: "Related To",
992
+ // New risk link types
993
+ leads_to: "Leads To",
994
+ results_in: "Results In",
995
+ analyzes: "Analyzes"
996
+ };
997
+ var REQUIRED_SECTIONS = {
998
+ user_need: ["Purpose", "Stakeholder", "User Needs"],
999
+ release_plan: ["Scope", "Applicable Plans", "Release-Specific Criteria", "Known Anomalies"],
1000
+ design_review: ["Review Scope", "Attendees", "Findings", "Actions", "Conclusion"],
1001
+ release_notes: ["Changes", "Known Issues"],
1002
+ audit_schedule: ["Scope", "Audit Criteria"],
1003
+ audit_report: ["Scope", "Methodology", "Findings", "Conclusion"],
1004
+ management_review: ["Review Inputs", "Review Outputs", "Action Items", "Decisions"]
1005
+ };
1006
+
1007
+ // ../shared/dist/validators/permissions.js
1008
+ import { z as z21 } from "zod";
1009
+ var MemberPermissionsSchema = z21.object({
1010
+ canSign: z21.boolean(),
1011
+ canApprove: z21.boolean(),
1012
+ canCreateRelease: z21.boolean(),
1013
+ canPublishRelease: z21.boolean(),
1014
+ canManageMembers: z21.boolean(),
1015
+ canViewAuditLog: z21.boolean(),
1016
+ canExport: z21.boolean()
1017
+ });
1018
+
1019
+ // src/schema-map.ts
1020
+ var SCHEMA_MAP = {
1021
+ // Risk entries
1022
+ software_risk: RiskEntryFrontmatterSchema,
1023
+ usability_risk: RiskEntryFrontmatterSchema,
1024
+ security_risk: RiskEntryFrontmatterSchema,
1025
+ // Hazard / harm documents
1026
+ haz_soe_software: HazardFrontmatterSchema,
1027
+ haz_soe_security: HazardFrontmatterSchema,
1028
+ hazardous_situation: HazardousSituationFrontmatterSchema,
1029
+ harm: HarmFrontmatterSchema,
1030
+ // Problem resolution (IEC 62304 §9)
1031
+ anomaly: AnomalyFrontmatterSchema,
1032
+ // Usability engineering (IEC 62366)
1033
+ usability_plan: UsabilityPlanFrontmatterSchema,
1034
+ use_specification: UseSpecificationFrontmatterSchema,
1035
+ task_analysis: TaskAnalysisFrontmatterSchema,
1036
+ usability_evaluation: UsabilityEvaluationFrontmatterSchema,
1037
+ summative_evaluation: SummativeEvaluationFrontmatterSchema,
1038
+ // Risk management (ISO 14971)
1039
+ risk_management_plan: RiskManagementPlanFrontmatterSchema,
1040
+ // Software lifecycle (IEC 62304)
1041
+ software_development_plan: SoftwareDevelopmentPlanFrontmatterSchema,
1042
+ software_maintenance_plan: SoftwareMaintenancePlanFrontmatterSchema,
1043
+ soup_register: SoupRegisterFrontmatterSchema,
1044
+ // Cybersecurity (IEC 81001-5-1)
1045
+ cybersecurity_plan: CybersecurityPlanFrontmatterSchema,
1046
+ sbom: SbomFrontmatterSchema,
1047
+ // Clinical (MDR / FDA)
1048
+ clinical_evaluation_plan: ClinicalEvaluationPlanFrontmatterSchema,
1049
+ clinical_evaluation_report: ClinicalEvaluationReportFrontmatterSchema,
1050
+ // Post-market surveillance (MDR Art. 83)
1051
+ post_market_surveillance_plan: PostMarketSurveillancePlanFrontmatterSchema,
1052
+ post_market_feedback: PostMarketFeedbackFrontmatterSchema,
1053
+ // Labeling (MDR Annex I)
1054
+ labeling: LabelingFrontmatterSchema,
1055
+ // Product (ISO 13485 §7.3)
1056
+ product_development_plan: ProductDevelopmentPlanFrontmatterSchema,
1057
+ intended_use: IntendedUseFrontmatterSchema,
1058
+ // User needs (ISO 13485 §7.3.2)
1059
+ user_need: UserNeedFrontmatterSchema,
1060
+ // Requirements (IEC 62304 §5.2.2, ISO 13485 §7.3.3)
1061
+ requirement: RequirementFrontmatterSchema,
1062
+ // Test documents
1063
+ test_protocol: TestProtocolFrontmatterSchema,
1064
+ test_report: TestReportFrontmatterSchema,
1065
+ // Change management (ISO 13485 §7.3.5)
1066
+ release_plan: ReleasePlanFrontmatterSchema,
1067
+ design_review: DesignReviewFrontmatterSchema,
1068
+ release_notes: ReleaseNotesFrontmatterSchema,
1069
+ // Internal audit management (ISO 13485 §8.2.2)
1070
+ audit_schedule: AuditScheduleFrontmatterSchema,
1071
+ audit_report: AuditReportFrontmatterSchema,
1072
+ // Management review (ISO 13485 §5.6)
1073
+ management_review: ManagementReviewFrontmatterSchema
1074
+ };
1075
+ function getSchemaForDocumentType(type) {
1076
+ return SCHEMA_MAP[type];
1077
+ }
1078
+ export {
1079
+ AcceptabilityStatusSchema,
1080
+ AnomalyCategorySchema,
1081
+ AnomalyDispositionSchema,
1082
+ AnomalyFrontmatterSchema,
1083
+ AnomalySeveritySchema,
1084
+ AuditFindingClassificationSchema,
1085
+ AuditFindingSchema,
1086
+ AuditReportFrontmatterSchema,
1087
+ AuditScheduleFrontmatterSchema,
1088
+ AuditStatusSchema,
1089
+ CHANGE_DOCUMENT_TYPES,
1090
+ ClinicalEvaluationPlanFrontmatterSchema,
1091
+ ClinicalEvaluationReportFrontmatterSchema,
1092
+ CybersecurityPlanFrontmatterSchema,
1093
+ DEVICE_DOCUMENT_TYPES,
1094
+ DOCUMENT_TYPES,
1095
+ DesignReviewFrontmatterSchema,
1096
+ DocumentStatusSchema,
1097
+ DocumentTypeSchema,
1098
+ HarmFrontmatterSchema,
1099
+ HazardFrontmatterSchema,
1100
+ HazardousSituationFrontmatterSchema,
1101
+ IntendedUseFrontmatterSchema,
1102
+ LINK_TYPES,
1103
+ LabelingFrontmatterSchema,
1104
+ LinkTypeSchema,
1105
+ ManagementReviewAttendeeSchema,
1106
+ ManagementReviewFrontmatterSchema,
1107
+ MitigationSchema,
1108
+ MitigationTargetSchema,
1109
+ PlannedAuditEntrySchema,
1110
+ PostMarketFeedbackCategorySchema,
1111
+ PostMarketFeedbackFrontmatterSchema,
1112
+ PostMarketFeedbackSeveritySchema,
1113
+ PostMarketSurveillancePlanFrontmatterSchema,
1114
+ ProductDevelopmentPlanFrontmatterSchema,
1115
+ QMS_DOCUMENT_TYPES,
1116
+ REQUIRED_SECTIONS,
1117
+ RegulatoryFrameworkSchema,
1118
+ ReleaseNotesAudienceSchema,
1119
+ ReleaseNotesFrontmatterSchema,
1120
+ ReleasePlanFrontmatterSchema,
1121
+ ReleaseReviewConfigSchema,
1122
+ RepoConfigSchema,
1123
+ RequirementFormatSchema,
1124
+ RequirementFrontmatterSchema,
1125
+ RequirementFulfillmentTypeSchema,
1126
+ RequirementTypeSchema,
1127
+ RetentionPolicySchema,
1128
+ RiskDocumentStatusSchema,
1129
+ RiskEntryFrontmatterSchema,
1130
+ RiskGapCodeSchema,
1131
+ RiskGapSeveritySchema,
1132
+ RiskManagementPlanFrontmatterSchema,
1133
+ RiskMatrixConfigSchema,
1134
+ SCHEMA_MAP,
1135
+ SafetyClassSchema,
1136
+ SbomFrontmatterSchema,
1137
+ SoftwareDevelopmentPlanFrontmatterSchema,
1138
+ SoftwareMaintenancePlanFrontmatterSchema,
1139
+ SoupRegisterFrontmatterSchema,
1140
+ SummativeEvaluationFrontmatterSchema,
1141
+ TaskAnalysisFrontmatterSchema,
1142
+ TestPhaseSchema,
1143
+ TestProtocolFrontmatterSchema,
1144
+ TestReportFrontmatterSchema,
1145
+ UsabilityEvaluationFrontmatterSchema,
1146
+ UsabilityPlanFrontmatterSchema,
1147
+ UseSpecificationFrontmatterSchema,
1148
+ UserNeedFrontmatterSchema,
1149
+ UserNeedPrioritySchema,
1150
+ getEffectiveRetentionYears,
1151
+ getSchemaForDocumentType,
1152
+ isChangeDocumentType,
1153
+ isDeviceDocumentType,
1154
+ isQmsDocumentType,
1155
+ isWithinRetentionPeriod
1156
+ };