@ecrvs/opencrvs-toolkit 1.8.1-rc.a7ee8fb

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 (76) hide show
  1. package/README.md +70 -0
  2. package/build.sh +56 -0
  3. package/dist/api/index.d.ts +11 -0
  4. package/dist/api/index.d.ts.map +1 -0
  5. package/dist/api/index.js +52 -0
  6. package/dist/commons/api/router.d.ts +14568 -0
  7. package/dist/commons/conditionals/conditionals.d.ts +194 -0
  8. package/dist/commons/conditionals/index.d.ts +2 -0
  9. package/dist/commons/conditionals/validate.d.ts +129 -0
  10. package/dist/commons/events/ActionConfig.d.ts +2034 -0
  11. package/dist/commons/events/ActionDocument.d.ts +14400 -0
  12. package/dist/commons/events/ActionInput.d.ts +11157 -0
  13. package/dist/commons/events/ActionType.d.ts +52 -0
  14. package/dist/commons/events/AdvancedSearchConfig.d.ts +1175 -0
  15. package/dist/commons/events/CompositeFieldValue.d.ts +181 -0
  16. package/dist/commons/events/Conditional.d.ts +55 -0
  17. package/dist/commons/events/Constants.d.ts +3 -0
  18. package/dist/commons/events/CountryConfigQueryInput.d.ts +4494 -0
  19. package/dist/commons/events/CreatedAtLocation.d.ts +2 -0
  20. package/dist/commons/events/DeduplicationConfig.d.ts +209 -0
  21. package/dist/commons/events/Draft.d.ts +814 -0
  22. package/dist/commons/events/EventConfig.d.ts +2237 -0
  23. package/dist/commons/events/EventConfigInput.d.ts +10 -0
  24. package/dist/commons/events/EventDocument.d.ts +8505 -0
  25. package/dist/commons/events/EventIndex.d.ts +3858 -0
  26. package/dist/commons/events/EventInput.d.ts +13 -0
  27. package/dist/commons/events/EventMetadata.d.ts +408 -0
  28. package/dist/commons/events/FieldConfig.d.ts +7125 -0
  29. package/dist/commons/events/FieldType.d.ts +46 -0
  30. package/dist/commons/events/FieldTypeMapping.d.ts +537 -0
  31. package/dist/commons/events/FieldValue.d.ts +250 -0
  32. package/dist/commons/events/FileUtils.d.ts +4 -0
  33. package/dist/commons/events/FormConfig.d.ts +725 -0
  34. package/dist/commons/events/PageConfig.d.ts +336 -0
  35. package/dist/commons/events/SummaryConfig.d.ts +170 -0
  36. package/dist/commons/events/TemplateConfig.d.ts +38 -0
  37. package/dist/commons/events/TranslationConfig.d.ts +15 -0
  38. package/dist/commons/events/User.d.ts +45 -0
  39. package/dist/commons/events/WorkqueueColumnConfig.d.ts +53 -0
  40. package/dist/commons/events/WorkqueueConfig.d.ts +8997 -0
  41. package/dist/commons/events/deduplication.d.ts +32 -0
  42. package/dist/commons/events/defineConfig.d.ts +309 -0
  43. package/dist/commons/events/event.d.ts +109 -0
  44. package/dist/commons/events/field.d.ts +151 -0
  45. package/dist/commons/events/index.d.ts +46 -0
  46. package/dist/commons/events/locations.d.ts +24 -0
  47. package/dist/commons/events/scopes.d.ts +55 -0
  48. package/dist/commons/events/serializer.d.ts +2 -0
  49. package/dist/commons/events/state/availableActions.d.ts +6 -0
  50. package/dist/commons/events/state/flags.d.ts +4 -0
  51. package/dist/commons/events/state/index.d.ts +146 -0
  52. package/dist/commons/events/state/utils.d.ts +1263 -0
  53. package/dist/commons/events/test.utils.d.ts +473 -0
  54. package/dist/commons/events/transactions.d.ts +2 -0
  55. package/dist/commons/events/utils.d.ts +501 -0
  56. package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
  57. package/dist/commons/notification/UserNotifications.d.ts +632 -0
  58. package/dist/commons/notification/index.d.ts +2 -0
  59. package/dist/conditionals/index.d.ts +2 -0
  60. package/dist/conditionals/index.d.ts.map +1 -0
  61. package/dist/conditionals/index.js +491 -0
  62. package/dist/events/deduplication.d.ts +32 -0
  63. package/dist/events/deduplication.d.ts.map +1 -0
  64. package/dist/events/deduplication.js +67 -0
  65. package/dist/events/index.d.ts +2 -0
  66. package/dist/events/index.d.ts.map +1 -0
  67. package/dist/events/index.js +8383 -0
  68. package/dist/notification/index.d.ts +2 -0
  69. package/dist/notification/index.d.ts.map +1 -0
  70. package/dist/notification/index.js +5928 -0
  71. package/dist/scopes/index.d.ts +335 -0
  72. package/dist/scopes/index.d.ts.map +1 -0
  73. package/dist/scopes/index.js +379 -0
  74. package/package.json +40 -0
  75. package/tsconfig.json +27 -0
  76. package/tsconfig.tsbuildinfo +1 -0
@@ -0,0 +1,32 @@
1
+ import { ClauseInput, DateRangeMatcherOptions, FuzzyMatcherOptions, StrictMatcherOptions } from '.';
2
+ export declare function not(clause: ClauseInput): ClauseInput;
3
+ export declare function and(...clauses: ClauseInput[]): ClauseInput;
4
+ export declare function or(...clauses: ClauseInput[]): ClauseInput;
5
+ export declare function field(fieldId: string): {
6
+ fuzzyMatches: (options?: FuzzyMatcherOptions) => {
7
+ fieldId: string;
8
+ type: "fuzzy";
9
+ options: {
10
+ boost?: number | undefined;
11
+ fuzziness?: string | number | undefined;
12
+ } | undefined;
13
+ };
14
+ strictMatches: (options?: StrictMatcherOptions) => {
15
+ fieldId: string;
16
+ type: "strict";
17
+ options: {
18
+ value?: string | undefined;
19
+ boost?: number | undefined;
20
+ } | undefined;
21
+ };
22
+ dateRangeMatches: (options: DateRangeMatcherOptions) => {
23
+ fieldId: string;
24
+ type: "dateRange";
25
+ options: {
26
+ days: number;
27
+ boost?: number | undefined;
28
+ pivot?: number | undefined;
29
+ };
30
+ };
31
+ };
32
+ //# sourceMappingURL=deduplication.d.ts.map
@@ -0,0 +1,309 @@
1
+ import { EventConfigInput } from './EventConfigInput';
2
+ /**
3
+ * Builds a validated configuration for an event
4
+ * @param config - Event specific configuration
5
+ */
6
+ export declare const defineConfig: (config: EventConfigInput) => {
7
+ id: string;
8
+ title: import("./TranslationConfig").TranslationConfig;
9
+ declaration: {
10
+ label: import("./TranslationConfig").TranslationConfig;
11
+ pages: {
12
+ type: "FORM";
13
+ id: string;
14
+ title: import("./TranslationConfig").TranslationConfig;
15
+ fields: import("./FieldConfig").FieldConfig[];
16
+ conditional?: import(".").JSONSchema | undefined;
17
+ }[];
18
+ };
19
+ actions: ({
20
+ type: "READ";
21
+ label: import("./TranslationConfig").TranslationConfig;
22
+ conditionals: ({
23
+ type: "SHOW";
24
+ conditional: import(".").JSONSchema;
25
+ } | {
26
+ type: "ENABLE";
27
+ conditional: import(".").JSONSchema;
28
+ })[];
29
+ review: {
30
+ title: import("./TranslationConfig").TranslationConfig;
31
+ fields: import("./FieldConfig").FieldConfig[];
32
+ };
33
+ draft?: boolean | undefined;
34
+ } | {
35
+ type: "DECLARE";
36
+ label: import("./TranslationConfig").TranslationConfig;
37
+ conditionals: ({
38
+ type: "SHOW";
39
+ conditional: import(".").JSONSchema;
40
+ } | {
41
+ type: "ENABLE";
42
+ conditional: import(".").JSONSchema;
43
+ })[];
44
+ review: {
45
+ title: import("./TranslationConfig").TranslationConfig;
46
+ fields: import("./FieldConfig").FieldConfig[];
47
+ };
48
+ draft?: boolean | undefined;
49
+ deduplication?: {
50
+ id: string;
51
+ label: import("./TranslationConfig").TranslationConfig;
52
+ query: import("./DeduplicationConfig").ClauseOutput;
53
+ } | undefined;
54
+ } | {
55
+ type: "VALIDATE";
56
+ label: import("./TranslationConfig").TranslationConfig;
57
+ conditionals: ({
58
+ type: "SHOW";
59
+ conditional: import(".").JSONSchema;
60
+ } | {
61
+ type: "ENABLE";
62
+ conditional: import(".").JSONSchema;
63
+ })[];
64
+ review: {
65
+ title: import("./TranslationConfig").TranslationConfig;
66
+ fields: import("./FieldConfig").FieldConfig[];
67
+ };
68
+ draft?: boolean | undefined;
69
+ deduplication?: {
70
+ id: string;
71
+ label: import("./TranslationConfig").TranslationConfig;
72
+ query: import("./DeduplicationConfig").ClauseOutput;
73
+ } | undefined;
74
+ } | {
75
+ type: "REGISTER";
76
+ label: import("./TranslationConfig").TranslationConfig;
77
+ conditionals: ({
78
+ type: "SHOW";
79
+ conditional: import(".").JSONSchema;
80
+ } | {
81
+ type: "ENABLE";
82
+ conditional: import(".").JSONSchema;
83
+ })[];
84
+ review: {
85
+ title: import("./TranslationConfig").TranslationConfig;
86
+ fields: import("./FieldConfig").FieldConfig[];
87
+ };
88
+ draft?: boolean | undefined;
89
+ deduplication?: {
90
+ id: string;
91
+ label: import("./TranslationConfig").TranslationConfig;
92
+ query: import("./DeduplicationConfig").ClauseOutput;
93
+ } | undefined;
94
+ } | {
95
+ type: "REJECT";
96
+ label: import("./TranslationConfig").TranslationConfig;
97
+ conditionals: ({
98
+ type: "SHOW";
99
+ conditional: import(".").JSONSchema;
100
+ } | {
101
+ type: "ENABLE";
102
+ conditional: import(".").JSONSchema;
103
+ })[];
104
+ draft?: boolean | undefined;
105
+ } | {
106
+ type: "ARCHIVE";
107
+ label: import("./TranslationConfig").TranslationConfig;
108
+ conditionals: ({
109
+ type: "SHOW";
110
+ conditional: import(".").JSONSchema;
111
+ } | {
112
+ type: "ENABLE";
113
+ conditional: import(".").JSONSchema;
114
+ })[];
115
+ draft?: boolean | undefined;
116
+ } | {
117
+ type: "DELETE";
118
+ label: import("./TranslationConfig").TranslationConfig;
119
+ conditionals: ({
120
+ type: "SHOW";
121
+ conditional: import(".").JSONSchema;
122
+ } | {
123
+ type: "ENABLE";
124
+ conditional: import(".").JSONSchema;
125
+ })[];
126
+ draft?: boolean | undefined;
127
+ } | {
128
+ type: "PRINT_CERTIFICATE";
129
+ label: import("./TranslationConfig").TranslationConfig;
130
+ conditionals: ({
131
+ type: "SHOW";
132
+ conditional: import(".").JSONSchema;
133
+ } | {
134
+ type: "ENABLE";
135
+ conditional: import(".").JSONSchema;
136
+ })[];
137
+ printForm: {
138
+ label: import("./TranslationConfig").TranslationConfig;
139
+ pages: ({
140
+ type: "FORM";
141
+ id: string;
142
+ title: import("./TranslationConfig").TranslationConfig;
143
+ fields: import("./FieldConfig").FieldConfig[];
144
+ conditional?: import(".").JSONSchema | undefined;
145
+ } | {
146
+ type: "VERIFICATION";
147
+ id: string;
148
+ title: import("./TranslationConfig").TranslationConfig;
149
+ actions: {
150
+ verify: {
151
+ label: import("./TranslationConfig").TranslationConfig;
152
+ };
153
+ cancel: {
154
+ label: import("./TranslationConfig").TranslationConfig;
155
+ confirmation: {
156
+ title: import("./TranslationConfig").TranslationConfig;
157
+ body: import("./TranslationConfig").TranslationConfig;
158
+ };
159
+ };
160
+ };
161
+ fields: import("./FieldConfig").FieldConfig[];
162
+ conditional?: import(".").JSONSchema | undefined;
163
+ })[];
164
+ };
165
+ draft?: boolean | undefined;
166
+ } | {
167
+ type: "REQUEST_CORRECTION";
168
+ label: import("./TranslationConfig").TranslationConfig;
169
+ conditionals: ({
170
+ type: "SHOW";
171
+ conditional: import(".").JSONSchema;
172
+ } | {
173
+ type: "ENABLE";
174
+ conditional: import(".").JSONSchema;
175
+ })[];
176
+ correctionForm: {
177
+ label: import("./TranslationConfig").TranslationConfig;
178
+ pages: ({
179
+ type: "FORM";
180
+ id: string;
181
+ title: import("./TranslationConfig").TranslationConfig;
182
+ fields: import("./FieldConfig").FieldConfig[];
183
+ conditional?: import(".").JSONSchema | undefined;
184
+ } | {
185
+ type: "VERIFICATION";
186
+ id: string;
187
+ title: import("./TranslationConfig").TranslationConfig;
188
+ actions: {
189
+ verify: {
190
+ label: import("./TranslationConfig").TranslationConfig;
191
+ };
192
+ cancel: {
193
+ label: import("./TranslationConfig").TranslationConfig;
194
+ confirmation: {
195
+ title: import("./TranslationConfig").TranslationConfig;
196
+ body: import("./TranslationConfig").TranslationConfig;
197
+ };
198
+ };
199
+ };
200
+ fields: import("./FieldConfig").FieldConfig[];
201
+ conditional?: import(".").JSONSchema | undefined;
202
+ })[];
203
+ };
204
+ draft?: boolean | undefined;
205
+ } | {
206
+ type: "REJECT_CORRECTION";
207
+ label: import("./TranslationConfig").TranslationConfig;
208
+ conditionals: ({
209
+ type: "SHOW";
210
+ conditional: import(".").JSONSchema;
211
+ } | {
212
+ type: "ENABLE";
213
+ conditional: import(".").JSONSchema;
214
+ })[];
215
+ draft?: boolean | undefined;
216
+ } | {
217
+ type: "APPROVE_CORRECTION";
218
+ label: import("./TranslationConfig").TranslationConfig;
219
+ conditionals: ({
220
+ type: "SHOW";
221
+ conditional: import(".").JSONSchema;
222
+ } | {
223
+ type: "ENABLE";
224
+ conditional: import(".").JSONSchema;
225
+ })[];
226
+ draft?: boolean | undefined;
227
+ })[];
228
+ label: import("./TranslationConfig").TranslationConfig;
229
+ summary: {
230
+ fields: ({
231
+ fieldId: string;
232
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
233
+ conditionals?: {
234
+ type: "SHOW";
235
+ conditional: import(".").JSONSchema;
236
+ }[] | undefined;
237
+ emptyValueMessage?: import("./TranslationConfig").TranslationConfig | undefined;
238
+ } | {
239
+ id: string;
240
+ value: import("./TranslationConfig").TranslationConfig;
241
+ label: import("./TranslationConfig").TranslationConfig;
242
+ conditionals?: {
243
+ type: "SHOW";
244
+ conditional: import(".").JSONSchema;
245
+ }[] | undefined;
246
+ emptyValueMessage?: import("./TranslationConfig").TranslationConfig | undefined;
247
+ })[];
248
+ };
249
+ advancedSearch: {
250
+ title: import("./TranslationConfig").TranslationConfig;
251
+ fields: ({
252
+ config: {
253
+ type: "exact" | "fuzzy" | "range" | "within";
254
+ };
255
+ fieldId: string;
256
+ fieldType: "field";
257
+ options?: {
258
+ value: string;
259
+ label: string | import("./TranslationConfig").TranslationConfig;
260
+ }[] | undefined;
261
+ conditionals?: ({
262
+ type: "SHOW";
263
+ conditional: import(".").JSONSchema;
264
+ } | {
265
+ type: "ENABLE";
266
+ conditional: import(".").JSONSchema;
267
+ } | {
268
+ type: "DISPLAY_ON_REVIEW";
269
+ conditional: import(".").JSONSchema;
270
+ })[] | undefined;
271
+ searchCriteriaLabelPrefix?: import("./TranslationConfig").TranslationConfig | undefined;
272
+ validations?: {
273
+ message: import("./TranslationConfig").TranslationConfig;
274
+ validator: import(".").JSONSchema;
275
+ }[] | undefined;
276
+ } | {
277
+ config: {
278
+ type: "exact" | "fuzzy" | "range" | "within";
279
+ };
280
+ fieldId: "event.trackingId" | "event.status" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation" | "event.updatedAt";
281
+ fieldType: "event";
282
+ options?: {
283
+ value: string;
284
+ label: string | import("./TranslationConfig").TranslationConfig;
285
+ }[] | undefined;
286
+ conditionals?: ({
287
+ type: "SHOW";
288
+ conditional: import(".").JSONSchema;
289
+ } | {
290
+ type: "ENABLE";
291
+ conditional: import(".").JSONSchema;
292
+ } | {
293
+ type: "DISPLAY_ON_REVIEW";
294
+ conditional: import(".").JSONSchema;
295
+ })[] | undefined;
296
+ searchCriteriaLabelPrefix?: import("./TranslationConfig").TranslationConfig | undefined;
297
+ validations?: {
298
+ message: import("./TranslationConfig").TranslationConfig;
299
+ validator: import(".").JSONSchema;
300
+ }[] | undefined;
301
+ })[];
302
+ }[];
303
+ dateOfEvent?: {
304
+ $$field: string;
305
+ $$subfield?: string[] | undefined;
306
+ } | undefined;
307
+ fallbackTitle?: import("./TranslationConfig").TranslationConfig | undefined;
308
+ };
309
+ //# sourceMappingURL=defineConfig.d.ts.map
@@ -0,0 +1,109 @@
1
+ import { ActionType } from './ActionType';
2
+ import { EventFieldIdInput } from './AdvancedSearchConfig';
3
+ import { WorkqueueColumnKeys, WorkqueueColumnValue } from './WorkqueueColumnConfig';
4
+ /**
5
+ * Creates a function that acts like a callable + static method container.
6
+ *
7
+ * @example
8
+ * event('status') // → returns search config
9
+ * event.hasAction('CLICKED') // → returns conditional
10
+ */
11
+ declare function eventFn(fieldId: EventFieldIdInput): {
12
+ range: () => {
13
+ fieldId: "event.trackingId" | "event.status" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation" | "event.updatedAt";
14
+ fieldType: "event";
15
+ } & {
16
+ config: {
17
+ type: "range";
18
+ };
19
+ };
20
+ exact: () => {
21
+ fieldId: "event.trackingId" | "event.status" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation" | "event.updatedAt";
22
+ fieldType: "event";
23
+ } & {
24
+ config: {
25
+ type: "exact";
26
+ };
27
+ };
28
+ fuzzy: () => {
29
+ fieldId: "event.trackingId" | "event.status" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation" | "event.updatedAt";
30
+ fieldType: "event";
31
+ } & {
32
+ config: {
33
+ type: "fuzzy";
34
+ };
35
+ };
36
+ within: () => {
37
+ fieldId: "event.trackingId" | "event.status" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation" | "event.updatedAt";
38
+ fieldType: "event";
39
+ } & {
40
+ config: {
41
+ type: "within";
42
+ };
43
+ };
44
+ };
45
+ declare const event: typeof eventFn & {
46
+ /**
47
+ * Checks if the event contains a specific action type.
48
+ * Can be used directly as a conditional or chained with additional methods.
49
+ * @param action - The action type to check for.
50
+ */
51
+ hasAction: (action: ActionType) => {
52
+ /**
53
+ * Creates a conditional that checks if the event contains a specific action type
54
+ * with a minimum count of occurrences.
55
+ *
56
+ * @param minCount - The minimum number of actions required.
57
+ */
58
+ minCount: (minCount: number) => import("../conditionals/conditionals").JSONSchema;
59
+ /**
60
+ * Builds a conditional that sets a maximum count for the number of actions.
61
+ * This is useful for limiting the number of actions of a specific type in a single event.
62
+ */
63
+ maxCount: (maxCount: number) => import("../conditionals/conditionals").JSONSchema;
64
+ /**
65
+ * Adds additional field constraints to the action matching.
66
+ *
67
+ * @param fields - Object containing additional fields to match on the action.
68
+ */
69
+ withFields: (fields: Record<string, unknown>) => {
70
+ /**
71
+ * Creates a conditional that checks if the event contains a specific action type
72
+ * with a minimum count of occurrences.
73
+ *
74
+ * @param minCount - The minimum number of actions required.
75
+ */
76
+ minCount: (minCount: number) => import("../conditionals/conditionals").JSONSchema;
77
+ /**
78
+ * Builds a conditional that sets a maximum count for the number of actions.
79
+ * This is useful for limiting the number of actions of a specific type in a single event.
80
+ */
81
+ maxCount: (maxCount: number) => import("../conditionals/conditionals").JSONSchema;
82
+ };
83
+ /**
84
+ * Adds template ID constraint to the action matching.
85
+ * This is a convenience method that adds content.templateId to the fields.
86
+ *
87
+ * @param id - The template ID to match against.
88
+ */
89
+ withTemplate: (id: string) => {
90
+ /**
91
+ * Creates a conditional that checks if the event contains a specific action type
92
+ * with a minimum count of occurrences.
93
+ *
94
+ * @param minCount - The minimum number of actions required.
95
+ */
96
+ minCount: (minCount: number) => import("../conditionals/conditionals").JSONSchema;
97
+ /**
98
+ * Builds a conditional that sets a maximum count for the number of actions.
99
+ * This is useful for limiting the number of actions of a specific type in a single event.
100
+ */
101
+ maxCount: (maxCount: number) => import("../conditionals/conditionals").JSONSchema;
102
+ };
103
+ $id: string;
104
+ __nominal__type: "JSONSchema";
105
+ };
106
+ field(field: WorkqueueColumnKeys): WorkqueueColumnValue;
107
+ };
108
+ export { event };
109
+ //# sourceMappingURL=event.d.ts.map
@@ -0,0 +1,151 @@
1
+ import { FieldConditional } from './Conditional';
2
+ import { TranslationConfig } from './TranslationConfig';
3
+ import { SelectOption, ValidationConfig } from './FieldConfig';
4
+ /**
5
+ * Entry point for defining conditional logic or configuration for a form field.
6
+ * @param fieldId - The ID of the field to define rules or config for.
7
+ * @returns An object combining conditional methods and configuration builders.
8
+ */
9
+ export declare function field(fieldId: string, options?: {
10
+ options?: SelectOption[];
11
+ conditionals?: FieldConditional[];
12
+ validations?: ValidationConfig[];
13
+ searchCriteriaLabelPrefix?: TranslationConfig;
14
+ }): {
15
+ range: () => {
16
+ options?: SelectOption[];
17
+ conditionals?: FieldConditional[];
18
+ validations?: ValidationConfig[];
19
+ searchCriteriaLabelPrefix?: TranslationConfig;
20
+ fieldId: string;
21
+ fieldType: "field";
22
+ } & {
23
+ config: {
24
+ type: "range";
25
+ };
26
+ };
27
+ exact: () => {
28
+ options?: SelectOption[];
29
+ conditionals?: FieldConditional[];
30
+ validations?: ValidationConfig[];
31
+ searchCriteriaLabelPrefix?: TranslationConfig;
32
+ fieldId: string;
33
+ fieldType: "field";
34
+ } & {
35
+ config: {
36
+ type: "exact";
37
+ };
38
+ };
39
+ fuzzy: () => {
40
+ options?: SelectOption[];
41
+ conditionals?: FieldConditional[];
42
+ validations?: ValidationConfig[];
43
+ searchCriteriaLabelPrefix?: TranslationConfig;
44
+ fieldId: string;
45
+ fieldType: "field";
46
+ } & {
47
+ config: {
48
+ type: "fuzzy";
49
+ };
50
+ };
51
+ within: () => {
52
+ options?: SelectOption[];
53
+ conditionals?: FieldConditional[];
54
+ validations?: ValidationConfig[];
55
+ searchCriteriaLabelPrefix?: TranslationConfig;
56
+ fieldId: string;
57
+ fieldType: "field";
58
+ } & {
59
+ config: {
60
+ type: "within";
61
+ };
62
+ };
63
+ $$field: string;
64
+ $$subfield: string[];
65
+ get(fieldPath: string): {
66
+ $$subfield: string[];
67
+ $$field: string;
68
+ get(fieldPath: string): any;
69
+ isAfter: () => {
70
+ days: (days: number) => {
71
+ inPast: () => import("../conditionals/conditionals").JSONSchema;
72
+ inFuture: () => import("../conditionals/conditionals").JSONSchema;
73
+ };
74
+ date: (date: string | {
75
+ $$field: string;
76
+ }) => import("../conditionals/conditionals").JSONSchema;
77
+ now: () => import("../conditionals/conditionals").JSONSchema;
78
+ };
79
+ isBefore: () => {
80
+ days: (days: number) => {
81
+ inPast: () => import("../conditionals/conditionals").JSONSchema;
82
+ inFuture: () => import("../conditionals/conditionals").JSONSchema;
83
+ };
84
+ date: (date: `${string}-${string}-${string}` | {
85
+ $$field: string;
86
+ }) => import("../conditionals/conditionals").JSONSchema;
87
+ now: () => import("../conditionals/conditionals").JSONSchema;
88
+ };
89
+ isGreaterThan: (value: number | {
90
+ $$field: string;
91
+ }) => import("../conditionals/conditionals").JSONSchema;
92
+ isLessThan: (value: number | {
93
+ $$field: string;
94
+ }) => import("../conditionals/conditionals").JSONSchema;
95
+ isEqualTo(value: string | boolean | {
96
+ $$field: string;
97
+ }): import("../conditionals/conditionals").JSONSchema;
98
+ isFalsy(): import("../conditionals/conditionals").JSONSchema;
99
+ isUndefined(): import("../conditionals/conditionals").JSONSchema;
100
+ inArray: (values: string[]) => import("../conditionals/conditionals").JSONSchema;
101
+ isValidEnglishName: () => import("../conditionals/conditionals").JSONSchema;
102
+ isValidAdministrativeLeafLevel: () => import("../conditionals/conditionals").JSONSchema;
103
+ matches: (pattern: string) => import("../conditionals/conditionals").JSONSchema;
104
+ isBetween: (min: number, max: number) => import("../conditionals/conditionals").JSONSchema;
105
+ getId: () => {
106
+ fieldId: string;
107
+ };
108
+ object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
109
+ };
110
+ isAfter: () => {
111
+ days: (days: number) => {
112
+ inPast: () => import("../conditionals/conditionals").JSONSchema;
113
+ inFuture: () => import("../conditionals/conditionals").JSONSchema;
114
+ };
115
+ date: (date: string | {
116
+ $$field: string;
117
+ }) => import("../conditionals/conditionals").JSONSchema;
118
+ now: () => import("../conditionals/conditionals").JSONSchema;
119
+ };
120
+ isBefore: () => {
121
+ days: (days: number) => {
122
+ inPast: () => import("../conditionals/conditionals").JSONSchema;
123
+ inFuture: () => import("../conditionals/conditionals").JSONSchema;
124
+ };
125
+ date: (date: `${string}-${string}-${string}` | {
126
+ $$field: string;
127
+ }) => import("../conditionals/conditionals").JSONSchema;
128
+ now: () => import("../conditionals/conditionals").JSONSchema;
129
+ };
130
+ isGreaterThan: (value: number | {
131
+ $$field: string;
132
+ }) => import("../conditionals/conditionals").JSONSchema;
133
+ isLessThan: (value: number | {
134
+ $$field: string;
135
+ }) => import("../conditionals/conditionals").JSONSchema;
136
+ isEqualTo(value: string | boolean | {
137
+ $$field: string;
138
+ }): import("../conditionals/conditionals").JSONSchema;
139
+ isFalsy(): import("../conditionals/conditionals").JSONSchema;
140
+ isUndefined(): import("../conditionals/conditionals").JSONSchema;
141
+ inArray: (values: string[]) => import("../conditionals/conditionals").JSONSchema;
142
+ isValidEnglishName: () => import("../conditionals/conditionals").JSONSchema;
143
+ isValidAdministrativeLeafLevel: () => import("../conditionals/conditionals").JSONSchema;
144
+ matches: (pattern: string) => import("../conditionals/conditionals").JSONSchema;
145
+ isBetween: (min: number, max: number) => import("../conditionals/conditionals").JSONSchema;
146
+ getId: () => {
147
+ fieldId: string;
148
+ };
149
+ object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
150
+ };
151
+ //# sourceMappingURL=field.d.ts.map
@@ -0,0 +1,46 @@
1
+ export * from './Constants';
2
+ export * from './ActionConfig';
3
+ export * from './offline';
4
+ export * from './EventConfig';
5
+ export * from './EventConfigInput';
6
+ export * from './FieldConfig';
7
+ export * from './PageConfig';
8
+ export * from './SummaryConfig';
9
+ export * from './WorkqueueConfig';
10
+ export * from './WorkqueueColumnConfig';
11
+ export * from './workqueueDefaultColumns';
12
+ export * from './Draft';
13
+ export * from './EventMetadata';
14
+ export * from './EventInput';
15
+ export * from './EventDocument';
16
+ export * from './ActionInput';
17
+ export * from './ActionDocument';
18
+ export * from './EventIndex';
19
+ export * from './TranslationConfig';
20
+ export * from './FieldValue';
21
+ export * from './FormConfig';
22
+ export * from './CompositeFieldValue';
23
+ export * from './state';
24
+ export * from './utils';
25
+ export * from './defineConfig';
26
+ export * from './DeduplicationConfig';
27
+ export * from './transactions';
28
+ export * from './User';
29
+ export * from './FieldType';
30
+ export * from './ActionType';
31
+ export * from './FieldTypeMapping';
32
+ export * from './Conditional';
33
+ export * from './AdvancedSearchConfig';
34
+ export * from './test.utils';
35
+ export * from './TemplateConfig';
36
+ export * from './scopes';
37
+ export * from './serializer';
38
+ export * from './state/availableActions';
39
+ export * from './FileUtils';
40
+ export * from '../conditionals/conditionals';
41
+ export * from '../conditionals/validate';
42
+ export * from './field';
43
+ export * from './event';
44
+ export * from './locations';
45
+ export { UUID } from '../uuid';
46
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,24 @@
1
+ import { z } from 'zod';
2
+ export declare const LocationType: z.ZodEnum<["ADMIN_STRUCTURE", "CRVS_OFFICE", "HEALTH_FACILITY"]>;
3
+ export type LocationType = z.infer<typeof LocationType>;
4
+ export declare const Location: z.ZodObject<{
5
+ id: z.ZodBranded<z.ZodString, "UUID">;
6
+ name: z.ZodString;
7
+ parentId: z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>;
8
+ validUntil: z.ZodNullable<z.ZodString>;
9
+ locationType: z.ZodNullable<z.ZodEnum<["ADMIN_STRUCTURE", "CRVS_OFFICE", "HEALTH_FACILITY"]>>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ id: string & z.BRAND<"UUID">;
12
+ name: string;
13
+ parentId: (string & z.BRAND<"UUID">) | null;
14
+ validUntil: string | null;
15
+ locationType: "ADMIN_STRUCTURE" | "HEALTH_FACILITY" | "CRVS_OFFICE" | null;
16
+ }, {
17
+ id: string;
18
+ name: string;
19
+ parentId: string | null;
20
+ validUntil: string | null;
21
+ locationType: "ADMIN_STRUCTURE" | "HEALTH_FACILITY" | "CRVS_OFFICE" | null;
22
+ }>;
23
+ export type Location = z.infer<typeof Location>;
24
+ //# sourceMappingURL=locations.d.ts.map