@opencrvs/toolkit 1.8.0-rc.f7aaf07 → 1.8.0-rc.f7e1622

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 (37) hide show
  1. package/dist/commons/api/router.d.ts +2228 -15340
  2. package/dist/commons/conditionals/conditionals.d.ts +0 -12
  3. package/dist/commons/conditionals/validate.d.ts +5 -0
  4. package/dist/commons/events/ActionConfig.d.ts +33832 -35902
  5. package/dist/commons/events/ActionDocument.d.ts +3439 -1912
  6. package/dist/commons/events/ActionInput.d.ts +2406 -1506
  7. package/dist/commons/events/ActionType.d.ts +7 -4
  8. package/dist/commons/events/AdvancedSearchConfig.d.ts +100 -51
  9. package/dist/commons/events/CompositeFieldValue.d.ts +15 -15
  10. package/dist/commons/events/CountryConfigQueryInput.d.ts +1798 -734
  11. package/dist/commons/events/CreatedAtLocation.d.ts +1 -2
  12. package/dist/commons/events/Draft.d.ts +208 -136
  13. package/dist/commons/events/EventConfig.d.ts +19880 -23808
  14. package/dist/commons/events/EventDocument.d.ts +1863 -1220
  15. package/dist/commons/events/EventIndex.d.ts +514 -316
  16. package/dist/commons/events/EventMetadata.d.ts +44 -33
  17. package/dist/commons/events/FieldConfig.d.ts +1171 -385
  18. package/dist/commons/events/FieldType.d.ts +2 -1
  19. package/dist/commons/events/FieldTypeMapping.d.ts +73 -41
  20. package/dist/commons/events/FieldValue.d.ts +57 -28
  21. package/dist/commons/events/FormConfig.d.ts +7380 -2640
  22. package/dist/commons/events/PageConfig.d.ts +1499 -343
  23. package/dist/commons/events/SummaryConfig.d.ts +10 -10
  24. package/dist/commons/events/User.d.ts +6 -3
  25. package/dist/commons/events/WorkqueueConfig.d.ts +3153 -1327
  26. package/dist/commons/events/defineConfig.d.ts +2475 -3245
  27. package/dist/commons/events/event.d.ts +10 -18
  28. package/dist/commons/events/field.d.ts +13 -1
  29. package/dist/commons/events/scopes.d.ts +2 -1
  30. package/dist/commons/events/test.utils.d.ts +74 -40
  31. package/dist/commons/events/transactions.d.ts +1 -1
  32. package/dist/commons/events/utils.d.ts +8553 -6994
  33. package/dist/conditionals/index.js +23 -53
  34. package/dist/events/index.js +1685 -1402
  35. package/dist/scopes/index.d.ts +92 -6
  36. package/dist/scopes/index.js +38 -9
  37. package/package.json +3 -3
@@ -3,21 +3,29 @@ 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"]>;
6
+ export declare const EventStatus: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "CERTIFIED", "ARCHIVED"]>;
7
7
  export type EventStatus = z.infer<typeof EventStatus>;
8
- export declare const CustomFlags: {
9
- readonly CERTIFICATE_PRINTED: "certificate-printed";
8
+ export declare const VisibleStatus: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "CERTIFIED", "ARCHIVED", "REJECTED"]>;
9
+ export type VisibleStatus = z.infer<typeof VisibleStatus>;
10
+ export declare const InherentFlags: {
11
+ readonly PRINTED: "printed";
12
+ readonly INCOMPLETE: "incomplete";
13
+ readonly REJECTED: "rejected";
14
+ readonly CORRECTION_REQUESTED: "correction-requested";
10
15
  };
11
- export type CustomFlags = (typeof CustomFlags)[keyof typeof CustomFlags];
16
+ export type InherentFlags = (typeof InherentFlags)[keyof typeof InherentFlags];
12
17
  export declare const Flag: z.ZodUnion<[z.ZodString, z.ZodNativeEnum<{
13
- readonly CERTIFICATE_PRINTED: "certificate-printed";
18
+ readonly PRINTED: "printed";
19
+ readonly INCOMPLETE: "incomplete";
20
+ readonly REJECTED: "rejected";
21
+ readonly CORRECTION_REQUESTED: "correction-requested";
14
22
  }>]>;
15
23
  export type Flag = z.infer<typeof Flag>;
16
24
  export declare const ZodDate: z.ZodString;
17
25
  export declare const ActionCreationMetadata: z.ZodObject<{
18
26
  createdAt: z.ZodString;
19
27
  createdBy: z.ZodString;
20
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
21
29
  createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
22
30
  acceptedAt: z.ZodString;
23
31
  createdByRole: z.ZodString;
@@ -29,7 +37,7 @@ export declare const ActionCreationMetadata: z.ZodObject<{
29
37
  acceptedAt: string;
30
38
  createdByUserType?: "system" | "user" | null | undefined;
31
39
  createdBySignature?: string | null | undefined;
32
- createdAtLocation?: string | null | undefined;
40
+ createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
33
41
  }, {
34
42
  createdAt: string;
35
43
  createdBy: string;
@@ -43,7 +51,7 @@ export type ActionCreationMetadata = z.infer<typeof ActionCreationMetadata>;
43
51
  export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.extendShape<{
44
52
  createdAt: z.ZodString;
45
53
  createdBy: z.ZodString;
46
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
47
55
  createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
48
56
  acceptedAt: z.ZodString;
49
57
  createdByRole: z.ZodString;
@@ -58,7 +66,7 @@ export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.exte
58
66
  acceptedAt: string;
59
67
  createdByUserType?: "system" | "user" | null | undefined;
60
68
  createdBySignature?: string | null | undefined;
61
- createdAtLocation?: string | null | undefined;
69
+ createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
62
70
  }, {
63
71
  createdAt: string;
64
72
  createdBy: string;
@@ -74,7 +82,7 @@ export declare const LegalStatuses: z.ZodObject<{
74
82
  DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
75
83
  createdAt: z.ZodString;
76
84
  createdBy: z.ZodString;
77
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
85
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
78
86
  createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
79
87
  acceptedAt: z.ZodString;
80
88
  createdByRole: z.ZodString;
@@ -86,7 +94,7 @@ export declare const LegalStatuses: z.ZodObject<{
86
94
  acceptedAt: string;
87
95
  createdByUserType?: "system" | "user" | null | undefined;
88
96
  createdBySignature?: string | null | undefined;
89
- createdAtLocation?: string | null | undefined;
97
+ createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
90
98
  }, {
91
99
  createdAt: string;
92
100
  createdBy: string;
@@ -99,7 +107,7 @@ export declare const LegalStatuses: z.ZodObject<{
99
107
  REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<z.objectUtil.extendShape<{
100
108
  createdAt: z.ZodString;
101
109
  createdBy: z.ZodString;
102
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
110
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
103
111
  createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
104
112
  acceptedAt: z.ZodString;
105
113
  createdByRole: z.ZodString;
@@ -114,7 +122,7 @@ export declare const LegalStatuses: z.ZodObject<{
114
122
  acceptedAt: string;
115
123
  createdByUserType?: "system" | "user" | null | undefined;
116
124
  createdBySignature?: string | null | undefined;
117
- createdAtLocation?: string | null | undefined;
125
+ createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
118
126
  }, {
119
127
  createdAt: string;
120
128
  createdBy: string;
@@ -133,7 +141,7 @@ export declare const LegalStatuses: z.ZodObject<{
133
141
  acceptedAt: string;
134
142
  createdByUserType?: "system" | "user" | null | undefined;
135
143
  createdBySignature?: string | null | undefined;
136
- createdAtLocation?: string | null | undefined;
144
+ createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
137
145
  } | null | undefined;
138
146
  REGISTERED?: {
139
147
  createdAt: string;
@@ -143,7 +151,7 @@ export declare const LegalStatuses: z.ZodObject<{
143
151
  acceptedAt: string;
144
152
  createdByUserType?: "system" | "user" | null | undefined;
145
153
  createdBySignature?: string | null | undefined;
146
- createdAtLocation?: string | null | undefined;
154
+ createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
147
155
  } | null | undefined;
148
156
  }, {
149
157
  DECLARED?: {
@@ -172,14 +180,14 @@ export declare const LegalStatuses: z.ZodObject<{
172
180
  * Accessed through `event.` in configuration.
173
181
  */
174
182
  export declare const EventMetadata: z.ZodObject<{
175
- id: z.ZodString;
183
+ id: z.ZodBranded<z.ZodString, "UUID">;
176
184
  type: z.ZodString;
177
- status: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "CERTIFIED", "REJECTED", "ARCHIVED"]>;
185
+ status: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "CERTIFIED", "ARCHIVED"]>;
178
186
  legalStatuses: z.ZodObject<{
179
187
  DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
180
188
  createdAt: z.ZodString;
181
189
  createdBy: z.ZodString;
182
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
190
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
183
191
  createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
184
192
  acceptedAt: z.ZodString;
185
193
  createdByRole: z.ZodString;
@@ -191,7 +199,7 @@ export declare const EventMetadata: z.ZodObject<{
191
199
  acceptedAt: string;
192
200
  createdByUserType?: "system" | "user" | null | undefined;
193
201
  createdBySignature?: string | null | undefined;
194
- createdAtLocation?: string | null | undefined;
202
+ createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
195
203
  }, {
196
204
  createdAt: string;
197
205
  createdBy: string;
@@ -204,7 +212,7 @@ export declare const EventMetadata: z.ZodObject<{
204
212
  REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<z.objectUtil.extendShape<{
205
213
  createdAt: z.ZodString;
206
214
  createdBy: z.ZodString;
207
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
215
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
208
216
  createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
209
217
  acceptedAt: z.ZodString;
210
218
  createdByRole: z.ZodString;
@@ -219,7 +227,7 @@ export declare const EventMetadata: z.ZodObject<{
219
227
  acceptedAt: string;
220
228
  createdByUserType?: "system" | "user" | null | undefined;
221
229
  createdBySignature?: string | null | undefined;
222
- createdAtLocation?: string | null | undefined;
230
+ createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
223
231
  }, {
224
232
  createdAt: string;
225
233
  createdBy: string;
@@ -238,7 +246,7 @@ export declare const EventMetadata: z.ZodObject<{
238
246
  acceptedAt: string;
239
247
  createdByUserType?: "system" | "user" | null | undefined;
240
248
  createdBySignature?: string | null | undefined;
241
- createdAtLocation?: string | null | undefined;
249
+ createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
242
250
  } | null | undefined;
243
251
  REGISTERED?: {
244
252
  createdAt: string;
@@ -248,7 +256,7 @@ export declare const EventMetadata: z.ZodObject<{
248
256
  acceptedAt: string;
249
257
  createdByUserType?: "system" | "user" | null | undefined;
250
258
  createdBySignature?: string | null | undefined;
251
- createdAtLocation?: string | null | undefined;
259
+ createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
252
260
  } | null | undefined;
253
261
  }, {
254
262
  DECLARED?: {
@@ -276,20 +284,23 @@ export declare const EventMetadata: z.ZodObject<{
276
284
  createdBy: z.ZodString;
277
285
  createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
278
286
  updatedByUserRole: z.ZodString;
279
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
287
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
280
288
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
281
- updatedAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
289
+ updatedAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
282
290
  updatedAt: z.ZodString;
283
291
  assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
284
292
  updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
285
293
  trackingId: z.ZodString;
286
294
  flags: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNativeEnum<{
287
- readonly CERTIFICATE_PRINTED: "certificate-printed";
295
+ readonly PRINTED: "printed";
296
+ readonly INCOMPLETE: "incomplete";
297
+ readonly REJECTED: "rejected";
298
+ readonly CORRECTION_REQUESTED: "correction-requested";
288
299
  }>]>, "many">;
289
300
  }, "strip", z.ZodTypeAny, {
290
301
  type: string;
291
- id: string;
292
- status: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
302
+ id: string & z.BRAND<"UUID">;
303
+ status: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
293
304
  createdAt: string;
294
305
  createdBy: string;
295
306
  updatedAt: string;
@@ -302,7 +313,7 @@ export declare const EventMetadata: z.ZodObject<{
302
313
  acceptedAt: string;
303
314
  createdByUserType?: "system" | "user" | null | undefined;
304
315
  createdBySignature?: string | null | undefined;
305
- createdAtLocation?: string | null | undefined;
316
+ createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
306
317
  } | null | undefined;
307
318
  REGISTERED?: {
308
319
  createdAt: string;
@@ -312,22 +323,22 @@ export declare const EventMetadata: z.ZodObject<{
312
323
  acceptedAt: string;
313
324
  createdByUserType?: "system" | "user" | null | undefined;
314
325
  createdBySignature?: string | null | undefined;
315
- createdAtLocation?: string | null | undefined;
326
+ createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
316
327
  } | null | undefined;
317
328
  };
318
329
  updatedByUserRole: string;
319
330
  flags: string[];
320
331
  createdByUserType?: "system" | "user" | null | undefined;
321
332
  createdBySignature?: string | null | undefined;
322
- createdAtLocation?: string | null | undefined;
333
+ createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
323
334
  assignedTo?: string | null | undefined;
324
335
  dateOfEvent?: string | null | undefined;
325
- updatedAtLocation?: string | null | undefined;
336
+ updatedAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
326
337
  updatedBy?: string | null | undefined;
327
338
  }, {
328
339
  type: string;
329
340
  id: string;
330
- status: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
341
+ status: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
331
342
  createdAt: string;
332
343
  createdBy: string;
333
344
  updatedAt: string;