@opencrvs/toolkit 1.8.0-rc.fe799b0 → 1.8.0-rc.fe7c504

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 (49) hide show
  1. package/README.md +1 -1
  2. package/dist/commons/api/router.d.ts +12626 -10500
  3. package/dist/commons/conditionals/conditionals.d.ts +37 -6
  4. package/dist/commons/conditionals/validate-address.test.d.ts +2 -0
  5. package/dist/commons/conditionals/validate.d.ts +45 -17
  6. package/dist/commons/conditionals/validate.test.d.ts +2 -0
  7. package/dist/commons/events/ActionConfig.d.ts +119422 -2084
  8. package/dist/commons/events/ActionDocument.d.ts +11632 -435
  9. package/dist/commons/events/ActionInput.d.ts +6716 -663
  10. package/dist/commons/events/ActionType.d.ts +31 -12
  11. package/dist/commons/events/AdvancedSearchConfig.d.ts +1233 -22
  12. package/dist/commons/events/CompositeFieldValue.d.ts +183 -2
  13. package/dist/commons/events/Conditional.d.ts +21 -5
  14. package/dist/commons/events/Constants.d.ts +3 -0
  15. package/dist/commons/events/CountryConfigQueryInput.d.ts +3730 -0
  16. package/dist/commons/events/CreatedAtLocation.d.ts +2 -0
  17. package/dist/commons/events/Draft.d.ts +488 -69
  18. package/dist/commons/events/EventConfig.d.ts +57615 -1821
  19. package/dist/commons/events/EventConfigInput.d.ts +6 -3
  20. package/dist/commons/events/EventDocument.d.ts +4762 -607
  21. package/dist/commons/events/EventIndex.d.ts +2012 -24
  22. package/dist/commons/events/EventMetadata.d.ts +343 -42
  23. package/dist/commons/events/FieldConfig.d.ts +6001 -972
  24. package/dist/commons/events/FieldType.d.ts +10 -2
  25. package/dist/commons/events/FieldTypeMapping.d.ts +218 -18
  26. package/dist/commons/events/FieldValue.d.ts +123 -8
  27. package/dist/commons/events/FormConfig.d.ts +50409 -90
  28. package/dist/commons/events/PageConfig.d.ts +12597 -0
  29. package/dist/commons/events/SummaryConfig.d.ts +93 -42
  30. package/dist/commons/events/TemplateConfig.d.ts +38 -0
  31. package/dist/commons/events/User.d.ts +34 -2
  32. package/dist/commons/events/WorkqueueColumnConfig.d.ts +53 -0
  33. package/dist/commons/events/WorkqueueConfig.d.ts +7300 -20
  34. package/dist/commons/events/defineConfig.d.ts +9405 -307
  35. package/dist/commons/events/event.d.ts +54 -0
  36. package/dist/commons/events/field.d.ts +82 -0
  37. package/dist/commons/events/index.d.ts +11 -1
  38. package/dist/commons/events/scopes.d.ts +44 -0
  39. package/dist/commons/events/serializer.d.ts +2 -0
  40. package/dist/commons/events/test.utils.d.ts +245 -225
  41. package/dist/commons/events/transactions.d.ts +1 -1
  42. package/dist/commons/events/utils.d.ts +13906 -69
  43. package/dist/commons/events/utils.test.d.ts +2 -0
  44. package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
  45. package/dist/conditionals/index.js +244 -115
  46. package/dist/events/index.js +5263 -1871
  47. package/dist/scopes/index.d.ts +247 -1
  48. package/dist/scopes/index.js +231 -1
  49. package/package.json +4 -3
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { AddressFieldValue, AddressFieldUpdateValue, FileFieldValue, FileFieldWithOptionValue } from './CompositeFieldValue';
2
+ import { AddressFieldValue, AddressFieldUpdateValue, FileFieldValue, FileFieldWithOptionValue, NameFieldValue, NameFieldUpdateValue } 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,14 +13,21 @@ import { AddressFieldValue, AddressFieldUpdateValue, FileFieldValue, FileFieldWi
13
13
  *
14
14
  */
15
15
  export declare const TextValue: z.ZodString;
16
- export declare const RequiredTextValue: z.ZodString;
16
+ export declare const NonEmptyTextValue: z.ZodString;
17
17
  export declare const DateValue: z.ZodString;
18
+ export declare const DatetimeValue: z.ZodString;
19
+ export declare const DateRangeFieldValue: z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
20
+ export type DateRangeFieldValue = z.infer<typeof DateRangeFieldValue>;
18
21
  export declare const EmailValue: z.ZodString;
19
22
  export declare const CheckboxFieldValue: z.ZodBoolean;
20
23
  export type CheckboxFieldValue = z.infer<typeof CheckboxFieldValue>;
21
24
  export declare const NumberFieldValue: z.ZodNumber;
22
25
  export type NumberFieldValue = z.infer<typeof NumberFieldValue>;
23
- export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
26
+ export declare const DataFieldValue: z.ZodUndefined;
27
+ export type DataFieldValue = z.infer<typeof DataFieldValue>;
28
+ export declare const SignatureFieldValue: z.ZodString;
29
+ export type SignatureFieldValue = z.infer<typeof SignatureFieldValue>;
30
+ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
24
31
  filename: z.ZodString;
25
32
  originalFilename: z.ZodString;
26
33
  type: z.ZodString;
@@ -49,6 +56,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
49
56
  originalFilename: string;
50
57
  }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
51
58
  country: z.ZodString;
59
+ addressType: z.ZodLiteral<"DOMESTIC">;
52
60
  province: z.ZodString;
53
61
  district: z.ZodString;
54
62
  }, {
@@ -61,6 +69,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
61
69
  }>, "strip", z.ZodTypeAny, {
62
70
  country: string;
63
71
  district: string;
72
+ addressType: "DOMESTIC";
64
73
  province: string;
65
74
  urbanOrRural: "URBAN";
66
75
  number?: string | undefined;
@@ -71,6 +80,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
71
80
  }, {
72
81
  country: string;
73
82
  district: string;
83
+ addressType: "DOMESTIC";
74
84
  province: string;
75
85
  urbanOrRural: "URBAN";
76
86
  number?: string | undefined;
@@ -80,6 +90,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
80
90
  zipCode?: string | undefined;
81
91
  }>, z.ZodObject<z.objectUtil.extendShape<{
82
92
  country: z.ZodString;
93
+ addressType: z.ZodLiteral<"DOMESTIC">;
83
94
  province: z.ZodString;
84
95
  district: z.ZodString;
85
96
  }, {
@@ -88,18 +99,74 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
88
99
  }>, "strip", z.ZodTypeAny, {
89
100
  country: string;
90
101
  district: string;
102
+ addressType: "DOMESTIC";
91
103
  province: string;
92
104
  urbanOrRural: "RURAL";
93
105
  village?: string | undefined;
94
106
  }, {
95
107
  country: string;
96
108
  district: string;
109
+ addressType: "DOMESTIC";
97
110
  province: string;
98
111
  urbanOrRural: "RURAL";
99
112
  village?: string | undefined;
100
- }>]>;
113
+ }>, z.ZodUndefined, z.ZodObject<{
114
+ country: z.ZodString;
115
+ addressType: z.ZodLiteral<"INTERNATIONAL">;
116
+ state: z.ZodString;
117
+ district2: z.ZodString;
118
+ cityOrTown: z.ZodOptional<z.ZodString>;
119
+ addressLine1: z.ZodOptional<z.ZodString>;
120
+ addressLine2: z.ZodOptional<z.ZodString>;
121
+ addressLine3: z.ZodOptional<z.ZodString>;
122
+ postcodeOrZip: z.ZodOptional<z.ZodString>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ country: string;
125
+ state: string;
126
+ addressType: "INTERNATIONAL";
127
+ district2: string;
128
+ cityOrTown?: string | undefined;
129
+ addressLine1?: string | undefined;
130
+ addressLine2?: string | undefined;
131
+ addressLine3?: string | undefined;
132
+ postcodeOrZip?: string | undefined;
133
+ }, {
134
+ country: string;
135
+ state: string;
136
+ addressType: "INTERNATIONAL";
137
+ district2: string;
138
+ cityOrTown?: string | undefined;
139
+ addressLine1?: string | undefined;
140
+ addressLine2?: string | undefined;
141
+ addressLine3?: string | undefined;
142
+ postcodeOrZip?: string | undefined;
143
+ }>, z.ZodObject<{
144
+ firstname: z.ZodString;
145
+ surname: z.ZodString;
146
+ middlename: z.ZodOptional<z.ZodString>;
147
+ }, "strip", z.ZodTypeAny, {
148
+ firstname: string;
149
+ surname: string;
150
+ middlename?: string | undefined;
151
+ }, {
152
+ firstname: string;
153
+ surname: string;
154
+ middlename?: string | undefined;
155
+ }>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
156
+ firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
157
+ surname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
158
+ middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
159
+ }, "strip", z.ZodTypeAny, {
160
+ firstname?: string | null | undefined;
161
+ surname?: string | null | undefined;
162
+ middlename?: string | null | undefined;
163
+ }, {
164
+ firstname?: string | null | undefined;
165
+ surname?: string | null | undefined;
166
+ middlename?: string | null | undefined;
167
+ }>, z.ZodNull]>, z.ZodUndefined]>]>;
101
168
  export type FieldValue = z.infer<typeof FieldValue>;
102
- export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
169
+ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
103
170
  filename: z.ZodString;
104
171
  originalFilename: z.ZodString;
105
172
  type: z.ZodString;
@@ -128,6 +195,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
128
195
  originalFilename: string;
129
196
  }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
130
197
  country: z.ZodString;
198
+ addressType: z.ZodLiteral<"DOMESTIC">;
131
199
  province: z.ZodString;
132
200
  district: z.ZodString;
133
201
  }, {
@@ -140,6 +208,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
140
208
  }>, "strip", z.ZodTypeAny, {
141
209
  country: string;
142
210
  district: string;
211
+ addressType: "DOMESTIC";
143
212
  province: string;
144
213
  urbanOrRural: "URBAN";
145
214
  number?: string | null | undefined;
@@ -150,6 +219,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
150
219
  }, {
151
220
  country: string;
152
221
  district: string;
222
+ addressType: "DOMESTIC";
153
223
  province: string;
154
224
  urbanOrRural: "URBAN";
155
225
  number?: string | null | undefined;
@@ -159,6 +229,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
159
229
  zipCode?: string | null | undefined;
160
230
  }>, z.ZodObject<z.objectUtil.extendShape<{
161
231
  country: z.ZodString;
232
+ addressType: z.ZodLiteral<"DOMESTIC">;
162
233
  province: z.ZodString;
163
234
  district: z.ZodString;
164
235
  }, {
@@ -167,25 +238,69 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
167
238
  }>, "strip", z.ZodTypeAny, {
168
239
  country: string;
169
240
  district: string;
241
+ addressType: "DOMESTIC";
170
242
  province: string;
171
243
  urbanOrRural: "RURAL";
172
244
  village?: string | null | undefined;
173
245
  }, {
174
246
  country: string;
175
247
  district: string;
248
+ addressType: "DOMESTIC";
176
249
  province: string;
177
250
  urbanOrRural: "RURAL";
178
251
  village?: string | null | undefined;
179
- }>]>;
252
+ }>, z.ZodUndefined, z.ZodObject<{
253
+ country: z.ZodString;
254
+ addressType: z.ZodLiteral<"INTERNATIONAL">;
255
+ state: z.ZodString;
256
+ district2: z.ZodString;
257
+ cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
258
+ addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
259
+ addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
260
+ addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
261
+ postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
262
+ }, "strip", z.ZodTypeAny, {
263
+ country: string;
264
+ state: string;
265
+ addressType: "INTERNATIONAL";
266
+ district2: string;
267
+ cityOrTown?: string | null | undefined;
268
+ addressLine1?: string | null | undefined;
269
+ addressLine2?: string | null | undefined;
270
+ addressLine3?: string | null | undefined;
271
+ postcodeOrZip?: string | null | undefined;
272
+ }, {
273
+ country: string;
274
+ state: string;
275
+ addressType: "INTERNATIONAL";
276
+ district2: string;
277
+ cityOrTown?: string | null | undefined;
278
+ addressLine1?: string | null | undefined;
279
+ addressLine2?: string | null | undefined;
280
+ addressLine3?: string | null | undefined;
281
+ postcodeOrZip?: string | null | undefined;
282
+ }>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
283
+ firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
284
+ surname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
285
+ middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
286
+ }, "strip", z.ZodTypeAny, {
287
+ firstname?: string | null | undefined;
288
+ surname?: string | null | undefined;
289
+ middlename?: string | null | undefined;
290
+ }, {
291
+ firstname?: string | null | undefined;
292
+ surname?: string | null | undefined;
293
+ middlename?: string | null | undefined;
294
+ }>, z.ZodNull]>, z.ZodUndefined]>]>;
180
295
  export type FieldUpdateValue = z.infer<typeof FieldUpdateValue>;
181
296
  /**
182
297
  * NOTE: This is an exception. We need schema as a type in order to generate schema dynamically.
183
298
  * */
184
- export type FieldValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldValue | typeof NumberFieldValue | z.ZodString | z.ZodBoolean;
299
+ export type FieldValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldValue | typeof NumberFieldValue | typeof DataFieldValue | typeof NameFieldValue | z.ZodString | z.ZodBoolean;
185
300
  /**
186
301
  * NOTE: This is an exception. We need schema as a type in order to generate schema dynamically.
187
302
  *
188
303
  * FieldValueInputSchema uses Input types which have set optional values as nullish
189
304
  * */
190
- export type FieldUpdateValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | z.ZodString | z.ZodBoolean;
305
+ export type FieldUpdateValueSchema = typeof DateRangeFieldValue | typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | typeof DataFieldValue | typeof NameFieldValue | typeof NameFieldUpdateValue | z.ZodString | z.ZodBoolean;
191
306
  //# sourceMappingURL=FieldValue.d.ts.map