@opencrvs/toolkit 1.8.0-rc.ffe8c17 → 1.8.1-rc.a372970

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 (33) hide show
  1. package/README.md +1 -1
  2. package/dist/commons/api/router.d.ts +6644 -9555
  3. package/dist/commons/conditionals/conditionals.d.ts +26 -3
  4. package/dist/commons/conditionals/validate-address.test.d.ts +2 -0
  5. package/dist/commons/conditionals/validate.d.ts +14 -17
  6. package/dist/commons/events/ActionConfig.d.ts +1008 -3209
  7. package/dist/commons/events/ActionDocument.d.ts +9488 -312
  8. package/dist/commons/events/ActionInput.d.ts +5329 -472
  9. package/dist/commons/events/ActionType.d.ts +26 -11
  10. package/dist/commons/events/CompositeFieldValue.d.ts +152 -2
  11. package/dist/commons/events/Conditional.d.ts +21 -5
  12. package/dist/commons/events/Draft.d.ts +351 -48
  13. package/dist/commons/events/EventConfig.d.ts +639 -2862
  14. package/dist/commons/events/EventConfigInput.d.ts +6 -3
  15. package/dist/commons/events/EventDocument.d.ts +3340 -424
  16. package/dist/commons/events/EventIndex.d.ts +6 -3
  17. package/dist/commons/events/EventMetadata.d.ts +3 -0
  18. package/dist/commons/events/FieldConfig.d.ts +383 -104
  19. package/dist/commons/events/FieldTypeMapping.d.ts +104 -207
  20. package/dist/commons/events/FieldValue.d.ts +71 -76
  21. package/dist/commons/events/FormConfig.d.ts +527 -279
  22. package/dist/commons/events/PageConfig.d.ts +335 -0
  23. package/dist/commons/events/TemplateConfig.d.ts +5 -5
  24. package/dist/commons/events/defineConfig.d.ts +40 -417
  25. package/dist/commons/events/index.d.ts +2 -1
  26. package/dist/commons/events/test.utils.d.ts +140 -213
  27. package/dist/commons/events/utils.d.ts +126 -156
  28. package/dist/commons/events/utils.test.d.ts +2 -0
  29. package/dist/conditionals/index.js +166 -81
  30. package/dist/events/index.js +1287 -795
  31. package/dist/scopes/index.d.ts +70 -1
  32. package/dist/scopes/index.js +130 -0
  33. package/package.json +1 -1
@@ -20,6 +20,8 @@ export declare const CheckboxFieldValue: z.ZodBoolean;
20
20
  export type CheckboxFieldValue = z.infer<typeof CheckboxFieldValue>;
21
21
  export declare const NumberFieldValue: z.ZodNumber;
22
22
  export type NumberFieldValue = z.infer<typeof NumberFieldValue>;
23
+ export declare const DataFieldValue: z.ZodUndefined;
24
+ export type DataFieldValue = z.infer<typeof DataFieldValue>;
23
25
  export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
24
26
  filename: z.ZodString;
25
27
  originalFilename: z.ZodString;
@@ -49,6 +51,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
49
51
  originalFilename: string;
50
52
  }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
51
53
  country: z.ZodString;
54
+ addressType: z.ZodLiteral<"DOMESTIC">;
52
55
  province: z.ZodString;
53
56
  district: z.ZodString;
54
57
  }, {
@@ -61,6 +64,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
61
64
  }>, "strip", z.ZodTypeAny, {
62
65
  country: string;
63
66
  district: string;
67
+ addressType: "DOMESTIC";
64
68
  province: string;
65
69
  urbanOrRural: "URBAN";
66
70
  number?: string | undefined;
@@ -71,6 +75,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
71
75
  }, {
72
76
  country: string;
73
77
  district: string;
78
+ addressType: "DOMESTIC";
74
79
  province: string;
75
80
  urbanOrRural: "URBAN";
76
81
  number?: string | undefined;
@@ -80,6 +85,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
80
85
  zipCode?: string | undefined;
81
86
  }>, z.ZodObject<z.objectUtil.extendShape<{
82
87
  country: z.ZodString;
88
+ addressType: z.ZodLiteral<"DOMESTIC">;
83
89
  province: z.ZodString;
84
90
  district: z.ZodString;
85
91
  }, {
@@ -88,95 +94,48 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
88
94
  }>, "strip", z.ZodTypeAny, {
89
95
  country: string;
90
96
  district: string;
97
+ addressType: "DOMESTIC";
91
98
  province: string;
92
99
  urbanOrRural: "RURAL";
93
100
  village?: string | undefined;
94
101
  }, {
95
102
  country: string;
96
103
  district: string;
104
+ addressType: "DOMESTIC";
97
105
  province: string;
98
106
  urbanOrRural: "RURAL";
99
107
  village?: string | undefined;
100
- }>]>;
101
- export declare const DataFieldValue: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
102
- filename: z.ZodString;
103
- originalFilename: z.ZodString;
104
- type: z.ZodString;
105
- }, "strip", z.ZodTypeAny, {
106
- type: string;
107
- filename: string;
108
- originalFilename: string;
109
- }, {
110
- type: string;
111
- filename: string;
112
- originalFilename: string;
113
- }>, z.ZodArray<z.ZodObject<{
114
- filename: z.ZodString;
115
- originalFilename: z.ZodString;
116
- type: z.ZodString;
117
- option: z.ZodString;
118
- }, "strip", z.ZodTypeAny, {
119
- type: string;
120
- option: string;
121
- filename: string;
122
- originalFilename: string;
123
- }, {
124
- type: string;
125
- option: string;
126
- filename: string;
127
- originalFilename: string;
128
- }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
129
- country: z.ZodString;
130
- province: z.ZodString;
131
- district: z.ZodString;
132
- }, {
133
- urbanOrRural: z.ZodLiteral<"URBAN">;
134
- town: z.ZodOptional<z.ZodString>;
135
- residentialArea: z.ZodOptional<z.ZodString>;
136
- street: z.ZodOptional<z.ZodString>;
137
- number: z.ZodOptional<z.ZodString>;
138
- zipCode: z.ZodOptional<z.ZodString>;
139
- }>, "strip", z.ZodTypeAny, {
140
- country: string;
141
- district: string;
142
- province: string;
143
- urbanOrRural: "URBAN";
144
- number?: string | undefined;
145
- town?: string | undefined;
146
- residentialArea?: string | undefined;
147
- street?: string | undefined;
148
- zipCode?: string | undefined;
149
- }, {
150
- country: string;
151
- district: string;
152
- province: string;
153
- urbanOrRural: "URBAN";
154
- number?: string | undefined;
155
- town?: string | undefined;
156
- residentialArea?: string | undefined;
157
- street?: string | undefined;
158
- zipCode?: string | undefined;
159
- }>, z.ZodObject<z.objectUtil.extendShape<{
108
+ }>, z.ZodUndefined, z.ZodObject<{
160
109
  country: z.ZodString;
161
- province: z.ZodString;
162
- district: z.ZodString;
163
- }, {
164
- urbanOrRural: z.ZodLiteral<"RURAL">;
165
- village: z.ZodOptional<z.ZodString>;
166
- }>, "strip", z.ZodTypeAny, {
110
+ addressType: z.ZodLiteral<"INTERNATIONAL">;
111
+ state: z.ZodString;
112
+ district2: z.ZodString;
113
+ cityOrTown: z.ZodOptional<z.ZodString>;
114
+ addressLine1: z.ZodOptional<z.ZodString>;
115
+ addressLine2: z.ZodOptional<z.ZodString>;
116
+ addressLine3: z.ZodOptional<z.ZodString>;
117
+ postcodeOrZip: z.ZodOptional<z.ZodString>;
118
+ }, "strip", z.ZodTypeAny, {
167
119
  country: string;
168
- district: string;
169
- province: string;
170
- urbanOrRural: "RURAL";
171
- village?: string | undefined;
120
+ state: string;
121
+ addressType: "INTERNATIONAL";
122
+ district2: string;
123
+ cityOrTown?: string | undefined;
124
+ addressLine1?: string | undefined;
125
+ addressLine2?: string | undefined;
126
+ addressLine3?: string | undefined;
127
+ postcodeOrZip?: string | undefined;
172
128
  }, {
173
129
  country: string;
174
- district: string;
175
- province: string;
176
- urbanOrRural: "RURAL";
177
- village?: string | undefined;
178
- }>]>>;
179
- export type DataFieldValue = z.infer<typeof DataFieldValue>;
130
+ state: string;
131
+ addressType: "INTERNATIONAL";
132
+ district2: string;
133
+ cityOrTown?: string | undefined;
134
+ addressLine1?: string | undefined;
135
+ addressLine2?: string | undefined;
136
+ addressLine3?: string | undefined;
137
+ postcodeOrZip?: string | undefined;
138
+ }>]>;
180
139
  export type FieldValue = z.infer<typeof FieldValue>;
181
140
  export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
182
141
  filename: z.ZodString;
@@ -207,6 +166,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
207
166
  originalFilename: string;
208
167
  }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
209
168
  country: z.ZodString;
169
+ addressType: z.ZodLiteral<"DOMESTIC">;
210
170
  province: z.ZodString;
211
171
  district: z.ZodString;
212
172
  }, {
@@ -219,6 +179,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
219
179
  }>, "strip", z.ZodTypeAny, {
220
180
  country: string;
221
181
  district: string;
182
+ addressType: "DOMESTIC";
222
183
  province: string;
223
184
  urbanOrRural: "URBAN";
224
185
  number?: string | null | undefined;
@@ -229,6 +190,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
229
190
  }, {
230
191
  country: string;
231
192
  district: string;
193
+ addressType: "DOMESTIC";
232
194
  province: string;
233
195
  urbanOrRural: "URBAN";
234
196
  number?: string | null | undefined;
@@ -238,6 +200,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
238
200
  zipCode?: string | null | undefined;
239
201
  }>, z.ZodObject<z.objectUtil.extendShape<{
240
202
  country: z.ZodString;
203
+ addressType: z.ZodLiteral<"DOMESTIC">;
241
204
  province: z.ZodString;
242
205
  district: z.ZodString;
243
206
  }, {
@@ -246,15 +209,47 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
246
209
  }>, "strip", z.ZodTypeAny, {
247
210
  country: string;
248
211
  district: string;
212
+ addressType: "DOMESTIC";
249
213
  province: string;
250
214
  urbanOrRural: "RURAL";
251
215
  village?: string | null | undefined;
252
216
  }, {
253
217
  country: string;
254
218
  district: string;
219
+ addressType: "DOMESTIC";
255
220
  province: string;
256
221
  urbanOrRural: "RURAL";
257
222
  village?: string | null | undefined;
223
+ }>, z.ZodUndefined, z.ZodObject<{
224
+ country: z.ZodString;
225
+ addressType: z.ZodLiteral<"INTERNATIONAL">;
226
+ state: z.ZodString;
227
+ district2: z.ZodString;
228
+ cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
229
+ addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
230
+ addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
231
+ addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
232
+ postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
233
+ }, "strip", z.ZodTypeAny, {
234
+ country: string;
235
+ state: string;
236
+ addressType: "INTERNATIONAL";
237
+ district2: string;
238
+ cityOrTown?: string | null | undefined;
239
+ addressLine1?: string | null | undefined;
240
+ addressLine2?: string | null | undefined;
241
+ addressLine3?: string | null | undefined;
242
+ postcodeOrZip?: string | null | undefined;
243
+ }, {
244
+ country: string;
245
+ state: string;
246
+ addressType: "INTERNATIONAL";
247
+ district2: string;
248
+ cityOrTown?: string | null | undefined;
249
+ addressLine1?: string | null | undefined;
250
+ addressLine2?: string | null | undefined;
251
+ addressLine3?: string | null | undefined;
252
+ postcodeOrZip?: string | null | undefined;
258
253
  }>]>;
259
254
  export type FieldUpdateValue = z.infer<typeof FieldUpdateValue>;
260
255
  /**