@opencrvs/toolkit 1.9.4-rc.793f834 → 1.9.4-rc.f09603b

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 (58) hide show
  1. package/dist/commons/api/router.d.ts +28204 -2149
  2. package/dist/commons/conditionals/conditionals.d.ts +10 -1
  3. package/dist/commons/conditionals/validate.d.ts +11 -4
  4. package/dist/commons/events/ActionConfig.d.ts +23416 -1552
  5. package/dist/commons/events/ActionDocument.d.ts +803 -1856
  6. package/dist/commons/events/ActionInput.d.ts +277 -1073
  7. package/dist/commons/events/ActionType.d.ts +86 -9
  8. package/dist/commons/events/AdvancedSearchConfig.d.ts +228 -1238
  9. package/dist/commons/events/CompositeFieldValue.d.ts +27 -176
  10. package/dist/commons/events/Conditional.d.ts +26 -38
  11. package/dist/commons/events/Constants.d.ts +1 -1
  12. package/dist/commons/events/CountryConfigQueryInput.d.ts +931 -4169
  13. package/dist/commons/events/CreatedAtLocation.d.ts +1 -1
  14. package/dist/commons/events/DeduplicationConfig.d.ts +15 -150
  15. package/dist/commons/events/Draft.d.ts +70 -105
  16. package/dist/commons/events/DynamicFieldValue.d.ts +7 -91
  17. package/dist/commons/events/EventConfig.d.ts +18663 -2120
  18. package/dist/commons/events/EventConfigInput.d.ts +1 -1
  19. package/dist/commons/events/EventDocument.d.ts +320 -1332
  20. package/dist/commons/events/EventIndex.d.ts +197 -967
  21. package/dist/commons/events/EventInput.d.ts +2 -8
  22. package/dist/commons/events/EventMetadata.d.ts +106 -346
  23. package/dist/commons/events/FieldConfig.d.ts +4267 -11782
  24. package/dist/commons/events/FieldType.d.ts +20 -4
  25. package/dist/commons/events/FieldTypeMapping.d.ts +181 -813
  26. package/dist/commons/events/FieldValue.d.ts +83 -356
  27. package/dist/commons/events/Flag.d.ts +70 -0
  28. package/dist/commons/events/FormConfig.d.ts +13140 -721
  29. package/dist/commons/events/PageConfig.d.ts +8780 -319
  30. package/dist/commons/events/SummaryConfig.d.ts +14 -161
  31. package/dist/commons/events/TemplateConfig.d.ts +3 -3
  32. package/dist/commons/events/TranslationConfig.d.ts +2 -2
  33. package/dist/commons/events/WorkqueueColumnConfig.d.ts +74 -37
  34. package/dist/commons/events/WorkqueueConfig.d.ts +1691 -7156
  35. package/dist/commons/events/deduplication.d.ts +3 -3
  36. package/dist/commons/events/defineConfig.d.ts +25626 -150
  37. package/dist/commons/events/event.d.ts +4 -4
  38. package/dist/commons/events/index.d.ts +1 -0
  39. package/dist/commons/events/locations.d.ts +15 -19
  40. package/dist/commons/events/scopes.d.ts +5 -4
  41. package/dist/commons/events/state/availableActions.d.ts +2 -1
  42. package/dist/commons/events/state/flags.d.ts +21 -3
  43. package/dist/commons/events/state/index.d.ts +23 -19
  44. package/dist/commons/events/state/utils.d.ts +130 -112
  45. package/dist/commons/events/test.utils.d.ts +17 -8
  46. package/dist/commons/events/transactions.d.ts +1 -1
  47. package/dist/commons/events/utils.d.ts +51339 -362
  48. package/dist/commons/notification/UserNotifications.d.ts +55 -636
  49. package/dist/conditionals/index.d.ts.map +1 -1
  50. package/dist/conditionals/index.js +38 -5
  51. package/dist/events/deduplication.d.ts +3 -3
  52. package/dist/events/index.js +1810 -1550
  53. package/dist/notification/index.d.ts.map +1 -1
  54. package/dist/notification/index.js +1430 -1412
  55. package/dist/scopes/index.d.ts +167 -132
  56. package/dist/scopes/index.d.ts.map +1 -1
  57. package/dist/scopes/index.js +133 -94
  58. package/package.json +5 -5
@@ -1,170 +1,23 @@
1
- import { z } from 'zod';
2
- import { TranslationConfig } from './TranslationConfig';
1
+ import * as z from 'zod/v4';
3
2
  export declare const SummaryConfig: z.ZodObject<{
4
- fields: z.ZodArray<z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
5
- emptyValueMessage: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
6
- id: string;
7
- description: string;
8
- defaultMessage: string;
9
- }>>;
3
+ fields: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
4
+ emptyValueMessage: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
10
5
  conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
11
6
  type: z.ZodLiteral<"SHOW">;
12
- conditional: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
13
- }, "strip", z.ZodTypeAny, {
14
- type: "SHOW";
15
- conditional: import(".").JSONSchema;
16
- }, {
17
- type: "SHOW";
18
- conditional: import(".").JSONSchema;
19
- }>, "many">>>;
20
- }, {
7
+ conditional: z.ZodAny;
8
+ }, z.core.$strip>>>>;
21
9
  id: z.ZodString;
22
- value: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
23
- id: string;
24
- description: string;
25
- defaultMessage: string;
26
- }>;
27
- label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
28
- id: string;
29
- description: string;
30
- defaultMessage: string;
31
- }>;
32
- }>, "strip", z.ZodTypeAny, {
33
- id: string;
34
- value: TranslationConfig;
35
- label: TranslationConfig;
36
- conditionals?: {
37
- type: "SHOW";
38
- conditional: import(".").JSONSchema;
39
- }[] | undefined;
40
- emptyValueMessage?: TranslationConfig | undefined;
41
- }, {
42
- id: string;
43
- value: {
44
- id: string;
45
- description: string;
46
- defaultMessage: string;
47
- };
48
- label: {
49
- id: string;
50
- description: string;
51
- defaultMessage: string;
52
- };
53
- conditionals?: {
54
- type: "SHOW";
55
- conditional: import(".").JSONSchema;
56
- }[] | undefined;
57
- emptyValueMessage?: {
58
- id: string;
59
- description: string;
60
- defaultMessage: string;
61
- } | undefined;
62
- }>, z.ZodObject<z.objectUtil.extendShape<{
63
- emptyValueMessage: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
64
- id: string;
65
- description: string;
66
- defaultMessage: string;
67
- }>>;
10
+ value: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
11
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
12
+ }, z.core.$strip>, z.ZodObject<{
13
+ emptyValueMessage: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
68
14
  conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
69
15
  type: z.ZodLiteral<"SHOW">;
70
- conditional: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
71
- }, "strip", z.ZodTypeAny, {
72
- type: "SHOW";
73
- conditional: import(".").JSONSchema;
74
- }, {
75
- type: "SHOW";
76
- conditional: import(".").JSONSchema;
77
- }>, "many">>>;
78
- }, {
16
+ conditional: z.ZodAny;
17
+ }, z.core.$strip>>>>;
79
18
  fieldId: z.ZodString;
80
- label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
81
- id: string;
82
- description: string;
83
- defaultMessage: string;
84
- }>>;
85
- }>, "strip", z.ZodTypeAny, {
86
- fieldId: string;
87
- label?: TranslationConfig | undefined;
88
- conditionals?: {
89
- type: "SHOW";
90
- conditional: import(".").JSONSchema;
91
- }[] | undefined;
92
- emptyValueMessage?: TranslationConfig | undefined;
93
- }, {
94
- fieldId: string;
95
- label?: {
96
- id: string;
97
- description: string;
98
- defaultMessage: string;
99
- } | undefined;
100
- conditionals?: {
101
- type: "SHOW";
102
- conditional: import(".").JSONSchema;
103
- }[] | undefined;
104
- emptyValueMessage?: {
105
- id: string;
106
- description: string;
107
- defaultMessage: string;
108
- } | undefined;
109
- }>]>, "many">;
110
- }, "strip", z.ZodTypeAny, {
111
- fields: ({
112
- fieldId: string;
113
- label?: TranslationConfig | undefined;
114
- conditionals?: {
115
- type: "SHOW";
116
- conditional: import(".").JSONSchema;
117
- }[] | undefined;
118
- emptyValueMessage?: TranslationConfig | undefined;
119
- } | {
120
- id: string;
121
- value: TranslationConfig;
122
- label: TranslationConfig;
123
- conditionals?: {
124
- type: "SHOW";
125
- conditional: import(".").JSONSchema;
126
- }[] | undefined;
127
- emptyValueMessage?: TranslationConfig | undefined;
128
- })[];
129
- }, {
130
- fields: ({
131
- fieldId: string;
132
- label?: {
133
- id: string;
134
- description: string;
135
- defaultMessage: string;
136
- } | undefined;
137
- conditionals?: {
138
- type: "SHOW";
139
- conditional: import(".").JSONSchema;
140
- }[] | undefined;
141
- emptyValueMessage?: {
142
- id: string;
143
- description: string;
144
- defaultMessage: string;
145
- } | undefined;
146
- } | {
147
- id: string;
148
- value: {
149
- id: string;
150
- description: string;
151
- defaultMessage: string;
152
- };
153
- label: {
154
- id: string;
155
- description: string;
156
- defaultMessage: string;
157
- };
158
- conditionals?: {
159
- type: "SHOW";
160
- conditional: import(".").JSONSchema;
161
- }[] | undefined;
162
- emptyValueMessage?: {
163
- id: string;
164
- description: string;
165
- defaultMessage: string;
166
- } | undefined;
167
- })[];
168
- }>;
19
+ label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
20
+ }, z.core.$strip>]>>;
21
+ }, z.core.$strip>;
169
22
  export type SummaryConfig = z.infer<typeof SummaryConfig>;
170
23
  //# sourceMappingURL=SummaryConfig.d.ts.map
@@ -1,5 +1,5 @@
1
1
  /**
2
- * TemplateConfig defines configuration rules for system-based variables (e.g. $user.province).
2
+ * TemplateConfig defines configuration rules for system-based variables (e.g. $user.role).
3
3
  * They are currently used for providing default values in FieldConfig.
4
4
  */
5
5
  import { FieldValue } from './FieldValue';
@@ -8,8 +8,8 @@ import { FieldValue } from './FieldValue';
8
8
  */
9
9
  export type SystemVariables = {
10
10
  $user: {
11
- province: string;
12
- district: string;
11
+ name: string;
12
+ role: string;
13
13
  };
14
14
  $window: {
15
15
  location: {
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod/v4';
2
2
  export type TranslationConfig = {
3
3
  id: string;
4
4
  defaultMessage: string;
@@ -9,7 +9,7 @@ export type MessageDescriptorZod = {
9
9
  defaultMessage: z.ZodString;
10
10
  description: z.ZodString;
11
11
  };
12
- type ExplicitTypeToReduceDeclarationSize = z.ZodObject<MessageDescriptorZod, 'strip', z.ZodTypeAny, TranslationConfig>;
12
+ type ExplicitTypeToReduceDeclarationSize = z.ZodObject<MessageDescriptorZod>;
13
13
  export declare const TranslationConfig: ExplicitTypeToReduceDeclarationSize;
14
14
  export {};
15
15
  //# sourceMappingURL=TranslationConfig.d.ts.map
@@ -1,53 +1,90 @@
1
- import { z } from 'zod';
2
- import { TranslationConfig } from './TranslationConfig';
3
- export declare const WorkqueueColumnKeysArray: readonly ["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags", "title", "outbox"];
4
- export declare const WorkqueueColumnKeys: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags", "title", "outbox"]>;
1
+ import * as z from 'zod/v4';
2
+ export declare const WorkqueueColumnKeysArray: readonly ["id", "type", "status", "createdAt", "dateOfEvent", "placeOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags", "title", "outbox"];
3
+ export declare const WorkqueueColumnKeys: z.ZodEnum<{
4
+ type: "type";
5
+ id: "id";
6
+ status: "status";
7
+ title: "title";
8
+ createdByUserType: "createdByUserType";
9
+ createdAt: "createdAt";
10
+ createdBy: "createdBy";
11
+ createdAtLocation: "createdAtLocation";
12
+ assignedTo: "assignedTo";
13
+ trackingId: "trackingId";
14
+ placeOfEvent: "placeOfEvent";
15
+ legalStatuses: "legalStatuses";
16
+ dateOfEvent: "dateOfEvent";
17
+ updatedByUserRole: "updatedByUserRole";
18
+ updatedAtLocation: "updatedAtLocation";
19
+ updatedAt: "updatedAt";
20
+ updatedBy: "updatedBy";
21
+ flags: "flags";
22
+ outbox: "outbox";
23
+ }>;
5
24
  export type WorkqueueColumnKeys = z.infer<typeof WorkqueueColumnKeys>;
6
25
  export declare const WorkqueueColumnValue: z.ZodObject<{
7
- $event: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags", "title", "outbox"]>;
8
- }, "strip", z.ZodTypeAny, {
9
- $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "updatedAt" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
10
- }, {
11
- $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "updatedAt" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
12
- }>;
26
+ $event: z.ZodEnum<{
27
+ type: "type";
28
+ id: "id";
29
+ status: "status";
30
+ title: "title";
31
+ createdByUserType: "createdByUserType";
32
+ createdAt: "createdAt";
33
+ createdBy: "createdBy";
34
+ createdAtLocation: "createdAtLocation";
35
+ assignedTo: "assignedTo";
36
+ trackingId: "trackingId";
37
+ placeOfEvent: "placeOfEvent";
38
+ legalStatuses: "legalStatuses";
39
+ dateOfEvent: "dateOfEvent";
40
+ updatedByUserRole: "updatedByUserRole";
41
+ updatedAtLocation: "updatedAtLocation";
42
+ updatedAt: "updatedAt";
43
+ updatedBy: "updatedBy";
44
+ flags: "flags";
45
+ outbox: "outbox";
46
+ }>;
47
+ }, z.core.$strip>;
13
48
  export type WorkqueueColumnValue = z.infer<typeof WorkqueueColumnValue>;
14
49
  /**
15
50
  * Configuration for column header and value of cell of workqueue.
16
51
  */
17
52
  export declare const WorkqueueColumn: z.ZodObject<{
18
- label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
19
- id: string;
20
- description: string;
21
- defaultMessage: string;
22
- }>;
53
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
23
54
  value: z.ZodObject<{
24
- $event: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags", "title", "outbox"]>;
25
- }, "strip", z.ZodTypeAny, {
26
- $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "updatedAt" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
27
- }, {
28
- $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "updatedAt" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
29
- }>;
30
- }, "strip", z.ZodTypeAny, {
31
- value: {
32
- $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "updatedAt" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
33
- };
34
- label: TranslationConfig;
35
- }, {
36
- value: {
37
- $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "updatedAt" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
38
- };
55
+ $event: z.ZodEnum<{
56
+ type: "type";
57
+ id: "id";
58
+ status: "status";
59
+ title: "title";
60
+ createdByUserType: "createdByUserType";
61
+ createdAt: "createdAt";
62
+ createdBy: "createdBy";
63
+ createdAtLocation: "createdAtLocation";
64
+ assignedTo: "assignedTo";
65
+ trackingId: "trackingId";
66
+ placeOfEvent: "placeOfEvent";
67
+ legalStatuses: "legalStatuses";
68
+ dateOfEvent: "dateOfEvent";
69
+ updatedByUserRole: "updatedByUserRole";
70
+ updatedAtLocation: "updatedAtLocation";
71
+ updatedAt: "updatedAt";
72
+ updatedBy: "updatedBy";
73
+ flags: "flags";
74
+ outbox: "outbox";
75
+ }>;
76
+ }, z.core.$strip>;
77
+ }, z.core.$strip>;
78
+ export type WorkqueueColumn = z.infer<typeof WorkqueueColumn>;
79
+ export type WorkqueueColumnInput = z.infer<typeof WorkqueueColumn>;
80
+ export declare function defineWorkqueuesColumns(workqueueColumns: WorkqueueColumnInput[]): {
39
81
  label: {
40
82
  id: string;
41
- description: string;
42
83
  defaultMessage: string;
84
+ description: string;
43
85
  };
44
- }>;
45
- export type WorkqueueColumn = z.infer<typeof WorkqueueColumn>;
46
- export type WorkqueueColumnInput = z.infer<typeof WorkqueueColumn>;
47
- export declare function defineWorkqueuesColumns(workqueueColumns: WorkqueueColumnInput[]): {
48
86
  value: {
49
- $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "updatedAt" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
87
+ $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "placeOfEvent" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedAt" | "updatedBy" | "flags" | "outbox";
50
88
  };
51
- label: TranslationConfig;
52
89
  }[];
53
90
  //# sourceMappingURL=WorkqueueColumnConfig.d.ts.map