@opencrvs/toolkit 1.8.0-rc.f8be155 → 1.8.0-rc.f8e0ee5

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 (33) hide show
  1. package/dist/commons/api/router.d.ts +2029 -5136
  2. package/dist/commons/conditionals/conditionals.d.ts +0 -4
  3. package/dist/commons/conditionals/validate.d.ts +0 -6
  4. package/dist/commons/events/ActionConfig.d.ts +20914 -44038
  5. package/dist/commons/events/ActionDocument.d.ts +484 -1888
  6. package/dist/commons/events/ActionInput.d.ts +304 -1504
  7. package/dist/commons/events/ActionType.d.ts +0 -4
  8. package/dist/commons/events/AdvancedSearchConfig.d.ts +3 -75
  9. package/dist/commons/events/CompositeFieldValue.d.ts +0 -28
  10. package/dist/commons/events/Constants.d.ts +0 -1
  11. package/dist/commons/events/CreatedAtLocation.d.ts +2 -1
  12. package/dist/commons/events/Draft.d.ts +34 -130
  13. package/dist/commons/events/EventConfig.d.ts +16720 -30190
  14. package/dist/commons/events/EventDocument.d.ts +346 -1210
  15. package/dist/commons/events/EventIndex.d.ts +32 -270
  16. package/dist/commons/events/EventMetadata.d.ts +60 -27
  17. package/dist/commons/events/FieldConfig.d.ts +893 -1682
  18. package/dist/commons/events/FieldType.d.ts +1 -4
  19. package/dist/commons/events/FieldTypeMapping.d.ts +50 -89
  20. package/dist/commons/events/FieldValue.d.ts +5 -41
  21. package/dist/commons/events/FormConfig.d.ts +2510 -7640
  22. package/dist/commons/events/PageConfig.d.ts +1638 -2896
  23. package/dist/commons/events/SummaryConfig.d.ts +5 -0
  24. package/dist/commons/events/WorkqueueConfig.d.ts +19 -297
  25. package/dist/commons/events/defineConfig.d.ts +1440 -3841
  26. package/dist/commons/events/field.d.ts +0 -4
  27. package/dist/commons/events/scopes.d.ts +1 -1
  28. package/dist/commons/events/test.utils.d.ts +39 -126
  29. package/dist/commons/events/transactions.d.ts +1 -1
  30. package/dist/commons/events/utils.d.ts +18 -9664
  31. package/dist/conditionals/index.js +1 -18
  32. package/dist/events/index.js +1103 -1370
  33. package/package.json +1 -1
@@ -3,21 +3,44 @@ 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", "CERTIFIED", "REJECTED", "ARCHIVED"]>;
7
- export type EventStatus = z.infer<typeof EventStatus>;
6
+ export declare const EventStatus: {
7
+ readonly CREATED: "CREATED";
8
+ readonly NOTIFIED: "NOTIFIED";
9
+ readonly DECLARED: "DECLARED";
10
+ readonly VALIDATED: "VALIDATED";
11
+ readonly REGISTERED: "REGISTERED";
12
+ readonly CERTIFIED: "CERTIFIED";
13
+ readonly REJECTED: "REJECTED";
14
+ readonly ARCHIVED: "ARCHIVED";
15
+ };
16
+ export type EventStatus = (typeof EventStatus)[keyof typeof EventStatus];
17
+ export declare const EventStatusEnum: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "CERTIFIED", "REJECTED", "ARCHIVED"]>;
8
18
  export declare const CustomFlags: {
9
19
  readonly CERTIFICATE_PRINTED: "certificate-printed";
20
+ readonly CORRECTION_REQUESTED: "correction-requested";
10
21
  };
11
22
  export type CustomFlags = (typeof CustomFlags)[keyof typeof CustomFlags];
12
23
  export declare const Flag: z.ZodUnion<[z.ZodString, z.ZodNativeEnum<{
13
24
  readonly CERTIFICATE_PRINTED: "certificate-printed";
25
+ readonly CORRECTION_REQUESTED: "correction-requested";
14
26
  }>]>;
15
27
  export type Flag = z.infer<typeof Flag>;
28
+ export declare const eventStatuses: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
29
+ export declare const EventStatuses: z.ZodNativeEnum<{
30
+ readonly CREATED: "CREATED";
31
+ readonly NOTIFIED: "NOTIFIED";
32
+ readonly DECLARED: "DECLARED";
33
+ readonly VALIDATED: "VALIDATED";
34
+ readonly REGISTERED: "REGISTERED";
35
+ readonly CERTIFIED: "CERTIFIED";
36
+ readonly REJECTED: "REJECTED";
37
+ readonly ARCHIVED: "ARCHIVED";
38
+ }>;
16
39
  export declare const ZodDate: z.ZodString;
17
40
  export declare const ActionCreationMetadata: z.ZodObject<{
18
41
  createdAt: z.ZodString;
19
42
  createdBy: z.ZodString;
20
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
43
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
44
  acceptedAt: z.ZodString;
22
45
  createdByRole: z.ZodString;
23
46
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -27,7 +50,7 @@ export declare const ActionCreationMetadata: z.ZodObject<{
27
50
  createdByRole: string;
28
51
  acceptedAt: string;
29
52
  createdBySignature?: string | null | undefined;
30
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
53
+ createdAtLocation?: string | null | undefined;
31
54
  }, {
32
55
  createdAt: string;
33
56
  createdBy: string;
@@ -40,7 +63,7 @@ export type ActionCreationMetadata = z.infer<typeof ActionCreationMetadata>;
40
63
  export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.extendShape<{
41
64
  createdAt: z.ZodString;
42
65
  createdBy: z.ZodString;
43
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
66
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
67
  acceptedAt: z.ZodString;
45
68
  createdByRole: z.ZodString;
46
69
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -53,7 +76,7 @@ export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.exte
53
76
  registrationNumber: string;
54
77
  acceptedAt: string;
55
78
  createdBySignature?: string | null | undefined;
56
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
79
+ createdAtLocation?: string | null | undefined;
57
80
  }, {
58
81
  createdAt: string;
59
82
  createdBy: string;
@@ -68,7 +91,7 @@ export declare const LegalStatuses: z.ZodObject<{
68
91
  DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
69
92
  createdAt: z.ZodString;
70
93
  createdBy: z.ZodString;
71
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
94
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
72
95
  acceptedAt: z.ZodString;
73
96
  createdByRole: z.ZodString;
74
97
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -78,7 +101,7 @@ export declare const LegalStatuses: z.ZodObject<{
78
101
  createdByRole: string;
79
102
  acceptedAt: string;
80
103
  createdBySignature?: string | null | undefined;
81
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
104
+ createdAtLocation?: string | null | undefined;
82
105
  }, {
83
106
  createdAt: string;
84
107
  createdBy: string;
@@ -90,7 +113,7 @@ export declare const LegalStatuses: z.ZodObject<{
90
113
  REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<z.objectUtil.extendShape<{
91
114
  createdAt: z.ZodString;
92
115
  createdBy: z.ZodString;
93
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
116
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
94
117
  acceptedAt: z.ZodString;
95
118
  createdByRole: z.ZodString;
96
119
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -103,7 +126,7 @@ export declare const LegalStatuses: z.ZodObject<{
103
126
  registrationNumber: string;
104
127
  acceptedAt: string;
105
128
  createdBySignature?: string | null | undefined;
106
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
129
+ createdAtLocation?: string | null | undefined;
107
130
  }, {
108
131
  createdAt: string;
109
132
  createdBy: string;
@@ -120,7 +143,7 @@ export declare const LegalStatuses: z.ZodObject<{
120
143
  createdByRole: string;
121
144
  acceptedAt: string;
122
145
  createdBySignature?: string | null | undefined;
123
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
146
+ createdAtLocation?: string | null | undefined;
124
147
  } | null | undefined;
125
148
  REGISTERED?: {
126
149
  createdAt: string;
@@ -129,7 +152,7 @@ export declare const LegalStatuses: z.ZodObject<{
129
152
  registrationNumber: string;
130
153
  acceptedAt: string;
131
154
  createdBySignature?: string | null | undefined;
132
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
155
+ createdAtLocation?: string | null | undefined;
133
156
  } | null | undefined;
134
157
  }, {
135
158
  DECLARED?: {
@@ -156,14 +179,23 @@ export declare const LegalStatuses: z.ZodObject<{
156
179
  * Accessed through `event.` in configuration.
157
180
  */
158
181
  export declare const EventMetadata: z.ZodObject<{
159
- id: z.ZodBranded<z.ZodString, "UUID">;
182
+ id: z.ZodString;
160
183
  type: z.ZodString;
161
- status: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "CERTIFIED", "REJECTED", "ARCHIVED"]>;
184
+ status: z.ZodNativeEnum<{
185
+ readonly CREATED: "CREATED";
186
+ readonly NOTIFIED: "NOTIFIED";
187
+ readonly DECLARED: "DECLARED";
188
+ readonly VALIDATED: "VALIDATED";
189
+ readonly REGISTERED: "REGISTERED";
190
+ readonly CERTIFIED: "CERTIFIED";
191
+ readonly REJECTED: "REJECTED";
192
+ readonly ARCHIVED: "ARCHIVED";
193
+ }>;
162
194
  legalStatuses: z.ZodObject<{
163
195
  DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
164
196
  createdAt: z.ZodString;
165
197
  createdBy: z.ZodString;
166
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
198
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
167
199
  acceptedAt: z.ZodString;
168
200
  createdByRole: z.ZodString;
169
201
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -173,7 +205,7 @@ export declare const EventMetadata: z.ZodObject<{
173
205
  createdByRole: string;
174
206
  acceptedAt: string;
175
207
  createdBySignature?: string | null | undefined;
176
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
208
+ createdAtLocation?: string | null | undefined;
177
209
  }, {
178
210
  createdAt: string;
179
211
  createdBy: string;
@@ -185,7 +217,7 @@ export declare const EventMetadata: z.ZodObject<{
185
217
  REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<z.objectUtil.extendShape<{
186
218
  createdAt: z.ZodString;
187
219
  createdBy: z.ZodString;
188
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
220
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
189
221
  acceptedAt: z.ZodString;
190
222
  createdByRole: z.ZodString;
191
223
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -198,7 +230,7 @@ export declare const EventMetadata: z.ZodObject<{
198
230
  registrationNumber: string;
199
231
  acceptedAt: string;
200
232
  createdBySignature?: string | null | undefined;
201
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
233
+ createdAtLocation?: string | null | undefined;
202
234
  }, {
203
235
  createdAt: string;
204
236
  createdBy: string;
@@ -215,7 +247,7 @@ export declare const EventMetadata: z.ZodObject<{
215
247
  createdByRole: string;
216
248
  acceptedAt: string;
217
249
  createdBySignature?: string | null | undefined;
218
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
250
+ createdAtLocation?: string | null | undefined;
219
251
  } | null | undefined;
220
252
  REGISTERED?: {
221
253
  createdAt: string;
@@ -224,7 +256,7 @@ export declare const EventMetadata: z.ZodObject<{
224
256
  registrationNumber: string;
225
257
  acceptedAt: string;
226
258
  createdBySignature?: string | null | undefined;
227
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
259
+ createdAtLocation?: string | null | undefined;
228
260
  } | null | undefined;
229
261
  }, {
230
262
  DECLARED?: {
@@ -249,19 +281,20 @@ export declare const EventMetadata: z.ZodObject<{
249
281
  dateOfEvent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
250
282
  createdBy: z.ZodString;
251
283
  updatedByUserRole: z.ZodString;
252
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
284
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
253
285
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
254
- updatedAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
286
+ updatedAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
255
287
  updatedAt: z.ZodString;
256
288
  assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
257
289
  updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
258
290
  trackingId: z.ZodString;
259
291
  flags: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNativeEnum<{
260
292
  readonly CERTIFICATE_PRINTED: "certificate-printed";
293
+ readonly CORRECTION_REQUESTED: "correction-requested";
261
294
  }>]>, "many">;
262
295
  }, "strip", z.ZodTypeAny, {
263
296
  type: string;
264
- id: string & z.BRAND<"UUID">;
297
+ id: string;
265
298
  status: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
266
299
  createdAt: string;
267
300
  createdBy: string;
@@ -274,7 +307,7 @@ export declare const EventMetadata: z.ZodObject<{
274
307
  createdByRole: string;
275
308
  acceptedAt: string;
276
309
  createdBySignature?: string | null | undefined;
277
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
310
+ createdAtLocation?: string | null | undefined;
278
311
  } | null | undefined;
279
312
  REGISTERED?: {
280
313
  createdAt: string;
@@ -283,16 +316,16 @@ export declare const EventMetadata: z.ZodObject<{
283
316
  registrationNumber: string;
284
317
  acceptedAt: string;
285
318
  createdBySignature?: string | null | undefined;
286
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
319
+ createdAtLocation?: string | null | undefined;
287
320
  } | null | undefined;
288
321
  };
289
322
  updatedByUserRole: string;
290
323
  flags: string[];
291
324
  createdBySignature?: string | null | undefined;
292
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
325
+ createdAtLocation?: string | null | undefined;
293
326
  assignedTo?: string | null | undefined;
294
327
  dateOfEvent?: string | null | undefined;
295
- updatedAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
328
+ updatedAtLocation?: string | null | undefined;
296
329
  updatedBy?: string | null | undefined;
297
330
  }, {
298
331
  type: string;