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