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

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 (35) hide show
  1. package/dist/commons/api/router.d.ts +8083 -4833
  2. package/dist/commons/conditionals/conditionals.d.ts +7 -69
  3. package/dist/commons/conditionals/validate.d.ts +4 -6
  4. package/dist/commons/events/ActionConfig.d.ts +90025 -1680
  5. package/dist/commons/events/ActionDocument.d.ts +643 -417
  6. package/dist/commons/events/ActionInput.d.ts +248 -240
  7. package/dist/commons/events/AdvancedSearchConfig.d.ts +274 -23
  8. package/dist/commons/events/CompositeFieldValue.d.ts +3 -0
  9. package/dist/commons/events/Draft.d.ts +38 -30
  10. package/dist/commons/events/EventConfig.d.ts +42787 -1385
  11. package/dist/commons/events/EventDocument.d.ts +413 -312
  12. package/dist/commons/events/EventIndex.d.ts +862 -155
  13. package/dist/commons/events/EventInput.d.ts +13 -0
  14. package/dist/commons/events/EventMetadata.d.ts +271 -11
  15. package/dist/commons/events/FieldConfig.d.ts +3778 -769
  16. package/dist/commons/events/FieldType.d.ts +3 -3
  17. package/dist/commons/events/FieldTypeMapping.d.ts +11 -4
  18. package/dist/commons/events/FieldValue.d.ts +7 -4
  19. package/dist/commons/events/FormConfig.d.ts +40417 -439
  20. package/dist/commons/events/PageConfig.d.ts +10077 -203
  21. package/dist/commons/events/SummaryConfig.d.ts +95 -39
  22. package/dist/commons/events/User.d.ts +5 -0
  23. package/dist/commons/events/WorkqueueConfig.d.ts +1257 -19
  24. package/dist/commons/events/defineConfig.d.ts +7008 -81
  25. package/dist/commons/events/event.d.ts +27 -0
  26. package/dist/commons/events/field.d.ts +68 -0
  27. package/dist/commons/events/index.d.ts +3 -0
  28. package/dist/commons/events/scopes.d.ts +45 -0
  29. package/dist/commons/events/test.utils.d.ts +7 -44
  30. package/dist/commons/events/utils.d.ts +3551 -65
  31. package/dist/conditionals/index.js +35 -81
  32. package/dist/events/index.js +1691 -1021
  33. package/dist/scopes/index.d.ts +137 -1
  34. package/dist/scopes/index.js +147 -0
  35. package/package.json +3 -2
@@ -1,13 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  import { TranslationConfig } from './TranslationConfig';
3
- export declare const FieldConfigSchema: z.ZodObject<{
4
- fieldId: z.ZodString;
3
+ export declare const FieldConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
5
4
  config: z.ZodObject<{
6
- type: z.ZodEnum<["FUZZY", "EXACT", "RANGE"]>;
5
+ type: z.ZodEnum<["fuzzy", "exact", "range"]>;
7
6
  }, "strip", z.ZodTypeAny, {
8
- type: "FUZZY" | "EXACT" | "RANGE";
7
+ type: "exact" | "fuzzy" | "range";
9
8
  }, {
10
- type: "FUZZY" | "EXACT" | "RANGE";
9
+ type: "exact" | "fuzzy" | "range";
11
10
  }>;
12
11
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
13
12
  value: z.ZodString;
@@ -27,20 +26,81 @@ export declare const FieldConfigSchema: z.ZodObject<{
27
26
  defaultMessage: string;
28
27
  };
29
28
  }>, "many">>;
30
- }, "strip", z.ZodTypeAny, {
29
+ }, {
30
+ fieldId: z.ZodString;
31
+ fieldType: z.ZodLiteral<"field">;
32
+ }>, "strip", z.ZodTypeAny, {
31
33
  config: {
32
- type: "FUZZY" | "EXACT" | "RANGE";
34
+ type: "exact" | "fuzzy" | "range";
33
35
  };
34
36
  fieldId: string;
37
+ fieldType: "field";
35
38
  options?: {
36
39
  value: string;
37
40
  label: TranslationConfig;
38
41
  }[] | undefined;
39
42
  }, {
40
43
  config: {
41
- type: "FUZZY" | "EXACT" | "RANGE";
44
+ type: "exact" | "fuzzy" | "range";
42
45
  };
43
46
  fieldId: string;
47
+ fieldType: "field";
48
+ options?: {
49
+ value: string;
50
+ label: {
51
+ id: string;
52
+ description: string;
53
+ defaultMessage: string;
54
+ };
55
+ }[] | undefined;
56
+ }>;
57
+ export declare const EventFieldId: z.ZodEnum<["trackingId", "status"]>;
58
+ export type EventFieldId = z.infer<typeof EventFieldId>;
59
+ export declare const EventFieldConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
60
+ config: z.ZodObject<{
61
+ type: z.ZodEnum<["fuzzy", "exact", "range"]>;
62
+ }, "strip", z.ZodTypeAny, {
63
+ type: "exact" | "fuzzy" | "range";
64
+ }, {
65
+ type: "exact" | "fuzzy" | "range";
66
+ }>;
67
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
68
+ value: z.ZodString;
69
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
70
+ id: string;
71
+ description: string;
72
+ defaultMessage: string;
73
+ }>;
74
+ }, "strip", z.ZodTypeAny, {
75
+ value: string;
76
+ label: TranslationConfig;
77
+ }, {
78
+ value: string;
79
+ label: {
80
+ id: string;
81
+ description: string;
82
+ defaultMessage: string;
83
+ };
84
+ }>, "many">>;
85
+ }, {
86
+ fieldId: z.ZodEnum<["trackingId", "status"]>;
87
+ fieldType: z.ZodLiteral<"event">;
88
+ }>, "strip", z.ZodTypeAny, {
89
+ config: {
90
+ type: "exact" | "fuzzy" | "range";
91
+ };
92
+ fieldId: "status" | "trackingId";
93
+ fieldType: "event";
94
+ options?: {
95
+ value: string;
96
+ label: TranslationConfig;
97
+ }[] | undefined;
98
+ }, {
99
+ config: {
100
+ type: "exact" | "fuzzy" | "range";
101
+ };
102
+ fieldId: "status" | "trackingId";
103
+ fieldType: "event";
44
104
  options?: {
45
105
  value: string;
46
106
  label: {
@@ -50,20 +110,127 @@ export declare const FieldConfigSchema: z.ZodObject<{
50
110
  };
51
111
  }[] | undefined;
52
112
  }>;
113
+ export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObject<z.objectUtil.extendShape<{
114
+ config: z.ZodObject<{
115
+ type: z.ZodEnum<["fuzzy", "exact", "range"]>;
116
+ }, "strip", z.ZodTypeAny, {
117
+ type: "exact" | "fuzzy" | "range";
118
+ }, {
119
+ type: "exact" | "fuzzy" | "range";
120
+ }>;
121
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
122
+ value: z.ZodString;
123
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
124
+ id: string;
125
+ description: string;
126
+ defaultMessage: string;
127
+ }>;
128
+ }, "strip", z.ZodTypeAny, {
129
+ value: string;
130
+ label: TranslationConfig;
131
+ }, {
132
+ value: string;
133
+ label: {
134
+ id: string;
135
+ description: string;
136
+ defaultMessage: string;
137
+ };
138
+ }>, "many">>;
139
+ }, {
140
+ fieldId: z.ZodString;
141
+ fieldType: z.ZodLiteral<"field">;
142
+ }>, "strip", z.ZodTypeAny, {
143
+ config: {
144
+ type: "exact" | "fuzzy" | "range";
145
+ };
146
+ fieldId: string;
147
+ fieldType: "field";
148
+ options?: {
149
+ value: string;
150
+ label: TranslationConfig;
151
+ }[] | undefined;
152
+ }, {
153
+ config: {
154
+ type: "exact" | "fuzzy" | "range";
155
+ };
156
+ fieldId: string;
157
+ fieldType: "field";
158
+ options?: {
159
+ value: string;
160
+ label: {
161
+ id: string;
162
+ description: string;
163
+ defaultMessage: string;
164
+ };
165
+ }[] | undefined;
166
+ }>, z.ZodObject<z.objectUtil.extendShape<{
167
+ config: z.ZodObject<{
168
+ type: z.ZodEnum<["fuzzy", "exact", "range"]>;
169
+ }, "strip", z.ZodTypeAny, {
170
+ type: "exact" | "fuzzy" | "range";
171
+ }, {
172
+ type: "exact" | "fuzzy" | "range";
173
+ }>;
174
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
175
+ value: z.ZodString;
176
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
177
+ id: string;
178
+ description: string;
179
+ defaultMessage: string;
180
+ }>;
181
+ }, "strip", z.ZodTypeAny, {
182
+ value: string;
183
+ label: TranslationConfig;
184
+ }, {
185
+ value: string;
186
+ label: {
187
+ id: string;
188
+ description: string;
189
+ defaultMessage: string;
190
+ };
191
+ }>, "many">>;
192
+ }, {
193
+ fieldId: z.ZodEnum<["trackingId", "status"]>;
194
+ fieldType: z.ZodLiteral<"event">;
195
+ }>, "strip", z.ZodTypeAny, {
196
+ config: {
197
+ type: "exact" | "fuzzy" | "range";
198
+ };
199
+ fieldId: "status" | "trackingId";
200
+ fieldType: "event";
201
+ options?: {
202
+ value: string;
203
+ label: TranslationConfig;
204
+ }[] | undefined;
205
+ }, {
206
+ config: {
207
+ type: "exact" | "fuzzy" | "range";
208
+ };
209
+ fieldId: "status" | "trackingId";
210
+ fieldType: "event";
211
+ options?: {
212
+ value: string;
213
+ label: {
214
+ id: string;
215
+ description: string;
216
+ defaultMessage: string;
217
+ };
218
+ }[] | undefined;
219
+ }>]>;
220
+ export type SearchField = z.infer<typeof SearchField>;
53
221
  export declare const AdvancedSearchConfig: z.ZodObject<{
54
222
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
55
223
  id: string;
56
224
  description: string;
57
225
  defaultMessage: string;
58
226
  }>;
59
- fields: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
60
- fieldId: z.ZodString;
227
+ fields: z.ZodArray<z.ZodDiscriminatedUnion<"fieldType", [z.ZodObject<z.objectUtil.extendShape<{
61
228
  config: z.ZodObject<{
62
- type: z.ZodEnum<["FUZZY", "EXACT", "RANGE"]>;
229
+ type: z.ZodEnum<["fuzzy", "exact", "range"]>;
63
230
  }, "strip", z.ZodTypeAny, {
64
- type: "FUZZY" | "EXACT" | "RANGE";
231
+ type: "exact" | "fuzzy" | "range";
65
232
  }, {
66
- type: "FUZZY" | "EXACT" | "RANGE";
233
+ type: "exact" | "fuzzy" | "range";
67
234
  }>;
68
235
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
69
236
  value: z.ZodString;
@@ -83,20 +250,78 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
83
250
  defaultMessage: string;
84
251
  };
85
252
  }>, "many">>;
86
- }, "strip", z.ZodTypeAny, {
253
+ }, {
254
+ fieldId: z.ZodString;
255
+ fieldType: z.ZodLiteral<"field">;
256
+ }>, "strip", z.ZodTypeAny, {
87
257
  config: {
88
- type: "FUZZY" | "EXACT" | "RANGE";
258
+ type: "exact" | "fuzzy" | "range";
89
259
  };
90
260
  fieldId: string;
261
+ fieldType: "field";
91
262
  options?: {
92
263
  value: string;
93
264
  label: TranslationConfig;
94
265
  }[] | undefined;
95
266
  }, {
96
267
  config: {
97
- type: "FUZZY" | "EXACT" | "RANGE";
268
+ type: "exact" | "fuzzy" | "range";
98
269
  };
99
270
  fieldId: string;
271
+ fieldType: "field";
272
+ options?: {
273
+ value: string;
274
+ label: {
275
+ id: string;
276
+ description: string;
277
+ defaultMessage: string;
278
+ };
279
+ }[] | undefined;
280
+ }>, z.ZodObject<z.objectUtil.extendShape<{
281
+ config: z.ZodObject<{
282
+ type: z.ZodEnum<["fuzzy", "exact", "range"]>;
283
+ }, "strip", z.ZodTypeAny, {
284
+ type: "exact" | "fuzzy" | "range";
285
+ }, {
286
+ type: "exact" | "fuzzy" | "range";
287
+ }>;
288
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
289
+ value: z.ZodString;
290
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
291
+ id: string;
292
+ description: string;
293
+ defaultMessage: string;
294
+ }>;
295
+ }, "strip", z.ZodTypeAny, {
296
+ value: string;
297
+ label: TranslationConfig;
298
+ }, {
299
+ value: string;
300
+ label: {
301
+ id: string;
302
+ description: string;
303
+ defaultMessage: string;
304
+ };
305
+ }>, "many">>;
306
+ }, {
307
+ fieldId: z.ZodEnum<["trackingId", "status"]>;
308
+ fieldType: z.ZodLiteral<"event">;
309
+ }>, "strip", z.ZodTypeAny, {
310
+ config: {
311
+ type: "exact" | "fuzzy" | "range";
312
+ };
313
+ fieldId: "status" | "trackingId";
314
+ fieldType: "event";
315
+ options?: {
316
+ value: string;
317
+ label: TranslationConfig;
318
+ }[] | undefined;
319
+ }, {
320
+ config: {
321
+ type: "exact" | "fuzzy" | "range";
322
+ };
323
+ fieldId: "status" | "trackingId";
324
+ fieldType: "event";
100
325
  options?: {
101
326
  value: string;
102
327
  label: {
@@ -105,30 +330,42 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
105
330
  defaultMessage: string;
106
331
  };
107
332
  }[] | undefined;
108
- }>, "many">>>;
333
+ }>]>, "many">;
109
334
  }, "strip", z.ZodTypeAny, {
110
335
  title: TranslationConfig;
111
- fields: {
336
+ fields: ({
112
337
  config: {
113
- type: "FUZZY" | "EXACT" | "RANGE";
338
+ type: "exact" | "fuzzy" | "range";
114
339
  };
115
340
  fieldId: string;
341
+ fieldType: "field";
342
+ options?: {
343
+ value: string;
344
+ label: TranslationConfig;
345
+ }[] | undefined;
346
+ } | {
347
+ config: {
348
+ type: "exact" | "fuzzy" | "range";
349
+ };
350
+ fieldId: "status" | "trackingId";
351
+ fieldType: "event";
116
352
  options?: {
117
353
  value: string;
118
354
  label: TranslationConfig;
119
355
  }[] | undefined;
120
- }[];
356
+ })[];
121
357
  }, {
122
358
  title: {
123
359
  id: string;
124
360
  description: string;
125
361
  defaultMessage: string;
126
362
  };
127
- fields?: {
363
+ fields: ({
128
364
  config: {
129
- type: "FUZZY" | "EXACT" | "RANGE";
365
+ type: "exact" | "fuzzy" | "range";
130
366
  };
131
367
  fieldId: string;
368
+ fieldType: "field";
132
369
  options?: {
133
370
  value: string;
134
371
  label: {
@@ -137,7 +374,21 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
137
374
  defaultMessage: string;
138
375
  };
139
376
  }[] | undefined;
140
- }[] | undefined;
377
+ } | {
378
+ config: {
379
+ type: "exact" | "fuzzy" | "range";
380
+ };
381
+ fieldId: "status" | "trackingId";
382
+ fieldType: "event";
383
+ options?: {
384
+ value: string;
385
+ label: {
386
+ id: string;
387
+ description: string;
388
+ defaultMessage: string;
389
+ };
390
+ }[] | undefined;
391
+ })[];
141
392
  }>;
142
393
  export type AdvancedSearchConfigInput = z.infer<typeof AdvancedSearchConfig>;
143
394
  export type AdvancedSearchConfig = z.infer<typeof AdvancedSearchConfig>;
@@ -117,6 +117,7 @@ export declare const UrbanAddressUpdateValue: z.ZodObject<z.objectUtil.extendSha
117
117
  street?: string | null | undefined;
118
118
  zipCode?: string | null | undefined;
119
119
  }>;
120
+ export type UrbanAddressUpdateValue = z.infer<typeof UrbanAddressUpdateValue>;
120
121
  export declare const RuralAddressUpdateValue: z.ZodObject<z.objectUtil.extendShape<{
121
122
  country: z.ZodString;
122
123
  addressType: z.ZodLiteral<"DOMESTIC">;
@@ -140,6 +141,7 @@ export declare const RuralAddressUpdateValue: z.ZodObject<z.objectUtil.extendSha
140
141
  urbanOrRural: "RURAL";
141
142
  village?: string | null | undefined;
142
143
  }>;
144
+ export type RuralAddressUpdateValue = z.infer<typeof RuralAddressUpdateValue>;
143
145
  export declare const GenericAddressValue: z.ZodObject<{
144
146
  country: z.ZodString;
145
147
  addressType: z.ZodLiteral<"INTERNATIONAL">;
@@ -289,6 +291,7 @@ export declare const GenericAddressUpdateValue: z.ZodObject<{
289
291
  addressLine3?: string | null | undefined;
290
292
  postcodeOrZip?: string | null | undefined;
291
293
  }>;
294
+ export type GenericAddressUpdateValue = z.infer<typeof GenericAddressUpdateValue>;
292
295
  export declare const AddressFieldUpdateValue: z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
293
296
  country: z.ZodString;
294
297
  addressType: z.ZodLiteral<"DOMESTIC">;
@@ -6,9 +6,11 @@ export declare const Draft: z.ZodObject<{
6
6
  createdAt: z.ZodString;
7
7
  action: z.ZodObject<Omit<z.objectUtil.extendShape<{
8
8
  id: z.ZodString;
9
+ transactionId: z.ZodString;
9
10
  createdAt: z.ZodString;
10
11
  createdBy: z.ZodString;
11
- declaration: 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<{
12
14
  filename: z.ZodString;
13
15
  originalFilename: z.ZodString;
14
16
  type: z.ZodString;
@@ -122,7 +124,7 @@ export declare const Draft: z.ZodObject<{
122
124
  addressLine3?: string | null | undefined;
123
125
  postcodeOrZip?: string | null | undefined;
124
126
  }>]>>;
125
- annotation: 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<{
126
128
  filename: z.ZodString;
127
129
  originalFilename: z.ZodString;
128
130
  type: z.ZodString;
@@ -236,8 +238,7 @@ export declare const Draft: z.ZodObject<{
236
238
  addressLine3?: string | null | undefined;
237
239
  postcodeOrZip?: string | null | undefined;
238
240
  }>]>>>;
239
- createdAtLocation: z.ZodOptional<z.ZodString>;
240
- updatedAtLocation: z.ZodOptional<z.ZodString>;
241
+ createdAtLocation: z.ZodString;
241
242
  status: z.ZodEnum<["Requested", "Accepted", "Rejected"]>;
242
243
  originalActionId: z.ZodOptional<z.ZodString>;
243
244
  }, {
@@ -245,8 +246,10 @@ export declare const Draft: z.ZodObject<{
245
246
  }>, "id">, "strip", z.ZodTypeAny, {
246
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";
247
248
  status: "Rejected" | "Requested" | "Accepted";
249
+ transactionId: string;
248
250
  createdAt: string;
249
251
  createdBy: string;
252
+ createdByRole: string;
250
253
  declaration: Record<string, string | number | boolean | {
251
254
  type: string;
252
255
  filename: string;
@@ -284,7 +287,8 @@ export declare const Draft: z.ZodObject<{
284
287
  option: string;
285
288
  filename: string;
286
289
  originalFilename: string;
287
- }[] | undefined>;
290
+ }[] | [string, string] | undefined>;
291
+ createdAtLocation: string;
288
292
  annotation?: Record<string, string | number | boolean | {
289
293
  type: string;
290
294
  filename: string;
@@ -322,15 +326,15 @@ export declare const Draft: z.ZodObject<{
322
326
  option: string;
323
327
  filename: string;
324
328
  originalFilename: string;
325
- }[] | undefined> | undefined;
326
- createdAtLocation?: string | undefined;
327
- updatedAtLocation?: string | undefined;
329
+ }[] | [string, string] | undefined> | undefined;
328
330
  originalActionId?: string | undefined;
329
331
  }, {
330
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";
331
333
  status: "Rejected" | "Requested" | "Accepted";
334
+ transactionId: string;
332
335
  createdAt: string;
333
336
  createdBy: string;
337
+ createdByRole: string;
334
338
  declaration: Record<string, string | number | boolean | {
335
339
  type: string;
336
340
  filename: string;
@@ -368,7 +372,8 @@ export declare const Draft: z.ZodObject<{
368
372
  option: string;
369
373
  filename: string;
370
374
  originalFilename: string;
371
- }[] | undefined>;
375
+ }[] | [string, string] | undefined>;
376
+ createdAtLocation: string;
372
377
  annotation?: Record<string, string | number | boolean | {
373
378
  type: string;
374
379
  filename: string;
@@ -406,21 +411,21 @@ export declare const Draft: z.ZodObject<{
406
411
  option: string;
407
412
  filename: string;
408
413
  originalFilename: string;
409
- }[] | undefined> | undefined;
410
- createdAtLocation?: string | undefined;
411
- updatedAtLocation?: string | undefined;
414
+ }[] | [string, string] | undefined> | undefined;
412
415
  originalActionId?: string | undefined;
413
416
  }>;
414
417
  }, "strip", z.ZodTypeAny, {
415
418
  id: string;
419
+ transactionId: string;
416
420
  createdAt: string;
417
421
  eventId: string;
418
- transactionId: string;
419
422
  action: {
420
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";
421
424
  status: "Rejected" | "Requested" | "Accepted";
425
+ transactionId: string;
422
426
  createdAt: string;
423
427
  createdBy: string;
428
+ createdByRole: string;
424
429
  declaration: Record<string, string | number | boolean | {
425
430
  type: string;
426
431
  filename: string;
@@ -458,7 +463,8 @@ export declare const Draft: z.ZodObject<{
458
463
  option: string;
459
464
  filename: string;
460
465
  originalFilename: string;
461
- }[] | undefined>;
466
+ }[] | [string, string] | undefined>;
467
+ createdAtLocation: string;
462
468
  annotation?: Record<string, string | number | boolean | {
463
469
  type: string;
464
470
  filename: string;
@@ -496,21 +502,21 @@ export declare const Draft: z.ZodObject<{
496
502
  option: string;
497
503
  filename: string;
498
504
  originalFilename: string;
499
- }[] | undefined> | undefined;
500
- createdAtLocation?: string | undefined;
501
- updatedAtLocation?: string | undefined;
505
+ }[] | [string, string] | undefined> | undefined;
502
506
  originalActionId?: string | undefined;
503
507
  };
504
508
  }, {
505
509
  id: string;
510
+ transactionId: string;
506
511
  createdAt: string;
507
512
  eventId: string;
508
- transactionId: string;
509
513
  action: {
510
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";
511
515
  status: "Rejected" | "Requested" | "Accepted";
516
+ transactionId: string;
512
517
  createdAt: string;
513
518
  createdBy: string;
519
+ createdByRole: string;
514
520
  declaration: Record<string, string | number | boolean | {
515
521
  type: string;
516
522
  filename: string;
@@ -548,7 +554,8 @@ export declare const Draft: z.ZodObject<{
548
554
  option: string;
549
555
  filename: string;
550
556
  originalFilename: string;
551
- }[] | undefined>;
557
+ }[] | [string, string] | undefined>;
558
+ createdAtLocation: string;
552
559
  annotation?: Record<string, string | number | boolean | {
553
560
  type: string;
554
561
  filename: string;
@@ -586,16 +593,14 @@ export declare const Draft: z.ZodObject<{
586
593
  option: string;
587
594
  filename: string;
588
595
  originalFilename: string;
589
- }[] | undefined> | undefined;
590
- createdAtLocation?: string | undefined;
591
- updatedAtLocation?: string | undefined;
596
+ }[] | [string, string] | undefined> | undefined;
592
597
  originalActionId?: string | undefined;
593
598
  };
594
599
  }>;
595
600
  export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
596
601
  eventId: z.ZodString;
597
602
  transactionId: z.ZodString;
598
- declaration: z.ZodDefault<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<{
599
604
  filename: z.ZodString;
600
605
  originalFilename: z.ZodString;
601
606
  type: z.ZodString;
@@ -709,7 +714,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
709
714
  addressLine3?: string | null | undefined;
710
715
  postcodeOrZip?: string | null | undefined;
711
716
  }>]>>>;
712
- annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
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<{
713
718
  filename: z.ZodString;
714
719
  originalFilename: z.ZodString;
715
720
  type: z.ZodString;
@@ -827,8 +832,11 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
827
832
  keepAssignment: z.ZodOptional<z.ZodBoolean>;
828
833
  }, {
829
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"]>;
830
836
  }>, "strip", z.ZodTypeAny, {
831
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;
832
840
  declaration: Record<string, string | number | boolean | {
833
841
  type: string;
834
842
  filename: string;
@@ -866,9 +874,8 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
866
874
  option: string;
867
875
  filename: string;
868
876
  originalFilename: string;
869
- }[] | undefined>;
877
+ }[] | [string, string] | undefined>;
870
878
  eventId: string;
871
- transactionId: string;
872
879
  annotation?: Record<string, string | number | boolean | {
873
880
  type: string;
874
881
  filename: string;
@@ -906,13 +913,14 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
906
913
  option: string;
907
914
  filename: string;
908
915
  originalFilename: string;
909
- }[] | undefined> | undefined;
916
+ }[] | [string, string] | undefined> | undefined;
910
917
  originalActionId?: string | undefined;
911
918
  keepAssignment?: boolean | undefined;
912
919
  }, {
913
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";
914
- eventId: string;
921
+ status: "Rejected" | "Requested" | "Accepted";
915
922
  transactionId: string;
923
+ eventId: string;
916
924
  declaration?: Record<string, string | number | boolean | {
917
925
  type: string;
918
926
  filename: string;
@@ -950,7 +958,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
950
958
  option: string;
951
959
  filename: string;
952
960
  originalFilename: string;
953
- }[] | undefined> | undefined;
961
+ }[] | [string, string] | undefined> | undefined;
954
962
  annotation?: Record<string, string | number | boolean | {
955
963
  type: string;
956
964
  filename: string;
@@ -988,7 +996,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
988
996
  option: string;
989
997
  filename: string;
990
998
  originalFilename: string;
991
- }[] | undefined> | undefined;
999
+ }[] | [string, string] | undefined> | undefined;
992
1000
  originalActionId?: string | undefined;
993
1001
  keepAssignment?: boolean | undefined;
994
1002
  }>;