@ecrvs/opencrvs-toolkit 1.8.1-rc.a7ee8fb
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.
- package/README.md +70 -0
- package/build.sh +56 -0
- package/dist/api/index.d.ts +11 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +52 -0
- package/dist/commons/api/router.d.ts +14568 -0
- package/dist/commons/conditionals/conditionals.d.ts +194 -0
- package/dist/commons/conditionals/index.d.ts +2 -0
- package/dist/commons/conditionals/validate.d.ts +129 -0
- package/dist/commons/events/ActionConfig.d.ts +2034 -0
- package/dist/commons/events/ActionDocument.d.ts +14400 -0
- package/dist/commons/events/ActionInput.d.ts +11157 -0
- package/dist/commons/events/ActionType.d.ts +52 -0
- package/dist/commons/events/AdvancedSearchConfig.d.ts +1175 -0
- package/dist/commons/events/CompositeFieldValue.d.ts +181 -0
- package/dist/commons/events/Conditional.d.ts +55 -0
- package/dist/commons/events/Constants.d.ts +3 -0
- package/dist/commons/events/CountryConfigQueryInput.d.ts +4494 -0
- package/dist/commons/events/CreatedAtLocation.d.ts +2 -0
- package/dist/commons/events/DeduplicationConfig.d.ts +209 -0
- package/dist/commons/events/Draft.d.ts +814 -0
- package/dist/commons/events/EventConfig.d.ts +2237 -0
- package/dist/commons/events/EventConfigInput.d.ts +10 -0
- package/dist/commons/events/EventDocument.d.ts +8505 -0
- package/dist/commons/events/EventIndex.d.ts +3858 -0
- package/dist/commons/events/EventInput.d.ts +13 -0
- package/dist/commons/events/EventMetadata.d.ts +408 -0
- package/dist/commons/events/FieldConfig.d.ts +7125 -0
- package/dist/commons/events/FieldType.d.ts +46 -0
- package/dist/commons/events/FieldTypeMapping.d.ts +537 -0
- package/dist/commons/events/FieldValue.d.ts +250 -0
- package/dist/commons/events/FileUtils.d.ts +4 -0
- package/dist/commons/events/FormConfig.d.ts +725 -0
- package/dist/commons/events/PageConfig.d.ts +336 -0
- package/dist/commons/events/SummaryConfig.d.ts +170 -0
- package/dist/commons/events/TemplateConfig.d.ts +38 -0
- package/dist/commons/events/TranslationConfig.d.ts +15 -0
- package/dist/commons/events/User.d.ts +45 -0
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +53 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +8997 -0
- package/dist/commons/events/deduplication.d.ts +32 -0
- package/dist/commons/events/defineConfig.d.ts +309 -0
- package/dist/commons/events/event.d.ts +109 -0
- package/dist/commons/events/field.d.ts +151 -0
- package/dist/commons/events/index.d.ts +46 -0
- package/dist/commons/events/locations.d.ts +24 -0
- package/dist/commons/events/scopes.d.ts +55 -0
- package/dist/commons/events/serializer.d.ts +2 -0
- package/dist/commons/events/state/availableActions.d.ts +6 -0
- package/dist/commons/events/state/flags.d.ts +4 -0
- package/dist/commons/events/state/index.d.ts +146 -0
- package/dist/commons/events/state/utils.d.ts +1263 -0
- package/dist/commons/events/test.utils.d.ts +473 -0
- package/dist/commons/events/transactions.d.ts +2 -0
- package/dist/commons/events/utils.d.ts +501 -0
- package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
- package/dist/commons/notification/UserNotifications.d.ts +632 -0
- package/dist/commons/notification/index.d.ts +2 -0
- package/dist/conditionals/index.d.ts +2 -0
- package/dist/conditionals/index.d.ts.map +1 -0
- package/dist/conditionals/index.js +491 -0
- package/dist/events/deduplication.d.ts +32 -0
- package/dist/events/deduplication.d.ts.map +1 -0
- package/dist/events/deduplication.js +67 -0
- package/dist/events/index.d.ts +2 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +8383 -0
- package/dist/notification/index.d.ts +2 -0
- package/dist/notification/index.d.ts.map +1 -0
- package/dist/notification/index.js +5928 -0
- package/dist/scopes/index.d.ts +335 -0
- package/dist/scopes/index.d.ts.map +1 -0
- package/dist/scopes/index.js +379 -0
- package/package.json +40 -0
- package/tsconfig.json +27 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Composite field value consists of multiple field values.
|
|
4
|
+
*/
|
|
5
|
+
export declare const GeographicalArea: {
|
|
6
|
+
readonly URBAN: "URBAN";
|
|
7
|
+
readonly RURAL: "RURAL";
|
|
8
|
+
};
|
|
9
|
+
export declare const AddressType: {
|
|
10
|
+
readonly DOMESTIC: "DOMESTIC";
|
|
11
|
+
readonly INTERNATIONAL: "INTERNATIONAL";
|
|
12
|
+
};
|
|
13
|
+
export declare const FileFieldValue: z.ZodObject<{
|
|
14
|
+
path: z.ZodEffects<z.ZodString, string, string>;
|
|
15
|
+
originalFilename: z.ZodString;
|
|
16
|
+
type: z.ZodString;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
type: string;
|
|
19
|
+
path: string;
|
|
20
|
+
originalFilename: string;
|
|
21
|
+
}, {
|
|
22
|
+
type: string;
|
|
23
|
+
path: string;
|
|
24
|
+
originalFilename: string;
|
|
25
|
+
}>;
|
|
26
|
+
export type FileFieldValue = z.infer<typeof FileFieldValue>;
|
|
27
|
+
export declare const NameFieldValue: z.ZodObject<{
|
|
28
|
+
firstname: z.ZodString;
|
|
29
|
+
surname: z.ZodString;
|
|
30
|
+
middlename: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
firstname: string;
|
|
33
|
+
surname: string;
|
|
34
|
+
middlename?: string | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
firstname: string;
|
|
37
|
+
surname: string;
|
|
38
|
+
middlename?: string | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
export declare const NameFieldUpdateValue: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
41
|
+
firstname: z.ZodString;
|
|
42
|
+
surname: z.ZodString;
|
|
43
|
+
middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
firstname: string;
|
|
46
|
+
surname: string;
|
|
47
|
+
middlename?: string | null | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
firstname: string;
|
|
50
|
+
surname: string;
|
|
51
|
+
middlename?: string | null | undefined;
|
|
52
|
+
}>, z.ZodNull]>, z.ZodUndefined]>;
|
|
53
|
+
export type NameFieldValue = z.infer<typeof NameFieldValue>;
|
|
54
|
+
export type NameFieldUpdateValue = z.infer<typeof NameFieldUpdateValue>;
|
|
55
|
+
export declare const StreetLevelDetailsValue: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
56
|
+
export declare const AddressFieldValue: z.ZodObject<{
|
|
57
|
+
country: z.ZodString;
|
|
58
|
+
addressType: z.ZodEnum<["DOMESTIC", "INTERNATIONAL"]>;
|
|
59
|
+
administrativeArea: z.ZodOptional<z.ZodString>;
|
|
60
|
+
streetLevelDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
country: string;
|
|
63
|
+
addressType: "DOMESTIC" | "INTERNATIONAL";
|
|
64
|
+
administrativeArea?: string | undefined;
|
|
65
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
country: string;
|
|
68
|
+
addressType: "DOMESTIC" | "INTERNATIONAL";
|
|
69
|
+
administrativeArea?: string | undefined;
|
|
70
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
71
|
+
}>;
|
|
72
|
+
export declare const StreetLevelDetailsUpdateValue: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
73
|
+
export declare const AddressFieldUpdateValue: z.ZodObject<{
|
|
74
|
+
country: z.ZodString;
|
|
75
|
+
addressType: z.ZodEnum<["DOMESTIC", "INTERNATIONAL"]>;
|
|
76
|
+
administrativeArea: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
77
|
+
streetLevelDetails: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
country: string;
|
|
80
|
+
addressType: "DOMESTIC" | "INTERNATIONAL";
|
|
81
|
+
administrativeArea?: string | null | undefined;
|
|
82
|
+
streetLevelDetails?: Record<string, string> | null | undefined;
|
|
83
|
+
}, {
|
|
84
|
+
country: string;
|
|
85
|
+
addressType: "DOMESTIC" | "INTERNATIONAL";
|
|
86
|
+
administrativeArea?: string | null | undefined;
|
|
87
|
+
streetLevelDetails?: Record<string, string> | null | undefined;
|
|
88
|
+
}>;
|
|
89
|
+
export type AddressFieldValue = z.infer<typeof AddressFieldValue>;
|
|
90
|
+
export declare const FileFieldValueWithOption: z.ZodObject<{
|
|
91
|
+
path: z.ZodEffects<z.ZodString, string, string>;
|
|
92
|
+
originalFilename: z.ZodString;
|
|
93
|
+
type: z.ZodString;
|
|
94
|
+
option: z.ZodString;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
type: string;
|
|
97
|
+
option: string;
|
|
98
|
+
path: string;
|
|
99
|
+
originalFilename: string;
|
|
100
|
+
}, {
|
|
101
|
+
type: string;
|
|
102
|
+
option: string;
|
|
103
|
+
path: string;
|
|
104
|
+
originalFilename: string;
|
|
105
|
+
}>;
|
|
106
|
+
export type FileFieldValueWithOption = z.infer<typeof FileFieldValueWithOption>;
|
|
107
|
+
export declare const FileFieldWithOptionValue: z.ZodArray<z.ZodObject<{
|
|
108
|
+
path: z.ZodEffects<z.ZodString, string, string>;
|
|
109
|
+
originalFilename: z.ZodString;
|
|
110
|
+
type: z.ZodString;
|
|
111
|
+
option: z.ZodString;
|
|
112
|
+
}, "strip", z.ZodTypeAny, {
|
|
113
|
+
type: string;
|
|
114
|
+
option: string;
|
|
115
|
+
path: string;
|
|
116
|
+
originalFilename: string;
|
|
117
|
+
}, {
|
|
118
|
+
type: string;
|
|
119
|
+
option: string;
|
|
120
|
+
path: string;
|
|
121
|
+
originalFilename: string;
|
|
122
|
+
}>, "many">;
|
|
123
|
+
export type FileFieldWithOptionValue = z.infer<typeof FileFieldWithOptionValue>;
|
|
124
|
+
export declare const HttpFieldValue: z.ZodObject<{
|
|
125
|
+
loading: z.ZodBoolean;
|
|
126
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
127
|
+
statusCode: z.ZodNumber;
|
|
128
|
+
message: z.ZodString;
|
|
129
|
+
}, "strip", z.ZodTypeAny, {
|
|
130
|
+
message: string;
|
|
131
|
+
statusCode: number;
|
|
132
|
+
}, {
|
|
133
|
+
message: string;
|
|
134
|
+
statusCode: number;
|
|
135
|
+
}>>>;
|
|
136
|
+
data: z.ZodAny;
|
|
137
|
+
}, "strip", z.ZodTypeAny, {
|
|
138
|
+
loading: boolean;
|
|
139
|
+
data?: any;
|
|
140
|
+
error?: {
|
|
141
|
+
message: string;
|
|
142
|
+
statusCode: number;
|
|
143
|
+
} | null | undefined;
|
|
144
|
+
}, {
|
|
145
|
+
loading: boolean;
|
|
146
|
+
data?: any;
|
|
147
|
+
error?: {
|
|
148
|
+
message: string;
|
|
149
|
+
statusCode: number;
|
|
150
|
+
} | null | undefined;
|
|
151
|
+
}>;
|
|
152
|
+
export type HttpFieldValue = z.infer<typeof HttpFieldValue>;
|
|
153
|
+
export declare const HttpFieldUpdateValue: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
154
|
+
loading: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
155
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
156
|
+
statusCode: z.ZodNumber;
|
|
157
|
+
message: z.ZodString;
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
159
|
+
message: string;
|
|
160
|
+
statusCode: number;
|
|
161
|
+
}, {
|
|
162
|
+
message: string;
|
|
163
|
+
statusCode: number;
|
|
164
|
+
}>>>;
|
|
165
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
166
|
+
}, "strip", z.ZodTypeAny, {
|
|
167
|
+
data?: any;
|
|
168
|
+
error?: {
|
|
169
|
+
message: string;
|
|
170
|
+
statusCode: number;
|
|
171
|
+
} | null | undefined;
|
|
172
|
+
loading?: boolean | null | undefined;
|
|
173
|
+
}, {
|
|
174
|
+
data?: any;
|
|
175
|
+
error?: {
|
|
176
|
+
message: string;
|
|
177
|
+
statusCode: number;
|
|
178
|
+
} | null | undefined;
|
|
179
|
+
loading?: boolean | null | undefined;
|
|
180
|
+
}>, z.ZodNull]>, z.ZodUndefined]>;
|
|
181
|
+
//# sourceMappingURL=CompositeFieldValue.d.ts.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { JSONSchema } from '../conditionals/conditionals';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const Conditional: z.ZodType<JSONSchema, z.ZodTypeDef, JSONSchema>;
|
|
4
|
+
/**
|
|
5
|
+
* By default, when conditionals are undefined, action is visible and enabled to everyone.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ConditionalType: {
|
|
8
|
+
readonly SHOW: "SHOW";
|
|
9
|
+
readonly ENABLE: "ENABLE";
|
|
10
|
+
readonly DISPLAY_ON_REVIEW: "DISPLAY_ON_REVIEW";
|
|
11
|
+
};
|
|
12
|
+
export type ConditionalType = (typeof ConditionalType)[keyof typeof ConditionalType];
|
|
13
|
+
export declare const ShowConditional: z.ZodObject<{
|
|
14
|
+
type: z.ZodLiteral<"SHOW">;
|
|
15
|
+
conditional: z.ZodType<JSONSchema, z.ZodTypeDef, JSONSchema>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
type: "SHOW";
|
|
18
|
+
conditional: JSONSchema;
|
|
19
|
+
}, {
|
|
20
|
+
type: "SHOW";
|
|
21
|
+
conditional: JSONSchema;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const EnableConditional: z.ZodObject<{
|
|
24
|
+
type: z.ZodLiteral<"ENABLE">;
|
|
25
|
+
conditional: z.ZodType<JSONSchema, z.ZodTypeDef, JSONSchema>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
type: "ENABLE";
|
|
28
|
+
conditional: JSONSchema;
|
|
29
|
+
}, {
|
|
30
|
+
type: "ENABLE";
|
|
31
|
+
conditional: JSONSchema;
|
|
32
|
+
}>;
|
|
33
|
+
/** @knipignore */
|
|
34
|
+
export type ActionConditionalType = typeof ShowConditional | typeof EnableConditional;
|
|
35
|
+
/** @knipignore */
|
|
36
|
+
export type InferredActionConditional = z.infer<typeof ShowConditional> | z.infer<typeof EnableConditional>;
|
|
37
|
+
export declare const ActionConditional: z.ZodDiscriminatedUnion<"type", ActionConditionalType[]>;
|
|
38
|
+
export type ActionConditional = InferredActionConditional;
|
|
39
|
+
export declare const DisplayOnReviewConditional: z.ZodObject<{
|
|
40
|
+
type: z.ZodLiteral<"DISPLAY_ON_REVIEW">;
|
|
41
|
+
conditional: z.ZodType<JSONSchema, z.ZodTypeDef, JSONSchema>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
type: "DISPLAY_ON_REVIEW";
|
|
44
|
+
conditional: JSONSchema;
|
|
45
|
+
}, {
|
|
46
|
+
type: "DISPLAY_ON_REVIEW";
|
|
47
|
+
conditional: JSONSchema;
|
|
48
|
+
}>;
|
|
49
|
+
/** @knipignore */
|
|
50
|
+
export type FieldConditionalType = typeof ShowConditional | typeof EnableConditional | typeof DisplayOnReviewConditional;
|
|
51
|
+
/** @knipignore */
|
|
52
|
+
export type InferredFieldConditional = z.infer<typeof ShowConditional> | z.infer<typeof EnableConditional> | z.infer<typeof DisplayOnReviewConditional>;
|
|
53
|
+
export declare const FieldConditional: z.ZodDiscriminatedUnion<"type", FieldConditionalType[]>;
|
|
54
|
+
export type FieldConditional = z.infer<typeof FieldConditional>;
|
|
55
|
+
//# sourceMappingURL=Conditional.d.ts.map
|