@opencrvs/toolkit 2.2.0-rc.045257f → 2.2.0-rc.25c3c81
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/build.sh +15 -2
- package/dist/application-config/index.js +16 -5
- package/dist/authentication/index.d.ts +1 -1
- package/dist/authentication/index.js +4 -8
- package/dist/cli.js +2197 -544
- package/dist/commons/api/router.d.ts +17 -4
- package/dist/commons/application-config/index.d.ts +1 -1
- package/dist/commons/conditionals/conditionals.d.ts +4 -4
- package/dist/commons/conditionals/validate.d.ts +1 -1
- package/dist/commons/events/ActionStatus.d.ts +2 -2
- package/dist/commons/events/ActionType.d.ts +2 -0
- package/dist/commons/events/AdvancedSearchConfig.d.ts +3 -0
- package/dist/commons/events/Draft.d.ts +34 -1
- package/dist/commons/events/EventConfig.d.ts +446 -0
- package/dist/commons/events/EventDocument.d.ts +2 -0
- package/dist/commons/events/EventIndex.d.ts +1 -0
- package/dist/commons/events/EventInput.d.ts +1 -0
- package/dist/commons/events/EventMetadata.d.ts +1 -0
- package/dist/commons/events/FieldTypeMapping.d.ts +19 -19
- package/dist/commons/events/PlainDate.d.ts +5 -0
- package/dist/commons/events/defineConfig.d.ts +7 -2
- package/dist/commons/events/event.d.ts +4 -1
- package/dist/commons/events/field.d.ts +5 -0
- package/dist/commons/events/locations.d.ts +1 -1
- package/dist/commons/events/scopes.d.ts +2 -1
- package/dist/commons/events/state/index.d.ts +1 -0
- package/dist/commons/events/test.utils.d.ts +59 -6
- package/dist/commons/events/utils.d.ts +28 -2
- package/dist/commons/users/Role.d.ts +23 -0
- package/dist/commons/users/User.d.ts +263 -0
- package/dist/commons/users/authentication.d.ts +67 -0
- package/dist/commons/users/index.d.ts +5 -0
- package/dist/commons/users/roleValidations.d.ts +15 -0
- package/dist/commons/users/scopes.d.ts +1402 -0
- package/dist/commons/users/userReferences.d.ts +176 -0
- package/dist/conditionals/index.js +3 -3
- package/dist/configurator/index.d.ts +24 -0
- package/dist/configurator/index.d.ts.map +1 -0
- package/dist/configurator/index.js +161 -0
- package/dist/configurator/layout.d.ts +28 -0
- package/dist/configurator/layout.d.ts.map +1 -0
- package/dist/configurator/layout.js +78 -0
- package/dist/configurator/paths.d.ts +13 -0
- package/dist/configurator/paths.d.ts.map +1 -0
- package/dist/configurator/paths.js +48 -0
- package/dist/configurator/server/environments.d.ts +20 -0
- package/dist/configurator/server/environments.d.ts.map +1 -0
- package/dist/configurator/server/environments.js +143 -0
- package/dist/configurator/server/files.d.ts +11 -0
- package/dist/configurator/server/files.d.ts.map +1 -0
- package/dist/configurator/server/files.js +67 -0
- package/dist/configurator/server/github.d.ts +56 -0
- package/dist/configurator/server/github.d.ts.map +1 -0
- package/dist/configurator/server/github.js +239 -0
- package/dist/configurator/server/plugin.d.ts +39 -0
- package/dist/configurator/server/plugin.d.ts.map +1 -0
- package/dist/configurator/server/plugin.js +298 -0
- package/dist/configurator/server/seal.d.ts +2 -0
- package/dist/configurator/server/seal.d.ts.map +1 -0
- package/dist/configurator/server/seal.js +36 -0
- package/dist/configurator/server/sshKeys.d.ts +5 -0
- package/dist/configurator/server/sshKeys.d.ts.map +1 -0
- package/dist/configurator/server/sshKeys.js +28 -0
- package/dist/configurator/server/start.d.ts +12 -0
- package/dist/configurator/server/start.d.ts.map +1 -0
- package/dist/configurator/server/start.js +91 -0
- package/dist/configurator/testing.d.ts +11 -0
- package/dist/configurator/testing.d.ts.map +1 -0
- package/dist/configurator/testing.js +74 -0
- package/dist/configurator/ui/bindings/bindings.d.ts +35 -0
- package/dist/configurator/ui/bindings/bindings.d.ts.map +1 -0
- package/dist/configurator/ui/bindings/bindings.js +5 -0
- package/dist/configurator/ui/bindings/parsers.d.ts +7 -0
- package/dist/configurator/ui/bindings/parsers.d.ts.map +1 -0
- package/dist/configurator/ui/bindings/parsers.js +85 -0
- package/dist/configurator/ui/form/users.d.ts +11 -0
- package/dist/configurator/ui/form/users.d.ts.map +1 -0
- package/dist/configurator/ui/form/users.js +33 -0
- package/dist/configurator/ui/plan/dependencyHosts.d.ts +2 -0
- package/dist/configurator/ui/plan/dependencyHosts.d.ts.map +1 -0
- package/dist/configurator/ui/plan/dependencyHosts.js +36 -0
- package/dist/configurator/ui/plan/templateValues.d.ts +11 -0
- package/dist/configurator/ui/plan/templateValues.d.ts.map +1 -0
- package/dist/configurator/ui/plan/templateValues.js +70 -0
- package/dist/configurator/workflows.d.ts +53 -0
- package/dist/configurator/workflows.d.ts.map +1 -0
- package/dist/configurator/workflows.js +161 -0
- package/dist/configurator-assets/forms/bindings.yml +263 -0
- package/dist/configurator-assets/templates/README.md +18 -0
- package/dist/configurator-assets/templates/charts-values/dependencies/values.override.yaml +4 -0
- package/dist/configurator-assets/templates/charts-values/dependencies/values.yaml +99 -0
- package/dist/configurator-assets/templates/charts-values/opencrvs-services/values.override.yaml +4 -0
- package/dist/configurator-assets/templates/charts-values/opencrvs-services/values.yaml +83 -0
- package/dist/configurator-assets/templates/charts-values/opentelemetry/values.yaml +102 -0
- package/dist/configurator-assets/templates/charts-values/traefik/values.override.yaml +4 -0
- package/dist/configurator-assets/templates/charts-values/traefik/values.yaml +130 -0
- package/dist/configurator-assets/templates/inventory/inventory.template.yml +98 -0
- package/dist/configurator-assets/ui/apple-touch-icon.png +0 -0
- package/dist/configurator-assets/ui/assets/index-Bf3eC7uO.js +169 -0
- package/dist/configurator-assets/ui/assets/index-CaqYFJUk.css +6 -0
- package/dist/configurator-assets/ui/assets/opencrvs-logo-sIjz08HT.svg +1 -0
- package/dist/configurator-assets/ui/assets/poppins-400-BwTUGeWf.woff2 +0 -0
- package/dist/configurator-assets/ui/assets/poppins-500-CWICHMj6.woff2 +0 -0
- package/dist/configurator-assets/ui/assets/poppins-600-DJVo7c07.woff2 +0 -0
- package/dist/configurator-assets/ui/assets/poppins-700-g9MkRaG0.woff2 +0 -0
- package/dist/configurator-assets/ui/favicon-32x32.png +0 -0
- package/dist/configurator-assets/ui/index.html +25 -0
- package/dist/environment/custom-types.d.ts +1 -0
- package/dist/environment/custom-types.d.ts.map +1 -1
- package/dist/environment/derived-variables.d.ts +8 -0
- package/dist/environment/derived-variables.d.ts.map +1 -1
- package/dist/environment/derived-variables.js +9 -0
- package/dist/environment/questions.d.ts +42 -9
- package/dist/environment/questions.d.ts.map +1 -1
- package/dist/environment/questions.js +70 -47
- package/dist/environment/registry.d.ts +15 -0
- package/dist/environment/registry.d.ts.map +1 -0
- package/dist/environment/registry.js +112 -0
- package/dist/environment/setup-environment.d.ts.map +1 -1
- package/dist/environment/setup-environment.js +104 -23
- package/dist/events/index.js +635 -149
- package/dist/migrations/add-notify-config.d.ts +40 -0
- package/dist/migrations/add-notify-config.d.ts.map +1 -0
- package/dist/migrations/add-notify-config.js +249 -0
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +602 -143
- package/dist/migrations/move-declaration-to-declare-action.d.ts.map +1 -1
- package/dist/migrations/move-declaration-to-declare-action.js +27 -144
- package/dist/migrations/read-declaration-through-helper.d.ts.map +1 -1
- package/dist/migrations/read-declaration-through-helper.js +3 -61
- package/dist/migrations/resolve-versioned-event-config.d.ts +56 -0
- package/dist/migrations/resolve-versioned-event-config.d.ts.map +1 -0
- package/dist/migrations/resolve-versioned-event-config.js +353 -0
- package/dist/migrations/utils.d.ts +61 -0
- package/dist/migrations/utils.d.ts.map +1 -0
- package/dist/migrations/utils.js +218 -0
- package/dist/notification/index.js +616 -66
- package/dist/roles/index.d.ts +2 -0
- package/dist/roles/index.d.ts.map +1 -0
- package/dist/roles/index.js +730 -0
- package/dist/scopes/index.d.ts +0 -10
- package/dist/scopes/index.js +3 -7
- package/dist/templates/charts-values/dependencies/values.yaml +4 -1
- package/dist/templates/charts-values/opencrvs-services/values.yaml +2 -2
- package/dist/verify/endpoints.d.ts +11 -0
- package/dist/verify/endpoints.d.ts.map +1 -1
- package/dist/verify/endpoints.js +21 -27
- package/opencrvs-toolkit-2.2.0-rc.25c3c81.tgz +0 -0
- package/package.json +16 -3
- package/tsconfig.build.json +11 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/tsconfig.json +15 -6
- package/dist/environment/dockerhub.d.ts +0 -15
- package/dist/environment/dockerhub.d.ts.map +0 -1
- package/dist/environment/dockerhub.js +0 -104
- package/opencrvs-toolkit-2.2.0-rc.045257f.tgz +0 -0
|
@@ -9,6 +9,7 @@ import { FlagConfig } from './Flag';
|
|
|
9
9
|
import type { JSONSchema } from '../conditionals/conditionals';
|
|
10
10
|
import { AvailableIcons } from '../icons';
|
|
11
11
|
import { ActionType } from './ActionType';
|
|
12
|
+
import { PlainDate } from './PlainDate';
|
|
12
13
|
export declare const EventFieldReference: z.ZodObject<{
|
|
13
14
|
$$event: z.ZodEnum<{
|
|
14
15
|
createdAt: "createdAt";
|
|
@@ -65,6 +66,451 @@ export type EventConfigInput = Omit<EventConfigSchemaInput, 'actions'> & {
|
|
|
65
66
|
declaration?: DeclarationFormConfigInput;
|
|
66
67
|
})>;
|
|
67
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* Input accepted by `defineConfig` for one version of an event.
|
|
71
|
+
* `declaration` lives only on the DECLARE action.
|
|
72
|
+
*/
|
|
73
|
+
export type EventConfigVersionInput = Omit<EventConfigSchemaInput, EventLevelField> & {
|
|
74
|
+
/** Identifier of the version, unique within the event (e.g. "birth-v2"). */
|
|
75
|
+
id: string;
|
|
76
|
+
/** Name of the version, which the UI shows wherever it names the version. For example, `{event.configVersionLabel}` in the event summary. */
|
|
77
|
+
label: TranslationConfig;
|
|
78
|
+
/** Date (YYYY-MM-DD) from which this version is effective. Without one, effective from the beginning of time. */
|
|
79
|
+
effectiveFrom?: string;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Input accepted by `defineConfig` for an event with several versions.
|
|
83
|
+
* `id`, `label` and `advancedSearch` are shared by every version.
|
|
84
|
+
*/
|
|
85
|
+
export type VersionedEventConfigInput = Pick<EventConfigInput, EventLevelField> & {
|
|
86
|
+
versions: EventConfigVersionInput[];
|
|
87
|
+
};
|
|
88
|
+
/** Fields shared by every version of an event. */
|
|
89
|
+
declare const eventLevelFields: {
|
|
90
|
+
id: z.ZodString;
|
|
91
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
92
|
+
advancedSearch: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
93
|
+
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
94
|
+
fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
95
|
+
config: z.ZodObject<{
|
|
96
|
+
type: z.ZodEnum<{
|
|
97
|
+
exact: "exact";
|
|
98
|
+
fuzzy: "fuzzy";
|
|
99
|
+
range: "range";
|
|
100
|
+
within: "within";
|
|
101
|
+
}>;
|
|
102
|
+
searchFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
105
|
+
readonly NAME: 'NAME';
|
|
106
|
+
readonly PHONE: 'PHONE';
|
|
107
|
+
readonly ID: 'ID';
|
|
108
|
+
readonly ADDRESS: 'ADDRESS';
|
|
109
|
+
readonly TEXT: 'TEXT';
|
|
110
|
+
readonly NUMBER: 'NUMBER';
|
|
111
|
+
readonly NUMBER_WITH_UNIT: 'NUMBER_WITH_UNIT';
|
|
112
|
+
readonly TEXTAREA: 'TEXTAREA';
|
|
113
|
+
readonly EMAIL: 'EMAIL';
|
|
114
|
+
readonly DATE: 'DATE';
|
|
115
|
+
readonly AGE: 'AGE';
|
|
116
|
+
readonly DATE_RANGE: 'DATE_RANGE';
|
|
117
|
+
readonly SELECT_DATE_RANGE: 'SELECT_DATE_RANGE';
|
|
118
|
+
readonly TIME: 'TIME';
|
|
119
|
+
readonly IMAGE_VIEW: 'IMAGE_VIEW';
|
|
120
|
+
readonly PARAGRAPH: 'PARAGRAPH';
|
|
121
|
+
readonly HEADING: 'HEADING';
|
|
122
|
+
readonly PAGE_HEADER: 'PAGE_HEADER';
|
|
123
|
+
readonly RADIO_GROUP: 'RADIO_GROUP';
|
|
124
|
+
readonly FIELD_GROUP: 'FIELD_GROUP';
|
|
125
|
+
readonly FILE: 'FILE';
|
|
126
|
+
readonly FILE_WITH_OPTIONS: 'FILE_WITH_OPTIONS';
|
|
127
|
+
readonly BULLET_LIST: 'BULLET_LIST';
|
|
128
|
+
readonly CHECKBOX: 'CHECKBOX';
|
|
129
|
+
readonly SELECT: 'SELECT';
|
|
130
|
+
readonly COUNTRY: 'COUNTRY';
|
|
131
|
+
readonly LOCATION: 'LOCATION';
|
|
132
|
+
readonly DIVIDER: 'DIVIDER';
|
|
133
|
+
readonly ADMINISTRATIVE_AREA: 'ADMINISTRATIVE_AREA';
|
|
134
|
+
readonly FACILITY: 'FACILITY';
|
|
135
|
+
readonly OFFICE: 'OFFICE';
|
|
136
|
+
readonly SIGNATURE: 'SIGNATURE';
|
|
137
|
+
readonly DATA: 'DATA';
|
|
138
|
+
readonly BUTTON: 'BUTTON';
|
|
139
|
+
readonly AUTOCOMPLETE: 'AUTOCOMPLETE';
|
|
140
|
+
readonly SEARCH: 'SEARCH';
|
|
141
|
+
readonly ALPHA_PRINT_BUTTON: 'ALPHA_PRINT_BUTTON';
|
|
142
|
+
readonly HTTP: 'HTTP';
|
|
143
|
+
readonly LINK_BUTTON: 'LINK_BUTTON';
|
|
144
|
+
readonly VERIFICATION_STATUS: 'VERIFICATION_STATUS';
|
|
145
|
+
readonly QUERY_PARAM_READER: 'QUERY_PARAM_READER';
|
|
146
|
+
readonly QR_READER: 'QR_READER';
|
|
147
|
+
readonly ID_READER: 'ID_READER';
|
|
148
|
+
readonly LOADER: 'LOADER';
|
|
149
|
+
readonly ALPHA_HIDDEN: 'ALPHA_HIDDEN';
|
|
150
|
+
readonly USER_ROLE: 'USER_ROLE';
|
|
151
|
+
readonly _EXPERIMENTAL_CUSTOM: 'CUSTOM';
|
|
152
|
+
}>>;
|
|
153
|
+
label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
|
|
154
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
155
|
+
value: z.ZodString;
|
|
156
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>]>;
|
|
157
|
+
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
158
|
+
type: z.ZodLiteral<"SHOW">;
|
|
159
|
+
conditional: z.ZodAny;
|
|
160
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
161
|
+
type: z.ZodLiteral<"ENABLE">;
|
|
162
|
+
conditional: z.ZodAny;
|
|
163
|
+
}, z.core.$strip>], "type">>>>;
|
|
164
|
+
}, z.core.$strip>>>;
|
|
165
|
+
searchCriteriaLabelPrefix: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
|
|
166
|
+
conditionals: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
167
|
+
type: z.ZodLiteral<"SHOW">;
|
|
168
|
+
conditional: z.ZodAny;
|
|
169
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
170
|
+
type: z.ZodLiteral<"ENABLE">;
|
|
171
|
+
conditional: z.ZodAny;
|
|
172
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
173
|
+
type: z.ZodLiteral<"DISPLAY_ON_REVIEW">;
|
|
174
|
+
conditional: z.ZodAny;
|
|
175
|
+
}, z.core.$strip>], "type">>>;
|
|
176
|
+
validations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
177
|
+
validator: z.ZodAny;
|
|
178
|
+
message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
179
|
+
}, z.core.$strip>>>;
|
|
180
|
+
allowedLocations: z.ZodOptional<z.ZodObject<{
|
|
181
|
+
$jurisdiction: z.ZodUnion<[z.ZodEnum<{
|
|
182
|
+
administrativeArea: "administrativeArea";
|
|
183
|
+
all: "all";
|
|
184
|
+
location: "location";
|
|
185
|
+
}>, z.ZodObject<{
|
|
186
|
+
$scope: z.ZodEnum<{
|
|
187
|
+
"attachment.upload": "attachment.upload";
|
|
188
|
+
bypassratelimit: "bypassratelimit";
|
|
189
|
+
"config.update-all": "config.update-all";
|
|
190
|
+
"dashboard.view": "dashboard.view";
|
|
191
|
+
"integration.audit.read": "integration.audit.read";
|
|
192
|
+
"integration.create": "integration.create";
|
|
193
|
+
"location.edit": "location.edit";
|
|
194
|
+
"organisation.read-locations": "organisation.read-locations";
|
|
195
|
+
"performance.read": "performance.read";
|
|
196
|
+
"performance.read-dashboards": "performance.read-dashboards";
|
|
197
|
+
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
198
|
+
"profile.electronic-signature": "profile.electronic-signature";
|
|
199
|
+
"record.action.accept": "record.action.accept";
|
|
200
|
+
"record.action.reject": "record.action.reject";
|
|
201
|
+
"record.archive": "record.archive";
|
|
202
|
+
"record.correct": "record.correct";
|
|
203
|
+
"record.create": "record.create";
|
|
204
|
+
"record.custom-action": "record.custom-action";
|
|
205
|
+
"record.declare": "record.declare";
|
|
206
|
+
"record.edit": "record.edit";
|
|
207
|
+
"record.import": "record.import";
|
|
208
|
+
"record.notify": "record.notify";
|
|
209
|
+
"record.print-certified-copies": "record.print-certified-copies";
|
|
210
|
+
"record.read": "record.read";
|
|
211
|
+
"record.register": "record.register";
|
|
212
|
+
"record.reindex": "record.reindex";
|
|
213
|
+
"record.reinstate-registration": "record.reinstate-registration";
|
|
214
|
+
"record.reject": "record.reject";
|
|
215
|
+
"record.request-correction": "record.request-correction";
|
|
216
|
+
"record.review-duplicates": "record.review-duplicates";
|
|
217
|
+
"record.revoke-registration": "record.revoke-registration";
|
|
218
|
+
"record.search": "record.search";
|
|
219
|
+
"record.unarchive": "record.unarchive";
|
|
220
|
+
"record.unassign-others": "record.unassign-others";
|
|
221
|
+
"user.create": "user.create";
|
|
222
|
+
"user.data-seeding": "user.data-seeding";
|
|
223
|
+
"user.edit": "user.edit";
|
|
224
|
+
"user.read": "user.read";
|
|
225
|
+
"user.read-only-my-audit": "user.read-only-my-audit";
|
|
226
|
+
"user.search": "user.search";
|
|
227
|
+
workqueue: "workqueue";
|
|
228
|
+
}>;
|
|
229
|
+
$option: z.ZodEnum<{
|
|
230
|
+
accessLevel: "accessLevel";
|
|
231
|
+
createdBy: "createdBy";
|
|
232
|
+
createdIn: "createdIn";
|
|
233
|
+
declaredBy: "declaredBy";
|
|
234
|
+
declaredIn: "declaredIn";
|
|
235
|
+
event: "event";
|
|
236
|
+
flags: "flags";
|
|
237
|
+
ids: "ids";
|
|
238
|
+
notifiedBy: "notifiedBy";
|
|
239
|
+
notifiedIn: "notifiedIn";
|
|
240
|
+
placeOfEvent: "placeOfEvent";
|
|
241
|
+
registeredBy: "registeredBy";
|
|
242
|
+
registeredIn: "registeredIn";
|
|
243
|
+
role: "role";
|
|
244
|
+
status: "status";
|
|
245
|
+
}>;
|
|
246
|
+
}, z.core.$strip>]>;
|
|
247
|
+
}, z.core.$strip>>;
|
|
248
|
+
fieldId: z.ZodString;
|
|
249
|
+
fieldType: z.ZodLiteral<"field">;
|
|
250
|
+
defaultValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodNumber]>>;
|
|
251
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
252
|
+
config: z.ZodObject<{
|
|
253
|
+
type: z.ZodEnum<{
|
|
254
|
+
exact: "exact";
|
|
255
|
+
fuzzy: "fuzzy";
|
|
256
|
+
range: "range";
|
|
257
|
+
within: "within";
|
|
258
|
+
}>;
|
|
259
|
+
searchFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
260
|
+
}, z.core.$strip>;
|
|
261
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
262
|
+
readonly NAME: 'NAME';
|
|
263
|
+
readonly PHONE: 'PHONE';
|
|
264
|
+
readonly ID: 'ID';
|
|
265
|
+
readonly ADDRESS: 'ADDRESS';
|
|
266
|
+
readonly TEXT: 'TEXT';
|
|
267
|
+
readonly NUMBER: 'NUMBER';
|
|
268
|
+
readonly NUMBER_WITH_UNIT: 'NUMBER_WITH_UNIT';
|
|
269
|
+
readonly TEXTAREA: 'TEXTAREA';
|
|
270
|
+
readonly EMAIL: 'EMAIL';
|
|
271
|
+
readonly DATE: 'DATE';
|
|
272
|
+
readonly AGE: 'AGE';
|
|
273
|
+
readonly DATE_RANGE: 'DATE_RANGE';
|
|
274
|
+
readonly SELECT_DATE_RANGE: 'SELECT_DATE_RANGE';
|
|
275
|
+
readonly TIME: 'TIME';
|
|
276
|
+
readonly IMAGE_VIEW: 'IMAGE_VIEW';
|
|
277
|
+
readonly PARAGRAPH: 'PARAGRAPH';
|
|
278
|
+
readonly HEADING: 'HEADING';
|
|
279
|
+
readonly PAGE_HEADER: 'PAGE_HEADER';
|
|
280
|
+
readonly RADIO_GROUP: 'RADIO_GROUP';
|
|
281
|
+
readonly FIELD_GROUP: 'FIELD_GROUP';
|
|
282
|
+
readonly FILE: 'FILE';
|
|
283
|
+
readonly FILE_WITH_OPTIONS: 'FILE_WITH_OPTIONS';
|
|
284
|
+
readonly BULLET_LIST: 'BULLET_LIST';
|
|
285
|
+
readonly CHECKBOX: 'CHECKBOX';
|
|
286
|
+
readonly SELECT: 'SELECT';
|
|
287
|
+
readonly COUNTRY: 'COUNTRY';
|
|
288
|
+
readonly LOCATION: 'LOCATION';
|
|
289
|
+
readonly DIVIDER: 'DIVIDER';
|
|
290
|
+
readonly ADMINISTRATIVE_AREA: 'ADMINISTRATIVE_AREA';
|
|
291
|
+
readonly FACILITY: 'FACILITY';
|
|
292
|
+
readonly OFFICE: 'OFFICE';
|
|
293
|
+
readonly SIGNATURE: 'SIGNATURE';
|
|
294
|
+
readonly DATA: 'DATA';
|
|
295
|
+
readonly BUTTON: 'BUTTON';
|
|
296
|
+
readonly AUTOCOMPLETE: 'AUTOCOMPLETE';
|
|
297
|
+
readonly SEARCH: 'SEARCH';
|
|
298
|
+
readonly ALPHA_PRINT_BUTTON: 'ALPHA_PRINT_BUTTON';
|
|
299
|
+
readonly HTTP: 'HTTP';
|
|
300
|
+
readonly LINK_BUTTON: 'LINK_BUTTON';
|
|
301
|
+
readonly VERIFICATION_STATUS: 'VERIFICATION_STATUS';
|
|
302
|
+
readonly QUERY_PARAM_READER: 'QUERY_PARAM_READER';
|
|
303
|
+
readonly QR_READER: 'QR_READER';
|
|
304
|
+
readonly ID_READER: 'ID_READER';
|
|
305
|
+
readonly LOADER: 'LOADER';
|
|
306
|
+
readonly ALPHA_HIDDEN: 'ALPHA_HIDDEN';
|
|
307
|
+
readonly USER_ROLE: 'USER_ROLE';
|
|
308
|
+
readonly _EXPERIMENTAL_CUSTOM: 'CUSTOM';
|
|
309
|
+
}>>;
|
|
310
|
+
label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
|
|
311
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
312
|
+
value: z.ZodString;
|
|
313
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>]>;
|
|
314
|
+
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
315
|
+
type: z.ZodLiteral<"SHOW">;
|
|
316
|
+
conditional: z.ZodAny;
|
|
317
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
318
|
+
type: z.ZodLiteral<"ENABLE">;
|
|
319
|
+
conditional: z.ZodAny;
|
|
320
|
+
}, z.core.$strip>], "type">>>>;
|
|
321
|
+
}, z.core.$strip>>>;
|
|
322
|
+
searchCriteriaLabelPrefix: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
|
|
323
|
+
conditionals: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
324
|
+
type: z.ZodLiteral<"SHOW">;
|
|
325
|
+
conditional: z.ZodAny;
|
|
326
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
327
|
+
type: z.ZodLiteral<"ENABLE">;
|
|
328
|
+
conditional: z.ZodAny;
|
|
329
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
330
|
+
type: z.ZodLiteral<"DISPLAY_ON_REVIEW">;
|
|
331
|
+
conditional: z.ZodAny;
|
|
332
|
+
}, z.core.$strip>], "type">>>;
|
|
333
|
+
validations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
334
|
+
validator: z.ZodAny;
|
|
335
|
+
message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
336
|
+
}, z.core.$strip>>>;
|
|
337
|
+
allowedLocations: z.ZodOptional<z.ZodObject<{
|
|
338
|
+
$jurisdiction: z.ZodUnion<[z.ZodEnum<{
|
|
339
|
+
administrativeArea: "administrativeArea";
|
|
340
|
+
all: "all";
|
|
341
|
+
location: "location";
|
|
342
|
+
}>, z.ZodObject<{
|
|
343
|
+
$scope: z.ZodEnum<{
|
|
344
|
+
"attachment.upload": "attachment.upload";
|
|
345
|
+
bypassratelimit: "bypassratelimit";
|
|
346
|
+
"config.update-all": "config.update-all";
|
|
347
|
+
"dashboard.view": "dashboard.view";
|
|
348
|
+
"integration.audit.read": "integration.audit.read";
|
|
349
|
+
"integration.create": "integration.create";
|
|
350
|
+
"location.edit": "location.edit";
|
|
351
|
+
"organisation.read-locations": "organisation.read-locations";
|
|
352
|
+
"performance.read": "performance.read";
|
|
353
|
+
"performance.read-dashboards": "performance.read-dashboards";
|
|
354
|
+
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
355
|
+
"profile.electronic-signature": "profile.electronic-signature";
|
|
356
|
+
"record.action.accept": "record.action.accept";
|
|
357
|
+
"record.action.reject": "record.action.reject";
|
|
358
|
+
"record.archive": "record.archive";
|
|
359
|
+
"record.correct": "record.correct";
|
|
360
|
+
"record.create": "record.create";
|
|
361
|
+
"record.custom-action": "record.custom-action";
|
|
362
|
+
"record.declare": "record.declare";
|
|
363
|
+
"record.edit": "record.edit";
|
|
364
|
+
"record.import": "record.import";
|
|
365
|
+
"record.notify": "record.notify";
|
|
366
|
+
"record.print-certified-copies": "record.print-certified-copies";
|
|
367
|
+
"record.read": "record.read";
|
|
368
|
+
"record.register": "record.register";
|
|
369
|
+
"record.reindex": "record.reindex";
|
|
370
|
+
"record.reinstate-registration": "record.reinstate-registration";
|
|
371
|
+
"record.reject": "record.reject";
|
|
372
|
+
"record.request-correction": "record.request-correction";
|
|
373
|
+
"record.review-duplicates": "record.review-duplicates";
|
|
374
|
+
"record.revoke-registration": "record.revoke-registration";
|
|
375
|
+
"record.search": "record.search";
|
|
376
|
+
"record.unarchive": "record.unarchive";
|
|
377
|
+
"record.unassign-others": "record.unassign-others";
|
|
378
|
+
"user.create": "user.create";
|
|
379
|
+
"user.data-seeding": "user.data-seeding";
|
|
380
|
+
"user.edit": "user.edit";
|
|
381
|
+
"user.read": "user.read";
|
|
382
|
+
"user.read-only-my-audit": "user.read-only-my-audit";
|
|
383
|
+
"user.search": "user.search";
|
|
384
|
+
workqueue: "workqueue";
|
|
385
|
+
}>;
|
|
386
|
+
$option: z.ZodEnum<{
|
|
387
|
+
accessLevel: "accessLevel";
|
|
388
|
+
createdBy: "createdBy";
|
|
389
|
+
createdIn: "createdIn";
|
|
390
|
+
declaredBy: "declaredBy";
|
|
391
|
+
declaredIn: "declaredIn";
|
|
392
|
+
event: "event";
|
|
393
|
+
flags: "flags";
|
|
394
|
+
ids: "ids";
|
|
395
|
+
notifiedBy: "notifiedBy";
|
|
396
|
+
notifiedIn: "notifiedIn";
|
|
397
|
+
placeOfEvent: "placeOfEvent";
|
|
398
|
+
registeredBy: "registeredBy";
|
|
399
|
+
registeredIn: "registeredIn";
|
|
400
|
+
role: "role";
|
|
401
|
+
status: "status";
|
|
402
|
+
}>;
|
|
403
|
+
}, z.core.$strip>]>;
|
|
404
|
+
}, z.core.$strip>>;
|
|
405
|
+
fieldId: z.ZodEnum<{
|
|
406
|
+
"event.legalStatuses.REGISTERED.acceptedAt": "event.legalStatuses.REGISTERED.acceptedAt";
|
|
407
|
+
"event.legalStatuses.REGISTERED.createdAtLocation": "event.legalStatuses.REGISTERED.createdAtLocation";
|
|
408
|
+
"event.legalStatuses.REGISTERED.registrationNumber": "event.legalStatuses.REGISTERED.registrationNumber";
|
|
409
|
+
"event.status": "event.status";
|
|
410
|
+
"event.trackingId": "event.trackingId";
|
|
411
|
+
"event.updatedAt": "event.updatedAt";
|
|
412
|
+
}>;
|
|
413
|
+
fieldType: z.ZodLiteral<"event">;
|
|
414
|
+
}, z.core.$strip>], "fieldType">>;
|
|
415
|
+
}, z.core.$strip>>>>;
|
|
416
|
+
};
|
|
417
|
+
/** Validations of one version of an event, read together with the fields shared by every version. */
|
|
418
|
+
export declare function validateEventConfig(event: EventConfig, ctx: z.RefinementCtx<EventConfig>): void;
|
|
68
419
|
export declare const EventConfig: z.ZodType<EventConfig, EventConfigSchemaInput>;
|
|
420
|
+
type EventLevelField = keyof typeof eventLevelFields;
|
|
421
|
+
/**
|
|
422
|
+
* Id of the version of an event configured without `versions`, i.e. the configuration
|
|
423
|
+
* before versioning. Records created before versioning are stamped with it.
|
|
424
|
+
*/
|
|
425
|
+
export declare const INITIAL_EVENT_CONFIG_VERSION_ID = "initial";
|
|
426
|
+
/** `effectiveFrom` of a version configured without one. */
|
|
427
|
+
export declare const DEFAULT_EFFECTIVE_FROM = "0001-01-01";
|
|
428
|
+
/** One version of an event: what the event looks like from `effectiveFrom` on. */
|
|
429
|
+
export type EventConfigVersion = Omit<EventConfig, EventLevelField> & {
|
|
430
|
+
id: string;
|
|
431
|
+
/** Name of the version. A version configured without `versions` has the label of the event. */
|
|
432
|
+
label: TranslationConfig;
|
|
433
|
+
/** Date (YYYY-MM-DD) from which this version is effective. '0001-01-01' when configured without one. */
|
|
434
|
+
effectiveFrom: string;
|
|
435
|
+
};
|
|
436
|
+
/**
|
|
437
|
+
* An event with every version of its configuration. This is what country config serves.
|
|
438
|
+
* Read it through `resolveEventConfig`, which gives the configuration of one version.
|
|
439
|
+
*/
|
|
440
|
+
export type VersionedEventConfig = Pick<EventConfig, EventLevelField> & {
|
|
441
|
+
versions: EventConfigVersion[];
|
|
442
|
+
};
|
|
443
|
+
/**
|
|
444
|
+
* @returns the configuration of `version`, together with the fields shared by every
|
|
445
|
+
* version of the event. The same event and version give the same object, so caches
|
|
446
|
+
* keyed on the configuration keep working.
|
|
447
|
+
*/
|
|
448
|
+
export declare function toEventConfig(config: VersionedEventConfig, version: EventConfigVersion): EventConfig;
|
|
449
|
+
/** @returns the version with id `versionId`, or undefined when it is not configured. */
|
|
450
|
+
export declare function findConfigVersion(config: VersionedEventConfig, versionId: string): EventConfigVersion | undefined;
|
|
451
|
+
/**
|
|
452
|
+
* @returns the version with id `versionId`.
|
|
453
|
+
* @throws when that version is not configured.
|
|
454
|
+
*/
|
|
455
|
+
export declare function getConfigVersion(config: VersionedEventConfig, versionId: string): EventConfigVersion;
|
|
456
|
+
/**
|
|
457
|
+
* @returns the configuration of the version with id `versionId`.
|
|
458
|
+
* @throws when the version is not configured.
|
|
459
|
+
*/
|
|
460
|
+
export declare function getEventConfigOfVersion(config: VersionedEventConfig, versionId: string): EventConfig;
|
|
461
|
+
/** Orders versions by `effectiveFrom`, earliest first. */
|
|
462
|
+
export declare function byEffectiveFrom(a: EventConfigVersion, b: EventConfigVersion): number;
|
|
463
|
+
/**
|
|
464
|
+
* @returns the versions that took effect on or before the date of `now` in `timeZone`,
|
|
465
|
+
* the country's time zone.
|
|
466
|
+
* Earliest first, so the last one is the version in effect at `now`.
|
|
467
|
+
*/
|
|
468
|
+
export declare function getVersionsInEffect(config: VersionedEventConfig, now: Date, timeZone: string): EventConfigVersion[];
|
|
469
|
+
/**
|
|
470
|
+
* @returns the version in effect at `now`: the one with the latest `effectiveFrom` not
|
|
471
|
+
* after the date of `now` in `timeZone`, the country's time zone, since versions take
|
|
472
|
+
* effect at its midnight. Undefined when every version takes effect later.
|
|
473
|
+
*/
|
|
474
|
+
export declare function resolveEffectiveVersion(config: VersionedEventConfig, now: Date, timeZone: string): EventConfigVersion | undefined;
|
|
475
|
+
/**
|
|
476
|
+
* @returns the configuration of the version a record is stamped with, like
|
|
477
|
+
* `getEventConfigForRecord`, or undefined when that version is not configured.
|
|
478
|
+
*/
|
|
479
|
+
export declare function findEventConfigForRecord(config: VersionedEventConfig, record: {
|
|
480
|
+
configVersionId: string;
|
|
481
|
+
}): EventConfig | undefined;
|
|
482
|
+
/**
|
|
483
|
+
* @returns the configuration of the version a record is stamped with.
|
|
484
|
+
* @throws when the record's version is no longer configured.
|
|
485
|
+
*/
|
|
486
|
+
export declare function getEventConfigForRecord(config: VersionedEventConfig, record: {
|
|
487
|
+
configVersionId: string;
|
|
488
|
+
}): EventConfig;
|
|
489
|
+
/**
|
|
490
|
+
* @returns the configuration of the version in effect on `date`, a date in the
|
|
491
|
+
* country's time zone. For a record, use `getEventConfigForRecord` instead.
|
|
492
|
+
* @throws when no version is in effect on that date, which `defineConfig` rules out.
|
|
493
|
+
*/
|
|
494
|
+
export declare function resolveEventConfigOnDate(config: VersionedEventConfig, date: PlainDate): EventConfig;
|
|
495
|
+
/**
|
|
496
|
+
* @returns the configuration of the version in effect on the date of `now` (today by
|
|
497
|
+
* default) in `timeZone`, the country's time zone. For a record, use
|
|
498
|
+
* `getEventConfigForRecord` instead.
|
|
499
|
+
* @throws when no version is in effect on that date, which `defineConfig` rules out.
|
|
500
|
+
*/
|
|
501
|
+
export declare function resolveEventConfigInTimeZone(config: VersionedEventConfig, timeZone: string, now?: Date): EventConfig;
|
|
502
|
+
/**
|
|
503
|
+
* @returns the configuration of the version in effect today in UTC. For country config
|
|
504
|
+
* code with no time zone at hand; core code uses `resolveEventConfigInTimeZone`.
|
|
505
|
+
*/
|
|
506
|
+
export declare function resolveEventConfig(config: VersionedEventConfig): EventConfig;
|
|
507
|
+
/**
|
|
508
|
+
* Runs `validate` on the configuration of each version (`events[i]` is that of
|
|
509
|
+
* `versions[i]`). Issues on a field of the version are reported under that version.
|
|
510
|
+
* Issues on a field shared by every version (e.g. `advancedSearch`) are reported once,
|
|
511
|
+
* where they are defined.
|
|
512
|
+
*/
|
|
513
|
+
export declare function validateEachVersion<E>(ctx: Pick<z.RefinementCtx<unknown>, 'addIssue'>, events: E[], validate: (event: E, versionCtx: z.RefinementCtx<E>) => void): void;
|
|
514
|
+
export declare const VersionedEventConfig: z.ZodType<VersionedEventConfig, VersionedEventConfigInput>;
|
|
69
515
|
export {};
|
|
70
516
|
//# sourceMappingURL=EventConfig.d.ts.map
|
|
@@ -509,6 +509,7 @@ export declare const EventDocument: z.ZodObject<{
|
|
|
509
509
|
status: z.ZodLiteral<"Rejected">;
|
|
510
510
|
}, z.core.$strip>]>>;
|
|
511
511
|
trackingId: z.ZodString;
|
|
512
|
+
configVersionId: z.ZodString;
|
|
512
513
|
}, z.core.$strip>;
|
|
513
514
|
export type EventDocument = z.infer<typeof EventDocument>;
|
|
514
515
|
export declare const EventDocumentOnlyLastAction: z.core.$ZodBranded<z.ZodObject<{
|
|
@@ -517,6 +518,7 @@ export declare const EventDocumentOnlyLastAction: z.core.$ZodBranded<z.ZodObject
|
|
|
517
518
|
createdAt: z.ZodString;
|
|
518
519
|
updatedAt: z.ZodString;
|
|
519
520
|
trackingId: z.ZodString;
|
|
521
|
+
configVersionId: z.ZodString;
|
|
520
522
|
actions: z.ZodArray<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
521
523
|
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
522
524
|
transactionId: z.ZodString;
|
|
@@ -3,6 +3,7 @@ export declare const EventInput: z.ZodObject<{
|
|
|
3
3
|
transactionId: z.ZodString;
|
|
4
4
|
type: z.ZodString;
|
|
5
5
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
6
|
+
configVersionId: z.ZodOptional<z.ZodString>;
|
|
6
7
|
}, z.core.$strip>;
|
|
7
8
|
export type EventInput = z.infer<typeof EventInput>;
|
|
8
9
|
//# sourceMappingURL=EventInput.d.ts.map
|
|
@@ -83,6 +83,7 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
|
83
83
|
export declare const EventMetadata: z.ZodObject<{
|
|
84
84
|
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
85
85
|
type: z.ZodString;
|
|
86
|
+
configVersionId: z.ZodString;
|
|
86
87
|
status: z.ZodEnum<{
|
|
87
88
|
ARCHIVED: "ARCHIVED";
|
|
88
89
|
CREATED: "CREATED";
|
|
@@ -32,8 +32,8 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
32
32
|
age: z.ZodNumber;
|
|
33
33
|
asOfDateRef: z.ZodString;
|
|
34
34
|
}, z.core.$strip> | z.ZodObject<{
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
numericValue: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
37
37
|
}, z.core.$strip> | z.ZodObject<{
|
|
38
38
|
path: z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">;
|
|
39
39
|
originalFilename: z.ZodString;
|
|
@@ -44,8 +44,8 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
44
44
|
numericValue: z.ZodNumber;
|
|
45
45
|
unit: z.ZodString;
|
|
46
46
|
}, z.core.$strip> | z.ZodObject<{
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
label: z.ZodString;
|
|
48
|
+
value: z.ZodString;
|
|
49
49
|
}, z.core.$strip> | z.ZodObject<{
|
|
50
50
|
data: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
51
51
|
}, z.core.$strip> | z.ZodObject<{
|
|
@@ -68,8 +68,8 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
68
68
|
age: z.ZodNumber;
|
|
69
69
|
asOfDateRef: z.ZodString;
|
|
70
70
|
}, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
numericValue: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
73
73
|
}, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
74
74
|
path: z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">;
|
|
75
75
|
originalFilename: z.ZodString;
|
|
@@ -80,8 +80,8 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
80
80
|
numericValue: z.ZodNumber;
|
|
81
81
|
unit: z.ZodString;
|
|
82
82
|
}, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
label: z.ZodString;
|
|
84
|
+
value: z.ZodString;
|
|
85
85
|
}, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
86
86
|
data: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
87
87
|
country: z.ZodString;
|
|
@@ -243,15 +243,6 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
243
243
|
}, z.core.$strip>>>;
|
|
244
244
|
data: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
245
245
|
}, z.core.$strip>, z.ZodNull]>, z.ZodUndefined]>>> | z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUnknown, "CustomFieldValue", "out">>> | z.ZodString | z.ZodType<{
|
|
246
|
-
country: string;
|
|
247
|
-
streetLevelDetails?: Record<string, string> | undefined;
|
|
248
|
-
addressType: "DOMESTIC";
|
|
249
|
-
administrativeArea: string;
|
|
250
|
-
} | {
|
|
251
|
-
country: string;
|
|
252
|
-
streetLevelDetails?: Record<string, string> | undefined;
|
|
253
|
-
addressType: "INTERNATIONAL";
|
|
254
|
-
} | {
|
|
255
246
|
country?: string | null | undefined;
|
|
256
247
|
streetLevelDetails?: Record<string, string | null> | null | undefined;
|
|
257
248
|
addressType: "DOMESTIC";
|
|
@@ -260,7 +251,7 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
260
251
|
country?: string | null | undefined;
|
|
261
252
|
streetLevelDetails?: Record<string, string | null> | null | undefined;
|
|
262
253
|
addressType: "INTERNATIONAL";
|
|
263
|
-
} |
|
|
254
|
+
} | {
|
|
264
255
|
country: string;
|
|
265
256
|
streetLevelDetails?: Record<string, string> | undefined;
|
|
266
257
|
addressType: "DOMESTIC";
|
|
@@ -269,7 +260,7 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
269
260
|
country: string;
|
|
270
261
|
streetLevelDetails?: Record<string, string> | undefined;
|
|
271
262
|
addressType: "INTERNATIONAL";
|
|
272
|
-
} | {
|
|
263
|
+
} | null | undefined, unknown, z.core.$ZodTypeInternals<{
|
|
273
264
|
country?: string | null | undefined;
|
|
274
265
|
streetLevelDetails?: Record<string, string | null> | null | undefined;
|
|
275
266
|
addressType: "DOMESTIC";
|
|
@@ -278,6 +269,15 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
278
269
|
country?: string | null | undefined;
|
|
279
270
|
streetLevelDetails?: Record<string, string | null> | null | undefined;
|
|
280
271
|
addressType: "INTERNATIONAL";
|
|
272
|
+
} | {
|
|
273
|
+
country: string;
|
|
274
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
275
|
+
addressType: "DOMESTIC";
|
|
276
|
+
administrativeArea: string;
|
|
277
|
+
} | {
|
|
278
|
+
country: string;
|
|
279
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
280
|
+
addressType: "INTERNATIONAL";
|
|
281
281
|
} | null | undefined, unknown>> | z.ZodUnion<[z.ZodObject<{
|
|
282
282
|
start: z.core.$ZodBranded<z.ZodString, "PlainDate", "out">;
|
|
283
283
|
end: z.core.$ZodBranded<z.ZodString, "PlainDate", "out">;
|
|
@@ -18,6 +18,11 @@ export declare const isPlainDate: (date: unknown) => date is PlainDate;
|
|
|
18
18
|
* YYYY-MM-DD input, as produced by the event metadata and date fields.
|
|
19
19
|
*/
|
|
20
20
|
export declare function toPlainDate(dateTime: string): PlainDate;
|
|
21
|
+
/**
|
|
22
|
+
* The calendar date of `date` in the IANA `timeZone` (e.g. 'Asia/Dhaka'), as a
|
|
23
|
+
* {@link PlainDate}. Unlike {@link toPlainDate}, which reads the UTC date.
|
|
24
|
+
*/
|
|
25
|
+
export declare function toPlainDateInTimeZone(date: Date, timeZone: string): PlainDate;
|
|
21
26
|
/**
|
|
22
27
|
* Converts a {@link PlainDate} (YYYY-MM-DD) to a local `Date` at midnight.
|
|
23
28
|
*
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { EventConfigInput, VersionedEventConfig, VersionedEventConfigInput } from './EventConfig';
|
|
2
|
+
/**
|
|
3
|
+
* Validates an event configuration. Accepts an event with `versions`, or, as before
|
|
4
|
+
* versioning, an event without them, which is taken as a single version with id
|
|
5
|
+
* `initial`, effective from the beginning of time.
|
|
6
|
+
*/
|
|
7
|
+
export declare const defineConfig: (config: EventConfigInput | VersionedEventConfigInput) => VersionedEventConfig;
|
|
3
8
|
//# sourceMappingURL=defineConfig.d.ts.map
|
|
@@ -17,7 +17,10 @@ declare function eventFn(fieldId: NonSearchableEventMetadataTimeFieldIdInput): {
|
|
|
17
17
|
};
|
|
18
18
|
declare const event: typeof eventFn & {
|
|
19
19
|
/**
|
|
20
|
-
* Checks if the event contains a specific action type.
|
|
20
|
+
* Checks if the event contains a specific accepted action type.
|
|
21
|
+
* Only Accepted actions are matched: a confirmable action is stored as a
|
|
22
|
+
* Requested and an Accepted action, and a pending or rejected request must
|
|
23
|
+
* not count as the action having happened.
|
|
21
24
|
* Can be used directly as a conditional or chained with additional methods.
|
|
22
25
|
* @param action - The action type to check for.
|
|
23
26
|
*/
|