@opencrvs/toolkit 1.8.0-rc.fe799b0 → 1.8.0-rc.fea3888

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 (41) hide show
  1. package/README.md +1 -1
  2. package/dist/commons/api/router.d.ts +10781 -10314
  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 +39 -17
  6. package/dist/commons/conditionals/validate.test.d.ts +2 -0
  7. package/dist/commons/events/ActionConfig.d.ts +85782 -2035
  8. package/dist/commons/events/ActionDocument.d.ts +9850 -363
  9. package/dist/commons/events/ActionInput.d.ts +5365 -584
  10. package/dist/commons/events/ActionType.d.ts +27 -12
  11. package/dist/commons/events/AdvancedSearchConfig.d.ts +371 -25
  12. package/dist/commons/events/CompositeFieldValue.d.ts +155 -2
  13. package/dist/commons/events/Conditional.d.ts +21 -5
  14. package/dist/commons/events/Draft.d.ts +374 -59
  15. package/dist/commons/events/EventConfig.d.ts +40846 -1801
  16. package/dist/commons/events/EventConfigInput.d.ts +6 -3
  17. package/dist/commons/events/EventDocument.d.ts +3672 -504
  18. package/dist/commons/events/EventIndex.d.ts +921 -7
  19. package/dist/commons/events/EventInput.d.ts +13 -0
  20. package/dist/commons/events/EventMetadata.d.ts +16 -3
  21. package/dist/commons/events/FieldConfig.d.ts +3955 -757
  22. package/dist/commons/events/FieldType.d.ts +6 -1
  23. package/dist/commons/events/FieldTypeMapping.d.ts +154 -3
  24. package/dist/commons/events/FieldValue.d.ts +77 -3
  25. package/dist/commons/events/FormConfig.d.ts +38982 -69
  26. package/dist/commons/events/PageConfig.d.ts +9803 -0
  27. package/dist/commons/events/SummaryConfig.d.ts +81 -42
  28. package/dist/commons/events/TemplateConfig.d.ts +38 -0
  29. package/dist/commons/events/User.d.ts +5 -0
  30. package/dist/commons/events/WorkqueueConfig.d.ts +44 -20
  31. package/dist/commons/events/defineConfig.d.ts +6749 -230
  32. package/dist/commons/events/event.d.ts +25 -0
  33. package/dist/commons/events/field.d.ts +68 -0
  34. package/dist/commons/events/index.d.ts +6 -1
  35. package/dist/commons/events/scopes.d.ts +26 -0
  36. package/dist/commons/events/test.utils.d.ts +128 -238
  37. package/dist/commons/events/utils.d.ts +3528 -90
  38. package/dist/commons/events/utils.test.d.ts +2 -0
  39. package/dist/conditionals/index.js +196 -108
  40. package/dist/events/index.js +2231 -1191
  41. 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,22 +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
- incomplete: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
417
- 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<{
418
609
  filename: z.ZodString;
419
610
  originalFilename: z.ZodString;
420
611
  type: z.ZodString;
@@ -443,6 +634,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
443
634
  originalFilename: string;
444
635
  }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
445
636
  country: z.ZodString;
637
+ addressType: z.ZodLiteral<"DOMESTIC">;
446
638
  province: z.ZodString;
447
639
  district: z.ZodString;
448
640
  }, {
@@ -455,6 +647,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
455
647
  }>, "strip", z.ZodTypeAny, {
456
648
  country: string;
457
649
  district: string;
650
+ addressType: "DOMESTIC";
458
651
  province: string;
459
652
  urbanOrRural: "URBAN";
460
653
  number?: string | null | undefined;
@@ -465,6 +658,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
465
658
  }, {
466
659
  country: string;
467
660
  district: string;
661
+ addressType: "DOMESTIC";
468
662
  province: string;
469
663
  urbanOrRural: "URBAN";
470
664
  number?: string | null | undefined;
@@ -474,6 +668,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
474
668
  zipCode?: string | null | undefined;
475
669
  }>, z.ZodObject<z.objectUtil.extendShape<{
476
670
  country: z.ZodString;
671
+ addressType: z.ZodLiteral<"DOMESTIC">;
477
672
  province: z.ZodString;
478
673
  district: z.ZodString;
479
674
  }, {
@@ -482,17 +677,49 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
482
677
  }>, "strip", z.ZodTypeAny, {
483
678
  country: string;
484
679
  district: string;
680
+ addressType: "DOMESTIC";
485
681
  province: string;
486
682
  urbanOrRural: "RURAL";
487
683
  village?: string | null | undefined;
488
684
  }, {
489
685
  country: string;
490
686
  district: string;
687
+ addressType: "DOMESTIC";
491
688
  province: string;
492
689
  urbanOrRural: "RURAL";
493
690
  village?: string | null | undefined;
494
- }>]>>;
495
- 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<{
496
723
  filename: z.ZodString;
497
724
  originalFilename: z.ZodString;
498
725
  type: z.ZodString;
@@ -521,6 +748,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
521
748
  originalFilename: string;
522
749
  }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
523
750
  country: z.ZodString;
751
+ addressType: z.ZodLiteral<"DOMESTIC">;
524
752
  province: z.ZodString;
525
753
  district: z.ZodString;
526
754
  }, {
@@ -533,6 +761,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
533
761
  }>, "strip", z.ZodTypeAny, {
534
762
  country: string;
535
763
  district: string;
764
+ addressType: "DOMESTIC";
536
765
  province: string;
537
766
  urbanOrRural: "URBAN";
538
767
  number?: string | null | undefined;
@@ -543,6 +772,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
543
772
  }, {
544
773
  country: string;
545
774
  district: string;
775
+ addressType: "DOMESTIC";
546
776
  province: string;
547
777
  urbanOrRural: "URBAN";
548
778
  number?: string | null | undefined;
@@ -552,6 +782,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
552
782
  zipCode?: string | null | undefined;
553
783
  }>, z.ZodObject<z.objectUtil.extendShape<{
554
784
  country: z.ZodString;
785
+ addressType: z.ZodLiteral<"DOMESTIC">;
555
786
  province: z.ZodString;
556
787
  district: z.ZodString;
557
788
  }, {
@@ -560,27 +791,63 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
560
791
  }>, "strip", z.ZodTypeAny, {
561
792
  country: string;
562
793
  district: string;
794
+ addressType: "DOMESTIC";
563
795
  province: string;
564
796
  urbanOrRural: "RURAL";
565
797
  village?: string | null | undefined;
566
798
  }, {
567
799
  country: string;
568
800
  district: string;
801
+ addressType: "DOMESTIC";
569
802
  province: string;
570
803
  urbanOrRural: "RURAL";
571
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;
572
835
  }>]>>>;
836
+ originalActionId: z.ZodOptional<z.ZodString>;
837
+ keepAssignment: z.ZodOptional<z.ZodBoolean>;
573
838
  }, {
574
- 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"]>;
575
840
  }>, "strip", z.ZodTypeAny, {
576
- type: ActionType;
577
- 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 | {
578
844
  type: string;
579
845
  filename: string;
580
846
  originalFilename: string;
581
847
  } | {
582
848
  country: string;
583
849
  district: string;
850
+ addressType: "DOMESTIC";
584
851
  province: string;
585
852
  urbanOrRural: "URBAN";
586
853
  number?: string | null | undefined;
@@ -591,25 +858,35 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
591
858
  } | {
592
859
  country: string;
593
860
  district: string;
861
+ addressType: "DOMESTIC";
594
862
  province: string;
595
863
  urbanOrRural: "RURAL";
596
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;
597
875
  } | {
598
876
  type: string;
599
877
  option: string;
600
878
  filename: string;
601
879
  originalFilename: string;
602
- }[]>;
880
+ }[] | undefined>;
603
881
  eventId: string;
604
- transactionId: string;
605
- incomplete: boolean;
606
- metadata?: Record<string, string | number | boolean | {
882
+ annotation?: Record<string, string | number | boolean | {
607
883
  type: string;
608
884
  filename: string;
609
885
  originalFilename: string;
610
886
  } | {
611
887
  country: string;
612
888
  district: string;
889
+ addressType: "DOMESTIC";
613
890
  province: string;
614
891
  urbanOrRural: "URBAN";
615
892
  number?: string | null | undefined;
@@ -620,24 +897,40 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
620
897
  } | {
621
898
  country: string;
622
899
  district: string;
900
+ addressType: "DOMESTIC";
623
901
  province: string;
624
902
  urbanOrRural: "RURAL";
625
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;
626
914
  } | {
627
915
  type: string;
628
916
  option: string;
629
917
  filename: string;
630
918
  originalFilename: string;
631
- }[]> | undefined;
919
+ }[] | undefined> | undefined;
920
+ originalActionId?: string | undefined;
921
+ keepAssignment?: boolean | undefined;
632
922
  }, {
633
- type: ActionType;
634
- 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 | {
635
927
  type: string;
636
928
  filename: string;
637
929
  originalFilename: string;
638
930
  } | {
639
931
  country: string;
640
932
  district: string;
933
+ addressType: "DOMESTIC";
641
934
  province: string;
642
935
  urbanOrRural: "URBAN";
643
936
  number?: string | null | undefined;
@@ -648,24 +941,34 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
648
941
  } | {
649
942
  country: string;
650
943
  district: string;
944
+ addressType: "DOMESTIC";
651
945
  province: string;
652
946
  urbanOrRural: "RURAL";
653
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;
654
958
  } | {
655
959
  type: string;
656
960
  option: string;
657
961
  filename: string;
658
962
  originalFilename: string;
659
- }[]>;
660
- eventId: string;
661
- transactionId: string;
662
- metadata?: Record<string, string | number | boolean | {
963
+ }[] | undefined> | undefined;
964
+ annotation?: Record<string, string | number | boolean | {
663
965
  type: string;
664
966
  filename: string;
665
967
  originalFilename: string;
666
968
  } | {
667
969
  country: string;
668
970
  district: string;
971
+ addressType: "DOMESTIC";
669
972
  province: string;
670
973
  urbanOrRural: "URBAN";
671
974
  number?: string | null | undefined;
@@ -676,16 +979,28 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
676
979
  } | {
677
980
  country: string;
678
981
  district: string;
982
+ addressType: "DOMESTIC";
679
983
  province: string;
680
984
  urbanOrRural: "RURAL";
681
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;
682
996
  } | {
683
997
  type: string;
684
998
  option: string;
685
999
  filename: string;
686
1000
  originalFilename: string;
687
- }[]> | undefined;
688
- incomplete?: boolean | undefined;
1001
+ }[] | undefined> | undefined;
1002
+ originalActionId?: string | undefined;
1003
+ keepAssignment?: boolean | undefined;
689
1004
  }>;
690
1005
  export type Draft = z.infer<typeof Draft>;
691
1006
  export type DraftInput = z.infer<typeof DraftInput>;