@tmlmobilidade/go-types-gtfs-rt 20260627.41.35

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 (77) hide show
  1. package/dist/alert/alert-cause.d.ts +10 -0
  2. package/dist/alert/alert-cause.js +18 -0
  3. package/dist/alert/alert-effect.d.ts +10 -0
  4. package/dist/alert/alert-effect.js +17 -0
  5. package/dist/alert/alert.d.ts +347 -0
  6. package/dist/alert/alert.js +24 -0
  7. package/dist/alert/entity-selector.d.ts +68 -0
  8. package/dist/alert/entity-selector.js +12 -0
  9. package/dist/alert/index.d.ts +10 -0
  10. package/dist/alert/index.js +10 -0
  11. package/dist/alert/localized-image.d.ts +15 -0
  12. package/dist/alert/localized-image.js +8 -0
  13. package/dist/alert/severity-level.d.ts +4 -0
  14. package/dist/alert/severity-level.js +10 -0
  15. package/dist/alert/time-range.d.ts +12 -0
  16. package/dist/alert/time-range.js +7 -0
  17. package/dist/alert/translated-image.d.ts +29 -0
  18. package/dist/alert/translated-image.js +7 -0
  19. package/dist/alert/translated-string.d.ts +24 -0
  20. package/dist/alert/translated-string.js +7 -0
  21. package/dist/alert/translation.d.ts +12 -0
  22. package/dist/alert/translation.js +7 -0
  23. package/dist/feed/feed-entity.d.ts +1065 -0
  24. package/dist/feed/feed-entity.js +15 -0
  25. package/dist/feed/feed-header.d.ts +18 -0
  26. package/dist/feed/feed-header.js +9 -0
  27. package/dist/feed/feed-message.d.ts +1405 -0
  28. package/dist/feed/feed-message.js +9 -0
  29. package/dist/feed/index.d.ts +3 -0
  30. package/dist/feed/index.js +3 -0
  31. package/dist/index.d.ts +8 -0
  32. package/dist/index.js +8 -0
  33. package/dist/shape/index.d.ts +1 -0
  34. package/dist/shape/index.js +1 -0
  35. package/dist/shared/drop-off-pickup-type.d.ts +4 -0
  36. package/dist/shared/drop-off-pickup-type.js +10 -0
  37. package/dist/shared/index.d.ts +4 -0
  38. package/dist/shared/index.js +4 -0
  39. package/dist/shared/occupancy-status.d.ts +4 -0
  40. package/dist/shared/occupancy-status.js +15 -0
  41. package/dist/shared/schedule-relationship.d.ts +4 -0
  42. package/dist/shared/schedule-relationship.js +14 -0
  43. package/dist/shared/trip-descriptor.d.ts +29 -0
  44. package/dist/shared/trip-descriptor.js +14 -0
  45. package/dist/shared/vehicle-descriptor.d.ts +18 -0
  46. package/dist/shared/vehicle-descriptor.js +10 -0
  47. package/dist/shared/wheelchair-accessible.d.ts +4 -0
  48. package/dist/shared/wheelchair-accessible.js +10 -0
  49. package/dist/stop/index.d.ts +1 -0
  50. package/dist/stop/index.js +1 -0
  51. package/dist/trip-modifications/index.d.ts +1 -0
  52. package/dist/trip-modifications/index.js +1 -0
  53. package/dist/trip-update/index.d.ts +3 -0
  54. package/dist/trip-update/index.js +3 -0
  55. package/dist/trip-update/stop-time-event.d.ts +12 -0
  56. package/dist/trip-update/stop-time-event.js +9 -0
  57. package/dist/trip-update/stop-time-properties.d.ts +18 -0
  58. package/dist/trip-update/stop-time-properties.js +10 -0
  59. package/dist/trip-update/stop-time-update.d.ts +82 -0
  60. package/dist/trip-update/stop-time-update.js +16 -0
  61. package/dist/trip-update/trip-properties.d.ts +24 -0
  62. package/dist/trip-update/trip-properties.js +12 -0
  63. package/dist/trip-update/trip-update.d.ts +245 -0
  64. package/dist/trip-update/trip-update.js +15 -0
  65. package/dist/vehicle-position/carriage-details.d.ts +21 -0
  66. package/dist/vehicle-position/carriage-details.js +11 -0
  67. package/dist/vehicle-position/congestion-level.d.ts +4 -0
  68. package/dist/vehicle-position/congestion-level.js +11 -0
  69. package/dist/vehicle-position/index.d.ts +5 -0
  70. package/dist/vehicle-position/index.js +5 -0
  71. package/dist/vehicle-position/position.d.ts +21 -0
  72. package/dist/vehicle-position/position.js +10 -0
  73. package/dist/vehicle-position/vehicle-position.d.ts +168 -0
  74. package/dist/vehicle-position/vehicle-position.js +23 -0
  75. package/dist/vehicle-position/vehicle-stop-status.d.ts +4 -0
  76. package/dist/vehicle-position/vehicle-stop-status.js +9 -0
  77. package/package.json +51 -0
@@ -0,0 +1,245 @@
1
+ import { z } from 'zod';
2
+ export declare const GtfsRtTripUpdateSchema: z.ZodObject<{
3
+ delay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4
+ stop_time_update: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
5
+ arrival: z.ZodObject<{
6
+ delay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7
+ time: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ delay?: number | null | undefined;
10
+ time?: number | null | undefined;
11
+ }, {
12
+ delay?: number | null | undefined;
13
+ time?: number | null | undefined;
14
+ }>;
15
+ departure: z.ZodObject<{
16
+ delay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
17
+ time: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ delay?: number | null | undefined;
20
+ time?: number | null | undefined;
21
+ }, {
22
+ delay?: number | null | undefined;
23
+ time?: number | null | undefined;
24
+ }>;
25
+ departure_occupancy_status: z.ZodOptional<z.ZodNullable<z.ZodEnum<["EMPTY", "MANY_SEATS_AVAILABLE", "FEW_SEATS_AVAILABLE", "STANDING_ROOM_ONLY", "CRUSHED_STANDING_ROOM_ONLY", "FULL", "NOT_ACCEPTING_PASSENGERS", "NO_DATA_AVAILABLE", "NOT_BOARDABLE"]>>>;
26
+ schedule_relationship: z.ZodOptional<z.ZodNullable<z.ZodEnum<["SCHEDULED", "CANCELED", "REPLACEMENT", "DUPLICATED", "NEW", "DELETED"]>>>;
27
+ stop_id: z.ZodString;
28
+ stop_sequence: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
29
+ stop_time_properties: z.ZodOptional<z.ZodNullable<z.ZodObject<{
30
+ assigned_stop_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
+ drop_off_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<["REGULAR", "NONE", "PHONE_AGENCY", "COORDINATE_WITH_DRIVER"]>>>;
32
+ pickup_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<["REGULAR", "NONE", "PHONE_AGENCY", "COORDINATE_WITH_DRIVER"]>>>;
33
+ stop_headsign: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
+ }, "strip", z.ZodTypeAny, {
35
+ assigned_stop_id?: string | null | undefined;
36
+ drop_off_type?: "REGULAR" | "NONE" | "PHONE_AGENCY" | "COORDINATE_WITH_DRIVER" | null | undefined;
37
+ pickup_type?: "REGULAR" | "NONE" | "PHONE_AGENCY" | "COORDINATE_WITH_DRIVER" | null | undefined;
38
+ stop_headsign?: string | null | undefined;
39
+ }, {
40
+ assigned_stop_id?: string | null | undefined;
41
+ drop_off_type?: "REGULAR" | "NONE" | "PHONE_AGENCY" | "COORDINATE_WITH_DRIVER" | null | undefined;
42
+ pickup_type?: "REGULAR" | "NONE" | "PHONE_AGENCY" | "COORDINATE_WITH_DRIVER" | null | undefined;
43
+ stop_headsign?: string | null | undefined;
44
+ }>>>;
45
+ }, "strip", z.ZodTypeAny, {
46
+ stop_id: string;
47
+ arrival: {
48
+ delay?: number | null | undefined;
49
+ time?: number | null | undefined;
50
+ };
51
+ departure: {
52
+ delay?: number | null | undefined;
53
+ time?: number | null | undefined;
54
+ };
55
+ schedule_relationship?: "SCHEDULED" | "CANCELED" | "REPLACEMENT" | "DUPLICATED" | "NEW" | "DELETED" | null | undefined;
56
+ departure_occupancy_status?: "EMPTY" | "MANY_SEATS_AVAILABLE" | "FEW_SEATS_AVAILABLE" | "STANDING_ROOM_ONLY" | "CRUSHED_STANDING_ROOM_ONLY" | "FULL" | "NOT_ACCEPTING_PASSENGERS" | "NO_DATA_AVAILABLE" | "NOT_BOARDABLE" | null | undefined;
57
+ stop_sequence?: number | null | undefined;
58
+ stop_time_properties?: {
59
+ assigned_stop_id?: string | null | undefined;
60
+ drop_off_type?: "REGULAR" | "NONE" | "PHONE_AGENCY" | "COORDINATE_WITH_DRIVER" | null | undefined;
61
+ pickup_type?: "REGULAR" | "NONE" | "PHONE_AGENCY" | "COORDINATE_WITH_DRIVER" | null | undefined;
62
+ stop_headsign?: string | null | undefined;
63
+ } | null | undefined;
64
+ }, {
65
+ stop_id: string;
66
+ arrival: {
67
+ delay?: number | null | undefined;
68
+ time?: number | null | undefined;
69
+ };
70
+ departure: {
71
+ delay?: number | null | undefined;
72
+ time?: number | null | undefined;
73
+ };
74
+ schedule_relationship?: "SCHEDULED" | "CANCELED" | "REPLACEMENT" | "DUPLICATED" | "NEW" | "DELETED" | null | undefined;
75
+ departure_occupancy_status?: "EMPTY" | "MANY_SEATS_AVAILABLE" | "FEW_SEATS_AVAILABLE" | "STANDING_ROOM_ONLY" | "CRUSHED_STANDING_ROOM_ONLY" | "FULL" | "NOT_ACCEPTING_PASSENGERS" | "NO_DATA_AVAILABLE" | "NOT_BOARDABLE" | null | undefined;
76
+ stop_sequence?: number | null | undefined;
77
+ stop_time_properties?: {
78
+ assigned_stop_id?: string | null | undefined;
79
+ drop_off_type?: "REGULAR" | "NONE" | "PHONE_AGENCY" | "COORDINATE_WITH_DRIVER" | null | undefined;
80
+ pickup_type?: "REGULAR" | "NONE" | "PHONE_AGENCY" | "COORDINATE_WITH_DRIVER" | null | undefined;
81
+ stop_headsign?: string | null | undefined;
82
+ } | null | undefined;
83
+ }>, "many">>>;
84
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
85
+ trip: z.ZodObject<{
86
+ direction_id: z.ZodAny;
87
+ modified_trip: z.ZodAny;
88
+ route_id: z.ZodString;
89
+ schedule_relationship: z.ZodEnum<["SCHEDULED", "CANCELED", "REPLACEMENT", "DUPLICATED", "NEW", "DELETED"]>;
90
+ start_date: z.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-gtfs").GtfsDate, string>;
91
+ start_time: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-gtfs").GtfsTime, string>>>;
92
+ trip_id: z.ZodString;
93
+ }, "strip", z.ZodTypeAny, {
94
+ route_id: string;
95
+ schedule_relationship: "SCHEDULED" | "CANCELED" | "REPLACEMENT" | "DUPLICATED" | "NEW" | "DELETED";
96
+ start_date: string & {
97
+ __brand: "GtfsDate";
98
+ };
99
+ trip_id: string;
100
+ direction_id?: any;
101
+ modified_trip?: any;
102
+ start_time?: import("@tmlmobilidade/go-types-gtfs").GtfsTime | null | undefined;
103
+ }, {
104
+ route_id: string;
105
+ schedule_relationship: "SCHEDULED" | "CANCELED" | "REPLACEMENT" | "DUPLICATED" | "NEW" | "DELETED";
106
+ start_date: string;
107
+ trip_id: string;
108
+ direction_id?: any;
109
+ modified_trip?: any;
110
+ start_time?: string | null | undefined;
111
+ }>;
112
+ trip_properties: z.ZodOptional<z.ZodNullable<z.ZodObject<{
113
+ shape_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
114
+ start_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-gtfs").GtfsDate, string>>>;
115
+ start_time: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-gtfs").GtfsTime, string>>>;
116
+ trip_headsign: z.ZodOptional<z.ZodNullable<z.ZodString>>;
117
+ trip_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
118
+ trip_short_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
119
+ }, "strip", z.ZodTypeAny, {
120
+ start_date?: import("@tmlmobilidade/go-types-gtfs").GtfsDate | null | undefined;
121
+ start_time?: import("@tmlmobilidade/go-types-gtfs").GtfsTime | null | undefined;
122
+ trip_id?: string | null | undefined;
123
+ shape_id?: string | null | undefined;
124
+ trip_headsign?: string | null | undefined;
125
+ trip_short_name?: string | null | undefined;
126
+ }, {
127
+ start_date?: string | null | undefined;
128
+ start_time?: string | null | undefined;
129
+ trip_id?: string | null | undefined;
130
+ shape_id?: string | null | undefined;
131
+ trip_headsign?: string | null | undefined;
132
+ trip_short_name?: string | null | undefined;
133
+ }>>>;
134
+ vehicle: z.ZodObject<{
135
+ id: z.ZodString;
136
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
137
+ license_plate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
138
+ wheelchair_accessible: z.ZodEnum<["NO_VALUE", "UNKNOWN", "WHEELCHAIR_ACCESSIBLE", "WHEELCHAIR_INACCESSIBLE"]>;
139
+ }, "strip", z.ZodTypeAny, {
140
+ id: string;
141
+ wheelchair_accessible: "NO_VALUE" | "UNKNOWN" | "WHEELCHAIR_ACCESSIBLE" | "WHEELCHAIR_INACCESSIBLE";
142
+ label?: string | null | undefined;
143
+ license_plate?: string | null | undefined;
144
+ }, {
145
+ id: string;
146
+ wheelchair_accessible: "NO_VALUE" | "UNKNOWN" | "WHEELCHAIR_ACCESSIBLE" | "WHEELCHAIR_INACCESSIBLE";
147
+ label?: string | null | undefined;
148
+ license_plate?: string | null | undefined;
149
+ }>;
150
+ }, "strip", z.ZodTypeAny, {
151
+ trip: {
152
+ route_id: string;
153
+ schedule_relationship: "SCHEDULED" | "CANCELED" | "REPLACEMENT" | "DUPLICATED" | "NEW" | "DELETED";
154
+ start_date: string & {
155
+ __brand: "GtfsDate";
156
+ };
157
+ trip_id: string;
158
+ direction_id?: any;
159
+ modified_trip?: any;
160
+ start_time?: import("@tmlmobilidade/go-types-gtfs").GtfsTime | null | undefined;
161
+ };
162
+ vehicle: {
163
+ id: string;
164
+ wheelchair_accessible: "NO_VALUE" | "UNKNOWN" | "WHEELCHAIR_ACCESSIBLE" | "WHEELCHAIR_INACCESSIBLE";
165
+ label?: string | null | undefined;
166
+ license_plate?: string | null | undefined;
167
+ };
168
+ delay?: number | null | undefined;
169
+ stop_time_update?: {
170
+ stop_id: string;
171
+ arrival: {
172
+ delay?: number | null | undefined;
173
+ time?: number | null | undefined;
174
+ };
175
+ departure: {
176
+ delay?: number | null | undefined;
177
+ time?: number | null | undefined;
178
+ };
179
+ schedule_relationship?: "SCHEDULED" | "CANCELED" | "REPLACEMENT" | "DUPLICATED" | "NEW" | "DELETED" | null | undefined;
180
+ departure_occupancy_status?: "EMPTY" | "MANY_SEATS_AVAILABLE" | "FEW_SEATS_AVAILABLE" | "STANDING_ROOM_ONLY" | "CRUSHED_STANDING_ROOM_ONLY" | "FULL" | "NOT_ACCEPTING_PASSENGERS" | "NO_DATA_AVAILABLE" | "NOT_BOARDABLE" | null | undefined;
181
+ stop_sequence?: number | null | undefined;
182
+ stop_time_properties?: {
183
+ assigned_stop_id?: string | null | undefined;
184
+ drop_off_type?: "REGULAR" | "NONE" | "PHONE_AGENCY" | "COORDINATE_WITH_DRIVER" | null | undefined;
185
+ pickup_type?: "REGULAR" | "NONE" | "PHONE_AGENCY" | "COORDINATE_WITH_DRIVER" | null | undefined;
186
+ stop_headsign?: string | null | undefined;
187
+ } | null | undefined;
188
+ }[] | null | undefined;
189
+ timestamp?: number | null | undefined;
190
+ trip_properties?: {
191
+ start_date?: import("@tmlmobilidade/go-types-gtfs").GtfsDate | null | undefined;
192
+ start_time?: import("@tmlmobilidade/go-types-gtfs").GtfsTime | null | undefined;
193
+ trip_id?: string | null | undefined;
194
+ shape_id?: string | null | undefined;
195
+ trip_headsign?: string | null | undefined;
196
+ trip_short_name?: string | null | undefined;
197
+ } | null | undefined;
198
+ }, {
199
+ trip: {
200
+ route_id: string;
201
+ schedule_relationship: "SCHEDULED" | "CANCELED" | "REPLACEMENT" | "DUPLICATED" | "NEW" | "DELETED";
202
+ start_date: string;
203
+ trip_id: string;
204
+ direction_id?: any;
205
+ modified_trip?: any;
206
+ start_time?: string | null | undefined;
207
+ };
208
+ vehicle: {
209
+ id: string;
210
+ wheelchair_accessible: "NO_VALUE" | "UNKNOWN" | "WHEELCHAIR_ACCESSIBLE" | "WHEELCHAIR_INACCESSIBLE";
211
+ label?: string | null | undefined;
212
+ license_plate?: string | null | undefined;
213
+ };
214
+ delay?: number | null | undefined;
215
+ stop_time_update?: {
216
+ stop_id: string;
217
+ arrival: {
218
+ delay?: number | null | undefined;
219
+ time?: number | null | undefined;
220
+ };
221
+ departure: {
222
+ delay?: number | null | undefined;
223
+ time?: number | null | undefined;
224
+ };
225
+ schedule_relationship?: "SCHEDULED" | "CANCELED" | "REPLACEMENT" | "DUPLICATED" | "NEW" | "DELETED" | null | undefined;
226
+ departure_occupancy_status?: "EMPTY" | "MANY_SEATS_AVAILABLE" | "FEW_SEATS_AVAILABLE" | "STANDING_ROOM_ONLY" | "CRUSHED_STANDING_ROOM_ONLY" | "FULL" | "NOT_ACCEPTING_PASSENGERS" | "NO_DATA_AVAILABLE" | "NOT_BOARDABLE" | null | undefined;
227
+ stop_sequence?: number | null | undefined;
228
+ stop_time_properties?: {
229
+ assigned_stop_id?: string | null | undefined;
230
+ drop_off_type?: "REGULAR" | "NONE" | "PHONE_AGENCY" | "COORDINATE_WITH_DRIVER" | null | undefined;
231
+ pickup_type?: "REGULAR" | "NONE" | "PHONE_AGENCY" | "COORDINATE_WITH_DRIVER" | null | undefined;
232
+ stop_headsign?: string | null | undefined;
233
+ } | null | undefined;
234
+ }[] | null | undefined;
235
+ timestamp?: number | null | undefined;
236
+ trip_properties?: {
237
+ start_date?: string | null | undefined;
238
+ start_time?: string | null | undefined;
239
+ trip_id?: string | null | undefined;
240
+ shape_id?: string | null | undefined;
241
+ trip_headsign?: string | null | undefined;
242
+ trip_short_name?: string | null | undefined;
243
+ } | null | undefined;
244
+ }>;
245
+ export type GtfsRtTripUpdate = z.infer<typeof GtfsRtTripUpdateSchema>;
@@ -0,0 +1,15 @@
1
+ /* * */
2
+ import { GtfsRtTripDescriptorSchema } from '../shared/trip-descriptor.js';
3
+ import { GtfsRtVehicleDescriptorSchema } from '../shared/vehicle-descriptor.js';
4
+ import { GtfsRtStopTimeUpdateSchema } from './stop-time-update.js';
5
+ import { GtfsRtTripPropertiesSchema } from './trip-properties.js';
6
+ import { z } from 'zod';
7
+ /* * */
8
+ export const GtfsRtTripUpdateSchema = z.object({
9
+ delay: z.number().nullish(),
10
+ stop_time_update: z.array(GtfsRtStopTimeUpdateSchema).nullish(),
11
+ timestamp: z.number().nullish(),
12
+ trip: GtfsRtTripDescriptorSchema,
13
+ trip_properties: GtfsRtTripPropertiesSchema.nullish(),
14
+ vehicle: GtfsRtVehicleDescriptorSchema,
15
+ });
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ export declare const GtfsRtCarriageDetailsSchema: z.ZodObject<{
3
+ carriage_sequence: z.ZodNumber;
4
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
+ occupancy_percentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7
+ occupancy_status: z.ZodOptional<z.ZodNullable<z.ZodEnum<["EMPTY", "MANY_SEATS_AVAILABLE", "FEW_SEATS_AVAILABLE", "STANDING_ROOM_ONLY", "CRUSHED_STANDING_ROOM_ONLY", "FULL", "NOT_ACCEPTING_PASSENGERS", "NO_DATA_AVAILABLE", "NOT_BOARDABLE"]>>>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ carriage_sequence: number;
10
+ id?: string | null | undefined;
11
+ label?: string | null | undefined;
12
+ occupancy_percentage?: number | null | undefined;
13
+ occupancy_status?: "EMPTY" | "MANY_SEATS_AVAILABLE" | "FEW_SEATS_AVAILABLE" | "STANDING_ROOM_ONLY" | "CRUSHED_STANDING_ROOM_ONLY" | "FULL" | "NOT_ACCEPTING_PASSENGERS" | "NO_DATA_AVAILABLE" | "NOT_BOARDABLE" | null | undefined;
14
+ }, {
15
+ carriage_sequence: number;
16
+ id?: string | null | undefined;
17
+ label?: string | null | undefined;
18
+ occupancy_percentage?: number | null | undefined;
19
+ occupancy_status?: "EMPTY" | "MANY_SEATS_AVAILABLE" | "FEW_SEATS_AVAILABLE" | "STANDING_ROOM_ONLY" | "CRUSHED_STANDING_ROOM_ONLY" | "FULL" | "NOT_ACCEPTING_PASSENGERS" | "NO_DATA_AVAILABLE" | "NOT_BOARDABLE" | null | undefined;
20
+ }>;
21
+ export type GtfsRtCarriageDetails = z.infer<typeof GtfsRtCarriageDetailsSchema>;
@@ -0,0 +1,11 @@
1
+ /* * */
2
+ import { GtfsRtOccupancyStatusSchema } from '../shared/occupancy-status.js';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const GtfsRtCarriageDetailsSchema = z.object({
6
+ carriage_sequence: z.number(),
7
+ id: z.string().nullish(),
8
+ label: z.string().nullish(),
9
+ occupancy_percentage: z.number().nullish(),
10
+ occupancy_status: GtfsRtOccupancyStatusSchema.nullish(),
11
+ });
@@ -0,0 +1,4 @@
1
+ import { z } from 'zod';
2
+ export declare const GtfsRtCongestionLevelValues: readonly ["UNKNOWN_CONGESTION_LEVEL", "RUNNING_SMOOTHLY", "STOP_AND_GO", "CONGESTION", "SEVERE_CONGESTION"];
3
+ export declare const GtfsRtCongestionLevelSchema: z.ZodEnum<["UNKNOWN_CONGESTION_LEVEL", "RUNNING_SMOOTHLY", "STOP_AND_GO", "CONGESTION", "SEVERE_CONGESTION"]>;
4
+ export type GtfsRtCongestionLevel = z.infer<typeof GtfsRtCongestionLevelSchema>;
@@ -0,0 +1,11 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const GtfsRtCongestionLevelValues = [
5
+ 'UNKNOWN_CONGESTION_LEVEL',
6
+ 'RUNNING_SMOOTHLY',
7
+ 'STOP_AND_GO',
8
+ 'CONGESTION',
9
+ 'SEVERE_CONGESTION',
10
+ ];
11
+ export const GtfsRtCongestionLevelSchema = z.enum(GtfsRtCongestionLevelValues);
@@ -0,0 +1,5 @@
1
+ export * from './carriage-details.js';
2
+ export * from './congestion-level.js';
3
+ export * from './position.js';
4
+ export * from './vehicle-position.js';
5
+ export * from './vehicle-stop-status.js';
@@ -0,0 +1,5 @@
1
+ export * from './carriage-details.js';
2
+ export * from './congestion-level.js';
3
+ export * from './position.js';
4
+ export * from './vehicle-position.js';
5
+ export * from './vehicle-stop-status.js';
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ export declare const GtfsRtPositionSchema: z.ZodObject<{
3
+ bearing: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4
+ latitude: z.ZodNumber;
5
+ longitude: z.ZodNumber;
6
+ odometer: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7
+ speed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ latitude: number;
10
+ longitude: number;
11
+ bearing?: number | null | undefined;
12
+ odometer?: number | null | undefined;
13
+ speed?: number | null | undefined;
14
+ }, {
15
+ latitude: number;
16
+ longitude: number;
17
+ bearing?: number | null | undefined;
18
+ odometer?: number | null | undefined;
19
+ speed?: number | null | undefined;
20
+ }>;
21
+ export type GtfsRtPosition = z.infer<typeof GtfsRtPositionSchema>;
@@ -0,0 +1,10 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const GtfsRtPositionSchema = z.object({
5
+ bearing: z.number().nullish(),
6
+ latitude: z.number(),
7
+ longitude: z.number(),
8
+ odometer: z.number().nullish(),
9
+ speed: z.number().nullish(),
10
+ });
@@ -0,0 +1,168 @@
1
+ import { z } from 'zod';
2
+ export declare const GtfsRtVehiclePositionSchema: z.ZodObject<{
3
+ congestion_level: z.ZodOptional<z.ZodNullable<z.ZodEnum<["UNKNOWN_CONGESTION_LEVEL", "RUNNING_SMOOTHLY", "STOP_AND_GO", "CONGESTION", "SEVERE_CONGESTION"]>>>;
4
+ current_status: z.ZodOptional<z.ZodNullable<z.ZodEnum<["INCOMING_AT", "STOPPED_AT", "IN_TRANSIT_TO"]>>>;
5
+ current_stop_sequence: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
6
+ multi_carriage_details: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
7
+ carriage_sequence: z.ZodNumber;
8
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ occupancy_percentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
11
+ occupancy_status: z.ZodOptional<z.ZodNullable<z.ZodEnum<["EMPTY", "MANY_SEATS_AVAILABLE", "FEW_SEATS_AVAILABLE", "STANDING_ROOM_ONLY", "CRUSHED_STANDING_ROOM_ONLY", "FULL", "NOT_ACCEPTING_PASSENGERS", "NO_DATA_AVAILABLE", "NOT_BOARDABLE"]>>>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ carriage_sequence: number;
14
+ id?: string | null | undefined;
15
+ label?: string | null | undefined;
16
+ occupancy_percentage?: number | null | undefined;
17
+ occupancy_status?: "EMPTY" | "MANY_SEATS_AVAILABLE" | "FEW_SEATS_AVAILABLE" | "STANDING_ROOM_ONLY" | "CRUSHED_STANDING_ROOM_ONLY" | "FULL" | "NOT_ACCEPTING_PASSENGERS" | "NO_DATA_AVAILABLE" | "NOT_BOARDABLE" | null | undefined;
18
+ }, {
19
+ carriage_sequence: number;
20
+ id?: string | null | undefined;
21
+ label?: string | null | undefined;
22
+ occupancy_percentage?: number | null | undefined;
23
+ occupancy_status?: "EMPTY" | "MANY_SEATS_AVAILABLE" | "FEW_SEATS_AVAILABLE" | "STANDING_ROOM_ONLY" | "CRUSHED_STANDING_ROOM_ONLY" | "FULL" | "NOT_ACCEPTING_PASSENGERS" | "NO_DATA_AVAILABLE" | "NOT_BOARDABLE" | null | undefined;
24
+ }>, "many">>>;
25
+ occupancy_percentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
26
+ occupancy_status: z.ZodOptional<z.ZodNullable<z.ZodEnum<["EMPTY", "MANY_SEATS_AVAILABLE", "FEW_SEATS_AVAILABLE", "STANDING_ROOM_ONLY", "CRUSHED_STANDING_ROOM_ONLY", "FULL", "NOT_ACCEPTING_PASSENGERS", "NO_DATA_AVAILABLE", "NOT_BOARDABLE"]>>>;
27
+ position: z.ZodObject<{
28
+ bearing: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
29
+ latitude: z.ZodNumber;
30
+ longitude: z.ZodNumber;
31
+ odometer: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
32
+ speed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ latitude: number;
35
+ longitude: number;
36
+ bearing?: number | null | undefined;
37
+ odometer?: number | null | undefined;
38
+ speed?: number | null | undefined;
39
+ }, {
40
+ latitude: number;
41
+ longitude: number;
42
+ bearing?: number | null | undefined;
43
+ odometer?: number | null | undefined;
44
+ speed?: number | null | undefined;
45
+ }>;
46
+ stop_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
47
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
48
+ trip: z.ZodObject<{
49
+ direction_id: z.ZodAny;
50
+ modified_trip: z.ZodAny;
51
+ route_id: z.ZodString;
52
+ schedule_relationship: z.ZodEnum<["SCHEDULED", "CANCELED", "REPLACEMENT", "DUPLICATED", "NEW", "DELETED"]>;
53
+ start_date: z.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-gtfs").GtfsDate, string>;
54
+ start_time: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-gtfs").GtfsTime, string>>>;
55
+ trip_id: z.ZodString;
56
+ }, "strip", z.ZodTypeAny, {
57
+ route_id: string;
58
+ schedule_relationship: "SCHEDULED" | "CANCELED" | "REPLACEMENT" | "DUPLICATED" | "NEW" | "DELETED";
59
+ start_date: string & {
60
+ __brand: "GtfsDate";
61
+ };
62
+ trip_id: string;
63
+ direction_id?: any;
64
+ modified_trip?: any;
65
+ start_time?: import("@tmlmobilidade/go-types-gtfs").GtfsTime | null | undefined;
66
+ }, {
67
+ route_id: string;
68
+ schedule_relationship: "SCHEDULED" | "CANCELED" | "REPLACEMENT" | "DUPLICATED" | "NEW" | "DELETED";
69
+ start_date: string;
70
+ trip_id: string;
71
+ direction_id?: any;
72
+ modified_trip?: any;
73
+ start_time?: string | null | undefined;
74
+ }>;
75
+ vehicle: z.ZodObject<{
76
+ id: z.ZodString;
77
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
78
+ license_plate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
79
+ wheelchair_accessible: z.ZodEnum<["NO_VALUE", "UNKNOWN", "WHEELCHAIR_ACCESSIBLE", "WHEELCHAIR_INACCESSIBLE"]>;
80
+ }, "strip", z.ZodTypeAny, {
81
+ id: string;
82
+ wheelchair_accessible: "NO_VALUE" | "UNKNOWN" | "WHEELCHAIR_ACCESSIBLE" | "WHEELCHAIR_INACCESSIBLE";
83
+ label?: string | null | undefined;
84
+ license_plate?: string | null | undefined;
85
+ }, {
86
+ id: string;
87
+ wheelchair_accessible: "NO_VALUE" | "UNKNOWN" | "WHEELCHAIR_ACCESSIBLE" | "WHEELCHAIR_INACCESSIBLE";
88
+ label?: string | null | undefined;
89
+ license_plate?: string | null | undefined;
90
+ }>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ trip: {
93
+ route_id: string;
94
+ schedule_relationship: "SCHEDULED" | "CANCELED" | "REPLACEMENT" | "DUPLICATED" | "NEW" | "DELETED";
95
+ start_date: string & {
96
+ __brand: "GtfsDate";
97
+ };
98
+ trip_id: string;
99
+ direction_id?: any;
100
+ modified_trip?: any;
101
+ start_time?: import("@tmlmobilidade/go-types-gtfs").GtfsTime | null | undefined;
102
+ };
103
+ vehicle: {
104
+ id: string;
105
+ wheelchair_accessible: "NO_VALUE" | "UNKNOWN" | "WHEELCHAIR_ACCESSIBLE" | "WHEELCHAIR_INACCESSIBLE";
106
+ label?: string | null | undefined;
107
+ license_plate?: string | null | undefined;
108
+ };
109
+ position: {
110
+ latitude: number;
111
+ longitude: number;
112
+ bearing?: number | null | undefined;
113
+ odometer?: number | null | undefined;
114
+ speed?: number | null | undefined;
115
+ };
116
+ stop_id?: string | null | undefined;
117
+ timestamp?: number | null | undefined;
118
+ occupancy_percentage?: number | null | undefined;
119
+ occupancy_status?: "EMPTY" | "MANY_SEATS_AVAILABLE" | "FEW_SEATS_AVAILABLE" | "STANDING_ROOM_ONLY" | "CRUSHED_STANDING_ROOM_ONLY" | "FULL" | "NOT_ACCEPTING_PASSENGERS" | "NO_DATA_AVAILABLE" | "NOT_BOARDABLE" | null | undefined;
120
+ congestion_level?: "UNKNOWN_CONGESTION_LEVEL" | "RUNNING_SMOOTHLY" | "STOP_AND_GO" | "CONGESTION" | "SEVERE_CONGESTION" | null | undefined;
121
+ current_status?: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO" | null | undefined;
122
+ current_stop_sequence?: number | null | undefined;
123
+ multi_carriage_details?: {
124
+ carriage_sequence: number;
125
+ id?: string | null | undefined;
126
+ label?: string | null | undefined;
127
+ occupancy_percentage?: number | null | undefined;
128
+ occupancy_status?: "EMPTY" | "MANY_SEATS_AVAILABLE" | "FEW_SEATS_AVAILABLE" | "STANDING_ROOM_ONLY" | "CRUSHED_STANDING_ROOM_ONLY" | "FULL" | "NOT_ACCEPTING_PASSENGERS" | "NO_DATA_AVAILABLE" | "NOT_BOARDABLE" | null | undefined;
129
+ }[] | null | undefined;
130
+ }, {
131
+ trip: {
132
+ route_id: string;
133
+ schedule_relationship: "SCHEDULED" | "CANCELED" | "REPLACEMENT" | "DUPLICATED" | "NEW" | "DELETED";
134
+ start_date: string;
135
+ trip_id: string;
136
+ direction_id?: any;
137
+ modified_trip?: any;
138
+ start_time?: string | null | undefined;
139
+ };
140
+ vehicle: {
141
+ id: string;
142
+ wheelchair_accessible: "NO_VALUE" | "UNKNOWN" | "WHEELCHAIR_ACCESSIBLE" | "WHEELCHAIR_INACCESSIBLE";
143
+ label?: string | null | undefined;
144
+ license_plate?: string | null | undefined;
145
+ };
146
+ position: {
147
+ latitude: number;
148
+ longitude: number;
149
+ bearing?: number | null | undefined;
150
+ odometer?: number | null | undefined;
151
+ speed?: number | null | undefined;
152
+ };
153
+ stop_id?: string | null | undefined;
154
+ timestamp?: number | null | undefined;
155
+ occupancy_percentage?: number | null | undefined;
156
+ occupancy_status?: "EMPTY" | "MANY_SEATS_AVAILABLE" | "FEW_SEATS_AVAILABLE" | "STANDING_ROOM_ONLY" | "CRUSHED_STANDING_ROOM_ONLY" | "FULL" | "NOT_ACCEPTING_PASSENGERS" | "NO_DATA_AVAILABLE" | "NOT_BOARDABLE" | null | undefined;
157
+ congestion_level?: "UNKNOWN_CONGESTION_LEVEL" | "RUNNING_SMOOTHLY" | "STOP_AND_GO" | "CONGESTION" | "SEVERE_CONGESTION" | null | undefined;
158
+ current_status?: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO" | null | undefined;
159
+ current_stop_sequence?: number | null | undefined;
160
+ multi_carriage_details?: {
161
+ carriage_sequence: number;
162
+ id?: string | null | undefined;
163
+ label?: string | null | undefined;
164
+ occupancy_percentage?: number | null | undefined;
165
+ occupancy_status?: "EMPTY" | "MANY_SEATS_AVAILABLE" | "FEW_SEATS_AVAILABLE" | "STANDING_ROOM_ONLY" | "CRUSHED_STANDING_ROOM_ONLY" | "FULL" | "NOT_ACCEPTING_PASSENGERS" | "NO_DATA_AVAILABLE" | "NOT_BOARDABLE" | null | undefined;
166
+ }[] | null | undefined;
167
+ }>;
168
+ export type GtfsRtVehiclePosition = z.infer<typeof GtfsRtVehiclePositionSchema>;
@@ -0,0 +1,23 @@
1
+ /* * */
2
+ import { GtfsRtOccupancyStatusSchema } from '../shared/occupancy-status.js';
3
+ import { GtfsRtTripDescriptorSchema } from '../shared/trip-descriptor.js';
4
+ import { GtfsRtVehicleDescriptorSchema } from '../shared/vehicle-descriptor.js';
5
+ import { GtfsRtCarriageDetailsSchema } from './carriage-details.js';
6
+ import { GtfsRtCongestionLevelSchema } from './congestion-level.js';
7
+ import { GtfsRtPositionSchema } from './position.js';
8
+ import { GtfsRtVehicleStopStatusSchema } from './vehicle-stop-status.js';
9
+ import { z } from 'zod';
10
+ /* * */
11
+ export const GtfsRtVehiclePositionSchema = z.object({
12
+ congestion_level: GtfsRtCongestionLevelSchema.nullish(),
13
+ current_status: GtfsRtVehicleStopStatusSchema.nullish(),
14
+ current_stop_sequence: z.number().nullish(),
15
+ multi_carriage_details: GtfsRtCarriageDetailsSchema.array().nullish(),
16
+ occupancy_percentage: z.number().nullish(),
17
+ occupancy_status: GtfsRtOccupancyStatusSchema.nullish(),
18
+ position: GtfsRtPositionSchema,
19
+ stop_id: z.string().nullish(),
20
+ timestamp: z.number().nullish(),
21
+ trip: GtfsRtTripDescriptorSchema,
22
+ vehicle: GtfsRtVehicleDescriptorSchema,
23
+ });
@@ -0,0 +1,4 @@
1
+ import { z } from 'zod';
2
+ export declare const GtfsRtVehicleStopStatusValues: readonly ["INCOMING_AT", "STOPPED_AT", "IN_TRANSIT_TO"];
3
+ export declare const GtfsRtVehicleStopStatusSchema: z.ZodEnum<["INCOMING_AT", "STOPPED_AT", "IN_TRANSIT_TO"]>;
4
+ export type GtfsRtVehicleStopStatus = z.infer<typeof GtfsRtVehicleStopStatusSchema>;
@@ -0,0 +1,9 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const GtfsRtVehicleStopStatusValues = [
5
+ 'INCOMING_AT',
6
+ 'STOPPED_AT',
7
+ 'IN_TRANSIT_TO',
8
+ ];
9
+ export const GtfsRtVehicleStopStatusSchema = z.enum(GtfsRtVehicleStopStatusValues);
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@tmlmobilidade/go-types-gtfs-rt",
3
+ "version": "20260627.41.35",
4
+ "author": {
5
+ "email": "iso@tmlmobilidade.pt",
6
+ "name": "TML-ISO"
7
+ },
8
+ "license": "AGPL-3.0-or-later",
9
+ "homepage": "https://go.tmlmobilidade.pt",
10
+ "bugs": {
11
+ "url": "https://github.com/tmlmobilidade/go/issues"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/tmlmobilidade/go.git"
16
+ },
17
+ "keywords": [
18
+ "public transit",
19
+ "tml",
20
+ "transportes metropolitanos de lisboa",
21
+ "go"
22
+ ],
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "type": "module",
27
+ "files": [
28
+ "dist"
29
+ ],
30
+ "main": "./dist/index.js",
31
+ "types": "./dist/index.d.ts",
32
+ "scripts": {
33
+ "build": "tsc && resolve-tspaths",
34
+ "lint": "eslint ./src/ && tsc --noEmit",
35
+ "lint:fix": "eslint ./src/ --fix",
36
+ "watch": "tsc-watch --onSuccess 'resolve-tspaths'"
37
+ },
38
+ "dependencies": {
39
+ "@tmlmobilidade/go-types-gtfs": "*",
40
+ "luxon": "3.7.2",
41
+ "zod": "3.25.76"
42
+ },
43
+ "devDependencies": {
44
+ "@tmlmobilidade/tsconfig": "*",
45
+ "@types/luxon": "3.7.2",
46
+ "@types/node": "26.0.0",
47
+ "resolve-tspaths": "0.8.23",
48
+ "tsc-watch": "7.2.0",
49
+ "typescript": "6.0.3"
50
+ }
51
+ }