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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +1 -1
  2. package/dist/commons/api/router.d.ts +10101 -14872
  3. package/dist/commons/conditionals/conditionals.d.ts +30 -5
  4. package/dist/commons/conditionals/validate.d.ts +12 -17
  5. package/dist/commons/events/ActionConfig.d.ts +85214 -5717
  6. package/dist/commons/events/ActionDocument.d.ts +7706 -295
  7. package/dist/commons/events/ActionInput.d.ts +2164 -419
  8. package/dist/commons/events/ActionType.d.ts +26 -16
  9. package/dist/commons/events/AdvancedSearchConfig.d.ts +371 -25
  10. package/dist/commons/events/CompositeFieldValue.d.ts +3 -0
  11. package/dist/commons/events/Conditional.d.ts +21 -5
  12. package/dist/commons/events/Draft.d.ts +75 -45
  13. package/dist/commons/events/EventConfig.d.ts +40486 -2985
  14. package/dist/commons/events/EventConfigInput.d.ts +5 -2
  15. package/dist/commons/events/EventDocument.d.ts +1027 -379
  16. package/dist/commons/events/EventIndex.d.ts +921 -7
  17. package/dist/commons/events/EventInput.d.ts +13 -0
  18. package/dist/commons/events/EventMetadata.d.ts +16 -3
  19. package/dist/commons/events/FieldConfig.d.ts +3702 -757
  20. package/dist/commons/events/FieldType.d.ts +1 -2
  21. package/dist/commons/events/FieldValue.d.ts +1 -1
  22. package/dist/commons/events/FormConfig.d.ts +38914 -339
  23. package/dist/commons/events/PageConfig.d.ts +9803 -0
  24. package/dist/commons/events/SummaryConfig.d.ts +81 -42
  25. package/dist/commons/events/TemplateConfig.d.ts +5 -5
  26. package/dist/commons/events/User.d.ts +5 -0
  27. package/dist/commons/events/WorkqueueConfig.d.ts +44 -20
  28. package/dist/commons/events/defineConfig.d.ts +6758 -485
  29. package/dist/commons/events/event.d.ts +25 -0
  30. package/dist/commons/events/field.d.ts +68 -0
  31. package/dist/commons/events/index.d.ts +5 -1
  32. package/dist/commons/events/scopes.d.ts +26 -0
  33. package/dist/commons/events/test.utils.d.ts +63 -321
  34. package/dist/commons/events/utils.d.ts +3423 -179
  35. package/dist/commons/events/utils.test.d.ts +2 -0
  36. package/dist/conditionals/index.js +191 -120
  37. package/dist/events/index.js +1855 -1187
  38. package/package.json +3 -2
@@ -0,0 +1,25 @@
1
+ import { EventFieldId } from './AdvancedSearchConfig';
2
+ import { SelectOption } from './FieldConfig';
3
+ /**
4
+ * Creates a function that acts like a callable + static method container.
5
+ *
6
+ * @example
7
+ * event('status') // → returns search config
8
+ * event.hasAction('CLICKED') // → returns conditional
9
+ */
10
+ declare function eventFn(fieldId: EventFieldId, options?: SelectOption[]): {
11
+ fieldId: "status" | "trackingId";
12
+ options: {
13
+ value: string;
14
+ label: import("./TranslationConfig").TranslationConfig;
15
+ }[] | undefined;
16
+ config: {
17
+ type: "EXACT";
18
+ };
19
+ fieldType: "event";
20
+ };
21
+ declare const event: typeof eventFn & {
22
+ hasAction: (action: import("./ActionType").ActionType) => import("../conditionals/conditionals").JSONSchema;
23
+ };
24
+ export { event };
25
+ //# sourceMappingURL=event.d.ts.map
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Entry point for defining conditional logic or configuration for a form field.
3
+ * @param fieldId - The ID of the field to define rules or config for.
4
+ * @returns An object combining conditional methods and configuration builders.
5
+ */
6
+ export declare function field(fieldId: string): {
7
+ range: () => {
8
+ config: {
9
+ type: "RANGE";
10
+ };
11
+ fieldId: string;
12
+ fieldType: "field";
13
+ };
14
+ exact: () => {
15
+ config: {
16
+ type: "EXACT";
17
+ };
18
+ fieldId: string;
19
+ fieldType: "field";
20
+ };
21
+ fuzzy: () => {
22
+ config: {
23
+ type: "FUZZY";
24
+ };
25
+ fieldId: string;
26
+ fieldType: "field";
27
+ };
28
+ isAfter: () => {
29
+ days: (days: number) => {
30
+ inPast: () => import("../conditionals/conditionals").JSONSchema;
31
+ inFuture: () => import("../conditionals/conditionals").JSONSchema;
32
+ };
33
+ date: (date: string | {
34
+ [key: string]: unknown;
35
+ _fieldId: string;
36
+ }) => import("../conditionals/conditionals").JSONSchema;
37
+ now: () => import("../conditionals/conditionals").JSONSchema;
38
+ };
39
+ isBefore: () => {
40
+ days: (days: number) => {
41
+ inPast: () => import("../conditionals/conditionals").JSONSchema;
42
+ inFuture: () => import("../conditionals/conditionals").JSONSchema;
43
+ };
44
+ date: (date: string | {
45
+ [key: string]: unknown;
46
+ _fieldId: string;
47
+ }) => import("../conditionals/conditionals").JSONSchema;
48
+ now: () => import("../conditionals/conditionals").JSONSchema;
49
+ };
50
+ isEqualTo: (value: string | boolean | {
51
+ [key: string]: unknown;
52
+ _fieldId: string;
53
+ }) => import("../conditionals/conditionals").JSONSchema;
54
+ isFalsy: () => import("../conditionals/conditionals").JSONSchema;
55
+ isUndefined: () => import("../conditionals/conditionals").JSONSchema;
56
+ inArray: (values: string[]) => import("../conditionals/conditionals").JSONSchema;
57
+ isValidEnglishName: () => import("../conditionals/conditionals").JSONSchema;
58
+ matches: (pattern: string) => import("../conditionals/conditionals").JSONSchema;
59
+ isBetween: (min: number, max: number) => import("../conditionals/conditionals").JSONSchema;
60
+ getId: () => {
61
+ fieldId: string;
62
+ };
63
+ /**
64
+ * @private Internal property used for field reference tracking.
65
+ */
66
+ _fieldId: string;
67
+ };
68
+ //# sourceMappingURL=field.d.ts.map
@@ -3,7 +3,7 @@ export * from './offline';
3
3
  export * from './EventConfig';
4
4
  export * from './EventConfigInput';
5
5
  export * from './FieldConfig';
6
- export * from './FormConfig';
6
+ export * from './PageConfig';
7
7
  export * from './SummaryConfig';
8
8
  export * from './WorkqueueConfig';
9
9
  export * from './Draft';
@@ -15,6 +15,7 @@ export * from './ActionDocument';
15
15
  export * from './EventIndex';
16
16
  export * from './TranslationConfig';
17
17
  export * from './FieldValue';
18
+ export * from './FormConfig';
18
19
  export * from './CompositeFieldValue';
19
20
  export * from './state';
20
21
  export * from './utils';
@@ -29,6 +30,9 @@ export * from './Conditional';
29
30
  export * from './AdvancedSearchConfig';
30
31
  export * from './test.utils';
31
32
  export * from './TemplateConfig';
33
+ export * from './scopes';
32
34
  export * from '../conditionals/conditionals';
33
35
  export * from '../conditionals/validate';
36
+ export * from './field';
37
+ export * from './event';
34
38
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,26 @@
1
+ import { Scope } from '../scopes';
2
+ import { ActionType } from './ActionType';
3
+ export declare function hasAnyOfScopes(a: Scope[], b: Scope[]): boolean;
4
+ export declare const CONFIG_GET_ALLOWED_SCOPES: ["record.declare-birth", "record.read", "record.declaration-submit-incomplete", "record.declaration-submit-for-review", "record.register", "record.export-records", "config", "config.update:all"];
5
+ export declare const CONFIG_SEARCH_ALLOWED_SCOPES: ("search.birth:my-jurisdiction" | "search.birth" | "search.death:my-jurisdiction" | "search.death" | "search.marriage:my-jurisdiction" | "search.marriage")[];
6
+ export declare const ACTION_ALLOWED_SCOPES: {
7
+ READ: ["record.declare-birth", "record.read", "record.declaration-submit-incomplete", "record.declaration-submit-for-review", "record.register", "record.export-records"];
8
+ CREATE: ["record.declare-birth", "record.declaration-submit-incomplete", "record.declaration-submit-for-review"];
9
+ NOTIFY: ["record.declaration-submit-incomplete"];
10
+ DECLARE: ["record.declare-birth", "record.declaration-submit-for-approval", "record.register"];
11
+ DELETE: ["record.declare-birth"];
12
+ VALIDATE: ["record.declaration-submit-for-approval", "record.register"];
13
+ REGISTER: ["record.register"];
14
+ PRINT_CERTIFICATE: ["record.registration-print&issue-certified-copies"];
15
+ REQUEST_CORRECTION: ["record.registration-request-correction"];
16
+ REJECT_CORRECTION: ["record.registration-correct"];
17
+ APPROVE_CORRECTION: ["record.registration-correct"];
18
+ MARKED_AS_DUPLICATE: ["record.declaration-archive"];
19
+ ARCHIVE: ["record.declaration-archive"];
20
+ REJECT: ["record.declaration-submit-for-updates"];
21
+ ASSIGN: null;
22
+ UNASSIGN: null;
23
+ DETECT_DUPLICATE: [];
24
+ };
25
+ export declare function filterUnallowedActions(actions: ActionType[], userScopes: Scope[]): ActionType[];
26
+ //# sourceMappingURL=scopes.d.ts.map
@@ -1,5 +1,5 @@
1
- import { ActionDocument } from './ActionDocument';
2
- import { ArchiveActionInput, DeclareActionInput, RegisterActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, ValidateActionInput } from './ActionInput';
1
+ import { ActionDocument, ActionUpdate } from './ActionDocument';
2
+ import { ArchiveActionInput, AssignActionInput, DeclareActionInput, RegisterActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, UnassignActionInput, ValidateActionInput } from './ActionInput';
3
3
  import { ActionType } from './ActionType';
4
4
  import { Draft } from './Draft';
5
5
  import { EventConfig } from './EventConfig';
@@ -8,45 +8,8 @@ import { EventIndex } from './EventIndex';
8
8
  import { EventInput } from './EventInput';
9
9
  import { FieldValue } from './FieldValue';
10
10
  import { TranslationConfig } from './TranslationConfig';
11
- export declare function generateActionInput(configuration: EventConfig, action: ActionType): import("lodash").Dictionary<string | number | boolean | {
12
- type: string;
13
- filename: string;
14
- originalFilename: string;
15
- } | {
16
- country: string;
17
- district: string;
18
- addressType: "DOMESTIC";
19
- province: string;
20
- urbanOrRural: "URBAN";
21
- number?: string | undefined;
22
- town?: string | undefined;
23
- residentialArea?: string | undefined;
24
- street?: string | undefined;
25
- zipCode?: string | undefined;
26
- } | {
27
- country: string;
28
- district: string;
29
- addressType: "DOMESTIC";
30
- province: string;
31
- urbanOrRural: "RURAL";
32
- village?: string | undefined;
33
- } | {
34
- country: string;
35
- state: string;
36
- addressType: "INTERNATIONAL";
37
- district2: string;
38
- cityOrTown?: string | undefined;
39
- addressLine1?: string | undefined;
40
- addressLine2?: string | undefined;
41
- addressLine3?: string | undefined;
42
- postcodeOrZip?: string | undefined;
43
- } | {
44
- type: string;
45
- option: string;
46
- filename: string;
47
- originalFilename: string;
48
- }[] | undefined>;
49
- export declare function generateActionMetadataInput(configuration: EventConfig, action: ActionType): {};
11
+ export declare function generateActionDeclarationInput(configuration: EventConfig, action: ActionType): Partial<import("./ActionDocument").EventState>;
12
+ export declare function generateActionAnnotationInput(configuration: EventConfig, action: ActionType): {};
50
13
  export declare const eventPayloadGenerator: {
51
14
  create: (input?: Partial<EventInput>) => {
52
15
  transactionId: string;
@@ -57,35 +20,15 @@ export declare const eventPayloadGenerator: {
57
20
  type: string;
58
21
  id: string;
59
22
  };
60
- draft: (eventId: string, input?: Partial<Draft>) => {
61
- id: import("../uuid").UUID;
23
+ draft: ({ eventId, actionType }: {
62
24
  eventId: string;
63
- createdAt: string;
64
- transactionId: import("../uuid").UUID;
65
- action: {
66
- type: "REQUEST_CORRECTION";
67
- data: {
68
- 'applicant.firstname': string;
69
- 'applicant.surname': string;
70
- 'applicant.dob': string;
71
- 'recommender.none': boolean;
72
- };
73
- metadata: {
74
- 'correction.requester.relationship': string;
75
- 'correction.request.reason': string;
76
- };
77
- createdAt: string;
78
- createdBy: string;
79
- createdAtLocation: string;
80
- };
81
- } & Partial<{
82
- id: string;
83
- createdAt: string;
84
- eventId: string;
85
- transactionId: string;
86
- action: {
87
- type: ActionType;
88
- data: Record<string, string | number | boolean | {
25
+ actionType: ActionType;
26
+ }, input?: Partial<Draft>) => Draft;
27
+ actions: {
28
+ declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, "transactionId" | "declaration" | "annotation">>) => {
29
+ type: "DECLARE";
30
+ transactionId: string;
31
+ declaration: Record<string, string | number | boolean | {
89
32
  type: string;
90
33
  filename: string;
91
34
  originalFilename: string;
@@ -123,54 +66,19 @@ export declare const eventPayloadGenerator: {
123
66
  filename: string;
124
67
  originalFilename: string;
125
68
  }[] | undefined>;
126
- createdAt: string;
127
- createdBy: string;
128
- createdAtLocation: string;
129
- metadata?: Record<string, string | number | boolean | {
130
- type: string;
131
- filename: string;
132
- originalFilename: string;
133
- } | {
134
- country: string;
135
- district: string;
136
- addressType: "DOMESTIC";
137
- province: string;
138
- urbanOrRural: "URBAN";
139
- number?: string | null | undefined;
140
- town?: string | null | undefined;
141
- residentialArea?: string | null | undefined;
142
- street?: string | null | undefined;
143
- zipCode?: string | null | undefined;
144
- } | {
145
- country: string;
146
- district: string;
147
- addressType: "DOMESTIC";
148
- province: string;
149
- urbanOrRural: "RURAL";
150
- village?: string | null | undefined;
151
- } | {
152
- country: string;
153
- state: string;
154
- addressType: "INTERNATIONAL";
155
- district2: string;
156
- cityOrTown?: string | null | undefined;
157
- addressLine1?: string | null | undefined;
158
- addressLine2?: string | null | undefined;
159
- addressLine3?: string | null | undefined;
160
- postcodeOrZip?: string | null | undefined;
161
- } | {
162
- type: string;
163
- option: string;
164
- filename: string;
165
- originalFilename: string;
166
- }[] | undefined> | undefined;
69
+ annotation: {};
70
+ eventId: string;
167
71
  };
168
- }>;
169
- actions: {
170
- declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, "transactionId" | "data">>) => {
171
- type: "DECLARE";
72
+ /**
73
+ * Notify allows sending incomplete data. Think it as 'partial declare' for now.
74
+ */
75
+ notify: (eventId: string, input?: {
76
+ transactionId?: string;
77
+ declaration?: Partial<ActionUpdate>;
78
+ }) => {
79
+ type: "NOTIFY";
172
80
  transactionId: string;
173
- data: Record<string, string | number | boolean | {
81
+ declaration: Partial<Record<string, string | number | boolean | {
174
82
  type: string;
175
83
  filename: string;
176
84
  originalFilename: string;
@@ -207,13 +115,13 @@ export declare const eventPayloadGenerator: {
207
115
  option: string;
208
116
  filename: string;
209
117
  originalFilename: string;
210
- }[] | undefined>;
118
+ }[] | undefined>>;
211
119
  eventId: string;
212
120
  };
213
- validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "data">>) => {
121
+ validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "declaration" | "annotation">>) => {
214
122
  type: "VALIDATE";
215
123
  transactionId: string;
216
- data: Record<string, string | number | boolean | {
124
+ declaration: Record<string, string | number | boolean | {
217
125
  type: string;
218
126
  filename: string;
219
127
  originalFilename: string;
@@ -251,104 +159,46 @@ export declare const eventPayloadGenerator: {
251
159
  filename: string;
252
160
  originalFilename: string;
253
161
  }[] | undefined>;
162
+ annotation: {};
254
163
  duplicates: never[];
255
164
  eventId: string;
256
165
  };
257
- archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, "transactionId" | "data">>, isDuplicate?: boolean) => {
166
+ assign: (eventId: string, input?: Partial<Pick<AssignActionInput, "transactionId" | "assignedTo">>) => {
167
+ type: "ASSIGN";
168
+ transactionId: string;
169
+ declaration: {};
170
+ assignedTo: string;
171
+ eventId: string;
172
+ };
173
+ unassign: (eventId: string, input?: Partial<Pick<UnassignActionInput, "transactionId">>) => {
174
+ type: "UNASSIGN";
175
+ transactionId: string;
176
+ declaration: {};
177
+ assignedTo: null;
178
+ eventId: string;
179
+ };
180
+ archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, "transactionId" | "declaration">>, isDuplicate?: boolean) => {
258
181
  type: "ARCHIVE";
259
182
  transactionId: string;
260
- data: Record<string, string | number | boolean | {
261
- type: string;
262
- filename: string;
263
- originalFilename: string;
264
- } | {
265
- country: string;
266
- district: string;
267
- addressType: "DOMESTIC";
268
- province: string;
269
- urbanOrRural: "URBAN";
270
- number?: string | null | undefined;
271
- town?: string | null | undefined;
272
- residentialArea?: string | null | undefined;
273
- street?: string | null | undefined;
274
- zipCode?: string | null | undefined;
275
- } | {
276
- country: string;
277
- district: string;
278
- addressType: "DOMESTIC";
279
- province: string;
280
- urbanOrRural: "RURAL";
281
- village?: string | null | undefined;
282
- } | {
283
- country: string;
284
- state: string;
285
- addressType: "INTERNATIONAL";
286
- district2: string;
287
- cityOrTown?: string | null | undefined;
288
- addressLine1?: string | null | undefined;
289
- addressLine2?: string | null | undefined;
290
- addressLine3?: string | null | undefined;
291
- postcodeOrZip?: string | null | undefined;
292
- } | {
293
- type: string;
294
- option: string;
295
- filename: string;
296
- originalFilename: string;
297
- }[] | undefined>;
298
- metadata: {
183
+ declaration: {};
184
+ annotation: {
299
185
  isDuplicate: boolean;
300
186
  };
301
187
  duplicates: never[];
302
188
  eventId: string;
303
189
  };
304
- reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, "transactionId" | "data">>) => {
190
+ reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, "transactionId" | "annotation">>) => {
305
191
  type: "REJECT";
306
192
  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>;
193
+ declaration: {};
194
+ annotation: {};
345
195
  duplicates: never[];
346
196
  eventId: string;
347
197
  };
348
- register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "data">>) => {
198
+ register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "declaration" | "annotation">>) => {
349
199
  type: "REGISTER";
350
200
  transactionId: string;
351
- data: Record<string, string | number | boolean | {
201
+ declaration: Record<string, string | number | boolean | {
352
202
  type: string;
353
203
  filename: string;
354
204
  originalFilename: string;
@@ -386,57 +236,21 @@ export declare const eventPayloadGenerator: {
386
236
  filename: string;
387
237
  originalFilename: string;
388
238
  }[] | undefined>;
239
+ annotation: {};
389
240
  eventId: string;
390
241
  };
391
- printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "data" | "metadata">>) => {
242
+ printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "annotation">>) => {
392
243
  type: "PRINT_CERTIFICATE";
393
244
  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: {};
245
+ declaration: {};
246
+ annotation: {};
433
247
  eventId: string;
434
248
  };
435
249
  correction: {
436
- request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "data">>) => {
250
+ request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "declaration" | "annotation">>) => {
437
251
  type: "REQUEST_CORRECTION";
438
252
  transactionId: string;
439
- data: Record<string, string | number | boolean | {
253
+ declaration: Record<string, string | number | boolean | {
440
254
  type: string;
441
255
  filename: string;
442
256
  originalFilename: string;
@@ -474,94 +288,22 @@ export declare const eventPayloadGenerator: {
474
288
  filename: string;
475
289
  originalFilename: string;
476
290
  }[] | undefined>;
477
- metadata: {};
291
+ annotation: {};
478
292
  eventId: string;
479
293
  };
480
- approve: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "data">>) => {
294
+ approve: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "annotation">>) => {
481
295
  type: "APPROVE_CORRECTION";
482
296
  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>;
297
+ declaration: {};
298
+ annotation: {};
521
299
  eventId: string;
522
300
  requestId: string;
523
301
  };
524
- reject: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "data">>) => {
302
+ reject: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "annotation">>) => {
525
303
  type: "REJECT_CORRECTION";
526
304
  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>;
305
+ declaration: {};
306
+ annotation: {};
565
307
  eventId: string;
566
308
  requestId: string;
567
309
  };
@@ -577,7 +319,7 @@ export declare function generateEventDocument({ configuration, actions }: {
577
319
  configuration: EventConfig;
578
320
  actions: ActionType[];
579
321
  }): EventDocument;
580
- export declare function generateEventDraftDocument(eventId: string, actionType?: ActionType, data?: Record<string, FieldValue>): Draft;
322
+ export declare function generateEventDraftDocument(eventId: string, actionType?: ActionType, declaration?: Record<string, FieldValue>): Draft;
581
323
  export declare const eventQueryDataGenerator: (overrides?: Partial<EventIndex>) => EventIndex;
582
324
  export declare const generateTranslationConfig: (message: string) => TranslationConfig;
583
325
  //# sourceMappingURL=test.utils.d.ts.map