@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.
Files changed (217) hide show
  1. package/dist/allow-all.d.ts +4 -0
  2. package/dist/allow-all.js +5 -0
  3. package/dist/catalog.d.ts +199 -0
  4. package/dist/catalog.js +349 -0
  5. package/dist/index.d.ts +5 -0
  6. package/dist/index.js +5 -0
  7. package/dist/permissions.d.ts +397 -0
  8. package/dist/permissions.js +47 -0
  9. package/dist/registry.d.ts +192 -0
  10. package/dist/registry.js +47 -0
  11. package/dist/resources-registy.d.ts +16 -0
  12. package/dist/resources-registy.js +32 -0
  13. package/dist/scopes/agencies/actions.d.ts +3 -0
  14. package/dist/scopes/agencies/actions.js +11 -0
  15. package/dist/scopes/agencies/permission.d.ts +12 -0
  16. package/dist/scopes/agencies/permission.js +9 -0
  17. package/dist/scopes/agencies/registry.d.ts +12 -0
  18. package/dist/scopes/agencies/registry.js +9 -0
  19. package/dist/scopes/agencies/scope.d.ts +3 -0
  20. package/dist/scopes/agencies/scope.js +4 -0
  21. package/dist/scopes/alerts/actions.d.ts +3 -0
  22. package/dist/scopes/alerts/actions.js +14 -0
  23. package/dist/scopes/alerts/permission.d.ts +30 -0
  24. package/dist/scopes/alerts/permission.js +11 -0
  25. package/dist/scopes/alerts/registry.d.ts +12 -0
  26. package/dist/scopes/alerts/registry.js +9 -0
  27. package/dist/scopes/alerts/resources.d.ts +12 -0
  28. package/dist/scopes/alerts/resources.js +7 -0
  29. package/dist/scopes/alerts/scope.d.ts +3 -0
  30. package/dist/scopes/alerts/scope.js +4 -0
  31. package/dist/scopes/annotations/actions.d.ts +3 -0
  32. package/dist/scopes/annotations/actions.js +11 -0
  33. package/dist/scopes/annotations/permission.d.ts +25 -0
  34. package/dist/scopes/annotations/permission.js +11 -0
  35. package/dist/scopes/annotations/registry.d.ts +12 -0
  36. package/dist/scopes/annotations/registry.js +9 -0
  37. package/dist/scopes/annotations/resources.d.ts +9 -0
  38. package/dist/scopes/annotations/resources.js +6 -0
  39. package/dist/scopes/annotations/scope.d.ts +3 -0
  40. package/dist/scopes/annotations/scope.js +4 -0
  41. package/dist/scopes/events/actions.d.ts +3 -0
  42. package/dist/scopes/events/actions.js +11 -0
  43. package/dist/scopes/events/permission.d.ts +25 -0
  44. package/dist/scopes/events/permission.js +11 -0
  45. package/dist/scopes/events/registry.d.ts +12 -0
  46. package/dist/scopes/events/registry.js +9 -0
  47. package/dist/scopes/events/resources.d.ts +9 -0
  48. package/dist/scopes/events/resources.js +6 -0
  49. package/dist/scopes/events/scope.d.ts +3 -0
  50. package/dist/scopes/events/scope.js +4 -0
  51. package/dist/scopes/fares/actions.d.ts +3 -0
  52. package/dist/scopes/fares/actions.js +11 -0
  53. package/dist/scopes/fares/permission.d.ts +25 -0
  54. package/dist/scopes/fares/permission.js +11 -0
  55. package/dist/scopes/fares/registry.d.ts +12 -0
  56. package/dist/scopes/fares/registry.js +9 -0
  57. package/dist/scopes/fares/resources.d.ts +9 -0
  58. package/dist/scopes/fares/resources.js +6 -0
  59. package/dist/scopes/fares/scope.d.ts +3 -0
  60. package/dist/scopes/fares/scope.js +4 -0
  61. package/dist/scopes/gtfs-validations/actions.d.ts +3 -0
  62. package/dist/scopes/gtfs-validations/actions.js +11 -0
  63. package/dist/scopes/gtfs-validations/permission.d.ts +25 -0
  64. package/dist/scopes/gtfs-validations/permission.js +11 -0
  65. package/dist/scopes/gtfs-validations/registry.d.ts +12 -0
  66. package/dist/scopes/gtfs-validations/registry.js +9 -0
  67. package/dist/scopes/gtfs-validations/resources.d.ts +9 -0
  68. package/dist/scopes/gtfs-validations/resources.js +6 -0
  69. package/dist/scopes/gtfs-validations/scope.d.ts +3 -0
  70. package/dist/scopes/gtfs-validations/scope.js +4 -0
  71. package/dist/scopes/holidays/actions.d.ts +3 -0
  72. package/dist/scopes/holidays/actions.js +11 -0
  73. package/dist/scopes/holidays/permission.d.ts +25 -0
  74. package/dist/scopes/holidays/permission.js +11 -0
  75. package/dist/scopes/holidays/registry.d.ts +12 -0
  76. package/dist/scopes/holidays/registry.js +9 -0
  77. package/dist/scopes/holidays/resources.d.ts +9 -0
  78. package/dist/scopes/holidays/resources.js +6 -0
  79. package/dist/scopes/holidays/scope.d.ts +3 -0
  80. package/dist/scopes/holidays/scope.js +4 -0
  81. package/dist/scopes/home/actions.d.ts +3 -0
  82. package/dist/scopes/home/actions.js +8 -0
  83. package/dist/scopes/home/permission.d.ts +12 -0
  84. package/dist/scopes/home/permission.js +9 -0
  85. package/dist/scopes/home/registry.d.ts +12 -0
  86. package/dist/scopes/home/registry.js +9 -0
  87. package/dist/scopes/home/scope.d.ts +3 -0
  88. package/dist/scopes/home/scope.js +4 -0
  89. package/dist/scopes/lines/actions.d.ts +3 -0
  90. package/dist/scopes/lines/actions.js +11 -0
  91. package/dist/scopes/lines/permission.d.ts +25 -0
  92. package/dist/scopes/lines/permission.js +11 -0
  93. package/dist/scopes/lines/registry.d.ts +12 -0
  94. package/dist/scopes/lines/registry.js +9 -0
  95. package/dist/scopes/lines/resources.d.ts +9 -0
  96. package/dist/scopes/lines/resources.js +6 -0
  97. package/dist/scopes/lines/scope.d.ts +3 -0
  98. package/dist/scopes/lines/scope.js +4 -0
  99. package/dist/scopes/organizations/actions.d.ts +3 -0
  100. package/dist/scopes/organizations/actions.js +11 -0
  101. package/dist/scopes/organizations/permission.d.ts +12 -0
  102. package/dist/scopes/organizations/permission.js +9 -0
  103. package/dist/scopes/organizations/registry.d.ts +12 -0
  104. package/dist/scopes/organizations/registry.js +9 -0
  105. package/dist/scopes/organizations/scope.d.ts +3 -0
  106. package/dist/scopes/organizations/scope.js +4 -0
  107. package/dist/scopes/performance/actions.d.ts +3 -0
  108. package/dist/scopes/performance/actions.js +7 -0
  109. package/dist/scopes/performance/permission.d.ts +12 -0
  110. package/dist/scopes/performance/permission.js +9 -0
  111. package/dist/scopes/performance/registry.d.ts +12 -0
  112. package/dist/scopes/performance/registry.js +9 -0
  113. package/dist/scopes/performance/scope.d.ts +3 -0
  114. package/dist/scopes/performance/scope.js +4 -0
  115. package/dist/scopes/plans/actions.d.ts +3 -0
  116. package/dist/scopes/plans/actions.js +22 -0
  117. package/dist/scopes/plans/permission.d.ts +25 -0
  118. package/dist/scopes/plans/permission.js +11 -0
  119. package/dist/scopes/plans/registry.d.ts +12 -0
  120. package/dist/scopes/plans/registry.js +9 -0
  121. package/dist/scopes/plans/resources.d.ts +9 -0
  122. package/dist/scopes/plans/resources.js +6 -0
  123. package/dist/scopes/plans/scope.d.ts +3 -0
  124. package/dist/scopes/plans/scope.js +4 -0
  125. package/dist/scopes/rides/actions.d.ts +3 -0
  126. package/dist/scopes/rides/actions.js +19 -0
  127. package/dist/scopes/rides/permission.d.ts +25 -0
  128. package/dist/scopes/rides/permission.js +11 -0
  129. package/dist/scopes/rides/registry.d.ts +12 -0
  130. package/dist/scopes/rides/registry.js +9 -0
  131. package/dist/scopes/rides/resources.d.ts +9 -0
  132. package/dist/scopes/rides/resources.js +6 -0
  133. package/dist/scopes/rides/scope.d.ts +3 -0
  134. package/dist/scopes/rides/scope.js +4 -0
  135. package/dist/scopes/roles/actions.d.ts +3 -0
  136. package/dist/scopes/roles/actions.js +11 -0
  137. package/dist/scopes/roles/permission.d.ts +12 -0
  138. package/dist/scopes/roles/permission.js +9 -0
  139. package/dist/scopes/roles/registry.d.ts +12 -0
  140. package/dist/scopes/roles/registry.js +9 -0
  141. package/dist/scopes/roles/scope.d.ts +3 -0
  142. package/dist/scopes/roles/scope.js +4 -0
  143. package/dist/scopes/sams/actions.d.ts +3 -0
  144. package/dist/scopes/sams/actions.js +8 -0
  145. package/dist/scopes/sams/permission.d.ts +25 -0
  146. package/dist/scopes/sams/permission.js +11 -0
  147. package/dist/scopes/sams/registry.d.ts +12 -0
  148. package/dist/scopes/sams/registry.js +9 -0
  149. package/dist/scopes/sams/resources.d.ts +9 -0
  150. package/dist/scopes/sams/resources.js +6 -0
  151. package/dist/scopes/sams/scope.d.ts +3 -0
  152. package/dist/scopes/sams/scope.js +4 -0
  153. package/dist/scopes/stops/actions.d.ts +3 -0
  154. package/dist/scopes/stops/actions.js +14 -0
  155. package/dist/scopes/stops/permission.d.ts +30 -0
  156. package/dist/scopes/stops/permission.js +11 -0
  157. package/dist/scopes/stops/registry.d.ts +12 -0
  158. package/dist/scopes/stops/registry.js +9 -0
  159. package/dist/scopes/stops/resources.d.ts +12 -0
  160. package/dist/scopes/stops/resources.js +7 -0
  161. package/dist/scopes/stops/scope.d.ts +3 -0
  162. package/dist/scopes/stops/scope.js +4 -0
  163. package/dist/scopes/typologies/actions.d.ts +3 -0
  164. package/dist/scopes/typologies/actions.js +11 -0
  165. package/dist/scopes/typologies/permission.d.ts +25 -0
  166. package/dist/scopes/typologies/permission.js +11 -0
  167. package/dist/scopes/typologies/registry.d.ts +12 -0
  168. package/dist/scopes/typologies/registry.js +9 -0
  169. package/dist/scopes/typologies/resources.d.ts +9 -0
  170. package/dist/scopes/typologies/resources.js +6 -0
  171. package/dist/scopes/typologies/scope.d.ts +3 -0
  172. package/dist/scopes/typologies/scope.js +4 -0
  173. package/dist/scopes/users/actions.d.ts +3 -0
  174. package/dist/scopes/users/actions.js +11 -0
  175. package/dist/scopes/users/permission.d.ts +12 -0
  176. package/dist/scopes/users/permission.js +9 -0
  177. package/dist/scopes/users/registry.d.ts +12 -0
  178. package/dist/scopes/users/registry.js +9 -0
  179. package/dist/scopes/users/scope.d.ts +3 -0
  180. package/dist/scopes/users/scope.js +4 -0
  181. package/dist/scopes/vehicles/actions.d.ts +3 -0
  182. package/dist/scopes/vehicles/actions.js +11 -0
  183. package/dist/scopes/vehicles/permission.d.ts +25 -0
  184. package/dist/scopes/vehicles/permission.js +11 -0
  185. package/dist/scopes/vehicles/registry.d.ts +12 -0
  186. package/dist/scopes/vehicles/registry.js +9 -0
  187. package/dist/scopes/vehicles/resources.d.ts +9 -0
  188. package/dist/scopes/vehicles/resources.js +6 -0
  189. package/dist/scopes/vehicles/scope.d.ts +3 -0
  190. package/dist/scopes/vehicles/scope.js +4 -0
  191. package/dist/scopes/year-periods/actions.d.ts +3 -0
  192. package/dist/scopes/year-periods/actions.js +11 -0
  193. package/dist/scopes/year-periods/permission.d.ts +25 -0
  194. package/dist/scopes/year-periods/permission.js +11 -0
  195. package/dist/scopes/year-periods/registry.d.ts +12 -0
  196. package/dist/scopes/year-periods/registry.js +9 -0
  197. package/dist/scopes/year-periods/resources.d.ts +9 -0
  198. package/dist/scopes/year-periods/resources.js +6 -0
  199. package/dist/scopes/year-periods/scope.d.ts +3 -0
  200. package/dist/scopes/year-periods/scope.js +4 -0
  201. package/dist/scopes/zones/actions.d.ts +3 -0
  202. package/dist/scopes/zones/actions.js +11 -0
  203. package/dist/scopes/zones/permission.d.ts +25 -0
  204. package/dist/scopes/zones/permission.js +11 -0
  205. package/dist/scopes/zones/registry.d.ts +12 -0
  206. package/dist/scopes/zones/registry.js +9 -0
  207. package/dist/scopes/zones/resources.d.ts +9 -0
  208. package/dist/scopes/zones/resources.js +6 -0
  209. package/dist/scopes/zones/scope.d.ts +3 -0
  210. package/dist/scopes/zones/scope.js +4 -0
  211. package/dist/utils/has-permission-resource.d.ts +29 -0
  212. package/dist/utils/has-permission-resource.js +41 -0
  213. package/dist/utils/has-permission.d.ts +8 -0
  214. package/dist/utils/has-permission.js +20 -0
  215. package/dist/utils/index.d.ts +2 -0
  216. package/dist/utils/index.js +2 -0
  217. package/package.json +48 -0
@@ -0,0 +1,11 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ import { PlansPermissionActionsSchema } from './actions.js';
4
+ import { PlansPermissionResourcesSchema } from './resources.js';
5
+ import { PlansPermissionScopeSchema } from './scope.js';
6
+ /* * */
7
+ export const PlansPermissionSchema = z.object({
8
+ action: PlansPermissionActionsSchema,
9
+ resources: PlansPermissionResourcesSchema.default({}),
10
+ scope: PlansPermissionScopeSchema,
11
+ });
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export declare const PlansPermissionRegistrySchema: z.ZodObject<{
3
+ 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">;
4
+ scope: z.ZodLiteral<"plans">;
5
+ }, "strip", z.ZodTypeAny, {
6
+ scope: "plans";
7
+ 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")[];
8
+ }, {
9
+ scope: "plans";
10
+ 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")[];
11
+ }>;
12
+ export type PlansPermissionRegistry = z.infer<typeof PlansPermissionRegistrySchema>;
@@ -0,0 +1,9 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ import { PlansPermissionActionsSchema } from './actions.js';
4
+ import { PlansPermissionScopeSchema } from './scope.js';
5
+ /* * */
6
+ export const PlansPermissionRegistrySchema = z.object({
7
+ actions: z.array(PlansPermissionActionsSchema),
8
+ scope: PlansPermissionScopeSchema,
9
+ });
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const PlansPermissionResourcesSchema: 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 PlansPermissionResources = z.infer<typeof PlansPermissionResourcesSchema>;
@@ -0,0 +1,6 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const PlansPermissionResourcesSchema = z.object({
5
+ agency_ids: z.array(z.string()).default([]),
6
+ });
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const PlansPermissionScopeSchema: z.ZodLiteral<"plans">;
3
+ export type PlansPermissionScope = z.infer<typeof PlansPermissionScopeSchema>;
@@ -0,0 +1,4 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const PlansPermissionScopeSchema = z.literal('plans');
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const RidesPermissionActionsSchema: 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"]>;
3
+ export type RidesPermissionActions = z.infer<typeof RidesPermissionActionsSchema>;
@@ -0,0 +1,19 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ const RidesPermissionActionsValues = [
5
+ 'acceptance_change_status',
6
+ 'acceptance_justify',
7
+ 'acceptance_lock',
8
+ 'acceptance_read',
9
+ 'analsys_lock',
10
+ 'analysis_lock',
11
+ 'analysis_read',
12
+ 'analysis_reprocess',
13
+ 'analysis_update',
14
+ 'audit_lock',
15
+ 'audit_read',
16
+ 'audit_update',
17
+ 'acceptance_comment_activity',
18
+ ];
19
+ export const RidesPermissionActionsSchema = z.enum(RidesPermissionActionsValues);
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ export declare const RidesPermissionSchema: z.ZodObject<{
3
+ 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"]>;
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<"rides">;
12
+ }, "strip", z.ZodTypeAny, {
13
+ 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";
14
+ scope: "rides";
15
+ resources: {
16
+ agency_ids: string[];
17
+ };
18
+ }, {
19
+ 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";
20
+ scope: "rides";
21
+ resources?: {
22
+ agency_ids?: string[] | undefined;
23
+ } | undefined;
24
+ }>;
25
+ export type RidesPermission = z.infer<typeof RidesPermissionSchema>;
@@ -0,0 +1,11 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ import { RidesPermissionActionsSchema } from './actions.js';
4
+ import { RidesPermissionResourcesSchema } from './resources.js';
5
+ import { RidesPermissionScopeSchema } from './scope.js';
6
+ /* * */
7
+ export const RidesPermissionSchema = z.object({
8
+ action: RidesPermissionActionsSchema,
9
+ resources: RidesPermissionResourcesSchema.default({}),
10
+ scope: RidesPermissionScopeSchema,
11
+ });
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export declare const RidesPermissionRegistrySchema: z.ZodObject<{
3
+ 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">;
4
+ scope: z.ZodLiteral<"rides">;
5
+ }, "strip", z.ZodTypeAny, {
6
+ scope: "rides";
7
+ 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")[];
8
+ }, {
9
+ scope: "rides";
10
+ 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")[];
11
+ }>;
12
+ export type RidesPermissionRegistry = z.infer<typeof RidesPermissionRegistrySchema>;
@@ -0,0 +1,9 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ import { RidesPermissionActionsSchema } from './actions.js';
4
+ import { RidesPermissionScopeSchema } from './scope.js';
5
+ /* * */
6
+ export const RidesPermissionRegistrySchema = z.object({
7
+ actions: z.array(RidesPermissionActionsSchema),
8
+ scope: RidesPermissionScopeSchema,
9
+ });
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const RidesPermissionResourcesSchema: 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 RidesPermissionResources = z.infer<typeof RidesPermissionResourcesSchema>;
@@ -0,0 +1,6 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const RidesPermissionResourcesSchema = z.object({
5
+ agency_ids: z.array(z.string()).default([]),
6
+ });
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const RidesPermissionScopeSchema: z.ZodLiteral<"rides">;
3
+ export type RidesPermissionScope = z.infer<typeof RidesPermissionScopeSchema>;
@@ -0,0 +1,4 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const RidesPermissionScopeSchema = z.literal('rides');
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const RolesPermissionActionsSchema: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
3
+ export type RolesPermissionActions = z.infer<typeof RolesPermissionActionsSchema>;
@@ -0,0 +1,11 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ const RolesPermissionActionsValues = [
5
+ 'create',
6
+ 'delete',
7
+ 'read',
8
+ 'lock',
9
+ 'update',
10
+ ];
11
+ export const RolesPermissionActionsSchema = z.enum(RolesPermissionActionsValues);
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export declare const RolesPermissionSchema: z.ZodObject<{
3
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
4
+ scope: z.ZodLiteral<"roles">;
5
+ }, "strip", z.ZodTypeAny, {
6
+ action: "create" | "delete" | "read" | "lock" | "update";
7
+ scope: "roles";
8
+ }, {
9
+ action: "create" | "delete" | "read" | "lock" | "update";
10
+ scope: "roles";
11
+ }>;
12
+ export type RolesPermission = z.infer<typeof RolesPermissionSchema>;
@@ -0,0 +1,9 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ import { RolesPermissionActionsSchema } from './actions.js';
4
+ import { RolesPermissionScopeSchema } from './scope.js';
5
+ /* * */
6
+ export const RolesPermissionSchema = z.object({
7
+ action: RolesPermissionActionsSchema,
8
+ scope: RolesPermissionScopeSchema,
9
+ });
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export declare const RolesPermissionRegistrySchema: z.ZodObject<{
3
+ actions: z.ZodArray<z.ZodEnum<["create", "delete", "read", "lock", "update"]>, "many">;
4
+ scope: z.ZodLiteral<"roles">;
5
+ }, "strip", z.ZodTypeAny, {
6
+ scope: "roles";
7
+ actions: ("create" | "delete" | "read" | "lock" | "update")[];
8
+ }, {
9
+ scope: "roles";
10
+ actions: ("create" | "delete" | "read" | "lock" | "update")[];
11
+ }>;
12
+ export type RolesPermissionRegistry = z.infer<typeof RolesPermissionRegistrySchema>;
@@ -0,0 +1,9 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ import { RolesPermissionActionsSchema } from './actions.js';
4
+ import { RolesPermissionScopeSchema } from './scope.js';
5
+ /* * */
6
+ export const RolesPermissionRegistrySchema = z.object({
7
+ actions: z.array(RolesPermissionActionsSchema),
8
+ scope: RolesPermissionScopeSchema,
9
+ });
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const RolesPermissionScopeSchema: z.ZodLiteral<"roles">;
3
+ export type RolesPermissionScope = z.infer<typeof RolesPermissionScopeSchema>;
@@ -0,0 +1,4 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const RolesPermissionScopeSchema = z.literal('roles');
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const SamsPermissionActionsSchema: z.ZodEnum<["read", "export"]>;
3
+ export type SamsPermissionActions = z.infer<typeof SamsPermissionActionsSchema>;
@@ -0,0 +1,8 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ const SamsPermissionActionsValues = [
5
+ 'read',
6
+ 'export',
7
+ ];
8
+ export const SamsPermissionActionsSchema = z.enum(SamsPermissionActionsValues);
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ export declare const SamsPermissionSchema: z.ZodObject<{
3
+ action: z.ZodEnum<["read", "export"]>;
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<"sams">;
12
+ }, "strip", z.ZodTypeAny, {
13
+ action: "read" | "export";
14
+ scope: "sams";
15
+ resources: {
16
+ agency_ids: string[];
17
+ };
18
+ }, {
19
+ action: "read" | "export";
20
+ scope: "sams";
21
+ resources?: {
22
+ agency_ids?: string[] | undefined;
23
+ } | undefined;
24
+ }>;
25
+ export type SamsPermission = z.infer<typeof SamsPermissionSchema>;
@@ -0,0 +1,11 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ import { SamsPermissionActionsSchema } from './actions.js';
4
+ import { SamsPermissionResourcesSchema } from './resources.js';
5
+ import { SamsPermissionScopeSchema } from './scope.js';
6
+ /* * */
7
+ export const SamsPermissionSchema = z.object({
8
+ action: SamsPermissionActionsSchema,
9
+ resources: SamsPermissionResourcesSchema.default({}),
10
+ scope: SamsPermissionScopeSchema,
11
+ });
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export declare const SamsPermissionRegistrySchema: z.ZodObject<{
3
+ actions: z.ZodArray<z.ZodEnum<["read", "export"]>, "many">;
4
+ scope: z.ZodLiteral<"sams">;
5
+ }, "strip", z.ZodTypeAny, {
6
+ scope: "sams";
7
+ actions: ("read" | "export")[];
8
+ }, {
9
+ scope: "sams";
10
+ actions: ("read" | "export")[];
11
+ }>;
12
+ export type SamsPermissionRegistry = z.infer<typeof SamsPermissionRegistrySchema>;
@@ -0,0 +1,9 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ import { SamsPermissionActionsSchema } from './actions.js';
4
+ import { SamsPermissionScopeSchema } from './scope.js';
5
+ /* * */
6
+ export const SamsPermissionRegistrySchema = z.object({
7
+ actions: z.array(SamsPermissionActionsSchema),
8
+ scope: SamsPermissionScopeSchema,
9
+ });
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const SamsPermissionResourcesSchema: 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 SamsPermissionResources = z.infer<typeof SamsPermissionResourcesSchema>;
@@ -0,0 +1,6 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const SamsPermissionResourcesSchema = z.object({
5
+ agency_ids: z.array(z.string()).default([]),
6
+ });
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const SamsPermissionScopeSchema: z.ZodLiteral<"sams">;
3
+ export type SamsPermissionScope = z.infer<typeof SamsPermissionScopeSchema>;
@@ -0,0 +1,4 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const SamsPermissionScopeSchema = z.literal('sams');
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const StopsPermissionActionsSchema: z.ZodEnum<["create", "delete", "read", "lock", "update", "export", "edit_coordinates", "edit_name"]>;
3
+ export type StopsPermissionActions = z.infer<typeof StopsPermissionActionsSchema>;
@@ -0,0 +1,14 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ const StopsPermissionActionsValues = [
5
+ 'create',
6
+ 'delete',
7
+ 'read',
8
+ 'lock',
9
+ 'update',
10
+ 'export',
11
+ 'edit_coordinates',
12
+ 'edit_name',
13
+ ];
14
+ export const StopsPermissionActionsSchema = z.enum(StopsPermissionActionsValues);
@@ -0,0 +1,30 @@
1
+ import { z } from 'zod';
2
+ export declare const StopsPermissionSchema: z.ZodObject<{
3
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update", "export", "edit_coordinates", "edit_name"]>;
4
+ resources: z.ZodDefault<z.ZodObject<{
5
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
6
+ municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ agency_ids: string[];
9
+ municipality_ids: string[];
10
+ }, {
11
+ agency_ids?: string[] | undefined;
12
+ municipality_ids?: string[] | undefined;
13
+ }>>;
14
+ scope: z.ZodLiteral<"stops">;
15
+ }, "strip", z.ZodTypeAny, {
16
+ action: "create" | "delete" | "read" | "lock" | "update" | "export" | "edit_coordinates" | "edit_name";
17
+ scope: "stops";
18
+ resources: {
19
+ agency_ids: string[];
20
+ municipality_ids: string[];
21
+ };
22
+ }, {
23
+ action: "create" | "delete" | "read" | "lock" | "update" | "export" | "edit_coordinates" | "edit_name";
24
+ scope: "stops";
25
+ resources?: {
26
+ agency_ids?: string[] | undefined;
27
+ municipality_ids?: string[] | undefined;
28
+ } | undefined;
29
+ }>;
30
+ export type StopsPermission = z.infer<typeof StopsPermissionSchema>;
@@ -0,0 +1,11 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ import { StopsPermissionActionsSchema } from './actions.js';
4
+ import { StopsPermissionResourcesSchema } from './resources.js';
5
+ import { StopsPermissionScopeSchema } from './scope.js';
6
+ /* * */
7
+ export const StopsPermissionSchema = z.object({
8
+ action: StopsPermissionActionsSchema,
9
+ resources: StopsPermissionResourcesSchema.default({}),
10
+ scope: StopsPermissionScopeSchema,
11
+ });
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export declare const StopsPermissionRegistrySchema: z.ZodObject<{
3
+ actions: z.ZodArray<z.ZodEnum<["create", "delete", "read", "lock", "update", "export", "edit_coordinates", "edit_name"]>, "many">;
4
+ scope: z.ZodLiteral<"stops">;
5
+ }, "strip", z.ZodTypeAny, {
6
+ scope: "stops";
7
+ actions: ("create" | "delete" | "read" | "lock" | "update" | "export" | "edit_coordinates" | "edit_name")[];
8
+ }, {
9
+ scope: "stops";
10
+ actions: ("create" | "delete" | "read" | "lock" | "update" | "export" | "edit_coordinates" | "edit_name")[];
11
+ }>;
12
+ export type StopsPermissionRegistry = z.infer<typeof StopsPermissionRegistrySchema>;
@@ -0,0 +1,9 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ import { StopsPermissionActionsSchema } from './actions.js';
4
+ import { StopsPermissionScopeSchema } from './scope.js';
5
+ /* * */
6
+ export const StopsPermissionRegistrySchema = z.object({
7
+ actions: z.array(StopsPermissionActionsSchema),
8
+ scope: StopsPermissionScopeSchema,
9
+ });
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export declare const StopsPermissionResourcesSchema: z.ZodObject<{
3
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4
+ municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
5
+ }, "strip", z.ZodTypeAny, {
6
+ agency_ids: string[];
7
+ municipality_ids: string[];
8
+ }, {
9
+ agency_ids?: string[] | undefined;
10
+ municipality_ids?: string[] | undefined;
11
+ }>;
12
+ export type StopsPermissionResources = z.infer<typeof StopsPermissionResourcesSchema>;
@@ -0,0 +1,7 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const StopsPermissionResourcesSchema = z.object({
5
+ agency_ids: z.array(z.string()).default([]),
6
+ municipality_ids: z.array(z.string()).default([]),
7
+ });
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const StopsPermissionScopeSchema: z.ZodLiteral<"stops">;
3
+ export type StopsPermissionScope = z.infer<typeof StopsPermissionScopeSchema>;
@@ -0,0 +1,4 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const StopsPermissionScopeSchema = z.literal('stops');
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const TypologiesPermissionActionsSchema: z.ZodEnum<["create", "delete", "lock", "nav", "update"]>;
3
+ export type TypologiesPermissionActions = z.infer<typeof TypologiesPermissionActionsSchema>;
@@ -0,0 +1,11 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ const TypologiesPermissionActionsValues = [
5
+ 'create',
6
+ 'delete',
7
+ 'lock',
8
+ 'nav',
9
+ 'update',
10
+ ];
11
+ export const TypologiesPermissionActionsSchema = z.enum(TypologiesPermissionActionsValues);
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ export declare const TypologiesPermissionSchema: z.ZodObject<{
3
+ action: z.ZodEnum<["create", "delete", "lock", "nav", "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<"typologies">;
12
+ }, "strip", z.ZodTypeAny, {
13
+ action: "create" | "delete" | "lock" | "update" | "nav";
14
+ scope: "typologies";
15
+ resources: {
16
+ agency_ids: string[];
17
+ };
18
+ }, {
19
+ action: "create" | "delete" | "lock" | "update" | "nav";
20
+ scope: "typologies";
21
+ resources?: {
22
+ agency_ids?: string[] | undefined;
23
+ } | undefined;
24
+ }>;
25
+ export type TypologiesPermission = z.infer<typeof TypologiesPermissionSchema>;
@@ -0,0 +1,11 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ import { TypologiesPermissionActionsSchema } from './actions.js';
4
+ import { TypologiesPermissionResourcesSchema } from './resources.js';
5
+ import { TypologiesPermissionScopeSchema } from './scope.js';
6
+ /* * */
7
+ export const TypologiesPermissionSchema = z.object({
8
+ action: TypologiesPermissionActionsSchema,
9
+ resources: TypologiesPermissionResourcesSchema.default({}),
10
+ scope: TypologiesPermissionScopeSchema,
11
+ });
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export declare const TypologiesPermissionRegistrySchema: z.ZodObject<{
3
+ actions: z.ZodArray<z.ZodEnum<["create", "delete", "lock", "nav", "update"]>, "many">;
4
+ scope: z.ZodLiteral<"typologies">;
5
+ }, "strip", z.ZodTypeAny, {
6
+ scope: "typologies";
7
+ actions: ("create" | "delete" | "lock" | "update" | "nav")[];
8
+ }, {
9
+ scope: "typologies";
10
+ actions: ("create" | "delete" | "lock" | "update" | "nav")[];
11
+ }>;
12
+ export type TypologiesPermissionRegistry = z.infer<typeof TypologiesPermissionRegistrySchema>;
@@ -0,0 +1,9 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ import { TypologiesPermissionActionsSchema } from './actions.js';
4
+ import { TypologiesPermissionScopeSchema } from './scope.js';
5
+ /* * */
6
+ export const TypologiesPermissionRegistrySchema = z.object({
7
+ actions: z.array(TypologiesPermissionActionsSchema),
8
+ scope: TypologiesPermissionScopeSchema,
9
+ });
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const TypologiesPermissionResourcesSchema: 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 TypologiesPermissionResources = z.infer<typeof TypologiesPermissionResourcesSchema>;
@@ -0,0 +1,6 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const TypologiesPermissionResourcesSchema = z.object({
5
+ agency_ids: z.array(z.string()).default([]),
6
+ });
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const TypologiesPermissionScopeSchema: z.ZodLiteral<"typologies">;
3
+ export type TypologiesPermissionScope = z.infer<typeof TypologiesPermissionScopeSchema>;
@@ -0,0 +1,4 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const TypologiesPermissionScopeSchema = z.literal('typologies');
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const UsersPermissionActionsSchema: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
3
+ export type UsersPermissionActions = z.infer<typeof UsersPermissionActionsSchema>;