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

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 (43) hide show
  1. package/README.md +1 -1
  2. package/dist/commons/api/router.d.ts +14000 -10258
  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 +96433 -2024
  8. package/dist/commons/events/ActionDocument.d.ts +9819 -312
  9. package/dist/commons/events/ActionInput.d.ts +5362 -497
  10. package/dist/commons/events/ActionType.d.ts +26 -11
  11. package/dist/commons/events/AdvancedSearchConfig.d.ts +957 -22
  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 +367 -51
  15. package/dist/commons/events/EventConfig.d.ts +46117 -1819
  16. package/dist/commons/events/EventConfigInput.d.ts +6 -3
  17. package/dist/commons/events/EventDocument.d.ts +3521 -424
  18. package/dist/commons/events/EventIndex.d.ts +1735 -10
  19. package/dist/commons/events/EventInput.d.ts +13 -0
  20. package/dist/commons/events/EventMetadata.d.ts +274 -8
  21. package/dist/commons/events/FieldConfig.d.ts +4765 -787
  22. package/dist/commons/events/FieldType.d.ts +4 -3
  23. package/dist/commons/events/FieldTypeMapping.d.ts +164 -6
  24. package/dist/commons/events/FieldValue.d.ts +82 -5
  25. package/dist/commons/events/FormConfig.d.ts +43810 -73
  26. package/dist/commons/events/PageConfig.d.ts +10991 -0
  27. package/dist/commons/events/SummaryConfig.d.ts +95 -39
  28. package/dist/commons/events/TemplateConfig.d.ts +5 -5
  29. package/dist/commons/events/User.d.ts +5 -0
  30. package/dist/commons/events/WorkqueueConfig.d.ts +1549 -19
  31. package/dist/commons/events/defineConfig.d.ts +7282 -230
  32. package/dist/commons/events/event.d.ts +54 -0
  33. package/dist/commons/events/field.d.ts +82 -0
  34. package/dist/commons/events/index.d.ts +5 -1
  35. package/dist/commons/events/scopes.d.ts +45 -0
  36. package/dist/commons/events/test.utils.d.ts +129 -239
  37. package/dist/commons/events/utils.d.ts +3793 -73
  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 +3033 -1382
  41. package/dist/scopes/index.d.ts +158 -1
  42. package/dist/scopes/index.js +152 -1
  43. 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.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>, 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.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>, 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,68 @@ 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
241
  createdAtLocation: z.ZodString;
242
+ status: z.ZodEnum<["Requested", "Accepted", "Rejected"]>;
243
+ originalActionId: z.ZodOptional<z.ZodString>;
169
244
  }, {
170
- type: z.ZodEnum<[ActionType, ...ActionType[]]>;
245
+ 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
246
  }>, "id">, "strip", z.ZodTypeAny, {
172
- type: ActionType;
173
- data: Record<string, string | number | boolean | {
247
+ 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";
248
+ status: "Rejected" | "Requested" | "Accepted";
249
+ transactionId: string;
250
+ createdAt: string;
251
+ createdBy: string;
252
+ createdByRole: string;
253
+ declaration: Record<string, string | number | boolean | {
174
254
  type: string;
175
255
  filename: string;
176
256
  originalFilename: string;
177
257
  } | {
178
258
  country: string;
179
259
  district: string;
260
+ addressType: "DOMESTIC";
180
261
  province: string;
181
262
  urbanOrRural: "URBAN";
182
263
  number?: string | null | undefined;
@@ -187,25 +268,35 @@ export declare const Draft: z.ZodObject<{
187
268
  } | {
188
269
  country: string;
189
270
  district: string;
271
+ addressType: "DOMESTIC";
190
272
  province: string;
191
273
  urbanOrRural: "RURAL";
192
274
  village?: string | null | undefined;
275
+ } | {
276
+ country: string;
277
+ state: string;
278
+ addressType: "INTERNATIONAL";
279
+ district2: string;
280
+ cityOrTown?: string | null | undefined;
281
+ addressLine1?: string | null | undefined;
282
+ addressLine2?: string | null | undefined;
283
+ addressLine3?: string | null | undefined;
284
+ postcodeOrZip?: string | null | undefined;
193
285
  } | {
194
286
  type: string;
195
287
  option: string;
196
288
  filename: string;
197
289
  originalFilename: string;
198
- }[]>;
199
- createdAt: string;
200
- createdBy: string;
290
+ }[] | [string, string] | undefined>;
201
291
  createdAtLocation: string;
202
- metadata?: Record<string, string | number | boolean | {
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,42 @@ 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
+ }[] | [string, string] | undefined> | undefined;
330
+ originalActionId?: string | undefined;
228
331
  }, {
229
- type: ActionType;
230
- data: Record<string, string | number | boolean | {
332
+ 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";
333
+ status: "Rejected" | "Requested" | "Accepted";
334
+ transactionId: string;
335
+ createdAt: string;
336
+ createdBy: string;
337
+ createdByRole: string;
338
+ declaration: Record<string, string | number | boolean | {
231
339
  type: string;
232
340
  filename: string;
233
341
  originalFilename: string;
234
342
  } | {
235
343
  country: string;
236
344
  district: string;
345
+ addressType: "DOMESTIC";
237
346
  province: string;
238
347
  urbanOrRural: "URBAN";
239
348
  number?: string | null | undefined;
@@ -244,25 +353,35 @@ export declare const Draft: z.ZodObject<{
244
353
  } | {
245
354
  country: string;
246
355
  district: string;
356
+ addressType: "DOMESTIC";
247
357
  province: string;
248
358
  urbanOrRural: "RURAL";
249
359
  village?: string | null | undefined;
360
+ } | {
361
+ country: string;
362
+ state: string;
363
+ addressType: "INTERNATIONAL";
364
+ district2: string;
365
+ cityOrTown?: string | null | undefined;
366
+ addressLine1?: string | null | undefined;
367
+ addressLine2?: string | null | undefined;
368
+ addressLine3?: string | null | undefined;
369
+ postcodeOrZip?: string | null | undefined;
250
370
  } | {
251
371
  type: string;
252
372
  option: string;
253
373
  filename: string;
254
374
  originalFilename: string;
255
- }[]>;
256
- createdAt: string;
257
- createdBy: string;
375
+ }[] | [string, string] | undefined>;
258
376
  createdAtLocation: string;
259
- metadata?: Record<string, string | number | boolean | {
377
+ annotation?: Record<string, string | number | boolean | {
260
378
  type: string;
261
379
  filename: string;
262
380
  originalFilename: string;
263
381
  } | {
264
382
  country: string;
265
383
  district: string;
384
+ addressType: "DOMESTIC";
266
385
  province: string;
267
386
  urbanOrRural: "URBAN";
268
387
  number?: string | null | undefined;
@@ -273,30 +392,48 @@ export declare const Draft: z.ZodObject<{
273
392
  } | {
274
393
  country: string;
275
394
  district: string;
395
+ addressType: "DOMESTIC";
276
396
  province: string;
277
397
  urbanOrRural: "RURAL";
278
398
  village?: string | null | undefined;
399
+ } | {
400
+ country: string;
401
+ state: string;
402
+ addressType: "INTERNATIONAL";
403
+ district2: string;
404
+ cityOrTown?: string | null | undefined;
405
+ addressLine1?: string | null | undefined;
406
+ addressLine2?: string | null | undefined;
407
+ addressLine3?: string | null | undefined;
408
+ postcodeOrZip?: string | null | undefined;
279
409
  } | {
280
410
  type: string;
281
411
  option: string;
282
412
  filename: string;
283
413
  originalFilename: string;
284
- }[]> | undefined;
414
+ }[] | [string, string] | undefined> | undefined;
415
+ originalActionId?: string | undefined;
285
416
  }>;
286
417
  }, "strip", z.ZodTypeAny, {
287
418
  id: string;
419
+ transactionId: string;
288
420
  createdAt: string;
289
421
  eventId: string;
290
- transactionId: string;
291
422
  action: {
292
- type: ActionType;
293
- data: Record<string, string | number | boolean | {
423
+ 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";
424
+ status: "Rejected" | "Requested" | "Accepted";
425
+ transactionId: string;
426
+ createdAt: string;
427
+ createdBy: string;
428
+ createdByRole: string;
429
+ declaration: Record<string, string | number | boolean | {
294
430
  type: string;
295
431
  filename: string;
296
432
  originalFilename: string;
297
433
  } | {
298
434
  country: string;
299
435
  district: string;
436
+ addressType: "DOMESTIC";
300
437
  province: string;
301
438
  urbanOrRural: "URBAN";
302
439
  number?: string | null | undefined;
@@ -307,25 +444,35 @@ export declare const Draft: z.ZodObject<{
307
444
  } | {
308
445
  country: string;
309
446
  district: string;
447
+ addressType: "DOMESTIC";
310
448
  province: string;
311
449
  urbanOrRural: "RURAL";
312
450
  village?: string | null | undefined;
451
+ } | {
452
+ country: string;
453
+ state: string;
454
+ addressType: "INTERNATIONAL";
455
+ district2: string;
456
+ cityOrTown?: string | null | undefined;
457
+ addressLine1?: string | null | undefined;
458
+ addressLine2?: string | null | undefined;
459
+ addressLine3?: string | null | undefined;
460
+ postcodeOrZip?: string | null | undefined;
313
461
  } | {
314
462
  type: string;
315
463
  option: string;
316
464
  filename: string;
317
465
  originalFilename: string;
318
- }[]>;
319
- createdAt: string;
320
- createdBy: string;
466
+ }[] | [string, string] | undefined>;
321
467
  createdAtLocation: string;
322
- metadata?: Record<string, string | number | boolean | {
468
+ annotation?: Record<string, string | number | boolean | {
323
469
  type: string;
324
470
  filename: string;
325
471
  originalFilename: string;
326
472
  } | {
327
473
  country: string;
328
474
  district: string;
475
+ addressType: "DOMESTIC";
329
476
  province: string;
330
477
  urbanOrRural: "URBAN";
331
478
  number?: string | null | undefined;
@@ -336,30 +483,48 @@ export declare const Draft: z.ZodObject<{
336
483
  } | {
337
484
  country: string;
338
485
  district: string;
486
+ addressType: "DOMESTIC";
339
487
  province: string;
340
488
  urbanOrRural: "RURAL";
341
489
  village?: string | null | undefined;
490
+ } | {
491
+ country: string;
492
+ state: string;
493
+ addressType: "INTERNATIONAL";
494
+ district2: string;
495
+ cityOrTown?: string | null | undefined;
496
+ addressLine1?: string | null | undefined;
497
+ addressLine2?: string | null | undefined;
498
+ addressLine3?: string | null | undefined;
499
+ postcodeOrZip?: string | null | undefined;
342
500
  } | {
343
501
  type: string;
344
502
  option: string;
345
503
  filename: string;
346
504
  originalFilename: string;
347
- }[]> | undefined;
505
+ }[] | [string, string] | undefined> | undefined;
506
+ originalActionId?: string | undefined;
348
507
  };
349
508
  }, {
350
509
  id: string;
510
+ transactionId: string;
351
511
  createdAt: string;
352
512
  eventId: string;
353
- transactionId: string;
354
513
  action: {
355
- type: ActionType;
356
- data: Record<string, string | number | boolean | {
514
+ 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";
515
+ status: "Rejected" | "Requested" | "Accepted";
516
+ transactionId: string;
517
+ createdAt: string;
518
+ createdBy: string;
519
+ createdByRole: string;
520
+ declaration: Record<string, string | number | boolean | {
357
521
  type: string;
358
522
  filename: string;
359
523
  originalFilename: string;
360
524
  } | {
361
525
  country: string;
362
526
  district: string;
527
+ addressType: "DOMESTIC";
363
528
  province: string;
364
529
  urbanOrRural: "URBAN";
365
530
  number?: string | null | undefined;
@@ -370,25 +535,35 @@ export declare const Draft: z.ZodObject<{
370
535
  } | {
371
536
  country: string;
372
537
  district: string;
538
+ addressType: "DOMESTIC";
373
539
  province: string;
374
540
  urbanOrRural: "RURAL";
375
541
  village?: string | null | undefined;
542
+ } | {
543
+ country: string;
544
+ state: string;
545
+ addressType: "INTERNATIONAL";
546
+ district2: string;
547
+ cityOrTown?: string | null | undefined;
548
+ addressLine1?: string | null | undefined;
549
+ addressLine2?: string | null | undefined;
550
+ addressLine3?: string | null | undefined;
551
+ postcodeOrZip?: string | null | undefined;
376
552
  } | {
377
553
  type: string;
378
554
  option: string;
379
555
  filename: string;
380
556
  originalFilename: string;
381
- }[]>;
382
- createdAt: string;
383
- createdBy: string;
557
+ }[] | [string, string] | undefined>;
384
558
  createdAtLocation: string;
385
- metadata?: Record<string, string | number | boolean | {
559
+ annotation?: Record<string, string | number | boolean | {
386
560
  type: string;
387
561
  filename: string;
388
562
  originalFilename: string;
389
563
  } | {
390
564
  country: string;
391
565
  district: string;
566
+ addressType: "DOMESTIC";
392
567
  province: string;
393
568
  urbanOrRural: "URBAN";
394
569
  number?: string | null | undefined;
@@ -399,21 +574,33 @@ export declare const Draft: z.ZodObject<{
399
574
  } | {
400
575
  country: string;
401
576
  district: string;
577
+ addressType: "DOMESTIC";
402
578
  province: string;
403
579
  urbanOrRural: "RURAL";
404
580
  village?: string | null | undefined;
581
+ } | {
582
+ country: string;
583
+ state: string;
584
+ addressType: "INTERNATIONAL";
585
+ district2: string;
586
+ cityOrTown?: string | null | undefined;
587
+ addressLine1?: string | null | undefined;
588
+ addressLine2?: string | null | undefined;
589
+ addressLine3?: string | null | undefined;
590
+ postcodeOrZip?: string | null | undefined;
405
591
  } | {
406
592
  type: string;
407
593
  option: string;
408
594
  filename: string;
409
595
  originalFilename: string;
410
- }[]> | undefined;
596
+ }[] | [string, string] | undefined> | undefined;
597
+ originalActionId?: string | undefined;
411
598
  };
412
599
  }>;
413
600
  export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
414
601
  eventId: z.ZodString;
415
602
  transactionId: z.ZodString;
416
- data: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
603
+ declaration: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
417
604
  filename: z.ZodString;
418
605
  originalFilename: z.ZodString;
419
606
  type: z.ZodString;
@@ -442,6 +629,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
442
629
  originalFilename: string;
443
630
  }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
444
631
  country: z.ZodString;
632
+ addressType: z.ZodLiteral<"DOMESTIC">;
445
633
  province: z.ZodString;
446
634
  district: z.ZodString;
447
635
  }, {
@@ -454,6 +642,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
454
642
  }>, "strip", z.ZodTypeAny, {
455
643
  country: string;
456
644
  district: string;
645
+ addressType: "DOMESTIC";
457
646
  province: string;
458
647
  urbanOrRural: "URBAN";
459
648
  number?: string | null | undefined;
@@ -464,6 +653,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
464
653
  }, {
465
654
  country: string;
466
655
  district: string;
656
+ addressType: "DOMESTIC";
467
657
  province: string;
468
658
  urbanOrRural: "URBAN";
469
659
  number?: string | null | undefined;
@@ -473,6 +663,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
473
663
  zipCode?: string | null | undefined;
474
664
  }>, z.ZodObject<z.objectUtil.extendShape<{
475
665
  country: z.ZodString;
666
+ addressType: z.ZodLiteral<"DOMESTIC">;
476
667
  province: z.ZodString;
477
668
  district: z.ZodString;
478
669
  }, {
@@ -481,17 +672,49 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
481
672
  }>, "strip", z.ZodTypeAny, {
482
673
  country: string;
483
674
  district: string;
675
+ addressType: "DOMESTIC";
484
676
  province: string;
485
677
  urbanOrRural: "RURAL";
486
678
  village?: string | null | undefined;
487
679
  }, {
488
680
  country: string;
489
681
  district: string;
682
+ addressType: "DOMESTIC";
490
683
  province: string;
491
684
  urbanOrRural: "RURAL";
492
685
  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<{
686
+ }>, z.ZodUndefined, z.ZodObject<{
687
+ country: z.ZodString;
688
+ addressType: z.ZodLiteral<"INTERNATIONAL">;
689
+ state: z.ZodString;
690
+ district2: z.ZodString;
691
+ cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
692
+ addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
693
+ addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
694
+ addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
695
+ postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
696
+ }, "strip", z.ZodTypeAny, {
697
+ country: string;
698
+ state: string;
699
+ addressType: "INTERNATIONAL";
700
+ district2: string;
701
+ cityOrTown?: string | null | undefined;
702
+ addressLine1?: string | null | undefined;
703
+ addressLine2?: string | null | undefined;
704
+ addressLine3?: string | null | undefined;
705
+ postcodeOrZip?: string | null | undefined;
706
+ }, {
707
+ country: string;
708
+ state: string;
709
+ addressType: "INTERNATIONAL";
710
+ district2: string;
711
+ cityOrTown?: string | null | undefined;
712
+ addressLine1?: string | null | undefined;
713
+ addressLine2?: string | null | undefined;
714
+ addressLine3?: string | null | undefined;
715
+ postcodeOrZip?: string | null | undefined;
716
+ }>]>>>;
717
+ annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
495
718
  filename: z.ZodString;
496
719
  originalFilename: z.ZodString;
497
720
  type: z.ZodString;
@@ -520,6 +743,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
520
743
  originalFilename: string;
521
744
  }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
522
745
  country: z.ZodString;
746
+ addressType: z.ZodLiteral<"DOMESTIC">;
523
747
  province: z.ZodString;
524
748
  district: z.ZodString;
525
749
  }, {
@@ -532,6 +756,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
532
756
  }>, "strip", z.ZodTypeAny, {
533
757
  country: string;
534
758
  district: string;
759
+ addressType: "DOMESTIC";
535
760
  province: string;
536
761
  urbanOrRural: "URBAN";
537
762
  number?: string | null | undefined;
@@ -542,6 +767,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
542
767
  }, {
543
768
  country: string;
544
769
  district: string;
770
+ addressType: "DOMESTIC";
545
771
  province: string;
546
772
  urbanOrRural: "URBAN";
547
773
  number?: string | null | undefined;
@@ -551,6 +777,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
551
777
  zipCode?: string | null | undefined;
552
778
  }>, z.ZodObject<z.objectUtil.extendShape<{
553
779
  country: z.ZodString;
780
+ addressType: z.ZodLiteral<"DOMESTIC">;
554
781
  province: z.ZodString;
555
782
  district: z.ZodString;
556
783
  }, {
@@ -559,27 +786,65 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
559
786
  }>, "strip", z.ZodTypeAny, {
560
787
  country: string;
561
788
  district: string;
789
+ addressType: "DOMESTIC";
562
790
  province: string;
563
791
  urbanOrRural: "RURAL";
564
792
  village?: string | null | undefined;
565
793
  }, {
566
794
  country: string;
567
795
  district: string;
796
+ addressType: "DOMESTIC";
568
797
  province: string;
569
798
  urbanOrRural: "RURAL";
570
799
  village?: string | null | undefined;
800
+ }>, z.ZodUndefined, z.ZodObject<{
801
+ country: z.ZodString;
802
+ addressType: z.ZodLiteral<"INTERNATIONAL">;
803
+ state: z.ZodString;
804
+ district2: z.ZodString;
805
+ cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
806
+ addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
807
+ addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
808
+ addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
809
+ postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
810
+ }, "strip", z.ZodTypeAny, {
811
+ country: string;
812
+ state: string;
813
+ addressType: "INTERNATIONAL";
814
+ district2: string;
815
+ cityOrTown?: string | null | undefined;
816
+ addressLine1?: string | null | undefined;
817
+ addressLine2?: string | null | undefined;
818
+ addressLine3?: string | null | undefined;
819
+ postcodeOrZip?: string | null | undefined;
820
+ }, {
821
+ country: string;
822
+ state: string;
823
+ addressType: "INTERNATIONAL";
824
+ district2: string;
825
+ cityOrTown?: string | null | undefined;
826
+ addressLine1?: string | null | undefined;
827
+ addressLine2?: string | null | undefined;
828
+ addressLine3?: string | null | undefined;
829
+ postcodeOrZip?: string | null | undefined;
571
830
  }>]>>>;
831
+ originalActionId: z.ZodOptional<z.ZodString>;
832
+ keepAssignment: z.ZodOptional<z.ZodBoolean>;
572
833
  }, {
573
- type: z.ZodEnum<[ActionType, ...ActionType[]]>;
834
+ 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"]>;
835
+ status: z.ZodEnum<["Requested", "Accepted", "Rejected"]>;
574
836
  }>, "strip", z.ZodTypeAny, {
575
- type: ActionType;
576
- data: Record<string, string | number | boolean | {
837
+ 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";
838
+ status: "Rejected" | "Requested" | "Accepted";
839
+ transactionId: string;
840
+ declaration: Record<string, string | number | boolean | {
577
841
  type: string;
578
842
  filename: string;
579
843
  originalFilename: string;
580
844
  } | {
581
845
  country: string;
582
846
  district: string;
847
+ addressType: "DOMESTIC";
583
848
  province: string;
584
849
  urbanOrRural: "URBAN";
585
850
  number?: string | null | undefined;
@@ -590,24 +855,35 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
590
855
  } | {
591
856
  country: string;
592
857
  district: string;
858
+ addressType: "DOMESTIC";
593
859
  province: string;
594
860
  urbanOrRural: "RURAL";
595
861
  village?: string | null | undefined;
862
+ } | {
863
+ country: string;
864
+ state: string;
865
+ addressType: "INTERNATIONAL";
866
+ district2: string;
867
+ cityOrTown?: string | null | undefined;
868
+ addressLine1?: string | null | undefined;
869
+ addressLine2?: string | null | undefined;
870
+ addressLine3?: string | null | undefined;
871
+ postcodeOrZip?: string | null | undefined;
596
872
  } | {
597
873
  type: string;
598
874
  option: string;
599
875
  filename: string;
600
876
  originalFilename: string;
601
- }[]>;
877
+ }[] | [string, string] | undefined>;
602
878
  eventId: string;
603
- transactionId: string;
604
- metadata?: Record<string, string | number | boolean | {
879
+ annotation?: Record<string, string | number | boolean | {
605
880
  type: string;
606
881
  filename: string;
607
882
  originalFilename: string;
608
883
  } | {
609
884
  country: string;
610
885
  district: string;
886
+ addressType: "DOMESTIC";
611
887
  province: string;
612
888
  urbanOrRural: "URBAN";
613
889
  number?: string | null | undefined;
@@ -618,24 +894,41 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
618
894
  } | {
619
895
  country: string;
620
896
  district: string;
897
+ addressType: "DOMESTIC";
621
898
  province: string;
622
899
  urbanOrRural: "RURAL";
623
900
  village?: string | null | undefined;
901
+ } | {
902
+ country: string;
903
+ state: string;
904
+ addressType: "INTERNATIONAL";
905
+ district2: string;
906
+ cityOrTown?: string | null | undefined;
907
+ addressLine1?: string | null | undefined;
908
+ addressLine2?: string | null | undefined;
909
+ addressLine3?: string | null | undefined;
910
+ postcodeOrZip?: string | null | undefined;
624
911
  } | {
625
912
  type: string;
626
913
  option: string;
627
914
  filename: string;
628
915
  originalFilename: string;
629
- }[]> | undefined;
916
+ }[] | [string, string] | undefined> | undefined;
917
+ originalActionId?: string | undefined;
918
+ keepAssignment?: boolean | undefined;
630
919
  }, {
631
- type: ActionType;
632
- data: Record<string, string | number | boolean | {
920
+ 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";
921
+ status: "Rejected" | "Requested" | "Accepted";
922
+ transactionId: string;
923
+ eventId: string;
924
+ declaration?: Record<string, string | number | boolean | {
633
925
  type: string;
634
926
  filename: string;
635
927
  originalFilename: string;
636
928
  } | {
637
929
  country: string;
638
930
  district: string;
931
+ addressType: "DOMESTIC";
639
932
  province: string;
640
933
  urbanOrRural: "URBAN";
641
934
  number?: string | null | undefined;
@@ -646,24 +939,34 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
646
939
  } | {
647
940
  country: string;
648
941
  district: string;
942
+ addressType: "DOMESTIC";
649
943
  province: string;
650
944
  urbanOrRural: "RURAL";
651
945
  village?: string | null | undefined;
946
+ } | {
947
+ country: string;
948
+ state: string;
949
+ addressType: "INTERNATIONAL";
950
+ district2: string;
951
+ cityOrTown?: string | null | undefined;
952
+ addressLine1?: string | null | undefined;
953
+ addressLine2?: string | null | undefined;
954
+ addressLine3?: string | null | undefined;
955
+ postcodeOrZip?: string | null | undefined;
652
956
  } | {
653
957
  type: string;
654
958
  option: string;
655
959
  filename: string;
656
960
  originalFilename: string;
657
- }[]>;
658
- eventId: string;
659
- transactionId: string;
660
- metadata?: Record<string, string | number | boolean | {
961
+ }[] | [string, string] | undefined> | undefined;
962
+ annotation?: Record<string, string | number | boolean | {
661
963
  type: string;
662
964
  filename: string;
663
965
  originalFilename: string;
664
966
  } | {
665
967
  country: string;
666
968
  district: string;
969
+ addressType: "DOMESTIC";
667
970
  province: string;
668
971
  urbanOrRural: "URBAN";
669
972
  number?: string | null | undefined;
@@ -674,15 +977,28 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
674
977
  } | {
675
978
  country: string;
676
979
  district: string;
980
+ addressType: "DOMESTIC";
677
981
  province: string;
678
982
  urbanOrRural: "RURAL";
679
983
  village?: string | null | undefined;
984
+ } | {
985
+ country: string;
986
+ state: string;
987
+ addressType: "INTERNATIONAL";
988
+ district2: string;
989
+ cityOrTown?: string | null | undefined;
990
+ addressLine1?: string | null | undefined;
991
+ addressLine2?: string | null | undefined;
992
+ addressLine3?: string | null | undefined;
993
+ postcodeOrZip?: string | null | undefined;
680
994
  } | {
681
995
  type: string;
682
996
  option: string;
683
997
  filename: string;
684
998
  originalFilename: string;
685
- }[]> | undefined;
999
+ }[] | [string, string] | undefined> | undefined;
1000
+ originalActionId?: string | undefined;
1001
+ keepAssignment?: boolean | undefined;
686
1002
  }>;
687
1003
  export type Draft = z.infer<typeof Draft>;
688
1004
  export type DraftInput = z.infer<typeof DraftInput>;