@opencrvs/toolkit 1.8.0-rc.ff2e7b6 → 1.8.0-rc.ff62f9e

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.
@@ -7,6 +7,7 @@ import { EventDocument } from './EventDocument';
7
7
  import { EventIndex } from './EventIndex';
8
8
  import { EventInput } from './EventInput';
9
9
  import { FieldValue } from './FieldValue';
10
+ import { TranslationConfig } from './TranslationConfig';
10
11
  export declare function generateActionInput(configuration: EventConfig, action: ActionType): import("lodash").Dictionary<string | number | boolean | {
11
12
  type: string;
12
13
  filename: string;
@@ -14,6 +15,7 @@ export declare function generateActionInput(configuration: EventConfig, action:
14
15
  } | {
15
16
  country: string;
16
17
  district: string;
18
+ addressType: "DOMESTIC";
17
19
  province: string;
18
20
  urbanOrRural: "URBAN";
19
21
  number?: string | undefined;
@@ -24,15 +26,27 @@ export declare function generateActionInput(configuration: EventConfig, action:
24
26
  } | {
25
27
  country: string;
26
28
  district: string;
29
+ addressType: "DOMESTIC";
27
30
  province: string;
28
31
  urbanOrRural: "RURAL";
29
32
  village?: string | undefined;
33
+ } | {
34
+ country: string;
35
+ state: string;
36
+ addressType: "INTERNATIONAL";
37
+ district2: string;
38
+ cityOrTown?: string | undefined;
39
+ addressLine1?: string | undefined;
40
+ addressLine2?: string | undefined;
41
+ addressLine3?: string | undefined;
42
+ postcodeOrZip?: string | undefined;
30
43
  } | {
31
44
  type: string;
32
45
  option: string;
33
46
  filename: string;
34
47
  originalFilename: string;
35
- }[]>;
48
+ }[] | undefined>;
49
+ export declare function generateActionMetadataInput(configuration: EventConfig, action: ActionType): {};
36
50
  export declare const eventPayloadGenerator: {
37
51
  create: (input?: Partial<EventInput>) => {
38
52
  transactionId: string;
@@ -78,6 +92,7 @@ export declare const eventPayloadGenerator: {
78
92
  } | {
79
93
  country: string;
80
94
  district: string;
95
+ addressType: "DOMESTIC";
81
96
  province: string;
82
97
  urbanOrRural: "URBAN";
83
98
  number?: string | null | undefined;
@@ -88,15 +103,26 @@ export declare const eventPayloadGenerator: {
88
103
  } | {
89
104
  country: string;
90
105
  district: string;
106
+ addressType: "DOMESTIC";
91
107
  province: string;
92
108
  urbanOrRural: "RURAL";
93
109
  village?: string | null | undefined;
110
+ } | {
111
+ country: string;
112
+ state: string;
113
+ addressType: "INTERNATIONAL";
114
+ district2: string;
115
+ cityOrTown?: string | null | undefined;
116
+ addressLine1?: string | null | undefined;
117
+ addressLine2?: string | null | undefined;
118
+ addressLine3?: string | null | undefined;
119
+ postcodeOrZip?: string | null | undefined;
94
120
  } | {
95
121
  type: string;
96
122
  option: string;
97
123
  filename: string;
98
124
  originalFilename: string;
99
- }[]>;
125
+ }[] | undefined>;
100
126
  createdAt: string;
101
127
  createdBy: string;
102
128
  createdAtLocation: string;
@@ -107,6 +133,7 @@ export declare const eventPayloadGenerator: {
107
133
  } | {
108
134
  country: string;
109
135
  district: string;
136
+ addressType: "DOMESTIC";
110
137
  province: string;
111
138
  urbanOrRural: "URBAN";
112
139
  number?: string | null | undefined;
@@ -117,15 +144,26 @@ export declare const eventPayloadGenerator: {
117
144
  } | {
118
145
  country: string;
119
146
  district: string;
147
+ addressType: "DOMESTIC";
120
148
  province: string;
121
149
  urbanOrRural: "RURAL";
122
150
  village?: string | null | undefined;
151
+ } | {
152
+ country: string;
153
+ state: string;
154
+ addressType: "INTERNATIONAL";
155
+ district2: string;
156
+ cityOrTown?: string | null | undefined;
157
+ addressLine1?: string | null | undefined;
158
+ addressLine2?: string | null | undefined;
159
+ addressLine3?: string | null | undefined;
160
+ postcodeOrZip?: string | null | undefined;
123
161
  } | {
124
162
  type: string;
125
163
  option: string;
126
164
  filename: string;
127
165
  originalFilename: string;
128
- }[]> | undefined;
166
+ }[] | undefined> | undefined;
129
167
  };
130
168
  }>;
131
169
  actions: {
@@ -139,6 +177,7 @@ export declare const eventPayloadGenerator: {
139
177
  } | {
140
178
  country: string;
141
179
  district: string;
180
+ addressType: "DOMESTIC";
142
181
  province: string;
143
182
  urbanOrRural: "URBAN";
144
183
  number?: string | null | undefined;
@@ -149,15 +188,26 @@ export declare const eventPayloadGenerator: {
149
188
  } | {
150
189
  country: string;
151
190
  district: string;
191
+ addressType: "DOMESTIC";
152
192
  province: string;
153
193
  urbanOrRural: "RURAL";
154
194
  village?: string | null | undefined;
195
+ } | {
196
+ country: string;
197
+ state: string;
198
+ addressType: "INTERNATIONAL";
199
+ district2: string;
200
+ cityOrTown?: string | null | undefined;
201
+ addressLine1?: string | null | undefined;
202
+ addressLine2?: string | null | undefined;
203
+ addressLine3?: string | null | undefined;
204
+ postcodeOrZip?: string | null | undefined;
155
205
  } | {
156
206
  type: string;
157
207
  option: string;
158
208
  filename: string;
159
209
  originalFilename: string;
160
- }[]>;
210
+ }[] | undefined>;
161
211
  eventId: string;
162
212
  };
163
213
  validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "data">>) => {
@@ -170,6 +220,7 @@ export declare const eventPayloadGenerator: {
170
220
  } | {
171
221
  country: string;
172
222
  district: string;
223
+ addressType: "DOMESTIC";
173
224
  province: string;
174
225
  urbanOrRural: "URBAN";
175
226
  number?: string | null | undefined;
@@ -180,15 +231,26 @@ export declare const eventPayloadGenerator: {
180
231
  } | {
181
232
  country: string;
182
233
  district: string;
234
+ addressType: "DOMESTIC";
183
235
  province: string;
184
236
  urbanOrRural: "RURAL";
185
237
  village?: string | null | undefined;
238
+ } | {
239
+ country: string;
240
+ state: string;
241
+ addressType: "INTERNATIONAL";
242
+ district2: string;
243
+ cityOrTown?: string | null | undefined;
244
+ addressLine1?: string | null | undefined;
245
+ addressLine2?: string | null | undefined;
246
+ addressLine3?: string | null | undefined;
247
+ postcodeOrZip?: string | null | undefined;
186
248
  } | {
187
249
  type: string;
188
250
  option: string;
189
251
  filename: string;
190
252
  originalFilename: string;
191
- }[]>;
253
+ }[] | undefined>;
192
254
  duplicates: never[];
193
255
  eventId: string;
194
256
  };
@@ -202,6 +264,7 @@ export declare const eventPayloadGenerator: {
202
264
  } | {
203
265
  country: string;
204
266
  district: string;
267
+ addressType: "DOMESTIC";
205
268
  province: string;
206
269
  urbanOrRural: "URBAN";
207
270
  number?: string | null | undefined;
@@ -212,15 +275,26 @@ export declare const eventPayloadGenerator: {
212
275
  } | {
213
276
  country: string;
214
277
  district: string;
278
+ addressType: "DOMESTIC";
215
279
  province: string;
216
280
  urbanOrRural: "RURAL";
217
281
  village?: string | null | undefined;
282
+ } | {
283
+ country: string;
284
+ state: string;
285
+ addressType: "INTERNATIONAL";
286
+ district2: string;
287
+ cityOrTown?: string | null | undefined;
288
+ addressLine1?: string | null | undefined;
289
+ addressLine2?: string | null | undefined;
290
+ addressLine3?: string | null | undefined;
291
+ postcodeOrZip?: string | null | undefined;
218
292
  } | {
219
293
  type: string;
220
294
  option: string;
221
295
  filename: string;
222
296
  originalFilename: string;
223
- }[]>;
297
+ }[] | undefined>;
224
298
  metadata: {
225
299
  isDuplicate: boolean;
226
300
  };
@@ -237,6 +311,7 @@ export declare const eventPayloadGenerator: {
237
311
  } | {
238
312
  country: string;
239
313
  district: string;
314
+ addressType: "DOMESTIC";
240
315
  province: string;
241
316
  urbanOrRural: "URBAN";
242
317
  number?: string | null | undefined;
@@ -247,15 +322,26 @@ export declare const eventPayloadGenerator: {
247
322
  } | {
248
323
  country: string;
249
324
  district: string;
325
+ addressType: "DOMESTIC";
250
326
  province: string;
251
327
  urbanOrRural: "RURAL";
252
328
  village?: string | null | undefined;
329
+ } | {
330
+ country: string;
331
+ state: string;
332
+ addressType: "INTERNATIONAL";
333
+ district2: string;
334
+ cityOrTown?: string | null | undefined;
335
+ addressLine1?: string | null | undefined;
336
+ addressLine2?: string | null | undefined;
337
+ addressLine3?: string | null | undefined;
338
+ postcodeOrZip?: string | null | undefined;
253
339
  } | {
254
340
  type: string;
255
341
  option: string;
256
342
  filename: string;
257
343
  originalFilename: string;
258
- }[]>;
344
+ }[] | undefined>;
259
345
  duplicates: never[];
260
346
  eventId: string;
261
347
  };
@@ -269,6 +355,7 @@ export declare const eventPayloadGenerator: {
269
355
  } | {
270
356
  country: string;
271
357
  district: string;
358
+ addressType: "DOMESTIC";
272
359
  province: string;
273
360
  urbanOrRural: "URBAN";
274
361
  number?: string | null | undefined;
@@ -279,18 +366,29 @@ export declare const eventPayloadGenerator: {
279
366
  } | {
280
367
  country: string;
281
368
  district: string;
369
+ addressType: "DOMESTIC";
282
370
  province: string;
283
371
  urbanOrRural: "RURAL";
284
372
  village?: string | null | undefined;
373
+ } | {
374
+ country: string;
375
+ state: string;
376
+ addressType: "INTERNATIONAL";
377
+ district2: string;
378
+ cityOrTown?: string | null | undefined;
379
+ addressLine1?: string | null | undefined;
380
+ addressLine2?: string | null | undefined;
381
+ addressLine3?: string | null | undefined;
382
+ postcodeOrZip?: string | null | undefined;
285
383
  } | {
286
384
  type: string;
287
385
  option: string;
288
386
  filename: string;
289
387
  originalFilename: string;
290
- }[]>;
388
+ }[] | undefined>;
291
389
  eventId: string;
292
390
  };
293
- printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "data">>) => {
391
+ printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "data" | "metadata">>) => {
294
392
  type: "PRINT_CERTIFICATE";
295
393
  transactionId: string;
296
394
  data: Record<string, string | number | boolean | {
@@ -300,6 +398,7 @@ export declare const eventPayloadGenerator: {
300
398
  } | {
301
399
  country: string;
302
400
  district: string;
401
+ addressType: "DOMESTIC";
303
402
  province: string;
304
403
  urbanOrRural: "URBAN";
305
404
  number?: string | null | undefined;
@@ -310,15 +409,27 @@ export declare const eventPayloadGenerator: {
310
409
  } | {
311
410
  country: string;
312
411
  district: string;
412
+ addressType: "DOMESTIC";
313
413
  province: string;
314
414
  urbanOrRural: "RURAL";
315
415
  village?: string | null | undefined;
416
+ } | {
417
+ country: string;
418
+ state: string;
419
+ addressType: "INTERNATIONAL";
420
+ district2: string;
421
+ cityOrTown?: string | null | undefined;
422
+ addressLine1?: string | null | undefined;
423
+ addressLine2?: string | null | undefined;
424
+ addressLine3?: string | null | undefined;
425
+ postcodeOrZip?: string | null | undefined;
316
426
  } | {
317
427
  type: string;
318
428
  option: string;
319
429
  filename: string;
320
430
  originalFilename: string;
321
- }[]>;
431
+ }[] | undefined>;
432
+ metadata: {};
322
433
  eventId: string;
323
434
  };
324
435
  correction: {
@@ -332,6 +443,7 @@ export declare const eventPayloadGenerator: {
332
443
  } | {
333
444
  country: string;
334
445
  district: string;
446
+ addressType: "DOMESTIC";
335
447
  province: string;
336
448
  urbanOrRural: "URBAN";
337
449
  number?: string | null | undefined;
@@ -342,15 +454,26 @@ export declare const eventPayloadGenerator: {
342
454
  } | {
343
455
  country: string;
344
456
  district: string;
457
+ addressType: "DOMESTIC";
345
458
  province: string;
346
459
  urbanOrRural: "RURAL";
347
460
  village?: string | null | undefined;
461
+ } | {
462
+ country: string;
463
+ state: string;
464
+ addressType: "INTERNATIONAL";
465
+ district2: string;
466
+ cityOrTown?: string | null | undefined;
467
+ addressLine1?: string | null | undefined;
468
+ addressLine2?: string | null | undefined;
469
+ addressLine3?: string | null | undefined;
470
+ postcodeOrZip?: string | null | undefined;
348
471
  } | {
349
472
  type: string;
350
473
  option: string;
351
474
  filename: string;
352
475
  originalFilename: string;
353
- }[]>;
476
+ }[] | undefined>;
354
477
  metadata: {};
355
478
  eventId: string;
356
479
  };
@@ -364,6 +487,7 @@ export declare const eventPayloadGenerator: {
364
487
  } | {
365
488
  country: string;
366
489
  district: string;
490
+ addressType: "DOMESTIC";
367
491
  province: string;
368
492
  urbanOrRural: "URBAN";
369
493
  number?: string | null | undefined;
@@ -374,15 +498,26 @@ export declare const eventPayloadGenerator: {
374
498
  } | {
375
499
  country: string;
376
500
  district: string;
501
+ addressType: "DOMESTIC";
377
502
  province: string;
378
503
  urbanOrRural: "RURAL";
379
504
  village?: string | null | undefined;
505
+ } | {
506
+ country: string;
507
+ state: string;
508
+ addressType: "INTERNATIONAL";
509
+ district2: string;
510
+ cityOrTown?: string | null | undefined;
511
+ addressLine1?: string | null | undefined;
512
+ addressLine2?: string | null | undefined;
513
+ addressLine3?: string | null | undefined;
514
+ postcodeOrZip?: string | null | undefined;
380
515
  } | {
381
516
  type: string;
382
517
  option: string;
383
518
  filename: string;
384
519
  originalFilename: string;
385
- }[]>;
520
+ }[] | undefined>;
386
521
  eventId: string;
387
522
  requestId: string;
388
523
  };
@@ -396,6 +531,7 @@ export declare const eventPayloadGenerator: {
396
531
  } | {
397
532
  country: string;
398
533
  district: string;
534
+ addressType: "DOMESTIC";
399
535
  province: string;
400
536
  urbanOrRural: "URBAN";
401
537
  number?: string | null | undefined;
@@ -406,15 +542,26 @@ export declare const eventPayloadGenerator: {
406
542
  } | {
407
543
  country: string;
408
544
  district: string;
545
+ addressType: "DOMESTIC";
409
546
  province: string;
410
547
  urbanOrRural: "RURAL";
411
548
  village?: string | null | undefined;
549
+ } | {
550
+ country: string;
551
+ state: string;
552
+ addressType: "INTERNATIONAL";
553
+ district2: string;
554
+ cityOrTown?: string | null | undefined;
555
+ addressLine1?: string | null | undefined;
556
+ addressLine2?: string | null | undefined;
557
+ addressLine3?: string | null | undefined;
558
+ postcodeOrZip?: string | null | undefined;
412
559
  } | {
413
560
  type: string;
414
561
  option: string;
415
562
  filename: string;
416
563
  originalFilename: string;
417
- }[]>;
564
+ }[] | undefined>;
418
565
  eventId: string;
419
566
  requestId: string;
420
567
  };
@@ -432,4 +579,5 @@ export declare function generateEventDocument({ configuration, actions }: {
432
579
  }): EventDocument;
433
580
  export declare function generateEventDraftDocument(eventId: string, actionType?: ActionType, data?: Record<string, FieldValue>): Draft;
434
581
  export declare const eventQueryDataGenerator: (overrides?: Partial<EventIndex>) => EventIndex;
582
+ export declare const generateTranslationConfig: (message: string) => TranslationConfig;
435
583
  //# sourceMappingURL=test.utils.d.ts.map