@opencrvs/toolkit 1.8.0-rc.fa49ae3 → 1.8.0-rc.fa564ca

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 (31) hide show
  1. package/dist/commons/api/router.d.ts +381 -6649
  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 +6326 -18678
  5. package/dist/commons/events/ActionDocument.d.ts +204 -1713
  6. package/dist/commons/events/ActionInput.d.ts +180 -1380
  7. package/dist/commons/events/AdvancedSearchConfig.d.ts +3 -75
  8. package/dist/commons/events/CompositeFieldValue.d.ts +0 -28
  9. package/dist/commons/events/Constants.d.ts +0 -1
  10. package/dist/commons/events/CountryConfigQueryInput.d.ts +0 -26
  11. package/dist/commons/events/Draft.d.ts +16 -117
  12. package/dist/commons/events/EventConfig.d.ts +2487 -8364
  13. package/dist/commons/events/EventDocument.d.ts +152 -1096
  14. package/dist/commons/events/EventIndex.d.ts +17 -283
  15. package/dist/commons/events/EventMetadata.d.ts +35 -38
  16. package/dist/commons/events/FieldConfig.d.ts +771 -1597
  17. package/dist/commons/events/FieldType.d.ts +1 -4
  18. package/dist/commons/events/FieldTypeMapping.d.ts +50 -89
  19. package/dist/commons/events/FieldValue.d.ts +5 -41
  20. package/dist/commons/events/FormConfig.d.ts +2444 -7640
  21. package/dist/commons/events/PageConfig.d.ts +1620 -2896
  22. package/dist/commons/events/SummaryConfig.d.ts +5 -0
  23. package/dist/commons/events/WorkqueueColumnConfig.d.ts +11 -11
  24. package/dist/commons/events/WorkqueueConfig.d.ts +24 -346
  25. package/dist/commons/events/defineConfig.d.ts +14 -960
  26. package/dist/commons/events/field.d.ts +0 -4
  27. package/dist/commons/events/test.utils.d.ts +38 -124
  28. package/dist/commons/events/utils.d.ts +8 -9659
  29. package/dist/conditionals/index.js +1 -18
  30. package/dist/events/index.js +413 -691
  31. package/package.json +1 -1
@@ -3,8 +3,18 @@ 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";
10
20
  };
@@ -13,12 +23,22 @@ export declare const Flag: z.ZodUnion<[z.ZodString, z.ZodNativeEnum<{
13
23
  readonly CERTIFICATE_PRINTED: "certificate-printed";
14
24
  }>]>;
15
25
  export type Flag = z.infer<typeof Flag>;
26
+ export declare const eventStatuses: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
27
+ export declare const EventStatuses: z.ZodNativeEnum<{
28
+ readonly CREATED: "CREATED";
29
+ readonly NOTIFIED: "NOTIFIED";
30
+ readonly DECLARED: "DECLARED";
31
+ readonly VALIDATED: "VALIDATED";
32
+ readonly REGISTERED: "REGISTERED";
33
+ readonly CERTIFIED: "CERTIFIED";
34
+ readonly REJECTED: "REJECTED";
35
+ readonly ARCHIVED: "ARCHIVED";
36
+ }>;
16
37
  export declare const ZodDate: z.ZodString;
17
38
  export declare const ActionCreationMetadata: z.ZodObject<{
18
39
  createdAt: z.ZodString;
19
40
  createdBy: z.ZodString;
20
41
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
- creator: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
22
42
  acceptedAt: z.ZodString;
23
43
  createdByRole: z.ZodString;
24
44
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -27,7 +47,6 @@ export declare const ActionCreationMetadata: z.ZodObject<{
27
47
  createdBy: string;
28
48
  createdByRole: string;
29
49
  acceptedAt: string;
30
- creator?: "system" | "user" | null | undefined;
31
50
  createdBySignature?: string | null | undefined;
32
51
  createdAtLocation?: string | null | undefined;
33
52
  }, {
@@ -35,7 +54,6 @@ export declare const ActionCreationMetadata: z.ZodObject<{
35
54
  createdBy: string;
36
55
  createdByRole: string;
37
56
  acceptedAt: string;
38
- creator?: "system" | "user" | null | undefined;
39
57
  createdBySignature?: string | null | undefined;
40
58
  createdAtLocation?: string | null | undefined;
41
59
  }>;
@@ -44,7 +62,6 @@ export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.exte
44
62
  createdAt: z.ZodString;
45
63
  createdBy: z.ZodString;
46
64
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
47
- creator: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
48
65
  acceptedAt: z.ZodString;
49
66
  createdByRole: z.ZodString;
50
67
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -56,7 +73,6 @@ export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.exte
56
73
  createdByRole: string;
57
74
  registrationNumber: string;
58
75
  acceptedAt: string;
59
- creator?: "system" | "user" | null | undefined;
60
76
  createdBySignature?: string | null | undefined;
61
77
  createdAtLocation?: string | null | undefined;
62
78
  }, {
@@ -65,7 +81,6 @@ export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.exte
65
81
  createdByRole: string;
66
82
  registrationNumber: string;
67
83
  acceptedAt: string;
68
- creator?: "system" | "user" | null | undefined;
69
84
  createdBySignature?: string | null | undefined;
70
85
  createdAtLocation?: string | null | undefined;
71
86
  }>;
@@ -75,7 +90,6 @@ export declare const LegalStatuses: z.ZodObject<{
75
90
  createdAt: z.ZodString;
76
91
  createdBy: z.ZodString;
77
92
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
78
- creator: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
79
93
  acceptedAt: z.ZodString;
80
94
  createdByRole: z.ZodString;
81
95
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -84,7 +98,6 @@ export declare const LegalStatuses: z.ZodObject<{
84
98
  createdBy: string;
85
99
  createdByRole: string;
86
100
  acceptedAt: string;
87
- creator?: "system" | "user" | null | undefined;
88
101
  createdBySignature?: string | null | undefined;
89
102
  createdAtLocation?: string | null | undefined;
90
103
  }, {
@@ -92,7 +105,6 @@ export declare const LegalStatuses: z.ZodObject<{
92
105
  createdBy: string;
93
106
  createdByRole: string;
94
107
  acceptedAt: string;
95
- creator?: "system" | "user" | null | undefined;
96
108
  createdBySignature?: string | null | undefined;
97
109
  createdAtLocation?: string | null | undefined;
98
110
  }>>>;
@@ -100,7 +112,6 @@ export declare const LegalStatuses: z.ZodObject<{
100
112
  createdAt: z.ZodString;
101
113
  createdBy: z.ZodString;
102
114
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
103
- creator: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
104
115
  acceptedAt: z.ZodString;
105
116
  createdByRole: z.ZodString;
106
117
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -112,7 +123,6 @@ export declare const LegalStatuses: z.ZodObject<{
112
123
  createdByRole: string;
113
124
  registrationNumber: string;
114
125
  acceptedAt: string;
115
- creator?: "system" | "user" | null | undefined;
116
126
  createdBySignature?: string | null | undefined;
117
127
  createdAtLocation?: string | null | undefined;
118
128
  }, {
@@ -121,7 +131,6 @@ export declare const LegalStatuses: z.ZodObject<{
121
131
  createdByRole: string;
122
132
  registrationNumber: string;
123
133
  acceptedAt: string;
124
- creator?: "system" | "user" | null | undefined;
125
134
  createdBySignature?: string | null | undefined;
126
135
  createdAtLocation?: string | null | undefined;
127
136
  }>>>;
@@ -131,7 +140,6 @@ export declare const LegalStatuses: z.ZodObject<{
131
140
  createdBy: string;
132
141
  createdByRole: string;
133
142
  acceptedAt: string;
134
- creator?: "system" | "user" | null | undefined;
135
143
  createdBySignature?: string | null | undefined;
136
144
  createdAtLocation?: string | null | undefined;
137
145
  } | null | undefined;
@@ -141,7 +149,6 @@ export declare const LegalStatuses: z.ZodObject<{
141
149
  createdByRole: string;
142
150
  registrationNumber: string;
143
151
  acceptedAt: string;
144
- creator?: "system" | "user" | null | undefined;
145
152
  createdBySignature?: string | null | undefined;
146
153
  createdAtLocation?: string | null | undefined;
147
154
  } | null | undefined;
@@ -151,7 +158,6 @@ export declare const LegalStatuses: z.ZodObject<{
151
158
  createdBy: string;
152
159
  createdByRole: string;
153
160
  acceptedAt: string;
154
- creator?: "system" | "user" | null | undefined;
155
161
  createdBySignature?: string | null | undefined;
156
162
  createdAtLocation?: string | null | undefined;
157
163
  } | null | undefined;
@@ -161,7 +167,6 @@ export declare const LegalStatuses: z.ZodObject<{
161
167
  createdByRole: string;
162
168
  registrationNumber: string;
163
169
  acceptedAt: string;
164
- creator?: "system" | "user" | null | undefined;
165
170
  createdBySignature?: string | null | undefined;
166
171
  createdAtLocation?: string | null | undefined;
167
172
  } | null | undefined;
@@ -174,13 +179,21 @@ export declare const LegalStatuses: z.ZodObject<{
174
179
  export declare const EventMetadata: z.ZodObject<{
175
180
  id: z.ZodString;
176
181
  type: z.ZodString;
177
- status: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "CERTIFIED", "REJECTED", "ARCHIVED"]>;
182
+ status: z.ZodNativeEnum<{
183
+ readonly CREATED: "CREATED";
184
+ readonly NOTIFIED: "NOTIFIED";
185
+ readonly DECLARED: "DECLARED";
186
+ readonly VALIDATED: "VALIDATED";
187
+ readonly REGISTERED: "REGISTERED";
188
+ readonly CERTIFIED: "CERTIFIED";
189
+ readonly REJECTED: "REJECTED";
190
+ readonly ARCHIVED: "ARCHIVED";
191
+ }>;
178
192
  legalStatuses: z.ZodObject<{
179
193
  DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
180
194
  createdAt: z.ZodString;
181
195
  createdBy: z.ZodString;
182
196
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
183
- creator: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
184
197
  acceptedAt: z.ZodString;
185
198
  createdByRole: z.ZodString;
186
199
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -189,7 +202,6 @@ export declare const EventMetadata: z.ZodObject<{
189
202
  createdBy: string;
190
203
  createdByRole: string;
191
204
  acceptedAt: string;
192
- creator?: "system" | "user" | null | undefined;
193
205
  createdBySignature?: string | null | undefined;
194
206
  createdAtLocation?: string | null | undefined;
195
207
  }, {
@@ -197,7 +209,6 @@ export declare const EventMetadata: z.ZodObject<{
197
209
  createdBy: string;
198
210
  createdByRole: string;
199
211
  acceptedAt: string;
200
- creator?: "system" | "user" | null | undefined;
201
212
  createdBySignature?: string | null | undefined;
202
213
  createdAtLocation?: string | null | undefined;
203
214
  }>>>;
@@ -205,7 +216,6 @@ export declare const EventMetadata: z.ZodObject<{
205
216
  createdAt: z.ZodString;
206
217
  createdBy: z.ZodString;
207
218
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
208
- creator: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
209
219
  acceptedAt: z.ZodString;
210
220
  createdByRole: z.ZodString;
211
221
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -217,7 +227,6 @@ export declare const EventMetadata: z.ZodObject<{
217
227
  createdByRole: string;
218
228
  registrationNumber: string;
219
229
  acceptedAt: string;
220
- creator?: "system" | "user" | null | undefined;
221
230
  createdBySignature?: string | null | undefined;
222
231
  createdAtLocation?: string | null | undefined;
223
232
  }, {
@@ -226,7 +235,6 @@ export declare const EventMetadata: z.ZodObject<{
226
235
  createdByRole: string;
227
236
  registrationNumber: string;
228
237
  acceptedAt: string;
229
- creator?: "system" | "user" | null | undefined;
230
238
  createdBySignature?: string | null | undefined;
231
239
  createdAtLocation?: string | null | undefined;
232
240
  }>>>;
@@ -236,7 +244,6 @@ export declare const EventMetadata: z.ZodObject<{
236
244
  createdBy: string;
237
245
  createdByRole: string;
238
246
  acceptedAt: string;
239
- creator?: "system" | "user" | null | undefined;
240
247
  createdBySignature?: string | null | undefined;
241
248
  createdAtLocation?: string | null | undefined;
242
249
  } | null | undefined;
@@ -246,7 +253,6 @@ export declare const EventMetadata: z.ZodObject<{
246
253
  createdByRole: string;
247
254
  registrationNumber: string;
248
255
  acceptedAt: string;
249
- creator?: "system" | "user" | null | undefined;
250
256
  createdBySignature?: string | null | undefined;
251
257
  createdAtLocation?: string | null | undefined;
252
258
  } | null | undefined;
@@ -256,7 +262,6 @@ export declare const EventMetadata: z.ZodObject<{
256
262
  createdBy: string;
257
263
  createdByRole: string;
258
264
  acceptedAt: string;
259
- creator?: "system" | "user" | null | undefined;
260
265
  createdBySignature?: string | null | undefined;
261
266
  createdAtLocation?: string | null | undefined;
262
267
  } | null | undefined;
@@ -266,7 +271,6 @@ export declare const EventMetadata: z.ZodObject<{
266
271
  createdByRole: string;
267
272
  registrationNumber: string;
268
273
  acceptedAt: string;
269
- creator?: "system" | "user" | null | undefined;
270
274
  createdBySignature?: string | null | undefined;
271
275
  createdAtLocation?: string | null | undefined;
272
276
  } | null | undefined;
@@ -274,7 +278,6 @@ export declare const EventMetadata: z.ZodObject<{
274
278
  createdAt: z.ZodString;
275
279
  dateOfEvent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
276
280
  createdBy: z.ZodString;
277
- creator: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
278
281
  updatedByUserRole: z.ZodString;
279
282
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
280
283
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -300,7 +303,6 @@ export declare const EventMetadata: z.ZodObject<{
300
303
  createdBy: string;
301
304
  createdByRole: string;
302
305
  acceptedAt: string;
303
- creator?: "system" | "user" | null | undefined;
304
306
  createdBySignature?: string | null | undefined;
305
307
  createdAtLocation?: string | null | undefined;
306
308
  } | null | undefined;
@@ -310,14 +312,12 @@ export declare const EventMetadata: z.ZodObject<{
310
312
  createdByRole: string;
311
313
  registrationNumber: string;
312
314
  acceptedAt: string;
313
- creator?: "system" | "user" | null | undefined;
314
315
  createdBySignature?: string | null | undefined;
315
316
  createdAtLocation?: string | null | undefined;
316
317
  } | null | undefined;
317
318
  };
318
319
  updatedByUserRole: string;
319
320
  flags: string[];
320
- creator?: "system" | "user" | null | undefined;
321
321
  createdBySignature?: string | null | undefined;
322
322
  createdAtLocation?: string | null | undefined;
323
323
  assignedTo?: string | null | undefined;
@@ -338,7 +338,6 @@ export declare const EventMetadata: z.ZodObject<{
338
338
  createdBy: string;
339
339
  createdByRole: string;
340
340
  acceptedAt: string;
341
- creator?: "system" | "user" | null | undefined;
342
341
  createdBySignature?: string | null | undefined;
343
342
  createdAtLocation?: string | null | undefined;
344
343
  } | null | undefined;
@@ -348,14 +347,12 @@ export declare const EventMetadata: z.ZodObject<{
348
347
  createdByRole: string;
349
348
  registrationNumber: string;
350
349
  acceptedAt: string;
351
- creator?: "system" | "user" | null | undefined;
352
350
  createdBySignature?: string | null | undefined;
353
351
  createdAtLocation?: string | null | undefined;
354
352
  } | null | undefined;
355
353
  };
356
354
  updatedByUserRole: string;
357
355
  flags: string[];
358
- creator?: "system" | "user" | null | undefined;
359
356
  createdBySignature?: string | null | undefined;
360
357
  createdAtLocation?: string | null | undefined;
361
358
  assignedTo?: string | null | undefined;
@@ -364,8 +361,8 @@ export declare const EventMetadata: z.ZodObject<{
364
361
  updatedBy?: string | null | undefined;
365
362
  }>;
366
363
  export type EventMetadata = z.infer<typeof EventMetadata>;
367
- export declare const EventMetadataKeysArray: readonly ["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "creator", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"];
368
- export declare const EventMetadataKeys: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "creator", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"]>;
364
+ export declare const EventMetadataKeysArray: readonly ["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"];
365
+ export declare const EventMetadataKeys: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"]>;
369
366
  export type EventMetadataKeys = z.infer<typeof EventMetadataKeys>;
370
367
  /**
371
368
  * Mapping of event metadata keys to translation configuration.