@opencrvs/toolkit 1.8.0-rc.feaeeb7 → 1.8.0-rc.fec1d5d

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 (48) hide show
  1. package/README.md +1 -1
  2. package/dist/commons/api/router.d.ts +21731 -10342
  3. package/dist/commons/conditionals/conditionals.d.ts +37 -6
  4. package/dist/commons/conditionals/validate-address.test.d.ts +2 -0
  5. package/dist/commons/conditionals/validate.d.ts +45 -17
  6. package/dist/commons/conditionals/validate.test.d.ts +2 -0
  7. package/dist/commons/events/ActionConfig.d.ts +119422 -2084
  8. package/dist/commons/events/ActionDocument.d.ts +11499 -401
  9. package/dist/commons/events/ActionInput.d.ts +6662 -609
  10. package/dist/commons/events/ActionType.d.ts +31 -12
  11. package/dist/commons/events/AdvancedSearchConfig.d.ts +1029 -22
  12. package/dist/commons/events/CompositeFieldValue.d.ts +183 -2
  13. package/dist/commons/events/Conditional.d.ts +21 -5
  14. package/dist/commons/events/Constants.d.ts +3 -0
  15. package/dist/commons/events/CountryConfigQueryInput.d.ts +2982 -0
  16. package/dist/commons/events/CreatedAtLocation.d.ts +3 -0
  17. package/dist/commons/events/Draft.d.ts +476 -62
  18. package/dist/commons/events/EventConfig.d.ts +57486 -1824
  19. package/dist/commons/events/EventConfigInput.d.ts +6 -3
  20. package/dist/commons/events/EventDocument.d.ts +4653 -573
  21. package/dist/commons/events/EventIndex.d.ts +1600 -22
  22. package/dist/commons/events/EventMetadata.d.ts +299 -40
  23. package/dist/commons/events/FieldConfig.d.ts +5984 -974
  24. package/dist/commons/events/FieldType.d.ts +10 -2
  25. package/dist/commons/events/FieldTypeMapping.d.ts +218 -18
  26. package/dist/commons/events/FieldValue.d.ts +123 -8
  27. package/dist/commons/events/FormConfig.d.ts +50409 -90
  28. package/dist/commons/events/PageConfig.d.ts +12597 -0
  29. package/dist/commons/events/SummaryConfig.d.ts +93 -42
  30. package/dist/commons/events/TemplateConfig.d.ts +30 -10
  31. package/dist/commons/events/User.d.ts +31 -2
  32. package/dist/commons/events/WorkqueueColumnConfig.d.ts +53 -0
  33. package/dist/commons/events/WorkqueueConfig.d.ts +4812 -20
  34. package/dist/commons/events/defineConfig.d.ts +9397 -307
  35. package/dist/commons/events/event.d.ts +54 -0
  36. package/dist/commons/events/field.d.ts +77 -0
  37. package/dist/commons/events/index.d.ts +9 -1
  38. package/dist/commons/events/scopes.d.ts +45 -0
  39. package/dist/commons/events/serializer.d.ts +2 -0
  40. package/dist/commons/events/test.utils.d.ts +220 -224
  41. package/dist/commons/events/utils.d.ts +13896 -69
  42. package/dist/commons/events/utils.test.d.ts +2 -0
  43. package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
  44. package/dist/conditionals/index.js +233 -108
  45. package/dist/events/index.js +4868 -1923
  46. package/dist/scopes/index.d.ts +158 -1
  47. package/dist/scopes/index.js +152 -1
  48. package/package.json +3 -2
@@ -1,39 +1,26 @@
1
- import { ActionDocument } from './ActionDocument';
2
- import { ArchivedActionInput, 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
- type: string;
32
- option: string;
33
- filename: string;
34
- originalFilename: string;
35
- }[]>;
36
- 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): {
37
24
  create: (input?: Partial<EventInput>) => {
38
25
  transactionId: string;
39
26
  type: string;
@@ -43,41 +30,21 @@ export declare const eventPayloadGenerator: {
43
30
  type: string;
44
31
  id: string;
45
32
  };
46
- draft: (eventId: string, input?: Partial<Draft>) => {
47
- id: import("../uuid").UUID;
48
- eventId: string;
49
- createdAt: string;
50
- transactionId: import("../uuid").UUID;
51
- action: {
52
- type: "REQUEST_CORRECTION";
53
- data: {
54
- 'applicant.firstname': string;
55
- 'applicant.surname': string;
56
- 'applicant.dob': string;
57
- 'recommender.none': boolean;
58
- };
59
- metadata: {
60
- 'correction.requester.relationship': string;
61
- 'correction.request.reason': string;
62
- };
63
- createdAt: string;
64
- createdBy: string;
65
- createdAtLocation: string;
66
- };
67
- } & Partial<{
68
- id: string;
69
- createdAt: string;
33
+ draft: ({ eventId, actionType }: {
70
34
  eventId: string;
71
- transactionId: string;
72
- action: {
73
- type: ActionType;
74
- 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 | {
75
41
  type: string;
76
42
  filename: string;
77
43
  originalFilename: string;
78
44
  } | {
79
45
  country: string;
80
46
  district: string;
47
+ addressType: "DOMESTIC";
81
48
  province: string;
82
49
  urbanOrRural: "URBAN";
83
50
  number?: string | null | undefined;
@@ -85,60 +52,52 @@ export declare const eventPayloadGenerator: {
85
52
  residentialArea?: string | null | undefined;
86
53
  street?: string | null | undefined;
87
54
  zipCode?: string | null | undefined;
55
+ } | {
56
+ firstname: string;
57
+ surname: string;
58
+ middlename?: string | null | undefined;
88
59
  } | {
89
60
  country: string;
90
61
  district: string;
62
+ addressType: "DOMESTIC";
91
63
  province: string;
92
64
  urbanOrRural: "RURAL";
93
65
  village?: string | null | undefined;
94
- } | {
95
- type: string;
96
- option: string;
97
- filename: string;
98
- originalFilename: string;
99
- }[]>;
100
- createdAt: string;
101
- createdBy: string;
102
- createdAtLocation: string;
103
- metadata?: Record<string, string | number | boolean | {
104
- type: string;
105
- filename: string;
106
- originalFilename: string;
107
- } | {
108
- country: string;
109
- district: string;
110
- province: string;
111
- urbanOrRural: "URBAN";
112
- number?: string | null | undefined;
113
- town?: string | null | undefined;
114
- residentialArea?: string | null | undefined;
115
- street?: string | null | undefined;
116
- zipCode?: string | null | undefined;
117
66
  } | {
118
67
  country: string;
119
- district: string;
120
- province: string;
121
- urbanOrRural: "RURAL";
122
- village?: string | null | undefined;
68
+ state: string;
69
+ addressType: "INTERNATIONAL";
70
+ district2: string;
71
+ cityOrTown?: string | null | undefined;
72
+ addressLine1?: string | null | undefined;
73
+ addressLine2?: string | null | undefined;
74
+ addressLine3?: string | null | undefined;
75
+ postcodeOrZip?: string | null | undefined;
123
76
  } | {
124
77
  type: string;
125
78
  option: string;
126
79
  filename: string;
127
80
  originalFilename: string;
128
- }[]> | undefined;
129
- };
130
- }>;
131
- actions: {
132
- declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, "transactionId" | "data">>) => {
81
+ }[] | [string, string] | null | undefined>;
82
+ annotation: {};
83
+ keepAssignment?: boolean | undefined;
133
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";
134
92
  transactionId: string;
135
- data: Record<string, string | number | boolean | {
93
+ declaration: Record<string, string | number | boolean | {
136
94
  type: string;
137
95
  filename: string;
138
96
  originalFilename: string;
139
97
  } | {
140
98
  country: string;
141
99
  district: string;
100
+ addressType: "DOMESTIC";
142
101
  province: string;
143
102
  urbanOrRural: "URBAN";
144
103
  number?: string | null | undefined;
@@ -146,30 +105,46 @@ export declare const eventPayloadGenerator: {
146
105
  residentialArea?: string | null | undefined;
147
106
  street?: string | null | undefined;
148
107
  zipCode?: string | null | undefined;
108
+ } | {
109
+ firstname: string;
110
+ surname: string;
111
+ middlename?: string | null | undefined;
149
112
  } | {
150
113
  country: string;
151
114
  district: string;
115
+ addressType: "DOMESTIC";
152
116
  province: string;
153
117
  urbanOrRural: "RURAL";
154
118
  village?: string | null | undefined;
119
+ } | {
120
+ country: string;
121
+ state: string;
122
+ addressType: "INTERNATIONAL";
123
+ district2: string;
124
+ cityOrTown?: string | null | undefined;
125
+ addressLine1?: string | null | undefined;
126
+ addressLine2?: string | null | undefined;
127
+ addressLine3?: string | null | undefined;
128
+ postcodeOrZip?: string | null | undefined;
155
129
  } | {
156
130
  type: string;
157
131
  option: string;
158
132
  filename: string;
159
133
  originalFilename: string;
160
- }[]>;
134
+ }[] | [string, string] | null | undefined>;
161
135
  eventId: string;
136
+ keepAssignment: boolean | undefined;
162
137
  };
163
- validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "data">>) => {
164
- type: "VALIDATE";
138
+ validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
165
139
  transactionId: string;
166
- data: Record<string, string | number | boolean | {
140
+ declaration: Record<string, string | number | boolean | {
167
141
  type: string;
168
142
  filename: string;
169
143
  originalFilename: string;
170
144
  } | {
171
145
  country: string;
172
146
  district: string;
147
+ addressType: "DOMESTIC";
173
148
  province: string;
174
149
  urbanOrRural: "URBAN";
175
150
  number?: string | null | undefined;
@@ -177,31 +152,63 @@ export declare const eventPayloadGenerator: {
177
152
  residentialArea?: string | null | undefined;
178
153
  street?: string | null | undefined;
179
154
  zipCode?: string | null | undefined;
155
+ } | {
156
+ firstname: string;
157
+ surname: string;
158
+ middlename?: string | null | undefined;
180
159
  } | {
181
160
  country: string;
182
161
  district: string;
162
+ addressType: "DOMESTIC";
183
163
  province: string;
184
164
  urbanOrRural: "RURAL";
185
165
  village?: string | null | undefined;
166
+ } | {
167
+ country: string;
168
+ state: string;
169
+ addressType: "INTERNATIONAL";
170
+ district2: string;
171
+ cityOrTown?: string | null | undefined;
172
+ addressLine1?: string | null | undefined;
173
+ addressLine2?: string | null | undefined;
174
+ addressLine3?: string | null | undefined;
175
+ postcodeOrZip?: string | null | undefined;
186
176
  } | {
187
177
  type: string;
188
178
  option: string;
189
179
  filename: string;
190
180
  originalFilename: string;
191
- }[]>;
181
+ }[] | [string, string] | null | undefined>;
182
+ annotation: {};
183
+ keepAssignment?: boolean | undefined;
184
+ type: "VALIDATE";
192
185
  duplicates: never[];
193
186
  eventId: string;
194
187
  };
195
- archive: (eventId: string, input?: Partial<Pick<ArchivedActionInput, "transactionId" | "data">>, isDuplicate?: boolean) => {
196
- type: "ARCHIVED";
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";
197
197
  transactionId: string;
198
- 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 | {
199
205
  type: string;
200
206
  filename: string;
201
207
  originalFilename: string;
202
208
  } | {
203
209
  country: string;
204
210
  district: string;
211
+ addressType: "DOMESTIC";
205
212
  province: string;
206
213
  urbanOrRural: "URBAN";
207
214
  number?: string | null | undefined;
@@ -209,66 +216,65 @@ export declare const eventPayloadGenerator: {
209
216
  residentialArea?: string | null | undefined;
210
217
  street?: string | null | undefined;
211
218
  zipCode?: string | null | undefined;
219
+ } | {
220
+ firstname: string;
221
+ surname: string;
222
+ middlename?: string | null | undefined;
212
223
  } | {
213
224
  country: string;
214
225
  district: string;
226
+ addressType: "DOMESTIC";
215
227
  province: string;
216
228
  urbanOrRural: "RURAL";
217
229
  village?: string | null | undefined;
230
+ } | {
231
+ country: string;
232
+ state: string;
233
+ addressType: "INTERNATIONAL";
234
+ district2: string;
235
+ cityOrTown?: string | null | undefined;
236
+ addressLine1?: string | null | undefined;
237
+ addressLine2?: string | null | undefined;
238
+ addressLine3?: string | null | undefined;
239
+ postcodeOrZip?: string | null | undefined;
218
240
  } | {
219
241
  type: string;
220
242
  option: string;
221
243
  filename: string;
222
244
  originalFilename: string;
223
- }[]>;
224
- metadata: {
225
- isDuplicate: boolean;
226
- };
245
+ }[] | [string, string] | null | undefined>;
246
+ keepAssignment?: boolean | undefined;
247
+ type: "ARCHIVE";
248
+ annotation: {};
227
249
  duplicates: never[];
228
250
  eventId: string;
251
+ reason: {
252
+ message: string;
253
+ isDuplicate: boolean;
254
+ };
229
255
  };
230
- reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, "transactionId" | "data">>) => {
231
- type: "REJECT";
256
+ reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
232
257
  transactionId: string;
233
- data: Record<string, string | number | boolean | {
234
- type: string;
235
- filename: string;
236
- originalFilename: string;
237
- } | {
238
- country: string;
239
- district: string;
240
- province: string;
241
- urbanOrRural: "URBAN";
242
- number?: string | null | undefined;
243
- town?: string | null | undefined;
244
- residentialArea?: string | null | undefined;
245
- street?: string | null | undefined;
246
- zipCode?: string | null | undefined;
247
- } | {
248
- country: string;
249
- district: string;
250
- province: string;
251
- urbanOrRural: "RURAL";
252
- village?: string | null | undefined;
253
- } | {
254
- type: string;
255
- option: string;
256
- filename: string;
257
- originalFilename: string;
258
- }[]>;
258
+ annotation: {};
259
+ keepAssignment?: boolean | undefined;
260
+ type: "REJECT";
261
+ declaration: {};
259
262
  duplicates: never[];
260
263
  eventId: string;
264
+ reason: {
265
+ message: string;
266
+ };
261
267
  };
262
- register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "data">>) => {
263
- type: "REGISTER";
268
+ register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
264
269
  transactionId: string;
265
- data: Record<string, string | number | boolean | {
270
+ declaration: Record<string, string | number | boolean | {
266
271
  type: string;
267
272
  filename: string;
268
273
  originalFilename: string;
269
274
  } | {
270
275
  country: string;
271
276
  district: string;
277
+ addressType: "DOMESTIC";
272
278
  province: string;
273
279
  urbanOrRural: "URBAN";
274
280
  number?: string | null | undefined;
@@ -276,62 +282,58 @@ export declare const eventPayloadGenerator: {
276
282
  residentialArea?: string | null | undefined;
277
283
  street?: string | null | undefined;
278
284
  zipCode?: string | null | undefined;
285
+ } | {
286
+ firstname: string;
287
+ surname: string;
288
+ middlename?: string | null | undefined;
279
289
  } | {
280
290
  country: string;
281
291
  district: string;
292
+ addressType: "DOMESTIC";
282
293
  province: string;
283
294
  urbanOrRural: "RURAL";
284
295
  village?: string | null | undefined;
296
+ } | {
297
+ country: string;
298
+ state: string;
299
+ addressType: "INTERNATIONAL";
300
+ district2: string;
301
+ cityOrTown?: string | null | undefined;
302
+ addressLine1?: string | null | undefined;
303
+ addressLine2?: string | null | undefined;
304
+ addressLine3?: string | null | undefined;
305
+ postcodeOrZip?: string | null | undefined;
285
306
  } | {
286
307
  type: string;
287
308
  option: string;
288
309
  filename: string;
289
310
  originalFilename: string;
290
- }[]>;
311
+ }[] | [string, string] | null | undefined>;
312
+ annotation: {};
313
+ keepAssignment?: boolean | undefined;
314
+ type: "REGISTER";
291
315
  eventId: string;
292
316
  };
293
- printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "data">>) => {
294
- type: "PRINT_CERTIFICATE";
317
+ printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
295
318
  transactionId: string;
296
- data: Record<string, string | number | boolean | {
297
- type: string;
298
- filename: string;
299
- originalFilename: string;
300
- } | {
301
- country: string;
302
- district: string;
303
- province: string;
304
- urbanOrRural: "URBAN";
305
- number?: string | null | undefined;
306
- town?: string | null | undefined;
307
- residentialArea?: string | null | undefined;
308
- street?: string | null | undefined;
309
- zipCode?: string | null | undefined;
310
- } | {
311
- country: string;
312
- district: string;
313
- province: string;
314
- urbanOrRural: "RURAL";
315
- village?: string | null | undefined;
316
- } | {
317
- type: string;
318
- option: string;
319
- filename: string;
320
- originalFilename: string;
321
- }[]>;
319
+ annotation: {};
320
+ keepAssignment?: boolean | undefined;
321
+ type: "PRINT_CERTIFICATE";
322
+ declaration: {};
322
323
  eventId: string;
323
324
  };
324
325
  correction: {
325
- request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "data">>) => {
326
+ request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
326
327
  type: "REQUEST_CORRECTION";
327
328
  transactionId: string;
328
- data: Record<string, string | number | boolean | {
329
+ declaration: Record<string, string | number | boolean | {
329
330
  type: string;
330
331
  filename: string;
331
332
  originalFilename: string;
332
333
  } | {
333
334
  country: string;
334
335
  district: string;
336
+ addressType: "DOMESTIC";
335
337
  province: string;
336
338
  urbanOrRural: "URBAN";
337
339
  number?: string | null | undefined;
@@ -339,97 +341,91 @@ export declare const eventPayloadGenerator: {
339
341
  residentialArea?: string | null | undefined;
340
342
  street?: string | null | undefined;
341
343
  zipCode?: string | null | undefined;
344
+ } | {
345
+ firstname: string;
346
+ surname: string;
347
+ middlename?: string | null | undefined;
342
348
  } | {
343
349
  country: string;
344
350
  district: string;
351
+ addressType: "DOMESTIC";
345
352
  province: string;
346
353
  urbanOrRural: "RURAL";
347
354
  village?: string | null | undefined;
355
+ } | {
356
+ country: string;
357
+ state: string;
358
+ addressType: "INTERNATIONAL";
359
+ district2: string;
360
+ cityOrTown?: string | null | undefined;
361
+ addressLine1?: string | null | undefined;
362
+ addressLine2?: string | null | undefined;
363
+ addressLine3?: string | null | undefined;
364
+ postcodeOrZip?: string | null | undefined;
348
365
  } | {
349
366
  type: string;
350
367
  option: string;
351
368
  filename: string;
352
369
  originalFilename: string;
353
- }[]>;
354
- metadata: {};
370
+ }[] | [string, string] | null | undefined>;
371
+ annotation: {};
355
372
  eventId: string;
373
+ keepAssignment: boolean | undefined;
356
374
  };
357
- approve: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "data">>) => {
375
+ approve: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
358
376
  type: "APPROVE_CORRECTION";
359
377
  transactionId: string;
360
- data: Record<string, string | number | boolean | {
361
- type: string;
362
- filename: string;
363
- originalFilename: string;
364
- } | {
365
- country: string;
366
- district: string;
367
- province: string;
368
- urbanOrRural: "URBAN";
369
- number?: string | null | undefined;
370
- town?: string | null | undefined;
371
- residentialArea?: string | null | undefined;
372
- street?: string | null | undefined;
373
- zipCode?: string | null | undefined;
374
- } | {
375
- country: string;
376
- district: string;
377
- province: string;
378
- urbanOrRural: "RURAL";
379
- village?: string | null | undefined;
380
- } | {
381
- type: string;
382
- option: string;
383
- filename: string;
384
- originalFilename: string;
385
- }[]>;
378
+ declaration: {};
379
+ annotation: {};
386
380
  eventId: string;
387
381
  requestId: string;
382
+ keepAssignment: boolean | undefined;
388
383
  };
389
- reject: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "data">>) => {
384
+ reject: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
390
385
  type: "REJECT_CORRECTION";
391
386
  transactionId: string;
392
- data: Record<string, string | number | boolean | {
393
- type: string;
394
- filename: string;
395
- originalFilename: string;
396
- } | {
397
- country: string;
398
- district: string;
399
- province: string;
400
- urbanOrRural: "URBAN";
401
- number?: string | null | undefined;
402
- town?: string | null | undefined;
403
- residentialArea?: string | null | undefined;
404
- street?: string | null | undefined;
405
- zipCode?: string | null | undefined;
406
- } | {
407
- country: string;
408
- district: string;
409
- province: string;
410
- urbanOrRural: "RURAL";
411
- village?: string | null | undefined;
412
- } | {
413
- type: string;
414
- option: string;
415
- filename: string;
416
- originalFilename: string;
417
- }[]>;
387
+ declaration: {};
388
+ annotation: {};
418
389
  eventId: string;
419
390
  requestId: string;
391
+ keepAssignment: boolean | undefined;
420
392
  };
421
393
  };
422
394
  };
423
395
  };
424
- export declare function generateActionDocument({ configuration, action, defaults }: {
396
+ export declare function generateActionDocument({ configuration, action, rng, defaults }: {
425
397
  configuration: EventConfig;
426
398
  action: ActionType;
399
+ rng?: () => number;
427
400
  defaults?: Partial<ActionDocument>;
428
401
  }): ActionDocument;
429
- export declare function generateEventDocument({ configuration, actions }: {
402
+ export declare function generateEventDocument({ configuration, actions, rng }: {
430
403
  configuration: EventConfig;
431
404
  actions: ActionType[];
405
+ rng?: () => number;
432
406
  }): EventDocument;
433
- export declare function generateEventDraftDocument(eventId: string, actionType?: ActionType, data?: Record<string, FieldValue>): Draft;
434
- 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[];
435
431
  //# sourceMappingURL=test.utils.d.ts.map