@opencrvs/toolkit 1.8.0-rc.fe4d9d5 → 1.8.0-rc.fe7c504

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