@opencrvs/toolkit 1.8.0-rc.fd6feaa → 1.8.0-rc.fd8a78f

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 (46) hide show
  1. package/README.md +1 -1
  2. package/dist/commons/api/router.d.ts +20563 -13195
  3. package/dist/commons/conditionals/conditionals.d.ts +37 -6
  4. package/dist/commons/conditionals/validate.d.ts +18 -17
  5. package/dist/commons/events/ActionConfig.d.ts +116825 -2069
  6. package/dist/commons/events/ActionDocument.d.ts +10082 -541
  7. package/dist/commons/events/ActionInput.d.ts +4524 -727
  8. package/dist/commons/events/ActionType.d.ts +30 -11
  9. package/dist/commons/events/AdvancedSearchConfig.d.ts +1029 -22
  10. package/dist/commons/events/CompositeFieldValue.d.ts +83 -12
  11. package/dist/commons/events/Conditional.d.ts +21 -5
  12. package/dist/commons/events/Constants.d.ts +3 -0
  13. package/dist/commons/events/CountryConfigQueryInput.d.ts +2982 -0
  14. package/dist/commons/events/CreatedAtLocation.d.ts +3 -0
  15. package/dist/commons/events/Draft.d.ts +276 -75
  16. package/dist/commons/events/EventConfig.d.ts +56158 -1798
  17. package/dist/commons/events/EventConfigInput.d.ts +6 -3
  18. package/dist/commons/events/EventDocument.d.ts +2862 -672
  19. package/dist/commons/events/EventIndex.d.ts +1590 -22
  20. package/dist/commons/events/EventMetadata.d.ts +299 -40
  21. package/dist/commons/events/FieldConfig.d.ts +5816 -1011
  22. package/dist/commons/events/FieldType.d.ts +7 -3
  23. package/dist/commons/events/FieldTypeMapping.d.ts +142 -44
  24. package/dist/commons/events/FieldValue.d.ts +77 -16
  25. package/dist/commons/events/FormConfig.d.ts +49317 -90
  26. package/dist/commons/events/PageConfig.d.ts +12337 -0
  27. package/dist/commons/events/SummaryConfig.d.ts +93 -42
  28. package/dist/commons/events/TemplateConfig.d.ts +5 -5
  29. package/dist/commons/events/User.d.ts +31 -2
  30. package/dist/commons/events/WorkqueueColumnConfig.d.ts +53 -0
  31. package/dist/commons/events/WorkqueueConfig.d.ts +4803 -20
  32. package/dist/commons/events/defineConfig.d.ts +9111 -301
  33. package/dist/commons/events/event.d.ts +54 -0
  34. package/dist/commons/events/field.d.ts +77 -0
  35. package/dist/commons/events/index.d.ts +10 -1
  36. package/dist/commons/events/scopes.d.ts +45 -0
  37. package/dist/commons/events/serializer.d.ts +2 -0
  38. package/dist/commons/events/test.utils.d.ts +167 -279
  39. package/dist/commons/events/utils.d.ts +13393 -94
  40. package/dist/commons/events/utils.test.d.ts +2 -0
  41. package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
  42. package/dist/conditionals/index.js +233 -108
  43. package/dist/events/index.js +4705 -1887
  44. package/dist/scopes/index.d.ts +158 -1
  45. package/dist/scopes/index.js +152 -1
  46. package/package.json +3 -2
@@ -1,48 +1,26 @@
1
- import { ActionDocument } from './ActionDocument';
2
- import { ArchiveActionInput, DeclareActionInput, RegisterActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, ValidateActionInput } from './ActionInput';
1
+ import { ActionDocument, EventState } from './ActionDocument';
2
+ import { ArchiveActionInput, AssignActionInput, DeclareActionInput, NotifyActionInput, 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';
6
6
  import { EventDocument } from './EventDocument';
7
7
  import { EventIndex } from './EventIndex';
8
8
  import { EventInput } from './EventInput';
9
+ import { TranslationConfig } from './TranslationConfig';
10
+ import { FieldConfig } from './FieldConfig';
11
+ import { WorkqueueConfig } from './WorkqueueConfig';
9
12
  import { FieldValue } from './FieldValue';
10
- export declare function generateActionInput(configuration: EventConfig, action: ActionType): import("lodash").Dictionary<string | number | boolean | {
11
- type: string;
12
- filename: string;
13
- originalFilename: string;
14
- } | {
15
- country: string;
16
- district: string;
17
- province: string;
18
- urbanOrRural: "URBAN";
19
- number?: string | undefined;
20
- town?: string | undefined;
21
- residentialArea?: string | undefined;
22
- street?: string | undefined;
23
- zipCode?: string | undefined;
24
- } | {
25
- country: string;
26
- district: string;
27
- province: string;
28
- urbanOrRural: "RURAL";
29
- village?: string | undefined;
30
- } | {
31
- country: string;
32
- state: string;
33
- district2: string;
34
- cityOrTown?: string | undefined;
35
- addressLine1?: string | undefined;
36
- addressLine2?: string | undefined;
37
- addressLine3?: string | undefined;
38
- postcodeOrZip?: string | undefined;
39
- } | {
40
- type: string;
41
- option: string;
42
- filename: string;
43
- originalFilename: string;
44
- }[]>;
45
- export declare const eventPayloadGenerator: {
13
+ export declare function generateRandomName(rng: () => number): {
14
+ firstname: string;
15
+ surname: string;
16
+ };
17
+ /**
18
+ * Quick-and-dirty mock data generator for event actions.
19
+ */
20
+ export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number, rng: () => number): FieldValue;
21
+ export declare function generateActionDeclarationInput(configuration: EventConfig, action: ActionType, rng: () => number): EventState;
22
+ export declare function generateActionAnnotationInput(configuration: EventConfig, action: ActionType, rng: () => number): {};
23
+ export declare function eventPayloadGenerator(rng: () => number): {
46
24
  create: (input?: Partial<EventInput>) => {
47
25
  transactionId: string;
48
26
  type: string;
@@ -52,41 +30,21 @@ export declare const eventPayloadGenerator: {
52
30
  type: string;
53
31
  id: string;
54
32
  };
55
- draft: (eventId: string, input?: Partial<Draft>) => {
56
- id: import("../uuid").UUID;
33
+ draft: ({ eventId, actionType }: {
57
34
  eventId: string;
58
- createdAt: string;
59
- transactionId: import("../uuid").UUID;
60
- action: {
61
- type: "REQUEST_CORRECTION";
62
- data: {
63
- 'applicant.firstname': string;
64
- 'applicant.surname': string;
65
- 'applicant.dob': string;
66
- 'recommender.none': boolean;
67
- };
68
- metadata: {
69
- 'correction.requester.relationship': string;
70
- 'correction.request.reason': string;
71
- };
72
- createdAt: string;
73
- createdBy: string;
74
- createdAtLocation: string;
75
- };
76
- } & Partial<{
77
- id: string;
78
- createdAt: string;
79
- eventId: string;
80
- transactionId: string;
81
- action: {
82
- type: ActionType;
83
- data: Record<string, string | number | boolean | {
35
+ actionType: ActionType;
36
+ }, input?: Partial<Draft>) => Draft;
37
+ actions: {
38
+ declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
39
+ transactionId: string;
40
+ declaration: Record<string, string | number | boolean | {
84
41
  type: string;
85
42
  filename: string;
86
43
  originalFilename: string;
87
44
  } | {
88
45
  country: string;
89
46
  district: string;
47
+ addressType: "DOMESTIC";
90
48
  province: string;
91
49
  urbanOrRural: "URBAN";
92
50
  number?: string | null | undefined;
@@ -95,52 +53,20 @@ export declare const eventPayloadGenerator: {
95
53
  street?: string | null | undefined;
96
54
  zipCode?: string | null | undefined;
97
55
  } | {
98
- country: string;
99
- district: string;
100
- province: string;
101
- urbanOrRural: "RURAL";
102
- village?: string | null | undefined;
103
- } | {
104
- country: string;
105
- state: string;
106
- district2: string;
107
- cityOrTown?: string | null | undefined;
108
- addressLine1?: string | null | undefined;
109
- addressLine2?: string | null | undefined;
110
- addressLine3?: string | null | undefined;
111
- postcodeOrZip?: string | null | undefined;
112
- } | {
113
- type: string;
114
- option: string;
115
- filename: string;
116
- originalFilename: string;
117
- }[]>;
118
- createdAt: string;
119
- createdBy: string;
120
- createdAtLocation: string;
121
- metadata?: Record<string, string | number | boolean | {
122
- type: string;
123
- filename: string;
124
- originalFilename: string;
125
- } | {
126
- country: string;
127
- district: string;
128
- province: string;
129
- urbanOrRural: "URBAN";
130
- number?: string | null | undefined;
131
- town?: string | null | undefined;
132
- residentialArea?: string | null | undefined;
133
- street?: string | null | undefined;
134
- zipCode?: string | null | undefined;
56
+ firstname: string;
57
+ surname: string;
58
+ middlename?: string | null | undefined;
135
59
  } | {
136
60
  country: string;
137
61
  district: string;
62
+ addressType: "DOMESTIC";
138
63
  province: string;
139
64
  urbanOrRural: "RURAL";
140
65
  village?: string | null | undefined;
141
66
  } | {
142
67
  country: string;
143
68
  state: string;
69
+ addressType: "INTERNATIONAL";
144
70
  district2: string;
145
71
  cityOrTown?: string | null | undefined;
146
72
  addressLine1?: string | null | undefined;
@@ -152,20 +78,26 @@ export declare const eventPayloadGenerator: {
152
78
  option: string;
153
79
  filename: string;
154
80
  originalFilename: string;
155
- }[]> | undefined;
156
- };
157
- }>;
158
- actions: {
159
- declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, "transactionId" | "data">>) => {
81
+ }[] | [string, string] | null | undefined>;
82
+ annotation: {};
83
+ keepAssignment?: boolean | undefined;
160
84
  type: "DECLARE";
85
+ eventId: string;
86
+ };
87
+ /**
88
+ * Notify allows sending incomplete data. Think it as 'partial declare' for now.
89
+ */
90
+ notify: (eventId: string, input?: Partial<Pick<NotifyActionInput, "transactionId" | "declaration" | "keepAssignment">>) => {
91
+ type: "NOTIFY";
161
92
  transactionId: string;
162
- data: Record<string, string | number | boolean | {
93
+ declaration: Record<string, string | number | boolean | {
163
94
  type: string;
164
95
  filename: string;
165
96
  originalFilename: string;
166
97
  } | {
167
98
  country: string;
168
99
  district: string;
100
+ addressType: "DOMESTIC";
169
101
  province: string;
170
102
  urbanOrRural: "URBAN";
171
103
  number?: string | null | undefined;
@@ -173,15 +105,21 @@ export declare const eventPayloadGenerator: {
173
105
  residentialArea?: string | null | undefined;
174
106
  street?: string | null | undefined;
175
107
  zipCode?: string | null | undefined;
108
+ } | {
109
+ firstname: string;
110
+ surname: string;
111
+ middlename?: string | null | undefined;
176
112
  } | {
177
113
  country: string;
178
114
  district: string;
115
+ addressType: "DOMESTIC";
179
116
  province: string;
180
117
  urbanOrRural: "RURAL";
181
118
  village?: string | null | undefined;
182
119
  } | {
183
120
  country: string;
184
121
  state: string;
122
+ addressType: "INTERNATIONAL";
185
123
  district2: string;
186
124
  cityOrTown?: string | null | undefined;
187
125
  addressLine1?: string | null | undefined;
@@ -193,19 +131,20 @@ export declare const eventPayloadGenerator: {
193
131
  option: string;
194
132
  filename: string;
195
133
  originalFilename: string;
196
- }[]>;
134
+ }[] | [string, string] | null | undefined>;
197
135
  eventId: string;
136
+ keepAssignment: boolean | undefined;
198
137
  };
199
- validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "data">>) => {
200
- type: "VALIDATE";
138
+ validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
201
139
  transactionId: string;
202
- data: Record<string, string | number | boolean | {
140
+ declaration: Record<string, string | number | boolean | {
203
141
  type: string;
204
142
  filename: string;
205
143
  originalFilename: string;
206
144
  } | {
207
145
  country: string;
208
146
  district: string;
147
+ addressType: "DOMESTIC";
209
148
  province: string;
210
149
  urbanOrRural: "URBAN";
211
150
  number?: string | null | undefined;
@@ -213,15 +152,21 @@ export declare const eventPayloadGenerator: {
213
152
  residentialArea?: string | null | undefined;
214
153
  street?: string | null | undefined;
215
154
  zipCode?: string | null | undefined;
155
+ } | {
156
+ firstname: string;
157
+ surname: string;
158
+ middlename?: string | null | undefined;
216
159
  } | {
217
160
  country: string;
218
161
  district: string;
162
+ addressType: "DOMESTIC";
219
163
  province: string;
220
164
  urbanOrRural: "RURAL";
221
165
  village?: string | null | undefined;
222
166
  } | {
223
167
  country: string;
224
168
  state: string;
169
+ addressType: "INTERNATIONAL";
225
170
  district2: string;
226
171
  cityOrTown?: string | null | undefined;
227
172
  addressLine1?: string | null | undefined;
@@ -233,20 +178,37 @@ export declare const eventPayloadGenerator: {
233
178
  option: string;
234
179
  filename: string;
235
180
  originalFilename: string;
236
- }[]>;
181
+ }[] | [string, string] | null | undefined>;
182
+ annotation: {};
183
+ keepAssignment?: boolean | undefined;
184
+ type: "VALIDATE";
237
185
  duplicates: never[];
238
186
  eventId: string;
239
187
  };
240
- archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, "transactionId" | "data">>, isDuplicate?: boolean) => {
241
- type: "ARCHIVE";
188
+ assign: (eventId: string, input?: Partial<Pick<AssignActionInput, "transactionId" | "assignedTo">>) => {
189
+ type: "ASSIGN";
190
+ transactionId: string;
191
+ declaration: {};
192
+ assignedTo: string;
193
+ eventId: string;
194
+ };
195
+ unassign: (eventId: string, input?: Partial<Pick<UnassignActionInput, "transactionId">>) => {
196
+ type: "UNASSIGN";
242
197
  transactionId: string;
243
- data: Record<string, string | number | boolean | {
198
+ declaration: {};
199
+ assignedTo: null;
200
+ eventId: string;
201
+ };
202
+ archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, "transactionId" | "declaration" | "keepAssignment">>, isDuplicate?: boolean) => {
203
+ transactionId: string;
204
+ declaration: Record<string, string | number | boolean | {
244
205
  type: string;
245
206
  filename: string;
246
207
  originalFilename: string;
247
208
  } | {
248
209
  country: string;
249
210
  district: string;
211
+ addressType: "DOMESTIC";
250
212
  province: string;
251
213
  urbanOrRural: "URBAN";
252
214
  number?: string | null | undefined;
@@ -254,15 +216,21 @@ export declare const eventPayloadGenerator: {
254
216
  residentialArea?: string | null | undefined;
255
217
  street?: string | null | undefined;
256
218
  zipCode?: string | null | undefined;
219
+ } | {
220
+ firstname: string;
221
+ surname: string;
222
+ middlename?: string | null | undefined;
257
223
  } | {
258
224
  country: string;
259
225
  district: string;
226
+ addressType: "DOMESTIC";
260
227
  province: string;
261
228
  urbanOrRural: "RURAL";
262
229
  village?: string | null | undefined;
263
230
  } | {
264
231
  country: string;
265
232
  state: string;
233
+ addressType: "INTERNATIONAL";
266
234
  district2: string;
267
235
  cityOrTown?: string | null | undefined;
268
236
  addressLine1?: string | null | undefined;
@@ -274,64 +242,39 @@ export declare const eventPayloadGenerator: {
274
242
  option: string;
275
243
  filename: string;
276
244
  originalFilename: string;
277
- }[]>;
278
- metadata: {
279
- isDuplicate: boolean;
280
- };
245
+ }[] | [string, string] | null | undefined>;
246
+ keepAssignment?: boolean | undefined;
247
+ type: "ARCHIVE";
248
+ annotation: {};
281
249
  duplicates: never[];
282
250
  eventId: string;
251
+ reason: {
252
+ message: string;
253
+ isDuplicate: boolean;
254
+ };
283
255
  };
284
- reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, "transactionId" | "data">>) => {
285
- type: "REJECT";
256
+ reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
286
257
  transactionId: string;
287
- data: Record<string, string | number | boolean | {
288
- type: string;
289
- filename: string;
290
- originalFilename: string;
291
- } | {
292
- country: string;
293
- district: string;
294
- province: string;
295
- urbanOrRural: "URBAN";
296
- number?: string | null | undefined;
297
- town?: string | null | undefined;
298
- residentialArea?: string | null | undefined;
299
- street?: string | null | undefined;
300
- zipCode?: string | null | undefined;
301
- } | {
302
- country: string;
303
- district: string;
304
- province: string;
305
- urbanOrRural: "RURAL";
306
- village?: string | null | undefined;
307
- } | {
308
- country: string;
309
- state: string;
310
- district2: string;
311
- cityOrTown?: string | null | undefined;
312
- addressLine1?: string | null | undefined;
313
- addressLine2?: string | null | undefined;
314
- addressLine3?: string | null | undefined;
315
- postcodeOrZip?: string | null | undefined;
316
- } | {
317
- type: string;
318
- option: string;
319
- filename: string;
320
- originalFilename: string;
321
- }[]>;
258
+ annotation: {};
259
+ keepAssignment?: boolean | undefined;
260
+ type: "REJECT";
261
+ declaration: {};
322
262
  duplicates: never[];
323
263
  eventId: string;
264
+ reason: {
265
+ message: string;
266
+ };
324
267
  };
325
- register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "data">>) => {
326
- type: "REGISTER";
268
+ register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
327
269
  transactionId: string;
328
- data: Record<string, string | number | boolean | {
270
+ declaration: Record<string, string | number | boolean | {
329
271
  type: string;
330
272
  filename: string;
331
273
  originalFilename: string;
332
274
  } | {
333
275
  country: string;
334
276
  district: string;
277
+ addressType: "DOMESTIC";
335
278
  province: string;
336
279
  urbanOrRural: "URBAN";
337
280
  number?: string | null | undefined;
@@ -339,15 +282,21 @@ export declare const eventPayloadGenerator: {
339
282
  residentialArea?: string | null | undefined;
340
283
  street?: string | null | undefined;
341
284
  zipCode?: string | null | undefined;
285
+ } | {
286
+ firstname: string;
287
+ surname: string;
288
+ middlename?: string | null | undefined;
342
289
  } | {
343
290
  country: string;
344
291
  district: string;
292
+ addressType: "DOMESTIC";
345
293
  province: string;
346
294
  urbanOrRural: "RURAL";
347
295
  village?: string | null | undefined;
348
296
  } | {
349
297
  country: string;
350
298
  state: string;
299
+ addressType: "INTERNATIONAL";
351
300
  district2: string;
352
301
  cityOrTown?: string | null | undefined;
353
302
  addressLine1?: string | null | undefined;
@@ -359,60 +308,32 @@ export declare const eventPayloadGenerator: {
359
308
  option: string;
360
309
  filename: string;
361
310
  originalFilename: string;
362
- }[]>;
311
+ }[] | [string, string] | null | undefined>;
312
+ annotation: {};
313
+ keepAssignment?: boolean | undefined;
314
+ type: "REGISTER";
363
315
  eventId: string;
364
316
  };
365
- printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "data">>) => {
366
- type: "PRINT_CERTIFICATE";
317
+ printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
367
318
  transactionId: string;
368
- data: Record<string, string | number | boolean | {
369
- type: string;
370
- filename: string;
371
- originalFilename: string;
372
- } | {
373
- country: string;
374
- district: string;
375
- province: string;
376
- urbanOrRural: "URBAN";
377
- number?: string | null | undefined;
378
- town?: string | null | undefined;
379
- residentialArea?: string | null | undefined;
380
- street?: string | null | undefined;
381
- zipCode?: string | null | undefined;
382
- } | {
383
- country: string;
384
- district: string;
385
- province: string;
386
- urbanOrRural: "RURAL";
387
- village?: string | null | undefined;
388
- } | {
389
- country: string;
390
- state: string;
391
- district2: string;
392
- cityOrTown?: string | null | undefined;
393
- addressLine1?: string | null | undefined;
394
- addressLine2?: string | null | undefined;
395
- addressLine3?: string | null | undefined;
396
- postcodeOrZip?: string | null | undefined;
397
- } | {
398
- type: string;
399
- option: string;
400
- filename: string;
401
- originalFilename: string;
402
- }[]>;
319
+ annotation: {};
320
+ keepAssignment?: boolean | undefined;
321
+ type: "PRINT_CERTIFICATE";
322
+ declaration: {};
403
323
  eventId: string;
404
324
  };
405
325
  correction: {
406
- request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "data">>) => {
326
+ request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
407
327
  type: "REQUEST_CORRECTION";
408
328
  transactionId: string;
409
- data: Record<string, string | number | boolean | {
329
+ declaration: Record<string, string | number | boolean | {
410
330
  type: string;
411
331
  filename: string;
412
332
  originalFilename: string;
413
333
  } | {
414
334
  country: string;
415
335
  district: string;
336
+ addressType: "DOMESTIC";
416
337
  province: string;
417
338
  urbanOrRural: "URBAN";
418
339
  number?: string | null | undefined;
@@ -420,15 +341,21 @@ export declare const eventPayloadGenerator: {
420
341
  residentialArea?: string | null | undefined;
421
342
  street?: string | null | undefined;
422
343
  zipCode?: string | null | undefined;
344
+ } | {
345
+ firstname: string;
346
+ surname: string;
347
+ middlename?: string | null | undefined;
423
348
  } | {
424
349
  country: string;
425
350
  district: string;
351
+ addressType: "DOMESTIC";
426
352
  province: string;
427
353
  urbanOrRural: "RURAL";
428
354
  village?: string | null | undefined;
429
355
  } | {
430
356
  country: string;
431
357
  state: string;
358
+ addressType: "INTERNATIONAL";
432
359
  district2: string;
433
360
  cityOrTown?: string | null | undefined;
434
361
  addressLine1?: string | null | undefined;
@@ -440,104 +367,65 @@ export declare const eventPayloadGenerator: {
440
367
  option: string;
441
368
  filename: string;
442
369
  originalFilename: string;
443
- }[]>;
444
- metadata: {};
370
+ }[] | [string, string] | null | undefined>;
371
+ annotation: {};
445
372
  eventId: string;
373
+ keepAssignment: boolean | undefined;
446
374
  };
447
- approve: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "data">>) => {
375
+ approve: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
448
376
  type: "APPROVE_CORRECTION";
449
377
  transactionId: string;
450
- data: Record<string, string | number | boolean | {
451
- type: string;
452
- filename: string;
453
- originalFilename: string;
454
- } | {
455
- country: string;
456
- district: string;
457
- province: string;
458
- urbanOrRural: "URBAN";
459
- number?: string | null | undefined;
460
- town?: string | null | undefined;
461
- residentialArea?: string | null | undefined;
462
- street?: string | null | undefined;
463
- zipCode?: string | null | undefined;
464
- } | {
465
- country: string;
466
- district: string;
467
- province: string;
468
- urbanOrRural: "RURAL";
469
- village?: string | null | undefined;
470
- } | {
471
- country: string;
472
- state: string;
473
- district2: string;
474
- cityOrTown?: string | null | undefined;
475
- addressLine1?: string | null | undefined;
476
- addressLine2?: string | null | undefined;
477
- addressLine3?: string | null | undefined;
478
- postcodeOrZip?: string | null | undefined;
479
- } | {
480
- type: string;
481
- option: string;
482
- filename: string;
483
- originalFilename: string;
484
- }[]>;
378
+ declaration: {};
379
+ annotation: {};
485
380
  eventId: string;
486
381
  requestId: string;
382
+ keepAssignment: boolean | undefined;
487
383
  };
488
- reject: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "data">>) => {
384
+ reject: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
489
385
  type: "REJECT_CORRECTION";
490
386
  transactionId: string;
491
- data: Record<string, string | number | boolean | {
492
- type: string;
493
- filename: string;
494
- originalFilename: string;
495
- } | {
496
- country: string;
497
- district: string;
498
- province: string;
499
- urbanOrRural: "URBAN";
500
- number?: string | null | undefined;
501
- town?: string | null | undefined;
502
- residentialArea?: string | null | undefined;
503
- street?: string | null | undefined;
504
- zipCode?: string | null | undefined;
505
- } | {
506
- country: string;
507
- district: string;
508
- province: string;
509
- urbanOrRural: "RURAL";
510
- village?: string | null | undefined;
511
- } | {
512
- country: string;
513
- state: string;
514
- district2: string;
515
- cityOrTown?: string | null | undefined;
516
- addressLine1?: string | null | undefined;
517
- addressLine2?: string | null | undefined;
518
- addressLine3?: string | null | undefined;
519
- postcodeOrZip?: string | null | undefined;
520
- } | {
521
- type: string;
522
- option: string;
523
- filename: string;
524
- originalFilename: string;
525
- }[]>;
387
+ declaration: {};
388
+ annotation: {};
526
389
  eventId: string;
527
390
  requestId: string;
391
+ keepAssignment: boolean | undefined;
528
392
  };
529
393
  };
530
394
  };
531
395
  };
532
- export declare function generateActionDocument({ configuration, action, defaults }: {
396
+ export declare function generateActionDocument({ configuration, action, rng, defaults }: {
533
397
  configuration: EventConfig;
534
398
  action: ActionType;
399
+ rng?: () => number;
535
400
  defaults?: Partial<ActionDocument>;
536
401
  }): ActionDocument;
537
- export declare function generateEventDocument({ configuration, actions }: {
402
+ export declare function generateEventDocument({ configuration, actions, rng }: {
538
403
  configuration: EventConfig;
539
404
  actions: ActionType[];
405
+ rng?: () => number;
540
406
  }): EventDocument;
541
- export declare function generateEventDraftDocument(eventId: string, actionType?: ActionType, data?: Record<string, FieldValue>): Draft;
542
- export declare const eventQueryDataGenerator: (overrides?: Partial<EventIndex>) => EventIndex;
407
+ export declare function generateEventDraftDocument({ eventId, actionType, rng, declaration }: {
408
+ eventId: string;
409
+ actionType: ActionType;
410
+ rng?: () => number;
411
+ declaration?: EventState;
412
+ }): Draft;
413
+ export declare function getRandomDatetime(rng: () => number, start: Date, end: Date): string;
414
+ export declare function getRandomDate(rng: () => number, start: string, end: string): string;
415
+ /**
416
+ * Useful for testing when we need deterministic outcome.
417
+ * @param seed - Seed value for the pseudo-random number generator
418
+ *
419
+ * @returns A function that generates pseudo-random numbers between 0 and 1 [0, 1)
420
+ */
421
+ export declare function createPrng(seed: number): () => number;
422
+ export declare function generateRandomSignature(rng: () => number): string;
423
+ export declare const eventQueryDataGenerator: (overrides?: Partial<EventIndex>, seed?: number) => EventIndex;
424
+ export declare const generateTranslationConfig: (message: string) => TranslationConfig;
425
+ export declare const BearerTokenByUserType: {
426
+ fieldAgent: string;
427
+ registrationAgent: string;
428
+ localRegistrar: string;
429
+ };
430
+ export declare const generateWorkqueues: (slug?: string) => WorkqueueConfig[];
543
431
  //# sourceMappingURL=test.utils.d.ts.map