@tmlmobilidade/types 20251217.1540.37 → 20251222.1537.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/_common/comment.js +15 -6
  2. package/dist/_common/document.d.ts +3 -0
  3. package/dist/_common/document.js +4 -3
  4. package/dist/_common/status.d.ts +15 -1
  5. package/dist/_common/status.js +24 -6
  6. package/dist/_common/unix-timestamp.d.ts +1 -1
  7. package/dist/_common/unix-timestamp.js +1 -1
  8. package/dist/agency.d.ts +18 -13
  9. package/dist/agency.js +1 -1
  10. package/dist/alert.d.ts +101 -112
  11. package/dist/alert.js +18 -19
  12. package/dist/apex/simplified-apex-location.d.ts +5 -4
  13. package/dist/apex/simplified-apex-location.js +6 -4
  14. package/dist/apex/simplified-apex-on-board-refund.d.ts +5 -4
  15. package/dist/apex/simplified-apex-on-board-refund.js +6 -4
  16. package/dist/apex/simplified-apex-on-board-sale.d.ts +5 -4
  17. package/dist/apex/simplified-apex-on-board-sale.js +6 -4
  18. package/dist/apex/simplified-apex-validation.d.ts +9 -8
  19. package/dist/apex/simplified-apex-validation.js +6 -4
  20. package/dist/auth/login.d.ts +1 -1
  21. package/dist/auth/login.js +1 -1
  22. package/dist/auth/role.d.ts +260 -149
  23. package/dist/auth/role.js +1 -1
  24. package/dist/auth/session.d.ts +9 -7
  25. package/dist/auth/session.js +6 -4
  26. package/dist/auth/user.d.ts +737 -207
  27. package/dist/auth/user.js +12 -9
  28. package/dist/auth/verification-token.d.ts +9 -14
  29. package/dist/auth/verification-token.js +8 -6
  30. package/dist/dates/annotation.d.ts +94 -0
  31. package/dist/dates/annotation.js +14 -0
  32. package/dist/dates/index.d.ts +1 -0
  33. package/dist/dates/index.js +1 -0
  34. package/dist/file-exports/{common.d.ts → base.d.ts} +6 -5
  35. package/dist/file-exports/{common.js → base.js} +7 -4
  36. package/dist/file-exports/file-exports.d.ts +124 -0
  37. package/dist/file-exports/file-exports.js +7 -0
  38. package/dist/file-exports/index.d.ts +3 -126
  39. package/dist/file-exports/index.js +3 -9
  40. package/dist/file-exports/ride-export.d.ts +13 -13
  41. package/dist/file-exports/ride-export.js +5 -5
  42. package/dist/file.d.ts +3 -3
  43. package/dist/file.js +4 -2
  44. package/dist/index.d.ts +2 -1
  45. package/dist/index.js +2 -1
  46. package/dist/notification.d.ts +9 -7
  47. package/dist/notification.js +4 -2
  48. package/dist/organization.d.ts +24 -15
  49. package/dist/organization.js +3 -3
  50. package/dist/permissions/agencies.d.ts +3 -3
  51. package/dist/permissions/agencies.js +1 -1
  52. package/dist/permissions/alerts.d.ts +6 -6
  53. package/dist/permissions/alerts.js +2 -2
  54. package/dist/permissions/dates.d.ts +25 -0
  55. package/dist/permissions/dates.js +16 -0
  56. package/dist/permissions/gtfs-validations.d.ts +3 -3
  57. package/dist/permissions/gtfs-validations.js +1 -0
  58. package/dist/permissions/index.d.ts +49 -27
  59. package/dist/permissions/index.js +2 -0
  60. package/dist/permissions/organizations.d.ts +3 -3
  61. package/dist/permissions/organizations.js +1 -0
  62. package/dist/permissions/plans.d.ts +3 -3
  63. package/dist/permissions/plans.js +1 -1
  64. package/dist/permissions/roles.d.ts +3 -3
  65. package/dist/permissions/roles.js +1 -0
  66. package/dist/permissions/stops.d.ts +3 -3
  67. package/dist/permissions/stops.js +1 -1
  68. package/dist/permissions/users.d.ts +3 -3
  69. package/dist/permissions/users.js +1 -0
  70. package/dist/plans/gtfs-validation.d.ts +12 -3
  71. package/dist/plans/gtfs-validation.js +1 -1
  72. package/dist/plans/plan-app-status.js +2 -2
  73. package/dist/plans/plan-pcgi-legacy.d.ts +1 -1
  74. package/dist/plans/plan-pcgi-legacy.js +1 -1
  75. package/dist/plans/plan.d.ts +9 -9
  76. package/dist/proposed-change.d.ts +12 -3
  77. package/dist/proposed-change.js +1 -1
  78. package/dist/rides/ride-acceptance.d.ts +23 -19
  79. package/dist/rides/ride-acceptance.js +5 -3
  80. package/dist/rides/ride-analysis.d.ts +16 -16
  81. package/dist/rides/ride-analysis.js +16 -16
  82. package/dist/rides/ride-audit.d.ts +11 -11
  83. package/dist/rides/ride-audit.js +1 -1
  84. package/dist/rides/ride-overrides.d.ts +1 -1
  85. package/dist/rides/ride-overrides.js +1 -1
  86. package/dist/rides/ride.d.ts +56 -55
  87. package/dist/rides/ride.js +10 -8
  88. package/dist/sams/sam-analysis.d.ts +1 -1
  89. package/dist/sams/sam-analysis.js +4 -4
  90. package/dist/sams/sam.d.ts +13 -13
  91. package/dist/sams/sam.js +7 -5
  92. package/dist/stops/connections.d.ts +3 -0
  93. package/dist/stops/connections.js +15 -0
  94. package/dist/stops/equipment.d.ts +3 -0
  95. package/dist/stops/equipment.js +9 -0
  96. package/dist/stops/facilities.d.ts +4 -0
  97. package/dist/stops/facilities.js +16 -0
  98. package/dist/stops/index.d.ts +9 -0
  99. package/dist/stops/index.js +9 -0
  100. package/dist/stops/jurisdiction.d.ts +4 -0
  101. package/dist/stops/jurisdiction.js +10 -0
  102. package/dist/stops/name-abbreviations.d.ts +11 -0
  103. package/dist/stops/name-abbreviations.js +117 -0
  104. package/dist/stops/parent-station.d.ts +76 -0
  105. package/dist/stops/parent-station.js +11 -0
  106. package/dist/stops/road-type.d.ts +3 -0
  107. package/dist/stops/road-type.js +13 -0
  108. package/dist/stops/stop-area.d.ts +67 -0
  109. package/dist/stops/stop-area.js +10 -0
  110. package/dist/{stop.d.ts → stops/stop.d.ts} +271 -345
  111. package/dist/stops/stop.js +78 -0
  112. package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.d.ts +1 -21
  113. package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.js +4 -5
  114. package/dist/vehicle-events/simplified-vehicle-event.d.ts +4 -3
  115. package/dist/vehicle-events/simplified-vehicle-event.js +6 -4
  116. package/dist/zone.d.ts +10 -10
  117. package/dist/zone.js +1 -1
  118. package/package.json +2 -2
  119. package/dist/stop.js +0 -102
@@ -1,24 +1,24 @@
1
1
  import { z } from 'zod';
2
2
  export declare const PermissionSchema: z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
3
- action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
3
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
4
4
  scope: z.ZodLiteral<"agencies">;
5
5
  }, "strip", z.ZodTypeAny, {
6
6
  scope: "agencies";
7
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
7
+ action: "create" | "update" | "delete" | "read" | "lock";
8
8
  }, {
9
9
  scope: "agencies";
10
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
10
+ action: "create" | "update" | "delete" | "read" | "lock";
11
11
  }>, z.ZodObject<{
12
- action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
12
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
13
13
  scope: z.ZodLiteral<"alerts_scheduled">;
14
14
  }, "strip", z.ZodTypeAny, {
15
15
  scope: "alerts_scheduled";
16
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
16
+ action: "create" | "update" | "delete" | "read" | "lock";
17
17
  }, {
18
18
  scope: "alerts_scheduled";
19
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
19
+ action: "create" | "update" | "delete" | "read" | "lock";
20
20
  }>, z.ZodObject<{
21
- action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
21
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
22
22
  resources: z.ZodDefault<z.ZodObject<{
23
23
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
24
24
  }, "strip", z.ZodTypeAny, {
@@ -29,13 +29,13 @@ export declare const PermissionSchema: z.ZodDiscriminatedUnion<"scope", [z.ZodOb
29
29
  scope: z.ZodLiteral<"alerts_realtime">;
30
30
  }, "strip", z.ZodTypeAny, {
31
31
  scope: "alerts_realtime";
32
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
32
+ action: "create" | "update" | "delete" | "read" | "lock";
33
33
  resources: {
34
34
  agency_ids: string[];
35
35
  };
36
36
  }, {
37
37
  scope: "alerts_realtime";
38
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
38
+ action: "create" | "update" | "delete" | "read" | "lock";
39
39
  resources?: {
40
40
  agency_ids?: string[] | undefined;
41
41
  } | undefined;
@@ -71,7 +71,7 @@ export declare const PermissionSchema: z.ZodDiscriminatedUnion<"scope", [z.ZodOb
71
71
  scope: "sams";
72
72
  action: "read";
73
73
  }>, z.ZodObject<{
74
- action: z.ZodEnum<["create", "read", "request_approval"]>;
74
+ action: z.ZodEnum<["create", "read", "lock", "request_approval"]>;
75
75
  resources: z.ZodDefault<z.ZodObject<{
76
76
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
77
77
  }, "strip", z.ZodTypeAny, {
@@ -82,13 +82,13 @@ export declare const PermissionSchema: z.ZodDiscriminatedUnion<"scope", [z.ZodOb
82
82
  scope: z.ZodLiteral<"gtfs_validations">;
83
83
  }, "strip", z.ZodTypeAny, {
84
84
  scope: "gtfs_validations";
85
- action: "create" | "read" | "request_approval";
85
+ action: "create" | "read" | "lock" | "request_approval";
86
86
  resources: {
87
87
  agency_ids: string[];
88
88
  };
89
89
  }, {
90
90
  scope: "gtfs_validations";
91
- action: "create" | "read" | "request_approval";
91
+ action: "create" | "read" | "lock" | "request_approval";
92
92
  resources?: {
93
93
  agency_ids?: string[] | undefined;
94
94
  } | undefined;
@@ -102,14 +102,14 @@ export declare const PermissionSchema: z.ZodDiscriminatedUnion<"scope", [z.ZodOb
102
102
  scope: "home";
103
103
  action: "read_links" | "read_wiki";
104
104
  }>, z.ZodObject<{
105
- action: z.ZodEnum<["create", "delete", "read", "update"]>;
105
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
106
106
  scope: z.ZodLiteral<"organizations">;
107
107
  }, "strip", z.ZodTypeAny, {
108
108
  scope: "organizations";
109
- action: "create" | "update" | "delete" | "read";
109
+ action: "create" | "update" | "delete" | "read" | "lock";
110
110
  }, {
111
111
  scope: "organizations";
112
- action: "create" | "update" | "delete" | "read";
112
+ action: "create" | "update" | "delete" | "read" | "lock";
113
113
  }>, z.ZodObject<{
114
114
  action: z.ZodEnum<["read"]>;
115
115
  scope: z.ZodLiteral<"performance">;
@@ -120,7 +120,7 @@ export declare const PermissionSchema: z.ZodDiscriminatedUnion<"scope", [z.ZodOb
120
120
  scope: "performance";
121
121
  action: "read";
122
122
  }>, z.ZodObject<{
123
- action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "toggle_lock", "update", "update_controller", "update_feed_info_dates", "update_gtfs_plan", "update_pcgi_legacy"]>;
123
+ 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"]>;
124
124
  resources: z.ZodDefault<z.ZodObject<{
125
125
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
126
126
  }, "strip", z.ZodTypeAny, {
@@ -131,27 +131,27 @@ export declare const PermissionSchema: z.ZodDiscriminatedUnion<"scope", [z.ZodOb
131
131
  scope: z.ZodLiteral<"plans">;
132
132
  }, "strip", z.ZodTypeAny, {
133
133
  scope: "plans";
134
- action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
134
+ action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
135
135
  resources: {
136
136
  agency_ids: string[];
137
137
  };
138
138
  }, {
139
139
  scope: "plans";
140
- action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
140
+ action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
141
141
  resources?: {
142
142
  agency_ids?: string[] | undefined;
143
143
  } | undefined;
144
144
  }>, z.ZodObject<{
145
- action: z.ZodEnum<["create", "delete", "read", "update"]>;
145
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
146
146
  scope: z.ZodLiteral<"roles">;
147
147
  }, "strip", z.ZodTypeAny, {
148
148
  scope: "roles";
149
- action: "create" | "update" | "delete" | "read";
149
+ action: "create" | "update" | "delete" | "read" | "lock";
150
150
  }, {
151
151
  scope: "roles";
152
- action: "create" | "update" | "delete" | "read";
152
+ action: "create" | "update" | "delete" | "read" | "lock";
153
153
  }>, z.ZodObject<{
154
- action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
154
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
155
155
  resources: z.ZodDefault<z.ZodObject<{
156
156
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
157
157
  municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -165,27 +165,49 @@ export declare const PermissionSchema: z.ZodDiscriminatedUnion<"scope", [z.ZodOb
165
165
  scope: z.ZodLiteral<"stops">;
166
166
  }, "strip", z.ZodTypeAny, {
167
167
  scope: "stops";
168
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
168
+ action: "create" | "update" | "delete" | "read" | "lock";
169
169
  resources: {
170
170
  municipality_ids: string[];
171
171
  agency_ids: string[];
172
172
  };
173
173
  }, {
174
174
  scope: "stops";
175
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
175
+ action: "create" | "update" | "delete" | "read" | "lock";
176
176
  resources?: {
177
177
  municipality_ids?: string[] | undefined;
178
178
  agency_ids?: string[] | undefined;
179
179
  } | undefined;
180
180
  }>, z.ZodObject<{
181
- action: z.ZodEnum<["create", "delete", "read", "update"]>;
181
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
182
182
  scope: z.ZodLiteral<"users">;
183
183
  }, "strip", z.ZodTypeAny, {
184
184
  scope: "users";
185
- action: "create" | "update" | "delete" | "read";
185
+ action: "create" | "update" | "delete" | "read" | "lock";
186
186
  }, {
187
187
  scope: "users";
188
- action: "create" | "update" | "delete" | "read";
188
+ action: "create" | "update" | "delete" | "read" | "lock";
189
+ }>, z.ZodObject<{
190
+ action: z.ZodEnum<["create_annotations", "delete_annotations", "read_annotations", "update_annotations", "lock_annotations"]>;
191
+ resources: z.ZodDefault<z.ZodObject<{
192
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
193
+ }, "strip", z.ZodTypeAny, {
194
+ agency_ids: string[];
195
+ }, {
196
+ agency_ids?: string[] | undefined;
197
+ }>>;
198
+ scope: z.ZodLiteral<"dates">;
199
+ }, "strip", z.ZodTypeAny, {
200
+ scope: "dates";
201
+ action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
202
+ resources: {
203
+ agency_ids: string[];
204
+ };
205
+ }, {
206
+ scope: "dates";
207
+ action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
208
+ resources?: {
209
+ agency_ids?: string[] | undefined;
210
+ } | undefined;
189
211
  }>]>;
190
212
  export type Permission = z.infer<typeof PermissionSchema>;
191
213
  export type ActionsOf<S extends Permission['scope']> = Extract<Permission, {
@@ -3,6 +3,7 @@
3
3
  import { AgenciesPermissionSchema } from './agencies.js';
4
4
  import { AlertsRealtimePermissionSchema, AlertsScheduledPermissionSchema } from './alerts.js';
5
5
  import { RidesPermissionSchema, SamsPermissionSchema } from './controller.js';
6
+ import { DatesPermissionSchema } from './dates.js';
6
7
  import { GtfsValidationsPermissionSchema } from './gtfs-validations.js';
7
8
  import { HomePermissionSchema } from './home.js';
8
9
  import { OrganizationsPermissionSchema } from './organizations.js';
@@ -27,6 +28,7 @@ export const PermissionSchema = z.discriminatedUnion('scope', [
27
28
  RolesPermissionSchema,
28
29
  StopsPermissionSchema,
29
30
  UsersPermissionSchema,
31
+ DatesPermissionSchema,
30
32
  ]);
31
33
  /**
32
34
  * PermissionCatalog provides a structured catalog of all available permissions
@@ -1,12 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  export declare const OrganizationsPermissionSchema: z.ZodObject<{
3
- action: z.ZodEnum<["create", "delete", "read", "update"]>;
3
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
4
4
  scope: z.ZodLiteral<"organizations">;
5
5
  }, "strip", z.ZodTypeAny, {
6
6
  scope: "organizations";
7
- action: "create" | "update" | "delete" | "read";
7
+ action: "create" | "update" | "delete" | "read" | "lock";
8
8
  }, {
9
9
  scope: "organizations";
10
- action: "create" | "update" | "delete" | "read";
10
+ action: "create" | "update" | "delete" | "read" | "lock";
11
11
  }>;
12
12
  export type OrganizationsPermission = z.infer<typeof OrganizationsPermissionSchema>;
@@ -6,6 +6,7 @@ export const OrganizationsPermissionSchema = z.object({
6
6
  'create',
7
7
  'delete',
8
8
  'read',
9
+ 'lock',
9
10
  'update',
10
11
  ]),
11
12
  scope: z.literal('organizations'),
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const PlansPermissionSchema: z.ZodObject<{
3
- action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "toggle_lock", "update", "update_controller", "update_feed_info_dates", "update_gtfs_plan", "update_pcgi_legacy"]>;
3
+ 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"]>;
4
4
  resources: z.ZodDefault<z.ZodObject<{
5
5
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
6
6
  }, "strip", z.ZodTypeAny, {
@@ -11,13 +11,13 @@ export declare const PlansPermissionSchema: z.ZodObject<{
11
11
  scope: z.ZodLiteral<"plans">;
12
12
  }, "strip", z.ZodTypeAny, {
13
13
  scope: "plans";
14
- action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
14
+ action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
15
15
  resources: {
16
16
  agency_ids: string[];
17
17
  };
18
18
  }, {
19
19
  scope: "plans";
20
- action: "create" | "update" | "delete" | "read" | "toggle_lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
20
+ action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
21
21
  resources?: {
22
22
  agency_ids?: string[] | undefined;
23
23
  } | undefined;
@@ -8,7 +8,7 @@ export const PlansPermissionSchema = z.object({
8
8
  'read',
9
9
  'read_controller',
10
10
  'read_pcgi_legacy',
11
- 'toggle_lock',
11
+ 'lock',
12
12
  'update',
13
13
  'update_controller',
14
14
  'update_feed_info_dates',
@@ -1,12 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  export declare const RolesPermissionSchema: z.ZodObject<{
3
- action: z.ZodEnum<["create", "delete", "read", "update"]>;
3
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
4
4
  scope: z.ZodLiteral<"roles">;
5
5
  }, "strip", z.ZodTypeAny, {
6
6
  scope: "roles";
7
- action: "create" | "update" | "delete" | "read";
7
+ action: "create" | "update" | "delete" | "read" | "lock";
8
8
  }, {
9
9
  scope: "roles";
10
- action: "create" | "update" | "delete" | "read";
10
+ action: "create" | "update" | "delete" | "read" | "lock";
11
11
  }>;
12
12
  export type RolesPermission = z.infer<typeof RolesPermissionSchema>;
@@ -6,6 +6,7 @@ export const RolesPermissionSchema = z.object({
6
6
  'create',
7
7
  'delete',
8
8
  'read',
9
+ 'lock',
9
10
  'update',
10
11
  ]),
11
12
  scope: z.literal('roles'),
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const StopsPermissionSchema: z.ZodObject<{
3
- action: z.ZodEnum<["create", "delete", "read", "toggle_lock", "update"]>;
3
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
4
4
  resources: z.ZodDefault<z.ZodObject<{
5
5
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
6
6
  municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -14,14 +14,14 @@ export declare const StopsPermissionSchema: z.ZodObject<{
14
14
  scope: z.ZodLiteral<"stops">;
15
15
  }, "strip", z.ZodTypeAny, {
16
16
  scope: "stops";
17
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
17
+ action: "create" | "update" | "delete" | "read" | "lock";
18
18
  resources: {
19
19
  municipality_ids: string[];
20
20
  agency_ids: string[];
21
21
  };
22
22
  }, {
23
23
  scope: "stops";
24
- action: "create" | "update" | "delete" | "read" | "toggle_lock";
24
+ action: "create" | "update" | "delete" | "read" | "lock";
25
25
  resources?: {
26
26
  municipality_ids?: string[] | undefined;
27
27
  agency_ids?: string[] | undefined;
@@ -6,7 +6,7 @@ export const StopsPermissionSchema = z.object({
6
6
  'create',
7
7
  'delete',
8
8
  'read',
9
- 'toggle_lock',
9
+ 'lock',
10
10
  'update',
11
11
  ]),
12
12
  resources: z.object({
@@ -1,12 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  export declare const UsersPermissionSchema: z.ZodObject<{
3
- action: z.ZodEnum<["create", "delete", "read", "update"]>;
3
+ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
4
4
  scope: z.ZodLiteral<"users">;
5
5
  }, "strip", z.ZodTypeAny, {
6
6
  scope: "users";
7
- action: "create" | "update" | "delete" | "read";
7
+ action: "create" | "update" | "delete" | "read" | "lock";
8
8
  }, {
9
9
  scope: "users";
10
- action: "create" | "update" | "delete" | "read";
10
+ action: "create" | "update" | "delete" | "read" | "lock";
11
11
  }>;
12
12
  export type UsersPermission = z.infer<typeof UsersPermissionSchema>;
@@ -6,6 +6,7 @@ export const UsersPermissionSchema = z.object({
6
6
  'create',
7
7
  'delete',
8
8
  'read',
9
+ 'lock',
9
10
  'update',
10
11
  ]),
11
12
  scope: z.literal('users'),
@@ -78,6 +78,7 @@ export declare const GtfsValidationSchema: z.ZodObject<{
78
78
  _id: z.ZodString;
79
79
  created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
80
80
  created_by: z.ZodOptional<z.ZodString>;
81
+ is_locked: z.ZodDefault<z.ZodBoolean>;
81
82
  updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
82
83
  updated_by: z.ZodOptional<z.ZodString>;
83
84
  } & {
@@ -191,11 +192,12 @@ export declare const GtfsValidationSchema: z.ZodObject<{
191
192
  total_errors: number;
192
193
  total_warnings: number;
193
194
  }>>>;
194
- }, "strict", z.ZodTypeAny, {
195
+ }, "strip", z.ZodTypeAny, {
195
196
  _id: string;
196
197
  created_at: number & {
197
198
  __brand: "UnixTimestamp";
198
199
  };
200
+ is_locked: boolean;
199
201
  updated_at: number & {
200
202
  __brand: "UnixTimestamp";
201
203
  };
@@ -265,6 +267,7 @@ export declare const GtfsValidationSchema: z.ZodObject<{
265
267
  feed_version?: string | null | undefined;
266
268
  };
267
269
  created_by?: string | undefined;
270
+ is_locked?: boolean | undefined;
268
271
  updated_by?: string | undefined;
269
272
  notification_sent?: boolean | undefined;
270
273
  summary?: {
@@ -284,6 +287,7 @@ export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
284
287
  _id: z.ZodString;
285
288
  created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
286
289
  created_by: z.ZodOptional<z.ZodString>;
290
+ is_locked: z.ZodDefault<z.ZodBoolean>;
287
291
  updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
288
292
  updated_by: z.ZodOptional<z.ZodString>;
289
293
  } & {
@@ -397,7 +401,8 @@ export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
397
401
  total_errors: number;
398
402
  total_warnings: number;
399
403
  }>>>;
400
- }, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
404
+ }, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
405
+ is_locked: boolean;
401
406
  file_id: string;
402
407
  feeder_status: "waiting" | "processing" | "complete" | "error" | "skipped";
403
408
  gtfs_agency: {
@@ -461,6 +466,7 @@ export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
461
466
  feed_version?: string | null | undefined;
462
467
  };
463
468
  created_by?: string | undefined;
469
+ is_locked?: boolean | undefined;
464
470
  updated_by?: string | undefined;
465
471
  notification_sent?: boolean | undefined;
466
472
  summary?: {
@@ -477,6 +483,7 @@ export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
477
483
  } | null | undefined;
478
484
  }>;
479
485
  export declare const UpdateGtfsValidationSchema: z.ZodObject<{
486
+ is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
480
487
  updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
481
488
  file_id: z.ZodOptional<z.ZodString>;
482
489
  feeder_status: z.ZodOptional<z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>>;
@@ -588,7 +595,8 @@ export declare const UpdateGtfsValidationSchema: z.ZodObject<{
588
595
  total_errors: number;
589
596
  total_warnings: number;
590
597
  }>>>>;
591
- }, "strict", z.ZodTypeAny, {
598
+ }, "strip", z.ZodTypeAny, {
599
+ is_locked?: boolean | undefined;
592
600
  updated_by?: string | undefined;
593
601
  file_id?: string | undefined;
594
602
  feeder_status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
@@ -627,6 +635,7 @@ export declare const UpdateGtfsValidationSchema: z.ZodObject<{
627
635
  total_warnings: number;
628
636
  } | null | undefined;
629
637
  }, {
638
+ is_locked?: boolean | undefined;
630
639
  updated_by?: string | undefined;
631
640
  file_id?: string | undefined;
632
641
  feeder_status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
@@ -29,6 +29,6 @@ export const GtfsValidationSchema = DocumentSchema.extend({
29
29
  gtfs_feed_info: GtfsFeedInfoSchema,
30
30
  notification_sent: z.boolean().default(false),
31
31
  summary: GTFSValidatorSummarySchema.nullish(),
32
- }).strict();
32
+ });
33
33
  export const CreateGtfsValidationSchema = GtfsValidationSchema.omit({ _id: true, created_at: true, updated_at: true });
34
34
  export const UpdateGtfsValidationSchema = CreateGtfsValidationSchema.omit({ created_by: true }).partial();
@@ -1,10 +1,10 @@
1
1
  /* * */
2
2
  import { ProcessingStatusSchema } from '../_common/status.js';
3
- import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
3
+ import { UnixTimeStampSchema } from '../_common/unix-timestamp.js';
4
4
  import { z } from 'zod';
5
5
  /* * */
6
6
  export const PlanAppStatusSchema = z.object({
7
7
  last_hash: z.string().nullable().default(null),
8
8
  status: ProcessingStatusSchema.default('waiting'),
9
- timestamp: unixTimeStampSchema.nullable().default(null),
9
+ timestamp: UnixTimeStampSchema.nullable().default(null),
10
10
  }).default({});
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const PlanPcgiLegacySchema: z.ZodObject<{
3
3
  operation_plan_id: z.ZodNullable<z.ZodString>;
4
- }, "strict", z.ZodTypeAny, {
4
+ }, "strip", z.ZodTypeAny, {
5
5
  operation_plan_id: string | null;
6
6
  }, {
7
7
  operation_plan_id: string | null;
@@ -3,4 +3,4 @@ import { z } from 'zod';
3
3
  /* * */
4
4
  export const PlanPcgiLegacySchema = z.object({
5
5
  operation_plan_id: z.string().nullable(),
6
- }).strict();
6
+ });
@@ -120,7 +120,7 @@ export declare const PlanSchema: z.ZodObject<{
120
120
  operation_file_id: z.ZodString;
121
121
  pcgi_legacy: z.ZodObject<{
122
122
  operation_plan_id: z.ZodNullable<z.ZodString>;
123
- }, "strict", z.ZodTypeAny, {
123
+ }, "strip", z.ZodTypeAny, {
124
124
  operation_plan_id: string | null;
125
125
  }, {
126
126
  operation_plan_id: string | null;
@@ -130,10 +130,10 @@ export declare const PlanSchema: z.ZodObject<{
130
130
  created_at: number & {
131
131
  __brand: "UnixTimestamp";
132
132
  };
133
+ is_locked: boolean;
133
134
  updated_at: number & {
134
135
  __brand: "UnixTimestamp";
135
136
  };
136
- is_locked: boolean;
137
137
  gtfs_agency: {
138
138
  agency_id: string;
139
139
  agency_name: string;
@@ -205,8 +205,8 @@ export declare const PlanSchema: z.ZodObject<{
205
205
  operation_plan_id: string | null;
206
206
  };
207
207
  created_by?: string | undefined;
208
- updated_by?: string | undefined;
209
208
  is_locked?: boolean | undefined;
209
+ updated_by?: string | undefined;
210
210
  apps?: {
211
211
  controller?: {
212
212
  status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
@@ -341,7 +341,7 @@ export declare const CreatePlanSchema: z.ZodObject<Omit<{
341
341
  operation_file_id: z.ZodString;
342
342
  pcgi_legacy: z.ZodObject<{
343
343
  operation_plan_id: z.ZodNullable<z.ZodString>;
344
- }, "strict", z.ZodTypeAny, {
344
+ }, "strip", z.ZodTypeAny, {
345
345
  operation_plan_id: string | null;
346
346
  }, {
347
347
  operation_plan_id: string | null;
@@ -416,8 +416,8 @@ export declare const CreatePlanSchema: z.ZodObject<Omit<{
416
416
  operation_plan_id: string | null;
417
417
  };
418
418
  created_by?: string | undefined;
419
- updated_by?: string | undefined;
420
419
  is_locked?: boolean | undefined;
420
+ updated_by?: string | undefined;
421
421
  apps?: {
422
422
  controller?: {
423
423
  status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
@@ -432,8 +432,8 @@ export declare const CreatePlanSchema: z.ZodObject<Omit<{
432
432
  } | undefined;
433
433
  }>;
434
434
  export declare const UpdatePlanSchema: z.ZodObject<{
435
- updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
436
435
  is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
436
+ updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
437
437
  gtfs_agency: z.ZodOptional<z.ZodObject<{
438
438
  agency_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
439
439
  agency_fare_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -547,14 +547,14 @@ export declare const UpdatePlanSchema: z.ZodObject<{
547
547
  operation_file_id: z.ZodOptional<z.ZodString>;
548
548
  pcgi_legacy: z.ZodOptional<z.ZodObject<{
549
549
  operation_plan_id: z.ZodNullable<z.ZodString>;
550
- }, "strict", z.ZodTypeAny, {
550
+ }, "strip", z.ZodTypeAny, {
551
551
  operation_plan_id: string | null;
552
552
  }, {
553
553
  operation_plan_id: string | null;
554
554
  }>>;
555
555
  }, "strip", z.ZodTypeAny, {
556
- updated_by?: string | undefined;
557
556
  is_locked?: boolean | undefined;
557
+ updated_by?: string | undefined;
558
558
  gtfs_agency?: {
559
559
  agency_id: string;
560
560
  agency_name: string;
@@ -594,8 +594,8 @@ export declare const UpdatePlanSchema: z.ZodObject<{
594
594
  operation_plan_id: string | null;
595
595
  } | undefined;
596
596
  }, {
597
- updated_by?: string | undefined;
598
597
  is_locked?: boolean | undefined;
598
+ updated_by?: string | undefined;
599
599
  gtfs_agency?: {
600
600
  agency_id: string;
601
601
  agency_name: string;
@@ -7,6 +7,7 @@ export declare const ProposedChangeSchema: z.ZodObject<{
7
7
  _id: z.ZodString;
8
8
  created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
9
9
  created_by: z.ZodOptional<z.ZodString>;
10
+ is_locked: z.ZodDefault<z.ZodBoolean>;
10
11
  updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
11
12
  updated_by: z.ZodOptional<z.ZodString>;
12
13
  } & {
@@ -15,11 +16,12 @@ export declare const ProposedChangeSchema: z.ZodObject<{
15
16
  related_id: z.ZodString;
16
17
  scope: z.ZodEnum<["stop", "lines"]>;
17
18
  status: z.ZodEnum<["pending", "approved", "rejected", "none"]>;
18
- }, "strict", z.ZodTypeAny, {
19
+ }, "strip", z.ZodTypeAny, {
19
20
  _id: string;
20
21
  created_at: number & {
21
22
  __brand: "UnixTimestamp";
22
23
  };
24
+ is_locked: boolean;
23
25
  updated_at: number & {
24
26
  __brand: "UnixTimestamp";
25
27
  };
@@ -39,6 +41,7 @@ export declare const ProposedChangeSchema: z.ZodObject<{
39
41
  field: string;
40
42
  related_id: string;
41
43
  created_by?: string | undefined;
44
+ is_locked?: boolean | undefined;
42
45
  updated_by?: string | undefined;
43
46
  curr_value?: any;
44
47
  }>;
@@ -60,6 +63,7 @@ export declare const CreateProposedChangeSchema: z.ZodObject<Omit<{
60
63
  _id: z.ZodString;
61
64
  created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
62
65
  created_by: z.ZodOptional<z.ZodString>;
66
+ is_locked: z.ZodDefault<z.ZodBoolean>;
63
67
  updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
64
68
  updated_by: z.ZodOptional<z.ZodString>;
65
69
  } & {
@@ -68,7 +72,8 @@ export declare const CreateProposedChangeSchema: z.ZodObject<Omit<{
68
72
  related_id: z.ZodString;
69
73
  scope: z.ZodEnum<["stop", "lines"]>;
70
74
  status: z.ZodEnum<["pending", "approved", "rejected", "none"]>;
71
- }, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
75
+ }, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
76
+ is_locked: boolean;
72
77
  status: "none" | "pending" | "approved" | "rejected";
73
78
  scope: "stop" | "lines";
74
79
  field: string;
@@ -82,17 +87,20 @@ export declare const CreateProposedChangeSchema: z.ZodObject<Omit<{
82
87
  field: string;
83
88
  related_id: string;
84
89
  created_by?: string | undefined;
90
+ is_locked?: boolean | undefined;
85
91
  updated_by?: string | undefined;
86
92
  curr_value?: any;
87
93
  }>;
88
94
  export declare const UpdateProposedChangeSchema: z.ZodObject<{
95
+ is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
89
96
  updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
90
97
  status: z.ZodOptional<z.ZodEnum<["pending", "approved", "rejected", "none"]>>;
91
98
  scope: z.ZodOptional<z.ZodEnum<["stop", "lines"]>>;
92
99
  curr_value: z.ZodOptional<z.ZodAny>;
93
100
  field: z.ZodOptional<z.ZodString>;
94
101
  related_id: z.ZodOptional<z.ZodString>;
95
- }, "strict", z.ZodTypeAny, {
102
+ }, "strip", z.ZodTypeAny, {
103
+ is_locked?: boolean | undefined;
96
104
  updated_by?: string | undefined;
97
105
  status?: "none" | "pending" | "approved" | "rejected" | undefined;
98
106
  scope?: "stop" | "lines" | undefined;
@@ -100,6 +108,7 @@ export declare const UpdateProposedChangeSchema: z.ZodObject<{
100
108
  field?: string | undefined;
101
109
  related_id?: string | undefined;
102
110
  }, {
111
+ is_locked?: boolean | undefined;
103
112
  updated_by?: string | undefined;
104
113
  status?: "none" | "pending" | "approved" | "rejected" | undefined;
105
114
  scope?: "stop" | "lines" | undefined;
@@ -13,6 +13,6 @@ export const ProposedChangeSchema = DocumentSchema.extend({
13
13
  related_id: z.string(),
14
14
  scope: ScopeSchema,
15
15
  status: ApprovalStatusSchema,
16
- }).strict();
16
+ });
17
17
  export const CreateProposedChangeSchema = ProposedChangeSchema.omit({ _id: true, created_at: true, updated_at: true });
18
18
  export const UpdateProposedChangeSchema = CreateProposedChangeSchema.omit({ created_by: true }).partial();