@tmlmobilidade/types 20251031.1051.3 → 20251202.1817.5

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 (235) hide show
  1. package/dist/{src/_common → _common}/index.d.ts +4 -2
  2. package/dist/{src/_common → _common}/index.js +4 -2
  3. package/dist/_common/mongo.d.ts +3 -0
  4. package/dist/_common/status.d.ts +13 -0
  5. package/dist/_common/status.js +20 -0
  6. package/dist/_common/utility.js +1 -0
  7. package/dist/{src/agency.d.ts → agency.d.ts} +4 -15
  8. package/dist/{src/agency.js → agency.js} +1 -6
  9. package/dist/{src/alert.d.ts → alert.d.ts} +20 -21
  10. package/dist/{src/alert.js → alert.js} +8 -14
  11. package/dist/{src/simplified-apex → apex}/simplified-apex-validation.d.ts +20 -20
  12. package/dist/{src/auth → auth}/index.d.ts +1 -1
  13. package/dist/{src/auth → auth}/index.js +1 -1
  14. package/dist/{src/auth → auth}/password-requirements.js +2 -1
  15. package/dist/auth/role.d.ts +958 -0
  16. package/dist/{src/auth → auth}/role.js +2 -2
  17. package/dist/{src/auth → auth}/session.d.ts +13 -9
  18. package/dist/{src/auth → auth}/session.js +1 -1
  19. package/dist/auth/user.d.ts +1281 -0
  20. package/dist/{src/auth → auth}/user.js +11 -14
  21. package/dist/{src/file-exports → file-exports}/common.d.ts +9 -8
  22. package/dist/{src/file-exports → file-exports}/common.js +1 -1
  23. package/dist/file-exports/index.d.ts +121 -0
  24. package/dist/file-exports/ride-export.d.ts +410 -0
  25. package/dist/file-exports/ride-export.js +131 -0
  26. package/dist/{src/file.d.ts → file.d.ts} +18 -18
  27. package/dist/gtfs/agency.d.ts +30 -0
  28. package/dist/gtfs/agency.js +13 -0
  29. package/dist/gtfs/feed-info.d.ts +33 -0
  30. package/dist/{src/gtfs.js → gtfs/feed-info.js} +1 -11
  31. package/dist/{src/gtfs → gtfs}/index.d.ts +3 -0
  32. package/dist/{src/gtfs → gtfs}/index.js +3 -0
  33. package/dist/gtfs/service-alert.d.ts +26 -0
  34. package/dist/index.d.ts +22 -22
  35. package/dist/index.js +22 -22
  36. package/dist/locations/census.d.ts +211 -0
  37. package/dist/locations/census.js +2 -0
  38. package/dist/locations/district.d.ts +24 -0
  39. package/dist/locations/district.js +2 -0
  40. package/dist/locations/index.d.ts +6 -0
  41. package/dist/locations/index.js +6 -0
  42. package/dist/locations/locality.d.ts +27 -0
  43. package/dist/locations/locality.js +2 -0
  44. package/dist/locations/municipality.d.ts +25 -0
  45. package/dist/locations/municipality.js +2 -0
  46. package/dist/locations/parish.d.ts +26 -0
  47. package/dist/locations/parish.js +2 -0
  48. package/dist/locations/queries.d.ts +117 -0
  49. package/dist/{src/locations.js → locations/queries.js} +5 -16
  50. package/dist/metrics/demand/demand_by_agency.d.ts +210 -0
  51. package/dist/metrics/demand/demand_by_agency.js +39 -0
  52. package/dist/metrics/demand/demand_by_category.d.ts +475 -0
  53. package/dist/metrics/demand/demand_by_category.js +114 -0
  54. package/dist/metrics/demand/demand_by_line.d.ts +246 -0
  55. package/dist/metrics/demand/demand_by_line.js +56 -0
  56. package/dist/metrics/demand/demand_by_pattern.d.ts +332 -0
  57. package/dist/metrics/demand/demand_by_pattern.js +56 -0
  58. package/dist/metrics/demand/demand_by_product.d.ts +475 -0
  59. package/dist/metrics/demand/demand_by_product.js +114 -0
  60. package/dist/metrics/demand/index.d.ts +6 -0
  61. package/dist/metrics/demand/index.js +8 -0
  62. package/dist/metrics/demand/records.d.ts +320 -0
  63. package/dist/metrics/demand/records.js +53 -0
  64. package/dist/metrics/index.d.ts +2647 -0
  65. package/dist/metrics/index.js +48 -0
  66. package/dist/metrics/realtime.d.ts +667 -0
  67. package/dist/metrics/realtime.js +41 -0
  68. package/dist/{src/notification.d.ts → notification.d.ts} +4 -4
  69. package/dist/{src/organization.d.ts → organization.d.ts} +32 -32
  70. package/dist/{src/organization.js → organization.js} +7 -7
  71. package/dist/permissions/agencies.d.ts +12 -0
  72. package/dist/permissions/agencies.js +13 -0
  73. package/dist/permissions/alerts.d.ts +36 -0
  74. package/dist/permissions/alerts.js +25 -0
  75. package/dist/permissions/controller.d.ts +36 -0
  76. package/dist/permissions/controller.js +30 -0
  77. package/dist/permissions/gtfs-validations.d.ts +25 -0
  78. package/dist/permissions/gtfs-validations.js +14 -0
  79. package/dist/permissions/home.d.ts +12 -0
  80. package/dist/permissions/home.js +10 -0
  81. package/dist/permissions/index.d.ts +268 -0
  82. package/dist/permissions/index.js +149 -0
  83. package/dist/permissions/organizations.d.ts +12 -0
  84. package/dist/permissions/organizations.js +12 -0
  85. package/dist/permissions/performance.d.ts +12 -0
  86. package/dist/permissions/performance.js +9 -0
  87. package/dist/permissions/plans.d.ts +25 -0
  88. package/dist/permissions/plans.js +22 -0
  89. package/dist/permissions/roles.d.ts +12 -0
  90. package/dist/permissions/roles.js +12 -0
  91. package/dist/permissions/stops.d.ts +30 -0
  92. package/dist/permissions/stops.js +17 -0
  93. package/dist/permissions/users.d.ts +12 -0
  94. package/dist/permissions/users.js +12 -0
  95. package/dist/{src/plans → plans}/gtfs-validation.d.ts +55 -63
  96. package/dist/{src/plans → plans}/gtfs-validation.js +3 -6
  97. package/dist/plans/plan-app-status.d.ts +15 -0
  98. package/dist/plans/plan-app-status.js +10 -0
  99. package/dist/{src/plans → plans}/plan.d.ts +240 -104
  100. package/dist/{src/plans → plans}/plan.js +8 -10
  101. package/dist/{src/_common/proposed-change.d.ts → proposed-change.d.ts} +21 -22
  102. package/dist/{src/_common/proposed-change.js → proposed-change.js} +5 -7
  103. package/dist/{src/rides → rides}/index.d.ts +1 -0
  104. package/dist/{src/rides → rides}/index.js +1 -0
  105. package/dist/{src/rides → rides}/ride-acceptance.d.ts +65 -65
  106. package/dist/{src/rides → rides}/ride-analysis.d.ts +34 -34
  107. package/dist/{src/rides → rides}/ride-audit.d.ts +10 -10
  108. package/dist/rides/ride-normalized.d.ts +29 -0
  109. package/dist/rides/ride-normalized.js +2 -0
  110. package/dist/{src/rides → rides}/ride.d.ts +523 -567
  111. package/dist/{src/rides → rides}/ride.js +2 -16
  112. package/dist/{src/sams → sams}/sam-analysis.d.ts +11 -11
  113. package/dist/{src/sams → sams}/sam-analysis.js +4 -4
  114. package/dist/{src/sams → sams}/sam.d.ts +76 -76
  115. package/dist/{src/sams → sams}/sam.js +1 -1
  116. package/dist/{src/stop.d.ts → stop.d.ts} +32 -43
  117. package/dist/{src/stop.js → stop.js} +3 -8
  118. package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.d.ts +77 -0
  119. package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.js +21 -0
  120. package/dist/vehicle-events/index.d.ts +2 -0
  121. package/dist/vehicle-events/index.js +2 -0
  122. package/dist/{src/vehicle-event.d.ts → vehicle-events/simplified-vehicle-event.d.ts} +9 -9
  123. package/dist/{src/vehicle-event.js → vehicle-events/simplified-vehicle-event.js} +3 -3
  124. package/dist/wiki.js +2 -0
  125. package/dist/{src/zone.d.ts → zone.d.ts} +2 -16
  126. package/dist/{src/zone.js → zone.js} +0 -6
  127. package/package.json +18 -21
  128. package/README.md +0 -13
  129. package/dist/src/_common/email.d.ts +0 -4
  130. package/dist/src/_common/email.js +0 -7
  131. package/dist/src/auth/permission.d.ts +0 -19
  132. package/dist/src/auth/permission.js +0 -8
  133. package/dist/src/auth/role.d.ts +0 -127
  134. package/dist/src/auth/user.d.ts +0 -311
  135. package/dist/src/file-exports/index.d.ts +0 -121
  136. package/dist/src/file-exports/ride-export.d.ts +0 -470
  137. package/dist/src/file-exports/ride-export.js +0 -128
  138. package/dist/src/gtfs.d.ts +0 -88
  139. package/dist/src/locations.d.ts +0 -319
  140. package/dist/src/metrics/demand.d.ts +0 -803
  141. package/dist/src/metrics/demand.js +0 -153
  142. package/dist/src/metrics/index.d.ts +0 -806
  143. package/dist/src/metrics/index.js +0 -19
  144. package/dist/src/plans/plan-controller.d.ts +0 -15
  145. package/dist/src/plans/plan-controller.js +0 -10
  146. package/dist/src/system/index.d.ts +0 -2
  147. package/dist/src/system/index.js +0 -2
  148. package/dist/src/system/processing-status.d.ts +0 -9
  149. package/dist/src/system/processing-status.js +0 -5
  150. package/dist/{src/_common → _common}/comment.d.ts +8 -8
  151. package/dist/{src/_common → _common}/comment.js +0 -0
  152. package/dist/{src/_common → _common}/document.d.ts +0 -0
  153. package/dist/{src/_common → _common}/document.js +0 -0
  154. package/dist/{src/system → _common}/environment.d.ts +0 -0
  155. package/dist/{src/system → _common}/environment.js +0 -0
  156. package/dist/{src/_common → _common}/fastify.d.ts +0 -0
  157. package/dist/{src/_common → _common}/fastify.js +0 -0
  158. package/dist/{src/_common/utility.js → _common/mongo.js} +0 -0
  159. package/dist/{src/_common → _common}/operational-date.d.ts +0 -0
  160. package/dist/{src/_common → _common}/operational-date.js +0 -0
  161. package/dist/{src/_common → _common}/unix-timestamp.d.ts +0 -0
  162. package/dist/{src/_common → _common}/unix-timestamp.js +0 -0
  163. package/dist/{src/_common → _common}/utility.d.ts +0 -0
  164. package/dist/{src/simplified-apex → apex}/index.d.ts +0 -0
  165. package/dist/{src/simplified-apex → apex}/index.js +0 -0
  166. package/dist/{src/simplified-apex → apex}/simplified-apex-inspection-decision.d.ts +0 -0
  167. package/dist/{src/simplified-apex → apex}/simplified-apex-inspection-decision.js +0 -0
  168. package/dist/{src/simplified-apex → apex}/simplified-apex-inspection.d.ts +0 -0
  169. package/dist/{src/simplified-apex → apex}/simplified-apex-inspection.js +0 -0
  170. package/dist/{src/simplified-apex → apex}/simplified-apex-location.d.ts +16 -16
  171. package/dist/{src/simplified-apex → apex}/simplified-apex-location.js +0 -0
  172. package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-refund.d.ts +20 -20
  173. package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-refund.js +0 -0
  174. package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-sale.d.ts +25 -25
  175. package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-sale.js +0 -0
  176. package/dist/{src/simplified-apex → apex}/simplified-apex-type.d.ts +0 -0
  177. package/dist/{src/simplified-apex → apex}/simplified-apex-type.js +0 -0
  178. package/dist/{src/simplified-apex → apex}/simplified-apex-validation.js +0 -0
  179. package/dist/{src/auth → auth}/login.d.ts +0 -0
  180. package/dist/{src/auth → auth}/login.js +0 -0
  181. package/dist/{src/auth → auth}/password-requirements.d.ts +0 -0
  182. package/dist/{src/auth → auth}/verification-token.d.ts +0 -0
  183. package/dist/{src/auth → auth}/verification-token.js +0 -0
  184. package/dist/{src/file-exports → file-exports}/index.js +0 -0
  185. package/dist/{src/file.js → file.js} +0 -0
  186. package/dist/{src/gtfs → gtfs}/calendar-dates.d.ts +0 -0
  187. package/dist/{src/gtfs → gtfs}/calendar-dates.js +0 -0
  188. package/dist/{src/gtfs → gtfs}/calendar.d.ts +0 -0
  189. package/dist/{src/gtfs → gtfs}/calendar.js +0 -0
  190. package/dist/{src/gtfs → gtfs}/cause-effetcs.d.ts +0 -0
  191. package/dist/{src/gtfs → gtfs}/cause-effetcs.js +0 -0
  192. package/dist/{src/gtfs → gtfs}/common.d.ts +0 -0
  193. package/dist/{src/gtfs → gtfs}/common.js +0 -0
  194. package/dist/{src/gtfs → gtfs}/routes.d.ts +0 -0
  195. package/dist/{src/gtfs → gtfs}/routes.js +0 -0
  196. package/dist/{src/pcgi/pcgi-apex-location.js → gtfs/service-alert.js} +0 -0
  197. package/dist/{src/gtfs → gtfs}/shapes.d.ts +0 -0
  198. package/dist/{src/gtfs → gtfs}/shapes.js +0 -0
  199. package/dist/{src/gtfs → gtfs}/stop-times.d.ts +0 -0
  200. package/dist/{src/gtfs → gtfs}/stop-times.js +0 -0
  201. package/dist/{src/gtfs → gtfs}/stops.d.ts +0 -0
  202. package/dist/{src/gtfs → gtfs}/stops.js +0 -0
  203. package/dist/{src/gtfs → gtfs}/trips.d.ts +0 -0
  204. package/dist/{src/gtfs → gtfs}/trips.js +0 -0
  205. package/dist/{src/metrics → metrics}/common.d.ts +0 -0
  206. package/dist/{src/metrics → metrics}/common.js +0 -0
  207. package/dist/{src/notification.js → notification.js} +0 -0
  208. package/dist/{src/pcgi → pcgi}/index.d.ts +0 -0
  209. package/dist/{src/pcgi → pcgi}/index.js +0 -0
  210. package/dist/{src/pcgi → pcgi}/pcgi-apex-location.d.ts +0 -0
  211. package/dist/{src/pcgi/pcgi-apex-refund.js → pcgi/pcgi-apex-location.js} +0 -0
  212. package/dist/{src/pcgi → pcgi}/pcgi-apex-refund.d.ts +0 -0
  213. package/dist/{src/pcgi/pcgi-apex-sale.js → pcgi/pcgi-apex-refund.js} +0 -0
  214. package/dist/{src/pcgi → pcgi}/pcgi-apex-sale.d.ts +0 -0
  215. package/dist/{src/pcgi/pcgi-apex-validation.js → pcgi/pcgi-apex-sale.js} +0 -0
  216. package/dist/{src/pcgi → pcgi}/pcgi-apex-validation.d.ts +0 -0
  217. package/dist/{src/pcgi/pcgi-transaction-entity.js → pcgi/pcgi-apex-validation.js} +0 -0
  218. package/dist/{src/pcgi → pcgi}/pcgi-transaction-entity.d.ts +0 -0
  219. package/dist/{src/rides/hashed-shape.js → pcgi/pcgi-transaction-entity.js} +0 -0
  220. package/dist/{src/plans → plans}/index.d.ts +0 -0
  221. package/dist/{src/plans → plans}/index.js +0 -0
  222. package/dist/{src/plans → plans}/plan-pcgi-legacy.d.ts +0 -0
  223. package/dist/{src/plans → plans}/plan-pcgi-legacy.js +0 -0
  224. package/dist/{src/rides → rides}/hashed-shape.d.ts +0 -0
  225. package/dist/{src/rides/hashed-trip.js → rides/hashed-shape.js} +0 -0
  226. package/dist/{src/rides → rides}/hashed-trip.d.ts +0 -0
  227. package/dist/{src/wiki.js → rides/hashed-trip.js} +0 -0
  228. package/dist/{src/rides → rides}/ride-acceptance.js +1 -1
  229. /package/dist/{src/rides → rides}/ride-analysis.js +0 -0
  230. /package/dist/{src/rides → rides}/ride-audit.js +0 -0
  231. /package/dist/{src/rides → rides}/ride-overrides.d.ts +0 -0
  232. /package/dist/{src/rides → rides}/ride-overrides.js +0 -0
  233. /package/dist/{src/sams → sams}/index.d.ts +0 -0
  234. /package/dist/{src/sams → sams}/index.js +0 -0
  235. /package/dist/{src/wiki.d.ts → wiki.d.ts} +0 -0
@@ -0,0 +1,1281 @@
1
+ import { z } from 'zod';
2
+ export declare const UserPreferenceValueSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>;
3
+ export type UserPreferenceValue = z.infer<typeof UserPreferenceValueSchema>;
4
+ export declare const UserSchema: z.ZodObject<{
5
+ _id: z.ZodString;
6
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
7
+ created_by: z.ZodOptional<z.ZodString>;
8
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
9
+ updated_by: z.ZodOptional<z.ZodString>;
10
+ } & {
11
+ email: z.ZodString;
12
+ email_verified: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
13
+ first_name: z.ZodString;
14
+ last_name: z.ZodString;
15
+ organization_id: z.ZodNullable<z.ZodString>;
16
+ password_hash: z.ZodNullable<z.ZodString>;
17
+ permissions: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
18
+ action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
19
+ scope: z.ZodLiteral<"agencies">;
20
+ }, "strip", z.ZodTypeAny, {
21
+ scope: "agencies";
22
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
23
+ }, {
24
+ scope: "agencies";
25
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
26
+ }>, z.ZodObject<{
27
+ action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
28
+ scope: z.ZodLiteral<"alerts_scheduled">;
29
+ }, "strip", z.ZodTypeAny, {
30
+ scope: "alerts_scheduled";
31
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
32
+ }, {
33
+ scope: "alerts_scheduled";
34
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
35
+ }>, z.ZodObject<{
36
+ action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
37
+ resources: z.ZodDefault<z.ZodObject<{
38
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ agency_ids: string[];
41
+ }, {
42
+ agency_ids?: string[] | undefined;
43
+ }>>;
44
+ scope: z.ZodLiteral<"alerts_realtime">;
45
+ }, "strip", z.ZodTypeAny, {
46
+ scope: "alerts_realtime";
47
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
48
+ resources: {
49
+ agency_ids: string[];
50
+ };
51
+ }, {
52
+ scope: "alerts_realtime";
53
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
54
+ resources?: {
55
+ agency_ids?: string[] | undefined;
56
+ } | undefined;
57
+ }>, z.ZodObject<{
58
+ 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"]>;
59
+ resources: z.ZodDefault<z.ZodObject<{
60
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
61
+ }, "strip", z.ZodTypeAny, {
62
+ agency_ids: string[];
63
+ }, {
64
+ agency_ids?: string[] | undefined;
65
+ }>>;
66
+ scope: z.ZodLiteral<"rides">;
67
+ }, "strip", z.ZodTypeAny, {
68
+ scope: "rides";
69
+ 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";
70
+ resources: {
71
+ agency_ids: string[];
72
+ };
73
+ }, {
74
+ scope: "rides";
75
+ 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";
76
+ resources?: {
77
+ agency_ids?: string[] | undefined;
78
+ } | undefined;
79
+ }>, z.ZodObject<{
80
+ action: z.ZodEnum<["read"]>;
81
+ scope: z.ZodLiteral<"sams">;
82
+ }, "strip", z.ZodTypeAny, {
83
+ scope: "sams";
84
+ action: "read";
85
+ }, {
86
+ scope: "sams";
87
+ action: "read";
88
+ }>, z.ZodObject<{
89
+ action: z.ZodEnum<["create", "read", "request_approval"]>;
90
+ resources: z.ZodDefault<z.ZodObject<{
91
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
92
+ }, "strip", z.ZodTypeAny, {
93
+ agency_ids: string[];
94
+ }, {
95
+ agency_ids?: string[] | undefined;
96
+ }>>;
97
+ scope: z.ZodLiteral<"gtfs_validations">;
98
+ }, "strip", z.ZodTypeAny, {
99
+ scope: "gtfs_validations";
100
+ action: "create" | "read" | "request_approval";
101
+ resources: {
102
+ agency_ids: string[];
103
+ };
104
+ }, {
105
+ scope: "gtfs_validations";
106
+ action: "create" | "read" | "request_approval";
107
+ resources?: {
108
+ agency_ids?: string[] | undefined;
109
+ } | undefined;
110
+ }>, z.ZodObject<{
111
+ action: z.ZodEnum<["read_links", "read_wiki"]>;
112
+ scope: z.ZodLiteral<"home">;
113
+ }, "strip", z.ZodTypeAny, {
114
+ scope: "home";
115
+ action: "read_links" | "read_wiki";
116
+ }, {
117
+ scope: "home";
118
+ action: "read_links" | "read_wiki";
119
+ }>, z.ZodObject<{
120
+ action: z.ZodEnum<["create", "delete", "read", "update"]>;
121
+ scope: z.ZodLiteral<"organizations">;
122
+ }, "strip", z.ZodTypeAny, {
123
+ scope: "organizations";
124
+ action: "create" | "update" | "delete" | "read";
125
+ }, {
126
+ scope: "organizations";
127
+ action: "create" | "update" | "delete" | "read";
128
+ }>, z.ZodObject<{
129
+ action: z.ZodEnum<["read"]>;
130
+ scope: z.ZodLiteral<"performance">;
131
+ }, "strip", z.ZodTypeAny, {
132
+ scope: "performance";
133
+ action: "read";
134
+ }, {
135
+ scope: "performance";
136
+ action: "read";
137
+ }>, z.ZodObject<{
138
+ action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "toggle_lock", "update", "update_controller", "update_feed_info_dates", "update_gtfs_plan", "update_pcgi_legacy"]>;
139
+ resources: z.ZodDefault<z.ZodObject<{
140
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
141
+ }, "strip", z.ZodTypeAny, {
142
+ agency_ids: string[];
143
+ }, {
144
+ agency_ids?: string[] | undefined;
145
+ }>>;
146
+ scope: z.ZodLiteral<"plans">;
147
+ }, "strip", z.ZodTypeAny, {
148
+ scope: "plans";
149
+ action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
150
+ resources: {
151
+ agency_ids: string[];
152
+ };
153
+ }, {
154
+ scope: "plans";
155
+ action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
156
+ resources?: {
157
+ agency_ids?: string[] | undefined;
158
+ } | undefined;
159
+ }>, z.ZodObject<{
160
+ action: z.ZodEnum<["create", "delete", "read", "update"]>;
161
+ scope: z.ZodLiteral<"roles">;
162
+ }, "strip", z.ZodTypeAny, {
163
+ scope: "roles";
164
+ action: "create" | "update" | "delete" | "read";
165
+ }, {
166
+ scope: "roles";
167
+ action: "create" | "update" | "delete" | "read";
168
+ }>, z.ZodObject<{
169
+ action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
170
+ resources: z.ZodDefault<z.ZodObject<{
171
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
172
+ municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
173
+ }, "strip", z.ZodTypeAny, {
174
+ municipality_ids: string[];
175
+ agency_ids: string[];
176
+ }, {
177
+ municipality_ids?: string[] | undefined;
178
+ agency_ids?: string[] | undefined;
179
+ }>>;
180
+ scope: z.ZodLiteral<"stops">;
181
+ }, "strip", z.ZodTypeAny, {
182
+ scope: "stops";
183
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
184
+ resources: {
185
+ municipality_ids: string[];
186
+ agency_ids: string[];
187
+ };
188
+ }, {
189
+ scope: "stops";
190
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
191
+ resources?: {
192
+ municipality_ids?: string[] | undefined;
193
+ agency_ids?: string[] | undefined;
194
+ } | undefined;
195
+ }>, z.ZodObject<{
196
+ action: z.ZodEnum<["create", "delete", "read", "update"]>;
197
+ scope: z.ZodLiteral<"users">;
198
+ }, "strip", z.ZodTypeAny, {
199
+ scope: "users";
200
+ action: "create" | "update" | "delete" | "read";
201
+ }, {
202
+ scope: "users";
203
+ action: "create" | "update" | "delete" | "read";
204
+ }>]>, "many">>;
205
+ phone: z.ZodNullable<z.ZodString>;
206
+ preferences: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>>>>;
207
+ role_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
208
+ session_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
209
+ verification_token_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
210
+ }, "strip", z.ZodTypeAny, {
211
+ _id: string;
212
+ created_at: number & {
213
+ __brand: "UnixTimestamp";
214
+ };
215
+ updated_at: number & {
216
+ __brand: "UnixTimestamp";
217
+ };
218
+ phone: string | null;
219
+ email: string;
220
+ permissions: ({
221
+ scope: "agencies";
222
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
223
+ } | {
224
+ scope: "alerts_scheduled";
225
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
226
+ } | {
227
+ scope: "alerts_realtime";
228
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
229
+ resources: {
230
+ agency_ids: string[];
231
+ };
232
+ } | {
233
+ scope: "rides";
234
+ 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";
235
+ resources: {
236
+ agency_ids: string[];
237
+ };
238
+ } | {
239
+ scope: "sams";
240
+ action: "read";
241
+ } | {
242
+ scope: "gtfs_validations";
243
+ action: "create" | "read" | "request_approval";
244
+ resources: {
245
+ agency_ids: string[];
246
+ };
247
+ } | {
248
+ scope: "home";
249
+ action: "read_links" | "read_wiki";
250
+ } | {
251
+ scope: "organizations";
252
+ action: "create" | "update" | "delete" | "read";
253
+ } | {
254
+ scope: "performance";
255
+ action: "read";
256
+ } | {
257
+ scope: "plans";
258
+ action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
259
+ resources: {
260
+ agency_ids: string[];
261
+ };
262
+ } | {
263
+ scope: "roles";
264
+ action: "create" | "update" | "delete" | "read";
265
+ } | {
266
+ scope: "stops";
267
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
268
+ resources: {
269
+ municipality_ids: string[];
270
+ agency_ids: string[];
271
+ };
272
+ } | {
273
+ scope: "users";
274
+ action: "create" | "update" | "delete" | "read";
275
+ })[];
276
+ email_verified: import("../_common/unix-timestamp.js").UnixTimestamp | null;
277
+ first_name: string;
278
+ last_name: string;
279
+ organization_id: string | null;
280
+ password_hash: string | null;
281
+ preferences: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null;
282
+ role_ids: string[];
283
+ session_ids: string[];
284
+ verification_token_ids: string[];
285
+ created_by?: string | undefined;
286
+ updated_by?: string | undefined;
287
+ }, {
288
+ _id: string;
289
+ created_at: number;
290
+ updated_at: number;
291
+ phone: string | null;
292
+ email: string;
293
+ email_verified: number | null;
294
+ first_name: string;
295
+ last_name: string;
296
+ organization_id: string | null;
297
+ password_hash: string | null;
298
+ preferences: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null;
299
+ created_by?: string | undefined;
300
+ updated_by?: string | undefined;
301
+ permissions?: ({
302
+ scope: "agencies";
303
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
304
+ } | {
305
+ scope: "alerts_scheduled";
306
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
307
+ } | {
308
+ scope: "alerts_realtime";
309
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
310
+ resources?: {
311
+ agency_ids?: string[] | undefined;
312
+ } | undefined;
313
+ } | {
314
+ scope: "rides";
315
+ 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";
316
+ resources?: {
317
+ agency_ids?: string[] | undefined;
318
+ } | undefined;
319
+ } | {
320
+ scope: "sams";
321
+ action: "read";
322
+ } | {
323
+ scope: "gtfs_validations";
324
+ action: "create" | "read" | "request_approval";
325
+ resources?: {
326
+ agency_ids?: string[] | undefined;
327
+ } | undefined;
328
+ } | {
329
+ scope: "home";
330
+ action: "read_links" | "read_wiki";
331
+ } | {
332
+ scope: "organizations";
333
+ action: "create" | "update" | "delete" | "read";
334
+ } | {
335
+ scope: "performance";
336
+ action: "read";
337
+ } | {
338
+ scope: "plans";
339
+ action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
340
+ resources?: {
341
+ agency_ids?: string[] | undefined;
342
+ } | undefined;
343
+ } | {
344
+ scope: "roles";
345
+ action: "create" | "update" | "delete" | "read";
346
+ } | {
347
+ scope: "stops";
348
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
349
+ resources?: {
350
+ municipality_ids?: string[] | undefined;
351
+ agency_ids?: string[] | undefined;
352
+ } | undefined;
353
+ } | {
354
+ scope: "users";
355
+ action: "create" | "update" | "delete" | "read";
356
+ })[] | undefined;
357
+ role_ids?: string[] | undefined;
358
+ session_ids?: string[] | undefined;
359
+ verification_token_ids?: string[] | undefined;
360
+ }>;
361
+ export declare const CreateUserSchema: z.ZodObject<Omit<{
362
+ _id: z.ZodString;
363
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
364
+ created_by: z.ZodOptional<z.ZodString>;
365
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
366
+ updated_by: z.ZodOptional<z.ZodString>;
367
+ } & {
368
+ email: z.ZodString;
369
+ email_verified: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
370
+ first_name: z.ZodString;
371
+ last_name: z.ZodString;
372
+ organization_id: z.ZodNullable<z.ZodString>;
373
+ password_hash: z.ZodNullable<z.ZodString>;
374
+ permissions: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
375
+ action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
376
+ scope: z.ZodLiteral<"agencies">;
377
+ }, "strip", z.ZodTypeAny, {
378
+ scope: "agencies";
379
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
380
+ }, {
381
+ scope: "agencies";
382
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
383
+ }>, z.ZodObject<{
384
+ action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
385
+ scope: z.ZodLiteral<"alerts_scheduled">;
386
+ }, "strip", z.ZodTypeAny, {
387
+ scope: "alerts_scheduled";
388
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
389
+ }, {
390
+ scope: "alerts_scheduled";
391
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
392
+ }>, z.ZodObject<{
393
+ action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
394
+ resources: z.ZodDefault<z.ZodObject<{
395
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
396
+ }, "strip", z.ZodTypeAny, {
397
+ agency_ids: string[];
398
+ }, {
399
+ agency_ids?: string[] | undefined;
400
+ }>>;
401
+ scope: z.ZodLiteral<"alerts_realtime">;
402
+ }, "strip", z.ZodTypeAny, {
403
+ scope: "alerts_realtime";
404
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
405
+ resources: {
406
+ agency_ids: string[];
407
+ };
408
+ }, {
409
+ scope: "alerts_realtime";
410
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
411
+ resources?: {
412
+ agency_ids?: string[] | undefined;
413
+ } | undefined;
414
+ }>, z.ZodObject<{
415
+ 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"]>;
416
+ resources: z.ZodDefault<z.ZodObject<{
417
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
418
+ }, "strip", z.ZodTypeAny, {
419
+ agency_ids: string[];
420
+ }, {
421
+ agency_ids?: string[] | undefined;
422
+ }>>;
423
+ scope: z.ZodLiteral<"rides">;
424
+ }, "strip", z.ZodTypeAny, {
425
+ scope: "rides";
426
+ 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";
427
+ resources: {
428
+ agency_ids: string[];
429
+ };
430
+ }, {
431
+ scope: "rides";
432
+ 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";
433
+ resources?: {
434
+ agency_ids?: string[] | undefined;
435
+ } | undefined;
436
+ }>, z.ZodObject<{
437
+ action: z.ZodEnum<["read"]>;
438
+ scope: z.ZodLiteral<"sams">;
439
+ }, "strip", z.ZodTypeAny, {
440
+ scope: "sams";
441
+ action: "read";
442
+ }, {
443
+ scope: "sams";
444
+ action: "read";
445
+ }>, z.ZodObject<{
446
+ action: z.ZodEnum<["create", "read", "request_approval"]>;
447
+ resources: z.ZodDefault<z.ZodObject<{
448
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
449
+ }, "strip", z.ZodTypeAny, {
450
+ agency_ids: string[];
451
+ }, {
452
+ agency_ids?: string[] | undefined;
453
+ }>>;
454
+ scope: z.ZodLiteral<"gtfs_validations">;
455
+ }, "strip", z.ZodTypeAny, {
456
+ scope: "gtfs_validations";
457
+ action: "create" | "read" | "request_approval";
458
+ resources: {
459
+ agency_ids: string[];
460
+ };
461
+ }, {
462
+ scope: "gtfs_validations";
463
+ action: "create" | "read" | "request_approval";
464
+ resources?: {
465
+ agency_ids?: string[] | undefined;
466
+ } | undefined;
467
+ }>, z.ZodObject<{
468
+ action: z.ZodEnum<["read_links", "read_wiki"]>;
469
+ scope: z.ZodLiteral<"home">;
470
+ }, "strip", z.ZodTypeAny, {
471
+ scope: "home";
472
+ action: "read_links" | "read_wiki";
473
+ }, {
474
+ scope: "home";
475
+ action: "read_links" | "read_wiki";
476
+ }>, z.ZodObject<{
477
+ action: z.ZodEnum<["create", "delete", "read", "update"]>;
478
+ scope: z.ZodLiteral<"organizations">;
479
+ }, "strip", z.ZodTypeAny, {
480
+ scope: "organizations";
481
+ action: "create" | "update" | "delete" | "read";
482
+ }, {
483
+ scope: "organizations";
484
+ action: "create" | "update" | "delete" | "read";
485
+ }>, z.ZodObject<{
486
+ action: z.ZodEnum<["read"]>;
487
+ scope: z.ZodLiteral<"performance">;
488
+ }, "strip", z.ZodTypeAny, {
489
+ scope: "performance";
490
+ action: "read";
491
+ }, {
492
+ scope: "performance";
493
+ action: "read";
494
+ }>, z.ZodObject<{
495
+ action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "toggle_lock", "update", "update_controller", "update_feed_info_dates", "update_gtfs_plan", "update_pcgi_legacy"]>;
496
+ resources: z.ZodDefault<z.ZodObject<{
497
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
498
+ }, "strip", z.ZodTypeAny, {
499
+ agency_ids: string[];
500
+ }, {
501
+ agency_ids?: string[] | undefined;
502
+ }>>;
503
+ scope: z.ZodLiteral<"plans">;
504
+ }, "strip", z.ZodTypeAny, {
505
+ scope: "plans";
506
+ action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
507
+ resources: {
508
+ agency_ids: string[];
509
+ };
510
+ }, {
511
+ scope: "plans";
512
+ action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
513
+ resources?: {
514
+ agency_ids?: string[] | undefined;
515
+ } | undefined;
516
+ }>, z.ZodObject<{
517
+ action: z.ZodEnum<["create", "delete", "read", "update"]>;
518
+ scope: z.ZodLiteral<"roles">;
519
+ }, "strip", z.ZodTypeAny, {
520
+ scope: "roles";
521
+ action: "create" | "update" | "delete" | "read";
522
+ }, {
523
+ scope: "roles";
524
+ action: "create" | "update" | "delete" | "read";
525
+ }>, z.ZodObject<{
526
+ action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
527
+ resources: z.ZodDefault<z.ZodObject<{
528
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
529
+ municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
530
+ }, "strip", z.ZodTypeAny, {
531
+ municipality_ids: string[];
532
+ agency_ids: string[];
533
+ }, {
534
+ municipality_ids?: string[] | undefined;
535
+ agency_ids?: string[] | undefined;
536
+ }>>;
537
+ scope: z.ZodLiteral<"stops">;
538
+ }, "strip", z.ZodTypeAny, {
539
+ scope: "stops";
540
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
541
+ resources: {
542
+ municipality_ids: string[];
543
+ agency_ids: string[];
544
+ };
545
+ }, {
546
+ scope: "stops";
547
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
548
+ resources?: {
549
+ municipality_ids?: string[] | undefined;
550
+ agency_ids?: string[] | undefined;
551
+ } | undefined;
552
+ }>, z.ZodObject<{
553
+ action: z.ZodEnum<["create", "delete", "read", "update"]>;
554
+ scope: z.ZodLiteral<"users">;
555
+ }, "strip", z.ZodTypeAny, {
556
+ scope: "users";
557
+ action: "create" | "update" | "delete" | "read";
558
+ }, {
559
+ scope: "users";
560
+ action: "create" | "update" | "delete" | "read";
561
+ }>]>, "many">>;
562
+ phone: z.ZodNullable<z.ZodString>;
563
+ preferences: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>>>>;
564
+ role_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
565
+ session_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
566
+ verification_token_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
567
+ }, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
568
+ phone: string | null;
569
+ email: string;
570
+ permissions: ({
571
+ scope: "agencies";
572
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
573
+ } | {
574
+ scope: "alerts_scheduled";
575
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
576
+ } | {
577
+ scope: "alerts_realtime";
578
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
579
+ resources: {
580
+ agency_ids: string[];
581
+ };
582
+ } | {
583
+ scope: "rides";
584
+ 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";
585
+ resources: {
586
+ agency_ids: string[];
587
+ };
588
+ } | {
589
+ scope: "sams";
590
+ action: "read";
591
+ } | {
592
+ scope: "gtfs_validations";
593
+ action: "create" | "read" | "request_approval";
594
+ resources: {
595
+ agency_ids: string[];
596
+ };
597
+ } | {
598
+ scope: "home";
599
+ action: "read_links" | "read_wiki";
600
+ } | {
601
+ scope: "organizations";
602
+ action: "create" | "update" | "delete" | "read";
603
+ } | {
604
+ scope: "performance";
605
+ action: "read";
606
+ } | {
607
+ scope: "plans";
608
+ action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
609
+ resources: {
610
+ agency_ids: string[];
611
+ };
612
+ } | {
613
+ scope: "roles";
614
+ action: "create" | "update" | "delete" | "read";
615
+ } | {
616
+ scope: "stops";
617
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
618
+ resources: {
619
+ municipality_ids: string[];
620
+ agency_ids: string[];
621
+ };
622
+ } | {
623
+ scope: "users";
624
+ action: "create" | "update" | "delete" | "read";
625
+ })[];
626
+ email_verified: import("../_common/unix-timestamp.js").UnixTimestamp | null;
627
+ first_name: string;
628
+ last_name: string;
629
+ organization_id: string | null;
630
+ password_hash: string | null;
631
+ preferences: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null;
632
+ role_ids: string[];
633
+ session_ids: string[];
634
+ verification_token_ids: string[];
635
+ created_by?: string | undefined;
636
+ updated_by?: string | undefined;
637
+ }, {
638
+ phone: string | null;
639
+ email: string;
640
+ email_verified: number | null;
641
+ first_name: string;
642
+ last_name: string;
643
+ organization_id: string | null;
644
+ password_hash: string | null;
645
+ preferences: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null;
646
+ created_by?: string | undefined;
647
+ updated_by?: string | undefined;
648
+ permissions?: ({
649
+ scope: "agencies";
650
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
651
+ } | {
652
+ scope: "alerts_scheduled";
653
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
654
+ } | {
655
+ scope: "alerts_realtime";
656
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
657
+ resources?: {
658
+ agency_ids?: string[] | undefined;
659
+ } | undefined;
660
+ } | {
661
+ scope: "rides";
662
+ 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";
663
+ resources?: {
664
+ agency_ids?: string[] | undefined;
665
+ } | undefined;
666
+ } | {
667
+ scope: "sams";
668
+ action: "read";
669
+ } | {
670
+ scope: "gtfs_validations";
671
+ action: "create" | "read" | "request_approval";
672
+ resources?: {
673
+ agency_ids?: string[] | undefined;
674
+ } | undefined;
675
+ } | {
676
+ scope: "home";
677
+ action: "read_links" | "read_wiki";
678
+ } | {
679
+ scope: "organizations";
680
+ action: "create" | "update" | "delete" | "read";
681
+ } | {
682
+ scope: "performance";
683
+ action: "read";
684
+ } | {
685
+ scope: "plans";
686
+ action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
687
+ resources?: {
688
+ agency_ids?: string[] | undefined;
689
+ } | undefined;
690
+ } | {
691
+ scope: "roles";
692
+ action: "create" | "update" | "delete" | "read";
693
+ } | {
694
+ scope: "stops";
695
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
696
+ resources?: {
697
+ municipality_ids?: string[] | undefined;
698
+ agency_ids?: string[] | undefined;
699
+ } | undefined;
700
+ } | {
701
+ scope: "users";
702
+ action: "create" | "update" | "delete" | "read";
703
+ })[] | undefined;
704
+ role_ids?: string[] | undefined;
705
+ session_ids?: string[] | undefined;
706
+ verification_token_ids?: string[] | undefined;
707
+ }>;
708
+ export declare const UpdateUserSchema: z.ZodObject<{
709
+ updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
710
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
711
+ email: z.ZodOptional<z.ZodString>;
712
+ permissions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
713
+ action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
714
+ scope: z.ZodLiteral<"agencies">;
715
+ }, "strip", z.ZodTypeAny, {
716
+ scope: "agencies";
717
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
718
+ }, {
719
+ scope: "agencies";
720
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
721
+ }>, z.ZodObject<{
722
+ action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
723
+ scope: z.ZodLiteral<"alerts_scheduled">;
724
+ }, "strip", z.ZodTypeAny, {
725
+ scope: "alerts_scheduled";
726
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
727
+ }, {
728
+ scope: "alerts_scheduled";
729
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
730
+ }>, z.ZodObject<{
731
+ action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
732
+ resources: z.ZodDefault<z.ZodObject<{
733
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
734
+ }, "strip", z.ZodTypeAny, {
735
+ agency_ids: string[];
736
+ }, {
737
+ agency_ids?: string[] | undefined;
738
+ }>>;
739
+ scope: z.ZodLiteral<"alerts_realtime">;
740
+ }, "strip", z.ZodTypeAny, {
741
+ scope: "alerts_realtime";
742
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
743
+ resources: {
744
+ agency_ids: string[];
745
+ };
746
+ }, {
747
+ scope: "alerts_realtime";
748
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
749
+ resources?: {
750
+ agency_ids?: string[] | undefined;
751
+ } | undefined;
752
+ }>, z.ZodObject<{
753
+ 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"]>;
754
+ resources: z.ZodDefault<z.ZodObject<{
755
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
756
+ }, "strip", z.ZodTypeAny, {
757
+ agency_ids: string[];
758
+ }, {
759
+ agency_ids?: string[] | undefined;
760
+ }>>;
761
+ scope: z.ZodLiteral<"rides">;
762
+ }, "strip", z.ZodTypeAny, {
763
+ scope: "rides";
764
+ 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";
765
+ resources: {
766
+ agency_ids: string[];
767
+ };
768
+ }, {
769
+ scope: "rides";
770
+ 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";
771
+ resources?: {
772
+ agency_ids?: string[] | undefined;
773
+ } | undefined;
774
+ }>, z.ZodObject<{
775
+ action: z.ZodEnum<["read"]>;
776
+ scope: z.ZodLiteral<"sams">;
777
+ }, "strip", z.ZodTypeAny, {
778
+ scope: "sams";
779
+ action: "read";
780
+ }, {
781
+ scope: "sams";
782
+ action: "read";
783
+ }>, z.ZodObject<{
784
+ action: z.ZodEnum<["create", "read", "request_approval"]>;
785
+ resources: z.ZodDefault<z.ZodObject<{
786
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
787
+ }, "strip", z.ZodTypeAny, {
788
+ agency_ids: string[];
789
+ }, {
790
+ agency_ids?: string[] | undefined;
791
+ }>>;
792
+ scope: z.ZodLiteral<"gtfs_validations">;
793
+ }, "strip", z.ZodTypeAny, {
794
+ scope: "gtfs_validations";
795
+ action: "create" | "read" | "request_approval";
796
+ resources: {
797
+ agency_ids: string[];
798
+ };
799
+ }, {
800
+ scope: "gtfs_validations";
801
+ action: "create" | "read" | "request_approval";
802
+ resources?: {
803
+ agency_ids?: string[] | undefined;
804
+ } | undefined;
805
+ }>, z.ZodObject<{
806
+ action: z.ZodEnum<["read_links", "read_wiki"]>;
807
+ scope: z.ZodLiteral<"home">;
808
+ }, "strip", z.ZodTypeAny, {
809
+ scope: "home";
810
+ action: "read_links" | "read_wiki";
811
+ }, {
812
+ scope: "home";
813
+ action: "read_links" | "read_wiki";
814
+ }>, z.ZodObject<{
815
+ action: z.ZodEnum<["create", "delete", "read", "update"]>;
816
+ scope: z.ZodLiteral<"organizations">;
817
+ }, "strip", z.ZodTypeAny, {
818
+ scope: "organizations";
819
+ action: "create" | "update" | "delete" | "read";
820
+ }, {
821
+ scope: "organizations";
822
+ action: "create" | "update" | "delete" | "read";
823
+ }>, z.ZodObject<{
824
+ action: z.ZodEnum<["read"]>;
825
+ scope: z.ZodLiteral<"performance">;
826
+ }, "strip", z.ZodTypeAny, {
827
+ scope: "performance";
828
+ action: "read";
829
+ }, {
830
+ scope: "performance";
831
+ action: "read";
832
+ }>, z.ZodObject<{
833
+ action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "toggle_lock", "update", "update_controller", "update_feed_info_dates", "update_gtfs_plan", "update_pcgi_legacy"]>;
834
+ resources: z.ZodDefault<z.ZodObject<{
835
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
836
+ }, "strip", z.ZodTypeAny, {
837
+ agency_ids: string[];
838
+ }, {
839
+ agency_ids?: string[] | undefined;
840
+ }>>;
841
+ scope: z.ZodLiteral<"plans">;
842
+ }, "strip", z.ZodTypeAny, {
843
+ scope: "plans";
844
+ action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
845
+ resources: {
846
+ agency_ids: string[];
847
+ };
848
+ }, {
849
+ scope: "plans";
850
+ action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
851
+ resources?: {
852
+ agency_ids?: string[] | undefined;
853
+ } | undefined;
854
+ }>, z.ZodObject<{
855
+ action: z.ZodEnum<["create", "delete", "read", "update"]>;
856
+ scope: z.ZodLiteral<"roles">;
857
+ }, "strip", z.ZodTypeAny, {
858
+ scope: "roles";
859
+ action: "create" | "update" | "delete" | "read";
860
+ }, {
861
+ scope: "roles";
862
+ action: "create" | "update" | "delete" | "read";
863
+ }>, z.ZodObject<{
864
+ action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
865
+ resources: z.ZodDefault<z.ZodObject<{
866
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
867
+ municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
868
+ }, "strip", z.ZodTypeAny, {
869
+ municipality_ids: string[];
870
+ agency_ids: string[];
871
+ }, {
872
+ municipality_ids?: string[] | undefined;
873
+ agency_ids?: string[] | undefined;
874
+ }>>;
875
+ scope: z.ZodLiteral<"stops">;
876
+ }, "strip", z.ZodTypeAny, {
877
+ scope: "stops";
878
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
879
+ resources: {
880
+ municipality_ids: string[];
881
+ agency_ids: string[];
882
+ };
883
+ }, {
884
+ scope: "stops";
885
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
886
+ resources?: {
887
+ municipality_ids?: string[] | undefined;
888
+ agency_ids?: string[] | undefined;
889
+ } | undefined;
890
+ }>, z.ZodObject<{
891
+ action: z.ZodEnum<["create", "delete", "read", "update"]>;
892
+ scope: z.ZodLiteral<"users">;
893
+ }, "strip", z.ZodTypeAny, {
894
+ scope: "users";
895
+ action: "create" | "update" | "delete" | "read";
896
+ }, {
897
+ scope: "users";
898
+ action: "create" | "update" | "delete" | "read";
899
+ }>]>, "many">>>;
900
+ email_verified: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
901
+ first_name: z.ZodOptional<z.ZodString>;
902
+ last_name: z.ZodOptional<z.ZodString>;
903
+ organization_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
904
+ password_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
905
+ preferences: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>>>>>;
906
+ role_ids: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
907
+ session_ids: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
908
+ verification_token_ids: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
909
+ }, "strip", z.ZodTypeAny, {
910
+ updated_by?: string | undefined;
911
+ phone?: string | null | undefined;
912
+ email?: string | undefined;
913
+ permissions?: ({
914
+ scope: "agencies";
915
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
916
+ } | {
917
+ scope: "alerts_scheduled";
918
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
919
+ } | {
920
+ scope: "alerts_realtime";
921
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
922
+ resources: {
923
+ agency_ids: string[];
924
+ };
925
+ } | {
926
+ scope: "rides";
927
+ 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";
928
+ resources: {
929
+ agency_ids: string[];
930
+ };
931
+ } | {
932
+ scope: "sams";
933
+ action: "read";
934
+ } | {
935
+ scope: "gtfs_validations";
936
+ action: "create" | "read" | "request_approval";
937
+ resources: {
938
+ agency_ids: string[];
939
+ };
940
+ } | {
941
+ scope: "home";
942
+ action: "read_links" | "read_wiki";
943
+ } | {
944
+ scope: "organizations";
945
+ action: "create" | "update" | "delete" | "read";
946
+ } | {
947
+ scope: "performance";
948
+ action: "read";
949
+ } | {
950
+ scope: "plans";
951
+ action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
952
+ resources: {
953
+ agency_ids: string[];
954
+ };
955
+ } | {
956
+ scope: "roles";
957
+ action: "create" | "update" | "delete" | "read";
958
+ } | {
959
+ scope: "stops";
960
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
961
+ resources: {
962
+ municipality_ids: string[];
963
+ agency_ids: string[];
964
+ };
965
+ } | {
966
+ scope: "users";
967
+ action: "create" | "update" | "delete" | "read";
968
+ })[] | undefined;
969
+ email_verified?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
970
+ first_name?: string | undefined;
971
+ last_name?: string | undefined;
972
+ organization_id?: string | null | undefined;
973
+ password_hash?: string | null | undefined;
974
+ preferences?: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null | undefined;
975
+ role_ids?: string[] | undefined;
976
+ session_ids?: string[] | undefined;
977
+ verification_token_ids?: string[] | undefined;
978
+ }, {
979
+ updated_by?: string | undefined;
980
+ phone?: string | null | undefined;
981
+ email?: string | undefined;
982
+ permissions?: ({
983
+ scope: "agencies";
984
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
985
+ } | {
986
+ scope: "alerts_scheduled";
987
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
988
+ } | {
989
+ scope: "alerts_realtime";
990
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
991
+ resources?: {
992
+ agency_ids?: string[] | undefined;
993
+ } | undefined;
994
+ } | {
995
+ scope: "rides";
996
+ 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";
997
+ resources?: {
998
+ agency_ids?: string[] | undefined;
999
+ } | undefined;
1000
+ } | {
1001
+ scope: "sams";
1002
+ action: "read";
1003
+ } | {
1004
+ scope: "gtfs_validations";
1005
+ action: "create" | "read" | "request_approval";
1006
+ resources?: {
1007
+ agency_ids?: string[] | undefined;
1008
+ } | undefined;
1009
+ } | {
1010
+ scope: "home";
1011
+ action: "read_links" | "read_wiki";
1012
+ } | {
1013
+ scope: "organizations";
1014
+ action: "create" | "update" | "delete" | "read";
1015
+ } | {
1016
+ scope: "performance";
1017
+ action: "read";
1018
+ } | {
1019
+ scope: "plans";
1020
+ action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
1021
+ resources?: {
1022
+ agency_ids?: string[] | undefined;
1023
+ } | undefined;
1024
+ } | {
1025
+ scope: "roles";
1026
+ action: "create" | "update" | "delete" | "read";
1027
+ } | {
1028
+ scope: "stops";
1029
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
1030
+ resources?: {
1031
+ municipality_ids?: string[] | undefined;
1032
+ agency_ids?: string[] | undefined;
1033
+ } | undefined;
1034
+ } | {
1035
+ scope: "users";
1036
+ action: "create" | "update" | "delete" | "read";
1037
+ })[] | undefined;
1038
+ email_verified?: number | null | undefined;
1039
+ first_name?: string | undefined;
1040
+ last_name?: string | undefined;
1041
+ organization_id?: string | null | undefined;
1042
+ password_hash?: string | null | undefined;
1043
+ preferences?: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null | undefined;
1044
+ role_ids?: string[] | undefined;
1045
+ session_ids?: string[] | undefined;
1046
+ verification_token_ids?: string[] | undefined;
1047
+ }>;
1048
+ export type User = z.infer<typeof UserSchema>;
1049
+ export type CreateUserDto = z.infer<typeof CreateUserSchema>;
1050
+ export type UpdateUserDto = z.infer<typeof UpdateUserSchema>;
1051
+ export declare const UserDisplayFields: {
1052
+ readonly _id: true;
1053
+ readonly email: true;
1054
+ readonly first_name: true;
1055
+ readonly last_name: true;
1056
+ readonly phone: true;
1057
+ };
1058
+ export declare const UserDisplaySchema: z.ZodObject<Pick<{
1059
+ _id: z.ZodString;
1060
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
1061
+ created_by: z.ZodOptional<z.ZodString>;
1062
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
1063
+ updated_by: z.ZodOptional<z.ZodString>;
1064
+ } & {
1065
+ email: z.ZodString;
1066
+ email_verified: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
1067
+ first_name: z.ZodString;
1068
+ last_name: z.ZodString;
1069
+ organization_id: z.ZodNullable<z.ZodString>;
1070
+ password_hash: z.ZodNullable<z.ZodString>;
1071
+ permissions: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
1072
+ action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
1073
+ scope: z.ZodLiteral<"agencies">;
1074
+ }, "strip", z.ZodTypeAny, {
1075
+ scope: "agencies";
1076
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
1077
+ }, {
1078
+ scope: "agencies";
1079
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
1080
+ }>, z.ZodObject<{
1081
+ action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
1082
+ scope: z.ZodLiteral<"alerts_scheduled">;
1083
+ }, "strip", z.ZodTypeAny, {
1084
+ scope: "alerts_scheduled";
1085
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
1086
+ }, {
1087
+ scope: "alerts_scheduled";
1088
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
1089
+ }>, z.ZodObject<{
1090
+ action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
1091
+ resources: z.ZodDefault<z.ZodObject<{
1092
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1093
+ }, "strip", z.ZodTypeAny, {
1094
+ agency_ids: string[];
1095
+ }, {
1096
+ agency_ids?: string[] | undefined;
1097
+ }>>;
1098
+ scope: z.ZodLiteral<"alerts_realtime">;
1099
+ }, "strip", z.ZodTypeAny, {
1100
+ scope: "alerts_realtime";
1101
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
1102
+ resources: {
1103
+ agency_ids: string[];
1104
+ };
1105
+ }, {
1106
+ scope: "alerts_realtime";
1107
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
1108
+ resources?: {
1109
+ agency_ids?: string[] | undefined;
1110
+ } | undefined;
1111
+ }>, z.ZodObject<{
1112
+ 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"]>;
1113
+ resources: z.ZodDefault<z.ZodObject<{
1114
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1115
+ }, "strip", z.ZodTypeAny, {
1116
+ agency_ids: string[];
1117
+ }, {
1118
+ agency_ids?: string[] | undefined;
1119
+ }>>;
1120
+ scope: z.ZodLiteral<"rides">;
1121
+ }, "strip", z.ZodTypeAny, {
1122
+ scope: "rides";
1123
+ 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";
1124
+ resources: {
1125
+ agency_ids: string[];
1126
+ };
1127
+ }, {
1128
+ scope: "rides";
1129
+ 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";
1130
+ resources?: {
1131
+ agency_ids?: string[] | undefined;
1132
+ } | undefined;
1133
+ }>, z.ZodObject<{
1134
+ action: z.ZodEnum<["read"]>;
1135
+ scope: z.ZodLiteral<"sams">;
1136
+ }, "strip", z.ZodTypeAny, {
1137
+ scope: "sams";
1138
+ action: "read";
1139
+ }, {
1140
+ scope: "sams";
1141
+ action: "read";
1142
+ }>, z.ZodObject<{
1143
+ action: z.ZodEnum<["create", "read", "request_approval"]>;
1144
+ resources: z.ZodDefault<z.ZodObject<{
1145
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1146
+ }, "strip", z.ZodTypeAny, {
1147
+ agency_ids: string[];
1148
+ }, {
1149
+ agency_ids?: string[] | undefined;
1150
+ }>>;
1151
+ scope: z.ZodLiteral<"gtfs_validations">;
1152
+ }, "strip", z.ZodTypeAny, {
1153
+ scope: "gtfs_validations";
1154
+ action: "create" | "read" | "request_approval";
1155
+ resources: {
1156
+ agency_ids: string[];
1157
+ };
1158
+ }, {
1159
+ scope: "gtfs_validations";
1160
+ action: "create" | "read" | "request_approval";
1161
+ resources?: {
1162
+ agency_ids?: string[] | undefined;
1163
+ } | undefined;
1164
+ }>, z.ZodObject<{
1165
+ action: z.ZodEnum<["read_links", "read_wiki"]>;
1166
+ scope: z.ZodLiteral<"home">;
1167
+ }, "strip", z.ZodTypeAny, {
1168
+ scope: "home";
1169
+ action: "read_links" | "read_wiki";
1170
+ }, {
1171
+ scope: "home";
1172
+ action: "read_links" | "read_wiki";
1173
+ }>, z.ZodObject<{
1174
+ action: z.ZodEnum<["create", "delete", "read", "update"]>;
1175
+ scope: z.ZodLiteral<"organizations">;
1176
+ }, "strip", z.ZodTypeAny, {
1177
+ scope: "organizations";
1178
+ action: "create" | "update" | "delete" | "read";
1179
+ }, {
1180
+ scope: "organizations";
1181
+ action: "create" | "update" | "delete" | "read";
1182
+ }>, z.ZodObject<{
1183
+ action: z.ZodEnum<["read"]>;
1184
+ scope: z.ZodLiteral<"performance">;
1185
+ }, "strip", z.ZodTypeAny, {
1186
+ scope: "performance";
1187
+ action: "read";
1188
+ }, {
1189
+ scope: "performance";
1190
+ action: "read";
1191
+ }>, z.ZodObject<{
1192
+ action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "toggle_lock", "update", "update_controller", "update_feed_info_dates", "update_gtfs_plan", "update_pcgi_legacy"]>;
1193
+ resources: z.ZodDefault<z.ZodObject<{
1194
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1195
+ }, "strip", z.ZodTypeAny, {
1196
+ agency_ids: string[];
1197
+ }, {
1198
+ agency_ids?: string[] | undefined;
1199
+ }>>;
1200
+ scope: z.ZodLiteral<"plans">;
1201
+ }, "strip", z.ZodTypeAny, {
1202
+ scope: "plans";
1203
+ action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
1204
+ resources: {
1205
+ agency_ids: string[];
1206
+ };
1207
+ }, {
1208
+ scope: "plans";
1209
+ action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
1210
+ resources?: {
1211
+ agency_ids?: string[] | undefined;
1212
+ } | undefined;
1213
+ }>, z.ZodObject<{
1214
+ action: z.ZodEnum<["create", "delete", "read", "update"]>;
1215
+ scope: z.ZodLiteral<"roles">;
1216
+ }, "strip", z.ZodTypeAny, {
1217
+ scope: "roles";
1218
+ action: "create" | "update" | "delete" | "read";
1219
+ }, {
1220
+ scope: "roles";
1221
+ action: "create" | "update" | "delete" | "read";
1222
+ }>, z.ZodObject<{
1223
+ action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
1224
+ resources: z.ZodDefault<z.ZodObject<{
1225
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1226
+ municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1227
+ }, "strip", z.ZodTypeAny, {
1228
+ municipality_ids: string[];
1229
+ agency_ids: string[];
1230
+ }, {
1231
+ municipality_ids?: string[] | undefined;
1232
+ agency_ids?: string[] | undefined;
1233
+ }>>;
1234
+ scope: z.ZodLiteral<"stops">;
1235
+ }, "strip", z.ZodTypeAny, {
1236
+ scope: "stops";
1237
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
1238
+ resources: {
1239
+ municipality_ids: string[];
1240
+ agency_ids: string[];
1241
+ };
1242
+ }, {
1243
+ scope: "stops";
1244
+ action: "create" | "update" | "delete" | "read" | "toggle_lock";
1245
+ resources?: {
1246
+ municipality_ids?: string[] | undefined;
1247
+ agency_ids?: string[] | undefined;
1248
+ } | undefined;
1249
+ }>, z.ZodObject<{
1250
+ action: z.ZodEnum<["create", "delete", "read", "update"]>;
1251
+ scope: z.ZodLiteral<"users">;
1252
+ }, "strip", z.ZodTypeAny, {
1253
+ scope: "users";
1254
+ action: "create" | "update" | "delete" | "read";
1255
+ }, {
1256
+ scope: "users";
1257
+ action: "create" | "update" | "delete" | "read";
1258
+ }>]>, "many">>;
1259
+ phone: z.ZodNullable<z.ZodString>;
1260
+ preferences: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>>>>;
1261
+ role_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1262
+ session_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1263
+ verification_token_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1264
+ }, "_id" | "phone" | "email" | "first_name" | "last_name">, "strip", z.ZodTypeAny, {
1265
+ _id: string;
1266
+ phone: string | null;
1267
+ email: string;
1268
+ first_name: string;
1269
+ last_name: string;
1270
+ }, {
1271
+ _id: string;
1272
+ phone: string | null;
1273
+ email: string;
1274
+ first_name: string;
1275
+ last_name: string;
1276
+ }>;
1277
+ export type UserDisplay = z.infer<typeof UserDisplaySchema>;
1278
+ export type WithUser<T> = Omit<T, 'created_by' | 'updated_by'> & {
1279
+ created_by?: string | UserDisplay;
1280
+ updated_by?: string | UserDisplay;
1281
+ };