@opencrvs/toolkit 1.8.0-rc.fbe4a79 → 1.8.0-rc.fbec3ce

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 (40) hide show
  1. package/dist/commons/api/router.d.ts +10237 -4315
  2. package/dist/commons/conditionals/conditionals.d.ts +8 -3
  3. package/dist/commons/conditionals/validate.d.ts +1 -0
  4. package/dist/commons/events/ActionConfig.d.ts +56387 -29043
  5. package/dist/commons/events/ActionDocument.d.ts +1900 -309
  6. package/dist/commons/events/ActionInput.d.ts +1455 -183
  7. package/dist/commons/events/AdvancedSearchConfig.d.ts +675 -12
  8. package/dist/commons/events/CompositeFieldValue.d.ts +28 -0
  9. package/dist/commons/events/Constants.d.ts +3 -0
  10. package/dist/commons/events/CountryConfigQueryInput.d.ts +2982 -0
  11. package/dist/commons/events/CreatedAtLocation.d.ts +3 -0
  12. package/dist/commons/events/Draft.d.ts +122 -21
  13. package/dist/commons/events/EventConfig.d.ts +27963 -14411
  14. package/dist/commons/events/EventDocument.d.ts +1228 -245
  15. package/dist/commons/events/EventIndex.d.ts +585 -353
  16. package/dist/commons/events/EventInput.d.ts +0 -13
  17. package/dist/commons/events/EventMetadata.d.ts +70 -76
  18. package/dist/commons/events/FieldConfig.d.ts +2500 -1111
  19. package/dist/commons/events/FieldType.d.ts +4 -1
  20. package/dist/commons/events/FieldTypeMapping.d.ts +94 -52
  21. package/dist/commons/events/FieldValue.d.ts +43 -5
  22. package/dist/commons/events/FormConfig.d.ts +18485 -9821
  23. package/dist/commons/events/PageConfig.d.ts +3600 -1472
  24. package/dist/commons/events/User.d.ts +31 -7
  25. package/dist/commons/events/WorkqueueColumnConfig.d.ts +53 -0
  26. package/dist/commons/events/WorkqueueConfig.d.ts +4189 -524
  27. package/dist/commons/events/defineConfig.d.ts +2639 -635
  28. package/dist/commons/events/event.d.ts +37 -10
  29. package/dist/commons/events/field.d.ts +26 -17
  30. package/dist/commons/events/index.d.ts +4 -0
  31. package/dist/commons/events/scopes.d.ts +20 -1
  32. package/dist/commons/events/serializer.d.ts +2 -0
  33. package/dist/commons/events/test.utils.d.ts +144 -34
  34. package/dist/commons/events/utils.d.ts +10110 -309
  35. package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
  36. package/dist/conditionals/index.js +45 -8
  37. package/dist/events/index.js +2618 -973
  38. package/dist/scopes/index.d.ts +158 -1
  39. package/dist/scopes/index.js +152 -1
  40. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { EventFieldId } from './AdvancedSearchConfig';
2
- import { EventMetadataKeys, EventMetadataParameter } from './EventMetadata';
3
2
  import { SelectOption } from './FieldConfig';
3
+ import { WorkqueueColumnKeys, WorkqueueColumnValue } from './WorkqueueColumnConfig';
4
4
  /**
5
5
  * Creates a function that acts like a callable + static method container.
6
6
  *
@@ -9,18 +9,45 @@ import { SelectOption } from './FieldConfig';
9
9
  * event.hasAction('CLICKED') // → returns conditional
10
10
  */
11
11
  declare function eventFn(fieldId: EventFieldId, options?: SelectOption[]): {
12
- fieldId: "status" | "trackingId";
13
- options: {
14
- value: string;
15
- label: import("./TranslationConfig").TranslationConfig;
16
- }[] | undefined;
17
- config: {
18
- type: "exact";
12
+ range: () => {
13
+ fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
14
+ options: {
15
+ value: string;
16
+ label: import("./TranslationConfig").TranslationConfig;
17
+ }[] | undefined;
18
+ fieldType: "event";
19
+ } & {
20
+ config: {
21
+ type: "range";
22
+ };
23
+ };
24
+ exact: () => {
25
+ fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
26
+ options: {
27
+ value: string;
28
+ label: import("./TranslationConfig").TranslationConfig;
29
+ }[] | undefined;
30
+ fieldType: "event";
31
+ } & {
32
+ config: {
33
+ type: "exact";
34
+ };
35
+ };
36
+ fuzzy: () => {
37
+ fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
38
+ options: {
39
+ value: string;
40
+ label: import("./TranslationConfig").TranslationConfig;
41
+ }[] | undefined;
42
+ fieldType: "event";
43
+ } & {
44
+ config: {
45
+ type: "fuzzy";
46
+ };
19
47
  };
20
- fieldType: "event";
21
48
  };
22
49
  declare const event: typeof eventFn & {
23
- field(field: EventMetadataKeys): EventMetadataParameter;
50
+ field(field: WorkqueueColumnKeys): WorkqueueColumnValue;
24
51
  hasAction: (action: import("./ActionType").ActionType) => import("../conditionals/conditionals").JSONSchema;
25
52
  };
26
53
  export { event };
@@ -1,38 +1,52 @@
1
+ import { FieldConditional } from './Conditional';
2
+ import { TranslationConfig } from './TranslationConfig';
1
3
  /**
2
4
  * Entry point for defining conditional logic or configuration for a form field.
3
5
  * @param fieldId - The ID of the field to define rules or config for.
4
6
  * @returns An object combining conditional methods and configuration builders.
5
7
  */
6
- export declare function field(fieldId: string): {
8
+ export declare function field(fieldId: string, options?: {
9
+ conditionals?: FieldConditional[];
10
+ searchCriteriaLabelPrefix?: TranslationConfig;
11
+ }): {
7
12
  range: () => {
13
+ conditionals?: FieldConditional[];
14
+ searchCriteriaLabelPrefix?: TranslationConfig;
15
+ fieldId: string;
16
+ fieldType: "field";
17
+ } & {
8
18
  config: {
9
19
  type: "range";
10
20
  };
11
- fieldId: string;
12
- fieldType: "field";
13
21
  };
14
22
  exact: () => {
23
+ conditionals?: FieldConditional[];
24
+ searchCriteriaLabelPrefix?: TranslationConfig;
25
+ fieldId: string;
26
+ fieldType: "field";
27
+ } & {
15
28
  config: {
16
29
  type: "exact";
17
30
  };
18
- fieldId: string;
19
- fieldType: "field";
20
31
  };
21
32
  fuzzy: () => {
33
+ conditionals?: FieldConditional[];
34
+ searchCriteriaLabelPrefix?: TranslationConfig;
35
+ fieldId: string;
36
+ fieldType: "field";
37
+ } & {
22
38
  config: {
23
39
  type: "fuzzy";
24
40
  };
25
- fieldId: string;
26
- fieldType: "field";
27
41
  };
42
+ $$field: string;
28
43
  isAfter: () => {
29
44
  days: (days: number) => {
30
45
  inPast: () => import("../conditionals/conditionals").JSONSchema;
31
46
  inFuture: () => import("../conditionals/conditionals").JSONSchema;
32
47
  };
33
48
  date: (date: string | {
34
- [key: string]: unknown;
35
- _fieldId: string;
49
+ $$field: string;
36
50
  }) => import("../conditionals/conditionals").JSONSchema;
37
51
  now: () => import("../conditionals/conditionals").JSONSchema;
38
52
  };
@@ -42,14 +56,12 @@ export declare function field(fieldId: string): {
42
56
  inFuture: () => import("../conditionals/conditionals").JSONSchema;
43
57
  };
44
58
  date: (date: string | {
45
- [key: string]: unknown;
46
- _fieldId: string;
59
+ $$field: string;
47
60
  }) => import("../conditionals/conditionals").JSONSchema;
48
61
  now: () => import("../conditionals/conditionals").JSONSchema;
49
62
  };
50
63
  isEqualTo: (value: string | boolean | {
51
- [key: string]: unknown;
52
- _fieldId: string;
64
+ $$field: string;
53
65
  }) => import("../conditionals/conditionals").JSONSchema;
54
66
  isFalsy: () => import("../conditionals/conditionals").JSONSchema;
55
67
  isUndefined: () => import("../conditionals/conditionals").JSONSchema;
@@ -60,9 +72,6 @@ export declare function field(fieldId: string): {
60
72
  getId: () => {
61
73
  fieldId: string;
62
74
  };
63
- /**
64
- * @private Internal property used for field reference tracking.
65
- */
66
- _fieldId: string;
75
+ object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
67
76
  };
68
77
  //# sourceMappingURL=field.d.ts.map
@@ -1,3 +1,4 @@
1
+ export * from './Constants';
1
2
  export * from './ActionConfig';
2
3
  export * from './offline';
3
4
  export * from './EventConfig';
@@ -6,6 +7,8 @@ export * from './FieldConfig';
6
7
  export * from './PageConfig';
7
8
  export * from './SummaryConfig';
8
9
  export * from './WorkqueueConfig';
10
+ export * from './WorkqueueColumnConfig';
11
+ export * from './workqueueDefaultColumns';
9
12
  export * from './Draft';
10
13
  export * from './EventMetadata';
11
14
  export * from './EventInput';
@@ -31,6 +34,7 @@ export * from './AdvancedSearchConfig';
31
34
  export * from './test.utils';
32
35
  export * from './TemplateConfig';
33
36
  export * from './scopes';
37
+ export * from './serializer';
34
38
  export * from '../conditionals/conditionals';
35
39
  export * from '../conditionals/validate';
36
40
  export * from './field';
@@ -1,6 +1,5 @@
1
1
  import { Scope } from '../scopes';
2
2
  import { ActionType } from './ActionType';
3
- export declare function hasAnyOfScopes(a: Scope[], b: Scope[]): boolean;
4
3
  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
4
  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
5
  export declare const ACTION_ALLOWED_SCOPES: {
@@ -22,5 +21,25 @@ export declare const ACTION_ALLOWED_SCOPES: {
22
21
  UNASSIGN: null;
23
22
  DETECT_DUPLICATE: [];
24
23
  };
24
+ export declare const ACTION_ALLOWED_CONFIGURABLE_SCOPES: {
25
+ READ: never[];
26
+ CREATE: "record.notify"[];
27
+ NOTIFY: "record.notify"[];
28
+ DECLARE: never[];
29
+ DELETE: never[];
30
+ VALIDATE: never[];
31
+ REGISTER: never[];
32
+ PRINT_CERTIFICATE: never[];
33
+ REQUEST_CORRECTION: never[];
34
+ REJECT_CORRECTION: never[];
35
+ APPROVE_CORRECTION: never[];
36
+ MARKED_AS_DUPLICATE: never[];
37
+ ARCHIVE: never[];
38
+ REJECT: never[];
39
+ ASSIGN: never[];
40
+ UNASSIGN: never[];
41
+ DETECT_DUPLICATE: never[];
42
+ };
43
+ export declare function hasAnyOfScopes(a: Scope[], b: Scope[]): boolean;
25
44
  export declare function filterUnallowedActions(actions: ActionType[], userScopes: Scope[]): ActionType[];
26
45
  //# sourceMappingURL=scopes.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { deserializeQuery } from './serializers/user/deserializer';
2
+ //# sourceMappingURL=serializer.d.ts.map
@@ -6,11 +6,21 @@ import { EventConfig } from './EventConfig';
6
6
  import { EventDocument } from './EventDocument';
7
7
  import { EventIndex } from './EventIndex';
8
8
  import { EventInput } from './EventInput';
9
- import { FieldValue } from './FieldValue';
10
9
  import { TranslationConfig } from './TranslationConfig';
11
- export declare function generateActionDeclarationInput(configuration: EventConfig, action: ActionType): EventState;
12
- export declare function generateActionAnnotationInput(configuration: EventConfig, action: ActionType): {};
13
- export declare const eventPayloadGenerator: {
10
+ import { FieldConfig } from './FieldConfig';
11
+ import { WorkqueueConfig } from './WorkqueueConfig';
12
+ import { FieldValue } from './FieldValue';
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): {
14
24
  create: (input?: Partial<EventInput>) => {
15
25
  transactionId: string;
16
26
  type: string;
@@ -25,8 +35,7 @@ export declare const eventPayloadGenerator: {
25
35
  actionType: ActionType;
26
36
  }, input?: Partial<Draft>) => Draft;
27
37
  actions: {
28
- declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, "transactionId" | "declaration" | "annotation">>) => {
29
- type: "DECLARE";
38
+ declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
30
39
  transactionId: string;
31
40
  declaration: Record<string, string | number | boolean | {
32
41
  type: string;
@@ -43,6 +52,10 @@ export declare const eventPayloadGenerator: {
43
52
  residentialArea?: string | null | undefined;
44
53
  street?: string | null | undefined;
45
54
  zipCode?: string | null | undefined;
55
+ } | {
56
+ firstname: string;
57
+ surname: string;
58
+ middlename?: string | null | undefined;
46
59
  } | {
47
60
  country: string;
48
61
  district: string;
@@ -65,8 +78,10 @@ export declare const eventPayloadGenerator: {
65
78
  option: string;
66
79
  filename: string;
67
80
  originalFilename: string;
68
- }[] | [string, string] | undefined>;
81
+ }[] | [string, string] | null | undefined>;
69
82
  annotation: {};
83
+ keepAssignment?: boolean | undefined;
84
+ type: "DECLARE";
70
85
  eventId: string;
71
86
  };
72
87
  /**
@@ -75,6 +90,7 @@ export declare const eventPayloadGenerator: {
75
90
  notify: (eventId: string, input?: {
76
91
  transactionId?: string;
77
92
  declaration?: Partial<ActionUpdate>;
93
+ keepAssignment?: boolean;
78
94
  }) => {
79
95
  type: "NOTIFY";
80
96
  transactionId: string;
@@ -93,6 +109,10 @@ export declare const eventPayloadGenerator: {
93
109
  residentialArea?: string | null | undefined;
94
110
  street?: string | null | undefined;
95
111
  zipCode?: string | null | undefined;
112
+ } | {
113
+ firstname: string;
114
+ surname: string;
115
+ middlename?: string | null | undefined;
96
116
  } | {
97
117
  country: string;
98
118
  district: string;
@@ -115,11 +135,11 @@ export declare const eventPayloadGenerator: {
115
135
  option: string;
116
136
  filename: string;
117
137
  originalFilename: string;
118
- }[] | [string, string] | undefined>>;
138
+ }[] | [string, string] | null | undefined>>;
119
139
  eventId: string;
140
+ keepAssignment: boolean | undefined;
120
141
  };
121
- validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "declaration" | "annotation">>) => {
122
- type: "VALIDATE";
142
+ validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
123
143
  transactionId: string;
124
144
  declaration: Record<string, string | number | boolean | {
125
145
  type: string;
@@ -136,6 +156,10 @@ export declare const eventPayloadGenerator: {
136
156
  residentialArea?: string | null | undefined;
137
157
  street?: string | null | undefined;
138
158
  zipCode?: string | null | undefined;
159
+ } | {
160
+ firstname: string;
161
+ surname: string;
162
+ middlename?: string | null | undefined;
139
163
  } | {
140
164
  country: string;
141
165
  district: string;
@@ -158,8 +182,10 @@ export declare const eventPayloadGenerator: {
158
182
  option: string;
159
183
  filename: string;
160
184
  originalFilename: string;
161
- }[] | [string, string] | undefined>;
185
+ }[] | [string, string] | null | undefined>;
162
186
  annotation: {};
187
+ keepAssignment?: boolean | undefined;
188
+ type: "VALIDATE";
163
189
  duplicates: never[];
164
190
  eventId: string;
165
191
  };
@@ -177,26 +203,73 @@ export declare const eventPayloadGenerator: {
177
203
  assignedTo: null;
178
204
  eventId: string;
179
205
  };
180
- archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, "transactionId" | "declaration">>, isDuplicate?: boolean) => {
181
- type: "ARCHIVE";
206
+ archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, "transactionId" | "declaration" | "keepAssignment">>, isDuplicate?: boolean) => {
182
207
  transactionId: string;
183
- declaration: {};
184
- annotation: {
185
- isDuplicate: boolean;
186
- };
208
+ declaration: Record<string, string | number | boolean | {
209
+ type: string;
210
+ filename: string;
211
+ originalFilename: string;
212
+ } | {
213
+ country: string;
214
+ district: string;
215
+ addressType: "DOMESTIC";
216
+ province: string;
217
+ urbanOrRural: "URBAN";
218
+ number?: string | null | undefined;
219
+ town?: string | null | undefined;
220
+ residentialArea?: string | null | undefined;
221
+ street?: string | null | undefined;
222
+ zipCode?: string | null | undefined;
223
+ } | {
224
+ firstname: string;
225
+ surname: string;
226
+ middlename?: string | null | undefined;
227
+ } | {
228
+ country: string;
229
+ district: string;
230
+ addressType: "DOMESTIC";
231
+ province: string;
232
+ urbanOrRural: "RURAL";
233
+ village?: string | null | undefined;
234
+ } | {
235
+ country: string;
236
+ state: string;
237
+ addressType: "INTERNATIONAL";
238
+ district2: string;
239
+ cityOrTown?: string | null | undefined;
240
+ addressLine1?: string | null | undefined;
241
+ addressLine2?: string | null | undefined;
242
+ addressLine3?: string | null | undefined;
243
+ postcodeOrZip?: string | null | undefined;
244
+ } | {
245
+ type: string;
246
+ option: string;
247
+ filename: string;
248
+ originalFilename: string;
249
+ }[] | [string, string] | null | undefined>;
250
+ keepAssignment?: boolean | undefined;
251
+ type: "ARCHIVE";
252
+ annotation: {};
187
253
  duplicates: never[];
188
254
  eventId: string;
255
+ reason: {
256
+ message: string;
257
+ isDuplicate: boolean;
258
+ };
189
259
  };
190
- reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, "transactionId" | "annotation">>) => {
191
- type: "REJECT";
260
+ reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
192
261
  transactionId: string;
193
- declaration: {};
194
262
  annotation: {};
263
+ keepAssignment?: boolean | undefined;
264
+ type: "REJECT";
265
+ declaration: {};
195
266
  duplicates: never[];
196
267
  eventId: string;
268
+ reason: {
269
+ message: string;
270
+ };
197
271
  };
198
- register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "declaration" | "annotation">>) => {
199
- type: "REGISTER";
272
+ register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
200
273
  transactionId: string;
201
274
  declaration: Record<string, string | number | boolean | {
202
275
  type: string;
@@ -213,6 +286,10 @@ export declare const eventPayloadGenerator: {
213
286
  residentialArea?: string | null | undefined;
214
287
  street?: string | null | undefined;
215
288
  zipCode?: string | null | undefined;
289
+ } | {
290
+ firstname: string;
291
+ surname: string;
292
+ middlename?: string | null | undefined;
216
293
  } | {
217
294
  country: string;
218
295
  district: string;
@@ -235,19 +312,22 @@ export declare const eventPayloadGenerator: {
235
312
  option: string;
236
313
  filename: string;
237
314
  originalFilename: string;
238
- }[] | [string, string] | undefined>;
315
+ }[] | [string, string] | null | undefined>;
239
316
  annotation: {};
317
+ keepAssignment?: boolean | undefined;
318
+ type: "REGISTER";
240
319
  eventId: string;
241
320
  };
242
- printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "annotation">>) => {
243
- type: "PRINT_CERTIFICATE";
321
+ printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
244
322
  transactionId: string;
245
- declaration: {};
246
323
  annotation: {};
324
+ keepAssignment?: boolean | undefined;
325
+ type: "PRINT_CERTIFICATE";
326
+ declaration: {};
247
327
  eventId: string;
248
328
  };
249
329
  correction: {
250
- request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "declaration" | "annotation">>) => {
330
+ request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
251
331
  type: "REQUEST_CORRECTION";
252
332
  transactionId: string;
253
333
  declaration: Record<string, string | number | boolean | {
@@ -265,6 +345,10 @@ export declare const eventPayloadGenerator: {
265
345
  residentialArea?: string | null | undefined;
266
346
  street?: string | null | undefined;
267
347
  zipCode?: string | null | undefined;
348
+ } | {
349
+ firstname: string;
350
+ surname: string;
351
+ middlename?: string | null | undefined;
268
352
  } | {
269
353
  country: string;
270
354
  district: string;
@@ -287,39 +371,65 @@ export declare const eventPayloadGenerator: {
287
371
  option: string;
288
372
  filename: string;
289
373
  originalFilename: string;
290
- }[] | [string, string] | undefined>;
374
+ }[] | [string, string] | null | undefined>;
291
375
  annotation: {};
292
376
  eventId: string;
377
+ keepAssignment: boolean | undefined;
293
378
  };
294
- approve: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "annotation">>) => {
379
+ approve: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
295
380
  type: "APPROVE_CORRECTION";
296
381
  transactionId: string;
297
382
  declaration: {};
298
383
  annotation: {};
299
384
  eventId: string;
300
385
  requestId: string;
386
+ keepAssignment: boolean | undefined;
301
387
  };
302
- reject: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "annotation">>) => {
388
+ reject: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
303
389
  type: "REJECT_CORRECTION";
304
390
  transactionId: string;
305
391
  declaration: {};
306
392
  annotation: {};
307
393
  eventId: string;
308
394
  requestId: string;
395
+ keepAssignment: boolean | undefined;
309
396
  };
310
397
  };
311
398
  };
312
399
  };
313
- export declare function generateActionDocument({ configuration, action, defaults }: {
400
+ export declare function generateActionDocument({ configuration, action, rng, defaults }: {
314
401
  configuration: EventConfig;
315
402
  action: ActionType;
403
+ rng?: () => number;
316
404
  defaults?: Partial<ActionDocument>;
317
405
  }): ActionDocument;
318
- export declare function generateEventDocument({ configuration, actions }: {
406
+ export declare function generateEventDocument({ configuration, actions, rng }: {
319
407
  configuration: EventConfig;
320
408
  actions: ActionType[];
409
+ rng?: () => number;
321
410
  }): EventDocument;
322
- export declare function generateEventDraftDocument(eventId: string, actionType?: ActionType, declaration?: Record<string, FieldValue>): Draft;
323
- export declare const eventQueryDataGenerator: (overrides?: Partial<EventIndex>) => EventIndex;
411
+ export declare function generateEventDraftDocument({ eventId, actionType, rng, declaration }: {
412
+ eventId: string;
413
+ actionType: ActionType;
414
+ rng?: () => number;
415
+ declaration?: EventState;
416
+ }): Draft;
417
+ export declare function getRandomDatetime(rng: () => number, start: Date, end: Date): string;
418
+ export declare function getRandomDate(rng: () => number, start: string, end: string): string;
419
+ /**
420
+ * Useful for testing when we need deterministic outcome.
421
+ * @param seed - Seed value for the pseudo-random number generator
422
+ *
423
+ * @returns A function that generates pseudo-random numbers between 0 and 1 [0, 1)
424
+ */
425
+ export declare function createPrng(seed: number): () => number;
426
+ export declare function generateRandomSignature(rng: () => number): string;
427
+ export declare const eventQueryDataGenerator: (overrides?: Partial<EventIndex>, seed?: number) => EventIndex;
324
428
  export declare const generateTranslationConfig: (message: string) => TranslationConfig;
429
+ export declare const BearerTokenByUserType: {
430
+ fieldAgent: string;
431
+ registrationAgent: string;
432
+ localRegistrar: string;
433
+ };
434
+ export declare const generateWorkqueues: (slug?: string) => WorkqueueConfig[];
325
435
  //# sourceMappingURL=test.utils.d.ts.map