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