@opencrvs/toolkit 1.8.0-rc.fd16d13 → 1.8.0-rc.fd31705

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 (30) hide show
  1. package/README.md +1 -1
  2. package/dist/commons/api/router.d.ts +6304 -12729
  3. package/dist/commons/conditionals/conditionals.d.ts +26 -3
  4. package/dist/commons/conditionals/validate.d.ts +12 -11
  5. package/dist/commons/events/ActionConfig.d.ts +1123 -2056
  6. package/dist/commons/events/ActionDocument.d.ts +8065 -452
  7. package/dist/commons/events/ActionInput.d.ts +3021 -594
  8. package/dist/commons/events/ActionType.d.ts +24 -11
  9. package/dist/commons/events/CompositeFieldValue.d.ts +52 -12
  10. package/dist/commons/events/Conditional.d.ts +21 -5
  11. package/dist/commons/events/Draft.d.ts +145 -61
  12. package/dist/commons/events/EventConfig.d.ts +551 -1206
  13. package/dist/commons/events/EventConfigInput.d.ts +6 -3
  14. package/dist/commons/events/EventDocument.d.ts +1565 -544
  15. package/dist/commons/events/EventIndex.d.ts +6 -3
  16. package/dist/commons/events/EventMetadata.d.ts +3 -0
  17. package/dist/commons/events/FieldConfig.d.ts +483 -76
  18. package/dist/commons/events/FieldType.d.ts +2 -1
  19. package/dist/commons/events/FieldTypeMapping.d.ts +57 -8
  20. package/dist/commons/events/FieldValue.d.ts +30 -10
  21. package/dist/commons/events/FormConfig.d.ts +633 -48
  22. package/dist/commons/events/PageConfig.d.ts +335 -0
  23. package/dist/commons/events/TemplateConfig.d.ts +2 -2
  24. package/dist/commons/events/defineConfig.d.ts +91 -216
  25. package/dist/commons/events/index.d.ts +2 -1
  26. package/dist/commons/events/test.utils.d.ts +87 -268
  27. package/dist/commons/events/utils.d.ts +90 -83
  28. package/dist/conditionals/index.js +166 -81
  29. package/dist/events/index.js +1188 -743
  30. package/package.json +1 -1
@@ -1,5 +1,4 @@
1
1
  import { z } from 'zod';
2
- import { ActionType } from './ActionType';
3
2
  export declare const Draft: z.ZodObject<{
4
3
  id: z.ZodString;
5
4
  eventId: z.ZodString;
@@ -9,7 +8,7 @@ export declare const Draft: z.ZodObject<{
9
8
  id: z.ZodString;
10
9
  createdAt: z.ZodString;
11
10
  createdBy: z.ZodString;
12
- data: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
11
+ declaration: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
13
12
  filename: z.ZodString;
14
13
  originalFilename: z.ZodString;
15
14
  type: z.ZodString;
@@ -37,7 +36,8 @@ export declare const Draft: z.ZodObject<{
37
36
  filename: string;
38
37
  originalFilename: string;
39
38
  }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
40
- country: z.ZodLiteral<string>;
39
+ country: z.ZodString;
40
+ addressType: z.ZodLiteral<"DOMESTIC">;
41
41
  province: z.ZodString;
42
42
  district: z.ZodString;
43
43
  }, {
@@ -50,6 +50,7 @@ export declare const Draft: z.ZodObject<{
50
50
  }>, "strip", z.ZodTypeAny, {
51
51
  country: string;
52
52
  district: string;
53
+ addressType: "DOMESTIC";
53
54
  province: string;
54
55
  urbanOrRural: "URBAN";
55
56
  number?: string | null | undefined;
@@ -60,6 +61,7 @@ export declare const Draft: z.ZodObject<{
60
61
  }, {
61
62
  country: string;
62
63
  district: string;
64
+ addressType: "DOMESTIC";
63
65
  province: string;
64
66
  urbanOrRural: "URBAN";
65
67
  number?: string | null | undefined;
@@ -68,7 +70,8 @@ export declare const Draft: z.ZodObject<{
68
70
  street?: string | null | undefined;
69
71
  zipCode?: string | null | undefined;
70
72
  }>, z.ZodObject<z.objectUtil.extendShape<{
71
- country: z.ZodLiteral<string>;
73
+ country: z.ZodString;
74
+ addressType: z.ZodLiteral<"DOMESTIC">;
72
75
  province: z.ZodString;
73
76
  district: z.ZodString;
74
77
  }, {
@@ -77,17 +80,20 @@ export declare const Draft: z.ZodObject<{
77
80
  }>, "strip", z.ZodTypeAny, {
78
81
  country: string;
79
82
  district: string;
83
+ addressType: "DOMESTIC";
80
84
  province: string;
81
85
  urbanOrRural: "RURAL";
82
86
  village?: string | null | undefined;
83
87
  }, {
84
88
  country: string;
85
89
  district: string;
90
+ addressType: "DOMESTIC";
86
91
  province: string;
87
92
  urbanOrRural: "RURAL";
88
93
  village?: string | null | undefined;
89
- }>, z.ZodObject<{
90
- country: z.ZodEffects<z.ZodString, string, string>;
94
+ }>, z.ZodUndefined, z.ZodObject<{
95
+ country: z.ZodString;
96
+ addressType: z.ZodLiteral<"INTERNATIONAL">;
91
97
  state: z.ZodString;
92
98
  district2: z.ZodString;
93
99
  cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -98,6 +104,7 @@ export declare const Draft: z.ZodObject<{
98
104
  }, "strip", z.ZodTypeAny, {
99
105
  country: string;
100
106
  state: string;
107
+ addressType: "INTERNATIONAL";
101
108
  district2: string;
102
109
  cityOrTown?: string | null | undefined;
103
110
  addressLine1?: string | null | undefined;
@@ -107,6 +114,7 @@ export declare const Draft: z.ZodObject<{
107
114
  }, {
108
115
  country: string;
109
116
  state: string;
117
+ addressType: "INTERNATIONAL";
110
118
  district2: string;
111
119
  cityOrTown?: string | null | undefined;
112
120
  addressLine1?: string | null | undefined;
@@ -114,7 +122,7 @@ export declare const Draft: z.ZodObject<{
114
122
  addressLine3?: string | null | undefined;
115
123
  postcodeOrZip?: string | null | undefined;
116
124
  }>]>>;
117
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
125
+ annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
118
126
  filename: z.ZodString;
119
127
  originalFilename: z.ZodString;
120
128
  type: z.ZodString;
@@ -142,7 +150,8 @@ export declare const Draft: z.ZodObject<{
142
150
  filename: string;
143
151
  originalFilename: string;
144
152
  }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
145
- country: z.ZodLiteral<string>;
153
+ country: z.ZodString;
154
+ addressType: z.ZodLiteral<"DOMESTIC">;
146
155
  province: z.ZodString;
147
156
  district: z.ZodString;
148
157
  }, {
@@ -155,6 +164,7 @@ export declare const Draft: z.ZodObject<{
155
164
  }>, "strip", z.ZodTypeAny, {
156
165
  country: string;
157
166
  district: string;
167
+ addressType: "DOMESTIC";
158
168
  province: string;
159
169
  urbanOrRural: "URBAN";
160
170
  number?: string | null | undefined;
@@ -165,6 +175,7 @@ export declare const Draft: z.ZodObject<{
165
175
  }, {
166
176
  country: string;
167
177
  district: string;
178
+ addressType: "DOMESTIC";
168
179
  province: string;
169
180
  urbanOrRural: "URBAN";
170
181
  number?: string | null | undefined;
@@ -173,7 +184,8 @@ export declare const Draft: z.ZodObject<{
173
184
  street?: string | null | undefined;
174
185
  zipCode?: string | null | undefined;
175
186
  }>, z.ZodObject<z.objectUtil.extendShape<{
176
- country: z.ZodLiteral<string>;
187
+ country: z.ZodString;
188
+ addressType: z.ZodLiteral<"DOMESTIC">;
177
189
  province: z.ZodString;
178
190
  district: z.ZodString;
179
191
  }, {
@@ -182,17 +194,20 @@ export declare const Draft: z.ZodObject<{
182
194
  }>, "strip", z.ZodTypeAny, {
183
195
  country: string;
184
196
  district: string;
197
+ addressType: "DOMESTIC";
185
198
  province: string;
186
199
  urbanOrRural: "RURAL";
187
200
  village?: string | null | undefined;
188
201
  }, {
189
202
  country: string;
190
203
  district: string;
204
+ addressType: "DOMESTIC";
191
205
  province: string;
192
206
  urbanOrRural: "RURAL";
193
207
  village?: string | null | undefined;
194
- }>, z.ZodObject<{
195
- country: z.ZodEffects<z.ZodString, string, string>;
208
+ }>, z.ZodUndefined, z.ZodObject<{
209
+ country: z.ZodString;
210
+ addressType: z.ZodLiteral<"INTERNATIONAL">;
196
211
  state: z.ZodString;
197
212
  district2: z.ZodString;
198
213
  cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -203,6 +218,7 @@ export declare const Draft: z.ZodObject<{
203
218
  }, "strip", z.ZodTypeAny, {
204
219
  country: string;
205
220
  state: string;
221
+ addressType: "INTERNATIONAL";
206
222
  district2: string;
207
223
  cityOrTown?: string | null | undefined;
208
224
  addressLine1?: string | null | undefined;
@@ -212,6 +228,7 @@ export declare const Draft: z.ZodObject<{
212
228
  }, {
213
229
  country: string;
214
230
  state: string;
231
+ addressType: "INTERNATIONAL";
215
232
  district2: string;
216
233
  cityOrTown?: string | null | undefined;
217
234
  addressLine1?: string | null | undefined;
@@ -220,17 +237,23 @@ export declare const Draft: z.ZodObject<{
220
237
  postcodeOrZip?: string | null | undefined;
221
238
  }>]>>>;
222
239
  createdAtLocation: z.ZodString;
240
+ status: z.ZodEnum<["Requested", "Accepted", "Rejected"]>;
241
+ originalActionId: z.ZodOptional<z.ZodString>;
223
242
  }, {
224
- type: z.ZodEnum<[ActionType, ...ActionType[]]>;
243
+ type: z.ZodEnum<["DELETE", "CREATE", "NOTIFY", "DECLARE", "VALIDATE", "REGISTER", "DETECT_DUPLICATE", "REJECT", "MARKED_AS_DUPLICATE", "ARCHIVE", "PRINT_CERTIFICATE", "REQUEST_CORRECTION", "REJECT_CORRECTION", "APPROVE_CORRECTION", "READ", "ASSIGN", "UNASSIGN"]>;
225
244
  }>, "id">, "strip", z.ZodTypeAny, {
226
- type: ActionType;
227
- data: Record<string, string | number | boolean | {
245
+ type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "CREATE" | "NOTIFY" | "DETECT_DUPLICATE" | "REJECT" | "MARKED_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
246
+ status: "Rejected" | "Requested" | "Accepted";
247
+ createdAt: string;
248
+ createdBy: string;
249
+ declaration: Record<string, string | number | boolean | {
228
250
  type: string;
229
251
  filename: string;
230
252
  originalFilename: string;
231
253
  } | {
232
254
  country: string;
233
255
  district: string;
256
+ addressType: "DOMESTIC";
234
257
  province: string;
235
258
  urbanOrRural: "URBAN";
236
259
  number?: string | null | undefined;
@@ -241,12 +264,14 @@ export declare const Draft: z.ZodObject<{
241
264
  } | {
242
265
  country: string;
243
266
  district: string;
267
+ addressType: "DOMESTIC";
244
268
  province: string;
245
269
  urbanOrRural: "RURAL";
246
270
  village?: string | null | undefined;
247
271
  } | {
248
272
  country: string;
249
273
  state: string;
274
+ addressType: "INTERNATIONAL";
250
275
  district2: string;
251
276
  cityOrTown?: string | null | undefined;
252
277
  addressLine1?: string | null | undefined;
@@ -258,17 +283,16 @@ export declare const Draft: z.ZodObject<{
258
283
  option: string;
259
284
  filename: string;
260
285
  originalFilename: string;
261
- }[]>;
262
- createdAt: string;
263
- createdBy: string;
286
+ }[] | undefined>;
264
287
  createdAtLocation: string;
265
- metadata?: Record<string, string | number | boolean | {
288
+ annotation?: Record<string, string | number | boolean | {
266
289
  type: string;
267
290
  filename: string;
268
291
  originalFilename: string;
269
292
  } | {
270
293
  country: string;
271
294
  district: string;
295
+ addressType: "DOMESTIC";
272
296
  province: string;
273
297
  urbanOrRural: "URBAN";
274
298
  number?: string | null | undefined;
@@ -279,12 +303,14 @@ export declare const Draft: z.ZodObject<{
279
303
  } | {
280
304
  country: string;
281
305
  district: string;
306
+ addressType: "DOMESTIC";
282
307
  province: string;
283
308
  urbanOrRural: "RURAL";
284
309
  village?: string | null | undefined;
285
310
  } | {
286
311
  country: string;
287
312
  state: string;
313
+ addressType: "INTERNATIONAL";
288
314
  district2: string;
289
315
  cityOrTown?: string | null | undefined;
290
316
  addressLine1?: string | null | undefined;
@@ -296,16 +322,21 @@ export declare const Draft: z.ZodObject<{
296
322
  option: string;
297
323
  filename: string;
298
324
  originalFilename: string;
299
- }[]> | undefined;
325
+ }[] | undefined> | undefined;
326
+ originalActionId?: string | undefined;
300
327
  }, {
301
- type: ActionType;
302
- data: Record<string, string | number | boolean | {
328
+ type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "CREATE" | "NOTIFY" | "DETECT_DUPLICATE" | "REJECT" | "MARKED_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
329
+ status: "Rejected" | "Requested" | "Accepted";
330
+ createdAt: string;
331
+ createdBy: string;
332
+ declaration: Record<string, string | number | boolean | {
303
333
  type: string;
304
334
  filename: string;
305
335
  originalFilename: string;
306
336
  } | {
307
337
  country: string;
308
338
  district: string;
339
+ addressType: "DOMESTIC";
309
340
  province: string;
310
341
  urbanOrRural: "URBAN";
311
342
  number?: string | null | undefined;
@@ -316,12 +347,14 @@ export declare const Draft: z.ZodObject<{
316
347
  } | {
317
348
  country: string;
318
349
  district: string;
350
+ addressType: "DOMESTIC";
319
351
  province: string;
320
352
  urbanOrRural: "RURAL";
321
353
  village?: string | null | undefined;
322
354
  } | {
323
355
  country: string;
324
356
  state: string;
357
+ addressType: "INTERNATIONAL";
325
358
  district2: string;
326
359
  cityOrTown?: string | null | undefined;
327
360
  addressLine1?: string | null | undefined;
@@ -333,17 +366,16 @@ export declare const Draft: z.ZodObject<{
333
366
  option: string;
334
367
  filename: string;
335
368
  originalFilename: string;
336
- }[]>;
337
- createdAt: string;
338
- createdBy: string;
369
+ }[] | undefined>;
339
370
  createdAtLocation: string;
340
- metadata?: Record<string, string | number | boolean | {
371
+ annotation?: Record<string, string | number | boolean | {
341
372
  type: string;
342
373
  filename: string;
343
374
  originalFilename: string;
344
375
  } | {
345
376
  country: string;
346
377
  district: string;
378
+ addressType: "DOMESTIC";
347
379
  province: string;
348
380
  urbanOrRural: "URBAN";
349
381
  number?: string | null | undefined;
@@ -354,12 +386,14 @@ export declare const Draft: z.ZodObject<{
354
386
  } | {
355
387
  country: string;
356
388
  district: string;
389
+ addressType: "DOMESTIC";
357
390
  province: string;
358
391
  urbanOrRural: "RURAL";
359
392
  village?: string | null | undefined;
360
393
  } | {
361
394
  country: string;
362
395
  state: string;
396
+ addressType: "INTERNATIONAL";
363
397
  district2: string;
364
398
  cityOrTown?: string | null | undefined;
365
399
  addressLine1?: string | null | undefined;
@@ -371,7 +405,8 @@ export declare const Draft: z.ZodObject<{
371
405
  option: string;
372
406
  filename: string;
373
407
  originalFilename: string;
374
- }[]> | undefined;
408
+ }[] | undefined> | undefined;
409
+ originalActionId?: string | undefined;
375
410
  }>;
376
411
  }, "strip", z.ZodTypeAny, {
377
412
  id: string;
@@ -379,14 +414,18 @@ export declare const Draft: z.ZodObject<{
379
414
  eventId: string;
380
415
  transactionId: string;
381
416
  action: {
382
- type: ActionType;
383
- data: Record<string, string | number | boolean | {
417
+ type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "CREATE" | "NOTIFY" | "DETECT_DUPLICATE" | "REJECT" | "MARKED_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
418
+ status: "Rejected" | "Requested" | "Accepted";
419
+ createdAt: string;
420
+ createdBy: string;
421
+ declaration: Record<string, string | number | boolean | {
384
422
  type: string;
385
423
  filename: string;
386
424
  originalFilename: string;
387
425
  } | {
388
426
  country: string;
389
427
  district: string;
428
+ addressType: "DOMESTIC";
390
429
  province: string;
391
430
  urbanOrRural: "URBAN";
392
431
  number?: string | null | undefined;
@@ -397,12 +436,14 @@ export declare const Draft: z.ZodObject<{
397
436
  } | {
398
437
  country: string;
399
438
  district: string;
439
+ addressType: "DOMESTIC";
400
440
  province: string;
401
441
  urbanOrRural: "RURAL";
402
442
  village?: string | null | undefined;
403
443
  } | {
404
444
  country: string;
405
445
  state: string;
446
+ addressType: "INTERNATIONAL";
406
447
  district2: string;
407
448
  cityOrTown?: string | null | undefined;
408
449
  addressLine1?: string | null | undefined;
@@ -414,17 +455,16 @@ export declare const Draft: z.ZodObject<{
414
455
  option: string;
415
456
  filename: string;
416
457
  originalFilename: string;
417
- }[]>;
418
- createdAt: string;
419
- createdBy: string;
458
+ }[] | undefined>;
420
459
  createdAtLocation: string;
421
- metadata?: Record<string, string | number | boolean | {
460
+ annotation?: Record<string, string | number | boolean | {
422
461
  type: string;
423
462
  filename: string;
424
463
  originalFilename: string;
425
464
  } | {
426
465
  country: string;
427
466
  district: string;
467
+ addressType: "DOMESTIC";
428
468
  province: string;
429
469
  urbanOrRural: "URBAN";
430
470
  number?: string | null | undefined;
@@ -435,12 +475,14 @@ export declare const Draft: z.ZodObject<{
435
475
  } | {
436
476
  country: string;
437
477
  district: string;
478
+ addressType: "DOMESTIC";
438
479
  province: string;
439
480
  urbanOrRural: "RURAL";
440
481
  village?: string | null | undefined;
441
482
  } | {
442
483
  country: string;
443
484
  state: string;
485
+ addressType: "INTERNATIONAL";
444
486
  district2: string;
445
487
  cityOrTown?: string | null | undefined;
446
488
  addressLine1?: string | null | undefined;
@@ -452,7 +494,8 @@ export declare const Draft: z.ZodObject<{
452
494
  option: string;
453
495
  filename: string;
454
496
  originalFilename: string;
455
- }[]> | undefined;
497
+ }[] | undefined> | undefined;
498
+ originalActionId?: string | undefined;
456
499
  };
457
500
  }, {
458
501
  id: string;
@@ -460,14 +503,18 @@ export declare const Draft: z.ZodObject<{
460
503
  eventId: string;
461
504
  transactionId: string;
462
505
  action: {
463
- type: ActionType;
464
- data: Record<string, string | number | boolean | {
506
+ type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "CREATE" | "NOTIFY" | "DETECT_DUPLICATE" | "REJECT" | "MARKED_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
507
+ status: "Rejected" | "Requested" | "Accepted";
508
+ createdAt: string;
509
+ createdBy: string;
510
+ declaration: Record<string, string | number | boolean | {
465
511
  type: string;
466
512
  filename: string;
467
513
  originalFilename: string;
468
514
  } | {
469
515
  country: string;
470
516
  district: string;
517
+ addressType: "DOMESTIC";
471
518
  province: string;
472
519
  urbanOrRural: "URBAN";
473
520
  number?: string | null | undefined;
@@ -478,12 +525,14 @@ export declare const Draft: z.ZodObject<{
478
525
  } | {
479
526
  country: string;
480
527
  district: string;
528
+ addressType: "DOMESTIC";
481
529
  province: string;
482
530
  urbanOrRural: "RURAL";
483
531
  village?: string | null | undefined;
484
532
  } | {
485
533
  country: string;
486
534
  state: string;
535
+ addressType: "INTERNATIONAL";
487
536
  district2: string;
488
537
  cityOrTown?: string | null | undefined;
489
538
  addressLine1?: string | null | undefined;
@@ -495,17 +544,16 @@ export declare const Draft: z.ZodObject<{
495
544
  option: string;
496
545
  filename: string;
497
546
  originalFilename: string;
498
- }[]>;
499
- createdAt: string;
500
- createdBy: string;
547
+ }[] | undefined>;
501
548
  createdAtLocation: string;
502
- metadata?: Record<string, string | number | boolean | {
549
+ annotation?: Record<string, string | number | boolean | {
503
550
  type: string;
504
551
  filename: string;
505
552
  originalFilename: string;
506
553
  } | {
507
554
  country: string;
508
555
  district: string;
556
+ addressType: "DOMESTIC";
509
557
  province: string;
510
558
  urbanOrRural: "URBAN";
511
559
  number?: string | null | undefined;
@@ -516,12 +564,14 @@ export declare const Draft: z.ZodObject<{
516
564
  } | {
517
565
  country: string;
518
566
  district: string;
567
+ addressType: "DOMESTIC";
519
568
  province: string;
520
569
  urbanOrRural: "RURAL";
521
570
  village?: string | null | undefined;
522
571
  } | {
523
572
  country: string;
524
573
  state: string;
574
+ addressType: "INTERNATIONAL";
525
575
  district2: string;
526
576
  cityOrTown?: string | null | undefined;
527
577
  addressLine1?: string | null | undefined;
@@ -533,13 +583,14 @@ export declare const Draft: z.ZodObject<{
533
583
  option: string;
534
584
  filename: string;
535
585
  originalFilename: string;
536
- }[]> | undefined;
586
+ }[] | undefined> | undefined;
587
+ originalActionId?: string | undefined;
537
588
  };
538
589
  }>;
539
590
  export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
540
591
  eventId: z.ZodString;
541
592
  transactionId: z.ZodString;
542
- data: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
593
+ declaration: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
543
594
  filename: z.ZodString;
544
595
  originalFilename: z.ZodString;
545
596
  type: z.ZodString;
@@ -567,7 +618,8 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
567
618
  filename: string;
568
619
  originalFilename: string;
569
620
  }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
570
- country: z.ZodLiteral<string>;
621
+ country: z.ZodString;
622
+ addressType: z.ZodLiteral<"DOMESTIC">;
571
623
  province: z.ZodString;
572
624
  district: z.ZodString;
573
625
  }, {
@@ -580,6 +632,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
580
632
  }>, "strip", z.ZodTypeAny, {
581
633
  country: string;
582
634
  district: string;
635
+ addressType: "DOMESTIC";
583
636
  province: string;
584
637
  urbanOrRural: "URBAN";
585
638
  number?: string | null | undefined;
@@ -590,6 +643,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
590
643
  }, {
591
644
  country: string;
592
645
  district: string;
646
+ addressType: "DOMESTIC";
593
647
  province: string;
594
648
  urbanOrRural: "URBAN";
595
649
  number?: string | null | undefined;
@@ -598,7 +652,8 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
598
652
  street?: string | null | undefined;
599
653
  zipCode?: string | null | undefined;
600
654
  }>, z.ZodObject<z.objectUtil.extendShape<{
601
- country: z.ZodLiteral<string>;
655
+ country: z.ZodString;
656
+ addressType: z.ZodLiteral<"DOMESTIC">;
602
657
  province: z.ZodString;
603
658
  district: z.ZodString;
604
659
  }, {
@@ -607,17 +662,20 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
607
662
  }>, "strip", z.ZodTypeAny, {
608
663
  country: string;
609
664
  district: string;
665
+ addressType: "DOMESTIC";
610
666
  province: string;
611
667
  urbanOrRural: "RURAL";
612
668
  village?: string | null | undefined;
613
669
  }, {
614
670
  country: string;
615
671
  district: string;
672
+ addressType: "DOMESTIC";
616
673
  province: string;
617
674
  urbanOrRural: "RURAL";
618
675
  village?: string | null | undefined;
619
- }>, z.ZodObject<{
620
- country: z.ZodEffects<z.ZodString, string, string>;
676
+ }>, z.ZodUndefined, z.ZodObject<{
677
+ country: z.ZodString;
678
+ addressType: z.ZodLiteral<"INTERNATIONAL">;
621
679
  state: z.ZodString;
622
680
  district2: z.ZodString;
623
681
  cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -628,6 +686,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
628
686
  }, "strip", z.ZodTypeAny, {
629
687
  country: string;
630
688
  state: string;
689
+ addressType: "INTERNATIONAL";
631
690
  district2: string;
632
691
  cityOrTown?: string | null | undefined;
633
692
  addressLine1?: string | null | undefined;
@@ -637,6 +696,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
637
696
  }, {
638
697
  country: string;
639
698
  state: string;
699
+ addressType: "INTERNATIONAL";
640
700
  district2: string;
641
701
  cityOrTown?: string | null | undefined;
642
702
  addressLine1?: string | null | undefined;
@@ -644,7 +704,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
644
704
  addressLine3?: string | null | undefined;
645
705
  postcodeOrZip?: string | null | undefined;
646
706
  }>]>>;
647
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
707
+ annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
648
708
  filename: z.ZodString;
649
709
  originalFilename: z.ZodString;
650
710
  type: z.ZodString;
@@ -672,7 +732,8 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
672
732
  filename: string;
673
733
  originalFilename: string;
674
734
  }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
675
- country: z.ZodLiteral<string>;
735
+ country: z.ZodString;
736
+ addressType: z.ZodLiteral<"DOMESTIC">;
676
737
  province: z.ZodString;
677
738
  district: z.ZodString;
678
739
  }, {
@@ -685,6 +746,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
685
746
  }>, "strip", z.ZodTypeAny, {
686
747
  country: string;
687
748
  district: string;
749
+ addressType: "DOMESTIC";
688
750
  province: string;
689
751
  urbanOrRural: "URBAN";
690
752
  number?: string | null | undefined;
@@ -695,6 +757,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
695
757
  }, {
696
758
  country: string;
697
759
  district: string;
760
+ addressType: "DOMESTIC";
698
761
  province: string;
699
762
  urbanOrRural: "URBAN";
700
763
  number?: string | null | undefined;
@@ -703,7 +766,8 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
703
766
  street?: string | null | undefined;
704
767
  zipCode?: string | null | undefined;
705
768
  }>, z.ZodObject<z.objectUtil.extendShape<{
706
- country: z.ZodLiteral<string>;
769
+ country: z.ZodString;
770
+ addressType: z.ZodLiteral<"DOMESTIC">;
707
771
  province: z.ZodString;
708
772
  district: z.ZodString;
709
773
  }, {
@@ -712,17 +776,20 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
712
776
  }>, "strip", z.ZodTypeAny, {
713
777
  country: string;
714
778
  district: string;
779
+ addressType: "DOMESTIC";
715
780
  province: string;
716
781
  urbanOrRural: "RURAL";
717
782
  village?: string | null | undefined;
718
783
  }, {
719
784
  country: string;
720
785
  district: string;
786
+ addressType: "DOMESTIC";
721
787
  province: string;
722
788
  urbanOrRural: "RURAL";
723
789
  village?: string | null | undefined;
724
- }>, z.ZodObject<{
725
- country: z.ZodEffects<z.ZodString, string, string>;
790
+ }>, z.ZodUndefined, z.ZodObject<{
791
+ country: z.ZodString;
792
+ addressType: z.ZodLiteral<"INTERNATIONAL">;
726
793
  state: z.ZodString;
727
794
  district2: z.ZodString;
728
795
  cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -733,6 +800,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
733
800
  }, "strip", z.ZodTypeAny, {
734
801
  country: string;
735
802
  state: string;
803
+ addressType: "INTERNATIONAL";
736
804
  district2: string;
737
805
  cityOrTown?: string | null | undefined;
738
806
  addressLine1?: string | null | undefined;
@@ -742,6 +810,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
742
810
  }, {
743
811
  country: string;
744
812
  state: string;
813
+ addressType: "INTERNATIONAL";
745
814
  district2: string;
746
815
  cityOrTown?: string | null | undefined;
747
816
  addressLine1?: string | null | undefined;
@@ -749,17 +818,19 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
749
818
  addressLine3?: string | null | undefined;
750
819
  postcodeOrZip?: string | null | undefined;
751
820
  }>]>>>;
821
+ originalActionId: z.ZodOptional<z.ZodString>;
752
822
  }, {
753
- type: z.ZodEnum<[ActionType, ...ActionType[]]>;
823
+ type: z.ZodEnum<["DELETE", "CREATE", "NOTIFY", "DECLARE", "VALIDATE", "REGISTER", "DETECT_DUPLICATE", "REJECT", "MARKED_AS_DUPLICATE", "ARCHIVE", "PRINT_CERTIFICATE", "REQUEST_CORRECTION", "REJECT_CORRECTION", "APPROVE_CORRECTION", "READ", "ASSIGN", "UNASSIGN"]>;
754
824
  }>, "strip", z.ZodTypeAny, {
755
- type: ActionType;
756
- data: Record<string, string | number | boolean | {
825
+ type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "CREATE" | "NOTIFY" | "DETECT_DUPLICATE" | "REJECT" | "MARKED_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
826
+ declaration: Record<string, string | number | boolean | {
757
827
  type: string;
758
828
  filename: string;
759
829
  originalFilename: string;
760
830
  } | {
761
831
  country: string;
762
832
  district: string;
833
+ addressType: "DOMESTIC";
763
834
  province: string;
764
835
  urbanOrRural: "URBAN";
765
836
  number?: string | null | undefined;
@@ -770,12 +841,14 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
770
841
  } | {
771
842
  country: string;
772
843
  district: string;
844
+ addressType: "DOMESTIC";
773
845
  province: string;
774
846
  urbanOrRural: "RURAL";
775
847
  village?: string | null | undefined;
776
848
  } | {
777
849
  country: string;
778
850
  state: string;
851
+ addressType: "INTERNATIONAL";
779
852
  district2: string;
780
853
  cityOrTown?: string | null | undefined;
781
854
  addressLine1?: string | null | undefined;
@@ -787,16 +860,17 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
787
860
  option: string;
788
861
  filename: string;
789
862
  originalFilename: string;
790
- }[]>;
863
+ }[] | undefined>;
791
864
  eventId: string;
792
865
  transactionId: string;
793
- metadata?: Record<string, string | number | boolean | {
866
+ annotation?: Record<string, string | number | boolean | {
794
867
  type: string;
795
868
  filename: string;
796
869
  originalFilename: string;
797
870
  } | {
798
871
  country: string;
799
872
  district: string;
873
+ addressType: "DOMESTIC";
800
874
  province: string;
801
875
  urbanOrRural: "URBAN";
802
876
  number?: string | null | undefined;
@@ -807,12 +881,14 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
807
881
  } | {
808
882
  country: string;
809
883
  district: string;
884
+ addressType: "DOMESTIC";
810
885
  province: string;
811
886
  urbanOrRural: "RURAL";
812
887
  village?: string | null | undefined;
813
888
  } | {
814
889
  country: string;
815
890
  state: string;
891
+ addressType: "INTERNATIONAL";
816
892
  district2: string;
817
893
  cityOrTown?: string | null | undefined;
818
894
  addressLine1?: string | null | undefined;
@@ -824,16 +900,18 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
824
900
  option: string;
825
901
  filename: string;
826
902
  originalFilename: string;
827
- }[]> | undefined;
903
+ }[] | undefined> | undefined;
904
+ originalActionId?: string | undefined;
828
905
  }, {
829
- type: ActionType;
830
- data: Record<string, string | number | boolean | {
906
+ type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "CREATE" | "NOTIFY" | "DETECT_DUPLICATE" | "REJECT" | "MARKED_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
907
+ declaration: Record<string, string | number | boolean | {
831
908
  type: string;
832
909
  filename: string;
833
910
  originalFilename: string;
834
911
  } | {
835
912
  country: string;
836
913
  district: string;
914
+ addressType: "DOMESTIC";
837
915
  province: string;
838
916
  urbanOrRural: "URBAN";
839
917
  number?: string | null | undefined;
@@ -844,12 +922,14 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
844
922
  } | {
845
923
  country: string;
846
924
  district: string;
925
+ addressType: "DOMESTIC";
847
926
  province: string;
848
927
  urbanOrRural: "RURAL";
849
928
  village?: string | null | undefined;
850
929
  } | {
851
930
  country: string;
852
931
  state: string;
932
+ addressType: "INTERNATIONAL";
853
933
  district2: string;
854
934
  cityOrTown?: string | null | undefined;
855
935
  addressLine1?: string | null | undefined;
@@ -861,16 +941,17 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
861
941
  option: string;
862
942
  filename: string;
863
943
  originalFilename: string;
864
- }[]>;
944
+ }[] | undefined>;
865
945
  eventId: string;
866
946
  transactionId: string;
867
- metadata?: Record<string, string | number | boolean | {
947
+ annotation?: Record<string, string | number | boolean | {
868
948
  type: string;
869
949
  filename: string;
870
950
  originalFilename: string;
871
951
  } | {
872
952
  country: string;
873
953
  district: string;
954
+ addressType: "DOMESTIC";
874
955
  province: string;
875
956
  urbanOrRural: "URBAN";
876
957
  number?: string | null | undefined;
@@ -881,12 +962,14 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
881
962
  } | {
882
963
  country: string;
883
964
  district: string;
965
+ addressType: "DOMESTIC";
884
966
  province: string;
885
967
  urbanOrRural: "RURAL";
886
968
  village?: string | null | undefined;
887
969
  } | {
888
970
  country: string;
889
971
  state: string;
972
+ addressType: "INTERNATIONAL";
890
973
  district2: string;
891
974
  cityOrTown?: string | null | undefined;
892
975
  addressLine1?: string | null | undefined;
@@ -898,7 +981,8 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
898
981
  option: string;
899
982
  filename: string;
900
983
  originalFilename: string;
901
- }[]> | undefined;
984
+ }[] | undefined> | undefined;
985
+ originalActionId?: string | undefined;
902
986
  }>;
903
987
  export type Draft = z.infer<typeof Draft>;
904
988
  export type DraftInput = z.infer<typeof DraftInput>;