@opencrvs/toolkit 1.9.3-rc.4d25ec9 → 1.9.3-rc.5b18616

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 (58) hide show
  1. package/dist/commons/api/router.d.ts +28089 -2317
  2. package/dist/commons/conditionals/conditionals.d.ts +10 -1
  3. package/dist/commons/conditionals/validate.d.ts +11 -4
  4. package/dist/commons/events/ActionConfig.d.ts +23121 -1547
  5. package/dist/commons/events/ActionDocument.d.ts +840 -1849
  6. package/dist/commons/events/ActionInput.d.ts +290 -1066
  7. package/dist/commons/events/ActionType.d.ts +91 -8
  8. package/dist/commons/events/AdvancedSearchConfig.d.ts +222 -1244
  9. package/dist/commons/events/CompositeFieldValue.d.ts +25 -198
  10. package/dist/commons/events/Conditional.d.ts +26 -38
  11. package/dist/commons/events/Constants.d.ts +1 -1
  12. package/dist/commons/events/CountryConfigQueryInput.d.ts +931 -4169
  13. package/dist/commons/events/CreatedAtLocation.d.ts +1 -1
  14. package/dist/commons/events/DeduplicationConfig.d.ts +15 -150
  15. package/dist/commons/events/Draft.d.ts +72 -105
  16. package/dist/commons/events/DynamicFieldValue.d.ts +7 -91
  17. package/dist/commons/events/EventConfig.d.ts +18321 -2122
  18. package/dist/commons/events/EventConfigInput.d.ts +1 -1
  19. package/dist/commons/events/EventDocument.d.ts +336 -1326
  20. package/dist/commons/events/EventIndex.d.ts +197 -967
  21. package/dist/commons/events/EventInput.d.ts +2 -8
  22. package/dist/commons/events/EventMetadata.d.ts +106 -346
  23. package/dist/commons/events/FieldConfig.d.ts +4170 -12057
  24. package/dist/commons/events/FieldType.d.ts +9 -5
  25. package/dist/commons/events/FieldTypeMapping.d.ts +172 -896
  26. package/dist/commons/events/FieldValue.d.ts +84 -405
  27. package/dist/commons/events/Flag.d.ts +70 -0
  28. package/dist/commons/events/FormConfig.d.ts +12876 -721
  29. package/dist/commons/events/PageConfig.d.ts +8604 -319
  30. package/dist/commons/events/SummaryConfig.d.ts +14 -161
  31. package/dist/commons/events/TemplateConfig.d.ts +3 -3
  32. package/dist/commons/events/TranslationConfig.d.ts +2 -2
  33. package/dist/commons/events/WorkqueueColumnConfig.d.ts +74 -37
  34. package/dist/commons/events/WorkqueueConfig.d.ts +1695 -7156
  35. package/dist/commons/events/deduplication.d.ts +3 -3
  36. package/dist/commons/events/defineConfig.d.ts +25160 -152
  37. package/dist/commons/events/event.d.ts +4 -4
  38. package/dist/commons/events/index.d.ts +1 -0
  39. package/dist/commons/events/locations.d.ts +15 -19
  40. package/dist/commons/events/scopes.d.ts +3 -1
  41. package/dist/commons/events/state/availableActions.d.ts +2 -1
  42. package/dist/commons/events/state/flags.d.ts +21 -3
  43. package/dist/commons/events/state/index.d.ts +23 -19
  44. package/dist/commons/events/state/utils.d.ts +142 -110
  45. package/dist/commons/events/test.utils.d.ts +23 -6
  46. package/dist/commons/events/transactions.d.ts +1 -1
  47. package/dist/commons/events/utils.d.ts +50368 -369
  48. package/dist/commons/notification/UserNotifications.d.ts +55 -636
  49. package/dist/conditionals/index.d.ts.map +1 -1
  50. package/dist/conditionals/index.js +38 -5
  51. package/dist/events/deduplication.d.ts +3 -3
  52. package/dist/events/index.js +1811 -1748
  53. package/dist/notification/index.d.ts.map +1 -1
  54. package/dist/notification/index.js +1462 -1628
  55. package/dist/scopes/index.d.ts +138 -138
  56. package/dist/scopes/index.d.ts.map +1 -1
  57. package/dist/scopes/index.js +123 -93
  58. package/package.json +5 -5
@@ -1,5 +1,5 @@
1
- import { z } from 'zod';
2
- import { AddressFieldValue, AddressFieldUpdateValue, FileFieldValue, FileFieldWithOptionValue, NameFieldValue, NameFieldUpdateValue, NumberWithUnitFieldValue, NumberWithUnitFieldUpdateValue, HttpFieldUpdateValue, QueryParamReaderFieldUpdateValue, QrReaderFieldValue, IdReaderFieldValue } from './CompositeFieldValue';
1
+ import * as z from 'zod/v4';
2
+ import { AddressFieldValue, AddressFieldUpdateValue, FileFieldValue, FileFieldWithOptionValue, NameFieldValue, NameFieldUpdateValue, HttpFieldUpdateValue, QueryParamReaderFieldUpdateValue, QrReaderFieldValue, IdReaderFieldValue } from './CompositeFieldValue';
3
3
  /**
4
4
  * FieldValues defined in this file are primitive field values.
5
5
  * FieldValues defined in CompositeFieldValue.ts are composed of multiple primitive field values (Address, File etc).
@@ -13,46 +13,34 @@ import { AddressFieldValue, AddressFieldUpdateValue, FileFieldValue, FileFieldWi
13
13
  *
14
14
  */
15
15
  export declare const TextValue: z.ZodString;
16
+ export declare const HiddenFieldValue: z.ZodString;
16
17
  export declare const NonEmptyTextValue: z.ZodString;
17
- export declare const DateValue: z.ZodString;
18
+ export declare const DateValue: z.ZodISODate;
18
19
  export type DateValue = z.infer<typeof DateValue>;
19
20
  export declare const AgeValue: z.ZodObject<{
20
21
  age: z.ZodNumber;
21
22
  asOfDateRef: z.ZodString;
22
- }, "strip", z.ZodTypeAny, {
23
- age: number;
24
- asOfDateRef: string;
25
- }, {
26
- age: number;
27
- asOfDateRef: string;
28
- }>;
23
+ }, z.core.$strip>;
29
24
  export type AgeValue = z.infer<typeof AgeValue>;
30
25
  export declare const AgeUpdateValue: z.ZodNullable<z.ZodOptional<z.ZodObject<{
31
26
  age: z.ZodNumber;
32
27
  asOfDateRef: z.ZodString;
33
- }, "strip", z.ZodTypeAny, {
34
- age: number;
35
- asOfDateRef: string;
36
- }, {
37
- age: number;
38
- asOfDateRef: string;
39
- }>>>;
28
+ }, z.core.$strip>>>;
40
29
  export declare const TimeValue: z.ZodString;
41
- export declare const DatetimeValue: z.ZodString;
42
- export declare const SelectDateRangeValue: z.ZodEnum<["last7Days", "last30Days", "last90Days", "last365Days"]>;
30
+ export declare const DatetimeValue: z.ZodISODateTime;
31
+ export declare const SelectDateRangeValue: z.ZodEnum<{
32
+ last7Days: "last7Days";
33
+ last30Days: "last30Days";
34
+ last90Days: "last90Days";
35
+ last365Days: "last365Days";
36
+ }>;
43
37
  export declare const DateRangeFieldValue: z.ZodUnion<[z.ZodObject<{
44
- start: z.ZodString;
45
- end: z.ZodString;
46
- }, "strip", z.ZodTypeAny, {
47
- start: string;
48
- end: string;
49
- }, {
50
- start: string;
51
- end: string;
52
- }>, z.ZodString]>;
38
+ start: z.ZodISODate;
39
+ end: z.ZodISODate;
40
+ }, z.core.$strip>, z.ZodISODate]>;
53
41
  export type DateRangeFieldValue = z.infer<typeof DateRangeFieldValue>;
54
42
  export type SelectDateRangeValue = z.infer<typeof SelectDateRangeValue>;
55
- export declare const EmailValue: z.ZodString;
43
+ export declare const EmailValue: z.ZodEmail;
56
44
  export declare const CheckboxFieldValue: z.ZodBoolean;
57
45
  export type CheckboxFieldValue = z.infer<typeof CheckboxFieldValue>;
58
46
  export declare const NumberFieldValue: z.ZodNumber;
@@ -61,452 +49,143 @@ export declare const SignatureFieldValue: z.ZodString;
61
49
  export type SignatureFieldValue = z.infer<typeof SignatureFieldValue>;
62
50
  export declare const ButtonFieldValue: z.ZodNumber;
63
51
  export type ButtonFieldValue = z.infer<typeof ButtonFieldValue>;
64
- export declare const VerificationStatusValue: z.ZodEnum<["verified", "authenticated", "failed", "pending"]>;
52
+ export declare const VerificationStatusValue: z.ZodEnum<{
53
+ failed: "failed";
54
+ verified: "verified";
55
+ authenticated: "authenticated";
56
+ pending: "pending";
57
+ }>;
65
58
  export type VerificationStatusValue = z.infer<typeof VerificationStatusValue>;
66
- declare const FieldValuesWithoutDataField: z.ZodUnion<[z.ZodDiscriminatedUnion<"addressType", [z.ZodObject<z.objectUtil.extendShape<{
59
+ declare const FieldValuesWithoutDataField: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
67
60
  country: z.ZodString;
68
61
  streetLevelDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
69
- }, {
70
62
  addressType: z.ZodLiteral<"DOMESTIC">;
71
63
  administrativeArea: z.ZodString;
72
- }>, "strip", z.ZodTypeAny, {
73
- country: string;
74
- addressType: "DOMESTIC";
75
- administrativeArea: string;
76
- streetLevelDetails?: Record<string, string> | undefined;
77
- }, {
78
- country: string;
79
- addressType: "DOMESTIC";
80
- administrativeArea: string;
81
- streetLevelDetails?: Record<string, string> | undefined;
82
- }>, z.ZodObject<z.objectUtil.extendShape<{
64
+ }, z.core.$strip>, z.ZodObject<{
83
65
  country: z.ZodString;
84
66
  streetLevelDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
85
- }, {
86
67
  addressType: z.ZodLiteral<"INTERNATIONAL">;
87
- }>, "strip", z.ZodTypeAny, {
88
- country: string;
89
- addressType: "INTERNATIONAL";
90
- streetLevelDetails?: Record<string, string> | undefined;
91
- }, {
92
- country: string;
93
- addressType: "INTERNATIONAL";
94
- streetLevelDetails?: Record<string, string> | undefined;
95
- }>]>, z.ZodString, z.ZodString, z.ZodObject<{
68
+ }, z.core.$strip>], "addressType">, z.ZodString, z.ZodISODate, z.ZodObject<{
96
69
  age: z.ZodNumber;
97
70
  asOfDateRef: z.ZodString;
98
- }, "strip", z.ZodTypeAny, {
99
- age: number;
100
- asOfDateRef: string;
101
- }, {
102
- age: number;
103
- asOfDateRef: string;
104
- }>, z.ZodString, z.ZodUnion<[z.ZodObject<{
105
- start: z.ZodString;
106
- end: z.ZodString;
107
- }, "strip", z.ZodTypeAny, {
108
- start: string;
109
- end: string;
110
- }, {
111
- start: string;
112
- end: string;
113
- }>, z.ZodString]>, z.ZodEnum<["last7Days", "last30Days", "last90Days", "last365Days"]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
114
- numericValue: z.ZodNumber;
115
- unit: z.ZodString;
116
- }, "strip", z.ZodTypeAny, {
117
- numericValue: number;
118
- unit: string;
119
- }, {
120
- numericValue: number;
121
- unit: string;
122
- }>, z.ZodObject<{
123
- numericValue: z.ZodOptional<z.ZodNumber>;
124
- unit: z.ZodOptional<z.ZodString>;
125
- }, "strip", z.ZodTypeAny, {
126
- numericValue?: number | undefined;
127
- unit?: string | undefined;
128
- }, {
129
- numericValue?: number | undefined;
130
- unit?: string | undefined;
131
- }>, z.ZodObject<{
132
- path: z.ZodEffects<z.ZodString, string, string>;
71
+ }, z.core.$strip>, z.ZodString, z.ZodUnion<[z.ZodObject<{
72
+ start: z.ZodISODate;
73
+ end: z.ZodISODate;
74
+ }, z.core.$strip>, z.ZodISODate]>, z.ZodEnum<{
75
+ last7Days: "last7Days";
76
+ last30Days: "last30Days";
77
+ last90Days: "last90Days";
78
+ last365Days: "last365Days";
79
+ }>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
80
+ path: z.ZodString;
133
81
  originalFilename: z.ZodString;
134
82
  type: z.ZodString;
135
- }, "strip", z.ZodTypeAny, {
136
- type: string;
137
- path: string;
138
- originalFilename: string;
139
- }, {
140
- type: string;
141
- path: string;
142
- originalFilename: string;
143
- }>, z.ZodArray<z.ZodObject<{
144
- path: z.ZodEffects<z.ZodString, string, string>;
83
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
84
+ path: z.ZodString;
145
85
  originalFilename: z.ZodString;
146
86
  type: z.ZodString;
147
87
  option: z.ZodString;
148
- }, "strip", z.ZodTypeAny, {
149
- type: string;
150
- option: string;
151
- path: string;
152
- originalFilename: string;
153
- }, {
154
- type: string;
155
- option: string;
156
- path: string;
157
- originalFilename: string;
158
- }>, "many">, z.ZodObject<{
88
+ }, z.core.$strip>>, z.ZodObject<{
159
89
  firstname: z.ZodString;
160
90
  surname: z.ZodString;
161
91
  middlename: z.ZodOptional<z.ZodString>;
162
- }, "strip", z.ZodTypeAny, {
163
- firstname: string;
164
- surname: string;
165
- middlename?: string | undefined;
166
- }, {
167
- firstname: string;
168
- surname: string;
169
- middlename?: string | undefined;
170
- }>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
92
+ }, z.core.$strip>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
171
93
  firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
172
94
  surname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
173
95
  middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
174
- }, "strip", z.ZodTypeAny, {
175
- firstname?: string | null | undefined;
176
- surname?: string | null | undefined;
177
- middlename?: string | null | undefined;
178
- }, {
179
- firstname?: string | null | undefined;
180
- surname?: string | null | undefined;
181
- middlename?: string | null | undefined;
182
- }>, z.ZodNull]>, z.ZodUndefined]>, z.ZodNumber, z.ZodObject<{
96
+ }, z.core.$strip>, z.ZodNull]>, z.ZodUndefined]>, z.ZodNumber, z.ZodObject<{
183
97
  loading: z.ZodBoolean;
184
98
  error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
185
99
  statusCode: z.ZodNumber;
186
100
  message: z.ZodString;
187
- }, "strip", z.ZodTypeAny, {
188
- message: string;
189
- statusCode: number;
190
- }, {
191
- message: string;
192
- statusCode: number;
193
- }>>>;
101
+ }, z.core.$strip>>>;
194
102
  data: z.ZodAny;
195
- }, "strip", z.ZodTypeAny, {
196
- loading: boolean;
197
- data?: any;
198
- error?: {
199
- message: string;
200
- statusCode: number;
201
- } | null | undefined;
202
- }, {
203
- loading: boolean;
204
- data?: any;
205
- error?: {
206
- message: string;
207
- statusCode: number;
208
- } | null | undefined;
209
- }>, z.ZodEnum<["verified", "authenticated", "failed", "pending"]>, z.ZodOptional<z.ZodNullable<z.ZodObject<{
103
+ }, z.core.$strip>, z.ZodEnum<{
104
+ failed: "failed";
105
+ verified: "verified";
106
+ authenticated: "authenticated";
107
+ pending: "pending";
108
+ }>, z.ZodOptional<z.ZodNullable<z.ZodObject<{
210
109
  data: z.ZodRecord<z.ZodString, z.ZodString>;
211
- }, "strip", z.ZodTypeAny, {
212
- data: Record<string, string>;
213
- }, {
214
- data: Record<string, string>;
215
- }>>>, z.ZodObject<{
110
+ }, z.core.$strip>>>, z.ZodObject<{
216
111
  data: z.ZodAny;
217
- }, "strip", z.ZodTypeAny, {
218
- data?: any;
219
- }, {
220
- data?: any;
221
- }>, z.ZodObject<{
112
+ }, z.core.$strip>, z.ZodObject<{
222
113
  data: z.ZodAny;
223
- }, "strip", z.ZodTypeAny, {
224
- data?: any;
225
- }, {
226
- data?: any;
227
- }>]>;
114
+ }, z.core.$strip>]>;
228
115
  type FieldValuesWithoutDataField = z.infer<typeof FieldValuesWithoutDataField>;
229
116
  export declare const DataFieldValue: z.ZodOptional<z.ZodNullable<z.ZodObject<{
230
- data: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodDiscriminatedUnion<"addressType", [z.ZodObject<z.objectUtil.extendShape<{
117
+ data: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
231
118
  country: z.ZodString;
232
119
  streetLevelDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
233
- }, {
234
120
  addressType: z.ZodLiteral<"DOMESTIC">;
235
121
  administrativeArea: z.ZodString;
236
- }>, "strip", z.ZodTypeAny, {
237
- country: string;
238
- addressType: "DOMESTIC";
239
- administrativeArea: string;
240
- streetLevelDetails?: Record<string, string> | undefined;
241
- }, {
242
- country: string;
243
- addressType: "DOMESTIC";
244
- administrativeArea: string;
245
- streetLevelDetails?: Record<string, string> | undefined;
246
- }>, z.ZodObject<z.objectUtil.extendShape<{
122
+ }, z.core.$strip>, z.ZodObject<{
247
123
  country: z.ZodString;
248
124
  streetLevelDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
249
- }, {
250
125
  addressType: z.ZodLiteral<"INTERNATIONAL">;
251
- }>, "strip", z.ZodTypeAny, {
252
- country: string;
253
- addressType: "INTERNATIONAL";
254
- streetLevelDetails?: Record<string, string> | undefined;
255
- }, {
256
- country: string;
257
- addressType: "INTERNATIONAL";
258
- streetLevelDetails?: Record<string, string> | undefined;
259
- }>]>, z.ZodString, z.ZodString, z.ZodObject<{
126
+ }, z.core.$strip>], "addressType">, z.ZodString, z.ZodISODate, z.ZodObject<{
260
127
  age: z.ZodNumber;
261
128
  asOfDateRef: z.ZodString;
262
- }, "strip", z.ZodTypeAny, {
263
- age: number;
264
- asOfDateRef: string;
265
- }, {
266
- age: number;
267
- asOfDateRef: string;
268
- }>, z.ZodString, z.ZodUnion<[z.ZodObject<{
269
- start: z.ZodString;
270
- end: z.ZodString;
271
- }, "strip", z.ZodTypeAny, {
272
- start: string;
273
- end: string;
274
- }, {
275
- start: string;
276
- end: string;
277
- }>, z.ZodString]>, z.ZodEnum<["last7Days", "last30Days", "last90Days", "last365Days"]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
278
- numericValue: z.ZodNumber;
279
- unit: z.ZodString;
280
- }, "strip", z.ZodTypeAny, {
281
- numericValue: number;
282
- unit: string;
283
- }, {
284
- numericValue: number;
285
- unit: string;
286
- }>, z.ZodObject<{
287
- numericValue: z.ZodOptional<z.ZodNumber>;
288
- unit: z.ZodOptional<z.ZodString>;
289
- }, "strip", z.ZodTypeAny, {
290
- numericValue?: number | undefined;
291
- unit?: string | undefined;
292
- }, {
293
- numericValue?: number | undefined;
294
- unit?: string | undefined;
295
- }>, z.ZodObject<{
296
- path: z.ZodEffects<z.ZodString, string, string>;
129
+ }, z.core.$strip>, z.ZodString, z.ZodUnion<[z.ZodObject<{
130
+ start: z.ZodISODate;
131
+ end: z.ZodISODate;
132
+ }, z.core.$strip>, z.ZodISODate]>, z.ZodEnum<{
133
+ last7Days: "last7Days";
134
+ last30Days: "last30Days";
135
+ last90Days: "last90Days";
136
+ last365Days: "last365Days";
137
+ }>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
138
+ path: z.ZodString;
297
139
  originalFilename: z.ZodString;
298
140
  type: z.ZodString;
299
- }, "strip", z.ZodTypeAny, {
300
- type: string;
301
- path: string;
302
- originalFilename: string;
303
- }, {
304
- type: string;
305
- path: string;
306
- originalFilename: string;
307
- }>, z.ZodArray<z.ZodObject<{
308
- path: z.ZodEffects<z.ZodString, string, string>;
141
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
142
+ path: z.ZodString;
309
143
  originalFilename: z.ZodString;
310
144
  type: z.ZodString;
311
145
  option: z.ZodString;
312
- }, "strip", z.ZodTypeAny, {
313
- type: string;
314
- option: string;
315
- path: string;
316
- originalFilename: string;
317
- }, {
318
- type: string;
319
- option: string;
320
- path: string;
321
- originalFilename: string;
322
- }>, "many">, z.ZodObject<{
146
+ }, z.core.$strip>>, z.ZodObject<{
323
147
  firstname: z.ZodString;
324
148
  surname: z.ZodString;
325
149
  middlename: z.ZodOptional<z.ZodString>;
326
- }, "strip", z.ZodTypeAny, {
327
- firstname: string;
328
- surname: string;
329
- middlename?: string | undefined;
330
- }, {
331
- firstname: string;
332
- surname: string;
333
- middlename?: string | undefined;
334
- }>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
150
+ }, z.core.$strip>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
335
151
  firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
336
152
  surname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
337
153
  middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
338
- }, "strip", z.ZodTypeAny, {
339
- firstname?: string | null | undefined;
340
- surname?: string | null | undefined;
341
- middlename?: string | null | undefined;
342
- }, {
343
- firstname?: string | null | undefined;
344
- surname?: string | null | undefined;
345
- middlename?: string | null | undefined;
346
- }>, z.ZodNull]>, z.ZodUndefined]>, z.ZodNumber, z.ZodObject<{
154
+ }, z.core.$strip>, z.ZodNull]>, z.ZodUndefined]>, z.ZodNumber, z.ZodObject<{
347
155
  loading: z.ZodBoolean;
348
156
  error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
349
157
  statusCode: z.ZodNumber;
350
158
  message: z.ZodString;
351
- }, "strip", z.ZodTypeAny, {
352
- message: string;
353
- statusCode: number;
354
- }, {
355
- message: string;
356
- statusCode: number;
357
- }>>>;
159
+ }, z.core.$strip>>>;
358
160
  data: z.ZodAny;
359
- }, "strip", z.ZodTypeAny, {
360
- loading: boolean;
361
- data?: any;
362
- error?: {
363
- message: string;
364
- statusCode: number;
365
- } | null | undefined;
366
- }, {
367
- loading: boolean;
368
- data?: any;
369
- error?: {
370
- message: string;
371
- statusCode: number;
372
- } | null | undefined;
373
- }>, z.ZodEnum<["verified", "authenticated", "failed", "pending"]>, z.ZodOptional<z.ZodNullable<z.ZodObject<{
161
+ }, z.core.$strip>, z.ZodEnum<{
162
+ failed: "failed";
163
+ verified: "verified";
164
+ authenticated: "authenticated";
165
+ pending: "pending";
166
+ }>, z.ZodOptional<z.ZodNullable<z.ZodObject<{
374
167
  data: z.ZodRecord<z.ZodString, z.ZodString>;
375
- }, "strip", z.ZodTypeAny, {
376
- data: Record<string, string>;
377
- }, {
378
- data: Record<string, string>;
379
- }>>>, z.ZodObject<{
168
+ }, z.core.$strip>>>, z.ZodObject<{
380
169
  data: z.ZodAny;
381
- }, "strip", z.ZodTypeAny, {
382
- data?: any;
383
- }, {
384
- data?: any;
385
- }>, z.ZodObject<{
170
+ }, z.core.$strip>, z.ZodObject<{
386
171
  data: z.ZodAny;
387
- }, "strip", z.ZodTypeAny, {
388
- data?: any;
389
- }, {
390
- data?: any;
391
- }>]>>;
392
- }, "strip", z.ZodTypeAny, {
393
- data: Record<string, string | number | boolean | {
394
- type: string;
395
- path: string;
396
- originalFilename: string;
397
- } | {
398
- firstname: string;
399
- surname: string;
400
- middlename?: string | undefined;
401
- } | {
402
- firstname?: string | null | undefined;
403
- surname?: string | null | undefined;
404
- middlename?: string | null | undefined;
405
- } | {
406
- country: string;
407
- addressType: "DOMESTIC";
408
- administrativeArea: string;
409
- streetLevelDetails?: Record<string, string> | undefined;
410
- } | {
411
- country: string;
412
- addressType: "INTERNATIONAL";
413
- streetLevelDetails?: Record<string, string> | undefined;
414
- } | {
415
- type: string;
416
- option: string;
417
- path: string;
418
- originalFilename: string;
419
- }[] | {
420
- loading: boolean;
421
- data?: any;
422
- error?: {
423
- message: string;
424
- statusCode: number;
425
- } | null | undefined;
426
- } | {
427
- data: Record<string, string>;
428
- } | {
429
- data?: any;
430
- } | {
431
- numericValue: number;
432
- unit: string;
433
- } | {
434
- numericValue?: number | undefined;
435
- unit?: string | undefined;
436
- } | {
437
- age: number;
438
- asOfDateRef: string;
439
- } | {
440
- start: string;
441
- end: string;
442
- } | null | undefined>;
443
- }, {
444
- data: Record<string, string | number | boolean | {
445
- type: string;
446
- path: string;
447
- originalFilename: string;
448
- } | {
449
- firstname: string;
450
- surname: string;
451
- middlename?: string | undefined;
452
- } | {
453
- firstname?: string | null | undefined;
454
- surname?: string | null | undefined;
455
- middlename?: string | null | undefined;
456
- } | {
457
- country: string;
458
- addressType: "DOMESTIC";
459
- administrativeArea: string;
460
- streetLevelDetails?: Record<string, string> | undefined;
461
- } | {
462
- country: string;
463
- addressType: "INTERNATIONAL";
464
- streetLevelDetails?: Record<string, string> | undefined;
465
- } | {
466
- type: string;
467
- option: string;
468
- path: string;
469
- originalFilename: string;
470
- }[] | {
471
- loading: boolean;
472
- data?: any;
473
- error?: {
474
- message: string;
475
- statusCode: number;
476
- } | null | undefined;
477
- } | {
478
- data: Record<string, string>;
479
- } | {
480
- data?: any;
481
- } | {
482
- numericValue: number;
483
- unit: string;
484
- } | {
485
- numericValue?: number | undefined;
486
- unit?: string | undefined;
487
- } | {
488
- age: number;
489
- asOfDateRef: string;
490
- } | {
491
- start: string;
492
- end: string;
493
- } | null | undefined>;
494
- }>>>;
172
+ }, z.core.$strip>]>>;
173
+ }, z.core.$strip>>>;
495
174
  export type DataFieldValue = z.infer<typeof DataFieldValue>;
496
175
  export type FieldValue = FieldValuesWithoutDataField | DataFieldValue;
497
176
  export declare const FieldValue: z.ZodType<FieldValue>;
498
- export declare function safeUnion<T extends [z.ZodTypeAny, ...z.ZodTypeAny[]]>(schemas: T): z.ZodType<z.TypeOf<T[number]>, z.ZodTypeDef, z.TypeOf<T[number]>>;
499
- export type FieldUpdateValue = z.infer<typeof TextValue> | z.infer<typeof DateValue> | z.infer<typeof TimeValue> | z.infer<typeof AgeUpdateValue> | z.infer<typeof AddressFieldUpdateValue> | z.infer<typeof DateRangeFieldValue> | z.infer<typeof SelectDateRangeValue> | z.infer<typeof CheckboxFieldValue> | z.infer<typeof NumberFieldValue> | z.infer<typeof NumberWithUnitFieldUpdateValue> | z.infer<typeof FileFieldValue> | z.infer<typeof FileFieldWithOptionValue> | z.infer<typeof DataFieldValue> | z.infer<typeof NameFieldUpdateValue> | z.infer<typeof HttpFieldUpdateValue> | z.infer<typeof QueryParamReaderFieldUpdateValue>;
177
+ export declare function safeUnion<T extends [z.ZodTypeAny, ...z.ZodTypeAny[]]>(schemas: T): z.ZodAny;
178
+ export type FieldUpdateValue = z.infer<typeof TextValue> | z.infer<typeof DateValue> | z.infer<typeof TimeValue> | z.infer<typeof AgeUpdateValue> | z.infer<typeof AddressFieldUpdateValue> | z.infer<typeof DateRangeFieldValue> | z.infer<typeof SelectDateRangeValue> | z.infer<typeof CheckboxFieldValue> | z.infer<typeof NumberFieldValue> | z.infer<typeof FileFieldValue> | z.infer<typeof FileFieldWithOptionValue> | z.infer<typeof DataFieldValue> | z.infer<typeof NameFieldUpdateValue> | z.infer<typeof HttpFieldUpdateValue> | z.infer<typeof QueryParamReaderFieldUpdateValue> | z.infer<typeof HiddenFieldValue>;
500
179
  export declare const FieldUpdateValue: z.ZodType<FieldUpdateValue>;
501
180
  /**
502
181
  * NOTE: This is an exception. We need schema as a type in order to generate schema dynamically.
503
182
  * */
504
- export type FieldValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldValue | typeof NumberFieldValue | typeof NumberWithUnitFieldValue | typeof DataFieldValue | typeof NameFieldValue | z.ZodString | z.ZodBoolean;
183
+ export type FieldValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldValue | typeof NumberFieldValue | typeof DataFieldValue | typeof NameFieldValue | z.ZodString | z.ZodBoolean;
505
184
  /**
506
185
  * NOTE: This is an exception. We need schema as a type in order to generate schema dynamically.
507
186
  *
508
187
  * FieldValueInputSchema uses Input types which have set optional values as nullish
509
188
  * */
510
- export type FieldUpdateValueSchema = typeof DateRangeFieldValue | typeof AgeValue | typeof SelectDateRangeValue | typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | typeof NumberWithUnitFieldUpdateValue | typeof DataFieldValue | typeof NameFieldValue | typeof NameFieldUpdateValue | typeof HttpFieldUpdateValue | typeof QueryParamReaderFieldUpdateValue | typeof ButtonFieldValue | typeof QrReaderFieldValue | typeof IdReaderFieldValue | z.ZodString | z.ZodBoolean;
189
+ export type FieldUpdateValueSchema = typeof DateRangeFieldValue | typeof AgeValue | typeof SelectDateRangeValue | typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | typeof DataFieldValue | typeof NameFieldValue | typeof NameFieldUpdateValue | typeof HttpFieldUpdateValue | typeof QueryParamReaderFieldUpdateValue | typeof ButtonFieldValue | typeof QrReaderFieldValue | typeof IdReaderFieldValue | typeof DateValue | typeof EmailValue | z.ZodString | z.ZodBoolean;
511
190
  export {};
512
191
  //# sourceMappingURL=FieldValue.d.ts.map
@@ -0,0 +1,70 @@
1
+ import * as z from 'zod/v4';
2
+ export declare const InherentFlags: {
3
+ readonly PENDING_CERTIFICATION: "pending-certification";
4
+ readonly INCOMPLETE: "incomplete";
5
+ readonly REJECTED: "rejected";
6
+ readonly CORRECTION_REQUESTED: "correction-requested";
7
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
8
+ /**
9
+ * This flag is set by the Edit-action and removed after the declaration or registration.
10
+ * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
11
+ *
12
+ * We only use this flag to determine that a DECLARE or REGISTER action is allowed next.
13
+ */
14
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
15
+ };
16
+ export type InherentFlags = (typeof InherentFlags)[keyof typeof InherentFlags];
17
+ export declare const ActionFlag: z.ZodString;
18
+ export type ActionFlag = z.infer<typeof ActionFlag>;
19
+ /** Custom flag identifier defined by the country config. These may not match any InherentFlags or ActionFlag patterns. */
20
+ export declare const CustomFlag: z.ZodString;
21
+ export type CustomFlag = z.infer<typeof CustomFlag>;
22
+ export declare const Flag: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
23
+ readonly PENDING_CERTIFICATION: "pending-certification";
24
+ readonly INCOMPLETE: "incomplete";
25
+ readonly REJECTED: "rejected";
26
+ readonly CORRECTION_REQUESTED: "correction-requested";
27
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
28
+ /**
29
+ * This flag is set by the Edit-action and removed after the declaration or registration.
30
+ * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
31
+ *
32
+ * We only use this flag to determine that a DECLARE or REGISTER action is allowed next.
33
+ */
34
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
35
+ }>]>, z.ZodString]>;
36
+ export type Flag = z.infer<typeof Flag>;
37
+ /**
38
+ * Configuration of a custom flag that can be associated with a certain event type.
39
+ */
40
+ export declare const FlagConfig: z.ZodObject<{
41
+ id: z.ZodString;
42
+ requiresAction: z.ZodBoolean;
43
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
44
+ }, z.core.$strip>;
45
+ export type FlagConfig = z.infer<typeof FlagConfig>;
46
+ /**
47
+ * Configuration for a flag action, which is executed when the action is performed.
48
+ */
49
+ export declare const ActionFlagConfig: z.ZodObject<{
50
+ id: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
51
+ readonly PENDING_CERTIFICATION: "pending-certification";
52
+ readonly INCOMPLETE: "incomplete";
53
+ readonly REJECTED: "rejected";
54
+ readonly CORRECTION_REQUESTED: "correction-requested";
55
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
56
+ /**
57
+ * This flag is set by the Edit-action and removed after the declaration or registration.
58
+ * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
59
+ *
60
+ * We only use this flag to determine that a DECLARE or REGISTER action is allowed next.
61
+ */
62
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
63
+ }>]>, z.ZodString]>;
64
+ operation: z.ZodEnum<{
65
+ add: "add";
66
+ remove: "remove";
67
+ }>;
68
+ conditional: z.ZodOptional<z.ZodAny>;
69
+ }, z.core.$strip>;
70
+ //# sourceMappingURL=Flag.d.ts.map