@opencrvs/toolkit 1.8.0-rc.feef45c → 1.8.0-rc.ff0a1b5

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.
@@ -217,6 +217,34 @@ export declare const defineConfig: (config: EventConfigInput) => {
217
217
  configuration?: {
218
218
  notice?: import("./TranslationConfig").TranslationConfig | undefined;
219
219
  } | undefined;
220
+ } | {
221
+ type: "DATE_RANGE";
222
+ id: string;
223
+ label: import("./TranslationConfig").TranslationConfig;
224
+ parent?: {
225
+ _fieldId?: string | undefined;
226
+ } | undefined;
227
+ validation?: {
228
+ message: import("./TranslationConfig").TranslationConfig;
229
+ validator: import(".").JSONSchema;
230
+ }[] | undefined;
231
+ required?: boolean | undefined;
232
+ defaultValue?: string | [string, string] | undefined;
233
+ conditionals?: ({
234
+ type: "SHOW";
235
+ conditional: import(".").JSONSchema;
236
+ } | {
237
+ type: "ENABLE";
238
+ conditional: import(".").JSONSchema;
239
+ } | {
240
+ type: "DISPLAY_ON_REVIEW";
241
+ conditional: import(".").JSONSchema;
242
+ })[] | undefined;
243
+ placeholder?: import("./TranslationConfig").TranslationConfig | undefined;
244
+ hideLabel?: boolean | undefined;
245
+ configuration?: {
246
+ notice?: import("./TranslationConfig").TranslationConfig | undefined;
247
+ } | undefined;
220
248
  } | {
221
249
  type: "PARAGRAPH";
222
250
  id: string;
@@ -896,6 +924,34 @@ export declare const defineConfig: (config: EventConfigInput) => {
896
924
  configuration?: {
897
925
  notice?: import("./TranslationConfig").TranslationConfig | undefined;
898
926
  } | undefined;
927
+ } | {
928
+ type: "DATE_RANGE";
929
+ id: string;
930
+ label: import("./TranslationConfig").TranslationConfig;
931
+ parent?: {
932
+ _fieldId?: string | undefined;
933
+ } | undefined;
934
+ validation?: {
935
+ message: import("./TranslationConfig").TranslationConfig;
936
+ validator: import(".").JSONSchema;
937
+ }[] | undefined;
938
+ required?: boolean | undefined;
939
+ defaultValue?: string | [string, string] | undefined;
940
+ conditionals?: ({
941
+ type: "SHOW";
942
+ conditional: import(".").JSONSchema;
943
+ } | {
944
+ type: "ENABLE";
945
+ conditional: import(".").JSONSchema;
946
+ } | {
947
+ type: "DISPLAY_ON_REVIEW";
948
+ conditional: import(".").JSONSchema;
949
+ })[] | undefined;
950
+ placeholder?: import("./TranslationConfig").TranslationConfig | undefined;
951
+ hideLabel?: boolean | undefined;
952
+ configuration?: {
953
+ notice?: import("./TranslationConfig").TranslationConfig | undefined;
954
+ } | undefined;
899
955
  } | {
900
956
  type: "PARAGRAPH";
901
957
  id: string;
@@ -1574,6 +1630,34 @@ export declare const defineConfig: (config: EventConfigInput) => {
1574
1630
  configuration?: {
1575
1631
  notice?: import("./TranslationConfig").TranslationConfig | undefined;
1576
1632
  } | undefined;
1633
+ } | {
1634
+ type: "DATE_RANGE";
1635
+ id: string;
1636
+ label: import("./TranslationConfig").TranslationConfig;
1637
+ parent?: {
1638
+ _fieldId?: string | undefined;
1639
+ } | undefined;
1640
+ validation?: {
1641
+ message: import("./TranslationConfig").TranslationConfig;
1642
+ validator: import(".").JSONSchema;
1643
+ }[] | undefined;
1644
+ required?: boolean | undefined;
1645
+ defaultValue?: string | [string, string] | undefined;
1646
+ conditionals?: ({
1647
+ type: "SHOW";
1648
+ conditional: import(".").JSONSchema;
1649
+ } | {
1650
+ type: "ENABLE";
1651
+ conditional: import(".").JSONSchema;
1652
+ } | {
1653
+ type: "DISPLAY_ON_REVIEW";
1654
+ conditional: import(".").JSONSchema;
1655
+ })[] | undefined;
1656
+ placeholder?: import("./TranslationConfig").TranslationConfig | undefined;
1657
+ hideLabel?: boolean | undefined;
1658
+ configuration?: {
1659
+ notice?: import("./TranslationConfig").TranslationConfig | undefined;
1660
+ } | undefined;
1577
1661
  } | {
1578
1662
  type: "PARAGRAPH";
1579
1663
  id: string;
@@ -2252,6 +2336,34 @@ export declare const defineConfig: (config: EventConfigInput) => {
2252
2336
  configuration?: {
2253
2337
  notice?: import("./TranslationConfig").TranslationConfig | undefined;
2254
2338
  } | undefined;
2339
+ } | {
2340
+ type: "DATE_RANGE";
2341
+ id: string;
2342
+ label: import("./TranslationConfig").TranslationConfig;
2343
+ parent?: {
2344
+ _fieldId?: string | undefined;
2345
+ } | undefined;
2346
+ validation?: {
2347
+ message: import("./TranslationConfig").TranslationConfig;
2348
+ validator: import(".").JSONSchema;
2349
+ }[] | undefined;
2350
+ required?: boolean | undefined;
2351
+ defaultValue?: string | [string, string] | undefined;
2352
+ conditionals?: ({
2353
+ type: "SHOW";
2354
+ conditional: import(".").JSONSchema;
2355
+ } | {
2356
+ type: "ENABLE";
2357
+ conditional: import(".").JSONSchema;
2358
+ } | {
2359
+ type: "DISPLAY_ON_REVIEW";
2360
+ conditional: import(".").JSONSchema;
2361
+ })[] | undefined;
2362
+ placeholder?: import("./TranslationConfig").TranslationConfig | undefined;
2363
+ hideLabel?: boolean | undefined;
2364
+ configuration?: {
2365
+ notice?: import("./TranslationConfig").TranslationConfig | undefined;
2366
+ } | undefined;
2255
2367
  } | {
2256
2368
  type: "PARAGRAPH";
2257
2369
  id: string;
@@ -2978,6 +3090,34 @@ export declare const defineConfig: (config: EventConfigInput) => {
2978
3090
  configuration?: {
2979
3091
  notice?: import("./TranslationConfig").TranslationConfig | undefined;
2980
3092
  } | undefined;
3093
+ } | {
3094
+ type: "DATE_RANGE";
3095
+ id: string;
3096
+ label: import("./TranslationConfig").TranslationConfig;
3097
+ parent?: {
3098
+ _fieldId?: string | undefined;
3099
+ } | undefined;
3100
+ validation?: {
3101
+ message: import("./TranslationConfig").TranslationConfig;
3102
+ validator: import(".").JSONSchema;
3103
+ }[] | undefined;
3104
+ required?: boolean | undefined;
3105
+ defaultValue?: string | [string, string] | undefined;
3106
+ conditionals?: ({
3107
+ type: "SHOW";
3108
+ conditional: import(".").JSONSchema;
3109
+ } | {
3110
+ type: "ENABLE";
3111
+ conditional: import(".").JSONSchema;
3112
+ } | {
3113
+ type: "DISPLAY_ON_REVIEW";
3114
+ conditional: import(".").JSONSchema;
3115
+ })[] | undefined;
3116
+ placeholder?: import("./TranslationConfig").TranslationConfig | undefined;
3117
+ hideLabel?: boolean | undefined;
3118
+ configuration?: {
3119
+ notice?: import("./TranslationConfig").TranslationConfig | undefined;
3120
+ } | undefined;
2981
3121
  } | {
2982
3122
  type: "PARAGRAPH";
2983
3123
  id: string;
@@ -3659,6 +3799,34 @@ export declare const defineConfig: (config: EventConfigInput) => {
3659
3799
  configuration?: {
3660
3800
  notice?: import("./TranslationConfig").TranslationConfig | undefined;
3661
3801
  } | undefined;
3802
+ } | {
3803
+ type: "DATE_RANGE";
3804
+ id: string;
3805
+ label: import("./TranslationConfig").TranslationConfig;
3806
+ parent?: {
3807
+ _fieldId?: string | undefined;
3808
+ } | undefined;
3809
+ validation?: {
3810
+ message: import("./TranslationConfig").TranslationConfig;
3811
+ validator: import(".").JSONSchema;
3812
+ }[] | undefined;
3813
+ required?: boolean | undefined;
3814
+ defaultValue?: string | [string, string] | undefined;
3815
+ conditionals?: ({
3816
+ type: "SHOW";
3817
+ conditional: import(".").JSONSchema;
3818
+ } | {
3819
+ type: "ENABLE";
3820
+ conditional: import(".").JSONSchema;
3821
+ } | {
3822
+ type: "DISPLAY_ON_REVIEW";
3823
+ conditional: import(".").JSONSchema;
3824
+ })[] | undefined;
3825
+ placeholder?: import("./TranslationConfig").TranslationConfig | undefined;
3826
+ hideLabel?: boolean | undefined;
3827
+ configuration?: {
3828
+ notice?: import("./TranslationConfig").TranslationConfig | undefined;
3829
+ } | undefined;
3662
3830
  } | {
3663
3831
  type: "PARAGRAPH";
3664
3832
  id: string;
@@ -4341,6 +4509,34 @@ export declare const defineConfig: (config: EventConfigInput) => {
4341
4509
  configuration?: {
4342
4510
  notice?: import("./TranslationConfig").TranslationConfig | undefined;
4343
4511
  } | undefined;
4512
+ } | {
4513
+ type: "DATE_RANGE";
4514
+ id: string;
4515
+ label: import("./TranslationConfig").TranslationConfig;
4516
+ parent?: {
4517
+ _fieldId?: string | undefined;
4518
+ } | undefined;
4519
+ validation?: {
4520
+ message: import("./TranslationConfig").TranslationConfig;
4521
+ validator: import(".").JSONSchema;
4522
+ }[] | undefined;
4523
+ required?: boolean | undefined;
4524
+ defaultValue?: string | [string, string] | undefined;
4525
+ conditionals?: ({
4526
+ type: "SHOW";
4527
+ conditional: import(".").JSONSchema;
4528
+ } | {
4529
+ type: "ENABLE";
4530
+ conditional: import(".").JSONSchema;
4531
+ } | {
4532
+ type: "DISPLAY_ON_REVIEW";
4533
+ conditional: import(".").JSONSchema;
4534
+ })[] | undefined;
4535
+ placeholder?: import("./TranslationConfig").TranslationConfig | undefined;
4536
+ hideLabel?: boolean | undefined;
4537
+ configuration?: {
4538
+ notice?: import("./TranslationConfig").TranslationConfig | undefined;
4539
+ } | undefined;
4344
4540
  } | {
4345
4541
  type: "PARAGRAPH";
4346
4542
  id: string;
@@ -5022,6 +5218,34 @@ export declare const defineConfig: (config: EventConfigInput) => {
5022
5218
  configuration?: {
5023
5219
  notice?: import("./TranslationConfig").TranslationConfig | undefined;
5024
5220
  } | undefined;
5221
+ } | {
5222
+ type: "DATE_RANGE";
5223
+ id: string;
5224
+ label: import("./TranslationConfig").TranslationConfig;
5225
+ parent?: {
5226
+ _fieldId?: string | undefined;
5227
+ } | undefined;
5228
+ validation?: {
5229
+ message: import("./TranslationConfig").TranslationConfig;
5230
+ validator: import(".").JSONSchema;
5231
+ }[] | undefined;
5232
+ required?: boolean | undefined;
5233
+ defaultValue?: string | [string, string] | undefined;
5234
+ conditionals?: ({
5235
+ type: "SHOW";
5236
+ conditional: import(".").JSONSchema;
5237
+ } | {
5238
+ type: "ENABLE";
5239
+ conditional: import(".").JSONSchema;
5240
+ } | {
5241
+ type: "DISPLAY_ON_REVIEW";
5242
+ conditional: import(".").JSONSchema;
5243
+ })[] | undefined;
5244
+ placeholder?: import("./TranslationConfig").TranslationConfig | undefined;
5245
+ hideLabel?: boolean | undefined;
5246
+ configuration?: {
5247
+ notice?: import("./TranslationConfig").TranslationConfig | undefined;
5248
+ } | undefined;
5025
5249
  } | {
5026
5250
  type: "PARAGRAPH";
5027
5251
  id: string;
@@ -5692,6 +5916,34 @@ export declare const defineConfig: (config: EventConfigInput) => {
5692
5916
  configuration?: {
5693
5917
  notice?: import("./TranslationConfig").TranslationConfig | undefined;
5694
5918
  } | undefined;
5919
+ } | {
5920
+ type: "DATE_RANGE";
5921
+ id: string;
5922
+ label: import("./TranslationConfig").TranslationConfig;
5923
+ parent?: {
5924
+ _fieldId?: string | undefined;
5925
+ } | undefined;
5926
+ validation?: {
5927
+ message: import("./TranslationConfig").TranslationConfig;
5928
+ validator: import(".").JSONSchema;
5929
+ }[] | undefined;
5930
+ required?: boolean | undefined;
5931
+ defaultValue?: string | [string, string] | undefined;
5932
+ conditionals?: ({
5933
+ type: "SHOW";
5934
+ conditional: import(".").JSONSchema;
5935
+ } | {
5936
+ type: "ENABLE";
5937
+ conditional: import(".").JSONSchema;
5938
+ } | {
5939
+ type: "DISPLAY_ON_REVIEW";
5940
+ conditional: import(".").JSONSchema;
5941
+ })[] | undefined;
5942
+ placeholder?: import("./TranslationConfig").TranslationConfig | undefined;
5943
+ hideLabel?: boolean | undefined;
5944
+ configuration?: {
5945
+ notice?: import("./TranslationConfig").TranslationConfig | undefined;
5946
+ } | undefined;
5695
5947
  } | {
5696
5948
  type: "PARAGRAPH";
5697
5949
  id: string;
@@ -6373,6 +6625,34 @@ export declare const defineConfig: (config: EventConfigInput) => {
6373
6625
  configuration?: {
6374
6626
  notice?: import("./TranslationConfig").TranslationConfig | undefined;
6375
6627
  } | undefined;
6628
+ } | {
6629
+ type: "DATE_RANGE";
6630
+ id: string;
6631
+ label: import("./TranslationConfig").TranslationConfig;
6632
+ parent?: {
6633
+ _fieldId?: string | undefined;
6634
+ } | undefined;
6635
+ validation?: {
6636
+ message: import("./TranslationConfig").TranslationConfig;
6637
+ validator: import(".").JSONSchema;
6638
+ }[] | undefined;
6639
+ required?: boolean | undefined;
6640
+ defaultValue?: string | [string, string] | undefined;
6641
+ conditionals?: ({
6642
+ type: "SHOW";
6643
+ conditional: import(".").JSONSchema;
6644
+ } | {
6645
+ type: "ENABLE";
6646
+ conditional: import(".").JSONSchema;
6647
+ } | {
6648
+ type: "DISPLAY_ON_REVIEW";
6649
+ conditional: import(".").JSONSchema;
6650
+ })[] | undefined;
6651
+ placeholder?: import("./TranslationConfig").TranslationConfig | undefined;
6652
+ hideLabel?: boolean | undefined;
6653
+ configuration?: {
6654
+ notice?: import("./TranslationConfig").TranslationConfig | undefined;
6655
+ } | undefined;
6376
6656
  } | {
6377
6657
  type: "PARAGRAPH";
6378
6658
  id: string;
@@ -6866,6 +7146,7 @@ export declare const defineConfig: (config: EventConfigInput) => {
6866
7146
  type: "SHOW";
6867
7147
  conditional: import(".").JSONSchema;
6868
7148
  }[] | undefined;
7149
+ label?: import("./TranslationConfig").TranslationConfig | undefined;
6869
7150
  emptyValueMessage?: import("./TranslationConfig").TranslationConfig | undefined;
6870
7151
  } | {
6871
7152
  id: string;
@@ -6887,7 +7168,7 @@ export declare const defineConfig: (config: EventConfigInput) => {
6887
7168
  title: import("./TranslationConfig").TranslationConfig;
6888
7169
  fields: ({
6889
7170
  config: {
6890
- type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
7171
+ type: "exact" | "fuzzy" | "range";
6891
7172
  };
6892
7173
  fieldId: string;
6893
7174
  fieldType: "field";
@@ -6897,7 +7178,7 @@ export declare const defineConfig: (config: EventConfigInput) => {
6897
7178
  }[] | undefined;
6898
7179
  } | {
6899
7180
  config: {
6900
- type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
7181
+ type: "exact" | "fuzzy" | "range";
6901
7182
  };
6902
7183
  fieldId: "status" | "trackingId";
6903
7184
  fieldType: "event";
@@ -1,4 +1,5 @@
1
1
  import { EventFieldId } from './AdvancedSearchConfig';
2
+ import { EventMetadataKeys, EventMetadataParameter } from './EventMetadata';
2
3
  import { SelectOption } from './FieldConfig';
3
4
  /**
4
5
  * Creates a function that acts like a callable + static method container.
@@ -14,11 +15,12 @@ declare function eventFn(fieldId: EventFieldId, options?: SelectOption[]): {
14
15
  label: import("./TranslationConfig").TranslationConfig;
15
16
  }[] | undefined;
16
17
  config: {
17
- type: "EXACT";
18
+ type: "exact";
18
19
  };
19
20
  fieldType: "event";
20
21
  };
21
22
  declare const event: typeof eventFn & {
23
+ field(field: EventMetadataKeys): EventMetadataParameter;
22
24
  hasAction: (action: import("./ActionType").ActionType) => import("../conditionals/conditionals").JSONSchema;
23
25
  };
24
26
  export { event };
@@ -6,21 +6,21 @@
6
6
  export declare function field(fieldId: string): {
7
7
  range: () => {
8
8
  config: {
9
- type: "RANGE";
9
+ type: "range";
10
10
  };
11
11
  fieldId: string;
12
12
  fieldType: "field";
13
13
  };
14
14
  exact: () => {
15
15
  config: {
16
- type: "EXACT";
16
+ type: "exact";
17
17
  };
18
18
  fieldId: string;
19
19
  fieldType: "field";
20
20
  };
21
21
  fuzzy: () => {
22
22
  config: {
23
- type: "FUZZY";
23
+ type: "fuzzy";
24
24
  };
25
25
  fieldId: string;
26
26
  fieldType: "field";
@@ -1,4 +1,4 @@
1
- import { ActionDocument, ActionUpdate } from './ActionDocument';
1
+ import { ActionDocument, ActionUpdate, EventState } from './ActionDocument';
2
2
  import { ArchiveActionInput, AssignActionInput, DeclareActionInput, RegisterActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, UnassignActionInput, ValidateActionInput } from './ActionInput';
3
3
  import { ActionType } from './ActionType';
4
4
  import { Draft } from './Draft';
@@ -8,7 +8,7 @@ import { EventIndex } from './EventIndex';
8
8
  import { EventInput } from './EventInput';
9
9
  import { FieldValue } from './FieldValue';
10
10
  import { TranslationConfig } from './TranslationConfig';
11
- export declare function generateActionDeclarationInput(configuration: EventConfig, action: ActionType): Partial<import("./ActionDocument").EventState>;
11
+ export declare function generateActionDeclarationInput(configuration: EventConfig, action: ActionType): EventState;
12
12
  export declare function generateActionAnnotationInput(configuration: EventConfig, action: ActionType): {};
13
13
  export declare const eventPayloadGenerator: {
14
14
  create: (input?: Partial<EventInput>) => {
@@ -65,7 +65,7 @@ export declare const eventPayloadGenerator: {
65
65
  option: string;
66
66
  filename: string;
67
67
  originalFilename: string;
68
- }[] | undefined>;
68
+ }[] | [string, string] | undefined>;
69
69
  annotation: {};
70
70
  eventId: string;
71
71
  };
@@ -115,7 +115,7 @@ export declare const eventPayloadGenerator: {
115
115
  option: string;
116
116
  filename: string;
117
117
  originalFilename: string;
118
- }[] | undefined>>;
118
+ }[] | [string, string] | undefined>>;
119
119
  eventId: string;
120
120
  };
121
121
  validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "declaration" | "annotation">>) => {
@@ -158,7 +158,7 @@ export declare const eventPayloadGenerator: {
158
158
  option: string;
159
159
  filename: string;
160
160
  originalFilename: string;
161
- }[] | undefined>;
161
+ }[] | [string, string] | undefined>;
162
162
  annotation: {};
163
163
  duplicates: never[];
164
164
  eventId: string;
@@ -235,7 +235,7 @@ export declare const eventPayloadGenerator: {
235
235
  option: string;
236
236
  filename: string;
237
237
  originalFilename: string;
238
- }[] | undefined>;
238
+ }[] | [string, string] | undefined>;
239
239
  annotation: {};
240
240
  eventId: string;
241
241
  };
@@ -287,7 +287,7 @@ export declare const eventPayloadGenerator: {
287
287
  option: string;
288
288
  filename: string;
289
289
  originalFilename: string;
290
- }[] | undefined>;
290
+ }[] | [string, string] | undefined>;
291
291
  annotation: {};
292
292
  eventId: string;
293
293
  };