@opencrvs/toolkit 1.8.0-rc.fa72fdf → 1.8.0-rc.fa8bcf6

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