@opencrvs/toolkit 1.8.0-rc.fca3e39 → 1.8.0-rc.fcd89ec

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 (42) hide show
  1. package/README.md +1 -1
  2. package/dist/commons/api/router.d.ts +12801 -14208
  3. package/dist/commons/conditionals/conditionals.d.ts +30 -5
  4. package/dist/commons/conditionals/validate.d.ts +12 -17
  5. package/dist/commons/events/ActionConfig.d.ts +96433 -2006
  6. package/dist/commons/events/ActionDocument.d.ts +7832 -401
  7. package/dist/commons/events/ActionInput.d.ts +2292 -547
  8. package/dist/commons/events/ActionType.d.ts +26 -16
  9. package/dist/commons/events/AdvancedSearchConfig.d.ts +957 -22
  10. package/dist/commons/events/CompositeFieldValue.d.ts +3 -0
  11. package/dist/commons/events/Conditional.d.ts +21 -5
  12. package/dist/commons/events/CreatedAtLocation.d.ts +3 -0
  13. package/dist/commons/events/Draft.d.ts +88 -60
  14. package/dist/commons/events/EventConfig.d.ts +46117 -1795
  15. package/dist/commons/events/EventConfigInput.d.ts +6 -3
  16. package/dist/commons/events/EventDocument.d.ts +1106 -529
  17. package/dist/commons/events/EventIndex.d.ts +1239 -13
  18. package/dist/commons/events/EventInput.d.ts +13 -0
  19. package/dist/commons/events/EventMetadata.d.ts +277 -11
  20. package/dist/commons/events/FieldConfig.d.ts +4704 -786
  21. package/dist/commons/events/FieldType.d.ts +4 -3
  22. package/dist/commons/events/FieldTypeMapping.d.ts +33 -5
  23. package/dist/commons/events/FieldValue.d.ts +12 -7
  24. package/dist/commons/events/FormConfig.d.ts +43810 -73
  25. package/dist/commons/events/PageConfig.d.ts +10991 -0
  26. package/dist/commons/events/SummaryConfig.d.ts +95 -39
  27. package/dist/commons/events/TemplateConfig.d.ts +5 -5
  28. package/dist/commons/events/User.d.ts +5 -0
  29. package/dist/commons/events/WorkqueueConfig.d.ts +746 -20
  30. package/dist/commons/events/defineConfig.d.ts +7282 -224
  31. package/dist/commons/events/event.d.ts +54 -0
  32. package/dist/commons/events/field.d.ts +82 -0
  33. package/dist/commons/events/index.d.ts +5 -1
  34. package/dist/commons/events/scopes.d.ts +45 -0
  35. package/dist/commons/events/test.utils.d.ts +71 -325
  36. package/dist/commons/events/utils.d.ts +3700 -96
  37. package/dist/commons/events/utils.test.d.ts +2 -0
  38. package/dist/conditionals/index.js +191 -120
  39. package/dist/events/index.js +2905 -1344
  40. package/dist/scopes/index.d.ts +158 -1
  41. package/dist/scopes/index.js +152 -1
  42. package/package.json +3 -2
@@ -1,36 +1,762 @@
1
1
  import { z } from 'zod';
2
+ import { TranslationConfig } from './TranslationConfig';
2
3
  /**
3
4
  * Configuration for workqueue. Workqueues are used to display a list of events.
4
5
  */
5
6
  export declare const WorkqueueConfig: z.ZodObject<{
6
- id: z.ZodString;
7
- filters: z.ZodArray<z.ZodObject<{
8
- status: z.ZodArray<z.ZodNativeEnum<{
9
- readonly CREATED: "CREATED";
10
- readonly NOTIFIED: "NOTIFIED";
11
- readonly DECLARED: "DECLARED";
12
- readonly VALIDATED: "VALIDATED";
13
- readonly REGISTERED: "REGISTERED";
14
- readonly CERTIFIED: "CERTIFIED";
15
- readonly REJECTED: "REJECTED";
16
- readonly ARCHIVED: "ARCHIVED";
17
- }>, "many">;
7
+ slug: z.ZodString;
8
+ name: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
9
+ id: string;
10
+ description: string;
11
+ defaultMessage: string;
12
+ }>;
13
+ query: z.ZodObject<{
14
+ type: z.ZodUnion<[z.ZodLiteral<"and">, z.ZodLiteral<"or">]>;
15
+ clauses: z.ZodEffects<z.ZodArray<z.ZodObject<{
16
+ eventType: z.ZodOptional<z.ZodString>;
17
+ status: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodObject<{
18
+ type: z.ZodLiteral<"anyOf">;
19
+ terms: z.ZodArray<z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "CERTIFIED", "REJECTED", "ARCHIVED"]>, "many">;
20
+ }, "strip", z.ZodTypeAny, {
21
+ type: "anyOf";
22
+ terms: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
23
+ }, {
24
+ type: "anyOf";
25
+ terms: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
26
+ }>, z.ZodObject<{
27
+ type: z.ZodLiteral<"exact">;
28
+ term: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "CERTIFIED", "REJECTED", "ARCHIVED"]>;
29
+ }, "strip", z.ZodTypeAny, {
30
+ type: "exact";
31
+ term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
32
+ }, {
33
+ type: "exact";
34
+ term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
35
+ }>]>>>;
36
+ createdAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodObject<{
37
+ type: z.ZodLiteral<"exact">;
38
+ term: z.ZodString;
39
+ }, "strip", z.ZodTypeAny, {
40
+ type: "exact";
41
+ term: string;
42
+ }, {
43
+ type: "exact";
44
+ term: string;
45
+ }>, z.ZodObject<{
46
+ type: z.ZodLiteral<"range">;
47
+ gte: z.ZodString;
48
+ lte: z.ZodString;
49
+ }, "strip", z.ZodTypeAny, {
50
+ type: "range";
51
+ gte: string;
52
+ lte: string;
53
+ }, {
54
+ type: "range";
55
+ gte: string;
56
+ lte: string;
57
+ }>]>>>;
58
+ updatedAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodObject<{
59
+ type: z.ZodLiteral<"exact">;
60
+ term: z.ZodString;
61
+ }, "strip", z.ZodTypeAny, {
62
+ type: "exact";
63
+ term: string;
64
+ }, {
65
+ type: "exact";
66
+ term: string;
67
+ }>, z.ZodObject<{
68
+ type: z.ZodLiteral<"range">;
69
+ gte: z.ZodString;
70
+ lte: z.ZodString;
71
+ }, "strip", z.ZodTypeAny, {
72
+ type: "range";
73
+ gte: string;
74
+ lte: string;
75
+ }, {
76
+ type: "range";
77
+ gte: string;
78
+ lte: string;
79
+ }>]>>>;
80
+ 'legalStatus.REGISTERED.createdAt': z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodObject<{
81
+ type: z.ZodLiteral<"exact">;
82
+ term: z.ZodString;
83
+ }, "strip", z.ZodTypeAny, {
84
+ type: "exact";
85
+ term: string;
86
+ }, {
87
+ type: "exact";
88
+ term: string;
89
+ }>, z.ZodObject<{
90
+ type: z.ZodLiteral<"range">;
91
+ gte: z.ZodString;
92
+ lte: z.ZodString;
93
+ }, "strip", z.ZodTypeAny, {
94
+ type: "range";
95
+ gte: string;
96
+ lte: string;
97
+ }, {
98
+ type: "range";
99
+ gte: string;
100
+ lte: string;
101
+ }>]>>>;
102
+ 'legalStatus.REGISTERED.createdAtLocation': z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodObject<{
103
+ type: z.ZodLiteral<"within">;
104
+ location: z.ZodString;
105
+ }, "strip", z.ZodTypeAny, {
106
+ type: "within";
107
+ location: string;
108
+ }, {
109
+ type: "within";
110
+ location: string;
111
+ }>, z.ZodObject<{
112
+ type: z.ZodLiteral<"exact">;
113
+ term: z.ZodString;
114
+ }, "strip", z.ZodTypeAny, {
115
+ type: "exact";
116
+ term: string;
117
+ }, {
118
+ type: "exact";
119
+ term: string;
120
+ }>]>>>;
121
+ createAtLocation: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodObject<{
122
+ type: z.ZodLiteral<"within">;
123
+ location: z.ZodString;
124
+ }, "strip", z.ZodTypeAny, {
125
+ type: "within";
126
+ location: string;
127
+ }, {
128
+ type: "within";
129
+ location: string;
130
+ }>, z.ZodObject<{
131
+ type: z.ZodLiteral<"exact">;
132
+ term: z.ZodString;
133
+ }, "strip", z.ZodTypeAny, {
134
+ type: "exact";
135
+ term: string;
136
+ }, {
137
+ type: "exact";
138
+ term: string;
139
+ }>]>>>;
140
+ updatedAtLocation: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodObject<{
141
+ type: z.ZodLiteral<"within">;
142
+ location: z.ZodString;
143
+ }, "strip", z.ZodTypeAny, {
144
+ type: "within";
145
+ location: string;
146
+ }, {
147
+ type: "within";
148
+ location: string;
149
+ }>, z.ZodObject<{
150
+ type: z.ZodLiteral<"exact">;
151
+ term: z.ZodString;
152
+ }, "strip", z.ZodTypeAny, {
153
+ type: "exact";
154
+ term: string;
155
+ }, {
156
+ type: "exact";
157
+ term: string;
158
+ }>]>>>;
159
+ createdBy: z.ZodOptional<z.ZodOptional<z.ZodObject<{
160
+ type: z.ZodLiteral<"exact">;
161
+ term: z.ZodString;
162
+ }, "strip", z.ZodTypeAny, {
163
+ type: "exact";
164
+ term: string;
165
+ }, {
166
+ type: "exact";
167
+ term: string;
168
+ }>>>;
169
+ updatedBy: z.ZodOptional<z.ZodOptional<z.ZodObject<{
170
+ type: z.ZodLiteral<"exact">;
171
+ term: z.ZodString;
172
+ }, "strip", z.ZodTypeAny, {
173
+ type: "exact";
174
+ term: string;
175
+ }, {
176
+ type: "exact";
177
+ term: string;
178
+ }>>>;
179
+ trackingId: z.ZodOptional<z.ZodOptional<z.ZodObject<{
180
+ type: z.ZodLiteral<"exact">;
181
+ term: z.ZodString;
182
+ }, "strip", z.ZodTypeAny, {
183
+ type: "exact";
184
+ term: string;
185
+ }, {
186
+ type: "exact";
187
+ term: string;
188
+ }>>>;
189
+ flags: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
190
+ type: z.ZodLiteral<"anyOf">;
191
+ terms: z.ZodArray<z.ZodString, "many">;
192
+ }, "strip", z.ZodTypeAny, {
193
+ type: "anyOf";
194
+ terms: string[];
195
+ }, {
196
+ type: "anyOf";
197
+ terms: string[];
198
+ }>, z.ZodObject<{
199
+ type: z.ZodLiteral<"not">;
200
+ term: z.ZodString;
201
+ }, "strip", z.ZodTypeAny, {
202
+ type: "not";
203
+ term: string;
204
+ }, {
205
+ type: "not";
206
+ term: string;
207
+ }>]>, "many">>>;
208
+ data: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
209
+ }, "strip", z.ZodTypeAny, {
210
+ status?: {
211
+ type: "exact";
212
+ term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
213
+ } | {
214
+ type: "anyOf";
215
+ terms: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
216
+ } | undefined;
217
+ data?: any;
218
+ createdAt?: {
219
+ type: "exact";
220
+ term: string;
221
+ } | {
222
+ type: "range";
223
+ gte: string;
224
+ lte: string;
225
+ } | undefined;
226
+ createdBy?: {
227
+ type: "exact";
228
+ term: string;
229
+ } | undefined;
230
+ updatedAt?: {
231
+ type: "exact";
232
+ term: string;
233
+ } | {
234
+ type: "range";
235
+ gte: string;
236
+ lte: string;
237
+ } | undefined;
238
+ trackingId?: {
239
+ type: "exact";
240
+ term: string;
241
+ } | undefined;
242
+ eventType?: string | undefined;
243
+ 'legalStatus.REGISTERED.createdAt'?: {
244
+ type: "exact";
245
+ term: string;
246
+ } | {
247
+ type: "range";
248
+ gte: string;
249
+ lte: string;
250
+ } | undefined;
251
+ 'legalStatus.REGISTERED.createdAtLocation'?: {
252
+ type: "exact";
253
+ term: string;
254
+ } | {
255
+ type: "within";
256
+ location: string;
257
+ } | undefined;
258
+ updatedAtLocation?: {
259
+ type: "exact";
260
+ term: string;
261
+ } | {
262
+ type: "within";
263
+ location: string;
264
+ } | undefined;
265
+ updatedBy?: {
266
+ type: "exact";
267
+ term: string;
268
+ } | undefined;
269
+ flags?: ({
270
+ type: "anyOf";
271
+ terms: string[];
272
+ } | {
273
+ type: "not";
274
+ term: string;
275
+ })[] | undefined;
276
+ createAtLocation?: {
277
+ type: "exact";
278
+ term: string;
279
+ } | {
280
+ type: "within";
281
+ location: string;
282
+ } | undefined;
283
+ }, {
284
+ status?: {
285
+ type: "exact";
286
+ term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
287
+ } | {
288
+ type: "anyOf";
289
+ terms: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
290
+ } | undefined;
291
+ data?: any;
292
+ createdAt?: {
293
+ type: "exact";
294
+ term: string;
295
+ } | {
296
+ type: "range";
297
+ gte: string;
298
+ lte: string;
299
+ } | undefined;
300
+ createdBy?: {
301
+ type: "exact";
302
+ term: string;
303
+ } | undefined;
304
+ updatedAt?: {
305
+ type: "exact";
306
+ term: string;
307
+ } | {
308
+ type: "range";
309
+ gte: string;
310
+ lte: string;
311
+ } | undefined;
312
+ trackingId?: {
313
+ type: "exact";
314
+ term: string;
315
+ } | undefined;
316
+ eventType?: string | undefined;
317
+ 'legalStatus.REGISTERED.createdAt'?: {
318
+ type: "exact";
319
+ term: string;
320
+ } | {
321
+ type: "range";
322
+ gte: string;
323
+ lte: string;
324
+ } | undefined;
325
+ 'legalStatus.REGISTERED.createdAtLocation'?: {
326
+ type: "exact";
327
+ term: string;
328
+ } | {
329
+ type: "within";
330
+ location: string;
331
+ } | undefined;
332
+ updatedAtLocation?: {
333
+ type: "exact";
334
+ term: string;
335
+ } | {
336
+ type: "within";
337
+ location: string;
338
+ } | undefined;
339
+ updatedBy?: {
340
+ type: "exact";
341
+ term: string;
342
+ } | undefined;
343
+ flags?: ({
344
+ type: "anyOf";
345
+ terms: string[];
346
+ } | {
347
+ type: "not";
348
+ term: string;
349
+ })[] | undefined;
350
+ createAtLocation?: {
351
+ type: "exact";
352
+ term: string;
353
+ } | {
354
+ type: "within";
355
+ location: string;
356
+ } | undefined;
357
+ }>, "many">, {
358
+ status?: {
359
+ type: "exact";
360
+ term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
361
+ } | {
362
+ type: "anyOf";
363
+ terms: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
364
+ } | undefined;
365
+ data?: any;
366
+ createdAt?: {
367
+ type: "exact";
368
+ term: string;
369
+ } | {
370
+ type: "range";
371
+ gte: string;
372
+ lte: string;
373
+ } | undefined;
374
+ createdBy?: {
375
+ type: "exact";
376
+ term: string;
377
+ } | undefined;
378
+ updatedAt?: {
379
+ type: "exact";
380
+ term: string;
381
+ } | {
382
+ type: "range";
383
+ gte: string;
384
+ lte: string;
385
+ } | undefined;
386
+ trackingId?: {
387
+ type: "exact";
388
+ term: string;
389
+ } | undefined;
390
+ eventType?: string | undefined;
391
+ 'legalStatus.REGISTERED.createdAt'?: {
392
+ type: "exact";
393
+ term: string;
394
+ } | {
395
+ type: "range";
396
+ gte: string;
397
+ lte: string;
398
+ } | undefined;
399
+ 'legalStatus.REGISTERED.createdAtLocation'?: {
400
+ type: "exact";
401
+ term: string;
402
+ } | {
403
+ type: "within";
404
+ location: string;
405
+ } | undefined;
406
+ updatedAtLocation?: {
407
+ type: "exact";
408
+ term: string;
409
+ } | {
410
+ type: "within";
411
+ location: string;
412
+ } | undefined;
413
+ updatedBy?: {
414
+ type: "exact";
415
+ term: string;
416
+ } | undefined;
417
+ flags?: ({
418
+ type: "anyOf";
419
+ terms: string[];
420
+ } | {
421
+ type: "not";
422
+ term: string;
423
+ })[] | undefined;
424
+ createAtLocation?: {
425
+ type: "exact";
426
+ term: string;
427
+ } | {
428
+ type: "within";
429
+ location: string;
430
+ } | undefined;
431
+ }[], unknown>;
18
432
  }, "strip", z.ZodTypeAny, {
19
- status: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
433
+ type: "and" | "or";
434
+ clauses: {
435
+ status?: {
436
+ type: "exact";
437
+ term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
438
+ } | {
439
+ type: "anyOf";
440
+ terms: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
441
+ } | undefined;
442
+ data?: any;
443
+ createdAt?: {
444
+ type: "exact";
445
+ term: string;
446
+ } | {
447
+ type: "range";
448
+ gte: string;
449
+ lte: string;
450
+ } | undefined;
451
+ createdBy?: {
452
+ type: "exact";
453
+ term: string;
454
+ } | undefined;
455
+ updatedAt?: {
456
+ type: "exact";
457
+ term: string;
458
+ } | {
459
+ type: "range";
460
+ gte: string;
461
+ lte: string;
462
+ } | undefined;
463
+ trackingId?: {
464
+ type: "exact";
465
+ term: string;
466
+ } | undefined;
467
+ eventType?: string | undefined;
468
+ 'legalStatus.REGISTERED.createdAt'?: {
469
+ type: "exact";
470
+ term: string;
471
+ } | {
472
+ type: "range";
473
+ gte: string;
474
+ lte: string;
475
+ } | undefined;
476
+ 'legalStatus.REGISTERED.createdAtLocation'?: {
477
+ type: "exact";
478
+ term: string;
479
+ } | {
480
+ type: "within";
481
+ location: string;
482
+ } | undefined;
483
+ updatedAtLocation?: {
484
+ type: "exact";
485
+ term: string;
486
+ } | {
487
+ type: "within";
488
+ location: string;
489
+ } | undefined;
490
+ updatedBy?: {
491
+ type: "exact";
492
+ term: string;
493
+ } | undefined;
494
+ flags?: ({
495
+ type: "anyOf";
496
+ terms: string[];
497
+ } | {
498
+ type: "not";
499
+ term: string;
500
+ })[] | undefined;
501
+ createAtLocation?: {
502
+ type: "exact";
503
+ term: string;
504
+ } | {
505
+ type: "within";
506
+ location: string;
507
+ } | undefined;
508
+ }[];
20
509
  }, {
21
- status: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
510
+ type: "and" | "or";
511
+ clauses?: unknown;
512
+ }>;
513
+ actions: z.ZodArray<z.ZodObject<{
514
+ type: z.ZodString;
515
+ conditionals: z.ZodOptional<z.ZodArray<z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>, "many">>;
516
+ }, "strip", z.ZodTypeAny, {
517
+ type: string;
518
+ conditionals?: import(".").JSONSchema[] | undefined;
519
+ }, {
520
+ type: string;
521
+ conditionals?: import(".").JSONSchema[] | undefined;
22
522
  }>, "many">;
523
+ columns: z.ZodDefault<z.ZodArray<z.ZodObject<{
524
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
525
+ id: string;
526
+ description: string;
527
+ defaultMessage: string;
528
+ }>;
529
+ value: z.ZodObject<{
530
+ $event: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"]>;
531
+ }, "strip", z.ZodTypeAny, {
532
+ $event: "type" | "id" | "status" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "dateOfEvent" | "updatedAt" | "trackingId" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
533
+ }, {
534
+ $event: "type" | "id" | "status" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "dateOfEvent" | "updatedAt" | "trackingId" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
535
+ }>;
536
+ }, "strip", z.ZodTypeAny, {
537
+ value: {
538
+ $event: "type" | "id" | "status" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "dateOfEvent" | "updatedAt" | "trackingId" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
539
+ };
540
+ label: TranslationConfig;
541
+ }, {
542
+ value: {
543
+ $event: "type" | "id" | "status" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "dateOfEvent" | "updatedAt" | "trackingId" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
544
+ };
545
+ label: {
546
+ id: string;
547
+ description: string;
548
+ defaultMessage: string;
549
+ };
550
+ }>, "many">>;
23
551
  }, "strip", z.ZodTypeAny, {
24
- id: string;
25
- filters: {
26
- status: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
552
+ name: TranslationConfig;
553
+ actions: {
554
+ type: string;
555
+ conditionals?: import(".").JSONSchema[] | undefined;
556
+ }[];
557
+ query: {
558
+ type: "and" | "or";
559
+ clauses: {
560
+ status?: {
561
+ type: "exact";
562
+ term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
563
+ } | {
564
+ type: "anyOf";
565
+ terms: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
566
+ } | undefined;
567
+ data?: any;
568
+ createdAt?: {
569
+ type: "exact";
570
+ term: string;
571
+ } | {
572
+ type: "range";
573
+ gte: string;
574
+ lte: string;
575
+ } | undefined;
576
+ createdBy?: {
577
+ type: "exact";
578
+ term: string;
579
+ } | undefined;
580
+ updatedAt?: {
581
+ type: "exact";
582
+ term: string;
583
+ } | {
584
+ type: "range";
585
+ gte: string;
586
+ lte: string;
587
+ } | undefined;
588
+ trackingId?: {
589
+ type: "exact";
590
+ term: string;
591
+ } | undefined;
592
+ eventType?: string | undefined;
593
+ 'legalStatus.REGISTERED.createdAt'?: {
594
+ type: "exact";
595
+ term: string;
596
+ } | {
597
+ type: "range";
598
+ gte: string;
599
+ lte: string;
600
+ } | undefined;
601
+ 'legalStatus.REGISTERED.createdAtLocation'?: {
602
+ type: "exact";
603
+ term: string;
604
+ } | {
605
+ type: "within";
606
+ location: string;
607
+ } | undefined;
608
+ updatedAtLocation?: {
609
+ type: "exact";
610
+ term: string;
611
+ } | {
612
+ type: "within";
613
+ location: string;
614
+ } | undefined;
615
+ updatedBy?: {
616
+ type: "exact";
617
+ term: string;
618
+ } | undefined;
619
+ flags?: ({
620
+ type: "anyOf";
621
+ terms: string[];
622
+ } | {
623
+ type: "not";
624
+ term: string;
625
+ })[] | undefined;
626
+ createAtLocation?: {
627
+ type: "exact";
628
+ term: string;
629
+ } | {
630
+ type: "within";
631
+ location: string;
632
+ } | undefined;
633
+ }[];
634
+ };
635
+ slug: string;
636
+ columns: {
637
+ value: {
638
+ $event: "type" | "id" | "status" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "dateOfEvent" | "updatedAt" | "trackingId" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
639
+ };
640
+ label: TranslationConfig;
27
641
  }[];
28
642
  }, {
29
- id: string;
30
- filters: {
31
- status: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
643
+ name: {
644
+ id: string;
645
+ description: string;
646
+ defaultMessage: string;
647
+ };
648
+ actions: {
649
+ type: string;
650
+ conditionals?: import(".").JSONSchema[] | undefined;
32
651
  }[];
652
+ query: {
653
+ type: "and" | "or";
654
+ clauses?: unknown;
655
+ };
656
+ slug: string;
657
+ columns?: {
658
+ value: {
659
+ $event: "type" | "id" | "status" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "dateOfEvent" | "updatedAt" | "trackingId" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
660
+ };
661
+ label: {
662
+ id: string;
663
+ description: string;
664
+ defaultMessage: string;
665
+ };
666
+ }[] | undefined;
33
667
  }>;
34
668
  export type WorkqueueConfig = z.infer<typeof WorkqueueConfig>;
35
669
  export type WorkqueueConfigInput = z.input<typeof WorkqueueConfig>;
670
+ export declare function defineWorkqueue(workqueues: WorkqueueConfigInput[]): {
671
+ name: TranslationConfig;
672
+ actions: {
673
+ type: string;
674
+ conditionals?: import(".").JSONSchema[] | undefined;
675
+ }[];
676
+ query: {
677
+ type: "and" | "or";
678
+ clauses: {
679
+ status?: {
680
+ type: "exact";
681
+ term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
682
+ } | {
683
+ type: "anyOf";
684
+ terms: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
685
+ } | undefined;
686
+ data?: any;
687
+ createdAt?: {
688
+ type: "exact";
689
+ term: string;
690
+ } | {
691
+ type: "range";
692
+ gte: string;
693
+ lte: string;
694
+ } | undefined;
695
+ createdBy?: {
696
+ type: "exact";
697
+ term: string;
698
+ } | undefined;
699
+ updatedAt?: {
700
+ type: "exact";
701
+ term: string;
702
+ } | {
703
+ type: "range";
704
+ gte: string;
705
+ lte: string;
706
+ } | undefined;
707
+ trackingId?: {
708
+ type: "exact";
709
+ term: string;
710
+ } | undefined;
711
+ eventType?: string | undefined;
712
+ 'legalStatus.REGISTERED.createdAt'?: {
713
+ type: "exact";
714
+ term: string;
715
+ } | {
716
+ type: "range";
717
+ gte: string;
718
+ lte: string;
719
+ } | undefined;
720
+ 'legalStatus.REGISTERED.createdAtLocation'?: {
721
+ type: "exact";
722
+ term: string;
723
+ } | {
724
+ type: "within";
725
+ location: string;
726
+ } | undefined;
727
+ updatedAtLocation?: {
728
+ type: "exact";
729
+ term: string;
730
+ } | {
731
+ type: "within";
732
+ location: string;
733
+ } | undefined;
734
+ updatedBy?: {
735
+ type: "exact";
736
+ term: string;
737
+ } | undefined;
738
+ flags?: ({
739
+ type: "anyOf";
740
+ terms: string[];
741
+ } | {
742
+ type: "not";
743
+ term: string;
744
+ })[] | undefined;
745
+ createAtLocation?: {
746
+ type: "exact";
747
+ term: string;
748
+ } | {
749
+ type: "within";
750
+ location: string;
751
+ } | undefined;
752
+ }[];
753
+ };
754
+ slug: string;
755
+ columns: {
756
+ value: {
757
+ $event: "type" | "id" | "status" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "dateOfEvent" | "updatedAt" | "trackingId" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
758
+ };
759
+ label: TranslationConfig;
760
+ }[];
761
+ }[];
36
762
  //# sourceMappingURL=WorkqueueConfig.d.ts.map