@opencrvs/toolkit 2.0.0-rc.ca1536b → 2.0.0-rc.ca3fe84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/build.sh +3 -2
- package/create-countryconfig/index.js +50 -20
- package/create-countryconfig/package.json +12 -2
- package/dist/application-config/index.js +273 -98
- package/dist/cli.js +3354 -51
- package/dist/commons/api/router.d.ts +3005 -2570
- package/dist/commons/application-config/index.d.ts +7 -6
- package/dist/commons/conditionals/conditionals.d.ts +293 -234
- package/dist/commons/conditionals/validate.d.ts +51 -2
- package/dist/commons/events/ActionConfig.d.ts +93 -67
- package/dist/commons/events/ActionDocument.d.ts +113 -107
- package/dist/commons/events/ActionInput.d.ts +42 -36
- package/dist/commons/events/ActionType.d.ts +57 -57
- package/dist/commons/events/AdvancedSearchConfig.d.ts +651 -297
- package/dist/commons/events/AuditLog.d.ts +41 -41
- package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
- package/dist/commons/events/Conditional.d.ts +3 -3
- package/dist/commons/events/CountryConfigQueryInput.d.ts +603 -561
- package/dist/commons/events/Draft.d.ts +33 -34
- package/dist/commons/events/DynamicFieldValue.d.ts +9 -9
- package/dist/commons/events/EventConfig.d.ts +5 -3
- package/dist/commons/events/EventDocument.d.ts +46 -43
- package/dist/commons/events/EventIndex.d.ts +76 -51
- package/dist/commons/events/EventMetadata.d.ts +60 -34
- package/dist/commons/events/FieldConfig.d.ts +710 -372
- package/dist/commons/events/FieldType.d.ts +51 -50
- package/dist/commons/events/FieldTypeMapping.d.ts +101 -101
- package/dist/commons/events/FieldValue.d.ts +18 -12
- package/dist/commons/events/Flag.d.ts +15 -15
- package/dist/commons/events/TemplateConfig.d.ts +1 -1
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +40 -40
- package/dist/commons/events/WorkqueueConfig.d.ts +981 -942
- package/dist/commons/events/deduplication.d.ts +1 -1
- package/dist/commons/events/event.d.ts +2 -2
- package/dist/commons/events/field.d.ts +112 -189
- package/dist/commons/events/index.d.ts +2 -0
- package/dist/commons/events/locations.d.ts +5 -4
- package/dist/commons/events/mocks.test.utils.d.ts +2 -2
- package/dist/commons/events/scopes.d.ts +4 -4
- package/dist/commons/events/state/flags.d.ts +16 -0
- package/dist/commons/events/state/index.d.ts +23 -15
- package/dist/commons/events/state/utils.d.ts +25 -291
- package/dist/commons/events/test.utils.d.ts +33 -33
- package/dist/commons/events/utils.d.ts +120 -109
- package/dist/commons/notification/UserNotifications.d.ts +10 -10
- package/dist/conditionals/index.js +63 -5
- package/dist/environment/custom-types.d.ts +33 -0
- package/dist/environment/custom-types.d.ts.map +1 -0
- package/dist/environment/custom-types.js +12 -0
- package/dist/environment/derived-variables.d.ts +134 -0
- package/dist/environment/derived-variables.d.ts.map +1 -0
- package/dist/environment/derived-variables.js +169 -0
- package/dist/environment/editor-questions.d.ts +4 -0
- package/dist/environment/editor-questions.d.ts.map +1 -0
- package/dist/environment/editor-questions.js +67 -0
- package/dist/environment/git.d.ts +5 -0
- package/dist/environment/git.d.ts.map +1 -0
- package/dist/environment/git.js +38 -0
- package/dist/environment/github.d.ts +26 -0
- package/dist/environment/github.d.ts.map +1 -0
- package/dist/environment/github.js +247 -0
- package/dist/environment/index.d.ts +5 -0
- package/dist/environment/index.d.ts.map +1 -0
- package/dist/environment/index.js +71 -0
- package/dist/environment/logger.d.ts +6 -0
- package/dist/environment/logger.d.ts.map +1 -0
- package/dist/environment/logger.js +25 -0
- package/dist/environment/manage-users.d.ts +11 -0
- package/dist/environment/manage-users.d.ts.map +1 -0
- package/dist/environment/manage-users.js +507 -0
- package/dist/environment/questions-helper.d.ts +15 -0
- package/dist/environment/questions-helper.d.ts.map +1 -0
- package/dist/environment/questions-helper.js +70 -0
- package/dist/environment/questions.d.ts +200 -0
- package/dist/environment/questions.d.ts.map +1 -0
- package/dist/environment/questions.js +412 -0
- package/dist/environment/setup-environment.d.ts +2 -0
- package/dist/environment/setup-environment.d.ts.map +1 -0
- package/dist/environment/setup-environment.js +788 -0
- package/dist/environment/ssh-keygen.d.ts +5 -0
- package/dist/environment/ssh-keygen.d.ts.map +1 -0
- package/dist/environment/ssh-keygen.js +21 -0
- package/dist/environment/swarm-to-k8s.d.ts +2 -0
- package/dist/environment/swarm-to-k8s.d.ts.map +1 -0
- package/dist/environment/swarm-to-k8s.js +183 -0
- package/dist/environment/templates.d.ts +27 -0
- package/dist/environment/templates.d.ts.map +1 -0
- package/dist/environment/templates.js +163 -0
- package/dist/environment/update-workflows.d.ts +2 -0
- package/dist/environment/update-workflows.d.ts.map +1 -0
- package/dist/environment/update-workflows.js +179 -0
- package/dist/environment/users.d.ts +2 -0
- package/dist/environment/users.d.ts.map +1 -0
- package/dist/environment/users.js +122 -0
- package/dist/environment/utils.d.ts +18 -0
- package/dist/environment/utils.d.ts.map +1 -0
- package/dist/environment/utils.js +110 -0
- package/dist/events/deduplication.d.ts +1 -1
- package/dist/events/index.js +1088 -237
- 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/convert-config-files-to-ts.js +17 -7
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts +3 -0
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts.map +1 -0
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.js +110 -0
- package/dist/migrations/v2.0/index.d.ts.map +1 -1
- package/dist/migrations/v2.0/index.js +114 -12
- package/dist/migrations/v2.0/migrate-application-config-url.js +4 -3
- package/dist/migrations/v2.0/remove-hearth-migrations.js +17 -7
- package/dist/notification/index.js +899 -135
- package/dist/scopes/index.d.ts +209 -123
- package/dist/scopes/index.js +20 -7
- package/dist/templates/charts-values/dependencies/values.override.yaml +4 -0
- package/dist/templates/charts-values/dependencies/values.yaml +83 -0
- package/dist/templates/charts-values/opencrvs-services/values.override.yaml +4 -0
- package/dist/templates/charts-values/opencrvs-services/values.yaml +81 -0
- package/dist/templates/charts-values/traefik/values.override.yaml +4 -0
- package/dist/templates/charts-values/traefik/values.yaml +115 -0
- package/dist/templates/inventory/inventory.template.yml +100 -0
- package/dist/templates/inventory/production.example.yml +77 -0
- package/dist/templates/inventory/qa.example.yml +48 -0
- package/opencrvs-toolkit-2.0.0-rc.ca3fe84.tgz +0 -0
- package/package.json +21 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.0.0-rc.ca1536b.tgz +0 -0
package/dist/scopes/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import * as z from 'zod/v4';
|
|
|
2
2
|
import { Role } from './roles';
|
|
3
3
|
export declare const JurisdictionFilter: z.ZodEnum<{
|
|
4
4
|
administrativeArea: "administrativeArea";
|
|
5
|
-
location: "location";
|
|
6
5
|
all: "all";
|
|
6
|
+
location: "location";
|
|
7
7
|
}>;
|
|
8
8
|
export type JurisdictionFilter = z.infer<typeof JurisdictionFilter>;
|
|
9
9
|
export declare const UserFilter: z.ZodEnum<{
|
|
@@ -14,68 +14,78 @@ export type UserFilter = z.infer<typeof UserFilter>;
|
|
|
14
14
|
* The different types of scopes that can be used to control access to records. Each type has different options that can be used to further filter the records that the scope applies to.
|
|
15
15
|
* When adding new scope types, they should be added to the appropriate section based on the options they require.
|
|
16
16
|
*
|
|
17
|
-
* @see scopeOptionsPlaceEvent @see
|
|
17
|
+
* @see scopeOptionsPlaceEvent @see scopeOptionsDeclaredOrNotified @see scopeOptionsFull
|
|
18
18
|
*/
|
|
19
19
|
export declare const RecordScopeTypeV2: z.ZodEnum<{
|
|
20
|
-
"record.
|
|
20
|
+
"record.archive": "record.archive";
|
|
21
|
+
"record.correct": "record.correct";
|
|
21
22
|
"record.create": "record.create";
|
|
22
|
-
"record.
|
|
23
|
+
"record.custom-action": "record.custom-action";
|
|
23
24
|
"record.declare": "record.declare";
|
|
24
|
-
"record.notify": "record.notify";
|
|
25
25
|
"record.edit": "record.edit";
|
|
26
|
-
"record.
|
|
27
|
-
"record.archive": "record.archive";
|
|
28
|
-
"record.review-duplicates": "record.review-duplicates";
|
|
29
|
-
"record.register": "record.register";
|
|
26
|
+
"record.notify": "record.notify";
|
|
30
27
|
"record.print-certified-copies": "record.print-certified-copies";
|
|
28
|
+
"record.read": "record.read";
|
|
29
|
+
"record.register": "record.register";
|
|
30
|
+
"record.reject": "record.reject";
|
|
31
31
|
"record.request-correction": "record.request-correction";
|
|
32
|
-
"record.
|
|
32
|
+
"record.review-duplicates": "record.review-duplicates";
|
|
33
|
+
"record.search": "record.search";
|
|
33
34
|
"record.unassign-others": "record.unassign-others";
|
|
34
|
-
"record.custom-action": "record.custom-action";
|
|
35
35
|
}>;
|
|
36
36
|
export type RecordScopeTypeV2 = z.infer<typeof RecordScopeTypeV2>;
|
|
37
37
|
declare const AllScopeOptions: z.ZodObject<{
|
|
38
|
-
ids: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodArray<z.ZodString>>;
|
|
39
|
-
accessLevel: z.ZodOptional<z.ZodEnum<{
|
|
40
|
-
administrativeArea: "administrativeArea";
|
|
41
|
-
location: "location";
|
|
42
|
-
all: "all";
|
|
43
|
-
}>>;
|
|
44
|
-
role: z.ZodOptional<z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
|
|
45
38
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
46
39
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
47
40
|
administrativeArea: "administrativeArea";
|
|
41
|
+
all: "all";
|
|
48
42
|
location: "location";
|
|
43
|
+
}>>;
|
|
44
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
45
|
+
administrativeArea: "administrativeArea";
|
|
49
46
|
all: "all";
|
|
47
|
+
location: "location";
|
|
48
|
+
}>>;
|
|
49
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
50
|
+
user: "user";
|
|
50
51
|
}>>;
|
|
51
52
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
52
53
|
administrativeArea: "administrativeArea";
|
|
53
|
-
location: "location";
|
|
54
54
|
all: "all";
|
|
55
|
+
location: "location";
|
|
55
56
|
}>>;
|
|
56
57
|
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
57
58
|
user: "user";
|
|
58
59
|
}>>;
|
|
59
60
|
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
60
61
|
administrativeArea: "administrativeArea";
|
|
61
|
-
location: "location";
|
|
62
62
|
all: "all";
|
|
63
|
+
location: "location";
|
|
63
64
|
}>>;
|
|
64
65
|
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
65
66
|
user: "user";
|
|
66
67
|
}>>;
|
|
68
|
+
accessLevel: z.ZodOptional<z.ZodEnum<{
|
|
69
|
+
administrativeArea: "administrativeArea";
|
|
70
|
+
all: "all";
|
|
71
|
+
location: "location";
|
|
72
|
+
}>>;
|
|
73
|
+
role: z.ZodOptional<z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
|
|
74
|
+
ids: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodArray<z.ZodString>>;
|
|
67
75
|
}, z.core.$strip>;
|
|
68
76
|
type AllScopeOptions = z.infer<typeof AllScopeOptions>;
|
|
69
77
|
export declare const ScopeOptionKey: z.ZodEnum<{
|
|
70
|
-
|
|
78
|
+
accessLevel: "accessLevel";
|
|
79
|
+
declaredBy: "declaredBy";
|
|
80
|
+
declaredIn: "declaredIn";
|
|
71
81
|
event: "event";
|
|
82
|
+
ids: "ids";
|
|
83
|
+
notifiedBy: "notifiedBy";
|
|
84
|
+
notifiedIn: "notifiedIn";
|
|
72
85
|
placeOfEvent: "placeOfEvent";
|
|
73
|
-
declaredIn: "declaredIn";
|
|
74
|
-
declaredBy: "declaredBy";
|
|
75
|
-
registeredIn: "registeredIn";
|
|
76
86
|
registeredBy: "registeredBy";
|
|
77
|
-
|
|
78
|
-
|
|
87
|
+
registeredIn: "registeredIn";
|
|
88
|
+
role: "role";
|
|
79
89
|
}>;
|
|
80
90
|
export type ScopeOptionKey = z.infer<typeof ScopeOptionKey>;
|
|
81
91
|
export declare const ScopesWithPlaceEventOptions: z.ZodEnum<{
|
|
@@ -84,17 +94,17 @@ export declare const ScopesWithPlaceEventOptions: z.ZodEnum<{
|
|
|
84
94
|
"record.notify": "record.notify";
|
|
85
95
|
}>;
|
|
86
96
|
export declare const ScopesWithDeclaredOptions: z.ZodEnum<{
|
|
97
|
+
"record.archive": "record.archive";
|
|
87
98
|
"record.edit": "record.edit";
|
|
99
|
+
"record.register": "record.register";
|
|
88
100
|
"record.reject": "record.reject";
|
|
89
|
-
"record.archive": "record.archive";
|
|
90
101
|
"record.review-duplicates": "record.review-duplicates";
|
|
91
|
-
"record.register": "record.register";
|
|
92
102
|
}>;
|
|
93
103
|
export declare const ScopesWithFullOptions: z.ZodEnum<{
|
|
94
|
-
"record.
|
|
104
|
+
"record.correct": "record.correct";
|
|
95
105
|
"record.read": "record.read";
|
|
96
106
|
"record.request-correction": "record.request-correction";
|
|
97
|
-
"record.
|
|
107
|
+
"record.search": "record.search";
|
|
98
108
|
"record.unassign-others": "record.unassign-others";
|
|
99
109
|
}>;
|
|
100
110
|
export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -107,29 +117,37 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
107
117
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
108
118
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
109
119
|
administrativeArea: "administrativeArea";
|
|
110
|
-
location: "location";
|
|
111
120
|
all: "all";
|
|
121
|
+
location: "location";
|
|
112
122
|
}>>;
|
|
113
123
|
}, z.core.$strip>>;
|
|
114
124
|
}, z.core.$strip>, z.ZodObject<{
|
|
115
125
|
type: z.ZodEnum<{
|
|
126
|
+
"record.archive": "record.archive";
|
|
116
127
|
"record.edit": "record.edit";
|
|
128
|
+
"record.register": "record.register";
|
|
117
129
|
"record.reject": "record.reject";
|
|
118
|
-
"record.archive": "record.archive";
|
|
119
130
|
"record.review-duplicates": "record.review-duplicates";
|
|
120
|
-
"record.register": "record.register";
|
|
121
131
|
}>;
|
|
122
132
|
options: z.ZodOptional<z.ZodObject<{
|
|
123
133
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
124
134
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
125
135
|
administrativeArea: "administrativeArea";
|
|
136
|
+
all: "all";
|
|
126
137
|
location: "location";
|
|
138
|
+
}>>;
|
|
139
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
140
|
+
administrativeArea: "administrativeArea";
|
|
127
141
|
all: "all";
|
|
142
|
+
location: "location";
|
|
143
|
+
}>>;
|
|
144
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
145
|
+
user: "user";
|
|
128
146
|
}>>;
|
|
129
147
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
130
148
|
administrativeArea: "administrativeArea";
|
|
131
|
-
location: "location";
|
|
132
149
|
all: "all";
|
|
150
|
+
location: "location";
|
|
133
151
|
}>>;
|
|
134
152
|
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
135
153
|
user: "user";
|
|
@@ -137,31 +155,39 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
137
155
|
}, z.core.$strip>>;
|
|
138
156
|
}, z.core.$strip>, z.ZodObject<{
|
|
139
157
|
type: z.ZodEnum<{
|
|
140
|
-
"record.
|
|
158
|
+
"record.correct": "record.correct";
|
|
141
159
|
"record.read": "record.read";
|
|
142
160
|
"record.request-correction": "record.request-correction";
|
|
143
|
-
"record.
|
|
161
|
+
"record.search": "record.search";
|
|
144
162
|
"record.unassign-others": "record.unassign-others";
|
|
145
163
|
}>;
|
|
146
164
|
options: z.ZodOptional<z.ZodObject<{
|
|
147
165
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
148
166
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
149
167
|
administrativeArea: "administrativeArea";
|
|
168
|
+
all: "all";
|
|
150
169
|
location: "location";
|
|
170
|
+
}>>;
|
|
171
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
172
|
+
administrativeArea: "administrativeArea";
|
|
151
173
|
all: "all";
|
|
174
|
+
location: "location";
|
|
175
|
+
}>>;
|
|
176
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
177
|
+
user: "user";
|
|
152
178
|
}>>;
|
|
153
179
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
154
180
|
administrativeArea: "administrativeArea";
|
|
155
|
-
location: "location";
|
|
156
181
|
all: "all";
|
|
182
|
+
location: "location";
|
|
157
183
|
}>>;
|
|
158
184
|
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
159
185
|
user: "user";
|
|
160
186
|
}>>;
|
|
161
187
|
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
162
188
|
administrativeArea: "administrativeArea";
|
|
163
|
-
location: "location";
|
|
164
189
|
all: "all";
|
|
190
|
+
location: "location";
|
|
165
191
|
}>>;
|
|
166
192
|
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
167
193
|
user: "user";
|
|
@@ -173,21 +199,29 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
173
199
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
174
200
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
175
201
|
administrativeArea: "administrativeArea";
|
|
202
|
+
all: "all";
|
|
176
203
|
location: "location";
|
|
204
|
+
}>>;
|
|
205
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
206
|
+
administrativeArea: "administrativeArea";
|
|
177
207
|
all: "all";
|
|
208
|
+
location: "location";
|
|
209
|
+
}>>;
|
|
210
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
211
|
+
user: "user";
|
|
178
212
|
}>>;
|
|
179
213
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
180
214
|
administrativeArea: "administrativeArea";
|
|
181
|
-
location: "location";
|
|
182
215
|
all: "all";
|
|
216
|
+
location: "location";
|
|
183
217
|
}>>;
|
|
184
218
|
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
185
219
|
user: "user";
|
|
186
220
|
}>>;
|
|
187
221
|
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
188
222
|
administrativeArea: "administrativeArea";
|
|
189
|
-
location: "location";
|
|
190
223
|
all: "all";
|
|
224
|
+
location: "location";
|
|
191
225
|
}>>;
|
|
192
226
|
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
193
227
|
user: "user";
|
|
@@ -200,21 +234,29 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
200
234
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
201
235
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
202
236
|
administrativeArea: "administrativeArea";
|
|
237
|
+
all: "all";
|
|
203
238
|
location: "location";
|
|
239
|
+
}>>;
|
|
240
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
241
|
+
administrativeArea: "administrativeArea";
|
|
204
242
|
all: "all";
|
|
243
|
+
location: "location";
|
|
244
|
+
}>>;
|
|
245
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
246
|
+
user: "user";
|
|
205
247
|
}>>;
|
|
206
248
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
207
249
|
administrativeArea: "administrativeArea";
|
|
208
|
-
location: "location";
|
|
209
250
|
all: "all";
|
|
251
|
+
location: "location";
|
|
210
252
|
}>>;
|
|
211
253
|
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
212
254
|
user: "user";
|
|
213
255
|
}>>;
|
|
214
256
|
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
215
257
|
administrativeArea: "administrativeArea";
|
|
216
|
-
location: "location";
|
|
217
258
|
all: "all";
|
|
259
|
+
location: "location";
|
|
218
260
|
}>>;
|
|
219
261
|
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
220
262
|
user: "user";
|
|
@@ -224,16 +266,16 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
224
266
|
}, z.core.$strip>], "type">;
|
|
225
267
|
declare const SystemScopeType: z.ZodEnum<{
|
|
226
268
|
"organisation.read-locations": "organisation.read-locations";
|
|
227
|
-
"user.read": "user.read";
|
|
228
269
|
"user.create": "user.create";
|
|
229
270
|
"user.edit": "user.edit";
|
|
271
|
+
"user.read": "user.read";
|
|
230
272
|
"user.search": "user.search";
|
|
231
273
|
}>;
|
|
232
274
|
export type SystemScopeType = z.infer<typeof SystemScopeType>;
|
|
233
275
|
declare const UserScopeType: z.ZodEnum<{
|
|
234
|
-
"user.read": "user.read";
|
|
235
276
|
"user.create": "user.create";
|
|
236
277
|
"user.edit": "user.edit";
|
|
278
|
+
"user.read": "user.read";
|
|
237
279
|
"user.search": "user.search";
|
|
238
280
|
}>;
|
|
239
281
|
export type UserScopeType = z.infer<typeof UserScopeType>;
|
|
@@ -250,8 +292,8 @@ export declare const UserScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
250
292
|
options: z.ZodOptional<z.ZodObject<{
|
|
251
293
|
accessLevel: z.ZodOptional<z.ZodEnum<{
|
|
252
294
|
administrativeArea: "administrativeArea";
|
|
253
|
-
location: "location";
|
|
254
295
|
all: "all";
|
|
296
|
+
location: "location";
|
|
255
297
|
}>>;
|
|
256
298
|
role: z.ZodOptional<z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
|
|
257
299
|
}, z.core.$strip>>;
|
|
@@ -263,8 +305,8 @@ export declare const UserScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
263
305
|
options: z.ZodOptional<z.ZodObject<{
|
|
264
306
|
accessLevel: z.ZodOptional<z.ZodEnum<{
|
|
265
307
|
administrativeArea: "administrativeArea";
|
|
266
|
-
location: "location";
|
|
267
308
|
all: "all";
|
|
309
|
+
location: "location";
|
|
268
310
|
}>>;
|
|
269
311
|
}, z.core.$strip>>;
|
|
270
312
|
}, z.core.$strip>], "type">;
|
|
@@ -296,29 +338,33 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
296
338
|
}, z.core.$strip>>;
|
|
297
339
|
}, z.core.$strip>, z.ZodObject<{
|
|
298
340
|
type: z.ZodEnum<{
|
|
341
|
+
"record.archive": "record.archive";
|
|
299
342
|
"record.edit": "record.edit";
|
|
343
|
+
"record.register": "record.register";
|
|
300
344
|
"record.reject": "record.reject";
|
|
301
|
-
"record.archive": "record.archive";
|
|
302
345
|
"record.review-duplicates": "record.review-duplicates";
|
|
303
|
-
"record.register": "record.register";
|
|
304
346
|
}>;
|
|
305
347
|
options: z.ZodOptional<z.ZodObject<{
|
|
306
348
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
307
349
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
350
|
+
notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
351
|
+
notifiedBy: z.ZodOptional<z.ZodString>;
|
|
308
352
|
declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
309
353
|
declaredBy: z.ZodOptional<z.ZodString>;
|
|
310
354
|
}, z.core.$strip>>;
|
|
311
355
|
}, z.core.$strip>, z.ZodObject<{
|
|
312
356
|
type: z.ZodEnum<{
|
|
313
|
-
"record.
|
|
357
|
+
"record.correct": "record.correct";
|
|
314
358
|
"record.read": "record.read";
|
|
315
359
|
"record.request-correction": "record.request-correction";
|
|
316
|
-
"record.
|
|
360
|
+
"record.search": "record.search";
|
|
317
361
|
"record.unassign-others": "record.unassign-others";
|
|
318
362
|
}>;
|
|
319
363
|
options: z.ZodOptional<z.ZodObject<{
|
|
320
364
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
321
365
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
366
|
+
notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
367
|
+
notifiedBy: z.ZodOptional<z.ZodString>;
|
|
322
368
|
declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
323
369
|
declaredBy: z.ZodOptional<z.ZodString>;
|
|
324
370
|
registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
@@ -329,6 +375,8 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
329
375
|
options: z.ZodOptional<z.ZodObject<{
|
|
330
376
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
331
377
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
378
|
+
notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
379
|
+
notifiedBy: z.ZodOptional<z.ZodString>;
|
|
332
380
|
declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
333
381
|
declaredBy: z.ZodOptional<z.ZodString>;
|
|
334
382
|
registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
@@ -341,20 +389,20 @@ export type ResolvedRecordScopeV2 = z.infer<typeof ResolvedRecordScopeV2>;
|
|
|
341
389
|
/** The primary scope schema which gathers all scope types together. All scopes are discriminated by type and options are determined according to the type. */
|
|
342
390
|
export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
343
391
|
type: z.ZodEnum<{
|
|
392
|
+
"attachment.upload": "attachment.upload";
|
|
344
393
|
bypassratelimit: "bypassratelimit";
|
|
345
|
-
"record.reindex": "record.reindex";
|
|
346
|
-
"user.data-seeding": "user.data-seeding";
|
|
347
|
-
"integration.create": "integration.create";
|
|
348
|
-
"record.import": "record.import";
|
|
349
394
|
"config.update-all": "config.update-all";
|
|
350
|
-
"
|
|
351
|
-
"profile.electronic-signature": "profile.electronic-signature";
|
|
352
|
-
"user.read-only-my-audit": "user.read-only-my-audit";
|
|
395
|
+
"integration.create": "integration.create";
|
|
353
396
|
"performance.read": "performance.read";
|
|
354
397
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
355
398
|
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
399
|
+
"profile.electronic-signature": "profile.electronic-signature";
|
|
356
400
|
"record.confirm-registration": "record.confirm-registration";
|
|
401
|
+
"record.import": "record.import";
|
|
402
|
+
"record.reindex": "record.reindex";
|
|
357
403
|
"record.reject-registration": "record.reject-registration";
|
|
404
|
+
"user.data-seeding": "user.data-seeding";
|
|
405
|
+
"user.read-only-my-audit": "user.read-only-my-audit";
|
|
358
406
|
}>;
|
|
359
407
|
}, z.core.$strip>, z.ZodObject<{
|
|
360
408
|
type: z.ZodEnum<{
|
|
@@ -366,29 +414,37 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
366
414
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
367
415
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
368
416
|
administrativeArea: "administrativeArea";
|
|
369
|
-
location: "location";
|
|
370
417
|
all: "all";
|
|
418
|
+
location: "location";
|
|
371
419
|
}>>;
|
|
372
420
|
}, z.core.$strip>>;
|
|
373
421
|
}, z.core.$strip>, z.ZodObject<{
|
|
374
422
|
type: z.ZodEnum<{
|
|
423
|
+
"record.archive": "record.archive";
|
|
375
424
|
"record.edit": "record.edit";
|
|
425
|
+
"record.register": "record.register";
|
|
376
426
|
"record.reject": "record.reject";
|
|
377
|
-
"record.archive": "record.archive";
|
|
378
427
|
"record.review-duplicates": "record.review-duplicates";
|
|
379
|
-
"record.register": "record.register";
|
|
380
428
|
}>;
|
|
381
429
|
options: z.ZodOptional<z.ZodObject<{
|
|
382
430
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
383
431
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
384
432
|
administrativeArea: "administrativeArea";
|
|
433
|
+
all: "all";
|
|
385
434
|
location: "location";
|
|
435
|
+
}>>;
|
|
436
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
437
|
+
administrativeArea: "administrativeArea";
|
|
386
438
|
all: "all";
|
|
439
|
+
location: "location";
|
|
440
|
+
}>>;
|
|
441
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
442
|
+
user: "user";
|
|
387
443
|
}>>;
|
|
388
444
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
389
445
|
administrativeArea: "administrativeArea";
|
|
390
|
-
location: "location";
|
|
391
446
|
all: "all";
|
|
447
|
+
location: "location";
|
|
392
448
|
}>>;
|
|
393
449
|
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
394
450
|
user: "user";
|
|
@@ -396,31 +452,39 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
396
452
|
}, z.core.$strip>>;
|
|
397
453
|
}, z.core.$strip>, z.ZodObject<{
|
|
398
454
|
type: z.ZodEnum<{
|
|
399
|
-
"record.
|
|
455
|
+
"record.correct": "record.correct";
|
|
400
456
|
"record.read": "record.read";
|
|
401
457
|
"record.request-correction": "record.request-correction";
|
|
402
|
-
"record.
|
|
458
|
+
"record.search": "record.search";
|
|
403
459
|
"record.unassign-others": "record.unassign-others";
|
|
404
460
|
}>;
|
|
405
461
|
options: z.ZodOptional<z.ZodObject<{
|
|
406
462
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
407
463
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
408
464
|
administrativeArea: "administrativeArea";
|
|
465
|
+
all: "all";
|
|
409
466
|
location: "location";
|
|
467
|
+
}>>;
|
|
468
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
469
|
+
administrativeArea: "administrativeArea";
|
|
410
470
|
all: "all";
|
|
471
|
+
location: "location";
|
|
472
|
+
}>>;
|
|
473
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
474
|
+
user: "user";
|
|
411
475
|
}>>;
|
|
412
476
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
413
477
|
administrativeArea: "administrativeArea";
|
|
414
|
-
location: "location";
|
|
415
478
|
all: "all";
|
|
479
|
+
location: "location";
|
|
416
480
|
}>>;
|
|
417
481
|
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
418
482
|
user: "user";
|
|
419
483
|
}>>;
|
|
420
484
|
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
421
485
|
administrativeArea: "administrativeArea";
|
|
422
|
-
location: "location";
|
|
423
486
|
all: "all";
|
|
487
|
+
location: "location";
|
|
424
488
|
}>>;
|
|
425
489
|
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
426
490
|
user: "user";
|
|
@@ -432,21 +496,29 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
432
496
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
433
497
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
434
498
|
administrativeArea: "administrativeArea";
|
|
499
|
+
all: "all";
|
|
435
500
|
location: "location";
|
|
501
|
+
}>>;
|
|
502
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
503
|
+
administrativeArea: "administrativeArea";
|
|
436
504
|
all: "all";
|
|
505
|
+
location: "location";
|
|
506
|
+
}>>;
|
|
507
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
508
|
+
user: "user";
|
|
437
509
|
}>>;
|
|
438
510
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
439
511
|
administrativeArea: "administrativeArea";
|
|
440
|
-
location: "location";
|
|
441
512
|
all: "all";
|
|
513
|
+
location: "location";
|
|
442
514
|
}>>;
|
|
443
515
|
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
444
516
|
user: "user";
|
|
445
517
|
}>>;
|
|
446
518
|
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
447
519
|
administrativeArea: "administrativeArea";
|
|
448
|
-
location: "location";
|
|
449
520
|
all: "all";
|
|
521
|
+
location: "location";
|
|
450
522
|
}>>;
|
|
451
523
|
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
452
524
|
user: "user";
|
|
@@ -459,21 +531,29 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
459
531
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
460
532
|
placeOfEvent: z.ZodOptional<z.ZodEnum<{
|
|
461
533
|
administrativeArea: "administrativeArea";
|
|
534
|
+
all: "all";
|
|
462
535
|
location: "location";
|
|
536
|
+
}>>;
|
|
537
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
538
|
+
administrativeArea: "administrativeArea";
|
|
463
539
|
all: "all";
|
|
540
|
+
location: "location";
|
|
541
|
+
}>>;
|
|
542
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
543
|
+
user: "user";
|
|
464
544
|
}>>;
|
|
465
545
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
466
546
|
administrativeArea: "administrativeArea";
|
|
467
|
-
location: "location";
|
|
468
547
|
all: "all";
|
|
548
|
+
location: "location";
|
|
469
549
|
}>>;
|
|
470
550
|
declaredBy: z.ZodOptional<z.ZodEnum<{
|
|
471
551
|
user: "user";
|
|
472
552
|
}>>;
|
|
473
553
|
registeredIn: z.ZodOptional<z.ZodEnum<{
|
|
474
554
|
administrativeArea: "administrativeArea";
|
|
475
|
-
location: "location";
|
|
476
555
|
all: "all";
|
|
556
|
+
location: "location";
|
|
477
557
|
}>>;
|
|
478
558
|
registeredBy: z.ZodOptional<z.ZodEnum<{
|
|
479
559
|
user: "user";
|
|
@@ -488,8 +568,8 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
488
568
|
options: z.ZodOptional<z.ZodObject<{
|
|
489
569
|
accessLevel: z.ZodOptional<z.ZodEnum<{
|
|
490
570
|
administrativeArea: "administrativeArea";
|
|
491
|
-
location: "location";
|
|
492
571
|
all: "all";
|
|
572
|
+
location: "location";
|
|
493
573
|
}>>;
|
|
494
574
|
role: z.ZodOptional<z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
|
|
495
575
|
}, z.core.$strip>>;
|
|
@@ -501,8 +581,8 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
501
581
|
options: z.ZodOptional<z.ZodObject<{
|
|
502
582
|
accessLevel: z.ZodOptional<z.ZodEnum<{
|
|
503
583
|
administrativeArea: "administrativeArea";
|
|
504
|
-
location: "location";
|
|
505
584
|
all: "all";
|
|
585
|
+
location: "location";
|
|
506
586
|
}>>;
|
|
507
587
|
}, z.core.$strip>>;
|
|
508
588
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -510,8 +590,8 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
510
590
|
options: z.ZodOptional<z.ZodObject<{
|
|
511
591
|
accessLevel: z.ZodOptional<z.ZodEnum<{
|
|
512
592
|
administrativeArea: "administrativeArea";
|
|
513
|
-
location: "location";
|
|
514
593
|
all: "all";
|
|
594
|
+
location: "location";
|
|
515
595
|
}>>;
|
|
516
596
|
}, z.core.$strip>>;
|
|
517
597
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -527,42 +607,42 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
527
607
|
}, z.core.$strip>], "type">;
|
|
528
608
|
export type Scope = z.infer<typeof Scope>;
|
|
529
609
|
export declare const ScopeType: z.ZodEnum<{
|
|
530
|
-
"
|
|
531
|
-
"record.create": "record.create";
|
|
532
|
-
"record.read": "record.read";
|
|
533
|
-
"record.declare": "record.declare";
|
|
534
|
-
"record.notify": "record.notify";
|
|
535
|
-
"record.edit": "record.edit";
|
|
536
|
-
"record.reject": "record.reject";
|
|
537
|
-
"record.archive": "record.archive";
|
|
538
|
-
"record.review-duplicates": "record.review-duplicates";
|
|
539
|
-
"record.register": "record.register";
|
|
540
|
-
"record.print-certified-copies": "record.print-certified-copies";
|
|
541
|
-
"record.request-correction": "record.request-correction";
|
|
542
|
-
"record.correct": "record.correct";
|
|
543
|
-
"record.unassign-others": "record.unassign-others";
|
|
544
|
-
"record.custom-action": "record.custom-action";
|
|
610
|
+
"attachment.upload": "attachment.upload";
|
|
545
611
|
bypassratelimit: "bypassratelimit";
|
|
546
|
-
"record.reindex": "record.reindex";
|
|
547
|
-
"user.data-seeding": "user.data-seeding";
|
|
548
|
-
"integration.create": "integration.create";
|
|
549
|
-
"record.import": "record.import";
|
|
550
612
|
"config.update-all": "config.update-all";
|
|
551
|
-
"
|
|
552
|
-
"
|
|
553
|
-
"
|
|
613
|
+
"dashboard.view": "dashboard.view";
|
|
614
|
+
"integration.create": "integration.create";
|
|
615
|
+
"organisation.read-locations": "organisation.read-locations";
|
|
554
616
|
"performance.read": "performance.read";
|
|
555
617
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
556
618
|
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
619
|
+
"profile.electronic-signature": "profile.electronic-signature";
|
|
620
|
+
"record.archive": "record.archive";
|
|
557
621
|
"record.confirm-registration": "record.confirm-registration";
|
|
622
|
+
"record.correct": "record.correct";
|
|
623
|
+
"record.create": "record.create";
|
|
624
|
+
"record.custom-action": "record.custom-action";
|
|
625
|
+
"record.declare": "record.declare";
|
|
626
|
+
"record.edit": "record.edit";
|
|
627
|
+
"record.import": "record.import";
|
|
628
|
+
"record.notify": "record.notify";
|
|
629
|
+
"record.print-certified-copies": "record.print-certified-copies";
|
|
630
|
+
"record.read": "record.read";
|
|
631
|
+
"record.register": "record.register";
|
|
632
|
+
"record.reindex": "record.reindex";
|
|
633
|
+
"record.reject": "record.reject";
|
|
558
634
|
"record.reject-registration": "record.reject-registration";
|
|
559
|
-
"
|
|
560
|
-
"
|
|
635
|
+
"record.request-correction": "record.request-correction";
|
|
636
|
+
"record.review-duplicates": "record.review-duplicates";
|
|
637
|
+
"record.search": "record.search";
|
|
638
|
+
"record.unassign-others": "record.unassign-others";
|
|
561
639
|
"user.create": "user.create";
|
|
640
|
+
"user.data-seeding": "user.data-seeding";
|
|
562
641
|
"user.edit": "user.edit";
|
|
642
|
+
"user.read": "user.read";
|
|
643
|
+
"user.read-only-my-audit": "user.read-only-my-audit";
|
|
563
644
|
"user.search": "user.search";
|
|
564
645
|
workqueue: "workqueue";
|
|
565
|
-
"dashboard.view": "dashboard.view";
|
|
566
646
|
}>;
|
|
567
647
|
export type ScopeType = z.infer<typeof ScopeType>;
|
|
568
648
|
/**
|
|
@@ -580,45 +660,49 @@ export type EncodedScope = z.infer<typeof EncodedScope>;
|
|
|
580
660
|
*/
|
|
581
661
|
export declare const encodeScope: (scope: Scope) => EncodedScope;
|
|
582
662
|
/**
|
|
583
|
-
* Converts
|
|
663
|
+
* Converts an encoded scope string into a scope object.
|
|
584
664
|
*
|
|
585
|
-
* @
|
|
586
|
-
*
|
|
587
|
-
* @param scope - The scope object to encode.
|
|
588
|
-
* @returns The encoded scope as a branded string (`EncodedScope`).
|
|
665
|
+
* @param scope - The encoded scope string to decode.
|
|
666
|
+
* @returns The decoded scope object.
|
|
589
667
|
*/
|
|
590
|
-
export declare const decodeScope: (
|
|
668
|
+
export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
591
669
|
type: "record.create" | "record.declare" | "record.notify";
|
|
592
670
|
options?: {
|
|
593
671
|
event?: string[] | undefined;
|
|
594
|
-
placeOfEvent?: "administrativeArea" | "
|
|
672
|
+
placeOfEvent?: "administrativeArea" | "all" | "location" | undefined;
|
|
595
673
|
} | undefined;
|
|
596
674
|
} | {
|
|
597
|
-
type: "record.
|
|
675
|
+
type: "record.archive" | "record.edit" | "record.register" | "record.reject" | "record.review-duplicates";
|
|
598
676
|
options?: {
|
|
599
677
|
event?: string[] | undefined;
|
|
600
|
-
placeOfEvent?: "administrativeArea" | "
|
|
601
|
-
|
|
678
|
+
placeOfEvent?: "administrativeArea" | "all" | "location" | undefined;
|
|
679
|
+
notifiedIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
680
|
+
notifiedBy?: "user" | undefined;
|
|
681
|
+
declaredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
602
682
|
declaredBy?: "user" | undefined;
|
|
603
683
|
} | undefined;
|
|
604
684
|
} | {
|
|
605
|
-
type: "record.
|
|
685
|
+
type: "record.correct" | "record.read" | "record.request-correction" | "record.search" | "record.unassign-others";
|
|
606
686
|
options?: {
|
|
607
687
|
event?: string[] | undefined;
|
|
608
|
-
placeOfEvent?: "administrativeArea" | "
|
|
609
|
-
|
|
688
|
+
placeOfEvent?: "administrativeArea" | "all" | "location" | undefined;
|
|
689
|
+
notifiedIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
690
|
+
notifiedBy?: "user" | undefined;
|
|
691
|
+
declaredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
610
692
|
declaredBy?: "user" | undefined;
|
|
611
|
-
registeredIn?: "administrativeArea" | "
|
|
693
|
+
registeredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
612
694
|
registeredBy?: "user" | undefined;
|
|
613
695
|
} | undefined;
|
|
614
696
|
} | {
|
|
615
697
|
type: "record.custom-action";
|
|
616
698
|
options?: {
|
|
617
699
|
event?: string[] | undefined;
|
|
618
|
-
placeOfEvent?: "administrativeArea" | "
|
|
619
|
-
|
|
700
|
+
placeOfEvent?: "administrativeArea" | "all" | "location" | undefined;
|
|
701
|
+
notifiedIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
702
|
+
notifiedBy?: "user" | undefined;
|
|
703
|
+
declaredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
620
704
|
declaredBy?: "user" | undefined;
|
|
621
|
-
registeredIn?: "administrativeArea" | "
|
|
705
|
+
registeredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
622
706
|
registeredBy?: "user" | undefined;
|
|
623
707
|
customActionTypes?: string[] | undefined;
|
|
624
708
|
} | undefined;
|
|
@@ -626,30 +710,32 @@ export declare const decodeScope: (query: EncodedScope) => {
|
|
|
626
710
|
type: "record.print-certified-copies";
|
|
627
711
|
options?: {
|
|
628
712
|
event?: string[] | undefined;
|
|
629
|
-
placeOfEvent?: "administrativeArea" | "
|
|
630
|
-
|
|
713
|
+
placeOfEvent?: "administrativeArea" | "all" | "location" | undefined;
|
|
714
|
+
notifiedIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
715
|
+
notifiedBy?: "user" | undefined;
|
|
716
|
+
declaredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
631
717
|
declaredBy?: "user" | undefined;
|
|
632
|
-
registeredIn?: "administrativeArea" | "
|
|
718
|
+
registeredIn?: "administrativeArea" | "all" | "location" | undefined;
|
|
633
719
|
registeredBy?: "user" | undefined;
|
|
634
720
|
templates?: string[] | undefined;
|
|
635
721
|
} | undefined;
|
|
636
722
|
} | {
|
|
637
723
|
type: "user.create" | "user.edit";
|
|
638
724
|
options?: {
|
|
639
|
-
accessLevel?: "administrativeArea" | "
|
|
725
|
+
accessLevel?: "administrativeArea" | "all" | "location" | undefined;
|
|
640
726
|
role?: string[] | undefined;
|
|
641
727
|
} | undefined;
|
|
642
728
|
} | {
|
|
643
729
|
type: "user.read" | "user.search";
|
|
644
730
|
options?: {
|
|
645
|
-
accessLevel?: "administrativeArea" | "
|
|
731
|
+
accessLevel?: "administrativeArea" | "all" | "location" | undefined;
|
|
646
732
|
} | undefined;
|
|
647
733
|
} | {
|
|
648
|
-
type: "
|
|
734
|
+
type: "attachment.upload" | "bypassratelimit" | "config.update-all" | "integration.create" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.confirm-registration" | "record.import" | "record.reindex" | "record.reject-registration" | "user.data-seeding" | "user.read-only-my-audit";
|
|
649
735
|
} | {
|
|
650
736
|
type: "organisation.read-locations";
|
|
651
737
|
options?: {
|
|
652
|
-
accessLevel?: "administrativeArea" | "
|
|
738
|
+
accessLevel?: "administrativeArea" | "all" | "location" | undefined;
|
|
653
739
|
} | undefined;
|
|
654
740
|
} | {
|
|
655
741
|
type: "workqueue";
|
|
@@ -735,7 +821,7 @@ export declare function canUserCreateEvent(userScopes: EncodedScope[], eventType
|
|
|
735
821
|
* @param scopes Array of scopes in object format.
|
|
736
822
|
* @returns Array of scopes in string format, encoded for use in JWT tokens.
|
|
737
823
|
*/
|
|
738
|
-
export declare function defineScopes(scopes: Scope[]): (string & z
|
|
824
|
+
export declare function defineScopes(scopes: Scope[]): (string & z.$brand<"EncodedScope">)[];
|
|
739
825
|
/**
|
|
740
826
|
* Helper for defining user roles. Should be used in country config.
|
|
741
827
|
*
|
|
@@ -743,7 +829,7 @@ export declare function defineScopes(scopes: Scope[]): (string & z.core.$brand<"
|
|
|
743
829
|
*/
|
|
744
830
|
export declare function defineRoles(roles: Role[]): {
|
|
745
831
|
id: string;
|
|
746
|
-
scopes: (string & z
|
|
832
|
+
scopes: (string & z.$brand<"EncodedScope">)[];
|
|
747
833
|
}[];
|
|
748
834
|
export {};
|
|
749
835
|
//# sourceMappingURL=scopes.d.ts.map
|