@opencrvs/toolkit 1.8.0-rc.f7e8fb5 → 1.8.0-rc.f8e4107

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