@opencrvs/toolkit 1.8.0-rc.f7910f3 → 1.8.0-rc.f876361
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 +1 -1
- package/dist/commons/api/router.d.ts +4276 -14979
- package/dist/commons/conditionals/conditionals.d.ts +16 -1
- package/dist/commons/events/ActionConfig.d.ts +1202 -6605
- package/dist/commons/events/ActionDocument.d.ts +7338 -244
- package/dist/commons/events/ActionInput.d.ts +1098 -256
- package/dist/commons/events/ActionType.d.ts +24 -16
- package/dist/commons/events/Draft.d.ts +42 -34
- package/dist/commons/events/EventConfig.d.ts +648 -2983
- package/dist/commons/events/EventConfigInput.d.ts +5 -2
- package/dist/commons/events/EventDocument.d.ts +695 -304
- package/dist/commons/events/EventIndex.d.ts +6 -3
- package/dist/commons/events/EventMetadata.d.ts +3 -0
- package/dist/commons/events/FieldConfig.d.ts +84 -22
- package/dist/commons/events/FormConfig.d.ts +559 -322
- package/dist/commons/events/PageConfig.d.ts +359 -0
- package/dist/commons/events/defineConfig.d.ts +28 -433
- package/dist/commons/events/index.d.ts +2 -1
- package/dist/commons/events/test.utils.d.ts +53 -182
- package/dist/commons/events/utils.d.ts +73 -177
- package/dist/conditionals/index.js +103 -15
- package/dist/events/index.js +833 -651
- package/package.json +1 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ActionDocument } from './ActionDocument';
|
1
|
+
import { ActionDocument, ActionUpdate } from './ActionDocument';
|
2
2
|
import { ArchiveActionInput, DeclareActionInput, RegisterActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, ValidateActionInput } from './ActionInput';
|
3
3
|
import { ActionType } from './ActionType';
|
4
4
|
import { Draft } from './Draft';
|
@@ -64,13 +64,13 @@ export declare const eventPayloadGenerator: {
|
|
64
64
|
transactionId: import("../uuid").UUID;
|
65
65
|
action: {
|
66
66
|
type: "REQUEST_CORRECTION";
|
67
|
-
|
67
|
+
declaration: {
|
68
68
|
'applicant.firstname': string;
|
69
69
|
'applicant.surname': string;
|
70
70
|
'applicant.dob': string;
|
71
71
|
'recommender.none': boolean;
|
72
72
|
};
|
73
|
-
|
73
|
+
annotation: {
|
74
74
|
'correction.requester.relationship': string;
|
75
75
|
'correction.request.reason': string;
|
76
76
|
};
|
@@ -84,8 +84,10 @@ export declare const eventPayloadGenerator: {
|
|
84
84
|
eventId: string;
|
85
85
|
transactionId: string;
|
86
86
|
action: {
|
87
|
-
type:
|
88
|
-
|
87
|
+
type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "CREATE" | "NOTIFY" | "DETECT_DUPLICATE" | "REJECT" | "MARKED_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
|
88
|
+
createdAt: string;
|
89
|
+
createdBy: string;
|
90
|
+
declaration: Record<string, string | number | boolean | {
|
89
91
|
type: string;
|
90
92
|
filename: string;
|
91
93
|
originalFilename: string;
|
@@ -123,10 +125,8 @@ export declare const eventPayloadGenerator: {
|
|
123
125
|
filename: string;
|
124
126
|
originalFilename: string;
|
125
127
|
}[] | undefined>;
|
126
|
-
createdAt: string;
|
127
|
-
createdBy: string;
|
128
128
|
createdAtLocation: string;
|
129
|
-
|
129
|
+
annotation?: Record<string, string | number | boolean | {
|
130
130
|
type: string;
|
131
131
|
filename: string;
|
132
132
|
originalFilename: string;
|
@@ -164,13 +164,14 @@ export declare const eventPayloadGenerator: {
|
|
164
164
|
filename: string;
|
165
165
|
originalFilename: string;
|
166
166
|
}[] | undefined> | undefined;
|
167
|
+
originalActionId?: string | undefined;
|
167
168
|
};
|
168
169
|
}>;
|
169
170
|
actions: {
|
170
|
-
declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, "transactionId" | "
|
171
|
+
declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, "transactionId" | "declaration" | "annotation">>) => {
|
171
172
|
type: "DECLARE";
|
172
173
|
transactionId: string;
|
173
|
-
|
174
|
+
declaration: Record<string, string | number | boolean | {
|
174
175
|
type: string;
|
175
176
|
filename: string;
|
176
177
|
originalFilename: string;
|
@@ -208,12 +209,19 @@ export declare const eventPayloadGenerator: {
|
|
208
209
|
filename: string;
|
209
210
|
originalFilename: string;
|
210
211
|
}[] | undefined>;
|
212
|
+
annotation: {};
|
211
213
|
eventId: string;
|
212
214
|
};
|
213
|
-
|
214
|
-
|
215
|
+
/**
|
216
|
+
* Notify allows sending incomplete data. Think it as 'partial declare' for now.
|
217
|
+
*/
|
218
|
+
notify: (eventId: string, input?: {
|
219
|
+
transactionId?: string;
|
220
|
+
declaration?: Partial<ActionUpdate>;
|
221
|
+
}) => {
|
222
|
+
type: "NOTIFY";
|
215
223
|
transactionId: string;
|
216
|
-
|
224
|
+
declaration: Partial<Record<string, string | number | boolean | {
|
217
225
|
type: string;
|
218
226
|
filename: string;
|
219
227
|
originalFilename: string;
|
@@ -250,14 +258,13 @@ export declare const eventPayloadGenerator: {
|
|
250
258
|
option: string;
|
251
259
|
filename: string;
|
252
260
|
originalFilename: string;
|
253
|
-
}[] | undefined
|
254
|
-
duplicates: never[];
|
261
|
+
}[] | undefined>>;
|
255
262
|
eventId: string;
|
256
263
|
};
|
257
|
-
|
258
|
-
type: "
|
264
|
+
validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "declaration" | "annotation">>) => {
|
265
|
+
type: "VALIDATE";
|
259
266
|
transactionId: string;
|
260
|
-
|
267
|
+
declaration: Record<string, string | number | boolean | {
|
261
268
|
type: string;
|
262
269
|
filename: string;
|
263
270
|
originalFilename: string;
|
@@ -295,60 +302,32 @@ export declare const eventPayloadGenerator: {
|
|
295
302
|
filename: string;
|
296
303
|
originalFilename: string;
|
297
304
|
}[] | undefined>;
|
298
|
-
|
305
|
+
annotation: {};
|
306
|
+
duplicates: never[];
|
307
|
+
eventId: string;
|
308
|
+
};
|
309
|
+
archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, "transactionId" | "declaration">>, isDuplicate?: boolean) => {
|
310
|
+
type: "ARCHIVE";
|
311
|
+
transactionId: string;
|
312
|
+
declaration: {};
|
313
|
+
annotation: {
|
299
314
|
isDuplicate: boolean;
|
300
315
|
};
|
301
316
|
duplicates: never[];
|
302
317
|
eventId: string;
|
303
318
|
};
|
304
|
-
reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, "transactionId" | "
|
319
|
+
reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, "transactionId" | "annotation">>) => {
|
305
320
|
type: "REJECT";
|
306
321
|
transactionId: string;
|
307
|
-
|
308
|
-
|
309
|
-
filename: string;
|
310
|
-
originalFilename: string;
|
311
|
-
} | {
|
312
|
-
country: string;
|
313
|
-
district: string;
|
314
|
-
addressType: "DOMESTIC";
|
315
|
-
province: string;
|
316
|
-
urbanOrRural: "URBAN";
|
317
|
-
number?: string | null | undefined;
|
318
|
-
town?: string | null | undefined;
|
319
|
-
residentialArea?: string | null | undefined;
|
320
|
-
street?: string | null | undefined;
|
321
|
-
zipCode?: string | null | undefined;
|
322
|
-
} | {
|
323
|
-
country: string;
|
324
|
-
district: string;
|
325
|
-
addressType: "DOMESTIC";
|
326
|
-
province: string;
|
327
|
-
urbanOrRural: "RURAL";
|
328
|
-
village?: string | null | undefined;
|
329
|
-
} | {
|
330
|
-
country: string;
|
331
|
-
state: string;
|
332
|
-
addressType: "INTERNATIONAL";
|
333
|
-
district2: string;
|
334
|
-
cityOrTown?: string | null | undefined;
|
335
|
-
addressLine1?: string | null | undefined;
|
336
|
-
addressLine2?: string | null | undefined;
|
337
|
-
addressLine3?: string | null | undefined;
|
338
|
-
postcodeOrZip?: string | null | undefined;
|
339
|
-
} | {
|
340
|
-
type: string;
|
341
|
-
option: string;
|
342
|
-
filename: string;
|
343
|
-
originalFilename: string;
|
344
|
-
}[] | undefined>;
|
322
|
+
declaration: {};
|
323
|
+
annotation: {};
|
345
324
|
duplicates: never[];
|
346
325
|
eventId: string;
|
347
326
|
};
|
348
|
-
register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "
|
327
|
+
register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "declaration" | "annotation">>) => {
|
349
328
|
type: "REGISTER";
|
350
329
|
transactionId: string;
|
351
|
-
|
330
|
+
declaration: Record<string, string | number | boolean | {
|
352
331
|
type: string;
|
353
332
|
filename: string;
|
354
333
|
originalFilename: string;
|
@@ -386,57 +365,21 @@ export declare const eventPayloadGenerator: {
|
|
386
365
|
filename: string;
|
387
366
|
originalFilename: string;
|
388
367
|
}[] | undefined>;
|
368
|
+
annotation: {};
|
389
369
|
eventId: string;
|
390
370
|
};
|
391
|
-
printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "
|
371
|
+
printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "annotation">>) => {
|
392
372
|
type: "PRINT_CERTIFICATE";
|
393
373
|
transactionId: string;
|
394
|
-
|
395
|
-
|
396
|
-
filename: string;
|
397
|
-
originalFilename: string;
|
398
|
-
} | {
|
399
|
-
country: string;
|
400
|
-
district: string;
|
401
|
-
addressType: "DOMESTIC";
|
402
|
-
province: string;
|
403
|
-
urbanOrRural: "URBAN";
|
404
|
-
number?: string | null | undefined;
|
405
|
-
town?: string | null | undefined;
|
406
|
-
residentialArea?: string | null | undefined;
|
407
|
-
street?: string | null | undefined;
|
408
|
-
zipCode?: string | null | undefined;
|
409
|
-
} | {
|
410
|
-
country: string;
|
411
|
-
district: string;
|
412
|
-
addressType: "DOMESTIC";
|
413
|
-
province: string;
|
414
|
-
urbanOrRural: "RURAL";
|
415
|
-
village?: string | null | undefined;
|
416
|
-
} | {
|
417
|
-
country: string;
|
418
|
-
state: string;
|
419
|
-
addressType: "INTERNATIONAL";
|
420
|
-
district2: string;
|
421
|
-
cityOrTown?: string | null | undefined;
|
422
|
-
addressLine1?: string | null | undefined;
|
423
|
-
addressLine2?: string | null | undefined;
|
424
|
-
addressLine3?: string | null | undefined;
|
425
|
-
postcodeOrZip?: string | null | undefined;
|
426
|
-
} | {
|
427
|
-
type: string;
|
428
|
-
option: string;
|
429
|
-
filename: string;
|
430
|
-
originalFilename: string;
|
431
|
-
}[] | undefined>;
|
432
|
-
metadata: {};
|
374
|
+
declaration: {};
|
375
|
+
annotation: {};
|
433
376
|
eventId: string;
|
434
377
|
};
|
435
378
|
correction: {
|
436
|
-
request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "
|
379
|
+
request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "declaration" | "annotation">>) => {
|
437
380
|
type: "REQUEST_CORRECTION";
|
438
381
|
transactionId: string;
|
439
|
-
|
382
|
+
declaration: Record<string, string | number | boolean | {
|
440
383
|
type: string;
|
441
384
|
filename: string;
|
442
385
|
originalFilename: string;
|
@@ -474,94 +417,22 @@ export declare const eventPayloadGenerator: {
|
|
474
417
|
filename: string;
|
475
418
|
originalFilename: string;
|
476
419
|
}[] | undefined>;
|
477
|
-
|
420
|
+
annotation: {};
|
478
421
|
eventId: string;
|
479
422
|
};
|
480
|
-
approve: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "
|
423
|
+
approve: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "annotation">>) => {
|
481
424
|
type: "APPROVE_CORRECTION";
|
482
425
|
transactionId: string;
|
483
|
-
|
484
|
-
|
485
|
-
filename: string;
|
486
|
-
originalFilename: string;
|
487
|
-
} | {
|
488
|
-
country: string;
|
489
|
-
district: string;
|
490
|
-
addressType: "DOMESTIC";
|
491
|
-
province: string;
|
492
|
-
urbanOrRural: "URBAN";
|
493
|
-
number?: string | null | undefined;
|
494
|
-
town?: string | null | undefined;
|
495
|
-
residentialArea?: string | null | undefined;
|
496
|
-
street?: string | null | undefined;
|
497
|
-
zipCode?: string | null | undefined;
|
498
|
-
} | {
|
499
|
-
country: string;
|
500
|
-
district: string;
|
501
|
-
addressType: "DOMESTIC";
|
502
|
-
province: string;
|
503
|
-
urbanOrRural: "RURAL";
|
504
|
-
village?: string | null | undefined;
|
505
|
-
} | {
|
506
|
-
country: string;
|
507
|
-
state: string;
|
508
|
-
addressType: "INTERNATIONAL";
|
509
|
-
district2: string;
|
510
|
-
cityOrTown?: string | null | undefined;
|
511
|
-
addressLine1?: string | null | undefined;
|
512
|
-
addressLine2?: string | null | undefined;
|
513
|
-
addressLine3?: string | null | undefined;
|
514
|
-
postcodeOrZip?: string | null | undefined;
|
515
|
-
} | {
|
516
|
-
type: string;
|
517
|
-
option: string;
|
518
|
-
filename: string;
|
519
|
-
originalFilename: string;
|
520
|
-
}[] | undefined>;
|
426
|
+
declaration: {};
|
427
|
+
annotation: {};
|
521
428
|
eventId: string;
|
522
429
|
requestId: string;
|
523
430
|
};
|
524
|
-
reject: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "
|
431
|
+
reject: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "annotation">>) => {
|
525
432
|
type: "REJECT_CORRECTION";
|
526
433
|
transactionId: string;
|
527
|
-
|
528
|
-
|
529
|
-
filename: string;
|
530
|
-
originalFilename: string;
|
531
|
-
} | {
|
532
|
-
country: string;
|
533
|
-
district: string;
|
534
|
-
addressType: "DOMESTIC";
|
535
|
-
province: string;
|
536
|
-
urbanOrRural: "URBAN";
|
537
|
-
number?: string | null | undefined;
|
538
|
-
town?: string | null | undefined;
|
539
|
-
residentialArea?: string | null | undefined;
|
540
|
-
street?: string | null | undefined;
|
541
|
-
zipCode?: string | null | undefined;
|
542
|
-
} | {
|
543
|
-
country: string;
|
544
|
-
district: string;
|
545
|
-
addressType: "DOMESTIC";
|
546
|
-
province: string;
|
547
|
-
urbanOrRural: "RURAL";
|
548
|
-
village?: string | null | undefined;
|
549
|
-
} | {
|
550
|
-
country: string;
|
551
|
-
state: string;
|
552
|
-
addressType: "INTERNATIONAL";
|
553
|
-
district2: string;
|
554
|
-
cityOrTown?: string | null | undefined;
|
555
|
-
addressLine1?: string | null | undefined;
|
556
|
-
addressLine2?: string | null | undefined;
|
557
|
-
addressLine3?: string | null | undefined;
|
558
|
-
postcodeOrZip?: string | null | undefined;
|
559
|
-
} | {
|
560
|
-
type: string;
|
561
|
-
option: string;
|
562
|
-
filename: string;
|
563
|
-
originalFilename: string;
|
564
|
-
}[] | undefined>;
|
434
|
+
declaration: {};
|
435
|
+
annotation: {};
|
565
436
|
eventId: string;
|
566
437
|
requestId: string;
|
567
438
|
};
|
@@ -577,7 +448,7 @@ export declare function generateEventDocument({ configuration, actions }: {
|
|
577
448
|
configuration: EventConfig;
|
578
449
|
actions: ActionType[];
|
579
450
|
}): EventDocument;
|
580
|
-
export declare function generateEventDraftDocument(eventId: string, actionType?: ActionType,
|
451
|
+
export declare function generateEventDraftDocument(eventId: string, actionType?: ActionType, declaration?: Record<string, FieldValue>): Draft;
|
581
452
|
export declare const eventQueryDataGenerator: (overrides?: Partial<EventIndex>) => EventIndex;
|
582
453
|
export declare const generateTranslationConfig: (message: string) => TranslationConfig;
|
583
454
|
//# sourceMappingURL=test.utils.d.ts.map
|
@@ -1,175 +1,50 @@
|
|
1
|
-
import {
|
2
|
-
import { ActionType } from './ActionType';
|
1
|
+
import { ActionType, DeclarationAction } from './ActionType';
|
3
2
|
import { EventConfig } from './EventConfig';
|
4
|
-
import { EventConfigInput } from './EventConfigInput';
|
5
|
-
import { EventMetadataKeys } from './EventMetadata';
|
6
3
|
import { FieldConfig } from './FieldConfig';
|
7
4
|
import { WorkqueueConfig } from './WorkqueueConfig';
|
8
5
|
import { ActionUpdate, EventState } from './ActionDocument';
|
9
|
-
import {
|
6
|
+
import { PageConfig, VerificationPageConfig } from './PageConfig';
|
10
7
|
import { Draft } from './Draft';
|
11
8
|
import { EventDocument } from './EventDocument';
|
12
|
-
|
13
|
-
|
14
|
-
*/
|
15
|
-
export declare const findInputPageFields: (config: EventConfigInput) => {
|
16
|
-
id: string;
|
17
|
-
label: TranslationConfig;
|
18
|
-
}[];
|
9
|
+
import { ActionConfig } from './ActionConfig';
|
10
|
+
import { FormConfig } from './FormConfig';
|
19
11
|
/**
|
20
12
|
* @returns All the fields in the event configuration.
|
21
13
|
*/
|
22
|
-
export declare const
|
14
|
+
export declare const findAllFields: (config: EventConfig) => FieldConfig[];
|
15
|
+
export declare const getAllAnnotationFields: (config: EventConfig) => FieldConfig[];
|
16
|
+
export declare const getActionAnnotationFields: (actionConfig: ActionConfig) => import("./FieldConfig").Inferred[];
|
23
17
|
/**
|
24
|
-
*
|
25
|
-
* @param pageFields - All the fields in the event configuration
|
26
|
-
* @param refFields - The fields referencing values within the event configuration (e.g. summary fields) or within system provided metadata fields (e.g. createdAt, updatedBy)
|
27
|
-
* @returns referenced fields with populated labels
|
18
|
+
* @TODO: Request correction should have same format as print certificate
|
28
19
|
*/
|
29
|
-
export declare const
|
30
|
-
|
31
|
-
|
32
|
-
label: TranslationConfig;
|
33
|
-
}[];
|
34
|
-
refFields: {
|
35
|
-
id: EventMetadataKeys | string;
|
36
|
-
label?: TranslationConfig;
|
37
|
-
}[];
|
38
|
-
}) => {
|
39
|
-
id: EventMetadataKeys | string;
|
40
|
-
label?: TranslationConfig;
|
41
|
-
}[];
|
42
|
-
export declare function getAllFields(configuration: EventConfig): import("./FieldConfig").Inferred[];
|
43
|
-
export declare function getAllPages(configuration: EventConfig): ({
|
20
|
+
export declare const findRecordActionPages: (config: EventConfig, actionType: ActionType) => PageConfig[];
|
21
|
+
export declare function getDeclarationFields(configuration: EventConfig): FieldConfig[];
|
22
|
+
export declare function getDeclarationPages(configuration: EventConfig): {
|
44
23
|
type: "FORM";
|
45
24
|
id: string;
|
46
|
-
title: TranslationConfig;
|
47
|
-
fields: import("./FieldConfig").Inferred[];
|
48
|
-
conditional?: import(".").JSONSchema | undefined;
|
49
|
-
} | {
|
50
|
-
type: "VERIFICATION";
|
51
|
-
id: string;
|
52
|
-
title: TranslationConfig;
|
53
|
-
actions: {
|
54
|
-
verify: {
|
55
|
-
label: TranslationConfig;
|
56
|
-
};
|
57
|
-
cancel: {
|
58
|
-
label: TranslationConfig;
|
59
|
-
confirmation: {
|
60
|
-
title: TranslationConfig;
|
61
|
-
body: TranslationConfig;
|
62
|
-
};
|
63
|
-
};
|
64
|
-
};
|
25
|
+
title: import("./TranslationConfig").TranslationConfig;
|
65
26
|
fields: import("./FieldConfig").Inferred[];
|
66
27
|
conditional?: import(".").JSONSchema | undefined;
|
67
|
-
}
|
68
|
-
export declare function
|
69
|
-
|
70
|
-
|
71
|
-
version: {
|
72
|
-
id: string;
|
73
|
-
label: TranslationConfig;
|
74
|
-
};
|
75
|
-
label: TranslationConfig;
|
76
|
-
pages: ({
|
28
|
+
}[];
|
29
|
+
export declare function getDeclaration(configuration: EventConfig): {
|
30
|
+
label: import("./TranslationConfig").TranslationConfig;
|
31
|
+
pages: {
|
77
32
|
type: "FORM";
|
78
33
|
id: string;
|
79
|
-
title: TranslationConfig;
|
34
|
+
title: import("./TranslationConfig").TranslationConfig;
|
80
35
|
fields: import("./FieldConfig").Inferred[];
|
81
36
|
conditional?: import(".").JSONSchema | undefined;
|
82
|
-
}
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
verify: {
|
88
|
-
label: TranslationConfig;
|
89
|
-
};
|
90
|
-
cancel: {
|
91
|
-
label: TranslationConfig;
|
92
|
-
confirmation: {
|
93
|
-
title: TranslationConfig;
|
94
|
-
body: TranslationConfig;
|
95
|
-
};
|
96
|
-
};
|
97
|
-
};
|
98
|
-
fields: import("./FieldConfig").Inferred[];
|
99
|
-
conditional?: import(".").JSONSchema | undefined;
|
100
|
-
})[];
|
101
|
-
review: {
|
102
|
-
title: TranslationConfig;
|
103
|
-
fields: import("./FieldConfig").Inferred[];
|
104
|
-
};
|
105
|
-
} | undefined;
|
106
|
-
export declare const findActiveActionFormPages: (configuration: EventConfig, action: ActionType) => ({
|
107
|
-
type: "FORM";
|
108
|
-
id: string;
|
109
|
-
title: TranslationConfig;
|
110
|
-
fields: import("./FieldConfig").Inferred[];
|
111
|
-
conditional?: import(".").JSONSchema | undefined;
|
112
|
-
} | {
|
113
|
-
type: "VERIFICATION";
|
114
|
-
id: string;
|
115
|
-
title: TranslationConfig;
|
116
|
-
actions: {
|
117
|
-
verify: {
|
118
|
-
label: TranslationConfig;
|
119
|
-
};
|
120
|
-
cancel: {
|
121
|
-
label: TranslationConfig;
|
122
|
-
confirmation: {
|
123
|
-
title: TranslationConfig;
|
124
|
-
body: TranslationConfig;
|
125
|
-
};
|
126
|
-
};
|
127
|
-
};
|
37
|
+
}[];
|
38
|
+
};
|
39
|
+
export declare function getActionReviewFields(configuration: EventConfig, actionType: DeclarationAction): import("./FieldConfig").Inferred[];
|
40
|
+
export declare function getActionReview(configuration: EventConfig, actionType: ActionType): {
|
41
|
+
title: import("./TranslationConfig").TranslationConfig;
|
128
42
|
fields: import("./FieldConfig").Inferred[];
|
129
|
-
|
130
|
-
|
131
|
-
export declare
|
132
|
-
export declare function isPageVisible(page: FormPageConfig, formValues: ActionUpdate): boolean;
|
43
|
+
};
|
44
|
+
export declare function validateWorkqueueConfig(workqueueConfigs: WorkqueueConfig[]): void;
|
45
|
+
export declare function isPageVisible(page: PageConfig, formValues: ActionUpdate): boolean;
|
133
46
|
export declare const getVisiblePagesFormFields: (formConfig: FormConfig, formData: ActionUpdate) => import("./FieldConfig").Inferred[];
|
134
|
-
|
135
|
-
* Returns only form fields for the action type, if any, excluding review fields.
|
136
|
-
*/
|
137
|
-
export declare const findActiveActionFormFields: (configuration: EventConfig, action: ActionType) => FieldConfig[] | undefined;
|
138
|
-
/**
|
139
|
-
* Returns all fields for the action type, including review fields, if any.
|
140
|
-
*/
|
141
|
-
export declare const findActiveActionFields: (configuration: EventConfig, action: ActionType, formData?: ActionUpdate) => FieldConfig[] | undefined;
|
142
|
-
export declare const getActiveActionFormPages: (configuration: EventConfig, action: ActionType) => ({
|
143
|
-
type: "FORM";
|
144
|
-
id: string;
|
145
|
-
title: TranslationConfig;
|
146
|
-
fields: import("./FieldConfig").Inferred[];
|
147
|
-
conditional?: import(".").JSONSchema | undefined;
|
148
|
-
} | {
|
149
|
-
type: "VERIFICATION";
|
150
|
-
id: string;
|
151
|
-
title: TranslationConfig;
|
152
|
-
actions: {
|
153
|
-
verify: {
|
154
|
-
label: TranslationConfig;
|
155
|
-
};
|
156
|
-
cancel: {
|
157
|
-
label: TranslationConfig;
|
158
|
-
confirmation: {
|
159
|
-
title: TranslationConfig;
|
160
|
-
body: TranslationConfig;
|
161
|
-
};
|
162
|
-
};
|
163
|
-
};
|
164
|
-
fields: import("./FieldConfig").Inferred[];
|
165
|
-
conditional?: import(".").JSONSchema | undefined;
|
166
|
-
})[];
|
167
|
-
/**
|
168
|
-
* Returns all fields for the action type, including review fields, or throws
|
169
|
-
*/
|
170
|
-
export declare function getActiveActionFields(configuration: EventConfig, action: ActionType): FieldConfig[];
|
171
|
-
export declare function getEventConfiguration(eventConfigurations: EventConfig[], type: string): EventConfig;
|
172
|
-
export declare function stripHiddenFields(fields: FieldConfig[], data: EventState): import("lodash").Dictionary<string | number | boolean | {
|
47
|
+
export declare function stripHiddenFields(fields: FieldConfig[], declaration: EventState): import("lodash").Dictionary<string | number | boolean | {
|
173
48
|
type: string;
|
174
49
|
filename: string;
|
175
50
|
originalFilename: string;
|
@@ -213,8 +88,10 @@ export declare function findActiveDrafts(event: EventDocument, drafts: Draft[]):
|
|
213
88
|
eventId: string;
|
214
89
|
transactionId: string;
|
215
90
|
action: {
|
216
|
-
type:
|
217
|
-
|
91
|
+
type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "CREATE" | "NOTIFY" | "DETECT_DUPLICATE" | "REJECT" | "MARKED_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
|
92
|
+
createdAt: string;
|
93
|
+
createdBy: string;
|
94
|
+
declaration: Record<string, string | number | boolean | {
|
218
95
|
type: string;
|
219
96
|
filename: string;
|
220
97
|
originalFilename: string;
|
@@ -252,10 +129,8 @@ export declare function findActiveDrafts(event: EventDocument, drafts: Draft[]):
|
|
252
129
|
filename: string;
|
253
130
|
originalFilename: string;
|
254
131
|
}[] | undefined>;
|
255
|
-
createdAt: string;
|
256
|
-
createdBy: string;
|
257
132
|
createdAtLocation: string;
|
258
|
-
|
133
|
+
annotation?: Record<string, string | number | boolean | {
|
259
134
|
type: string;
|
260
135
|
filename: string;
|
261
136
|
originalFilename: string;
|
@@ -293,6 +168,7 @@ export declare function findActiveDrafts(event: EventDocument, drafts: Draft[]):
|
|
293
168
|
filename: string;
|
294
169
|
originalFilename: string;
|
295
170
|
}[] | undefined> | undefined;
|
171
|
+
originalActionId?: string | undefined;
|
296
172
|
};
|
297
173
|
}[];
|
298
174
|
export declare function createEmptyDraft(eventId: string, draftId: string, actionType: ActionType): {
|
@@ -302,30 +178,50 @@ export declare function createEmptyDraft(eventId: string, draftId: string, actio
|
|
302
178
|
transactionId: import("../uuid").UUID;
|
303
179
|
action: {
|
304
180
|
type: ActionType;
|
305
|
-
|
306
|
-
|
181
|
+
declaration: {};
|
182
|
+
annotation: {};
|
307
183
|
createdAt: string;
|
308
184
|
createdBy: string;
|
309
185
|
createdAtLocation: string;
|
310
186
|
};
|
311
187
|
};
|
312
|
-
export declare function isVerificationPage(page:
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
188
|
+
export declare function isVerificationPage(page: PageConfig): page is VerificationPageConfig;
|
189
|
+
export declare function deepMerge(currentDocument: ActionUpdate, actionDocument: ActionUpdate): Record<string, string | number | boolean | {
|
190
|
+
type: string;
|
191
|
+
filename: string;
|
192
|
+
originalFilename: string;
|
193
|
+
} | {
|
194
|
+
country: string;
|
195
|
+
district: string;
|
196
|
+
addressType: "DOMESTIC";
|
197
|
+
province: string;
|
198
|
+
urbanOrRural: "URBAN";
|
199
|
+
number?: string | null | undefined;
|
200
|
+
town?: string | null | undefined;
|
201
|
+
residentialArea?: string | null | undefined;
|
202
|
+
street?: string | null | undefined;
|
203
|
+
zipCode?: string | null | undefined;
|
204
|
+
} | {
|
205
|
+
country: string;
|
206
|
+
district: string;
|
207
|
+
addressType: "DOMESTIC";
|
208
|
+
province: string;
|
209
|
+
urbanOrRural: "RURAL";
|
210
|
+
village?: string | null | undefined;
|
211
|
+
} | {
|
212
|
+
country: string;
|
213
|
+
state: string;
|
214
|
+
addressType: "INTERNATIONAL";
|
215
|
+
district2: string;
|
216
|
+
cityOrTown?: string | null | undefined;
|
217
|
+
addressLine1?: string | null | undefined;
|
218
|
+
addressLine2?: string | null | undefined;
|
219
|
+
addressLine3?: string | null | undefined;
|
220
|
+
postcodeOrZip?: string | null | undefined;
|
221
|
+
} | {
|
222
|
+
type: string;
|
223
|
+
option: string;
|
224
|
+
filename: string;
|
225
|
+
originalFilename: string;
|
226
|
+
}[] | undefined>;
|
331
227
|
//# sourceMappingURL=utils.d.ts.map
|