@tmlmobilidade/go-types-hub 20260829.23.20

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 (57) hide show
  1. package/dist/api/alerts/alert.d.ts +65 -0
  2. package/dist/api/alerts/alert.js +21 -0
  3. package/dist/api/alerts/index.d.ts +1 -0
  4. package/dist/api/alerts/index.js +1 -0
  5. package/dist/api/index.d.ts +4 -0
  6. package/dist/api/index.js +4 -0
  7. package/dist/api/network/index.d.ts +8 -0
  8. package/dist/api/network/index.js +8 -0
  9. package/dist/api/network/line.d.ts +70 -0
  10. package/dist/api/network/line.js +25 -0
  11. package/dist/api/network/pattern.d.ts +188 -0
  12. package/dist/api/network/pattern.js +33 -0
  13. package/dist/api/network/route.d.ts +70 -0
  14. package/dist/api/network/route.js +25 -0
  15. package/dist/api/network/scheduled-arrival.d.ts +21 -0
  16. package/dist/api/network/scheduled-arrival.js +10 -0
  17. package/dist/api/network/shape.d.ts +21 -0
  18. package/dist/api/network/shape.js +10 -0
  19. package/dist/api/network/stop.d.ts +101 -0
  20. package/dist/api/network/stop.js +29 -0
  21. package/dist/api/network/trip.d.ts +49 -0
  22. package/dist/api/network/trip.js +12 -0
  23. package/dist/api/network/waypoint.d.ts +27 -0
  24. package/dist/api/network/waypoint.js +12 -0
  25. package/dist/api/plans/index.d.ts +1 -0
  26. package/dist/api/plans/index.js +1 -0
  27. package/dist/api/plans/plan.d.ts +151 -0
  28. package/dist/api/plans/plan.js +17 -0
  29. package/dist/api/realtime/index.d.ts +1 -0
  30. package/dist/api/realtime/index.js +1 -0
  31. package/dist/api/realtime/vehicle-position.d.ts +81 -0
  32. package/dist/api/realtime/vehicle-position.js +29 -0
  33. package/dist/api/timetables.d.ts +36 -0
  34. package/dist/api/timetables.js +2 -0
  35. package/dist/gtfs/agency.d.ts +44 -0
  36. package/dist/gtfs/agency.js +7 -0
  37. package/dist/gtfs/calendar-dates.d.ts +25 -0
  38. package/dist/gtfs/calendar-dates.js +7 -0
  39. package/dist/gtfs/feed-info.d.ts +44 -0
  40. package/dist/gtfs/feed-info.js +4 -0
  41. package/dist/gtfs/index.d.ts +9 -0
  42. package/dist/gtfs/index.js +9 -0
  43. package/dist/gtfs/plans.d.ts +29 -0
  44. package/dist/gtfs/plans.js +10 -0
  45. package/dist/gtfs/routes.d.ts +56 -0
  46. package/dist/gtfs/routes.js +4 -0
  47. package/dist/gtfs/shapes.d.ts +32 -0
  48. package/dist/gtfs/shapes.js +4 -0
  49. package/dist/gtfs/stop-times.d.ts +53 -0
  50. package/dist/gtfs/stop-times.js +4 -0
  51. package/dist/gtfs/stops.d.ts +96 -0
  52. package/dist/gtfs/stops.js +18 -0
  53. package/dist/gtfs/trips.d.ts +46 -0
  54. package/dist/gtfs/trips.js +4 -0
  55. package/dist/index.d.ts +2 -0
  56. package/dist/index.js +2 -0
  57. package/package.json +56 -0
@@ -0,0 +1,65 @@
1
+ import { z } from 'zod';
2
+ export declare const HubAlertSchema: z.ZodObject<{
3
+ active_period_end_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>>>;
4
+ active_period_start_date: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>;
5
+ agency_id: z.ZodString;
6
+ cause: z.ZodEnum<["ACCIDENT", "CONSTRUCTION", "DEMONSTRATION", "HOLIDAY", "MAINTENANCE", "MEDICAL_EMERGENCY", "OTHER_CAUSE", "POLICE_ACTIVITY", "STRIKE", "TECHNICAL_ISSUE", "UNKNOWN_CAUSE", "WEATHER"]>;
7
+ coordinates: z.ZodDefault<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
8
+ description: z.ZodString;
9
+ effect: z.ZodEnum<["ACCESSIBILITY_ISSUE", "ADDITIONAL_SERVICE", "DETOUR", "MODIFIED_SERVICE", "NO_EFFECT", "NO_SERVICE", "OTHER_EFFECT", "REDUCED_SERVICE", "SIGNIFICANT_DELAYS", "STOP_MOVED", "UNKNOWN_EFFECT"]>;
10
+ image_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
11
+ info_url: z.ZodDefault<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>>;
12
+ municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
13
+ reference_type: z.ZodEnum<["agency", "lines", "stops", "rides"]>;
14
+ references: z.ZodDefault<z.ZodArray<z.ZodObject<{
15
+ child_ids: z.ZodArray<z.ZodString, "many">;
16
+ parent_id: z.ZodString;
17
+ }, "strip", z.ZodTypeAny, {
18
+ child_ids: string[];
19
+ parent_id: string;
20
+ }, {
21
+ child_ids: string[];
22
+ parent_id: string;
23
+ }>, "many">>;
24
+ title: z.ZodString;
25
+ }, "strip", z.ZodTypeAny, {
26
+ active_period_end_date: import("@tmlmobilidade/go-types-shared").UnixMilliseconds | null;
27
+ active_period_start_date: number & {
28
+ __brand: "UnixMilliseconds";
29
+ };
30
+ agency_id: string;
31
+ cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "HOLIDAY" | "MAINTENANCE" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_ISSUE" | "UNKNOWN_CAUSE" | "WEATHER";
32
+ coordinates: [number, number] | null;
33
+ description: string;
34
+ effect: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_EFFECT" | "NO_SERVICE" | "OTHER_EFFECT" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "UNKNOWN_EFFECT";
35
+ image_url: string | null;
36
+ info_url: string | null;
37
+ municipality_ids: string[];
38
+ reference_type: "agency" | "lines" | "stops" | "rides";
39
+ references: {
40
+ child_ids: string[];
41
+ parent_id: string;
42
+ }[];
43
+ title: string;
44
+ }, {
45
+ active_period_start_date: string | number;
46
+ agency_id: string;
47
+ cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "HOLIDAY" | "MAINTENANCE" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_ISSUE" | "UNKNOWN_CAUSE" | "WEATHER";
48
+ description: string;
49
+ effect: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_EFFECT" | "NO_SERVICE" | "OTHER_EFFECT" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "UNKNOWN_EFFECT";
50
+ reference_type: "agency" | "lines" | "stops" | "rides";
51
+ title: string;
52
+ active_period_end_date?: string | number | null | undefined;
53
+ coordinates?: [number, number] | null | undefined;
54
+ image_url?: string | null | undefined;
55
+ info_url?: string | null | undefined;
56
+ municipality_ids?: string[] | undefined;
57
+ references?: {
58
+ child_ids: string[];
59
+ parent_id: string;
60
+ }[] | undefined;
61
+ }>;
62
+ /**
63
+ * Alert data for the Hub Alerts API.
64
+ */
65
+ export type HubAlert = z.infer<typeof HubAlertSchema>;
@@ -0,0 +1,21 @@
1
+ /* * */
2
+ import { GtfsRtCauseSchema, GtfsRtEffectSchema } from '@tmlmobilidade/go-types-gtfs-rt';
3
+ import { AlertReferenceSchema, AlertReferenceTypeSchema } from '@tmlmobilidade/go-types-operation';
4
+ import { UnixMillisecondsSchema } from '@tmlmobilidade/go-types-shared';
5
+ import { z } from 'zod';
6
+ /* * */
7
+ export const HubAlertSchema = z.object({
8
+ active_period_end_date: UnixMillisecondsSchema.nullable().default(null),
9
+ active_period_start_date: UnixMillisecondsSchema,
10
+ agency_id: z.string(),
11
+ cause: GtfsRtCauseSchema,
12
+ coordinates: z.tuple([z.number(), z.number()]).nullable().default(null),
13
+ description: z.string(),
14
+ effect: GtfsRtEffectSchema,
15
+ image_url: z.string().nullable().default(null),
16
+ info_url: z.union([z.string().url(), z.literal('')]).nullable().default(null),
17
+ municipality_ids: z.array(z.string()).default([]),
18
+ reference_type: AlertReferenceTypeSchema,
19
+ references: z.array(AlertReferenceSchema).default([]),
20
+ title: z.string(),
21
+ });
@@ -0,0 +1 @@
1
+ export * from './alert.js';
@@ -0,0 +1 @@
1
+ export * from './alert.js';
@@ -0,0 +1,4 @@
1
+ export * from './alerts/index.js';
2
+ export * from './network/index.js';
3
+ export * from './plans/index.js';
4
+ export * from './realtime/index.js';
@@ -0,0 +1,4 @@
1
+ export * from './alerts/index.js';
2
+ export * from './network/index.js';
3
+ export * from './plans/index.js';
4
+ export * from './realtime/index.js';
@@ -0,0 +1,8 @@
1
+ export * from './line.js';
2
+ export * from './pattern.js';
3
+ export * from './route.js';
4
+ export * from './scheduled-arrival.js';
5
+ export * from './shape.js';
6
+ export * from './stop.js';
7
+ export * from './trip.js';
8
+ export * from './waypoint.js';
@@ -0,0 +1,8 @@
1
+ export * from './line.js';
2
+ export * from './pattern.js';
3
+ export * from './route.js';
4
+ export * from './scheduled-arrival.js';
5
+ export * from './shape.js';
6
+ export * from './stop.js';
7
+ export * from './trip.js';
8
+ export * from './waypoint.js';
@@ -0,0 +1,70 @@
1
+ import { z } from 'zod';
2
+ export declare const HubLineSchema: z.ZodObject<{
3
+ _id: z.ZodString;
4
+ agency_id: z.ZodString;
5
+ color: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, import("@tmlmobilidade/go-types-shared").HexColor, string>;
6
+ district_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
7
+ district_names: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
8
+ facilities: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
9
+ locality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
10
+ locality_names: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
11
+ long_name: z.ZodString;
12
+ municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
13
+ municipality_names: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
14
+ parish_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
15
+ parish_names: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
16
+ pattern_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
17
+ route_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
18
+ short_name: z.ZodString;
19
+ stop_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
20
+ text_color: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, import("@tmlmobilidade/go-types-shared").HexColor, string>;
21
+ tts_name: z.ZodString;
22
+ }, "strip", z.ZodTypeAny, {
23
+ agency_id: string;
24
+ municipality_ids: string[];
25
+ _id: string;
26
+ color: string & {
27
+ __brand: "HexColor";
28
+ };
29
+ district_ids: string[];
30
+ district_names: string[];
31
+ facilities: string[];
32
+ locality_ids: string[];
33
+ locality_names: string[];
34
+ long_name: string;
35
+ municipality_names: string[];
36
+ parish_ids: string[];
37
+ parish_names: string[];
38
+ pattern_ids: string[];
39
+ route_ids: string[];
40
+ short_name: string;
41
+ stop_ids: string[];
42
+ text_color: string & {
43
+ __brand: "HexColor";
44
+ };
45
+ tts_name: string;
46
+ }, {
47
+ agency_id: string;
48
+ _id: string;
49
+ color: string;
50
+ long_name: string;
51
+ short_name: string;
52
+ text_color: string;
53
+ tts_name: string;
54
+ municipality_ids?: string[] | undefined;
55
+ district_ids?: string[] | undefined;
56
+ district_names?: string[] | undefined;
57
+ facilities?: string[] | undefined;
58
+ locality_ids?: string[] | undefined;
59
+ locality_names?: string[] | undefined;
60
+ municipality_names?: string[] | undefined;
61
+ parish_ids?: string[] | undefined;
62
+ parish_names?: string[] | undefined;
63
+ pattern_ids?: string[] | undefined;
64
+ route_ids?: string[] | undefined;
65
+ stop_ids?: string[] | undefined;
66
+ }>;
67
+ /**
68
+ * Line data for the Hub Network API.
69
+ */
70
+ export type HubLine = z.infer<typeof HubLineSchema>;
@@ -0,0 +1,25 @@
1
+ /* * */
2
+ import { HexColorSchema } from '@tmlmobilidade/go-types-shared';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const HubLineSchema = z.object({
6
+ _id: z.string(),
7
+ agency_id: z.string(),
8
+ color: HexColorSchema,
9
+ district_ids: z.array(z.string()).default([]),
10
+ district_names: z.array(z.string()).default([]),
11
+ facilities: z.array(z.string()).default([]),
12
+ locality_ids: z.array(z.string()).default([]),
13
+ locality_names: z.array(z.string()).default([]),
14
+ long_name: z.string(),
15
+ municipality_ids: z.array(z.string()).default([]),
16
+ municipality_names: z.array(z.string()).default([]),
17
+ parish_ids: z.array(z.string()).default([]),
18
+ parish_names: z.array(z.string()).default([]),
19
+ pattern_ids: z.array(z.string()).default([]),
20
+ route_ids: z.array(z.string()).default([]),
21
+ short_name: z.string(),
22
+ stop_ids: z.array(z.string()).default([]),
23
+ text_color: HexColorSchema,
24
+ tts_name: z.string(),
25
+ });
@@ -0,0 +1,188 @@
1
+ import { z } from 'zod';
2
+ export declare const HubPatternSchema: z.ZodObject<{
3
+ _id: z.ZodString;
4
+ agency_id: z.ZodString;
5
+ color: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, import("@tmlmobilidade/go-types-shared").HexColor, string>;
6
+ direction_id: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
7
+ district_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
8
+ district_names: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
9
+ facilities: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
10
+ headsign: z.ZodString;
11
+ line_id: z.ZodString;
12
+ locality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
13
+ locality_names: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
14
+ long_name: z.ZodString;
15
+ municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
16
+ municipality_names: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
17
+ parish_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
18
+ parish_names: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
19
+ path: z.ZodArray<z.ZodObject<{
20
+ allow_drop_off: z.ZodBoolean;
21
+ allow_pickup: z.ZodBoolean;
22
+ distance: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>;
23
+ distance_delta: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>;
24
+ stop_id: z.ZodString;
25
+ stop_sequence: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>;
26
+ }, "strip", z.ZodTypeAny, {
27
+ stop_id: string;
28
+ stop_sequence: number;
29
+ allow_drop_off: boolean;
30
+ allow_pickup: boolean;
31
+ distance: number;
32
+ distance_delta: number;
33
+ }, {
34
+ stop_id: string;
35
+ stop_sequence: string | number;
36
+ allow_drop_off: boolean;
37
+ allow_pickup: boolean;
38
+ distance: string | number;
39
+ distance_delta: string | number;
40
+ }>, "many">;
41
+ route_id: z.ZodString;
42
+ shape_id: z.ZodString;
43
+ short_name: z.ZodString;
44
+ text_color: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, import("@tmlmobilidade/go-types-shared").HexColor, string>;
45
+ trips: z.ZodArray<z.ZodObject<{
46
+ schedule: z.ZodArray<z.ZodObject<{
47
+ arrival_time: z.ZodString;
48
+ arrival_time_24h: z.ZodString;
49
+ stop_id: z.ZodString;
50
+ stop_sequence: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ arrival_time: string;
53
+ arrival_time_24h: string;
54
+ stop_id: string;
55
+ stop_sequence: number;
56
+ }, {
57
+ arrival_time: string;
58
+ arrival_time_24h: string;
59
+ stop_id: string;
60
+ stop_sequence: string | number;
61
+ }>, "many">;
62
+ service_ids: z.ZodArray<z.ZodString, "many">;
63
+ trip_ids: z.ZodArray<z.ZodString, "many">;
64
+ valid_on: z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string, string | number>, string, string | number>, import("@tmlmobilidade/go-types-shared").OperationalDateInt, string | number>, "many">;
65
+ version_id: z.ZodString;
66
+ }, "strip", z.ZodTypeAny, {
67
+ schedule: {
68
+ arrival_time: string;
69
+ arrival_time_24h: string;
70
+ stop_id: string;
71
+ stop_sequence: number;
72
+ }[];
73
+ service_ids: string[];
74
+ trip_ids: string[];
75
+ valid_on: import("@tmlmobilidade/go-types-shared").OperationalDateInt[];
76
+ version_id: string;
77
+ }, {
78
+ schedule: {
79
+ arrival_time: string;
80
+ arrival_time_24h: string;
81
+ stop_id: string;
82
+ stop_sequence: string | number;
83
+ }[];
84
+ service_ids: string[];
85
+ trip_ids: string[];
86
+ valid_on: (string | number)[];
87
+ version_id: string;
88
+ }>, "many">;
89
+ tts_headsign: z.ZodString;
90
+ valid_on: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string, string | number>, string, string | number>, import("@tmlmobilidade/go-types-shared").OperationalDateInt, string | number>, "many">>;
91
+ version_id: z.ZodString;
92
+ }, "strip", z.ZodTypeAny, {
93
+ agency_id: string;
94
+ path: {
95
+ stop_id: string;
96
+ stop_sequence: number;
97
+ allow_drop_off: boolean;
98
+ allow_pickup: boolean;
99
+ distance: number;
100
+ distance_delta: number;
101
+ }[];
102
+ municipality_ids: string[];
103
+ _id: string;
104
+ color: string & {
105
+ __brand: "HexColor";
106
+ };
107
+ district_ids: string[];
108
+ district_names: string[];
109
+ facilities: string[];
110
+ locality_ids: string[];
111
+ locality_names: string[];
112
+ long_name: string;
113
+ municipality_names: string[];
114
+ parish_ids: string[];
115
+ parish_names: string[];
116
+ short_name: string;
117
+ text_color: string & {
118
+ __brand: "HexColor";
119
+ };
120
+ valid_on: import("@tmlmobilidade/go-types-shared").OperationalDateInt[];
121
+ version_id: string;
122
+ direction_id: 0 | 1;
123
+ headsign: string;
124
+ line_id: string;
125
+ route_id: string;
126
+ shape_id: string;
127
+ trips: {
128
+ schedule: {
129
+ arrival_time: string;
130
+ arrival_time_24h: string;
131
+ stop_id: string;
132
+ stop_sequence: number;
133
+ }[];
134
+ service_ids: string[];
135
+ trip_ids: string[];
136
+ valid_on: import("@tmlmobilidade/go-types-shared").OperationalDateInt[];
137
+ version_id: string;
138
+ }[];
139
+ tts_headsign: string;
140
+ }, {
141
+ agency_id: string;
142
+ path: {
143
+ stop_id: string;
144
+ stop_sequence: string | number;
145
+ allow_drop_off: boolean;
146
+ allow_pickup: boolean;
147
+ distance: string | number;
148
+ distance_delta: string | number;
149
+ }[];
150
+ _id: string;
151
+ color: string;
152
+ long_name: string;
153
+ short_name: string;
154
+ text_color: string;
155
+ version_id: string;
156
+ direction_id: 0 | 1;
157
+ headsign: string;
158
+ line_id: string;
159
+ route_id: string;
160
+ shape_id: string;
161
+ trips: {
162
+ schedule: {
163
+ arrival_time: string;
164
+ arrival_time_24h: string;
165
+ stop_id: string;
166
+ stop_sequence: string | number;
167
+ }[];
168
+ service_ids: string[];
169
+ trip_ids: string[];
170
+ valid_on: (string | number)[];
171
+ version_id: string;
172
+ }[];
173
+ tts_headsign: string;
174
+ municipality_ids?: string[] | undefined;
175
+ district_ids?: string[] | undefined;
176
+ district_names?: string[] | undefined;
177
+ facilities?: string[] | undefined;
178
+ locality_ids?: string[] | undefined;
179
+ locality_names?: string[] | undefined;
180
+ municipality_names?: string[] | undefined;
181
+ parish_ids?: string[] | undefined;
182
+ parish_names?: string[] | undefined;
183
+ valid_on?: (string | number)[] | undefined;
184
+ }>;
185
+ /**
186
+ * Publishable pattern data for the Hub Network API.
187
+ */
188
+ export type HubPattern = z.infer<typeof HubPatternSchema>;
@@ -0,0 +1,33 @@
1
+ /* * */
2
+ import { HexColorSchema, OperationalDateIntSchema } from '@tmlmobilidade/go-types-shared';
3
+ import { z } from 'zod';
4
+ import { HubTripSchema } from './trip.js';
5
+ import { HubWaypointSchema } from './waypoint.js';
6
+ /* * */
7
+ export const HubPatternSchema = z.object({
8
+ _id: z.string(),
9
+ agency_id: z.string(),
10
+ color: HexColorSchema,
11
+ direction_id: z.union([z.literal(0), z.literal(1)]),
12
+ district_ids: z.array(z.string()).default([]),
13
+ district_names: z.array(z.string()).default([]),
14
+ facilities: z.array(z.string()).default([]),
15
+ headsign: z.string(),
16
+ line_id: z.string(),
17
+ locality_ids: z.array(z.string()).default([]),
18
+ locality_names: z.array(z.string()).default([]),
19
+ long_name: z.string(),
20
+ municipality_ids: z.array(z.string()).default([]),
21
+ municipality_names: z.array(z.string()).default([]),
22
+ parish_ids: z.array(z.string()).default([]),
23
+ parish_names: z.array(z.string()).default([]),
24
+ path: z.array(HubWaypointSchema),
25
+ route_id: z.string(),
26
+ shape_id: z.string(),
27
+ short_name: z.string(),
28
+ text_color: HexColorSchema,
29
+ trips: z.array(HubTripSchema),
30
+ tts_headsign: z.string(),
31
+ valid_on: z.array(OperationalDateIntSchema).default([]),
32
+ version_id: z.string(),
33
+ });
@@ -0,0 +1,70 @@
1
+ import { z } from 'zod';
2
+ export declare const HubRouteSchema: z.ZodObject<{
3
+ _id: z.ZodString;
4
+ agency_id: z.ZodString;
5
+ color: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, import("@tmlmobilidade/go-types-shared").HexColor, string>;
6
+ district_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
7
+ district_names: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
8
+ facilities: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
9
+ line_id: z.ZodString;
10
+ locality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
11
+ locality_names: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
12
+ long_name: z.ZodString;
13
+ municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
14
+ municipality_names: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
15
+ parish_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
16
+ parish_names: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
17
+ pattern_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
18
+ short_name: z.ZodString;
19
+ stop_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
20
+ text_color: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, import("@tmlmobilidade/go-types-shared").HexColor, string>;
21
+ tts_name: z.ZodString;
22
+ }, "strip", z.ZodTypeAny, {
23
+ agency_id: string;
24
+ municipality_ids: string[];
25
+ _id: string;
26
+ color: string & {
27
+ __brand: "HexColor";
28
+ };
29
+ district_ids: string[];
30
+ district_names: string[];
31
+ facilities: string[];
32
+ locality_ids: string[];
33
+ locality_names: string[];
34
+ long_name: string;
35
+ municipality_names: string[];
36
+ parish_ids: string[];
37
+ parish_names: string[];
38
+ pattern_ids: string[];
39
+ short_name: string;
40
+ stop_ids: string[];
41
+ text_color: string & {
42
+ __brand: "HexColor";
43
+ };
44
+ tts_name: string;
45
+ line_id: string;
46
+ }, {
47
+ agency_id: string;
48
+ _id: string;
49
+ color: string;
50
+ long_name: string;
51
+ short_name: string;
52
+ text_color: string;
53
+ tts_name: string;
54
+ line_id: string;
55
+ municipality_ids?: string[] | undefined;
56
+ district_ids?: string[] | undefined;
57
+ district_names?: string[] | undefined;
58
+ facilities?: string[] | undefined;
59
+ locality_ids?: string[] | undefined;
60
+ locality_names?: string[] | undefined;
61
+ municipality_names?: string[] | undefined;
62
+ parish_ids?: string[] | undefined;
63
+ parish_names?: string[] | undefined;
64
+ pattern_ids?: string[] | undefined;
65
+ stop_ids?: string[] | undefined;
66
+ }>;
67
+ /**
68
+ * Route data for the Hub Network API.
69
+ */
70
+ export type HubRoute = z.infer<typeof HubRouteSchema>;
@@ -0,0 +1,25 @@
1
+ /* * */
2
+ import { HexColorSchema } from '@tmlmobilidade/go-types-shared';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const HubRouteSchema = z.object({
6
+ _id: z.string(),
7
+ agency_id: z.string(),
8
+ color: HexColorSchema,
9
+ district_ids: z.array(z.string()).default([]),
10
+ district_names: z.array(z.string()).default([]),
11
+ facilities: z.array(z.string()).default([]),
12
+ line_id: z.string(),
13
+ locality_ids: z.array(z.string()).default([]),
14
+ locality_names: z.array(z.string()).default([]),
15
+ long_name: z.string(),
16
+ municipality_ids: z.array(z.string()).default([]),
17
+ municipality_names: z.array(z.string()).default([]),
18
+ parish_ids: z.array(z.string()).default([]),
19
+ parish_names: z.array(z.string()).default([]),
20
+ pattern_ids: z.array(z.string()).default([]),
21
+ short_name: z.string(),
22
+ stop_ids: z.array(z.string()).default([]),
23
+ text_color: HexColorSchema,
24
+ tts_name: z.string(),
25
+ });
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ export declare const HubScheduledArrivalSchema: z.ZodObject<{
3
+ arrival_time: z.ZodString;
4
+ arrival_time_24h: z.ZodString;
5
+ stop_id: z.ZodString;
6
+ stop_sequence: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ arrival_time: string;
9
+ arrival_time_24h: string;
10
+ stop_id: string;
11
+ stop_sequence: number;
12
+ }, {
13
+ arrival_time: string;
14
+ arrival_time_24h: string;
15
+ stop_id: string;
16
+ stop_sequence: string | number;
17
+ }>;
18
+ /**
19
+ * Scheduled arrival data for the Hub Network API.
20
+ */
21
+ export type HubScheduledArrival = z.infer<typeof HubScheduledArrivalSchema>;
@@ -0,0 +1,10 @@
1
+ /* * */
2
+ import { NonNegativeIntegerSchema } from '@tmlmobilidade/go-types-shared';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const HubScheduledArrivalSchema = z.object({
6
+ arrival_time: z.string(),
7
+ arrival_time_24h: z.string(),
8
+ stop_id: z.string(),
9
+ stop_sequence: NonNegativeIntegerSchema,
10
+ });
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ export declare const HubShapeSchema: z.ZodObject<{
3
+ _id: z.ZodString;
4
+ agency_id: z.ZodString;
5
+ extension: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>;
6
+ shape_polyline: z.ZodOptional<z.ZodString>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ agency_id: string;
9
+ _id: string;
10
+ extension: number;
11
+ shape_polyline?: string | undefined;
12
+ }, {
13
+ agency_id: string;
14
+ _id: string;
15
+ extension: string | number;
16
+ shape_polyline?: string | undefined;
17
+ }>;
18
+ /**
19
+ * Shape data for the Hub Network API.
20
+ */
21
+ export type HubShape = z.infer<typeof HubShapeSchema>;
@@ -0,0 +1,10 @@
1
+ /* * */
2
+ import { NonNegativeIntegerSchema } from '@tmlmobilidade/go-types-shared';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const HubShapeSchema = z.object({
6
+ _id: z.string(),
7
+ agency_id: z.string(),
8
+ extension: NonNegativeIntegerSchema,
9
+ shape_polyline: z.string().optional(),
10
+ });