@pactosigna/records 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. package/dist/cli.js +200 -192
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1069,102 +1069,135 @@ var REVIEW_DATA_SOURCES = [
1069
1069
  "releases",
1070
1070
  "audits"
1071
1071
  ];
1072
- var AlertRecipientSchema = z2.object({
1072
+ var CreateQualityReviewRequestSchema = z2.object({
1073
+ reviewTypeId: z2.string().min(1),
1074
+ title: z2.string().min(1).max(200),
1075
+ scheduledDate: z2.string().datetime(),
1076
+ reviewPeriod: z2.object({
1077
+ from: z2.string().datetime(),
1078
+ to: z2.string().datetime()
1079
+ })
1080
+ });
1081
+ var AddDecisionRequestSchema = z2.object({
1082
+ description: z2.string().min(1).max(2e3),
1083
+ decidedBy: z2.string().min(1)
1084
+ });
1085
+ var AddAttendeeRequestSchema = z2.object({
1086
+ memberId: z2.string().min(1),
1087
+ name: z2.string().min(1),
1073
1088
  department: z2.string().min(1),
1074
- departmentRole: z2.enum(["manager", "member"])
1089
+ role: z2.string().min(1)
1075
1090
  });
1076
- var CreateQualityObjectiveRequestSchema = z2.object({
1077
- title: z2.string().min(1).max(200),
1078
- description: z2.string().min(1).max(5e3),
1079
- type: z2.enum(OBJECTIVE_TYPES),
1080
- metricSource: z2.enum(AUTO_METRIC_SOURCES).optional(),
1081
- unit: z2.string().min(1).max(50),
1082
- target: z2.number(),
1083
- direction: z2.enum(OBJECTIVE_DIRECTIONS),
1084
- warningThreshold: z2.number(),
1085
- ownerDepartment: z2.string().min(1),
1086
- ownerDepartmentRole: z2.enum(["manager", "member"]),
1087
- alertRecipients: z2.array(AlertRecipientSchema).default([]),
1088
- reviewCadence: z2.enum(OBJECTIVE_CADENCES),
1089
- effectiveDate: z2.string().datetime(),
1090
- targetDate: z2.string().datetime().optional()
1091
- });
1092
- var UpdateQualityObjectiveRequestSchema = z2.object({
1093
- title: z2.string().min(1).max(200).optional(),
1094
- description: z2.string().min(1).max(5e3).optional(),
1095
- unit: z2.string().min(1).max(50).optional(),
1096
- target: z2.number().optional(),
1097
- direction: z2.enum(OBJECTIVE_DIRECTIONS).optional(),
1098
- warningThreshold: z2.number().optional(),
1099
- ownerDepartment: z2.string().min(1).optional(),
1100
- ownerDepartmentRole: z2.enum(["manager", "member"]).optional(),
1101
- alertRecipients: z2.array(AlertRecipientSchema).optional(),
1102
- reviewCadence: z2.enum(OBJECTIVE_CADENCES).optional(),
1103
- targetDate: z2.string().datetime().nullable().optional()
1104
- });
1105
- var RecordObjectiveValueRequestSchema = z2.object({
1106
- value: z2.number(),
1107
- note: z2.string().max(1e3).optional()
1108
- });
1109
- var ListQualityObjectivesQuerySchema = z2.object({
1110
- type: z2.enum(OBJECTIVE_TYPES).optional(),
1111
- status: z2.enum(OBJECTIVE_STATUSES).optional(),
1112
- isActive: z2.enum(["true", "false"]).transform((v) => v === "true").optional(),
1091
+ var UpdateReviewNotesRequestSchema = z2.object({
1092
+ notes: z2.string().max(1e4)
1093
+ });
1094
+ var ListQualityReviewsQuerySchema = z2.object({
1095
+ reviewTypeId: z2.string().optional(),
1096
+ status: z2.enum(REVIEW_STATUSES).optional(),
1113
1097
  page: z2.coerce.number().int().positive().default(1),
1114
1098
  limit: z2.coerce.number().int().positive().max(100).default(20)
1115
1099
  });
1116
- var QmsObjectiveParamSchema = z2.object({
1100
+ var QmsReviewParamSchema = z2.object({
1117
1101
  orgId: z2.string().min(1),
1118
1102
  qmsId: z2.string().min(1)
1119
1103
  });
1120
- var ObjectiveIdParamSchema = z2.object({
1104
+ var ReviewIdParamSchema = z2.object({
1121
1105
  orgId: z2.string().min(1),
1122
1106
  qmsId: z2.string().min(1),
1123
- objectiveId: z2.string().min(1)
1107
+ reviewId: z2.string().min(1)
1108
+ });
1109
+ var MonthlyTrendSchema = z22.object({
1110
+ month: z22.string(),
1111
+ opened: z22.number(),
1112
+ closed: z22.number()
1113
+ });
1114
+ var ReviewDataSnapshotSchema = z22.object({
1115
+ capas: z22.object({
1116
+ total: z22.number(),
1117
+ open: z22.number(),
1118
+ overdue: z22.number(),
1119
+ avgCycleTimeDays: z22.number().nullable(),
1120
+ trend: z22.array(MonthlyTrendSchema)
1121
+ }).optional(),
1122
+ nonconformances: z22.object({
1123
+ total: z22.number(),
1124
+ open: z22.number(),
1125
+ overdue: z22.number(),
1126
+ avgCycleTimeDays: z22.number().nullable(),
1127
+ bySeverity: z22.record(z22.string(), z22.number()),
1128
+ trend: z22.array(MonthlyTrendSchema)
1129
+ }).optional(),
1130
+ complaints: z22.object({
1131
+ total: z22.number(),
1132
+ open: z22.number(),
1133
+ overdue: z22.number(),
1134
+ reportableCount: z22.number(),
1135
+ trend: z22.array(MonthlyTrendSchema)
1136
+ }).optional(),
1137
+ training: z22.object({
1138
+ totalTasks: z22.number(),
1139
+ complianceRate: z22.number(),
1140
+ overdue: z22.number()
1141
+ }).optional(),
1142
+ releases: z22.object({
1143
+ total: z22.number(),
1144
+ avgCycleTimeDays: z22.number().nullable()
1145
+ }).optional(),
1146
+ audits: z22.object({
1147
+ totalFindings: z22.number(),
1148
+ major: z22.number(),
1149
+ minor: z22.number(),
1150
+ observations: z22.number()
1151
+ }).optional()
1124
1152
  });
1125
- var QualityObjectiveSnapshotResponseSchema = z22.object({
1126
- id: z22.string(),
1127
- value: z22.number(),
1128
- status: z22.enum(OBJECTIVE_STATUSES),
1129
- source: z22.enum(["auto", "manual", "review"]),
1130
- reviewId: z22.string().nullable(),
1131
- capturedAt: z22.string(),
1132
- capturedBy: z22.string().nullable()
1133
- });
1134
- var QualityObjectiveResponseSchema = z22.object({
1135
- id: z22.string(),
1136
- objectiveNumber: z22.string(),
1153
+ var ReviewObjectiveSnapshotSchema = z22.object({
1154
+ objectiveId: z22.string(),
1137
1155
  title: z22.string(),
1138
- description: z22.string(),
1139
- type: z22.enum(OBJECTIVE_TYPES),
1140
- metricSource: z22.enum(AUTO_METRIC_SOURCES).nullable(),
1141
- unit: z22.string(),
1142
1156
  target: z22.number(),
1143
- direction: z22.enum(OBJECTIVE_DIRECTIONS),
1144
- warningThreshold: z22.number(),
1145
- currentValue: z22.number().nullable(),
1146
- currentValueUpdatedAt: z22.string().nullable(),
1147
- status: z22.enum(OBJECTIVE_STATUSES),
1157
+ value: z22.number().nullable(),
1158
+ status: z22.string(),
1159
+ direction: z22.string(),
1160
+ unit: z22.string()
1161
+ });
1162
+ var ReviewDecisionSchema = z22.object({
1163
+ description: z22.string(),
1164
+ decidedBy: z22.string()
1165
+ });
1166
+ var ReviewAttendeeSchema = z22.object({
1167
+ memberId: z22.string(),
1168
+ name: z22.string(),
1169
+ department: z22.string(),
1170
+ role: z22.string()
1171
+ });
1172
+ var QualityReviewResponseSchema = z22.object({
1173
+ id: z22.string(),
1174
+ reviewNumber: z22.string(),
1175
+ title: z22.string(),
1176
+ reviewTypeId: z22.string(),
1177
+ reviewTypeName: z22.string(),
1178
+ status: z22.enum(REVIEW_STATUSES),
1179
+ scheduledDate: z22.string(),
1180
+ conductedDate: z22.string().nullable(),
1181
+ reviewPeriod: z22.object({
1182
+ from: z22.string(),
1183
+ to: z22.string()
1184
+ }),
1148
1185
  ownerDepartment: z22.string(),
1149
1186
  ownerDepartmentRole: z22.enum(["manager", "member"]),
1150
- alertRecipients: z22.array(
1151
- z22.object({
1152
- department: z22.string(),
1153
- departmentRole: z22.enum(["manager", "member"])
1154
- })
1155
- ),
1156
- reviewCadence: z22.enum(OBJECTIVE_CADENCES),
1157
- effectiveDate: z22.string(),
1158
- targetDate: z22.string().nullable(),
1159
- isActive: z22.boolean(),
1187
+ dataSources: z22.array(z22.enum(REVIEW_DATA_SOURCES)),
1188
+ attendees: z22.array(ReviewAttendeeSchema),
1189
+ dataSnapshot: ReviewDataSnapshotSchema,
1190
+ objectiveSnapshots: z22.array(ReviewObjectiveSnapshotSchema),
1191
+ decisions: z22.array(ReviewDecisionSchema),
1192
+ notes: z22.string().nullable(),
1193
+ completedAt: z22.string().nullable(),
1194
+ completedBy: z22.string().nullable(),
1160
1195
  createdAt: z22.string(),
1161
1196
  createdBy: z22.string(),
1162
- updatedAt: z22.string(),
1163
- // Optional: included when fetching detail with snapshots
1164
- recentSnapshots: z22.array(QualityObjectiveSnapshotResponseSchema).optional()
1197
+ updatedAt: z22.string()
1165
1198
  });
1166
- var ListQualityObjectivesResponseSchema = z22.object({
1167
- items: z22.array(QualityObjectiveResponseSchema),
1199
+ var ListQualityReviewsResponseSchema = z22.object({
1200
+ items: z22.array(QualityReviewResponseSchema),
1168
1201
  total: z22.number(),
1169
1202
  page: z22.number(),
1170
1203
  limit: z22.number(),
@@ -1325,135 +1358,102 @@ var NcListResponseSchema = z23.object({
1325
1358
  limit: z23.number(),
1326
1359
  offset: z23.number()
1327
1360
  });
1328
- var CreateQualityReviewRequestSchema = z8.object({
1329
- reviewTypeId: z8.string().min(1),
1330
- title: z8.string().min(1).max(200),
1331
- scheduledDate: z8.string().datetime(),
1332
- reviewPeriod: z8.object({
1333
- from: z8.string().datetime(),
1334
- to: z8.string().datetime()
1335
- })
1336
- });
1337
- var AddDecisionRequestSchema = z8.object({
1338
- description: z8.string().min(1).max(2e3),
1339
- decidedBy: z8.string().min(1)
1340
- });
1341
- var AddAttendeeRequestSchema = z8.object({
1342
- memberId: z8.string().min(1),
1343
- name: z8.string().min(1),
1361
+ var AlertRecipientSchema = z8.object({
1344
1362
  department: z8.string().min(1),
1345
- role: z8.string().min(1)
1346
- });
1347
- var UpdateReviewNotesRequestSchema = z8.object({
1348
- notes: z8.string().max(1e4)
1363
+ departmentRole: z8.enum(["manager", "member"])
1349
1364
  });
1350
- var ListQualityReviewsQuerySchema = z8.object({
1351
- reviewTypeId: z8.string().optional(),
1352
- status: z8.enum(REVIEW_STATUSES).optional(),
1365
+ var CreateQualityObjectiveRequestSchema = z8.object({
1366
+ title: z8.string().min(1).max(200),
1367
+ description: z8.string().min(1).max(5e3),
1368
+ type: z8.enum(OBJECTIVE_TYPES),
1369
+ metricSource: z8.enum(AUTO_METRIC_SOURCES).optional(),
1370
+ unit: z8.string().min(1).max(50),
1371
+ target: z8.number(),
1372
+ direction: z8.enum(OBJECTIVE_DIRECTIONS),
1373
+ warningThreshold: z8.number(),
1374
+ ownerDepartment: z8.string().min(1),
1375
+ ownerDepartmentRole: z8.enum(["manager", "member"]),
1376
+ alertRecipients: z8.array(AlertRecipientSchema).default([]),
1377
+ reviewCadence: z8.enum(OBJECTIVE_CADENCES),
1378
+ effectiveDate: z8.string().datetime(),
1379
+ targetDate: z8.string().datetime().optional()
1380
+ });
1381
+ var UpdateQualityObjectiveRequestSchema = z8.object({
1382
+ title: z8.string().min(1).max(200).optional(),
1383
+ description: z8.string().min(1).max(5e3).optional(),
1384
+ unit: z8.string().min(1).max(50).optional(),
1385
+ target: z8.number().optional(),
1386
+ direction: z8.enum(OBJECTIVE_DIRECTIONS).optional(),
1387
+ warningThreshold: z8.number().optional(),
1388
+ ownerDepartment: z8.string().min(1).optional(),
1389
+ ownerDepartmentRole: z8.enum(["manager", "member"]).optional(),
1390
+ alertRecipients: z8.array(AlertRecipientSchema).optional(),
1391
+ reviewCadence: z8.enum(OBJECTIVE_CADENCES).optional(),
1392
+ targetDate: z8.string().datetime().nullable().optional()
1393
+ });
1394
+ var RecordObjectiveValueRequestSchema = z8.object({
1395
+ value: z8.number(),
1396
+ note: z8.string().max(1e3).optional()
1397
+ });
1398
+ var ListQualityObjectivesQuerySchema = z8.object({
1399
+ type: z8.enum(OBJECTIVE_TYPES).optional(),
1400
+ status: z8.enum(OBJECTIVE_STATUSES).optional(),
1401
+ isActive: z8.enum(["true", "false"]).transform((v) => v === "true").optional(),
1353
1402
  page: z8.coerce.number().int().positive().default(1),
1354
1403
  limit: z8.coerce.number().int().positive().max(100).default(20)
1355
1404
  });
1356
- var QmsReviewParamSchema = z8.object({
1405
+ var QmsObjectiveParamSchema = z8.object({
1357
1406
  orgId: z8.string().min(1),
1358
1407
  qmsId: z8.string().min(1)
1359
1408
  });
1360
- var ReviewIdParamSchema = z8.object({
1409
+ var ObjectiveIdParamSchema = z8.object({
1361
1410
  orgId: z8.string().min(1),
1362
1411
  qmsId: z8.string().min(1),
1363
- reviewId: z8.string().min(1)
1364
- });
1365
- var MonthlyTrendSchema = z24.object({
1366
- month: z24.string(),
1367
- opened: z24.number(),
1368
- closed: z24.number()
1369
- });
1370
- var ReviewDataSnapshotSchema = z24.object({
1371
- capas: z24.object({
1372
- total: z24.number(),
1373
- open: z24.number(),
1374
- overdue: z24.number(),
1375
- avgCycleTimeDays: z24.number().nullable(),
1376
- trend: z24.array(MonthlyTrendSchema)
1377
- }).optional(),
1378
- nonconformances: z24.object({
1379
- total: z24.number(),
1380
- open: z24.number(),
1381
- overdue: z24.number(),
1382
- avgCycleTimeDays: z24.number().nullable(),
1383
- bySeverity: z24.record(z24.string(), z24.number()),
1384
- trend: z24.array(MonthlyTrendSchema)
1385
- }).optional(),
1386
- complaints: z24.object({
1387
- total: z24.number(),
1388
- open: z24.number(),
1389
- overdue: z24.number(),
1390
- reportableCount: z24.number(),
1391
- trend: z24.array(MonthlyTrendSchema)
1392
- }).optional(),
1393
- training: z24.object({
1394
- totalTasks: z24.number(),
1395
- complianceRate: z24.number(),
1396
- overdue: z24.number()
1397
- }).optional(),
1398
- releases: z24.object({
1399
- total: z24.number(),
1400
- avgCycleTimeDays: z24.number().nullable()
1401
- }).optional(),
1402
- audits: z24.object({
1403
- totalFindings: z24.number(),
1404
- major: z24.number(),
1405
- minor: z24.number(),
1406
- observations: z24.number()
1407
- }).optional()
1408
- });
1409
- var ReviewObjectiveSnapshotSchema = z24.object({
1410
- objectiveId: z24.string(),
1411
- title: z24.string(),
1412
- target: z24.number(),
1413
- value: z24.number().nullable(),
1414
- status: z24.string(),
1415
- direction: z24.string(),
1416
- unit: z24.string()
1412
+ objectiveId: z8.string().min(1)
1417
1413
  });
1418
- var ReviewDecisionSchema = z24.object({
1419
- description: z24.string(),
1420
- decidedBy: z24.string()
1421
- });
1422
- var ReviewAttendeeSchema = z24.object({
1423
- memberId: z24.string(),
1424
- name: z24.string(),
1425
- department: z24.string(),
1426
- role: z24.string()
1427
- });
1428
- var QualityReviewResponseSchema = z24.object({
1414
+ var QualityObjectiveSnapshotResponseSchema = z24.object({
1415
+ id: z24.string(),
1416
+ value: z24.number(),
1417
+ status: z24.enum(OBJECTIVE_STATUSES),
1418
+ source: z24.enum(["auto", "manual", "review"]),
1419
+ reviewId: z24.string().nullable(),
1420
+ capturedAt: z24.string(),
1421
+ capturedBy: z24.string().nullable()
1422
+ });
1423
+ var QualityObjectiveResponseSchema = z24.object({
1429
1424
  id: z24.string(),
1430
- reviewNumber: z24.string(),
1425
+ objectiveNumber: z24.string(),
1431
1426
  title: z24.string(),
1432
- reviewTypeId: z24.string(),
1433
- reviewTypeName: z24.string(),
1434
- status: z24.enum(REVIEW_STATUSES),
1435
- scheduledDate: z24.string(),
1436
- conductedDate: z24.string().nullable(),
1437
- reviewPeriod: z24.object({
1438
- from: z24.string(),
1439
- to: z24.string()
1440
- }),
1427
+ description: z24.string(),
1428
+ type: z24.enum(OBJECTIVE_TYPES),
1429
+ metricSource: z24.enum(AUTO_METRIC_SOURCES).nullable(),
1430
+ unit: z24.string(),
1431
+ target: z24.number(),
1432
+ direction: z24.enum(OBJECTIVE_DIRECTIONS),
1433
+ warningThreshold: z24.number(),
1434
+ currentValue: z24.number().nullable(),
1435
+ currentValueUpdatedAt: z24.string().nullable(),
1436
+ status: z24.enum(OBJECTIVE_STATUSES),
1441
1437
  ownerDepartment: z24.string(),
1442
1438
  ownerDepartmentRole: z24.enum(["manager", "member"]),
1443
- dataSources: z24.array(z24.enum(REVIEW_DATA_SOURCES)),
1444
- attendees: z24.array(ReviewAttendeeSchema),
1445
- dataSnapshot: ReviewDataSnapshotSchema,
1446
- objectiveSnapshots: z24.array(ReviewObjectiveSnapshotSchema),
1447
- decisions: z24.array(ReviewDecisionSchema),
1448
- notes: z24.string().nullable(),
1449
- completedAt: z24.string().nullable(),
1450
- completedBy: z24.string().nullable(),
1439
+ alertRecipients: z24.array(
1440
+ z24.object({
1441
+ department: z24.string(),
1442
+ departmentRole: z24.enum(["manager", "member"])
1443
+ })
1444
+ ),
1445
+ reviewCadence: z24.enum(OBJECTIVE_CADENCES),
1446
+ effectiveDate: z24.string(),
1447
+ targetDate: z24.string().nullable(),
1448
+ isActive: z24.boolean(),
1451
1449
  createdAt: z24.string(),
1452
1450
  createdBy: z24.string(),
1453
- updatedAt: z24.string()
1451
+ updatedAt: z24.string(),
1452
+ // Optional: included when fetching detail with snapshots
1453
+ recentSnapshots: z24.array(QualityObjectiveSnapshotResponseSchema).optional()
1454
1454
  });
1455
- var ListQualityReviewsResponseSchema = z24.object({
1456
- items: z24.array(QualityReviewResponseSchema),
1455
+ var ListQualityObjectivesResponseSchema = z24.object({
1456
+ items: z24.array(QualityObjectiveResponseSchema),
1457
1457
  total: z24.number(),
1458
1458
  page: z24.number(),
1459
1459
  limit: z24.number(),
@@ -2240,7 +2240,9 @@ var ArchitectureFrontmatterSchema = z62.object({
2240
2240
  author: z62.string().min(1),
2241
2241
  reviewers: z62.array(z62.string()).optional(),
2242
2242
  /** Approver list — required for all regulated document types */
2243
- approvers: z62.array(z62.string()).min(1)
2243
+ approvers: z62.array(z62.string()).min(1),
2244
+ /** SRS requirement IDs this architecture item implements (IEC 62304 §5.3.1) */
2245
+ implements: z62.array(z62.string().min(1)).optional()
2244
2246
  });
2245
2247
  var DetailedDesignFrontmatterSchema = z62.object({
2246
2248
  id: z62.string().min(1),
@@ -2258,7 +2260,9 @@ var DetailedDesignFrontmatterSchema = z62.object({
2258
2260
  author: z62.string().min(1),
2259
2261
  reviewers: z62.array(z62.string()).optional(),
2260
2262
  /** Approver list — required for all regulated document types */
2261
- approvers: z62.array(z62.string()).min(1)
2263
+ approvers: z62.array(z62.string()).min(1),
2264
+ /** SRS requirement IDs this design item implements (IEC 62304 §5.4.2) */
2265
+ implements: z62.array(z62.string().min(1)).optional()
2262
2266
  });
2263
2267
  var AnomalyCategorySchema = z72.enum([
2264
2268
  "bug",
@@ -2476,7 +2480,11 @@ var SoftwareRequirementFrontmatterSchema = z16.object({
2476
2480
  traces_from: z16.array(z16.string()).min(1),
2477
2481
  /** Downstream traceability — IDs of documents this SRS traces to */
2478
2482
  traces_to: z16.array(z16.string()).optional(),
2479
- /** HLD/SDD document ID that implements this requirement */
2483
+ /**
2484
+ * @deprecated Use `implements` on HLD/SDD documents instead.
2485
+ * Architecture documents should declare which requirements they implement (IEC 62304 §5.3.1).
2486
+ * Kept for backwards compatibility — the sync engine does not create links from this field.
2487
+ */
2480
2488
  implemented_in: z16.string().optional()
2481
2489
  });
2482
2490
  var TestProtocolFrontmatterSchema = z17.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pactosigna/records",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "Generate audit-ready regulatory PDF records from PactoSigna-compliant git repositories",
6
6
  "publishConfig": {