@opencrvs/toolkit 1.8.0-rc.fb5b9fe → 1.8.0-rc.fb5f1af

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 (38) hide show
  1. package/dist/commons/api/router.d.ts +7226 -9201
  2. package/dist/commons/conditionals/conditionals.d.ts +4 -12
  3. package/dist/commons/conditionals/validate.d.ts +6 -0
  4. package/dist/commons/events/ActionConfig.d.ts +42985 -22929
  5. package/dist/commons/events/ActionDocument.d.ts +3599 -1052
  6. package/dist/commons/events/ActionInput.d.ts +2942 -842
  7. package/dist/commons/events/ActionType.d.ts +4 -0
  8. package/dist/commons/events/AdvancedSearchConfig.d.ts +339 -36
  9. package/dist/commons/events/CompositeFieldValue.d.ts +37 -9
  10. package/dist/commons/events/Constants.d.ts +1 -0
  11. package/dist/commons/events/CountryConfigQueryInput.d.ts +1891 -741
  12. package/dist/commons/events/Draft.d.ts +248 -75
  13. package/dist/commons/events/EventConfig.d.ts +17983 -8266
  14. package/dist/commons/events/EventDocument.d.ts +2260 -673
  15. package/dist/commons/events/EventIndex.d.ts +1069 -196
  16. package/dist/commons/events/EventMetadata.d.ts +52 -40
  17. package/dist/commons/events/FieldConfig.d.ts +2303 -926
  18. package/dist/commons/events/FieldType.d.ts +5 -1
  19. package/dist/commons/events/FieldTypeMapping.d.ts +144 -73
  20. package/dist/commons/events/FieldValue.d.ts +85 -20
  21. package/dist/commons/events/FormConfig.d.ts +23361 -14925
  22. package/dist/commons/events/PageConfig.d.ts +3730 -1662
  23. package/dist/commons/events/SummaryConfig.d.ts +0 -5
  24. package/dist/commons/events/User.d.ts +6 -3
  25. package/dist/commons/events/WorkqueueColumnConfig.d.ts +11 -11
  26. package/dist/commons/events/WorkqueueConfig.d.ts +5509 -1918
  27. package/dist/commons/events/defineConfig.d.ts +1762 -126
  28. package/dist/commons/events/event.d.ts +10 -18
  29. package/dist/commons/events/field.d.ts +9 -0
  30. package/dist/commons/events/index.d.ts +1 -0
  31. package/dist/commons/events/scopes.d.ts +1 -2
  32. package/dist/commons/events/test.utils.d.ts +181 -49
  33. package/dist/commons/events/utils.d.ts +13653 -1222
  34. package/dist/conditionals/index.js +40 -52
  35. package/dist/events/index.js +2274 -1491
  36. package/dist/scopes/index.d.ts +96 -7
  37. package/dist/scopes/index.js +105 -26
  38. package/package.json +3 -3
@@ -3,42 +3,28 @@ import { TranslationConfig } from './TranslationConfig';
3
3
  /**
4
4
  * Event statuses recognized by the system
5
5
  */
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";
6
+ export declare const EventStatus: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "CERTIFIED", "REJECTED", "ARCHIVED"]>;
7
+ export type EventStatus = z.infer<typeof EventStatus>;
8
+ export declare const InherentFlags: {
9
+ readonly PRINTED: "printed";
10
+ readonly INCOMPLETE: "incomplete";
11
+ readonly REJECTED: "rejected";
12
+ readonly CORRECTION_REQUESTED: "correction-requested";
15
13
  };
16
- export type EventStatus = (typeof EventStatus)[keyof typeof EventStatus];
17
- export declare const EventStatusEnum: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "CERTIFIED", "REJECTED", "ARCHIVED"]>;
18
- export declare const CustomFlags: {
19
- readonly CERTIFICATE_PRINTED: "certificate-printed";
20
- };
21
- export type CustomFlags = (typeof CustomFlags)[keyof typeof CustomFlags];
14
+ export type InherentFlags = (typeof InherentFlags)[keyof typeof InherentFlags];
22
15
  export declare const Flag: z.ZodUnion<[z.ZodString, z.ZodNativeEnum<{
23
- readonly CERTIFICATE_PRINTED: "certificate-printed";
16
+ readonly PRINTED: "printed";
17
+ readonly INCOMPLETE: "incomplete";
18
+ readonly REJECTED: "rejected";
19
+ readonly CORRECTION_REQUESTED: "correction-requested";
24
20
  }>]>;
25
21
  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
- }>;
37
22
  export declare const ZodDate: z.ZodString;
38
23
  export declare const ActionCreationMetadata: z.ZodObject<{
39
24
  createdAt: z.ZodString;
40
25
  createdBy: z.ZodString;
41
26
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
27
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
42
28
  acceptedAt: z.ZodString;
43
29
  createdByRole: z.ZodString;
44
30
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -47,6 +33,7 @@ export declare const ActionCreationMetadata: z.ZodObject<{
47
33
  createdBy: string;
48
34
  createdByRole: string;
49
35
  acceptedAt: string;
36
+ createdByUserType?: "system" | "user" | null | undefined;
50
37
  createdBySignature?: string | null | undefined;
51
38
  createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
52
39
  }, {
@@ -54,6 +41,7 @@ export declare const ActionCreationMetadata: z.ZodObject<{
54
41
  createdBy: string;
55
42
  createdByRole: string;
56
43
  acceptedAt: string;
44
+ createdByUserType?: "system" | "user" | null | undefined;
57
45
  createdBySignature?: string | null | undefined;
58
46
  createdAtLocation?: string | null | undefined;
59
47
  }>;
@@ -62,6 +50,7 @@ export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.exte
62
50
  createdAt: z.ZodString;
63
51
  createdBy: z.ZodString;
64
52
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
53
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
65
54
  acceptedAt: z.ZodString;
66
55
  createdByRole: z.ZodString;
67
56
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -73,6 +62,7 @@ export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.exte
73
62
  createdByRole: string;
74
63
  registrationNumber: string;
75
64
  acceptedAt: string;
65
+ createdByUserType?: "system" | "user" | null | undefined;
76
66
  createdBySignature?: string | null | undefined;
77
67
  createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
78
68
  }, {
@@ -81,6 +71,7 @@ export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.exte
81
71
  createdByRole: string;
82
72
  registrationNumber: string;
83
73
  acceptedAt: string;
74
+ createdByUserType?: "system" | "user" | null | undefined;
84
75
  createdBySignature?: string | null | undefined;
85
76
  createdAtLocation?: string | null | undefined;
86
77
  }>;
@@ -90,6 +81,7 @@ export declare const LegalStatuses: z.ZodObject<{
90
81
  createdAt: z.ZodString;
91
82
  createdBy: z.ZodString;
92
83
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
84
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
93
85
  acceptedAt: z.ZodString;
94
86
  createdByRole: z.ZodString;
95
87
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -98,6 +90,7 @@ export declare const LegalStatuses: z.ZodObject<{
98
90
  createdBy: string;
99
91
  createdByRole: string;
100
92
  acceptedAt: string;
93
+ createdByUserType?: "system" | "user" | null | undefined;
101
94
  createdBySignature?: string | null | undefined;
102
95
  createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
103
96
  }, {
@@ -105,6 +98,7 @@ export declare const LegalStatuses: z.ZodObject<{
105
98
  createdBy: string;
106
99
  createdByRole: string;
107
100
  acceptedAt: string;
101
+ createdByUserType?: "system" | "user" | null | undefined;
108
102
  createdBySignature?: string | null | undefined;
109
103
  createdAtLocation?: string | null | undefined;
110
104
  }>>>;
@@ -112,6 +106,7 @@ export declare const LegalStatuses: z.ZodObject<{
112
106
  createdAt: z.ZodString;
113
107
  createdBy: z.ZodString;
114
108
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
109
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
115
110
  acceptedAt: z.ZodString;
116
111
  createdByRole: z.ZodString;
117
112
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -123,6 +118,7 @@ export declare const LegalStatuses: z.ZodObject<{
123
118
  createdByRole: string;
124
119
  registrationNumber: string;
125
120
  acceptedAt: string;
121
+ createdByUserType?: "system" | "user" | null | undefined;
126
122
  createdBySignature?: string | null | undefined;
127
123
  createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
128
124
  }, {
@@ -131,6 +127,7 @@ export declare const LegalStatuses: z.ZodObject<{
131
127
  createdByRole: string;
132
128
  registrationNumber: string;
133
129
  acceptedAt: string;
130
+ createdByUserType?: "system" | "user" | null | undefined;
134
131
  createdBySignature?: string | null | undefined;
135
132
  createdAtLocation?: string | null | undefined;
136
133
  }>>>;
@@ -140,6 +137,7 @@ export declare const LegalStatuses: z.ZodObject<{
140
137
  createdBy: string;
141
138
  createdByRole: string;
142
139
  acceptedAt: string;
140
+ createdByUserType?: "system" | "user" | null | undefined;
143
141
  createdBySignature?: string | null | undefined;
144
142
  createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
145
143
  } | null | undefined;
@@ -149,6 +147,7 @@ export declare const LegalStatuses: z.ZodObject<{
149
147
  createdByRole: string;
150
148
  registrationNumber: string;
151
149
  acceptedAt: string;
150
+ createdByUserType?: "system" | "user" | null | undefined;
152
151
  createdBySignature?: string | null | undefined;
153
152
  createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
154
153
  } | null | undefined;
@@ -158,6 +157,7 @@ export declare const LegalStatuses: z.ZodObject<{
158
157
  createdBy: string;
159
158
  createdByRole: string;
160
159
  acceptedAt: string;
160
+ createdByUserType?: "system" | "user" | null | undefined;
161
161
  createdBySignature?: string | null | undefined;
162
162
  createdAtLocation?: string | null | undefined;
163
163
  } | null | undefined;
@@ -167,6 +167,7 @@ export declare const LegalStatuses: z.ZodObject<{
167
167
  createdByRole: string;
168
168
  registrationNumber: string;
169
169
  acceptedAt: string;
170
+ createdByUserType?: "system" | "user" | null | undefined;
170
171
  createdBySignature?: string | null | undefined;
171
172
  createdAtLocation?: string | null | undefined;
172
173
  } | null | undefined;
@@ -179,21 +180,13 @@ export declare const LegalStatuses: z.ZodObject<{
179
180
  export declare const EventMetadata: z.ZodObject<{
180
181
  id: z.ZodBranded<z.ZodString, "UUID">;
181
182
  type: z.ZodString;
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
- }>;
183
+ status: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "CERTIFIED", "REJECTED", "ARCHIVED"]>;
192
184
  legalStatuses: z.ZodObject<{
193
185
  DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
194
186
  createdAt: z.ZodString;
195
187
  createdBy: z.ZodString;
196
188
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
189
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
197
190
  acceptedAt: z.ZodString;
198
191
  createdByRole: z.ZodString;
199
192
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -202,6 +195,7 @@ export declare const EventMetadata: z.ZodObject<{
202
195
  createdBy: string;
203
196
  createdByRole: string;
204
197
  acceptedAt: string;
198
+ createdByUserType?: "system" | "user" | null | undefined;
205
199
  createdBySignature?: string | null | undefined;
206
200
  createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
207
201
  }, {
@@ -209,6 +203,7 @@ export declare const EventMetadata: z.ZodObject<{
209
203
  createdBy: string;
210
204
  createdByRole: string;
211
205
  acceptedAt: string;
206
+ createdByUserType?: "system" | "user" | null | undefined;
212
207
  createdBySignature?: string | null | undefined;
213
208
  createdAtLocation?: string | null | undefined;
214
209
  }>>>;
@@ -216,6 +211,7 @@ export declare const EventMetadata: z.ZodObject<{
216
211
  createdAt: z.ZodString;
217
212
  createdBy: z.ZodString;
218
213
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
214
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
219
215
  acceptedAt: z.ZodString;
220
216
  createdByRole: z.ZodString;
221
217
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -227,6 +223,7 @@ export declare const EventMetadata: z.ZodObject<{
227
223
  createdByRole: string;
228
224
  registrationNumber: string;
229
225
  acceptedAt: string;
226
+ createdByUserType?: "system" | "user" | null | undefined;
230
227
  createdBySignature?: string | null | undefined;
231
228
  createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
232
229
  }, {
@@ -235,6 +232,7 @@ export declare const EventMetadata: z.ZodObject<{
235
232
  createdByRole: string;
236
233
  registrationNumber: string;
237
234
  acceptedAt: string;
235
+ createdByUserType?: "system" | "user" | null | undefined;
238
236
  createdBySignature?: string | null | undefined;
239
237
  createdAtLocation?: string | null | undefined;
240
238
  }>>>;
@@ -244,6 +242,7 @@ export declare const EventMetadata: z.ZodObject<{
244
242
  createdBy: string;
245
243
  createdByRole: string;
246
244
  acceptedAt: string;
245
+ createdByUserType?: "system" | "user" | null | undefined;
247
246
  createdBySignature?: string | null | undefined;
248
247
  createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
249
248
  } | null | undefined;
@@ -253,6 +252,7 @@ export declare const EventMetadata: z.ZodObject<{
253
252
  createdByRole: string;
254
253
  registrationNumber: string;
255
254
  acceptedAt: string;
255
+ createdByUserType?: "system" | "user" | null | undefined;
256
256
  createdBySignature?: string | null | undefined;
257
257
  createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
258
258
  } | null | undefined;
@@ -262,6 +262,7 @@ export declare const EventMetadata: z.ZodObject<{
262
262
  createdBy: string;
263
263
  createdByRole: string;
264
264
  acceptedAt: string;
265
+ createdByUserType?: "system" | "user" | null | undefined;
265
266
  createdBySignature?: string | null | undefined;
266
267
  createdAtLocation?: string | null | undefined;
267
268
  } | null | undefined;
@@ -271,6 +272,7 @@ export declare const EventMetadata: z.ZodObject<{
271
272
  createdByRole: string;
272
273
  registrationNumber: string;
273
274
  acceptedAt: string;
275
+ createdByUserType?: "system" | "user" | null | undefined;
274
276
  createdBySignature?: string | null | undefined;
275
277
  createdAtLocation?: string | null | undefined;
276
278
  } | null | undefined;
@@ -278,6 +280,7 @@ export declare const EventMetadata: z.ZodObject<{
278
280
  createdAt: z.ZodString;
279
281
  dateOfEvent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
280
282
  createdBy: z.ZodString;
283
+ createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
281
284
  updatedByUserRole: z.ZodString;
282
285
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
283
286
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -287,7 +290,10 @@ export declare const EventMetadata: z.ZodObject<{
287
290
  updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
288
291
  trackingId: z.ZodString;
289
292
  flags: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNativeEnum<{
290
- readonly CERTIFICATE_PRINTED: "certificate-printed";
293
+ readonly PRINTED: "printed";
294
+ readonly INCOMPLETE: "incomplete";
295
+ readonly REJECTED: "rejected";
296
+ readonly CORRECTION_REQUESTED: "correction-requested";
291
297
  }>]>, "many">;
292
298
  }, "strip", z.ZodTypeAny, {
293
299
  type: string;
@@ -303,6 +309,7 @@ export declare const EventMetadata: z.ZodObject<{
303
309
  createdBy: string;
304
310
  createdByRole: string;
305
311
  acceptedAt: string;
312
+ createdByUserType?: "system" | "user" | null | undefined;
306
313
  createdBySignature?: string | null | undefined;
307
314
  createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
308
315
  } | null | undefined;
@@ -312,12 +319,14 @@ export declare const EventMetadata: z.ZodObject<{
312
319
  createdByRole: string;
313
320
  registrationNumber: string;
314
321
  acceptedAt: string;
322
+ createdByUserType?: "system" | "user" | null | undefined;
315
323
  createdBySignature?: string | null | undefined;
316
324
  createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
317
325
  } | null | undefined;
318
326
  };
319
327
  updatedByUserRole: string;
320
328
  flags: string[];
329
+ createdByUserType?: "system" | "user" | null | undefined;
321
330
  createdBySignature?: string | null | undefined;
322
331
  createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
323
332
  assignedTo?: string | null | undefined;
@@ -338,6 +347,7 @@ export declare const EventMetadata: z.ZodObject<{
338
347
  createdBy: string;
339
348
  createdByRole: string;
340
349
  acceptedAt: string;
350
+ createdByUserType?: "system" | "user" | null | undefined;
341
351
  createdBySignature?: string | null | undefined;
342
352
  createdAtLocation?: string | null | undefined;
343
353
  } | null | undefined;
@@ -347,12 +357,14 @@ export declare const EventMetadata: z.ZodObject<{
347
357
  createdByRole: string;
348
358
  registrationNumber: string;
349
359
  acceptedAt: string;
360
+ createdByUserType?: "system" | "user" | null | undefined;
350
361
  createdBySignature?: string | null | undefined;
351
362
  createdAtLocation?: string | null | undefined;
352
363
  } | null | undefined;
353
364
  };
354
365
  updatedByUserRole: string;
355
366
  flags: string[];
367
+ createdByUserType?: "system" | "user" | null | undefined;
356
368
  createdBySignature?: string | null | undefined;
357
369
  createdAtLocation?: string | null | undefined;
358
370
  assignedTo?: string | null | undefined;
@@ -361,8 +373,8 @@ export declare const EventMetadata: z.ZodObject<{
361
373
  updatedBy?: string | null | undefined;
362
374
  }>;
363
375
  export type EventMetadata = z.infer<typeof EventMetadata>;
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"]>;
376
+ export declare const EventMetadataKeysArray: readonly ["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"];
377
+ export declare const EventMetadataKeys: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"]>;
366
378
  export type EventMetadataKeys = z.infer<typeof EventMetadataKeys>;
367
379
  /**
368
380
  * Mapping of event metadata keys to translation configuration.