@tmlmobilidade/go-types-permissions 20260828.1636.54
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/allow-all.d.ts +4 -0
- package/dist/allow-all.js +5 -0
- package/dist/catalog.d.ts +199 -0
- package/dist/catalog.js +349 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/permissions.d.ts +397 -0
- package/dist/permissions.js +47 -0
- package/dist/registry.d.ts +192 -0
- package/dist/registry.js +47 -0
- package/dist/resources-registy.d.ts +16 -0
- package/dist/resources-registy.js +32 -0
- package/dist/scopes/agencies/actions.d.ts +3 -0
- package/dist/scopes/agencies/actions.js +11 -0
- package/dist/scopes/agencies/permission.d.ts +12 -0
- package/dist/scopes/agencies/permission.js +9 -0
- package/dist/scopes/agencies/registry.d.ts +12 -0
- package/dist/scopes/agencies/registry.js +9 -0
- package/dist/scopes/agencies/scope.d.ts +3 -0
- package/dist/scopes/agencies/scope.js +4 -0
- package/dist/scopes/alerts/actions.d.ts +3 -0
- package/dist/scopes/alerts/actions.js +14 -0
- package/dist/scopes/alerts/permission.d.ts +30 -0
- package/dist/scopes/alerts/permission.js +11 -0
- package/dist/scopes/alerts/registry.d.ts +12 -0
- package/dist/scopes/alerts/registry.js +9 -0
- package/dist/scopes/alerts/resources.d.ts +12 -0
- package/dist/scopes/alerts/resources.js +7 -0
- package/dist/scopes/alerts/scope.d.ts +3 -0
- package/dist/scopes/alerts/scope.js +4 -0
- package/dist/scopes/annotations/actions.d.ts +3 -0
- package/dist/scopes/annotations/actions.js +11 -0
- package/dist/scopes/annotations/permission.d.ts +25 -0
- package/dist/scopes/annotations/permission.js +11 -0
- package/dist/scopes/annotations/registry.d.ts +12 -0
- package/dist/scopes/annotations/registry.js +9 -0
- package/dist/scopes/annotations/resources.d.ts +9 -0
- package/dist/scopes/annotations/resources.js +6 -0
- package/dist/scopes/annotations/scope.d.ts +3 -0
- package/dist/scopes/annotations/scope.js +4 -0
- package/dist/scopes/events/actions.d.ts +3 -0
- package/dist/scopes/events/actions.js +11 -0
- package/dist/scopes/events/permission.d.ts +25 -0
- package/dist/scopes/events/permission.js +11 -0
- package/dist/scopes/events/registry.d.ts +12 -0
- package/dist/scopes/events/registry.js +9 -0
- package/dist/scopes/events/resources.d.ts +9 -0
- package/dist/scopes/events/resources.js +6 -0
- package/dist/scopes/events/scope.d.ts +3 -0
- package/dist/scopes/events/scope.js +4 -0
- package/dist/scopes/fares/actions.d.ts +3 -0
- package/dist/scopes/fares/actions.js +11 -0
- package/dist/scopes/fares/permission.d.ts +25 -0
- package/dist/scopes/fares/permission.js +11 -0
- package/dist/scopes/fares/registry.d.ts +12 -0
- package/dist/scopes/fares/registry.js +9 -0
- package/dist/scopes/fares/resources.d.ts +9 -0
- package/dist/scopes/fares/resources.js +6 -0
- package/dist/scopes/fares/scope.d.ts +3 -0
- package/dist/scopes/fares/scope.js +4 -0
- package/dist/scopes/gtfs-validations/actions.d.ts +3 -0
- package/dist/scopes/gtfs-validations/actions.js +11 -0
- package/dist/scopes/gtfs-validations/permission.d.ts +25 -0
- package/dist/scopes/gtfs-validations/permission.js +11 -0
- package/dist/scopes/gtfs-validations/registry.d.ts +12 -0
- package/dist/scopes/gtfs-validations/registry.js +9 -0
- package/dist/scopes/gtfs-validations/resources.d.ts +9 -0
- package/dist/scopes/gtfs-validations/resources.js +6 -0
- package/dist/scopes/gtfs-validations/scope.d.ts +3 -0
- package/dist/scopes/gtfs-validations/scope.js +4 -0
- package/dist/scopes/holidays/actions.d.ts +3 -0
- package/dist/scopes/holidays/actions.js +11 -0
- package/dist/scopes/holidays/permission.d.ts +25 -0
- package/dist/scopes/holidays/permission.js +11 -0
- package/dist/scopes/holidays/registry.d.ts +12 -0
- package/dist/scopes/holidays/registry.js +9 -0
- package/dist/scopes/holidays/resources.d.ts +9 -0
- package/dist/scopes/holidays/resources.js +6 -0
- package/dist/scopes/holidays/scope.d.ts +3 -0
- package/dist/scopes/holidays/scope.js +4 -0
- package/dist/scopes/home/actions.d.ts +3 -0
- package/dist/scopes/home/actions.js +8 -0
- package/dist/scopes/home/permission.d.ts +12 -0
- package/dist/scopes/home/permission.js +9 -0
- package/dist/scopes/home/registry.d.ts +12 -0
- package/dist/scopes/home/registry.js +9 -0
- package/dist/scopes/home/scope.d.ts +3 -0
- package/dist/scopes/home/scope.js +4 -0
- package/dist/scopes/lines/actions.d.ts +3 -0
- package/dist/scopes/lines/actions.js +11 -0
- package/dist/scopes/lines/permission.d.ts +25 -0
- package/dist/scopes/lines/permission.js +11 -0
- package/dist/scopes/lines/registry.d.ts +12 -0
- package/dist/scopes/lines/registry.js +9 -0
- package/dist/scopes/lines/resources.d.ts +9 -0
- package/dist/scopes/lines/resources.js +6 -0
- package/dist/scopes/lines/scope.d.ts +3 -0
- package/dist/scopes/lines/scope.js +4 -0
- package/dist/scopes/organizations/actions.d.ts +3 -0
- package/dist/scopes/organizations/actions.js +11 -0
- package/dist/scopes/organizations/permission.d.ts +12 -0
- package/dist/scopes/organizations/permission.js +9 -0
- package/dist/scopes/organizations/registry.d.ts +12 -0
- package/dist/scopes/organizations/registry.js +9 -0
- package/dist/scopes/organizations/scope.d.ts +3 -0
- package/dist/scopes/organizations/scope.js +4 -0
- package/dist/scopes/performance/actions.d.ts +3 -0
- package/dist/scopes/performance/actions.js +7 -0
- package/dist/scopes/performance/permission.d.ts +12 -0
- package/dist/scopes/performance/permission.js +9 -0
- package/dist/scopes/performance/registry.d.ts +12 -0
- package/dist/scopes/performance/registry.js +9 -0
- package/dist/scopes/performance/scope.d.ts +3 -0
- package/dist/scopes/performance/scope.js +4 -0
- package/dist/scopes/plans/actions.d.ts +3 -0
- package/dist/scopes/plans/actions.js +22 -0
- package/dist/scopes/plans/permission.d.ts +25 -0
- package/dist/scopes/plans/permission.js +11 -0
- package/dist/scopes/plans/registry.d.ts +12 -0
- package/dist/scopes/plans/registry.js +9 -0
- package/dist/scopes/plans/resources.d.ts +9 -0
- package/dist/scopes/plans/resources.js +6 -0
- package/dist/scopes/plans/scope.d.ts +3 -0
- package/dist/scopes/plans/scope.js +4 -0
- package/dist/scopes/rides/actions.d.ts +3 -0
- package/dist/scopes/rides/actions.js +19 -0
- package/dist/scopes/rides/permission.d.ts +25 -0
- package/dist/scopes/rides/permission.js +11 -0
- package/dist/scopes/rides/registry.d.ts +12 -0
- package/dist/scopes/rides/registry.js +9 -0
- package/dist/scopes/rides/resources.d.ts +9 -0
- package/dist/scopes/rides/resources.js +6 -0
- package/dist/scopes/rides/scope.d.ts +3 -0
- package/dist/scopes/rides/scope.js +4 -0
- package/dist/scopes/roles/actions.d.ts +3 -0
- package/dist/scopes/roles/actions.js +11 -0
- package/dist/scopes/roles/permission.d.ts +12 -0
- package/dist/scopes/roles/permission.js +9 -0
- package/dist/scopes/roles/registry.d.ts +12 -0
- package/dist/scopes/roles/registry.js +9 -0
- package/dist/scopes/roles/scope.d.ts +3 -0
- package/dist/scopes/roles/scope.js +4 -0
- package/dist/scopes/sams/actions.d.ts +3 -0
- package/dist/scopes/sams/actions.js +8 -0
- package/dist/scopes/sams/permission.d.ts +25 -0
- package/dist/scopes/sams/permission.js +11 -0
- package/dist/scopes/sams/registry.d.ts +12 -0
- package/dist/scopes/sams/registry.js +9 -0
- package/dist/scopes/sams/resources.d.ts +9 -0
- package/dist/scopes/sams/resources.js +6 -0
- package/dist/scopes/sams/scope.d.ts +3 -0
- package/dist/scopes/sams/scope.js +4 -0
- package/dist/scopes/stops/actions.d.ts +3 -0
- package/dist/scopes/stops/actions.js +14 -0
- package/dist/scopes/stops/permission.d.ts +30 -0
- package/dist/scopes/stops/permission.js +11 -0
- package/dist/scopes/stops/registry.d.ts +12 -0
- package/dist/scopes/stops/registry.js +9 -0
- package/dist/scopes/stops/resources.d.ts +12 -0
- package/dist/scopes/stops/resources.js +7 -0
- package/dist/scopes/stops/scope.d.ts +3 -0
- package/dist/scopes/stops/scope.js +4 -0
- package/dist/scopes/typologies/actions.d.ts +3 -0
- package/dist/scopes/typologies/actions.js +11 -0
- package/dist/scopes/typologies/permission.d.ts +25 -0
- package/dist/scopes/typologies/permission.js +11 -0
- package/dist/scopes/typologies/registry.d.ts +12 -0
- package/dist/scopes/typologies/registry.js +9 -0
- package/dist/scopes/typologies/resources.d.ts +9 -0
- package/dist/scopes/typologies/resources.js +6 -0
- package/dist/scopes/typologies/scope.d.ts +3 -0
- package/dist/scopes/typologies/scope.js +4 -0
- package/dist/scopes/users/actions.d.ts +3 -0
- package/dist/scopes/users/actions.js +11 -0
- package/dist/scopes/users/permission.d.ts +12 -0
- package/dist/scopes/users/permission.js +9 -0
- package/dist/scopes/users/registry.d.ts +12 -0
- package/dist/scopes/users/registry.js +9 -0
- package/dist/scopes/users/scope.d.ts +3 -0
- package/dist/scopes/users/scope.js +4 -0
- package/dist/scopes/vehicles/actions.d.ts +3 -0
- package/dist/scopes/vehicles/actions.js +11 -0
- package/dist/scopes/vehicles/permission.d.ts +25 -0
- package/dist/scopes/vehicles/permission.js +11 -0
- package/dist/scopes/vehicles/registry.d.ts +12 -0
- package/dist/scopes/vehicles/registry.js +9 -0
- package/dist/scopes/vehicles/resources.d.ts +9 -0
- package/dist/scopes/vehicles/resources.js +6 -0
- package/dist/scopes/vehicles/scope.d.ts +3 -0
- package/dist/scopes/vehicles/scope.js +4 -0
- package/dist/scopes/year-periods/actions.d.ts +3 -0
- package/dist/scopes/year-periods/actions.js +11 -0
- package/dist/scopes/year-periods/permission.d.ts +25 -0
- package/dist/scopes/year-periods/permission.js +11 -0
- package/dist/scopes/year-periods/registry.d.ts +12 -0
- package/dist/scopes/year-periods/registry.js +9 -0
- package/dist/scopes/year-periods/resources.d.ts +9 -0
- package/dist/scopes/year-periods/resources.js +6 -0
- package/dist/scopes/year-periods/scope.d.ts +3 -0
- package/dist/scopes/year-periods/scope.js +4 -0
- package/dist/scopes/zones/actions.d.ts +3 -0
- package/dist/scopes/zones/actions.js +11 -0
- package/dist/scopes/zones/permission.d.ts +25 -0
- package/dist/scopes/zones/permission.js +11 -0
- package/dist/scopes/zones/registry.d.ts +12 -0
- package/dist/scopes/zones/registry.js +9 -0
- package/dist/scopes/zones/resources.d.ts +9 -0
- package/dist/scopes/zones/resources.js +6 -0
- package/dist/scopes/zones/scope.d.ts +3 -0
- package/dist/scopes/zones/scope.js +4 -0
- package/dist/utils/has-permission-resource.d.ts +29 -0
- package/dist/utils/has-permission-resource.js +41 -0
- package/dist/utils/has-permission.d.ts +8 -0
- package/dist/utils/has-permission.js +20 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/package.json +48 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GtfsValidationsPermissionActionsSchema: z.ZodEnum<["create", "read", "lock", "request_approval", "update_processing_status"]>;
|
|
3
|
+
export type GtfsValidationsPermissionActions = z.infer<typeof GtfsValidationsPermissionActionsSchema>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/* * */
|
|
4
|
+
const GtfsValidationsPermissionActionsValues = [
|
|
5
|
+
'create',
|
|
6
|
+
'read',
|
|
7
|
+
'lock',
|
|
8
|
+
'request_approval',
|
|
9
|
+
'update_processing_status',
|
|
10
|
+
];
|
|
11
|
+
export const GtfsValidationsPermissionActionsSchema = z.enum(GtfsValidationsPermissionActionsValues);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GtfsValidationsPermissionSchema: z.ZodObject<{
|
|
3
|
+
action: z.ZodEnum<["create", "read", "lock", "request_approval", "update_processing_status"]>;
|
|
4
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
5
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
agency_ids: string[];
|
|
8
|
+
}, {
|
|
9
|
+
agency_ids?: string[] | undefined;
|
|
10
|
+
}>>;
|
|
11
|
+
scope: z.ZodLiteral<"gtfs_validations">;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
action: "create" | "read" | "lock" | "request_approval" | "update_processing_status";
|
|
14
|
+
scope: "gtfs_validations";
|
|
15
|
+
resources: {
|
|
16
|
+
agency_ids: string[];
|
|
17
|
+
};
|
|
18
|
+
}, {
|
|
19
|
+
action: "create" | "read" | "lock" | "request_approval" | "update_processing_status";
|
|
20
|
+
scope: "gtfs_validations";
|
|
21
|
+
resources?: {
|
|
22
|
+
agency_ids?: string[] | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
export type GtfsValidationsPermission = z.infer<typeof GtfsValidationsPermissionSchema>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { GtfsValidationsPermissionActionsSchema } from './actions.js';
|
|
4
|
+
import { GtfsValidationsPermissionResourcesSchema } from './resources.js';
|
|
5
|
+
import { GtfsValidationsPermissionScopeSchema } from './scope.js';
|
|
6
|
+
/* * */
|
|
7
|
+
export const GtfsValidationsPermissionSchema = z.object({
|
|
8
|
+
action: GtfsValidationsPermissionActionsSchema,
|
|
9
|
+
resources: GtfsValidationsPermissionResourcesSchema.default({}),
|
|
10
|
+
scope: GtfsValidationsPermissionScopeSchema,
|
|
11
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GtfsValidationsPermissionRegistrySchema: z.ZodObject<{
|
|
3
|
+
actions: z.ZodArray<z.ZodEnum<["create", "read", "lock", "request_approval", "update_processing_status"]>, "many">;
|
|
4
|
+
scope: z.ZodLiteral<"gtfs_validations">;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
scope: "gtfs_validations";
|
|
7
|
+
actions: ("create" | "read" | "lock" | "request_approval" | "update_processing_status")[];
|
|
8
|
+
}, {
|
|
9
|
+
scope: "gtfs_validations";
|
|
10
|
+
actions: ("create" | "read" | "lock" | "request_approval" | "update_processing_status")[];
|
|
11
|
+
}>;
|
|
12
|
+
export type GtfsValidationsPermissionRegistry = z.infer<typeof GtfsValidationsPermissionRegistrySchema>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { GtfsValidationsPermissionActionsSchema } from './actions.js';
|
|
4
|
+
import { GtfsValidationsPermissionScopeSchema } from './scope.js';
|
|
5
|
+
/* * */
|
|
6
|
+
export const GtfsValidationsPermissionRegistrySchema = z.object({
|
|
7
|
+
actions: z.array(GtfsValidationsPermissionActionsSchema),
|
|
8
|
+
scope: GtfsValidationsPermissionScopeSchema,
|
|
9
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GtfsValidationsPermissionResourcesSchema: z.ZodObject<{
|
|
3
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
agency_ids: string[];
|
|
6
|
+
}, {
|
|
7
|
+
agency_ids?: string[] | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
export type GtfsValidationsPermissionResources = z.infer<typeof GtfsValidationsPermissionResourcesSchema>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const HolidaysPermissionSchema: z.ZodObject<{
|
|
3
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
4
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
5
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
agency_ids: string[];
|
|
8
|
+
}, {
|
|
9
|
+
agency_ids?: string[] | undefined;
|
|
10
|
+
}>>;
|
|
11
|
+
scope: z.ZodLiteral<"holidays">;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
14
|
+
scope: "holidays";
|
|
15
|
+
resources: {
|
|
16
|
+
agency_ids: string[];
|
|
17
|
+
};
|
|
18
|
+
}, {
|
|
19
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
20
|
+
scope: "holidays";
|
|
21
|
+
resources?: {
|
|
22
|
+
agency_ids?: string[] | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
export type HolidaysPermission = z.infer<typeof HolidaysPermissionSchema>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { HolidaysPermissionActionsSchema } from './actions.js';
|
|
4
|
+
import { HolidaysPermissionResourcesSchema } from './resources.js';
|
|
5
|
+
import { HolidaysPermissionScopeSchema } from './scope.js';
|
|
6
|
+
/* * */
|
|
7
|
+
export const HolidaysPermissionSchema = z.object({
|
|
8
|
+
action: HolidaysPermissionActionsSchema,
|
|
9
|
+
resources: HolidaysPermissionResourcesSchema.default({}),
|
|
10
|
+
scope: HolidaysPermissionScopeSchema,
|
|
11
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const HolidaysPermissionRegistrySchema: z.ZodObject<{
|
|
3
|
+
actions: z.ZodArray<z.ZodEnum<["create", "delete", "read", "lock", "update"]>, "many">;
|
|
4
|
+
scope: z.ZodLiteral<"holidays">;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
scope: "holidays";
|
|
7
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
8
|
+
}, {
|
|
9
|
+
scope: "holidays";
|
|
10
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
11
|
+
}>;
|
|
12
|
+
export type HolidaysPermissionRegistry = z.infer<typeof HolidaysPermissionRegistrySchema>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { HolidaysPermissionActionsSchema } from './actions.js';
|
|
4
|
+
import { HolidaysPermissionScopeSchema } from './scope.js';
|
|
5
|
+
/* * */
|
|
6
|
+
export const HolidaysPermissionRegistrySchema = z.object({
|
|
7
|
+
actions: z.array(HolidaysPermissionActionsSchema),
|
|
8
|
+
scope: HolidaysPermissionScopeSchema,
|
|
9
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const HolidaysPermissionResourcesSchema: z.ZodObject<{
|
|
3
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
agency_ids: string[];
|
|
6
|
+
}, {
|
|
7
|
+
agency_ids?: string[] | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
export type HolidaysPermissionResources = z.infer<typeof HolidaysPermissionResourcesSchema>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const HomePermissionSchema: z.ZodObject<{
|
|
3
|
+
action: z.ZodEnum<["read_links", "read_wiki"]>;
|
|
4
|
+
scope: z.ZodLiteral<"home">;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
action: "read_links" | "read_wiki";
|
|
7
|
+
scope: "home";
|
|
8
|
+
}, {
|
|
9
|
+
action: "read_links" | "read_wiki";
|
|
10
|
+
scope: "home";
|
|
11
|
+
}>;
|
|
12
|
+
export type HomePermission = z.infer<typeof HomePermissionSchema>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { HomePermissionActionsSchema } from './actions.js';
|
|
4
|
+
import { HomePermissionScopeSchema } from './scope.js';
|
|
5
|
+
/* * */
|
|
6
|
+
export const HomePermissionSchema = z.object({
|
|
7
|
+
action: HomePermissionActionsSchema,
|
|
8
|
+
scope: HomePermissionScopeSchema,
|
|
9
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const HomePermissionRegistrySchema: z.ZodObject<{
|
|
3
|
+
actions: z.ZodArray<z.ZodEnum<["read_links", "read_wiki"]>, "many">;
|
|
4
|
+
scope: z.ZodLiteral<"home">;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
scope: "home";
|
|
7
|
+
actions: ("read_links" | "read_wiki")[];
|
|
8
|
+
}, {
|
|
9
|
+
scope: "home";
|
|
10
|
+
actions: ("read_links" | "read_wiki")[];
|
|
11
|
+
}>;
|
|
12
|
+
export type HomePermissionRegistry = z.infer<typeof HomePermissionRegistrySchema>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { HomePermissionActionsSchema } from './actions.js';
|
|
4
|
+
import { HomePermissionScopeSchema } from './scope.js';
|
|
5
|
+
/* * */
|
|
6
|
+
export const HomePermissionRegistrySchema = z.object({
|
|
7
|
+
actions: z.array(HomePermissionActionsSchema),
|
|
8
|
+
scope: HomePermissionScopeSchema,
|
|
9
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const LinesPermissionSchema: z.ZodObject<{
|
|
3
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
4
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
5
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
agency_ids: string[];
|
|
8
|
+
}, {
|
|
9
|
+
agency_ids?: string[] | undefined;
|
|
10
|
+
}>>;
|
|
11
|
+
scope: z.ZodLiteral<"lines">;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
14
|
+
scope: "lines";
|
|
15
|
+
resources: {
|
|
16
|
+
agency_ids: string[];
|
|
17
|
+
};
|
|
18
|
+
}, {
|
|
19
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
20
|
+
scope: "lines";
|
|
21
|
+
resources?: {
|
|
22
|
+
agency_ids?: string[] | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
export type LinesPermission = z.infer<typeof LinesPermissionSchema>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { LinesPermissionActionsSchema } from './actions.js';
|
|
4
|
+
import { LinesPermissionResourcesSchema } from './resources.js';
|
|
5
|
+
import { LinesPermissionScopeSchema } from './scope.js';
|
|
6
|
+
/* * */
|
|
7
|
+
export const LinesPermissionSchema = z.object({
|
|
8
|
+
action: LinesPermissionActionsSchema,
|
|
9
|
+
resources: LinesPermissionResourcesSchema.default({}),
|
|
10
|
+
scope: LinesPermissionScopeSchema,
|
|
11
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const LinesPermissionRegistrySchema: z.ZodObject<{
|
|
3
|
+
actions: z.ZodArray<z.ZodEnum<["create", "delete", "read", "lock", "update"]>, "many">;
|
|
4
|
+
scope: z.ZodLiteral<"lines">;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
scope: "lines";
|
|
7
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
8
|
+
}, {
|
|
9
|
+
scope: "lines";
|
|
10
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
11
|
+
}>;
|
|
12
|
+
export type LinesPermissionRegistry = z.infer<typeof LinesPermissionRegistrySchema>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { LinesPermissionActionsSchema } from './actions.js';
|
|
4
|
+
import { LinesPermissionScopeSchema } from './scope.js';
|
|
5
|
+
/* * */
|
|
6
|
+
export const LinesPermissionRegistrySchema = z.object({
|
|
7
|
+
actions: z.array(LinesPermissionActionsSchema),
|
|
8
|
+
scope: LinesPermissionScopeSchema,
|
|
9
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const LinesPermissionResourcesSchema: z.ZodObject<{
|
|
3
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
agency_ids: string[];
|
|
6
|
+
}, {
|
|
7
|
+
agency_ids?: string[] | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
export type LinesPermissionResources = z.infer<typeof LinesPermissionResourcesSchema>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const OrganizationsPermissionSchema: z.ZodObject<{
|
|
3
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
4
|
+
scope: z.ZodLiteral<"organizations">;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
7
|
+
scope: "organizations";
|
|
8
|
+
}, {
|
|
9
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
10
|
+
scope: "organizations";
|
|
11
|
+
}>;
|
|
12
|
+
export type OrganizationsPermission = z.infer<typeof OrganizationsPermissionSchema>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { OrganizationsPermissionActionsSchema } from './actions.js';
|
|
4
|
+
import { OrganizationsPermissionScopeSchema } from './scope.js';
|
|
5
|
+
/* * */
|
|
6
|
+
export const OrganizationsPermissionSchema = z.object({
|
|
7
|
+
action: OrganizationsPermissionActionsSchema,
|
|
8
|
+
scope: OrganizationsPermissionScopeSchema,
|
|
9
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const OrganizationsPermissionRegistrySchema: z.ZodObject<{
|
|
3
|
+
actions: z.ZodArray<z.ZodEnum<["create", "delete", "read", "lock", "update"]>, "many">;
|
|
4
|
+
scope: z.ZodLiteral<"organizations">;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
scope: "organizations";
|
|
7
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
8
|
+
}, {
|
|
9
|
+
scope: "organizations";
|
|
10
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
11
|
+
}>;
|
|
12
|
+
export type OrganizationsPermissionRegistry = z.infer<typeof OrganizationsPermissionRegistrySchema>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { OrganizationsPermissionActionsSchema } from './actions.js';
|
|
4
|
+
import { OrganizationsPermissionScopeSchema } from './scope.js';
|
|
5
|
+
/* * */
|
|
6
|
+
export const OrganizationsPermissionRegistrySchema = z.object({
|
|
7
|
+
actions: z.array(OrganizationsPermissionActionsSchema),
|
|
8
|
+
scope: OrganizationsPermissionScopeSchema,
|
|
9
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PerformancePermissionSchema: z.ZodObject<{
|
|
3
|
+
action: z.ZodEnum<["read"]>;
|
|
4
|
+
scope: z.ZodLiteral<"performance">;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
action: "read";
|
|
7
|
+
scope: "performance";
|
|
8
|
+
}, {
|
|
9
|
+
action: "read";
|
|
10
|
+
scope: "performance";
|
|
11
|
+
}>;
|
|
12
|
+
export type PerformancePermission = z.infer<typeof PerformancePermissionSchema>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { PerformancePermissionActionsSchema } from './actions.js';
|
|
4
|
+
import { PerformancePermissionScopeSchema } from './scope.js';
|
|
5
|
+
/* * */
|
|
6
|
+
export const PerformancePermissionSchema = z.object({
|
|
7
|
+
action: PerformancePermissionActionsSchema,
|
|
8
|
+
scope: PerformancePermissionScopeSchema,
|
|
9
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PerformancePermissionRegistrySchema: z.ZodObject<{
|
|
3
|
+
actions: z.ZodArray<z.ZodEnum<["read"]>, "many">;
|
|
4
|
+
scope: z.ZodLiteral<"performance">;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
scope: "performance";
|
|
7
|
+
actions: "read"[];
|
|
8
|
+
}, {
|
|
9
|
+
scope: "performance";
|
|
10
|
+
actions: "read"[];
|
|
11
|
+
}>;
|
|
12
|
+
export type PerformancePermissionRegistry = z.infer<typeof PerformancePermissionRegistrySchema>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { PerformancePermissionActionsSchema } from './actions.js';
|
|
4
|
+
import { PerformancePermissionScopeSchema } from './scope.js';
|
|
5
|
+
/* * */
|
|
6
|
+
export const PerformancePermissionRegistrySchema = z.object({
|
|
7
|
+
actions: z.array(PerformancePermissionActionsSchema),
|
|
8
|
+
scope: PerformancePermissionScopeSchema,
|
|
9
|
+
});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PlansPermissionActionsSchema: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "lock", "update", "update_controller", "update_feed_info_dates", "update_gtfs_plan", "update_pcgi_legacy", "read_apex_file", "update_apex_file", "delete_apex_file", "send_apex_notification", "generate_pdf_posters"]>;
|
|
3
|
+
export type PlansPermissionActions = z.infer<typeof PlansPermissionActionsSchema>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/* * */
|
|
4
|
+
const PlansPermissionActionsValues = [
|
|
5
|
+
'create',
|
|
6
|
+
'delete',
|
|
7
|
+
'read',
|
|
8
|
+
'read_controller',
|
|
9
|
+
'read_pcgi_legacy',
|
|
10
|
+
'lock',
|
|
11
|
+
'update',
|
|
12
|
+
'update_controller',
|
|
13
|
+
'update_feed_info_dates',
|
|
14
|
+
'update_gtfs_plan',
|
|
15
|
+
'update_pcgi_legacy',
|
|
16
|
+
'read_apex_file',
|
|
17
|
+
'update_apex_file',
|
|
18
|
+
'delete_apex_file',
|
|
19
|
+
'send_apex_notification',
|
|
20
|
+
'generate_pdf_posters',
|
|
21
|
+
];
|
|
22
|
+
export const PlansPermissionActionsSchema = z.enum(PlansPermissionActionsValues);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PlansPermissionSchema: z.ZodObject<{
|
|
3
|
+
action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "lock", "update", "update_controller", "update_feed_info_dates", "update_gtfs_plan", "update_pcgi_legacy", "read_apex_file", "update_apex_file", "delete_apex_file", "send_apex_notification", "generate_pdf_posters"]>;
|
|
4
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
5
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
agency_ids: string[];
|
|
8
|
+
}, {
|
|
9
|
+
agency_ids?: string[] | undefined;
|
|
10
|
+
}>>;
|
|
11
|
+
scope: z.ZodLiteral<"plans">;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
action: "create" | "delete" | "read" | "lock" | "update" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy" | "read_apex_file" | "update_apex_file" | "delete_apex_file" | "send_apex_notification" | "generate_pdf_posters";
|
|
14
|
+
scope: "plans";
|
|
15
|
+
resources: {
|
|
16
|
+
agency_ids: string[];
|
|
17
|
+
};
|
|
18
|
+
}, {
|
|
19
|
+
action: "create" | "delete" | "read" | "lock" | "update" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy" | "read_apex_file" | "update_apex_file" | "delete_apex_file" | "send_apex_notification" | "generate_pdf_posters";
|
|
20
|
+
scope: "plans";
|
|
21
|
+
resources?: {
|
|
22
|
+
agency_ids?: string[] | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
export type PlansPermission = z.infer<typeof PlansPermissionSchema>;
|