@opencrvs/toolkit 1.8.0-rc.f8296f8 → 1.8.0-rc.f84146e
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 +2944 -1117
- package/dist/commons/conditionals/conditionals.d.ts +6 -2
- package/dist/commons/conditionals/validate.d.ts +6 -0
- package/dist/commons/events/ActionConfig.d.ts +24179 -11127
- package/dist/commons/events/ActionDocument.d.ts +1818 -414
- package/dist/commons/events/ActionInput.d.ts +1504 -304
- package/dist/commons/events/ActionType.d.ts +4 -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/CreatedAtLocation.d.ts +2 -1
- package/dist/commons/events/Draft.d.ts +129 -33
- package/dist/commons/events/EventConfig.d.ts +12161 -5927
- package/dist/commons/events/EventDocument.d.ts +1162 -298
- package/dist/commons/events/EventIndex.d.ts +284 -31
- package/dist/commons/events/EventMetadata.d.ts +57 -57
- package/dist/commons/events/FieldConfig.d.ts +2074 -1202
- package/dist/commons/events/FieldType.d.ts +4 -1
- package/dist/commons/events/FieldTypeMapping.d.ts +94 -52
- package/dist/commons/events/FieldValue.d.ts +43 -5
- package/dist/commons/events/FormConfig.d.ts +10259 -4769
- package/dist/commons/events/PageConfig.d.ts +3480 -2134
- package/dist/commons/events/SummaryConfig.d.ts +0 -5
- package/dist/commons/events/WorkqueueConfig.d.ts +297 -19
- package/dist/commons/events/defineConfig.d.ts +1724 -701
- package/dist/commons/events/field.d.ts +5 -10
- package/dist/commons/events/test.utils.d.ts +125 -40
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +10015 -331
- package/dist/conditionals/index.js +26 -6
- package/dist/events/index.js +760 -491
- 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,44 +13,37 @@ 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
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.
|
20
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
42
21
|
acceptedAt: z.ZodString;
|
43
22
|
createdByRole: z.ZodString;
|
23
|
+
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
44
24
|
}, "strip", z.ZodTypeAny, {
|
45
25
|
createdAt: string;
|
46
26
|
createdBy: string;
|
47
27
|
createdByRole: string;
|
48
28
|
acceptedAt: string;
|
49
|
-
|
29
|
+
createdBySignature?: string | null | undefined;
|
30
|
+
createdAtLocation?: string | null | undefined;
|
50
31
|
}, {
|
51
32
|
createdAt: string;
|
52
33
|
createdBy: string;
|
53
34
|
createdByRole: string;
|
54
35
|
acceptedAt: string;
|
36
|
+
createdBySignature?: string | null | undefined;
|
55
37
|
createdAtLocation?: string | null | undefined;
|
56
38
|
}>;
|
57
39
|
export type ActionCreationMetadata = z.infer<typeof ActionCreationMetadata>;
|
58
40
|
export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.extendShape<{
|
59
41
|
createdAt: z.ZodString;
|
60
42
|
createdBy: z.ZodString;
|
61
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.
|
43
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
62
44
|
acceptedAt: z.ZodString;
|
63
45
|
createdByRole: z.ZodString;
|
46
|
+
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
64
47
|
}, {
|
65
48
|
registrationNumber: z.ZodString;
|
66
49
|
}>, "strip", z.ZodTypeAny, {
|
@@ -69,13 +52,15 @@ export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.exte
|
|
69
52
|
createdByRole: string;
|
70
53
|
registrationNumber: string;
|
71
54
|
acceptedAt: string;
|
72
|
-
|
55
|
+
createdBySignature?: string | null | undefined;
|
56
|
+
createdAtLocation?: string | null | undefined;
|
73
57
|
}, {
|
74
58
|
createdAt: string;
|
75
59
|
createdBy: string;
|
76
60
|
createdByRole: string;
|
77
61
|
registrationNumber: string;
|
78
62
|
acceptedAt: string;
|
63
|
+
createdBySignature?: string | null | undefined;
|
79
64
|
createdAtLocation?: string | null | undefined;
|
80
65
|
}>;
|
81
66
|
export type RegistrationCreationMetadata = z.infer<typeof RegistrationCreationMetadata>;
|
@@ -83,28 +68,32 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
83
68
|
DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
84
69
|
createdAt: z.ZodString;
|
85
70
|
createdBy: z.ZodString;
|
86
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.
|
71
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
87
72
|
acceptedAt: z.ZodString;
|
88
73
|
createdByRole: z.ZodString;
|
74
|
+
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
89
75
|
}, "strip", z.ZodTypeAny, {
|
90
76
|
createdAt: string;
|
91
77
|
createdBy: string;
|
92
78
|
createdByRole: string;
|
93
79
|
acceptedAt: string;
|
94
|
-
|
80
|
+
createdBySignature?: string | null | undefined;
|
81
|
+
createdAtLocation?: string | null | undefined;
|
95
82
|
}, {
|
96
83
|
createdAt: string;
|
97
84
|
createdBy: string;
|
98
85
|
createdByRole: string;
|
99
86
|
acceptedAt: string;
|
87
|
+
createdBySignature?: string | null | undefined;
|
100
88
|
createdAtLocation?: string | null | undefined;
|
101
89
|
}>>>;
|
102
90
|
REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<z.objectUtil.extendShape<{
|
103
91
|
createdAt: z.ZodString;
|
104
92
|
createdBy: z.ZodString;
|
105
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.
|
93
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
106
94
|
acceptedAt: z.ZodString;
|
107
95
|
createdByRole: z.ZodString;
|
96
|
+
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
108
97
|
}, {
|
109
98
|
registrationNumber: z.ZodString;
|
110
99
|
}>, "strip", z.ZodTypeAny, {
|
@@ -113,13 +102,15 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
113
102
|
createdByRole: string;
|
114
103
|
registrationNumber: string;
|
115
104
|
acceptedAt: string;
|
116
|
-
|
105
|
+
createdBySignature?: string | null | undefined;
|
106
|
+
createdAtLocation?: string | null | undefined;
|
117
107
|
}, {
|
118
108
|
createdAt: string;
|
119
109
|
createdBy: string;
|
120
110
|
createdByRole: string;
|
121
111
|
registrationNumber: string;
|
122
112
|
acceptedAt: string;
|
113
|
+
createdBySignature?: string | null | undefined;
|
123
114
|
createdAtLocation?: string | null | undefined;
|
124
115
|
}>>>;
|
125
116
|
}, "strip", z.ZodTypeAny, {
|
@@ -128,7 +119,8 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
128
119
|
createdBy: string;
|
129
120
|
createdByRole: string;
|
130
121
|
acceptedAt: string;
|
131
|
-
|
122
|
+
createdBySignature?: string | null | undefined;
|
123
|
+
createdAtLocation?: string | null | undefined;
|
132
124
|
} | null | undefined;
|
133
125
|
REGISTERED?: {
|
134
126
|
createdAt: string;
|
@@ -136,7 +128,8 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
136
128
|
createdByRole: string;
|
137
129
|
registrationNumber: string;
|
138
130
|
acceptedAt: string;
|
139
|
-
|
131
|
+
createdBySignature?: string | null | undefined;
|
132
|
+
createdAtLocation?: string | null | undefined;
|
140
133
|
} | null | undefined;
|
141
134
|
}, {
|
142
135
|
DECLARED?: {
|
@@ -144,6 +137,7 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
144
137
|
createdBy: string;
|
145
138
|
createdByRole: string;
|
146
139
|
acceptedAt: string;
|
140
|
+
createdBySignature?: string | null | undefined;
|
147
141
|
createdAtLocation?: string | null | undefined;
|
148
142
|
} | null | undefined;
|
149
143
|
REGISTERED?: {
|
@@ -152,6 +146,7 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
152
146
|
createdByRole: string;
|
153
147
|
registrationNumber: string;
|
154
148
|
acceptedAt: string;
|
149
|
+
createdBySignature?: string | null | undefined;
|
155
150
|
createdAtLocation?: string | null | undefined;
|
156
151
|
} | null | undefined;
|
157
152
|
}>;
|
@@ -161,44 +156,39 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
161
156
|
* Accessed through `event.` in configuration.
|
162
157
|
*/
|
163
158
|
export declare const EventMetadata: z.ZodObject<{
|
164
|
-
id: z.
|
159
|
+
id: z.ZodString;
|
165
160
|
type: z.ZodString;
|
166
|
-
status: z.
|
167
|
-
readonly CREATED: "CREATED";
|
168
|
-
readonly NOTIFIED: "NOTIFIED";
|
169
|
-
readonly DECLARED: "DECLARED";
|
170
|
-
readonly VALIDATED: "VALIDATED";
|
171
|
-
readonly REGISTERED: "REGISTERED";
|
172
|
-
readonly CERTIFIED: "CERTIFIED";
|
173
|
-
readonly REJECTED: "REJECTED";
|
174
|
-
readonly ARCHIVED: "ARCHIVED";
|
175
|
-
}>;
|
161
|
+
status: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "CERTIFIED", "REJECTED", "ARCHIVED"]>;
|
176
162
|
legalStatuses: z.ZodObject<{
|
177
163
|
DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
178
164
|
createdAt: z.ZodString;
|
179
165
|
createdBy: z.ZodString;
|
180
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.
|
166
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
181
167
|
acceptedAt: z.ZodString;
|
182
168
|
createdByRole: z.ZodString;
|
169
|
+
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
183
170
|
}, "strip", z.ZodTypeAny, {
|
184
171
|
createdAt: string;
|
185
172
|
createdBy: string;
|
186
173
|
createdByRole: string;
|
187
174
|
acceptedAt: string;
|
188
|
-
|
175
|
+
createdBySignature?: string | null | undefined;
|
176
|
+
createdAtLocation?: string | null | undefined;
|
189
177
|
}, {
|
190
178
|
createdAt: string;
|
191
179
|
createdBy: string;
|
192
180
|
createdByRole: string;
|
193
181
|
acceptedAt: string;
|
182
|
+
createdBySignature?: string | null | undefined;
|
194
183
|
createdAtLocation?: string | null | undefined;
|
195
184
|
}>>>;
|
196
185
|
REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<z.objectUtil.extendShape<{
|
197
186
|
createdAt: z.ZodString;
|
198
187
|
createdBy: z.ZodString;
|
199
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.
|
188
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
200
189
|
acceptedAt: z.ZodString;
|
201
190
|
createdByRole: z.ZodString;
|
191
|
+
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
202
192
|
}, {
|
203
193
|
registrationNumber: z.ZodString;
|
204
194
|
}>, "strip", z.ZodTypeAny, {
|
@@ -207,13 +197,15 @@ export declare const EventMetadata: z.ZodObject<{
|
|
207
197
|
createdByRole: string;
|
208
198
|
registrationNumber: string;
|
209
199
|
acceptedAt: string;
|
210
|
-
|
200
|
+
createdBySignature?: string | null | undefined;
|
201
|
+
createdAtLocation?: string | null | undefined;
|
211
202
|
}, {
|
212
203
|
createdAt: string;
|
213
204
|
createdBy: string;
|
214
205
|
createdByRole: string;
|
215
206
|
registrationNumber: string;
|
216
207
|
acceptedAt: string;
|
208
|
+
createdBySignature?: string | null | undefined;
|
217
209
|
createdAtLocation?: string | null | undefined;
|
218
210
|
}>>>;
|
219
211
|
}, "strip", z.ZodTypeAny, {
|
@@ -222,7 +214,8 @@ export declare const EventMetadata: z.ZodObject<{
|
|
222
214
|
createdBy: string;
|
223
215
|
createdByRole: string;
|
224
216
|
acceptedAt: string;
|
225
|
-
|
217
|
+
createdBySignature?: string | null | undefined;
|
218
|
+
createdAtLocation?: string | null | undefined;
|
226
219
|
} | null | undefined;
|
227
220
|
REGISTERED?: {
|
228
221
|
createdAt: string;
|
@@ -230,7 +223,8 @@ export declare const EventMetadata: z.ZodObject<{
|
|
230
223
|
createdByRole: string;
|
231
224
|
registrationNumber: string;
|
232
225
|
acceptedAt: string;
|
233
|
-
|
226
|
+
createdBySignature?: string | null | undefined;
|
227
|
+
createdAtLocation?: string | null | undefined;
|
234
228
|
} | null | undefined;
|
235
229
|
}, {
|
236
230
|
DECLARED?: {
|
@@ -238,6 +232,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
238
232
|
createdBy: string;
|
239
233
|
createdByRole: string;
|
240
234
|
acceptedAt: string;
|
235
|
+
createdBySignature?: string | null | undefined;
|
241
236
|
createdAtLocation?: string | null | undefined;
|
242
237
|
} | null | undefined;
|
243
238
|
REGISTERED?: {
|
@@ -246,6 +241,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
246
241
|
createdByRole: string;
|
247
242
|
registrationNumber: string;
|
248
243
|
acceptedAt: string;
|
244
|
+
createdBySignature?: string | null | undefined;
|
249
245
|
createdAtLocation?: string | null | undefined;
|
250
246
|
} | null | undefined;
|
251
247
|
}>;
|
@@ -253,9 +249,9 @@ export declare const EventMetadata: z.ZodObject<{
|
|
253
249
|
dateOfEvent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
254
250
|
createdBy: z.ZodString;
|
255
251
|
updatedByUserRole: z.ZodString;
|
256
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.
|
252
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
257
253
|
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
258
|
-
updatedAtLocation: z.ZodOptional<z.ZodNullable<z.
|
254
|
+
updatedAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
259
255
|
updatedAt: z.ZodString;
|
260
256
|
assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
261
257
|
updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
@@ -265,7 +261,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
265
261
|
}>]>, "many">;
|
266
262
|
}, "strip", z.ZodTypeAny, {
|
267
263
|
type: string;
|
268
|
-
id: string
|
264
|
+
id: string;
|
269
265
|
status: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
270
266
|
createdAt: string;
|
271
267
|
createdBy: string;
|
@@ -277,7 +273,8 @@ export declare const EventMetadata: z.ZodObject<{
|
|
277
273
|
createdBy: string;
|
278
274
|
createdByRole: string;
|
279
275
|
acceptedAt: string;
|
280
|
-
|
276
|
+
createdBySignature?: string | null | undefined;
|
277
|
+
createdAtLocation?: string | null | undefined;
|
281
278
|
} | null | undefined;
|
282
279
|
REGISTERED?: {
|
283
280
|
createdAt: string;
|
@@ -285,16 +282,17 @@ export declare const EventMetadata: z.ZodObject<{
|
|
285
282
|
createdByRole: string;
|
286
283
|
registrationNumber: string;
|
287
284
|
acceptedAt: string;
|
288
|
-
|
285
|
+
createdBySignature?: string | null | undefined;
|
286
|
+
createdAtLocation?: string | null | undefined;
|
289
287
|
} | null | undefined;
|
290
288
|
};
|
291
289
|
updatedByUserRole: string;
|
292
290
|
flags: string[];
|
293
291
|
createdBySignature?: string | null | undefined;
|
294
|
-
createdAtLocation?:
|
292
|
+
createdAtLocation?: string | null | undefined;
|
295
293
|
assignedTo?: string | null | undefined;
|
296
294
|
dateOfEvent?: string | null | undefined;
|
297
|
-
updatedAtLocation?:
|
295
|
+
updatedAtLocation?: string | null | undefined;
|
298
296
|
updatedBy?: string | null | undefined;
|
299
297
|
}, {
|
300
298
|
type: string;
|
@@ -310,6 +308,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
310
308
|
createdBy: string;
|
311
309
|
createdByRole: string;
|
312
310
|
acceptedAt: string;
|
311
|
+
createdBySignature?: string | null | undefined;
|
313
312
|
createdAtLocation?: string | null | undefined;
|
314
313
|
} | null | undefined;
|
315
314
|
REGISTERED?: {
|
@@ -318,6 +317,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
318
317
|
createdByRole: string;
|
319
318
|
registrationNumber: string;
|
320
319
|
acceptedAt: string;
|
320
|
+
createdBySignature?: string | null | undefined;
|
321
321
|
createdAtLocation?: string | null | undefined;
|
322
322
|
} | null | undefined;
|
323
323
|
};
|