@opencrvs/toolkit 2.1.0-rc.c3b24ba → 2.1.0-rc.c500a81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/README.md +3 -12
  2. package/build.sh +12 -4
  3. package/create-countryconfig/index.js +441 -59
  4. package/create-countryconfig/node_modules/.bin/degit +21 -0
  5. package/create-countryconfig/package.json +4 -1
  6. package/dist/application-config/index.js +347 -283
  7. package/dist/authentication/index.d.ts +67 -0
  8. package/dist/authentication/index.d.ts.map +1 -0
  9. package/dist/authentication/index.js +751 -0
  10. package/dist/cli.js +3011 -1226
  11. package/dist/commons/api/router.d.ts +658 -132
  12. package/dist/commons/application-config/index.d.ts +0 -2
  13. package/dist/commons/conditionals/conditionals.d.ts +6 -6
  14. package/dist/commons/conditionals/validate.d.ts +16 -5
  15. package/dist/commons/events/ActionConfig.d.ts +4 -0
  16. package/dist/commons/events/ActionDocument.d.ts +35 -15
  17. package/dist/commons/events/ActionInput.d.ts +4 -4
  18. package/dist/commons/events/ActionStatus.d.ts +14 -0
  19. package/dist/commons/events/AdvancedSearchConfig.d.ts +30 -12
  20. package/dist/commons/events/AuditLog.d.ts +110 -0
  21. package/dist/commons/events/EventConfig.d.ts +3 -0
  22. package/dist/commons/events/EventDocument.d.ts +472 -4
  23. package/dist/commons/events/EventIndex.d.ts +3 -26
  24. package/dist/commons/events/EventMetadata.d.ts +1 -11
  25. package/dist/commons/events/EventStatus.d.ts +19 -0
  26. package/dist/commons/events/FieldConfig.d.ts +94 -63
  27. package/dist/commons/events/FieldTypeMapping.d.ts +27 -27
  28. package/dist/commons/events/FieldValue.d.ts +3 -2
  29. package/dist/commons/events/Flag.d.ts +42 -0
  30. package/dist/commons/events/FormConfig.d.ts +6 -0
  31. package/dist/commons/events/PageConfig.d.ts +4 -0
  32. package/dist/commons/events/PlainDate.d.ts +8 -0
  33. package/dist/commons/events/SummaryConfig.d.ts +249 -0
  34. package/dist/commons/events/WorkqueueConfig.d.ts +17 -14
  35. package/dist/commons/events/event.d.ts +12 -0
  36. package/dist/commons/events/locations.d.ts +162 -26
  37. package/dist/commons/events/mocks.test.utils.d.ts +30 -0
  38. package/dist/commons/events/test.utils.d.ts +73 -18
  39. package/dist/commons/events/utils.d.ts +34 -4
  40. package/dist/commons/notification/UserNotifications.d.ts +28 -13
  41. package/dist/commons/notification/dispatch.d.ts +10 -0
  42. package/dist/commons/notification/index.d.ts +1 -0
  43. package/dist/conditionals/index.js +334 -64
  44. package/dist/csv.d.ts +25 -0
  45. package/dist/csv.d.ts.map +1 -0
  46. package/dist/csv.js +120 -0
  47. package/dist/environment/index.d.ts +1 -0
  48. package/dist/environment/index.d.ts.map +1 -1
  49. package/dist/environment/index.js +12 -1
  50. package/dist/environment/logger.d.ts +15 -3
  51. package/dist/environment/logger.d.ts.map +1 -1
  52. package/dist/environment/manage-users.js +1 -1
  53. package/dist/environment/paths.d.ts +7 -0
  54. package/dist/environment/paths.d.ts.map +1 -0
  55. package/dist/environment/paths.js +72 -0
  56. package/dist/environment/questions.d.ts.map +1 -1
  57. package/dist/environment/questions.js +20 -14
  58. package/dist/environment/setup-environment.d.ts +1 -1
  59. package/dist/environment/setup-environment.d.ts.map +1 -1
  60. package/dist/environment/setup-environment.js +587 -562
  61. package/dist/environment/templates.d.ts +0 -1
  62. package/dist/environment/templates.d.ts.map +1 -1
  63. package/dist/environment/templates.js +5 -9
  64. package/dist/environment/update-workflows.d.ts.map +1 -1
  65. package/dist/environment/update-workflows.js +21 -5
  66. package/dist/environment/upgrade.d.ts +2 -0
  67. package/dist/environment/upgrade.d.ts.map +1 -0
  68. package/dist/environment/upgrade.js +82 -0
  69. package/dist/environment/users.js +11 -13
  70. package/dist/environment/utils.d.ts +0 -12
  71. package/dist/environment/utils.d.ts.map +1 -1
  72. package/dist/environment/utils.js +1 -28
  73. package/dist/events/index.js +7597 -7129
  74. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +2 -2
  75. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
  76. package/dist/migrations/v2.0/checkout-upstream-files.js +2 -2
  77. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +1 -1
  78. package/dist/migrations/v2.0/convert-config-files-to-ts.js +3 -10
  79. package/dist/migrations/v2.0/merge-infrastructure-directory.js +3 -3
  80. package/dist/migrations/v2.1/add-recovery-link-notifications.d.ts +3 -0
  81. package/dist/migrations/v2.1/add-recovery-link-notifications.d.ts.map +1 -0
  82. package/dist/migrations/v2.1/add-recovery-link-notifications.js +511 -0
  83. package/dist/migrations/v2.1/add-translations.d.ts +9 -0
  84. package/dist/migrations/v2.1/add-translations.d.ts.map +1 -0
  85. package/dist/migrations/v2.1/add-translations.js +149 -0
  86. package/dist/migrations/v2.1/enable-telemetry.d.ts +3 -0
  87. package/dist/migrations/v2.1/enable-telemetry.d.ts.map +1 -0
  88. package/dist/migrations/v2.1/enable-telemetry.js +455 -0
  89. package/dist/migrations/v2.1/index.d.ts.map +1 -1
  90. package/dist/migrations/v2.1/index.js +1223 -0
  91. package/dist/migrations/v2.1/rename-trigger-paths.d.ts +3 -0
  92. package/dist/migrations/v2.1/rename-trigger-paths.d.ts.map +1 -0
  93. package/dist/migrations/v2.1/rename-trigger-paths.js +216 -0
  94. package/dist/notification/index.js +1800 -1454
  95. package/dist/scopes/index.d.ts +433 -36
  96. package/dist/scopes/index.js +335 -64
  97. package/dist/telemetry/index.d.ts +45 -0
  98. package/dist/telemetry/index.d.ts.map +1 -0
  99. package/dist/telemetry/index.js +43 -0
  100. package/dist/templates/charts-values/dependencies/values.yaml +2 -0
  101. package/dist/templates/charts-values/opencrvs-services/values.yaml +4 -3
  102. package/dist/templates/charts-values/opentelemetry/values.yaml +102 -0
  103. package/dist/templates/charts-values/traefik/values.yaml +23 -9
  104. package/dist/templates/inventory/inventory.template.yml +1 -3
  105. package/dist/translations/template.d.ts +11 -0
  106. package/dist/translations/template.d.ts.map +1 -0
  107. package/dist/translations/template.js +100 -0
  108. package/dist/verify/endpoints.d.ts +2 -0
  109. package/dist/verify/endpoints.d.ts.map +1 -0
  110. package/dist/verify/endpoints.js +510 -0
  111. package/opencrvs-toolkit-2.1.0-rc.c500a81.tgz +0 -0
  112. package/package.json +13 -7
  113. package/tsconfig.build.json +11 -0
  114. package/tsconfig.build.tsbuildinfo +1 -0
  115. package/tsconfig.json +3 -0
  116. package/dist/templates/inventory/production.example.yml +0 -77
  117. package/dist/templates/inventory/qa.example.yml +0 -48
  118. package/opencrvs-toolkit-2.1.0-rc.c3b24ba.tgz +0 -0
  119. package/tsconfig.tsbuildinfo +0 -1
@@ -223,9 +223,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
223
223
  status: "Accepted" | "Rejected" | "Requested";
224
224
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
225
225
  type: "ARCHIVE";
226
- content: {
226
+ content?: {
227
227
  reason: string;
228
- };
228
+ } | undefined;
229
229
  } | {
230
230
  id: string & import("zod").$brand<"UUID">;
231
231
  transactionId: string;
@@ -326,7 +326,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
326
326
  status: "Accepted" | "Rejected" | "Requested";
327
327
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
328
328
  type: "APPROVE_CORRECTION";
329
- requestId: string;
329
+ requestId: string & import("zod").$brand<"UUID">;
330
330
  content?: {
331
331
  immediateCorrection?: boolean | undefined;
332
332
  } | undefined;
@@ -344,7 +344,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
344
344
  status: "Accepted" | "Rejected" | "Requested";
345
345
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
346
346
  type: "REJECT_CORRECTION";
347
- requestId: string;
347
+ requestId: string & import("zod").$brand<"UUID">;
348
348
  content: {
349
349
  reason: string;
350
350
  };
@@ -549,9 +549,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
549
549
  status: "Accepted" | "Rejected" | "Requested";
550
550
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
551
551
  type: "ARCHIVE";
552
- content: {
552
+ content?: {
553
553
  reason: string;
554
- };
554
+ } | undefined;
555
555
  } | {
556
556
  id: string & import("zod").$brand<"UUID">;
557
557
  transactionId: string;
@@ -652,7 +652,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
652
652
  status: "Accepted" | "Rejected" | "Requested";
653
653
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
654
654
  type: "APPROVE_CORRECTION";
655
- requestId: string;
655
+ requestId: string & import("zod").$brand<"UUID">;
656
656
  content?: {
657
657
  immediateCorrection?: boolean | undefined;
658
658
  } | undefined;
@@ -670,7 +670,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
670
670
  status: "Accepted" | "Rejected" | "Requested";
671
671
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
672
672
  type: "REJECT_CORRECTION";
673
- requestId: string;
673
+ requestId: string & import("zod").$brand<"UUID">;
674
674
  content: {
675
675
  reason: string;
676
676
  };
@@ -874,9 +874,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
874
874
  status: "Accepted" | "Rejected" | "Requested";
875
875
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
876
876
  type: "ARCHIVE";
877
- content: {
877
+ content?: {
878
878
  reason: string;
879
- };
879
+ } | undefined;
880
880
  } | {
881
881
  id: string & import("zod").$brand<"UUID">;
882
882
  transactionId: string;
@@ -977,7 +977,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
977
977
  status: "Accepted" | "Rejected" | "Requested";
978
978
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
979
979
  type: "APPROVE_CORRECTION";
980
- requestId: string;
980
+ requestId: string & import("zod").$brand<"UUID">;
981
981
  content?: {
982
982
  immediateCorrection?: boolean | undefined;
983
983
  } | undefined;
@@ -995,7 +995,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
995
995
  status: "Accepted" | "Rejected" | "Requested";
996
996
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
997
997
  type: "REJECT_CORRECTION";
998
- requestId: string;
998
+ requestId: string & import("zod").$brand<"UUID">;
999
999
  content: {
1000
1000
  reason: string;
1001
1001
  };
@@ -1183,6 +1183,38 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1183
1183
  meta: import("trpc-to-openapi").OpenApiMeta;
1184
1184
  }>;
1185
1185
  }>>;
1186
+ file: import("@trpc/server").TRPCBuiltRouter<{
1187
+ ctx: Partial<{
1188
+ token: `Bearer ${string}`;
1189
+ user: {
1190
+ id: string & import("zod").$brand<"UUID">;
1191
+ type: "system";
1192
+ primaryOfficeId?: (string & import("zod").$brand<"UUID">) | undefined;
1193
+ administrativeAreaId?: (string & import("zod").$brand<"UUID">) | undefined;
1194
+ signature?: undefined;
1195
+ } | {
1196
+ id: string & import("zod").$brand<"UUID">;
1197
+ role: string;
1198
+ signature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
1199
+ primaryOfficeId: string & import("zod").$brand<"UUID">;
1200
+ administrativeAreaId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1201
+ type: "user";
1202
+ };
1203
+ }>;
1204
+ meta: import("trpc-to-openapi").OpenApiMeta;
1205
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
1206
+ transformer: true;
1207
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1208
+ getPresignedUrl: import("@trpc/server").TRPCQueryProcedure<{
1209
+ input: {
1210
+ filePath: string;
1211
+ };
1212
+ output: {
1213
+ presignedURL: string;
1214
+ };
1215
+ meta: import("trpc-to-openapi").OpenApiMeta;
1216
+ }>;
1217
+ }>>;
1186
1218
  actions: import("@trpc/server").TRPCBuiltRouter<{
1187
1219
  ctx: Partial<{
1188
1220
  token: `Bearer ${string}`;
@@ -1354,9 +1386,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1354
1386
  waitFor?: boolean | undefined;
1355
1387
  createdAtLocation?: string | null | undefined;
1356
1388
  type?: "ARCHIVE" | undefined;
1357
- content: {
1389
+ content?: {
1358
1390
  reason: string;
1359
- };
1391
+ } | undefined;
1360
1392
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
1361
1393
  eventId: string;
1362
1394
  transactionId: string;
@@ -1645,9 +1677,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1645
1677
  status: "Accepted" | "Rejected" | "Requested";
1646
1678
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1647
1679
  type: "ARCHIVE";
1648
- content: {
1680
+ content?: {
1649
1681
  reason: string;
1650
- };
1682
+ } | undefined;
1651
1683
  } | {
1652
1684
  id: string & import("zod").$brand<"UUID">;
1653
1685
  transactionId: string;
@@ -1748,7 +1780,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1748
1780
  status: "Accepted" | "Rejected" | "Requested";
1749
1781
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1750
1782
  type: "APPROVE_CORRECTION";
1751
- requestId: string;
1783
+ requestId: string & import("zod").$brand<"UUID">;
1752
1784
  content?: {
1753
1785
  immediateCorrection?: boolean | undefined;
1754
1786
  } | undefined;
@@ -1766,7 +1798,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1766
1798
  status: "Accepted" | "Rejected" | "Requested";
1767
1799
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1768
1800
  type: "REJECT_CORRECTION";
1769
- requestId: string;
1801
+ requestId: string & import("zod").$brand<"UUID">;
1770
1802
  content: {
1771
1803
  reason: string;
1772
1804
  };
@@ -2009,9 +2041,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2009
2041
  waitFor?: boolean | undefined;
2010
2042
  createdAtLocation?: string | null | undefined;
2011
2043
  type?: "ARCHIVE" | undefined;
2012
- content: {
2044
+ content?: {
2013
2045
  reason: string;
2014
- };
2046
+ } | undefined;
2015
2047
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2016
2048
  eventId: string;
2017
2049
  transactionId: string;
@@ -2278,9 +2310,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2278
2310
  status: "Accepted" | "Rejected" | "Requested";
2279
2311
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
2280
2312
  type: "ARCHIVE";
2281
- content: {
2313
+ content?: {
2282
2314
  reason: string;
2283
- };
2315
+ } | undefined;
2284
2316
  } | {
2285
2317
  id: string & import("zod").$brand<"UUID">;
2286
2318
  transactionId: string;
@@ -2381,7 +2413,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2381
2413
  status: "Accepted" | "Rejected" | "Requested";
2382
2414
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
2383
2415
  type: "APPROVE_CORRECTION";
2384
- requestId: string;
2416
+ requestId: string & import("zod").$brand<"UUID">;
2385
2417
  content?: {
2386
2418
  immediateCorrection?: boolean | undefined;
2387
2419
  } | undefined;
@@ -2399,7 +2431,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2399
2431
  status: "Accepted" | "Rejected" | "Requested";
2400
2432
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
2401
2433
  type: "REJECT_CORRECTION";
2402
- requestId: string;
2434
+ requestId: string & import("zod").$brand<"UUID">;
2403
2435
  content: {
2404
2436
  reason: string;
2405
2437
  };
@@ -2647,9 +2679,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2647
2679
  waitFor?: boolean | undefined;
2648
2680
  createdAtLocation?: string | null | undefined;
2649
2681
  type?: "ARCHIVE" | undefined;
2650
- content: {
2682
+ content?: {
2651
2683
  reason: string;
2652
- };
2684
+ } | undefined;
2653
2685
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2654
2686
  eventId: string;
2655
2687
  transactionId: string;
@@ -2951,9 +2983,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2951
2983
  waitFor?: boolean | undefined;
2952
2984
  createdAtLocation?: string | null | undefined;
2953
2985
  type?: "ARCHIVE" | undefined;
2954
- content: {
2986
+ content?: {
2955
2987
  reason: string;
2956
- };
2988
+ } | undefined;
2957
2989
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
2958
2990
  eventId: string;
2959
2991
  transactionId: string;
@@ -3255,9 +3287,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3255
3287
  waitFor?: boolean | undefined;
3256
3288
  createdAtLocation?: string | null | undefined;
3257
3289
  type?: "ARCHIVE" | undefined;
3258
- content: {
3290
+ content?: {
3259
3291
  reason: string;
3260
- };
3292
+ } | undefined;
3261
3293
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3262
3294
  eventId: string;
3263
3295
  transactionId: string;
@@ -3559,9 +3591,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3559
3591
  waitFor?: boolean | undefined;
3560
3592
  createdAtLocation?: string | null | undefined;
3561
3593
  type?: "ARCHIVE" | undefined;
3562
- content: {
3594
+ content?: {
3563
3595
  reason: string;
3564
- };
3596
+ } | undefined;
3565
3597
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3566
3598
  eventId: string;
3567
3599
  transactionId: string;
@@ -3863,9 +3895,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3863
3895
  waitFor?: boolean | undefined;
3864
3896
  createdAtLocation?: string | null | undefined;
3865
3897
  type?: "ARCHIVE" | undefined;
3866
- content: {
3898
+ content?: {
3867
3899
  reason: string;
3868
- };
3900
+ } | undefined;
3869
3901
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
3870
3902
  eventId: string;
3871
3903
  transactionId: string;
@@ -4167,9 +4199,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4167
4199
  waitFor?: boolean | undefined;
4168
4200
  createdAtLocation?: string | null | undefined;
4169
4201
  type?: "ARCHIVE" | undefined;
4170
- content: {
4202
+ content?: {
4171
4203
  reason: string;
4172
- };
4204
+ } | undefined;
4173
4205
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4174
4206
  eventId: string;
4175
4207
  transactionId: string;
@@ -4466,9 +4498,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4466
4498
  waitFor?: boolean | undefined;
4467
4499
  createdAtLocation?: string | null | undefined;
4468
4500
  type?: "ARCHIVE" | undefined;
4469
- content: {
4501
+ content?: {
4470
4502
  reason: string;
4471
- };
4503
+ } | undefined;
4472
4504
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
4473
4505
  eventId: string;
4474
4506
  transactionId: string;
@@ -4736,9 +4768,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4736
4768
  status: "Accepted" | "Rejected" | "Requested";
4737
4769
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
4738
4770
  type: "ARCHIVE";
4739
- content: {
4771
+ content?: {
4740
4772
  reason: string;
4741
- };
4773
+ } | undefined;
4742
4774
  } | {
4743
4775
  id: string & import("zod").$brand<"UUID">;
4744
4776
  transactionId: string;
@@ -4839,7 +4871,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4839
4871
  status: "Accepted" | "Rejected" | "Requested";
4840
4872
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
4841
4873
  type: "APPROVE_CORRECTION";
4842
- requestId: string;
4874
+ requestId: string & import("zod").$brand<"UUID">;
4843
4875
  content?: {
4844
4876
  immediateCorrection?: boolean | undefined;
4845
4877
  } | undefined;
@@ -4857,7 +4889,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4857
4889
  status: "Accepted" | "Rejected" | "Requested";
4858
4890
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
4859
4891
  type: "REJECT_CORRECTION";
4860
- requestId: string;
4892
+ requestId: string & import("zod").$brand<"UUID">;
4861
4893
  content: {
4862
4894
  reason: string;
4863
4895
  };
@@ -4998,6 +5030,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4998
5030
  type: string;
4999
5031
  createdAt: string;
5000
5032
  updatedAt: string;
5033
+ trackingId: string;
5001
5034
  actions: ({
5002
5035
  id: string & import("zod").$brand<"UUID">;
5003
5036
  transactionId: string;
@@ -5094,9 +5127,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5094
5127
  status: "Accepted" | "Rejected" | "Requested";
5095
5128
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
5096
5129
  type: "ARCHIVE";
5097
- content: {
5130
+ content?: {
5098
5131
  reason: string;
5099
- };
5132
+ } | undefined;
5100
5133
  } | {
5101
5134
  id: string & import("zod").$brand<"UUID">;
5102
5135
  transactionId: string;
@@ -5197,7 +5230,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5197
5230
  status: "Accepted" | "Rejected" | "Requested";
5198
5231
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
5199
5232
  type: "APPROVE_CORRECTION";
5200
- requestId: string;
5233
+ requestId: string & import("zod").$brand<"UUID">;
5201
5234
  content?: {
5202
5235
  immediateCorrection?: boolean | undefined;
5203
5236
  } | undefined;
@@ -5215,7 +5248,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5215
5248
  status: "Accepted" | "Rejected" | "Requested";
5216
5249
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
5217
5250
  type: "REJECT_CORRECTION";
5218
- requestId: string;
5251
+ requestId: string & import("zod").$brand<"UUID">;
5219
5252
  content: {
5220
5253
  reason: string;
5221
5254
  };
@@ -5309,8 +5342,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5309
5342
  type: "APPROVE_CORRECTION" | "ARCHIVE" | "CUSTOM" | "DECLARE" | "EDIT" | "NOTIFY" | "PRINT_CERTIFICATE" | "REGISTER" | "REJECT" | "REJECT_CORRECTION" | "REQUEST_CORRECTION" | "UNARCHIVE";
5310
5343
  status: "Rejected";
5311
5344
  })[];
5312
- trackingId: string;
5313
- };
5345
+ } & import("zod").$brand<"EventDocumentOnlyLastAction">;
5314
5346
  meta: import("trpc-to-openapi").OpenApiMeta;
5315
5347
  }>;
5316
5348
  unassign: import("@trpc/server").TRPCMutationProcedure<{
@@ -5333,6 +5365,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5333
5365
  type: string;
5334
5366
  createdAt: string;
5335
5367
  updatedAt: string;
5368
+ trackingId: string;
5336
5369
  actions: ({
5337
5370
  id: string & import("zod").$brand<"UUID">;
5338
5371
  transactionId: string;
@@ -5429,9 +5462,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5429
5462
  status: "Accepted" | "Rejected" | "Requested";
5430
5463
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
5431
5464
  type: "ARCHIVE";
5432
- content: {
5465
+ content?: {
5433
5466
  reason: string;
5434
- };
5467
+ } | undefined;
5435
5468
  } | {
5436
5469
  id: string & import("zod").$brand<"UUID">;
5437
5470
  transactionId: string;
@@ -5532,7 +5565,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5532
5565
  status: "Accepted" | "Rejected" | "Requested";
5533
5566
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
5534
5567
  type: "APPROVE_CORRECTION";
5535
- requestId: string;
5568
+ requestId: string & import("zod").$brand<"UUID">;
5536
5569
  content?: {
5537
5570
  immediateCorrection?: boolean | undefined;
5538
5571
  } | undefined;
@@ -5550,7 +5583,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5550
5583
  status: "Accepted" | "Rejected" | "Requested";
5551
5584
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
5552
5585
  type: "REJECT_CORRECTION";
5553
- requestId: string;
5586
+ requestId: string & import("zod").$brand<"UUID">;
5554
5587
  content: {
5555
5588
  reason: string;
5556
5589
  };
@@ -5644,8 +5677,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5644
5677
  type: "APPROVE_CORRECTION" | "ARCHIVE" | "CUSTOM" | "DECLARE" | "EDIT" | "NOTIFY" | "PRINT_CERTIFICATE" | "REGISTER" | "REJECT" | "REJECT_CORRECTION" | "REQUEST_CORRECTION" | "UNARCHIVE";
5645
5678
  status: "Rejected";
5646
5679
  })[];
5647
- trackingId: string;
5648
- };
5680
+ } & import("zod").$brand<"EventDocumentOnlyLastAction">;
5649
5681
  meta: import("trpc-to-openapi").OpenApiMeta;
5650
5682
  }>;
5651
5683
  }>>;
@@ -5820,9 +5852,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5820
5852
  waitFor?: boolean | undefined;
5821
5853
  createdAtLocation?: string | null | undefined;
5822
5854
  type?: "ARCHIVE" | undefined;
5823
- content: {
5855
+ content?: {
5824
5856
  reason: string;
5825
- };
5857
+ } | undefined;
5826
5858
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
5827
5859
  eventId: string;
5828
5860
  transactionId: string;
@@ -6124,9 +6156,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
6124
6156
  waitFor?: boolean | undefined;
6125
6157
  createdAtLocation?: string | null | undefined;
6126
6158
  type?: "ARCHIVE" | undefined;
6127
- content: {
6159
+ content?: {
6128
6160
  reason: string;
6129
- };
6161
+ } | undefined;
6130
6162
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
6131
6163
  eventId: string;
6132
6164
  transactionId: string;
@@ -6428,9 +6460,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
6428
6460
  waitFor?: boolean | undefined;
6429
6461
  createdAtLocation?: string | null | undefined;
6430
6462
  type?: "ARCHIVE" | undefined;
6431
- content: {
6463
+ content?: {
6432
6464
  reason: string;
6433
- };
6465
+ } | undefined;
6434
6466
  }, "keepAssignmentIfAccepted" | "keepAssignmentIfRejected"> | Omit<{
6435
6467
  eventId: string;
6436
6468
  transactionId: string;
@@ -6724,9 +6756,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
6724
6756
  status: "Accepted" | "Rejected" | "Requested";
6725
6757
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
6726
6758
  type: "ARCHIVE";
6727
- content: {
6759
+ content?: {
6728
6760
  reason: string;
6729
- };
6761
+ } | undefined;
6730
6762
  } | {
6731
6763
  id: string & import("zod").$brand<"UUID">;
6732
6764
  transactionId: string;
@@ -6827,7 +6859,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
6827
6859
  status: "Accepted" | "Rejected" | "Requested";
6828
6860
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
6829
6861
  type: "APPROVE_CORRECTION";
6830
- requestId: string;
6862
+ requestId: string & import("zod").$brand<"UUID">;
6831
6863
  content?: {
6832
6864
  immediateCorrection?: boolean | undefined;
6833
6865
  } | undefined;
@@ -6845,7 +6877,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
6845
6877
  status: "Accepted" | "Rejected" | "Requested";
6846
6878
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
6847
6879
  type: "REJECT_CORRECTION";
6848
- requestId: string;
6880
+ requestId: string & import("zod").$brand<"UUID">;
6849
6881
  content: {
6850
6882
  reason: string;
6851
6883
  };
@@ -7058,9 +7090,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
7058
7090
  status: "Accepted" | "Rejected" | "Requested";
7059
7091
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
7060
7092
  type: "ARCHIVE";
7061
- content: {
7093
+ content?: {
7062
7094
  reason: string;
7063
- };
7095
+ } | undefined;
7064
7096
  } | {
7065
7097
  id: string & import("zod").$brand<"UUID">;
7066
7098
  transactionId: string;
@@ -7161,7 +7193,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
7161
7193
  status: "Accepted" | "Rejected" | "Requested";
7162
7194
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
7163
7195
  type: "APPROVE_CORRECTION";
7164
- requestId: string;
7196
+ requestId: string & import("zod").$brand<"UUID">;
7165
7197
  content?: {
7166
7198
  immediateCorrection?: boolean | undefined;
7167
7199
  } | undefined;
@@ -7179,7 +7211,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
7179
7211
  status: "Accepted" | "Rejected" | "Requested";
7180
7212
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
7181
7213
  type: "REJECT_CORRECTION";
7182
- requestId: string;
7214
+ requestId: string & import("zod").$brand<"UUID">;
7183
7215
  content: {
7184
7216
  reason: string;
7185
7217
  };
@@ -7443,9 +7475,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
7443
7475
  status: "Accepted" | "Rejected" | "Requested";
7444
7476
  originalActionId?: string | null | undefined;
7445
7477
  type: "ARCHIVE";
7446
- content: {
7478
+ content?: {
7447
7479
  reason: string;
7448
- };
7480
+ } | undefined;
7449
7481
  } | {
7450
7482
  id: string;
7451
7483
  transactionId: string;
@@ -8046,46 +8078,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8046
8078
  errorShape: import("@trpc/server").TRPCDefaultErrorShape;
8047
8079
  transformer: true;
8048
8080
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
8049
- record: import("@trpc/server").TRPCMutationProcedure<{
8050
- input: {
8051
- operation: "user.create_user";
8052
- requestData: {
8053
- subjectId: string;
8054
- role: string;
8055
- primaryOfficeId: string;
8056
- };
8057
- } | {
8058
- operation: "user.deactivate" | "user.reactivate";
8059
- requestData: {
8060
- subjectId: string;
8061
- reason: string;
8062
- comment?: string | undefined;
8063
- };
8064
- } | {
8065
- operation: "user.edit_user" | "user.logged_in" | "user.logged_out" | "user.password_changed" | "user.password_reset" | "user.password_reset_by_admin" | "user.resend_invite" | "user.username_reminder" | "user.username_reminder_by_admin";
8066
- requestData: {
8067
- subjectId: string;
8068
- };
8069
- } | {
8070
- operation: "user.email_address_changed";
8071
- requestData: {
8072
- subjectId: string;
8073
- };
8074
- responseSummary: {
8075
- email: string;
8076
- };
8077
- } | {
8078
- operation: "user.phone_number_changed";
8079
- requestData: {
8080
- subjectId: string;
8081
- };
8082
- responseSummary: {
8083
- phoneNumber: string;
8084
- };
8085
- };
8086
- output: void;
8087
- meta: import("trpc-to-openapi").OpenApiMeta;
8088
- }>;
8089
8081
  list: import("@trpc/server").TRPCQueryProcedure<{
8090
8082
  input: {
8091
8083
  userId: string;
@@ -8258,6 +8250,104 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8258
8250
  administrativeAreaId?: string | null | undefined;
8259
8251
  locationType?: string | null | undefined;
8260
8252
  };
8253
+ } | {
8254
+ id: string;
8255
+ clientId: string;
8256
+ clientType: "system" | "user";
8257
+ createdAt: string;
8258
+ operation: "locations.update";
8259
+ requestData: {
8260
+ id: string;
8261
+ versionId: string;
8262
+ name: string;
8263
+ externalId?: string | null | undefined;
8264
+ status: string;
8265
+ effectiveFrom: string;
8266
+ lastVersionId: string;
8267
+ };
8268
+ responseSummary: {
8269
+ previousVersionId: string;
8270
+ versionId: string;
8271
+ changed: {
8272
+ name?: {
8273
+ from: string;
8274
+ to: string;
8275
+ } | undefined;
8276
+ externalId?: {
8277
+ from: string | null;
8278
+ to: string | null;
8279
+ } | undefined;
8280
+ status?: {
8281
+ from: string;
8282
+ to: string;
8283
+ } | undefined;
8284
+ };
8285
+ };
8286
+ } | {
8287
+ id: string;
8288
+ clientId: string;
8289
+ clientType: "system" | "user";
8290
+ createdAt: string;
8291
+ operation: "administrativeAreas.update";
8292
+ requestData: {
8293
+ id: string;
8294
+ versionId: string;
8295
+ name: string;
8296
+ externalId?: string | null | undefined;
8297
+ status: string;
8298
+ effectiveFrom: string;
8299
+ lastVersionId: string;
8300
+ };
8301
+ responseSummary: {
8302
+ previousVersionId: string;
8303
+ versionId: string;
8304
+ changed: {
8305
+ name?: {
8306
+ from: string;
8307
+ to: string;
8308
+ } | undefined;
8309
+ externalId?: {
8310
+ from: string | null;
8311
+ to: string | null;
8312
+ } | undefined;
8313
+ status?: {
8314
+ from: string;
8315
+ to: string;
8316
+ } | undefined;
8317
+ };
8318
+ };
8319
+ } | {
8320
+ id: string;
8321
+ clientId: string;
8322
+ clientType: "system" | "user";
8323
+ createdAt: string;
8324
+ operation: "locations.withdrawVersion";
8325
+ requestData: {
8326
+ id: string;
8327
+ versionId: string;
8328
+ };
8329
+ responseSummary: {
8330
+ effectiveFrom: string;
8331
+ name: string;
8332
+ externalId?: string | null | undefined;
8333
+ status: string;
8334
+ };
8335
+ } | {
8336
+ id: string;
8337
+ clientId: string;
8338
+ clientType: "system" | "user";
8339
+ createdAt: string;
8340
+ operation: "administrativeAreas.withdrawVersion";
8341
+ requestData: {
8342
+ id: string;
8343
+ versionId: string;
8344
+ };
8345
+ responseSummary: {
8346
+ effectiveFrom: string;
8347
+ name: string;
8348
+ externalId?: string | null | undefined;
8349
+ status: string;
8350
+ };
8261
8351
  } | {
8262
8352
  id: string;
8263
8353
  clientId: string;
@@ -8394,27 +8484,65 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8394
8484
  }[];
8395
8485
  meta: object;
8396
8486
  }>;
8397
- set: import("@trpc/server").TRPCMutationProcedure<{
8487
+ create: import("@trpc/server").TRPCMutationProcedure<{
8398
8488
  input: {
8399
- id: string;
8489
+ id?: string | undefined;
8490
+ versionId?: string | undefined;
8400
8491
  name: string;
8401
8492
  externalId?: string | null | undefined;
8402
8493
  administrativeAreaId: string | null;
8403
8494
  locationType: string | null;
8404
- }[];
8405
- output: void;
8406
- meta: object;
8495
+ effectiveFrom?: string | undefined;
8496
+ status?: "active" | "inactive" | undefined;
8497
+ };
8498
+ output: {
8499
+ id: string & import("zod").$brand<"UUID">;
8500
+ name: string;
8501
+ externalId?: string | null | undefined;
8502
+ administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
8503
+ locationType: string | null;
8504
+ status: "active" | "inactive";
8505
+ versions: {
8506
+ versionId: string & import("zod").$brand<"UUID">;
8507
+ effectiveFrom: string;
8508
+ name: string;
8509
+ externalId?: string | null | undefined;
8510
+ status: "active" | "inactive";
8511
+ }[];
8512
+ };
8513
+ meta: import("trpc-to-openapi").OpenApiMeta;
8407
8514
  }>;
8408
- create: import("@trpc/server").TRPCMutationProcedure<{
8515
+ update: import("@trpc/server").TRPCMutationProcedure<{
8409
8516
  input: {
8410
- id?: string | undefined;
8517
+ id: string;
8411
8518
  versionId?: string | undefined;
8412
8519
  name: string;
8413
8520
  externalId?: string | null | undefined;
8414
- administrativeAreaId: string | null;
8415
- locationType: string | null;
8521
+ status: "active" | "inactive";
8416
8522
  effectiveFrom?: string | undefined;
8417
- status?: "active" | "inactive" | undefined;
8523
+ lastVersionId: string;
8524
+ };
8525
+ output: {
8526
+ id: string & import("zod").$brand<"UUID">;
8527
+ name: string;
8528
+ externalId?: string | null | undefined;
8529
+ administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
8530
+ locationType: string | null;
8531
+ status: "active" | "inactive";
8532
+ versions: {
8533
+ versionId: string & import("zod").$brand<"UUID">;
8534
+ effectiveFrom: string;
8535
+ name: string;
8536
+ externalId?: string | null | undefined;
8537
+ status: "active" | "inactive";
8538
+ }[];
8539
+ };
8540
+ meta: import("trpc-to-openapi").OpenApiMeta;
8541
+ }>;
8542
+ withdrawVersion: import("@trpc/server").TRPCMutationProcedure<{
8543
+ input: {
8544
+ id: string;
8545
+ versionId: string;
8418
8546
  };
8419
8547
  output: {
8420
8548
  id: string & import("zod").$brand<"UUID">;
@@ -8807,7 +8935,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8807
8935
  $event: "assignedTo" | "createdAt" | "createdAtLocation" | "createdBy" | "createdByUserType" | "dateOfEvent" | "flags" | "id" | "legalStatuses" | "outbox" | "placeOfEvent" | "status" | "title" | "trackingId" | "type" | "updatedAt" | "updatedAtLocation" | "updatedBy" | "updatedByUserRole";
8808
8936
  };
8809
8937
  }[];
8810
- icon: "Activity" | "Archive" | "ArchiveBox" | "ArchiveTray" | "Archived" | "ArrowCircleDown" | "ArrowCounterClockwise" | "ArrowLeft" | "ArrowRight" | "Assigned" | "Briefcase" | "Buildings" | "CaretDown" | "CaretLeft" | "CaretRight" | "Certified" | "ChartActivity" | "ChartBar" | "ChartLine" | "ChatCircle" | "ChatText" | "Check" | "CheckSquare" | "Circle" | "CircleWavyCheck" | "CircleWavyQuestion" | "Clock" | "Close" | "Collapse" | "Compass" | "Copy" | "Database" | "DeviceTabletCamera" | "DotsThreeVertical" | "Draft" | "DuplicateYellow" | "Envelope" | "Expand" | "Export" | "ExternalValidate" | "Eye" | "EyeSlash" | "File" | "FileArrowUp" | "FileDotted" | "FileMinus" | "FilePlus" | "FileSearch" | "FileText" | "FileX" | "Files" | "FilledCheck" | "Fingerprint" | "Gear" | "GitBranch" | "Globe" | "Handshake" | "IdentificationCard" | "InReview" | "List" | "ListBullets" | "Lock" | "MagnifyingGlass" | "MagnifyingGlassMinus" | "MagnifyingGlassPlus" | "MapPin" | "Medal" | "NotePencil" | "Offline" | "PaperPlaneTilt" | "Paperclip" | "Pen" | "PenNib" | "Pencil" | "PencilCircle" | "PencilLine" | "PencilSimpleLine" | "Phone" | "Plus" | "Printer" | "PushPin" | "QrCode" | "Registered" | "RequiresUpdates" | "Sent" | "SignOut" | "Stamp" | "Star" | "Sun" | "Target" | "TextT" | "Timer" | "Trash" | "UploadSimple" | "User" | "UserCircle" | "UserPlus" | "Users" | "Validated" | "WaitingApproval" | "WarningCircle" | "Webcam" | "X";
8938
+ icon: "Activity" | "Archive" | "ArchiveBox" | "ArchiveTray" | "Archived" | "ArrowCircleDown" | "ArrowCounterClockwise" | "ArrowLeft" | "ArrowRight" | "Assigned" | "Briefcase" | "Buildings" | "CaretDown" | "CaretLeft" | "CaretRight" | "Certified" | "ChartActivity" | "ChartBar" | "ChartLine" | "ChatCircle" | "ChatText" | "Check" | "CheckSquare" | "Circle" | "CircleWavyCheck" | "CircleWavyQuestion" | "Clock" | "Close" | "Collapse" | "Compass" | "Copy" | "Database" | "DeviceTabletCamera" | "DotsThreeVertical" | "Draft" | "DuplicateYellow" | "Envelope" | "Expand" | "Export" | "ExternalValidate" | "Eye" | "EyeSlash" | "File" | "FileArrowUp" | "FileDotted" | "FileLock" | "FileMinus" | "FilePlus" | "FileSearch" | "FileText" | "FileX" | "Files" | "FilledCheck" | "Fingerprint" | "Gear" | "GitBranch" | "Globe" | "Handshake" | "IdentificationCard" | "InReview" | "List" | "ListBullets" | "Lock" | "MagnifyingGlass" | "MagnifyingGlassMinus" | "MagnifyingGlassPlus" | "MapPin" | "Medal" | "NotePencil" | "Offline" | "PaperPlaneTilt" | "Paperclip" | "Pen" | "PenNib" | "Pencil" | "PencilCircle" | "PencilLine" | "PencilSimpleLine" | "Phone" | "Plus" | "Printer" | "PushPin" | "QrCode" | "Registered" | "RequiresUpdates" | "Sent" | "SignOut" | "Stamp" | "Star" | "Sun" | "Target" | "TextT" | "Timer" | "Trash" | "UploadSimple" | "User" | "UserCircle" | "UserPlus" | "Users" | "Validated" | "WaitingApproval" | "WarningCircle" | "Webcam" | "X";
8811
8939
  emptyMessage?: {
8812
8940
  id: string;
8813
8941
  defaultMessage: string;
@@ -8869,25 +8997,62 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8869
8997
  }[];
8870
8998
  meta: import("trpc-to-openapi").OpenApiMeta;
8871
8999
  }>;
8872
- set: import("@trpc/server").TRPCMutationProcedure<{
9000
+ create: import("@trpc/server").TRPCMutationProcedure<{
8873
9001
  input: {
8874
- id: string;
9002
+ id?: string | undefined;
9003
+ versionId?: string | undefined;
8875
9004
  name: string;
8876
9005
  externalId?: string | null | undefined;
8877
9006
  parentId: string | null;
8878
- }[];
8879
- output: void;
8880
- meta: object;
9007
+ effectiveFrom?: string | undefined;
9008
+ status?: "active" | "inactive" | undefined;
9009
+ };
9010
+ output: {
9011
+ id: string & import("zod").$brand<"UUID">;
9012
+ name: string;
9013
+ externalId?: string | null | undefined;
9014
+ parentId: (string & import("zod").$brand<"UUID">) | null;
9015
+ status: "active" | "inactive";
9016
+ versions: {
9017
+ versionId: string & import("zod").$brand<"UUID">;
9018
+ effectiveFrom: string;
9019
+ name: string;
9020
+ externalId?: string | null | undefined;
9021
+ status: "active" | "inactive";
9022
+ }[];
9023
+ };
9024
+ meta: import("trpc-to-openapi").OpenApiMeta;
8881
9025
  }>;
8882
- create: import("@trpc/server").TRPCMutationProcedure<{
9026
+ update: import("@trpc/server").TRPCMutationProcedure<{
8883
9027
  input: {
8884
- id?: string | undefined;
9028
+ id: string;
8885
9029
  versionId?: string | undefined;
8886
9030
  name: string;
8887
9031
  externalId?: string | null | undefined;
8888
- parentId: string | null;
9032
+ status: "active" | "inactive";
8889
9033
  effectiveFrom?: string | undefined;
8890
- status?: "active" | "inactive" | undefined;
9034
+ lastVersionId: string;
9035
+ };
9036
+ output: {
9037
+ id: string & import("zod").$brand<"UUID">;
9038
+ name: string;
9039
+ externalId?: string | null | undefined;
9040
+ parentId: (string & import("zod").$brand<"UUID">) | null;
9041
+ status: "active" | "inactive";
9042
+ versions: {
9043
+ versionId: string & import("zod").$brand<"UUID">;
9044
+ effectiveFrom: string;
9045
+ name: string;
9046
+ externalId?: string | null | undefined;
9047
+ status: "active" | "inactive";
9048
+ }[];
9049
+ };
9050
+ meta: import("trpc-to-openapi").OpenApiMeta;
9051
+ }>;
9052
+ withdrawVersion: import("@trpc/server").TRPCMutationProcedure<{
9053
+ input: {
9054
+ id: string;
9055
+ versionId: string;
8891
9056
  };
8892
9057
  output: {
8893
9058
  id: string & import("zod").$brand<"UUID">;
@@ -8932,6 +9097,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8932
9097
  input: {
8933
9098
  name: string;
8934
9099
  scopes: string[];
9100
+ credentials?: {
9101
+ clientId: string;
9102
+ clientSecret: string;
9103
+ } | undefined;
8935
9104
  };
8936
9105
  output: {
8937
9106
  clientId: string;
@@ -8962,7 +9131,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8962
9131
  scopes: string[];
8963
9132
  status: string;
8964
9133
  createdAt: string;
8965
- createdBy: string & import("zod").$brand<"UUID">;
9134
+ createdBy: (string & import("zod").$brand<"UUID">) | null;
8966
9135
  }[];
8967
9136
  meta: import("trpc-to-openapi").OpenApiMeta;
8968
9137
  }>;
@@ -8977,7 +9146,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8977
9146
  status: string;
8978
9147
  shaSecret: string | null;
8979
9148
  createdAt: string;
8980
- createdBy: string & import("zod").$brand<"UUID">;
9149
+ createdBy: (string & import("zod").$brand<"UUID">) | null;
8981
9150
  };
8982
9151
  meta: import("trpc-to-openapi").OpenApiMeta;
8983
9152
  }>;
@@ -9023,6 +9192,363 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
9023
9192
  };
9024
9193
  meta: import("trpc-to-openapi").OpenApiMeta;
9025
9194
  }>;
9195
+ audit: import("@trpc/server").TRPCQueryProcedure<{
9196
+ input: {
9197
+ id: string;
9198
+ skip?: number | undefined;
9199
+ count?: number | undefined;
9200
+ timeStart?: string | undefined;
9201
+ timeEnd?: string | undefined;
9202
+ };
9203
+ output: {
9204
+ results: ({
9205
+ id: string;
9206
+ clientId: string;
9207
+ clientType: "system" | "user";
9208
+ createdAt: string;
9209
+ operation: "event.create";
9210
+ requestData: {
9211
+ transactionId: string;
9212
+ type: string;
9213
+ createdAtLocation: string | null;
9214
+ };
9215
+ responseSummary: {
9216
+ eventId: string;
9217
+ trackingId: string;
9218
+ };
9219
+ } | {
9220
+ id: string;
9221
+ clientId: string;
9222
+ clientType: "system" | "user";
9223
+ createdAt: string;
9224
+ operation: "event.get";
9225
+ requestData: {
9226
+ eventId: string;
9227
+ };
9228
+ responseSummary: {
9229
+ eventType: string;
9230
+ trackingId: string;
9231
+ };
9232
+ } | {
9233
+ id: string;
9234
+ clientId: string;
9235
+ createdAt: string;
9236
+ operation: "event.search";
9237
+ clientType: "system";
9238
+ requestData: {
9239
+ query: Record<string, unknown> | null;
9240
+ limit: number | null;
9241
+ offset: number | null;
9242
+ };
9243
+ responseSummary: {
9244
+ total: number;
9245
+ eventIds: string[];
9246
+ };
9247
+ } | {
9248
+ id: string;
9249
+ clientId: string;
9250
+ clientType: "system" | "user";
9251
+ createdAt: string;
9252
+ operation: "event.actions.archive.request" | "event.actions.assign.request" | "event.actions.correction.approve.request" | "event.actions.correction.reject.request" | "event.actions.correction.request.request" | "event.actions.declare.request" | "event.actions.edit.request" | "event.actions.mark_as_duplicate.request" | "event.actions.mark_as_not_duplicate.request" | "event.actions.notify.request" | "event.actions.print_certificate.request" | "event.actions.read.request" | "event.actions.register.request" | "event.actions.reinstate.request" | "event.actions.reject.request" | "event.actions.unarchive.request" | "event.actions.unassign.request" | "event.actions.validate.request";
9253
+ requestData: {
9254
+ eventId: string;
9255
+ actionType: string;
9256
+ eventType: string;
9257
+ trackingId: string;
9258
+ transactionId: string;
9259
+ };
9260
+ } | {
9261
+ id: string;
9262
+ clientId: string;
9263
+ clientType: "system" | "user";
9264
+ createdAt: string;
9265
+ operation: "event.actions.custom.request";
9266
+ requestData: {
9267
+ eventId: string;
9268
+ actionType: "CUSTOM";
9269
+ customAction: string;
9270
+ eventType: string;
9271
+ trackingId: string;
9272
+ transactionId: string;
9273
+ };
9274
+ } | {
9275
+ id: string;
9276
+ clientId: string;
9277
+ clientType: "system" | "user";
9278
+ createdAt: string;
9279
+ operation: "integrations.create";
9280
+ requestData: {
9281
+ name: string;
9282
+ scopes: string[];
9283
+ };
9284
+ responseSummary: {
9285
+ clientId: string;
9286
+ };
9287
+ } | {
9288
+ id: string;
9289
+ clientId: string;
9290
+ clientType: "system" | "user";
9291
+ createdAt: string;
9292
+ operation: "integrations.refreshToken";
9293
+ requestData: {
9294
+ clientId: string;
9295
+ };
9296
+ responseSummary: {
9297
+ clientId: string;
9298
+ };
9299
+ } | {
9300
+ id: string;
9301
+ clientId: string;
9302
+ clientType: "system" | "user";
9303
+ createdAt: string;
9304
+ operation: "integrations.deactivate";
9305
+ requestData: {
9306
+ id: string;
9307
+ };
9308
+ responseSummary: {
9309
+ id: string;
9310
+ status: string;
9311
+ };
9312
+ } | {
9313
+ id: string;
9314
+ clientId: string;
9315
+ clientType: "system" | "user";
9316
+ createdAt: string;
9317
+ operation: "integrations.activate";
9318
+ requestData: {
9319
+ id: string;
9320
+ };
9321
+ responseSummary: {
9322
+ id: string;
9323
+ status: string;
9324
+ };
9325
+ } | {
9326
+ id: string;
9327
+ clientId: string;
9328
+ clientType: "system" | "user";
9329
+ createdAt: string;
9330
+ operation: "integrations.delete";
9331
+ requestData: {
9332
+ id: string;
9333
+ };
9334
+ responseSummary: {
9335
+ id: string;
9336
+ name: string;
9337
+ };
9338
+ } | {
9339
+ id: string;
9340
+ clientId: string;
9341
+ clientType: "system" | "user";
9342
+ createdAt: string;
9343
+ operation: "integrations.refreshSecret";
9344
+ requestData: {
9345
+ id: string;
9346
+ };
9347
+ responseSummary: {
9348
+ clientId: string;
9349
+ };
9350
+ } | {
9351
+ id: string;
9352
+ clientId: string;
9353
+ clientType: "system" | "user";
9354
+ createdAt: string;
9355
+ operation: "locations.create";
9356
+ requestData: {
9357
+ id: string;
9358
+ versionId: string;
9359
+ name: string;
9360
+ externalId?: string | null | undefined;
9361
+ effectiveFrom: string;
9362
+ status: string;
9363
+ administrativeAreaId?: string | null | undefined;
9364
+ locationType?: string | null | undefined;
9365
+ };
9366
+ } | {
9367
+ id: string;
9368
+ clientId: string;
9369
+ clientType: "system" | "user";
9370
+ createdAt: string;
9371
+ operation: "locations.update";
9372
+ requestData: {
9373
+ id: string;
9374
+ versionId: string;
9375
+ name: string;
9376
+ externalId?: string | null | undefined;
9377
+ status: string;
9378
+ effectiveFrom: string;
9379
+ lastVersionId: string;
9380
+ };
9381
+ responseSummary: {
9382
+ previousVersionId: string;
9383
+ versionId: string;
9384
+ changed: {
9385
+ name?: {
9386
+ from: string;
9387
+ to: string;
9388
+ } | undefined;
9389
+ externalId?: {
9390
+ from: string | null;
9391
+ to: string | null;
9392
+ } | undefined;
9393
+ status?: {
9394
+ from: string;
9395
+ to: string;
9396
+ } | undefined;
9397
+ };
9398
+ };
9399
+ } | {
9400
+ id: string;
9401
+ clientId: string;
9402
+ clientType: "system" | "user";
9403
+ createdAt: string;
9404
+ operation: "administrativeAreas.update";
9405
+ requestData: {
9406
+ id: string;
9407
+ versionId: string;
9408
+ name: string;
9409
+ externalId?: string | null | undefined;
9410
+ status: string;
9411
+ effectiveFrom: string;
9412
+ lastVersionId: string;
9413
+ };
9414
+ responseSummary: {
9415
+ previousVersionId: string;
9416
+ versionId: string;
9417
+ changed: {
9418
+ name?: {
9419
+ from: string;
9420
+ to: string;
9421
+ } | undefined;
9422
+ externalId?: {
9423
+ from: string | null;
9424
+ to: string | null;
9425
+ } | undefined;
9426
+ status?: {
9427
+ from: string;
9428
+ to: string;
9429
+ } | undefined;
9430
+ };
9431
+ };
9432
+ } | {
9433
+ id: string;
9434
+ clientId: string;
9435
+ clientType: "system" | "user";
9436
+ createdAt: string;
9437
+ operation: "locations.withdrawVersion";
9438
+ requestData: {
9439
+ id: string;
9440
+ versionId: string;
9441
+ };
9442
+ responseSummary: {
9443
+ effectiveFrom: string;
9444
+ name: string;
9445
+ externalId?: string | null | undefined;
9446
+ status: string;
9447
+ };
9448
+ } | {
9449
+ id: string;
9450
+ clientId: string;
9451
+ clientType: "system" | "user";
9452
+ createdAt: string;
9453
+ operation: "administrativeAreas.withdrawVersion";
9454
+ requestData: {
9455
+ id: string;
9456
+ versionId: string;
9457
+ };
9458
+ responseSummary: {
9459
+ effectiveFrom: string;
9460
+ name: string;
9461
+ externalId?: string | null | undefined;
9462
+ status: string;
9463
+ };
9464
+ } | {
9465
+ id: string;
9466
+ clientId: string;
9467
+ clientType: "system" | "user";
9468
+ createdAt: string;
9469
+ operation: "administrativeAreas.create";
9470
+ requestData: {
9471
+ id: string;
9472
+ versionId: string;
9473
+ name: string;
9474
+ externalId?: string | null | undefined;
9475
+ effectiveFrom: string;
9476
+ status: string;
9477
+ parentId?: string | null | undefined;
9478
+ };
9479
+ } | {
9480
+ id: string;
9481
+ clientId: string;
9482
+ clientType: "system" | "user";
9483
+ createdAt: string;
9484
+ operation: "attachments.upload";
9485
+ requestData: {
9486
+ transactionId: string;
9487
+ path: string | null;
9488
+ };
9489
+ responseSummary: {
9490
+ fileUrl: string;
9491
+ };
9492
+ } | {
9493
+ id: string;
9494
+ clientId: string;
9495
+ clientType: "system" | "user";
9496
+ createdAt: string;
9497
+ operation: "user.create_user";
9498
+ requestData: {
9499
+ subjectId: string;
9500
+ role: string;
9501
+ primaryOfficeId: string;
9502
+ };
9503
+ } | {
9504
+ id: string;
9505
+ clientId: string;
9506
+ clientType: "system" | "user";
9507
+ createdAt: string;
9508
+ operation: "user.deactivate" | "user.reactivate";
9509
+ requestData: {
9510
+ subjectId: string;
9511
+ reason: string;
9512
+ comment?: string | undefined;
9513
+ };
9514
+ } | {
9515
+ id: string;
9516
+ clientId: string;
9517
+ clientType: "system" | "user";
9518
+ createdAt: string;
9519
+ operation: "user.edit_user" | "user.logged_in" | "user.logged_out" | "user.password_changed" | "user.password_reset" | "user.password_reset_by_admin" | "user.resend_invite" | "user.username_reminder" | "user.username_reminder_by_admin";
9520
+ requestData: {
9521
+ subjectId: string;
9522
+ };
9523
+ } | {
9524
+ id: string;
9525
+ clientId: string;
9526
+ clientType: "system" | "user";
9527
+ createdAt: string;
9528
+ operation: "user.email_address_changed";
9529
+ requestData: {
9530
+ subjectId: string;
9531
+ };
9532
+ responseSummary: {
9533
+ email: string;
9534
+ };
9535
+ } | {
9536
+ id: string;
9537
+ clientId: string;
9538
+ clientType: "system" | "user";
9539
+ createdAt: string;
9540
+ operation: "user.phone_number_changed";
9541
+ requestData: {
9542
+ subjectId: string;
9543
+ };
9544
+ responseSummary: {
9545
+ phoneNumber: string;
9546
+ };
9547
+ })[];
9548
+ total: number;
9549
+ };
9550
+ meta: import("trpc-to-openapi").OpenApiMeta;
9551
+ }>;
9026
9552
  }>>;
9027
9553
  attachments: import("@trpc/server").TRPCBuiltRouter<{
9028
9554
  ctx: Partial<{