@opencrvs/toolkit 1.8.1-rc.e32d7b8 → 1.8.1-rc.ebf61ab

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 (32) hide show
  1. package/dist/commons/api/router.d.ts +433 -796
  2. package/dist/commons/conditionals/validate.d.ts +11 -2
  3. package/dist/commons/events/ActionConfig.d.ts +3924 -642
  4. package/dist/commons/events/ActionDocument.d.ts +1302 -1389
  5. package/dist/commons/events/ActionInput.d.ts +658 -1136
  6. package/dist/commons/events/AdvancedSearchConfig.d.ts +83 -65
  7. package/dist/commons/events/CompositeFieldValue.d.ts +6 -6
  8. package/dist/commons/events/CountryConfigQueryInput.d.ts +88 -88
  9. package/dist/commons/events/Draft.d.ts +48 -92
  10. package/dist/commons/events/EventConfig.d.ts +1281 -262
  11. package/dist/commons/events/EventDocument.d.ts +475 -846
  12. package/dist/commons/events/EventIndex.d.ts +184 -62
  13. package/dist/commons/events/EventMetadata.d.ts +9 -9
  14. package/dist/commons/events/FieldConfig.d.ts +517 -71
  15. package/dist/commons/events/FieldTypeMapping.d.ts +16 -16
  16. package/dist/commons/events/FieldValue.d.ts +12 -12
  17. package/dist/commons/events/FormConfig.d.ts +1956 -378
  18. package/dist/commons/events/PageConfig.d.ts +524 -82
  19. package/dist/commons/events/WorkqueueConfig.d.ts +288 -164
  20. package/dist/commons/events/defineConfig.d.ts +183 -48
  21. package/dist/commons/events/event.d.ts +68 -6
  22. package/dist/commons/events/field.d.ts +14 -0
  23. package/dist/commons/events/test.utils.d.ts +17 -13
  24. package/dist/commons/events/utils.d.ts +332 -96
  25. package/dist/conditionals/index.js +3 -2
  26. package/dist/events/index.js +293 -108
  27. package/package.json +1 -1
  28. package/tsconfig.json +1 -1
  29. package/dist/commons/conditionals/conditionals.test.d.ts +0 -2
  30. package/dist/commons/conditionals/validate-address.test.d.ts +0 -2
  31. package/dist/commons/conditionals/validate.test.d.ts +0 -2
  32. package/dist/commons/events/utils.test.d.ts +0 -2
@@ -567,15 +567,29 @@ export declare const defineConfig: (config: EventConfigInput) => {
567
567
  hideLabel?: boolean | undefined;
568
568
  uncorrectable?: boolean | undefined;
569
569
  defaultValue?: {
570
- firstname: string;
571
- surname: string;
570
+ firstname?: string | undefined;
571
+ surname?: string | undefined;
572
+ middlename?: string | undefined;
572
573
  } | undefined;
573
574
  configuration?: {
575
+ name?: {
576
+ firstname?: {
577
+ required: boolean;
578
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
579
+ } | undefined;
580
+ surname?: {
581
+ required: boolean;
582
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
583
+ } | undefined;
584
+ middlename?: {
585
+ required: boolean;
586
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
587
+ } | undefined;
588
+ } | undefined;
589
+ order?: ("firstname" | "surname" | "middlename")[] | undefined;
574
590
  maxLength?: number | undefined;
575
591
  prefix?: import("./TranslationConfig").TranslationConfig | undefined;
576
592
  postfix?: import("./TranslationConfig").TranslationConfig | undefined;
577
- includeMiddlename?: boolean | undefined;
578
- searchMode?: boolean | undefined;
579
593
  } | undefined;
580
594
  } | {
581
595
  type: "PHONE";
@@ -908,7 +922,8 @@ export declare const defineConfig: (config: EventConfigInput) => {
908
922
  postcodeOrZip?: string | undefined;
909
923
  } | undefined;
910
924
  configuration?: {
911
- searchMode?: boolean | undefined;
925
+ lineSeparator?: string | undefined;
926
+ fields?: ("number" | "country" | "district" | "state" | "addressType" | "province" | "urbanOrRural" | "town" | "residentialArea" | "street" | "zipCode" | "village" | "district2" | "cityOrTown" | "addressLine1" | "addressLine2" | "addressLine3" | "postcodeOrZip")[] | undefined;
912
927
  } | undefined;
913
928
  } | {
914
929
  type: "DATA";
@@ -1517,15 +1532,29 @@ export declare const defineConfig: (config: EventConfigInput) => {
1517
1532
  hideLabel?: boolean | undefined;
1518
1533
  uncorrectable?: boolean | undefined;
1519
1534
  defaultValue?: {
1520
- firstname: string;
1521
- surname: string;
1535
+ firstname?: string | undefined;
1536
+ surname?: string | undefined;
1537
+ middlename?: string | undefined;
1522
1538
  } | undefined;
1523
1539
  configuration?: {
1540
+ name?: {
1541
+ firstname?: {
1542
+ required: boolean;
1543
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
1544
+ } | undefined;
1545
+ surname?: {
1546
+ required: boolean;
1547
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
1548
+ } | undefined;
1549
+ middlename?: {
1550
+ required: boolean;
1551
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
1552
+ } | undefined;
1553
+ } | undefined;
1554
+ order?: ("firstname" | "surname" | "middlename")[] | undefined;
1524
1555
  maxLength?: number | undefined;
1525
1556
  prefix?: import("./TranslationConfig").TranslationConfig | undefined;
1526
1557
  postfix?: import("./TranslationConfig").TranslationConfig | undefined;
1527
- includeMiddlename?: boolean | undefined;
1528
- searchMode?: boolean | undefined;
1529
1558
  } | undefined;
1530
1559
  } | {
1531
1560
  type: "PHONE";
@@ -1858,7 +1887,8 @@ export declare const defineConfig: (config: EventConfigInput) => {
1858
1887
  postcodeOrZip?: string | undefined;
1859
1888
  } | undefined;
1860
1889
  configuration?: {
1861
- searchMode?: boolean | undefined;
1890
+ lineSeparator?: string | undefined;
1891
+ fields?: ("number" | "country" | "district" | "state" | "addressType" | "province" | "urbanOrRural" | "town" | "residentialArea" | "street" | "zipCode" | "village" | "district2" | "cityOrTown" | "addressLine1" | "addressLine2" | "addressLine3" | "postcodeOrZip")[] | undefined;
1862
1892
  } | undefined;
1863
1893
  } | {
1864
1894
  type: "DATA";
@@ -2466,15 +2496,29 @@ export declare const defineConfig: (config: EventConfigInput) => {
2466
2496
  hideLabel?: boolean | undefined;
2467
2497
  uncorrectable?: boolean | undefined;
2468
2498
  defaultValue?: {
2469
- firstname: string;
2470
- surname: string;
2499
+ firstname?: string | undefined;
2500
+ surname?: string | undefined;
2501
+ middlename?: string | undefined;
2471
2502
  } | undefined;
2472
2503
  configuration?: {
2504
+ name?: {
2505
+ firstname?: {
2506
+ required: boolean;
2507
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
2508
+ } | undefined;
2509
+ surname?: {
2510
+ required: boolean;
2511
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
2512
+ } | undefined;
2513
+ middlename?: {
2514
+ required: boolean;
2515
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
2516
+ } | undefined;
2517
+ } | undefined;
2518
+ order?: ("firstname" | "surname" | "middlename")[] | undefined;
2473
2519
  maxLength?: number | undefined;
2474
2520
  prefix?: import("./TranslationConfig").TranslationConfig | undefined;
2475
2521
  postfix?: import("./TranslationConfig").TranslationConfig | undefined;
2476
- includeMiddlename?: boolean | undefined;
2477
- searchMode?: boolean | undefined;
2478
2522
  } | undefined;
2479
2523
  } | {
2480
2524
  type: "PHONE";
@@ -2807,7 +2851,8 @@ export declare const defineConfig: (config: EventConfigInput) => {
2807
2851
  postcodeOrZip?: string | undefined;
2808
2852
  } | undefined;
2809
2853
  configuration?: {
2810
- searchMode?: boolean | undefined;
2854
+ lineSeparator?: string | undefined;
2855
+ fields?: ("number" | "country" | "district" | "state" | "addressType" | "province" | "urbanOrRural" | "town" | "residentialArea" | "street" | "zipCode" | "village" | "district2" | "cityOrTown" | "addressLine1" | "addressLine2" | "addressLine3" | "postcodeOrZip")[] | undefined;
2811
2856
  } | undefined;
2812
2857
  } | {
2813
2858
  type: "DATA";
@@ -3415,15 +3460,29 @@ export declare const defineConfig: (config: EventConfigInput) => {
3415
3460
  hideLabel?: boolean | undefined;
3416
3461
  uncorrectable?: boolean | undefined;
3417
3462
  defaultValue?: {
3418
- firstname: string;
3419
- surname: string;
3463
+ firstname?: string | undefined;
3464
+ surname?: string | undefined;
3465
+ middlename?: string | undefined;
3420
3466
  } | undefined;
3421
3467
  configuration?: {
3468
+ name?: {
3469
+ firstname?: {
3470
+ required: boolean;
3471
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
3472
+ } | undefined;
3473
+ surname?: {
3474
+ required: boolean;
3475
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
3476
+ } | undefined;
3477
+ middlename?: {
3478
+ required: boolean;
3479
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
3480
+ } | undefined;
3481
+ } | undefined;
3482
+ order?: ("firstname" | "surname" | "middlename")[] | undefined;
3422
3483
  maxLength?: number | undefined;
3423
3484
  prefix?: import("./TranslationConfig").TranslationConfig | undefined;
3424
3485
  postfix?: import("./TranslationConfig").TranslationConfig | undefined;
3425
- includeMiddlename?: boolean | undefined;
3426
- searchMode?: boolean | undefined;
3427
3486
  } | undefined;
3428
3487
  } | {
3429
3488
  type: "PHONE";
@@ -3756,7 +3815,8 @@ export declare const defineConfig: (config: EventConfigInput) => {
3756
3815
  postcodeOrZip?: string | undefined;
3757
3816
  } | undefined;
3758
3817
  configuration?: {
3759
- searchMode?: boolean | undefined;
3818
+ lineSeparator?: string | undefined;
3819
+ fields?: ("number" | "country" | "district" | "state" | "addressType" | "province" | "urbanOrRural" | "town" | "residentialArea" | "street" | "zipCode" | "village" | "district2" | "cityOrTown" | "addressLine1" | "addressLine2" | "addressLine3" | "postcodeOrZip")[] | undefined;
3760
3820
  } | undefined;
3761
3821
  } | {
3762
3822
  type: "DATA";
@@ -4364,15 +4424,29 @@ export declare const defineConfig: (config: EventConfigInput) => {
4364
4424
  hideLabel?: boolean | undefined;
4365
4425
  uncorrectable?: boolean | undefined;
4366
4426
  defaultValue?: {
4367
- firstname: string;
4368
- surname: string;
4427
+ firstname?: string | undefined;
4428
+ surname?: string | undefined;
4429
+ middlename?: string | undefined;
4369
4430
  } | undefined;
4370
4431
  configuration?: {
4432
+ name?: {
4433
+ firstname?: {
4434
+ required: boolean;
4435
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
4436
+ } | undefined;
4437
+ surname?: {
4438
+ required: boolean;
4439
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
4440
+ } | undefined;
4441
+ middlename?: {
4442
+ required: boolean;
4443
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
4444
+ } | undefined;
4445
+ } | undefined;
4446
+ order?: ("firstname" | "surname" | "middlename")[] | undefined;
4371
4447
  maxLength?: number | undefined;
4372
4448
  prefix?: import("./TranslationConfig").TranslationConfig | undefined;
4373
4449
  postfix?: import("./TranslationConfig").TranslationConfig | undefined;
4374
- includeMiddlename?: boolean | undefined;
4375
- searchMode?: boolean | undefined;
4376
4450
  } | undefined;
4377
4451
  } | {
4378
4452
  type: "PHONE";
@@ -4705,7 +4779,8 @@ export declare const defineConfig: (config: EventConfigInput) => {
4705
4779
  postcodeOrZip?: string | undefined;
4706
4780
  } | undefined;
4707
4781
  configuration?: {
4708
- searchMode?: boolean | undefined;
4782
+ lineSeparator?: string | undefined;
4783
+ fields?: ("number" | "country" | "district" | "state" | "addressType" | "province" | "urbanOrRural" | "town" | "residentialArea" | "street" | "zipCode" | "village" | "district2" | "cityOrTown" | "addressLine1" | "addressLine2" | "addressLine3" | "postcodeOrZip")[] | undefined;
4709
4784
  } | undefined;
4710
4785
  } | {
4711
4786
  type: "DATA";
@@ -5361,15 +5436,29 @@ export declare const defineConfig: (config: EventConfigInput) => {
5361
5436
  hideLabel?: boolean | undefined;
5362
5437
  uncorrectable?: boolean | undefined;
5363
5438
  defaultValue?: {
5364
- firstname: string;
5365
- surname: string;
5439
+ firstname?: string | undefined;
5440
+ surname?: string | undefined;
5441
+ middlename?: string | undefined;
5366
5442
  } | undefined;
5367
5443
  configuration?: {
5444
+ name?: {
5445
+ firstname?: {
5446
+ required: boolean;
5447
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
5448
+ } | undefined;
5449
+ surname?: {
5450
+ required: boolean;
5451
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
5452
+ } | undefined;
5453
+ middlename?: {
5454
+ required: boolean;
5455
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
5456
+ } | undefined;
5457
+ } | undefined;
5458
+ order?: ("firstname" | "surname" | "middlename")[] | undefined;
5368
5459
  maxLength?: number | undefined;
5369
5460
  prefix?: import("./TranslationConfig").TranslationConfig | undefined;
5370
5461
  postfix?: import("./TranslationConfig").TranslationConfig | undefined;
5371
- includeMiddlename?: boolean | undefined;
5372
- searchMode?: boolean | undefined;
5373
5462
  } | undefined;
5374
5463
  } | {
5375
5464
  type: "PHONE";
@@ -5702,7 +5791,8 @@ export declare const defineConfig: (config: EventConfigInput) => {
5702
5791
  postcodeOrZip?: string | undefined;
5703
5792
  } | undefined;
5704
5793
  configuration?: {
5705
- searchMode?: boolean | undefined;
5794
+ lineSeparator?: string | undefined;
5795
+ fields?: ("number" | "country" | "district" | "state" | "addressType" | "province" | "urbanOrRural" | "town" | "residentialArea" | "street" | "zipCode" | "village" | "district2" | "cityOrTown" | "addressLine1" | "addressLine2" | "addressLine3" | "postcodeOrZip")[] | undefined;
5706
5796
  } | undefined;
5707
5797
  } | {
5708
5798
  type: "DATA";
@@ -6313,15 +6403,29 @@ export declare const defineConfig: (config: EventConfigInput) => {
6313
6403
  hideLabel?: boolean | undefined;
6314
6404
  uncorrectable?: boolean | undefined;
6315
6405
  defaultValue?: {
6316
- firstname: string;
6317
- surname: string;
6406
+ firstname?: string | undefined;
6407
+ surname?: string | undefined;
6408
+ middlename?: string | undefined;
6318
6409
  } | undefined;
6319
6410
  configuration?: {
6411
+ name?: {
6412
+ firstname?: {
6413
+ required: boolean;
6414
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
6415
+ } | undefined;
6416
+ surname?: {
6417
+ required: boolean;
6418
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
6419
+ } | undefined;
6420
+ middlename?: {
6421
+ required: boolean;
6422
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
6423
+ } | undefined;
6424
+ } | undefined;
6425
+ order?: ("firstname" | "surname" | "middlename")[] | undefined;
6320
6426
  maxLength?: number | undefined;
6321
6427
  prefix?: import("./TranslationConfig").TranslationConfig | undefined;
6322
6428
  postfix?: import("./TranslationConfig").TranslationConfig | undefined;
6323
- includeMiddlename?: boolean | undefined;
6324
- searchMode?: boolean | undefined;
6325
6429
  } | undefined;
6326
6430
  } | {
6327
6431
  type: "PHONE";
@@ -6654,7 +6758,8 @@ export declare const defineConfig: (config: EventConfigInput) => {
6654
6758
  postcodeOrZip?: string | undefined;
6655
6759
  } | undefined;
6656
6760
  configuration?: {
6657
- searchMode?: boolean | undefined;
6761
+ lineSeparator?: string | undefined;
6762
+ fields?: ("number" | "country" | "district" | "state" | "addressType" | "province" | "urbanOrRural" | "town" | "residentialArea" | "street" | "zipCode" | "village" | "district2" | "cityOrTown" | "addressLine1" | "addressLine2" | "addressLine3" | "postcodeOrZip")[] | undefined;
6658
6763
  } | undefined;
6659
6764
  } | {
6660
6765
  type: "DATA";
@@ -7268,15 +7373,29 @@ export declare const defineConfig: (config: EventConfigInput) => {
7268
7373
  hideLabel?: boolean | undefined;
7269
7374
  uncorrectable?: boolean | undefined;
7270
7375
  defaultValue?: {
7271
- firstname: string;
7272
- surname: string;
7376
+ firstname?: string | undefined;
7377
+ surname?: string | undefined;
7378
+ middlename?: string | undefined;
7273
7379
  } | undefined;
7274
7380
  configuration?: {
7381
+ name?: {
7382
+ firstname?: {
7383
+ required: boolean;
7384
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
7385
+ } | undefined;
7386
+ surname?: {
7387
+ required: boolean;
7388
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
7389
+ } | undefined;
7390
+ middlename?: {
7391
+ required: boolean;
7392
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
7393
+ } | undefined;
7394
+ } | undefined;
7395
+ order?: ("firstname" | "surname" | "middlename")[] | undefined;
7275
7396
  maxLength?: number | undefined;
7276
7397
  prefix?: import("./TranslationConfig").TranslationConfig | undefined;
7277
7398
  postfix?: import("./TranslationConfig").TranslationConfig | undefined;
7278
- includeMiddlename?: boolean | undefined;
7279
- searchMode?: boolean | undefined;
7280
7399
  } | undefined;
7281
7400
  } | {
7282
7401
  type: "PHONE";
@@ -7609,7 +7728,8 @@ export declare const defineConfig: (config: EventConfigInput) => {
7609
7728
  postcodeOrZip?: string | undefined;
7610
7729
  } | undefined;
7611
7730
  configuration?: {
7612
- searchMode?: boolean | undefined;
7731
+ lineSeparator?: string | undefined;
7732
+ fields?: ("number" | "country" | "district" | "state" | "addressType" | "province" | "urbanOrRural" | "town" | "residentialArea" | "street" | "zipCode" | "village" | "district2" | "cityOrTown" | "addressLine1" | "addressLine2" | "addressLine3" | "postcodeOrZip")[] | undefined;
7613
7733
  } | undefined;
7614
7734
  } | {
7615
7735
  type: "DATA";
@@ -8220,15 +8340,29 @@ export declare const defineConfig: (config: EventConfigInput) => {
8220
8340
  hideLabel?: boolean | undefined;
8221
8341
  uncorrectable?: boolean | undefined;
8222
8342
  defaultValue?: {
8223
- firstname: string;
8224
- surname: string;
8343
+ firstname?: string | undefined;
8344
+ surname?: string | undefined;
8345
+ middlename?: string | undefined;
8225
8346
  } | undefined;
8226
8347
  configuration?: {
8348
+ name?: {
8349
+ firstname?: {
8350
+ required: boolean;
8351
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
8352
+ } | undefined;
8353
+ surname?: {
8354
+ required: boolean;
8355
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
8356
+ } | undefined;
8357
+ middlename?: {
8358
+ required: boolean;
8359
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
8360
+ } | undefined;
8361
+ } | undefined;
8362
+ order?: ("firstname" | "surname" | "middlename")[] | undefined;
8227
8363
  maxLength?: number | undefined;
8228
8364
  prefix?: import("./TranslationConfig").TranslationConfig | undefined;
8229
8365
  postfix?: import("./TranslationConfig").TranslationConfig | undefined;
8230
- includeMiddlename?: boolean | undefined;
8231
- searchMode?: boolean | undefined;
8232
8366
  } | undefined;
8233
8367
  } | {
8234
8368
  type: "PHONE";
@@ -8561,7 +8695,8 @@ export declare const defineConfig: (config: EventConfigInput) => {
8561
8695
  postcodeOrZip?: string | undefined;
8562
8696
  } | undefined;
8563
8697
  configuration?: {
8564
- searchMode?: boolean | undefined;
8698
+ lineSeparator?: string | undefined;
8699
+ fields?: ("number" | "country" | "district" | "state" | "addressType" | "province" | "urbanOrRural" | "town" | "residentialArea" | "street" | "zipCode" | "village" | "district2" | "cityOrTown" | "addressLine1" | "addressLine2" | "addressLine3" | "postcodeOrZip")[] | undefined;
8565
8700
  } | undefined;
8566
8701
  } | {
8567
8702
  type: "DATA";
@@ -8657,7 +8792,7 @@ export declare const defineConfig: (config: EventConfigInput) => {
8657
8792
  title: import("./TranslationConfig").TranslationConfig;
8658
8793
  fields: ({
8659
8794
  config: {
8660
- type: "exact" | "fuzzy" | "range";
8795
+ type: "exact" | "fuzzy" | "range" | "within";
8661
8796
  };
8662
8797
  fieldId: string;
8663
8798
  fieldType: "field";
@@ -8684,9 +8819,9 @@ export declare const defineConfig: (config: EventConfigInput) => {
8684
8819
  excludeInSearchQuery?: boolean | undefined;
8685
8820
  } | {
8686
8821
  config: {
8687
- type: "exact" | "fuzzy" | "range";
8822
+ type: "exact" | "fuzzy" | "range" | "within";
8688
8823
  };
8689
- fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
8824
+ fieldId: "event.status" | "event.updatedAt" | "event.trackingId" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
8690
8825
  fieldType: "event";
8691
8826
  options?: {
8692
8827
  value: string;
@@ -1,5 +1,5 @@
1
1
  import { ActionType } from './ActionType';
2
- import { EventFieldId } from './AdvancedSearchConfig';
2
+ import { EventFieldIdInput } from './AdvancedSearchConfig';
3
3
  import { WorkqueueColumnKeys, WorkqueueColumnValue } from './WorkqueueColumnConfig';
4
4
  /**
5
5
  * Creates a function that acts like a callable + static method container.
@@ -8,9 +8,9 @@ import { WorkqueueColumnKeys, WorkqueueColumnValue } from './WorkqueueColumnConf
8
8
  * event('status') // → returns search config
9
9
  * event.hasAction('CLICKED') // → returns conditional
10
10
  */
11
- declare function eventFn(fieldId: EventFieldId): {
11
+ declare function eventFn(fieldId: EventFieldIdInput): {
12
12
  range: () => {
13
- fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
13
+ fieldId: "event.status" | "event.updatedAt" | "event.trackingId" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
14
14
  fieldType: "event";
15
15
  } & {
16
16
  config: {
@@ -18,7 +18,7 @@ declare function eventFn(fieldId: EventFieldId): {
18
18
  };
19
19
  };
20
20
  exact: () => {
21
- fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
21
+ fieldId: "event.status" | "event.updatedAt" | "event.trackingId" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
22
22
  fieldType: "event";
23
23
  } & {
24
24
  config: {
@@ -26,20 +26,82 @@ declare function eventFn(fieldId: EventFieldId): {
26
26
  };
27
27
  };
28
28
  fuzzy: () => {
29
- fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
29
+ fieldId: "event.status" | "event.updatedAt" | "event.trackingId" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
30
30
  fieldType: "event";
31
31
  } & {
32
32
  config: {
33
33
  type: "fuzzy";
34
34
  };
35
35
  };
36
+ within: () => {
37
+ fieldId: "event.status" | "event.updatedAt" | "event.trackingId" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
38
+ fieldType: "event";
39
+ } & {
40
+ config: {
41
+ type: "within";
42
+ };
43
+ };
36
44
  };
37
45
  declare const event: typeof eventFn & {
38
46
  /**
39
47
  * Checks if the event contains a specific action type.
48
+ * Can be used directly as a conditional or chained with additional methods.
40
49
  * @param action - The action type to check for.
41
50
  */
42
- hasAction: (action: ActionType) => import("../conditionals/conditionals").JSONSchema;
51
+ hasAction: (action: ActionType) => {
52
+ /**
53
+ * Creates a conditional that checks if the event contains a specific action type
54
+ * with a minimum count of occurrences.
55
+ *
56
+ * @param minCount - The minimum number of actions required.
57
+ */
58
+ minCount: (minCount: number) => import("../conditionals/conditionals").JSONSchema;
59
+ /**
60
+ * Builds a conditional that sets a maximum count for the number of actions.
61
+ * This is useful for limiting the number of actions of a specific type in a single event.
62
+ */
63
+ maxCount: (maxCount: number) => import("../conditionals/conditionals").JSONSchema;
64
+ /**
65
+ * Adds additional field constraints to the action matching.
66
+ *
67
+ * @param fields - Object containing additional fields to match on the action.
68
+ */
69
+ withFields: (fields: Record<string, unknown>) => {
70
+ /**
71
+ * Creates a conditional that checks if the event contains a specific action type
72
+ * with a minimum count of occurrences.
73
+ *
74
+ * @param minCount - The minimum number of actions required.
75
+ */
76
+ minCount: (minCount: number) => import("../conditionals/conditionals").JSONSchema;
77
+ /**
78
+ * Builds a conditional that sets a maximum count for the number of actions.
79
+ * This is useful for limiting the number of actions of a specific type in a single event.
80
+ */
81
+ maxCount: (maxCount: number) => import("../conditionals/conditionals").JSONSchema;
82
+ };
83
+ /**
84
+ * Adds template ID constraint to the action matching.
85
+ * This is a convenience method that adds content.templateId to the fields.
86
+ *
87
+ * @param id - The template ID to match against.
88
+ */
89
+ withTemplate: (id: string) => {
90
+ /**
91
+ * Creates a conditional that checks if the event contains a specific action type
92
+ * with a minimum count of occurrences.
93
+ *
94
+ * @param minCount - The minimum number of actions required.
95
+ */
96
+ minCount: (minCount: number) => import("../conditionals/conditionals").JSONSchema;
97
+ /**
98
+ * Builds a conditional that sets a maximum count for the number of actions.
99
+ * This is useful for limiting the number of actions of a specific type in a single event.
100
+ */
101
+ maxCount: (maxCount: number) => import("../conditionals/conditionals").JSONSchema;
102
+ };
103
+ __nominal__type: "JSONSchema";
104
+ };
43
105
  field(field: WorkqueueColumnKeys): WorkqueueColumnValue;
44
106
  };
45
107
  export { event };
@@ -56,6 +56,20 @@ export declare function field(fieldId: string, options?: {
56
56
  type: "fuzzy";
57
57
  };
58
58
  };
59
+ within: () => {
60
+ options?: SelectOption[];
61
+ excludeInSearchQuery?: boolean;
62
+ alternateFieldIds?: string[];
63
+ conditionals?: FieldConditional[];
64
+ validations?: ValidationConfig[];
65
+ searchCriteriaLabelPrefix?: TranslationConfig;
66
+ fieldId: string;
67
+ fieldType: "field";
68
+ } & {
69
+ config: {
70
+ type: "within";
71
+ };
72
+ };
59
73
  $$field: string;
60
74
  isAfter: () => {
61
75
  days: (days: number) => {
@@ -67,8 +67,8 @@ export declare function eventPayloadGenerator(rng: () => number): {
67
67
  street?: string | null | undefined;
68
68
  zipCode?: string | null | undefined;
69
69
  } | {
70
- firstname?: string | null | undefined;
71
- surname?: string | null | undefined;
70
+ firstname: string;
71
+ surname: string;
72
72
  middlename?: string | null | undefined;
73
73
  } | {
74
74
  country: string;
@@ -123,8 +123,8 @@ export declare function eventPayloadGenerator(rng: () => number): {
123
123
  street?: string | null | undefined;
124
124
  zipCode?: string | null | undefined;
125
125
  } | {
126
- firstname?: string | null | undefined;
127
- surname?: string | null | undefined;
126
+ firstname: string;
127
+ surname: string;
128
128
  middlename?: string | null | undefined;
129
129
  } | {
130
130
  country: string;
@@ -173,8 +173,8 @@ export declare function eventPayloadGenerator(rng: () => number): {
173
173
  street?: string | null | undefined;
174
174
  zipCode?: string | null | undefined;
175
175
  } | {
176
- firstname?: string | null | undefined;
177
- surname?: string | null | undefined;
176
+ firstname: string;
177
+ surname: string;
178
178
  middlename?: string | null | undefined;
179
179
  } | {
180
180
  country: string;
@@ -240,8 +240,8 @@ export declare function eventPayloadGenerator(rng: () => number): {
240
240
  street?: string | null | undefined;
241
241
  zipCode?: string | null | undefined;
242
242
  } | {
243
- firstname?: string | null | undefined;
244
- surname?: string | null | undefined;
243
+ firstname: string;
244
+ surname: string;
245
245
  middlename?: string | null | undefined;
246
246
  } | {
247
247
  country: string;
@@ -309,8 +309,8 @@ export declare function eventPayloadGenerator(rng: () => number): {
309
309
  street?: string | null | undefined;
310
310
  zipCode?: string | null | undefined;
311
311
  } | {
312
- firstname?: string | null | undefined;
313
- surname?: string | null | undefined;
312
+ firstname: string;
313
+ surname: string;
314
314
  middlename?: string | null | undefined;
315
315
  } | {
316
316
  country: string;
@@ -372,8 +372,8 @@ export declare function eventPayloadGenerator(rng: () => number): {
372
372
  street?: string | null | undefined;
373
373
  zipCode?: string | null | undefined;
374
374
  } | {
375
- firstname?: string | null | undefined;
376
- surname?: string | null | undefined;
375
+ firstname: string;
376
+ surname: string;
377
377
  middlename?: string | null | undefined;
378
378
  } | {
379
379
  country: string;
@@ -414,7 +414,7 @@ export declare function eventPayloadGenerator(rng: () => number): {
414
414
  requestId: string;
415
415
  keepAssignment: boolean | undefined;
416
416
  };
417
- reject: (eventId: string, requestId: string, input?: Partial<Pick<RejectCorrectionActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
417
+ reject: (eventId: string, requestId: string, input: Partial<Pick<RejectCorrectionActionInput, "transactionId" | "annotation" | "keepAssignment" | "reason">>) => {
418
418
  type: "REJECT_CORRECTION";
419
419
  transactionId: string;
420
420
  declaration: {};
@@ -422,6 +422,10 @@ export declare function eventPayloadGenerator(rng: () => number): {
422
422
  eventId: string;
423
423
  requestId: string;
424
424
  keepAssignment: boolean | undefined;
425
+ reason: {
426
+ message: string;
427
+ isDuplicate?: boolean | undefined;
428
+ };
425
429
  };
426
430
  };
427
431
  };