@opencrvs/toolkit 1.8.1-rc.facd84c → 1.8.1-rc.faf1965

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.
@@ -117,6 +117,7 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
117
117
  readonly REJECTED: "rejected";
118
118
  readonly CORRECTION_REQUESTED: "correction-requested";
119
119
  }>]>, "many">;
120
+ modifiedAt: z.ZodOptional<z.ZodString>;
120
121
  }, {
121
122
  declaration: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString, z.ZodUnion<[z.ZodObject<{
122
123
  start: z.ZodString;
@@ -352,6 +353,7 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
352
353
  dateOfEvent?: string | null | undefined;
353
354
  updatedAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
354
355
  updatedBy?: string | null | undefined;
356
+ modifiedAt?: string | undefined;
355
357
  }, {
356
358
  type: string;
357
359
  id: string;
@@ -439,6 +441,7 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
439
441
  dateOfEvent?: string | null | undefined;
440
442
  updatedAtLocation?: string | null | undefined;
441
443
  updatedBy?: string | null | undefined;
444
+ modifiedAt?: string | undefined;
442
445
  }>;
443
446
  export declare const EventSearchIndex: z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodObject<{
444
447
  type: z.ZodString;
@@ -725,6 +728,25 @@ export declare const QueryExpression: z.ZodEffects<z.ZodObject<{
725
728
  type: "timePeriod";
726
729
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
727
730
  }>]>>>;
731
+ 'legalStatuses.DECLARED.createdAtLocation': z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodObject<{
732
+ type: z.ZodLiteral<"within">;
733
+ location: z.ZodString;
734
+ }, "strip", z.ZodTypeAny, {
735
+ type: "within";
736
+ location: string;
737
+ }, {
738
+ type: "within";
739
+ location: string;
740
+ }>, z.ZodObject<{
741
+ type: z.ZodLiteral<"exact">;
742
+ term: z.ZodString;
743
+ }, "strip", z.ZodTypeAny, {
744
+ type: "exact";
745
+ term: string;
746
+ }, {
747
+ type: "exact";
748
+ term: string;
749
+ }>]>>>;
728
750
  'legalStatuses.REGISTERED.createdAtLocation': z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodObject<{
729
751
  type: z.ZodLiteral<"within">;
730
752
  location: z.ZodString;
@@ -945,6 +967,13 @@ export declare const QueryExpression: z.ZodEffects<z.ZodObject<{
945
967
  type: "timePeriod";
946
968
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
947
969
  } | undefined;
970
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
971
+ type: "exact";
972
+ term: string;
973
+ } | {
974
+ type: "within";
975
+ location: string;
976
+ } | undefined;
948
977
  'legalStatuses.REGISTERED.createdAtLocation'?: {
949
978
  type: "exact";
950
979
  term: string;
@@ -1038,6 +1067,13 @@ export declare const QueryExpression: z.ZodEffects<z.ZodObject<{
1038
1067
  type: "timePeriod";
1039
1068
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
1040
1069
  } | undefined;
1070
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
1071
+ type: "exact";
1072
+ term: string;
1073
+ } | {
1074
+ type: "within";
1075
+ location: string;
1076
+ } | undefined;
1041
1077
  'legalStatuses.REGISTERED.createdAtLocation'?: {
1042
1078
  type: "exact";
1043
1079
  term: string;
@@ -1131,6 +1167,13 @@ export declare const QueryExpression: z.ZodEffects<z.ZodObject<{
1131
1167
  type: "timePeriod";
1132
1168
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
1133
1169
  } | undefined;
1170
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
1171
+ type: "exact";
1172
+ term: string;
1173
+ } | {
1174
+ type: "within";
1175
+ location: string;
1176
+ } | undefined;
1134
1177
  'legalStatuses.REGISTERED.createdAtLocation'?: {
1135
1178
  type: "exact";
1136
1179
  term: string;
@@ -1224,6 +1267,13 @@ export declare const QueryExpression: z.ZodEffects<z.ZodObject<{
1224
1267
  type: "timePeriod";
1225
1268
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
1226
1269
  } | undefined;
1270
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
1271
+ type: "exact";
1272
+ term: string;
1273
+ } | {
1274
+ type: "within";
1275
+ location: string;
1276
+ } | undefined;
1227
1277
  'legalStatuses.REGISTERED.createdAtLocation'?: {
1228
1278
  type: "exact";
1229
1279
  term: string;
@@ -1359,6 +1409,25 @@ export declare const QueryType: z.ZodObject<{
1359
1409
  type: "timePeriod";
1360
1410
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
1361
1411
  }>]>>>;
1412
+ 'legalStatuses.DECLARED.createdAtLocation': z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodObject<{
1413
+ type: z.ZodLiteral<"within">;
1414
+ location: z.ZodString;
1415
+ }, "strip", z.ZodTypeAny, {
1416
+ type: "within";
1417
+ location: string;
1418
+ }, {
1419
+ type: "within";
1420
+ location: string;
1421
+ }>, z.ZodObject<{
1422
+ type: z.ZodLiteral<"exact">;
1423
+ term: z.ZodString;
1424
+ }, "strip", z.ZodTypeAny, {
1425
+ type: "exact";
1426
+ term: string;
1427
+ }, {
1428
+ type: "exact";
1429
+ term: string;
1430
+ }>]>>>;
1362
1431
  'legalStatuses.REGISTERED.createdAtLocation': z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodObject<{
1363
1432
  type: z.ZodLiteral<"within">;
1364
1433
  location: z.ZodString;
@@ -1579,6 +1648,13 @@ export declare const QueryType: z.ZodObject<{
1579
1648
  type: "timePeriod";
1580
1649
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
1581
1650
  } | undefined;
1651
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
1652
+ type: "exact";
1653
+ term: string;
1654
+ } | {
1655
+ type: "within";
1656
+ location: string;
1657
+ } | undefined;
1582
1658
  'legalStatuses.REGISTERED.createdAtLocation'?: {
1583
1659
  type: "exact";
1584
1660
  term: string;
@@ -1672,6 +1748,13 @@ export declare const QueryType: z.ZodObject<{
1672
1748
  type: "timePeriod";
1673
1749
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
1674
1750
  } | undefined;
1751
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
1752
+ type: "exact";
1753
+ term: string;
1754
+ } | {
1755
+ type: "within";
1756
+ location: string;
1757
+ } | undefined;
1675
1758
  'legalStatuses.REGISTERED.createdAtLocation'?: {
1676
1759
  type: "exact";
1677
1760
  term: string;
@@ -1765,6 +1848,13 @@ export declare const QueryType: z.ZodObject<{
1765
1848
  type: "timePeriod";
1766
1849
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
1767
1850
  } | undefined;
1851
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
1852
+ type: "exact";
1853
+ term: string;
1854
+ } | {
1855
+ type: "within";
1856
+ location: string;
1857
+ } | undefined;
1768
1858
  'legalStatuses.REGISTERED.createdAtLocation'?: {
1769
1859
  type: "exact";
1770
1860
  term: string;
@@ -1858,6 +1948,13 @@ export declare const QueryType: z.ZodObject<{
1858
1948
  type: "timePeriod";
1859
1949
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
1860
1950
  } | undefined;
1951
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
1952
+ type: "exact";
1953
+ term: string;
1954
+ } | {
1955
+ type: "within";
1956
+ location: string;
1957
+ } | undefined;
1861
1958
  'legalStatuses.REGISTERED.createdAtLocation'?: {
1862
1959
  type: "exact";
1863
1960
  term: string;
@@ -1951,6 +2048,13 @@ export declare const QueryType: z.ZodObject<{
1951
2048
  type: "timePeriod";
1952
2049
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
1953
2050
  } | undefined;
2051
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
2052
+ type: "exact";
2053
+ term: string;
2054
+ } | {
2055
+ type: "within";
2056
+ location: string;
2057
+ } | undefined;
1954
2058
  'legalStatuses.REGISTERED.createdAtLocation'?: {
1955
2059
  type: "exact";
1956
2060
  term: string;
@@ -2044,6 +2148,13 @@ export declare const QueryType: z.ZodObject<{
2044
2148
  type: "timePeriod";
2045
2149
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
2046
2150
  } | undefined;
2151
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
2152
+ type: "exact";
2153
+ term: string;
2154
+ } | {
2155
+ type: "within";
2156
+ location: string;
2157
+ } | undefined;
2047
2158
  'legalStatuses.REGISTERED.createdAtLocation'?: {
2048
2159
  type: "exact";
2049
2160
  term: string;
@@ -2140,6 +2251,13 @@ export declare const QueryType: z.ZodObject<{
2140
2251
  type: "timePeriod";
2141
2252
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
2142
2253
  } | undefined;
2254
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
2255
+ type: "exact";
2256
+ term: string;
2257
+ } | {
2258
+ type: "within";
2259
+ location: string;
2260
+ } | undefined;
2143
2261
  'legalStatuses.REGISTERED.createdAtLocation'?: {
2144
2262
  type: "exact";
2145
2263
  term: string;
@@ -2233,6 +2351,13 @@ export declare const QueryType: z.ZodObject<{
2233
2351
  type: "timePeriod";
2234
2352
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
2235
2353
  } | undefined;
2354
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
2355
+ type: "exact";
2356
+ term: string;
2357
+ } | {
2358
+ type: "within";
2359
+ location: string;
2360
+ } | undefined;
2236
2361
  'legalStatuses.REGISTERED.createdAtLocation'?: {
2237
2362
  type: "exact";
2238
2363
  term: string;
@@ -297,6 +297,7 @@ export declare const EventMetadata: z.ZodObject<{
297
297
  readonly REJECTED: "rejected";
298
298
  readonly CORRECTION_REQUESTED: "correction-requested";
299
299
  }>]>, "many">;
300
+ modifiedAt: z.ZodOptional<z.ZodString>;
300
301
  }, "strip", z.ZodTypeAny, {
301
302
  type: string;
302
303
  id: string & z.BRAND<"UUID">;
@@ -335,6 +336,7 @@ export declare const EventMetadata: z.ZodObject<{
335
336
  dateOfEvent?: string | null | undefined;
336
337
  updatedAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
337
338
  updatedBy?: string | null | undefined;
339
+ modifiedAt?: string | undefined;
338
340
  }, {
339
341
  type: string;
340
342
  id: string;
@@ -373,6 +375,7 @@ export declare const EventMetadata: z.ZodObject<{
373
375
  dateOfEvent?: string | null | undefined;
374
376
  updatedAtLocation?: string | null | undefined;
375
377
  updatedBy?: string | null | undefined;
378
+ modifiedAt?: string | undefined;
376
379
  }>;
377
380
  export type EventMetadata = z.infer<typeof EventMetadata>;
378
381
  export declare const EventMetadataKeysArray: readonly ["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"];
@@ -7037,6 +7037,25 @@ export declare const WorkqueueCountInput: z.ZodArray<z.ZodObject<{
7037
7037
  type: "timePeriod";
7038
7038
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
7039
7039
  }>]>>>;
7040
+ 'legalStatuses.DECLARED.createdAtLocation': z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodObject<{
7041
+ type: z.ZodLiteral<"within">;
7042
+ location: z.ZodString;
7043
+ }, "strip", z.ZodTypeAny, {
7044
+ type: "within";
7045
+ location: string;
7046
+ }, {
7047
+ type: "within";
7048
+ location: string;
7049
+ }>, z.ZodObject<{
7050
+ type: z.ZodLiteral<"exact">;
7051
+ term: z.ZodString;
7052
+ }, "strip", z.ZodTypeAny, {
7053
+ type: "exact";
7054
+ term: string;
7055
+ }, {
7056
+ type: "exact";
7057
+ term: string;
7058
+ }>]>>>;
7040
7059
  'legalStatuses.REGISTERED.createdAtLocation': z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodObject<{
7041
7060
  type: z.ZodLiteral<"within">;
7042
7061
  location: z.ZodString;
@@ -7257,6 +7276,13 @@ export declare const WorkqueueCountInput: z.ZodArray<z.ZodObject<{
7257
7276
  type: "timePeriod";
7258
7277
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
7259
7278
  } | undefined;
7279
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
7280
+ type: "exact";
7281
+ term: string;
7282
+ } | {
7283
+ type: "within";
7284
+ location: string;
7285
+ } | undefined;
7260
7286
  'legalStatuses.REGISTERED.createdAtLocation'?: {
7261
7287
  type: "exact";
7262
7288
  term: string;
@@ -7350,6 +7376,13 @@ export declare const WorkqueueCountInput: z.ZodArray<z.ZodObject<{
7350
7376
  type: "timePeriod";
7351
7377
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
7352
7378
  } | undefined;
7379
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
7380
+ type: "exact";
7381
+ term: string;
7382
+ } | {
7383
+ type: "within";
7384
+ location: string;
7385
+ } | undefined;
7353
7386
  'legalStatuses.REGISTERED.createdAtLocation'?: {
7354
7387
  type: "exact";
7355
7388
  term: string;
@@ -7443,6 +7476,13 @@ export declare const WorkqueueCountInput: z.ZodArray<z.ZodObject<{
7443
7476
  type: "timePeriod";
7444
7477
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
7445
7478
  } | undefined;
7479
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
7480
+ type: "exact";
7481
+ term: string;
7482
+ } | {
7483
+ type: "within";
7484
+ location: string;
7485
+ } | undefined;
7446
7486
  'legalStatuses.REGISTERED.createdAtLocation'?: {
7447
7487
  type: "exact";
7448
7488
  term: string;
@@ -7536,6 +7576,13 @@ export declare const WorkqueueCountInput: z.ZodArray<z.ZodObject<{
7536
7576
  type: "timePeriod";
7537
7577
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
7538
7578
  } | undefined;
7579
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
7580
+ type: "exact";
7581
+ term: string;
7582
+ } | {
7583
+ type: "within";
7584
+ location: string;
7585
+ } | undefined;
7539
7586
  'legalStatuses.REGISTERED.createdAtLocation'?: {
7540
7587
  type: "exact";
7541
7588
  term: string;
@@ -7629,6 +7676,13 @@ export declare const WorkqueueCountInput: z.ZodArray<z.ZodObject<{
7629
7676
  type: "timePeriod";
7630
7677
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
7631
7678
  } | undefined;
7679
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
7680
+ type: "exact";
7681
+ term: string;
7682
+ } | {
7683
+ type: "within";
7684
+ location: string;
7685
+ } | undefined;
7632
7686
  'legalStatuses.REGISTERED.createdAtLocation'?: {
7633
7687
  type: "exact";
7634
7688
  term: string;
@@ -7722,6 +7776,13 @@ export declare const WorkqueueCountInput: z.ZodArray<z.ZodObject<{
7722
7776
  type: "timePeriod";
7723
7777
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
7724
7778
  } | undefined;
7779
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
7780
+ type: "exact";
7781
+ term: string;
7782
+ } | {
7783
+ type: "within";
7784
+ location: string;
7785
+ } | undefined;
7725
7786
  'legalStatuses.REGISTERED.createdAtLocation'?: {
7726
7787
  type: "exact";
7727
7788
  term: string;
@@ -7818,6 +7879,13 @@ export declare const WorkqueueCountInput: z.ZodArray<z.ZodObject<{
7818
7879
  type: "timePeriod";
7819
7880
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
7820
7881
  } | undefined;
7882
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
7883
+ type: "exact";
7884
+ term: string;
7885
+ } | {
7886
+ type: "within";
7887
+ location: string;
7888
+ } | undefined;
7821
7889
  'legalStatuses.REGISTERED.createdAtLocation'?: {
7822
7890
  type: "exact";
7823
7891
  term: string;
@@ -7911,6 +7979,13 @@ export declare const WorkqueueCountInput: z.ZodArray<z.ZodObject<{
7911
7979
  type: "timePeriod";
7912
7980
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
7913
7981
  } | undefined;
7982
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
7983
+ type: "exact";
7984
+ term: string;
7985
+ } | {
7986
+ type: "within";
7987
+ location: string;
7988
+ } | undefined;
7914
7989
  'legalStatuses.REGISTERED.createdAtLocation'?: {
7915
7990
  type: "exact";
7916
7991
  term: string;
@@ -8012,6 +8087,13 @@ export declare const WorkqueueCountInput: z.ZodArray<z.ZodObject<{
8012
8087
  type: "timePeriod";
8013
8088
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
8014
8089
  } | undefined;
8090
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
8091
+ type: "exact";
8092
+ term: string;
8093
+ } | {
8094
+ type: "within";
8095
+ location: string;
8096
+ } | undefined;
8015
8097
  'legalStatuses.REGISTERED.createdAtLocation'?: {
8016
8098
  type: "exact";
8017
8099
  term: string;
@@ -8105,6 +8187,13 @@ export declare const WorkqueueCountInput: z.ZodArray<z.ZodObject<{
8105
8187
  type: "timePeriod";
8106
8188
  term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
8107
8189
  } | undefined;
8190
+ 'legalStatuses.DECLARED.createdAtLocation'?: {
8191
+ type: "exact";
8192
+ term: string;
8193
+ } | {
8194
+ type: "within";
8195
+ location: string;
8196
+ } | undefined;
8108
8197
  'legalStatuses.REGISTERED.createdAtLocation'?: {
8109
8198
  type: "exact";
8110
8199
  term: string;
@@ -8657,7 +8657,7 @@ export declare const defineConfig: (config: EventConfigInput) => {
8657
8657
  title: import("./TranslationConfig").TranslationConfig;
8658
8658
  fields: ({
8659
8659
  config: {
8660
- type: "exact" | "fuzzy" | "range";
8660
+ type: "exact" | "fuzzy" | "range" | "within";
8661
8661
  };
8662
8662
  fieldId: string;
8663
8663
  fieldType: "field";
@@ -8684,7 +8684,7 @@ export declare const defineConfig: (config: EventConfigInput) => {
8684
8684
  excludeInSearchQuery?: boolean | undefined;
8685
8685
  } | {
8686
8686
  config: {
8687
- type: "exact" | "fuzzy" | "range";
8687
+ type: "exact" | "fuzzy" | "range" | "within";
8688
8688
  };
8689
8689
  fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
8690
8690
  fieldType: "event";
@@ -33,13 +33,75 @@ declare function eventFn(fieldId: EventFieldId): {
33
33
  type: "fuzzy";
34
34
  };
35
35
  };
36
+ within: () => {
37
+ fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "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) => {
@@ -15520,7 +15520,7 @@ export declare function getEventConfigById(eventConfigs: EventConfig[], id: stri
15520
15520
  title: import("./TranslationConfig").TranslationConfig;
15521
15521
  fields: ({
15522
15522
  config: {
15523
- type: "exact" | "fuzzy" | "range";
15523
+ type: "exact" | "fuzzy" | "range" | "within";
15524
15524
  };
15525
15525
  fieldId: string;
15526
15526
  fieldType: "field";
@@ -15547,7 +15547,7 @@ export declare function getEventConfigById(eventConfigs: EventConfig[], id: stri
15547
15547
  excludeInSearchQuery?: boolean | undefined;
15548
15548
  } | {
15549
15549
  config: {
15550
- type: "exact" | "fuzzy" | "range";
15550
+ type: "exact" | "fuzzy" | "range" | "within";
15551
15551
  };
15552
15552
  fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
15553
15553
  fieldType: "event";