@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.
- package/README.md +70 -0
- package/build.sh +56 -0
- package/dist/api/index.d.ts +11 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +52 -0
- package/dist/commons/api/router.d.ts +14568 -0
- package/dist/commons/conditionals/conditionals.d.ts +194 -0
- package/dist/commons/conditionals/index.d.ts +2 -0
- package/dist/commons/conditionals/validate.d.ts +129 -0
- package/dist/commons/events/ActionConfig.d.ts +2034 -0
- package/dist/commons/events/ActionDocument.d.ts +14400 -0
- package/dist/commons/events/ActionInput.d.ts +11157 -0
- package/dist/commons/events/ActionType.d.ts +52 -0
- package/dist/commons/events/AdvancedSearchConfig.d.ts +1175 -0
- package/dist/commons/events/CompositeFieldValue.d.ts +181 -0
- package/dist/commons/events/Conditional.d.ts +55 -0
- package/dist/commons/events/Constants.d.ts +3 -0
- package/dist/commons/events/CountryConfigQueryInput.d.ts +4494 -0
- package/dist/commons/events/CreatedAtLocation.d.ts +2 -0
- package/dist/commons/events/DeduplicationConfig.d.ts +209 -0
- package/dist/commons/events/Draft.d.ts +814 -0
- package/dist/commons/events/EventConfig.d.ts +2237 -0
- package/dist/commons/events/EventConfigInput.d.ts +10 -0
- package/dist/commons/events/EventDocument.d.ts +8505 -0
- package/dist/commons/events/EventIndex.d.ts +3858 -0
- package/dist/commons/events/EventInput.d.ts +13 -0
- package/dist/commons/events/EventMetadata.d.ts +408 -0
- package/dist/commons/events/FieldConfig.d.ts +7125 -0
- package/dist/commons/events/FieldType.d.ts +46 -0
- package/dist/commons/events/FieldTypeMapping.d.ts +537 -0
- package/dist/commons/events/FieldValue.d.ts +250 -0
- package/dist/commons/events/FileUtils.d.ts +4 -0
- package/dist/commons/events/FormConfig.d.ts +725 -0
- package/dist/commons/events/PageConfig.d.ts +336 -0
- package/dist/commons/events/SummaryConfig.d.ts +170 -0
- package/dist/commons/events/TemplateConfig.d.ts +38 -0
- package/dist/commons/events/TranslationConfig.d.ts +15 -0
- package/dist/commons/events/User.d.ts +45 -0
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +53 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +8997 -0
- package/dist/commons/events/deduplication.d.ts +32 -0
- package/dist/commons/events/defineConfig.d.ts +309 -0
- package/dist/commons/events/event.d.ts +109 -0
- package/dist/commons/events/field.d.ts +151 -0
- package/dist/commons/events/index.d.ts +46 -0
- package/dist/commons/events/locations.d.ts +24 -0
- package/dist/commons/events/scopes.d.ts +55 -0
- package/dist/commons/events/serializer.d.ts +2 -0
- package/dist/commons/events/state/availableActions.d.ts +6 -0
- package/dist/commons/events/state/flags.d.ts +4 -0
- package/dist/commons/events/state/index.d.ts +146 -0
- package/dist/commons/events/state/utils.d.ts +1263 -0
- package/dist/commons/events/test.utils.d.ts +473 -0
- package/dist/commons/events/transactions.d.ts +2 -0
- package/dist/commons/events/utils.d.ts +501 -0
- package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
- package/dist/commons/notification/UserNotifications.d.ts +632 -0
- package/dist/commons/notification/index.d.ts +2 -0
- package/dist/conditionals/index.d.ts +2 -0
- package/dist/conditionals/index.d.ts.map +1 -0
- package/dist/conditionals/index.js +491 -0
- package/dist/events/deduplication.d.ts +32 -0
- package/dist/events/deduplication.d.ts.map +1 -0
- package/dist/events/deduplication.js +67 -0
- package/dist/events/index.d.ts +2 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +8383 -0
- package/dist/notification/index.d.ts +2 -0
- package/dist/notification/index.d.ts.map +1 -0
- package/dist/notification/index.js +5928 -0
- package/dist/scopes/index.d.ts +335 -0
- package/dist/scopes/index.d.ts.map +1 -0
- package/dist/scopes/index.js +379 -0
- package/package.json +40 -0
- package/tsconfig.json +27 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { FieldConfig } from './FieldConfig';
|
|
3
|
+
import { TranslationConfig } from './TranslationConfig';
|
|
4
|
+
export declare const PageTypes: z.ZodEnum<["FORM", "VERIFICATION"]>;
|
|
5
|
+
export type PageType = z.infer<typeof PageTypes>;
|
|
6
|
+
export declare const FormPageConfig: z.ZodObject<z.objectUtil.extendShape<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
9
|
+
id: string;
|
|
10
|
+
description: string;
|
|
11
|
+
defaultMessage: string;
|
|
12
|
+
}>;
|
|
13
|
+
fields: z.ZodArray<z.ZodType<FieldConfig, z.ZodTypeDef, import("./FieldConfig").FieldConfigInput>, "many">;
|
|
14
|
+
conditional: z.ZodOptional<z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>>;
|
|
15
|
+
}, {
|
|
16
|
+
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
17
|
+
}>, "strip", z.ZodTypeAny, {
|
|
18
|
+
type: "FORM";
|
|
19
|
+
id: string;
|
|
20
|
+
title: TranslationConfig;
|
|
21
|
+
fields: FieldConfig[];
|
|
22
|
+
conditional?: import(".").JSONSchema | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
id: string;
|
|
25
|
+
title: {
|
|
26
|
+
id: string;
|
|
27
|
+
description: string;
|
|
28
|
+
defaultMessage: string;
|
|
29
|
+
};
|
|
30
|
+
fields: import("./FieldConfig").FieldConfigInput[];
|
|
31
|
+
type?: "FORM" | undefined;
|
|
32
|
+
conditional?: import(".").JSONSchema | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
export type FormPageConfig = z.infer<typeof FormPageConfig>;
|
|
35
|
+
export type FormPageConfigInput = z.input<typeof FormPageConfig>;
|
|
36
|
+
export declare const VerificationActionConfig: z.ZodObject<{
|
|
37
|
+
verify: z.ZodObject<{
|
|
38
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
39
|
+
id: string;
|
|
40
|
+
description: string;
|
|
41
|
+
defaultMessage: string;
|
|
42
|
+
}>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
label: TranslationConfig;
|
|
45
|
+
}, {
|
|
46
|
+
label: {
|
|
47
|
+
id: string;
|
|
48
|
+
description: string;
|
|
49
|
+
defaultMessage: string;
|
|
50
|
+
};
|
|
51
|
+
}>;
|
|
52
|
+
cancel: z.ZodObject<{
|
|
53
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
54
|
+
id: string;
|
|
55
|
+
description: string;
|
|
56
|
+
defaultMessage: string;
|
|
57
|
+
}>;
|
|
58
|
+
confirmation: z.ZodObject<{
|
|
59
|
+
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
60
|
+
id: string;
|
|
61
|
+
description: string;
|
|
62
|
+
defaultMessage: string;
|
|
63
|
+
}>;
|
|
64
|
+
body: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
65
|
+
id: string;
|
|
66
|
+
description: string;
|
|
67
|
+
defaultMessage: string;
|
|
68
|
+
}>;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
title: TranslationConfig;
|
|
71
|
+
body: TranslationConfig;
|
|
72
|
+
}, {
|
|
73
|
+
title: {
|
|
74
|
+
id: string;
|
|
75
|
+
description: string;
|
|
76
|
+
defaultMessage: string;
|
|
77
|
+
};
|
|
78
|
+
body: {
|
|
79
|
+
id: string;
|
|
80
|
+
description: string;
|
|
81
|
+
defaultMessage: string;
|
|
82
|
+
};
|
|
83
|
+
}>;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
label: TranslationConfig;
|
|
86
|
+
confirmation: {
|
|
87
|
+
title: TranslationConfig;
|
|
88
|
+
body: TranslationConfig;
|
|
89
|
+
};
|
|
90
|
+
}, {
|
|
91
|
+
label: {
|
|
92
|
+
id: string;
|
|
93
|
+
description: string;
|
|
94
|
+
defaultMessage: string;
|
|
95
|
+
};
|
|
96
|
+
confirmation: {
|
|
97
|
+
title: {
|
|
98
|
+
id: string;
|
|
99
|
+
description: string;
|
|
100
|
+
defaultMessage: string;
|
|
101
|
+
};
|
|
102
|
+
body: {
|
|
103
|
+
id: string;
|
|
104
|
+
description: string;
|
|
105
|
+
defaultMessage: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
}>;
|
|
109
|
+
}, "strip", z.ZodTypeAny, {
|
|
110
|
+
verify: {
|
|
111
|
+
label: TranslationConfig;
|
|
112
|
+
};
|
|
113
|
+
cancel: {
|
|
114
|
+
label: TranslationConfig;
|
|
115
|
+
confirmation: {
|
|
116
|
+
title: TranslationConfig;
|
|
117
|
+
body: TranslationConfig;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
}, {
|
|
121
|
+
verify: {
|
|
122
|
+
label: {
|
|
123
|
+
id: string;
|
|
124
|
+
description: string;
|
|
125
|
+
defaultMessage: string;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
cancel: {
|
|
129
|
+
label: {
|
|
130
|
+
id: string;
|
|
131
|
+
description: string;
|
|
132
|
+
defaultMessage: string;
|
|
133
|
+
};
|
|
134
|
+
confirmation: {
|
|
135
|
+
title: {
|
|
136
|
+
id: string;
|
|
137
|
+
description: string;
|
|
138
|
+
defaultMessage: string;
|
|
139
|
+
};
|
|
140
|
+
body: {
|
|
141
|
+
id: string;
|
|
142
|
+
description: string;
|
|
143
|
+
defaultMessage: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
}>;
|
|
148
|
+
export declare const VerificationPageConfig: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
149
|
+
id: z.ZodString;
|
|
150
|
+
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
151
|
+
id: string;
|
|
152
|
+
description: string;
|
|
153
|
+
defaultMessage: string;
|
|
154
|
+
}>;
|
|
155
|
+
fields: z.ZodArray<z.ZodType<FieldConfig, z.ZodTypeDef, import("./FieldConfig").FieldConfigInput>, "many">;
|
|
156
|
+
conditional: z.ZodOptional<z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>>;
|
|
157
|
+
}, {
|
|
158
|
+
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
159
|
+
}>, {
|
|
160
|
+
type: z.ZodLiteral<"VERIFICATION">;
|
|
161
|
+
actions: z.ZodObject<{
|
|
162
|
+
verify: z.ZodObject<{
|
|
163
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
164
|
+
id: string;
|
|
165
|
+
description: string;
|
|
166
|
+
defaultMessage: string;
|
|
167
|
+
}>;
|
|
168
|
+
}, "strip", z.ZodTypeAny, {
|
|
169
|
+
label: TranslationConfig;
|
|
170
|
+
}, {
|
|
171
|
+
label: {
|
|
172
|
+
id: string;
|
|
173
|
+
description: string;
|
|
174
|
+
defaultMessage: string;
|
|
175
|
+
};
|
|
176
|
+
}>;
|
|
177
|
+
cancel: z.ZodObject<{
|
|
178
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
179
|
+
id: string;
|
|
180
|
+
description: string;
|
|
181
|
+
defaultMessage: string;
|
|
182
|
+
}>;
|
|
183
|
+
confirmation: z.ZodObject<{
|
|
184
|
+
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
185
|
+
id: string;
|
|
186
|
+
description: string;
|
|
187
|
+
defaultMessage: string;
|
|
188
|
+
}>;
|
|
189
|
+
body: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
190
|
+
id: string;
|
|
191
|
+
description: string;
|
|
192
|
+
defaultMessage: string;
|
|
193
|
+
}>;
|
|
194
|
+
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
title: TranslationConfig;
|
|
196
|
+
body: TranslationConfig;
|
|
197
|
+
}, {
|
|
198
|
+
title: {
|
|
199
|
+
id: string;
|
|
200
|
+
description: string;
|
|
201
|
+
defaultMessage: string;
|
|
202
|
+
};
|
|
203
|
+
body: {
|
|
204
|
+
id: string;
|
|
205
|
+
description: string;
|
|
206
|
+
defaultMessage: string;
|
|
207
|
+
};
|
|
208
|
+
}>;
|
|
209
|
+
}, "strip", z.ZodTypeAny, {
|
|
210
|
+
label: TranslationConfig;
|
|
211
|
+
confirmation: {
|
|
212
|
+
title: TranslationConfig;
|
|
213
|
+
body: TranslationConfig;
|
|
214
|
+
};
|
|
215
|
+
}, {
|
|
216
|
+
label: {
|
|
217
|
+
id: string;
|
|
218
|
+
description: string;
|
|
219
|
+
defaultMessage: string;
|
|
220
|
+
};
|
|
221
|
+
confirmation: {
|
|
222
|
+
title: {
|
|
223
|
+
id: string;
|
|
224
|
+
description: string;
|
|
225
|
+
defaultMessage: string;
|
|
226
|
+
};
|
|
227
|
+
body: {
|
|
228
|
+
id: string;
|
|
229
|
+
description: string;
|
|
230
|
+
defaultMessage: string;
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
}>;
|
|
234
|
+
}, "strip", z.ZodTypeAny, {
|
|
235
|
+
verify: {
|
|
236
|
+
label: TranslationConfig;
|
|
237
|
+
};
|
|
238
|
+
cancel: {
|
|
239
|
+
label: TranslationConfig;
|
|
240
|
+
confirmation: {
|
|
241
|
+
title: TranslationConfig;
|
|
242
|
+
body: TranslationConfig;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
}, {
|
|
246
|
+
verify: {
|
|
247
|
+
label: {
|
|
248
|
+
id: string;
|
|
249
|
+
description: string;
|
|
250
|
+
defaultMessage: string;
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
cancel: {
|
|
254
|
+
label: {
|
|
255
|
+
id: string;
|
|
256
|
+
description: string;
|
|
257
|
+
defaultMessage: string;
|
|
258
|
+
};
|
|
259
|
+
confirmation: {
|
|
260
|
+
title: {
|
|
261
|
+
id: string;
|
|
262
|
+
description: string;
|
|
263
|
+
defaultMessage: string;
|
|
264
|
+
};
|
|
265
|
+
body: {
|
|
266
|
+
id: string;
|
|
267
|
+
description: string;
|
|
268
|
+
defaultMessage: string;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
}>;
|
|
273
|
+
}>, "strip", z.ZodTypeAny, {
|
|
274
|
+
type: "VERIFICATION";
|
|
275
|
+
id: string;
|
|
276
|
+
title: TranslationConfig;
|
|
277
|
+
actions: {
|
|
278
|
+
verify: {
|
|
279
|
+
label: TranslationConfig;
|
|
280
|
+
};
|
|
281
|
+
cancel: {
|
|
282
|
+
label: TranslationConfig;
|
|
283
|
+
confirmation: {
|
|
284
|
+
title: TranslationConfig;
|
|
285
|
+
body: TranslationConfig;
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
fields: FieldConfig[];
|
|
290
|
+
conditional?: import(".").JSONSchema | undefined;
|
|
291
|
+
}, {
|
|
292
|
+
type: "VERIFICATION";
|
|
293
|
+
id: string;
|
|
294
|
+
title: {
|
|
295
|
+
id: string;
|
|
296
|
+
description: string;
|
|
297
|
+
defaultMessage: string;
|
|
298
|
+
};
|
|
299
|
+
actions: {
|
|
300
|
+
verify: {
|
|
301
|
+
label: {
|
|
302
|
+
id: string;
|
|
303
|
+
description: string;
|
|
304
|
+
defaultMessage: string;
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
cancel: {
|
|
308
|
+
label: {
|
|
309
|
+
id: string;
|
|
310
|
+
description: string;
|
|
311
|
+
defaultMessage: string;
|
|
312
|
+
};
|
|
313
|
+
confirmation: {
|
|
314
|
+
title: {
|
|
315
|
+
id: string;
|
|
316
|
+
description: string;
|
|
317
|
+
defaultMessage: string;
|
|
318
|
+
};
|
|
319
|
+
body: {
|
|
320
|
+
id: string;
|
|
321
|
+
description: string;
|
|
322
|
+
defaultMessage: string;
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
fields: import("./FieldConfig").FieldConfigInput[];
|
|
328
|
+
conditional?: import(".").JSONSchema | undefined;
|
|
329
|
+
}>;
|
|
330
|
+
export type VerificationPageConfig = z.infer<typeof VerificationPageConfig>;
|
|
331
|
+
type AllPageConfig = typeof VerificationPageConfig | typeof FormPageConfig;
|
|
332
|
+
export declare const PageConfig: z.ZodDiscriminatedUnion<"type", AllPageConfig[]>;
|
|
333
|
+
export type PageConfig = z.infer<typeof PageConfig>;
|
|
334
|
+
export type PageConfigInput = z.input<typeof PageConfig>;
|
|
335
|
+
export {};
|
|
336
|
+
//# sourceMappingURL=PageConfig.d.ts.map
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TranslationConfig } from './TranslationConfig';
|
|
3
|
+
export declare const SummaryConfig: z.ZodObject<{
|
|
4
|
+
fields: z.ZodArray<z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
|
|
5
|
+
emptyValueMessage: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
6
|
+
id: string;
|
|
7
|
+
description: string;
|
|
8
|
+
defaultMessage: string;
|
|
9
|
+
}>>;
|
|
10
|
+
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
11
|
+
type: z.ZodLiteral<"SHOW">;
|
|
12
|
+
conditional: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
type: "SHOW";
|
|
15
|
+
conditional: import(".").JSONSchema;
|
|
16
|
+
}, {
|
|
17
|
+
type: "SHOW";
|
|
18
|
+
conditional: import(".").JSONSchema;
|
|
19
|
+
}>, "many">>>;
|
|
20
|
+
}, {
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
value: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
23
|
+
id: string;
|
|
24
|
+
description: string;
|
|
25
|
+
defaultMessage: string;
|
|
26
|
+
}>;
|
|
27
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
28
|
+
id: string;
|
|
29
|
+
description: string;
|
|
30
|
+
defaultMessage: string;
|
|
31
|
+
}>;
|
|
32
|
+
}>, "strip", z.ZodTypeAny, {
|
|
33
|
+
id: string;
|
|
34
|
+
value: TranslationConfig;
|
|
35
|
+
label: TranslationConfig;
|
|
36
|
+
conditionals?: {
|
|
37
|
+
type: "SHOW";
|
|
38
|
+
conditional: import(".").JSONSchema;
|
|
39
|
+
}[] | undefined;
|
|
40
|
+
emptyValueMessage?: TranslationConfig | undefined;
|
|
41
|
+
}, {
|
|
42
|
+
id: string;
|
|
43
|
+
value: {
|
|
44
|
+
id: string;
|
|
45
|
+
description: string;
|
|
46
|
+
defaultMessage: string;
|
|
47
|
+
};
|
|
48
|
+
label: {
|
|
49
|
+
id: string;
|
|
50
|
+
description: string;
|
|
51
|
+
defaultMessage: string;
|
|
52
|
+
};
|
|
53
|
+
conditionals?: {
|
|
54
|
+
type: "SHOW";
|
|
55
|
+
conditional: import(".").JSONSchema;
|
|
56
|
+
}[] | undefined;
|
|
57
|
+
emptyValueMessage?: {
|
|
58
|
+
id: string;
|
|
59
|
+
description: string;
|
|
60
|
+
defaultMessage: string;
|
|
61
|
+
} | undefined;
|
|
62
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
63
|
+
emptyValueMessage: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
64
|
+
id: string;
|
|
65
|
+
description: string;
|
|
66
|
+
defaultMessage: string;
|
|
67
|
+
}>>;
|
|
68
|
+
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
69
|
+
type: z.ZodLiteral<"SHOW">;
|
|
70
|
+
conditional: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
|
|
71
|
+
}, "strip", z.ZodTypeAny, {
|
|
72
|
+
type: "SHOW";
|
|
73
|
+
conditional: import(".").JSONSchema;
|
|
74
|
+
}, {
|
|
75
|
+
type: "SHOW";
|
|
76
|
+
conditional: import(".").JSONSchema;
|
|
77
|
+
}>, "many">>>;
|
|
78
|
+
}, {
|
|
79
|
+
fieldId: z.ZodString;
|
|
80
|
+
label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
81
|
+
id: string;
|
|
82
|
+
description: string;
|
|
83
|
+
defaultMessage: string;
|
|
84
|
+
}>>;
|
|
85
|
+
}>, "strip", z.ZodTypeAny, {
|
|
86
|
+
fieldId: string;
|
|
87
|
+
label?: TranslationConfig | undefined;
|
|
88
|
+
conditionals?: {
|
|
89
|
+
type: "SHOW";
|
|
90
|
+
conditional: import(".").JSONSchema;
|
|
91
|
+
}[] | undefined;
|
|
92
|
+
emptyValueMessage?: TranslationConfig | undefined;
|
|
93
|
+
}, {
|
|
94
|
+
fieldId: string;
|
|
95
|
+
label?: {
|
|
96
|
+
id: string;
|
|
97
|
+
description: string;
|
|
98
|
+
defaultMessage: string;
|
|
99
|
+
} | undefined;
|
|
100
|
+
conditionals?: {
|
|
101
|
+
type: "SHOW";
|
|
102
|
+
conditional: import(".").JSONSchema;
|
|
103
|
+
}[] | undefined;
|
|
104
|
+
emptyValueMessage?: {
|
|
105
|
+
id: string;
|
|
106
|
+
description: string;
|
|
107
|
+
defaultMessage: string;
|
|
108
|
+
} | undefined;
|
|
109
|
+
}>]>, "many">;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
fields: ({
|
|
112
|
+
fieldId: string;
|
|
113
|
+
label?: TranslationConfig | undefined;
|
|
114
|
+
conditionals?: {
|
|
115
|
+
type: "SHOW";
|
|
116
|
+
conditional: import(".").JSONSchema;
|
|
117
|
+
}[] | undefined;
|
|
118
|
+
emptyValueMessage?: TranslationConfig | undefined;
|
|
119
|
+
} | {
|
|
120
|
+
id: string;
|
|
121
|
+
value: TranslationConfig;
|
|
122
|
+
label: TranslationConfig;
|
|
123
|
+
conditionals?: {
|
|
124
|
+
type: "SHOW";
|
|
125
|
+
conditional: import(".").JSONSchema;
|
|
126
|
+
}[] | undefined;
|
|
127
|
+
emptyValueMessage?: TranslationConfig | undefined;
|
|
128
|
+
})[];
|
|
129
|
+
}, {
|
|
130
|
+
fields: ({
|
|
131
|
+
fieldId: string;
|
|
132
|
+
label?: {
|
|
133
|
+
id: string;
|
|
134
|
+
description: string;
|
|
135
|
+
defaultMessage: string;
|
|
136
|
+
} | undefined;
|
|
137
|
+
conditionals?: {
|
|
138
|
+
type: "SHOW";
|
|
139
|
+
conditional: import(".").JSONSchema;
|
|
140
|
+
}[] | undefined;
|
|
141
|
+
emptyValueMessage?: {
|
|
142
|
+
id: string;
|
|
143
|
+
description: string;
|
|
144
|
+
defaultMessage: string;
|
|
145
|
+
} | undefined;
|
|
146
|
+
} | {
|
|
147
|
+
id: string;
|
|
148
|
+
value: {
|
|
149
|
+
id: string;
|
|
150
|
+
description: string;
|
|
151
|
+
defaultMessage: string;
|
|
152
|
+
};
|
|
153
|
+
label: {
|
|
154
|
+
id: string;
|
|
155
|
+
description: string;
|
|
156
|
+
defaultMessage: string;
|
|
157
|
+
};
|
|
158
|
+
conditionals?: {
|
|
159
|
+
type: "SHOW";
|
|
160
|
+
conditional: import(".").JSONSchema;
|
|
161
|
+
}[] | undefined;
|
|
162
|
+
emptyValueMessage?: {
|
|
163
|
+
id: string;
|
|
164
|
+
description: string;
|
|
165
|
+
defaultMessage: string;
|
|
166
|
+
} | undefined;
|
|
167
|
+
})[];
|
|
168
|
+
}>;
|
|
169
|
+
export type SummaryConfig = z.infer<typeof SummaryConfig>;
|
|
170
|
+
//# sourceMappingURL=SummaryConfig.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TemplateConfig defines configuration rules for system-based variables (e.g. $user.province).
|
|
3
|
+
* They are currently used for providing default values in FieldConfig.
|
|
4
|
+
*/
|
|
5
|
+
import { FieldValue } from './FieldValue';
|
|
6
|
+
/**
|
|
7
|
+
* Available system variables for configuration.
|
|
8
|
+
*/
|
|
9
|
+
export type SystemVariables = {
|
|
10
|
+
$user: {
|
|
11
|
+
province: string;
|
|
12
|
+
district: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Recursively flatten the keys of an object. Used to limit types when configuring default values in country config.
|
|
17
|
+
* @example
|
|
18
|
+
* type Test = FlattenedKeyStrings<{ a: { b: string, c: { d: string } } }>
|
|
19
|
+
* // 'a.b' | 'a.c.d' but not 'a' or 'a.c'
|
|
20
|
+
*/
|
|
21
|
+
type FlattenedKeyStrings<T, Prefix extends string = ''> = {
|
|
22
|
+
[K in keyof T]: T[K] extends Record<string, any> ? FlattenedKeyStrings<T[K], `${Prefix}${K & string}.`> : `${Prefix}${K & string}`;
|
|
23
|
+
}[keyof T];
|
|
24
|
+
export type FlattenenedSystemVariables = FlattenedKeyStrings<SystemVariables>;
|
|
25
|
+
/**
|
|
26
|
+
* Default value for a field when configuring a form.
|
|
27
|
+
*/
|
|
28
|
+
export type FieldConfigDefaultValue = FieldValue | FlattenenedSystemVariables | Record<string, FlattenenedSystemVariables | FieldValue>;
|
|
29
|
+
export declare function isTemplateVariable(value: FieldConfigDefaultValue): value is FlattenenedSystemVariables;
|
|
30
|
+
export declare function isFieldValue(value: FieldConfigDefaultValue): value is FieldValue;
|
|
31
|
+
/**
|
|
32
|
+
* Checks if given value is valid for a field, and known template variables are already resolved.
|
|
33
|
+
* @todo: Extend functionality to arbitrary depth objects. Currently only checks first level since our compoosite fields are only 1 level deep.
|
|
34
|
+
*/
|
|
35
|
+
export declare function isFieldValueWithoutTemplates(value: FieldConfigDefaultValue): value is FieldValue;
|
|
36
|
+
export declare function isFieldConfigDefaultValue(value: any): value is FieldConfigDefaultValue;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=TemplateConfig.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export type TranslationConfig = {
|
|
3
|
+
id: string;
|
|
4
|
+
defaultMessage: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
export type MessageDescriptorZod = {
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
defaultMessage: z.ZodString;
|
|
10
|
+
description: z.ZodString;
|
|
11
|
+
};
|
|
12
|
+
type ExplicitTypeToReduceDeclarationSize = z.ZodObject<MessageDescriptorZod, 'strip', z.ZodTypeAny, TranslationConfig>;
|
|
13
|
+
export declare const TranslationConfig: ExplicitTypeToReduceDeclarationSize;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=TranslationConfig.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const User: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
name: z.ZodArray<z.ZodObject<{
|
|
5
|
+
use: z.ZodString;
|
|
6
|
+
given: z.ZodArray<z.ZodString, "many">;
|
|
7
|
+
family: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
use: string;
|
|
10
|
+
given: string[];
|
|
11
|
+
family: string;
|
|
12
|
+
}, {
|
|
13
|
+
use: string;
|
|
14
|
+
given: string[];
|
|
15
|
+
family: string;
|
|
16
|
+
}>, "many">;
|
|
17
|
+
role: z.ZodString;
|
|
18
|
+
avatar: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
19
|
+
signature: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
20
|
+
primaryOfficeId: z.ZodString;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
id: string;
|
|
23
|
+
name: {
|
|
24
|
+
use: string;
|
|
25
|
+
given: string[];
|
|
26
|
+
family: string;
|
|
27
|
+
}[];
|
|
28
|
+
role: string;
|
|
29
|
+
primaryOfficeId: string;
|
|
30
|
+
signature?: string | undefined;
|
|
31
|
+
avatar?: string | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
id: string;
|
|
34
|
+
name: {
|
|
35
|
+
use: string;
|
|
36
|
+
given: string[];
|
|
37
|
+
family: string;
|
|
38
|
+
}[];
|
|
39
|
+
role: string;
|
|
40
|
+
primaryOfficeId: string;
|
|
41
|
+
signature?: string | undefined;
|
|
42
|
+
avatar?: string | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
export type User = z.infer<typeof User>;
|
|
45
|
+
//# sourceMappingURL=User.d.ts.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TranslationConfig } from './TranslationConfig';
|
|
3
|
+
export declare const WorkqueueColumnKeysArray: readonly ["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags", "title", "outbox"];
|
|
4
|
+
export declare const WorkqueueColumnKeys: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags", "title", "outbox"]>;
|
|
5
|
+
export type WorkqueueColumnKeys = z.infer<typeof WorkqueueColumnKeys>;
|
|
6
|
+
export declare const WorkqueueColumnValue: z.ZodObject<{
|
|
7
|
+
$event: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags", "title", "outbox"]>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
$event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "updatedAt" | "dateOfEvent" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
|
|
10
|
+
}, {
|
|
11
|
+
$event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "updatedAt" | "dateOfEvent" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
|
|
12
|
+
}>;
|
|
13
|
+
export type WorkqueueColumnValue = z.infer<typeof WorkqueueColumnValue>;
|
|
14
|
+
/**
|
|
15
|
+
* Configuration for column header and value of cell of workqueue.
|
|
16
|
+
*/
|
|
17
|
+
export declare const WorkqueueColumn: z.ZodObject<{
|
|
18
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
19
|
+
id: string;
|
|
20
|
+
description: string;
|
|
21
|
+
defaultMessage: string;
|
|
22
|
+
}>;
|
|
23
|
+
value: z.ZodObject<{
|
|
24
|
+
$event: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags", "title", "outbox"]>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
$event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "updatedAt" | "dateOfEvent" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
|
|
27
|
+
}, {
|
|
28
|
+
$event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "updatedAt" | "dateOfEvent" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
|
|
29
|
+
}>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
value: {
|
|
32
|
+
$event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "updatedAt" | "dateOfEvent" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
|
|
33
|
+
};
|
|
34
|
+
label: TranslationConfig;
|
|
35
|
+
}, {
|
|
36
|
+
value: {
|
|
37
|
+
$event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "updatedAt" | "dateOfEvent" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
|
|
38
|
+
};
|
|
39
|
+
label: {
|
|
40
|
+
id: string;
|
|
41
|
+
description: string;
|
|
42
|
+
defaultMessage: string;
|
|
43
|
+
};
|
|
44
|
+
}>;
|
|
45
|
+
export type WorkqueueColumn = z.infer<typeof WorkqueueColumn>;
|
|
46
|
+
export type WorkqueueColumnInput = z.infer<typeof WorkqueueColumn>;
|
|
47
|
+
export declare function defineWorkqueuesColumns(workqueueColumns: WorkqueueColumnInput[]): {
|
|
48
|
+
value: {
|
|
49
|
+
$event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "updatedAt" | "dateOfEvent" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
|
|
50
|
+
};
|
|
51
|
+
label: TranslationConfig;
|
|
52
|
+
}[];
|
|
53
|
+
//# sourceMappingURL=WorkqueueColumnConfig.d.ts.map
|