@opencrvs/toolkit 1.8.1-rc.a372970 → 1.8.1-rc.bbbfede
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.
- package/dist/commons/api/router.d.ts +6318 -5078
- package/dist/commons/conditionals/conditionals.d.ts +9 -13
- package/dist/commons/conditionals/validate.d.ts +17 -7
- package/dist/commons/events/ActionConfig.d.ts +119326 -1729
- package/dist/commons/events/ActionDocument.d.ts +5481 -1268
- package/dist/commons/events/ActionInput.d.ts +3745 -1025
- package/dist/commons/events/ActionType.d.ts +10 -1
- package/dist/commons/events/AdvancedSearchConfig.d.ts +1282 -22
- package/dist/commons/events/CompositeFieldValue.d.ts +40 -9
- package/dist/commons/events/Constants.d.ts +3 -0
- package/dist/commons/events/CountryConfigQueryInput.d.ts +4132 -0
- package/dist/commons/events/CreatedAtLocation.d.ts +2 -0
- package/dist/commons/events/Draft.d.ts +332 -97
- package/dist/commons/events/EventConfig.d.ts +54363 -1357
- package/dist/commons/events/EventDocument.d.ts +3136 -833
- package/dist/commons/events/EventIndex.d.ts +2234 -29
- package/dist/commons/events/EventMetadata.d.ts +353 -47
- package/dist/commons/events/FieldConfig.d.ts +6756 -1260
- package/dist/commons/events/FieldType.d.ts +8 -3
- package/dist/commons/events/FieldTypeMapping.d.ts +161 -73
- package/dist/commons/events/FieldValue.d.ts +91 -20
- package/dist/commons/events/FormConfig.d.ts +55770 -522
- package/dist/commons/events/PageConfig.d.ts +13825 -209
- package/dist/commons/events/SummaryConfig.d.ts +93 -42
- package/dist/commons/events/User.d.ts +34 -2
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +53 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +8116 -20
- package/dist/commons/events/defineConfig.d.ts +8529 -77
- package/dist/commons/events/event.d.ts +100 -0
- package/dist/commons/events/field.d.ts +94 -0
- package/dist/commons/events/index.d.ts +8 -0
- package/dist/commons/events/scopes.d.ts +45 -0
- package/dist/commons/events/serializer.d.ts +2 -0
- package/dist/commons/events/test.utils.d.ts +206 -90
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +15440 -88
- package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
- package/dist/conditionals/index.js +66 -56
- package/dist/events/index.js +4755 -1788
- package/dist/scopes/index.d.ts +184 -7
- package/dist/scopes/index.js +140 -40
- package/package.json +4 -3
@@ -1,53 +1,39 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { UUID } from '../uuid';
|
2
|
+
import { ActionDocument, EventState } from './ActionDocument';
|
3
|
+
import { ApproveCorrectionActionInput, ArchiveActionInput, AssignActionInput, DeclareActionInput, NotifyActionInput, RegisterActionInput, RejectCorrectionActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, UnassignActionInput, ValidateActionInput } from './ActionInput';
|
3
4
|
import { ActionType } from './ActionType';
|
4
5
|
import { Draft } from './Draft';
|
5
6
|
import { EventConfig } from './EventConfig';
|
6
7
|
import { EventDocument } from './EventDocument';
|
7
8
|
import { EventIndex } from './EventIndex';
|
8
9
|
import { EventInput } from './EventInput';
|
9
|
-
import { FieldValue } from './FieldValue';
|
10
10
|
import { TranslationConfig } from './TranslationConfig';
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
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 generateActionAnnotationInput(configuration: EventConfig, action: ActionType): {};
|
50
|
-
export declare const eventPayloadGenerator: {
|
11
|
+
import { FieldConfig } from './FieldConfig';
|
12
|
+
import { WorkqueueConfig } from './WorkqueueConfig';
|
13
|
+
import { FieldValue } from './FieldValue';
|
14
|
+
import { z } from 'zod';
|
15
|
+
/**
|
16
|
+
* IANA timezone used in testing. Used for queries that expect similar results independent of the users location (e.g. when event was registered.)
|
17
|
+
* Since we query by range, providing UTC offset will result to different results when DST changes during the range.
|
18
|
+
*/
|
19
|
+
export declare const TEST_SYSTEM_IANA_TIMEZONE = "Asia/Dhaka";
|
20
|
+
/**
|
21
|
+
* In real application, the roles are defined in the countryconfig.
|
22
|
+
* These are just for testing purposes to generate realistic mock data.
|
23
|
+
*/
|
24
|
+
export declare const TestUserRole: z.ZodEnum<["FIELD_AGENT", "LOCAL_REGISTRAR", "LOCAL_SYSTEM_ADMIN", "NATIONAL_REGISTRAR", "REGISTRATION_AGENT"]>;
|
25
|
+
export type TestUserRole = z.infer<typeof TestUserRole>;
|
26
|
+
export declare function generateRandomName(rng: () => number): {
|
27
|
+
firstname: string;
|
28
|
+
surname: string;
|
29
|
+
};
|
30
|
+
/**
|
31
|
+
* Quick-and-dirty mock data generator for event actions.
|
32
|
+
*/
|
33
|
+
export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number, rng: () => number): FieldValue;
|
34
|
+
export declare function generateActionDeclarationInput(configuration: EventConfig, action: ActionType, rng: () => number): EventState;
|
35
|
+
export declare function generateActionAnnotationInput(configuration: EventConfig, action: ActionType, rng: () => number): {};
|
36
|
+
export declare function eventPayloadGenerator(rng: () => number): {
|
51
37
|
create: (input?: Partial<EventInput>) => {
|
52
38
|
transactionId: string;
|
53
39
|
type: string;
|
@@ -57,17 +43,17 @@ export declare const eventPayloadGenerator: {
|
|
57
43
|
type: string;
|
58
44
|
id: string;
|
59
45
|
};
|
60
|
-
draft: ({ eventId, actionType }: {
|
61
|
-
eventId:
|
46
|
+
draft: ({ eventId, actionType, annotation }: {
|
47
|
+
eventId: UUID;
|
62
48
|
actionType: ActionType;
|
49
|
+
annotation?: Record<string, any>;
|
63
50
|
}, input?: Partial<Draft>) => Draft;
|
64
51
|
actions: {
|
65
|
-
declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, "transactionId" | "declaration" | "annotation">>) => {
|
66
|
-
type: "DECLARE";
|
52
|
+
declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
|
67
53
|
transactionId: string;
|
68
54
|
declaration: Record<string, string | number | boolean | {
|
69
55
|
type: string;
|
70
|
-
|
56
|
+
path: string;
|
71
57
|
originalFilename: string;
|
72
58
|
} | {
|
73
59
|
country: string;
|
@@ -80,6 +66,10 @@ export declare const eventPayloadGenerator: {
|
|
80
66
|
residentialArea?: string | null | undefined;
|
81
67
|
street?: string | null | undefined;
|
82
68
|
zipCode?: string | null | undefined;
|
69
|
+
} | {
|
70
|
+
firstname?: string | null | undefined;
|
71
|
+
surname?: string | null | undefined;
|
72
|
+
middlename?: string | null | undefined;
|
83
73
|
} | {
|
84
74
|
country: string;
|
85
75
|
district: string;
|
@@ -100,24 +90,26 @@ export declare const eventPayloadGenerator: {
|
|
100
90
|
} | {
|
101
91
|
type: string;
|
102
92
|
option: string;
|
103
|
-
|
93
|
+
path: string;
|
104
94
|
originalFilename: string;
|
105
|
-
}[] |
|
95
|
+
}[] | {
|
96
|
+
start: string;
|
97
|
+
end: string;
|
98
|
+
} | null | undefined>;
|
106
99
|
annotation: {};
|
100
|
+
keepAssignment?: boolean | undefined;
|
101
|
+
type: "DECLARE";
|
107
102
|
eventId: string;
|
108
103
|
};
|
109
104
|
/**
|
110
105
|
* Notify allows sending incomplete data. Think it as 'partial declare' for now.
|
111
106
|
*/
|
112
|
-
notify: (eventId: string, input?: {
|
113
|
-
transactionId?: string;
|
114
|
-
declaration?: Partial<ActionUpdate>;
|
115
|
-
}) => {
|
107
|
+
notify: (eventId: string, input?: Partial<Pick<NotifyActionInput, "transactionId" | "declaration" | "keepAssignment">>) => {
|
116
108
|
type: "NOTIFY";
|
117
109
|
transactionId: string;
|
118
|
-
declaration:
|
110
|
+
declaration: Record<string, string | number | boolean | {
|
119
111
|
type: string;
|
120
|
-
|
112
|
+
path: string;
|
121
113
|
originalFilename: string;
|
122
114
|
} | {
|
123
115
|
country: string;
|
@@ -130,6 +122,10 @@ export declare const eventPayloadGenerator: {
|
|
130
122
|
residentialArea?: string | null | undefined;
|
131
123
|
street?: string | null | undefined;
|
132
124
|
zipCode?: string | null | undefined;
|
125
|
+
} | {
|
126
|
+
firstname?: string | null | undefined;
|
127
|
+
surname?: string | null | undefined;
|
128
|
+
middlename?: string | null | undefined;
|
133
129
|
} | {
|
134
130
|
country: string;
|
135
131
|
district: string;
|
@@ -150,17 +146,20 @@ export declare const eventPayloadGenerator: {
|
|
150
146
|
} | {
|
151
147
|
type: string;
|
152
148
|
option: string;
|
153
|
-
|
149
|
+
path: string;
|
154
150
|
originalFilename: string;
|
155
|
-
}[] |
|
151
|
+
}[] | {
|
152
|
+
start: string;
|
153
|
+
end: string;
|
154
|
+
} | null | undefined>;
|
156
155
|
eventId: string;
|
156
|
+
keepAssignment: boolean | undefined;
|
157
157
|
};
|
158
|
-
validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "declaration" | "annotation">>) => {
|
159
|
-
type: "VALIDATE";
|
158
|
+
validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
|
160
159
|
transactionId: string;
|
161
160
|
declaration: Record<string, string | number | boolean | {
|
162
161
|
type: string;
|
163
|
-
|
162
|
+
path: string;
|
164
163
|
originalFilename: string;
|
165
164
|
} | {
|
166
165
|
country: string;
|
@@ -173,6 +172,10 @@ export declare const eventPayloadGenerator: {
|
|
173
172
|
residentialArea?: string | null | undefined;
|
174
173
|
street?: string | null | undefined;
|
175
174
|
zipCode?: string | null | undefined;
|
175
|
+
} | {
|
176
|
+
firstname?: string | null | undefined;
|
177
|
+
surname?: string | null | undefined;
|
178
|
+
middlename?: string | null | undefined;
|
176
179
|
} | {
|
177
180
|
country: string;
|
178
181
|
district: string;
|
@@ -193,10 +196,15 @@ export declare const eventPayloadGenerator: {
|
|
193
196
|
} | {
|
194
197
|
type: string;
|
195
198
|
option: string;
|
196
|
-
|
199
|
+
path: string;
|
197
200
|
originalFilename: string;
|
198
|
-
}[] |
|
201
|
+
}[] | {
|
202
|
+
start: string;
|
203
|
+
end: string;
|
204
|
+
} | null | undefined>;
|
199
205
|
annotation: {};
|
206
|
+
keepAssignment?: boolean | undefined;
|
207
|
+
type: "VALIDATE";
|
200
208
|
duplicates: never[];
|
201
209
|
eventId: string;
|
202
210
|
};
|
@@ -214,30 +222,80 @@ export declare const eventPayloadGenerator: {
|
|
214
222
|
assignedTo: null;
|
215
223
|
eventId: string;
|
216
224
|
};
|
217
|
-
archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, "transactionId" | "declaration">>, isDuplicate?: boolean) => {
|
218
|
-
type: "ARCHIVE";
|
225
|
+
archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, "transactionId" | "declaration" | "keepAssignment">>, isDuplicate?: boolean) => {
|
219
226
|
transactionId: string;
|
220
|
-
declaration: {
|
221
|
-
|
222
|
-
|
223
|
-
|
227
|
+
declaration: Record<string, string | number | boolean | {
|
228
|
+
type: string;
|
229
|
+
path: string;
|
230
|
+
originalFilename: string;
|
231
|
+
} | {
|
232
|
+
country: string;
|
233
|
+
district: string;
|
234
|
+
addressType: "DOMESTIC";
|
235
|
+
province: string;
|
236
|
+
urbanOrRural: "URBAN";
|
237
|
+
number?: string | null | undefined;
|
238
|
+
town?: string | null | undefined;
|
239
|
+
residentialArea?: string | null | undefined;
|
240
|
+
street?: string | null | undefined;
|
241
|
+
zipCode?: string | null | undefined;
|
242
|
+
} | {
|
243
|
+
firstname?: string | null | undefined;
|
244
|
+
surname?: string | null | undefined;
|
245
|
+
middlename?: string | null | undefined;
|
246
|
+
} | {
|
247
|
+
country: string;
|
248
|
+
district: string;
|
249
|
+
addressType: "DOMESTIC";
|
250
|
+
province: string;
|
251
|
+
urbanOrRural: "RURAL";
|
252
|
+
village?: string | null | undefined;
|
253
|
+
} | {
|
254
|
+
country: string;
|
255
|
+
state: string;
|
256
|
+
addressType: "INTERNATIONAL";
|
257
|
+
district2: string;
|
258
|
+
cityOrTown?: string | null | undefined;
|
259
|
+
addressLine1?: string | null | undefined;
|
260
|
+
addressLine2?: string | null | undefined;
|
261
|
+
addressLine3?: string | null | undefined;
|
262
|
+
postcodeOrZip?: string | null | undefined;
|
263
|
+
} | {
|
264
|
+
type: string;
|
265
|
+
option: string;
|
266
|
+
path: string;
|
267
|
+
originalFilename: string;
|
268
|
+
}[] | {
|
269
|
+
start: string;
|
270
|
+
end: string;
|
271
|
+
} | null | undefined>;
|
272
|
+
keepAssignment?: boolean | undefined;
|
273
|
+
type: "ARCHIVE";
|
274
|
+
annotation: {};
|
224
275
|
duplicates: never[];
|
225
276
|
eventId: string;
|
277
|
+
reason: {
|
278
|
+
message: string;
|
279
|
+
isDuplicate: boolean;
|
280
|
+
};
|
226
281
|
};
|
227
|
-
reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, "transactionId" | "annotation">>) => {
|
228
|
-
type: "REJECT";
|
282
|
+
reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
|
229
283
|
transactionId: string;
|
230
|
-
declaration: {};
|
231
284
|
annotation: {};
|
285
|
+
keepAssignment?: boolean | undefined;
|
286
|
+
type: "REJECT";
|
287
|
+
declaration: {};
|
232
288
|
duplicates: never[];
|
233
289
|
eventId: string;
|
290
|
+
reason: {
|
291
|
+
message: string;
|
292
|
+
};
|
234
293
|
};
|
235
|
-
register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "declaration" | "annotation">>) => {
|
236
|
-
type: "REGISTER";
|
294
|
+
register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment" | "registrationNumber">>) => {
|
237
295
|
transactionId: string;
|
238
296
|
declaration: Record<string, string | number | boolean | {
|
239
297
|
type: string;
|
240
|
-
|
298
|
+
path: string;
|
241
299
|
originalFilename: string;
|
242
300
|
} | {
|
243
301
|
country: string;
|
@@ -250,6 +308,10 @@ export declare const eventPayloadGenerator: {
|
|
250
308
|
residentialArea?: string | null | undefined;
|
251
309
|
street?: string | null | undefined;
|
252
310
|
zipCode?: string | null | undefined;
|
311
|
+
} | {
|
312
|
+
firstname?: string | null | undefined;
|
313
|
+
surname?: string | null | undefined;
|
314
|
+
middlename?: string | null | undefined;
|
253
315
|
} | {
|
254
316
|
country: string;
|
255
317
|
district: string;
|
@@ -270,26 +332,33 @@ export declare const eventPayloadGenerator: {
|
|
270
332
|
} | {
|
271
333
|
type: string;
|
272
334
|
option: string;
|
273
|
-
|
335
|
+
path: string;
|
274
336
|
originalFilename: string;
|
275
|
-
}[] |
|
337
|
+
}[] | {
|
338
|
+
start: string;
|
339
|
+
end: string;
|
340
|
+
} | null | undefined>;
|
276
341
|
annotation: {};
|
342
|
+
registrationNumber?: string | undefined;
|
343
|
+
keepAssignment?: boolean | undefined;
|
344
|
+
type: "REGISTER";
|
277
345
|
eventId: string;
|
278
346
|
};
|
279
|
-
printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "annotation">>) => {
|
280
|
-
type: "PRINT_CERTIFICATE";
|
347
|
+
printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
|
281
348
|
transactionId: string;
|
282
|
-
declaration: {};
|
283
349
|
annotation: {};
|
350
|
+
keepAssignment?: boolean | undefined;
|
351
|
+
type: "PRINT_CERTIFICATE";
|
352
|
+
declaration: {};
|
284
353
|
eventId: string;
|
285
354
|
};
|
286
355
|
correction: {
|
287
|
-
request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "declaration" | "annotation">>) => {
|
356
|
+
request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
|
288
357
|
type: "REQUEST_CORRECTION";
|
289
358
|
transactionId: string;
|
290
359
|
declaration: Record<string, string | number | boolean | {
|
291
360
|
type: string;
|
292
|
-
|
361
|
+
path: string;
|
293
362
|
originalFilename: string;
|
294
363
|
} | {
|
295
364
|
country: string;
|
@@ -302,6 +371,10 @@ export declare const eventPayloadGenerator: {
|
|
302
371
|
residentialArea?: string | null | undefined;
|
303
372
|
street?: string | null | undefined;
|
304
373
|
zipCode?: string | null | undefined;
|
374
|
+
} | {
|
375
|
+
firstname?: string | null | undefined;
|
376
|
+
surname?: string | null | undefined;
|
377
|
+
middlename?: string | null | undefined;
|
305
378
|
} | {
|
306
379
|
country: string;
|
307
380
|
district: string;
|
@@ -322,41 +395,84 @@ export declare const eventPayloadGenerator: {
|
|
322
395
|
} | {
|
323
396
|
type: string;
|
324
397
|
option: string;
|
325
|
-
|
398
|
+
path: string;
|
326
399
|
originalFilename: string;
|
327
|
-
}[] |
|
400
|
+
}[] | {
|
401
|
+
start: string;
|
402
|
+
end: string;
|
403
|
+
} | null | undefined>;
|
328
404
|
annotation: {};
|
329
405
|
eventId: string;
|
406
|
+
keepAssignment: boolean | undefined;
|
330
407
|
};
|
331
|
-
approve: (eventId: string, requestId: string, input?: Partial<Pick<
|
408
|
+
approve: (eventId: string, requestId: string, input?: Partial<Pick<ApproveCorrectionActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
|
332
409
|
type: "APPROVE_CORRECTION";
|
333
410
|
transactionId: string;
|
334
411
|
declaration: {};
|
335
412
|
annotation: {};
|
336
413
|
eventId: string;
|
337
414
|
requestId: string;
|
415
|
+
keepAssignment: boolean | undefined;
|
338
416
|
};
|
339
|
-
reject: (eventId: string, requestId: string, input?: Partial<Pick<
|
417
|
+
reject: (eventId: string, requestId: string, input?: Partial<Pick<RejectCorrectionActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
|
340
418
|
type: "REJECT_CORRECTION";
|
341
419
|
transactionId: string;
|
342
420
|
declaration: {};
|
343
421
|
annotation: {};
|
344
422
|
eventId: string;
|
345
423
|
requestId: string;
|
424
|
+
keepAssignment: boolean | undefined;
|
346
425
|
};
|
347
426
|
};
|
348
427
|
};
|
349
428
|
};
|
350
|
-
export declare function generateActionDocument({ configuration, action, defaults }: {
|
429
|
+
export declare function generateActionDocument({ configuration, action, rng, defaults, user }: {
|
351
430
|
configuration: EventConfig;
|
352
431
|
action: ActionType;
|
432
|
+
rng?: () => number;
|
353
433
|
defaults?: Partial<ActionDocument>;
|
434
|
+
user?: Partial<{
|
435
|
+
signature: string;
|
436
|
+
primaryOfficeId: UUID;
|
437
|
+
role: TestUserRole;
|
438
|
+
id: string;
|
439
|
+
}>;
|
354
440
|
}): ActionDocument;
|
355
|
-
export declare function generateEventDocument({ configuration, actions }: {
|
441
|
+
export declare function generateEventDocument({ configuration, actions, rng, user }: {
|
356
442
|
configuration: EventConfig;
|
357
443
|
actions: ActionType[];
|
444
|
+
rng?: () => number;
|
445
|
+
user?: Partial<{
|
446
|
+
signature: string;
|
447
|
+
primaryOfficeId: UUID;
|
448
|
+
role: TestUserRole;
|
449
|
+
id: string;
|
450
|
+
}>;
|
358
451
|
}): EventDocument;
|
359
|
-
export declare function generateEventDraftDocument(eventId
|
360
|
-
|
452
|
+
export declare function generateEventDraftDocument({ eventId, actionType, rng, declaration }: {
|
453
|
+
eventId: UUID;
|
454
|
+
actionType: ActionType;
|
455
|
+
rng?: () => number;
|
456
|
+
declaration?: EventState;
|
457
|
+
}): Draft;
|
458
|
+
export declare function getRandomDatetime(rng: () => number, start: Date, end: Date): string;
|
459
|
+
export declare function getRandomDate(rng: () => number, start: string, end: string): string;
|
460
|
+
/**
|
461
|
+
* Useful for testing when we need deterministic outcome.
|
462
|
+
* @param seed - Seed value for the pseudo-random number generator
|
463
|
+
*
|
464
|
+
* @returns A function that generates pseudo-random numbers between 0 and 1 [0, 1)
|
465
|
+
*/
|
466
|
+
export declare function createPrng(seed: number): () => number;
|
467
|
+
export declare function generateUuid(rng?: () => number): UUID;
|
468
|
+
export declare function generateRegistrationNumber(rng: () => number): string;
|
469
|
+
export declare function generateRandomSignature(rng: () => number): string;
|
470
|
+
export declare const eventQueryDataGenerator: (overrides?: Partial<EventIndex>, seed?: number) => EventIndex;
|
361
471
|
export declare const generateTranslationConfig: (message: string) => TranslationConfig;
|
472
|
+
export declare const BearerTokenByUserType: {
|
473
|
+
fieldAgent: string;
|
474
|
+
registrationAgent: string;
|
475
|
+
localRegistrar: string;
|
476
|
+
};
|
477
|
+
export declare const generateWorkqueues: (slug?: string) => WorkqueueConfig[];
|
362
478
|
//# sourceMappingURL=test.utils.d.ts.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare function generateTransactionId(): import("
|
1
|
+
export declare function generateTransactionId(): string & import("zod").BRAND<"UUID">;
|
2
2
|
//# sourceMappingURL=transactions.d.ts.map
|