@opencrvs/toolkit 1.8.0-rc.f7a451a → 1.8.0-rc.f7bcb31

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 +4206 -8342
  2. package/dist/commons/conditionals/conditionals.d.ts +7 -11
  3. package/dist/commons/conditionals/validate.d.ts +6 -4
  4. package/dist/commons/events/ActionConfig.d.ts +1727 -97087
  5. package/dist/commons/events/ActionDocument.d.ts +211 -542
  6. package/dist/commons/events/ActionInput.d.ts +240 -248
  7. package/dist/commons/events/AdvancedSearchConfig.d.ts +22 -957
  8. package/dist/commons/events/CompositeFieldValue.d.ts +0 -3
  9. package/dist/commons/events/Draft.d.ts +20 -33
  10. package/dist/commons/events/EventConfig.d.ts +1350 -46327
  11. package/dist/commons/events/EventDocument.d.ts +156 -324
  12. package/dist/commons/events/EventIndex.d.ts +13 -1821
  13. package/dist/commons/events/EventMetadata.d.ts +11 -277
  14. package/dist/commons/events/FieldConfig.d.ts +754 -4280
  15. package/dist/commons/events/FieldType.d.ts +3 -3
  16. package/dist/commons/events/FieldTypeMapping.d.ts +4 -11
  17. package/dist/commons/events/FieldValue.d.ts +4 -7
  18. package/dist/commons/events/FormConfig.d.ts +441 -43593
  19. package/dist/commons/events/PageConfig.d.ts +208 -10864
  20. package/dist/commons/events/SummaryConfig.d.ts +39 -95
  21. package/dist/commons/events/User.d.ts +2 -31
  22. package/dist/commons/events/WorkqueueConfig.d.ts +20 -5341
  23. package/dist/commons/events/defineConfig.d.ts +35 -7218
  24. package/dist/commons/events/index.d.ts +0 -6
  25. package/dist/commons/events/test.utils.d.ts +46 -10
  26. package/dist/commons/events/utils.d.ts +67 -3665
  27. package/dist/conditionals/index.js +35 -55
  28. package/dist/events/index.js +1075 -2461
  29. package/dist/scopes/index.d.ts +4 -91
  30. package/dist/scopes/index.js +21 -39
  31. package/package.json +2 -3
  32. package/dist/commons/events/CountryConfigQueryInput.d.ts +0 -3008
  33. package/dist/commons/events/WorkqueueColumnConfig.d.ts +0 -42
  34. package/dist/commons/events/event.d.ts +0 -54
  35. package/dist/commons/events/field.d.ts +0 -82
  36. package/dist/commons/events/scopes.d.ts +0 -45
  37. package/dist/commons/events/serializer.d.ts +0 -2
  38. package/dist/commons/events/workqueueDefaultColumns.d.ts +0 -3
@@ -14,15 +14,6 @@ export declare const EventStatus: {
14
14
  readonly ARCHIVED: "ARCHIVED";
15
15
  };
16
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];
22
- export declare const Flag: z.ZodUnion<[z.ZodString, z.ZodNativeEnum<{
23
- readonly CERTIFICATE_PRINTED: "certificate-printed";
24
- }>]>;
25
- export type Flag = z.infer<typeof Flag>;
26
17
  export declare const eventStatuses: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
27
18
  export declare const EventStatuses: z.ZodNativeEnum<{
28
19
  readonly CREATED: "CREATED";
@@ -34,127 +25,6 @@ export declare const EventStatuses: z.ZodNativeEnum<{
34
25
  readonly REJECTED: "REJECTED";
35
26
  readonly ARCHIVED: "ARCHIVED";
36
27
  }>;
37
- export declare const ZodDate: z.ZodString;
38
- export declare const ActionCreationMetadata: z.ZodObject<{
39
- createdAt: z.ZodString;
40
- createdBy: z.ZodString;
41
- createdAtLocation: z.ZodString;
42
- acceptedAt: z.ZodString;
43
- createdByRole: z.ZodString;
44
- }, "strip", z.ZodTypeAny, {
45
- createdAt: string;
46
- createdBy: string;
47
- createdByRole: string;
48
- createdAtLocation: string;
49
- acceptedAt: string;
50
- }, {
51
- createdAt: string;
52
- createdBy: string;
53
- createdByRole: string;
54
- createdAtLocation: string;
55
- acceptedAt: string;
56
- }>;
57
- export type ActionCreationMetadata = z.infer<typeof ActionCreationMetadata>;
58
- export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.extendShape<{
59
- createdAt: z.ZodString;
60
- createdBy: z.ZodString;
61
- createdAtLocation: z.ZodString;
62
- acceptedAt: z.ZodString;
63
- createdByRole: z.ZodString;
64
- }, {
65
- registrationNumber: z.ZodString;
66
- }>, "strip", z.ZodTypeAny, {
67
- createdAt: string;
68
- createdBy: string;
69
- createdByRole: string;
70
- createdAtLocation: string;
71
- registrationNumber: string;
72
- acceptedAt: string;
73
- }, {
74
- createdAt: string;
75
- createdBy: string;
76
- createdByRole: string;
77
- createdAtLocation: string;
78
- registrationNumber: string;
79
- acceptedAt: string;
80
- }>;
81
- export type RegistrationCreationMetadata = z.infer<typeof RegistrationCreationMetadata>;
82
- export declare const LegalStatuses: z.ZodObject<{
83
- DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
84
- createdAt: z.ZodString;
85
- createdBy: z.ZodString;
86
- createdAtLocation: z.ZodString;
87
- acceptedAt: z.ZodString;
88
- createdByRole: z.ZodString;
89
- }, "strip", z.ZodTypeAny, {
90
- createdAt: string;
91
- createdBy: string;
92
- createdByRole: string;
93
- createdAtLocation: string;
94
- acceptedAt: string;
95
- }, {
96
- createdAt: string;
97
- createdBy: string;
98
- createdByRole: string;
99
- createdAtLocation: string;
100
- acceptedAt: string;
101
- }>>>;
102
- REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<z.objectUtil.extendShape<{
103
- createdAt: z.ZodString;
104
- createdBy: z.ZodString;
105
- createdAtLocation: z.ZodString;
106
- acceptedAt: z.ZodString;
107
- createdByRole: z.ZodString;
108
- }, {
109
- registrationNumber: z.ZodString;
110
- }>, "strip", z.ZodTypeAny, {
111
- createdAt: string;
112
- createdBy: string;
113
- createdByRole: string;
114
- createdAtLocation: string;
115
- registrationNumber: string;
116
- acceptedAt: string;
117
- }, {
118
- createdAt: string;
119
- createdBy: string;
120
- createdByRole: string;
121
- createdAtLocation: string;
122
- registrationNumber: string;
123
- acceptedAt: string;
124
- }>>>;
125
- }, "strip", z.ZodTypeAny, {
126
- DECLARED?: {
127
- createdAt: string;
128
- createdBy: string;
129
- createdByRole: string;
130
- createdAtLocation: string;
131
- acceptedAt: string;
132
- } | null | undefined;
133
- REGISTERED?: {
134
- createdAt: string;
135
- createdBy: string;
136
- createdByRole: string;
137
- createdAtLocation: string;
138
- registrationNumber: string;
139
- acceptedAt: string;
140
- } | null | undefined;
141
- }, {
142
- DECLARED?: {
143
- createdAt: string;
144
- createdBy: string;
145
- createdByRole: string;
146
- createdAtLocation: string;
147
- acceptedAt: string;
148
- } | null | undefined;
149
- REGISTERED?: {
150
- createdAt: string;
151
- createdBy: string;
152
- createdByRole: string;
153
- createdAtLocation: string;
154
- registrationNumber: string;
155
- acceptedAt: string;
156
- } | null | undefined;
157
- }>;
158
28
  /**
159
29
  * Event metadata exposed to client.
160
30
  *
@@ -162,7 +32,6 @@ export declare const LegalStatuses: z.ZodObject<{
162
32
  */
163
33
  export declare const EventMetadata: z.ZodObject<{
164
34
  id: z.ZodString;
165
- title: z.ZodString;
166
35
  type: z.ZodString;
167
36
  status: z.ZodNativeEnum<{
168
37
  readonly CREATED: "CREATED";
@@ -174,180 +43,45 @@ export declare const EventMetadata: z.ZodObject<{
174
43
  readonly REJECTED: "REJECTED";
175
44
  readonly ARCHIVED: "ARCHIVED";
176
45
  }>;
177
- legalStatuses: z.ZodObject<{
178
- DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
179
- createdAt: z.ZodString;
180
- createdBy: z.ZodString;
181
- createdAtLocation: z.ZodString;
182
- acceptedAt: z.ZodString;
183
- createdByRole: z.ZodString;
184
- }, "strip", z.ZodTypeAny, {
185
- createdAt: string;
186
- createdBy: string;
187
- createdByRole: string;
188
- createdAtLocation: string;
189
- acceptedAt: string;
190
- }, {
191
- createdAt: string;
192
- createdBy: string;
193
- createdByRole: string;
194
- createdAtLocation: string;
195
- acceptedAt: string;
196
- }>>>;
197
- REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<z.objectUtil.extendShape<{
198
- createdAt: z.ZodString;
199
- createdBy: z.ZodString;
200
- createdAtLocation: z.ZodString;
201
- acceptedAt: z.ZodString;
202
- createdByRole: z.ZodString;
203
- }, {
204
- registrationNumber: z.ZodString;
205
- }>, "strip", z.ZodTypeAny, {
206
- createdAt: string;
207
- createdBy: string;
208
- createdByRole: string;
209
- createdAtLocation: string;
210
- registrationNumber: string;
211
- acceptedAt: string;
212
- }, {
213
- createdAt: string;
214
- createdBy: string;
215
- createdByRole: string;
216
- createdAtLocation: string;
217
- registrationNumber: string;
218
- acceptedAt: string;
219
- }>>>;
220
- }, "strip", z.ZodTypeAny, {
221
- DECLARED?: {
222
- createdAt: string;
223
- createdBy: string;
224
- createdByRole: string;
225
- createdAtLocation: string;
226
- acceptedAt: string;
227
- } | null | undefined;
228
- REGISTERED?: {
229
- createdAt: string;
230
- createdBy: string;
231
- createdByRole: string;
232
- createdAtLocation: string;
233
- registrationNumber: string;
234
- acceptedAt: string;
235
- } | null | undefined;
236
- }, {
237
- DECLARED?: {
238
- createdAt: string;
239
- createdBy: string;
240
- createdByRole: string;
241
- createdAtLocation: string;
242
- acceptedAt: string;
243
- } | null | undefined;
244
- REGISTERED?: {
245
- createdAt: string;
246
- createdBy: string;
247
- createdByRole: string;
248
- createdAtLocation: string;
249
- registrationNumber: string;
250
- acceptedAt: string;
251
- } | null | undefined;
252
- }>;
253
46
  createdAt: z.ZodString;
254
- dateOfEvent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
255
47
  createdBy: z.ZodString;
256
- updatedByUserRole: z.ZodString;
257
48
  createdAtLocation: z.ZodString;
258
- updatedAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
259
- updatedAt: z.ZodString;
49
+ modifiedAt: z.ZodString;
260
50
  assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
261
- updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
51
+ updatedBy: z.ZodString;
262
52
  trackingId: z.ZodString;
263
- flags: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNativeEnum<{
264
- readonly CERTIFICATE_PRINTED: "certificate-printed";
265
- }>]>, "many">;
53
+ registrationNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
266
54
  }, "strip", z.ZodTypeAny, {
267
55
  type: string;
268
56
  id: string;
269
57
  status: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
270
- title: string;
271
58
  createdAt: string;
272
59
  createdBy: string;
273
60
  createdAtLocation: string;
274
- updatedAt: string;
275
61
  trackingId: string;
276
- legalStatuses: {
277
- DECLARED?: {
278
- createdAt: string;
279
- createdBy: string;
280
- createdByRole: string;
281
- createdAtLocation: string;
282
- acceptedAt: string;
283
- } | null | undefined;
284
- REGISTERED?: {
285
- createdAt: string;
286
- createdBy: string;
287
- createdByRole: string;
288
- createdAtLocation: string;
289
- registrationNumber: string;
290
- acceptedAt: string;
291
- } | null | undefined;
292
- };
293
- updatedByUserRole: string;
294
- flags: string[];
62
+ modifiedAt: string;
63
+ updatedBy: string;
295
64
  assignedTo?: string | null | undefined;
296
- dateOfEvent?: string | null | undefined;
297
- updatedAtLocation?: string | null | undefined;
298
- updatedBy?: string | null | undefined;
65
+ registrationNumber?: string | null | undefined;
299
66
  }, {
300
67
  type: string;
301
68
  id: string;
302
69
  status: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
303
- title: string;
304
70
  createdAt: string;
305
71
  createdBy: string;
306
72
  createdAtLocation: string;
307
- updatedAt: string;
308
73
  trackingId: string;
309
- legalStatuses: {
310
- DECLARED?: {
311
- createdAt: string;
312
- createdBy: string;
313
- createdByRole: string;
314
- createdAtLocation: string;
315
- acceptedAt: string;
316
- } | null | undefined;
317
- REGISTERED?: {
318
- createdAt: string;
319
- createdBy: string;
320
- createdByRole: string;
321
- createdAtLocation: string;
322
- registrationNumber: string;
323
- acceptedAt: string;
324
- } | null | undefined;
325
- };
326
- updatedByUserRole: string;
327
- flags: string[];
74
+ modifiedAt: string;
75
+ updatedBy: string;
328
76
  assignedTo?: string | null | undefined;
329
- dateOfEvent?: string | null | undefined;
330
- updatedAtLocation?: string | null | undefined;
331
- updatedBy?: string | null | undefined;
77
+ registrationNumber?: string | null | undefined;
332
78
  }>;
333
79
  export type EventMetadata = z.infer<typeof EventMetadata>;
334
- export declare const EventMetadataKeys: z.ZodEnum<["id", "title", "type", "status", "createdAt", "dateOfEvent", "createdBy", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"]>;
335
- export type EventMetadataKeys = z.infer<typeof EventMetadataKeys>;
336
- /**
337
- * This ensures `event.field()` takes a key from `EventMetadata`
338
- */
339
- export declare const EventMetadataParameter: z.ZodObject<{
340
- $event: z.ZodEnum<["id", "title", "type", "status", "createdAt", "dateOfEvent", "createdBy", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"]>;
341
- }, "strip", z.ZodTypeAny, {
342
- $event: "type" | "id" | "status" | "title" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "updatedAt" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
343
- }, {
344
- $event: "type" | "id" | "status" | "title" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "updatedAt" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
345
- }>;
346
- export type EventMetadataParameter = z.infer<typeof EventMetadataParameter>;
80
+ export type EventMetadataKeys = `event.${keyof EventMetadata}`;
347
81
  /**
348
82
  * Mapping of event metadata keys to translation configuration.
349
83
  * Consider introducing type in same manner as we have in FieldConfig.
350
84
  * We need a way to know how to parse it.
351
85
  */
352
- export declare const eventMetadataLabelMap: Record<Exclude<`event.${EventMetadataKeys}`, 'event.legalStatuses'>, TranslationConfig>;
86
+ export declare const eventMetadataLabelMap: Record<EventMetadataKeys, TranslationConfig>;
353
87
  //# sourceMappingURL=EventMetadata.d.ts.map