@tmlmobilidade/types 20260121.2332.6 → 20260128.2248.28

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 (150) hide show
  1. package/dist/_common/comment.d.ts +24 -24
  2. package/dist/_common/document.d.ts +3 -3
  3. package/dist/_common/document.js +1 -1
  4. package/dist/_common/status.d.ts +2 -2
  5. package/dist/_common/status.js +1 -1
  6. package/dist/_common/unix-timestamp.js +1 -0
  7. package/dist/agency.d.ts +6 -6
  8. package/dist/alerts/alert.d.ts +262 -0
  9. package/dist/alerts/alert.js +34 -0
  10. package/dist/alerts/cause-effect-map.d.ts +106 -0
  11. package/dist/alerts/cause-effect-map.js +94 -0
  12. package/dist/alerts/cause.d.ts +17 -0
  13. package/dist/alerts/cause.js +45 -0
  14. package/dist/alerts/effect.d.ts +17 -0
  15. package/dist/alerts/effect.js +35 -0
  16. package/dist/alerts/index.d.ts +6 -0
  17. package/dist/alerts/index.js +6 -0
  18. package/dist/alerts/query.d.ts +9 -0
  19. package/dist/alerts/query.js +6 -0
  20. package/dist/alerts/reference-type.d.ts +4 -0
  21. package/dist/alerts/reference-type.js +10 -0
  22. package/dist/apex/simplified-apex-location.d.ts +2 -12
  23. package/dist/apex/simplified-apex-location.js +1 -1
  24. package/dist/apex/simplified-apex-on-board-refund.d.ts +2 -12
  25. package/dist/apex/simplified-apex-on-board-refund.js +1 -1
  26. package/dist/apex/simplified-apex-on-board-sale.d.ts +12 -19
  27. package/dist/apex/simplified-apex-on-board-sale.js +2 -2
  28. package/dist/apex/simplified-apex-validation.d.ts +6 -16
  29. package/dist/apex/simplified-apex-validation.js +1 -1
  30. package/dist/auth/role.d.ts +718 -130
  31. package/dist/auth/session.d.ts +6 -6
  32. package/dist/auth/user.d.ts +1182 -270
  33. package/dist/auth/verification-token.d.ts +4 -4
  34. package/dist/calendar/event.d.ts +43 -0
  35. package/dist/calendar/event.js +16 -0
  36. package/dist/calendar/index.d.ts +1 -0
  37. package/dist/calendar/index.js +2 -0
  38. package/dist/dates/annotation.d.ts +6 -6
  39. package/dist/dates/date.d.ts +32 -0
  40. package/dist/dates/date.js +18 -0
  41. package/dist/dates/index.d.ts +2 -0
  42. package/dist/dates/index.js +2 -0
  43. package/dist/dates/period.d.ts +94 -0
  44. package/dist/dates/period.js +14 -0
  45. package/dist/file-exports/base.d.ts +9 -9
  46. package/dist/file-exports/file-exports.d.ts +7 -7
  47. package/dist/file-exports/ride-export.d.ts +14 -14
  48. package/dist/file-exports/ride-export.js +2 -2
  49. package/dist/gtfs/cause.d.ts +10 -0
  50. package/dist/gtfs/cause.js +18 -0
  51. package/dist/gtfs/effect.d.ts +10 -0
  52. package/dist/gtfs/effect.js +17 -0
  53. package/dist/gtfs/index.d.ts +2 -1
  54. package/dist/gtfs/index.js +2 -1
  55. package/dist/index.d.ts +5 -2
  56. package/dist/index.js +5 -2
  57. package/dist/locations/queries.d.ts +2 -2
  58. package/dist/metrics/demand/demand_by_agency.d.ts +8 -8
  59. package/dist/metrics/demand/demand_by_category.d.ts +12 -12
  60. package/dist/metrics/demand/demand_by_line.d.ts +4 -4
  61. package/dist/metrics/demand/demand_by_pattern.d.ts +8 -8
  62. package/dist/metrics/demand/demand_by_product.d.ts +12 -12
  63. package/dist/metrics/index.d.ts +93 -48
  64. package/dist/metrics/index.js +4 -1
  65. package/dist/metrics/passenger-impact/index.d.ts +1 -0
  66. package/dist/metrics/passenger-impact/index.js +1 -0
  67. package/dist/metrics/passenger-impact/passenger-impact.d.ts +97 -0
  68. package/dist/metrics/passenger-impact/passenger-impact.js +22 -0
  69. package/dist/metrics/supply/supply_by_agency.d.ts +4 -4
  70. package/dist/notification.d.ts +18 -18
  71. package/dist/offer/index.d.ts +5 -0
  72. package/dist/offer/index.js +5 -0
  73. package/dist/offer/line.d.ts +296 -0
  74. package/dist/offer/line.js +60 -0
  75. package/dist/offer/pattern.d.ts +3608 -0
  76. package/dist/offer/pattern.js +75 -0
  77. package/dist/offer/route.d.ts +187 -0
  78. package/dist/offer/route.js +33 -0
  79. package/dist/offer/scheduleRule.d.ts +80 -0
  80. package/dist/offer/scheduleRule.js +50 -0
  81. package/dist/offer/typology.d.ts +124 -0
  82. package/dist/offer/typology.js +30 -0
  83. package/dist/organization.d.ts +20 -20
  84. package/dist/permissions/alerts.d.ts +13 -19
  85. package/dist/permissions/alerts.js +8 -13
  86. package/dist/permissions/annotations.d.ts +25 -0
  87. package/dist/permissions/annotations.js +16 -0
  88. package/dist/permissions/fares.d.ts +25 -0
  89. package/dist/permissions/fares.js +16 -0
  90. package/dist/permissions/index.d.ts +196 -21
  91. package/dist/permissions/index.js +142 -6
  92. package/dist/permissions/lines.d.ts +25 -0
  93. package/dist/permissions/lines.js +16 -0
  94. package/dist/permissions/periods.d.ts +25 -0
  95. package/dist/permissions/periods.js +16 -0
  96. package/dist/permissions/typologies.d.ts +25 -0
  97. package/dist/permissions/typologies.js +16 -0
  98. package/dist/permissions/vehicles.d.ts +25 -0
  99. package/dist/permissions/vehicles.js +16 -0
  100. package/dist/permissions/zones.d.ts +25 -0
  101. package/dist/permissions/zones.js +16 -0
  102. package/dist/plans/gtfs-validation.d.ts +30 -30
  103. package/dist/plans/plan.d.ts +6 -6
  104. package/dist/proposed-change.d.ts +12 -12
  105. package/dist/rides/batch-query.d.ts +52 -0
  106. package/dist/rides/batch-query.js +54 -0
  107. package/dist/rides/index.d.ts +1 -0
  108. package/dist/rides/index.js +1 -0
  109. package/dist/rides/ride-acceptance.d.ts +105 -105
  110. package/dist/rides/ride-acceptance.js +2 -2
  111. package/dist/rides/ride-audit.d.ts +21 -21
  112. package/dist/rides/ride-normalized.d.ts +808 -21
  113. package/dist/rides/ride-normalized.js +31 -1
  114. package/dist/rides/ride.d.ts +6 -6
  115. package/dist/sams/sam.d.ts +0 -15
  116. package/dist/sams/sam.js +2 -2
  117. package/dist/stops/connections.d.ts +1 -0
  118. package/dist/stops/connections.js +1 -1
  119. package/dist/stops/equipment.d.ts +1 -0
  120. package/dist/stops/equipment.js +1 -1
  121. package/dist/stops/parent-station.d.ts +6 -6
  122. package/dist/stops/stop-area.d.ts +6 -6
  123. package/dist/stops/stop.d.ts +69 -69
  124. package/dist/ticketing/fare.d.ts +137 -0
  125. package/dist/ticketing/fare.js +44 -0
  126. package/dist/ticketing/index.d.ts +2 -0
  127. package/dist/ticketing/index.js +2 -0
  128. package/dist/ticketing/zone.d.ts +220 -0
  129. package/dist/ticketing/zone.js +34 -0
  130. package/dist/vehicle/emission.d.ts +3 -0
  131. package/dist/vehicle/emission.js +12 -0
  132. package/dist/vehicle/index.d.ts +4 -0
  133. package/dist/vehicle/index.js +4 -0
  134. package/dist/vehicle/propulsion.d.ts +3 -0
  135. package/dist/vehicle/propulsion.js +14 -0
  136. package/dist/vehicle/vehicle.d.ts +189 -0
  137. package/dist/vehicle/vehicle.js +27 -0
  138. package/dist/vehicle/wheelchair.d.ts +3 -0
  139. package/dist/vehicle/wheelchair.js +10 -0
  140. package/dist/vehicle-events/clickhouse-vehicle-event.d.ts +2 -6
  141. package/dist/vehicle-events/simplified-vehicle-event.d.ts +2 -6
  142. package/dist/vehicle-events/simplified-vehicle-event.js +1 -1
  143. package/dist/zone.d.ts +6 -6
  144. package/package.json +2 -2
  145. package/dist/alert.d.ts +0 -265
  146. package/dist/alert.js +0 -42
  147. package/dist/gtfs/cause-effetcs.d.ts +0 -86
  148. package/dist/gtfs/cause-effetcs.js +0 -31
  149. package/dist/permissions/dates.d.ts +0 -25
  150. package/dist/permissions/dates.js +0 -16
@@ -4,7 +4,7 @@ export type UserPreferenceValue = z.infer<typeof UserPreferenceValueSchema>;
4
4
  export declare const UserSchema_UNSAFE: z.ZodObject<{
5
5
  _id: z.ZodString;
6
6
  created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
7
- created_by: z.ZodOptional<z.ZodString>;
7
+ created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
8
8
  is_locked: z.ZodDefault<z.ZodBoolean>;
9
9
  updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
10
10
  updated_by: z.ZodOptional<z.ZodString>;
@@ -25,35 +25,31 @@ export declare const UserSchema_UNSAFE: z.ZodObject<{
25
25
  scope: "agencies";
26
26
  action: "create" | "update" | "delete" | "read" | "lock";
27
27
  }>, z.ZodObject<{
28
- action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
29
- scope: z.ZodLiteral<"alerts_scheduled">;
30
- }, "strip", z.ZodTypeAny, {
31
- scope: "alerts_scheduled";
32
- action: "create" | "update" | "delete" | "read" | "lock";
33
- }, {
34
- scope: "alerts_scheduled";
35
- action: "create" | "update" | "delete" | "read" | "lock";
36
- }>, z.ZodObject<{
37
- action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
28
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update", "update_texts", "update_dates", "update_publish_status"]>;
38
29
  resources: z.ZodDefault<z.ZodObject<{
39
30
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
31
+ reference_types: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
40
32
  }, "strip", z.ZodTypeAny, {
41
33
  agency_ids: string[];
34
+ reference_types: string[];
42
35
  }, {
43
36
  agency_ids?: string[] | undefined;
37
+ reference_types?: string[] | undefined;
44
38
  }>>;
45
- scope: z.ZodLiteral<"alerts_realtime">;
39
+ scope: z.ZodLiteral<"alerts">;
46
40
  }, "strip", z.ZodTypeAny, {
47
- scope: "alerts_realtime";
48
- action: "create" | "update" | "delete" | "read" | "lock";
41
+ scope: "alerts";
42
+ action: "create" | "update" | "delete" | "read" | "lock" | "update_texts" | "update_dates" | "update_publish_status";
49
43
  resources: {
50
44
  agency_ids: string[];
45
+ reference_types: string[];
51
46
  };
52
47
  }, {
53
- scope: "alerts_realtime";
54
- action: "create" | "update" | "delete" | "read" | "lock";
48
+ scope: "alerts";
49
+ action: "create" | "update" | "delete" | "read" | "lock" | "update_texts" | "update_dates" | "update_publish_status";
55
50
  resources?: {
56
51
  agency_ids?: string[] | undefined;
52
+ reference_types?: string[] | undefined;
57
53
  } | undefined;
58
54
  }>, z.ZodObject<{
59
55
  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"]>;
@@ -203,7 +199,139 @@ export declare const UserSchema_UNSAFE: z.ZodObject<{
203
199
  scope: "users";
204
200
  action: "create" | "update" | "delete" | "read" | "lock";
205
201
  }>, z.ZodObject<{
206
- action: z.ZodEnum<["create_annotations", "delete_annotations", "read_annotations", "update_annotations", "lock_annotations"]>;
202
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
203
+ resources: z.ZodDefault<z.ZodObject<{
204
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
205
+ }, "strip", z.ZodTypeAny, {
206
+ agency_ids: string[];
207
+ }, {
208
+ agency_ids?: string[] | undefined;
209
+ }>>;
210
+ scope: z.ZodLiteral<"vehicles">;
211
+ }, "strip", z.ZodTypeAny, {
212
+ scope: "vehicles";
213
+ action: "create" | "update" | "delete" | "read" | "lock";
214
+ resources: {
215
+ agency_ids: string[];
216
+ };
217
+ }, {
218
+ scope: "vehicles";
219
+ action: "create" | "update" | "delete" | "read" | "lock";
220
+ resources?: {
221
+ agency_ids?: string[] | undefined;
222
+ } | undefined;
223
+ }>, z.ZodObject<{
224
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
225
+ resources: z.ZodDefault<z.ZodObject<{
226
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
227
+ }, "strip", z.ZodTypeAny, {
228
+ agency_ids: string[];
229
+ }, {
230
+ agency_ids?: string[] | undefined;
231
+ }>>;
232
+ scope: z.ZodLiteral<"fares">;
233
+ }, "strip", z.ZodTypeAny, {
234
+ scope: "fares";
235
+ action: "create" | "update" | "delete" | "read" | "lock";
236
+ resources: {
237
+ agency_ids: string[];
238
+ };
239
+ }, {
240
+ scope: "fares";
241
+ action: "create" | "update" | "delete" | "read" | "lock";
242
+ resources?: {
243
+ agency_ids?: string[] | undefined;
244
+ } | undefined;
245
+ }>, z.ZodObject<{
246
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
247
+ resources: z.ZodDefault<z.ZodObject<{
248
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
249
+ }, "strip", z.ZodTypeAny, {
250
+ agency_ids: string[];
251
+ }, {
252
+ agency_ids?: string[] | undefined;
253
+ }>>;
254
+ scope: z.ZodLiteral<"annotations">;
255
+ }, "strip", z.ZodTypeAny, {
256
+ scope: "annotations";
257
+ action: "create" | "update" | "delete" | "read" | "lock";
258
+ resources: {
259
+ agency_ids: string[];
260
+ };
261
+ }, {
262
+ scope: "annotations";
263
+ action: "create" | "update" | "delete" | "read" | "lock";
264
+ resources?: {
265
+ agency_ids?: string[] | undefined;
266
+ } | undefined;
267
+ }>, z.ZodObject<{
268
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
269
+ resources: z.ZodDefault<z.ZodObject<{
270
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
271
+ }, "strip", z.ZodTypeAny, {
272
+ agency_ids: string[];
273
+ }, {
274
+ agency_ids?: string[] | undefined;
275
+ }>>;
276
+ scope: z.ZodLiteral<"periods">;
277
+ }, "strip", z.ZodTypeAny, {
278
+ scope: "periods";
279
+ action: "create" | "update" | "delete" | "read" | "lock";
280
+ resources: {
281
+ agency_ids: string[];
282
+ };
283
+ }, {
284
+ scope: "periods";
285
+ action: "create" | "update" | "delete" | "read" | "lock";
286
+ resources?: {
287
+ agency_ids?: string[] | undefined;
288
+ } | undefined;
289
+ }>, z.ZodObject<{
290
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
291
+ resources: z.ZodDefault<z.ZodObject<{
292
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
293
+ }, "strip", z.ZodTypeAny, {
294
+ agency_ids: string[];
295
+ }, {
296
+ agency_ids?: string[] | undefined;
297
+ }>>;
298
+ scope: z.ZodLiteral<"zones">;
299
+ }, "strip", z.ZodTypeAny, {
300
+ scope: "zones";
301
+ action: "create" | "update" | "delete" | "read" | "lock";
302
+ resources: {
303
+ agency_ids: string[];
304
+ };
305
+ }, {
306
+ scope: "zones";
307
+ action: "create" | "update" | "delete" | "read" | "lock";
308
+ resources?: {
309
+ agency_ids?: string[] | undefined;
310
+ } | undefined;
311
+ }>, z.ZodObject<{
312
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
313
+ resources: z.ZodDefault<z.ZodObject<{
314
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
315
+ }, "strip", z.ZodTypeAny, {
316
+ agency_ids: string[];
317
+ }, {
318
+ agency_ids?: string[] | undefined;
319
+ }>>;
320
+ scope: z.ZodLiteral<"typologies">;
321
+ }, "strip", z.ZodTypeAny, {
322
+ scope: "typologies";
323
+ action: "create" | "update" | "delete" | "read" | "lock";
324
+ resources: {
325
+ agency_ids: string[];
326
+ };
327
+ }, {
328
+ scope: "typologies";
329
+ action: "create" | "update" | "delete" | "read" | "lock";
330
+ resources?: {
331
+ agency_ids?: string[] | undefined;
332
+ } | undefined;
333
+ }>, z.ZodObject<{
334
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
207
335
  resources: z.ZodDefault<z.ZodObject<{
208
336
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
209
337
  }, "strip", z.ZodTypeAny, {
@@ -211,16 +339,16 @@ export declare const UserSchema_UNSAFE: z.ZodObject<{
211
339
  }, {
212
340
  agency_ids?: string[] | undefined;
213
341
  }>>;
214
- scope: z.ZodLiteral<"dates">;
342
+ scope: z.ZodLiteral<"lines">;
215
343
  }, "strip", z.ZodTypeAny, {
216
- scope: "dates";
217
- action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
344
+ scope: "lines";
345
+ action: "create" | "update" | "delete" | "read" | "lock";
218
346
  resources: {
219
347
  agency_ids: string[];
220
348
  };
221
349
  }, {
222
- scope: "dates";
223
- action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
350
+ scope: "lines";
351
+ action: "create" | "update" | "delete" | "read" | "lock";
224
352
  resources?: {
225
353
  agency_ids?: string[] | undefined;
226
354
  } | undefined;
@@ -236,6 +364,7 @@ export declare const UserSchema_UNSAFE: z.ZodObject<{
236
364
  created_at: number & {
237
365
  __brand: "UnixTimestamp";
238
366
  };
367
+ created_by: string | null;
239
368
  is_locked: boolean;
240
369
  updated_at: number & {
241
370
  __brand: "UnixTimestamp";
@@ -246,10 +375,14 @@ export declare const UserSchema_UNSAFE: z.ZodObject<{
246
375
  scope: "agencies";
247
376
  action: "create" | "update" | "delete" | "read" | "lock";
248
377
  } | {
249
- scope: "alerts_scheduled";
250
- action: "create" | "update" | "delete" | "read" | "lock";
378
+ scope: "alerts";
379
+ action: "create" | "update" | "delete" | "read" | "lock" | "update_texts" | "update_dates" | "update_publish_status";
380
+ resources: {
381
+ agency_ids: string[];
382
+ reference_types: string[];
383
+ };
251
384
  } | {
252
- scope: "alerts_realtime";
385
+ scope: "annotations";
253
386
  action: "create" | "update" | "delete" | "read" | "lock";
254
387
  resources: {
255
388
  agency_ids: string[];
@@ -264,8 +397,8 @@ export declare const UserSchema_UNSAFE: z.ZodObject<{
264
397
  scope: "sams";
265
398
  action: "read";
266
399
  } | {
267
- scope: "dates";
268
- action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
400
+ scope: "fares";
401
+ action: "create" | "update" | "delete" | "read" | "lock";
269
402
  resources: {
270
403
  agency_ids: string[];
271
404
  };
@@ -278,12 +411,24 @@ export declare const UserSchema_UNSAFE: z.ZodObject<{
278
411
  } | {
279
412
  scope: "home";
280
413
  action: "read_links" | "read_wiki";
414
+ } | {
415
+ scope: "lines";
416
+ action: "create" | "update" | "delete" | "read" | "lock";
417
+ resources: {
418
+ agency_ids: string[];
419
+ };
281
420
  } | {
282
421
  scope: "organizations";
283
422
  action: "create" | "update" | "delete" | "read" | "lock";
284
423
  } | {
285
424
  scope: "performance";
286
425
  action: "read";
426
+ } | {
427
+ scope: "periods";
428
+ action: "create" | "update" | "delete" | "read" | "lock";
429
+ resources: {
430
+ agency_ids: string[];
431
+ };
287
432
  } | {
288
433
  scope: "plans";
289
434
  action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
@@ -300,9 +445,27 @@ export declare const UserSchema_UNSAFE: z.ZodObject<{
300
445
  municipality_ids: string[];
301
446
  agency_ids: string[];
302
447
  };
448
+ } | {
449
+ scope: "typologies";
450
+ action: "create" | "update" | "delete" | "read" | "lock";
451
+ resources: {
452
+ agency_ids: string[];
453
+ };
303
454
  } | {
304
455
  scope: "users";
305
456
  action: "create" | "update" | "delete" | "read" | "lock";
457
+ } | {
458
+ scope: "vehicles";
459
+ action: "create" | "update" | "delete" | "read" | "lock";
460
+ resources: {
461
+ agency_ids: string[];
462
+ };
463
+ } | {
464
+ scope: "zones";
465
+ action: "create" | "update" | "delete" | "read" | "lock";
466
+ resources: {
467
+ agency_ids: string[];
468
+ };
306
469
  })[];
307
470
  email_verified: import("../_common/unix-timestamp.js").UnixTimestamp | null;
308
471
  first_name: string;
@@ -314,7 +477,6 @@ export declare const UserSchema_UNSAFE: z.ZodObject<{
314
477
  seen_last_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
315
478
  session_ids: string[];
316
479
  verification_token_ids: string[];
317
- created_by?: string | undefined;
318
480
  updated_by?: string | undefined;
319
481
  }, {
320
482
  _id: string;
@@ -324,7 +486,7 @@ export declare const UserSchema_UNSAFE: z.ZodObject<{
324
486
  first_name: string;
325
487
  last_name: string;
326
488
  organization_id: string;
327
- created_by?: string | undefined;
489
+ created_by?: string | null | undefined;
328
490
  is_locked?: boolean | undefined;
329
491
  updated_by?: string | undefined;
330
492
  phone?: string | null | undefined;
@@ -332,10 +494,14 @@ export declare const UserSchema_UNSAFE: z.ZodObject<{
332
494
  scope: "agencies";
333
495
  action: "create" | "update" | "delete" | "read" | "lock";
334
496
  } | {
335
- scope: "alerts_scheduled";
336
- action: "create" | "update" | "delete" | "read" | "lock";
497
+ scope: "alerts";
498
+ action: "create" | "update" | "delete" | "read" | "lock" | "update_texts" | "update_dates" | "update_publish_status";
499
+ resources?: {
500
+ agency_ids?: string[] | undefined;
501
+ reference_types?: string[] | undefined;
502
+ } | undefined;
337
503
  } | {
338
- scope: "alerts_realtime";
504
+ scope: "annotations";
339
505
  action: "create" | "update" | "delete" | "read" | "lock";
340
506
  resources?: {
341
507
  agency_ids?: string[] | undefined;
@@ -350,8 +516,8 @@ export declare const UserSchema_UNSAFE: z.ZodObject<{
350
516
  scope: "sams";
351
517
  action: "read";
352
518
  } | {
353
- scope: "dates";
354
- action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
519
+ scope: "fares";
520
+ action: "create" | "update" | "delete" | "read" | "lock";
355
521
  resources?: {
356
522
  agency_ids?: string[] | undefined;
357
523
  } | undefined;
@@ -364,12 +530,24 @@ export declare const UserSchema_UNSAFE: z.ZodObject<{
364
530
  } | {
365
531
  scope: "home";
366
532
  action: "read_links" | "read_wiki";
533
+ } | {
534
+ scope: "lines";
535
+ action: "create" | "update" | "delete" | "read" | "lock";
536
+ resources?: {
537
+ agency_ids?: string[] | undefined;
538
+ } | undefined;
367
539
  } | {
368
540
  scope: "organizations";
369
541
  action: "create" | "update" | "delete" | "read" | "lock";
370
542
  } | {
371
543
  scope: "performance";
372
544
  action: "read";
545
+ } | {
546
+ scope: "periods";
547
+ action: "create" | "update" | "delete" | "read" | "lock";
548
+ resources?: {
549
+ agency_ids?: string[] | undefined;
550
+ } | undefined;
373
551
  } | {
374
552
  scope: "plans";
375
553
  action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
@@ -386,9 +564,27 @@ export declare const UserSchema_UNSAFE: z.ZodObject<{
386
564
  municipality_ids?: string[] | undefined;
387
565
  agency_ids?: string[] | undefined;
388
566
  } | undefined;
567
+ } | {
568
+ scope: "typologies";
569
+ action: "create" | "update" | "delete" | "read" | "lock";
570
+ resources?: {
571
+ agency_ids?: string[] | undefined;
572
+ } | undefined;
389
573
  } | {
390
574
  scope: "users";
391
575
  action: "create" | "update" | "delete" | "read" | "lock";
576
+ } | {
577
+ scope: "vehicles";
578
+ action: "create" | "update" | "delete" | "read" | "lock";
579
+ resources?: {
580
+ agency_ids?: string[] | undefined;
581
+ } | undefined;
582
+ } | {
583
+ scope: "zones";
584
+ action: "create" | "update" | "delete" | "read" | "lock";
585
+ resources?: {
586
+ agency_ids?: string[] | undefined;
587
+ } | undefined;
392
588
  })[] | undefined;
393
589
  email_verified?: number | null | undefined;
394
590
  password_hash?: string | null | undefined;
@@ -401,7 +597,7 @@ export declare const UserSchema_UNSAFE: z.ZodObject<{
401
597
  export declare const CreateUserSchema: z.ZodObject<Omit<{
402
598
  _id: z.ZodString;
403
599
  created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
404
- created_by: z.ZodOptional<z.ZodString>;
600
+ created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
405
601
  is_locked: z.ZodDefault<z.ZodBoolean>;
406
602
  updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
407
603
  updated_by: z.ZodOptional<z.ZodString>;
@@ -422,35 +618,31 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
422
618
  scope: "agencies";
423
619
  action: "create" | "update" | "delete" | "read" | "lock";
424
620
  }>, z.ZodObject<{
425
- action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
426
- scope: z.ZodLiteral<"alerts_scheduled">;
427
- }, "strip", z.ZodTypeAny, {
428
- scope: "alerts_scheduled";
429
- action: "create" | "update" | "delete" | "read" | "lock";
430
- }, {
431
- scope: "alerts_scheduled";
432
- action: "create" | "update" | "delete" | "read" | "lock";
433
- }>, z.ZodObject<{
434
- action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
621
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update", "update_texts", "update_dates", "update_publish_status"]>;
435
622
  resources: z.ZodDefault<z.ZodObject<{
436
623
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
624
+ reference_types: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
437
625
  }, "strip", z.ZodTypeAny, {
438
626
  agency_ids: string[];
627
+ reference_types: string[];
439
628
  }, {
440
629
  agency_ids?: string[] | undefined;
630
+ reference_types?: string[] | undefined;
441
631
  }>>;
442
- scope: z.ZodLiteral<"alerts_realtime">;
632
+ scope: z.ZodLiteral<"alerts">;
443
633
  }, "strip", z.ZodTypeAny, {
444
- scope: "alerts_realtime";
445
- action: "create" | "update" | "delete" | "read" | "lock";
634
+ scope: "alerts";
635
+ action: "create" | "update" | "delete" | "read" | "lock" | "update_texts" | "update_dates" | "update_publish_status";
446
636
  resources: {
447
637
  agency_ids: string[];
638
+ reference_types: string[];
448
639
  };
449
640
  }, {
450
- scope: "alerts_realtime";
451
- action: "create" | "update" | "delete" | "read" | "lock";
641
+ scope: "alerts";
642
+ action: "create" | "update" | "delete" | "read" | "lock" | "update_texts" | "update_dates" | "update_publish_status";
452
643
  resources?: {
453
644
  agency_ids?: string[] | undefined;
645
+ reference_types?: string[] | undefined;
454
646
  } | undefined;
455
647
  }>, z.ZodObject<{
456
648
  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"]>;
@@ -600,7 +792,7 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
600
792
  scope: "users";
601
793
  action: "create" | "update" | "delete" | "read" | "lock";
602
794
  }>, z.ZodObject<{
603
- action: z.ZodEnum<["create_annotations", "delete_annotations", "read_annotations", "update_annotations", "lock_annotations"]>;
795
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
604
796
  resources: z.ZodDefault<z.ZodObject<{
605
797
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
606
798
  }, "strip", z.ZodTypeAny, {
@@ -608,72 +800,221 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
608
800
  }, {
609
801
  agency_ids?: string[] | undefined;
610
802
  }>>;
611
- scope: z.ZodLiteral<"dates">;
803
+ scope: z.ZodLiteral<"vehicles">;
612
804
  }, "strip", z.ZodTypeAny, {
613
- scope: "dates";
614
- action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
805
+ scope: "vehicles";
806
+ action: "create" | "update" | "delete" | "read" | "lock";
615
807
  resources: {
616
808
  agency_ids: string[];
617
809
  };
618
810
  }, {
619
- scope: "dates";
620
- action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
811
+ scope: "vehicles";
812
+ action: "create" | "update" | "delete" | "read" | "lock";
621
813
  resources?: {
622
814
  agency_ids?: string[] | undefined;
623
815
  } | undefined;
624
- }>]>, "many">>;
625
- phone: z.ZodDefault<z.ZodNullable<z.ZodString>>;
626
- preferences: z.ZodDefault<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">]>>>>>;
627
- role_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
628
- seen_last_at: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
629
- session_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
630
- verification_token_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
631
- }, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
632
- is_locked: boolean;
633
- phone: string | null;
634
- email: string;
635
- permissions: ({
636
- scope: "agencies";
637
- action: "create" | "update" | "delete" | "read" | "lock";
638
- } | {
639
- scope: "alerts_scheduled";
640
- action: "create" | "update" | "delete" | "read" | "lock";
641
- } | {
642
- scope: "alerts_realtime";
643
- action: "create" | "update" | "delete" | "read" | "lock";
644
- resources: {
816
+ }>, z.ZodObject<{
817
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
818
+ resources: z.ZodDefault<z.ZodObject<{
819
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
820
+ }, "strip", z.ZodTypeAny, {
645
821
  agency_ids: string[];
646
- };
647
- } | {
648
- scope: "rides";
649
- 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";
822
+ }, {
823
+ agency_ids?: string[] | undefined;
824
+ }>>;
825
+ scope: z.ZodLiteral<"fares">;
826
+ }, "strip", z.ZodTypeAny, {
827
+ scope: "fares";
828
+ action: "create" | "update" | "delete" | "read" | "lock";
650
829
  resources: {
651
830
  agency_ids: string[];
652
831
  };
653
- } | {
654
- scope: "sams";
655
- action: "read";
656
- } | {
657
- scope: "dates";
658
- action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
659
- resources: {
832
+ }, {
833
+ scope: "fares";
834
+ action: "create" | "update" | "delete" | "read" | "lock";
835
+ resources?: {
836
+ agency_ids?: string[] | undefined;
837
+ } | undefined;
838
+ }>, z.ZodObject<{
839
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
840
+ resources: z.ZodDefault<z.ZodObject<{
841
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
842
+ }, "strip", z.ZodTypeAny, {
660
843
  agency_ids: string[];
661
- };
662
- } | {
663
- scope: "gtfs_validations";
664
- action: "create" | "read" | "lock" | "request_approval";
844
+ }, {
845
+ agency_ids?: string[] | undefined;
846
+ }>>;
847
+ scope: z.ZodLiteral<"annotations">;
848
+ }, "strip", z.ZodTypeAny, {
849
+ scope: "annotations";
850
+ action: "create" | "update" | "delete" | "read" | "lock";
665
851
  resources: {
666
852
  agency_ids: string[];
667
853
  };
668
- } | {
854
+ }, {
855
+ scope: "annotations";
856
+ action: "create" | "update" | "delete" | "read" | "lock";
857
+ resources?: {
858
+ agency_ids?: string[] | undefined;
859
+ } | undefined;
860
+ }>, z.ZodObject<{
861
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
862
+ resources: z.ZodDefault<z.ZodObject<{
863
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
864
+ }, "strip", z.ZodTypeAny, {
865
+ agency_ids: string[];
866
+ }, {
867
+ agency_ids?: string[] | undefined;
868
+ }>>;
869
+ scope: z.ZodLiteral<"periods">;
870
+ }, "strip", z.ZodTypeAny, {
871
+ scope: "periods";
872
+ action: "create" | "update" | "delete" | "read" | "lock";
873
+ resources: {
874
+ agency_ids: string[];
875
+ };
876
+ }, {
877
+ scope: "periods";
878
+ action: "create" | "update" | "delete" | "read" | "lock";
879
+ resources?: {
880
+ agency_ids?: string[] | undefined;
881
+ } | undefined;
882
+ }>, z.ZodObject<{
883
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
884
+ resources: z.ZodDefault<z.ZodObject<{
885
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
886
+ }, "strip", z.ZodTypeAny, {
887
+ agency_ids: string[];
888
+ }, {
889
+ agency_ids?: string[] | undefined;
890
+ }>>;
891
+ scope: z.ZodLiteral<"zones">;
892
+ }, "strip", z.ZodTypeAny, {
893
+ scope: "zones";
894
+ action: "create" | "update" | "delete" | "read" | "lock";
895
+ resources: {
896
+ agency_ids: string[];
897
+ };
898
+ }, {
899
+ scope: "zones";
900
+ action: "create" | "update" | "delete" | "read" | "lock";
901
+ resources?: {
902
+ agency_ids?: string[] | undefined;
903
+ } | undefined;
904
+ }>, z.ZodObject<{
905
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
906
+ resources: z.ZodDefault<z.ZodObject<{
907
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
908
+ }, "strip", z.ZodTypeAny, {
909
+ agency_ids: string[];
910
+ }, {
911
+ agency_ids?: string[] | undefined;
912
+ }>>;
913
+ scope: z.ZodLiteral<"typologies">;
914
+ }, "strip", z.ZodTypeAny, {
915
+ scope: "typologies";
916
+ action: "create" | "update" | "delete" | "read" | "lock";
917
+ resources: {
918
+ agency_ids: string[];
919
+ };
920
+ }, {
921
+ scope: "typologies";
922
+ action: "create" | "update" | "delete" | "read" | "lock";
923
+ resources?: {
924
+ agency_ids?: string[] | undefined;
925
+ } | undefined;
926
+ }>, z.ZodObject<{
927
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
928
+ resources: z.ZodDefault<z.ZodObject<{
929
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
930
+ }, "strip", z.ZodTypeAny, {
931
+ agency_ids: string[];
932
+ }, {
933
+ agency_ids?: string[] | undefined;
934
+ }>>;
935
+ scope: z.ZodLiteral<"lines">;
936
+ }, "strip", z.ZodTypeAny, {
937
+ scope: "lines";
938
+ action: "create" | "update" | "delete" | "read" | "lock";
939
+ resources: {
940
+ agency_ids: string[];
941
+ };
942
+ }, {
943
+ scope: "lines";
944
+ action: "create" | "update" | "delete" | "read" | "lock";
945
+ resources?: {
946
+ agency_ids?: string[] | undefined;
947
+ } | undefined;
948
+ }>]>, "many">>;
949
+ phone: z.ZodDefault<z.ZodNullable<z.ZodString>>;
950
+ preferences: z.ZodDefault<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">]>>>>>;
951
+ role_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
952
+ seen_last_at: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
953
+ session_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
954
+ verification_token_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
955
+ }, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
956
+ created_by: string | null;
957
+ is_locked: boolean;
958
+ phone: string | null;
959
+ email: string;
960
+ permissions: ({
961
+ scope: "agencies";
962
+ action: "create" | "update" | "delete" | "read" | "lock";
963
+ } | {
964
+ scope: "alerts";
965
+ action: "create" | "update" | "delete" | "read" | "lock" | "update_texts" | "update_dates" | "update_publish_status";
966
+ resources: {
967
+ agency_ids: string[];
968
+ reference_types: string[];
969
+ };
970
+ } | {
971
+ scope: "annotations";
972
+ action: "create" | "update" | "delete" | "read" | "lock";
973
+ resources: {
974
+ agency_ids: string[];
975
+ };
976
+ } | {
977
+ scope: "rides";
978
+ 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";
979
+ resources: {
980
+ agency_ids: string[];
981
+ };
982
+ } | {
983
+ scope: "sams";
984
+ action: "read";
985
+ } | {
986
+ scope: "fares";
987
+ action: "create" | "update" | "delete" | "read" | "lock";
988
+ resources: {
989
+ agency_ids: string[];
990
+ };
991
+ } | {
992
+ scope: "gtfs_validations";
993
+ action: "create" | "read" | "lock" | "request_approval";
994
+ resources: {
995
+ agency_ids: string[];
996
+ };
997
+ } | {
669
998
  scope: "home";
670
999
  action: "read_links" | "read_wiki";
1000
+ } | {
1001
+ scope: "lines";
1002
+ action: "create" | "update" | "delete" | "read" | "lock";
1003
+ resources: {
1004
+ agency_ids: string[];
1005
+ };
671
1006
  } | {
672
1007
  scope: "organizations";
673
1008
  action: "create" | "update" | "delete" | "read" | "lock";
674
1009
  } | {
675
1010
  scope: "performance";
676
1011
  action: "read";
1012
+ } | {
1013
+ scope: "periods";
1014
+ action: "create" | "update" | "delete" | "read" | "lock";
1015
+ resources: {
1016
+ agency_ids: string[];
1017
+ };
677
1018
  } | {
678
1019
  scope: "plans";
679
1020
  action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
@@ -690,9 +1031,27 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
690
1031
  municipality_ids: string[];
691
1032
  agency_ids: string[];
692
1033
  };
1034
+ } | {
1035
+ scope: "typologies";
1036
+ action: "create" | "update" | "delete" | "read" | "lock";
1037
+ resources: {
1038
+ agency_ids: string[];
1039
+ };
693
1040
  } | {
694
1041
  scope: "users";
695
1042
  action: "create" | "update" | "delete" | "read" | "lock";
1043
+ } | {
1044
+ scope: "vehicles";
1045
+ action: "create" | "update" | "delete" | "read" | "lock";
1046
+ resources: {
1047
+ agency_ids: string[];
1048
+ };
1049
+ } | {
1050
+ scope: "zones";
1051
+ action: "create" | "update" | "delete" | "read" | "lock";
1052
+ resources: {
1053
+ agency_ids: string[];
1054
+ };
696
1055
  })[];
697
1056
  email_verified: import("../_common/unix-timestamp.js").UnixTimestamp | null;
698
1057
  first_name: string;
@@ -704,14 +1063,13 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
704
1063
  seen_last_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
705
1064
  session_ids: string[];
706
1065
  verification_token_ids: string[];
707
- created_by?: string | undefined;
708
1066
  updated_by?: string | undefined;
709
1067
  }, {
710
1068
  email: string;
711
1069
  first_name: string;
712
1070
  last_name: string;
713
1071
  organization_id: string;
714
- created_by?: string | undefined;
1072
+ created_by?: string | null | undefined;
715
1073
  is_locked?: boolean | undefined;
716
1074
  updated_by?: string | undefined;
717
1075
  phone?: string | null | undefined;
@@ -719,10 +1077,14 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
719
1077
  scope: "agencies";
720
1078
  action: "create" | "update" | "delete" | "read" | "lock";
721
1079
  } | {
722
- scope: "alerts_scheduled";
723
- action: "create" | "update" | "delete" | "read" | "lock";
1080
+ scope: "alerts";
1081
+ action: "create" | "update" | "delete" | "read" | "lock" | "update_texts" | "update_dates" | "update_publish_status";
1082
+ resources?: {
1083
+ agency_ids?: string[] | undefined;
1084
+ reference_types?: string[] | undefined;
1085
+ } | undefined;
724
1086
  } | {
725
- scope: "alerts_realtime";
1087
+ scope: "annotations";
726
1088
  action: "create" | "update" | "delete" | "read" | "lock";
727
1089
  resources?: {
728
1090
  agency_ids?: string[] | undefined;
@@ -737,8 +1099,8 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
737
1099
  scope: "sams";
738
1100
  action: "read";
739
1101
  } | {
740
- scope: "dates";
741
- action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
1102
+ scope: "fares";
1103
+ action: "create" | "update" | "delete" | "read" | "lock";
742
1104
  resources?: {
743
1105
  agency_ids?: string[] | undefined;
744
1106
  } | undefined;
@@ -751,12 +1113,24 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
751
1113
  } | {
752
1114
  scope: "home";
753
1115
  action: "read_links" | "read_wiki";
1116
+ } | {
1117
+ scope: "lines";
1118
+ action: "create" | "update" | "delete" | "read" | "lock";
1119
+ resources?: {
1120
+ agency_ids?: string[] | undefined;
1121
+ } | undefined;
754
1122
  } | {
755
1123
  scope: "organizations";
756
1124
  action: "create" | "update" | "delete" | "read" | "lock";
757
1125
  } | {
758
1126
  scope: "performance";
759
1127
  action: "read";
1128
+ } | {
1129
+ scope: "periods";
1130
+ action: "create" | "update" | "delete" | "read" | "lock";
1131
+ resources?: {
1132
+ agency_ids?: string[] | undefined;
1133
+ } | undefined;
760
1134
  } | {
761
1135
  scope: "plans";
762
1136
  action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
@@ -773,9 +1147,27 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
773
1147
  municipality_ids?: string[] | undefined;
774
1148
  agency_ids?: string[] | undefined;
775
1149
  } | undefined;
1150
+ } | {
1151
+ scope: "typologies";
1152
+ action: "create" | "update" | "delete" | "read" | "lock";
1153
+ resources?: {
1154
+ agency_ids?: string[] | undefined;
1155
+ } | undefined;
776
1156
  } | {
777
1157
  scope: "users";
778
1158
  action: "create" | "update" | "delete" | "read" | "lock";
1159
+ } | {
1160
+ scope: "vehicles";
1161
+ action: "create" | "update" | "delete" | "read" | "lock";
1162
+ resources?: {
1163
+ agency_ids?: string[] | undefined;
1164
+ } | undefined;
1165
+ } | {
1166
+ scope: "zones";
1167
+ action: "create" | "update" | "delete" | "read" | "lock";
1168
+ resources?: {
1169
+ agency_ids?: string[] | undefined;
1170
+ } | undefined;
779
1171
  })[] | undefined;
780
1172
  email_verified?: number | null | undefined;
781
1173
  password_hash?: string | null | undefined;
@@ -800,35 +1192,31 @@ export declare const UpdateUserSchema: z.ZodObject<{
800
1192
  scope: "agencies";
801
1193
  action: "create" | "update" | "delete" | "read" | "lock";
802
1194
  }>, z.ZodObject<{
803
- action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
804
- scope: z.ZodLiteral<"alerts_scheduled">;
805
- }, "strip", z.ZodTypeAny, {
806
- scope: "alerts_scheduled";
807
- action: "create" | "update" | "delete" | "read" | "lock";
808
- }, {
809
- scope: "alerts_scheduled";
810
- action: "create" | "update" | "delete" | "read" | "lock";
811
- }>, z.ZodObject<{
812
- action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1195
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update", "update_texts", "update_dates", "update_publish_status"]>;
813
1196
  resources: z.ZodDefault<z.ZodObject<{
814
1197
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1198
+ reference_types: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
815
1199
  }, "strip", z.ZodTypeAny, {
816
1200
  agency_ids: string[];
1201
+ reference_types: string[];
817
1202
  }, {
818
1203
  agency_ids?: string[] | undefined;
1204
+ reference_types?: string[] | undefined;
819
1205
  }>>;
820
- scope: z.ZodLiteral<"alerts_realtime">;
1206
+ scope: z.ZodLiteral<"alerts">;
821
1207
  }, "strip", z.ZodTypeAny, {
822
- scope: "alerts_realtime";
823
- action: "create" | "update" | "delete" | "read" | "lock";
1208
+ scope: "alerts";
1209
+ action: "create" | "update" | "delete" | "read" | "lock" | "update_texts" | "update_dates" | "update_publish_status";
824
1210
  resources: {
825
1211
  agency_ids: string[];
1212
+ reference_types: string[];
826
1213
  };
827
1214
  }, {
828
- scope: "alerts_realtime";
829
- action: "create" | "update" | "delete" | "read" | "lock";
1215
+ scope: "alerts";
1216
+ action: "create" | "update" | "delete" | "read" | "lock" | "update_texts" | "update_dates" | "update_publish_status";
830
1217
  resources?: {
831
1218
  agency_ids?: string[] | undefined;
1219
+ reference_types?: string[] | undefined;
832
1220
  } | undefined;
833
1221
  }>, z.ZodObject<{
834
1222
  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"]>;
@@ -978,7 +1366,7 @@ export declare const UpdateUserSchema: z.ZodObject<{
978
1366
  scope: "users";
979
1367
  action: "create" | "update" | "delete" | "read" | "lock";
980
1368
  }>, z.ZodObject<{
981
- action: z.ZodEnum<["create_annotations", "delete_annotations", "read_annotations", "update_annotations", "lock_annotations"]>;
1369
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
982
1370
  resources: z.ZodDefault<z.ZodObject<{
983
1371
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
984
1372
  }, "strip", z.ZodTypeAny, {
@@ -986,48 +1374,184 @@ export declare const UpdateUserSchema: z.ZodObject<{
986
1374
  }, {
987
1375
  agency_ids?: string[] | undefined;
988
1376
  }>>;
989
- scope: z.ZodLiteral<"dates">;
1377
+ scope: z.ZodLiteral<"vehicles">;
990
1378
  }, "strip", z.ZodTypeAny, {
991
- scope: "dates";
992
- action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
1379
+ scope: "vehicles";
1380
+ action: "create" | "update" | "delete" | "read" | "lock";
993
1381
  resources: {
994
1382
  agency_ids: string[];
995
1383
  };
996
1384
  }, {
997
- scope: "dates";
998
- action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
1385
+ scope: "vehicles";
1386
+ action: "create" | "update" | "delete" | "read" | "lock";
999
1387
  resources?: {
1000
1388
  agency_ids?: string[] | undefined;
1001
1389
  } | undefined;
1002
- }>]>, "many">>>;
1003
- email_verified: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>>;
1004
- first_name: z.ZodOptional<z.ZodString>;
1005
- last_name: z.ZodOptional<z.ZodString>;
1006
- organization_id: z.ZodOptional<z.ZodString>;
1007
- password_hash: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
1008
- preferences: z.ZodOptional<z.ZodDefault<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">]>>>>>>;
1009
- role_ids: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
1010
- seen_last_at: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>>;
1011
- }, "strip", z.ZodTypeAny, {
1012
- is_locked?: boolean | undefined;
1013
- updated_by?: string | undefined;
1014
- phone?: string | null | undefined;
1015
- email?: string | undefined;
1016
- permissions?: ({
1017
- scope: "agencies";
1390
+ }>, z.ZodObject<{
1391
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1392
+ resources: z.ZodDefault<z.ZodObject<{
1393
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1394
+ }, "strip", z.ZodTypeAny, {
1395
+ agency_ids: string[];
1396
+ }, {
1397
+ agency_ids?: string[] | undefined;
1398
+ }>>;
1399
+ scope: z.ZodLiteral<"fares">;
1400
+ }, "strip", z.ZodTypeAny, {
1401
+ scope: "fares";
1018
1402
  action: "create" | "update" | "delete" | "read" | "lock";
1019
- } | {
1020
- scope: "alerts_scheduled";
1403
+ resources: {
1404
+ agency_ids: string[];
1405
+ };
1406
+ }, {
1407
+ scope: "fares";
1021
1408
  action: "create" | "update" | "delete" | "read" | "lock";
1022
- } | {
1023
- scope: "alerts_realtime";
1409
+ resources?: {
1410
+ agency_ids?: string[] | undefined;
1411
+ } | undefined;
1412
+ }>, z.ZodObject<{
1413
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1414
+ resources: z.ZodDefault<z.ZodObject<{
1415
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1416
+ }, "strip", z.ZodTypeAny, {
1417
+ agency_ids: string[];
1418
+ }, {
1419
+ agency_ids?: string[] | undefined;
1420
+ }>>;
1421
+ scope: z.ZodLiteral<"annotations">;
1422
+ }, "strip", z.ZodTypeAny, {
1423
+ scope: "annotations";
1024
1424
  action: "create" | "update" | "delete" | "read" | "lock";
1025
1425
  resources: {
1026
1426
  agency_ids: string[];
1027
1427
  };
1028
- } | {
1029
- scope: "rides";
1030
- 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";
1428
+ }, {
1429
+ scope: "annotations";
1430
+ action: "create" | "update" | "delete" | "read" | "lock";
1431
+ resources?: {
1432
+ agency_ids?: string[] | undefined;
1433
+ } | undefined;
1434
+ }>, z.ZodObject<{
1435
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1436
+ resources: z.ZodDefault<z.ZodObject<{
1437
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1438
+ }, "strip", z.ZodTypeAny, {
1439
+ agency_ids: string[];
1440
+ }, {
1441
+ agency_ids?: string[] | undefined;
1442
+ }>>;
1443
+ scope: z.ZodLiteral<"periods">;
1444
+ }, "strip", z.ZodTypeAny, {
1445
+ scope: "periods";
1446
+ action: "create" | "update" | "delete" | "read" | "lock";
1447
+ resources: {
1448
+ agency_ids: string[];
1449
+ };
1450
+ }, {
1451
+ scope: "periods";
1452
+ action: "create" | "update" | "delete" | "read" | "lock";
1453
+ resources?: {
1454
+ agency_ids?: string[] | undefined;
1455
+ } | undefined;
1456
+ }>, z.ZodObject<{
1457
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1458
+ resources: z.ZodDefault<z.ZodObject<{
1459
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1460
+ }, "strip", z.ZodTypeAny, {
1461
+ agency_ids: string[];
1462
+ }, {
1463
+ agency_ids?: string[] | undefined;
1464
+ }>>;
1465
+ scope: z.ZodLiteral<"zones">;
1466
+ }, "strip", z.ZodTypeAny, {
1467
+ scope: "zones";
1468
+ action: "create" | "update" | "delete" | "read" | "lock";
1469
+ resources: {
1470
+ agency_ids: string[];
1471
+ };
1472
+ }, {
1473
+ scope: "zones";
1474
+ action: "create" | "update" | "delete" | "read" | "lock";
1475
+ resources?: {
1476
+ agency_ids?: string[] | undefined;
1477
+ } | undefined;
1478
+ }>, z.ZodObject<{
1479
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1480
+ resources: z.ZodDefault<z.ZodObject<{
1481
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1482
+ }, "strip", z.ZodTypeAny, {
1483
+ agency_ids: string[];
1484
+ }, {
1485
+ agency_ids?: string[] | undefined;
1486
+ }>>;
1487
+ scope: z.ZodLiteral<"typologies">;
1488
+ }, "strip", z.ZodTypeAny, {
1489
+ scope: "typologies";
1490
+ action: "create" | "update" | "delete" | "read" | "lock";
1491
+ resources: {
1492
+ agency_ids: string[];
1493
+ };
1494
+ }, {
1495
+ scope: "typologies";
1496
+ action: "create" | "update" | "delete" | "read" | "lock";
1497
+ resources?: {
1498
+ agency_ids?: string[] | undefined;
1499
+ } | undefined;
1500
+ }>, z.ZodObject<{
1501
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1502
+ resources: z.ZodDefault<z.ZodObject<{
1503
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1504
+ }, "strip", z.ZodTypeAny, {
1505
+ agency_ids: string[];
1506
+ }, {
1507
+ agency_ids?: string[] | undefined;
1508
+ }>>;
1509
+ scope: z.ZodLiteral<"lines">;
1510
+ }, "strip", z.ZodTypeAny, {
1511
+ scope: "lines";
1512
+ action: "create" | "update" | "delete" | "read" | "lock";
1513
+ resources: {
1514
+ agency_ids: string[];
1515
+ };
1516
+ }, {
1517
+ scope: "lines";
1518
+ action: "create" | "update" | "delete" | "read" | "lock";
1519
+ resources?: {
1520
+ agency_ids?: string[] | undefined;
1521
+ } | undefined;
1522
+ }>]>, "many">>>;
1523
+ email_verified: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>>;
1524
+ first_name: z.ZodOptional<z.ZodString>;
1525
+ last_name: z.ZodOptional<z.ZodString>;
1526
+ organization_id: z.ZodOptional<z.ZodString>;
1527
+ password_hash: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
1528
+ preferences: z.ZodOptional<z.ZodDefault<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">]>>>>>>;
1529
+ role_ids: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
1530
+ seen_last_at: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>>;
1531
+ }, "strip", z.ZodTypeAny, {
1532
+ is_locked?: boolean | undefined;
1533
+ updated_by?: string | undefined;
1534
+ phone?: string | null | undefined;
1535
+ email?: string | undefined;
1536
+ permissions?: ({
1537
+ scope: "agencies";
1538
+ action: "create" | "update" | "delete" | "read" | "lock";
1539
+ } | {
1540
+ scope: "alerts";
1541
+ action: "create" | "update" | "delete" | "read" | "lock" | "update_texts" | "update_dates" | "update_publish_status";
1542
+ resources: {
1543
+ agency_ids: string[];
1544
+ reference_types: string[];
1545
+ };
1546
+ } | {
1547
+ scope: "annotations";
1548
+ action: "create" | "update" | "delete" | "read" | "lock";
1549
+ resources: {
1550
+ agency_ids: string[];
1551
+ };
1552
+ } | {
1553
+ scope: "rides";
1554
+ 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";
1031
1555
  resources: {
1032
1556
  agency_ids: string[];
1033
1557
  };
@@ -1035,8 +1559,8 @@ export declare const UpdateUserSchema: z.ZodObject<{
1035
1559
  scope: "sams";
1036
1560
  action: "read";
1037
1561
  } | {
1038
- scope: "dates";
1039
- action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
1562
+ scope: "fares";
1563
+ action: "create" | "update" | "delete" | "read" | "lock";
1040
1564
  resources: {
1041
1565
  agency_ids: string[];
1042
1566
  };
@@ -1049,12 +1573,24 @@ export declare const UpdateUserSchema: z.ZodObject<{
1049
1573
  } | {
1050
1574
  scope: "home";
1051
1575
  action: "read_links" | "read_wiki";
1576
+ } | {
1577
+ scope: "lines";
1578
+ action: "create" | "update" | "delete" | "read" | "lock";
1579
+ resources: {
1580
+ agency_ids: string[];
1581
+ };
1052
1582
  } | {
1053
1583
  scope: "organizations";
1054
1584
  action: "create" | "update" | "delete" | "read" | "lock";
1055
1585
  } | {
1056
1586
  scope: "performance";
1057
1587
  action: "read";
1588
+ } | {
1589
+ scope: "periods";
1590
+ action: "create" | "update" | "delete" | "read" | "lock";
1591
+ resources: {
1592
+ agency_ids: string[];
1593
+ };
1058
1594
  } | {
1059
1595
  scope: "plans";
1060
1596
  action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
@@ -1071,9 +1607,27 @@ export declare const UpdateUserSchema: z.ZodObject<{
1071
1607
  municipality_ids: string[];
1072
1608
  agency_ids: string[];
1073
1609
  };
1610
+ } | {
1611
+ scope: "typologies";
1612
+ action: "create" | "update" | "delete" | "read" | "lock";
1613
+ resources: {
1614
+ agency_ids: string[];
1615
+ };
1074
1616
  } | {
1075
1617
  scope: "users";
1076
1618
  action: "create" | "update" | "delete" | "read" | "lock";
1619
+ } | {
1620
+ scope: "vehicles";
1621
+ action: "create" | "update" | "delete" | "read" | "lock";
1622
+ resources: {
1623
+ agency_ids: string[];
1624
+ };
1625
+ } | {
1626
+ scope: "zones";
1627
+ action: "create" | "update" | "delete" | "read" | "lock";
1628
+ resources: {
1629
+ agency_ids: string[];
1630
+ };
1077
1631
  })[] | undefined;
1078
1632
  email_verified?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
1079
1633
  first_name?: string | undefined;
@@ -1092,10 +1646,14 @@ export declare const UpdateUserSchema: z.ZodObject<{
1092
1646
  scope: "agencies";
1093
1647
  action: "create" | "update" | "delete" | "read" | "lock";
1094
1648
  } | {
1095
- scope: "alerts_scheduled";
1096
- action: "create" | "update" | "delete" | "read" | "lock";
1649
+ scope: "alerts";
1650
+ action: "create" | "update" | "delete" | "read" | "lock" | "update_texts" | "update_dates" | "update_publish_status";
1651
+ resources?: {
1652
+ agency_ids?: string[] | undefined;
1653
+ reference_types?: string[] | undefined;
1654
+ } | undefined;
1097
1655
  } | {
1098
- scope: "alerts_realtime";
1656
+ scope: "annotations";
1099
1657
  action: "create" | "update" | "delete" | "read" | "lock";
1100
1658
  resources?: {
1101
1659
  agency_ids?: string[] | undefined;
@@ -1110,8 +1668,8 @@ export declare const UpdateUserSchema: z.ZodObject<{
1110
1668
  scope: "sams";
1111
1669
  action: "read";
1112
1670
  } | {
1113
- scope: "dates";
1114
- action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
1671
+ scope: "fares";
1672
+ action: "create" | "update" | "delete" | "read" | "lock";
1115
1673
  resources?: {
1116
1674
  agency_ids?: string[] | undefined;
1117
1675
  } | undefined;
@@ -1124,12 +1682,24 @@ export declare const UpdateUserSchema: z.ZodObject<{
1124
1682
  } | {
1125
1683
  scope: "home";
1126
1684
  action: "read_links" | "read_wiki";
1685
+ } | {
1686
+ scope: "lines";
1687
+ action: "create" | "update" | "delete" | "read" | "lock";
1688
+ resources?: {
1689
+ agency_ids?: string[] | undefined;
1690
+ } | undefined;
1127
1691
  } | {
1128
1692
  scope: "organizations";
1129
1693
  action: "create" | "update" | "delete" | "read" | "lock";
1130
1694
  } | {
1131
1695
  scope: "performance";
1132
1696
  action: "read";
1697
+ } | {
1698
+ scope: "periods";
1699
+ action: "create" | "update" | "delete" | "read" | "lock";
1700
+ resources?: {
1701
+ agency_ids?: string[] | undefined;
1702
+ } | undefined;
1133
1703
  } | {
1134
1704
  scope: "plans";
1135
1705
  action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
@@ -1146,9 +1716,27 @@ export declare const UpdateUserSchema: z.ZodObject<{
1146
1716
  municipality_ids?: string[] | undefined;
1147
1717
  agency_ids?: string[] | undefined;
1148
1718
  } | undefined;
1719
+ } | {
1720
+ scope: "typologies";
1721
+ action: "create" | "update" | "delete" | "read" | "lock";
1722
+ resources?: {
1723
+ agency_ids?: string[] | undefined;
1724
+ } | undefined;
1149
1725
  } | {
1150
1726
  scope: "users";
1151
1727
  action: "create" | "update" | "delete" | "read" | "lock";
1728
+ } | {
1729
+ scope: "vehicles";
1730
+ action: "create" | "update" | "delete" | "read" | "lock";
1731
+ resources?: {
1732
+ agency_ids?: string[] | undefined;
1733
+ } | undefined;
1734
+ } | {
1735
+ scope: "zones";
1736
+ action: "create" | "update" | "delete" | "read" | "lock";
1737
+ resources?: {
1738
+ agency_ids?: string[] | undefined;
1739
+ } | undefined;
1152
1740
  })[] | undefined;
1153
1741
  email_verified?: number | null | undefined;
1154
1742
  first_name?: string | undefined;
@@ -1162,7 +1750,7 @@ export declare const UpdateUserSchema: z.ZodObject<{
1162
1750
  export declare const UserSchema: z.ZodObject<Omit<{
1163
1751
  _id: z.ZodString;
1164
1752
  created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
1165
- created_by: z.ZodOptional<z.ZodString>;
1753
+ created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1166
1754
  is_locked: z.ZodDefault<z.ZodBoolean>;
1167
1755
  updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
1168
1756
  updated_by: z.ZodOptional<z.ZodString>;
@@ -1183,35 +1771,31 @@ export declare const UserSchema: z.ZodObject<Omit<{
1183
1771
  scope: "agencies";
1184
1772
  action: "create" | "update" | "delete" | "read" | "lock";
1185
1773
  }>, z.ZodObject<{
1186
- action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1187
- scope: z.ZodLiteral<"alerts_scheduled">;
1188
- }, "strip", z.ZodTypeAny, {
1189
- scope: "alerts_scheduled";
1190
- action: "create" | "update" | "delete" | "read" | "lock";
1191
- }, {
1192
- scope: "alerts_scheduled";
1193
- action: "create" | "update" | "delete" | "read" | "lock";
1194
- }>, z.ZodObject<{
1195
- action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1774
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update", "update_texts", "update_dates", "update_publish_status"]>;
1196
1775
  resources: z.ZodDefault<z.ZodObject<{
1197
1776
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1777
+ reference_types: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1198
1778
  }, "strip", z.ZodTypeAny, {
1199
1779
  agency_ids: string[];
1780
+ reference_types: string[];
1200
1781
  }, {
1201
1782
  agency_ids?: string[] | undefined;
1783
+ reference_types?: string[] | undefined;
1202
1784
  }>>;
1203
- scope: z.ZodLiteral<"alerts_realtime">;
1785
+ scope: z.ZodLiteral<"alerts">;
1204
1786
  }, "strip", z.ZodTypeAny, {
1205
- scope: "alerts_realtime";
1206
- action: "create" | "update" | "delete" | "read" | "lock";
1787
+ scope: "alerts";
1788
+ action: "create" | "update" | "delete" | "read" | "lock" | "update_texts" | "update_dates" | "update_publish_status";
1207
1789
  resources: {
1208
1790
  agency_ids: string[];
1791
+ reference_types: string[];
1209
1792
  };
1210
1793
  }, {
1211
- scope: "alerts_realtime";
1212
- action: "create" | "update" | "delete" | "read" | "lock";
1794
+ scope: "alerts";
1795
+ action: "create" | "update" | "delete" | "read" | "lock" | "update_texts" | "update_dates" | "update_publish_status";
1213
1796
  resources?: {
1214
1797
  agency_ids?: string[] | undefined;
1798
+ reference_types?: string[] | undefined;
1215
1799
  } | undefined;
1216
1800
  }>, z.ZodObject<{
1217
1801
  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"]>;
@@ -1245,7 +1829,189 @@ export declare const UserSchema: z.ZodObject<Omit<{
1245
1829
  scope: "sams";
1246
1830
  action: "read";
1247
1831
  }>, z.ZodObject<{
1248
- action: z.ZodEnum<["create", "read", "lock", "request_approval"]>;
1832
+ action: z.ZodEnum<["create", "read", "lock", "request_approval"]>;
1833
+ resources: z.ZodDefault<z.ZodObject<{
1834
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1835
+ }, "strip", z.ZodTypeAny, {
1836
+ agency_ids: string[];
1837
+ }, {
1838
+ agency_ids?: string[] | undefined;
1839
+ }>>;
1840
+ scope: z.ZodLiteral<"gtfs_validations">;
1841
+ }, "strip", z.ZodTypeAny, {
1842
+ scope: "gtfs_validations";
1843
+ action: "create" | "read" | "lock" | "request_approval";
1844
+ resources: {
1845
+ agency_ids: string[];
1846
+ };
1847
+ }, {
1848
+ scope: "gtfs_validations";
1849
+ action: "create" | "read" | "lock" | "request_approval";
1850
+ resources?: {
1851
+ agency_ids?: string[] | undefined;
1852
+ } | undefined;
1853
+ }>, z.ZodObject<{
1854
+ action: z.ZodEnum<["read_links", "read_wiki"]>;
1855
+ scope: z.ZodLiteral<"home">;
1856
+ }, "strip", z.ZodTypeAny, {
1857
+ scope: "home";
1858
+ action: "read_links" | "read_wiki";
1859
+ }, {
1860
+ scope: "home";
1861
+ action: "read_links" | "read_wiki";
1862
+ }>, z.ZodObject<{
1863
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1864
+ scope: z.ZodLiteral<"organizations">;
1865
+ }, "strip", z.ZodTypeAny, {
1866
+ scope: "organizations";
1867
+ action: "create" | "update" | "delete" | "read" | "lock";
1868
+ }, {
1869
+ scope: "organizations";
1870
+ action: "create" | "update" | "delete" | "read" | "lock";
1871
+ }>, z.ZodObject<{
1872
+ action: z.ZodEnum<["read"]>;
1873
+ scope: z.ZodLiteral<"performance">;
1874
+ }, "strip", z.ZodTypeAny, {
1875
+ scope: "performance";
1876
+ action: "read";
1877
+ }, {
1878
+ scope: "performance";
1879
+ action: "read";
1880
+ }>, z.ZodObject<{
1881
+ 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"]>;
1882
+ resources: z.ZodDefault<z.ZodObject<{
1883
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1884
+ }, "strip", z.ZodTypeAny, {
1885
+ agency_ids: string[];
1886
+ }, {
1887
+ agency_ids?: string[] | undefined;
1888
+ }>>;
1889
+ scope: z.ZodLiteral<"plans">;
1890
+ }, "strip", z.ZodTypeAny, {
1891
+ scope: "plans";
1892
+ action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
1893
+ resources: {
1894
+ agency_ids: string[];
1895
+ };
1896
+ }, {
1897
+ scope: "plans";
1898
+ action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
1899
+ resources?: {
1900
+ agency_ids?: string[] | undefined;
1901
+ } | undefined;
1902
+ }>, z.ZodObject<{
1903
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1904
+ scope: z.ZodLiteral<"roles">;
1905
+ }, "strip", z.ZodTypeAny, {
1906
+ scope: "roles";
1907
+ action: "create" | "update" | "delete" | "read" | "lock";
1908
+ }, {
1909
+ scope: "roles";
1910
+ action: "create" | "update" | "delete" | "read" | "lock";
1911
+ }>, z.ZodObject<{
1912
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1913
+ resources: z.ZodDefault<z.ZodObject<{
1914
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1915
+ municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1916
+ }, "strip", z.ZodTypeAny, {
1917
+ municipality_ids: string[];
1918
+ agency_ids: string[];
1919
+ }, {
1920
+ municipality_ids?: string[] | undefined;
1921
+ agency_ids?: string[] | undefined;
1922
+ }>>;
1923
+ scope: z.ZodLiteral<"stops">;
1924
+ }, "strip", z.ZodTypeAny, {
1925
+ scope: "stops";
1926
+ action: "create" | "update" | "delete" | "read" | "lock";
1927
+ resources: {
1928
+ municipality_ids: string[];
1929
+ agency_ids: string[];
1930
+ };
1931
+ }, {
1932
+ scope: "stops";
1933
+ action: "create" | "update" | "delete" | "read" | "lock";
1934
+ resources?: {
1935
+ municipality_ids?: string[] | undefined;
1936
+ agency_ids?: string[] | undefined;
1937
+ } | undefined;
1938
+ }>, z.ZodObject<{
1939
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1940
+ scope: z.ZodLiteral<"users">;
1941
+ }, "strip", z.ZodTypeAny, {
1942
+ scope: "users";
1943
+ action: "create" | "update" | "delete" | "read" | "lock";
1944
+ }, {
1945
+ scope: "users";
1946
+ action: "create" | "update" | "delete" | "read" | "lock";
1947
+ }>, z.ZodObject<{
1948
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1949
+ resources: z.ZodDefault<z.ZodObject<{
1950
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1951
+ }, "strip", z.ZodTypeAny, {
1952
+ agency_ids: string[];
1953
+ }, {
1954
+ agency_ids?: string[] | undefined;
1955
+ }>>;
1956
+ scope: z.ZodLiteral<"vehicles">;
1957
+ }, "strip", z.ZodTypeAny, {
1958
+ scope: "vehicles";
1959
+ action: "create" | "update" | "delete" | "read" | "lock";
1960
+ resources: {
1961
+ agency_ids: string[];
1962
+ };
1963
+ }, {
1964
+ scope: "vehicles";
1965
+ action: "create" | "update" | "delete" | "read" | "lock";
1966
+ resources?: {
1967
+ agency_ids?: string[] | undefined;
1968
+ } | undefined;
1969
+ }>, z.ZodObject<{
1970
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1971
+ resources: z.ZodDefault<z.ZodObject<{
1972
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1973
+ }, "strip", z.ZodTypeAny, {
1974
+ agency_ids: string[];
1975
+ }, {
1976
+ agency_ids?: string[] | undefined;
1977
+ }>>;
1978
+ scope: z.ZodLiteral<"fares">;
1979
+ }, "strip", z.ZodTypeAny, {
1980
+ scope: "fares";
1981
+ action: "create" | "update" | "delete" | "read" | "lock";
1982
+ resources: {
1983
+ agency_ids: string[];
1984
+ };
1985
+ }, {
1986
+ scope: "fares";
1987
+ action: "create" | "update" | "delete" | "read" | "lock";
1988
+ resources?: {
1989
+ agency_ids?: string[] | undefined;
1990
+ } | undefined;
1991
+ }>, z.ZodObject<{
1992
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1993
+ resources: z.ZodDefault<z.ZodObject<{
1994
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1995
+ }, "strip", z.ZodTypeAny, {
1996
+ agency_ids: string[];
1997
+ }, {
1998
+ agency_ids?: string[] | undefined;
1999
+ }>>;
2000
+ scope: z.ZodLiteral<"annotations">;
2001
+ }, "strip", z.ZodTypeAny, {
2002
+ scope: "annotations";
2003
+ action: "create" | "update" | "delete" | "read" | "lock";
2004
+ resources: {
2005
+ agency_ids: string[];
2006
+ };
2007
+ }, {
2008
+ scope: "annotations";
2009
+ action: "create" | "update" | "delete" | "read" | "lock";
2010
+ resources?: {
2011
+ agency_ids?: string[] | undefined;
2012
+ } | undefined;
2013
+ }>, z.ZodObject<{
2014
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1249
2015
  resources: z.ZodDefault<z.ZodObject<{
1250
2016
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1251
2017
  }, "strip", z.ZodTypeAny, {
@@ -1253,48 +2019,21 @@ export declare const UserSchema: z.ZodObject<Omit<{
1253
2019
  }, {
1254
2020
  agency_ids?: string[] | undefined;
1255
2021
  }>>;
1256
- scope: z.ZodLiteral<"gtfs_validations">;
2022
+ scope: z.ZodLiteral<"periods">;
1257
2023
  }, "strip", z.ZodTypeAny, {
1258
- scope: "gtfs_validations";
1259
- action: "create" | "read" | "lock" | "request_approval";
2024
+ scope: "periods";
2025
+ action: "create" | "update" | "delete" | "read" | "lock";
1260
2026
  resources: {
1261
2027
  agency_ids: string[];
1262
2028
  };
1263
2029
  }, {
1264
- scope: "gtfs_validations";
1265
- action: "create" | "read" | "lock" | "request_approval";
2030
+ scope: "periods";
2031
+ action: "create" | "update" | "delete" | "read" | "lock";
1266
2032
  resources?: {
1267
2033
  agency_ids?: string[] | undefined;
1268
2034
  } | undefined;
1269
- }>, z.ZodObject<{
1270
- action: z.ZodEnum<["read_links", "read_wiki"]>;
1271
- scope: z.ZodLiteral<"home">;
1272
- }, "strip", z.ZodTypeAny, {
1273
- scope: "home";
1274
- action: "read_links" | "read_wiki";
1275
- }, {
1276
- scope: "home";
1277
- action: "read_links" | "read_wiki";
1278
2035
  }>, z.ZodObject<{
1279
2036
  action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1280
- scope: z.ZodLiteral<"organizations">;
1281
- }, "strip", z.ZodTypeAny, {
1282
- scope: "organizations";
1283
- action: "create" | "update" | "delete" | "read" | "lock";
1284
- }, {
1285
- scope: "organizations";
1286
- action: "create" | "update" | "delete" | "read" | "lock";
1287
- }>, z.ZodObject<{
1288
- action: z.ZodEnum<["read"]>;
1289
- scope: z.ZodLiteral<"performance">;
1290
- }, "strip", z.ZodTypeAny, {
1291
- scope: "performance";
1292
- action: "read";
1293
- }, {
1294
- scope: "performance";
1295
- action: "read";
1296
- }>, z.ZodObject<{
1297
- 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"]>;
1298
2037
  resources: z.ZodDefault<z.ZodObject<{
1299
2038
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1300
2039
  }, "strip", z.ZodTypeAny, {
@@ -1302,66 +2041,43 @@ export declare const UserSchema: z.ZodObject<Omit<{
1302
2041
  }, {
1303
2042
  agency_ids?: string[] | undefined;
1304
2043
  }>>;
1305
- scope: z.ZodLiteral<"plans">;
2044
+ scope: z.ZodLiteral<"zones">;
1306
2045
  }, "strip", z.ZodTypeAny, {
1307
- scope: "plans";
1308
- action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
2046
+ scope: "zones";
2047
+ action: "create" | "update" | "delete" | "read" | "lock";
1309
2048
  resources: {
1310
2049
  agency_ids: string[];
1311
2050
  };
1312
2051
  }, {
1313
- scope: "plans";
1314
- action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
2052
+ scope: "zones";
2053
+ action: "create" | "update" | "delete" | "read" | "lock";
1315
2054
  resources?: {
1316
2055
  agency_ids?: string[] | undefined;
1317
2056
  } | undefined;
1318
- }>, z.ZodObject<{
1319
- action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1320
- scope: z.ZodLiteral<"roles">;
1321
- }, "strip", z.ZodTypeAny, {
1322
- scope: "roles";
1323
- action: "create" | "update" | "delete" | "read" | "lock";
1324
- }, {
1325
- scope: "roles";
1326
- action: "create" | "update" | "delete" | "read" | "lock";
1327
2057
  }>, z.ZodObject<{
1328
2058
  action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1329
2059
  resources: z.ZodDefault<z.ZodObject<{
1330
2060
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1331
- municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1332
2061
  }, "strip", z.ZodTypeAny, {
1333
- municipality_ids: string[];
1334
2062
  agency_ids: string[];
1335
2063
  }, {
1336
- municipality_ids?: string[] | undefined;
1337
2064
  agency_ids?: string[] | undefined;
1338
2065
  }>>;
1339
- scope: z.ZodLiteral<"stops">;
2066
+ scope: z.ZodLiteral<"typologies">;
1340
2067
  }, "strip", z.ZodTypeAny, {
1341
- scope: "stops";
2068
+ scope: "typologies";
1342
2069
  action: "create" | "update" | "delete" | "read" | "lock";
1343
2070
  resources: {
1344
- municipality_ids: string[];
1345
2071
  agency_ids: string[];
1346
2072
  };
1347
2073
  }, {
1348
- scope: "stops";
2074
+ scope: "typologies";
1349
2075
  action: "create" | "update" | "delete" | "read" | "lock";
1350
2076
  resources?: {
1351
- municipality_ids?: string[] | undefined;
1352
2077
  agency_ids?: string[] | undefined;
1353
2078
  } | undefined;
1354
2079
  }>, z.ZodObject<{
1355
2080
  action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1356
- scope: z.ZodLiteral<"users">;
1357
- }, "strip", z.ZodTypeAny, {
1358
- scope: "users";
1359
- action: "create" | "update" | "delete" | "read" | "lock";
1360
- }, {
1361
- scope: "users";
1362
- action: "create" | "update" | "delete" | "read" | "lock";
1363
- }>, z.ZodObject<{
1364
- action: z.ZodEnum<["create_annotations", "delete_annotations", "read_annotations", "update_annotations", "lock_annotations"]>;
1365
2081
  resources: z.ZodDefault<z.ZodObject<{
1366
2082
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1367
2083
  }, "strip", z.ZodTypeAny, {
@@ -1369,16 +2085,16 @@ export declare const UserSchema: z.ZodObject<Omit<{
1369
2085
  }, {
1370
2086
  agency_ids?: string[] | undefined;
1371
2087
  }>>;
1372
- scope: z.ZodLiteral<"dates">;
2088
+ scope: z.ZodLiteral<"lines">;
1373
2089
  }, "strip", z.ZodTypeAny, {
1374
- scope: "dates";
1375
- action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
2090
+ scope: "lines";
2091
+ action: "create" | "update" | "delete" | "read" | "lock";
1376
2092
  resources: {
1377
2093
  agency_ids: string[];
1378
2094
  };
1379
2095
  }, {
1380
- scope: "dates";
1381
- action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
2096
+ scope: "lines";
2097
+ action: "create" | "update" | "delete" | "read" | "lock";
1382
2098
  resources?: {
1383
2099
  agency_ids?: string[] | undefined;
1384
2100
  } | undefined;
@@ -1394,6 +2110,7 @@ export declare const UserSchema: z.ZodObject<Omit<{
1394
2110
  created_at: number & {
1395
2111
  __brand: "UnixTimestamp";
1396
2112
  };
2113
+ created_by: string | null;
1397
2114
  is_locked: boolean;
1398
2115
  updated_at: number & {
1399
2116
  __brand: "UnixTimestamp";
@@ -1404,10 +2121,14 @@ export declare const UserSchema: z.ZodObject<Omit<{
1404
2121
  scope: "agencies";
1405
2122
  action: "create" | "update" | "delete" | "read" | "lock";
1406
2123
  } | {
1407
- scope: "alerts_scheduled";
1408
- action: "create" | "update" | "delete" | "read" | "lock";
2124
+ scope: "alerts";
2125
+ action: "create" | "update" | "delete" | "read" | "lock" | "update_texts" | "update_dates" | "update_publish_status";
2126
+ resources: {
2127
+ agency_ids: string[];
2128
+ reference_types: string[];
2129
+ };
1409
2130
  } | {
1410
- scope: "alerts_realtime";
2131
+ scope: "annotations";
1411
2132
  action: "create" | "update" | "delete" | "read" | "lock";
1412
2133
  resources: {
1413
2134
  agency_ids: string[];
@@ -1422,8 +2143,8 @@ export declare const UserSchema: z.ZodObject<Omit<{
1422
2143
  scope: "sams";
1423
2144
  action: "read";
1424
2145
  } | {
1425
- scope: "dates";
1426
- action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
2146
+ scope: "fares";
2147
+ action: "create" | "update" | "delete" | "read" | "lock";
1427
2148
  resources: {
1428
2149
  agency_ids: string[];
1429
2150
  };
@@ -1436,12 +2157,24 @@ export declare const UserSchema: z.ZodObject<Omit<{
1436
2157
  } | {
1437
2158
  scope: "home";
1438
2159
  action: "read_links" | "read_wiki";
2160
+ } | {
2161
+ scope: "lines";
2162
+ action: "create" | "update" | "delete" | "read" | "lock";
2163
+ resources: {
2164
+ agency_ids: string[];
2165
+ };
1439
2166
  } | {
1440
2167
  scope: "organizations";
1441
2168
  action: "create" | "update" | "delete" | "read" | "lock";
1442
2169
  } | {
1443
2170
  scope: "performance";
1444
2171
  action: "read";
2172
+ } | {
2173
+ scope: "periods";
2174
+ action: "create" | "update" | "delete" | "read" | "lock";
2175
+ resources: {
2176
+ agency_ids: string[];
2177
+ };
1445
2178
  } | {
1446
2179
  scope: "plans";
1447
2180
  action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
@@ -1458,9 +2191,27 @@ export declare const UserSchema: z.ZodObject<Omit<{
1458
2191
  municipality_ids: string[];
1459
2192
  agency_ids: string[];
1460
2193
  };
2194
+ } | {
2195
+ scope: "typologies";
2196
+ action: "create" | "update" | "delete" | "read" | "lock";
2197
+ resources: {
2198
+ agency_ids: string[];
2199
+ };
1461
2200
  } | {
1462
2201
  scope: "users";
1463
2202
  action: "create" | "update" | "delete" | "read" | "lock";
2203
+ } | {
2204
+ scope: "vehicles";
2205
+ action: "create" | "update" | "delete" | "read" | "lock";
2206
+ resources: {
2207
+ agency_ids: string[];
2208
+ };
2209
+ } | {
2210
+ scope: "zones";
2211
+ action: "create" | "update" | "delete" | "read" | "lock";
2212
+ resources: {
2213
+ agency_ids: string[];
2214
+ };
1464
2215
  })[];
1465
2216
  email_verified: import("../_common/unix-timestamp.js").UnixTimestamp | null;
1466
2217
  first_name: string;
@@ -1469,7 +2220,6 @@ export declare const UserSchema: z.ZodObject<Omit<{
1469
2220
  preferences: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null;
1470
2221
  role_ids: string[];
1471
2222
  seen_last_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
1472
- created_by?: string | undefined;
1473
2223
  updated_by?: string | undefined;
1474
2224
  }, {
1475
2225
  _id: string;
@@ -1479,7 +2229,7 @@ export declare const UserSchema: z.ZodObject<Omit<{
1479
2229
  first_name: string;
1480
2230
  last_name: string;
1481
2231
  organization_id: string;
1482
- created_by?: string | undefined;
2232
+ created_by?: string | null | undefined;
1483
2233
  is_locked?: boolean | undefined;
1484
2234
  updated_by?: string | undefined;
1485
2235
  phone?: string | null | undefined;
@@ -1487,10 +2237,14 @@ export declare const UserSchema: z.ZodObject<Omit<{
1487
2237
  scope: "agencies";
1488
2238
  action: "create" | "update" | "delete" | "read" | "lock";
1489
2239
  } | {
1490
- scope: "alerts_scheduled";
1491
- action: "create" | "update" | "delete" | "read" | "lock";
2240
+ scope: "alerts";
2241
+ action: "create" | "update" | "delete" | "read" | "lock" | "update_texts" | "update_dates" | "update_publish_status";
2242
+ resources?: {
2243
+ agency_ids?: string[] | undefined;
2244
+ reference_types?: string[] | undefined;
2245
+ } | undefined;
1492
2246
  } | {
1493
- scope: "alerts_realtime";
2247
+ scope: "annotations";
1494
2248
  action: "create" | "update" | "delete" | "read" | "lock";
1495
2249
  resources?: {
1496
2250
  agency_ids?: string[] | undefined;
@@ -1505,8 +2259,8 @@ export declare const UserSchema: z.ZodObject<Omit<{
1505
2259
  scope: "sams";
1506
2260
  action: "read";
1507
2261
  } | {
1508
- scope: "dates";
1509
- action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
2262
+ scope: "fares";
2263
+ action: "create" | "update" | "delete" | "read" | "lock";
1510
2264
  resources?: {
1511
2265
  agency_ids?: string[] | undefined;
1512
2266
  } | undefined;
@@ -1519,12 +2273,24 @@ export declare const UserSchema: z.ZodObject<Omit<{
1519
2273
  } | {
1520
2274
  scope: "home";
1521
2275
  action: "read_links" | "read_wiki";
2276
+ } | {
2277
+ scope: "lines";
2278
+ action: "create" | "update" | "delete" | "read" | "lock";
2279
+ resources?: {
2280
+ agency_ids?: string[] | undefined;
2281
+ } | undefined;
1522
2282
  } | {
1523
2283
  scope: "organizations";
1524
2284
  action: "create" | "update" | "delete" | "read" | "lock";
1525
2285
  } | {
1526
2286
  scope: "performance";
1527
2287
  action: "read";
2288
+ } | {
2289
+ scope: "periods";
2290
+ action: "create" | "update" | "delete" | "read" | "lock";
2291
+ resources?: {
2292
+ agency_ids?: string[] | undefined;
2293
+ } | undefined;
1528
2294
  } | {
1529
2295
  scope: "plans";
1530
2296
  action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
@@ -1541,9 +2307,27 @@ export declare const UserSchema: z.ZodObject<Omit<{
1541
2307
  municipality_ids?: string[] | undefined;
1542
2308
  agency_ids?: string[] | undefined;
1543
2309
  } | undefined;
2310
+ } | {
2311
+ scope: "typologies";
2312
+ action: "create" | "update" | "delete" | "read" | "lock";
2313
+ resources?: {
2314
+ agency_ids?: string[] | undefined;
2315
+ } | undefined;
1544
2316
  } | {
1545
2317
  scope: "users";
1546
2318
  action: "create" | "update" | "delete" | "read" | "lock";
2319
+ } | {
2320
+ scope: "vehicles";
2321
+ action: "create" | "update" | "delete" | "read" | "lock";
2322
+ resources?: {
2323
+ agency_ids?: string[] | undefined;
2324
+ } | undefined;
2325
+ } | {
2326
+ scope: "zones";
2327
+ action: "create" | "update" | "delete" | "read" | "lock";
2328
+ resources?: {
2329
+ agency_ids?: string[] | undefined;
2330
+ } | undefined;
1547
2331
  })[] | undefined;
1548
2332
  email_verified?: number | null | undefined;
1549
2333
  preferences?: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null | undefined;
@@ -1564,7 +2348,7 @@ export declare const UserDisplayFields: {
1564
2348
  export declare const UserDisplaySchema: z.ZodObject<Pick<Omit<{
1565
2349
  _id: z.ZodString;
1566
2350
  created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
1567
- created_by: z.ZodOptional<z.ZodString>;
2351
+ created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1568
2352
  is_locked: z.ZodDefault<z.ZodBoolean>;
1569
2353
  updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
1570
2354
  updated_by: z.ZodOptional<z.ZodString>;
@@ -1585,35 +2369,31 @@ export declare const UserDisplaySchema: z.ZodObject<Pick<Omit<{
1585
2369
  scope: "agencies";
1586
2370
  action: "create" | "update" | "delete" | "read" | "lock";
1587
2371
  }>, z.ZodObject<{
1588
- action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1589
- scope: z.ZodLiteral<"alerts_scheduled">;
1590
- }, "strip", z.ZodTypeAny, {
1591
- scope: "alerts_scheduled";
1592
- action: "create" | "update" | "delete" | "read" | "lock";
1593
- }, {
1594
- scope: "alerts_scheduled";
1595
- action: "create" | "update" | "delete" | "read" | "lock";
1596
- }>, z.ZodObject<{
1597
- action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
2372
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update", "update_texts", "update_dates", "update_publish_status"]>;
1598
2373
  resources: z.ZodDefault<z.ZodObject<{
1599
2374
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2375
+ reference_types: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1600
2376
  }, "strip", z.ZodTypeAny, {
1601
2377
  agency_ids: string[];
2378
+ reference_types: string[];
1602
2379
  }, {
1603
2380
  agency_ids?: string[] | undefined;
2381
+ reference_types?: string[] | undefined;
1604
2382
  }>>;
1605
- scope: z.ZodLiteral<"alerts_realtime">;
2383
+ scope: z.ZodLiteral<"alerts">;
1606
2384
  }, "strip", z.ZodTypeAny, {
1607
- scope: "alerts_realtime";
1608
- action: "create" | "update" | "delete" | "read" | "lock";
2385
+ scope: "alerts";
2386
+ action: "create" | "update" | "delete" | "read" | "lock" | "update_texts" | "update_dates" | "update_publish_status";
1609
2387
  resources: {
1610
2388
  agency_ids: string[];
2389
+ reference_types: string[];
1611
2390
  };
1612
2391
  }, {
1613
- scope: "alerts_realtime";
1614
- action: "create" | "update" | "delete" | "read" | "lock";
2392
+ scope: "alerts";
2393
+ action: "create" | "update" | "delete" | "read" | "lock" | "update_texts" | "update_dates" | "update_publish_status";
1615
2394
  resources?: {
1616
2395
  agency_ids?: string[] | undefined;
2396
+ reference_types?: string[] | undefined;
1617
2397
  } | undefined;
1618
2398
  }>, z.ZodObject<{
1619
2399
  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"]>;
@@ -1763,7 +2543,139 @@ export declare const UserDisplaySchema: z.ZodObject<Pick<Omit<{
1763
2543
  scope: "users";
1764
2544
  action: "create" | "update" | "delete" | "read" | "lock";
1765
2545
  }>, z.ZodObject<{
1766
- action: z.ZodEnum<["create_annotations", "delete_annotations", "read_annotations", "update_annotations", "lock_annotations"]>;
2546
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
2547
+ resources: z.ZodDefault<z.ZodObject<{
2548
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2549
+ }, "strip", z.ZodTypeAny, {
2550
+ agency_ids: string[];
2551
+ }, {
2552
+ agency_ids?: string[] | undefined;
2553
+ }>>;
2554
+ scope: z.ZodLiteral<"vehicles">;
2555
+ }, "strip", z.ZodTypeAny, {
2556
+ scope: "vehicles";
2557
+ action: "create" | "update" | "delete" | "read" | "lock";
2558
+ resources: {
2559
+ agency_ids: string[];
2560
+ };
2561
+ }, {
2562
+ scope: "vehicles";
2563
+ action: "create" | "update" | "delete" | "read" | "lock";
2564
+ resources?: {
2565
+ agency_ids?: string[] | undefined;
2566
+ } | undefined;
2567
+ }>, z.ZodObject<{
2568
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
2569
+ resources: z.ZodDefault<z.ZodObject<{
2570
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2571
+ }, "strip", z.ZodTypeAny, {
2572
+ agency_ids: string[];
2573
+ }, {
2574
+ agency_ids?: string[] | undefined;
2575
+ }>>;
2576
+ scope: z.ZodLiteral<"fares">;
2577
+ }, "strip", z.ZodTypeAny, {
2578
+ scope: "fares";
2579
+ action: "create" | "update" | "delete" | "read" | "lock";
2580
+ resources: {
2581
+ agency_ids: string[];
2582
+ };
2583
+ }, {
2584
+ scope: "fares";
2585
+ action: "create" | "update" | "delete" | "read" | "lock";
2586
+ resources?: {
2587
+ agency_ids?: string[] | undefined;
2588
+ } | undefined;
2589
+ }>, z.ZodObject<{
2590
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
2591
+ resources: z.ZodDefault<z.ZodObject<{
2592
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2593
+ }, "strip", z.ZodTypeAny, {
2594
+ agency_ids: string[];
2595
+ }, {
2596
+ agency_ids?: string[] | undefined;
2597
+ }>>;
2598
+ scope: z.ZodLiteral<"annotations">;
2599
+ }, "strip", z.ZodTypeAny, {
2600
+ scope: "annotations";
2601
+ action: "create" | "update" | "delete" | "read" | "lock";
2602
+ resources: {
2603
+ agency_ids: string[];
2604
+ };
2605
+ }, {
2606
+ scope: "annotations";
2607
+ action: "create" | "update" | "delete" | "read" | "lock";
2608
+ resources?: {
2609
+ agency_ids?: string[] | undefined;
2610
+ } | undefined;
2611
+ }>, z.ZodObject<{
2612
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
2613
+ resources: z.ZodDefault<z.ZodObject<{
2614
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2615
+ }, "strip", z.ZodTypeAny, {
2616
+ agency_ids: string[];
2617
+ }, {
2618
+ agency_ids?: string[] | undefined;
2619
+ }>>;
2620
+ scope: z.ZodLiteral<"periods">;
2621
+ }, "strip", z.ZodTypeAny, {
2622
+ scope: "periods";
2623
+ action: "create" | "update" | "delete" | "read" | "lock";
2624
+ resources: {
2625
+ agency_ids: string[];
2626
+ };
2627
+ }, {
2628
+ scope: "periods";
2629
+ action: "create" | "update" | "delete" | "read" | "lock";
2630
+ resources?: {
2631
+ agency_ids?: string[] | undefined;
2632
+ } | undefined;
2633
+ }>, z.ZodObject<{
2634
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
2635
+ resources: z.ZodDefault<z.ZodObject<{
2636
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2637
+ }, "strip", z.ZodTypeAny, {
2638
+ agency_ids: string[];
2639
+ }, {
2640
+ agency_ids?: string[] | undefined;
2641
+ }>>;
2642
+ scope: z.ZodLiteral<"zones">;
2643
+ }, "strip", z.ZodTypeAny, {
2644
+ scope: "zones";
2645
+ action: "create" | "update" | "delete" | "read" | "lock";
2646
+ resources: {
2647
+ agency_ids: string[];
2648
+ };
2649
+ }, {
2650
+ scope: "zones";
2651
+ action: "create" | "update" | "delete" | "read" | "lock";
2652
+ resources?: {
2653
+ agency_ids?: string[] | undefined;
2654
+ } | undefined;
2655
+ }>, z.ZodObject<{
2656
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
2657
+ resources: z.ZodDefault<z.ZodObject<{
2658
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2659
+ }, "strip", z.ZodTypeAny, {
2660
+ agency_ids: string[];
2661
+ }, {
2662
+ agency_ids?: string[] | undefined;
2663
+ }>>;
2664
+ scope: z.ZodLiteral<"typologies">;
2665
+ }, "strip", z.ZodTypeAny, {
2666
+ scope: "typologies";
2667
+ action: "create" | "update" | "delete" | "read" | "lock";
2668
+ resources: {
2669
+ agency_ids: string[];
2670
+ };
2671
+ }, {
2672
+ scope: "typologies";
2673
+ action: "create" | "update" | "delete" | "read" | "lock";
2674
+ resources?: {
2675
+ agency_ids?: string[] | undefined;
2676
+ } | undefined;
2677
+ }>, z.ZodObject<{
2678
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
1767
2679
  resources: z.ZodDefault<z.ZodObject<{
1768
2680
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1769
2681
  }, "strip", z.ZodTypeAny, {
@@ -1771,16 +2683,16 @@ export declare const UserDisplaySchema: z.ZodObject<Pick<Omit<{
1771
2683
  }, {
1772
2684
  agency_ids?: string[] | undefined;
1773
2685
  }>>;
1774
- scope: z.ZodLiteral<"dates">;
2686
+ scope: z.ZodLiteral<"lines">;
1775
2687
  }, "strip", z.ZodTypeAny, {
1776
- scope: "dates";
1777
- action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
2688
+ scope: "lines";
2689
+ action: "create" | "update" | "delete" | "read" | "lock";
1778
2690
  resources: {
1779
2691
  agency_ids: string[];
1780
2692
  };
1781
2693
  }, {
1782
- scope: "dates";
1783
- action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
2694
+ scope: "lines";
2695
+ action: "create" | "update" | "delete" | "read" | "lock";
1784
2696
  resources?: {
1785
2697
  agency_ids?: string[] | undefined;
1786
2698
  } | undefined;