@nira-opencrvs/toolkit 1.9.12-rc.fd6f106 → 1.9.13-rc.0732cf4

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.
@@ -108,6 +108,18 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
108
108
  query: import("../commons").ClauseOutput;
109
109
  label: import("../commons").TranslationConfig;
110
110
  } | undefined;
111
+ } | {
112
+ type: "ESCALATE";
113
+ label: import("../commons").TranslationConfig;
114
+ review: {
115
+ title: import("../commons").TranslationConfig;
116
+ fields: import("../commons").FieldConfig[];
117
+ };
118
+ deduplication?: {
119
+ id: string;
120
+ query: import("../commons").ClauseOutput;
121
+ label: import("../commons").TranslationConfig;
122
+ } | undefined;
111
123
  } | {
112
124
  type: "REJECT";
113
125
  label: import("../commons").TranslationConfig;
@@ -391,6 +403,23 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
391
403
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
392
404
  annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
393
405
  originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
406
+ } | {
407
+ type: "ESCALATE";
408
+ id: string & import("zod").BRAND<"UUID">;
409
+ status: "Rejected" | "Requested" | "Accepted";
410
+ content: {
411
+ reason: string;
412
+ };
413
+ transactionId: string;
414
+ createdByUserType: "system" | "user";
415
+ createdAt: string;
416
+ createdBy: string;
417
+ createdByRole: string;
418
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
419
+ createdBySignature?: string | null | undefined;
420
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
421
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
422
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
394
423
  } | {
395
424
  type: "REJECT";
396
425
  id: string & import("zod").BRAND<"UUID">;
@@ -583,7 +612,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
583
612
  annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
584
613
  originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
585
614
  } | {
586
- type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
615
+ type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "ESCALATE" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
587
616
  id: string & import("zod").BRAND<"UUID">;
588
617
  status: "Rejected";
589
618
  transactionId: string;
@@ -678,6 +707,23 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
678
707
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
679
708
  annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
680
709
  originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
710
+ } | {
711
+ type: "ESCALATE";
712
+ id: string & import("zod").BRAND<"UUID">;
713
+ status: "Rejected" | "Requested" | "Accepted";
714
+ content: {
715
+ reason: string;
716
+ };
717
+ transactionId: string;
718
+ createdByUserType: "system" | "user";
719
+ createdAt: string;
720
+ createdBy: string;
721
+ createdByRole: string;
722
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
723
+ createdBySignature?: string | null | undefined;
724
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
725
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
726
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
681
727
  } | {
682
728
  type: "REJECT";
683
729
  id: string & import("zod").BRAND<"UUID">;
@@ -870,7 +916,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
870
916
  annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
871
917
  originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
872
918
  } | {
873
- type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
919
+ type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "ESCALATE" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
874
920
  id: string & import("zod").BRAND<"UUID">;
875
921
  status: "Rejected";
876
922
  transactionId: string;
@@ -967,6 +1013,23 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
967
1013
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
968
1014
  annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
969
1015
  originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
1016
+ } | {
1017
+ type: "ESCALATE";
1018
+ id: string & import("zod").BRAND<"UUID">;
1019
+ status: "Rejected" | "Requested" | "Accepted";
1020
+ content: {
1021
+ reason: string;
1022
+ };
1023
+ transactionId: string;
1024
+ createdByUserType: "system" | "user";
1025
+ createdAt: string;
1026
+ createdBy: string;
1027
+ createdByRole: string;
1028
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1029
+ createdBySignature?: string | null | undefined;
1030
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
1031
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1032
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
970
1033
  } | {
971
1034
  type: "REJECT";
972
1035
  id: string & import("zod").BRAND<"UUID">;
@@ -1159,7 +1222,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1159
1222
  annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1160
1223
  originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
1161
1224
  } | {
1162
- type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
1225
+ type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "ESCALATE" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
1163
1226
  id: string & import("zod").BRAND<"UUID">;
1164
1227
  status: "Rejected";
1165
1228
  transactionId: string;
@@ -1212,7 +1275,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1212
1275
  createdAt: string;
1213
1276
  eventId: string & import("zod").BRAND<"UUID">;
1214
1277
  action: {
1215
- type: "CREATE" | "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
1278
+ type: "CREATE" | "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "ESCALATE" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
1216
1279
  status: "Rejected" | "Requested" | "Accepted";
1217
1280
  transactionId: string;
1218
1281
  createdByUserType: "system" | "user";
@@ -1229,7 +1292,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1229
1292
  }>;
1230
1293
  create: import("@trpc/server").TRPCMutationProcedure<{
1231
1294
  input: {
1232
- type: "CREATE" | "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
1295
+ type: "CREATE" | "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "ESCALATE" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
1233
1296
  status: "Rejected" | "Requested" | "Accepted";
1234
1297
  transactionId: string;
1235
1298
  eventId: string;
@@ -1238,6 +1301,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1238
1301
  annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1239
1302
  originalActionId?: string | undefined;
1240
1303
  keepAssignment?: boolean | undefined;
1304
+ keepAssignmentIfAccepted?: boolean | undefined;
1305
+ keepAssignmentIfRejected?: boolean | undefined;
1241
1306
  };
1242
1307
  output: {
1243
1308
  id: string & import("zod").BRAND<"UUID">;
@@ -1245,7 +1310,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1245
1310
  createdAt: string;
1246
1311
  eventId: string & import("zod").BRAND<"UUID">;
1247
1312
  action: {
1248
- type: "CREATE" | "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
1313
+ type: "CREATE" | "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "ESCALATE" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
1249
1314
  status: "Rejected" | "Requested" | "Accepted";
1250
1315
  transactionId: string;
1251
1316
  createdByUserType: "system" | "user";
@@ -1309,18 +1374,263 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1309
1374
  meta: import("trpc-to-openapi").OpenApiMeta;
1310
1375
  }>;
1311
1376
  accept: import("@trpc/server").TRPCMutationProcedure<{
1312
- input: import("../commons").ActionInput & {
1377
+ input: (Omit<{
1378
+ transactionId: string;
1379
+ eventId: string;
1380
+ type?: "CREATE" | undefined;
1381
+ createdAtLocation?: string | null | undefined;
1382
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1383
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1384
+ originalActionId?: string | undefined;
1385
+ keepAssignment?: boolean | undefined;
1386
+ keepAssignmentIfAccepted?: boolean | undefined;
1387
+ keepAssignmentIfRejected?: boolean | undefined;
1388
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1389
+ transactionId: string;
1390
+ eventId: string;
1391
+ type?: "VALIDATE" | undefined;
1392
+ createdAtLocation?: string | null | undefined;
1393
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1394
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1395
+ originalActionId?: string | undefined;
1396
+ keepAssignment?: boolean | undefined;
1397
+ keepAssignmentIfAccepted?: boolean | undefined;
1398
+ keepAssignmentIfRejected?: boolean | undefined;
1399
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1400
+ content: {
1401
+ reason: string;
1402
+ };
1403
+ transactionId: string;
1404
+ eventId: string;
1405
+ type?: "ESCALATE" | undefined;
1406
+ createdAtLocation?: string | null | undefined;
1407
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1408
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1409
+ originalActionId?: string | undefined;
1410
+ keepAssignment?: boolean | undefined;
1411
+ keepAssignmentIfAccepted?: boolean | undefined;
1412
+ keepAssignmentIfRejected?: boolean | undefined;
1413
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1414
+ transactionId: string;
1415
+ eventId: string;
1416
+ type?: "REGISTER" | undefined;
1417
+ createdAtLocation?: string | null | undefined;
1418
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1419
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1420
+ originalActionId?: string | undefined;
1421
+ registrationNumber?: string | undefined;
1422
+ keepAssignment?: boolean | undefined;
1423
+ keepAssignmentIfAccepted?: boolean | undefined;
1424
+ keepAssignmentIfRejected?: boolean | undefined;
1425
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1426
+ transactionId: string;
1427
+ eventId: string;
1428
+ type?: "NOTIFY" | undefined;
1429
+ createdAtLocation?: string | null | undefined;
1430
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1431
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1432
+ originalActionId?: string | undefined;
1433
+ keepAssignment?: boolean | undefined;
1434
+ keepAssignmentIfAccepted?: boolean | undefined;
1435
+ keepAssignmentIfRejected?: boolean | undefined;
1436
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1437
+ transactionId: string;
1438
+ eventId: string;
1439
+ type?: "DECLARE" | undefined;
1440
+ createdAtLocation?: string | null | undefined;
1441
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1442
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1443
+ originalActionId?: string | undefined;
1444
+ keepAssignment?: boolean | undefined;
1445
+ keepAssignmentIfAccepted?: boolean | undefined;
1446
+ keepAssignmentIfRejected?: boolean | undefined;
1447
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1448
+ content: {
1449
+ reason: string;
1450
+ };
1451
+ transactionId: string;
1452
+ eventId: string;
1453
+ type?: "REJECT" | undefined;
1454
+ createdAtLocation?: string | null | undefined;
1455
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1456
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1457
+ originalActionId?: string | undefined;
1458
+ keepAssignment?: boolean | undefined;
1459
+ keepAssignmentIfAccepted?: boolean | undefined;
1460
+ keepAssignmentIfRejected?: boolean | undefined;
1461
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1462
+ content: {
1463
+ duplicates: {
1464
+ id: string;
1465
+ trackingId: string;
1466
+ }[];
1467
+ };
1468
+ transactionId: string;
1469
+ eventId: string;
1470
+ type?: "DUPLICATE_DETECTED" | undefined;
1471
+ createdAtLocation?: string | null | undefined;
1472
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1473
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1474
+ originalActionId?: string | undefined;
1475
+ keepAssignment?: boolean | undefined;
1476
+ keepAssignmentIfAccepted?: boolean | undefined;
1477
+ keepAssignmentIfRejected?: boolean | undefined;
1478
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1479
+ transactionId: string;
1480
+ eventId: string;
1481
+ type?: "MARK_AS_DUPLICATE" | undefined;
1482
+ content?: {
1483
+ duplicateOf: string;
1484
+ } | undefined;
1485
+ createdAtLocation?: string | null | undefined;
1486
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1487
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1488
+ originalActionId?: string | undefined;
1489
+ keepAssignment?: boolean | undefined;
1490
+ keepAssignmentIfAccepted?: boolean | undefined;
1491
+ keepAssignmentIfRejected?: boolean | undefined;
1492
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1493
+ transactionId: string;
1494
+ eventId: string;
1495
+ type?: "MARK_AS_NOT_DUPLICATE" | undefined;
1496
+ createdAtLocation?: string | null | undefined;
1497
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1498
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1499
+ originalActionId?: string | undefined;
1500
+ keepAssignment?: boolean | undefined;
1501
+ keepAssignmentIfAccepted?: boolean | undefined;
1502
+ keepAssignmentIfRejected?: boolean | undefined;
1503
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1504
+ content: {
1505
+ reason: string;
1506
+ };
1507
+ transactionId: string;
1508
+ eventId: string;
1509
+ type?: "ARCHIVE" | undefined;
1510
+ createdAtLocation?: string | null | undefined;
1511
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1512
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1513
+ originalActionId?: string | undefined;
1514
+ keepAssignment?: boolean | undefined;
1515
+ keepAssignmentIfAccepted?: boolean | undefined;
1516
+ keepAssignmentIfRejected?: boolean | undefined;
1517
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1518
+ type: "ASSIGN";
1519
+ transactionId: string;
1520
+ assignedTo: string;
1521
+ eventId: string;
1522
+ createdAtLocation?: string | null | undefined;
1523
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1524
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1525
+ originalActionId?: string | undefined;
1526
+ keepAssignment?: boolean | undefined;
1527
+ keepAssignmentIfAccepted?: boolean | undefined;
1528
+ keepAssignmentIfRejected?: boolean | undefined;
1529
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1530
+ transactionId: string;
1531
+ eventId: string;
1532
+ type?: "UNASSIGN" | undefined;
1533
+ createdAtLocation?: string | null | undefined;
1534
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1535
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1536
+ originalActionId?: string | undefined;
1537
+ assignedTo?: null | undefined;
1538
+ keepAssignment?: boolean | undefined;
1539
+ keepAssignmentIfAccepted?: boolean | undefined;
1540
+ keepAssignmentIfRejected?: boolean | undefined;
1541
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1542
+ transactionId: string;
1543
+ eventId: string;
1544
+ type?: "PRINT_CERTIFICATE" | undefined;
1545
+ content?: {
1546
+ templateId?: string | undefined;
1547
+ } | undefined;
1548
+ createdAtLocation?: string | null | undefined;
1549
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1550
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1551
+ originalActionId?: string | undefined;
1552
+ keepAssignment?: boolean | undefined;
1553
+ keepAssignmentIfAccepted?: boolean | undefined;
1554
+ keepAssignmentIfRejected?: boolean | undefined;
1555
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1556
+ transactionId: string;
1557
+ eventId: string;
1558
+ type?: "REQUEST_CORRECTION" | undefined;
1559
+ createdAtLocation?: string | null | undefined;
1560
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1561
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1562
+ originalActionId?: string | undefined;
1563
+ keepAssignment?: boolean | undefined;
1564
+ keepAssignmentIfAccepted?: boolean | undefined;
1565
+ keepAssignmentIfRejected?: boolean | undefined;
1566
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1567
+ content: {
1568
+ reason: string;
1569
+ };
1570
+ transactionId: string;
1571
+ requestId: string;
1572
+ eventId: string;
1573
+ type?: "REJECT_CORRECTION" | undefined;
1574
+ createdAtLocation?: string | null | undefined;
1575
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1576
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1577
+ originalActionId?: string | undefined;
1578
+ keepAssignment?: boolean | undefined;
1579
+ keepAssignmentIfAccepted?: boolean | undefined;
1580
+ keepAssignmentIfRejected?: boolean | undefined;
1581
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1582
+ transactionId: string;
1583
+ requestId: string;
1584
+ eventId: string;
1585
+ type?: "APPROVE_CORRECTION" | undefined;
1586
+ createdAtLocation?: string | null | undefined;
1587
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1588
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1589
+ originalActionId?: string | undefined;
1590
+ keepAssignment?: boolean | undefined;
1591
+ keepAssignmentIfAccepted?: boolean | undefined;
1592
+ keepAssignmentIfRejected?: boolean | undefined;
1593
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1594
+ transactionId: string;
1595
+ eventId: string;
1596
+ type?: "READ" | undefined;
1597
+ createdAtLocation?: string | null | undefined;
1598
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1599
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1600
+ originalActionId?: string | undefined;
1601
+ keepAssignment?: boolean | undefined;
1602
+ keepAssignmentIfAccepted?: boolean | undefined;
1603
+ keepAssignmentIfRejected?: boolean | undefined;
1604
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
1313
1605
  actionId: string;
1314
1606
  };
1315
1607
  output: import("../commons").EventDocument;
1316
1608
  meta: import("trpc-to-openapi").OpenApiMeta;
1317
1609
  }>;
1318
1610
  reject: import("@trpc/server").TRPCMutationProcedure<{
1319
- input: {
1611
+ input: import("zod").input<import("zod").ZodObject<import("zod").objectUtil.extendShape<Pick<{
1612
+ eventId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
1613
+ transactionId: import("zod").ZodString;
1614
+ declaration: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
1615
+ annotation: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
1616
+ originalActionId: import("zod").ZodOptional<import("zod").ZodBranded<import("zod").ZodString, "UUID">>;
1617
+ keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
1618
+ keepAssignmentIfAccepted: import("zod").ZodOptional<import("zod").ZodBoolean>;
1619
+ keepAssignmentIfRejected: import("zod").ZodOptional<import("zod").ZodBoolean>;
1620
+ createdAtLocation: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBranded<import("zod").ZodString, "UUID">>>;
1621
+ }, "eventId" | "transactionId" | "keepAssignment">, {
1622
+ actionId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
1623
+ }>, "strip", import("zod").ZodTypeAny, {
1624
+ eventId: string & import("zod").BRAND<"UUID">;
1625
+ transactionId: string;
1626
+ actionId: string & import("zod").BRAND<"UUID">;
1627
+ keepAssignment?: boolean | undefined;
1628
+ }, {
1320
1629
  eventId: string;
1321
- actionId: string;
1322
1630
  transactionId: string;
1323
- };
1631
+ actionId: string;
1632
+ keepAssignment?: boolean | undefined;
1633
+ }>>;
1324
1634
  output: import("../commons").EventDocument;
1325
1635
  meta: import("trpc-to-openapi").OpenApiMeta;
1326
1636
  }>;
@@ -1356,6 +1666,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1356
1666
  annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1357
1667
  originalActionId?: string | undefined;
1358
1668
  keepAssignment?: boolean | undefined;
1669
+ keepAssignmentIfAccepted?: boolean | undefined;
1670
+ keepAssignmentIfRejected?: boolean | undefined;
1359
1671
  };
1360
1672
  output: {
1361
1673
  type: string;
@@ -1435,6 +1747,23 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1435
1747
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
1436
1748
  annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1437
1749
  originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
1750
+ } | {
1751
+ type: "ESCALATE";
1752
+ id: string & import("zod").BRAND<"UUID">;
1753
+ status: "Rejected" | "Requested" | "Accepted";
1754
+ content: {
1755
+ reason: string;
1756
+ };
1757
+ transactionId: string;
1758
+ createdByUserType: "system" | "user";
1759
+ createdAt: string;
1760
+ createdBy: string;
1761
+ createdByRole: string;
1762
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1763
+ createdBySignature?: string | null | undefined;
1764
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
1765
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1766
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
1438
1767
  } | {
1439
1768
  type: "REJECT";
1440
1769
  id: string & import("zod").BRAND<"UUID">;
@@ -1627,7 +1956,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1627
1956
  annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1628
1957
  originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
1629
1958
  } | {
1630
- type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
1959
+ type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "ESCALATE" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
1631
1960
  id: string & import("zod").BRAND<"UUID">;
1632
1961
  status: "Rejected";
1633
1962
  transactionId: string;
@@ -1643,33 +1972,854 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1643
1972
  meta: import("trpc-to-openapi").OpenApiMeta;
1644
1973
  }>;
1645
1974
  accept: import("@trpc/server").TRPCMutationProcedure<{
1646
- input: import("../commons").ActionInput & {
1647
- actionId: string;
1648
- };
1649
- output: import("../commons").EventDocument;
1650
- meta: import("trpc-to-openapi").OpenApiMeta;
1651
- }>;
1652
- reject: import("@trpc/server").TRPCMutationProcedure<{
1653
- input: {
1975
+ input: (Omit<{
1976
+ transactionId: string;
1654
1977
  eventId: string;
1655
- actionId: string;
1978
+ type?: "CREATE" | undefined;
1979
+ createdAtLocation?: string | null | undefined;
1980
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1981
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1982
+ originalActionId?: string | undefined;
1983
+ keepAssignment?: boolean | undefined;
1984
+ keepAssignmentIfAccepted?: boolean | undefined;
1985
+ keepAssignmentIfRejected?: boolean | undefined;
1986
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1656
1987
  transactionId: string;
1657
- };
1658
- output: import("../commons").EventDocument;
1659
- meta: import("trpc-to-openapi").OpenApiMeta;
1660
- }>;
1661
- }>>;
1662
- validate: import("@trpc/server").TRPCBuiltRouter<{
1663
- ctx: {
1664
- user: {
1665
- type: "user";
1666
- id: string;
1667
- role: string;
1668
- primaryOfficeId: string & import("zod").BRAND<"UUID">;
1669
- signature?: string | undefined;
1670
- } | {
1671
- type: "system";
1672
- id: string;
1988
+ eventId: string;
1989
+ type?: "VALIDATE" | undefined;
1990
+ createdAtLocation?: string | null | undefined;
1991
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1992
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1993
+ originalActionId?: string | undefined;
1994
+ keepAssignment?: boolean | undefined;
1995
+ keepAssignmentIfAccepted?: boolean | undefined;
1996
+ keepAssignmentIfRejected?: boolean | undefined;
1997
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1998
+ content: {
1999
+ reason: string;
2000
+ };
2001
+ transactionId: string;
2002
+ eventId: string;
2003
+ type?: "ESCALATE" | undefined;
2004
+ createdAtLocation?: string | null | undefined;
2005
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2006
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2007
+ originalActionId?: string | undefined;
2008
+ keepAssignment?: boolean | undefined;
2009
+ keepAssignmentIfAccepted?: boolean | undefined;
2010
+ keepAssignmentIfRejected?: boolean | undefined;
2011
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2012
+ transactionId: string;
2013
+ eventId: string;
2014
+ type?: "REGISTER" | undefined;
2015
+ createdAtLocation?: string | null | undefined;
2016
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2017
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2018
+ originalActionId?: string | undefined;
2019
+ registrationNumber?: string | undefined;
2020
+ keepAssignment?: boolean | undefined;
2021
+ keepAssignmentIfAccepted?: boolean | undefined;
2022
+ keepAssignmentIfRejected?: boolean | undefined;
2023
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2024
+ transactionId: string;
2025
+ eventId: string;
2026
+ type?: "NOTIFY" | undefined;
2027
+ createdAtLocation?: string | null | undefined;
2028
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2029
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2030
+ originalActionId?: string | undefined;
2031
+ keepAssignment?: boolean | undefined;
2032
+ keepAssignmentIfAccepted?: boolean | undefined;
2033
+ keepAssignmentIfRejected?: boolean | undefined;
2034
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2035
+ transactionId: string;
2036
+ eventId: string;
2037
+ type?: "DECLARE" | undefined;
2038
+ createdAtLocation?: string | null | undefined;
2039
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2040
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2041
+ originalActionId?: string | undefined;
2042
+ keepAssignment?: boolean | undefined;
2043
+ keepAssignmentIfAccepted?: boolean | undefined;
2044
+ keepAssignmentIfRejected?: boolean | undefined;
2045
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2046
+ content: {
2047
+ reason: string;
2048
+ };
2049
+ transactionId: string;
2050
+ eventId: string;
2051
+ type?: "REJECT" | undefined;
2052
+ createdAtLocation?: string | null | undefined;
2053
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2054
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2055
+ originalActionId?: string | undefined;
2056
+ keepAssignment?: boolean | undefined;
2057
+ keepAssignmentIfAccepted?: boolean | undefined;
2058
+ keepAssignmentIfRejected?: boolean | undefined;
2059
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2060
+ content: {
2061
+ duplicates: {
2062
+ id: string;
2063
+ trackingId: string;
2064
+ }[];
2065
+ };
2066
+ transactionId: string;
2067
+ eventId: string;
2068
+ type?: "DUPLICATE_DETECTED" | undefined;
2069
+ createdAtLocation?: string | null | undefined;
2070
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2071
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2072
+ originalActionId?: string | undefined;
2073
+ keepAssignment?: boolean | undefined;
2074
+ keepAssignmentIfAccepted?: boolean | undefined;
2075
+ keepAssignmentIfRejected?: boolean | undefined;
2076
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2077
+ transactionId: string;
2078
+ eventId: string;
2079
+ type?: "MARK_AS_DUPLICATE" | undefined;
2080
+ content?: {
2081
+ duplicateOf: string;
2082
+ } | undefined;
2083
+ createdAtLocation?: string | null | undefined;
2084
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2085
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2086
+ originalActionId?: string | undefined;
2087
+ keepAssignment?: boolean | undefined;
2088
+ keepAssignmentIfAccepted?: boolean | undefined;
2089
+ keepAssignmentIfRejected?: boolean | undefined;
2090
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2091
+ transactionId: string;
2092
+ eventId: string;
2093
+ type?: "MARK_AS_NOT_DUPLICATE" | undefined;
2094
+ createdAtLocation?: string | null | undefined;
2095
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2096
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2097
+ originalActionId?: string | undefined;
2098
+ keepAssignment?: boolean | undefined;
2099
+ keepAssignmentIfAccepted?: boolean | undefined;
2100
+ keepAssignmentIfRejected?: boolean | undefined;
2101
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2102
+ content: {
2103
+ reason: string;
2104
+ };
2105
+ transactionId: string;
2106
+ eventId: string;
2107
+ type?: "ARCHIVE" | undefined;
2108
+ createdAtLocation?: string | null | undefined;
2109
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2110
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2111
+ originalActionId?: string | undefined;
2112
+ keepAssignment?: boolean | undefined;
2113
+ keepAssignmentIfAccepted?: boolean | undefined;
2114
+ keepAssignmentIfRejected?: boolean | undefined;
2115
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2116
+ type: "ASSIGN";
2117
+ transactionId: string;
2118
+ assignedTo: string;
2119
+ eventId: string;
2120
+ createdAtLocation?: string | null | undefined;
2121
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2122
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2123
+ originalActionId?: string | undefined;
2124
+ keepAssignment?: boolean | undefined;
2125
+ keepAssignmentIfAccepted?: boolean | undefined;
2126
+ keepAssignmentIfRejected?: boolean | undefined;
2127
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2128
+ transactionId: string;
2129
+ eventId: string;
2130
+ type?: "UNASSIGN" | undefined;
2131
+ createdAtLocation?: string | null | undefined;
2132
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2133
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2134
+ originalActionId?: string | undefined;
2135
+ assignedTo?: null | undefined;
2136
+ keepAssignment?: boolean | undefined;
2137
+ keepAssignmentIfAccepted?: boolean | undefined;
2138
+ keepAssignmentIfRejected?: boolean | undefined;
2139
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2140
+ transactionId: string;
2141
+ eventId: string;
2142
+ type?: "PRINT_CERTIFICATE" | undefined;
2143
+ content?: {
2144
+ templateId?: string | undefined;
2145
+ } | undefined;
2146
+ createdAtLocation?: string | null | undefined;
2147
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2148
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2149
+ originalActionId?: string | undefined;
2150
+ keepAssignment?: boolean | undefined;
2151
+ keepAssignmentIfAccepted?: boolean | undefined;
2152
+ keepAssignmentIfRejected?: boolean | undefined;
2153
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2154
+ transactionId: string;
2155
+ eventId: string;
2156
+ type?: "REQUEST_CORRECTION" | undefined;
2157
+ createdAtLocation?: string | null | undefined;
2158
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2159
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2160
+ originalActionId?: string | undefined;
2161
+ keepAssignment?: boolean | undefined;
2162
+ keepAssignmentIfAccepted?: boolean | undefined;
2163
+ keepAssignmentIfRejected?: boolean | undefined;
2164
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2165
+ content: {
2166
+ reason: string;
2167
+ };
2168
+ transactionId: string;
2169
+ requestId: string;
2170
+ eventId: string;
2171
+ type?: "REJECT_CORRECTION" | undefined;
2172
+ createdAtLocation?: string | null | undefined;
2173
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2174
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2175
+ originalActionId?: string | undefined;
2176
+ keepAssignment?: boolean | undefined;
2177
+ keepAssignmentIfAccepted?: boolean | undefined;
2178
+ keepAssignmentIfRejected?: boolean | undefined;
2179
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2180
+ transactionId: string;
2181
+ requestId: string;
2182
+ eventId: string;
2183
+ type?: "APPROVE_CORRECTION" | undefined;
2184
+ createdAtLocation?: string | null | undefined;
2185
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2186
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2187
+ originalActionId?: string | undefined;
2188
+ keepAssignment?: boolean | undefined;
2189
+ keepAssignmentIfAccepted?: boolean | undefined;
2190
+ keepAssignmentIfRejected?: boolean | undefined;
2191
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2192
+ transactionId: string;
2193
+ eventId: string;
2194
+ type?: "READ" | undefined;
2195
+ createdAtLocation?: string | null | undefined;
2196
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2197
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2198
+ originalActionId?: string | undefined;
2199
+ keepAssignment?: boolean | undefined;
2200
+ keepAssignmentIfAccepted?: boolean | undefined;
2201
+ keepAssignmentIfRejected?: boolean | undefined;
2202
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
2203
+ actionId: string;
2204
+ };
2205
+ output: import("../commons").EventDocument;
2206
+ meta: import("trpc-to-openapi").OpenApiMeta;
2207
+ }>;
2208
+ reject: import("@trpc/server").TRPCMutationProcedure<{
2209
+ input: import("zod").input<import("zod").ZodObject<import("zod").objectUtil.extendShape<Pick<{
2210
+ eventId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
2211
+ transactionId: import("zod").ZodString;
2212
+ declaration: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
2213
+ annotation: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
2214
+ originalActionId: import("zod").ZodOptional<import("zod").ZodBranded<import("zod").ZodString, "UUID">>;
2215
+ keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
2216
+ keepAssignmentIfAccepted: import("zod").ZodOptional<import("zod").ZodBoolean>;
2217
+ keepAssignmentIfRejected: import("zod").ZodOptional<import("zod").ZodBoolean>;
2218
+ createdAtLocation: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBranded<import("zod").ZodString, "UUID">>>;
2219
+ }, "eventId" | "transactionId" | "keepAssignment">, {
2220
+ actionId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
2221
+ }>, "strip", import("zod").ZodTypeAny, {
2222
+ eventId: string & import("zod").BRAND<"UUID">;
2223
+ transactionId: string;
2224
+ actionId: string & import("zod").BRAND<"UUID">;
2225
+ keepAssignment?: boolean | undefined;
2226
+ }, {
2227
+ eventId: string;
2228
+ transactionId: string;
2229
+ actionId: string;
2230
+ keepAssignment?: boolean | undefined;
2231
+ }>>;
2232
+ output: import("../commons").EventDocument;
2233
+ meta: import("trpc-to-openapi").OpenApiMeta;
2234
+ }>;
2235
+ }>>;
2236
+ validate: import("@trpc/server").TRPCBuiltRouter<{
2237
+ ctx: {
2238
+ user: {
2239
+ type: "user";
2240
+ id: string;
2241
+ role: string;
2242
+ primaryOfficeId: string & import("zod").BRAND<"UUID">;
2243
+ signature?: string | undefined;
2244
+ } | {
2245
+ type: "system";
2246
+ id: string;
2247
+ role: "HEALTH" | "NATIONAL_ID" | "RECORD_SEARCH" | "REINDEX" | "WEBHOOK" | "IMPORT_EXPORT";
2248
+ primaryOfficeId?: undefined;
2249
+ signature?: undefined;
2250
+ };
2251
+ token: `Bearer ${string}`;
2252
+ };
2253
+ meta: import("trpc-to-openapi").OpenApiMeta;
2254
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
2255
+ transformer: true;
2256
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2257
+ request: import("@trpc/server").TRPCMutationProcedure<{
2258
+ input: import("../commons").ActionInput;
2259
+ output: import("../commons").EventDocument;
2260
+ meta: import("trpc-to-openapi").OpenApiMeta;
2261
+ }>;
2262
+ accept: import("@trpc/server").TRPCMutationProcedure<{
2263
+ input: (Omit<{
2264
+ transactionId: string;
2265
+ eventId: string;
2266
+ type?: "CREATE" | undefined;
2267
+ createdAtLocation?: string | null | undefined;
2268
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2269
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2270
+ originalActionId?: string | undefined;
2271
+ keepAssignment?: boolean | undefined;
2272
+ keepAssignmentIfAccepted?: boolean | undefined;
2273
+ keepAssignmentIfRejected?: boolean | undefined;
2274
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2275
+ transactionId: string;
2276
+ eventId: string;
2277
+ type?: "VALIDATE" | undefined;
2278
+ createdAtLocation?: string | null | undefined;
2279
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2280
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2281
+ originalActionId?: string | undefined;
2282
+ keepAssignment?: boolean | undefined;
2283
+ keepAssignmentIfAccepted?: boolean | undefined;
2284
+ keepAssignmentIfRejected?: boolean | undefined;
2285
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2286
+ content: {
2287
+ reason: string;
2288
+ };
2289
+ transactionId: string;
2290
+ eventId: string;
2291
+ type?: "ESCALATE" | undefined;
2292
+ createdAtLocation?: string | null | undefined;
2293
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2294
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2295
+ originalActionId?: string | undefined;
2296
+ keepAssignment?: boolean | undefined;
2297
+ keepAssignmentIfAccepted?: boolean | undefined;
2298
+ keepAssignmentIfRejected?: boolean | undefined;
2299
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2300
+ transactionId: string;
2301
+ eventId: string;
2302
+ type?: "REGISTER" | undefined;
2303
+ createdAtLocation?: string | null | undefined;
2304
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2305
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2306
+ originalActionId?: string | undefined;
2307
+ registrationNumber?: string | undefined;
2308
+ keepAssignment?: boolean | undefined;
2309
+ keepAssignmentIfAccepted?: boolean | undefined;
2310
+ keepAssignmentIfRejected?: boolean | undefined;
2311
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2312
+ transactionId: string;
2313
+ eventId: string;
2314
+ type?: "NOTIFY" | undefined;
2315
+ createdAtLocation?: string | null | undefined;
2316
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2317
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2318
+ originalActionId?: string | undefined;
2319
+ keepAssignment?: boolean | undefined;
2320
+ keepAssignmentIfAccepted?: boolean | undefined;
2321
+ keepAssignmentIfRejected?: boolean | undefined;
2322
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2323
+ transactionId: string;
2324
+ eventId: string;
2325
+ type?: "DECLARE" | undefined;
2326
+ createdAtLocation?: string | null | undefined;
2327
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2328
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2329
+ originalActionId?: string | undefined;
2330
+ keepAssignment?: boolean | undefined;
2331
+ keepAssignmentIfAccepted?: boolean | undefined;
2332
+ keepAssignmentIfRejected?: boolean | undefined;
2333
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2334
+ content: {
2335
+ reason: string;
2336
+ };
2337
+ transactionId: string;
2338
+ eventId: string;
2339
+ type?: "REJECT" | undefined;
2340
+ createdAtLocation?: string | null | undefined;
2341
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2342
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2343
+ originalActionId?: string | undefined;
2344
+ keepAssignment?: boolean | undefined;
2345
+ keepAssignmentIfAccepted?: boolean | undefined;
2346
+ keepAssignmentIfRejected?: boolean | undefined;
2347
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2348
+ content: {
2349
+ duplicates: {
2350
+ id: string;
2351
+ trackingId: string;
2352
+ }[];
2353
+ };
2354
+ transactionId: string;
2355
+ eventId: string;
2356
+ type?: "DUPLICATE_DETECTED" | undefined;
2357
+ createdAtLocation?: string | null | undefined;
2358
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2359
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2360
+ originalActionId?: string | undefined;
2361
+ keepAssignment?: boolean | undefined;
2362
+ keepAssignmentIfAccepted?: boolean | undefined;
2363
+ keepAssignmentIfRejected?: boolean | undefined;
2364
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2365
+ transactionId: string;
2366
+ eventId: string;
2367
+ type?: "MARK_AS_DUPLICATE" | undefined;
2368
+ content?: {
2369
+ duplicateOf: string;
2370
+ } | undefined;
2371
+ createdAtLocation?: string | null | undefined;
2372
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2373
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2374
+ originalActionId?: string | undefined;
2375
+ keepAssignment?: boolean | undefined;
2376
+ keepAssignmentIfAccepted?: boolean | undefined;
2377
+ keepAssignmentIfRejected?: boolean | undefined;
2378
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2379
+ transactionId: string;
2380
+ eventId: string;
2381
+ type?: "MARK_AS_NOT_DUPLICATE" | undefined;
2382
+ createdAtLocation?: string | null | undefined;
2383
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2384
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2385
+ originalActionId?: string | undefined;
2386
+ keepAssignment?: boolean | undefined;
2387
+ keepAssignmentIfAccepted?: boolean | undefined;
2388
+ keepAssignmentIfRejected?: boolean | undefined;
2389
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2390
+ content: {
2391
+ reason: string;
2392
+ };
2393
+ transactionId: string;
2394
+ eventId: string;
2395
+ type?: "ARCHIVE" | undefined;
2396
+ createdAtLocation?: string | null | undefined;
2397
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2398
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2399
+ originalActionId?: string | undefined;
2400
+ keepAssignment?: boolean | undefined;
2401
+ keepAssignmentIfAccepted?: boolean | undefined;
2402
+ keepAssignmentIfRejected?: boolean | undefined;
2403
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2404
+ type: "ASSIGN";
2405
+ transactionId: string;
2406
+ assignedTo: string;
2407
+ eventId: string;
2408
+ createdAtLocation?: string | null | undefined;
2409
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2410
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2411
+ originalActionId?: string | undefined;
2412
+ keepAssignment?: boolean | undefined;
2413
+ keepAssignmentIfAccepted?: boolean | undefined;
2414
+ keepAssignmentIfRejected?: boolean | undefined;
2415
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2416
+ transactionId: string;
2417
+ eventId: string;
2418
+ type?: "UNASSIGN" | undefined;
2419
+ createdAtLocation?: string | null | undefined;
2420
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2421
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2422
+ originalActionId?: string | undefined;
2423
+ assignedTo?: null | undefined;
2424
+ keepAssignment?: boolean | undefined;
2425
+ keepAssignmentIfAccepted?: boolean | undefined;
2426
+ keepAssignmentIfRejected?: boolean | undefined;
2427
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2428
+ transactionId: string;
2429
+ eventId: string;
2430
+ type?: "PRINT_CERTIFICATE" | undefined;
2431
+ content?: {
2432
+ templateId?: string | undefined;
2433
+ } | undefined;
2434
+ createdAtLocation?: string | null | undefined;
2435
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2436
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2437
+ originalActionId?: string | undefined;
2438
+ keepAssignment?: boolean | undefined;
2439
+ keepAssignmentIfAccepted?: boolean | undefined;
2440
+ keepAssignmentIfRejected?: boolean | undefined;
2441
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2442
+ transactionId: string;
2443
+ eventId: string;
2444
+ type?: "REQUEST_CORRECTION" | undefined;
2445
+ createdAtLocation?: string | null | undefined;
2446
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2447
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2448
+ originalActionId?: string | undefined;
2449
+ keepAssignment?: boolean | undefined;
2450
+ keepAssignmentIfAccepted?: boolean | undefined;
2451
+ keepAssignmentIfRejected?: boolean | undefined;
2452
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2453
+ content: {
2454
+ reason: string;
2455
+ };
2456
+ transactionId: string;
2457
+ requestId: string;
2458
+ eventId: string;
2459
+ type?: "REJECT_CORRECTION" | undefined;
2460
+ createdAtLocation?: string | null | undefined;
2461
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2462
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2463
+ originalActionId?: string | undefined;
2464
+ keepAssignment?: boolean | undefined;
2465
+ keepAssignmentIfAccepted?: boolean | undefined;
2466
+ keepAssignmentIfRejected?: boolean | undefined;
2467
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2468
+ transactionId: string;
2469
+ requestId: string;
2470
+ eventId: string;
2471
+ type?: "APPROVE_CORRECTION" | undefined;
2472
+ createdAtLocation?: string | null | undefined;
2473
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2474
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2475
+ originalActionId?: string | undefined;
2476
+ keepAssignment?: boolean | undefined;
2477
+ keepAssignmentIfAccepted?: boolean | undefined;
2478
+ keepAssignmentIfRejected?: boolean | undefined;
2479
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2480
+ transactionId: string;
2481
+ eventId: string;
2482
+ type?: "READ" | undefined;
2483
+ createdAtLocation?: string | null | undefined;
2484
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2485
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2486
+ originalActionId?: string | undefined;
2487
+ keepAssignment?: boolean | undefined;
2488
+ keepAssignmentIfAccepted?: boolean | undefined;
2489
+ keepAssignmentIfRejected?: boolean | undefined;
2490
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
2491
+ actionId: string;
2492
+ };
2493
+ output: import("../commons").EventDocument;
2494
+ meta: import("trpc-to-openapi").OpenApiMeta;
2495
+ }>;
2496
+ reject: import("@trpc/server").TRPCMutationProcedure<{
2497
+ input: import("zod").input<import("zod").ZodObject<import("zod").objectUtil.extendShape<Pick<{
2498
+ eventId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
2499
+ transactionId: import("zod").ZodString;
2500
+ declaration: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
2501
+ annotation: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
2502
+ originalActionId: import("zod").ZodOptional<import("zod").ZodBranded<import("zod").ZodString, "UUID">>;
2503
+ keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
2504
+ keepAssignmentIfAccepted: import("zod").ZodOptional<import("zod").ZodBoolean>;
2505
+ keepAssignmentIfRejected: import("zod").ZodOptional<import("zod").ZodBoolean>;
2506
+ createdAtLocation: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBranded<import("zod").ZodString, "UUID">>>;
2507
+ }, "eventId" | "transactionId" | "keepAssignment">, {
2508
+ actionId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
2509
+ }>, "strip", import("zod").ZodTypeAny, {
2510
+ eventId: string & import("zod").BRAND<"UUID">;
2511
+ transactionId: string;
2512
+ actionId: string & import("zod").BRAND<"UUID">;
2513
+ keepAssignment?: boolean | undefined;
2514
+ }, {
2515
+ eventId: string;
2516
+ transactionId: string;
2517
+ actionId: string;
2518
+ keepAssignment?: boolean | undefined;
2519
+ }>>;
2520
+ output: import("../commons").EventDocument;
2521
+ meta: import("trpc-to-openapi").OpenApiMeta;
2522
+ }>;
2523
+ }>>;
2524
+ reject: import("@trpc/server").TRPCBuiltRouter<{
2525
+ ctx: {
2526
+ user: {
2527
+ type: "user";
2528
+ id: string;
2529
+ role: string;
2530
+ primaryOfficeId: string & import("zod").BRAND<"UUID">;
2531
+ signature?: string | undefined;
2532
+ } | {
2533
+ type: "system";
2534
+ id: string;
2535
+ role: "HEALTH" | "NATIONAL_ID" | "RECORD_SEARCH" | "REINDEX" | "WEBHOOK" | "IMPORT_EXPORT";
2536
+ primaryOfficeId?: undefined;
2537
+ signature?: undefined;
2538
+ };
2539
+ token: `Bearer ${string}`;
2540
+ };
2541
+ meta: import("trpc-to-openapi").OpenApiMeta;
2542
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
2543
+ transformer: true;
2544
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2545
+ request: import("@trpc/server").TRPCMutationProcedure<{
2546
+ input: import("../commons").ActionInput;
2547
+ output: import("../commons").EventDocument;
2548
+ meta: import("trpc-to-openapi").OpenApiMeta;
2549
+ }>;
2550
+ accept: import("@trpc/server").TRPCMutationProcedure<{
2551
+ input: (Omit<{
2552
+ transactionId: string;
2553
+ eventId: string;
2554
+ type?: "CREATE" | undefined;
2555
+ createdAtLocation?: string | null | undefined;
2556
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2557
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2558
+ originalActionId?: string | undefined;
2559
+ keepAssignment?: boolean | undefined;
2560
+ keepAssignmentIfAccepted?: boolean | undefined;
2561
+ keepAssignmentIfRejected?: boolean | undefined;
2562
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2563
+ transactionId: string;
2564
+ eventId: string;
2565
+ type?: "VALIDATE" | undefined;
2566
+ createdAtLocation?: string | null | undefined;
2567
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2568
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2569
+ originalActionId?: string | undefined;
2570
+ keepAssignment?: boolean | undefined;
2571
+ keepAssignmentIfAccepted?: boolean | undefined;
2572
+ keepAssignmentIfRejected?: boolean | undefined;
2573
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2574
+ content: {
2575
+ reason: string;
2576
+ };
2577
+ transactionId: string;
2578
+ eventId: string;
2579
+ type?: "ESCALATE" | undefined;
2580
+ createdAtLocation?: string | null | undefined;
2581
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2582
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2583
+ originalActionId?: string | undefined;
2584
+ keepAssignment?: boolean | undefined;
2585
+ keepAssignmentIfAccepted?: boolean | undefined;
2586
+ keepAssignmentIfRejected?: boolean | undefined;
2587
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2588
+ transactionId: string;
2589
+ eventId: string;
2590
+ type?: "REGISTER" | undefined;
2591
+ createdAtLocation?: string | null | undefined;
2592
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2593
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2594
+ originalActionId?: string | undefined;
2595
+ registrationNumber?: string | undefined;
2596
+ keepAssignment?: boolean | undefined;
2597
+ keepAssignmentIfAccepted?: boolean | undefined;
2598
+ keepAssignmentIfRejected?: boolean | undefined;
2599
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2600
+ transactionId: string;
2601
+ eventId: string;
2602
+ type?: "NOTIFY" | undefined;
2603
+ createdAtLocation?: string | null | undefined;
2604
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2605
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2606
+ originalActionId?: string | undefined;
2607
+ keepAssignment?: boolean | undefined;
2608
+ keepAssignmentIfAccepted?: boolean | undefined;
2609
+ keepAssignmentIfRejected?: boolean | undefined;
2610
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2611
+ transactionId: string;
2612
+ eventId: string;
2613
+ type?: "DECLARE" | undefined;
2614
+ createdAtLocation?: string | null | undefined;
2615
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2616
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2617
+ originalActionId?: string | undefined;
2618
+ keepAssignment?: boolean | undefined;
2619
+ keepAssignmentIfAccepted?: boolean | undefined;
2620
+ keepAssignmentIfRejected?: boolean | undefined;
2621
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2622
+ content: {
2623
+ reason: string;
2624
+ };
2625
+ transactionId: string;
2626
+ eventId: string;
2627
+ type?: "REJECT" | undefined;
2628
+ createdAtLocation?: string | null | undefined;
2629
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2630
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2631
+ originalActionId?: string | undefined;
2632
+ keepAssignment?: boolean | undefined;
2633
+ keepAssignmentIfAccepted?: boolean | undefined;
2634
+ keepAssignmentIfRejected?: boolean | undefined;
2635
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2636
+ content: {
2637
+ duplicates: {
2638
+ id: string;
2639
+ trackingId: string;
2640
+ }[];
2641
+ };
2642
+ transactionId: string;
2643
+ eventId: string;
2644
+ type?: "DUPLICATE_DETECTED" | undefined;
2645
+ createdAtLocation?: string | null | undefined;
2646
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2647
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2648
+ originalActionId?: string | undefined;
2649
+ keepAssignment?: boolean | undefined;
2650
+ keepAssignmentIfAccepted?: boolean | undefined;
2651
+ keepAssignmentIfRejected?: boolean | undefined;
2652
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2653
+ transactionId: string;
2654
+ eventId: string;
2655
+ type?: "MARK_AS_DUPLICATE" | undefined;
2656
+ content?: {
2657
+ duplicateOf: string;
2658
+ } | undefined;
2659
+ createdAtLocation?: string | null | undefined;
2660
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2661
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2662
+ originalActionId?: string | undefined;
2663
+ keepAssignment?: boolean | undefined;
2664
+ keepAssignmentIfAccepted?: boolean | undefined;
2665
+ keepAssignmentIfRejected?: boolean | undefined;
2666
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2667
+ transactionId: string;
2668
+ eventId: string;
2669
+ type?: "MARK_AS_NOT_DUPLICATE" | undefined;
2670
+ createdAtLocation?: string | null | undefined;
2671
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2672
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2673
+ originalActionId?: string | undefined;
2674
+ keepAssignment?: boolean | undefined;
2675
+ keepAssignmentIfAccepted?: boolean | undefined;
2676
+ keepAssignmentIfRejected?: boolean | undefined;
2677
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2678
+ content: {
2679
+ reason: string;
2680
+ };
2681
+ transactionId: string;
2682
+ eventId: string;
2683
+ type?: "ARCHIVE" | undefined;
2684
+ createdAtLocation?: string | null | undefined;
2685
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2686
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2687
+ originalActionId?: string | undefined;
2688
+ keepAssignment?: boolean | undefined;
2689
+ keepAssignmentIfAccepted?: boolean | undefined;
2690
+ keepAssignmentIfRejected?: boolean | undefined;
2691
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2692
+ type: "ASSIGN";
2693
+ transactionId: string;
2694
+ assignedTo: string;
2695
+ eventId: string;
2696
+ createdAtLocation?: string | null | undefined;
2697
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2698
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2699
+ originalActionId?: string | undefined;
2700
+ keepAssignment?: boolean | undefined;
2701
+ keepAssignmentIfAccepted?: boolean | undefined;
2702
+ keepAssignmentIfRejected?: boolean | undefined;
2703
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2704
+ transactionId: string;
2705
+ eventId: string;
2706
+ type?: "UNASSIGN" | undefined;
2707
+ createdAtLocation?: string | null | undefined;
2708
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2709
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2710
+ originalActionId?: string | undefined;
2711
+ assignedTo?: null | undefined;
2712
+ keepAssignment?: boolean | undefined;
2713
+ keepAssignmentIfAccepted?: boolean | undefined;
2714
+ keepAssignmentIfRejected?: boolean | undefined;
2715
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2716
+ transactionId: string;
2717
+ eventId: string;
2718
+ type?: "PRINT_CERTIFICATE" | undefined;
2719
+ content?: {
2720
+ templateId?: string | undefined;
2721
+ } | undefined;
2722
+ createdAtLocation?: string | null | undefined;
2723
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2724
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2725
+ originalActionId?: string | undefined;
2726
+ keepAssignment?: boolean | undefined;
2727
+ keepAssignmentIfAccepted?: boolean | undefined;
2728
+ keepAssignmentIfRejected?: boolean | undefined;
2729
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2730
+ transactionId: string;
2731
+ eventId: string;
2732
+ type?: "REQUEST_CORRECTION" | undefined;
2733
+ createdAtLocation?: string | null | undefined;
2734
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2735
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2736
+ originalActionId?: string | undefined;
2737
+ keepAssignment?: boolean | undefined;
2738
+ keepAssignmentIfAccepted?: boolean | undefined;
2739
+ keepAssignmentIfRejected?: boolean | undefined;
2740
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2741
+ content: {
2742
+ reason: string;
2743
+ };
2744
+ transactionId: string;
2745
+ requestId: string;
2746
+ eventId: string;
2747
+ type?: "REJECT_CORRECTION" | undefined;
2748
+ createdAtLocation?: string | null | undefined;
2749
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2750
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2751
+ originalActionId?: string | undefined;
2752
+ keepAssignment?: boolean | undefined;
2753
+ keepAssignmentIfAccepted?: boolean | undefined;
2754
+ keepAssignmentIfRejected?: boolean | undefined;
2755
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2756
+ transactionId: string;
2757
+ requestId: string;
2758
+ eventId: string;
2759
+ type?: "APPROVE_CORRECTION" | undefined;
2760
+ createdAtLocation?: string | null | undefined;
2761
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2762
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2763
+ originalActionId?: string | undefined;
2764
+ keepAssignment?: boolean | undefined;
2765
+ keepAssignmentIfAccepted?: boolean | undefined;
2766
+ keepAssignmentIfRejected?: boolean | undefined;
2767
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2768
+ transactionId: string;
2769
+ eventId: string;
2770
+ type?: "READ" | undefined;
2771
+ createdAtLocation?: string | null | undefined;
2772
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2773
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2774
+ originalActionId?: string | undefined;
2775
+ keepAssignment?: boolean | undefined;
2776
+ keepAssignmentIfAccepted?: boolean | undefined;
2777
+ keepAssignmentIfRejected?: boolean | undefined;
2778
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
2779
+ actionId: string;
2780
+ };
2781
+ output: import("../commons").EventDocument;
2782
+ meta: import("trpc-to-openapi").OpenApiMeta;
2783
+ }>;
2784
+ reject: import("@trpc/server").TRPCMutationProcedure<{
2785
+ input: import("zod").input<import("zod").ZodObject<import("zod").objectUtil.extendShape<Pick<{
2786
+ eventId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
2787
+ transactionId: import("zod").ZodString;
2788
+ declaration: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
2789
+ annotation: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
2790
+ originalActionId: import("zod").ZodOptional<import("zod").ZodBranded<import("zod").ZodString, "UUID">>;
2791
+ keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
2792
+ keepAssignmentIfAccepted: import("zod").ZodOptional<import("zod").ZodBoolean>;
2793
+ keepAssignmentIfRejected: import("zod").ZodOptional<import("zod").ZodBoolean>;
2794
+ createdAtLocation: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBranded<import("zod").ZodString, "UUID">>>;
2795
+ }, "eventId" | "transactionId" | "keepAssignment">, {
2796
+ actionId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
2797
+ }>, "strip", import("zod").ZodTypeAny, {
2798
+ eventId: string & import("zod").BRAND<"UUID">;
2799
+ transactionId: string;
2800
+ actionId: string & import("zod").BRAND<"UUID">;
2801
+ keepAssignment?: boolean | undefined;
2802
+ }, {
2803
+ eventId: string;
2804
+ transactionId: string;
2805
+ actionId: string;
2806
+ keepAssignment?: boolean | undefined;
2807
+ }>>;
2808
+ output: import("../commons").EventDocument;
2809
+ meta: import("trpc-to-openapi").OpenApiMeta;
2810
+ }>;
2811
+ }>>;
2812
+ archive: import("@trpc/server").TRPCBuiltRouter<{
2813
+ ctx: {
2814
+ user: {
2815
+ type: "user";
2816
+ id: string;
2817
+ role: string;
2818
+ primaryOfficeId: string & import("zod").BRAND<"UUID">;
2819
+ signature?: string | undefined;
2820
+ } | {
2821
+ type: "system";
2822
+ id: string;
1673
2823
  role: "HEALTH" | "NATIONAL_ID" | "RECORD_SEARCH" | "REINDEX" | "WEBHOOK" | "IMPORT_EXPORT";
1674
2824
  primaryOfficeId?: undefined;
1675
2825
  signature?: undefined;
@@ -1686,66 +2836,556 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1686
2836
  meta: import("trpc-to-openapi").OpenApiMeta;
1687
2837
  }>;
1688
2838
  accept: import("@trpc/server").TRPCMutationProcedure<{
1689
- input: import("../commons").ActionInput & {
2839
+ input: (Omit<{
2840
+ transactionId: string;
2841
+ eventId: string;
2842
+ type?: "CREATE" | undefined;
2843
+ createdAtLocation?: string | null | undefined;
2844
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2845
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2846
+ originalActionId?: string | undefined;
2847
+ keepAssignment?: boolean | undefined;
2848
+ keepAssignmentIfAccepted?: boolean | undefined;
2849
+ keepAssignmentIfRejected?: boolean | undefined;
2850
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2851
+ transactionId: string;
2852
+ eventId: string;
2853
+ type?: "VALIDATE" | undefined;
2854
+ createdAtLocation?: string | null | undefined;
2855
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2856
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2857
+ originalActionId?: string | undefined;
2858
+ keepAssignment?: boolean | undefined;
2859
+ keepAssignmentIfAccepted?: boolean | undefined;
2860
+ keepAssignmentIfRejected?: boolean | undefined;
2861
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2862
+ content: {
2863
+ reason: string;
2864
+ };
2865
+ transactionId: string;
2866
+ eventId: string;
2867
+ type?: "ESCALATE" | undefined;
2868
+ createdAtLocation?: string | null | undefined;
2869
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2870
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2871
+ originalActionId?: string | undefined;
2872
+ keepAssignment?: boolean | undefined;
2873
+ keepAssignmentIfAccepted?: boolean | undefined;
2874
+ keepAssignmentIfRejected?: boolean | undefined;
2875
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2876
+ transactionId: string;
2877
+ eventId: string;
2878
+ type?: "REGISTER" | undefined;
2879
+ createdAtLocation?: string | null | undefined;
2880
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2881
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2882
+ originalActionId?: string | undefined;
2883
+ registrationNumber?: string | undefined;
2884
+ keepAssignment?: boolean | undefined;
2885
+ keepAssignmentIfAccepted?: boolean | undefined;
2886
+ keepAssignmentIfRejected?: boolean | undefined;
2887
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2888
+ transactionId: string;
2889
+ eventId: string;
2890
+ type?: "NOTIFY" | undefined;
2891
+ createdAtLocation?: string | null | undefined;
2892
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2893
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2894
+ originalActionId?: string | undefined;
2895
+ keepAssignment?: boolean | undefined;
2896
+ keepAssignmentIfAccepted?: boolean | undefined;
2897
+ keepAssignmentIfRejected?: boolean | undefined;
2898
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2899
+ transactionId: string;
2900
+ eventId: string;
2901
+ type?: "DECLARE" | undefined;
2902
+ createdAtLocation?: string | null | undefined;
2903
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2904
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2905
+ originalActionId?: string | undefined;
2906
+ keepAssignment?: boolean | undefined;
2907
+ keepAssignmentIfAccepted?: boolean | undefined;
2908
+ keepAssignmentIfRejected?: boolean | undefined;
2909
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2910
+ content: {
2911
+ reason: string;
2912
+ };
2913
+ transactionId: string;
2914
+ eventId: string;
2915
+ type?: "REJECT" | undefined;
2916
+ createdAtLocation?: string | null | undefined;
2917
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2918
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2919
+ originalActionId?: string | undefined;
2920
+ keepAssignment?: boolean | undefined;
2921
+ keepAssignmentIfAccepted?: boolean | undefined;
2922
+ keepAssignmentIfRejected?: boolean | undefined;
2923
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2924
+ content: {
2925
+ duplicates: {
2926
+ id: string;
2927
+ trackingId: string;
2928
+ }[];
2929
+ };
2930
+ transactionId: string;
2931
+ eventId: string;
2932
+ type?: "DUPLICATE_DETECTED" | undefined;
2933
+ createdAtLocation?: string | null | undefined;
2934
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2935
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2936
+ originalActionId?: string | undefined;
2937
+ keepAssignment?: boolean | undefined;
2938
+ keepAssignmentIfAccepted?: boolean | undefined;
2939
+ keepAssignmentIfRejected?: boolean | undefined;
2940
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2941
+ transactionId: string;
2942
+ eventId: string;
2943
+ type?: "MARK_AS_DUPLICATE" | undefined;
2944
+ content?: {
2945
+ duplicateOf: string;
2946
+ } | undefined;
2947
+ createdAtLocation?: string | null | undefined;
2948
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2949
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2950
+ originalActionId?: string | undefined;
2951
+ keepAssignment?: boolean | undefined;
2952
+ keepAssignmentIfAccepted?: boolean | undefined;
2953
+ keepAssignmentIfRejected?: boolean | undefined;
2954
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2955
+ transactionId: string;
2956
+ eventId: string;
2957
+ type?: "MARK_AS_NOT_DUPLICATE" | undefined;
2958
+ createdAtLocation?: string | null | undefined;
2959
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2960
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2961
+ originalActionId?: string | undefined;
2962
+ keepAssignment?: boolean | undefined;
2963
+ keepAssignmentIfAccepted?: boolean | undefined;
2964
+ keepAssignmentIfRejected?: boolean | undefined;
2965
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2966
+ content: {
2967
+ reason: string;
2968
+ };
2969
+ transactionId: string;
2970
+ eventId: string;
2971
+ type?: "ARCHIVE" | undefined;
2972
+ createdAtLocation?: string | null | undefined;
2973
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2974
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2975
+ originalActionId?: string | undefined;
2976
+ keepAssignment?: boolean | undefined;
2977
+ keepAssignmentIfAccepted?: boolean | undefined;
2978
+ keepAssignmentIfRejected?: boolean | undefined;
2979
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2980
+ type: "ASSIGN";
2981
+ transactionId: string;
2982
+ assignedTo: string;
2983
+ eventId: string;
2984
+ createdAtLocation?: string | null | undefined;
2985
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2986
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2987
+ originalActionId?: string | undefined;
2988
+ keepAssignment?: boolean | undefined;
2989
+ keepAssignmentIfAccepted?: boolean | undefined;
2990
+ keepAssignmentIfRejected?: boolean | undefined;
2991
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2992
+ transactionId: string;
2993
+ eventId: string;
2994
+ type?: "UNASSIGN" | undefined;
2995
+ createdAtLocation?: string | null | undefined;
2996
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2997
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2998
+ originalActionId?: string | undefined;
2999
+ assignedTo?: null | undefined;
3000
+ keepAssignment?: boolean | undefined;
3001
+ keepAssignmentIfAccepted?: boolean | undefined;
3002
+ keepAssignmentIfRejected?: boolean | undefined;
3003
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3004
+ transactionId: string;
3005
+ eventId: string;
3006
+ type?: "PRINT_CERTIFICATE" | undefined;
3007
+ content?: {
3008
+ templateId?: string | undefined;
3009
+ } | undefined;
3010
+ createdAtLocation?: string | null | undefined;
3011
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3012
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3013
+ originalActionId?: string | undefined;
3014
+ keepAssignment?: boolean | undefined;
3015
+ keepAssignmentIfAccepted?: boolean | undefined;
3016
+ keepAssignmentIfRejected?: boolean | undefined;
3017
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3018
+ transactionId: string;
3019
+ eventId: string;
3020
+ type?: "REQUEST_CORRECTION" | undefined;
3021
+ createdAtLocation?: string | null | undefined;
3022
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3023
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3024
+ originalActionId?: string | undefined;
3025
+ keepAssignment?: boolean | undefined;
3026
+ keepAssignmentIfAccepted?: boolean | undefined;
3027
+ keepAssignmentIfRejected?: boolean | undefined;
3028
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3029
+ content: {
3030
+ reason: string;
3031
+ };
3032
+ transactionId: string;
3033
+ requestId: string;
3034
+ eventId: string;
3035
+ type?: "REJECT_CORRECTION" | undefined;
3036
+ createdAtLocation?: string | null | undefined;
3037
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3038
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3039
+ originalActionId?: string | undefined;
3040
+ keepAssignment?: boolean | undefined;
3041
+ keepAssignmentIfAccepted?: boolean | undefined;
3042
+ keepAssignmentIfRejected?: boolean | undefined;
3043
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3044
+ transactionId: string;
3045
+ requestId: string;
3046
+ eventId: string;
3047
+ type?: "APPROVE_CORRECTION" | undefined;
3048
+ createdAtLocation?: string | null | undefined;
3049
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3050
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3051
+ originalActionId?: string | undefined;
3052
+ keepAssignment?: boolean | undefined;
3053
+ keepAssignmentIfAccepted?: boolean | undefined;
3054
+ keepAssignmentIfRejected?: boolean | undefined;
3055
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3056
+ transactionId: string;
3057
+ eventId: string;
3058
+ type?: "READ" | undefined;
3059
+ createdAtLocation?: string | null | undefined;
3060
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3061
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3062
+ originalActionId?: string | undefined;
3063
+ keepAssignment?: boolean | undefined;
3064
+ keepAssignmentIfAccepted?: boolean | undefined;
3065
+ keepAssignmentIfRejected?: boolean | undefined;
3066
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
1690
3067
  actionId: string;
1691
3068
  };
1692
3069
  output: import("../commons").EventDocument;
1693
3070
  meta: import("trpc-to-openapi").OpenApiMeta;
1694
3071
  }>;
1695
3072
  reject: import("@trpc/server").TRPCMutationProcedure<{
1696
- input: {
3073
+ input: import("zod").input<import("zod").ZodObject<import("zod").objectUtil.extendShape<Pick<{
3074
+ eventId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
3075
+ transactionId: import("zod").ZodString;
3076
+ declaration: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
3077
+ annotation: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
3078
+ originalActionId: import("zod").ZodOptional<import("zod").ZodBranded<import("zod").ZodString, "UUID">>;
3079
+ keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
3080
+ keepAssignmentIfAccepted: import("zod").ZodOptional<import("zod").ZodBoolean>;
3081
+ keepAssignmentIfRejected: import("zod").ZodOptional<import("zod").ZodBoolean>;
3082
+ createdAtLocation: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBranded<import("zod").ZodString, "UUID">>>;
3083
+ }, "eventId" | "transactionId" | "keepAssignment">, {
3084
+ actionId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
3085
+ }>, "strip", import("zod").ZodTypeAny, {
3086
+ eventId: string & import("zod").BRAND<"UUID">;
3087
+ transactionId: string;
3088
+ actionId: string & import("zod").BRAND<"UUID">;
3089
+ keepAssignment?: boolean | undefined;
3090
+ }, {
3091
+ eventId: string;
3092
+ transactionId: string;
3093
+ actionId: string;
3094
+ keepAssignment?: boolean | undefined;
3095
+ }>>;
3096
+ output: import("../commons").EventDocument;
3097
+ meta: import("trpc-to-openapi").OpenApiMeta;
3098
+ }>;
3099
+ }>>;
3100
+ register: import("@trpc/server").TRPCBuiltRouter<{
3101
+ ctx: {
3102
+ user: {
3103
+ type: "user";
3104
+ id: string;
3105
+ role: string;
3106
+ primaryOfficeId: string & import("zod").BRAND<"UUID">;
3107
+ signature?: string | undefined;
3108
+ } | {
3109
+ type: "system";
3110
+ id: string;
3111
+ role: "HEALTH" | "NATIONAL_ID" | "RECORD_SEARCH" | "REINDEX" | "WEBHOOK" | "IMPORT_EXPORT";
3112
+ primaryOfficeId?: undefined;
3113
+ signature?: undefined;
3114
+ };
3115
+ token: `Bearer ${string}`;
3116
+ };
3117
+ meta: import("trpc-to-openapi").OpenApiMeta;
3118
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
3119
+ transformer: true;
3120
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
3121
+ request: import("@trpc/server").TRPCMutationProcedure<{
3122
+ input: import("../commons").ActionInput;
3123
+ output: import("../commons").EventDocument;
3124
+ meta: import("trpc-to-openapi").OpenApiMeta;
3125
+ }>;
3126
+ accept: import("@trpc/server").TRPCMutationProcedure<{
3127
+ input: (Omit<{
3128
+ transactionId: string;
3129
+ eventId: string;
3130
+ type?: "CREATE" | undefined;
3131
+ createdAtLocation?: string | null | undefined;
3132
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3133
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3134
+ originalActionId?: string | undefined;
3135
+ keepAssignment?: boolean | undefined;
3136
+ keepAssignmentIfAccepted?: boolean | undefined;
3137
+ keepAssignmentIfRejected?: boolean | undefined;
3138
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3139
+ transactionId: string;
3140
+ eventId: string;
3141
+ type?: "VALIDATE" | undefined;
3142
+ createdAtLocation?: string | null | undefined;
3143
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3144
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3145
+ originalActionId?: string | undefined;
3146
+ keepAssignment?: boolean | undefined;
3147
+ keepAssignmentIfAccepted?: boolean | undefined;
3148
+ keepAssignmentIfRejected?: boolean | undefined;
3149
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3150
+ content: {
3151
+ reason: string;
3152
+ };
3153
+ transactionId: string;
3154
+ eventId: string;
3155
+ type?: "ESCALATE" | undefined;
3156
+ createdAtLocation?: string | null | undefined;
3157
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3158
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3159
+ originalActionId?: string | undefined;
3160
+ keepAssignment?: boolean | undefined;
3161
+ keepAssignmentIfAccepted?: boolean | undefined;
3162
+ keepAssignmentIfRejected?: boolean | undefined;
3163
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3164
+ transactionId: string;
3165
+ eventId: string;
3166
+ type?: "REGISTER" | undefined;
3167
+ createdAtLocation?: string | null | undefined;
3168
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3169
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3170
+ originalActionId?: string | undefined;
3171
+ registrationNumber?: string | undefined;
3172
+ keepAssignment?: boolean | undefined;
3173
+ keepAssignmentIfAccepted?: boolean | undefined;
3174
+ keepAssignmentIfRejected?: boolean | undefined;
3175
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3176
+ transactionId: string;
3177
+ eventId: string;
3178
+ type?: "NOTIFY" | undefined;
3179
+ createdAtLocation?: string | null | undefined;
3180
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3181
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3182
+ originalActionId?: string | undefined;
3183
+ keepAssignment?: boolean | undefined;
3184
+ keepAssignmentIfAccepted?: boolean | undefined;
3185
+ keepAssignmentIfRejected?: boolean | undefined;
3186
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3187
+ transactionId: string;
3188
+ eventId: string;
3189
+ type?: "DECLARE" | undefined;
3190
+ createdAtLocation?: string | null | undefined;
3191
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3192
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3193
+ originalActionId?: string | undefined;
3194
+ keepAssignment?: boolean | undefined;
3195
+ keepAssignmentIfAccepted?: boolean | undefined;
3196
+ keepAssignmentIfRejected?: boolean | undefined;
3197
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3198
+ content: {
3199
+ reason: string;
3200
+ };
3201
+ transactionId: string;
3202
+ eventId: string;
3203
+ type?: "REJECT" | undefined;
3204
+ createdAtLocation?: string | null | undefined;
3205
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3206
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3207
+ originalActionId?: string | undefined;
3208
+ keepAssignment?: boolean | undefined;
3209
+ keepAssignmentIfAccepted?: boolean | undefined;
3210
+ keepAssignmentIfRejected?: boolean | undefined;
3211
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3212
+ content: {
3213
+ duplicates: {
3214
+ id: string;
3215
+ trackingId: string;
3216
+ }[];
3217
+ };
3218
+ transactionId: string;
1697
3219
  eventId: string;
1698
- actionId: string;
3220
+ type?: "DUPLICATE_DETECTED" | undefined;
3221
+ createdAtLocation?: string | null | undefined;
3222
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3223
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3224
+ originalActionId?: string | undefined;
3225
+ keepAssignment?: boolean | undefined;
3226
+ keepAssignmentIfAccepted?: boolean | undefined;
3227
+ keepAssignmentIfRejected?: boolean | undefined;
3228
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1699
3229
  transactionId: string;
1700
- };
1701
- output: import("../commons").EventDocument;
1702
- meta: import("trpc-to-openapi").OpenApiMeta;
1703
- }>;
1704
- }>>;
1705
- reject: import("@trpc/server").TRPCBuiltRouter<{
1706
- ctx: {
1707
- user: {
1708
- type: "user";
1709
- id: string;
1710
- role: string;
1711
- primaryOfficeId: string & import("zod").BRAND<"UUID">;
1712
- signature?: string | undefined;
1713
- } | {
1714
- type: "system";
1715
- id: string;
1716
- role: "HEALTH" | "NATIONAL_ID" | "RECORD_SEARCH" | "REINDEX" | "WEBHOOK" | "IMPORT_EXPORT";
1717
- primaryOfficeId?: undefined;
1718
- signature?: undefined;
1719
- };
1720
- token: `Bearer ${string}`;
1721
- };
1722
- meta: import("trpc-to-openapi").OpenApiMeta;
1723
- errorShape: import("@trpc/server").TRPCDefaultErrorShape;
1724
- transformer: true;
1725
- }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1726
- request: import("@trpc/server").TRPCMutationProcedure<{
1727
- input: import("../commons").ActionInput;
1728
- output: import("../commons").EventDocument;
1729
- meta: import("trpc-to-openapi").OpenApiMeta;
1730
- }>;
1731
- accept: import("@trpc/server").TRPCMutationProcedure<{
1732
- input: import("../commons").ActionInput & {
3230
+ eventId: string;
3231
+ type?: "MARK_AS_DUPLICATE" | undefined;
3232
+ content?: {
3233
+ duplicateOf: string;
3234
+ } | undefined;
3235
+ createdAtLocation?: string | null | undefined;
3236
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3237
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3238
+ originalActionId?: string | undefined;
3239
+ keepAssignment?: boolean | undefined;
3240
+ keepAssignmentIfAccepted?: boolean | undefined;
3241
+ keepAssignmentIfRejected?: boolean | undefined;
3242
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3243
+ transactionId: string;
3244
+ eventId: string;
3245
+ type?: "MARK_AS_NOT_DUPLICATE" | undefined;
3246
+ createdAtLocation?: string | null | undefined;
3247
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3248
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3249
+ originalActionId?: string | undefined;
3250
+ keepAssignment?: boolean | undefined;
3251
+ keepAssignmentIfAccepted?: boolean | undefined;
3252
+ keepAssignmentIfRejected?: boolean | undefined;
3253
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3254
+ content: {
3255
+ reason: string;
3256
+ };
3257
+ transactionId: string;
3258
+ eventId: string;
3259
+ type?: "ARCHIVE" | undefined;
3260
+ createdAtLocation?: string | null | undefined;
3261
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3262
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3263
+ originalActionId?: string | undefined;
3264
+ keepAssignment?: boolean | undefined;
3265
+ keepAssignmentIfAccepted?: boolean | undefined;
3266
+ keepAssignmentIfRejected?: boolean | undefined;
3267
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3268
+ type: "ASSIGN";
3269
+ transactionId: string;
3270
+ assignedTo: string;
3271
+ eventId: string;
3272
+ createdAtLocation?: string | null | undefined;
3273
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3274
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3275
+ originalActionId?: string | undefined;
3276
+ keepAssignment?: boolean | undefined;
3277
+ keepAssignmentIfAccepted?: boolean | undefined;
3278
+ keepAssignmentIfRejected?: boolean | undefined;
3279
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3280
+ transactionId: string;
3281
+ eventId: string;
3282
+ type?: "UNASSIGN" | undefined;
3283
+ createdAtLocation?: string | null | undefined;
3284
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3285
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3286
+ originalActionId?: string | undefined;
3287
+ assignedTo?: null | undefined;
3288
+ keepAssignment?: boolean | undefined;
3289
+ keepAssignmentIfAccepted?: boolean | undefined;
3290
+ keepAssignmentIfRejected?: boolean | undefined;
3291
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3292
+ transactionId: string;
3293
+ eventId: string;
3294
+ type?: "PRINT_CERTIFICATE" | undefined;
3295
+ content?: {
3296
+ templateId?: string | undefined;
3297
+ } | undefined;
3298
+ createdAtLocation?: string | null | undefined;
3299
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3300
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3301
+ originalActionId?: string | undefined;
3302
+ keepAssignment?: boolean | undefined;
3303
+ keepAssignmentIfAccepted?: boolean | undefined;
3304
+ keepAssignmentIfRejected?: boolean | undefined;
3305
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3306
+ transactionId: string;
3307
+ eventId: string;
3308
+ type?: "REQUEST_CORRECTION" | undefined;
3309
+ createdAtLocation?: string | null | undefined;
3310
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3311
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3312
+ originalActionId?: string | undefined;
3313
+ keepAssignment?: boolean | undefined;
3314
+ keepAssignmentIfAccepted?: boolean | undefined;
3315
+ keepAssignmentIfRejected?: boolean | undefined;
3316
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3317
+ content: {
3318
+ reason: string;
3319
+ };
3320
+ transactionId: string;
3321
+ requestId: string;
3322
+ eventId: string;
3323
+ type?: "REJECT_CORRECTION" | undefined;
3324
+ createdAtLocation?: string | null | undefined;
3325
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3326
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3327
+ originalActionId?: string | undefined;
3328
+ keepAssignment?: boolean | undefined;
3329
+ keepAssignmentIfAccepted?: boolean | undefined;
3330
+ keepAssignmentIfRejected?: boolean | undefined;
3331
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3332
+ transactionId: string;
3333
+ requestId: string;
3334
+ eventId: string;
3335
+ type?: "APPROVE_CORRECTION" | undefined;
3336
+ createdAtLocation?: string | null | undefined;
3337
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3338
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3339
+ originalActionId?: string | undefined;
3340
+ keepAssignment?: boolean | undefined;
3341
+ keepAssignmentIfAccepted?: boolean | undefined;
3342
+ keepAssignmentIfRejected?: boolean | undefined;
3343
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3344
+ transactionId: string;
3345
+ eventId: string;
3346
+ type?: "READ" | undefined;
3347
+ createdAtLocation?: string | null | undefined;
3348
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3349
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3350
+ originalActionId?: string | undefined;
3351
+ keepAssignment?: boolean | undefined;
3352
+ keepAssignmentIfAccepted?: boolean | undefined;
3353
+ keepAssignmentIfRejected?: boolean | undefined;
3354
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
1733
3355
  actionId: string;
1734
3356
  };
1735
3357
  output: import("../commons").EventDocument;
1736
3358
  meta: import("trpc-to-openapi").OpenApiMeta;
1737
3359
  }>;
1738
3360
  reject: import("@trpc/server").TRPCMutationProcedure<{
1739
- input: {
3361
+ input: import("zod").input<import("zod").ZodObject<import("zod").objectUtil.extendShape<Pick<{
3362
+ eventId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
3363
+ transactionId: import("zod").ZodString;
3364
+ declaration: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
3365
+ annotation: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
3366
+ originalActionId: import("zod").ZodOptional<import("zod").ZodBranded<import("zod").ZodString, "UUID">>;
3367
+ keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
3368
+ keepAssignmentIfAccepted: import("zod").ZodOptional<import("zod").ZodBoolean>;
3369
+ keepAssignmentIfRejected: import("zod").ZodOptional<import("zod").ZodBoolean>;
3370
+ createdAtLocation: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBranded<import("zod").ZodString, "UUID">>>;
3371
+ }, "eventId" | "transactionId" | "keepAssignment">, {
3372
+ actionId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
3373
+ }>, "strip", import("zod").ZodTypeAny, {
3374
+ eventId: string & import("zod").BRAND<"UUID">;
3375
+ transactionId: string;
3376
+ actionId: string & import("zod").BRAND<"UUID">;
3377
+ keepAssignment?: boolean | undefined;
3378
+ }, {
1740
3379
  eventId: string;
1741
- actionId: string;
1742
3380
  transactionId: string;
1743
- };
3381
+ actionId: string;
3382
+ keepAssignment?: boolean | undefined;
3383
+ }>>;
1744
3384
  output: import("../commons").EventDocument;
1745
3385
  meta: import("trpc-to-openapi").OpenApiMeta;
1746
3386
  }>;
1747
3387
  }>>;
1748
- archive: import("@trpc/server").TRPCBuiltRouter<{
3388
+ escalate: import("@trpc/server").TRPCBuiltRouter<{
1749
3389
  ctx: {
1750
3390
  user: {
1751
3391
  type: "user";
@@ -1772,61 +3412,263 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1772
3412
  meta: import("trpc-to-openapi").OpenApiMeta;
1773
3413
  }>;
1774
3414
  accept: import("@trpc/server").TRPCMutationProcedure<{
1775
- input: import("../commons").ActionInput & {
1776
- actionId: string;
1777
- };
1778
- output: import("../commons").EventDocument;
1779
- meta: import("trpc-to-openapi").OpenApiMeta;
1780
- }>;
1781
- reject: import("@trpc/server").TRPCMutationProcedure<{
1782
- input: {
3415
+ input: (Omit<{
3416
+ transactionId: string;
3417
+ eventId: string;
3418
+ type?: "CREATE" | undefined;
3419
+ createdAtLocation?: string | null | undefined;
3420
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3421
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3422
+ originalActionId?: string | undefined;
3423
+ keepAssignment?: boolean | undefined;
3424
+ keepAssignmentIfAccepted?: boolean | undefined;
3425
+ keepAssignmentIfRejected?: boolean | undefined;
3426
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3427
+ transactionId: string;
3428
+ eventId: string;
3429
+ type?: "VALIDATE" | undefined;
3430
+ createdAtLocation?: string | null | undefined;
3431
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3432
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3433
+ originalActionId?: string | undefined;
3434
+ keepAssignment?: boolean | undefined;
3435
+ keepAssignmentIfAccepted?: boolean | undefined;
3436
+ keepAssignmentIfRejected?: boolean | undefined;
3437
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3438
+ content: {
3439
+ reason: string;
3440
+ };
3441
+ transactionId: string;
3442
+ eventId: string;
3443
+ type?: "ESCALATE" | undefined;
3444
+ createdAtLocation?: string | null | undefined;
3445
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3446
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3447
+ originalActionId?: string | undefined;
3448
+ keepAssignment?: boolean | undefined;
3449
+ keepAssignmentIfAccepted?: boolean | undefined;
3450
+ keepAssignmentIfRejected?: boolean | undefined;
3451
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3452
+ transactionId: string;
3453
+ eventId: string;
3454
+ type?: "REGISTER" | undefined;
3455
+ createdAtLocation?: string | null | undefined;
3456
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3457
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3458
+ originalActionId?: string | undefined;
3459
+ registrationNumber?: string | undefined;
3460
+ keepAssignment?: boolean | undefined;
3461
+ keepAssignmentIfAccepted?: boolean | undefined;
3462
+ keepAssignmentIfRejected?: boolean | undefined;
3463
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3464
+ transactionId: string;
3465
+ eventId: string;
3466
+ type?: "NOTIFY" | undefined;
3467
+ createdAtLocation?: string | null | undefined;
3468
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3469
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3470
+ originalActionId?: string | undefined;
3471
+ keepAssignment?: boolean | undefined;
3472
+ keepAssignmentIfAccepted?: boolean | undefined;
3473
+ keepAssignmentIfRejected?: boolean | undefined;
3474
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3475
+ transactionId: string;
3476
+ eventId: string;
3477
+ type?: "DECLARE" | undefined;
3478
+ createdAtLocation?: string | null | undefined;
3479
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3480
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3481
+ originalActionId?: string | undefined;
3482
+ keepAssignment?: boolean | undefined;
3483
+ keepAssignmentIfAccepted?: boolean | undefined;
3484
+ keepAssignmentIfRejected?: boolean | undefined;
3485
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3486
+ content: {
3487
+ reason: string;
3488
+ };
3489
+ transactionId: string;
3490
+ eventId: string;
3491
+ type?: "REJECT" | undefined;
3492
+ createdAtLocation?: string | null | undefined;
3493
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3494
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3495
+ originalActionId?: string | undefined;
3496
+ keepAssignment?: boolean | undefined;
3497
+ keepAssignmentIfAccepted?: boolean | undefined;
3498
+ keepAssignmentIfRejected?: boolean | undefined;
3499
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3500
+ content: {
3501
+ duplicates: {
3502
+ id: string;
3503
+ trackingId: string;
3504
+ }[];
3505
+ };
3506
+ transactionId: string;
3507
+ eventId: string;
3508
+ type?: "DUPLICATE_DETECTED" | undefined;
3509
+ createdAtLocation?: string | null | undefined;
3510
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3511
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3512
+ originalActionId?: string | undefined;
3513
+ keepAssignment?: boolean | undefined;
3514
+ keepAssignmentIfAccepted?: boolean | undefined;
3515
+ keepAssignmentIfRejected?: boolean | undefined;
3516
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3517
+ transactionId: string;
3518
+ eventId: string;
3519
+ type?: "MARK_AS_DUPLICATE" | undefined;
3520
+ content?: {
3521
+ duplicateOf: string;
3522
+ } | undefined;
3523
+ createdAtLocation?: string | null | undefined;
3524
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3525
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3526
+ originalActionId?: string | undefined;
3527
+ keepAssignment?: boolean | undefined;
3528
+ keepAssignmentIfAccepted?: boolean | undefined;
3529
+ keepAssignmentIfRejected?: boolean | undefined;
3530
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3531
+ transactionId: string;
3532
+ eventId: string;
3533
+ type?: "MARK_AS_NOT_DUPLICATE" | undefined;
3534
+ createdAtLocation?: string | null | undefined;
3535
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3536
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3537
+ originalActionId?: string | undefined;
3538
+ keepAssignment?: boolean | undefined;
3539
+ keepAssignmentIfAccepted?: boolean | undefined;
3540
+ keepAssignmentIfRejected?: boolean | undefined;
3541
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3542
+ content: {
3543
+ reason: string;
3544
+ };
3545
+ transactionId: string;
3546
+ eventId: string;
3547
+ type?: "ARCHIVE" | undefined;
3548
+ createdAtLocation?: string | null | undefined;
3549
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3550
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3551
+ originalActionId?: string | undefined;
3552
+ keepAssignment?: boolean | undefined;
3553
+ keepAssignmentIfAccepted?: boolean | undefined;
3554
+ keepAssignmentIfRejected?: boolean | undefined;
3555
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3556
+ type: "ASSIGN";
3557
+ transactionId: string;
3558
+ assignedTo: string;
3559
+ eventId: string;
3560
+ createdAtLocation?: string | null | undefined;
3561
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3562
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3563
+ originalActionId?: string | undefined;
3564
+ keepAssignment?: boolean | undefined;
3565
+ keepAssignmentIfAccepted?: boolean | undefined;
3566
+ keepAssignmentIfRejected?: boolean | undefined;
3567
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3568
+ transactionId: string;
3569
+ eventId: string;
3570
+ type?: "UNASSIGN" | undefined;
3571
+ createdAtLocation?: string | null | undefined;
3572
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3573
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3574
+ originalActionId?: string | undefined;
3575
+ assignedTo?: null | undefined;
3576
+ keepAssignment?: boolean | undefined;
3577
+ keepAssignmentIfAccepted?: boolean | undefined;
3578
+ keepAssignmentIfRejected?: boolean | undefined;
3579
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3580
+ transactionId: string;
3581
+ eventId: string;
3582
+ type?: "PRINT_CERTIFICATE" | undefined;
3583
+ content?: {
3584
+ templateId?: string | undefined;
3585
+ } | undefined;
3586
+ createdAtLocation?: string | null | undefined;
3587
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3588
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3589
+ originalActionId?: string | undefined;
3590
+ keepAssignment?: boolean | undefined;
3591
+ keepAssignmentIfAccepted?: boolean | undefined;
3592
+ keepAssignmentIfRejected?: boolean | undefined;
3593
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3594
+ transactionId: string;
1783
3595
  eventId: string;
1784
- actionId: string;
3596
+ type?: "REQUEST_CORRECTION" | undefined;
3597
+ createdAtLocation?: string | null | undefined;
3598
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3599
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3600
+ originalActionId?: string | undefined;
3601
+ keepAssignment?: boolean | undefined;
3602
+ keepAssignmentIfAccepted?: boolean | undefined;
3603
+ keepAssignmentIfRejected?: boolean | undefined;
3604
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3605
+ content: {
3606
+ reason: string;
3607
+ };
1785
3608
  transactionId: string;
1786
- };
1787
- output: import("../commons").EventDocument;
1788
- meta: import("trpc-to-openapi").OpenApiMeta;
1789
- }>;
1790
- }>>;
1791
- register: import("@trpc/server").TRPCBuiltRouter<{
1792
- ctx: {
1793
- user: {
1794
- type: "user";
1795
- id: string;
1796
- role: string;
1797
- primaryOfficeId: string & import("zod").BRAND<"UUID">;
1798
- signature?: string | undefined;
1799
- } | {
1800
- type: "system";
1801
- id: string;
1802
- role: "HEALTH" | "NATIONAL_ID" | "RECORD_SEARCH" | "REINDEX" | "WEBHOOK" | "IMPORT_EXPORT";
1803
- primaryOfficeId?: undefined;
1804
- signature?: undefined;
1805
- };
1806
- token: `Bearer ${string}`;
1807
- };
1808
- meta: import("trpc-to-openapi").OpenApiMeta;
1809
- errorShape: import("@trpc/server").TRPCDefaultErrorShape;
1810
- transformer: true;
1811
- }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1812
- request: import("@trpc/server").TRPCMutationProcedure<{
1813
- input: import("../commons").ActionInput;
1814
- output: import("../commons").EventDocument;
1815
- meta: import("trpc-to-openapi").OpenApiMeta;
1816
- }>;
1817
- accept: import("@trpc/server").TRPCMutationProcedure<{
1818
- input: import("../commons").ActionInput & {
3609
+ requestId: string;
3610
+ eventId: string;
3611
+ type?: "REJECT_CORRECTION" | undefined;
3612
+ createdAtLocation?: string | null | undefined;
3613
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3614
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3615
+ originalActionId?: string | undefined;
3616
+ keepAssignment?: boolean | undefined;
3617
+ keepAssignmentIfAccepted?: boolean | undefined;
3618
+ keepAssignmentIfRejected?: boolean | undefined;
3619
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3620
+ transactionId: string;
3621
+ requestId: string;
3622
+ eventId: string;
3623
+ type?: "APPROVE_CORRECTION" | undefined;
3624
+ createdAtLocation?: string | null | undefined;
3625
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3626
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3627
+ originalActionId?: string | undefined;
3628
+ keepAssignment?: boolean | undefined;
3629
+ keepAssignmentIfAccepted?: boolean | undefined;
3630
+ keepAssignmentIfRejected?: boolean | undefined;
3631
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3632
+ transactionId: string;
3633
+ eventId: string;
3634
+ type?: "READ" | undefined;
3635
+ createdAtLocation?: string | null | undefined;
3636
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3637
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3638
+ originalActionId?: string | undefined;
3639
+ keepAssignment?: boolean | undefined;
3640
+ keepAssignmentIfAccepted?: boolean | undefined;
3641
+ keepAssignmentIfRejected?: boolean | undefined;
3642
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
1819
3643
  actionId: string;
1820
3644
  };
1821
3645
  output: import("../commons").EventDocument;
1822
3646
  meta: import("trpc-to-openapi").OpenApiMeta;
1823
3647
  }>;
1824
3648
  reject: import("@trpc/server").TRPCMutationProcedure<{
1825
- input: {
3649
+ input: import("zod").input<import("zod").ZodObject<import("zod").objectUtil.extendShape<Pick<{
3650
+ eventId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
3651
+ transactionId: import("zod").ZodString;
3652
+ declaration: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
3653
+ annotation: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
3654
+ originalActionId: import("zod").ZodOptional<import("zod").ZodBranded<import("zod").ZodString, "UUID">>;
3655
+ keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
3656
+ keepAssignmentIfAccepted: import("zod").ZodOptional<import("zod").ZodBoolean>;
3657
+ keepAssignmentIfRejected: import("zod").ZodOptional<import("zod").ZodBoolean>;
3658
+ createdAtLocation: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBranded<import("zod").ZodString, "UUID">>>;
3659
+ }, "eventId" | "transactionId" | "keepAssignment">, {
3660
+ actionId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
3661
+ }>, "strip", import("zod").ZodTypeAny, {
3662
+ eventId: string & import("zod").BRAND<"UUID">;
3663
+ transactionId: string;
3664
+ actionId: string & import("zod").BRAND<"UUID">;
3665
+ keepAssignment?: boolean | undefined;
3666
+ }, {
1826
3667
  eventId: string;
1827
- actionId: string;
1828
3668
  transactionId: string;
1829
- };
3669
+ actionId: string;
3670
+ keepAssignment?: boolean | undefined;
3671
+ }>>;
1830
3672
  output: import("../commons").EventDocument;
1831
3673
  meta: import("trpc-to-openapi").OpenApiMeta;
1832
3674
  }>;
@@ -1858,18 +3700,263 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1858
3700
  meta: import("trpc-to-openapi").OpenApiMeta;
1859
3701
  }>;
1860
3702
  accept: import("@trpc/server").TRPCMutationProcedure<{
1861
- input: import("../commons").ActionInput & {
3703
+ input: (Omit<{
3704
+ transactionId: string;
3705
+ eventId: string;
3706
+ type?: "CREATE" | undefined;
3707
+ createdAtLocation?: string | null | undefined;
3708
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3709
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3710
+ originalActionId?: string | undefined;
3711
+ keepAssignment?: boolean | undefined;
3712
+ keepAssignmentIfAccepted?: boolean | undefined;
3713
+ keepAssignmentIfRejected?: boolean | undefined;
3714
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3715
+ transactionId: string;
3716
+ eventId: string;
3717
+ type?: "VALIDATE" | undefined;
3718
+ createdAtLocation?: string | null | undefined;
3719
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3720
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3721
+ originalActionId?: string | undefined;
3722
+ keepAssignment?: boolean | undefined;
3723
+ keepAssignmentIfAccepted?: boolean | undefined;
3724
+ keepAssignmentIfRejected?: boolean | undefined;
3725
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3726
+ content: {
3727
+ reason: string;
3728
+ };
3729
+ transactionId: string;
3730
+ eventId: string;
3731
+ type?: "ESCALATE" | undefined;
3732
+ createdAtLocation?: string | null | undefined;
3733
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3734
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3735
+ originalActionId?: string | undefined;
3736
+ keepAssignment?: boolean | undefined;
3737
+ keepAssignmentIfAccepted?: boolean | undefined;
3738
+ keepAssignmentIfRejected?: boolean | undefined;
3739
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3740
+ transactionId: string;
3741
+ eventId: string;
3742
+ type?: "REGISTER" | undefined;
3743
+ createdAtLocation?: string | null | undefined;
3744
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3745
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3746
+ originalActionId?: string | undefined;
3747
+ registrationNumber?: string | undefined;
3748
+ keepAssignment?: boolean | undefined;
3749
+ keepAssignmentIfAccepted?: boolean | undefined;
3750
+ keepAssignmentIfRejected?: boolean | undefined;
3751
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3752
+ transactionId: string;
3753
+ eventId: string;
3754
+ type?: "NOTIFY" | undefined;
3755
+ createdAtLocation?: string | null | undefined;
3756
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3757
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3758
+ originalActionId?: string | undefined;
3759
+ keepAssignment?: boolean | undefined;
3760
+ keepAssignmentIfAccepted?: boolean | undefined;
3761
+ keepAssignmentIfRejected?: boolean | undefined;
3762
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3763
+ transactionId: string;
3764
+ eventId: string;
3765
+ type?: "DECLARE" | undefined;
3766
+ createdAtLocation?: string | null | undefined;
3767
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3768
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3769
+ originalActionId?: string | undefined;
3770
+ keepAssignment?: boolean | undefined;
3771
+ keepAssignmentIfAccepted?: boolean | undefined;
3772
+ keepAssignmentIfRejected?: boolean | undefined;
3773
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3774
+ content: {
3775
+ reason: string;
3776
+ };
3777
+ transactionId: string;
3778
+ eventId: string;
3779
+ type?: "REJECT" | undefined;
3780
+ createdAtLocation?: string | null | undefined;
3781
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3782
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3783
+ originalActionId?: string | undefined;
3784
+ keepAssignment?: boolean | undefined;
3785
+ keepAssignmentIfAccepted?: boolean | undefined;
3786
+ keepAssignmentIfRejected?: boolean | undefined;
3787
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3788
+ content: {
3789
+ duplicates: {
3790
+ id: string;
3791
+ trackingId: string;
3792
+ }[];
3793
+ };
3794
+ transactionId: string;
3795
+ eventId: string;
3796
+ type?: "DUPLICATE_DETECTED" | undefined;
3797
+ createdAtLocation?: string | null | undefined;
3798
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3799
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3800
+ originalActionId?: string | undefined;
3801
+ keepAssignment?: boolean | undefined;
3802
+ keepAssignmentIfAccepted?: boolean | undefined;
3803
+ keepAssignmentIfRejected?: boolean | undefined;
3804
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3805
+ transactionId: string;
3806
+ eventId: string;
3807
+ type?: "MARK_AS_DUPLICATE" | undefined;
3808
+ content?: {
3809
+ duplicateOf: string;
3810
+ } | undefined;
3811
+ createdAtLocation?: string | null | undefined;
3812
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3813
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3814
+ originalActionId?: string | undefined;
3815
+ keepAssignment?: boolean | undefined;
3816
+ keepAssignmentIfAccepted?: boolean | undefined;
3817
+ keepAssignmentIfRejected?: boolean | undefined;
3818
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3819
+ transactionId: string;
3820
+ eventId: string;
3821
+ type?: "MARK_AS_NOT_DUPLICATE" | undefined;
3822
+ createdAtLocation?: string | null | undefined;
3823
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3824
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3825
+ originalActionId?: string | undefined;
3826
+ keepAssignment?: boolean | undefined;
3827
+ keepAssignmentIfAccepted?: boolean | undefined;
3828
+ keepAssignmentIfRejected?: boolean | undefined;
3829
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3830
+ content: {
3831
+ reason: string;
3832
+ };
3833
+ transactionId: string;
3834
+ eventId: string;
3835
+ type?: "ARCHIVE" | undefined;
3836
+ createdAtLocation?: string | null | undefined;
3837
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3838
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3839
+ originalActionId?: string | undefined;
3840
+ keepAssignment?: boolean | undefined;
3841
+ keepAssignmentIfAccepted?: boolean | undefined;
3842
+ keepAssignmentIfRejected?: boolean | undefined;
3843
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3844
+ type: "ASSIGN";
3845
+ transactionId: string;
3846
+ assignedTo: string;
3847
+ eventId: string;
3848
+ createdAtLocation?: string | null | undefined;
3849
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3850
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3851
+ originalActionId?: string | undefined;
3852
+ keepAssignment?: boolean | undefined;
3853
+ keepAssignmentIfAccepted?: boolean | undefined;
3854
+ keepAssignmentIfRejected?: boolean | undefined;
3855
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3856
+ transactionId: string;
3857
+ eventId: string;
3858
+ type?: "UNASSIGN" | undefined;
3859
+ createdAtLocation?: string | null | undefined;
3860
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3861
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3862
+ originalActionId?: string | undefined;
3863
+ assignedTo?: null | undefined;
3864
+ keepAssignment?: boolean | undefined;
3865
+ keepAssignmentIfAccepted?: boolean | undefined;
3866
+ keepAssignmentIfRejected?: boolean | undefined;
3867
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3868
+ transactionId: string;
3869
+ eventId: string;
3870
+ type?: "PRINT_CERTIFICATE" | undefined;
3871
+ content?: {
3872
+ templateId?: string | undefined;
3873
+ } | undefined;
3874
+ createdAtLocation?: string | null | undefined;
3875
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3876
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3877
+ originalActionId?: string | undefined;
3878
+ keepAssignment?: boolean | undefined;
3879
+ keepAssignmentIfAccepted?: boolean | undefined;
3880
+ keepAssignmentIfRejected?: boolean | undefined;
3881
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3882
+ transactionId: string;
3883
+ eventId: string;
3884
+ type?: "REQUEST_CORRECTION" | undefined;
3885
+ createdAtLocation?: string | null | undefined;
3886
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3887
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3888
+ originalActionId?: string | undefined;
3889
+ keepAssignment?: boolean | undefined;
3890
+ keepAssignmentIfAccepted?: boolean | undefined;
3891
+ keepAssignmentIfRejected?: boolean | undefined;
3892
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3893
+ content: {
3894
+ reason: string;
3895
+ };
3896
+ transactionId: string;
3897
+ requestId: string;
3898
+ eventId: string;
3899
+ type?: "REJECT_CORRECTION" | undefined;
3900
+ createdAtLocation?: string | null | undefined;
3901
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3902
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3903
+ originalActionId?: string | undefined;
3904
+ keepAssignment?: boolean | undefined;
3905
+ keepAssignmentIfAccepted?: boolean | undefined;
3906
+ keepAssignmentIfRejected?: boolean | undefined;
3907
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3908
+ transactionId: string;
3909
+ requestId: string;
3910
+ eventId: string;
3911
+ type?: "APPROVE_CORRECTION" | undefined;
3912
+ createdAtLocation?: string | null | undefined;
3913
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3914
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3915
+ originalActionId?: string | undefined;
3916
+ keepAssignment?: boolean | undefined;
3917
+ keepAssignmentIfAccepted?: boolean | undefined;
3918
+ keepAssignmentIfRejected?: boolean | undefined;
3919
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3920
+ transactionId: string;
3921
+ eventId: string;
3922
+ type?: "READ" | undefined;
3923
+ createdAtLocation?: string | null | undefined;
3924
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3925
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
3926
+ originalActionId?: string | undefined;
3927
+ keepAssignment?: boolean | undefined;
3928
+ keepAssignmentIfAccepted?: boolean | undefined;
3929
+ keepAssignmentIfRejected?: boolean | undefined;
3930
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
1862
3931
  actionId: string;
1863
3932
  };
1864
3933
  output: import("../commons").EventDocument;
1865
3934
  meta: import("trpc-to-openapi").OpenApiMeta;
1866
3935
  }>;
1867
3936
  reject: import("@trpc/server").TRPCMutationProcedure<{
1868
- input: {
3937
+ input: import("zod").input<import("zod").ZodObject<import("zod").objectUtil.extendShape<Pick<{
3938
+ eventId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
3939
+ transactionId: import("zod").ZodString;
3940
+ declaration: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
3941
+ annotation: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
3942
+ originalActionId: import("zod").ZodOptional<import("zod").ZodBranded<import("zod").ZodString, "UUID">>;
3943
+ keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
3944
+ keepAssignmentIfAccepted: import("zod").ZodOptional<import("zod").ZodBoolean>;
3945
+ keepAssignmentIfRejected: import("zod").ZodOptional<import("zod").ZodBoolean>;
3946
+ createdAtLocation: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBranded<import("zod").ZodString, "UUID">>>;
3947
+ }, "eventId" | "transactionId" | "keepAssignment">, {
3948
+ actionId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
3949
+ }>, "strip", import("zod").ZodTypeAny, {
3950
+ eventId: string & import("zod").BRAND<"UUID">;
3951
+ transactionId: string;
3952
+ actionId: string & import("zod").BRAND<"UUID">;
3953
+ keepAssignment?: boolean | undefined;
3954
+ }, {
1869
3955
  eventId: string;
1870
- actionId: string;
1871
3956
  transactionId: string;
1872
- };
3957
+ actionId: string;
3958
+ keepAssignment?: boolean | undefined;
3959
+ }>>;
1873
3960
  output: import("../commons").EventDocument;
1874
3961
  meta: import("trpc-to-openapi").OpenApiMeta;
1875
3962
  }>;
@@ -1906,6 +3993,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1906
3993
  annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
1907
3994
  originalActionId?: string | undefined;
1908
3995
  keepAssignment?: boolean | undefined;
3996
+ keepAssignmentIfAccepted?: boolean | undefined;
3997
+ keepAssignmentIfRejected?: boolean | undefined;
1909
3998
  };
1910
3999
  output: {
1911
4000
  type: string;
@@ -1985,6 +4074,23 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1985
4074
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
1986
4075
  annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1987
4076
  originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
4077
+ } | {
4078
+ type: "ESCALATE";
4079
+ id: string & import("zod").BRAND<"UUID">;
4080
+ status: "Rejected" | "Requested" | "Accepted";
4081
+ content: {
4082
+ reason: string;
4083
+ };
4084
+ transactionId: string;
4085
+ createdByUserType: "system" | "user";
4086
+ createdAt: string;
4087
+ createdBy: string;
4088
+ createdByRole: string;
4089
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
4090
+ createdBySignature?: string | null | undefined;
4091
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
4092
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
4093
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
1988
4094
  } | {
1989
4095
  type: "REJECT";
1990
4096
  id: string & import("zod").BRAND<"UUID">;
@@ -2177,7 +4283,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2177
4283
  annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
2178
4284
  originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
2179
4285
  } | {
2180
- type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
4286
+ type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "ESCALATE" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
2181
4287
  id: string & import("zod").BRAND<"UUID">;
2182
4288
  status: "Rejected";
2183
4289
  transactionId: string;
@@ -2203,6 +4309,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2203
4309
  originalActionId?: string | undefined;
2204
4310
  assignedTo?: null | undefined;
2205
4311
  keepAssignment?: boolean | undefined;
4312
+ keepAssignmentIfAccepted?: boolean | undefined;
4313
+ keepAssignmentIfRejected?: boolean | undefined;
2206
4314
  };
2207
4315
  output: {
2208
4316
  type: string;
@@ -2282,6 +4390,23 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2282
4390
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
2283
4391
  annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
2284
4392
  originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
4393
+ } | {
4394
+ type: "ESCALATE";
4395
+ id: string & import("zod").BRAND<"UUID">;
4396
+ status: "Rejected" | "Requested" | "Accepted";
4397
+ content: {
4398
+ reason: string;
4399
+ };
4400
+ transactionId: string;
4401
+ createdByUserType: "system" | "user";
4402
+ createdAt: string;
4403
+ createdBy: string;
4404
+ createdByRole: string;
4405
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
4406
+ createdBySignature?: string | null | undefined;
4407
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
4408
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
4409
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
2285
4410
  } | {
2286
4411
  type: "REJECT";
2287
4412
  id: string & import("zod").BRAND<"UUID">;
@@ -2474,7 +4599,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2474
4599
  annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
2475
4600
  originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
2476
4601
  } | {
2477
- type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
4602
+ type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "ESCALATE" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
2478
4603
  id: string & import("zod").BRAND<"UUID">;
2479
4604
  status: "Rejected";
2480
4605
  transactionId: string;
@@ -2538,18 +4663,263 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2538
4663
  meta: import("trpc-to-openapi").OpenApiMeta;
2539
4664
  }>;
2540
4665
  accept: import("@trpc/server").TRPCMutationProcedure<{
2541
- input: import("../commons").ActionInput & {
4666
+ input: (Omit<{
4667
+ transactionId: string;
4668
+ eventId: string;
4669
+ type?: "CREATE" | undefined;
4670
+ createdAtLocation?: string | null | undefined;
4671
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4672
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4673
+ originalActionId?: string | undefined;
4674
+ keepAssignment?: boolean | undefined;
4675
+ keepAssignmentIfAccepted?: boolean | undefined;
4676
+ keepAssignmentIfRejected?: boolean | undefined;
4677
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4678
+ transactionId: string;
4679
+ eventId: string;
4680
+ type?: "VALIDATE" | undefined;
4681
+ createdAtLocation?: string | null | undefined;
4682
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4683
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4684
+ originalActionId?: string | undefined;
4685
+ keepAssignment?: boolean | undefined;
4686
+ keepAssignmentIfAccepted?: boolean | undefined;
4687
+ keepAssignmentIfRejected?: boolean | undefined;
4688
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4689
+ content: {
4690
+ reason: string;
4691
+ };
4692
+ transactionId: string;
4693
+ eventId: string;
4694
+ type?: "ESCALATE" | undefined;
4695
+ createdAtLocation?: string | null | undefined;
4696
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4697
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4698
+ originalActionId?: string | undefined;
4699
+ keepAssignment?: boolean | undefined;
4700
+ keepAssignmentIfAccepted?: boolean | undefined;
4701
+ keepAssignmentIfRejected?: boolean | undefined;
4702
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4703
+ transactionId: string;
4704
+ eventId: string;
4705
+ type?: "REGISTER" | undefined;
4706
+ createdAtLocation?: string | null | undefined;
4707
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4708
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4709
+ originalActionId?: string | undefined;
4710
+ registrationNumber?: string | undefined;
4711
+ keepAssignment?: boolean | undefined;
4712
+ keepAssignmentIfAccepted?: boolean | undefined;
4713
+ keepAssignmentIfRejected?: boolean | undefined;
4714
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4715
+ transactionId: string;
4716
+ eventId: string;
4717
+ type?: "NOTIFY" | undefined;
4718
+ createdAtLocation?: string | null | undefined;
4719
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4720
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4721
+ originalActionId?: string | undefined;
4722
+ keepAssignment?: boolean | undefined;
4723
+ keepAssignmentIfAccepted?: boolean | undefined;
4724
+ keepAssignmentIfRejected?: boolean | undefined;
4725
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4726
+ transactionId: string;
4727
+ eventId: string;
4728
+ type?: "DECLARE" | undefined;
4729
+ createdAtLocation?: string | null | undefined;
4730
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4731
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4732
+ originalActionId?: string | undefined;
4733
+ keepAssignment?: boolean | undefined;
4734
+ keepAssignmentIfAccepted?: boolean | undefined;
4735
+ keepAssignmentIfRejected?: boolean | undefined;
4736
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4737
+ content: {
4738
+ reason: string;
4739
+ };
4740
+ transactionId: string;
4741
+ eventId: string;
4742
+ type?: "REJECT" | undefined;
4743
+ createdAtLocation?: string | null | undefined;
4744
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4745
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4746
+ originalActionId?: string | undefined;
4747
+ keepAssignment?: boolean | undefined;
4748
+ keepAssignmentIfAccepted?: boolean | undefined;
4749
+ keepAssignmentIfRejected?: boolean | undefined;
4750
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4751
+ content: {
4752
+ duplicates: {
4753
+ id: string;
4754
+ trackingId: string;
4755
+ }[];
4756
+ };
4757
+ transactionId: string;
4758
+ eventId: string;
4759
+ type?: "DUPLICATE_DETECTED" | undefined;
4760
+ createdAtLocation?: string | null | undefined;
4761
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4762
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4763
+ originalActionId?: string | undefined;
4764
+ keepAssignment?: boolean | undefined;
4765
+ keepAssignmentIfAccepted?: boolean | undefined;
4766
+ keepAssignmentIfRejected?: boolean | undefined;
4767
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4768
+ transactionId: string;
4769
+ eventId: string;
4770
+ type?: "MARK_AS_DUPLICATE" | undefined;
4771
+ content?: {
4772
+ duplicateOf: string;
4773
+ } | undefined;
4774
+ createdAtLocation?: string | null | undefined;
4775
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4776
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4777
+ originalActionId?: string | undefined;
4778
+ keepAssignment?: boolean | undefined;
4779
+ keepAssignmentIfAccepted?: boolean | undefined;
4780
+ keepAssignmentIfRejected?: boolean | undefined;
4781
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4782
+ transactionId: string;
4783
+ eventId: string;
4784
+ type?: "MARK_AS_NOT_DUPLICATE" | undefined;
4785
+ createdAtLocation?: string | null | undefined;
4786
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4787
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4788
+ originalActionId?: string | undefined;
4789
+ keepAssignment?: boolean | undefined;
4790
+ keepAssignmentIfAccepted?: boolean | undefined;
4791
+ keepAssignmentIfRejected?: boolean | undefined;
4792
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4793
+ content: {
4794
+ reason: string;
4795
+ };
4796
+ transactionId: string;
4797
+ eventId: string;
4798
+ type?: "ARCHIVE" | undefined;
4799
+ createdAtLocation?: string | null | undefined;
4800
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4801
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4802
+ originalActionId?: string | undefined;
4803
+ keepAssignment?: boolean | undefined;
4804
+ keepAssignmentIfAccepted?: boolean | undefined;
4805
+ keepAssignmentIfRejected?: boolean | undefined;
4806
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4807
+ type: "ASSIGN";
4808
+ transactionId: string;
4809
+ assignedTo: string;
4810
+ eventId: string;
4811
+ createdAtLocation?: string | null | undefined;
4812
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4813
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4814
+ originalActionId?: string | undefined;
4815
+ keepAssignment?: boolean | undefined;
4816
+ keepAssignmentIfAccepted?: boolean | undefined;
4817
+ keepAssignmentIfRejected?: boolean | undefined;
4818
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4819
+ transactionId: string;
4820
+ eventId: string;
4821
+ type?: "UNASSIGN" | undefined;
4822
+ createdAtLocation?: string | null | undefined;
4823
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4824
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4825
+ originalActionId?: string | undefined;
4826
+ assignedTo?: null | undefined;
4827
+ keepAssignment?: boolean | undefined;
4828
+ keepAssignmentIfAccepted?: boolean | undefined;
4829
+ keepAssignmentIfRejected?: boolean | undefined;
4830
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4831
+ transactionId: string;
4832
+ eventId: string;
4833
+ type?: "PRINT_CERTIFICATE" | undefined;
4834
+ content?: {
4835
+ templateId?: string | undefined;
4836
+ } | undefined;
4837
+ createdAtLocation?: string | null | undefined;
4838
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4839
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4840
+ originalActionId?: string | undefined;
4841
+ keepAssignment?: boolean | undefined;
4842
+ keepAssignmentIfAccepted?: boolean | undefined;
4843
+ keepAssignmentIfRejected?: boolean | undefined;
4844
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4845
+ transactionId: string;
4846
+ eventId: string;
4847
+ type?: "REQUEST_CORRECTION" | undefined;
4848
+ createdAtLocation?: string | null | undefined;
4849
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4850
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4851
+ originalActionId?: string | undefined;
4852
+ keepAssignment?: boolean | undefined;
4853
+ keepAssignmentIfAccepted?: boolean | undefined;
4854
+ keepAssignmentIfRejected?: boolean | undefined;
4855
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4856
+ content: {
4857
+ reason: string;
4858
+ };
4859
+ transactionId: string;
4860
+ requestId: string;
4861
+ eventId: string;
4862
+ type?: "REJECT_CORRECTION" | undefined;
4863
+ createdAtLocation?: string | null | undefined;
4864
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4865
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4866
+ originalActionId?: string | undefined;
4867
+ keepAssignment?: boolean | undefined;
4868
+ keepAssignmentIfAccepted?: boolean | undefined;
4869
+ keepAssignmentIfRejected?: boolean | undefined;
4870
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4871
+ transactionId: string;
4872
+ requestId: string;
4873
+ eventId: string;
4874
+ type?: "APPROVE_CORRECTION" | undefined;
4875
+ createdAtLocation?: string | null | undefined;
4876
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4877
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4878
+ originalActionId?: string | undefined;
4879
+ keepAssignment?: boolean | undefined;
4880
+ keepAssignmentIfAccepted?: boolean | undefined;
4881
+ keepAssignmentIfRejected?: boolean | undefined;
4882
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4883
+ transactionId: string;
4884
+ eventId: string;
4885
+ type?: "READ" | undefined;
4886
+ createdAtLocation?: string | null | undefined;
4887
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4888
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4889
+ originalActionId?: string | undefined;
4890
+ keepAssignment?: boolean | undefined;
4891
+ keepAssignmentIfAccepted?: boolean | undefined;
4892
+ keepAssignmentIfRejected?: boolean | undefined;
4893
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
2542
4894
  actionId: string;
2543
4895
  };
2544
4896
  output: import("../commons").EventDocument;
2545
4897
  meta: import("trpc-to-openapi").OpenApiMeta;
2546
4898
  }>;
2547
4899
  reject: import("@trpc/server").TRPCMutationProcedure<{
2548
- input: {
4900
+ input: import("zod").input<import("zod").ZodObject<import("zod").objectUtil.extendShape<Pick<{
4901
+ eventId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
4902
+ transactionId: import("zod").ZodString;
4903
+ declaration: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
4904
+ annotation: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
4905
+ originalActionId: import("zod").ZodOptional<import("zod").ZodBranded<import("zod").ZodString, "UUID">>;
4906
+ keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
4907
+ keepAssignmentIfAccepted: import("zod").ZodOptional<import("zod").ZodBoolean>;
4908
+ keepAssignmentIfRejected: import("zod").ZodOptional<import("zod").ZodBoolean>;
4909
+ createdAtLocation: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBranded<import("zod").ZodString, "UUID">>>;
4910
+ }, "eventId" | "transactionId" | "keepAssignment">, {
4911
+ actionId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
4912
+ }>, "strip", import("zod").ZodTypeAny, {
4913
+ eventId: string & import("zod").BRAND<"UUID">;
4914
+ transactionId: string;
4915
+ actionId: string & import("zod").BRAND<"UUID">;
4916
+ keepAssignment?: boolean | undefined;
4917
+ }, {
2549
4918
  eventId: string;
2550
- actionId: string;
2551
4919
  transactionId: string;
2552
- };
4920
+ actionId: string;
4921
+ keepAssignment?: boolean | undefined;
4922
+ }>>;
2553
4923
  output: import("../commons").EventDocument;
2554
4924
  meta: import("trpc-to-openapi").OpenApiMeta;
2555
4925
  }>;
@@ -2581,18 +4951,263 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2581
4951
  meta: import("trpc-to-openapi").OpenApiMeta;
2582
4952
  }>;
2583
4953
  accept: import("@trpc/server").TRPCMutationProcedure<{
2584
- input: import("../commons").ActionInput & {
4954
+ input: (Omit<{
4955
+ transactionId: string;
4956
+ eventId: string;
4957
+ type?: "CREATE" | undefined;
4958
+ createdAtLocation?: string | null | undefined;
4959
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4960
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4961
+ originalActionId?: string | undefined;
4962
+ keepAssignment?: boolean | undefined;
4963
+ keepAssignmentIfAccepted?: boolean | undefined;
4964
+ keepAssignmentIfRejected?: boolean | undefined;
4965
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4966
+ transactionId: string;
4967
+ eventId: string;
4968
+ type?: "VALIDATE" | undefined;
4969
+ createdAtLocation?: string | null | undefined;
4970
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4971
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4972
+ originalActionId?: string | undefined;
4973
+ keepAssignment?: boolean | undefined;
4974
+ keepAssignmentIfAccepted?: boolean | undefined;
4975
+ keepAssignmentIfRejected?: boolean | undefined;
4976
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4977
+ content: {
4978
+ reason: string;
4979
+ };
4980
+ transactionId: string;
4981
+ eventId: string;
4982
+ type?: "ESCALATE" | undefined;
4983
+ createdAtLocation?: string | null | undefined;
4984
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4985
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4986
+ originalActionId?: string | undefined;
4987
+ keepAssignment?: boolean | undefined;
4988
+ keepAssignmentIfAccepted?: boolean | undefined;
4989
+ keepAssignmentIfRejected?: boolean | undefined;
4990
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4991
+ transactionId: string;
4992
+ eventId: string;
4993
+ type?: "REGISTER" | undefined;
4994
+ createdAtLocation?: string | null | undefined;
4995
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4996
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
4997
+ originalActionId?: string | undefined;
4998
+ registrationNumber?: string | undefined;
4999
+ keepAssignment?: boolean | undefined;
5000
+ keepAssignmentIfAccepted?: boolean | undefined;
5001
+ keepAssignmentIfRejected?: boolean | undefined;
5002
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5003
+ transactionId: string;
5004
+ eventId: string;
5005
+ type?: "NOTIFY" | undefined;
5006
+ createdAtLocation?: string | null | undefined;
5007
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5008
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5009
+ originalActionId?: string | undefined;
5010
+ keepAssignment?: boolean | undefined;
5011
+ keepAssignmentIfAccepted?: boolean | undefined;
5012
+ keepAssignmentIfRejected?: boolean | undefined;
5013
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5014
+ transactionId: string;
5015
+ eventId: string;
5016
+ type?: "DECLARE" | undefined;
5017
+ createdAtLocation?: string | null | undefined;
5018
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5019
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5020
+ originalActionId?: string | undefined;
5021
+ keepAssignment?: boolean | undefined;
5022
+ keepAssignmentIfAccepted?: boolean | undefined;
5023
+ keepAssignmentIfRejected?: boolean | undefined;
5024
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5025
+ content: {
5026
+ reason: string;
5027
+ };
5028
+ transactionId: string;
5029
+ eventId: string;
5030
+ type?: "REJECT" | undefined;
5031
+ createdAtLocation?: string | null | undefined;
5032
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5033
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5034
+ originalActionId?: string | undefined;
5035
+ keepAssignment?: boolean | undefined;
5036
+ keepAssignmentIfAccepted?: boolean | undefined;
5037
+ keepAssignmentIfRejected?: boolean | undefined;
5038
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5039
+ content: {
5040
+ duplicates: {
5041
+ id: string;
5042
+ trackingId: string;
5043
+ }[];
5044
+ };
5045
+ transactionId: string;
5046
+ eventId: string;
5047
+ type?: "DUPLICATE_DETECTED" | undefined;
5048
+ createdAtLocation?: string | null | undefined;
5049
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5050
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5051
+ originalActionId?: string | undefined;
5052
+ keepAssignment?: boolean | undefined;
5053
+ keepAssignmentIfAccepted?: boolean | undefined;
5054
+ keepAssignmentIfRejected?: boolean | undefined;
5055
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5056
+ transactionId: string;
5057
+ eventId: string;
5058
+ type?: "MARK_AS_DUPLICATE" | undefined;
5059
+ content?: {
5060
+ duplicateOf: string;
5061
+ } | undefined;
5062
+ createdAtLocation?: string | null | undefined;
5063
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5064
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5065
+ originalActionId?: string | undefined;
5066
+ keepAssignment?: boolean | undefined;
5067
+ keepAssignmentIfAccepted?: boolean | undefined;
5068
+ keepAssignmentIfRejected?: boolean | undefined;
5069
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5070
+ transactionId: string;
5071
+ eventId: string;
5072
+ type?: "MARK_AS_NOT_DUPLICATE" | undefined;
5073
+ createdAtLocation?: string | null | undefined;
5074
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5075
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5076
+ originalActionId?: string | undefined;
5077
+ keepAssignment?: boolean | undefined;
5078
+ keepAssignmentIfAccepted?: boolean | undefined;
5079
+ keepAssignmentIfRejected?: boolean | undefined;
5080
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5081
+ content: {
5082
+ reason: string;
5083
+ };
5084
+ transactionId: string;
5085
+ eventId: string;
5086
+ type?: "ARCHIVE" | undefined;
5087
+ createdAtLocation?: string | null | undefined;
5088
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5089
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5090
+ originalActionId?: string | undefined;
5091
+ keepAssignment?: boolean | undefined;
5092
+ keepAssignmentIfAccepted?: boolean | undefined;
5093
+ keepAssignmentIfRejected?: boolean | undefined;
5094
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5095
+ type: "ASSIGN";
5096
+ transactionId: string;
5097
+ assignedTo: string;
5098
+ eventId: string;
5099
+ createdAtLocation?: string | null | undefined;
5100
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5101
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5102
+ originalActionId?: string | undefined;
5103
+ keepAssignment?: boolean | undefined;
5104
+ keepAssignmentIfAccepted?: boolean | undefined;
5105
+ keepAssignmentIfRejected?: boolean | undefined;
5106
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5107
+ transactionId: string;
5108
+ eventId: string;
5109
+ type?: "UNASSIGN" | undefined;
5110
+ createdAtLocation?: string | null | undefined;
5111
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5112
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5113
+ originalActionId?: string | undefined;
5114
+ assignedTo?: null | undefined;
5115
+ keepAssignment?: boolean | undefined;
5116
+ keepAssignmentIfAccepted?: boolean | undefined;
5117
+ keepAssignmentIfRejected?: boolean | undefined;
5118
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5119
+ transactionId: string;
5120
+ eventId: string;
5121
+ type?: "PRINT_CERTIFICATE" | undefined;
5122
+ content?: {
5123
+ templateId?: string | undefined;
5124
+ } | undefined;
5125
+ createdAtLocation?: string | null | undefined;
5126
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5127
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5128
+ originalActionId?: string | undefined;
5129
+ keepAssignment?: boolean | undefined;
5130
+ keepAssignmentIfAccepted?: boolean | undefined;
5131
+ keepAssignmentIfRejected?: boolean | undefined;
5132
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5133
+ transactionId: string;
5134
+ eventId: string;
5135
+ type?: "REQUEST_CORRECTION" | undefined;
5136
+ createdAtLocation?: string | null | undefined;
5137
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5138
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5139
+ originalActionId?: string | undefined;
5140
+ keepAssignment?: boolean | undefined;
5141
+ keepAssignmentIfAccepted?: boolean | undefined;
5142
+ keepAssignmentIfRejected?: boolean | undefined;
5143
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5144
+ content: {
5145
+ reason: string;
5146
+ };
5147
+ transactionId: string;
5148
+ requestId: string;
5149
+ eventId: string;
5150
+ type?: "REJECT_CORRECTION" | undefined;
5151
+ createdAtLocation?: string | null | undefined;
5152
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5153
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5154
+ originalActionId?: string | undefined;
5155
+ keepAssignment?: boolean | undefined;
5156
+ keepAssignmentIfAccepted?: boolean | undefined;
5157
+ keepAssignmentIfRejected?: boolean | undefined;
5158
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5159
+ transactionId: string;
5160
+ requestId: string;
5161
+ eventId: string;
5162
+ type?: "APPROVE_CORRECTION" | undefined;
5163
+ createdAtLocation?: string | null | undefined;
5164
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5165
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5166
+ originalActionId?: string | undefined;
5167
+ keepAssignment?: boolean | undefined;
5168
+ keepAssignmentIfAccepted?: boolean | undefined;
5169
+ keepAssignmentIfRejected?: boolean | undefined;
5170
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5171
+ transactionId: string;
5172
+ eventId: string;
5173
+ type?: "READ" | undefined;
5174
+ createdAtLocation?: string | null | undefined;
5175
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5176
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5177
+ originalActionId?: string | undefined;
5178
+ keepAssignment?: boolean | undefined;
5179
+ keepAssignmentIfAccepted?: boolean | undefined;
5180
+ keepAssignmentIfRejected?: boolean | undefined;
5181
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
2585
5182
  actionId: string;
2586
5183
  };
2587
5184
  output: import("../commons").EventDocument;
2588
5185
  meta: import("trpc-to-openapi").OpenApiMeta;
2589
5186
  }>;
2590
5187
  reject: import("@trpc/server").TRPCMutationProcedure<{
2591
- input: {
5188
+ input: import("zod").input<import("zod").ZodObject<import("zod").objectUtil.extendShape<Pick<{
5189
+ eventId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
5190
+ transactionId: import("zod").ZodString;
5191
+ declaration: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
5192
+ annotation: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
5193
+ originalActionId: import("zod").ZodOptional<import("zod").ZodBranded<import("zod").ZodString, "UUID">>;
5194
+ keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
5195
+ keepAssignmentIfAccepted: import("zod").ZodOptional<import("zod").ZodBoolean>;
5196
+ keepAssignmentIfRejected: import("zod").ZodOptional<import("zod").ZodBoolean>;
5197
+ createdAtLocation: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBranded<import("zod").ZodString, "UUID">>>;
5198
+ }, "eventId" | "transactionId" | "keepAssignment">, {
5199
+ actionId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
5200
+ }>, "strip", import("zod").ZodTypeAny, {
5201
+ eventId: string & import("zod").BRAND<"UUID">;
5202
+ transactionId: string;
5203
+ actionId: string & import("zod").BRAND<"UUID">;
5204
+ keepAssignment?: boolean | undefined;
5205
+ }, {
2592
5206
  eventId: string;
2593
- actionId: string;
2594
5207
  transactionId: string;
2595
- };
5208
+ actionId: string;
5209
+ keepAssignment?: boolean | undefined;
5210
+ }>>;
2596
5211
  output: import("../commons").EventDocument;
2597
5212
  meta: import("trpc-to-openapi").OpenApiMeta;
2598
5213
  }>;
@@ -2624,18 +5239,263 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2624
5239
  meta: import("trpc-to-openapi").OpenApiMeta;
2625
5240
  }>;
2626
5241
  accept: import("@trpc/server").TRPCMutationProcedure<{
2627
- input: import("../commons").ActionInput & {
5242
+ input: (Omit<{
5243
+ transactionId: string;
5244
+ eventId: string;
5245
+ type?: "CREATE" | undefined;
5246
+ createdAtLocation?: string | null | undefined;
5247
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5248
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5249
+ originalActionId?: string | undefined;
5250
+ keepAssignment?: boolean | undefined;
5251
+ keepAssignmentIfAccepted?: boolean | undefined;
5252
+ keepAssignmentIfRejected?: boolean | undefined;
5253
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5254
+ transactionId: string;
5255
+ eventId: string;
5256
+ type?: "VALIDATE" | undefined;
5257
+ createdAtLocation?: string | null | undefined;
5258
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5259
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5260
+ originalActionId?: string | undefined;
5261
+ keepAssignment?: boolean | undefined;
5262
+ keepAssignmentIfAccepted?: boolean | undefined;
5263
+ keepAssignmentIfRejected?: boolean | undefined;
5264
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5265
+ content: {
5266
+ reason: string;
5267
+ };
5268
+ transactionId: string;
5269
+ eventId: string;
5270
+ type?: "ESCALATE" | undefined;
5271
+ createdAtLocation?: string | null | undefined;
5272
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5273
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5274
+ originalActionId?: string | undefined;
5275
+ keepAssignment?: boolean | undefined;
5276
+ keepAssignmentIfAccepted?: boolean | undefined;
5277
+ keepAssignmentIfRejected?: boolean | undefined;
5278
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5279
+ transactionId: string;
5280
+ eventId: string;
5281
+ type?: "REGISTER" | undefined;
5282
+ createdAtLocation?: string | null | undefined;
5283
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5284
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5285
+ originalActionId?: string | undefined;
5286
+ registrationNumber?: string | undefined;
5287
+ keepAssignment?: boolean | undefined;
5288
+ keepAssignmentIfAccepted?: boolean | undefined;
5289
+ keepAssignmentIfRejected?: boolean | undefined;
5290
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5291
+ transactionId: string;
5292
+ eventId: string;
5293
+ type?: "NOTIFY" | undefined;
5294
+ createdAtLocation?: string | null | undefined;
5295
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5296
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5297
+ originalActionId?: string | undefined;
5298
+ keepAssignment?: boolean | undefined;
5299
+ keepAssignmentIfAccepted?: boolean | undefined;
5300
+ keepAssignmentIfRejected?: boolean | undefined;
5301
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5302
+ transactionId: string;
5303
+ eventId: string;
5304
+ type?: "DECLARE" | undefined;
5305
+ createdAtLocation?: string | null | undefined;
5306
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5307
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5308
+ originalActionId?: string | undefined;
5309
+ keepAssignment?: boolean | undefined;
5310
+ keepAssignmentIfAccepted?: boolean | undefined;
5311
+ keepAssignmentIfRejected?: boolean | undefined;
5312
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5313
+ content: {
5314
+ reason: string;
5315
+ };
5316
+ transactionId: string;
5317
+ eventId: string;
5318
+ type?: "REJECT" | undefined;
5319
+ createdAtLocation?: string | null | undefined;
5320
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5321
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5322
+ originalActionId?: string | undefined;
5323
+ keepAssignment?: boolean | undefined;
5324
+ keepAssignmentIfAccepted?: boolean | undefined;
5325
+ keepAssignmentIfRejected?: boolean | undefined;
5326
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5327
+ content: {
5328
+ duplicates: {
5329
+ id: string;
5330
+ trackingId: string;
5331
+ }[];
5332
+ };
5333
+ transactionId: string;
5334
+ eventId: string;
5335
+ type?: "DUPLICATE_DETECTED" | undefined;
5336
+ createdAtLocation?: string | null | undefined;
5337
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5338
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5339
+ originalActionId?: string | undefined;
5340
+ keepAssignment?: boolean | undefined;
5341
+ keepAssignmentIfAccepted?: boolean | undefined;
5342
+ keepAssignmentIfRejected?: boolean | undefined;
5343
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5344
+ transactionId: string;
5345
+ eventId: string;
5346
+ type?: "MARK_AS_DUPLICATE" | undefined;
5347
+ content?: {
5348
+ duplicateOf: string;
5349
+ } | undefined;
5350
+ createdAtLocation?: string | null | undefined;
5351
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5352
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5353
+ originalActionId?: string | undefined;
5354
+ keepAssignment?: boolean | undefined;
5355
+ keepAssignmentIfAccepted?: boolean | undefined;
5356
+ keepAssignmentIfRejected?: boolean | undefined;
5357
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5358
+ transactionId: string;
5359
+ eventId: string;
5360
+ type?: "MARK_AS_NOT_DUPLICATE" | undefined;
5361
+ createdAtLocation?: string | null | undefined;
5362
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5363
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5364
+ originalActionId?: string | undefined;
5365
+ keepAssignment?: boolean | undefined;
5366
+ keepAssignmentIfAccepted?: boolean | undefined;
5367
+ keepAssignmentIfRejected?: boolean | undefined;
5368
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5369
+ content: {
5370
+ reason: string;
5371
+ };
5372
+ transactionId: string;
5373
+ eventId: string;
5374
+ type?: "ARCHIVE" | undefined;
5375
+ createdAtLocation?: string | null | undefined;
5376
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5377
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5378
+ originalActionId?: string | undefined;
5379
+ keepAssignment?: boolean | undefined;
5380
+ keepAssignmentIfAccepted?: boolean | undefined;
5381
+ keepAssignmentIfRejected?: boolean | undefined;
5382
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5383
+ type: "ASSIGN";
5384
+ transactionId: string;
5385
+ assignedTo: string;
5386
+ eventId: string;
5387
+ createdAtLocation?: string | null | undefined;
5388
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5389
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5390
+ originalActionId?: string | undefined;
5391
+ keepAssignment?: boolean | undefined;
5392
+ keepAssignmentIfAccepted?: boolean | undefined;
5393
+ keepAssignmentIfRejected?: boolean | undefined;
5394
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5395
+ transactionId: string;
5396
+ eventId: string;
5397
+ type?: "UNASSIGN" | undefined;
5398
+ createdAtLocation?: string | null | undefined;
5399
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5400
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5401
+ originalActionId?: string | undefined;
5402
+ assignedTo?: null | undefined;
5403
+ keepAssignment?: boolean | undefined;
5404
+ keepAssignmentIfAccepted?: boolean | undefined;
5405
+ keepAssignmentIfRejected?: boolean | undefined;
5406
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5407
+ transactionId: string;
5408
+ eventId: string;
5409
+ type?: "PRINT_CERTIFICATE" | undefined;
5410
+ content?: {
5411
+ templateId?: string | undefined;
5412
+ } | undefined;
5413
+ createdAtLocation?: string | null | undefined;
5414
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5415
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5416
+ originalActionId?: string | undefined;
5417
+ keepAssignment?: boolean | undefined;
5418
+ keepAssignmentIfAccepted?: boolean | undefined;
5419
+ keepAssignmentIfRejected?: boolean | undefined;
5420
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5421
+ transactionId: string;
5422
+ eventId: string;
5423
+ type?: "REQUEST_CORRECTION" | undefined;
5424
+ createdAtLocation?: string | null | undefined;
5425
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5426
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5427
+ originalActionId?: string | undefined;
5428
+ keepAssignment?: boolean | undefined;
5429
+ keepAssignmentIfAccepted?: boolean | undefined;
5430
+ keepAssignmentIfRejected?: boolean | undefined;
5431
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5432
+ content: {
5433
+ reason: string;
5434
+ };
5435
+ transactionId: string;
5436
+ requestId: string;
5437
+ eventId: string;
5438
+ type?: "REJECT_CORRECTION" | undefined;
5439
+ createdAtLocation?: string | null | undefined;
5440
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5441
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5442
+ originalActionId?: string | undefined;
5443
+ keepAssignment?: boolean | undefined;
5444
+ keepAssignmentIfAccepted?: boolean | undefined;
5445
+ keepAssignmentIfRejected?: boolean | undefined;
5446
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5447
+ transactionId: string;
5448
+ requestId: string;
5449
+ eventId: string;
5450
+ type?: "APPROVE_CORRECTION" | undefined;
5451
+ createdAtLocation?: string | null | undefined;
5452
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5453
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5454
+ originalActionId?: string | undefined;
5455
+ keepAssignment?: boolean | undefined;
5456
+ keepAssignmentIfAccepted?: boolean | undefined;
5457
+ keepAssignmentIfRejected?: boolean | undefined;
5458
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5459
+ transactionId: string;
5460
+ eventId: string;
5461
+ type?: "READ" | undefined;
5462
+ createdAtLocation?: string | null | undefined;
5463
+ declaration?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5464
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
5465
+ originalActionId?: string | undefined;
5466
+ keepAssignment?: boolean | undefined;
5467
+ keepAssignmentIfAccepted?: boolean | undefined;
5468
+ keepAssignmentIfRejected?: boolean | undefined;
5469
+ }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected">) & {
2628
5470
  actionId: string;
2629
5471
  };
2630
5472
  output: import("../commons").EventDocument;
2631
5473
  meta: import("trpc-to-openapi").OpenApiMeta;
2632
5474
  }>;
2633
5475
  reject: import("@trpc/server").TRPCMutationProcedure<{
2634
- input: {
5476
+ input: import("zod").input<import("zod").ZodObject<import("zod").objectUtil.extendShape<Pick<{
5477
+ eventId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
5478
+ transactionId: import("zod").ZodString;
5479
+ declaration: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
5480
+ annotation: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../commons").FieldUpdateValue, import("zod").ZodTypeDef, import("../commons").FieldUpdateValue>>>;
5481
+ originalActionId: import("zod").ZodOptional<import("zod").ZodBranded<import("zod").ZodString, "UUID">>;
5482
+ keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
5483
+ keepAssignmentIfAccepted: import("zod").ZodOptional<import("zod").ZodBoolean>;
5484
+ keepAssignmentIfRejected: import("zod").ZodOptional<import("zod").ZodBoolean>;
5485
+ createdAtLocation: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBranded<import("zod").ZodString, "UUID">>>;
5486
+ }, "eventId" | "transactionId" | "keepAssignment">, {
5487
+ actionId: import("zod").ZodBranded<import("zod").ZodString, "UUID">;
5488
+ }>, "strip", import("zod").ZodTypeAny, {
5489
+ eventId: string & import("zod").BRAND<"UUID">;
5490
+ transactionId: string;
5491
+ actionId: string & import("zod").BRAND<"UUID">;
5492
+ keepAssignment?: boolean | undefined;
5493
+ }, {
2635
5494
  eventId: string;
2636
- actionId: string;
2637
5495
  transactionId: string;
2638
- };
5496
+ actionId: string;
5497
+ keepAssignment?: boolean | undefined;
5498
+ }>>;
2639
5499
  output: import("../commons").EventDocument;
2640
5500
  meta: import("trpc-to-openapi").OpenApiMeta;
2641
5501
  }>;
@@ -2675,6 +5535,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2675
5535
  annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2676
5536
  originalActionId?: string | undefined;
2677
5537
  keepAssignment?: boolean | undefined;
5538
+ keepAssignmentIfAccepted?: boolean | undefined;
5539
+ keepAssignmentIfRejected?: boolean | undefined;
2678
5540
  };
2679
5541
  output: {
2680
5542
  type: string;
@@ -2754,6 +5616,23 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2754
5616
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
2755
5617
  annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
2756
5618
  originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
5619
+ } | {
5620
+ type: "ESCALATE";
5621
+ id: string & import("zod").BRAND<"UUID">;
5622
+ status: "Rejected" | "Requested" | "Accepted";
5623
+ content: {
5624
+ reason: string;
5625
+ };
5626
+ transactionId: string;
5627
+ createdByUserType: "system" | "user";
5628
+ createdAt: string;
5629
+ createdBy: string;
5630
+ createdByRole: string;
5631
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
5632
+ createdBySignature?: string | null | undefined;
5633
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
5634
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
5635
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
2757
5636
  } | {
2758
5637
  type: "REJECT";
2759
5638
  id: string & import("zod").BRAND<"UUID">;
@@ -2946,7 +5825,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2946
5825
  annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
2947
5826
  originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
2948
5827
  } | {
2949
- type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
5828
+ type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "ESCALATE" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
2950
5829
  id: string & import("zod").BRAND<"UUID">;
2951
5830
  status: "Rejected";
2952
5831
  transactionId: string;
@@ -2971,6 +5850,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2971
5850
  annotation?: Record<string, import("../commons").FieldUpdateValue> | undefined;
2972
5851
  originalActionId?: string | undefined;
2973
5852
  keepAssignment?: boolean | undefined;
5853
+ keepAssignmentIfAccepted?: boolean | undefined;
5854
+ keepAssignmentIfRejected?: boolean | undefined;
2974
5855
  };
2975
5856
  output: {
2976
5857
  type: string;
@@ -3050,6 +5931,23 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3050
5931
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
3051
5932
  annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
3052
5933
  originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
5934
+ } | {
5935
+ type: "ESCALATE";
5936
+ id: string & import("zod").BRAND<"UUID">;
5937
+ status: "Rejected" | "Requested" | "Accepted";
5938
+ content: {
5939
+ reason: string;
5940
+ };
5941
+ transactionId: string;
5942
+ createdByUserType: "system" | "user";
5943
+ createdAt: string;
5944
+ createdBy: string;
5945
+ createdByRole: string;
5946
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
5947
+ createdBySignature?: string | null | undefined;
5948
+ createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
5949
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
5950
+ originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
3053
5951
  } | {
3054
5952
  type: "REJECT";
3055
5953
  id: string & import("zod").BRAND<"UUID">;
@@ -3242,7 +6140,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3242
6140
  annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
3243
6141
  originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
3244
6142
  } | {
3245
- type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
6143
+ type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "ESCALATE" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
3246
6144
  id: string & import("zod").BRAND<"UUID">;
3247
6145
  status: "Rejected";
3248
6146
  transactionId: string;
@@ -3394,6 +6292,23 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3394
6292
  createdAtLocation?: string | null | undefined;
3395
6293
  annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
3396
6294
  originalActionId?: string | null | undefined;
6295
+ } | {
6296
+ type: "ESCALATE";
6297
+ id: string;
6298
+ status: "Rejected" | "Requested" | "Accepted";
6299
+ content: {
6300
+ reason: string;
6301
+ };
6302
+ transactionId: string;
6303
+ createdByUserType: "system" | "user";
6304
+ createdAt: string;
6305
+ createdBy: string;
6306
+ createdByRole: string;
6307
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
6308
+ createdBySignature?: string | null | undefined;
6309
+ createdAtLocation?: string | null | undefined;
6310
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
6311
+ originalActionId?: string | null | undefined;
3397
6312
  } | {
3398
6313
  type: "REJECT";
3399
6314
  id: string;
@@ -3586,7 +6501,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3586
6501
  annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
3587
6502
  originalActionId?: string | null | undefined;
3588
6503
  } | {
3589
- type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
6504
+ type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "ESCALATE" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
3590
6505
  id: string;
3591
6506
  status: "Rejected";
3592
6507
  transactionId: string;
@@ -3736,7 +6651,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3736
6651
  count?: number | undefined;
3737
6652
  timeStart?: string | undefined;
3738
6653
  timeEnd?: string | undefined;
3739
- actionTypes?: ("READ" | "DECLARE" | "VALIDATE" | "REJECT" | "ARCHIVE" | "REGISTER" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CREATE" | "NOTIFY" | "DUPLICATE_DETECTED" | "MARK_AS_DUPLICATE" | "ASSIGN" | "UNASSIGN" | "MARK_AS_NOT_DUPLICATE")[] | undefined;
6654
+ actionTypes?: ("READ" | "DECLARE" | "VALIDATE" | "ESCALATE" | "REJECT" | "ARCHIVE" | "REGISTER" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CREATE" | "NOTIFY" | "DUPLICATE_DETECTED" | "MARK_AS_DUPLICATE" | "ASSIGN" | "UNASSIGN" | "MARK_AS_NOT_DUPLICATE")[] | undefined;
3740
6655
  };
3741
6656
  output: {
3742
6657
  results: {
@@ -3745,20 +6660,20 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3745
6660
  eventType: string | null;
3746
6661
  createdAt: string | null;
3747
6662
  updatedAt: string | null;
3748
- transactionId: string | null;
3749
- eventId: string & import("zod").BRAND<"UUID">;
3750
6663
  actionType: import("../storage/postgres/events/schema/app/ActionType").default;
3751
- declaration: Record<string, any>;
3752
6664
  annotation: Record<string, any> | null;
6665
+ assignedTo: string | null;
6666
+ createdAtLocation: (string & import("zod").BRAND<"UUID">) | null;
3753
6667
  createdBy: string;
3754
6668
  createdByRole: string;
3755
- createdByUserType: import("../storage/postgres/events/schema/app/UserType").default;
3756
6669
  createdBySignature: string | null;
3757
- createdAtLocation: (string & import("zod").BRAND<"UUID">) | null;
3758
- assignedTo: string | null;
6670
+ createdByUserType: import("../storage/postgres/events/schema/app/UserType").default;
6671
+ declaration: Record<string, any>;
6672
+ eventId: string & import("zod").BRAND<"UUID">;
3759
6673
  originalActionId: (string & import("zod").BRAND<"UUID">) | null;
3760
6674
  registrationNumber: string | null;
3761
6675
  requestId: string | null;
6676
+ transactionId: string | null;
3762
6677
  content: Record<string, any> | null;
3763
6678
  trackingId: string | null;
3764
6679
  }[];
@@ -3867,7 +6782,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3867
6782
  output: {
3868
6783
  name: import("../commons").TranslationConfig;
3869
6784
  actions: {
3870
- type: "DELETE" | "DECLARE" | "VALIDATE" | "REGISTER" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
6785
+ type: "DELETE" | "DECLARE" | "VALIDATE" | "REGISTER" | "ESCALATE" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
3871
6786
  conditionals?: import("../commons").JSONSchema[] | undefined;
3872
6787
  }[];
3873
6788
  query: {