@opencrvs/toolkit 1.9.13-rc.fc5374d → 2.0.0-rc.e0918cb

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 (130) hide show
  1. package/build.sh +13 -0
  2. package/dist/api/index.d.ts.map +1 -1
  3. package/dist/application-config/index.d.ts +2 -0
  4. package/dist/application-config/index.d.ts.map +1 -0
  5. package/dist/application-config/index.js +2128 -0
  6. package/dist/cli.d.ts +2 -0
  7. package/dist/cli.d.ts.map +1 -0
  8. package/dist/cli.js +3633 -0
  9. package/dist/commons/api/router.d.ts +3438 -2300
  10. package/dist/commons/application-config/index.d.ts +84 -0
  11. package/dist/commons/conditionals/conditionals.d.ts +27 -3
  12. package/dist/commons/conditionals/validate.d.ts +13 -3
  13. package/dist/commons/events/ActionConfig.d.ts +415 -1555
  14. package/dist/commons/events/ActionDocument.d.ts +888 -1941
  15. package/dist/commons/events/ActionInput.d.ts +277 -1073
  16. package/dist/commons/events/ActionType.d.ts +91 -11
  17. package/dist/commons/events/AdvancedSearchConfig.d.ts +294 -1496
  18. package/dist/commons/events/AuditLog.d.ts +405 -0
  19. package/dist/commons/events/CompositeFieldValue.d.ts +30 -190
  20. package/dist/commons/events/Conditional.d.ts +26 -38
  21. package/dist/commons/events/Constants.d.ts +1 -1
  22. package/dist/commons/events/CountryConfigQueryInput.d.ts +1592 -4471
  23. package/dist/commons/events/DeduplicationConfig.d.ts +15 -171
  24. package/dist/commons/events/Draft.d.ts +72 -107
  25. package/dist/commons/events/DynamicFieldValue.d.ts +12 -78
  26. package/dist/commons/events/EventConfig.d.ts +37 -2420
  27. package/dist/commons/events/EventConfigInput.d.ts +0 -3
  28. package/dist/commons/events/EventDocument.d.ts +354 -1366
  29. package/dist/commons/events/EventIndex.d.ts +212 -1010
  30. package/dist/commons/events/EventInput.d.ts +3 -8
  31. package/dist/commons/events/EventMetadata.d.ts +130 -357
  32. package/dist/commons/events/FieldConfig.d.ts +2892 -12892
  33. package/dist/commons/events/FieldType.d.ts +26 -4
  34. package/dist/commons/events/FieldTypeMapping.d.ts +314 -906
  35. package/dist/commons/events/FieldValue.d.ts +149 -527
  36. package/dist/commons/events/FileUtils.d.ts +2 -2
  37. package/dist/commons/events/Flag.d.ts +67 -0
  38. package/dist/commons/events/FormConfig.d.ts +54 -721
  39. package/dist/commons/events/PageConfig.d.ts +58 -320
  40. package/dist/commons/events/PlainDate.d.ts +1 -1
  41. package/dist/commons/events/SummaryConfig.d.ts +14 -161
  42. package/dist/commons/events/TemplateConfig.d.ts +2 -3
  43. package/dist/commons/events/TranslationConfig.d.ts +2 -2
  44. package/dist/commons/events/WorkqueueColumnConfig.d.ts +74 -37
  45. package/dist/commons/events/WorkqueueConfig.d.ts +2208 -7553
  46. package/dist/commons/events/deduplication.d.ts +3 -3
  47. package/dist/commons/events/defineConfig.d.ts +2 -247
  48. package/dist/commons/events/eventConfigValidation.d.ts +8 -0
  49. package/dist/commons/events/index.d.ts +3 -0
  50. package/dist/commons/events/locations.d.ts +57 -20
  51. package/dist/commons/events/scopes.d.ts +36 -35
  52. package/dist/commons/events/state/availableActions.d.ts +7 -2
  53. package/dist/commons/events/state/flags.d.ts +21 -3
  54. package/dist/commons/events/state/index.d.ts +30 -27
  55. package/dist/commons/events/state/utils.d.ts +190 -172
  56. package/dist/commons/events/test.utils.d.ts +52 -11
  57. package/dist/commons/events/transactions.d.ts +1 -1
  58. package/dist/commons/events/utils.d.ts +373 -273
  59. package/dist/commons/notification/UserNotifications.d.ts +61 -637
  60. package/dist/conditionals/index.d.ts.map +1 -1
  61. package/dist/conditionals/index.js +302 -14
  62. package/dist/events/deduplication.d.ts +3 -3
  63. package/dist/events/index.js +2860 -2115
  64. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts +3 -0
  65. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +1 -0
  66. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +405 -0
  67. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +3 -0
  68. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -0
  69. package/dist/migrations/v2.0/checkout-upstream-files.js +143 -0
  70. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts +2 -0
  71. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +1 -0
  72. package/dist/migrations/v2.0/convert-config-files-to-ts.js +829 -0
  73. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts +3 -0
  74. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +1 -0
  75. package/dist/migrations/v2.0/convert-paragraph-to-heading.js +159 -0
  76. package/dist/migrations/v2.0/create-events-index.d.ts +3 -0
  77. package/dist/migrations/v2.0/create-events-index.d.ts.map +1 -0
  78. package/dist/migrations/v2.0/create-events-index.js +326 -0
  79. package/dist/migrations/v2.0/index.d.ts +7 -0
  80. package/dist/migrations/v2.0/index.d.ts.map +1 -0
  81. package/dist/migrations/v2.0/index.js +3572 -0
  82. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts +3 -0
  83. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +1 -0
  84. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +344 -0
  85. package/dist/migrations/v2.0/migrate-scopes.d.ts +3 -0
  86. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -0
  87. package/dist/migrations/v2.0/migrate-scopes.js +282 -0
  88. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts +3 -0
  89. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +1 -0
  90. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +268 -0
  91. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts +3 -0
  92. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -0
  93. package/dist/migrations/v2.0/migrate-workqueue-configs.js +237 -0
  94. package/dist/migrations/v2.0/remove-delete-actions.d.ts +3 -0
  95. package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +1 -0
  96. package/dist/migrations/v2.0/remove-delete-actions.js +157 -0
  97. package/dist/migrations/v2.0/remove-demo-scope.d.ts +3 -0
  98. package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +1 -0
  99. package/dist/migrations/v2.0/remove-demo-scope.js +75 -0
  100. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts +3 -0
  101. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +1 -0
  102. package/dist/migrations/v2.0/remove-deprecated-imports.js +97 -0
  103. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts +3 -0
  104. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +1 -0
  105. package/dist/migrations/v2.0/remove-hearth-migrations.js +78 -0
  106. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts +3 -0
  107. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +1 -0
  108. package/dist/migrations/v2.0/remove-pending-certification-flag.js +110 -0
  109. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts +3 -0
  110. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +1 -0
  111. package/dist/migrations/v2.0/remove-review-from-register-action.js +164 -0
  112. package/dist/migrations/v2.0/rename-api-paths.d.ts +3 -0
  113. package/dist/migrations/v2.0/rename-api-paths.d.ts.map +1 -0
  114. package/dist/migrations/v2.0/rename-api-paths.js +188 -0
  115. package/dist/migrations/v2.0/rename-location-parent-id.d.ts +3 -0
  116. package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +1 -0
  117. package/dist/migrations/v2.0/rename-location-parent-id.js +181 -0
  118. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts +3 -0
  119. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +1 -0
  120. package/dist/migrations/v2.0/simplify-analytics-precalculations.js +196 -0
  121. package/dist/notification/index.d.ts.map +1 -1
  122. package/dist/notification/index.js +2076 -1767
  123. package/dist/scopes/index.d.ts +640 -353
  124. package/dist/scopes/index.d.ts.map +1 -1
  125. package/dist/scopes/index.js +340 -300
  126. package/opencrvs-toolkit-2.0.0-rc.e0918cb.tgz +0 -0
  127. package/package.json +18 -8
  128. package/tsconfig.json +12 -2
  129. package/tsconfig.tsbuildinfo +1 -1
  130. 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,163 @@
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;
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>;
35
26
  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
- }>;
27
+ }, z.core.$strip>;
53
28
  export type ActionCreationMetadata = z.infer<typeof ActionCreationMetadata>;
54
- export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.extendShape<{
55
- createdAt: z.ZodString;
29
+ export declare const RegistrationCreationMetadata: z.ZodObject<{
30
+ createdAt: z.ZodISODateTime;
56
31
  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;
32
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
33
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
34
+ user: "user";
35
+ system: "system";
36
+ }>>>;
37
+ acceptedAt: z.ZodISODateTime;
38
+ createdByRole: z.ZodOptional<z.ZodString>;
61
39
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
- }, {
63
40
  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
- }>;
41
+ }, z.core.$strip>;
83
42
  export type RegistrationCreationMetadata = z.infer<typeof RegistrationCreationMetadata>;
84
43
  export declare const LegalStatuses: z.ZodObject<{
85
44
  DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
86
- createdAt: z.ZodString;
45
+ createdAt: z.ZodISODateTime;
87
46
  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;
47
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
48
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
49
+ user: "user";
50
+ system: "system";
51
+ }>>>;
52
+ acceptedAt: z.ZodISODateTime;
53
+ createdByRole: z.ZodOptional<z.ZodString>;
92
54
  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;
55
+ }, z.core.$strip>>>;
56
+ REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
57
+ createdAt: z.ZodISODateTime;
112
58
  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;
59
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
60
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
61
+ user: "user";
62
+ system: "system";
63
+ }>>>;
64
+ acceptedAt: z.ZodISODateTime;
65
+ createdByRole: z.ZodOptional<z.ZodString>;
117
66
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
118
- }, {
119
67
  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
- }>;
68
+ }, z.core.$strip>>>;
69
+ }, z.core.$strip>;
180
70
  /**
181
71
  * Event metadata exposed to client.
182
72
  *
183
73
  * Accessed through `event.` in configuration.
184
74
  */
185
75
  export declare const EventMetadata: z.ZodObject<{
186
- id: z.ZodBranded<z.ZodString, "UUID">;
76
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
187
77
  type: z.ZodString;
188
- status: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "ARCHIVED"]>;
78
+ status: z.ZodEnum<{
79
+ CREATED: "CREATED";
80
+ NOTIFIED: "NOTIFIED";
81
+ DECLARED: "DECLARED";
82
+ REGISTERED: "REGISTERED";
83
+ ARCHIVED: "ARCHIVED";
84
+ }>;
189
85
  legalStatuses: z.ZodObject<{
190
86
  DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
191
- createdAt: z.ZodString;
87
+ createdAt: z.ZodISODateTime;
192
88
  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;
89
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
90
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
91
+ user: "user";
92
+ system: "system";
93
+ }>>>;
94
+ acceptedAt: z.ZodISODateTime;
95
+ createdByRole: z.ZodOptional<z.ZodString>;
197
96
  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;
97
+ }, z.core.$strip>>>;
98
+ REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
99
+ createdAt: z.ZodISODateTime;
217
100
  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;
101
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
102
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
103
+ user: "user";
104
+ system: "system";
105
+ }>>>;
106
+ acceptedAt: z.ZodISODateTime;
107
+ createdByRole: z.ZodOptional<z.ZodString>;
222
108
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
223
- }, {
224
109
  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>>;
110
+ }, z.core.$strip>>>;
111
+ }, z.core.$strip>;
112
+ createdAt: z.ZodISODateTime;
113
+ dateOfEvent: z.ZodOptional<z.ZodNullable<z.ZodISODate>>;
114
+ placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
287
115
  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;
116
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
117
+ user: "user";
118
+ system: "system";
119
+ }>>>;
120
+ updatedByUserRole: z.ZodOptional<z.ZodNullable<z.ZodString>>;
121
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
122
+ createdBySignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">>>;
123
+ updatedAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
124
+ updatedAt: z.ZodISODateTime;
294
125
  assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
295
126
  updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
296
127
  trackingId: z.ZodString;
297
128
  potentialDuplicates: z.ZodArray<z.ZodObject<{
298
- id: z.ZodBranded<z.ZodString, "UUID">;
129
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
299
130
  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";
131
+ }, z.core.$strip>>;
132
+ flags: z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
309
133
  readonly INCOMPLETE: "incomplete";
310
134
  readonly REJECTED: "rejected";
311
135
  readonly CORRECTION_REQUESTED: "correction-requested";
312
136
  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
- }>;
137
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
138
+ }>]>, z.ZodString]>>;
139
+ }, z.core.$strip>;
399
140
  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"]>;
141
+ export declare const EventMetadataKeysArray: readonly ["id", "type", "status", "createdAt", "dateOfEvent", "placeOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"];
142
+ export declare const EventMetadataKeys: z.ZodEnum<{
143
+ id: "id";
144
+ type: "type";
145
+ updatedAt: "updatedAt";
146
+ placeOfEvent: "placeOfEvent";
147
+ createdByUserType: "createdByUserType";
148
+ createdAt: "createdAt";
149
+ createdBy: "createdBy";
150
+ createdAtLocation: "createdAtLocation";
151
+ status: "status";
152
+ assignedTo: "assignedTo";
153
+ trackingId: "trackingId";
154
+ legalStatuses: "legalStatuses";
155
+ dateOfEvent: "dateOfEvent";
156
+ updatedByUserRole: "updatedByUserRole";
157
+ updatedAtLocation: "updatedAtLocation";
158
+ updatedBy: "updatedBy";
159
+ flags: "flags";
160
+ }>;
402
161
  export type EventMetadataKeys = z.infer<typeof EventMetadataKeys>;
403
162
  /**
404
163
  * Mapping of event metadata keys to translation configuration.
@@ -406,8 +165,22 @@ export type EventMetadataKeys = z.infer<typeof EventMetadataKeys>;
406
165
  * We need a way to know how to parse it.
407
166
  */
408
167
  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"]>;
168
+ export declare const EventMetadataDateFieldIdInput: z.ZodEnum<{
169
+ updatedAt: "updatedAt";
170
+ createdAt: "createdAt";
171
+ "legalStatuses.DECLARED.createdAt": "legalStatuses.DECLARED.createdAt";
172
+ "legalStatuses.DECLARED.acceptedAt": "legalStatuses.DECLARED.acceptedAt";
173
+ "legalStatuses.REGISTERED.createdAt": "legalStatuses.REGISTERED.createdAt";
174
+ "legalStatuses.REGISTERED.acceptedAt": "legalStatuses.REGISTERED.acceptedAt";
175
+ }>;
410
176
  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"]>;
177
+ export declare const EventMetadataDateFieldId: z.ZodEnum<{
178
+ "event.updatedAt": "event.updatedAt";
179
+ "event.createdAt": "event.createdAt";
180
+ "event.legalStatuses.DECLARED.createdAt": "event.legalStatuses.DECLARED.createdAt";
181
+ "event.legalStatuses.DECLARED.acceptedAt": "event.legalStatuses.DECLARED.acceptedAt";
182
+ "event.legalStatuses.REGISTERED.createdAt": "event.legalStatuses.REGISTERED.createdAt";
183
+ "event.legalStatuses.REGISTERED.acceptedAt": "event.legalStatuses.REGISTERED.acceptedAt";
184
+ }>;
412
185
  export type EventMetadataDateFieldId = z.infer<typeof EventMetadataDateFieldId>;
413
186
  //# sourceMappingURL=EventMetadata.d.ts.map