@opencrvs/toolkit 1.8.0-rc.fc43738 → 1.8.0-rc.fca3e39
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/dist/commons/api/router.d.ts +7518 -2532
- package/dist/commons/conditionals/conditionals.d.ts +3 -2
- package/dist/commons/conditionals/validate-address.test.d.ts +2 -0
- package/dist/commons/conditionals/validate.d.ts +33 -6
- package/dist/commons/conditionals/validate.test.d.ts +2 -0
- package/dist/commons/events/ActionConfig.d.ts +6 -24
- package/dist/commons/events/ActionDocument.d.ts +3196 -1113
- package/dist/commons/events/ActionInput.d.ts +4796 -1760
- package/dist/commons/events/ActionType.d.ts +6 -1
- package/dist/commons/events/CompositeFieldValue.d.ts +414 -0
- package/dist/commons/events/Draft.d.ts +440 -155
- package/dist/commons/events/EventConfig.d.ts +4 -28
- package/dist/commons/events/EventDocument.d.ts +3845 -1325
- package/dist/commons/events/EventIndex.d.ts +3 -3
- package/dist/commons/events/EventMetadata.d.ts +3 -3
- package/dist/commons/events/FieldConfig.d.ts +64 -1
- package/dist/commons/events/FieldType.d.ts +4 -0
- package/dist/commons/events/FieldTypeMapping.d.ts +252 -38
- package/dist/commons/events/FieldValue.d.ts +133 -64
- package/dist/commons/events/TemplateConfig.d.ts +38 -0
- package/dist/commons/events/defineConfig.d.ts +1 -7
- package/dist/commons/events/index.d.ts +2 -0
- package/dist/commons/events/test.utils.d.ts +219 -69
- package/dist/commons/events/utils.d.ts +123 -3
- package/dist/conditionals/index.js +17 -0
- package/dist/events/index.js +780 -487
- package/package.json +1 -1
@@ -1,4 +1,5 @@
|
|
1
|
-
import {
|
1
|
+
import { ActionDocument } from './ActionDocument';
|
2
|
+
import { ArchiveActionInput, DeclareActionInput, RegisterActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, ValidateActionInput } from './ActionInput';
|
2
3
|
import { ActionType } from './ActionType';
|
3
4
|
import { Draft } from './Draft';
|
4
5
|
import { EventConfig } from './EventConfig';
|
@@ -13,6 +14,7 @@ export declare function generateActionInput(configuration: EventConfig, action:
|
|
13
14
|
} | {
|
14
15
|
country: string;
|
15
16
|
district: string;
|
17
|
+
addressType: "DOMESTIC";
|
16
18
|
province: string;
|
17
19
|
urbanOrRural: "URBAN";
|
18
20
|
number?: string | undefined;
|
@@ -23,9 +25,20 @@ export declare function generateActionInput(configuration: EventConfig, action:
|
|
23
25
|
} | {
|
24
26
|
country: string;
|
25
27
|
district: string;
|
28
|
+
addressType: "DOMESTIC";
|
26
29
|
province: string;
|
27
30
|
urbanOrRural: "RURAL";
|
28
31
|
village?: string | undefined;
|
32
|
+
} | {
|
33
|
+
country: string;
|
34
|
+
state: string;
|
35
|
+
addressType: "INTERNATIONAL";
|
36
|
+
district2: string;
|
37
|
+
cityOrTown?: string | undefined;
|
38
|
+
addressLine1?: string | undefined;
|
39
|
+
addressLine2?: string | undefined;
|
40
|
+
addressLine3?: string | undefined;
|
41
|
+
postcodeOrZip?: string | undefined;
|
29
42
|
} | {
|
30
43
|
type: string;
|
31
44
|
option: string;
|
@@ -77,19 +90,31 @@ export declare const eventPayloadGenerator: {
|
|
77
90
|
} | {
|
78
91
|
country: string;
|
79
92
|
district: string;
|
93
|
+
addressType: "DOMESTIC";
|
80
94
|
province: string;
|
81
95
|
urbanOrRural: "URBAN";
|
82
|
-
number?: string | undefined;
|
83
|
-
town?: string | undefined;
|
84
|
-
residentialArea?: string | undefined;
|
85
|
-
street?: string | undefined;
|
86
|
-
zipCode?: string | undefined;
|
96
|
+
number?: string | null | undefined;
|
97
|
+
town?: string | null | undefined;
|
98
|
+
residentialArea?: string | null | undefined;
|
99
|
+
street?: string | null | undefined;
|
100
|
+
zipCode?: string | null | undefined;
|
87
101
|
} | {
|
88
102
|
country: string;
|
89
103
|
district: string;
|
104
|
+
addressType: "DOMESTIC";
|
90
105
|
province: string;
|
91
106
|
urbanOrRural: "RURAL";
|
92
|
-
village?: string | undefined;
|
107
|
+
village?: string | null | undefined;
|
108
|
+
} | {
|
109
|
+
country: string;
|
110
|
+
state: string;
|
111
|
+
addressType: "INTERNATIONAL";
|
112
|
+
district2: string;
|
113
|
+
cityOrTown?: string | null | undefined;
|
114
|
+
addressLine1?: string | null | undefined;
|
115
|
+
addressLine2?: string | null | undefined;
|
116
|
+
addressLine3?: string | null | undefined;
|
117
|
+
postcodeOrZip?: string | null | undefined;
|
93
118
|
} | {
|
94
119
|
type: string;
|
95
120
|
option: string;
|
@@ -106,19 +131,31 @@ export declare const eventPayloadGenerator: {
|
|
106
131
|
} | {
|
107
132
|
country: string;
|
108
133
|
district: string;
|
134
|
+
addressType: "DOMESTIC";
|
109
135
|
province: string;
|
110
136
|
urbanOrRural: "URBAN";
|
111
|
-
number?: string | undefined;
|
112
|
-
town?: string | undefined;
|
113
|
-
residentialArea?: string | undefined;
|
114
|
-
street?: string | undefined;
|
115
|
-
zipCode?: string | undefined;
|
137
|
+
number?: string | null | undefined;
|
138
|
+
town?: string | null | undefined;
|
139
|
+
residentialArea?: string | null | undefined;
|
140
|
+
street?: string | null | undefined;
|
141
|
+
zipCode?: string | null | undefined;
|
116
142
|
} | {
|
117
143
|
country: string;
|
118
144
|
district: string;
|
145
|
+
addressType: "DOMESTIC";
|
119
146
|
province: string;
|
120
147
|
urbanOrRural: "RURAL";
|
121
|
-
village?: string | undefined;
|
148
|
+
village?: string | null | undefined;
|
149
|
+
} | {
|
150
|
+
country: string;
|
151
|
+
state: string;
|
152
|
+
addressType: "INTERNATIONAL";
|
153
|
+
district2: string;
|
154
|
+
cityOrTown?: string | null | undefined;
|
155
|
+
addressLine1?: string | null | undefined;
|
156
|
+
addressLine2?: string | null | undefined;
|
157
|
+
addressLine3?: string | null | undefined;
|
158
|
+
postcodeOrZip?: string | null | undefined;
|
122
159
|
} | {
|
123
160
|
type: string;
|
124
161
|
option: string;
|
@@ -138,19 +175,31 @@ export declare const eventPayloadGenerator: {
|
|
138
175
|
} | {
|
139
176
|
country: string;
|
140
177
|
district: string;
|
178
|
+
addressType: "DOMESTIC";
|
141
179
|
province: string;
|
142
180
|
urbanOrRural: "URBAN";
|
143
|
-
number?: string | undefined;
|
144
|
-
town?: string | undefined;
|
145
|
-
residentialArea?: string | undefined;
|
146
|
-
street?: string | undefined;
|
147
|
-
zipCode?: string | undefined;
|
181
|
+
number?: string | null | undefined;
|
182
|
+
town?: string | null | undefined;
|
183
|
+
residentialArea?: string | null | undefined;
|
184
|
+
street?: string | null | undefined;
|
185
|
+
zipCode?: string | null | undefined;
|
148
186
|
} | {
|
149
187
|
country: string;
|
150
188
|
district: string;
|
189
|
+
addressType: "DOMESTIC";
|
151
190
|
province: string;
|
152
191
|
urbanOrRural: "RURAL";
|
153
|
-
village?: string | undefined;
|
192
|
+
village?: string | null | undefined;
|
193
|
+
} | {
|
194
|
+
country: string;
|
195
|
+
state: string;
|
196
|
+
addressType: "INTERNATIONAL";
|
197
|
+
district2: string;
|
198
|
+
cityOrTown?: string | null | undefined;
|
199
|
+
addressLine1?: string | null | undefined;
|
200
|
+
addressLine2?: string | null | undefined;
|
201
|
+
addressLine3?: string | null | undefined;
|
202
|
+
postcodeOrZip?: string | null | undefined;
|
154
203
|
} | {
|
155
204
|
type: string;
|
156
205
|
option: string;
|
@@ -169,19 +218,31 @@ export declare const eventPayloadGenerator: {
|
|
169
218
|
} | {
|
170
219
|
country: string;
|
171
220
|
district: string;
|
221
|
+
addressType: "DOMESTIC";
|
172
222
|
province: string;
|
173
223
|
urbanOrRural: "URBAN";
|
174
|
-
number?: string | undefined;
|
175
|
-
town?: string | undefined;
|
176
|
-
residentialArea?: string | undefined;
|
177
|
-
street?: string | undefined;
|
178
|
-
zipCode?: string | undefined;
|
224
|
+
number?: string | null | undefined;
|
225
|
+
town?: string | null | undefined;
|
226
|
+
residentialArea?: string | null | undefined;
|
227
|
+
street?: string | null | undefined;
|
228
|
+
zipCode?: string | null | undefined;
|
179
229
|
} | {
|
180
230
|
country: string;
|
181
231
|
district: string;
|
232
|
+
addressType: "DOMESTIC";
|
182
233
|
province: string;
|
183
234
|
urbanOrRural: "RURAL";
|
184
|
-
village?: string | undefined;
|
235
|
+
village?: string | null | undefined;
|
236
|
+
} | {
|
237
|
+
country: string;
|
238
|
+
state: string;
|
239
|
+
addressType: "INTERNATIONAL";
|
240
|
+
district2: string;
|
241
|
+
cityOrTown?: string | null | undefined;
|
242
|
+
addressLine1?: string | null | undefined;
|
243
|
+
addressLine2?: string | null | undefined;
|
244
|
+
addressLine3?: string | null | undefined;
|
245
|
+
postcodeOrZip?: string | null | undefined;
|
185
246
|
} | {
|
186
247
|
type: string;
|
187
248
|
option: string;
|
@@ -191,8 +252,8 @@ export declare const eventPayloadGenerator: {
|
|
191
252
|
duplicates: never[];
|
192
253
|
eventId: string;
|
193
254
|
};
|
194
|
-
archive: (eventId: string, input?: Partial<Pick<
|
195
|
-
type: "
|
255
|
+
archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, "transactionId" | "data">>, isDuplicate?: boolean) => {
|
256
|
+
type: "ARCHIVE";
|
196
257
|
transactionId: string;
|
197
258
|
data: Record<string, string | number | boolean | {
|
198
259
|
type: string;
|
@@ -201,19 +262,31 @@ export declare const eventPayloadGenerator: {
|
|
201
262
|
} | {
|
202
263
|
country: string;
|
203
264
|
district: string;
|
265
|
+
addressType: "DOMESTIC";
|
204
266
|
province: string;
|
205
267
|
urbanOrRural: "URBAN";
|
206
|
-
number?: string | undefined;
|
207
|
-
town?: string | undefined;
|
208
|
-
residentialArea?: string | undefined;
|
209
|
-
street?: string | undefined;
|
210
|
-
zipCode?: string | undefined;
|
268
|
+
number?: string | null | undefined;
|
269
|
+
town?: string | null | undefined;
|
270
|
+
residentialArea?: string | null | undefined;
|
271
|
+
street?: string | null | undefined;
|
272
|
+
zipCode?: string | null | undefined;
|
211
273
|
} | {
|
212
274
|
country: string;
|
213
275
|
district: string;
|
276
|
+
addressType: "DOMESTIC";
|
214
277
|
province: string;
|
215
278
|
urbanOrRural: "RURAL";
|
216
|
-
village?: string | undefined;
|
279
|
+
village?: string | null | undefined;
|
280
|
+
} | {
|
281
|
+
country: string;
|
282
|
+
state: string;
|
283
|
+
addressType: "INTERNATIONAL";
|
284
|
+
district2: string;
|
285
|
+
cityOrTown?: string | null | undefined;
|
286
|
+
addressLine1?: string | null | undefined;
|
287
|
+
addressLine2?: string | null | undefined;
|
288
|
+
addressLine3?: string | null | undefined;
|
289
|
+
postcodeOrZip?: string | null | undefined;
|
217
290
|
} | {
|
218
291
|
type: string;
|
219
292
|
option: string;
|
@@ -236,19 +309,31 @@ export declare const eventPayloadGenerator: {
|
|
236
309
|
} | {
|
237
310
|
country: string;
|
238
311
|
district: string;
|
312
|
+
addressType: "DOMESTIC";
|
239
313
|
province: string;
|
240
314
|
urbanOrRural: "URBAN";
|
241
|
-
number?: string | undefined;
|
242
|
-
town?: string | undefined;
|
243
|
-
residentialArea?: string | undefined;
|
244
|
-
street?: string | undefined;
|
245
|
-
zipCode?: string | undefined;
|
315
|
+
number?: string | null | undefined;
|
316
|
+
town?: string | null | undefined;
|
317
|
+
residentialArea?: string | null | undefined;
|
318
|
+
street?: string | null | undefined;
|
319
|
+
zipCode?: string | null | undefined;
|
246
320
|
} | {
|
247
321
|
country: string;
|
248
322
|
district: string;
|
323
|
+
addressType: "DOMESTIC";
|
249
324
|
province: string;
|
250
325
|
urbanOrRural: "RURAL";
|
251
|
-
village?: string | undefined;
|
326
|
+
village?: string | null | undefined;
|
327
|
+
} | {
|
328
|
+
country: string;
|
329
|
+
state: string;
|
330
|
+
addressType: "INTERNATIONAL";
|
331
|
+
district2: string;
|
332
|
+
cityOrTown?: string | null | undefined;
|
333
|
+
addressLine1?: string | null | undefined;
|
334
|
+
addressLine2?: string | null | undefined;
|
335
|
+
addressLine3?: string | null | undefined;
|
336
|
+
postcodeOrZip?: string | null | undefined;
|
252
337
|
} | {
|
253
338
|
type: string;
|
254
339
|
option: string;
|
@@ -268,19 +353,31 @@ export declare const eventPayloadGenerator: {
|
|
268
353
|
} | {
|
269
354
|
country: string;
|
270
355
|
district: string;
|
356
|
+
addressType: "DOMESTIC";
|
271
357
|
province: string;
|
272
358
|
urbanOrRural: "URBAN";
|
273
|
-
number?: string | undefined;
|
274
|
-
town?: string | undefined;
|
275
|
-
residentialArea?: string | undefined;
|
276
|
-
street?: string | undefined;
|
277
|
-
zipCode?: string | undefined;
|
359
|
+
number?: string | null | undefined;
|
360
|
+
town?: string | null | undefined;
|
361
|
+
residentialArea?: string | null | undefined;
|
362
|
+
street?: string | null | undefined;
|
363
|
+
zipCode?: string | null | undefined;
|
278
364
|
} | {
|
279
365
|
country: string;
|
280
366
|
district: string;
|
367
|
+
addressType: "DOMESTIC";
|
281
368
|
province: string;
|
282
369
|
urbanOrRural: "RURAL";
|
283
|
-
village?: string | undefined;
|
370
|
+
village?: string | null | undefined;
|
371
|
+
} | {
|
372
|
+
country: string;
|
373
|
+
state: string;
|
374
|
+
addressType: "INTERNATIONAL";
|
375
|
+
district2: string;
|
376
|
+
cityOrTown?: string | null | undefined;
|
377
|
+
addressLine1?: string | null | undefined;
|
378
|
+
addressLine2?: string | null | undefined;
|
379
|
+
addressLine3?: string | null | undefined;
|
380
|
+
postcodeOrZip?: string | null | undefined;
|
284
381
|
} | {
|
285
382
|
type: string;
|
286
383
|
option: string;
|
@@ -299,19 +396,31 @@ export declare const eventPayloadGenerator: {
|
|
299
396
|
} | {
|
300
397
|
country: string;
|
301
398
|
district: string;
|
399
|
+
addressType: "DOMESTIC";
|
302
400
|
province: string;
|
303
401
|
urbanOrRural: "URBAN";
|
304
|
-
number?: string | undefined;
|
305
|
-
town?: string | undefined;
|
306
|
-
residentialArea?: string | undefined;
|
307
|
-
street?: string | undefined;
|
308
|
-
zipCode?: string | undefined;
|
402
|
+
number?: string | null | undefined;
|
403
|
+
town?: string | null | undefined;
|
404
|
+
residentialArea?: string | null | undefined;
|
405
|
+
street?: string | null | undefined;
|
406
|
+
zipCode?: string | null | undefined;
|
309
407
|
} | {
|
310
408
|
country: string;
|
311
409
|
district: string;
|
410
|
+
addressType: "DOMESTIC";
|
312
411
|
province: string;
|
313
412
|
urbanOrRural: "RURAL";
|
314
|
-
village?: string | undefined;
|
413
|
+
village?: string | null | undefined;
|
414
|
+
} | {
|
415
|
+
country: string;
|
416
|
+
state: string;
|
417
|
+
addressType: "INTERNATIONAL";
|
418
|
+
district2: string;
|
419
|
+
cityOrTown?: string | null | undefined;
|
420
|
+
addressLine1?: string | null | undefined;
|
421
|
+
addressLine2?: string | null | undefined;
|
422
|
+
addressLine3?: string | null | undefined;
|
423
|
+
postcodeOrZip?: string | null | undefined;
|
315
424
|
} | {
|
316
425
|
type: string;
|
317
426
|
option: string;
|
@@ -331,19 +440,31 @@ export declare const eventPayloadGenerator: {
|
|
331
440
|
} | {
|
332
441
|
country: string;
|
333
442
|
district: string;
|
443
|
+
addressType: "DOMESTIC";
|
334
444
|
province: string;
|
335
445
|
urbanOrRural: "URBAN";
|
336
|
-
number?: string | undefined;
|
337
|
-
town?: string | undefined;
|
338
|
-
residentialArea?: string | undefined;
|
339
|
-
street?: string | undefined;
|
340
|
-
zipCode?: string | undefined;
|
446
|
+
number?: string | null | undefined;
|
447
|
+
town?: string | null | undefined;
|
448
|
+
residentialArea?: string | null | undefined;
|
449
|
+
street?: string | null | undefined;
|
450
|
+
zipCode?: string | null | undefined;
|
341
451
|
} | {
|
342
452
|
country: string;
|
343
453
|
district: string;
|
454
|
+
addressType: "DOMESTIC";
|
344
455
|
province: string;
|
345
456
|
urbanOrRural: "RURAL";
|
346
|
-
village?: string | undefined;
|
457
|
+
village?: string | null | undefined;
|
458
|
+
} | {
|
459
|
+
country: string;
|
460
|
+
state: string;
|
461
|
+
addressType: "INTERNATIONAL";
|
462
|
+
district2: string;
|
463
|
+
cityOrTown?: string | null | undefined;
|
464
|
+
addressLine1?: string | null | undefined;
|
465
|
+
addressLine2?: string | null | undefined;
|
466
|
+
addressLine3?: string | null | undefined;
|
467
|
+
postcodeOrZip?: string | null | undefined;
|
347
468
|
} | {
|
348
469
|
type: string;
|
349
470
|
option: string;
|
@@ -363,19 +484,31 @@ export declare const eventPayloadGenerator: {
|
|
363
484
|
} | {
|
364
485
|
country: string;
|
365
486
|
district: string;
|
487
|
+
addressType: "DOMESTIC";
|
366
488
|
province: string;
|
367
489
|
urbanOrRural: "URBAN";
|
368
|
-
number?: string | undefined;
|
369
|
-
town?: string | undefined;
|
370
|
-
residentialArea?: string | undefined;
|
371
|
-
street?: string | undefined;
|
372
|
-
zipCode?: string | undefined;
|
490
|
+
number?: string | null | undefined;
|
491
|
+
town?: string | null | undefined;
|
492
|
+
residentialArea?: string | null | undefined;
|
493
|
+
street?: string | null | undefined;
|
494
|
+
zipCode?: string | null | undefined;
|
373
495
|
} | {
|
374
496
|
country: string;
|
375
497
|
district: string;
|
498
|
+
addressType: "DOMESTIC";
|
376
499
|
province: string;
|
377
500
|
urbanOrRural: "RURAL";
|
378
|
-
village?: string | undefined;
|
501
|
+
village?: string | null | undefined;
|
502
|
+
} | {
|
503
|
+
country: string;
|
504
|
+
state: string;
|
505
|
+
addressType: "INTERNATIONAL";
|
506
|
+
district2: string;
|
507
|
+
cityOrTown?: string | null | undefined;
|
508
|
+
addressLine1?: string | null | undefined;
|
509
|
+
addressLine2?: string | null | undefined;
|
510
|
+
addressLine3?: string | null | undefined;
|
511
|
+
postcodeOrZip?: string | null | undefined;
|
379
512
|
} | {
|
380
513
|
type: string;
|
381
514
|
option: string;
|
@@ -395,19 +528,31 @@ export declare const eventPayloadGenerator: {
|
|
395
528
|
} | {
|
396
529
|
country: string;
|
397
530
|
district: string;
|
531
|
+
addressType: "DOMESTIC";
|
398
532
|
province: string;
|
399
533
|
urbanOrRural: "URBAN";
|
400
|
-
number?: string | undefined;
|
401
|
-
town?: string | undefined;
|
402
|
-
residentialArea?: string | undefined;
|
403
|
-
street?: string | undefined;
|
404
|
-
zipCode?: string | undefined;
|
534
|
+
number?: string | null | undefined;
|
535
|
+
town?: string | null | undefined;
|
536
|
+
residentialArea?: string | null | undefined;
|
537
|
+
street?: string | null | undefined;
|
538
|
+
zipCode?: string | null | undefined;
|
405
539
|
} | {
|
406
540
|
country: string;
|
407
541
|
district: string;
|
542
|
+
addressType: "DOMESTIC";
|
408
543
|
province: string;
|
409
544
|
urbanOrRural: "RURAL";
|
410
|
-
village?: string | undefined;
|
545
|
+
village?: string | null | undefined;
|
546
|
+
} | {
|
547
|
+
country: string;
|
548
|
+
state: string;
|
549
|
+
addressType: "INTERNATIONAL";
|
550
|
+
district2: string;
|
551
|
+
cityOrTown?: string | null | undefined;
|
552
|
+
addressLine1?: string | null | undefined;
|
553
|
+
addressLine2?: string | null | undefined;
|
554
|
+
addressLine3?: string | null | undefined;
|
555
|
+
postcodeOrZip?: string | null | undefined;
|
411
556
|
} | {
|
412
557
|
type: string;
|
413
558
|
option: string;
|
@@ -420,6 +565,11 @@ export declare const eventPayloadGenerator: {
|
|
420
565
|
};
|
421
566
|
};
|
422
567
|
};
|
568
|
+
export declare function generateActionDocument({ configuration, action, defaults }: {
|
569
|
+
configuration: EventConfig;
|
570
|
+
action: ActionType;
|
571
|
+
defaults?: Partial<ActionDocument>;
|
572
|
+
}): ActionDocument;
|
423
573
|
export declare function generateEventDocument({ configuration, actions }: {
|
424
574
|
configuration: EventConfig;
|
425
575
|
actions: ActionType[];
|
@@ -5,8 +5,10 @@ import { EventConfigInput } from './EventConfigInput';
|
|
5
5
|
import { EventMetadataKeys } from './EventMetadata';
|
6
6
|
import { FieldConfig } from './FieldConfig';
|
7
7
|
import { WorkqueueConfig } from './WorkqueueConfig';
|
8
|
-
import {
|
8
|
+
import { EventState } from './ActionDocument';
|
9
9
|
import { FormConfig } from './FormConfig';
|
10
|
+
import { Draft } from './Draft';
|
11
|
+
import { EventDocument } from './EventDocument';
|
10
12
|
/**
|
11
13
|
* @returns All the fields in the event configuration input.
|
12
14
|
*/
|
@@ -75,19 +77,24 @@ export declare const findActiveActionFormFields: (configuration: EventConfig, ac
|
|
75
77
|
* Returns all fields for the action type, including review fields, if any.
|
76
78
|
*/
|
77
79
|
export declare const findActiveActionFields: (configuration: EventConfig, action: ActionType) => FieldConfig[] | undefined;
|
80
|
+
export declare const getActiveActionFormPages: (configuration: EventConfig, action: ActionType) => {
|
81
|
+
id: string;
|
82
|
+
title: TranslationConfig;
|
83
|
+
fields: import("./FieldConfig").Inferred[];
|
84
|
+
}[];
|
78
85
|
/**
|
79
86
|
* Returns all fields for the action type, including review fields, or throws
|
80
87
|
*/
|
81
88
|
export declare function getActiveActionFields(configuration: EventConfig, action: ActionType): FieldConfig[];
|
82
89
|
export declare function getEventConfiguration(eventConfigurations: EventConfig[], type: string): EventConfig;
|
83
|
-
export declare function
|
84
|
-
export declare function stripHiddenFields(fields: FieldConfig[], data: ActionFormData): import("lodash").Dictionary<string | number | boolean | {
|
90
|
+
export declare function stripHiddenFields(fields: FieldConfig[], data: EventState): import("lodash").Dictionary<string | number | boolean | {
|
85
91
|
type: string;
|
86
92
|
filename: string;
|
87
93
|
originalFilename: string;
|
88
94
|
} | {
|
89
95
|
country: string;
|
90
96
|
district: string;
|
97
|
+
addressType: "DOMESTIC";
|
91
98
|
province: string;
|
92
99
|
urbanOrRural: "URBAN";
|
93
100
|
number?: string | undefined;
|
@@ -98,13 +105,126 @@ export declare function stripHiddenFields(fields: FieldConfig[], data: ActionFor
|
|
98
105
|
} | {
|
99
106
|
country: string;
|
100
107
|
district: string;
|
108
|
+
addressType: "DOMESTIC";
|
101
109
|
province: string;
|
102
110
|
urbanOrRural: "RURAL";
|
103
111
|
village?: string | undefined;
|
112
|
+
} | {
|
113
|
+
country: string;
|
114
|
+
state: string;
|
115
|
+
addressType: "INTERNATIONAL";
|
116
|
+
district2: string;
|
117
|
+
cityOrTown?: string | undefined;
|
118
|
+
addressLine1?: string | undefined;
|
119
|
+
addressLine2?: string | undefined;
|
120
|
+
addressLine3?: string | undefined;
|
121
|
+
postcodeOrZip?: string | undefined;
|
104
122
|
} | {
|
105
123
|
type: string;
|
106
124
|
option: string;
|
107
125
|
filename: string;
|
108
126
|
originalFilename: string;
|
109
127
|
}[]>;
|
128
|
+
export declare function findActiveDrafts(event: EventDocument, drafts: Draft[]): {
|
129
|
+
id: string;
|
130
|
+
createdAt: string;
|
131
|
+
eventId: string;
|
132
|
+
transactionId: string;
|
133
|
+
action: {
|
134
|
+
type: ActionType;
|
135
|
+
data: Record<string, string | number | boolean | {
|
136
|
+
type: string;
|
137
|
+
filename: string;
|
138
|
+
originalFilename: string;
|
139
|
+
} | {
|
140
|
+
country: string;
|
141
|
+
district: string;
|
142
|
+
addressType: "DOMESTIC";
|
143
|
+
province: string;
|
144
|
+
urbanOrRural: "URBAN";
|
145
|
+
number?: string | null | undefined;
|
146
|
+
town?: string | null | undefined;
|
147
|
+
residentialArea?: string | null | undefined;
|
148
|
+
street?: string | null | undefined;
|
149
|
+
zipCode?: string | null | undefined;
|
150
|
+
} | {
|
151
|
+
country: string;
|
152
|
+
district: string;
|
153
|
+
addressType: "DOMESTIC";
|
154
|
+
province: string;
|
155
|
+
urbanOrRural: "RURAL";
|
156
|
+
village?: string | null | undefined;
|
157
|
+
} | {
|
158
|
+
country: string;
|
159
|
+
state: string;
|
160
|
+
addressType: "INTERNATIONAL";
|
161
|
+
district2: string;
|
162
|
+
cityOrTown?: string | null | undefined;
|
163
|
+
addressLine1?: string | null | undefined;
|
164
|
+
addressLine2?: string | null | undefined;
|
165
|
+
addressLine3?: string | null | undefined;
|
166
|
+
postcodeOrZip?: string | null | undefined;
|
167
|
+
} | {
|
168
|
+
type: string;
|
169
|
+
option: string;
|
170
|
+
filename: string;
|
171
|
+
originalFilename: string;
|
172
|
+
}[]>;
|
173
|
+
createdAt: string;
|
174
|
+
createdBy: string;
|
175
|
+
createdAtLocation: string;
|
176
|
+
metadata?: Record<string, string | number | boolean | {
|
177
|
+
type: string;
|
178
|
+
filename: string;
|
179
|
+
originalFilename: string;
|
180
|
+
} | {
|
181
|
+
country: string;
|
182
|
+
district: string;
|
183
|
+
addressType: "DOMESTIC";
|
184
|
+
province: string;
|
185
|
+
urbanOrRural: "URBAN";
|
186
|
+
number?: string | null | undefined;
|
187
|
+
town?: string | null | undefined;
|
188
|
+
residentialArea?: string | null | undefined;
|
189
|
+
street?: string | null | undefined;
|
190
|
+
zipCode?: string | null | undefined;
|
191
|
+
} | {
|
192
|
+
country: string;
|
193
|
+
district: string;
|
194
|
+
addressType: "DOMESTIC";
|
195
|
+
province: string;
|
196
|
+
urbanOrRural: "RURAL";
|
197
|
+
village?: string | null | undefined;
|
198
|
+
} | {
|
199
|
+
country: string;
|
200
|
+
state: string;
|
201
|
+
addressType: "INTERNATIONAL";
|
202
|
+
district2: string;
|
203
|
+
cityOrTown?: string | null | undefined;
|
204
|
+
addressLine1?: string | null | undefined;
|
205
|
+
addressLine2?: string | null | undefined;
|
206
|
+
addressLine3?: string | null | undefined;
|
207
|
+
postcodeOrZip?: string | null | undefined;
|
208
|
+
} | {
|
209
|
+
type: string;
|
210
|
+
option: string;
|
211
|
+
filename: string;
|
212
|
+
originalFilename: string;
|
213
|
+
}[]> | undefined;
|
214
|
+
};
|
215
|
+
}[];
|
216
|
+
export declare function createEmptyDraft(eventId: string, draftId: string, actionType: ActionType): {
|
217
|
+
id: string;
|
218
|
+
eventId: string;
|
219
|
+
createdAt: string;
|
220
|
+
transactionId: import("../uuid").UUID;
|
221
|
+
action: {
|
222
|
+
type: ActionType;
|
223
|
+
data: {};
|
224
|
+
metadata: {};
|
225
|
+
createdAt: string;
|
226
|
+
createdBy: string;
|
227
|
+
createdAtLocation: string;
|
228
|
+
};
|
229
|
+
};
|
110
230
|
//# sourceMappingURL=utils.d.ts.map
|
@@ -239,6 +239,23 @@ function field(fieldId) {
|
|
239
239
|
}
|
240
240
|
},
|
241
241
|
required: ["$form"]
|
242
|
+
}),
|
243
|
+
isValidEnglishName: () => defineConditional({
|
244
|
+
type: "object",
|
245
|
+
properties: {
|
246
|
+
$form: {
|
247
|
+
type: "object",
|
248
|
+
properties: {
|
249
|
+
[fieldId]: {
|
250
|
+
type: "string",
|
251
|
+
pattern: "^[\\p{Script=Latin}0-9'._-]*(\\([\\p{Script=Latin}0-9'._-]+\\))?[\\p{Script=Latin}0-9'._-]*( [\\p{Script=Latin}0-9'._-]*(\\([\\p{Script=Latin}0-9'._-]+\\))?[\\p{Script=Latin}0-9'._-]*)*$",
|
252
|
+
description: "Name must contain only letters, numbers, and allowed special characters ('._-). No double spaces."
|
253
|
+
}
|
254
|
+
},
|
255
|
+
required: [fieldId]
|
256
|
+
}
|
257
|
+
},
|
258
|
+
required: ["$form"]
|
242
259
|
})
|
243
260
|
};
|
244
261
|
}
|