@opencrvs/toolkit 2.0.0-rc.bd420ee → 2.0.0-rc.bdb99da

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1883,9 +1883,9 @@ function updateRouteHandlers(sourceFiles, group, srcDir, relCwd) {
1883
1883
  }
1884
1884
  return replacedCount;
1885
1885
  }
1886
- function resolveConfigChain(configObj, path23) {
1886
+ function resolveConfigChain(configObj, path24) {
1887
1887
  let current = configObj;
1888
- for (const key of path23) {
1888
+ for (const key of path24) {
1889
1889
  if (!import_ts_morph10.Node.isObjectLiteralExpression(current)) return null;
1890
1890
  const prop = current.getProperty(key);
1891
1891
  if (!prop || !import_ts_morph10.Node.isPropertyAssignment(prop)) return null;
@@ -2393,7 +2393,9 @@ var decodeScope = (query) => {
2393
2393
  };
2394
2394
  var DEFAULT_SCOPE_OPTIONS = {
2395
2395
  placeOfEvent: JurisdictionFilter.enum.all,
2396
- accessLevel: JurisdictionFilter.enum.all
2396
+ accessLevel: JurisdictionFilter.enum.all,
2397
+ registeredIn: JurisdictionFilter.enum.all,
2398
+ declaredIn: JurisdictionFilter.enum.all
2397
2399
  };
2398
2400
 
2399
2401
  // ../commons/src/scopes.deprecated.do-not-use.ts
@@ -4831,9 +4833,9 @@ var import_path24 = require("path");
4831
4833
  var TEMP_REMOTE2 = "opencrvs-upgrade-v19-v20-codemod-merge-infra";
4832
4834
  var INFRASTRUCTURE_DIR = "infrastructure";
4833
4835
  var BASE_BRANCH = "release-v1.9";
4834
- function gitShowBytes(ref, path23) {
4836
+ function gitShowBytes(ref, path24) {
4835
4837
  try {
4836
- const buf = (0, import_child_process2.execFileSync)("git", ["show", `${ref}:${path23}`], {
4838
+ const buf = (0, import_child_process2.execFileSync)("git", ["show", `${ref}:${path24}`], {
4837
4839
  cwd: process.cwd(),
4838
4840
  stdio: ["ignore", "pipe", "pipe"]
4839
4841
  });
@@ -5009,6 +5011,94 @@ async function main26({
5009
5011
  );
5010
5012
  }
5011
5013
 
5014
+ // src/migrations/v2.0/fix-accept-requested-registration-function-type.ts
5015
+ var import_ts_morph22 = require("ts-morph");
5016
+ var import_path26 = __toESM(require("path"));
5017
+ var TARGET_FUNCTION_NAME = "acceptRequestedRegistration";
5018
+ var ACTION_PARAMETER_NAME = "action";
5019
+ var OLD_TYPE = "ActionInput";
5020
+ var NEW_TYPE = "Extract<ActionInput, { type?: 'REGISTER' }>";
5021
+ function isAcceptRequestedRegistrationParameter(parameter) {
5022
+ const functionDeclaration = parameter.getFirstAncestorByKind(
5023
+ import_ts_morph22.SyntaxKind.FunctionDeclaration
5024
+ );
5025
+ if (functionDeclaration?.getName() === TARGET_FUNCTION_NAME) {
5026
+ return true;
5027
+ }
5028
+ const arrowFunction = parameter.getFirstAncestorByKind(
5029
+ import_ts_morph22.SyntaxKind.ArrowFunction
5030
+ );
5031
+ const variableDeclaration = arrowFunction?.getFirstAncestorByKind(
5032
+ import_ts_morph22.SyntaxKind.VariableDeclaration
5033
+ );
5034
+ return variableDeclaration?.getName() === TARGET_FUNCTION_NAME;
5035
+ }
5036
+ function processFile14(filePath, project) {
5037
+ const sourceFile = project.getSourceFile(filePath);
5038
+ if (!sourceFile) return 0;
5039
+ let updatedCount = 0;
5040
+ for (const parameter of sourceFile.getDescendantsOfKind(
5041
+ import_ts_morph22.SyntaxKind.Parameter
5042
+ )) {
5043
+ if (parameter.getName() !== ACTION_PARAMETER_NAME) {
5044
+ continue;
5045
+ }
5046
+ if (!isAcceptRequestedRegistrationParameter(parameter)) {
5047
+ continue;
5048
+ }
5049
+ const typeNode = parameter.getTypeNode();
5050
+ if (!typeNode || typeNode.getText() !== OLD_TYPE) {
5051
+ continue;
5052
+ }
5053
+ parameter.setType(NEW_TYPE);
5054
+ updatedCount++;
5055
+ console.log(
5056
+ ` [${import_path26.default.relative(process.cwd(), filePath)}] Updated '${ACTION_PARAMETER_NAME}' in ${TARGET_FUNCTION_NAME} to ${NEW_TYPE}`
5057
+ );
5058
+ }
5059
+ return updatedCount;
5060
+ }
5061
+ async function main27() {
5062
+ const srcDir = import_path26.default.join(process.cwd(), "src");
5063
+ console.log(`Scanning for ${TARGET_FUNCTION_NAME} in: ${srcDir}
5064
+ `);
5065
+ const project = new import_ts_morph22.Project({
5066
+ tsConfigFilePath: import_path26.default.resolve(srcDir, "../tsconfig.json"),
5067
+ skipAddingFilesFromTsConfig: false
5068
+ });
5069
+ const sourceFiles = project.getSourceFiles().filter((sf) => {
5070
+ const filePath = sf.getFilePath();
5071
+ return filePath.includes("/src/") && !filePath.includes("/node_modules/");
5072
+ });
5073
+ let totalUpdated = 0;
5074
+ const modifiedFiles = [];
5075
+ for (const sourceFile of sourceFiles) {
5076
+ const filePath = sourceFile.getFilePath();
5077
+ const updated = processFile14(filePath, project);
5078
+ if (updated > 0) {
5079
+ totalUpdated += updated;
5080
+ modifiedFiles.push(filePath);
5081
+ }
5082
+ }
5083
+ if (modifiedFiles.length === 0) {
5084
+ console.log(
5085
+ `No '${ACTION_PARAMETER_NAME}: ${OLD_TYPE}' parameter in ${TARGET_FUNCTION_NAME} found. Nothing to do.`
5086
+ );
5087
+ return;
5088
+ }
5089
+ console.log(`
5090
+ Saving ${modifiedFiles.length} modified file(s)...`);
5091
+ for (const filePath of modifiedFiles) {
5092
+ const sourceFile = project.getSourceFileOrThrow(filePath);
5093
+ await sourceFile.save();
5094
+ console.log(` Saved: ${import_path26.default.relative(process.cwd(), filePath)}`);
5095
+ }
5096
+ console.log(
5097
+ `
5098
+ Done. Updated ${totalUpdated} parameter type annotation(s) in ${TARGET_FUNCTION_NAME}.`
5099
+ );
5100
+ }
5101
+
5012
5102
  // src/migrations/v2.0/index.ts
5013
5103
  var NON_SWARM_INFRA_SUBDIRS = ["postgres", "metabase"];
5014
5104
  async function runUpgrade(dockerSwarm) {
@@ -5035,6 +5125,7 @@ async function runUpgrade(dockerSwarm) {
5035
5125
  await main22();
5036
5126
  await main23();
5037
5127
  await main24();
5128
+ await main27();
5038
5129
  await main17();
5039
5130
  if (dockerSwarm) {
5040
5131
  await main25();
@@ -5069,7 +5160,7 @@ Options:
5069
5160
  'infrastructure/' directory is deleted (default).
5070
5161
  -h, --help Show this message.
5071
5162
  `.trim();
5072
- function main27() {
5163
+ function main28() {
5073
5164
  const command = args[0];
5074
5165
  if (!command || command === "--help" || command === "-h") {
5075
5166
  console.log(USAGE);
@@ -5144,4 +5235,4 @@ function handleCheckTranslations() {
5144
5235
  console.warn("This command is not implemented yet!");
5145
5236
  process.exit(1);
5146
5237
  }
5147
- main27();
5238
+ main28();
@@ -429,6 +429,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
429
429
  input: {
430
430
  eventId: string;
431
431
  customActionType?: string | undefined;
432
+ waitFor?: boolean | undefined;
432
433
  };
433
434
  output: {
434
435
  id: string & import("zod").$brand<"UUID">;
@@ -1097,18 +1098,17 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1097
1098
  }>;
1098
1099
  create: import("@trpc/server").TRPCMutationProcedure<{
1099
1100
  input: {
1100
- eventId: string;
1101
1101
  transactionId: string;
1102
+ eventId: string;
1102
1103
  type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "CUSTOM" | "CREATE" | "DUPLICATE_DETECTED" | "MARK_AS_NOT_DUPLICATE" | "NOTIFY" | "ASSIGN" | "APPROVE_CORRECTION" | "REJECT_CORRECTION" | "UNASSIGN";
1103
1104
  status: "Requested" | "Accepted" | "Rejected";
1105
+ createdAtLocation?: string | null | undefined;
1104
1106
  declaration?: Record<string, unknown> | undefined;
1105
1107
  annotation?: Record<string, unknown> | undefined;
1106
1108
  originalActionId?: string | undefined;
1107
1109
  keepAssignment?: boolean | undefined;
1108
1110
  keepAssignmentIfAccepted?: boolean | undefined;
1109
1111
  keepAssignmentIfRejected?: boolean | undefined;
1110
- waitFor?: boolean | undefined;
1111
- createdAtLocation?: string | null | undefined;
1112
1112
  };
1113
1113
  output: {
1114
1114
  id: string & import("zod").$brand<"UUID">;
@@ -1439,12 +1439,352 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1439
1439
  transactionId: import("zod").ZodString;
1440
1440
  eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
1441
1441
  keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
1442
+ waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
1442
1443
  actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
1443
1444
  }, import("zod/v4/core").$strip>>;
1444
1445
  output: import("../commons").EventDocument;
1445
1446
  meta: import("trpc-to-openapi").OpenApiMeta;
1446
1447
  }>;
1447
1448
  }>>;
1449
+ createAndNotify: import("@trpc/server").TRPCBuiltRouter<{
1450
+ ctx: Partial<{
1451
+ token: `Bearer ${string}`;
1452
+ user: {
1453
+ id: string & import("zod").$brand<"UUID">;
1454
+ type: "system";
1455
+ signature?: undefined;
1456
+ primaryOfficeId?: (string & import("zod").$brand<"UUID">) | undefined;
1457
+ administrativeAreaId?: (string & import("zod").$brand<"UUID">) | undefined;
1458
+ } | {
1459
+ id: string & import("zod").$brand<"UUID">;
1460
+ type: "user";
1461
+ role: string;
1462
+ primaryOfficeId: string & import("zod").$brand<"UUID">;
1463
+ signature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1464
+ administrativeAreaId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1465
+ };
1466
+ }>;
1467
+ meta: import("trpc-to-openapi").OpenApiMeta;
1468
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
1469
+ transformer: true;
1470
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1471
+ request: import("@trpc/server").TRPCMutationProcedure<{
1472
+ input: {
1473
+ transactionId: string;
1474
+ eventType: string;
1475
+ createdAtLocation: string;
1476
+ declaration?: Record<string, unknown> | undefined;
1477
+ annotation?: Record<string, unknown> | undefined;
1478
+ originalActionId?: string | undefined;
1479
+ keepAssignment?: boolean | undefined;
1480
+ keepAssignmentIfAccepted?: boolean | undefined;
1481
+ keepAssignmentIfRejected?: boolean | undefined;
1482
+ waitFor?: boolean | undefined;
1483
+ };
1484
+ output: {
1485
+ id: string & import("zod").$brand<"UUID">;
1486
+ type: string;
1487
+ createdAt: string;
1488
+ updatedAt: string;
1489
+ actions: ({
1490
+ id: string & import("zod").$brand<"UUID">;
1491
+ transactionId: string;
1492
+ createdByUserType: "system" | "user";
1493
+ createdAt: string;
1494
+ createdBy: string;
1495
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1496
+ status: "Requested" | "Accepted" | "Rejected";
1497
+ type: "CREATE";
1498
+ createdByRole?: string | undefined;
1499
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1500
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1501
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1502
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1503
+ } | {
1504
+ id: string & import("zod").$brand<"UUID">;
1505
+ transactionId: string;
1506
+ createdByUserType: "system" | "user";
1507
+ createdAt: string;
1508
+ createdBy: string;
1509
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1510
+ status: "Requested" | "Accepted" | "Rejected";
1511
+ type: "REJECT";
1512
+ content: {
1513
+ reason: string;
1514
+ };
1515
+ createdByRole?: string | undefined;
1516
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1517
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1518
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1519
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1520
+ } | {
1521
+ id: string & import("zod").$brand<"UUID">;
1522
+ transactionId: string;
1523
+ createdByUserType: "system" | "user";
1524
+ createdAt: string;
1525
+ createdBy: string;
1526
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1527
+ status: "Requested" | "Accepted" | "Rejected";
1528
+ type: "DUPLICATE_DETECTED";
1529
+ content: {
1530
+ duplicates: {
1531
+ id: string & import("zod").$brand<"UUID">;
1532
+ trackingId: string;
1533
+ }[];
1534
+ };
1535
+ createdByRole?: string | undefined;
1536
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1537
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1538
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1539
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1540
+ } | {
1541
+ id: string & import("zod").$brand<"UUID">;
1542
+ transactionId: string;
1543
+ createdByUserType: "system" | "user";
1544
+ createdAt: string;
1545
+ createdBy: string;
1546
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1547
+ status: "Requested" | "Accepted" | "Rejected";
1548
+ type: "MARK_AS_NOT_DUPLICATE";
1549
+ createdByRole?: string | undefined;
1550
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1551
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1552
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1553
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1554
+ } | {
1555
+ id: string & import("zod").$brand<"UUID">;
1556
+ transactionId: string;
1557
+ createdByUserType: "system" | "user";
1558
+ createdAt: string;
1559
+ createdBy: string;
1560
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1561
+ status: "Requested" | "Accepted" | "Rejected";
1562
+ type: "MARK_AS_DUPLICATE";
1563
+ createdByRole?: string | undefined;
1564
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1565
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1566
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1567
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1568
+ content?: {
1569
+ duplicateOf: string & import("zod").$brand<"UUID">;
1570
+ } | undefined;
1571
+ } | {
1572
+ id: string & import("zod").$brand<"UUID">;
1573
+ transactionId: string;
1574
+ createdByUserType: "system" | "user";
1575
+ createdAt: string;
1576
+ createdBy: string;
1577
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1578
+ status: "Requested" | "Accepted" | "Rejected";
1579
+ type: "ARCHIVE";
1580
+ content: {
1581
+ reason: string;
1582
+ };
1583
+ createdByRole?: string | undefined;
1584
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1585
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1586
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1587
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1588
+ } | {
1589
+ id: string & import("zod").$brand<"UUID">;
1590
+ transactionId: string;
1591
+ createdByUserType: "system" | "user";
1592
+ createdAt: string;
1593
+ createdBy: string;
1594
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1595
+ status: "Requested" | "Accepted" | "Rejected";
1596
+ type: "NOTIFY";
1597
+ createdByRole?: string | undefined;
1598
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1599
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1600
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1601
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1602
+ } | {
1603
+ id: string & import("zod").$brand<"UUID">;
1604
+ transactionId: string;
1605
+ createdByUserType: "system" | "user";
1606
+ createdAt: string;
1607
+ createdBy: string;
1608
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1609
+ status: "Requested" | "Accepted" | "Rejected";
1610
+ type: "REGISTER";
1611
+ createdByRole?: string | undefined;
1612
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1613
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1614
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1615
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1616
+ registrationNumber?: string | undefined;
1617
+ } | {
1618
+ id: string & import("zod").$brand<"UUID">;
1619
+ transactionId: string;
1620
+ createdByUserType: "system" | "user";
1621
+ createdAt: string;
1622
+ createdBy: string;
1623
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1624
+ status: "Requested" | "Accepted" | "Rejected";
1625
+ type: "DECLARE";
1626
+ createdByRole?: string | undefined;
1627
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1628
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1629
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1630
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1631
+ } | {
1632
+ id: string & import("zod").$brand<"UUID">;
1633
+ transactionId: string;
1634
+ createdByUserType: "system" | "user";
1635
+ createdAt: string;
1636
+ createdBy: string;
1637
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1638
+ status: "Requested" | "Accepted" | "Rejected";
1639
+ type: "ASSIGN";
1640
+ assignedTo: string;
1641
+ createdByRole?: string | undefined;
1642
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1643
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1644
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1645
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1646
+ } | {
1647
+ id: string & import("zod").$brand<"UUID">;
1648
+ transactionId: string;
1649
+ createdByUserType: "system" | "user";
1650
+ createdAt: string;
1651
+ createdBy: string;
1652
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1653
+ status: "Requested" | "Accepted" | "Rejected";
1654
+ type: "REQUEST_CORRECTION";
1655
+ createdByRole?: string | undefined;
1656
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1657
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1658
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1659
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1660
+ } | {
1661
+ id: string & import("zod").$brand<"UUID">;
1662
+ transactionId: string;
1663
+ createdByUserType: "system" | "user";
1664
+ createdAt: string;
1665
+ createdBy: string;
1666
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1667
+ status: "Requested" | "Accepted" | "Rejected";
1668
+ type: "APPROVE_CORRECTION";
1669
+ requestId: string;
1670
+ createdByRole?: string | undefined;
1671
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1672
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1673
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1674
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1675
+ } | {
1676
+ id: string & import("zod").$brand<"UUID">;
1677
+ transactionId: string;
1678
+ createdByUserType: "system" | "user";
1679
+ createdAt: string;
1680
+ createdBy: string;
1681
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1682
+ status: "Requested" | "Accepted" | "Rejected";
1683
+ type: "REJECT_CORRECTION";
1684
+ requestId: string;
1685
+ content: {
1686
+ reason: string;
1687
+ };
1688
+ createdByRole?: string | undefined;
1689
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1690
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1691
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1692
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1693
+ } | {
1694
+ id: string & import("zod").$brand<"UUID">;
1695
+ transactionId: string;
1696
+ createdByUserType: "system" | "user";
1697
+ createdAt: string;
1698
+ createdBy: string;
1699
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1700
+ status: "Requested" | "Accepted" | "Rejected";
1701
+ type: "UNASSIGN";
1702
+ createdByRole?: string | undefined;
1703
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1704
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1705
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1706
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1707
+ } | {
1708
+ id: string & import("zod").$brand<"UUID">;
1709
+ transactionId: string;
1710
+ createdByUserType: "system" | "user";
1711
+ createdAt: string;
1712
+ createdBy: string;
1713
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1714
+ status: "Requested" | "Accepted" | "Rejected";
1715
+ type: "PRINT_CERTIFICATE";
1716
+ createdByRole?: string | undefined;
1717
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1718
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1719
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1720
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1721
+ content?: {
1722
+ templateId?: string | undefined;
1723
+ } | null | undefined;
1724
+ } | {
1725
+ id: string & import("zod").$brand<"UUID">;
1726
+ transactionId: string;
1727
+ createdByUserType: "system" | "user";
1728
+ createdAt: string;
1729
+ createdBy: string;
1730
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1731
+ status: "Requested" | "Accepted" | "Rejected";
1732
+ type: "READ";
1733
+ createdByRole?: string | undefined;
1734
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1735
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1736
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1737
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1738
+ } | {
1739
+ id: string & import("zod").$brand<"UUID">;
1740
+ transactionId: string;
1741
+ createdByUserType: "system" | "user";
1742
+ createdAt: string;
1743
+ createdBy: string;
1744
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1745
+ status: "Requested" | "Accepted" | "Rejected";
1746
+ type: "EDIT";
1747
+ content: {
1748
+ comment?: string | undefined;
1749
+ };
1750
+ createdByRole?: string | undefined;
1751
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1752
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1753
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1754
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1755
+ } | {
1756
+ id: string & import("zod").$brand<"UUID">;
1757
+ transactionId: string;
1758
+ createdByUserType: "system" | "user";
1759
+ createdAt: string;
1760
+ createdBy: string;
1761
+ declaration: Record<string, import("../commons").FieldUpdateValue>;
1762
+ status: "Requested" | "Accepted" | "Rejected";
1763
+ type: "CUSTOM";
1764
+ customActionType: string;
1765
+ createdByRole?: string | undefined;
1766
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1767
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1768
+ annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
1769
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1770
+ } | {
1771
+ id: string & import("zod").$brand<"UUID">;
1772
+ transactionId: string;
1773
+ createdByUserType: "system" | "user";
1774
+ createdAt: string;
1775
+ createdBy: string;
1776
+ type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "APPROVE_CORRECTION" | "REJECT_CORRECTION";
1777
+ status: "Rejected";
1778
+ createdByRole?: string | undefined;
1779
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1780
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
1781
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1782
+ })[];
1783
+ trackingId: string;
1784
+ };
1785
+ meta: import("trpc-to-openapi").OpenApiMeta;
1786
+ }>;
1787
+ }>>;
1448
1788
  declare: import("@trpc/server").TRPCBuiltRouter<{
1449
1789
  ctx: Partial<{
1450
1790
  token: `Bearer ${string}`;
@@ -2042,6 +2382,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2042
2382
  transactionId: import("zod").ZodString;
2043
2383
  eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
2044
2384
  keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
2385
+ waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
2045
2386
  actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
2046
2387
  }, import("zod/v4/core").$strip>>;
2047
2388
  output: import("../commons").EventDocument;
@@ -2333,6 +2674,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2333
2674
  transactionId: import("zod").ZodString;
2334
2675
  eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
2335
2676
  keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
2677
+ waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
2336
2678
  actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
2337
2679
  }, import("zod/v4/core").$strip>>;
2338
2680
  output: import("../commons").EventDocument;
@@ -2624,6 +2966,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2624
2966
  transactionId: import("zod").ZodString;
2625
2967
  eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
2626
2968
  keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
2969
+ waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
2627
2970
  actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
2628
2971
  }, import("zod/v4/core").$strip>>;
2629
2972
  output: import("../commons").EventDocument;
@@ -2915,6 +3258,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2915
3258
  transactionId: import("zod").ZodString;
2916
3259
  eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
2917
3260
  keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
3261
+ waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
2918
3262
  actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
2919
3263
  }, import("zod/v4/core").$strip>>;
2920
3264
  output: import("../commons").EventDocument;
@@ -3206,6 +3550,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3206
3550
  transactionId: import("zod").ZodString;
3207
3551
  eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
3208
3552
  keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
3553
+ waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
3209
3554
  actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
3210
3555
  }, import("zod/v4/core").$strip>>;
3211
3556
  output: import("../commons").EventDocument;
@@ -3497,6 +3842,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3497
3842
  transactionId: import("zod").ZodString;
3498
3843
  eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
3499
3844
  keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
3845
+ waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
3500
3846
  actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
3501
3847
  }, import("zod/v4/core").$strip>>;
3502
3848
  output: import("../commons").EventDocument;
@@ -4101,6 +4447,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4101
4447
  transactionId: import("zod").ZodString;
4102
4448
  eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
4103
4449
  keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
4450
+ waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
4104
4451
  actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
4105
4452
  }, import("zod/v4/core").$strip>>;
4106
4453
  output: import("../commons").EventDocument;
@@ -5073,6 +5420,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5073
5420
  transactionId: import("zod").ZodString;
5074
5421
  eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
5075
5422
  keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
5423
+ waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
5076
5424
  actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
5077
5425
  }, import("zod/v4/core").$strip>>;
5078
5426
  output: import("../commons").EventDocument;
@@ -5364,6 +5712,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5364
5712
  transactionId: import("zod").ZodString;
5365
5713
  eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
5366
5714
  keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
5715
+ waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
5367
5716
  actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
5368
5717
  }, import("zod/v4/core").$strip>>;
5369
5718
  output: import("../commons").EventDocument;
@@ -5655,6 +6004,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5655
6004
  transactionId: import("zod").ZodString;
5656
6005
  eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
5657
6006
  keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
6007
+ waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
5658
6008
  actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
5659
6009
  }, import("zod/v4/core").$strip>>;
5660
6010
  output: import("../commons").EventDocument;
@@ -7740,7 +8090,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
7740
8090
  $event: "id" | "createdBy" | "createdAt" | "status" | "createdByUserType" | "createdAtLocation" | "updatedAt" | "assignedTo" | "trackingId" | "type" | "flags" | "dateOfEvent" | "placeOfEvent" | "title" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "outbox";
7741
8091
  };
7742
8092
  }[];
7743
- icon: "Archived" | "Assigned" | "Briefcase" | "Certified" | "Close" | "Collapse" | "Draft" | "DuplicateYellow" | "Expand" | "ExternalValidate" | "FilledCheck" | "InReview" | "Offline" | "Registered" | "RequiresUpdates" | "Sent" | "Validated" | "WaitingApproval" | "ChartActivity" | "Activity" | "Archive" | "ArchiveTray" | "ArrowLeft" | "ArrowRight" | "Buildings" | "Circle" | "CaretDown" | "CaretLeft" | "CaretRight" | "ChartBar" | "ChartLine" | "ChatCircle" | "CheckSquare" | "Compass" | "Check" | "Copy" | "Database" | "DotsThreeVertical" | "ArrowCounterClockwise" | "MagnifyingGlassMinus" | "MagnifyingGlassPlus" | "Export" | "Eye" | "EyeSlash" | "Envelope" | "File" | "FileSearch" | "FileMinus" | "FilePlus" | "FileText" | "FileX" | "Handshake" | "Gear" | "GitBranch" | "IdentificationCard" | "List" | "ListBullets" | "Lock" | "MagnifyingGlass" | "MapPin" | "Medal" | "NotePencil" | "Paperclip" | "PaperPlaneTilt" | "Pen" | "PenNib" | "Pencil" | "PencilSimpleLine" | "Phone" | "Plus" | "Printer" | "SignOut" | "Stamp" | "Star" | "Target" | "TextT" | "Trash" | "UploadSimple" | "User" | "UserPlus" | "Users" | "WarningCircle" | "X" | "ChatText" | "CircleWavyCheck" | "CircleWavyQuestion" | "ArchiveBox" | "ArrowCircleDown" | "FileArrowUp" | "FileDotted" | "Files" | "PencilLine" | "PencilCircle" | "UserCircle" | "Clock" | "QrCode" | "Webcam" | "Sun" | "DeviceTabletCamera" | "Globe" | "Fingerprint" | "PushPin" | "Timer";
8093
+ icon: "File" | "Archived" | "Assigned" | "Briefcase" | "Certified" | "Close" | "Collapse" | "Draft" | "DuplicateYellow" | "Expand" | "ExternalValidate" | "FilledCheck" | "InReview" | "Offline" | "Registered" | "RequiresUpdates" | "Sent" | "Validated" | "WaitingApproval" | "ChartActivity" | "Activity" | "Archive" | "ArchiveTray" | "ArrowLeft" | "ArrowRight" | "Buildings" | "Circle" | "CaretDown" | "CaretLeft" | "CaretRight" | "ChartBar" | "ChartLine" | "ChatCircle" | "CheckSquare" | "Compass" | "Check" | "Copy" | "Database" | "DotsThreeVertical" | "ArrowCounterClockwise" | "MagnifyingGlassMinus" | "MagnifyingGlassPlus" | "Export" | "Eye" | "EyeSlash" | "Envelope" | "FileSearch" | "FileMinus" | "FilePlus" | "FileText" | "FileX" | "Handshake" | "Gear" | "GitBranch" | "IdentificationCard" | "List" | "ListBullets" | "Lock" | "MagnifyingGlass" | "MapPin" | "Medal" | "NotePencil" | "Paperclip" | "PaperPlaneTilt" | "Pen" | "PenNib" | "Pencil" | "PencilSimpleLine" | "Phone" | "Plus" | "Printer" | "SignOut" | "Stamp" | "Star" | "Target" | "TextT" | "Trash" | "UploadSimple" | "User" | "UserPlus" | "Users" | "WarningCircle" | "X" | "ChatText" | "CircleWavyCheck" | "CircleWavyQuestion" | "ArchiveBox" | "ArrowCircleDown" | "FileArrowUp" | "FileDotted" | "Files" | "PencilLine" | "PencilCircle" | "UserCircle" | "Clock" | "QrCode" | "Webcam" | "Sun" | "DeviceTabletCamera" | "Globe" | "Fingerprint" | "PushPin" | "Timer";
7744
8094
  action?: {
7745
8095
  type: "DELETE" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ";
7746
8096
  } | undefined;