@opencrvs/toolkit 1.9.4-rc.793f834 → 1.9.4-rc.f09603b

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 +28204 -2149
  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 +23416 -1552
  5. package/dist/commons/events/ActionDocument.d.ts +803 -1856
  6. package/dist/commons/events/ActionInput.d.ts +277 -1073
  7. package/dist/commons/events/ActionType.d.ts +86 -9
  8. package/dist/commons/events/AdvancedSearchConfig.d.ts +228 -1238
  9. package/dist/commons/events/CompositeFieldValue.d.ts +27 -176
  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 +70 -105
  16. package/dist/commons/events/DynamicFieldValue.d.ts +7 -91
  17. package/dist/commons/events/EventConfig.d.ts +18663 -2120
  18. package/dist/commons/events/EventConfigInput.d.ts +1 -1
  19. package/dist/commons/events/EventDocument.d.ts +320 -1332
  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 +4267 -11782
  24. package/dist/commons/events/FieldType.d.ts +20 -4
  25. package/dist/commons/events/FieldTypeMapping.d.ts +181 -813
  26. package/dist/commons/events/FieldValue.d.ts +83 -356
  27. package/dist/commons/events/Flag.d.ts +70 -0
  28. package/dist/commons/events/FormConfig.d.ts +13140 -721
  29. package/dist/commons/events/PageConfig.d.ts +8780 -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 +1691 -7156
  35. package/dist/commons/events/deduplication.d.ts +3 -3
  36. package/dist/commons/events/defineConfig.d.ts +25626 -150
  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 +5 -4
  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 +130 -112
  45. package/dist/commons/events/test.utils.d.ts +17 -8
  46. package/dist/commons/events/transactions.d.ts +1 -1
  47. package/dist/commons/events/utils.d.ts +51339 -362
  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 +1810 -1550
  53. package/dist/notification/index.d.ts.map +1 -1
  54. package/dist/notification/index.js +1430 -1412
  55. package/dist/scopes/index.d.ts +167 -132
  56. package/dist/scopes/index.d.ts.map +1 -1
  57. package/dist/scopes/index.js +133 -94
  58. package/package.json +5 -5
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod/v4';
2
2
  /**
3
3
  * Composite field value consists of multiple field values.
4
4
  */
@@ -11,248 +11,99 @@ export declare const AddressType: {
11
11
  readonly INTERNATIONAL: "INTERNATIONAL";
12
12
  };
13
13
  export declare const FileFieldValue: z.ZodObject<{
14
- path: z.ZodEffects<z.ZodString, string, string>;
14
+ path: z.ZodString;
15
15
  originalFilename: z.ZodString;
16
16
  type: z.ZodString;
17
- }, "strip", z.ZodTypeAny, {
18
- type: string;
19
- path: string;
20
- originalFilename: string;
21
- }, {
22
- type: string;
23
- path: string;
24
- originalFilename: string;
25
- }>;
17
+ }, z.core.$strip>;
26
18
  export type FileFieldValue = z.infer<typeof FileFieldValue>;
27
19
  export declare const NameFieldValue: z.ZodObject<{
28
20
  firstname: z.ZodString;
29
21
  surname: z.ZodString;
30
22
  middlename: z.ZodOptional<z.ZodString>;
31
- }, "strip", z.ZodTypeAny, {
32
- firstname: string;
33
- surname: string;
34
- middlename?: string | undefined;
35
- }, {
36
- firstname: string;
37
- surname: string;
38
- middlename?: string | undefined;
39
- }>;
23
+ }, z.core.$strip>;
40
24
  export declare const NameFieldUpdateValue: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
41
25
  firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
42
26
  surname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
27
  middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
- }, "strip", z.ZodTypeAny, {
45
- firstname?: string | null | undefined;
46
- surname?: string | null | undefined;
47
- middlename?: string | null | undefined;
48
- }, {
49
- firstname?: string | null | undefined;
50
- surname?: string | null | undefined;
51
- middlename?: string | null | undefined;
52
- }>, z.ZodNull]>, z.ZodUndefined]>;
28
+ }, z.core.$strip>, z.ZodNull]>, z.ZodUndefined]>;
53
29
  export type NameFieldValue = z.infer<typeof NameFieldValue>;
54
30
  export type NameFieldUpdateValue = z.infer<typeof NameFieldUpdateValue>;
55
31
  export declare const StreetLevelDetailsUpdateValue: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>>;
56
- export declare const DomesticAddressFieldValue: z.ZodObject<z.objectUtil.extendShape<{
32
+ export declare const DomesticAddressFieldValue: z.ZodObject<{
57
33
  country: z.ZodString;
58
34
  streetLevelDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
59
- }, {
60
35
  addressType: z.ZodLiteral<"DOMESTIC">;
61
36
  administrativeArea: z.ZodString;
62
- }>, "strip", z.ZodTypeAny, {
63
- country: string;
64
- addressType: "DOMESTIC";
65
- administrativeArea: string;
66
- streetLevelDetails?: Record<string, string> | undefined;
67
- }, {
68
- country: string;
69
- addressType: "DOMESTIC";
70
- administrativeArea: string;
71
- streetLevelDetails?: Record<string, string> | undefined;
72
- }>;
37
+ }, z.core.$strip>;
73
38
  export type DomesticAddressFieldValue = z.infer<typeof DomesticAddressFieldValue>;
74
- export declare const AddressFieldValue: z.ZodDiscriminatedUnion<"addressType", [z.ZodObject<z.objectUtil.extendShape<{
39
+ export declare const AddressFieldValue: z.ZodDiscriminatedUnion<[z.ZodObject<{
75
40
  country: z.ZodString;
76
41
  streetLevelDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
77
- }, {
78
42
  addressType: z.ZodLiteral<"DOMESTIC">;
79
43
  administrativeArea: z.ZodString;
80
- }>, "strip", z.ZodTypeAny, {
81
- country: string;
82
- addressType: "DOMESTIC";
83
- administrativeArea: string;
84
- streetLevelDetails?: Record<string, string> | undefined;
85
- }, {
86
- country: string;
87
- addressType: "DOMESTIC";
88
- administrativeArea: string;
89
- streetLevelDetails?: Record<string, string> | undefined;
90
- }>, z.ZodObject<z.objectUtil.extendShape<{
44
+ }, z.core.$strip>, z.ZodObject<{
91
45
  country: z.ZodString;
92
46
  streetLevelDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
93
- }, {
94
47
  addressType: z.ZodLiteral<"INTERNATIONAL">;
95
- }>, "strip", z.ZodTypeAny, {
96
- country: string;
97
- addressType: "INTERNATIONAL";
98
- streetLevelDetails?: Record<string, string> | undefined;
99
- }, {
100
- country: string;
101
- addressType: "INTERNATIONAL";
102
- streetLevelDetails?: Record<string, string> | undefined;
103
- }>]>;
48
+ }, z.core.$strip>], "addressType">;
104
49
  export type AddressFieldValue = z.infer<typeof AddressFieldValue>;
105
- export declare const AddressFieldUpdateValue: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"addressType", [z.ZodObject<z.objectUtil.extendShape<{
50
+ export declare const AddressFieldUpdateValue: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
106
51
  country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
107
52
  streetLevelDetails: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>>;
108
- }, {
109
53
  addressType: z.ZodLiteral<"DOMESTIC">;
110
54
  administrativeArea: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
- }>, "strip", z.ZodTypeAny, {
112
- addressType: "DOMESTIC";
113
- country?: string | null | undefined;
114
- streetLevelDetails?: Record<string, string | null> | null | undefined;
115
- administrativeArea?: string | null | undefined;
116
- }, {
117
- addressType: "DOMESTIC";
118
- country?: string | null | undefined;
119
- streetLevelDetails?: Record<string, string | null> | null | undefined;
120
- administrativeArea?: string | null | undefined;
121
- }>, z.ZodObject<z.objectUtil.extendShape<{
55
+ }, z.core.$strip>, z.ZodObject<{
122
56
  country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
57
  streetLevelDetails: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>>;
124
- }, {
125
58
  addressType: z.ZodLiteral<"INTERNATIONAL">;
126
- }>, "strip", z.ZodTypeAny, {
127
- addressType: "INTERNATIONAL";
128
- country?: string | null | undefined;
129
- streetLevelDetails?: Record<string, string | null> | null | undefined;
130
- }, {
131
- addressType: "INTERNATIONAL";
132
- country?: string | null | undefined;
133
- streetLevelDetails?: Record<string, string | null> | null | undefined;
134
- }>]>>>;
59
+ }, z.core.$strip>], "addressType">>>;
135
60
  export type AddressFieldUpdateValue = z.infer<typeof AddressFieldUpdateValue>;
136
61
  export declare const FileFieldValueWithOption: z.ZodObject<{
137
- path: z.ZodEffects<z.ZodString, string, string>;
62
+ path: z.ZodString;
138
63
  originalFilename: z.ZodString;
139
64
  type: z.ZodString;
140
65
  option: z.ZodString;
141
- }, "strip", z.ZodTypeAny, {
142
- type: string;
143
- option: string;
144
- path: string;
145
- originalFilename: string;
146
- }, {
147
- type: string;
148
- option: string;
149
- path: string;
150
- originalFilename: string;
151
- }>;
66
+ }, z.core.$strip>;
152
67
  export type FileFieldValueWithOption = z.infer<typeof FileFieldValueWithOption>;
153
68
  export declare const FileFieldWithOptionValue: z.ZodArray<z.ZodObject<{
154
- path: z.ZodEffects<z.ZodString, string, string>;
69
+ path: z.ZodString;
155
70
  originalFilename: z.ZodString;
156
71
  type: z.ZodString;
157
72
  option: z.ZodString;
158
- }, "strip", z.ZodTypeAny, {
159
- type: string;
160
- option: string;
161
- path: string;
162
- originalFilename: string;
163
- }, {
164
- type: string;
165
- option: string;
166
- path: string;
167
- originalFilename: string;
168
- }>, "many">;
73
+ }, z.core.$strip>>;
169
74
  export type FileFieldWithOptionValue = z.infer<typeof FileFieldWithOptionValue>;
170
75
  export declare const HttpFieldValue: z.ZodObject<{
171
76
  loading: z.ZodBoolean;
172
77
  error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
173
78
  statusCode: z.ZodNumber;
174
79
  message: z.ZodString;
175
- }, "strip", z.ZodTypeAny, {
176
- message: string;
177
- statusCode: number;
178
- }, {
179
- message: string;
180
- statusCode: number;
181
- }>>>;
80
+ }, z.core.$strip>>>;
182
81
  data: z.ZodAny;
183
- }, "strip", z.ZodTypeAny, {
184
- loading: boolean;
185
- data?: any;
186
- error?: {
187
- message: string;
188
- statusCode: number;
189
- } | null | undefined;
190
- }, {
191
- loading: boolean;
192
- data?: any;
193
- error?: {
194
- message: string;
195
- statusCode: number;
196
- } | null | undefined;
197
- }>;
82
+ }, z.core.$strip>;
198
83
  export type HttpFieldValue = z.infer<typeof HttpFieldValue>;
199
84
  export declare const HttpFieldUpdateValue: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
200
85
  loading: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
201
86
  error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
202
87
  statusCode: z.ZodNumber;
203
88
  message: z.ZodString;
204
- }, "strip", z.ZodTypeAny, {
205
- message: string;
206
- statusCode: number;
207
- }, {
208
- message: string;
209
- statusCode: number;
210
- }>>>;
89
+ }, z.core.$strip>>>;
211
90
  data: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
212
- }, "strip", z.ZodTypeAny, {
213
- data?: any;
214
- error?: {
215
- message: string;
216
- statusCode: number;
217
- } | null | undefined;
218
- loading?: boolean | null | undefined;
219
- }, {
220
- data?: any;
221
- error?: {
222
- message: string;
223
- statusCode: number;
224
- } | null | undefined;
225
- loading?: boolean | null | undefined;
226
- }>, z.ZodNull]>, z.ZodUndefined]>;
91
+ }, z.core.$strip>, z.ZodNull]>, z.ZodUndefined]>;
227
92
  export declare const QueryParamReaderFieldValue: z.ZodOptional<z.ZodNullable<z.ZodObject<{
228
93
  data: z.ZodRecord<z.ZodString, z.ZodString>;
229
- }, "strip", z.ZodTypeAny, {
230
- data: Record<string, string>;
231
- }, {
232
- data: Record<string, string>;
233
- }>>>;
94
+ }, z.core.$strip>>>;
234
95
  export type QueryParamReaderFieldValue = z.infer<typeof QueryParamReaderFieldValue>;
235
96
  export declare const QueryParamReaderFieldUpdateValue: z.ZodObject<{
236
97
  data: z.ZodRecord<z.ZodString, z.ZodString>;
237
- }, "strip", z.ZodTypeAny, {
238
- data: Record<string, string>;
239
- }, {
240
- data: Record<string, string>;
241
- }>;
98
+ }, z.core.$strip>;
242
99
  export declare const QrReaderFieldValue: z.ZodObject<{
243
100
  data: z.ZodAny;
244
- }, "strip", z.ZodTypeAny, {
245
- data?: any;
246
- }, {
247
- data?: any;
248
- }>;
101
+ }, z.core.$strip>;
249
102
  export type QrReaderFieldValue = z.infer<typeof QrReaderFieldValue>;
250
103
  export declare const IdReaderFieldValue: z.ZodObject<{
251
104
  data: z.ZodAny;
252
- }, "strip", z.ZodTypeAny, {
253
- data?: any;
254
- }, {
255
- data?: any;
256
- }>;
105
+ }, z.core.$strip>;
257
106
  export type IdReaderFieldValue = z.infer<typeof IdReaderFieldValue>;
107
+ export declare const CustomFieldValue: z.core.$ZodBranded<z.ZodUnknown, "CustomFieldValue">;
108
+ export type CustomFieldValue = z.infer<typeof CustomFieldValue>;
258
109
  //# sourceMappingURL=CompositeFieldValue.d.ts.map
@@ -1,6 +1,5 @@
1
- import { JSONSchema } from '../conditionals/conditionals';
2
- import { z } from 'zod';
3
- export declare const Conditional: z.ZodType<JSONSchema, z.ZodTypeDef, JSONSchema>;
1
+ import * as z from 'zod/v4';
2
+ export declare const Conditional: z.ZodAny;
4
3
  /**
5
4
  * By default, when conditionals are undefined, action is visible and enabled to everyone.
6
5
  */
@@ -12,44 +11,33 @@ export declare const ConditionalType: {
12
11
  export type ConditionalType = (typeof ConditionalType)[keyof typeof ConditionalType];
13
12
  export declare const ShowConditional: z.ZodObject<{
14
13
  type: z.ZodLiteral<"SHOW">;
15
- conditional: z.ZodType<JSONSchema, z.ZodTypeDef, JSONSchema>;
16
- }, "strip", z.ZodTypeAny, {
17
- type: "SHOW";
18
- conditional: JSONSchema;
19
- }, {
20
- type: "SHOW";
21
- conditional: JSONSchema;
22
- }>;
14
+ conditional: z.ZodAny;
15
+ }, z.core.$strip>;
23
16
  export declare const EnableConditional: z.ZodObject<{
24
17
  type: z.ZodLiteral<"ENABLE">;
25
- conditional: z.ZodType<JSONSchema, z.ZodTypeDef, JSONSchema>;
26
- }, "strip", z.ZodTypeAny, {
27
- type: "ENABLE";
28
- conditional: JSONSchema;
29
- }, {
30
- type: "ENABLE";
31
- conditional: JSONSchema;
32
- }>;
33
- /** @knipignore */
34
- export type ActionConditionalType = typeof ShowConditional | typeof EnableConditional;
35
- /** @knipignore */
36
- export type InferredActionConditional = z.infer<typeof ShowConditional> | z.infer<typeof EnableConditional>;
37
- export declare const ActionConditional: z.ZodDiscriminatedUnion<"type", ActionConditionalType[]>;
38
- export type ActionConditional = InferredActionConditional;
18
+ conditional: z.ZodAny;
19
+ }, z.core.$strip>;
20
+ export declare const ActionConditional: z.ZodDiscriminatedUnion<[z.ZodObject<{
21
+ type: z.ZodLiteral<"SHOW">;
22
+ conditional: z.ZodAny;
23
+ }, z.core.$strip>, z.ZodObject<{
24
+ type: z.ZodLiteral<"ENABLE">;
25
+ conditional: z.ZodAny;
26
+ }, z.core.$strip>], "type">;
27
+ export type ActionConditional = z.infer<typeof ActionConditional>;
39
28
  export declare const DisplayOnReviewConditional: z.ZodObject<{
40
29
  type: z.ZodLiteral<"DISPLAY_ON_REVIEW">;
41
- conditional: z.ZodType<JSONSchema, z.ZodTypeDef, JSONSchema>;
42
- }, "strip", z.ZodTypeAny, {
43
- type: "DISPLAY_ON_REVIEW";
44
- conditional: JSONSchema;
45
- }, {
46
- type: "DISPLAY_ON_REVIEW";
47
- conditional: JSONSchema;
48
- }>;
49
- /** @knipignore */
50
- export type FieldConditionalType = typeof ShowConditional | typeof EnableConditional | typeof DisplayOnReviewConditional;
51
- /** @knipignore */
52
- export type InferredFieldConditional = z.infer<typeof ShowConditional> | z.infer<typeof EnableConditional> | z.infer<typeof DisplayOnReviewConditional>;
53
- export declare const FieldConditional: z.ZodDiscriminatedUnion<"type", FieldConditionalType[]>;
30
+ conditional: z.ZodAny;
31
+ }, z.core.$strip>;
32
+ export declare const FieldConditional: z.ZodDiscriminatedUnion<[z.ZodObject<{
33
+ type: z.ZodLiteral<"SHOW">;
34
+ conditional: z.ZodAny;
35
+ }, z.core.$strip>, z.ZodObject<{
36
+ type: z.ZodLiteral<"ENABLE">;
37
+ conditional: z.ZodAny;
38
+ }, z.core.$strip>, z.ZodObject<{
39
+ type: z.ZodLiteral<"DISPLAY_ON_REVIEW">;
40
+ conditional: z.ZodAny;
41
+ }, z.core.$strip>], "type">;
54
42
  export type FieldConditional = z.infer<typeof FieldConditional>;
55
43
  //# sourceMappingURL=Conditional.d.ts.map
@@ -1,3 +1,3 @@
1
1
  export declare const TENNIS_CLUB_MEMBERSHIP = "tennis-club-membership";
2
- export declare const BIRTH_EVENT = "birth";
2
+ export declare const CHILD_ONBOARDING_EVENT = "child-onboarding";
3
3
  //# sourceMappingURL=Constants.d.ts.map