@opencrvs/toolkit 1.8.0-rc.fa564ca → 1.8.0-rc.fa82472
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 +6661 -391
- package/dist/commons/conditionals/conditionals.d.ts +4 -0
- package/dist/commons/conditionals/validate.d.ts +6 -0
- package/dist/commons/events/ActionConfig.d.ts +18678 -6326
- package/dist/commons/events/ActionDocument.d.ts +1713 -204
- package/dist/commons/events/ActionInput.d.ts +1380 -180
- package/dist/commons/events/ActionType.d.ts +2 -0
- package/dist/commons/events/AdvancedSearchConfig.d.ts +75 -3
- package/dist/commons/events/CompositeFieldValue.d.ts +28 -0
- package/dist/commons/events/Constants.d.ts +1 -0
- package/dist/commons/events/CountryConfigQueryInput.d.ts +254 -168
- package/dist/commons/events/Draft.d.ts +117 -16
- package/dist/commons/events/EventConfig.d.ts +8242 -2365
- package/dist/commons/events/EventDocument.d.ts +1096 -152
- package/dist/commons/events/EventIndex.d.ts +793 -118
- package/dist/commons/events/EventMetadata.d.ts +38 -35
- package/dist/commons/events/FieldConfig.d.ts +1572 -746
- package/dist/commons/events/FieldType.d.ts +4 -1
- package/dist/commons/events/FieldTypeMapping.d.ts +89 -50
- package/dist/commons/events/FieldValue.d.ts +41 -5
- package/dist/commons/events/FormConfig.d.ts +7640 -2444
- package/dist/commons/events/PageConfig.d.ts +2816 -1540
- package/dist/commons/events/SummaryConfig.d.ts +0 -5
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +11 -11
- package/dist/commons/events/WorkqueueConfig.d.ts +3266 -1503
- package/dist/commons/events/defineConfig.d.ts +959 -13
- package/dist/commons/events/field.d.ts +4 -0
- package/dist/commons/events/scopes.d.ts +6 -0
- package/dist/commons/events/test.utils.d.ts +137 -38
- package/dist/commons/events/utils.d.ts +9661 -10
- package/dist/conditionals/index.js +18 -1
- package/dist/events/index.js +1488 -928
- package/dist/scopes/index.d.ts +4 -1
- package/dist/scopes/index.js +67 -17
- package/package.json +1 -1
@@ -3,18 +3,8 @@ import { TranslationConfig } from './TranslationConfig';
|
|
3
3
|
/**
|
4
4
|
* Event statuses recognized by the system
|
5
5
|
*/
|
6
|
-
export declare const EventStatus:
|
7
|
-
|
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";
|
15
|
-
};
|
16
|
-
export type EventStatus = (typeof EventStatus)[keyof typeof EventStatus];
|
17
|
-
export declare const EventStatusEnum: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "CERTIFIED", "REJECTED", "ARCHIVED"]>;
|
6
|
+
export declare const EventStatus: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "CERTIFIED", "REJECTED", "ARCHIVED"]>;
|
7
|
+
export type EventStatus = z.infer<typeof EventStatus>;
|
18
8
|
export declare const CustomFlags: {
|
19
9
|
readonly CERTIFICATE_PRINTED: "certificate-printed";
|
20
10
|
};
|
@@ -23,22 +13,12 @@ export declare const Flag: z.ZodUnion<[z.ZodString, z.ZodNativeEnum<{
|
|
23
13
|
readonly CERTIFICATE_PRINTED: "certificate-printed";
|
24
14
|
}>]>;
|
25
15
|
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
16
|
export declare const ZodDate: z.ZodString;
|
38
17
|
export declare const ActionCreationMetadata: z.ZodObject<{
|
39
18
|
createdAt: z.ZodString;
|
40
19
|
createdBy: z.ZodString;
|
41
20
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
21
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
|
42
22
|
acceptedAt: z.ZodString;
|
43
23
|
createdByRole: z.ZodString;
|
44
24
|
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
@@ -47,6 +27,7 @@ export declare const ActionCreationMetadata: z.ZodObject<{
|
|
47
27
|
createdBy: string;
|
48
28
|
createdByRole: string;
|
49
29
|
acceptedAt: string;
|
30
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
50
31
|
createdBySignature?: string | null | undefined;
|
51
32
|
createdAtLocation?: string | null | undefined;
|
52
33
|
}, {
|
@@ -54,6 +35,7 @@ export declare const ActionCreationMetadata: z.ZodObject<{
|
|
54
35
|
createdBy: string;
|
55
36
|
createdByRole: string;
|
56
37
|
acceptedAt: string;
|
38
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
57
39
|
createdBySignature?: string | null | undefined;
|
58
40
|
createdAtLocation?: string | null | undefined;
|
59
41
|
}>;
|
@@ -62,6 +44,7 @@ export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.exte
|
|
62
44
|
createdAt: z.ZodString;
|
63
45
|
createdBy: z.ZodString;
|
64
46
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
47
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
|
65
48
|
acceptedAt: z.ZodString;
|
66
49
|
createdByRole: z.ZodString;
|
67
50
|
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
@@ -73,6 +56,7 @@ export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.exte
|
|
73
56
|
createdByRole: string;
|
74
57
|
registrationNumber: string;
|
75
58
|
acceptedAt: string;
|
59
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
76
60
|
createdBySignature?: string | null | undefined;
|
77
61
|
createdAtLocation?: string | null | undefined;
|
78
62
|
}, {
|
@@ -81,6 +65,7 @@ export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.exte
|
|
81
65
|
createdByRole: string;
|
82
66
|
registrationNumber: string;
|
83
67
|
acceptedAt: string;
|
68
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
84
69
|
createdBySignature?: string | null | undefined;
|
85
70
|
createdAtLocation?: string | null | undefined;
|
86
71
|
}>;
|
@@ -90,6 +75,7 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
90
75
|
createdAt: z.ZodString;
|
91
76
|
createdBy: z.ZodString;
|
92
77
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
78
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
|
93
79
|
acceptedAt: z.ZodString;
|
94
80
|
createdByRole: z.ZodString;
|
95
81
|
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
@@ -98,6 +84,7 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
98
84
|
createdBy: string;
|
99
85
|
createdByRole: string;
|
100
86
|
acceptedAt: string;
|
87
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
101
88
|
createdBySignature?: string | null | undefined;
|
102
89
|
createdAtLocation?: string | null | undefined;
|
103
90
|
}, {
|
@@ -105,6 +92,7 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
105
92
|
createdBy: string;
|
106
93
|
createdByRole: string;
|
107
94
|
acceptedAt: string;
|
95
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
108
96
|
createdBySignature?: string | null | undefined;
|
109
97
|
createdAtLocation?: string | null | undefined;
|
110
98
|
}>>>;
|
@@ -112,6 +100,7 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
112
100
|
createdAt: z.ZodString;
|
113
101
|
createdBy: z.ZodString;
|
114
102
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
103
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
|
115
104
|
acceptedAt: z.ZodString;
|
116
105
|
createdByRole: z.ZodString;
|
117
106
|
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
@@ -123,6 +112,7 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
123
112
|
createdByRole: string;
|
124
113
|
registrationNumber: string;
|
125
114
|
acceptedAt: string;
|
115
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
126
116
|
createdBySignature?: string | null | undefined;
|
127
117
|
createdAtLocation?: string | null | undefined;
|
128
118
|
}, {
|
@@ -131,6 +121,7 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
131
121
|
createdByRole: string;
|
132
122
|
registrationNumber: string;
|
133
123
|
acceptedAt: string;
|
124
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
134
125
|
createdBySignature?: string | null | undefined;
|
135
126
|
createdAtLocation?: string | null | undefined;
|
136
127
|
}>>>;
|
@@ -140,6 +131,7 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
140
131
|
createdBy: string;
|
141
132
|
createdByRole: string;
|
142
133
|
acceptedAt: string;
|
134
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
143
135
|
createdBySignature?: string | null | undefined;
|
144
136
|
createdAtLocation?: string | null | undefined;
|
145
137
|
} | null | undefined;
|
@@ -149,6 +141,7 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
149
141
|
createdByRole: string;
|
150
142
|
registrationNumber: string;
|
151
143
|
acceptedAt: string;
|
144
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
152
145
|
createdBySignature?: string | null | undefined;
|
153
146
|
createdAtLocation?: string | null | undefined;
|
154
147
|
} | null | undefined;
|
@@ -158,6 +151,7 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
158
151
|
createdBy: string;
|
159
152
|
createdByRole: string;
|
160
153
|
acceptedAt: string;
|
154
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
161
155
|
createdBySignature?: string | null | undefined;
|
162
156
|
createdAtLocation?: string | null | undefined;
|
163
157
|
} | null | undefined;
|
@@ -167,6 +161,7 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
167
161
|
createdByRole: string;
|
168
162
|
registrationNumber: string;
|
169
163
|
acceptedAt: string;
|
164
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
170
165
|
createdBySignature?: string | null | undefined;
|
171
166
|
createdAtLocation?: string | null | undefined;
|
172
167
|
} | null | undefined;
|
@@ -179,21 +174,13 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
179
174
|
export declare const EventMetadata: z.ZodObject<{
|
180
175
|
id: z.ZodString;
|
181
176
|
type: z.ZodString;
|
182
|
-
status: z.
|
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
|
-
}>;
|
177
|
+
status: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "CERTIFIED", "REJECTED", "ARCHIVED"]>;
|
192
178
|
legalStatuses: z.ZodObject<{
|
193
179
|
DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
194
180
|
createdAt: z.ZodString;
|
195
181
|
createdBy: z.ZodString;
|
196
182
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
183
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
|
197
184
|
acceptedAt: z.ZodString;
|
198
185
|
createdByRole: z.ZodString;
|
199
186
|
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
@@ -202,6 +189,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
202
189
|
createdBy: string;
|
203
190
|
createdByRole: string;
|
204
191
|
acceptedAt: string;
|
192
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
205
193
|
createdBySignature?: string | null | undefined;
|
206
194
|
createdAtLocation?: string | null | undefined;
|
207
195
|
}, {
|
@@ -209,6 +197,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
209
197
|
createdBy: string;
|
210
198
|
createdByRole: string;
|
211
199
|
acceptedAt: string;
|
200
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
212
201
|
createdBySignature?: string | null | undefined;
|
213
202
|
createdAtLocation?: string | null | undefined;
|
214
203
|
}>>>;
|
@@ -216,6 +205,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
216
205
|
createdAt: z.ZodString;
|
217
206
|
createdBy: z.ZodString;
|
218
207
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
208
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
|
219
209
|
acceptedAt: z.ZodString;
|
220
210
|
createdByRole: z.ZodString;
|
221
211
|
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
@@ -227,6 +217,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
227
217
|
createdByRole: string;
|
228
218
|
registrationNumber: string;
|
229
219
|
acceptedAt: string;
|
220
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
230
221
|
createdBySignature?: string | null | undefined;
|
231
222
|
createdAtLocation?: string | null | undefined;
|
232
223
|
}, {
|
@@ -235,6 +226,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
235
226
|
createdByRole: string;
|
236
227
|
registrationNumber: string;
|
237
228
|
acceptedAt: string;
|
229
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
238
230
|
createdBySignature?: string | null | undefined;
|
239
231
|
createdAtLocation?: string | null | undefined;
|
240
232
|
}>>>;
|
@@ -244,6 +236,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
244
236
|
createdBy: string;
|
245
237
|
createdByRole: string;
|
246
238
|
acceptedAt: string;
|
239
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
247
240
|
createdBySignature?: string | null | undefined;
|
248
241
|
createdAtLocation?: string | null | undefined;
|
249
242
|
} | null | undefined;
|
@@ -253,6 +246,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
253
246
|
createdByRole: string;
|
254
247
|
registrationNumber: string;
|
255
248
|
acceptedAt: string;
|
249
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
256
250
|
createdBySignature?: string | null | undefined;
|
257
251
|
createdAtLocation?: string | null | undefined;
|
258
252
|
} | null | undefined;
|
@@ -262,6 +256,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
262
256
|
createdBy: string;
|
263
257
|
createdByRole: string;
|
264
258
|
acceptedAt: string;
|
259
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
265
260
|
createdBySignature?: string | null | undefined;
|
266
261
|
createdAtLocation?: string | null | undefined;
|
267
262
|
} | null | undefined;
|
@@ -271,6 +266,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
271
266
|
createdByRole: string;
|
272
267
|
registrationNumber: string;
|
273
268
|
acceptedAt: string;
|
269
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
274
270
|
createdBySignature?: string | null | undefined;
|
275
271
|
createdAtLocation?: string | null | undefined;
|
276
272
|
} | null | undefined;
|
@@ -278,6 +274,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
278
274
|
createdAt: z.ZodString;
|
279
275
|
dateOfEvent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
280
276
|
createdBy: z.ZodString;
|
277
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
|
281
278
|
updatedByUserRole: z.ZodString;
|
282
279
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
283
280
|
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
@@ -303,6 +300,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
303
300
|
createdBy: string;
|
304
301
|
createdByRole: string;
|
305
302
|
acceptedAt: string;
|
303
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
306
304
|
createdBySignature?: string | null | undefined;
|
307
305
|
createdAtLocation?: string | null | undefined;
|
308
306
|
} | null | undefined;
|
@@ -312,12 +310,14 @@ export declare const EventMetadata: z.ZodObject<{
|
|
312
310
|
createdByRole: string;
|
313
311
|
registrationNumber: string;
|
314
312
|
acceptedAt: string;
|
313
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
315
314
|
createdBySignature?: string | null | undefined;
|
316
315
|
createdAtLocation?: string | null | undefined;
|
317
316
|
} | null | undefined;
|
318
317
|
};
|
319
318
|
updatedByUserRole: string;
|
320
319
|
flags: string[];
|
320
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
321
321
|
createdBySignature?: string | null | undefined;
|
322
322
|
createdAtLocation?: string | null | undefined;
|
323
323
|
assignedTo?: string | null | undefined;
|
@@ -338,6 +338,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
338
338
|
createdBy: string;
|
339
339
|
createdByRole: string;
|
340
340
|
acceptedAt: string;
|
341
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
341
342
|
createdBySignature?: string | null | undefined;
|
342
343
|
createdAtLocation?: string | null | undefined;
|
343
344
|
} | null | undefined;
|
@@ -347,12 +348,14 @@ export declare const EventMetadata: z.ZodObject<{
|
|
347
348
|
createdByRole: string;
|
348
349
|
registrationNumber: string;
|
349
350
|
acceptedAt: string;
|
351
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
350
352
|
createdBySignature?: string | null | undefined;
|
351
353
|
createdAtLocation?: string | null | undefined;
|
352
354
|
} | null | undefined;
|
353
355
|
};
|
354
356
|
updatedByUserRole: string;
|
355
357
|
flags: string[];
|
358
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
356
359
|
createdBySignature?: string | null | undefined;
|
357
360
|
createdAtLocation?: string | null | undefined;
|
358
361
|
assignedTo?: string | null | undefined;
|
@@ -361,8 +364,8 @@ export declare const EventMetadata: z.ZodObject<{
|
|
361
364
|
updatedBy?: string | null | undefined;
|
362
365
|
}>;
|
363
366
|
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"]>;
|
367
|
+
export declare const EventMetadataKeysArray: readonly ["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"];
|
368
|
+
export declare const EventMetadataKeys: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"]>;
|
366
369
|
export type EventMetadataKeys = z.infer<typeof EventMetadataKeys>;
|
367
370
|
/**
|
368
371
|
* Mapping of event metadata keys to translation configuration.
|