@pactosigna/records 0.1.0 → 0.1.1
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/cli.js +315 -315
- package/package.json +12 -12
package/dist/cli.js
CHANGED
|
@@ -806,8 +806,8 @@ import { z as z222 } from "zod";
|
|
|
806
806
|
import { z as z4 } from "zod";
|
|
807
807
|
import { z as z5 } from "zod";
|
|
808
808
|
import { z as z6 } from "zod";
|
|
809
|
-
import { z as z23 } from "zod";
|
|
810
809
|
import { z as z7 } from "zod";
|
|
810
|
+
import { z as z23 } from "zod";
|
|
811
811
|
import { z as z8 } from "zod";
|
|
812
812
|
import { z as z24 } from "zod";
|
|
813
813
|
import { z as z9 } from "zod";
|
|
@@ -1193,378 +1193,378 @@ var MemberPermissionsSchema = z5.object({
|
|
|
1193
1193
|
canViewAuditLog: z5.boolean(),
|
|
1194
1194
|
canExport: z5.boolean()
|
|
1195
1195
|
});
|
|
1196
|
-
var
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
});
|
|
1240
|
-
var
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
var QualityObjectiveSnapshotResponseSchema = z23.object({
|
|
1250
|
-
id: z23.string(),
|
|
1251
|
-
value: z23.number(),
|
|
1252
|
-
status: z23.enum(OBJECTIVE_STATUSES),
|
|
1253
|
-
source: z23.enum(["auto", "manual", "review"]),
|
|
1254
|
-
reviewId: z23.string().nullable(),
|
|
1255
|
-
capturedAt: z23.string(),
|
|
1256
|
-
capturedBy: z23.string().nullable()
|
|
1257
|
-
});
|
|
1258
|
-
var QualityObjectiveResponseSchema = z23.object({
|
|
1196
|
+
var ErrorResponseSchema = z6.object({
|
|
1197
|
+
error: z6.string(),
|
|
1198
|
+
code: z6.string().optional(),
|
|
1199
|
+
details: z6.record(z6.unknown()).optional()
|
|
1200
|
+
});
|
|
1201
|
+
var PaginationParamsSchema = z6.object({
|
|
1202
|
+
limit: z6.coerce.number().min(1).max(100).optional().default(50),
|
|
1203
|
+
offset: z6.coerce.number().min(0).optional().default(0)
|
|
1204
|
+
});
|
|
1205
|
+
var NcStatusSchema = z7.enum(NC_STATUSES);
|
|
1206
|
+
var NcSeveritySchema = z7.enum(NC_SEVERITIES);
|
|
1207
|
+
var NcDispositionSchema = z7.enum(NC_DISPOSITIONS);
|
|
1208
|
+
var NcSourceTypeSchema = z7.enum(NC_SOURCE_TYPES);
|
|
1209
|
+
var QmsNcParamSchema = z7.object({
|
|
1210
|
+
orgId: z7.string().min(1),
|
|
1211
|
+
qmsId: z7.string().min(1)
|
|
1212
|
+
});
|
|
1213
|
+
var NcIdParamSchema = z7.object({
|
|
1214
|
+
orgId: z7.string().min(1),
|
|
1215
|
+
qmsId: z7.string().min(1),
|
|
1216
|
+
ncId: z7.string().min(1)
|
|
1217
|
+
});
|
|
1218
|
+
var CreateNcRequestSchema = z7.object({
|
|
1219
|
+
severity: NcSeveritySchema,
|
|
1220
|
+
sourceType: NcSourceTypeSchema,
|
|
1221
|
+
title: z7.string().min(1).max(200),
|
|
1222
|
+
description: z7.string().min(1).max(5e3),
|
|
1223
|
+
dueDate: z7.string().datetime().optional(),
|
|
1224
|
+
affectedDocumentIds: z7.array(z7.string().min(1)).default([]),
|
|
1225
|
+
affectedDeviceIds: z7.array(z7.string().min(1)).default([])
|
|
1226
|
+
});
|
|
1227
|
+
var UpdateNcRequestSchema = z7.object({
|
|
1228
|
+
title: z7.string().min(1).max(200).optional(),
|
|
1229
|
+
description: z7.string().min(1).max(5e3).optional(),
|
|
1230
|
+
severity: NcSeveritySchema.optional(),
|
|
1231
|
+
investigationDescription: z7.string().max(5e3).optional(),
|
|
1232
|
+
affectedDocumentIds: z7.array(z7.string().min(1)).optional(),
|
|
1233
|
+
affectedDeviceIds: z7.array(z7.string().min(1)).optional(),
|
|
1234
|
+
dueDate: z7.string().datetime().nullable().optional()
|
|
1235
|
+
});
|
|
1236
|
+
var SetDispositionRequestSchema = z7.object({
|
|
1237
|
+
disposition: NcDispositionSchema,
|
|
1238
|
+
justification: z7.string().min(1).max(5e3)
|
|
1239
|
+
});
|
|
1240
|
+
var ApproveConcessionRequestSchema = z7.object({
|
|
1241
|
+
signatureId: z7.string().min(1)
|
|
1242
|
+
});
|
|
1243
|
+
var NcListQuerySchema = PaginationParamsSchema.extend({
|
|
1244
|
+
status: NcStatusSchema.optional(),
|
|
1245
|
+
severity: NcSeveritySchema.optional(),
|
|
1246
|
+
sourceType: NcSourceTypeSchema.optional()
|
|
1247
|
+
});
|
|
1248
|
+
var NcResponseSchema = z23.object({
|
|
1259
1249
|
id: z23.string(),
|
|
1260
|
-
|
|
1250
|
+
qmsId: z23.string(),
|
|
1251
|
+
organizationId: z23.string(),
|
|
1252
|
+
ncNumber: z23.string(),
|
|
1253
|
+
severity: NcSeveritySchema,
|
|
1254
|
+
sourceType: NcSourceTypeSchema,
|
|
1261
1255
|
title: z23.string(),
|
|
1262
1256
|
description: z23.string(),
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
status: z23.enum(OBJECTIVE_STATUSES),
|
|
1272
|
-
ownerDepartment: z23.string(),
|
|
1273
|
-
ownerDepartmentRole: z23.enum(["manager", "member"]),
|
|
1274
|
-
alertRecipients: z23.array(
|
|
1275
|
-
z23.object({
|
|
1276
|
-
department: z23.string(),
|
|
1277
|
-
departmentRole: z23.enum(["manager", "member"])
|
|
1278
|
-
})
|
|
1279
|
-
),
|
|
1280
|
-
reviewCadence: z23.enum(OBJECTIVE_CADENCES),
|
|
1281
|
-
effectiveDate: z23.string(),
|
|
1282
|
-
targetDate: z23.string().nullable(),
|
|
1283
|
-
isActive: z23.boolean(),
|
|
1257
|
+
investigationDescription: z23.string().optional(),
|
|
1258
|
+
disposition: NcDispositionSchema.optional(),
|
|
1259
|
+
dispositionJustification: z23.string().optional(),
|
|
1260
|
+
concessionSignatureId: z23.string().optional(),
|
|
1261
|
+
affectedDocumentIds: z23.array(z23.string()),
|
|
1262
|
+
affectedDeviceIds: z23.array(z23.string()),
|
|
1263
|
+
linkedCapaId: z23.string().optional(),
|
|
1264
|
+
status: NcStatusSchema,
|
|
1284
1265
|
createdAt: z23.string(),
|
|
1285
1266
|
createdBy: z23.string(),
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1267
|
+
investigationStartedAt: z23.string().optional(),
|
|
1268
|
+
investigationStartedBy: z23.string().optional(),
|
|
1269
|
+
dispositionSetAt: z23.string().optional(),
|
|
1270
|
+
dispositionSetBy: z23.string().optional(),
|
|
1271
|
+
closedAt: z23.string().optional(),
|
|
1272
|
+
closedBy: z23.string().optional(),
|
|
1273
|
+
cancelledAt: z23.string().optional(),
|
|
1274
|
+
cancelledBy: z23.string().optional(),
|
|
1275
|
+
dueDate: z23.string().optional()
|
|
1276
|
+
});
|
|
1277
|
+
var NcListResponseSchema = z23.object({
|
|
1278
|
+
items: z23.array(NcResponseSchema),
|
|
1292
1279
|
total: z23.number(),
|
|
1293
|
-
page: z23.number(),
|
|
1294
1280
|
limit: z23.number(),
|
|
1295
|
-
|
|
1296
|
-
});
|
|
1297
|
-
var ErrorResponseSchema = z7.object({
|
|
1298
|
-
error: z7.string(),
|
|
1299
|
-
code: z7.string().optional(),
|
|
1300
|
-
details: z7.record(z7.unknown()).optional()
|
|
1301
|
-
});
|
|
1302
|
-
var PaginationParamsSchema = z7.object({
|
|
1303
|
-
limit: z7.coerce.number().min(1).max(100).optional().default(50),
|
|
1304
|
-
offset: z7.coerce.number().min(0).optional().default(0)
|
|
1305
|
-
});
|
|
1306
|
-
var NcStatusSchema = z8.enum(NC_STATUSES);
|
|
1307
|
-
var NcSeveritySchema = z8.enum(NC_SEVERITIES);
|
|
1308
|
-
var NcDispositionSchema = z8.enum(NC_DISPOSITIONS);
|
|
1309
|
-
var NcSourceTypeSchema = z8.enum(NC_SOURCE_TYPES);
|
|
1310
|
-
var QmsNcParamSchema = z8.object({
|
|
1311
|
-
orgId: z8.string().min(1),
|
|
1312
|
-
qmsId: z8.string().min(1)
|
|
1281
|
+
offset: z23.number()
|
|
1313
1282
|
});
|
|
1314
|
-
var
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
ncId: z8.string().min(1)
|
|
1283
|
+
var AlertRecipientSchema = z8.object({
|
|
1284
|
+
department: z8.string().min(1),
|
|
1285
|
+
departmentRole: z8.enum(["manager", "member"])
|
|
1318
1286
|
});
|
|
1319
|
-
var
|
|
1320
|
-
severity: NcSeveritySchema,
|
|
1321
|
-
sourceType: NcSourceTypeSchema,
|
|
1287
|
+
var CreateQualityObjectiveRequestSchema = z8.object({
|
|
1322
1288
|
title: z8.string().min(1).max(200),
|
|
1323
1289
|
description: z8.string().min(1).max(5e3),
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1290
|
+
type: z8.enum(OBJECTIVE_TYPES),
|
|
1291
|
+
metricSource: z8.enum(AUTO_METRIC_SOURCES).optional(),
|
|
1292
|
+
unit: z8.string().min(1).max(50),
|
|
1293
|
+
target: z8.number(),
|
|
1294
|
+
direction: z8.enum(OBJECTIVE_DIRECTIONS),
|
|
1295
|
+
warningThreshold: z8.number(),
|
|
1296
|
+
ownerDepartment: z8.string().min(1),
|
|
1297
|
+
ownerDepartmentRole: z8.enum(["manager", "member"]),
|
|
1298
|
+
alertRecipients: z8.array(AlertRecipientSchema).default([]),
|
|
1299
|
+
reviewCadence: z8.enum(OBJECTIVE_CADENCES),
|
|
1300
|
+
effectiveDate: z8.string().datetime(),
|
|
1301
|
+
targetDate: z8.string().datetime().optional()
|
|
1302
|
+
});
|
|
1303
|
+
var UpdateQualityObjectiveRequestSchema = z8.object({
|
|
1329
1304
|
title: z8.string().min(1).max(200).optional(),
|
|
1330
1305
|
description: z8.string().min(1).max(5e3).optional(),
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
});
|
|
1341
|
-
var
|
|
1342
|
-
|
|
1306
|
+
unit: z8.string().min(1).max(50).optional(),
|
|
1307
|
+
target: z8.number().optional(),
|
|
1308
|
+
direction: z8.enum(OBJECTIVE_DIRECTIONS).optional(),
|
|
1309
|
+
warningThreshold: z8.number().optional(),
|
|
1310
|
+
ownerDepartment: z8.string().min(1).optional(),
|
|
1311
|
+
ownerDepartmentRole: z8.enum(["manager", "member"]).optional(),
|
|
1312
|
+
alertRecipients: z8.array(AlertRecipientSchema).optional(),
|
|
1313
|
+
reviewCadence: z8.enum(OBJECTIVE_CADENCES).optional(),
|
|
1314
|
+
targetDate: z8.string().datetime().nullable().optional()
|
|
1315
|
+
});
|
|
1316
|
+
var RecordObjectiveValueRequestSchema = z8.object({
|
|
1317
|
+
value: z8.number(),
|
|
1318
|
+
note: z8.string().max(1e3).optional()
|
|
1319
|
+
});
|
|
1320
|
+
var ListQualityObjectivesQuerySchema = z8.object({
|
|
1321
|
+
type: z8.enum(OBJECTIVE_TYPES).optional(),
|
|
1322
|
+
status: z8.enum(OBJECTIVE_STATUSES).optional(),
|
|
1323
|
+
isActive: z8.enum(["true", "false"]).transform((v) => v === "true").optional(),
|
|
1324
|
+
page: z8.coerce.number().int().positive().default(1),
|
|
1325
|
+
limit: z8.coerce.number().int().positive().max(100).default(20)
|
|
1326
|
+
});
|
|
1327
|
+
var QmsObjectiveParamSchema = z8.object({
|
|
1328
|
+
orgId: z8.string().min(1),
|
|
1329
|
+
qmsId: z8.string().min(1)
|
|
1343
1330
|
});
|
|
1344
|
-
var
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1331
|
+
var ObjectiveIdParamSchema = z8.object({
|
|
1332
|
+
orgId: z8.string().min(1),
|
|
1333
|
+
qmsId: z8.string().min(1),
|
|
1334
|
+
objectiveId: z8.string().min(1)
|
|
1348
1335
|
});
|
|
1349
|
-
var
|
|
1336
|
+
var QualityObjectiveSnapshotResponseSchema = z24.object({
|
|
1350
1337
|
id: z24.string(),
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1338
|
+
value: z24.number(),
|
|
1339
|
+
status: z24.enum(OBJECTIVE_STATUSES),
|
|
1340
|
+
source: z24.enum(["auto", "manual", "review"]),
|
|
1341
|
+
reviewId: z24.string().nullable(),
|
|
1342
|
+
capturedAt: z24.string(),
|
|
1343
|
+
capturedBy: z24.string().nullable()
|
|
1344
|
+
});
|
|
1345
|
+
var QualityObjectiveResponseSchema = z24.object({
|
|
1346
|
+
id: z24.string(),
|
|
1347
|
+
objectiveNumber: z24.string(),
|
|
1356
1348
|
title: z24.string(),
|
|
1357
1349
|
description: z24.string(),
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1350
|
+
type: z24.enum(OBJECTIVE_TYPES),
|
|
1351
|
+
metricSource: z24.enum(AUTO_METRIC_SOURCES).nullable(),
|
|
1352
|
+
unit: z24.string(),
|
|
1353
|
+
target: z24.number(),
|
|
1354
|
+
direction: z24.enum(OBJECTIVE_DIRECTIONS),
|
|
1355
|
+
warningThreshold: z24.number(),
|
|
1356
|
+
currentValue: z24.number().nullable(),
|
|
1357
|
+
currentValueUpdatedAt: z24.string().nullable(),
|
|
1358
|
+
status: z24.enum(OBJECTIVE_STATUSES),
|
|
1359
|
+
ownerDepartment: z24.string(),
|
|
1360
|
+
ownerDepartmentRole: z24.enum(["manager", "member"]),
|
|
1361
|
+
alertRecipients: z24.array(
|
|
1362
|
+
z24.object({
|
|
1363
|
+
department: z24.string(),
|
|
1364
|
+
departmentRole: z24.enum(["manager", "member"])
|
|
1365
|
+
})
|
|
1366
|
+
),
|
|
1367
|
+
reviewCadence: z24.enum(OBJECTIVE_CADENCES),
|
|
1368
|
+
effectiveDate: z24.string(),
|
|
1369
|
+
targetDate: z24.string().nullable(),
|
|
1370
|
+
isActive: z24.boolean(),
|
|
1366
1371
|
createdAt: z24.string(),
|
|
1367
1372
|
createdBy: z24.string(),
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
cancelledAt: z24.string().optional(),
|
|
1375
|
-
cancelledBy: z24.string().optional(),
|
|
1376
|
-
dueDate: z24.string().optional()
|
|
1377
|
-
});
|
|
1378
|
-
var NcListResponseSchema = z24.object({
|
|
1379
|
-
items: z24.array(NcResponseSchema),
|
|
1373
|
+
updatedAt: z24.string(),
|
|
1374
|
+
// Optional: included when fetching detail with snapshots
|
|
1375
|
+
recentSnapshots: z24.array(QualityObjectiveSnapshotResponseSchema).optional()
|
|
1376
|
+
});
|
|
1377
|
+
var ListQualityObjectivesResponseSchema = z24.object({
|
|
1378
|
+
items: z24.array(QualityObjectiveResponseSchema),
|
|
1380
1379
|
total: z24.number(),
|
|
1380
|
+
page: z24.number(),
|
|
1381
1381
|
limit: z24.number(),
|
|
1382
|
-
|
|
1383
|
-
});
|
|
1384
|
-
var CapaStatusSchema = z9.enum(CAPA_STATUSES);
|
|
1385
|
-
var CapaClassificationSchema = z9.enum(CAPA_CLASSIFICATIONS);
|
|
1386
|
-
var CapaPrioritySchema = z9.enum(CAPA_PRIORITIES);
|
|
1387
|
-
var CapaSourceTypeSchema = z9.enum(CAPA_SOURCE_TYPES);
|
|
1388
|
-
var CapaActionStatusSchema = z9.enum(CAPA_ACTION_STATUSES);
|
|
1389
|
-
var QmsCapaParamSchema = z9.object({
|
|
1390
|
-
orgId: z9.string().min(1),
|
|
1391
|
-
qmsId: z9.string().min(1)
|
|
1382
|
+
hasMore: z24.boolean()
|
|
1392
1383
|
});
|
|
1393
|
-
var
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1384
|
+
var ActionSourceSchema = z9.object({
|
|
1385
|
+
type: z9.enum(ACTION_SOURCE_TYPES),
|
|
1386
|
+
id: z9.string().min(1),
|
|
1387
|
+
displayNumber: z9.string().optional()
|
|
1397
1388
|
});
|
|
1398
|
-
var
|
|
1399
|
-
orgId: z9.string().min(1),
|
|
1400
|
-
qmsId: z9.string().min(1),
|
|
1401
|
-
capaId: z9.string().min(1),
|
|
1402
|
-
actionId: z9.string().min(1)
|
|
1403
|
-
});
|
|
1404
|
-
var CreateCapaRequestSchema = z9.object({
|
|
1405
|
-
classification: CapaClassificationSchema,
|
|
1406
|
-
priority: CapaPrioritySchema,
|
|
1389
|
+
var CreateActionRequestSchema = z9.object({
|
|
1407
1390
|
title: z9.string().min(1).max(200),
|
|
1408
1391
|
description: z9.string().min(1).max(5e3),
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1392
|
+
source: ActionSourceSchema,
|
|
1393
|
+
assigneeDepartment: z9.string().min(1),
|
|
1394
|
+
assigneeDepartmentRole: z9.enum(["manager", "member"]),
|
|
1395
|
+
assigneeId: z9.string().optional(),
|
|
1396
|
+
priority: z9.enum(ACTION_PRIORITIES),
|
|
1397
|
+
dueDate: z9.string().datetime()
|
|
1415
1398
|
});
|
|
1416
|
-
var
|
|
1399
|
+
var UpdateActionRequestSchema = z9.object({
|
|
1417
1400
|
title: z9.string().min(1).max(200).optional(),
|
|
1418
1401
|
description: z9.string().min(1).max(5e3).optional(),
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
affectedDeviceIds: z9.array(z9.string().min(1)).optional(),
|
|
1424
|
-
dueDate: z9.string().datetime().nullable().optional()
|
|
1425
|
-
});
|
|
1426
|
-
var CloseCapaRequestSchema = z9.object({
|
|
1427
|
-
signatureId: z9.string().min(1)
|
|
1428
|
-
});
|
|
1429
|
-
var AddCapaActionRequestSchema = z9.object({
|
|
1430
|
-
description: z9.string().min(1).max(2e3),
|
|
1431
|
-
assigneeId: z9.string().min(1),
|
|
1432
|
-
dueDate: z9.string().datetime(),
|
|
1433
|
-
notes: z9.string().max(2e3).optional()
|
|
1434
|
-
});
|
|
1435
|
-
var UpdateCapaActionRequestSchema = z9.object({
|
|
1436
|
-
description: z9.string().min(1).max(2e3).optional(),
|
|
1437
|
-
assigneeId: z9.string().min(1).optional(),
|
|
1402
|
+
assigneeDepartment: z9.string().min(1).optional(),
|
|
1403
|
+
assigneeDepartmentRole: z9.enum(["manager", "member"]).optional(),
|
|
1404
|
+
assigneeId: z9.string().nullable().optional(),
|
|
1405
|
+
priority: z9.enum(ACTION_PRIORITIES).optional(),
|
|
1438
1406
|
dueDate: z9.string().datetime().optional(),
|
|
1439
|
-
|
|
1440
|
-
notes: z9.string().max(2e3).optional()
|
|
1407
|
+
notes: z9.string().max(5e3).optional()
|
|
1441
1408
|
});
|
|
1442
|
-
var
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1409
|
+
var ListActionsQuerySchema = z9.object({
|
|
1410
|
+
sourceType: z9.enum(ACTION_SOURCE_TYPES).optional(),
|
|
1411
|
+
sourceId: z9.string().optional(),
|
|
1412
|
+
status: z9.enum(ACTION_STATUSES).optional(),
|
|
1413
|
+
assigneeDepartment: z9.string().optional(),
|
|
1414
|
+
priority: z9.enum(ACTION_PRIORITIES).optional(),
|
|
1415
|
+
page: z9.coerce.number().int().positive().default(1),
|
|
1416
|
+
limit: z9.coerce.number().int().positive().max(100).default(20)
|
|
1446
1417
|
});
|
|
1447
|
-
var
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
status: CapaActionStatusSchema,
|
|
1454
|
-
completedAt: z25.string().optional(),
|
|
1455
|
-
notes: z25.string().optional()
|
|
1418
|
+
var CompleteActionRequestSchema = z9.object({
|
|
1419
|
+
notes: z9.string().max(5e3).optional()
|
|
1420
|
+
});
|
|
1421
|
+
var QmsActionParamSchema = z9.object({
|
|
1422
|
+
orgId: z9.string().min(1),
|
|
1423
|
+
qmsId: z9.string().min(1)
|
|
1456
1424
|
});
|
|
1457
|
-
var
|
|
1425
|
+
var ActionIdParamSchema = z9.object({
|
|
1426
|
+
orgId: z9.string().min(1),
|
|
1427
|
+
qmsId: z9.string().min(1),
|
|
1428
|
+
actionId: z9.string().min(1)
|
|
1429
|
+
});
|
|
1430
|
+
var ActionResponseSchema = z25.object({
|
|
1458
1431
|
id: z25.string(),
|
|
1459
|
-
|
|
1460
|
-
organizationId: z25.string(),
|
|
1461
|
-
capaNumber: z25.string(),
|
|
1462
|
-
classification: CapaClassificationSchema,
|
|
1463
|
-
priority: CapaPrioritySchema,
|
|
1432
|
+
actionNumber: z25.string(),
|
|
1464
1433
|
title: z25.string(),
|
|
1465
1434
|
description: z25.string(),
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1435
|
+
source: z25.object({
|
|
1436
|
+
type: z25.enum(ACTION_SOURCE_TYPES),
|
|
1437
|
+
id: z25.string(),
|
|
1438
|
+
displayNumber: z25.string().optional()
|
|
1439
|
+
}),
|
|
1440
|
+
assigneeDepartment: z25.string(),
|
|
1441
|
+
assigneeDepartmentRole: z25.enum(["manager", "member"]),
|
|
1442
|
+
assigneeId: z25.string().nullable(),
|
|
1443
|
+
priority: z25.enum(ACTION_PRIORITIES),
|
|
1444
|
+
dueDate: z25.string(),
|
|
1445
|
+
status: z25.enum(ACTION_STATUSES),
|
|
1446
|
+
isOverdue: z25.boolean(),
|
|
1447
|
+
completedAt: z25.string().nullable(),
|
|
1448
|
+
completedBy: z25.string().nullable(),
|
|
1449
|
+
notes: z25.string().nullable(),
|
|
1475
1450
|
createdAt: z25.string(),
|
|
1476
1451
|
createdBy: z25.string(),
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
closedBy: z25.string().optional(),
|
|
1482
|
-
cancelledAt: z25.string().optional(),
|
|
1483
|
-
cancelledBy: z25.string().optional(),
|
|
1484
|
-
dueDate: z25.string().optional()
|
|
1485
|
-
});
|
|
1486
|
-
var CapaListResponseSchema = z25.object({
|
|
1487
|
-
items: z25.array(CapaResponseSchema),
|
|
1452
|
+
updatedAt: z25.string()
|
|
1453
|
+
});
|
|
1454
|
+
var ListActionsResponseSchema = z25.object({
|
|
1455
|
+
items: z25.array(ActionResponseSchema),
|
|
1488
1456
|
total: z25.number(),
|
|
1457
|
+
page: z25.number(),
|
|
1489
1458
|
limit: z25.number(),
|
|
1490
|
-
|
|
1459
|
+
hasMore: z25.boolean()
|
|
1460
|
+
});
|
|
1461
|
+
var CapaStatusSchema = z10.enum(CAPA_STATUSES);
|
|
1462
|
+
var CapaClassificationSchema = z10.enum(CAPA_CLASSIFICATIONS);
|
|
1463
|
+
var CapaPrioritySchema = z10.enum(CAPA_PRIORITIES);
|
|
1464
|
+
var CapaSourceTypeSchema = z10.enum(CAPA_SOURCE_TYPES);
|
|
1465
|
+
var CapaActionStatusSchema = z10.enum(CAPA_ACTION_STATUSES);
|
|
1466
|
+
var QmsCapaParamSchema = z10.object({
|
|
1467
|
+
orgId: z10.string().min(1),
|
|
1468
|
+
qmsId: z10.string().min(1)
|
|
1491
1469
|
});
|
|
1492
|
-
var
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1470
|
+
var CapaIdParamSchema = z10.object({
|
|
1471
|
+
orgId: z10.string().min(1),
|
|
1472
|
+
qmsId: z10.string().min(1),
|
|
1473
|
+
capaId: z10.string().min(1)
|
|
1474
|
+
});
|
|
1475
|
+
var CapaActionIdParamSchema = z10.object({
|
|
1476
|
+
orgId: z10.string().min(1),
|
|
1477
|
+
qmsId: z10.string().min(1),
|
|
1478
|
+
capaId: z10.string().min(1),
|
|
1479
|
+
actionId: z10.string().min(1)
|
|
1496
1480
|
});
|
|
1497
|
-
var
|
|
1481
|
+
var CreateCapaRequestSchema = z10.object({
|
|
1482
|
+
classification: CapaClassificationSchema,
|
|
1483
|
+
priority: CapaPrioritySchema,
|
|
1498
1484
|
title: z10.string().min(1).max(200),
|
|
1499
1485
|
description: z10.string().min(1).max(5e3),
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1486
|
+
sourceType: CapaSourceTypeSchema,
|
|
1487
|
+
sourceDescription: z10.string().min(1).max(2e3),
|
|
1488
|
+
sourceId: z10.string().max(200).optional(),
|
|
1489
|
+
dueDate: z10.string().datetime().optional(),
|
|
1490
|
+
affectedDocumentIds: z10.array(z10.string().min(1)).default([]),
|
|
1491
|
+
affectedDeviceIds: z10.array(z10.string().min(1)).default([])
|
|
1506
1492
|
});
|
|
1507
|
-
var
|
|
1493
|
+
var UpdateCapaRequestSchema = z10.object({
|
|
1508
1494
|
title: z10.string().min(1).max(200).optional(),
|
|
1509
1495
|
description: z10.string().min(1).max(5e3).optional(),
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1496
|
+
priority: CapaPrioritySchema.optional(),
|
|
1497
|
+
rootCauseDescription: z10.string().max(5e3).optional(),
|
|
1498
|
+
verificationDescription: z10.string().max(5e3).optional(),
|
|
1499
|
+
affectedDocumentIds: z10.array(z10.string().min(1)).optional(),
|
|
1500
|
+
affectedDeviceIds: z10.array(z10.string().min(1)).optional(),
|
|
1501
|
+
dueDate: z10.string().datetime().nullable().optional()
|
|
1502
|
+
});
|
|
1503
|
+
var CloseCapaRequestSchema = z10.object({
|
|
1504
|
+
signatureId: z10.string().min(1)
|
|
1505
|
+
});
|
|
1506
|
+
var AddCapaActionRequestSchema = z10.object({
|
|
1507
|
+
description: z10.string().min(1).max(2e3),
|
|
1508
|
+
assigneeId: z10.string().min(1),
|
|
1509
|
+
dueDate: z10.string().datetime(),
|
|
1510
|
+
notes: z10.string().max(2e3).optional()
|
|
1511
|
+
});
|
|
1512
|
+
var UpdateCapaActionRequestSchema = z10.object({
|
|
1513
|
+
description: z10.string().min(1).max(2e3).optional(),
|
|
1514
|
+
assigneeId: z10.string().min(1).optional(),
|
|
1514
1515
|
dueDate: z10.string().datetime().optional(),
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
var ListActionsQuerySchema = z10.object({
|
|
1518
|
-
sourceType: z10.enum(ACTION_SOURCE_TYPES).optional(),
|
|
1519
|
-
sourceId: z10.string().optional(),
|
|
1520
|
-
status: z10.enum(ACTION_STATUSES).optional(),
|
|
1521
|
-
assigneeDepartment: z10.string().optional(),
|
|
1522
|
-
priority: z10.enum(ACTION_PRIORITIES).optional(),
|
|
1523
|
-
page: z10.coerce.number().int().positive().default(1),
|
|
1524
|
-
limit: z10.coerce.number().int().positive().max(100).default(20)
|
|
1525
|
-
});
|
|
1526
|
-
var CompleteActionRequestSchema = z10.object({
|
|
1527
|
-
notes: z10.string().max(5e3).optional()
|
|
1516
|
+
status: CapaActionStatusSchema.optional(),
|
|
1517
|
+
notes: z10.string().max(2e3).optional()
|
|
1528
1518
|
});
|
|
1529
|
-
var
|
|
1530
|
-
|
|
1531
|
-
|
|
1519
|
+
var CapaListQuerySchema = PaginationParamsSchema.extend({
|
|
1520
|
+
status: CapaStatusSchema.optional(),
|
|
1521
|
+
classification: CapaClassificationSchema.optional(),
|
|
1522
|
+
priority: CapaPrioritySchema.optional()
|
|
1532
1523
|
});
|
|
1533
|
-
var
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1524
|
+
var CapaActionResponseSchema = z26.object({
|
|
1525
|
+
id: z26.string(),
|
|
1526
|
+
description: z26.string(),
|
|
1527
|
+
assigneeId: z26.string(),
|
|
1528
|
+
assigneeEmail: z26.string(),
|
|
1529
|
+
dueDate: z26.string(),
|
|
1530
|
+
status: CapaActionStatusSchema,
|
|
1531
|
+
completedAt: z26.string().optional(),
|
|
1532
|
+
notes: z26.string().optional()
|
|
1537
1533
|
});
|
|
1538
|
-
var
|
|
1534
|
+
var CapaResponseSchema = z26.object({
|
|
1539
1535
|
id: z26.string(),
|
|
1540
|
-
|
|
1536
|
+
qmsId: z26.string(),
|
|
1537
|
+
organizationId: z26.string(),
|
|
1538
|
+
capaNumber: z26.string(),
|
|
1539
|
+
classification: CapaClassificationSchema,
|
|
1540
|
+
priority: CapaPrioritySchema,
|
|
1541
1541
|
title: z26.string(),
|
|
1542
1542
|
description: z26.string(),
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
dueDate: z26.string(),
|
|
1553
|
-
status: z26.enum(ACTION_STATUSES),
|
|
1554
|
-
isOverdue: z26.boolean(),
|
|
1555
|
-
completedAt: z26.string().nullable(),
|
|
1556
|
-
completedBy: z26.string().nullable(),
|
|
1557
|
-
notes: z26.string().nullable(),
|
|
1543
|
+
sourceType: CapaSourceTypeSchema,
|
|
1544
|
+
sourceId: z26.string().optional(),
|
|
1545
|
+
sourceDescription: z26.string(),
|
|
1546
|
+
rootCauseDescription: z26.string().optional(),
|
|
1547
|
+
verificationDescription: z26.string().optional(),
|
|
1548
|
+
affectedDocumentIds: z26.array(z26.string()),
|
|
1549
|
+
affectedDeviceIds: z26.array(z26.string()),
|
|
1550
|
+
actions: z26.array(CapaActionResponseSchema),
|
|
1551
|
+
status: CapaStatusSchema,
|
|
1558
1552
|
createdAt: z26.string(),
|
|
1559
1553
|
createdBy: z26.string(),
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1554
|
+
investigationStartedAt: z26.string().optional(),
|
|
1555
|
+
implementationStartedAt: z26.string().optional(),
|
|
1556
|
+
verificationStartedAt: z26.string().optional(),
|
|
1557
|
+
closedAt: z26.string().optional(),
|
|
1558
|
+
closedBy: z26.string().optional(),
|
|
1559
|
+
cancelledAt: z26.string().optional(),
|
|
1560
|
+
cancelledBy: z26.string().optional(),
|
|
1561
|
+
dueDate: z26.string().optional()
|
|
1562
|
+
});
|
|
1563
|
+
var CapaListResponseSchema = z26.object({
|
|
1564
|
+
items: z26.array(CapaResponseSchema),
|
|
1564
1565
|
total: z26.number(),
|
|
1565
|
-
page: z26.number(),
|
|
1566
1566
|
limit: z26.number(),
|
|
1567
|
-
|
|
1567
|
+
offset: z26.number()
|
|
1568
1568
|
});
|
|
1569
1569
|
var ComplaintStatusSchema = z11.enum(COMPLAINT_STATUSES);
|
|
1570
1570
|
var ComplaintSeveritySchema = z11.enum(COMPLAINT_SEVERITIES);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pactosigna/records",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Generate audit-ready regulatory PDF records from PactoSigna-compliant git repositories",
|
|
6
6
|
"publishConfig": {
|
|
@@ -24,13 +24,6 @@
|
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=20.0.0"
|
|
26
26
|
},
|
|
27
|
-
"scripts": {
|
|
28
|
-
"build": "tsup && tsc -p tsconfig.build.json",
|
|
29
|
-
"test": "vitest run",
|
|
30
|
-
"test:coverage": "vitest run --coverage",
|
|
31
|
-
"typecheck": "tsc --noEmit",
|
|
32
|
-
"clean": "rm -rf dist"
|
|
33
|
-
},
|
|
34
27
|
"dependencies": {
|
|
35
28
|
"pdfmake": "^0.3.7",
|
|
36
29
|
"gray-matter": "^4.0.3",
|
|
@@ -41,14 +34,14 @@
|
|
|
41
34
|
"@pactosigna/schemas": ">=0.1.0"
|
|
42
35
|
},
|
|
43
36
|
"devDependencies": {
|
|
44
|
-
"@pactosigna/schemas": "workspace:*",
|
|
45
37
|
"@types/markdown-it": "^14.0.0",
|
|
46
38
|
"@types/pdfmake": "^0.3.2",
|
|
47
39
|
"@vitest/coverage-v8": "^3.0.0",
|
|
48
40
|
"tsup": "^8.0.0",
|
|
49
41
|
"typescript": "^5.7.2",
|
|
50
42
|
"vitest": "^3.0.0",
|
|
51
|
-
"zod": "^3.24.1"
|
|
43
|
+
"zod": "^3.24.1",
|
|
44
|
+
"@pactosigna/schemas": "0.1.0"
|
|
52
45
|
},
|
|
53
46
|
"repository": {
|
|
54
47
|
"type": "git",
|
|
@@ -64,5 +57,12 @@
|
|
|
64
57
|
"regulatory",
|
|
65
58
|
"pdf",
|
|
66
59
|
"records"
|
|
67
|
-
]
|
|
68
|
-
|
|
60
|
+
],
|
|
61
|
+
"scripts": {
|
|
62
|
+
"build": "tsup && tsc -p tsconfig.build.json",
|
|
63
|
+
"test": "vitest run",
|
|
64
|
+
"test:coverage": "vitest run --coverage",
|
|
65
|
+
"typecheck": "tsc --noEmit",
|
|
66
|
+
"clean": "rm -rf dist"
|
|
67
|
+
}
|
|
68
|
+
}
|