@opencrvs/toolkit 2.0.1-rc.f422f01 → 2.0.1-rc.f9085cb
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/dist/application-config/index.js +4 -2
- package/dist/cli.js +4 -2
- package/dist/commons/api/router.d.ts +23 -0
- package/dist/commons/conditionals/conditionals.d.ts +3 -3
- package/dist/commons/events/AdvancedSearchConfig.d.ts +6 -0
- package/dist/commons/events/FieldConfig.d.ts +5 -0
- package/dist/conditionals/index.js +4 -2
- package/dist/events/index.js +18 -2
- package/dist/migrations/v2.0/index.js +4 -2
- package/dist/notification/index.js +4 -2
- package/dist/scopes/index.d.ts +65 -0
- package/dist/scopes/index.js +4 -2
- package/opencrvs-toolkit-2.0.1-rc.f9085cb.tgz +0 -0
- package/package.json +1 -1
- package/opencrvs-toolkit-2.0.1-rc.f422f01.tgz +0 -0
|
@@ -664,7 +664,8 @@ var userRole = z11.preprocess(
|
|
|
664
664
|
var scopeOptionsPlaceEvent = z11.object({
|
|
665
665
|
event: scopeByEvent,
|
|
666
666
|
placeOfEvent: JurisdictionFilter.optional(),
|
|
667
|
-
createdBy: UserFilter.optional()
|
|
667
|
+
createdBy: UserFilter.optional(),
|
|
668
|
+
createdIn: JurisdictionFilter.optional()
|
|
668
669
|
}).describe("Options applicable to all record scopes.");
|
|
669
670
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
670
671
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -704,7 +705,8 @@ var ScopeOptionKey = AllScopeOptions.keyof();
|
|
|
704
705
|
var ResolvedScopeOptionsPlaceEvent = z11.object({
|
|
705
706
|
event: scopeByEvent,
|
|
706
707
|
placeOfEvent: UUID.nullish(),
|
|
707
|
-
createdBy: z11.string().optional()
|
|
708
|
+
createdBy: z11.string().optional(),
|
|
709
|
+
createdIn: UUID.nullish()
|
|
708
710
|
}).describe(
|
|
709
711
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
710
712
|
);
|
package/dist/cli.js
CHANGED
|
@@ -2191,7 +2191,8 @@ var userRole = z3.preprocess(
|
|
|
2191
2191
|
var scopeOptionsPlaceEvent = z3.object({
|
|
2192
2192
|
event: scopeByEvent,
|
|
2193
2193
|
placeOfEvent: JurisdictionFilter.optional(),
|
|
2194
|
-
createdBy: UserFilter.optional()
|
|
2194
|
+
createdBy: UserFilter.optional(),
|
|
2195
|
+
createdIn: JurisdictionFilter.optional()
|
|
2195
2196
|
}).describe("Options applicable to all record scopes.");
|
|
2196
2197
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
2197
2198
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -2231,7 +2232,8 @@ var ScopeOptionKey = AllScopeOptions.keyof();
|
|
|
2231
2232
|
var ResolvedScopeOptionsPlaceEvent = z3.object({
|
|
2232
2233
|
event: scopeByEvent,
|
|
2233
2234
|
placeOfEvent: UUID.nullish(),
|
|
2234
|
-
createdBy: z3.string().optional()
|
|
2235
|
+
createdBy: z3.string().optional(),
|
|
2236
|
+
createdIn: UUID.nullish()
|
|
2235
2237
|
}).describe(
|
|
2236
2238
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
2237
2239
|
);
|
|
@@ -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<{
|
|
@@ -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" | "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" | "createdBy" | "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" | "createdBy" | "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
|
};
|
|
@@ -140,6 +140,7 @@ export declare const FieldConfigSchema: z.ZodObject<{
|
|
|
140
140
|
event: "event";
|
|
141
141
|
placeOfEvent: "placeOfEvent";
|
|
142
142
|
createdBy: "createdBy";
|
|
143
|
+
createdIn: "createdIn";
|
|
143
144
|
declaredIn: "declaredIn";
|
|
144
145
|
declaredBy: "declaredBy";
|
|
145
146
|
registeredIn: "registeredIn";
|
|
@@ -318,6 +319,7 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
|
|
|
318
319
|
event: "event";
|
|
319
320
|
placeOfEvent: "placeOfEvent";
|
|
320
321
|
createdBy: "createdBy";
|
|
322
|
+
createdIn: "createdIn";
|
|
321
323
|
declaredIn: "declaredIn";
|
|
322
324
|
declaredBy: "declaredBy";
|
|
323
325
|
registeredIn: "registeredIn";
|
|
@@ -472,6 +474,7 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
472
474
|
event: "event";
|
|
473
475
|
placeOfEvent: "placeOfEvent";
|
|
474
476
|
createdBy: "createdBy";
|
|
477
|
+
createdIn: "createdIn";
|
|
475
478
|
declaredIn: "declaredIn";
|
|
476
479
|
declaredBy: "declaredBy";
|
|
477
480
|
registeredIn: "registeredIn";
|
|
@@ -618,6 +621,7 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
618
621
|
event: "event";
|
|
619
622
|
placeOfEvent: "placeOfEvent";
|
|
620
623
|
createdBy: "createdBy";
|
|
624
|
+
createdIn: "createdIn";
|
|
621
625
|
declaredIn: "declaredIn";
|
|
622
626
|
declaredBy: "declaredBy";
|
|
623
627
|
registeredIn: "registeredIn";
|
|
@@ -775,6 +779,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
775
779
|
event: "event";
|
|
776
780
|
placeOfEvent: "placeOfEvent";
|
|
777
781
|
createdBy: "createdBy";
|
|
782
|
+
createdIn: "createdIn";
|
|
778
783
|
declaredIn: "declaredIn";
|
|
779
784
|
declaredBy: "declaredBy";
|
|
780
785
|
registeredIn: "registeredIn";
|
|
@@ -921,6 +926,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
921
926
|
event: "event";
|
|
922
927
|
placeOfEvent: "placeOfEvent";
|
|
923
928
|
createdBy: "createdBy";
|
|
929
|
+
createdIn: "createdIn";
|
|
924
930
|
declaredIn: "declaredIn";
|
|
925
931
|
declaredBy: "declaredBy";
|
|
926
932
|
registeredIn: "registeredIn";
|
|
@@ -1920,6 +1920,7 @@ declare const AdministrativeAreaField: z.ZodObject<{
|
|
|
1920
1920
|
event: "event";
|
|
1921
1921
|
placeOfEvent: "placeOfEvent";
|
|
1922
1922
|
createdBy: "createdBy";
|
|
1923
|
+
createdIn: "createdIn";
|
|
1923
1924
|
declaredIn: "declaredIn";
|
|
1924
1925
|
declaredBy: "declaredBy";
|
|
1925
1926
|
registeredIn: "registeredIn";
|
|
@@ -2047,6 +2048,7 @@ declare const LocationInput: z.ZodObject<{
|
|
|
2047
2048
|
event: "event";
|
|
2048
2049
|
placeOfEvent: "placeOfEvent";
|
|
2049
2050
|
createdBy: "createdBy";
|
|
2051
|
+
createdIn: "createdIn";
|
|
2050
2052
|
declaredIn: "declaredIn";
|
|
2051
2053
|
declaredBy: "declaredBy";
|
|
2052
2054
|
registeredIn: "registeredIn";
|
|
@@ -2245,6 +2247,7 @@ declare const Facility: z.ZodObject<{
|
|
|
2245
2247
|
event: "event";
|
|
2246
2248
|
placeOfEvent: "placeOfEvent";
|
|
2247
2249
|
createdBy: "createdBy";
|
|
2250
|
+
createdIn: "createdIn";
|
|
2248
2251
|
declaredIn: "declaredIn";
|
|
2249
2252
|
declaredBy: "declaredBy";
|
|
2250
2253
|
registeredIn: "registeredIn";
|
|
@@ -2358,6 +2361,7 @@ declare const Office: z.ZodObject<{
|
|
|
2358
2361
|
event: "event";
|
|
2359
2362
|
placeOfEvent: "placeOfEvent";
|
|
2360
2363
|
createdBy: "createdBy";
|
|
2364
|
+
createdIn: "createdIn";
|
|
2361
2365
|
declaredIn: "declaredIn";
|
|
2362
2366
|
declaredBy: "declaredBy";
|
|
2363
2367
|
registeredIn: "registeredIn";
|
|
@@ -2557,6 +2561,7 @@ declare const Address: z.ZodObject<{
|
|
|
2557
2561
|
event: "event";
|
|
2558
2562
|
placeOfEvent: "placeOfEvent";
|
|
2559
2563
|
createdBy: "createdBy";
|
|
2564
|
+
createdIn: "createdIn";
|
|
2560
2565
|
declaredIn: "declaredIn";
|
|
2561
2566
|
declaredBy: "declaredBy";
|
|
2562
2567
|
registeredIn: "registeredIn";
|
|
@@ -190,7 +190,8 @@ var userRole = z6.preprocess(
|
|
|
190
190
|
var scopeOptionsPlaceEvent = z6.object({
|
|
191
191
|
event: scopeByEvent,
|
|
192
192
|
placeOfEvent: JurisdictionFilter.optional(),
|
|
193
|
-
createdBy: UserFilter.optional()
|
|
193
|
+
createdBy: UserFilter.optional(),
|
|
194
|
+
createdIn: JurisdictionFilter.optional()
|
|
194
195
|
}).describe("Options applicable to all record scopes.");
|
|
195
196
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
196
197
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -230,7 +231,8 @@ var ScopeOptionKey = AllScopeOptions.keyof();
|
|
|
230
231
|
var ResolvedScopeOptionsPlaceEvent = z6.object({
|
|
231
232
|
event: scopeByEvent,
|
|
232
233
|
placeOfEvent: UUID.nullish(),
|
|
233
|
-
createdBy: z6.string().optional()
|
|
234
|
+
createdBy: z6.string().optional(),
|
|
235
|
+
createdIn: UUID.nullish()
|
|
234
236
|
}).describe(
|
|
235
237
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
236
238
|
);
|
package/dist/events/index.js
CHANGED
|
@@ -519,7 +519,8 @@ var userRole = z2.preprocess(
|
|
|
519
519
|
var scopeOptionsPlaceEvent = z2.object({
|
|
520
520
|
event: scopeByEvent,
|
|
521
521
|
placeOfEvent: JurisdictionFilter.optional(),
|
|
522
|
-
createdBy: UserFilter.optional()
|
|
522
|
+
createdBy: UserFilter.optional(),
|
|
523
|
+
createdIn: JurisdictionFilter.optional()
|
|
523
524
|
}).describe("Options applicable to all record scopes.");
|
|
524
525
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
525
526
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -559,7 +560,8 @@ var ScopeOptionKey = AllScopeOptions.keyof();
|
|
|
559
560
|
var ResolvedScopeOptionsPlaceEvent = z2.object({
|
|
560
561
|
event: scopeByEvent,
|
|
561
562
|
placeOfEvent: UUID.nullish(),
|
|
562
|
-
createdBy: z2.string().optional()
|
|
563
|
+
createdBy: z2.string().optional(),
|
|
564
|
+
createdIn: UUID.nullish()
|
|
563
565
|
}).describe(
|
|
564
566
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
565
567
|
);
|
|
@@ -10314,6 +10316,20 @@ function canAccessEventWithScope(event2, scope, user2, customActionType) {
|
|
|
10314
10316
|
if (opts?.createdBy === UserFilter.enum.user && event2.createdBy !== user2.id) {
|
|
10315
10317
|
return false;
|
|
10316
10318
|
}
|
|
10319
|
+
if (opts?.createdIn === JurisdictionFilter.enum.location && !matchesJurisdictionFilter(
|
|
10320
|
+
event2.createdAtLocation,
|
|
10321
|
+
JurisdictionFilter.enum.location,
|
|
10322
|
+
user2
|
|
10323
|
+
)) {
|
|
10324
|
+
return false;
|
|
10325
|
+
}
|
|
10326
|
+
if (opts?.createdIn === JurisdictionFilter.enum.administrativeArea && !matchesJurisdictionFilter(
|
|
10327
|
+
event2.createdAtLocation,
|
|
10328
|
+
JurisdictionFilter.enum.administrativeArea,
|
|
10329
|
+
user2
|
|
10330
|
+
)) {
|
|
10331
|
+
return false;
|
|
10332
|
+
}
|
|
10317
10333
|
if (scopeUsesDeclaredOptions(scope)) {
|
|
10318
10334
|
const { options } = scope;
|
|
10319
10335
|
if (options?.declaredBy === UserFilter.enum.user) {
|
|
@@ -2203,7 +2203,8 @@ var userRole = z3.preprocess(
|
|
|
2203
2203
|
var scopeOptionsPlaceEvent = z3.object({
|
|
2204
2204
|
event: scopeByEvent,
|
|
2205
2205
|
placeOfEvent: JurisdictionFilter.optional(),
|
|
2206
|
-
createdBy: UserFilter.optional()
|
|
2206
|
+
createdBy: UserFilter.optional(),
|
|
2207
|
+
createdIn: JurisdictionFilter.optional()
|
|
2207
2208
|
}).describe("Options applicable to all record scopes.");
|
|
2208
2209
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
2209
2210
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -2243,7 +2244,8 @@ var ScopeOptionKey = AllScopeOptions.keyof();
|
|
|
2243
2244
|
var ResolvedScopeOptionsPlaceEvent = z3.object({
|
|
2244
2245
|
event: scopeByEvent,
|
|
2245
2246
|
placeOfEvent: UUID.nullish(),
|
|
2246
|
-
createdBy: z3.string().optional()
|
|
2247
|
+
createdBy: z3.string().optional(),
|
|
2248
|
+
createdIn: UUID.nullish()
|
|
2247
2249
|
}).describe(
|
|
2248
2250
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
2249
2251
|
);
|
|
@@ -117,7 +117,8 @@ var userRole = z2.preprocess(
|
|
|
117
117
|
var scopeOptionsPlaceEvent = z2.object({
|
|
118
118
|
event: scopeByEvent,
|
|
119
119
|
placeOfEvent: JurisdictionFilter.optional(),
|
|
120
|
-
createdBy: UserFilter.optional()
|
|
120
|
+
createdBy: UserFilter.optional(),
|
|
121
|
+
createdIn: JurisdictionFilter.optional()
|
|
121
122
|
}).describe("Options applicable to all record scopes.");
|
|
122
123
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
123
124
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -157,7 +158,8 @@ var ScopeOptionKey = AllScopeOptions.keyof();
|
|
|
157
158
|
var ResolvedScopeOptionsPlaceEvent = z2.object({
|
|
158
159
|
event: scopeByEvent,
|
|
159
160
|
placeOfEvent: UUID.nullish(),
|
|
160
|
-
createdBy: z2.string().optional()
|
|
161
|
+
createdBy: z2.string().optional(),
|
|
162
|
+
createdIn: UUID.nullish()
|
|
161
163
|
}).describe(
|
|
162
164
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
163
165
|
);
|
package/dist/scopes/index.d.ts
CHANGED
|
@@ -51,6 +51,11 @@ 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
|
+
}>>;
|
|
54
59
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
55
60
|
administrativeArea: "administrativeArea";
|
|
56
61
|
location: "location";
|
|
@@ -74,6 +79,7 @@ export declare const ScopeOptionKey: z.ZodEnum<{
|
|
|
74
79
|
event: "event";
|
|
75
80
|
placeOfEvent: "placeOfEvent";
|
|
76
81
|
createdBy: "createdBy";
|
|
82
|
+
createdIn: "createdIn";
|
|
77
83
|
declaredIn: "declaredIn";
|
|
78
84
|
declaredBy: "declaredBy";
|
|
79
85
|
registeredIn: "registeredIn";
|
|
@@ -117,6 +123,11 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
117
123
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
118
124
|
user: "user";
|
|
119
125
|
}>>;
|
|
126
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
127
|
+
administrativeArea: "administrativeArea";
|
|
128
|
+
location: "location";
|
|
129
|
+
all: "all";
|
|
130
|
+
}>>;
|
|
120
131
|
}, z.core.$strip>>;
|
|
121
132
|
}, z.core.$strip>, z.ZodObject<{
|
|
122
133
|
type: z.ZodEnum<{
|
|
@@ -136,6 +147,11 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
136
147
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
137
148
|
user: "user";
|
|
138
149
|
}>>;
|
|
150
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
151
|
+
administrativeArea: "administrativeArea";
|
|
152
|
+
location: "location";
|
|
153
|
+
all: "all";
|
|
154
|
+
}>>;
|
|
139
155
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
140
156
|
administrativeArea: "administrativeArea";
|
|
141
157
|
location: "location";
|
|
@@ -163,6 +179,11 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
163
179
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
164
180
|
user: "user";
|
|
165
181
|
}>>;
|
|
182
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
183
|
+
administrativeArea: "administrativeArea";
|
|
184
|
+
location: "location";
|
|
185
|
+
all: "all";
|
|
186
|
+
}>>;
|
|
166
187
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
167
188
|
administrativeArea: "administrativeArea";
|
|
168
189
|
location: "location";
|
|
@@ -192,6 +213,11 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
192
213
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
193
214
|
user: "user";
|
|
194
215
|
}>>;
|
|
216
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
217
|
+
administrativeArea: "administrativeArea";
|
|
218
|
+
location: "location";
|
|
219
|
+
all: "all";
|
|
220
|
+
}>>;
|
|
195
221
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
196
222
|
administrativeArea: "administrativeArea";
|
|
197
223
|
location: "location";
|
|
@@ -222,6 +248,11 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
222
248
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
223
249
|
user: "user";
|
|
224
250
|
}>>;
|
|
251
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
252
|
+
administrativeArea: "administrativeArea";
|
|
253
|
+
location: "location";
|
|
254
|
+
all: "all";
|
|
255
|
+
}>>;
|
|
225
256
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
226
257
|
administrativeArea: "administrativeArea";
|
|
227
258
|
location: "location";
|
|
@@ -313,6 +344,7 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
313
344
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
314
345
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
315
346
|
createdBy: z.ZodOptional<z.ZodString>;
|
|
347
|
+
createdIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
316
348
|
}, z.core.$strip>>;
|
|
317
349
|
}, z.core.$strip>, z.ZodObject<{
|
|
318
350
|
type: z.ZodEnum<{
|
|
@@ -326,6 +358,7 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
326
358
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
327
359
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
328
360
|
createdBy: z.ZodOptional<z.ZodString>;
|
|
361
|
+
createdIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
329
362
|
declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
330
363
|
declaredBy: z.ZodOptional<z.ZodString>;
|
|
331
364
|
}, z.core.$strip>>;
|
|
@@ -341,6 +374,7 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
341
374
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
342
375
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
343
376
|
createdBy: z.ZodOptional<z.ZodString>;
|
|
377
|
+
createdIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
344
378
|
declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
345
379
|
declaredBy: z.ZodOptional<z.ZodString>;
|
|
346
380
|
registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
@@ -352,6 +386,7 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
352
386
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
353
387
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
354
388
|
createdBy: z.ZodOptional<z.ZodString>;
|
|
389
|
+
createdIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
355
390
|
declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
356
391
|
declaredBy: z.ZodOptional<z.ZodString>;
|
|
357
392
|
registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
@@ -395,6 +430,11 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
395
430
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
396
431
|
user: "user";
|
|
397
432
|
}>>;
|
|
433
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
434
|
+
administrativeArea: "administrativeArea";
|
|
435
|
+
location: "location";
|
|
436
|
+
all: "all";
|
|
437
|
+
}>>;
|
|
398
438
|
}, z.core.$strip>>;
|
|
399
439
|
}, z.core.$strip>, z.ZodObject<{
|
|
400
440
|
type: z.ZodEnum<{
|
|
@@ -414,6 +454,11 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
414
454
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
415
455
|
user: "user";
|
|
416
456
|
}>>;
|
|
457
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
458
|
+
administrativeArea: "administrativeArea";
|
|
459
|
+
location: "location";
|
|
460
|
+
all: "all";
|
|
461
|
+
}>>;
|
|
417
462
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
418
463
|
administrativeArea: "administrativeArea";
|
|
419
464
|
location: "location";
|
|
@@ -441,6 +486,11 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
441
486
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
442
487
|
user: "user";
|
|
443
488
|
}>>;
|
|
489
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
490
|
+
administrativeArea: "administrativeArea";
|
|
491
|
+
location: "location";
|
|
492
|
+
all: "all";
|
|
493
|
+
}>>;
|
|
444
494
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
445
495
|
administrativeArea: "administrativeArea";
|
|
446
496
|
location: "location";
|
|
@@ -470,6 +520,11 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
470
520
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
471
521
|
user: "user";
|
|
472
522
|
}>>;
|
|
523
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
524
|
+
administrativeArea: "administrativeArea";
|
|
525
|
+
location: "location";
|
|
526
|
+
all: "all";
|
|
527
|
+
}>>;
|
|
473
528
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
474
529
|
administrativeArea: "administrativeArea";
|
|
475
530
|
location: "location";
|
|
@@ -500,6 +555,11 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
500
555
|
createdBy: z.ZodOptional<z.ZodEnum<{
|
|
501
556
|
user: "user";
|
|
502
557
|
}>>;
|
|
558
|
+
createdIn: z.ZodOptional<z.ZodEnum<{
|
|
559
|
+
administrativeArea: "administrativeArea";
|
|
560
|
+
location: "location";
|
|
561
|
+
all: "all";
|
|
562
|
+
}>>;
|
|
503
563
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
504
564
|
administrativeArea: "administrativeArea";
|
|
505
565
|
location: "location";
|
|
@@ -629,6 +689,7 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
629
689
|
event?: string[] | undefined;
|
|
630
690
|
placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
|
|
631
691
|
createdBy?: "user" | undefined;
|
|
692
|
+
createdIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
632
693
|
} | undefined;
|
|
633
694
|
} | {
|
|
634
695
|
type: "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register";
|
|
@@ -636,6 +697,7 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
636
697
|
event?: string[] | undefined;
|
|
637
698
|
placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
|
|
638
699
|
createdBy?: "user" | undefined;
|
|
700
|
+
createdIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
639
701
|
declaredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
640
702
|
declaredBy?: "user" | undefined;
|
|
641
703
|
} | undefined;
|
|
@@ -645,6 +707,7 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
645
707
|
event?: string[] | undefined;
|
|
646
708
|
placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
|
|
647
709
|
createdBy?: "user" | undefined;
|
|
710
|
+
createdIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
648
711
|
declaredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
649
712
|
declaredBy?: "user" | undefined;
|
|
650
713
|
registeredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
@@ -656,6 +719,7 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
656
719
|
event?: string[] | undefined;
|
|
657
720
|
placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
|
|
658
721
|
createdBy?: "user" | undefined;
|
|
722
|
+
createdIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
659
723
|
declaredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
660
724
|
declaredBy?: "user" | undefined;
|
|
661
725
|
registeredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
@@ -668,6 +732,7 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
668
732
|
event?: string[] | undefined;
|
|
669
733
|
placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
|
|
670
734
|
createdBy?: "user" | undefined;
|
|
735
|
+
createdIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
671
736
|
declaredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
672
737
|
declaredBy?: "user" | undefined;
|
|
673
738
|
registeredIn?: "administrativeArea" | "location" | "all" | undefined;
|
package/dist/scopes/index.js
CHANGED
|
@@ -148,7 +148,8 @@ var userRole = z3.preprocess(
|
|
|
148
148
|
var scopeOptionsPlaceEvent = z3.object({
|
|
149
149
|
event: scopeByEvent,
|
|
150
150
|
placeOfEvent: JurisdictionFilter.optional(),
|
|
151
|
-
createdBy: UserFilter.optional()
|
|
151
|
+
createdBy: UserFilter.optional(),
|
|
152
|
+
createdIn: JurisdictionFilter.optional()
|
|
152
153
|
}).describe("Options applicable to all record scopes.");
|
|
153
154
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
154
155
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -188,7 +189,8 @@ var ScopeOptionKey = AllScopeOptions.keyof();
|
|
|
188
189
|
var ResolvedScopeOptionsPlaceEvent = z3.object({
|
|
189
190
|
event: scopeByEvent,
|
|
190
191
|
placeOfEvent: UUID.nullish(),
|
|
191
|
-
createdBy: z3.string().optional()
|
|
192
|
+
createdBy: z3.string().optional(),
|
|
193
|
+
createdIn: UUID.nullish()
|
|
192
194
|
}).describe(
|
|
193
195
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
194
196
|
);
|
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|