@opencrvs/toolkit 2.0.1-rc.63be7c5 → 2.0.1-rc.6acf897
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/create-countryconfig/index.js +177 -14
- package/dist/application-config/index.js +2 -4
- package/dist/cli.js +2 -4
- package/dist/commons/api/router.d.ts +2 -6
- package/dist/commons/conditionals/conditionals.d.ts +3 -3
- package/dist/commons/events/ActionConfig.d.ts +0 -4
- package/dist/commons/events/AdvancedSearchConfig.d.ts +0 -6
- package/dist/commons/events/FieldConfig.d.ts +0 -5
- package/dist/commons/events/FormConfig.d.ts +0 -6
- package/dist/commons/events/PageConfig.d.ts +0 -4
- package/dist/commons/events/utils.d.ts +0 -4
- package/dist/conditionals/index.js +2 -4
- package/dist/events/index.js +2 -22
- package/dist/migrations/v2.0/index.js +2 -4
- package/dist/notification/index.js +2 -8
- package/dist/scopes/index.d.ts +0 -65
- package/dist/scopes/index.js +2 -4
- package/opencrvs-toolkit-2.0.1-rc.6acf897.tgz +0 -0
- package/package.json +1 -1
- package/opencrvs-toolkit-2.0.1-rc.63be7c5.tgz +0 -0
|
@@ -17,8 +17,142 @@ const fs = require('fs')
|
|
|
17
17
|
|
|
18
18
|
const COUNTRYCONFIG_REPO_URL =
|
|
19
19
|
'https://github.com/opencrvs/opencrvs-countryconfig.git'
|
|
20
|
-
const INFRASTRUCTURE_REPO_URL =
|
|
21
|
-
|
|
20
|
+
const INFRASTRUCTURE_REPO_URL = 'https://github.com/opencrvs/infrastructure.git'
|
|
21
|
+
|
|
22
|
+
const { version } = JSON.parse(
|
|
23
|
+
fs.readFileSync(path.join(__dirname, 'package.json'), 'utf-8')
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
function tagExists(repoUrl, tag) {
|
|
27
|
+
try {
|
|
28
|
+
execSync(
|
|
29
|
+
'git ls-remote --exit-code --tags ' + repoUrl + ' refs/tags/' + tag,
|
|
30
|
+
{
|
|
31
|
+
stdio: 'pipe'
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
return true
|
|
35
|
+
} catch (err) {
|
|
36
|
+
return false
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function branchExists(repoUrl, branch) {
|
|
41
|
+
try {
|
|
42
|
+
execSync(
|
|
43
|
+
'git ls-remote --exit-code --heads ' + repoUrl + ' refs/heads/' + branch,
|
|
44
|
+
{
|
|
45
|
+
stdio: 'pipe'
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
return true
|
|
49
|
+
} catch (err) {
|
|
50
|
+
return false
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Release tags (e.g. "v2.1.0"), highest first. Delegates the version-aware
|
|
56
|
+
* ordering to git itself rather than hand-parsing semver, then filters down
|
|
57
|
+
* to strict "vX.Y.Z" tags - `--sort=-version:refname` alone still leaves in
|
|
58
|
+
* non-release refs (e.g. "vtesting", "v2.0.0-beta") and peeled annotated-tag
|
|
59
|
+
* lines ("refs/tags/v2.0.0^{}").
|
|
60
|
+
*/
|
|
61
|
+
function listReleaseTags(repoUrl) {
|
|
62
|
+
const output = execSync(
|
|
63
|
+
'git ls-remote --tags --sort=-version:refname ' + repoUrl,
|
|
64
|
+
{ encoding: 'utf-8' }
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
return output
|
|
68
|
+
.split('\n')
|
|
69
|
+
.map((line) => line.split('\t')[1])
|
|
70
|
+
.filter(Boolean)
|
|
71
|
+
.map((ref) => ref.replace('refs/tags/', ''))
|
|
72
|
+
.filter((tag) => /^v\d+\.\d+\.\d+$/.test(tag))
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The highest release tag present in *both* repositories - used as the
|
|
77
|
+
* fallback when the version-specific tag can't be found in one or both, so
|
|
78
|
+
* scaffolding still lands on a real, matched release rather than develop.
|
|
79
|
+
*/
|
|
80
|
+
function getLatestCommonReleaseTag() {
|
|
81
|
+
const infrastructureTags = new Set(listReleaseTags(INFRASTRUCTURE_REPO_URL))
|
|
82
|
+
return (
|
|
83
|
+
listReleaseTags(COUNTRYCONFIG_REPO_URL).find((tag) =>
|
|
84
|
+
infrastructureTags.has(tag)
|
|
85
|
+
) || null
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* A prerelease-shaped own version (e.g. "2.1.0-rc.f5ea803", what npm resolves
|
|
91
|
+
* `@next` to - a build published from every push to a branch) never has a
|
|
92
|
+
* matching release tag, so it's resolved as a branch instead. Its base
|
|
93
|
+
* version (stripped of the "-rc.<sha>" suffix) tells apart two different
|
|
94
|
+
* situations: an RC for a version already being stabilized on its own
|
|
95
|
+
* "release/X.Y.Z" branch (e.g. "2.0.1-rc.*" while a patch release is in
|
|
96
|
+
* progress) versus an RC for a version that hasn't been branched off yet and
|
|
97
|
+
* only exists on develop (e.g. "2.1.0-rc.*" while that release branch hasn't
|
|
98
|
+
* been cut). Scaffold from the release branch when it exists in both
|
|
99
|
+
* repositories, otherwise fall back to develop.
|
|
100
|
+
*
|
|
101
|
+
* Otherwise, the own "X.Y.Z" version - whether resolved via npm's `latest`
|
|
102
|
+
* dist-tag (bare invocation) or an explicit `@X.Y.Z` pin - scaffolds from the
|
|
103
|
+
* matching "vX.Y.Z" tag when it exists in both repositories. If it doesn't
|
|
104
|
+
* (e.g. `latest` lagging behind the repos, or a pin that predates one repo's
|
|
105
|
+
* tagging), fall back to the highest release tag common to both, rather than
|
|
106
|
+
* a mismatched pairing of one tagged repo at that version and another repo
|
|
107
|
+
* at a different release. Exits with an error if no matching release tag
|
|
108
|
+
* exists in both repositories.
|
|
109
|
+
*/
|
|
110
|
+
function resolveRef() {
|
|
111
|
+
if (version.includes('-')) {
|
|
112
|
+
const releaseBranch = 'release/' + version.split('-')[0]
|
|
113
|
+
if (
|
|
114
|
+
branchExists(COUNTRYCONFIG_REPO_URL, releaseBranch) &&
|
|
115
|
+
branchExists(INFRASTRUCTURE_REPO_URL, releaseBranch)
|
|
116
|
+
) {
|
|
117
|
+
return releaseBranch
|
|
118
|
+
}
|
|
119
|
+
return 'develop'
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const tag = 'v' + version
|
|
123
|
+
if (
|
|
124
|
+
tagExists(COUNTRYCONFIG_REPO_URL, tag) &&
|
|
125
|
+
tagExists(INFRASTRUCTURE_REPO_URL, tag)
|
|
126
|
+
) {
|
|
127
|
+
return tag
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const latestCommonTag = getLatestCommonReleaseTag()
|
|
131
|
+
if (latestCommonTag) {
|
|
132
|
+
console.warn(
|
|
133
|
+
'\nWarning: tag "' +
|
|
134
|
+
tag +
|
|
135
|
+
'" was not found in both repositories; falling back to the latest ' +
|
|
136
|
+
'available release, ' +
|
|
137
|
+
latestCommonTag +
|
|
138
|
+
'.'
|
|
139
|
+
)
|
|
140
|
+
return latestCommonTag
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
console.error(
|
|
144
|
+
'\nError: no matching release tag was found in both the country config and ' +
|
|
145
|
+
'infrastructure repositories.'
|
|
146
|
+
)
|
|
147
|
+
process.exit(1)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function cloneRepository(repoUrl, ref, targetDir) {
|
|
151
|
+
execSync(
|
|
152
|
+
'git clone --depth 1 --branch ' + ref + ' ' + repoUrl + ' ' + targetDir,
|
|
153
|
+
{ stdio: 'inherit' }
|
|
154
|
+
)
|
|
155
|
+
}
|
|
22
156
|
|
|
23
157
|
const projectName = process.argv[2]
|
|
24
158
|
|
|
@@ -33,31 +167,48 @@ const countryconfigDirName = projectName + '-countryconfig'
|
|
|
33
167
|
const infrastructureDirName = projectName + '-infrastructure'
|
|
34
168
|
|
|
35
169
|
const countryconfigTargetDir = path.resolve(process.cwd(), countryconfigDirName)
|
|
36
|
-
const infrastructureTargetDir = path.resolve(
|
|
170
|
+
const infrastructureTargetDir = path.resolve(
|
|
171
|
+
process.cwd(),
|
|
172
|
+
infrastructureDirName
|
|
173
|
+
)
|
|
37
174
|
|
|
38
175
|
if (fs.existsSync(countryconfigTargetDir)) {
|
|
39
|
-
console.error(
|
|
176
|
+
console.error(
|
|
177
|
+
'Error: Directory "' + countryconfigDirName + '" already exists.'
|
|
178
|
+
)
|
|
40
179
|
process.exit(1)
|
|
41
180
|
}
|
|
42
181
|
|
|
43
182
|
if (fs.existsSync(infrastructureTargetDir)) {
|
|
44
|
-
console.error(
|
|
183
|
+
console.error(
|
|
184
|
+
'Error: Directory "' + infrastructureDirName + '" already exists.'
|
|
185
|
+
)
|
|
45
186
|
process.exit(1)
|
|
46
187
|
}
|
|
47
188
|
|
|
48
|
-
|
|
189
|
+
const ref = resolveRef()
|
|
190
|
+
|
|
191
|
+
console.log(
|
|
192
|
+
'\nScaffolding OpenCRVS country config in ./' + countryconfigDirName + '...\n'
|
|
193
|
+
)
|
|
49
194
|
|
|
50
195
|
try {
|
|
51
|
-
|
|
196
|
+
cloneRepository(COUNTRYCONFIG_REPO_URL, ref, countryconfigDirName)
|
|
52
197
|
} catch (err) {
|
|
53
198
|
console.error('Failed to clone the country config repository:', err.message)
|
|
54
199
|
process.exit(1)
|
|
55
200
|
}
|
|
56
201
|
|
|
57
202
|
try {
|
|
58
|
-
fs.rmSync(path.join(countryconfigTargetDir, '.git'), {
|
|
203
|
+
fs.rmSync(path.join(countryconfigTargetDir, '.git'), {
|
|
204
|
+
recursive: true,
|
|
205
|
+
force: true
|
|
206
|
+
})
|
|
59
207
|
} catch (err) {
|
|
60
|
-
console.error(
|
|
208
|
+
console.error(
|
|
209
|
+
'Failed to remove .git directory from country config:',
|
|
210
|
+
err.message
|
|
211
|
+
)
|
|
61
212
|
process.exit(1)
|
|
62
213
|
}
|
|
63
214
|
|
|
@@ -72,22 +223,34 @@ if (fs.existsSync(pkgPath)) {
|
|
|
72
223
|
process.exit(1)
|
|
73
224
|
}
|
|
74
225
|
} else {
|
|
75
|
-
console.warn(
|
|
226
|
+
console.warn(
|
|
227
|
+
'Warning: No package.json found in the cloned country config repository. Project name was not updated.'
|
|
228
|
+
)
|
|
76
229
|
}
|
|
77
230
|
|
|
78
|
-
console.log(
|
|
231
|
+
console.log(
|
|
232
|
+
'\nScaffolding OpenCRVS infrastructure in ./' +
|
|
233
|
+
infrastructureDirName +
|
|
234
|
+
'...\n'
|
|
235
|
+
)
|
|
79
236
|
|
|
80
237
|
try {
|
|
81
|
-
|
|
238
|
+
cloneRepository(INFRASTRUCTURE_REPO_URL, ref, infrastructureDirName)
|
|
82
239
|
} catch (err) {
|
|
83
240
|
console.error('Failed to clone the infrastructure repository:', err.message)
|
|
84
241
|
process.exit(1)
|
|
85
242
|
}
|
|
86
243
|
|
|
87
244
|
try {
|
|
88
|
-
fs.rmSync(path.join(infrastructureTargetDir, '.git'), {
|
|
245
|
+
fs.rmSync(path.join(infrastructureTargetDir, '.git'), {
|
|
246
|
+
recursive: true,
|
|
247
|
+
force: true
|
|
248
|
+
})
|
|
89
249
|
} catch (err) {
|
|
90
|
-
console.error(
|
|
250
|
+
console.error(
|
|
251
|
+
'Failed to remove .git directory from infrastructure:',
|
|
252
|
+
err.message
|
|
253
|
+
)
|
|
91
254
|
process.exit(1)
|
|
92
255
|
}
|
|
93
256
|
|
|
@@ -664,8 +664,7 @@ var userRole = z11.preprocess(
|
|
|
664
664
|
var scopeOptionsPlaceEvent = z11.object({
|
|
665
665
|
event: scopeByEvent,
|
|
666
666
|
placeOfEvent: JurisdictionFilter.optional(),
|
|
667
|
-
createdBy: UserFilter.optional()
|
|
668
|
-
createdIn: JurisdictionFilter.optional()
|
|
667
|
+
createdBy: UserFilter.optional()
|
|
669
668
|
}).describe("Options applicable to all record scopes.");
|
|
670
669
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
671
670
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -705,8 +704,7 @@ var ScopeOptionKey = AllScopeOptions.keyof();
|
|
|
705
704
|
var ResolvedScopeOptionsPlaceEvent = z11.object({
|
|
706
705
|
event: scopeByEvent,
|
|
707
706
|
placeOfEvent: UUID.nullish(),
|
|
708
|
-
createdBy: z11.string().optional()
|
|
709
|
-
createdIn: UUID.nullish()
|
|
707
|
+
createdBy: z11.string().optional()
|
|
710
708
|
}).describe(
|
|
711
709
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
712
710
|
);
|
package/dist/cli.js
CHANGED
|
@@ -2191,8 +2191,7 @@ var userRole = z3.preprocess(
|
|
|
2191
2191
|
var scopeOptionsPlaceEvent = z3.object({
|
|
2192
2192
|
event: scopeByEvent,
|
|
2193
2193
|
placeOfEvent: JurisdictionFilter.optional(),
|
|
2194
|
-
createdBy: UserFilter.optional()
|
|
2195
|
-
createdIn: JurisdictionFilter.optional()
|
|
2194
|
+
createdBy: UserFilter.optional()
|
|
2196
2195
|
}).describe("Options applicable to all record scopes.");
|
|
2197
2196
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
2198
2197
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -2232,8 +2231,7 @@ var ScopeOptionKey = AllScopeOptions.keyof();
|
|
|
2232
2231
|
var ResolvedScopeOptionsPlaceEvent = z3.object({
|
|
2233
2232
|
event: scopeByEvent,
|
|
2234
2233
|
placeOfEvent: UUID.nullish(),
|
|
2235
|
-
createdBy: z3.string().optional()
|
|
2236
|
-
createdIn: UUID.nullish()
|
|
2234
|
+
createdBy: z3.string().optional()
|
|
2237
2235
|
}).describe(
|
|
2238
2236
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
2239
2237
|
);
|
|
@@ -8284,10 +8284,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8284
8284
|
input: {
|
|
8285
8285
|
name: string;
|
|
8286
8286
|
scopes: string[];
|
|
8287
|
-
credentials?: {
|
|
8288
|
-
clientId: string;
|
|
8289
|
-
clientSecret: string;
|
|
8290
|
-
} | undefined;
|
|
8291
8287
|
};
|
|
8292
8288
|
output: {
|
|
8293
8289
|
clientId: string;
|
|
@@ -8318,7 +8314,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8318
8314
|
scopes: string[];
|
|
8319
8315
|
status: string;
|
|
8320
8316
|
createdAt: string;
|
|
8321
|
-
createdBy:
|
|
8317
|
+
createdBy: string & import("zod").$brand<"UUID">;
|
|
8322
8318
|
}[];
|
|
8323
8319
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8324
8320
|
}>;
|
|
@@ -8333,7 +8329,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8333
8329
|
status: string;
|
|
8334
8330
|
shaSecret: string | null;
|
|
8335
8331
|
createdAt: string;
|
|
8336
|
-
createdBy:
|
|
8332
|
+
createdBy: string & import("zod").$brand<"UUID">;
|
|
8337
8333
|
};
|
|
8338
8334
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8339
8335
|
}>;
|
|
@@ -94,16 +94,16 @@ export declare const user: typeof userSerializer & {
|
|
|
94
94
|
scope: (scope: import("../scopes").ScopeType) => {
|
|
95
95
|
attribute: (option: import("../scopes").ScopeOptionKey) => {
|
|
96
96
|
$scope: "record.search" | "record.create" | "record.read" | "record.declare" | "record.notify" | "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register" | "record.print-certified-copies" | "record.request-correction" | "record.correct" | "record.unassign-others" | "record.custom-action" | "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration" | "organisation.read-locations" | "user.read" | "user.create" | "user.edit" | "user.search" | "workqueue" | "dashboard.view";
|
|
97
|
-
$option: "role" | "event" | "placeOfEvent" | "createdBy" | "
|
|
97
|
+
$option: "role" | "event" | "placeOfEvent" | "createdBy" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
100
|
jurisdiction: (jurisdiction: import("../scopes").JurisdictionFilter | {
|
|
101
101
|
$scope: "record.search" | "record.create" | "record.read" | "record.declare" | "record.notify" | "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register" | "record.print-certified-copies" | "record.request-correction" | "record.correct" | "record.unassign-others" | "record.custom-action" | "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration" | "organisation.read-locations" | "user.read" | "user.create" | "user.edit" | "user.search" | "workqueue" | "dashboard.view";
|
|
102
|
-
$option: "role" | "event" | "placeOfEvent" | "createdBy" | "
|
|
102
|
+
$option: "role" | "event" | "placeOfEvent" | "createdBy" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
103
103
|
}) => {
|
|
104
104
|
$jurisdiction: "administrativeArea" | "location" | "all" | {
|
|
105
105
|
$scope: "record.search" | "record.create" | "record.read" | "record.declare" | "record.notify" | "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register" | "record.print-certified-copies" | "record.request-correction" | "record.correct" | "record.unassign-others" | "record.custom-action" | "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration" | "organisation.read-locations" | "user.read" | "user.create" | "user.edit" | "user.search" | "workqueue" | "dashboard.view";
|
|
106
|
-
$option: "role" | "event" | "placeOfEvent" | "createdBy" | "
|
|
106
|
+
$option: "role" | "event" | "placeOfEvent" | "createdBy" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
107
107
|
};
|
|
108
108
|
};
|
|
109
109
|
};
|
|
@@ -214,7 +214,6 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
214
214
|
id: z.ZodString;
|
|
215
215
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
216
216
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
217
|
-
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
218
217
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
219
218
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
220
219
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -222,7 +221,6 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
222
221
|
id: z.ZodString;
|
|
223
222
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
224
223
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
225
|
-
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
226
224
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
227
225
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
228
226
|
type: z.ZodLiteral<"VERIFICATION">;
|
|
@@ -272,7 +270,6 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
272
270
|
id: z.ZodString;
|
|
273
271
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
274
272
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
275
|
-
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
276
273
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
277
274
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
278
275
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -280,7 +277,6 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
280
277
|
id: z.ZodString;
|
|
281
278
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
282
279
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
283
|
-
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
284
280
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
285
281
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
286
282
|
type: z.ZodLiteral<"VERIFICATION">;
|
|
@@ -140,7 +140,6 @@ export declare const FieldConfigSchema: z.ZodObject<{
|
|
|
140
140
|
event: "event";
|
|
141
141
|
placeOfEvent: "placeOfEvent";
|
|
142
142
|
createdBy: "createdBy";
|
|
143
|
-
createdIn: "createdIn";
|
|
144
143
|
declaredIn: "declaredIn";
|
|
145
144
|
declaredBy: "declaredBy";
|
|
146
145
|
registeredIn: "registeredIn";
|
|
@@ -319,7 +318,6 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
|
|
|
319
318
|
event: "event";
|
|
320
319
|
placeOfEvent: "placeOfEvent";
|
|
321
320
|
createdBy: "createdBy";
|
|
322
|
-
createdIn: "createdIn";
|
|
323
321
|
declaredIn: "declaredIn";
|
|
324
322
|
declaredBy: "declaredBy";
|
|
325
323
|
registeredIn: "registeredIn";
|
|
@@ -474,7 +472,6 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
474
472
|
event: "event";
|
|
475
473
|
placeOfEvent: "placeOfEvent";
|
|
476
474
|
createdBy: "createdBy";
|
|
477
|
-
createdIn: "createdIn";
|
|
478
475
|
declaredIn: "declaredIn";
|
|
479
476
|
declaredBy: "declaredBy";
|
|
480
477
|
registeredIn: "registeredIn";
|
|
@@ -621,7 +618,6 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
621
618
|
event: "event";
|
|
622
619
|
placeOfEvent: "placeOfEvent";
|
|
623
620
|
createdBy: "createdBy";
|
|
624
|
-
createdIn: "createdIn";
|
|
625
621
|
declaredIn: "declaredIn";
|
|
626
622
|
declaredBy: "declaredBy";
|
|
627
623
|
registeredIn: "registeredIn";
|
|
@@ -779,7 +775,6 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
779
775
|
event: "event";
|
|
780
776
|
placeOfEvent: "placeOfEvent";
|
|
781
777
|
createdBy: "createdBy";
|
|
782
|
-
createdIn: "createdIn";
|
|
783
778
|
declaredIn: "declaredIn";
|
|
784
779
|
declaredBy: "declaredBy";
|
|
785
780
|
registeredIn: "registeredIn";
|
|
@@ -926,7 +921,6 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
926
921
|
event: "event";
|
|
927
922
|
placeOfEvent: "placeOfEvent";
|
|
928
923
|
createdBy: "createdBy";
|
|
929
|
-
createdIn: "createdIn";
|
|
930
924
|
declaredIn: "declaredIn";
|
|
931
925
|
declaredBy: "declaredBy";
|
|
932
926
|
registeredIn: "registeredIn";
|
|
@@ -1920,7 +1920,6 @@ declare const AdministrativeAreaField: z.ZodObject<{
|
|
|
1920
1920
|
event: "event";
|
|
1921
1921
|
placeOfEvent: "placeOfEvent";
|
|
1922
1922
|
createdBy: "createdBy";
|
|
1923
|
-
createdIn: "createdIn";
|
|
1924
1923
|
declaredIn: "declaredIn";
|
|
1925
1924
|
declaredBy: "declaredBy";
|
|
1926
1925
|
registeredIn: "registeredIn";
|
|
@@ -2048,7 +2047,6 @@ declare const LocationInput: z.ZodObject<{
|
|
|
2048
2047
|
event: "event";
|
|
2049
2048
|
placeOfEvent: "placeOfEvent";
|
|
2050
2049
|
createdBy: "createdBy";
|
|
2051
|
-
createdIn: "createdIn";
|
|
2052
2050
|
declaredIn: "declaredIn";
|
|
2053
2051
|
declaredBy: "declaredBy";
|
|
2054
2052
|
registeredIn: "registeredIn";
|
|
@@ -2247,7 +2245,6 @@ declare const Facility: z.ZodObject<{
|
|
|
2247
2245
|
event: "event";
|
|
2248
2246
|
placeOfEvent: "placeOfEvent";
|
|
2249
2247
|
createdBy: "createdBy";
|
|
2250
|
-
createdIn: "createdIn";
|
|
2251
2248
|
declaredIn: "declaredIn";
|
|
2252
2249
|
declaredBy: "declaredBy";
|
|
2253
2250
|
registeredIn: "registeredIn";
|
|
@@ -2361,7 +2358,6 @@ declare const Office: z.ZodObject<{
|
|
|
2361
2358
|
event: "event";
|
|
2362
2359
|
placeOfEvent: "placeOfEvent";
|
|
2363
2360
|
createdBy: "createdBy";
|
|
2364
|
-
createdIn: "createdIn";
|
|
2365
2361
|
declaredIn: "declaredIn";
|
|
2366
2362
|
declaredBy: "declaredBy";
|
|
2367
2363
|
registeredIn: "registeredIn";
|
|
@@ -2561,7 +2557,6 @@ declare const Address: z.ZodObject<{
|
|
|
2561
2557
|
event: "event";
|
|
2562
2558
|
placeOfEvent: "placeOfEvent";
|
|
2563
2559
|
createdBy: "createdBy";
|
|
2564
|
-
createdIn: "createdIn";
|
|
2565
2560
|
declaredIn: "declaredIn";
|
|
2566
2561
|
declaredBy: "declaredBy";
|
|
2567
2562
|
registeredIn: "registeredIn";
|
|
@@ -5,7 +5,6 @@ export declare const DeclarationFormConfig: z.ZodObject<{
|
|
|
5
5
|
id: z.ZodString;
|
|
6
6
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
7
7
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
8
|
-
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
9
8
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
10
9
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
11
10
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -19,7 +18,6 @@ export declare const ActionFormConfig: z.ZodObject<{
|
|
|
19
18
|
id: z.ZodString;
|
|
20
19
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
21
20
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
22
|
-
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
23
21
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
24
22
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
25
23
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -27,7 +25,6 @@ export declare const ActionFormConfig: z.ZodObject<{
|
|
|
27
25
|
id: z.ZodString;
|
|
28
26
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
29
27
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
30
|
-
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
31
28
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
32
29
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
33
30
|
type: z.ZodLiteral<"VERIFICATION">;
|
|
@@ -53,7 +50,6 @@ export declare const FormConfig: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
53
50
|
id: z.ZodString;
|
|
54
51
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
55
52
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
56
|
-
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
57
53
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
58
54
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
59
55
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -64,7 +60,6 @@ export declare const FormConfig: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
64
60
|
id: z.ZodString;
|
|
65
61
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
66
62
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
67
|
-
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
68
63
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
69
64
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
70
65
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -72,7 +67,6 @@ export declare const FormConfig: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
72
67
|
id: z.ZodString;
|
|
73
68
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
74
69
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
75
|
-
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
76
70
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
77
71
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
78
72
|
type: z.ZodLiteral<"VERIFICATION">;
|
|
@@ -9,7 +9,6 @@ export declare const FormPageConfig: z.ZodObject<{
|
|
|
9
9
|
id: z.ZodString;
|
|
10
10
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
11
11
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
-
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
13
12
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
14
13
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
15
14
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -32,7 +31,6 @@ export declare const VerificationPageConfig: z.ZodObject<{
|
|
|
32
31
|
id: z.ZodString;
|
|
33
32
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
34
33
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
35
|
-
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
36
34
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
37
35
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
38
36
|
type: z.ZodLiteral<"VERIFICATION">;
|
|
@@ -54,7 +52,6 @@ export declare const PageConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
54
52
|
id: z.ZodString;
|
|
55
53
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
56
54
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
57
|
-
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
58
55
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
59
56
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
60
57
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -62,7 +59,6 @@ export declare const PageConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
62
59
|
id: z.ZodString;
|
|
63
60
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
64
61
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
65
|
-
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
66
62
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
67
63
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
68
64
|
type: z.ZodLiteral<"VERIFICATION">;
|
|
@@ -22,7 +22,6 @@ export declare function getDeclarationPages(configuration: EventConfig): {
|
|
|
22
22
|
requireCompletionToContinue: boolean;
|
|
23
23
|
fields: FieldConfig[];
|
|
24
24
|
type: "FORM";
|
|
25
|
-
showClearButton?: boolean | undefined;
|
|
26
25
|
conditional?: any;
|
|
27
26
|
}[];
|
|
28
27
|
export declare function getDeclaration(configuration: EventConfig): {
|
|
@@ -41,7 +40,6 @@ export declare function getDeclaration(configuration: EventConfig): {
|
|
|
41
40
|
requireCompletionToContinue: boolean;
|
|
42
41
|
fields: FieldConfig[];
|
|
43
42
|
type: "FORM";
|
|
44
|
-
showClearButton?: boolean | undefined;
|
|
45
43
|
conditional?: any;
|
|
46
44
|
}[];
|
|
47
45
|
};
|
|
@@ -62,7 +60,6 @@ export declare function getPrintCertificatePages(configuration: EventConfig): ({
|
|
|
62
60
|
requireCompletionToContinue: boolean;
|
|
63
61
|
fields: FieldConfig[];
|
|
64
62
|
type: "FORM";
|
|
65
|
-
showClearButton?: boolean | undefined;
|
|
66
63
|
conditional?: any;
|
|
67
64
|
} | {
|
|
68
65
|
id: string;
|
|
@@ -102,7 +99,6 @@ export declare function getPrintCertificatePages(configuration: EventConfig): ({
|
|
|
102
99
|
};
|
|
103
100
|
};
|
|
104
101
|
};
|
|
105
|
-
showClearButton?: boolean | undefined;
|
|
106
102
|
conditional?: any;
|
|
107
103
|
})[];
|
|
108
104
|
export declare const getActionAnnotationFields: (actionConfig: ActionConfig) => FieldConfig[];
|
|
@@ -190,8 +190,7 @@ var userRole = z6.preprocess(
|
|
|
190
190
|
var scopeOptionsPlaceEvent = z6.object({
|
|
191
191
|
event: scopeByEvent,
|
|
192
192
|
placeOfEvent: JurisdictionFilter.optional(),
|
|
193
|
-
createdBy: UserFilter.optional()
|
|
194
|
-
createdIn: JurisdictionFilter.optional()
|
|
193
|
+
createdBy: UserFilter.optional()
|
|
195
194
|
}).describe("Options applicable to all record scopes.");
|
|
196
195
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
197
196
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -231,8 +230,7 @@ var ScopeOptionKey = AllScopeOptions.keyof();
|
|
|
231
230
|
var ResolvedScopeOptionsPlaceEvent = z6.object({
|
|
232
231
|
event: scopeByEvent,
|
|
233
232
|
placeOfEvent: UUID.nullish(),
|
|
234
|
-
createdBy: z6.string().optional()
|
|
235
|
-
createdIn: UUID.nullish()
|
|
233
|
+
createdBy: z6.string().optional()
|
|
236
234
|
}).describe(
|
|
237
235
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
238
236
|
);
|
package/dist/events/index.js
CHANGED
|
@@ -519,8 +519,7 @@ var userRole = z2.preprocess(
|
|
|
519
519
|
var scopeOptionsPlaceEvent = z2.object({
|
|
520
520
|
event: scopeByEvent,
|
|
521
521
|
placeOfEvent: JurisdictionFilter.optional(),
|
|
522
|
-
createdBy: UserFilter.optional()
|
|
523
|
-
createdIn: JurisdictionFilter.optional()
|
|
522
|
+
createdBy: UserFilter.optional()
|
|
524
523
|
}).describe("Options applicable to all record scopes.");
|
|
525
524
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
526
525
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -560,8 +559,7 @@ var ScopeOptionKey = AllScopeOptions.keyof();
|
|
|
560
559
|
var ResolvedScopeOptionsPlaceEvent = z2.object({
|
|
561
560
|
event: scopeByEvent,
|
|
562
561
|
placeOfEvent: UUID.nullish(),
|
|
563
|
-
createdBy: z2.string().optional()
|
|
564
|
-
createdIn: UUID.nullish()
|
|
562
|
+
createdBy: z2.string().optional()
|
|
565
563
|
}).describe(
|
|
566
564
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
567
565
|
);
|
|
@@ -3046,9 +3044,6 @@ var PageConfigBase = z21.object({
|
|
|
3046
3044
|
requireCompletionToContinue: z21.boolean().default(false).describe(
|
|
3047
3045
|
"If true, all required fields must be filled before continuing to the next page"
|
|
3048
3046
|
),
|
|
3049
|
-
showClearButton: z21.boolean().optional().describe(
|
|
3050
|
-
'If true, a "Clear" button is shown at the top of the page allowing the user to reset all fields on the page to their default state'
|
|
3051
|
-
),
|
|
3052
3047
|
fields: z21.array(FieldConfig).describe("Fields to be rendered on the page"),
|
|
3053
3048
|
conditional: Conditional.optional().describe(
|
|
3054
3049
|
"Page will be shown if condition is met. If conditional is not defined, the page will be always shown."
|
|
@@ -7765,7 +7760,6 @@ var TENNIS_CLUB_DECLARATION_FORM = defineDeclarationForm({
|
|
|
7765
7760
|
defaultMessage: "Who is applying for the membership?",
|
|
7766
7761
|
description: "This is the title of the section"
|
|
7767
7762
|
},
|
|
7768
|
-
showClearButton: true,
|
|
7769
7763
|
fields: [
|
|
7770
7764
|
{
|
|
7771
7765
|
id: "applicant.name",
|
|
@@ -10320,20 +10314,6 @@ function canAccessEventWithScope(event2, scope, user2, customActionType) {
|
|
|
10320
10314
|
if (opts?.createdBy === UserFilter.enum.user && event2.createdBy !== user2.id) {
|
|
10321
10315
|
return false;
|
|
10322
10316
|
}
|
|
10323
|
-
if (opts?.createdIn === JurisdictionFilter.enum.location && !matchesJurisdictionFilter(
|
|
10324
|
-
event2.createdAtLocation,
|
|
10325
|
-
JurisdictionFilter.enum.location,
|
|
10326
|
-
user2
|
|
10327
|
-
)) {
|
|
10328
|
-
return false;
|
|
10329
|
-
}
|
|
10330
|
-
if (opts?.createdIn === JurisdictionFilter.enum.administrativeArea && !matchesJurisdictionFilter(
|
|
10331
|
-
event2.createdAtLocation,
|
|
10332
|
-
JurisdictionFilter.enum.administrativeArea,
|
|
10333
|
-
user2
|
|
10334
|
-
)) {
|
|
10335
|
-
return false;
|
|
10336
|
-
}
|
|
10337
10317
|
if (scopeUsesDeclaredOptions(scope)) {
|
|
10338
10318
|
const { options } = scope;
|
|
10339
10319
|
if (options?.declaredBy === UserFilter.enum.user) {
|
|
@@ -2203,8 +2203,7 @@ var userRole = z3.preprocess(
|
|
|
2203
2203
|
var scopeOptionsPlaceEvent = z3.object({
|
|
2204
2204
|
event: scopeByEvent,
|
|
2205
2205
|
placeOfEvent: JurisdictionFilter.optional(),
|
|
2206
|
-
createdBy: UserFilter.optional()
|
|
2207
|
-
createdIn: JurisdictionFilter.optional()
|
|
2206
|
+
createdBy: UserFilter.optional()
|
|
2208
2207
|
}).describe("Options applicable to all record scopes.");
|
|
2209
2208
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
2210
2209
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -2244,8 +2243,7 @@ var ScopeOptionKey = AllScopeOptions.keyof();
|
|
|
2244
2243
|
var ResolvedScopeOptionsPlaceEvent = z3.object({
|
|
2245
2244
|
event: scopeByEvent,
|
|
2246
2245
|
placeOfEvent: UUID.nullish(),
|
|
2247
|
-
createdBy: z3.string().optional()
|
|
2248
|
-
createdIn: UUID.nullish()
|
|
2246
|
+
createdBy: z3.string().optional()
|
|
2249
2247
|
}).describe(
|
|
2250
2248
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
2251
2249
|
);
|
|
@@ -117,8 +117,7 @@ var userRole = z2.preprocess(
|
|
|
117
117
|
var scopeOptionsPlaceEvent = z2.object({
|
|
118
118
|
event: scopeByEvent,
|
|
119
119
|
placeOfEvent: JurisdictionFilter.optional(),
|
|
120
|
-
createdBy: UserFilter.optional()
|
|
121
|
-
createdIn: JurisdictionFilter.optional()
|
|
120
|
+
createdBy: UserFilter.optional()
|
|
122
121
|
}).describe("Options applicable to all record scopes.");
|
|
123
122
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
124
123
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -158,8 +157,7 @@ var ScopeOptionKey = AllScopeOptions.keyof();
|
|
|
158
157
|
var ResolvedScopeOptionsPlaceEvent = z2.object({
|
|
159
158
|
event: scopeByEvent,
|
|
160
159
|
placeOfEvent: UUID.nullish(),
|
|
161
|
-
createdBy: z2.string().optional()
|
|
162
|
-
createdIn: UUID.nullish()
|
|
160
|
+
createdBy: z2.string().optional()
|
|
163
161
|
}).describe(
|
|
164
162
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
165
163
|
);
|
|
@@ -2503,9 +2501,6 @@ var PageConfigBase = z21.object({
|
|
|
2503
2501
|
requireCompletionToContinue: z21.boolean().default(false).describe(
|
|
2504
2502
|
"If true, all required fields must be filled before continuing to the next page"
|
|
2505
2503
|
),
|
|
2506
|
-
showClearButton: z21.boolean().optional().describe(
|
|
2507
|
-
'If true, a "Clear" button is shown at the top of the page allowing the user to reset all fields on the page to their default state'
|
|
2508
|
-
),
|
|
2509
2504
|
fields: z21.array(FieldConfig).describe("Fields to be rendered on the page"),
|
|
2510
2505
|
conditional: Conditional.optional().describe(
|
|
2511
2506
|
"Page will be shown if condition is met. If conditional is not defined, the page will be always shown."
|
|
@@ -5537,7 +5532,6 @@ var TENNIS_CLUB_DECLARATION_FORM = defineDeclarationForm({
|
|
|
5537
5532
|
defaultMessage: "Who is applying for the membership?",
|
|
5538
5533
|
description: "This is the title of the section"
|
|
5539
5534
|
},
|
|
5540
|
-
showClearButton: true,
|
|
5541
5535
|
fields: [
|
|
5542
5536
|
{
|
|
5543
5537
|
id: "applicant.name",
|
package/dist/scopes/index.d.ts
CHANGED
|
@@ -51,11 +51,6 @@ declare const AllScopeOptions: z.ZodObject<{
|
|
|
51
51
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
52
52
|
user: "user";
|
|
53
53
|
}>>;
|
|
54
|
-
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
55
|
-
administrativeArea: "administrativeArea";
|
|
56
|
-
location: "location";
|
|
57
|
-
all: "all";
|
|
58
|
-
}>>;
|
|
59
54
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
60
55
|
administrativeArea: "administrativeArea";
|
|
61
56
|
location: "location";
|
|
@@ -79,7 +74,6 @@ export declare const ScopeOptionKey: z.ZodEnum<{
|
|
|
79
74
|
event: "event";
|
|
80
75
|
placeOfEvent: "placeOfEvent";
|
|
81
76
|
createdBy: "createdBy";
|
|
82
|
-
createdIn: "createdIn";
|
|
83
77
|
declaredIn: "declaredIn";
|
|
84
78
|
declaredBy: "declaredBy";
|
|
85
79
|
registeredIn: "registeredIn";
|
|
@@ -123,11 +117,6 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
123
117
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
124
118
|
user: "user";
|
|
125
119
|
}>>;
|
|
126
|
-
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
127
|
-
administrativeArea: "administrativeArea";
|
|
128
|
-
location: "location";
|
|
129
|
-
all: "all";
|
|
130
|
-
}>>;
|
|
131
120
|
}, z.core.$strip>>;
|
|
132
121
|
}, z.core.$strip>, z.ZodObject<{
|
|
133
122
|
type: z.ZodEnum<{
|
|
@@ -147,11 +136,6 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
147
136
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
148
137
|
user: "user";
|
|
149
138
|
}>>;
|
|
150
|
-
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
151
|
-
administrativeArea: "administrativeArea";
|
|
152
|
-
location: "location";
|
|
153
|
-
all: "all";
|
|
154
|
-
}>>;
|
|
155
139
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
156
140
|
administrativeArea: "administrativeArea";
|
|
157
141
|
location: "location";
|
|
@@ -179,11 +163,6 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
179
163
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
180
164
|
user: "user";
|
|
181
165
|
}>>;
|
|
182
|
-
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
183
|
-
administrativeArea: "administrativeArea";
|
|
184
|
-
location: "location";
|
|
185
|
-
all: "all";
|
|
186
|
-
}>>;
|
|
187
166
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
188
167
|
administrativeArea: "administrativeArea";
|
|
189
168
|
location: "location";
|
|
@@ -213,11 +192,6 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
213
192
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
214
193
|
user: "user";
|
|
215
194
|
}>>;
|
|
216
|
-
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
217
|
-
administrativeArea: "administrativeArea";
|
|
218
|
-
location: "location";
|
|
219
|
-
all: "all";
|
|
220
|
-
}>>;
|
|
221
195
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
222
196
|
administrativeArea: "administrativeArea";
|
|
223
197
|
location: "location";
|
|
@@ -248,11 +222,6 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
248
222
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
249
223
|
user: "user";
|
|
250
224
|
}>>;
|
|
251
|
-
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
252
|
-
administrativeArea: "administrativeArea";
|
|
253
|
-
location: "location";
|
|
254
|
-
all: "all";
|
|
255
|
-
}>>;
|
|
256
225
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
257
226
|
administrativeArea: "administrativeArea";
|
|
258
227
|
location: "location";
|
|
@@ -344,7 +313,6 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
344
313
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
345
314
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
346
315
|
createdBy: z.ZodOptional<z.ZodString>;
|
|
347
|
-
createdIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
348
316
|
}, z.core.$strip>>;
|
|
349
317
|
}, z.core.$strip>, z.ZodObject<{
|
|
350
318
|
type: z.ZodEnum<{
|
|
@@ -358,7 +326,6 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
358
326
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
359
327
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
360
328
|
createdBy: z.ZodOptional<z.ZodString>;
|
|
361
|
-
createdIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
362
329
|
declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
363
330
|
declaredBy: z.ZodOptional<z.ZodString>;
|
|
364
331
|
}, z.core.$strip>>;
|
|
@@ -374,7 +341,6 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
374
341
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
375
342
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
376
343
|
createdBy: z.ZodOptional<z.ZodString>;
|
|
377
|
-
createdIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
378
344
|
declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
379
345
|
declaredBy: z.ZodOptional<z.ZodString>;
|
|
380
346
|
registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
@@ -386,7 +352,6 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
386
352
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
387
353
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
388
354
|
createdBy: z.ZodOptional<z.ZodString>;
|
|
389
|
-
createdIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
390
355
|
declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
391
356
|
declaredBy: z.ZodOptional<z.ZodString>;
|
|
392
357
|
registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
@@ -430,11 +395,6 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
430
395
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
431
396
|
user: "user";
|
|
432
397
|
}>>;
|
|
433
|
-
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
434
|
-
administrativeArea: "administrativeArea";
|
|
435
|
-
location: "location";
|
|
436
|
-
all: "all";
|
|
437
|
-
}>>;
|
|
438
398
|
}, z.core.$strip>>;
|
|
439
399
|
}, z.core.$strip>, z.ZodObject<{
|
|
440
400
|
type: z.ZodEnum<{
|
|
@@ -454,11 +414,6 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
454
414
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
455
415
|
user: "user";
|
|
456
416
|
}>>;
|
|
457
|
-
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
458
|
-
administrativeArea: "administrativeArea";
|
|
459
|
-
location: "location";
|
|
460
|
-
all: "all";
|
|
461
|
-
}>>;
|
|
462
417
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
463
418
|
administrativeArea: "administrativeArea";
|
|
464
419
|
location: "location";
|
|
@@ -486,11 +441,6 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
486
441
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
487
442
|
user: "user";
|
|
488
443
|
}>>;
|
|
489
|
-
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
490
|
-
administrativeArea: "administrativeArea";
|
|
491
|
-
location: "location";
|
|
492
|
-
all: "all";
|
|
493
|
-
}>>;
|
|
494
444
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
495
445
|
administrativeArea: "administrativeArea";
|
|
496
446
|
location: "location";
|
|
@@ -520,11 +470,6 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
520
470
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
521
471
|
user: "user";
|
|
522
472
|
}>>;
|
|
523
|
-
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
524
|
-
administrativeArea: "administrativeArea";
|
|
525
|
-
location: "location";
|
|
526
|
-
all: "all";
|
|
527
|
-
}>>;
|
|
528
473
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
529
474
|
administrativeArea: "administrativeArea";
|
|
530
475
|
location: "location";
|
|
@@ -555,11 +500,6 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
555
500
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
556
501
|
user: "user";
|
|
557
502
|
}>>;
|
|
558
|
-
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
559
|
-
administrativeArea: "administrativeArea";
|
|
560
|
-
location: "location";
|
|
561
|
-
all: "all";
|
|
562
|
-
}>>;
|
|
563
503
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
564
504
|
administrativeArea: "administrativeArea";
|
|
565
505
|
location: "location";
|
|
@@ -689,7 +629,6 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
689
629
|
event?: string[] | undefined;
|
|
690
630
|
placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
|
|
691
631
|
createdBy?: "user" | undefined;
|
|
692
|
-
createdIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
693
632
|
} | undefined;
|
|
694
633
|
} | {
|
|
695
634
|
type: "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register";
|
|
@@ -697,7 +636,6 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
697
636
|
event?: string[] | undefined;
|
|
698
637
|
placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
|
|
699
638
|
createdBy?: "user" | undefined;
|
|
700
|
-
createdIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
701
639
|
declaredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
702
640
|
declaredBy?: "user" | undefined;
|
|
703
641
|
} | undefined;
|
|
@@ -707,7 +645,6 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
707
645
|
event?: string[] | undefined;
|
|
708
646
|
placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
|
|
709
647
|
createdBy?: "user" | undefined;
|
|
710
|
-
createdIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
711
648
|
declaredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
712
649
|
declaredBy?: "user" | undefined;
|
|
713
650
|
registeredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
@@ -719,7 +656,6 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
719
656
|
event?: string[] | undefined;
|
|
720
657
|
placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
|
|
721
658
|
createdBy?: "user" | undefined;
|
|
722
|
-
createdIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
723
659
|
declaredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
724
660
|
declaredBy?: "user" | undefined;
|
|
725
661
|
registeredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
@@ -732,7 +668,6 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
732
668
|
event?: string[] | undefined;
|
|
733
669
|
placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
|
|
734
670
|
createdBy?: "user" | undefined;
|
|
735
|
-
createdIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
736
671
|
declaredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
737
672
|
declaredBy?: "user" | undefined;
|
|
738
673
|
registeredIn?: "administrativeArea" | "location" | "all" | undefined;
|
package/dist/scopes/index.js
CHANGED
|
@@ -148,8 +148,7 @@ var userRole = z3.preprocess(
|
|
|
148
148
|
var scopeOptionsPlaceEvent = z3.object({
|
|
149
149
|
event: scopeByEvent,
|
|
150
150
|
placeOfEvent: JurisdictionFilter.optional(),
|
|
151
|
-
createdBy: UserFilter.optional()
|
|
152
|
-
createdIn: JurisdictionFilter.optional()
|
|
151
|
+
createdBy: UserFilter.optional()
|
|
153
152
|
}).describe("Options applicable to all record scopes.");
|
|
154
153
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
155
154
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -189,8 +188,7 @@ var ScopeOptionKey = AllScopeOptions.keyof();
|
|
|
189
188
|
var ResolvedScopeOptionsPlaceEvent = z3.object({
|
|
190
189
|
event: scopeByEvent,
|
|
191
190
|
placeOfEvent: UUID.nullish(),
|
|
192
|
-
createdBy: z3.string().optional()
|
|
193
|
-
createdIn: UUID.nullish()
|
|
191
|
+
createdBy: z3.string().optional()
|
|
194
192
|
}).describe(
|
|
195
193
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
196
194
|
);
|
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|