@tmlmobilidade/types 20251212.1456.57 → 20251218.110.37

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 (119) hide show
  1. package/dist/_common/comment.js +15 -6
  2. package/dist/_common/document.d.ts +3 -0
  3. package/dist/_common/document.js +4 -3
  4. package/dist/_common/status.d.ts +15 -1
  5. package/dist/_common/status.js +24 -6
  6. package/dist/_common/unix-timestamp.d.ts +1 -1
  7. package/dist/_common/unix-timestamp.js +1 -1
  8. package/dist/agency.d.ts +18 -13
  9. package/dist/agency.js +1 -1
  10. package/dist/alert.d.ts +101 -112
  11. package/dist/alert.js +18 -19
  12. package/dist/apex/simplified-apex-location.d.ts +5 -4
  13. package/dist/apex/simplified-apex-location.js +6 -4
  14. package/dist/apex/simplified-apex-on-board-refund.d.ts +5 -4
  15. package/dist/apex/simplified-apex-on-board-refund.js +6 -4
  16. package/dist/apex/simplified-apex-on-board-sale.d.ts +5 -4
  17. package/dist/apex/simplified-apex-on-board-sale.js +6 -4
  18. package/dist/apex/simplified-apex-validation.d.ts +9 -8
  19. package/dist/apex/simplified-apex-validation.js +6 -4
  20. package/dist/auth/login.d.ts +1 -1
  21. package/dist/auth/login.js +1 -1
  22. package/dist/auth/role.d.ts +260 -149
  23. package/dist/auth/role.js +1 -1
  24. package/dist/auth/session.d.ts +9 -7
  25. package/dist/auth/session.js +6 -4
  26. package/dist/auth/user.d.ts +737 -207
  27. package/dist/auth/user.js +12 -9
  28. package/dist/auth/verification-token.d.ts +9 -7
  29. package/dist/auth/verification-token.js +6 -4
  30. package/dist/dates/annotation.d.ts +94 -0
  31. package/dist/dates/annotation.js +14 -0
  32. package/dist/dates/index.d.ts +1 -0
  33. package/dist/dates/index.js +1 -0
  34. package/dist/file-exports/{common.d.ts → base.d.ts} +6 -5
  35. package/dist/file-exports/{common.js → base.js} +7 -4
  36. package/dist/file-exports/file-exports.d.ts +124 -0
  37. package/dist/file-exports/file-exports.js +7 -0
  38. package/dist/file-exports/index.d.ts +3 -126
  39. package/dist/file-exports/index.js +3 -9
  40. package/dist/file-exports/ride-export.d.ts +13 -13
  41. package/dist/file-exports/ride-export.js +5 -5
  42. package/dist/file.d.ts +3 -3
  43. package/dist/file.js +4 -2
  44. package/dist/index.d.ts +2 -1
  45. package/dist/index.js +2 -1
  46. package/dist/notification.d.ts +9 -7
  47. package/dist/notification.js +4 -2
  48. package/dist/organization.d.ts +24 -15
  49. package/dist/organization.js +3 -3
  50. package/dist/permissions/agencies.d.ts +3 -3
  51. package/dist/permissions/agencies.js +1 -1
  52. package/dist/permissions/alerts.d.ts +6 -6
  53. package/dist/permissions/alerts.js +2 -2
  54. package/dist/permissions/dates.d.ts +25 -0
  55. package/dist/permissions/dates.js +16 -0
  56. package/dist/permissions/gtfs-validations.d.ts +3 -3
  57. package/dist/permissions/gtfs-validations.js +1 -0
  58. package/dist/permissions/index.d.ts +49 -27
  59. package/dist/permissions/index.js +2 -0
  60. package/dist/permissions/organizations.d.ts +3 -3
  61. package/dist/permissions/organizations.js +1 -0
  62. package/dist/permissions/plans.d.ts +3 -3
  63. package/dist/permissions/plans.js +1 -1
  64. package/dist/permissions/roles.d.ts +3 -3
  65. package/dist/permissions/roles.js +1 -0
  66. package/dist/permissions/stops.d.ts +3 -3
  67. package/dist/permissions/stops.js +1 -1
  68. package/dist/permissions/users.d.ts +3 -3
  69. package/dist/permissions/users.js +1 -0
  70. package/dist/plans/gtfs-validation.d.ts +12 -3
  71. package/dist/plans/gtfs-validation.js +1 -1
  72. package/dist/plans/plan-app-status.js +2 -2
  73. package/dist/plans/plan-pcgi-legacy.d.ts +1 -1
  74. package/dist/plans/plan-pcgi-legacy.js +1 -1
  75. package/dist/plans/plan.d.ts +9 -9
  76. package/dist/proposed-change.d.ts +12 -3
  77. package/dist/proposed-change.js +1 -1
  78. package/dist/rides/ride-acceptance.d.ts +23 -19
  79. package/dist/rides/ride-acceptance.js +5 -3
  80. package/dist/rides/ride-analysis.d.ts +16 -16
  81. package/dist/rides/ride-analysis.js +16 -16
  82. package/dist/rides/ride-audit.d.ts +11 -11
  83. package/dist/rides/ride-audit.js +1 -1
  84. package/dist/rides/ride-overrides.d.ts +1 -1
  85. package/dist/rides/ride-overrides.js +1 -1
  86. package/dist/rides/ride.d.ts +56 -55
  87. package/dist/rides/ride.js +10 -8
  88. package/dist/sams/sam-analysis.d.ts +1 -1
  89. package/dist/sams/sam-analysis.js +4 -4
  90. package/dist/sams/sam.d.ts +13 -13
  91. package/dist/sams/sam.js +7 -5
  92. package/dist/stops/connections.d.ts +3 -0
  93. package/dist/stops/connections.js +15 -0
  94. package/dist/stops/equipment.d.ts +3 -0
  95. package/dist/stops/equipment.js +9 -0
  96. package/dist/stops/facilities.d.ts +4 -0
  97. package/dist/stops/facilities.js +16 -0
  98. package/dist/stops/index.d.ts +9 -0
  99. package/dist/stops/index.js +9 -0
  100. package/dist/stops/jurisdiction.d.ts +4 -0
  101. package/dist/stops/jurisdiction.js +10 -0
  102. package/dist/stops/name-abbreviations.d.ts +11 -0
  103. package/dist/stops/name-abbreviations.js +117 -0
  104. package/dist/stops/parent-station.d.ts +76 -0
  105. package/dist/stops/parent-station.js +11 -0
  106. package/dist/stops/road-type.d.ts +3 -0
  107. package/dist/stops/road-type.js +13 -0
  108. package/dist/stops/stop-area.d.ts +67 -0
  109. package/dist/stops/stop-area.js +10 -0
  110. package/dist/{stop.d.ts → stops/stop.d.ts} +271 -345
  111. package/dist/stops/stop.js +78 -0
  112. package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.d.ts +1 -21
  113. package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.js +4 -5
  114. package/dist/vehicle-events/simplified-vehicle-event.d.ts +4 -3
  115. package/dist/vehicle-events/simplified-vehicle-event.js +6 -4
  116. package/dist/zone.d.ts +10 -10
  117. package/dist/zone.js +1 -1
  118. package/package.json +2 -2
  119. package/dist/stop.js +0 -102
@@ -3,30 +3,31 @@ export declare const RoleSchema: z.ZodObject<{
3
3
  _id: z.ZodString;
4
4
  created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
5
5
  created_by: z.ZodOptional<z.ZodString>;
6
+ is_locked: z.ZodDefault<z.ZodBoolean>;
6
7
  updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
7
8
  updated_by: z.ZodOptional<z.ZodString>;
8
9
  } & {
9
10
  name: z.ZodString;
10
- permissions: z.ZodArray<z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
11
- action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
11
+ permissions: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
12
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
12
13
  scope: z.ZodLiteral<"agencies">;
13
14
  }, "strip", z.ZodTypeAny, {
14
15
  scope: "agencies";
15
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
16
+ action: "create" | "update" | "delete" | "read" | "lock";
16
17
  }, {
17
18
  scope: "agencies";
18
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
19
+ action: "create" | "update" | "delete" | "read" | "lock";
19
20
  }>, z.ZodObject<{
20
- action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
21
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
21
22
  scope: z.ZodLiteral<"alerts_scheduled">;
22
23
  }, "strip", z.ZodTypeAny, {
23
24
  scope: "alerts_scheduled";
24
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
25
+ action: "create" | "update" | "delete" | "read" | "lock";
25
26
  }, {
26
27
  scope: "alerts_scheduled";
27
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
28
+ action: "create" | "update" | "delete" | "read" | "lock";
28
29
  }>, z.ZodObject<{
29
- action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
30
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
30
31
  resources: z.ZodDefault<z.ZodObject<{
31
32
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
32
33
  }, "strip", z.ZodTypeAny, {
@@ -37,13 +38,13 @@ export declare const RoleSchema: z.ZodObject<{
37
38
  scope: z.ZodLiteral<"alerts_realtime">;
38
39
  }, "strip", z.ZodTypeAny, {
39
40
  scope: "alerts_realtime";
40
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
41
+ action: "create" | "update" | "delete" | "read" | "lock";
41
42
  resources: {
42
43
  agency_ids: string[];
43
44
  };
44
45
  }, {
45
46
  scope: "alerts_realtime";
46
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
47
+ action: "create" | "update" | "delete" | "read" | "lock";
47
48
  resources?: {
48
49
  agency_ids?: string[] | undefined;
49
50
  } | undefined;
@@ -79,7 +80,7 @@ export declare const RoleSchema: z.ZodObject<{
79
80
  scope: "sams";
80
81
  action: "read";
81
82
  }>, z.ZodObject<{
82
- action: z.ZodEnum<["create", "read", "request_approval"]>;
83
+ action: z.ZodEnum<["create", "read", "lock", "request_approval"]>;
83
84
  resources: z.ZodDefault<z.ZodObject<{
84
85
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
85
86
  }, "strip", z.ZodTypeAny, {
@@ -90,13 +91,13 @@ export declare const RoleSchema: z.ZodObject<{
90
91
  scope: z.ZodLiteral<"gtfs_validations">;
91
92
  }, "strip", z.ZodTypeAny, {
92
93
  scope: "gtfs_validations";
93
- action: "create" | "read" | "request_approval";
94
+ action: "create" | "read" | "lock" | "request_approval";
94
95
  resources: {
95
96
  agency_ids: string[];
96
97
  };
97
98
  }, {
98
99
  scope: "gtfs_validations";
99
- action: "create" | "read" | "request_approval";
100
+ action: "create" | "read" | "lock" | "request_approval";
100
101
  resources?: {
101
102
  agency_ids?: string[] | undefined;
102
103
  } | undefined;
@@ -110,14 +111,14 @@ export declare const RoleSchema: z.ZodObject<{
110
111
  scope: "home";
111
112
  action: "read_links" | "read_wiki";
112
113
  }>, z.ZodObject<{
113
- action: z.ZodEnum<["create", "delete", "read", "update"]>;
114
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
114
115
  scope: z.ZodLiteral<"organizations">;
115
116
  }, "strip", z.ZodTypeAny, {
116
117
  scope: "organizations";
117
- action: "create" | "update" | "delete" | "read";
118
+ action: "create" | "update" | "delete" | "read" | "lock";
118
119
  }, {
119
120
  scope: "organizations";
120
- action: "create" | "update" | "delete" | "read";
121
+ action: "create" | "update" | "delete" | "read" | "lock";
121
122
  }>, z.ZodObject<{
122
123
  action: z.ZodEnum<["read"]>;
123
124
  scope: z.ZodLiteral<"performance">;
@@ -128,7 +129,7 @@ export declare const RoleSchema: z.ZodObject<{
128
129
  scope: "performance";
129
130
  action: "read";
130
131
  }>, z.ZodObject<{
131
- 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"]>;
132
+ action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "lock", "update", "update_controller", "update_feed_info_dates", "update_gtfs_plan", "update_pcgi_legacy"]>;
132
133
  resources: z.ZodDefault<z.ZodObject<{
133
134
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
134
135
  }, "strip", z.ZodTypeAny, {
@@ -139,27 +140,27 @@ export declare const RoleSchema: z.ZodObject<{
139
140
  scope: z.ZodLiteral<"plans">;
140
141
  }, "strip", z.ZodTypeAny, {
141
142
  scope: "plans";
142
- action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
143
+ action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
143
144
  resources: {
144
145
  agency_ids: string[];
145
146
  };
146
147
  }, {
147
148
  scope: "plans";
148
- action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
149
+ action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
149
150
  resources?: {
150
151
  agency_ids?: string[] | undefined;
151
152
  } | undefined;
152
153
  }>, z.ZodObject<{
153
- action: z.ZodEnum<["create", "delete", "read", "update"]>;
154
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
154
155
  scope: z.ZodLiteral<"roles">;
155
156
  }, "strip", z.ZodTypeAny, {
156
157
  scope: "roles";
157
- action: "create" | "update" | "delete" | "read";
158
+ action: "create" | "update" | "delete" | "read" | "lock";
158
159
  }, {
159
160
  scope: "roles";
160
- action: "create" | "update" | "delete" | "read";
161
+ action: "create" | "update" | "delete" | "read" | "lock";
161
162
  }>, z.ZodObject<{
162
- action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
163
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
163
164
  resources: z.ZodDefault<z.ZodObject<{
164
165
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
165
166
  municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -173,46 +174,69 @@ export declare const RoleSchema: z.ZodObject<{
173
174
  scope: z.ZodLiteral<"stops">;
174
175
  }, "strip", z.ZodTypeAny, {
175
176
  scope: "stops";
176
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
177
+ action: "create" | "update" | "delete" | "read" | "lock";
177
178
  resources: {
178
179
  municipality_ids: string[];
179
180
  agency_ids: string[];
180
181
  };
181
182
  }, {
182
183
  scope: "stops";
183
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
184
+ action: "create" | "update" | "delete" | "read" | "lock";
184
185
  resources?: {
185
186
  municipality_ids?: string[] | undefined;
186
187
  agency_ids?: string[] | undefined;
187
188
  } | undefined;
188
189
  }>, z.ZodObject<{
189
- action: z.ZodEnum<["create", "delete", "read", "update"]>;
190
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
190
191
  scope: z.ZodLiteral<"users">;
191
192
  }, "strip", z.ZodTypeAny, {
192
193
  scope: "users";
193
- action: "create" | "update" | "delete" | "read";
194
+ action: "create" | "update" | "delete" | "read" | "lock";
194
195
  }, {
195
196
  scope: "users";
196
- action: "create" | "update" | "delete" | "read";
197
- }>]>, "many">;
197
+ action: "create" | "update" | "delete" | "read" | "lock";
198
+ }>, z.ZodObject<{
199
+ action: z.ZodEnum<["create_annotations", "delete_annotations", "read_annotations", "update_annotations", "lock_annotations"]>;
200
+ resources: z.ZodDefault<z.ZodObject<{
201
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
202
+ }, "strip", z.ZodTypeAny, {
203
+ agency_ids: string[];
204
+ }, {
205
+ agency_ids?: string[] | undefined;
206
+ }>>;
207
+ scope: z.ZodLiteral<"dates">;
208
+ }, "strip", z.ZodTypeAny, {
209
+ scope: "dates";
210
+ action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
211
+ resources: {
212
+ agency_ids: string[];
213
+ };
214
+ }, {
215
+ scope: "dates";
216
+ action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
217
+ resources?: {
218
+ agency_ids?: string[] | undefined;
219
+ } | undefined;
220
+ }>]>, "many">>;
198
221
  }, "strip", z.ZodTypeAny, {
199
222
  _id: string;
200
223
  created_at: number & {
201
224
  __brand: "UnixTimestamp";
202
225
  };
226
+ is_locked: boolean;
203
227
  updated_at: number & {
204
228
  __brand: "UnixTimestamp";
205
229
  };
206
230
  name: string;
207
231
  permissions: ({
208
232
  scope: "agencies";
209
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
233
+ action: "create" | "update" | "delete" | "read" | "lock";
210
234
  } | {
211
235
  scope: "alerts_scheduled";
212
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
236
+ action: "create" | "update" | "delete" | "read" | "lock";
213
237
  } | {
214
238
  scope: "alerts_realtime";
215
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
239
+ action: "create" | "update" | "delete" | "read" | "lock";
216
240
  resources: {
217
241
  agency_ids: string[];
218
242
  };
@@ -225,9 +249,15 @@ export declare const RoleSchema: z.ZodObject<{
225
249
  } | {
226
250
  scope: "sams";
227
251
  action: "read";
252
+ } | {
253
+ scope: "dates";
254
+ action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
255
+ resources: {
256
+ agency_ids: string[];
257
+ };
228
258
  } | {
229
259
  scope: "gtfs_validations";
230
- action: "create" | "read" | "request_approval";
260
+ action: "create" | "read" | "lock" | "request_approval";
231
261
  resources: {
232
262
  agency_ids: string[];
233
263
  };
@@ -236,29 +266,29 @@ export declare const RoleSchema: z.ZodObject<{
236
266
  action: "read_links" | "read_wiki";
237
267
  } | {
238
268
  scope: "organizations";
239
- action: "create" | "update" | "delete" | "read";
269
+ action: "create" | "update" | "delete" | "read" | "lock";
240
270
  } | {
241
271
  scope: "performance";
242
272
  action: "read";
243
273
  } | {
244
274
  scope: "plans";
245
- action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
275
+ action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
246
276
  resources: {
247
277
  agency_ids: string[];
248
278
  };
249
279
  } | {
250
280
  scope: "roles";
251
- action: "create" | "update" | "delete" | "read";
281
+ action: "create" | "update" | "delete" | "read" | "lock";
252
282
  } | {
253
283
  scope: "stops";
254
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
284
+ action: "create" | "update" | "delete" | "read" | "lock";
255
285
  resources: {
256
286
  municipality_ids: string[];
257
287
  agency_ids: string[];
258
288
  };
259
289
  } | {
260
290
  scope: "users";
261
- action: "create" | "update" | "delete" | "read";
291
+ action: "create" | "update" | "delete" | "read" | "lock";
262
292
  })[];
263
293
  created_by?: string | undefined;
264
294
  updated_by?: string | undefined;
@@ -267,15 +297,18 @@ export declare const RoleSchema: z.ZodObject<{
267
297
  created_at: number;
268
298
  updated_at: number;
269
299
  name: string;
270
- permissions: ({
300
+ created_by?: string | undefined;
301
+ is_locked?: boolean | undefined;
302
+ updated_by?: string | undefined;
303
+ permissions?: ({
271
304
  scope: "agencies";
272
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
305
+ action: "create" | "update" | "delete" | "read" | "lock";
273
306
  } | {
274
307
  scope: "alerts_scheduled";
275
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
308
+ action: "create" | "update" | "delete" | "read" | "lock";
276
309
  } | {
277
310
  scope: "alerts_realtime";
278
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
311
+ action: "create" | "update" | "delete" | "read" | "lock";
279
312
  resources?: {
280
313
  agency_ids?: string[] | undefined;
281
314
  } | undefined;
@@ -288,9 +321,15 @@ export declare const RoleSchema: z.ZodObject<{
288
321
  } | {
289
322
  scope: "sams";
290
323
  action: "read";
324
+ } | {
325
+ scope: "dates";
326
+ action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
327
+ resources?: {
328
+ agency_ids?: string[] | undefined;
329
+ } | undefined;
291
330
  } | {
292
331
  scope: "gtfs_validations";
293
- action: "create" | "read" | "request_approval";
332
+ action: "create" | "read" | "lock" | "request_approval";
294
333
  resources?: {
295
334
  agency_ids?: string[] | undefined;
296
335
  } | undefined;
@@ -299,61 +338,60 @@ export declare const RoleSchema: z.ZodObject<{
299
338
  action: "read_links" | "read_wiki";
300
339
  } | {
301
340
  scope: "organizations";
302
- action: "create" | "update" | "delete" | "read";
341
+ action: "create" | "update" | "delete" | "read" | "lock";
303
342
  } | {
304
343
  scope: "performance";
305
344
  action: "read";
306
345
  } | {
307
346
  scope: "plans";
308
- action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
347
+ action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
309
348
  resources?: {
310
349
  agency_ids?: string[] | undefined;
311
350
  } | undefined;
312
351
  } | {
313
352
  scope: "roles";
314
- action: "create" | "update" | "delete" | "read";
353
+ action: "create" | "update" | "delete" | "read" | "lock";
315
354
  } | {
316
355
  scope: "stops";
317
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
356
+ action: "create" | "update" | "delete" | "read" | "lock";
318
357
  resources?: {
319
358
  municipality_ids?: string[] | undefined;
320
359
  agency_ids?: string[] | undefined;
321
360
  } | undefined;
322
361
  } | {
323
362
  scope: "users";
324
- action: "create" | "update" | "delete" | "read";
325
- })[];
326
- created_by?: string | undefined;
327
- updated_by?: string | undefined;
363
+ action: "create" | "update" | "delete" | "read" | "lock";
364
+ })[] | undefined;
328
365
  }>;
329
366
  export declare const CreateRoleSchema: z.ZodObject<Omit<{
330
367
  _id: z.ZodString;
331
368
  created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
332
369
  created_by: z.ZodOptional<z.ZodString>;
370
+ is_locked: z.ZodDefault<z.ZodBoolean>;
333
371
  updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
334
372
  updated_by: z.ZodOptional<z.ZodString>;
335
373
  } & {
336
374
  name: z.ZodString;
337
- permissions: z.ZodArray<z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
338
- action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
375
+ permissions: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
376
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
339
377
  scope: z.ZodLiteral<"agencies">;
340
378
  }, "strip", z.ZodTypeAny, {
341
379
  scope: "agencies";
342
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
380
+ action: "create" | "update" | "delete" | "read" | "lock";
343
381
  }, {
344
382
  scope: "agencies";
345
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
383
+ action: "create" | "update" | "delete" | "read" | "lock";
346
384
  }>, z.ZodObject<{
347
- action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
385
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
348
386
  scope: z.ZodLiteral<"alerts_scheduled">;
349
387
  }, "strip", z.ZodTypeAny, {
350
388
  scope: "alerts_scheduled";
351
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
389
+ action: "create" | "update" | "delete" | "read" | "lock";
352
390
  }, {
353
391
  scope: "alerts_scheduled";
354
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
392
+ action: "create" | "update" | "delete" | "read" | "lock";
355
393
  }>, z.ZodObject<{
356
- action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
394
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
357
395
  resources: z.ZodDefault<z.ZodObject<{
358
396
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
359
397
  }, "strip", z.ZodTypeAny, {
@@ -364,13 +402,13 @@ export declare const CreateRoleSchema: z.ZodObject<Omit<{
364
402
  scope: z.ZodLiteral<"alerts_realtime">;
365
403
  }, "strip", z.ZodTypeAny, {
366
404
  scope: "alerts_realtime";
367
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
405
+ action: "create" | "update" | "delete" | "read" | "lock";
368
406
  resources: {
369
407
  agency_ids: string[];
370
408
  };
371
409
  }, {
372
410
  scope: "alerts_realtime";
373
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
411
+ action: "create" | "update" | "delete" | "read" | "lock";
374
412
  resources?: {
375
413
  agency_ids?: string[] | undefined;
376
414
  } | undefined;
@@ -406,7 +444,7 @@ export declare const CreateRoleSchema: z.ZodObject<Omit<{
406
444
  scope: "sams";
407
445
  action: "read";
408
446
  }>, z.ZodObject<{
409
- action: z.ZodEnum<["create", "read", "request_approval"]>;
447
+ action: z.ZodEnum<["create", "read", "lock", "request_approval"]>;
410
448
  resources: z.ZodDefault<z.ZodObject<{
411
449
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
412
450
  }, "strip", z.ZodTypeAny, {
@@ -417,13 +455,13 @@ export declare const CreateRoleSchema: z.ZodObject<Omit<{
417
455
  scope: z.ZodLiteral<"gtfs_validations">;
418
456
  }, "strip", z.ZodTypeAny, {
419
457
  scope: "gtfs_validations";
420
- action: "create" | "read" | "request_approval";
458
+ action: "create" | "read" | "lock" | "request_approval";
421
459
  resources: {
422
460
  agency_ids: string[];
423
461
  };
424
462
  }, {
425
463
  scope: "gtfs_validations";
426
- action: "create" | "read" | "request_approval";
464
+ action: "create" | "read" | "lock" | "request_approval";
427
465
  resources?: {
428
466
  agency_ids?: string[] | undefined;
429
467
  } | undefined;
@@ -437,14 +475,14 @@ export declare const CreateRoleSchema: z.ZodObject<Omit<{
437
475
  scope: "home";
438
476
  action: "read_links" | "read_wiki";
439
477
  }>, z.ZodObject<{
440
- action: z.ZodEnum<["create", "delete", "read", "update"]>;
478
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
441
479
  scope: z.ZodLiteral<"organizations">;
442
480
  }, "strip", z.ZodTypeAny, {
443
481
  scope: "organizations";
444
- action: "create" | "update" | "delete" | "read";
482
+ action: "create" | "update" | "delete" | "read" | "lock";
445
483
  }, {
446
484
  scope: "organizations";
447
- action: "create" | "update" | "delete" | "read";
485
+ action: "create" | "update" | "delete" | "read" | "lock";
448
486
  }>, z.ZodObject<{
449
487
  action: z.ZodEnum<["read"]>;
450
488
  scope: z.ZodLiteral<"performance">;
@@ -455,7 +493,7 @@ export declare const CreateRoleSchema: z.ZodObject<Omit<{
455
493
  scope: "performance";
456
494
  action: "read";
457
495
  }>, z.ZodObject<{
458
- 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
+ action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "lock", "update", "update_controller", "update_feed_info_dates", "update_gtfs_plan", "update_pcgi_legacy"]>;
459
497
  resources: z.ZodDefault<z.ZodObject<{
460
498
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
461
499
  }, "strip", z.ZodTypeAny, {
@@ -466,27 +504,27 @@ export declare const CreateRoleSchema: z.ZodObject<Omit<{
466
504
  scope: z.ZodLiteral<"plans">;
467
505
  }, "strip", z.ZodTypeAny, {
468
506
  scope: "plans";
469
- 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
+ action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
470
508
  resources: {
471
509
  agency_ids: string[];
472
510
  };
473
511
  }, {
474
512
  scope: "plans";
475
- 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
+ action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
476
514
  resources?: {
477
515
  agency_ids?: string[] | undefined;
478
516
  } | undefined;
479
517
  }>, z.ZodObject<{
480
- action: z.ZodEnum<["create", "delete", "read", "update"]>;
518
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
481
519
  scope: z.ZodLiteral<"roles">;
482
520
  }, "strip", z.ZodTypeAny, {
483
521
  scope: "roles";
484
- action: "create" | "update" | "delete" | "read";
522
+ action: "create" | "update" | "delete" | "read" | "lock";
485
523
  }, {
486
524
  scope: "roles";
487
- action: "create" | "update" | "delete" | "read";
525
+ action: "create" | "update" | "delete" | "read" | "lock";
488
526
  }>, z.ZodObject<{
489
- action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
527
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
490
528
  resources: z.ZodDefault<z.ZodObject<{
491
529
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
492
530
  municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -500,39 +538,62 @@ export declare const CreateRoleSchema: z.ZodObject<Omit<{
500
538
  scope: z.ZodLiteral<"stops">;
501
539
  }, "strip", z.ZodTypeAny, {
502
540
  scope: "stops";
503
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
541
+ action: "create" | "update" | "delete" | "read" | "lock";
504
542
  resources: {
505
543
  municipality_ids: string[];
506
544
  agency_ids: string[];
507
545
  };
508
546
  }, {
509
547
  scope: "stops";
510
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
548
+ action: "create" | "update" | "delete" | "read" | "lock";
511
549
  resources?: {
512
550
  municipality_ids?: string[] | undefined;
513
551
  agency_ids?: string[] | undefined;
514
552
  } | undefined;
515
553
  }>, z.ZodObject<{
516
- action: z.ZodEnum<["create", "delete", "read", "update"]>;
554
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
517
555
  scope: z.ZodLiteral<"users">;
518
556
  }, "strip", z.ZodTypeAny, {
519
557
  scope: "users";
520
- action: "create" | "update" | "delete" | "read";
558
+ action: "create" | "update" | "delete" | "read" | "lock";
521
559
  }, {
522
560
  scope: "users";
523
- action: "create" | "update" | "delete" | "read";
524
- }>]>, "many">;
561
+ action: "create" | "update" | "delete" | "read" | "lock";
562
+ }>, z.ZodObject<{
563
+ action: z.ZodEnum<["create_annotations", "delete_annotations", "read_annotations", "update_annotations", "lock_annotations"]>;
564
+ resources: z.ZodDefault<z.ZodObject<{
565
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
566
+ }, "strip", z.ZodTypeAny, {
567
+ agency_ids: string[];
568
+ }, {
569
+ agency_ids?: string[] | undefined;
570
+ }>>;
571
+ scope: z.ZodLiteral<"dates">;
572
+ }, "strip", z.ZodTypeAny, {
573
+ scope: "dates";
574
+ action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
575
+ resources: {
576
+ agency_ids: string[];
577
+ };
578
+ }, {
579
+ scope: "dates";
580
+ action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
581
+ resources?: {
582
+ agency_ids?: string[] | undefined;
583
+ } | undefined;
584
+ }>]>, "many">>;
525
585
  }, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
586
+ is_locked: boolean;
526
587
  name: string;
527
588
  permissions: ({
528
589
  scope: "agencies";
529
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
590
+ action: "create" | "update" | "delete" | "read" | "lock";
530
591
  } | {
531
592
  scope: "alerts_scheduled";
532
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
593
+ action: "create" | "update" | "delete" | "read" | "lock";
533
594
  } | {
534
595
  scope: "alerts_realtime";
535
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
596
+ action: "create" | "update" | "delete" | "read" | "lock";
536
597
  resources: {
537
598
  agency_ids: string[];
538
599
  };
@@ -545,9 +606,15 @@ export declare const CreateRoleSchema: z.ZodObject<Omit<{
545
606
  } | {
546
607
  scope: "sams";
547
608
  action: "read";
609
+ } | {
610
+ scope: "dates";
611
+ action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
612
+ resources: {
613
+ agency_ids: string[];
614
+ };
548
615
  } | {
549
616
  scope: "gtfs_validations";
550
- action: "create" | "read" | "request_approval";
617
+ action: "create" | "read" | "lock" | "request_approval";
551
618
  resources: {
552
619
  agency_ids: string[];
553
620
  };
@@ -556,43 +623,46 @@ export declare const CreateRoleSchema: z.ZodObject<Omit<{
556
623
  action: "read_links" | "read_wiki";
557
624
  } | {
558
625
  scope: "organizations";
559
- action: "create" | "update" | "delete" | "read";
626
+ action: "create" | "update" | "delete" | "read" | "lock";
560
627
  } | {
561
628
  scope: "performance";
562
629
  action: "read";
563
630
  } | {
564
631
  scope: "plans";
565
- action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
632
+ action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
566
633
  resources: {
567
634
  agency_ids: string[];
568
635
  };
569
636
  } | {
570
637
  scope: "roles";
571
- action: "create" | "update" | "delete" | "read";
638
+ action: "create" | "update" | "delete" | "read" | "lock";
572
639
  } | {
573
640
  scope: "stops";
574
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
641
+ action: "create" | "update" | "delete" | "read" | "lock";
575
642
  resources: {
576
643
  municipality_ids: string[];
577
644
  agency_ids: string[];
578
645
  };
579
646
  } | {
580
647
  scope: "users";
581
- action: "create" | "update" | "delete" | "read";
648
+ action: "create" | "update" | "delete" | "read" | "lock";
582
649
  })[];
583
650
  created_by?: string | undefined;
584
651
  updated_by?: string | undefined;
585
652
  }, {
586
653
  name: string;
587
- permissions: ({
654
+ created_by?: string | undefined;
655
+ is_locked?: boolean | undefined;
656
+ updated_by?: string | undefined;
657
+ permissions?: ({
588
658
  scope: "agencies";
589
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
659
+ action: "create" | "update" | "delete" | "read" | "lock";
590
660
  } | {
591
661
  scope: "alerts_scheduled";
592
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
662
+ action: "create" | "update" | "delete" | "read" | "lock";
593
663
  } | {
594
664
  scope: "alerts_realtime";
595
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
665
+ action: "create" | "update" | "delete" | "read" | "lock";
596
666
  resources?: {
597
667
  agency_ids?: string[] | undefined;
598
668
  } | undefined;
@@ -605,9 +675,15 @@ export declare const CreateRoleSchema: z.ZodObject<Omit<{
605
675
  } | {
606
676
  scope: "sams";
607
677
  action: "read";
678
+ } | {
679
+ scope: "dates";
680
+ action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
681
+ resources?: {
682
+ agency_ids?: string[] | undefined;
683
+ } | undefined;
608
684
  } | {
609
685
  scope: "gtfs_validations";
610
- action: "create" | "read" | "request_approval";
686
+ action: "create" | "read" | "lock" | "request_approval";
611
687
  resources?: {
612
688
  agency_ids?: string[] | undefined;
613
689
  } | undefined;
@@ -616,56 +692,55 @@ export declare const CreateRoleSchema: z.ZodObject<Omit<{
616
692
  action: "read_links" | "read_wiki";
617
693
  } | {
618
694
  scope: "organizations";
619
- action: "create" | "update" | "delete" | "read";
695
+ action: "create" | "update" | "delete" | "read" | "lock";
620
696
  } | {
621
697
  scope: "performance";
622
698
  action: "read";
623
699
  } | {
624
700
  scope: "plans";
625
- action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
701
+ action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
626
702
  resources?: {
627
703
  agency_ids?: string[] | undefined;
628
704
  } | undefined;
629
705
  } | {
630
706
  scope: "roles";
631
- action: "create" | "update" | "delete" | "read";
707
+ action: "create" | "update" | "delete" | "read" | "lock";
632
708
  } | {
633
709
  scope: "stops";
634
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
710
+ action: "create" | "update" | "delete" | "read" | "lock";
635
711
  resources?: {
636
712
  municipality_ids?: string[] | undefined;
637
713
  agency_ids?: string[] | undefined;
638
714
  } | undefined;
639
715
  } | {
640
716
  scope: "users";
641
- action: "create" | "update" | "delete" | "read";
642
- })[];
643
- created_by?: string | undefined;
644
- updated_by?: string | undefined;
717
+ action: "create" | "update" | "delete" | "read" | "lock";
718
+ })[] | undefined;
645
719
  }>;
646
720
  export declare const UpdateRoleSchema: z.ZodObject<{
721
+ is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
647
722
  updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
648
723
  name: z.ZodOptional<z.ZodString>;
649
- permissions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
650
- action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
724
+ permissions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
725
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
651
726
  scope: z.ZodLiteral<"agencies">;
652
727
  }, "strip", z.ZodTypeAny, {
653
728
  scope: "agencies";
654
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
729
+ action: "create" | "update" | "delete" | "read" | "lock";
655
730
  }, {
656
731
  scope: "agencies";
657
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
732
+ action: "create" | "update" | "delete" | "read" | "lock";
658
733
  }>, z.ZodObject<{
659
- action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
734
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
660
735
  scope: z.ZodLiteral<"alerts_scheduled">;
661
736
  }, "strip", z.ZodTypeAny, {
662
737
  scope: "alerts_scheduled";
663
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
738
+ action: "create" | "update" | "delete" | "read" | "lock";
664
739
  }, {
665
740
  scope: "alerts_scheduled";
666
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
741
+ action: "create" | "update" | "delete" | "read" | "lock";
667
742
  }>, z.ZodObject<{
668
- action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
743
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
669
744
  resources: z.ZodDefault<z.ZodObject<{
670
745
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
671
746
  }, "strip", z.ZodTypeAny, {
@@ -676,13 +751,13 @@ export declare const UpdateRoleSchema: z.ZodObject<{
676
751
  scope: z.ZodLiteral<"alerts_realtime">;
677
752
  }, "strip", z.ZodTypeAny, {
678
753
  scope: "alerts_realtime";
679
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
754
+ action: "create" | "update" | "delete" | "read" | "lock";
680
755
  resources: {
681
756
  agency_ids: string[];
682
757
  };
683
758
  }, {
684
759
  scope: "alerts_realtime";
685
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
760
+ action: "create" | "update" | "delete" | "read" | "lock";
686
761
  resources?: {
687
762
  agency_ids?: string[] | undefined;
688
763
  } | undefined;
@@ -718,7 +793,7 @@ export declare const UpdateRoleSchema: z.ZodObject<{
718
793
  scope: "sams";
719
794
  action: "read";
720
795
  }>, z.ZodObject<{
721
- action: z.ZodEnum<["create", "read", "request_approval"]>;
796
+ action: z.ZodEnum<["create", "read", "lock", "request_approval"]>;
722
797
  resources: z.ZodDefault<z.ZodObject<{
723
798
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
724
799
  }, "strip", z.ZodTypeAny, {
@@ -729,13 +804,13 @@ export declare const UpdateRoleSchema: z.ZodObject<{
729
804
  scope: z.ZodLiteral<"gtfs_validations">;
730
805
  }, "strip", z.ZodTypeAny, {
731
806
  scope: "gtfs_validations";
732
- action: "create" | "read" | "request_approval";
807
+ action: "create" | "read" | "lock" | "request_approval";
733
808
  resources: {
734
809
  agency_ids: string[];
735
810
  };
736
811
  }, {
737
812
  scope: "gtfs_validations";
738
- action: "create" | "read" | "request_approval";
813
+ action: "create" | "read" | "lock" | "request_approval";
739
814
  resources?: {
740
815
  agency_ids?: string[] | undefined;
741
816
  } | undefined;
@@ -749,14 +824,14 @@ export declare const UpdateRoleSchema: z.ZodObject<{
749
824
  scope: "home";
750
825
  action: "read_links" | "read_wiki";
751
826
  }>, z.ZodObject<{
752
- action: z.ZodEnum<["create", "delete", "read", "update"]>;
827
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
753
828
  scope: z.ZodLiteral<"organizations">;
754
829
  }, "strip", z.ZodTypeAny, {
755
830
  scope: "organizations";
756
- action: "create" | "update" | "delete" | "read";
831
+ action: "create" | "update" | "delete" | "read" | "lock";
757
832
  }, {
758
833
  scope: "organizations";
759
- action: "create" | "update" | "delete" | "read";
834
+ action: "create" | "update" | "delete" | "read" | "lock";
760
835
  }>, z.ZodObject<{
761
836
  action: z.ZodEnum<["read"]>;
762
837
  scope: z.ZodLiteral<"performance">;
@@ -767,7 +842,7 @@ export declare const UpdateRoleSchema: z.ZodObject<{
767
842
  scope: "performance";
768
843
  action: "read";
769
844
  }>, z.ZodObject<{
770
- 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"]>;
845
+ action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "lock", "update", "update_controller", "update_feed_info_dates", "update_gtfs_plan", "update_pcgi_legacy"]>;
771
846
  resources: z.ZodDefault<z.ZodObject<{
772
847
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
773
848
  }, "strip", z.ZodTypeAny, {
@@ -778,27 +853,27 @@ export declare const UpdateRoleSchema: z.ZodObject<{
778
853
  scope: z.ZodLiteral<"plans">;
779
854
  }, "strip", z.ZodTypeAny, {
780
855
  scope: "plans";
781
- action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
856
+ action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
782
857
  resources: {
783
858
  agency_ids: string[];
784
859
  };
785
860
  }, {
786
861
  scope: "plans";
787
- action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
862
+ action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
788
863
  resources?: {
789
864
  agency_ids?: string[] | undefined;
790
865
  } | undefined;
791
866
  }>, z.ZodObject<{
792
- action: z.ZodEnum<["create", "delete", "read", "update"]>;
867
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
793
868
  scope: z.ZodLiteral<"roles">;
794
869
  }, "strip", z.ZodTypeAny, {
795
870
  scope: "roles";
796
- action: "create" | "update" | "delete" | "read";
871
+ action: "create" | "update" | "delete" | "read" | "lock";
797
872
  }, {
798
873
  scope: "roles";
799
- action: "create" | "update" | "delete" | "read";
874
+ action: "create" | "update" | "delete" | "read" | "lock";
800
875
  }>, z.ZodObject<{
801
- action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
876
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
802
877
  resources: z.ZodDefault<z.ZodObject<{
803
878
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
804
879
  municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -812,40 +887,63 @@ export declare const UpdateRoleSchema: z.ZodObject<{
812
887
  scope: z.ZodLiteral<"stops">;
813
888
  }, "strip", z.ZodTypeAny, {
814
889
  scope: "stops";
815
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
890
+ action: "create" | "update" | "delete" | "read" | "lock";
816
891
  resources: {
817
892
  municipality_ids: string[];
818
893
  agency_ids: string[];
819
894
  };
820
895
  }, {
821
896
  scope: "stops";
822
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
897
+ action: "create" | "update" | "delete" | "read" | "lock";
823
898
  resources?: {
824
899
  municipality_ids?: string[] | undefined;
825
900
  agency_ids?: string[] | undefined;
826
901
  } | undefined;
827
902
  }>, z.ZodObject<{
828
- action: z.ZodEnum<["create", "delete", "read", "update"]>;
903
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
829
904
  scope: z.ZodLiteral<"users">;
830
905
  }, "strip", z.ZodTypeAny, {
831
906
  scope: "users";
832
- action: "create" | "update" | "delete" | "read";
907
+ action: "create" | "update" | "delete" | "read" | "lock";
833
908
  }, {
834
909
  scope: "users";
835
- action: "create" | "update" | "delete" | "read";
836
- }>]>, "many">>;
910
+ action: "create" | "update" | "delete" | "read" | "lock";
911
+ }>, z.ZodObject<{
912
+ action: z.ZodEnum<["create_annotations", "delete_annotations", "read_annotations", "update_annotations", "lock_annotations"]>;
913
+ resources: z.ZodDefault<z.ZodObject<{
914
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
915
+ }, "strip", z.ZodTypeAny, {
916
+ agency_ids: string[];
917
+ }, {
918
+ agency_ids?: string[] | undefined;
919
+ }>>;
920
+ scope: z.ZodLiteral<"dates">;
921
+ }, "strip", z.ZodTypeAny, {
922
+ scope: "dates";
923
+ action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
924
+ resources: {
925
+ agency_ids: string[];
926
+ };
927
+ }, {
928
+ scope: "dates";
929
+ action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
930
+ resources?: {
931
+ agency_ids?: string[] | undefined;
932
+ } | undefined;
933
+ }>]>, "many">>>;
837
934
  }, "strip", z.ZodTypeAny, {
935
+ is_locked?: boolean | undefined;
838
936
  updated_by?: string | undefined;
839
937
  name?: string | undefined;
840
938
  permissions?: ({
841
939
  scope: "agencies";
842
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
940
+ action: "create" | "update" | "delete" | "read" | "lock";
843
941
  } | {
844
942
  scope: "alerts_scheduled";
845
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
943
+ action: "create" | "update" | "delete" | "read" | "lock";
846
944
  } | {
847
945
  scope: "alerts_realtime";
848
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
946
+ action: "create" | "update" | "delete" | "read" | "lock";
849
947
  resources: {
850
948
  agency_ids: string[];
851
949
  };
@@ -858,9 +956,15 @@ export declare const UpdateRoleSchema: z.ZodObject<{
858
956
  } | {
859
957
  scope: "sams";
860
958
  action: "read";
959
+ } | {
960
+ scope: "dates";
961
+ action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
962
+ resources: {
963
+ agency_ids: string[];
964
+ };
861
965
  } | {
862
966
  scope: "gtfs_validations";
863
- action: "create" | "read" | "request_approval";
967
+ action: "create" | "read" | "lock" | "request_approval";
864
968
  resources: {
865
969
  agency_ids: string[];
866
970
  };
@@ -869,42 +973,43 @@ export declare const UpdateRoleSchema: z.ZodObject<{
869
973
  action: "read_links" | "read_wiki";
870
974
  } | {
871
975
  scope: "organizations";
872
- action: "create" | "update" | "delete" | "read";
976
+ action: "create" | "update" | "delete" | "read" | "lock";
873
977
  } | {
874
978
  scope: "performance";
875
979
  action: "read";
876
980
  } | {
877
981
  scope: "plans";
878
- action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
982
+ action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
879
983
  resources: {
880
984
  agency_ids: string[];
881
985
  };
882
986
  } | {
883
987
  scope: "roles";
884
- action: "create" | "update" | "delete" | "read";
988
+ action: "create" | "update" | "delete" | "read" | "lock";
885
989
  } | {
886
990
  scope: "stops";
887
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
991
+ action: "create" | "update" | "delete" | "read" | "lock";
888
992
  resources: {
889
993
  municipality_ids: string[];
890
994
  agency_ids: string[];
891
995
  };
892
996
  } | {
893
997
  scope: "users";
894
- action: "create" | "update" | "delete" | "read";
998
+ action: "create" | "update" | "delete" | "read" | "lock";
895
999
  })[] | undefined;
896
1000
  }, {
1001
+ is_locked?: boolean | undefined;
897
1002
  updated_by?: string | undefined;
898
1003
  name?: string | undefined;
899
1004
  permissions?: ({
900
1005
  scope: "agencies";
901
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
1006
+ action: "create" | "update" | "delete" | "read" | "lock";
902
1007
  } | {
903
1008
  scope: "alerts_scheduled";
904
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
1009
+ action: "create" | "update" | "delete" | "read" | "lock";
905
1010
  } | {
906
1011
  scope: "alerts_realtime";
907
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
1012
+ action: "create" | "update" | "delete" | "read" | "lock";
908
1013
  resources?: {
909
1014
  agency_ids?: string[] | undefined;
910
1015
  } | undefined;
@@ -917,9 +1022,15 @@ export declare const UpdateRoleSchema: z.ZodObject<{
917
1022
  } | {
918
1023
  scope: "sams";
919
1024
  action: "read";
1025
+ } | {
1026
+ scope: "dates";
1027
+ action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
1028
+ resources?: {
1029
+ agency_ids?: string[] | undefined;
1030
+ } | undefined;
920
1031
  } | {
921
1032
  scope: "gtfs_validations";
922
- action: "create" | "read" | "request_approval";
1033
+ action: "create" | "read" | "lock" | "request_approval";
923
1034
  resources?: {
924
1035
  agency_ids?: string[] | undefined;
925
1036
  } | undefined;
@@ -928,29 +1039,29 @@ export declare const UpdateRoleSchema: z.ZodObject<{
928
1039
  action: "read_links" | "read_wiki";
929
1040
  } | {
930
1041
  scope: "organizations";
931
- action: "create" | "update" | "delete" | "read";
1042
+ action: "create" | "update" | "delete" | "read" | "lock";
932
1043
  } | {
933
1044
  scope: "performance";
934
1045
  action: "read";
935
1046
  } | {
936
1047
  scope: "plans";
937
- action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
1048
+ action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
938
1049
  resources?: {
939
1050
  agency_ids?: string[] | undefined;
940
1051
  } | undefined;
941
1052
  } | {
942
1053
  scope: "roles";
943
- action: "create" | "update" | "delete" | "read";
1054
+ action: "create" | "update" | "delete" | "read" | "lock";
944
1055
  } | {
945
1056
  scope: "stops";
946
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
1057
+ action: "create" | "update" | "delete" | "read" | "lock";
947
1058
  resources?: {
948
1059
  municipality_ids?: string[] | undefined;
949
1060
  agency_ids?: string[] | undefined;
950
1061
  } | undefined;
951
1062
  } | {
952
1063
  scope: "users";
953
- action: "create" | "update" | "delete" | "read";
1064
+ action: "create" | "update" | "delete" | "read" | "lock";
954
1065
  })[] | undefined;
955
1066
  }>;
956
1067
  export type Role = z.infer<typeof RoleSchema>;