@opencrvs/toolkit 1.9.15-rc.fc1c0fb → 2.0.0-rc.0096e47

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 (161) hide show
  1. package/build.sh +13 -0
  2. package/create-countryconfig/index.js +103 -0
  3. package/create-countryconfig/package.json +21 -0
  4. package/dist/api/index.d.ts.map +1 -1
  5. package/dist/application-config/index.d.ts +2 -0
  6. package/dist/application-config/index.d.ts.map +1 -0
  7. package/dist/application-config/index.js +2304 -0
  8. package/dist/cli.d.ts +2 -0
  9. package/dist/cli.d.ts.map +1 -0
  10. package/dist/cli.js +5244 -0
  11. package/dist/commons/api/router.d.ts +5630 -3673
  12. package/dist/commons/application-config/index.d.ts +97 -0
  13. package/dist/commons/conditionals/conditionals.d.ts +33 -3
  14. package/dist/commons/conditionals/validate.d.ts +20 -1
  15. package/dist/commons/events/ActionConfig.d.ts +415 -1555
  16. package/dist/commons/events/ActionDocument.d.ts +894 -1941
  17. package/dist/commons/events/ActionInput.d.ts +326 -1212
  18. package/dist/commons/events/ActionType.d.ts +91 -11
  19. package/dist/commons/events/AdvancedSearchConfig.d.ts +636 -1496
  20. package/dist/commons/events/AuditLog.d.ts +407 -0
  21. package/dist/commons/events/CompositeFieldValue.d.ts +30 -190
  22. package/dist/commons/events/Conditional.d.ts +26 -38
  23. package/dist/commons/events/Constants.d.ts +1 -1
  24. package/dist/commons/events/CountryConfigQueryInput.d.ts +1592 -4471
  25. package/dist/commons/events/DeduplicationConfig.d.ts +15 -171
  26. package/dist/commons/events/Draft.d.ts +72 -111
  27. package/dist/commons/events/DynamicFieldValue.d.ts +12 -78
  28. package/dist/commons/events/EventConfig.d.ts +37 -2427
  29. package/dist/commons/events/EventConfigInput.d.ts +0 -3
  30. package/dist/commons/events/EventDocument.d.ts +357 -1366
  31. package/dist/commons/events/EventIndex.d.ts +211 -1012
  32. package/dist/commons/events/EventInput.d.ts +3 -8
  33. package/dist/commons/events/EventMetadata.d.ts +129 -363
  34. package/dist/commons/events/FieldConfig.d.ts +3147 -14211
  35. package/dist/commons/events/FieldType.d.ts +26 -4
  36. package/dist/commons/events/FieldTypeMapping.d.ts +314 -906
  37. package/dist/commons/events/FieldValue.d.ts +154 -526
  38. package/dist/commons/events/FileUtils.d.ts +2 -2
  39. package/dist/commons/events/Flag.d.ts +67 -0
  40. package/dist/commons/events/FormConfig.d.ts +54 -721
  41. package/dist/commons/events/PageConfig.d.ts +58 -320
  42. package/dist/commons/events/PlainDate.d.ts +1 -1
  43. package/dist/commons/events/SummaryConfig.d.ts +14 -161
  44. package/dist/commons/events/TemplateConfig.d.ts +2 -3
  45. package/dist/commons/events/TranslationConfig.d.ts +2 -2
  46. package/dist/commons/events/WorkqueueColumnConfig.d.ts +74 -37
  47. package/dist/commons/events/WorkqueueConfig.d.ts +2232 -7577
  48. package/dist/commons/events/deduplication.d.ts +3 -3
  49. package/dist/commons/events/defineConfig.d.ts +2 -248
  50. package/dist/commons/events/eventConfigValidation.d.ts +8 -0
  51. package/dist/commons/events/field.d.ts +6 -0
  52. package/dist/commons/events/index.d.ts +5 -0
  53. package/dist/commons/events/locations.d.ts +93 -19
  54. package/dist/commons/events/mocks.test.utils.d.ts +19 -0
  55. package/dist/commons/events/scopes.d.ts +56 -32
  56. package/dist/commons/events/state/availableActions.d.ts +7 -2
  57. package/dist/commons/events/state/flags.d.ts +37 -3
  58. package/dist/commons/events/state/index.d.ts +29 -30
  59. package/dist/commons/events/state/utils.d.ts +25 -284
  60. package/dist/commons/events/test.utils.d.ts +52 -11
  61. package/dist/commons/events/transactions.d.ts +1 -1
  62. package/dist/commons/events/utils.d.ts +383 -273
  63. package/dist/commons/notification/UserNotifications.d.ts +76 -637
  64. package/dist/conditionals/index.d.ts.map +1 -1
  65. package/dist/conditionals/index.js +338 -14
  66. package/dist/events/deduplication.d.ts +3 -3
  67. package/dist/events/index.js +3699 -2235
  68. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts +3 -0
  69. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +1 -0
  70. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +429 -0
  71. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts +3 -0
  72. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts.map +1 -0
  73. package/dist/migrations/v2.0/add-resend-invite-notification.js +373 -0
  74. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +22 -0
  75. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -0
  76. package/dist/migrations/v2.0/checkout-upstream-files.js +146 -0
  77. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts +2 -0
  78. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +1 -0
  79. package/dist/migrations/v2.0/convert-config-files-to-ts.js +828 -0
  80. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts +3 -0
  81. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +1 -0
  82. package/dist/migrations/v2.0/convert-paragraph-to-heading.js +158 -0
  83. package/dist/migrations/v2.0/create-events-index.d.ts +3 -0
  84. package/dist/migrations/v2.0/create-events-index.d.ts.map +1 -0
  85. package/dist/migrations/v2.0/create-events-index.js +325 -0
  86. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +11 -0
  87. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +1 -0
  88. package/dist/migrations/v2.0/delete-infrastructure-directory.js +123 -0
  89. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts +3 -0
  90. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts.map +1 -0
  91. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.js +110 -0
  92. package/dist/migrations/v2.0/index.d.ts +13 -0
  93. package/dist/migrations/v2.0/index.d.ts.map +1 -0
  94. package/dist/migrations/v2.0/index.js +5154 -0
  95. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts +3 -0
  96. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +1 -0
  97. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +432 -0
  98. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +13 -0
  99. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +1 -0
  100. package/dist/migrations/v2.0/merge-infrastructure-directory.js +222 -0
  101. package/dist/migrations/v2.0/migrate-application-config-url.d.ts +3 -0
  102. package/dist/migrations/v2.0/migrate-application-config-url.d.ts.map +1 -0
  103. package/dist/migrations/v2.0/migrate-application-config-url.js +342 -0
  104. package/dist/migrations/v2.0/migrate-scopes.d.ts +3 -0
  105. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -0
  106. package/dist/migrations/v2.0/migrate-scopes.js +305 -0
  107. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts +3 -0
  108. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +1 -0
  109. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +267 -0
  110. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts +3 -0
  111. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -0
  112. package/dist/migrations/v2.0/migrate-workqueue-configs.js +317 -0
  113. package/dist/migrations/v2.0/remove-delete-actions.d.ts +3 -0
  114. package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +1 -0
  115. package/dist/migrations/v2.0/remove-delete-actions.js +156 -0
  116. package/dist/migrations/v2.0/remove-demo-scope.d.ts +3 -0
  117. package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +1 -0
  118. package/dist/migrations/v2.0/remove-demo-scope.js +74 -0
  119. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts +3 -0
  120. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +1 -0
  121. package/dist/migrations/v2.0/remove-deprecated-imports.js +96 -0
  122. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts +3 -0
  123. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts.map +1 -0
  124. package/dist/migrations/v2.0/remove-fhir-url-helpers.js +163 -0
  125. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts +3 -0
  126. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +1 -0
  127. package/dist/migrations/v2.0/remove-hearth-migrations.js +77 -0
  128. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts +3 -0
  129. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts.map +1 -0
  130. package/dist/migrations/v2.0/remove-old-statistics-service.js +356 -0
  131. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts +3 -0
  132. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +1 -0
  133. package/dist/migrations/v2.0/remove-pending-certification-flag.js +109 -0
  134. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts +3 -0
  135. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +1 -0
  136. package/dist/migrations/v2.0/remove-review-from-register-action.js +163 -0
  137. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts +3 -0
  138. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts.map +1 -0
  139. package/dist/migrations/v2.0/remove-unused-environment-variables.js +186 -0
  140. package/dist/migrations/v2.0/rename-api-paths.d.ts +3 -0
  141. package/dist/migrations/v2.0/rename-api-paths.d.ts.map +1 -0
  142. package/dist/migrations/v2.0/rename-api-paths.js +187 -0
  143. package/dist/migrations/v2.0/rename-location-parent-id.d.ts +3 -0
  144. package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +1 -0
  145. package/dist/migrations/v2.0/rename-location-parent-id.js +180 -0
  146. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts +3 -0
  147. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +1 -0
  148. package/dist/migrations/v2.0/simplify-analytics-precalculations.js +195 -0
  149. package/dist/migrations/v2.0/update-package-json.d.ts +3 -0
  150. package/dist/migrations/v2.0/update-package-json.d.ts.map +1 -0
  151. package/dist/migrations/v2.0/update-package-json.js +105 -0
  152. package/dist/notification/index.d.ts.map +1 -1
  153. package/dist/notification/index.js +2730 -1848
  154. package/dist/scopes/index.d.ts +714 -352
  155. package/dist/scopes/index.d.ts.map +1 -1
  156. package/dist/scopes/index.js +381 -298
  157. package/opencrvs-toolkit-2.0.0-rc.0096e47.tgz +0 -0
  158. package/package.json +14 -4
  159. package/tsconfig.json +12 -2
  160. package/tsconfig.tsbuildinfo +1 -1
  161. package/dist/commons/events/CreatedAtLocation.d.ts +0 -2
@@ -1,13 +1,8 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod/v4';
2
2
  export declare const EventInput: z.ZodObject<{
3
3
  transactionId: z.ZodString;
4
4
  type: z.ZodString;
5
- }, "strip", z.ZodTypeAny, {
6
- type: string;
7
- transactionId: string;
8
- }, {
9
- type: string;
10
- transactionId: string;
11
- }>;
5
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
6
+ }, z.core.$strip>;
12
7
  export type EventInput = z.infer<typeof EventInput>;
13
8
  //# sourceMappingURL=EventInput.d.ts.map
@@ -1,404 +1,156 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod/v4';
2
2
  import { TranslationConfig } from './TranslationConfig';
3
3
  /**
4
4
  * Event statuses recognized by the system
5
5
  */
6
- export declare const EventStatus: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "ARCHIVED"]>;
6
+ export declare const EventStatus: z.ZodEnum<{
7
+ CREATED: "CREATED";
8
+ NOTIFIED: "NOTIFIED";
9
+ DECLARED: "DECLARED";
10
+ REGISTERED: "REGISTERED";
11
+ ARCHIVED: "ARCHIVED";
12
+ }>;
7
13
  export type EventStatus = z.infer<typeof EventStatus>;
8
- export declare const InherentFlags: {
9
- readonly PENDING_CERTIFICATION: "pending-certification";
10
- readonly INCOMPLETE: "incomplete";
11
- readonly REJECTED: "rejected";
12
- readonly CORRECTION_REQUESTED: "correction-requested";
13
- readonly POTENTIAL_DUPLICATE: "potential-duplicate";
14
- };
15
- export type InherentFlags = (typeof InherentFlags)[keyof typeof InherentFlags];
16
- export declare const ActionFlag: z.ZodString;
17
- export declare const Flag: z.ZodUnion<[z.ZodString, z.ZodNativeEnum<{
18
- readonly PENDING_CERTIFICATION: "pending-certification";
19
- readonly INCOMPLETE: "incomplete";
20
- readonly REJECTED: "rejected";
21
- readonly CORRECTION_REQUESTED: "correction-requested";
22
- readonly POTENTIAL_DUPLICATE: "potential-duplicate";
23
- }>]>;
24
- export type ActionFlag = z.infer<typeof ActionFlag>;
25
- export type Flag = z.infer<typeof Flag>;
26
- export declare const ZodDate: z.ZodString;
14
+ export declare const ZodDate: z.ZodISODate;
27
15
  export declare const ZodDateTime: z.ZodString;
28
16
  export declare const ActionCreationMetadata: z.ZodObject<{
29
- createdAt: z.ZodString;
17
+ createdAt: z.ZodISODateTime;
30
18
  createdBy: z.ZodString;
31
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
32
- createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
33
- acceptedAt: z.ZodString;
34
- createdByRole: z.ZodString;
35
- createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
- }, "strip", z.ZodTypeAny, {
37
- createdAt: string;
38
- createdBy: string;
39
- createdByRole: string;
40
- acceptedAt: string;
41
- createdByUserType?: "system" | "user" | null | undefined;
42
- createdBySignature?: string | null | undefined;
43
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
44
- }, {
45
- createdAt: string;
46
- createdBy: string;
47
- createdByRole: string;
48
- acceptedAt: string;
49
- createdByUserType?: "system" | "user" | null | undefined;
50
- createdBySignature?: string | null | undefined;
51
- createdAtLocation?: string | null | undefined;
52
- }>;
19
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
20
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
21
+ user: "user";
22
+ system: "system";
23
+ }>>>;
24
+ acceptedAt: z.ZodISODateTime;
25
+ createdByRole: z.ZodOptional<z.ZodString>;
26
+ }, z.core.$strip>;
53
27
  export type ActionCreationMetadata = z.infer<typeof ActionCreationMetadata>;
54
- export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.extendShape<{
55
- createdAt: z.ZodString;
28
+ export declare const RegistrationCreationMetadata: z.ZodObject<{
29
+ createdAt: z.ZodISODateTime;
56
30
  createdBy: z.ZodString;
57
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
58
- createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
59
- acceptedAt: z.ZodString;
60
- createdByRole: z.ZodString;
61
- createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
- }, {
31
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
32
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
33
+ user: "user";
34
+ system: "system";
35
+ }>>>;
36
+ acceptedAt: z.ZodISODateTime;
37
+ createdByRole: z.ZodOptional<z.ZodString>;
63
38
  registrationNumber: z.ZodString;
64
- }>, "strip", z.ZodTypeAny, {
65
- createdAt: string;
66
- createdBy: string;
67
- createdByRole: string;
68
- registrationNumber: string;
69
- acceptedAt: string;
70
- createdByUserType?: "system" | "user" | null | undefined;
71
- createdBySignature?: string | null | undefined;
72
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
73
- }, {
74
- createdAt: string;
75
- createdBy: string;
76
- createdByRole: string;
77
- registrationNumber: string;
78
- acceptedAt: string;
79
- createdByUserType?: "system" | "user" | null | undefined;
80
- createdBySignature?: string | null | undefined;
81
- createdAtLocation?: string | null | undefined;
82
- }>;
39
+ }, z.core.$strip>;
83
40
  export type RegistrationCreationMetadata = z.infer<typeof RegistrationCreationMetadata>;
84
41
  export declare const LegalStatuses: z.ZodObject<{
85
42
  DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
86
- createdAt: z.ZodString;
43
+ createdAt: z.ZodISODateTime;
87
44
  createdBy: z.ZodString;
88
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
89
- createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
90
- acceptedAt: z.ZodString;
91
- createdByRole: z.ZodString;
92
- createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
93
- }, "strip", z.ZodTypeAny, {
94
- createdAt: string;
95
- createdBy: string;
96
- createdByRole: string;
97
- acceptedAt: string;
98
- createdByUserType?: "system" | "user" | null | undefined;
99
- createdBySignature?: string | null | undefined;
100
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
101
- }, {
102
- createdAt: string;
103
- createdBy: string;
104
- createdByRole: string;
105
- acceptedAt: string;
106
- createdByUserType?: "system" | "user" | null | undefined;
107
- createdBySignature?: string | null | undefined;
108
- createdAtLocation?: string | null | undefined;
109
- }>>>;
110
- REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<z.objectUtil.extendShape<{
111
- createdAt: z.ZodString;
45
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
46
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
47
+ user: "user";
48
+ system: "system";
49
+ }>>>;
50
+ acceptedAt: z.ZodISODateTime;
51
+ createdByRole: z.ZodOptional<z.ZodString>;
52
+ }, z.core.$strip>>>;
53
+ REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
54
+ createdAt: z.ZodISODateTime;
112
55
  createdBy: z.ZodString;
113
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
114
- createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
115
- acceptedAt: z.ZodString;
116
- createdByRole: z.ZodString;
117
- createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
118
- }, {
56
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
57
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
58
+ user: "user";
59
+ system: "system";
60
+ }>>>;
61
+ acceptedAt: z.ZodISODateTime;
62
+ createdByRole: z.ZodOptional<z.ZodString>;
119
63
  registrationNumber: z.ZodString;
120
- }>, "strip", z.ZodTypeAny, {
121
- createdAt: string;
122
- createdBy: string;
123
- createdByRole: string;
124
- registrationNumber: string;
125
- acceptedAt: string;
126
- createdByUserType?: "system" | "user" | null | undefined;
127
- createdBySignature?: string | null | undefined;
128
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
129
- }, {
130
- createdAt: string;
131
- createdBy: string;
132
- createdByRole: string;
133
- registrationNumber: string;
134
- acceptedAt: string;
135
- createdByUserType?: "system" | "user" | null | undefined;
136
- createdBySignature?: string | null | undefined;
137
- createdAtLocation?: string | null | undefined;
138
- }>>>;
139
- }, "strip", z.ZodTypeAny, {
140
- DECLARED?: {
141
- createdAt: string;
142
- createdBy: string;
143
- createdByRole: string;
144
- acceptedAt: string;
145
- createdByUserType?: "system" | "user" | null | undefined;
146
- createdBySignature?: string | null | undefined;
147
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
148
- } | null | undefined;
149
- REGISTERED?: {
150
- createdAt: string;
151
- createdBy: string;
152
- createdByRole: string;
153
- registrationNumber: string;
154
- acceptedAt: string;
155
- createdByUserType?: "system" | "user" | null | undefined;
156
- createdBySignature?: string | null | undefined;
157
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
158
- } | null | undefined;
159
- }, {
160
- DECLARED?: {
161
- createdAt: string;
162
- createdBy: string;
163
- createdByRole: string;
164
- acceptedAt: string;
165
- createdByUserType?: "system" | "user" | null | undefined;
166
- createdBySignature?: string | null | undefined;
167
- createdAtLocation?: string | null | undefined;
168
- } | null | undefined;
169
- REGISTERED?: {
170
- createdAt: string;
171
- createdBy: string;
172
- createdByRole: string;
173
- registrationNumber: string;
174
- acceptedAt: string;
175
- createdByUserType?: "system" | "user" | null | undefined;
176
- createdBySignature?: string | null | undefined;
177
- createdAtLocation?: string | null | undefined;
178
- } | null | undefined;
179
- }>;
64
+ }, z.core.$strip>>>;
65
+ }, z.core.$strip>;
180
66
  /**
181
67
  * Event metadata exposed to client.
182
68
  *
183
69
  * Accessed through `event.` in configuration.
184
70
  */
185
71
  export declare const EventMetadata: z.ZodObject<{
186
- id: z.ZodBranded<z.ZodString, "UUID">;
72
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
187
73
  type: z.ZodString;
188
- status: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "ARCHIVED"]>;
74
+ status: z.ZodEnum<{
75
+ CREATED: "CREATED";
76
+ NOTIFIED: "NOTIFIED";
77
+ DECLARED: "DECLARED";
78
+ REGISTERED: "REGISTERED";
79
+ ARCHIVED: "ARCHIVED";
80
+ }>;
189
81
  legalStatuses: z.ZodObject<{
190
82
  DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
191
- createdAt: z.ZodString;
83
+ createdAt: z.ZodISODateTime;
192
84
  createdBy: z.ZodString;
193
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
194
- createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
195
- acceptedAt: z.ZodString;
196
- createdByRole: z.ZodString;
197
- createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
198
- }, "strip", z.ZodTypeAny, {
199
- createdAt: string;
200
- createdBy: string;
201
- createdByRole: string;
202
- acceptedAt: string;
203
- createdByUserType?: "system" | "user" | null | undefined;
204
- createdBySignature?: string | null | undefined;
205
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
206
- }, {
207
- createdAt: string;
208
- createdBy: string;
209
- createdByRole: string;
210
- acceptedAt: string;
211
- createdByUserType?: "system" | "user" | null | undefined;
212
- createdBySignature?: string | null | undefined;
213
- createdAtLocation?: string | null | undefined;
214
- }>>>;
215
- REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<z.objectUtil.extendShape<{
216
- createdAt: z.ZodString;
85
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
86
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
87
+ user: "user";
88
+ system: "system";
89
+ }>>>;
90
+ acceptedAt: z.ZodISODateTime;
91
+ createdByRole: z.ZodOptional<z.ZodString>;
92
+ }, z.core.$strip>>>;
93
+ REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
94
+ createdAt: z.ZodISODateTime;
217
95
  createdBy: z.ZodString;
218
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
219
- createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
220
- acceptedAt: z.ZodString;
221
- createdByRole: z.ZodString;
222
- createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
223
- }, {
96
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
97
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
98
+ user: "user";
99
+ system: "system";
100
+ }>>>;
101
+ acceptedAt: z.ZodISODateTime;
102
+ createdByRole: z.ZodOptional<z.ZodString>;
224
103
  registrationNumber: z.ZodString;
225
- }>, "strip", z.ZodTypeAny, {
226
- createdAt: string;
227
- createdBy: string;
228
- createdByRole: string;
229
- registrationNumber: string;
230
- acceptedAt: string;
231
- createdByUserType?: "system" | "user" | null | undefined;
232
- createdBySignature?: string | null | undefined;
233
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
234
- }, {
235
- createdAt: string;
236
- createdBy: string;
237
- createdByRole: string;
238
- registrationNumber: string;
239
- acceptedAt: string;
240
- createdByUserType?: "system" | "user" | null | undefined;
241
- createdBySignature?: string | null | undefined;
242
- createdAtLocation?: string | null | undefined;
243
- }>>>;
244
- }, "strip", z.ZodTypeAny, {
245
- DECLARED?: {
246
- createdAt: string;
247
- createdBy: string;
248
- createdByRole: string;
249
- acceptedAt: string;
250
- createdByUserType?: "system" | "user" | null | undefined;
251
- createdBySignature?: string | null | undefined;
252
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
253
- } | null | undefined;
254
- REGISTERED?: {
255
- createdAt: string;
256
- createdBy: string;
257
- createdByRole: string;
258
- registrationNumber: string;
259
- acceptedAt: string;
260
- createdByUserType?: "system" | "user" | null | undefined;
261
- createdBySignature?: string | null | undefined;
262
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
263
- } | null | undefined;
264
- }, {
265
- DECLARED?: {
266
- createdAt: string;
267
- createdBy: string;
268
- createdByRole: string;
269
- acceptedAt: string;
270
- createdByUserType?: "system" | "user" | null | undefined;
271
- createdBySignature?: string | null | undefined;
272
- createdAtLocation?: string | null | undefined;
273
- } | null | undefined;
274
- REGISTERED?: {
275
- createdAt: string;
276
- createdBy: string;
277
- createdByRole: string;
278
- registrationNumber: string;
279
- acceptedAt: string;
280
- createdByUserType?: "system" | "user" | null | undefined;
281
- createdBySignature?: string | null | undefined;
282
- createdAtLocation?: string | null | undefined;
283
- } | null | undefined;
284
- }>;
285
- createdAt: z.ZodString;
286
- dateOfEvent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
+ }, z.core.$strip>>>;
105
+ }, z.core.$strip>;
106
+ createdAt: z.ZodISODateTime;
107
+ dateOfEvent: z.ZodOptional<z.ZodNullable<z.ZodISODate>>;
108
+ placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
287
109
  createdBy: z.ZodString;
288
- createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
289
- updatedByUserRole: z.ZodString;
290
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
291
- createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
292
- updatedAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
293
- updatedAt: z.ZodString;
110
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
111
+ user: "user";
112
+ system: "system";
113
+ }>>>;
114
+ updatedByUserRole: z.ZodOptional<z.ZodNullable<z.ZodString>>;
115
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
116
+ updatedAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
117
+ updatedAt: z.ZodISODateTime;
294
118
  assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
295
119
  updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
296
120
  trackingId: z.ZodString;
297
121
  potentialDuplicates: z.ZodArray<z.ZodObject<{
298
- id: z.ZodBranded<z.ZodString, "UUID">;
122
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
299
123
  trackingId: z.ZodString;
300
- }, "strip", z.ZodTypeAny, {
301
- id: string & z.BRAND<"UUID">;
302
- trackingId: string;
303
- }, {
304
- id: string;
305
- trackingId: string;
306
- }>, "many">;
307
- flags: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNativeEnum<{
308
- readonly PENDING_CERTIFICATION: "pending-certification";
124
+ }, z.core.$strip>>;
125
+ flags: z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
309
126
  readonly INCOMPLETE: "incomplete";
310
127
  readonly REJECTED: "rejected";
311
128
  readonly CORRECTION_REQUESTED: "correction-requested";
312
129
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
313
- }>]>, "many">;
314
- }, "strip", z.ZodTypeAny, {
315
- type: string;
316
- id: string & z.BRAND<"UUID">;
317
- status: "ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
318
- createdAt: string;
319
- createdBy: string;
320
- trackingId: string;
321
- updatedAt: string;
322
- legalStatuses: {
323
- DECLARED?: {
324
- createdAt: string;
325
- createdBy: string;
326
- createdByRole: string;
327
- acceptedAt: string;
328
- createdByUserType?: "system" | "user" | null | undefined;
329
- createdBySignature?: string | null | undefined;
330
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
331
- } | null | undefined;
332
- REGISTERED?: {
333
- createdAt: string;
334
- createdBy: string;
335
- createdByRole: string;
336
- registrationNumber: string;
337
- acceptedAt: string;
338
- createdByUserType?: "system" | "user" | null | undefined;
339
- createdBySignature?: string | null | undefined;
340
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
341
- } | null | undefined;
342
- };
343
- updatedByUserRole: string;
344
- potentialDuplicates: {
345
- id: string & z.BRAND<"UUID">;
346
- trackingId: string;
347
- }[];
348
- flags: string[];
349
- createdByUserType?: "system" | "user" | null | undefined;
350
- createdBySignature?: string | null | undefined;
351
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
352
- assignedTo?: string | null | undefined;
353
- dateOfEvent?: string | null | undefined;
354
- updatedAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
355
- updatedBy?: string | null | undefined;
356
- }, {
357
- type: string;
358
- id: string;
359
- status: "ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
360
- createdAt: string;
361
- createdBy: string;
362
- trackingId: string;
363
- updatedAt: string;
364
- legalStatuses: {
365
- DECLARED?: {
366
- createdAt: string;
367
- createdBy: string;
368
- createdByRole: string;
369
- acceptedAt: string;
370
- createdByUserType?: "system" | "user" | null | undefined;
371
- createdBySignature?: string | null | undefined;
372
- createdAtLocation?: string | null | undefined;
373
- } | null | undefined;
374
- REGISTERED?: {
375
- createdAt: string;
376
- createdBy: string;
377
- createdByRole: string;
378
- registrationNumber: string;
379
- acceptedAt: string;
380
- createdByUserType?: "system" | "user" | null | undefined;
381
- createdBySignature?: string | null | undefined;
382
- createdAtLocation?: string | null | undefined;
383
- } | null | undefined;
384
- };
385
- updatedByUserRole: string;
386
- potentialDuplicates: {
387
- id: string;
388
- trackingId: string;
389
- }[];
390
- flags: string[];
391
- createdByUserType?: "system" | "user" | null | undefined;
392
- createdBySignature?: string | null | undefined;
393
- createdAtLocation?: string | null | undefined;
394
- assignedTo?: string | null | undefined;
395
- dateOfEvent?: string | null | undefined;
396
- updatedAtLocation?: string | null | undefined;
397
- updatedBy?: string | null | undefined;
398
- }>;
130
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
131
+ }>]>, z.ZodString]>>;
132
+ }, z.core.$strip>;
399
133
  export type EventMetadata = z.infer<typeof EventMetadata>;
400
- export declare const EventMetadataKeysArray: readonly ["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"];
401
- export declare const EventMetadataKeys: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"]>;
134
+ export declare const EventMetadataKeysArray: readonly ["id", "type", "status", "createdAt", "dateOfEvent", "placeOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"];
135
+ export declare const EventMetadataKeys: z.ZodEnum<{
136
+ id: "id";
137
+ type: "type";
138
+ updatedAt: "updatedAt";
139
+ placeOfEvent: "placeOfEvent";
140
+ createdByUserType: "createdByUserType";
141
+ createdAt: "createdAt";
142
+ createdBy: "createdBy";
143
+ createdAtLocation: "createdAtLocation";
144
+ status: "status";
145
+ assignedTo: "assignedTo";
146
+ trackingId: "trackingId";
147
+ legalStatuses: "legalStatuses";
148
+ dateOfEvent: "dateOfEvent";
149
+ updatedByUserRole: "updatedByUserRole";
150
+ updatedAtLocation: "updatedAtLocation";
151
+ updatedBy: "updatedBy";
152
+ flags: "flags";
153
+ }>;
402
154
  export type EventMetadataKeys = z.infer<typeof EventMetadataKeys>;
403
155
  /**
404
156
  * Mapping of event metadata keys to translation configuration.
@@ -406,8 +158,22 @@ export type EventMetadataKeys = z.infer<typeof EventMetadataKeys>;
406
158
  * We need a way to know how to parse it.
407
159
  */
408
160
  export declare const eventMetadataLabelMap: Record<Exclude<`event.${EventMetadataKeys}`, 'event.legalStatuses'>, TranslationConfig>;
409
- export declare const EventMetadataDateFieldIdInput: z.ZodEnum<["createdAt", "updatedAt", "legalStatuses.DECLARED.createdAt", "legalStatuses.DECLARED.acceptedAt", "legalStatuses.REGISTERED.createdAt", "legalStatuses.REGISTERED.acceptedAt"]>;
161
+ export declare const EventMetadataDateFieldIdInput: z.ZodEnum<{
162
+ updatedAt: "updatedAt";
163
+ createdAt: "createdAt";
164
+ "legalStatuses.DECLARED.createdAt": "legalStatuses.DECLARED.createdAt";
165
+ "legalStatuses.DECLARED.acceptedAt": "legalStatuses.DECLARED.acceptedAt";
166
+ "legalStatuses.REGISTERED.createdAt": "legalStatuses.REGISTERED.createdAt";
167
+ "legalStatuses.REGISTERED.acceptedAt": "legalStatuses.REGISTERED.acceptedAt";
168
+ }>;
410
169
  export type EventMetadataDateFieldIdInput = z.infer<typeof EventMetadataDateFieldIdInput>;
411
- export declare const EventMetadataDateFieldId: z.ZodEnum<["event.createdAt", "event.updatedAt", "event.legalStatuses.DECLARED.createdAt", "event.legalStatuses.DECLARED.acceptedAt", "event.legalStatuses.REGISTERED.createdAt", "event.legalStatuses.REGISTERED.acceptedAt"]>;
170
+ export declare const EventMetadataDateFieldId: z.ZodEnum<{
171
+ "event.updatedAt": "event.updatedAt";
172
+ "event.createdAt": "event.createdAt";
173
+ "event.legalStatuses.DECLARED.createdAt": "event.legalStatuses.DECLARED.createdAt";
174
+ "event.legalStatuses.DECLARED.acceptedAt": "event.legalStatuses.DECLARED.acceptedAt";
175
+ "event.legalStatuses.REGISTERED.createdAt": "event.legalStatuses.REGISTERED.createdAt";
176
+ "event.legalStatuses.REGISTERED.acceptedAt": "event.legalStatuses.REGISTERED.acceptedAt";
177
+ }>;
412
178
  export type EventMetadataDateFieldId = z.infer<typeof EventMetadataDateFieldId>;
413
179
  //# sourceMappingURL=EventMetadata.d.ts.map