@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,397 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PermissionSchema: z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
|
|
3
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
4
|
+
scope: z.ZodLiteral<"agencies">;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
7
|
+
scope: "agencies";
|
|
8
|
+
}, {
|
|
9
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
10
|
+
scope: "agencies";
|
|
11
|
+
}>, z.ZodObject<{
|
|
12
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update", "update_texts", "update_dates", "update_publish_status"]>;
|
|
13
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
14
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
15
|
+
reference_types: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
agency_ids: string[];
|
|
18
|
+
reference_types: string[];
|
|
19
|
+
}, {
|
|
20
|
+
agency_ids?: string[] | undefined;
|
|
21
|
+
reference_types?: string[] | undefined;
|
|
22
|
+
}>>;
|
|
23
|
+
scope: z.ZodLiteral<"alerts">;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
action: "create" | "delete" | "read" | "lock" | "update" | "update_texts" | "update_dates" | "update_publish_status";
|
|
26
|
+
scope: "alerts";
|
|
27
|
+
resources: {
|
|
28
|
+
agency_ids: string[];
|
|
29
|
+
reference_types: string[];
|
|
30
|
+
};
|
|
31
|
+
}, {
|
|
32
|
+
action: "create" | "delete" | "read" | "lock" | "update" | "update_texts" | "update_dates" | "update_publish_status";
|
|
33
|
+
scope: "alerts";
|
|
34
|
+
resources?: {
|
|
35
|
+
agency_ids?: string[] | undefined;
|
|
36
|
+
reference_types?: string[] | undefined;
|
|
37
|
+
} | undefined;
|
|
38
|
+
}>, z.ZodObject<{
|
|
39
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
40
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
41
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
agency_ids: string[];
|
|
44
|
+
}, {
|
|
45
|
+
agency_ids?: string[] | undefined;
|
|
46
|
+
}>>;
|
|
47
|
+
scope: z.ZodLiteral<"annotations">;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
50
|
+
scope: "annotations";
|
|
51
|
+
resources: {
|
|
52
|
+
agency_ids: string[];
|
|
53
|
+
};
|
|
54
|
+
}, {
|
|
55
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
56
|
+
scope: "annotations";
|
|
57
|
+
resources?: {
|
|
58
|
+
agency_ids?: string[] | undefined;
|
|
59
|
+
} | undefined;
|
|
60
|
+
}>, z.ZodObject<{
|
|
61
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
62
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
63
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
agency_ids: string[];
|
|
66
|
+
}, {
|
|
67
|
+
agency_ids?: string[] | undefined;
|
|
68
|
+
}>>;
|
|
69
|
+
scope: z.ZodLiteral<"events">;
|
|
70
|
+
}, "strip", z.ZodTypeAny, {
|
|
71
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
72
|
+
scope: "events";
|
|
73
|
+
resources: {
|
|
74
|
+
agency_ids: string[];
|
|
75
|
+
};
|
|
76
|
+
}, {
|
|
77
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
78
|
+
scope: "events";
|
|
79
|
+
resources?: {
|
|
80
|
+
agency_ids?: string[] | undefined;
|
|
81
|
+
} | undefined;
|
|
82
|
+
}>, z.ZodObject<{
|
|
83
|
+
action: z.ZodEnum<["create", "delete", "lock", "nav", "update"]>;
|
|
84
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
85
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
agency_ids: string[];
|
|
88
|
+
}, {
|
|
89
|
+
agency_ids?: string[] | undefined;
|
|
90
|
+
}>>;
|
|
91
|
+
scope: z.ZodLiteral<"fares">;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
action: "create" | "delete" | "lock" | "update" | "nav";
|
|
94
|
+
scope: "fares";
|
|
95
|
+
resources: {
|
|
96
|
+
agency_ids: string[];
|
|
97
|
+
};
|
|
98
|
+
}, {
|
|
99
|
+
action: "create" | "delete" | "lock" | "update" | "nav";
|
|
100
|
+
scope: "fares";
|
|
101
|
+
resources?: {
|
|
102
|
+
agency_ids?: string[] | undefined;
|
|
103
|
+
} | undefined;
|
|
104
|
+
}>, z.ZodObject<{
|
|
105
|
+
action: z.ZodEnum<["create", "read", "lock", "request_approval", "update_processing_status"]>;
|
|
106
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
107
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
108
|
+
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
agency_ids: string[];
|
|
110
|
+
}, {
|
|
111
|
+
agency_ids?: string[] | undefined;
|
|
112
|
+
}>>;
|
|
113
|
+
scope: z.ZodLiteral<"gtfs_validations">;
|
|
114
|
+
}, "strip", z.ZodTypeAny, {
|
|
115
|
+
action: "create" | "read" | "lock" | "request_approval" | "update_processing_status";
|
|
116
|
+
scope: "gtfs_validations";
|
|
117
|
+
resources: {
|
|
118
|
+
agency_ids: string[];
|
|
119
|
+
};
|
|
120
|
+
}, {
|
|
121
|
+
action: "create" | "read" | "lock" | "request_approval" | "update_processing_status";
|
|
122
|
+
scope: "gtfs_validations";
|
|
123
|
+
resources?: {
|
|
124
|
+
agency_ids?: string[] | undefined;
|
|
125
|
+
} | undefined;
|
|
126
|
+
}>, z.ZodObject<{
|
|
127
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
128
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
129
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
130
|
+
}, "strip", z.ZodTypeAny, {
|
|
131
|
+
agency_ids: string[];
|
|
132
|
+
}, {
|
|
133
|
+
agency_ids?: string[] | undefined;
|
|
134
|
+
}>>;
|
|
135
|
+
scope: z.ZodLiteral<"holidays">;
|
|
136
|
+
}, "strip", z.ZodTypeAny, {
|
|
137
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
138
|
+
scope: "holidays";
|
|
139
|
+
resources: {
|
|
140
|
+
agency_ids: string[];
|
|
141
|
+
};
|
|
142
|
+
}, {
|
|
143
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
144
|
+
scope: "holidays";
|
|
145
|
+
resources?: {
|
|
146
|
+
agency_ids?: string[] | undefined;
|
|
147
|
+
} | undefined;
|
|
148
|
+
}>, z.ZodObject<{
|
|
149
|
+
action: z.ZodEnum<["read_links", "read_wiki"]>;
|
|
150
|
+
scope: z.ZodLiteral<"home">;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
action: "read_links" | "read_wiki";
|
|
153
|
+
scope: "home";
|
|
154
|
+
}, {
|
|
155
|
+
action: "read_links" | "read_wiki";
|
|
156
|
+
scope: "home";
|
|
157
|
+
}>, z.ZodObject<{
|
|
158
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
159
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
160
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
161
|
+
}, "strip", z.ZodTypeAny, {
|
|
162
|
+
agency_ids: string[];
|
|
163
|
+
}, {
|
|
164
|
+
agency_ids?: string[] | undefined;
|
|
165
|
+
}>>;
|
|
166
|
+
scope: z.ZodLiteral<"lines">;
|
|
167
|
+
}, "strip", z.ZodTypeAny, {
|
|
168
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
169
|
+
scope: "lines";
|
|
170
|
+
resources: {
|
|
171
|
+
agency_ids: string[];
|
|
172
|
+
};
|
|
173
|
+
}, {
|
|
174
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
175
|
+
scope: "lines";
|
|
176
|
+
resources?: {
|
|
177
|
+
agency_ids?: string[] | undefined;
|
|
178
|
+
} | undefined;
|
|
179
|
+
}>, z.ZodObject<{
|
|
180
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
181
|
+
scope: z.ZodLiteral<"organizations">;
|
|
182
|
+
}, "strip", z.ZodTypeAny, {
|
|
183
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
184
|
+
scope: "organizations";
|
|
185
|
+
}, {
|
|
186
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
187
|
+
scope: "organizations";
|
|
188
|
+
}>, z.ZodObject<{
|
|
189
|
+
action: z.ZodEnum<["read"]>;
|
|
190
|
+
scope: z.ZodLiteral<"performance">;
|
|
191
|
+
}, "strip", z.ZodTypeAny, {
|
|
192
|
+
action: "read";
|
|
193
|
+
scope: "performance";
|
|
194
|
+
}, {
|
|
195
|
+
action: "read";
|
|
196
|
+
scope: "performance";
|
|
197
|
+
}>, z.ZodObject<{
|
|
198
|
+
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"]>;
|
|
199
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
200
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
201
|
+
}, "strip", z.ZodTypeAny, {
|
|
202
|
+
agency_ids: string[];
|
|
203
|
+
}, {
|
|
204
|
+
agency_ids?: string[] | undefined;
|
|
205
|
+
}>>;
|
|
206
|
+
scope: z.ZodLiteral<"plans">;
|
|
207
|
+
}, "strip", z.ZodTypeAny, {
|
|
208
|
+
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";
|
|
209
|
+
scope: "plans";
|
|
210
|
+
resources: {
|
|
211
|
+
agency_ids: string[];
|
|
212
|
+
};
|
|
213
|
+
}, {
|
|
214
|
+
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";
|
|
215
|
+
scope: "plans";
|
|
216
|
+
resources?: {
|
|
217
|
+
agency_ids?: string[] | undefined;
|
|
218
|
+
} | undefined;
|
|
219
|
+
}>, z.ZodObject<{
|
|
220
|
+
action: z.ZodEnum<["acceptance_change_status", "acceptance_justify", "acceptance_lock", "acceptance_read", "analsys_lock", "analysis_lock", "analysis_read", "analysis_reprocess", "analysis_update", "audit_lock", "audit_read", "audit_update", "acceptance_comment_activity"]>;
|
|
221
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
222
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
223
|
+
}, "strip", z.ZodTypeAny, {
|
|
224
|
+
agency_ids: string[];
|
|
225
|
+
}, {
|
|
226
|
+
agency_ids?: string[] | undefined;
|
|
227
|
+
}>>;
|
|
228
|
+
scope: z.ZodLiteral<"rides">;
|
|
229
|
+
}, "strip", z.ZodTypeAny, {
|
|
230
|
+
action: "acceptance_change_status" | "acceptance_justify" | "acceptance_lock" | "acceptance_read" | "analsys_lock" | "analysis_lock" | "analysis_read" | "analysis_reprocess" | "analysis_update" | "audit_lock" | "audit_read" | "audit_update" | "acceptance_comment_activity";
|
|
231
|
+
scope: "rides";
|
|
232
|
+
resources: {
|
|
233
|
+
agency_ids: string[];
|
|
234
|
+
};
|
|
235
|
+
}, {
|
|
236
|
+
action: "acceptance_change_status" | "acceptance_justify" | "acceptance_lock" | "acceptance_read" | "analsys_lock" | "analysis_lock" | "analysis_read" | "analysis_reprocess" | "analysis_update" | "audit_lock" | "audit_read" | "audit_update" | "acceptance_comment_activity";
|
|
237
|
+
scope: "rides";
|
|
238
|
+
resources?: {
|
|
239
|
+
agency_ids?: string[] | undefined;
|
|
240
|
+
} | undefined;
|
|
241
|
+
}>, z.ZodObject<{
|
|
242
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
243
|
+
scope: z.ZodLiteral<"roles">;
|
|
244
|
+
}, "strip", z.ZodTypeAny, {
|
|
245
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
246
|
+
scope: "roles";
|
|
247
|
+
}, {
|
|
248
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
249
|
+
scope: "roles";
|
|
250
|
+
}>, z.ZodObject<{
|
|
251
|
+
action: z.ZodEnum<["read", "export"]>;
|
|
252
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
253
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
254
|
+
}, "strip", z.ZodTypeAny, {
|
|
255
|
+
agency_ids: string[];
|
|
256
|
+
}, {
|
|
257
|
+
agency_ids?: string[] | undefined;
|
|
258
|
+
}>>;
|
|
259
|
+
scope: z.ZodLiteral<"sams">;
|
|
260
|
+
}, "strip", z.ZodTypeAny, {
|
|
261
|
+
action: "read" | "export";
|
|
262
|
+
scope: "sams";
|
|
263
|
+
resources: {
|
|
264
|
+
agency_ids: string[];
|
|
265
|
+
};
|
|
266
|
+
}, {
|
|
267
|
+
action: "read" | "export";
|
|
268
|
+
scope: "sams";
|
|
269
|
+
resources?: {
|
|
270
|
+
agency_ids?: string[] | undefined;
|
|
271
|
+
} | undefined;
|
|
272
|
+
}>, z.ZodObject<{
|
|
273
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update", "export", "edit_coordinates", "edit_name"]>;
|
|
274
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
275
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
276
|
+
municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
277
|
+
}, "strip", z.ZodTypeAny, {
|
|
278
|
+
agency_ids: string[];
|
|
279
|
+
municipality_ids: string[];
|
|
280
|
+
}, {
|
|
281
|
+
agency_ids?: string[] | undefined;
|
|
282
|
+
municipality_ids?: string[] | undefined;
|
|
283
|
+
}>>;
|
|
284
|
+
scope: z.ZodLiteral<"stops">;
|
|
285
|
+
}, "strip", z.ZodTypeAny, {
|
|
286
|
+
action: "create" | "delete" | "read" | "lock" | "update" | "export" | "edit_coordinates" | "edit_name";
|
|
287
|
+
scope: "stops";
|
|
288
|
+
resources: {
|
|
289
|
+
agency_ids: string[];
|
|
290
|
+
municipality_ids: string[];
|
|
291
|
+
};
|
|
292
|
+
}, {
|
|
293
|
+
action: "create" | "delete" | "read" | "lock" | "update" | "export" | "edit_coordinates" | "edit_name";
|
|
294
|
+
scope: "stops";
|
|
295
|
+
resources?: {
|
|
296
|
+
agency_ids?: string[] | undefined;
|
|
297
|
+
municipality_ids?: string[] | undefined;
|
|
298
|
+
} | undefined;
|
|
299
|
+
}>, z.ZodObject<{
|
|
300
|
+
action: z.ZodEnum<["create", "delete", "lock", "nav", "update"]>;
|
|
301
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
302
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
303
|
+
}, "strip", z.ZodTypeAny, {
|
|
304
|
+
agency_ids: string[];
|
|
305
|
+
}, {
|
|
306
|
+
agency_ids?: string[] | undefined;
|
|
307
|
+
}>>;
|
|
308
|
+
scope: z.ZodLiteral<"typologies">;
|
|
309
|
+
}, "strip", z.ZodTypeAny, {
|
|
310
|
+
action: "create" | "delete" | "lock" | "update" | "nav";
|
|
311
|
+
scope: "typologies";
|
|
312
|
+
resources: {
|
|
313
|
+
agency_ids: string[];
|
|
314
|
+
};
|
|
315
|
+
}, {
|
|
316
|
+
action: "create" | "delete" | "lock" | "update" | "nav";
|
|
317
|
+
scope: "typologies";
|
|
318
|
+
resources?: {
|
|
319
|
+
agency_ids?: string[] | undefined;
|
|
320
|
+
} | undefined;
|
|
321
|
+
}>, z.ZodObject<{
|
|
322
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
323
|
+
scope: z.ZodLiteral<"users">;
|
|
324
|
+
}, "strip", z.ZodTypeAny, {
|
|
325
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
326
|
+
scope: "users";
|
|
327
|
+
}, {
|
|
328
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
329
|
+
scope: "users";
|
|
330
|
+
}>, z.ZodObject<{
|
|
331
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
332
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
333
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
334
|
+
}, "strip", z.ZodTypeAny, {
|
|
335
|
+
agency_ids: string[];
|
|
336
|
+
}, {
|
|
337
|
+
agency_ids?: string[] | undefined;
|
|
338
|
+
}>>;
|
|
339
|
+
scope: z.ZodLiteral<"vehicles">;
|
|
340
|
+
}, "strip", z.ZodTypeAny, {
|
|
341
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
342
|
+
scope: "vehicles";
|
|
343
|
+
resources: {
|
|
344
|
+
agency_ids: string[];
|
|
345
|
+
};
|
|
346
|
+
}, {
|
|
347
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
348
|
+
scope: "vehicles";
|
|
349
|
+
resources?: {
|
|
350
|
+
agency_ids?: string[] | undefined;
|
|
351
|
+
} | undefined;
|
|
352
|
+
}>, z.ZodObject<{
|
|
353
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
354
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
355
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
356
|
+
}, "strip", z.ZodTypeAny, {
|
|
357
|
+
agency_ids: string[];
|
|
358
|
+
}, {
|
|
359
|
+
agency_ids?: string[] | undefined;
|
|
360
|
+
}>>;
|
|
361
|
+
scope: z.ZodLiteral<"year_periods">;
|
|
362
|
+
}, "strip", z.ZodTypeAny, {
|
|
363
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
364
|
+
scope: "year_periods";
|
|
365
|
+
resources: {
|
|
366
|
+
agency_ids: string[];
|
|
367
|
+
};
|
|
368
|
+
}, {
|
|
369
|
+
action: "create" | "delete" | "read" | "lock" | "update";
|
|
370
|
+
scope: "year_periods";
|
|
371
|
+
resources?: {
|
|
372
|
+
agency_ids?: string[] | undefined;
|
|
373
|
+
} | undefined;
|
|
374
|
+
}>, z.ZodObject<{
|
|
375
|
+
action: z.ZodEnum<["create", "delete", "lock", "nav", "update"]>;
|
|
376
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
377
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
378
|
+
}, "strip", z.ZodTypeAny, {
|
|
379
|
+
agency_ids: string[];
|
|
380
|
+
}, {
|
|
381
|
+
agency_ids?: string[] | undefined;
|
|
382
|
+
}>>;
|
|
383
|
+
scope: z.ZodLiteral<"zones">;
|
|
384
|
+
}, "strip", z.ZodTypeAny, {
|
|
385
|
+
action: "create" | "delete" | "lock" | "update" | "nav";
|
|
386
|
+
scope: "zones";
|
|
387
|
+
resources: {
|
|
388
|
+
agency_ids: string[];
|
|
389
|
+
};
|
|
390
|
+
}, {
|
|
391
|
+
action: "create" | "delete" | "lock" | "update" | "nav";
|
|
392
|
+
scope: "zones";
|
|
393
|
+
resources?: {
|
|
394
|
+
agency_ids?: string[] | undefined;
|
|
395
|
+
} | undefined;
|
|
396
|
+
}>]>;
|
|
397
|
+
export type Permission = z.infer<typeof PermissionSchema>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { AgenciesPermissionSchema } from './scopes/agencies/permission.js';
|
|
4
|
+
import { AlertsPermissionSchema } from './scopes/alerts/permission.js';
|
|
5
|
+
import { AnnotationsPermissionSchema } from './scopes/annotations/permission.js';
|
|
6
|
+
import { EventsPermissionSchema } from './scopes/events/permission.js';
|
|
7
|
+
import { FaresPermissionSchema } from './scopes/fares/permission.js';
|
|
8
|
+
import { GtfsValidationsPermissionSchema } from './scopes/gtfs-validations/permission.js';
|
|
9
|
+
import { HolidaysPermissionSchema } from './scopes/holidays/permission.js';
|
|
10
|
+
import { HomePermissionSchema } from './scopes/home/permission.js';
|
|
11
|
+
import { LinesPermissionSchema } from './scopes/lines/permission.js';
|
|
12
|
+
import { OrganizationsPermissionSchema } from './scopes/organizations/permission.js';
|
|
13
|
+
import { PerformancePermissionSchema } from './scopes/performance/permission.js';
|
|
14
|
+
import { PlansPermissionSchema } from './scopes/plans/permission.js';
|
|
15
|
+
import { RidesPermissionSchema } from './scopes/rides/permission.js';
|
|
16
|
+
import { RolesPermissionSchema } from './scopes/roles/permission.js';
|
|
17
|
+
import { SamsPermissionSchema } from './scopes/sams/permission.js';
|
|
18
|
+
import { StopsPermissionSchema } from './scopes/stops/permission.js';
|
|
19
|
+
import { TypologiesPermissionSchema } from './scopes/typologies/permission.js';
|
|
20
|
+
import { UsersPermissionSchema } from './scopes/users/permission.js';
|
|
21
|
+
import { VehiclesPermissionSchema } from './scopes/vehicles/permission.js';
|
|
22
|
+
import { YearPeriodsPermissionSchema } from './scopes/year-periods/permission.js';
|
|
23
|
+
import { ZonesPermissionSchema } from './scopes/zones/permission.js';
|
|
24
|
+
/* * */
|
|
25
|
+
export const PermissionSchema = z.discriminatedUnion('scope', [
|
|
26
|
+
AgenciesPermissionSchema,
|
|
27
|
+
AlertsPermissionSchema,
|
|
28
|
+
AnnotationsPermissionSchema,
|
|
29
|
+
EventsPermissionSchema,
|
|
30
|
+
FaresPermissionSchema,
|
|
31
|
+
GtfsValidationsPermissionSchema,
|
|
32
|
+
HolidaysPermissionSchema,
|
|
33
|
+
HomePermissionSchema,
|
|
34
|
+
LinesPermissionSchema,
|
|
35
|
+
OrganizationsPermissionSchema,
|
|
36
|
+
PerformancePermissionSchema,
|
|
37
|
+
PlansPermissionSchema,
|
|
38
|
+
RidesPermissionSchema,
|
|
39
|
+
RolesPermissionSchema,
|
|
40
|
+
SamsPermissionSchema,
|
|
41
|
+
StopsPermissionSchema,
|
|
42
|
+
TypologiesPermissionSchema,
|
|
43
|
+
UsersPermissionSchema,
|
|
44
|
+
VehiclesPermissionSchema,
|
|
45
|
+
YearPeriodsPermissionSchema,
|
|
46
|
+
ZonesPermissionSchema,
|
|
47
|
+
]);
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PermissionsRegistrySchema: z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
|
|
3
|
+
actions: z.ZodArray<z.ZodEnum<["create", "delete", "read", "lock", "update"]>, "many">;
|
|
4
|
+
scope: z.ZodLiteral<"agencies">;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
scope: "agencies";
|
|
7
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
8
|
+
}, {
|
|
9
|
+
scope: "agencies";
|
|
10
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
11
|
+
}>, z.ZodObject<{
|
|
12
|
+
actions: z.ZodArray<z.ZodEnum<["create", "delete", "read", "lock", "update", "update_texts", "update_dates", "update_publish_status"]>, "many">;
|
|
13
|
+
scope: z.ZodLiteral<"alerts">;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
scope: "alerts";
|
|
16
|
+
actions: ("create" | "delete" | "read" | "lock" | "update" | "update_texts" | "update_dates" | "update_publish_status")[];
|
|
17
|
+
}, {
|
|
18
|
+
scope: "alerts";
|
|
19
|
+
actions: ("create" | "delete" | "read" | "lock" | "update" | "update_texts" | "update_dates" | "update_publish_status")[];
|
|
20
|
+
}>, z.ZodObject<{
|
|
21
|
+
actions: z.ZodArray<z.ZodEnum<["create", "delete", "read", "lock", "update"]>, "many">;
|
|
22
|
+
scope: z.ZodLiteral<"annotations">;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
scope: "annotations";
|
|
25
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
26
|
+
}, {
|
|
27
|
+
scope: "annotations";
|
|
28
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
29
|
+
}>, z.ZodObject<{
|
|
30
|
+
actions: z.ZodArray<z.ZodEnum<["create", "delete", "read", "lock", "update"]>, "many">;
|
|
31
|
+
scope: z.ZodLiteral<"events">;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
scope: "events";
|
|
34
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
35
|
+
}, {
|
|
36
|
+
scope: "events";
|
|
37
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
38
|
+
}>, z.ZodObject<{
|
|
39
|
+
actions: z.ZodArray<z.ZodEnum<["create", "delete", "lock", "nav", "update"]>, "many">;
|
|
40
|
+
scope: z.ZodLiteral<"fares">;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
scope: "fares";
|
|
43
|
+
actions: ("create" | "delete" | "lock" | "update" | "nav")[];
|
|
44
|
+
}, {
|
|
45
|
+
scope: "fares";
|
|
46
|
+
actions: ("create" | "delete" | "lock" | "update" | "nav")[];
|
|
47
|
+
}>, z.ZodObject<{
|
|
48
|
+
actions: z.ZodArray<z.ZodEnum<["create", "read", "lock", "request_approval", "update_processing_status"]>, "many">;
|
|
49
|
+
scope: z.ZodLiteral<"gtfs_validations">;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
scope: "gtfs_validations";
|
|
52
|
+
actions: ("create" | "read" | "lock" | "request_approval" | "update_processing_status")[];
|
|
53
|
+
}, {
|
|
54
|
+
scope: "gtfs_validations";
|
|
55
|
+
actions: ("create" | "read" | "lock" | "request_approval" | "update_processing_status")[];
|
|
56
|
+
}>, z.ZodObject<{
|
|
57
|
+
actions: z.ZodArray<z.ZodEnum<["create", "delete", "read", "lock", "update"]>, "many">;
|
|
58
|
+
scope: z.ZodLiteral<"holidays">;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
scope: "holidays";
|
|
61
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
62
|
+
}, {
|
|
63
|
+
scope: "holidays";
|
|
64
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
65
|
+
}>, z.ZodObject<{
|
|
66
|
+
actions: z.ZodArray<z.ZodEnum<["read_links", "read_wiki"]>, "many">;
|
|
67
|
+
scope: z.ZodLiteral<"home">;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
scope: "home";
|
|
70
|
+
actions: ("read_links" | "read_wiki")[];
|
|
71
|
+
}, {
|
|
72
|
+
scope: "home";
|
|
73
|
+
actions: ("read_links" | "read_wiki")[];
|
|
74
|
+
}>, z.ZodObject<{
|
|
75
|
+
actions: z.ZodArray<z.ZodEnum<["create", "delete", "read", "lock", "update"]>, "many">;
|
|
76
|
+
scope: z.ZodLiteral<"lines">;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
scope: "lines";
|
|
79
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
80
|
+
}, {
|
|
81
|
+
scope: "lines";
|
|
82
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
83
|
+
}>, z.ZodObject<{
|
|
84
|
+
actions: z.ZodArray<z.ZodEnum<["create", "delete", "read", "lock", "update"]>, "many">;
|
|
85
|
+
scope: z.ZodLiteral<"organizations">;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
scope: "organizations";
|
|
88
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
89
|
+
}, {
|
|
90
|
+
scope: "organizations";
|
|
91
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
92
|
+
}>, z.ZodObject<{
|
|
93
|
+
actions: z.ZodArray<z.ZodEnum<["read"]>, "many">;
|
|
94
|
+
scope: z.ZodLiteral<"performance">;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
scope: "performance";
|
|
97
|
+
actions: "read"[];
|
|
98
|
+
}, {
|
|
99
|
+
scope: "performance";
|
|
100
|
+
actions: "read"[];
|
|
101
|
+
}>, z.ZodObject<{
|
|
102
|
+
actions: z.ZodArray<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"]>, "many">;
|
|
103
|
+
scope: z.ZodLiteral<"plans">;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
scope: "plans";
|
|
106
|
+
actions: ("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")[];
|
|
107
|
+
}, {
|
|
108
|
+
scope: "plans";
|
|
109
|
+
actions: ("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")[];
|
|
110
|
+
}>, z.ZodObject<{
|
|
111
|
+
actions: z.ZodArray<z.ZodEnum<["acceptance_change_status", "acceptance_justify", "acceptance_lock", "acceptance_read", "analsys_lock", "analysis_lock", "analysis_read", "analysis_reprocess", "analysis_update", "audit_lock", "audit_read", "audit_update", "acceptance_comment_activity"]>, "many">;
|
|
112
|
+
scope: z.ZodLiteral<"rides">;
|
|
113
|
+
}, "strip", z.ZodTypeAny, {
|
|
114
|
+
scope: "rides";
|
|
115
|
+
actions: ("acceptance_change_status" | "acceptance_justify" | "acceptance_lock" | "acceptance_read" | "analsys_lock" | "analysis_lock" | "analysis_read" | "analysis_reprocess" | "analysis_update" | "audit_lock" | "audit_read" | "audit_update" | "acceptance_comment_activity")[];
|
|
116
|
+
}, {
|
|
117
|
+
scope: "rides";
|
|
118
|
+
actions: ("acceptance_change_status" | "acceptance_justify" | "acceptance_lock" | "acceptance_read" | "analsys_lock" | "analysis_lock" | "analysis_read" | "analysis_reprocess" | "analysis_update" | "audit_lock" | "audit_read" | "audit_update" | "acceptance_comment_activity")[];
|
|
119
|
+
}>, z.ZodObject<{
|
|
120
|
+
actions: z.ZodArray<z.ZodEnum<["create", "delete", "read", "lock", "update"]>, "many">;
|
|
121
|
+
scope: z.ZodLiteral<"roles">;
|
|
122
|
+
}, "strip", z.ZodTypeAny, {
|
|
123
|
+
scope: "roles";
|
|
124
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
125
|
+
}, {
|
|
126
|
+
scope: "roles";
|
|
127
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
128
|
+
}>, z.ZodObject<{
|
|
129
|
+
actions: z.ZodArray<z.ZodEnum<["read", "export"]>, "many">;
|
|
130
|
+
scope: z.ZodLiteral<"sams">;
|
|
131
|
+
}, "strip", z.ZodTypeAny, {
|
|
132
|
+
scope: "sams";
|
|
133
|
+
actions: ("read" | "export")[];
|
|
134
|
+
}, {
|
|
135
|
+
scope: "sams";
|
|
136
|
+
actions: ("read" | "export")[];
|
|
137
|
+
}>, z.ZodObject<{
|
|
138
|
+
actions: z.ZodArray<z.ZodEnum<["create", "delete", "read", "lock", "update", "export", "edit_coordinates", "edit_name"]>, "many">;
|
|
139
|
+
scope: z.ZodLiteral<"stops">;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
scope: "stops";
|
|
142
|
+
actions: ("create" | "delete" | "read" | "lock" | "update" | "export" | "edit_coordinates" | "edit_name")[];
|
|
143
|
+
}, {
|
|
144
|
+
scope: "stops";
|
|
145
|
+
actions: ("create" | "delete" | "read" | "lock" | "update" | "export" | "edit_coordinates" | "edit_name")[];
|
|
146
|
+
}>, z.ZodObject<{
|
|
147
|
+
actions: z.ZodArray<z.ZodEnum<["create", "delete", "lock", "nav", "update"]>, "many">;
|
|
148
|
+
scope: z.ZodLiteral<"typologies">;
|
|
149
|
+
}, "strip", z.ZodTypeAny, {
|
|
150
|
+
scope: "typologies";
|
|
151
|
+
actions: ("create" | "delete" | "lock" | "update" | "nav")[];
|
|
152
|
+
}, {
|
|
153
|
+
scope: "typologies";
|
|
154
|
+
actions: ("create" | "delete" | "lock" | "update" | "nav")[];
|
|
155
|
+
}>, z.ZodObject<{
|
|
156
|
+
actions: z.ZodArray<z.ZodEnum<["create", "delete", "read", "lock", "update"]>, "many">;
|
|
157
|
+
scope: z.ZodLiteral<"users">;
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
159
|
+
scope: "users";
|
|
160
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
161
|
+
}, {
|
|
162
|
+
scope: "users";
|
|
163
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
164
|
+
}>, z.ZodObject<{
|
|
165
|
+
actions: z.ZodArray<z.ZodEnum<["create", "delete", "read", "lock", "update"]>, "many">;
|
|
166
|
+
scope: z.ZodLiteral<"vehicles">;
|
|
167
|
+
}, "strip", z.ZodTypeAny, {
|
|
168
|
+
scope: "vehicles";
|
|
169
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
170
|
+
}, {
|
|
171
|
+
scope: "vehicles";
|
|
172
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
173
|
+
}>, z.ZodObject<{
|
|
174
|
+
actions: z.ZodArray<z.ZodEnum<["create", "delete", "read", "lock", "update"]>, "many">;
|
|
175
|
+
scope: z.ZodLiteral<"year_periods">;
|
|
176
|
+
}, "strip", z.ZodTypeAny, {
|
|
177
|
+
scope: "year_periods";
|
|
178
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
179
|
+
}, {
|
|
180
|
+
scope: "year_periods";
|
|
181
|
+
actions: ("create" | "delete" | "read" | "lock" | "update")[];
|
|
182
|
+
}>, z.ZodObject<{
|
|
183
|
+
actions: z.ZodArray<z.ZodEnum<["create", "delete", "lock", "nav", "update"]>, "many">;
|
|
184
|
+
scope: z.ZodLiteral<"zones">;
|
|
185
|
+
}, "strip", z.ZodTypeAny, {
|
|
186
|
+
scope: "zones";
|
|
187
|
+
actions: ("create" | "delete" | "lock" | "update" | "nav")[];
|
|
188
|
+
}, {
|
|
189
|
+
scope: "zones";
|
|
190
|
+
actions: ("create" | "delete" | "lock" | "update" | "nav")[];
|
|
191
|
+
}>]>;
|
|
192
|
+
export type PermissionsRegistry = z.infer<typeof PermissionsRegistrySchema>;
|