@opencrvs/toolkit 2.0.1-rc.7e65cec → 2.0.1-rc.837f69d
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 +6 -2
- package/dist/cli.js +8 -4
- package/dist/commons/api/router.d.ts +42 -15
- package/dist/commons/conditionals/conditionals.d.ts +3 -3
- package/dist/commons/events/ActionConfig.d.ts +4 -0
- package/dist/commons/events/ActionDocument.d.ts +2 -2
- package/dist/commons/events/AdvancedSearchConfig.d.ts +12 -0
- package/dist/commons/events/Draft.d.ts +1 -1
- package/dist/commons/events/EventDocument.d.ts +1 -1
- package/dist/commons/events/EventMetadata.d.ts +1 -1
- package/dist/commons/events/FieldConfig.d.ts +10 -0
- package/dist/commons/events/FormConfig.d.ts +6 -0
- package/dist/commons/events/PageConfig.d.ts +4 -0
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +4 -4
- package/dist/commons/events/WorkqueueConfig.d.ts +5 -5
- package/dist/commons/events/state/utils.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +5 -1
- package/dist/conditionals/index.js +6 -2
- package/dist/events/index.js +27 -2
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts +1 -1
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
- package/dist/migrations/v2.0/checkout-upstream-files.js +1 -1
- package/dist/migrations/v2.0/index.js +8 -4
- package/dist/migrations/v2.0/merge-infrastructure-directory.js +3 -3
- package/dist/notification/index.js +10 -2
- package/dist/scopes/index.d.ts +108 -0
- package/dist/scopes/index.js +6 -2
- package/opencrvs-toolkit-2.0.1-rc.837f69d.tgz +0 -0
- package/package.json +1 -1
- package/opencrvs-toolkit-2.0.1-rc.7e65cec.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
|
|
|
@@ -663,7 +663,9 @@ var userRole = z11.preprocess(
|
|
|
663
663
|
).describe("User role, e.g. admin, field agent");
|
|
664
664
|
var scopeOptionsPlaceEvent = z11.object({
|
|
665
665
|
event: scopeByEvent,
|
|
666
|
-
placeOfEvent: JurisdictionFilter.optional()
|
|
666
|
+
placeOfEvent: JurisdictionFilter.optional(),
|
|
667
|
+
createdBy: UserFilter.optional(),
|
|
668
|
+
createdIn: JurisdictionFilter.optional()
|
|
667
669
|
}).describe("Options applicable to all record scopes.");
|
|
668
670
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
669
671
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -702,7 +704,9 @@ var AllScopeOptions = z11.object({
|
|
|
702
704
|
var ScopeOptionKey = AllScopeOptions.keyof();
|
|
703
705
|
var ResolvedScopeOptionsPlaceEvent = z11.object({
|
|
704
706
|
event: scopeByEvent,
|
|
705
|
-
placeOfEvent: UUID.nullish()
|
|
707
|
+
placeOfEvent: UUID.nullish(),
|
|
708
|
+
createdBy: z11.string().optional(),
|
|
709
|
+
createdIn: UUID.nullish()
|
|
706
710
|
}).describe(
|
|
707
711
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
708
712
|
);
|
package/dist/cli.js
CHANGED
|
@@ -2190,7 +2190,9 @@ var userRole = z3.preprocess(
|
|
|
2190
2190
|
).describe("User role, e.g. admin, field agent");
|
|
2191
2191
|
var scopeOptionsPlaceEvent = z3.object({
|
|
2192
2192
|
event: scopeByEvent,
|
|
2193
|
-
placeOfEvent: JurisdictionFilter.optional()
|
|
2193
|
+
placeOfEvent: JurisdictionFilter.optional(),
|
|
2194
|
+
createdBy: UserFilter.optional(),
|
|
2195
|
+
createdIn: JurisdictionFilter.optional()
|
|
2194
2196
|
}).describe("Options applicable to all record scopes.");
|
|
2195
2197
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
2196
2198
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -2229,7 +2231,9 @@ var AllScopeOptions = z3.object({
|
|
|
2229
2231
|
var ScopeOptionKey = AllScopeOptions.keyof();
|
|
2230
2232
|
var ResolvedScopeOptionsPlaceEvent = z3.object({
|
|
2231
2233
|
event: scopeByEvent,
|
|
2232
|
-
placeOfEvent: UUID.nullish()
|
|
2234
|
+
placeOfEvent: UUID.nullish(),
|
|
2235
|
+
createdBy: z3.string().optional(),
|
|
2236
|
+
createdIn: UUID.nullish()
|
|
2233
2237
|
}).describe(
|
|
2234
2238
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
2235
2239
|
);
|
|
@@ -4300,7 +4304,7 @@ Saved ${handlerRelPath}.`);
|
|
|
4300
4304
|
// src/migrations/v2.0/checkout-upstream-files.ts
|
|
4301
4305
|
var import_child_process = require("child_process");
|
|
4302
4306
|
var UPSTREAM_URL = "https://github.com/opencrvs/opencrvs-countryconfig.git";
|
|
4303
|
-
var UPSTREAM_BRANCH = "release
|
|
4307
|
+
var UPSTREAM_BRANCH = "release/2.0.0";
|
|
4304
4308
|
var TEMP_REMOTE = "opencrvs-upgrade-v19-v20-codemod";
|
|
4305
4309
|
var FILES_TO_CHECKOUT = [
|
|
4306
4310
|
"src/analytics/analytics.ts",
|
|
@@ -4838,7 +4842,7 @@ var import_os = require("os");
|
|
|
4838
4842
|
var import_path24 = require("path");
|
|
4839
4843
|
var TEMP_REMOTE2 = "opencrvs-upgrade-v19-v20-codemod-merge-infra";
|
|
4840
4844
|
var INFRASTRUCTURE_DIR = "infrastructure";
|
|
4841
|
-
var BASE_BRANCH = "release
|
|
4845
|
+
var BASE_BRANCH = "release/1.9.15";
|
|
4842
4846
|
function gitShowBytes(ref, path24) {
|
|
4843
4847
|
try {
|
|
4844
4848
|
const buf = (0, import_child_process2.execFileSync)("git", ["show", `${ref}:${path24}`], {
|
|
@@ -413,10 +413,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
413
413
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
414
414
|
} | {
|
|
415
415
|
id: string & import("zod").$brand<"UUID">;
|
|
416
|
+
createdBy: string;
|
|
416
417
|
transactionId: string;
|
|
417
418
|
createdByUserType: "system" | "user";
|
|
418
419
|
createdAt: string;
|
|
419
|
-
createdBy: string;
|
|
420
420
|
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
421
421
|
status: "Rejected";
|
|
422
422
|
createdByRole?: string | undefined;
|
|
@@ -725,10 +725,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
725
725
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
726
726
|
} | {
|
|
727
727
|
id: string & import("zod").$brand<"UUID">;
|
|
728
|
+
createdBy: string;
|
|
728
729
|
transactionId: string;
|
|
729
730
|
createdByUserType: "system" | "user";
|
|
730
731
|
createdAt: string;
|
|
731
|
-
createdBy: string;
|
|
732
732
|
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
733
733
|
status: "Rejected";
|
|
734
734
|
createdByRole?: string | undefined;
|
|
@@ -1036,10 +1036,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1036
1036
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1037
1037
|
} | {
|
|
1038
1038
|
id: string & import("zod").$brand<"UUID">;
|
|
1039
|
+
createdBy: string;
|
|
1039
1040
|
transactionId: string;
|
|
1040
1041
|
createdByUserType: "system" | "user";
|
|
1041
1042
|
createdAt: string;
|
|
1042
|
-
createdBy: string;
|
|
1043
1043
|
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
1044
1044
|
status: "Rejected";
|
|
1045
1045
|
createdByRole?: string | undefined;
|
|
@@ -1091,10 +1091,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1091
1091
|
createdAt: string;
|
|
1092
1092
|
action: {
|
|
1093
1093
|
type: "CREATE" | "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN" | "CUSTOM";
|
|
1094
|
+
createdBy: string;
|
|
1094
1095
|
transactionId: string;
|
|
1095
1096
|
createdByUserType: "system" | "user";
|
|
1096
1097
|
createdAt: string;
|
|
1097
|
-
createdBy: string;
|
|
1098
1098
|
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1099
1099
|
status: "Requested" | "Accepted" | "Rejected";
|
|
1100
1100
|
createdByRole?: string | undefined;
|
|
@@ -1126,10 +1126,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1126
1126
|
createdAt: string;
|
|
1127
1127
|
action: {
|
|
1128
1128
|
type: "CREATE" | "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN" | "CUSTOM";
|
|
1129
|
+
createdBy: string;
|
|
1129
1130
|
transactionId: string;
|
|
1130
1131
|
createdByUserType: "system" | "user";
|
|
1131
1132
|
createdAt: string;
|
|
1132
|
-
createdBy: string;
|
|
1133
1133
|
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1134
1134
|
status: "Requested" | "Accepted" | "Rejected";
|
|
1135
1135
|
createdByRole?: string | undefined;
|
|
@@ -1784,10 +1784,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1784
1784
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1785
1785
|
} | {
|
|
1786
1786
|
id: string & import("zod").$brand<"UUID">;
|
|
1787
|
+
createdBy: string;
|
|
1787
1788
|
transactionId: string;
|
|
1788
1789
|
createdByUserType: "system" | "user";
|
|
1789
1790
|
createdAt: string;
|
|
1790
|
-
createdBy: string;
|
|
1791
1791
|
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
1792
1792
|
status: "Rejected";
|
|
1793
1793
|
createdByRole?: string | undefined;
|
|
@@ -2127,10 +2127,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2127
2127
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
2128
2128
|
} | {
|
|
2129
2129
|
id: string & import("zod").$brand<"UUID">;
|
|
2130
|
+
createdBy: string;
|
|
2130
2131
|
transactionId: string;
|
|
2131
2132
|
createdByUserType: "system" | "user";
|
|
2132
2133
|
createdAt: string;
|
|
2133
|
-
createdBy: string;
|
|
2134
2134
|
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
2135
2135
|
status: "Rejected";
|
|
2136
2136
|
createdByRole?: string | undefined;
|
|
@@ -4213,10 +4213,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4213
4213
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
4214
4214
|
} | {
|
|
4215
4215
|
id: string & import("zod").$brand<"UUID">;
|
|
4216
|
+
createdBy: string;
|
|
4216
4217
|
transactionId: string;
|
|
4217
4218
|
createdByUserType: "system" | "user";
|
|
4218
4219
|
createdAt: string;
|
|
4219
|
-
createdBy: string;
|
|
4220
4220
|
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
4221
4221
|
status: "Rejected";
|
|
4222
4222
|
createdByRole?: string | undefined;
|
|
@@ -4824,10 +4824,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4824
4824
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
4825
4825
|
} | {
|
|
4826
4826
|
id: string & import("zod").$brand<"UUID">;
|
|
4827
|
+
createdBy: string;
|
|
4827
4828
|
transactionId: string;
|
|
4828
4829
|
createdByUserType: "system" | "user";
|
|
4829
4830
|
createdAt: string;
|
|
4830
|
-
createdBy: string;
|
|
4831
4831
|
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
4832
4832
|
status: "Rejected";
|
|
4833
4833
|
createdByRole?: string | undefined;
|
|
@@ -5145,10 +5145,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5145
5145
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
5146
5146
|
} | {
|
|
5147
5147
|
id: string & import("zod").$brand<"UUID">;
|
|
5148
|
+
createdBy: string;
|
|
5148
5149
|
transactionId: string;
|
|
5149
5150
|
createdByUserType: "system" | "user";
|
|
5150
5151
|
createdAt: string;
|
|
5151
|
-
createdBy: string;
|
|
5152
5152
|
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
5153
5153
|
status: "Rejected";
|
|
5154
5154
|
createdByRole?: string | undefined;
|
|
@@ -6399,10 +6399,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6399
6399
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
6400
6400
|
} | {
|
|
6401
6401
|
id: string & import("zod").$brand<"UUID">;
|
|
6402
|
+
createdBy: string;
|
|
6402
6403
|
transactionId: string;
|
|
6403
6404
|
createdByUserType: "system" | "user";
|
|
6404
6405
|
createdAt: string;
|
|
6405
|
-
createdBy: string;
|
|
6406
6406
|
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
6407
6407
|
status: "Rejected";
|
|
6408
6408
|
createdByRole?: string | undefined;
|
|
@@ -6719,10 +6719,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6719
6719
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
6720
6720
|
} | {
|
|
6721
6721
|
id: string & import("zod").$brand<"UUID">;
|
|
6722
|
+
createdBy: string;
|
|
6722
6723
|
transactionId: string;
|
|
6723
6724
|
createdByUserType: "system" | "user";
|
|
6724
6725
|
createdAt: string;
|
|
6725
|
-
createdBy: string;
|
|
6726
6726
|
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
6727
6727
|
status: "Rejected";
|
|
6728
6728
|
createdByRole?: string | undefined;
|
|
@@ -7082,10 +7082,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7082
7082
|
originalActionId?: string | null | undefined;
|
|
7083
7083
|
} | {
|
|
7084
7084
|
id: string;
|
|
7085
|
+
createdBy: string;
|
|
7085
7086
|
transactionId: string;
|
|
7086
7087
|
createdByUserType: "system" | "user";
|
|
7087
7088
|
createdAt: string;
|
|
7088
|
-
createdBy: string;
|
|
7089
7089
|
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
7090
7090
|
status: "Rejected";
|
|
7091
7091
|
createdByRole?: string | undefined;
|
|
@@ -7803,6 +7803,18 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7803
7803
|
output: void;
|
|
7804
7804
|
meta: object;
|
|
7805
7805
|
}>;
|
|
7806
|
+
upsert: import("@trpc/server").TRPCMutationProcedure<{
|
|
7807
|
+
input: {
|
|
7808
|
+
id: string;
|
|
7809
|
+
name: string;
|
|
7810
|
+
administrativeAreaId: string | null;
|
|
7811
|
+
validUntil: string | null;
|
|
7812
|
+
locationType: string | null;
|
|
7813
|
+
externalId?: string | null | undefined;
|
|
7814
|
+
};
|
|
7815
|
+
output: void;
|
|
7816
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
7817
|
+
}>;
|
|
7806
7818
|
get: import("@trpc/server").TRPCQueryProcedure<{
|
|
7807
7819
|
input: {
|
|
7808
7820
|
id: string;
|
|
@@ -8234,6 +8246,17 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8234
8246
|
output: void;
|
|
8235
8247
|
meta: object;
|
|
8236
8248
|
}>;
|
|
8249
|
+
upsert: import("@trpc/server").TRPCMutationProcedure<{
|
|
8250
|
+
input: {
|
|
8251
|
+
id: string;
|
|
8252
|
+
name: string;
|
|
8253
|
+
parentId: string | null;
|
|
8254
|
+
validUntil: string | null;
|
|
8255
|
+
externalId?: string | null | undefined;
|
|
8256
|
+
};
|
|
8257
|
+
output: void;
|
|
8258
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8259
|
+
}>;
|
|
8237
8260
|
}>>;
|
|
8238
8261
|
integrations: import("@trpc/server").TRPCBuiltRouter<{
|
|
8239
8262
|
ctx: Partial<{
|
|
@@ -8261,6 +8284,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8261
8284
|
input: {
|
|
8262
8285
|
name: string;
|
|
8263
8286
|
scopes: string[];
|
|
8287
|
+
credentials?: {
|
|
8288
|
+
clientId: string;
|
|
8289
|
+
clientSecret: string;
|
|
8290
|
+
} | undefined;
|
|
8264
8291
|
};
|
|
8265
8292
|
output: {
|
|
8266
8293
|
clientId: string;
|
|
@@ -8291,7 +8318,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8291
8318
|
scopes: string[];
|
|
8292
8319
|
status: string;
|
|
8293
8320
|
createdAt: string;
|
|
8294
|
-
createdBy: string & import("zod").$brand<"UUID"
|
|
8321
|
+
createdBy: (string & import("zod").$brand<"UUID">) | null;
|
|
8295
8322
|
}[];
|
|
8296
8323
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8297
8324
|
}>;
|
|
@@ -8306,7 +8333,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8306
8333
|
status: string;
|
|
8307
8334
|
shaSecret: string | null;
|
|
8308
8335
|
createdAt: string;
|
|
8309
|
-
createdBy: string & import("zod").$brand<"UUID"
|
|
8336
|
+
createdBy: (string & import("zod").$brand<"UUID">) | null;
|
|
8310
8337
|
};
|
|
8311
8338
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8312
8339
|
}>;
|
|
@@ -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" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
97
|
+
$option: "role" | "event" | "placeOfEvent" | "createdBy" | "createdIn" | "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" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
102
|
+
$option: "role" | "event" | "placeOfEvent" | "createdBy" | "createdIn" | "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" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
106
|
+
$option: "role" | "event" | "placeOfEvent" | "createdBy" | "createdIn" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
107
107
|
};
|
|
108
108
|
};
|
|
109
109
|
};
|
|
@@ -214,6 +214,7 @@ 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>;
|
|
217
218
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
218
219
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
219
220
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -221,6 +222,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
221
222
|
id: z.ZodString;
|
|
222
223
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
223
224
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
225
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
224
226
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
225
227
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
226
228
|
type: z.ZodLiteral<"VERIFICATION">;
|
|
@@ -270,6 +272,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
270
272
|
id: z.ZodString;
|
|
271
273
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
272
274
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
275
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
273
276
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
274
277
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
275
278
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -277,6 +280,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
277
280
|
id: z.ZodString;
|
|
278
281
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
279
282
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
283
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
280
284
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
281
285
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
282
286
|
type: z.ZodLiteral<"VERIFICATION">;
|
|
@@ -661,13 +661,13 @@ export declare const ActionDocument: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
661
661
|
export type ActionDocument = z.infer<typeof ActionDocument>;
|
|
662
662
|
export declare const AsyncRejectActionDocument: z.ZodObject<{
|
|
663
663
|
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
664
|
+
createdBy: z.ZodString;
|
|
664
665
|
transactionId: z.ZodString;
|
|
665
666
|
createdByUserType: z.ZodEnum<{
|
|
666
667
|
user: "user";
|
|
667
668
|
system: "system";
|
|
668
669
|
}>;
|
|
669
670
|
createdAt: z.ZodString;
|
|
670
|
-
createdBy: z.ZodString;
|
|
671
671
|
createdByRole: z.ZodOptional<z.ZodString>;
|
|
672
672
|
createdBySignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">>>;
|
|
673
673
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
@@ -1100,13 +1100,13 @@ export declare const Action: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1100
1100
|
customActionType: z.ZodString;
|
|
1101
1101
|
}, z.core.$strip>], "type">, z.ZodObject<{
|
|
1102
1102
|
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
1103
|
+
createdBy: z.ZodString;
|
|
1103
1104
|
transactionId: z.ZodString;
|
|
1104
1105
|
createdByUserType: z.ZodEnum<{
|
|
1105
1106
|
user: "user";
|
|
1106
1107
|
system: "system";
|
|
1107
1108
|
}>;
|
|
1108
1109
|
createdAt: z.ZodString;
|
|
1109
|
-
createdBy: z.ZodString;
|
|
1110
1110
|
createdByRole: z.ZodOptional<z.ZodString>;
|
|
1111
1111
|
createdBySignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">>>;
|
|
1112
1112
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|