@opencrvs/toolkit 1.8.0-rc.f9911ed → 1.8.0-rc.faacbde

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.
@@ -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
- data: {
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
- metadata: {
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: ActionType;
88
- data: Record<string, string | number | boolean | {
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
- metadata?: Record<string, string | number | boolean | {
129
+ annotation?: Record<string, string | number | boolean | {
130
130
  type: string;
131
131
  filename: string;
132
132
  originalFilename: string;
@@ -167,10 +167,10 @@ export declare const eventPayloadGenerator: {
167
167
  };
168
168
  }>;
169
169
  actions: {
170
- declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, "transactionId" | "data">>) => {
170
+ declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, "transactionId" | "declaration" | "annotation">>) => {
171
171
  type: "DECLARE";
172
172
  transactionId: string;
173
- data: Record<string, string | number | boolean | {
173
+ declaration: Record<string, string | number | boolean | {
174
174
  type: string;
175
175
  filename: string;
176
176
  originalFilename: string;
@@ -208,12 +208,19 @@ export declare const eventPayloadGenerator: {
208
208
  filename: string;
209
209
  originalFilename: string;
210
210
  }[] | undefined>;
211
+ annotation: {};
211
212
  eventId: string;
212
213
  };
213
- validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "data">>) => {
214
- type: "VALIDATE";
214
+ /**
215
+ * Notify allows sending incomplete data. Think it as 'partial declare' for now.
216
+ */
217
+ notify: (eventId: string, input?: {
218
+ transactionId?: string;
219
+ declaration?: Partial<ActionUpdate>;
220
+ }) => {
221
+ type: "NOTIFY";
215
222
  transactionId: string;
216
- data: Record<string, string | number | boolean | {
223
+ declaration: Partial<Record<string, string | number | boolean | {
217
224
  type: string;
218
225
  filename: string;
219
226
  originalFilename: string;
@@ -250,14 +257,13 @@ export declare const eventPayloadGenerator: {
250
257
  option: string;
251
258
  filename: string;
252
259
  originalFilename: string;
253
- }[] | undefined>;
254
- duplicates: never[];
260
+ }[] | undefined>>;
255
261
  eventId: string;
256
262
  };
257
- archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, "transactionId" | "data">>, isDuplicate?: boolean) => {
258
- type: "ARCHIVE";
263
+ validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "declaration" | "annotation">>) => {
264
+ type: "VALIDATE";
259
265
  transactionId: string;
260
- data: Record<string, string | number | boolean | {
266
+ declaration: Record<string, string | number | boolean | {
261
267
  type: string;
262
268
  filename: string;
263
269
  originalFilename: string;
@@ -295,60 +301,32 @@ export declare const eventPayloadGenerator: {
295
301
  filename: string;
296
302
  originalFilename: string;
297
303
  }[] | undefined>;
298
- metadata: {
304
+ annotation: {};
305
+ duplicates: never[];
306
+ eventId: string;
307
+ };
308
+ archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, "transactionId" | "declaration">>, isDuplicate?: boolean) => {
309
+ type: "ARCHIVE";
310
+ transactionId: string;
311
+ declaration: {};
312
+ annotation: {
299
313
  isDuplicate: boolean;
300
314
  };
301
315
  duplicates: never[];
302
316
  eventId: string;
303
317
  };
304
- reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, "transactionId" | "data">>) => {
318
+ reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, "transactionId" | "annotation">>) => {
305
319
  type: "REJECT";
306
320
  transactionId: string;
307
- data: Record<string, string | number | boolean | {
308
- type: string;
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>;
321
+ declaration: {};
322
+ annotation: {};
345
323
  duplicates: never[];
346
324
  eventId: string;
347
325
  };
348
- register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "data">>) => {
326
+ register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "declaration" | "annotation">>) => {
349
327
  type: "REGISTER";
350
328
  transactionId: string;
351
- data: Record<string, string | number | boolean | {
329
+ declaration: Record<string, string | number | boolean | {
352
330
  type: string;
353
331
  filename: string;
354
332
  originalFilename: string;
@@ -386,57 +364,21 @@ export declare const eventPayloadGenerator: {
386
364
  filename: string;
387
365
  originalFilename: string;
388
366
  }[] | undefined>;
367
+ annotation: {};
389
368
  eventId: string;
390
369
  };
391
- printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "data" | "metadata">>) => {
370
+ printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "annotation">>) => {
392
371
  type: "PRINT_CERTIFICATE";
393
372
  transactionId: string;
394
- data: Record<string, string | number | boolean | {
395
- type: string;
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: {};
373
+ declaration: {};
374
+ annotation: {};
433
375
  eventId: string;
434
376
  };
435
377
  correction: {
436
- request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "data">>) => {
378
+ request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "declaration" | "annotation">>) => {
437
379
  type: "REQUEST_CORRECTION";
438
380
  transactionId: string;
439
- data: Record<string, string | number | boolean | {
381
+ declaration: Record<string, string | number | boolean | {
440
382
  type: string;
441
383
  filename: string;
442
384
  originalFilename: string;
@@ -474,94 +416,22 @@ export declare const eventPayloadGenerator: {
474
416
  filename: string;
475
417
  originalFilename: string;
476
418
  }[] | undefined>;
477
- metadata: {};
419
+ annotation: {};
478
420
  eventId: string;
479
421
  };
480
- approve: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "data">>) => {
422
+ approve: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "annotation">>) => {
481
423
  type: "APPROVE_CORRECTION";
482
424
  transactionId: string;
483
- data: Record<string, string | number | boolean | {
484
- type: string;
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>;
425
+ declaration: {};
426
+ annotation: {};
521
427
  eventId: string;
522
428
  requestId: string;
523
429
  };
524
- reject: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "data">>) => {
430
+ reject: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "annotation">>) => {
525
431
  type: "REJECT_CORRECTION";
526
432
  transactionId: string;
527
- data: Record<string, string | number | boolean | {
528
- type: string;
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>;
433
+ declaration: {};
434
+ annotation: {};
565
435
  eventId: string;
566
436
  requestId: string;
567
437
  };
@@ -577,7 +447,7 @@ export declare function generateEventDocument({ configuration, actions }: {
577
447
  configuration: EventConfig;
578
448
  actions: ActionType[];
579
449
  }): EventDocument;
580
- export declare function generateEventDraftDocument(eventId: string, actionType?: ActionType, data?: Record<string, FieldValue>): Draft;
450
+ export declare function generateEventDraftDocument(eventId: string, actionType?: ActionType, declaration?: Record<string, FieldValue>): Draft;
581
451
  export declare const eventQueryDataGenerator: (overrides?: Partial<EventIndex>) => EventIndex;
582
452
  export declare const generateTranslationConfig: (message: string) => TranslationConfig;
583
453
  //# sourceMappingURL=test.utils.d.ts.map
@@ -1,165 +1,50 @@
1
- import { TranslationConfig } from './TranslationConfig';
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
- import { EventState } from './ActionDocument';
9
- import { FormConfig } from './FormConfig';
5
+ import { ActionUpdate, EventState } from './ActionDocument';
6
+ import { PageConfig, VerificationPageConfig } from './PageConfig';
10
7
  import { Draft } from './Draft';
11
8
  import { EventDocument } from './EventDocument';
12
- /**
13
- * @returns All the fields in the event configuration input.
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 findPageFields: (config: EventConfig) => FieldConfig[];
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 resolveLabelsFromKnownFields: ({ pageFields, refFields }: {
30
- pageFields: {
31
- id: string;
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;
25
+ title: import("./TranslationConfig").TranslationConfig;
47
26
  fields: import("./FieldConfig").Inferred[];
48
- } | {
49
- type: "VERIFICATION";
50
- id: string;
51
- title: TranslationConfig;
52
- actions: {
53
- verify: {
54
- label: TranslationConfig;
55
- };
56
- cancel: {
57
- label: TranslationConfig;
58
- confirmation: {
59
- title: TranslationConfig;
60
- body: TranslationConfig;
61
- };
62
- };
63
- };
64
- fields: import("./FieldConfig").Inferred[];
65
- })[];
66
- export declare function validateWorkqueueConfig(workqueueConfigs: WorkqueueConfig[]): void;
67
- export declare const findActiveActionForm: (configuration: EventConfig, action: ActionType) => {
68
- active: boolean;
69
- version: {
70
- id: string;
71
- label: TranslationConfig;
72
- };
73
- label: TranslationConfig;
74
- pages: ({
27
+ conditional?: import(".").JSONSchema | undefined;
28
+ }[];
29
+ export declare function getDeclaration(configuration: EventConfig): {
30
+ label: import("./TranslationConfig").TranslationConfig;
31
+ pages: {
75
32
  type: "FORM";
76
33
  id: string;
77
- title: TranslationConfig;
78
- fields: import("./FieldConfig").Inferred[];
79
- } | {
80
- type: "VERIFICATION";
81
- id: string;
82
- title: TranslationConfig;
83
- actions: {
84
- verify: {
85
- label: TranslationConfig;
86
- };
87
- cancel: {
88
- label: TranslationConfig;
89
- confirmation: {
90
- title: TranslationConfig;
91
- body: TranslationConfig;
92
- };
93
- };
94
- };
95
- fields: import("./FieldConfig").Inferred[];
96
- })[];
97
- review: {
98
- title: TranslationConfig;
34
+ title: import("./TranslationConfig").TranslationConfig;
99
35
  fields: import("./FieldConfig").Inferred[];
100
- };
101
- } | undefined;
102
- export declare const findActiveActionFormPages: (configuration: EventConfig, action: ActionType) => ({
103
- type: "FORM";
104
- id: string;
105
- title: TranslationConfig;
106
- fields: import("./FieldConfig").Inferred[];
107
- } | {
108
- type: "VERIFICATION";
109
- id: string;
110
- title: TranslationConfig;
111
- actions: {
112
- verify: {
113
- label: TranslationConfig;
114
- };
115
- cancel: {
116
- label: TranslationConfig;
117
- confirmation: {
118
- title: TranslationConfig;
119
- body: TranslationConfig;
120
- };
121
- };
122
- };
123
- fields: import("./FieldConfig").Inferred[];
124
- })[] | undefined;
125
- export declare const getFormFields: (formConfig: FormConfig) => import("./FieldConfig").Inferred[];
126
- /**
127
- * Returns only form fields for the action type, if any, excluding review fields.
128
- */
129
- export declare const findActiveActionFormFields: (configuration: EventConfig, action: ActionType) => FieldConfig[] | undefined;
130
- /**
131
- * Returns all fields for the action type, including review fields, if any.
132
- */
133
- export declare const findActiveActionFields: (configuration: EventConfig, action: ActionType) => FieldConfig[] | undefined;
134
- export declare const getActiveActionFormPages: (configuration: EventConfig, action: ActionType) => ({
135
- type: "FORM";
136
- id: string;
137
- title: TranslationConfig;
138
- fields: import("./FieldConfig").Inferred[];
139
- } | {
140
- type: "VERIFICATION";
141
- id: string;
142
- title: TranslationConfig;
143
- actions: {
144
- verify: {
145
- label: TranslationConfig;
146
- };
147
- cancel: {
148
- label: TranslationConfig;
149
- confirmation: {
150
- title: TranslationConfig;
151
- body: TranslationConfig;
152
- };
153
- };
154
- };
36
+ conditional?: import(".").JSONSchema | undefined;
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;
155
42
  fields: import("./FieldConfig").Inferred[];
156
- })[];
157
- /**
158
- * Returns all fields for the action type, including review fields, or throws
159
- */
160
- export declare function getActiveActionFields(configuration: EventConfig, action: ActionType): FieldConfig[];
161
- export declare function getEventConfiguration(eventConfigurations: EventConfig[], type: string): EventConfig;
162
- export declare function stripHiddenFields(fields: FieldConfig[], data: EventState): import("lodash").Dictionary<string | number | boolean | {
43
+ };
44
+ export declare function validateWorkqueueConfig(workqueueConfigs: WorkqueueConfig[]): void;
45
+ export declare function isPageVisible(page: PageConfig, formValues: ActionUpdate): boolean;
46
+ export declare const getVisiblePagesFormFields: (formConfig: FormConfig, formData: ActionUpdate) => import("./FieldConfig").Inferred[];
47
+ export declare function stripHiddenFields(fields: FieldConfig[], declaration: EventState): import("lodash").Dictionary<string | number | boolean | {
163
48
  type: string;
164
49
  filename: string;
165
50
  originalFilename: string;
@@ -203,8 +88,10 @@ export declare function findActiveDrafts(event: EventDocument, drafts: Draft[]):
203
88
  eventId: string;
204
89
  transactionId: string;
205
90
  action: {
206
- type: ActionType;
207
- data: Record<string, string | number | boolean | {
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 | {
208
95
  type: string;
209
96
  filename: string;
210
97
  originalFilename: string;
@@ -242,10 +129,8 @@ export declare function findActiveDrafts(event: EventDocument, drafts: Draft[]):
242
129
  filename: string;
243
130
  originalFilename: string;
244
131
  }[] | undefined>;
245
- createdAt: string;
246
- createdBy: string;
247
132
  createdAtLocation: string;
248
- metadata?: Record<string, string | number | boolean | {
133
+ annotation?: Record<string, string | number | boolean | {
249
134
  type: string;
250
135
  filename: string;
251
136
  originalFilename: string;
@@ -292,12 +177,12 @@ export declare function createEmptyDraft(eventId: string, draftId: string, actio
292
177
  transactionId: import("../uuid").UUID;
293
178
  action: {
294
179
  type: ActionType;
295
- data: {};
296
- metadata: {};
180
+ declaration: {};
181
+ annotation: {};
297
182
  createdAt: string;
298
183
  createdBy: string;
299
184
  createdAtLocation: string;
300
185
  };
301
186
  };
302
- export declare function findActiveActionVerificationPageIds(configuration: EventConfig, action: ActionType): string[];
187
+ export declare function isVerificationPage(page: PageConfig): page is VerificationPageConfig;
303
188
  //# sourceMappingURL=utils.d.ts.map
@@ -256,6 +256,44 @@ function field(fieldId) {
256
256
  }
257
257
  },
258
258
  required: ["$form"]
259
+ }),
260
+ /**
261
+ * Checks if the field value matches a given regular expression pattern.
262
+ * @param pattern - The regular expression pattern to match the field value against.
263
+ * @returns A JSONSchema conditional that validates the field value against the pattern.
264
+ */
265
+ matches: (pattern) => defineConditional({
266
+ type: "object",
267
+ properties: {
268
+ $form: {
269
+ type: "object",
270
+ properties: {
271
+ [fieldId]: {
272
+ type: "string",
273
+ pattern
274
+ }
275
+ },
276
+ required: [fieldId]
277
+ }
278
+ },
279
+ required: ["$form"]
280
+ }),
281
+ isBetween: (min, max) => defineConditional({
282
+ type: "object",
283
+ properties: {
284
+ $form: {
285
+ type: "object",
286
+ properties: {
287
+ [fieldId]: {
288
+ type: "number",
289
+ minimum: min,
290
+ maximum: max
291
+ }
292
+ },
293
+ required: [fieldId]
294
+ }
295
+ },
296
+ required: ["$form"]
259
297
  })
260
298
  };
261
299
  }