@tmlmobilidade/types 20260627.17.1 → 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 (132) hide show
  1. package/dist/alerts/cause.d.ts +1 -1
  2. package/dist/alerts/effect.d.ts +1 -1
  3. package/dist/gtfs/feed-info.d.ts +2 -2
  4. package/dist/gtfs-tml/feed-info.d.ts +2 -2
  5. package/dist/gtfs-validation/gtfs-validation.d.ts +12 -12
  6. package/dist/index.d.ts +1 -2
  7. package/dist/index.js +1 -2
  8. package/dist/locations/queries.d.ts +4 -4
  9. package/dist/offer/pattern.d.ts +72 -72
  10. package/dist/offer/route-path-type.d.ts +2 -2
  11. package/dist/offer/route.d.ts +6 -6
  12. package/dist/offer/rules.d.ts +18 -18
  13. package/dist/offer/typology.d.ts +7 -7
  14. package/dist/offer/vkm.d.ts +15 -15
  15. package/dist/operation/lines/operational-line.d.ts +4 -4
  16. package/dist/operation/stops/operational-stop.d.ts +4 -4
  17. package/dist/organization.d.ts +5 -5
  18. package/dist/plans/plan-app-status.d.ts +2 -2
  19. package/dist/plans/plan.d.ts +94 -94
  20. package/dist/vehicle/vehicle.d.ts +5 -5
  21. package/dist/vehicle-events/raw/ccfl/v1.d.ts +54 -54
  22. package/dist/vehicle-events/raw/ccfl/v1.js +1 -1
  23. package/dist/vehicle-events/raw/cmet/v1-core.d.ts +88 -88
  24. package/dist/vehicle-events/raw/cmet/v1-log.d.ts +88 -88
  25. package/dist/vehicle-events/raw/cp/v1.d.ts +64 -64
  26. package/dist/vehicle-events/raw/cp/v1.js +1 -1
  27. package/dist/vehicle-events/raw/crtm-aisa/v1.d.ts +112 -112
  28. package/dist/vehicle-events/raw/crtm-aisa/v1.js +1 -2
  29. package/dist/vehicle-events/raw/crtm-laveloz/v1.d.ts +112 -112
  30. package/dist/vehicle-events/raw/crtm-laveloz/v1.js +1 -1
  31. package/dist/vehicle-events/raw/fertagus/v1.d.ts +64 -64
  32. package/dist/vehicle-events/raw/ml/v1.d.ts +54 -54
  33. package/dist/vehicle-events/raw/mobi/v1.d.ts +84 -84
  34. package/dist/vehicle-events/raw/mobi/v1.js +1 -1
  35. package/dist/vehicle-events/raw/raw-vehicle-event-base.d.ts +2 -2
  36. package/dist/vehicle-events/raw/raw-vehicle-event.d.ts +530 -530
  37. package/dist/vehicle-events/raw/tcb/v1.d.ts +84 -84
  38. package/dist/vehicle-events/raw/tcb/v1.js +1 -1
  39. package/dist/vehicle-events/raw/ttsl/v1.d.ts +54 -54
  40. package/dist/vehicle-events/raw/ttsl/v1.js +1 -1
  41. package/dist/vehicle-events/simplified/simplified-vehicle-event.d.ts +7 -7
  42. package/package.json +2 -1
  43. package/dist/gtfs-rt/alert.d.ts +0 -347
  44. package/dist/gtfs-rt/alert.js +0 -24
  45. package/dist/gtfs-rt/carriage-details.d.ts +0 -21
  46. package/dist/gtfs-rt/carriage-details.js +0 -11
  47. package/dist/gtfs-rt/cause.d.ts +0 -10
  48. package/dist/gtfs-rt/cause.js +0 -18
  49. package/dist/gtfs-rt/congestion-level.d.ts +0 -4
  50. package/dist/gtfs-rt/congestion-level.js +0 -11
  51. package/dist/gtfs-rt/effect.d.ts +0 -10
  52. package/dist/gtfs-rt/effect.js +0 -17
  53. package/dist/gtfs-rt/entity-selector.d.ts +0 -68
  54. package/dist/gtfs-rt/entity-selector.js +0 -12
  55. package/dist/gtfs-rt/feed-entity.d.ts +0 -729
  56. package/dist/gtfs-rt/feed-entity.js +0 -11
  57. package/dist/gtfs-rt/feed-header.d.ts +0 -18
  58. package/dist/gtfs-rt/feed-header.js +0 -9
  59. package/dist/gtfs-rt/feed-message.d.ts +0 -975
  60. package/dist/gtfs-rt/feed-message.js +0 -9
  61. package/dist/gtfs-rt/index.d.ts +0 -22
  62. package/dist/gtfs-rt/index.js +0 -22
  63. package/dist/gtfs-rt/localized-image.d.ts +0 -15
  64. package/dist/gtfs-rt/localized-image.js +0 -8
  65. package/dist/gtfs-rt/occupancy-status.d.ts +0 -4
  66. package/dist/gtfs-rt/occupancy-status.js +0 -15
  67. package/dist/gtfs-rt/position.d.ts +0 -21
  68. package/dist/gtfs-rt/position.js +0 -10
  69. package/dist/gtfs-rt/severity-level.d.ts +0 -4
  70. package/dist/gtfs-rt/severity-level.js +0 -10
  71. package/dist/gtfs-rt/time-range.d.ts +0 -12
  72. package/dist/gtfs-rt/time-range.js +0 -7
  73. package/dist/gtfs-rt/translated-image.d.ts +0 -29
  74. package/dist/gtfs-rt/translated-image.js +0 -7
  75. package/dist/gtfs-rt/translated-string.d.ts +0 -24
  76. package/dist/gtfs-rt/translated-string.js +0 -7
  77. package/dist/gtfs-rt/translation.d.ts +0 -12
  78. package/dist/gtfs-rt/translation.js +0 -7
  79. package/dist/gtfs-rt/trip-descriptor.d.ts +0 -29
  80. package/dist/gtfs-rt/trip-descriptor.js +0 -13
  81. package/dist/gtfs-rt/vehicle-descriptor.d.ts +0 -18
  82. package/dist/gtfs-rt/vehicle-descriptor.js +0 -10
  83. package/dist/gtfs-rt/vehicle-position.d.ts +0 -168
  84. package/dist/gtfs-rt/vehicle-position.js +0 -23
  85. package/dist/gtfs-rt/vehicle-stop-status.d.ts +0 -4
  86. package/dist/gtfs-rt/vehicle-stop-status.js +0 -9
  87. package/dist/gtfs-rt/wheelchair-accessible.d.ts +0 -4
  88. package/dist/gtfs-rt/wheelchair-accessible.js +0 -10
  89. package/dist/hub/api/alerts/alert.d.ts +0 -82
  90. package/dist/hub/api/alerts/alert.js +0 -20
  91. package/dist/hub/api/alerts/index.d.ts +0 -1
  92. package/dist/hub/api/alerts/index.js +0 -1
  93. package/dist/hub/api/index.d.ts +0 -7
  94. package/dist/hub/api/index.js +0 -7
  95. package/dist/hub/api/network/index.d.ts +0 -7
  96. package/dist/hub/api/network/index.js +0 -7
  97. package/dist/hub/api/network/line.d.ts +0 -66
  98. package/dist/hub/api/network/line.js +0 -24
  99. package/dist/hub/api/network/pattern.d.ts +0 -184
  100. package/dist/hub/api/network/pattern.js +0 -32
  101. package/dist/hub/api/network/route.d.ts +0 -66
  102. package/dist/hub/api/network/route.js +0 -24
  103. package/dist/hub/api/network/scheduled-arrival.d.ts +0 -21
  104. package/dist/hub/api/network/scheduled-arrival.js +0 -9
  105. package/dist/hub/api/network/stop.d.ts +0 -97
  106. package/dist/hub/api/network/stop.js +0 -29
  107. package/dist/hub/api/network/trip.d.ts +0 -49
  108. package/dist/hub/api/network/trip.js +0 -11
  109. package/dist/hub/api/network/waypoint.d.ts +0 -27
  110. package/dist/hub/api/network/waypoint.js +0 -11
  111. package/dist/hub/api/patterns.d.ts +0 -16
  112. package/dist/hub/api/patterns.js +0 -3
  113. package/dist/hub/api/plans/index.d.ts +0 -1
  114. package/dist/hub/api/plans/index.js +0 -1
  115. package/dist/hub/api/plans/plan.d.ts +0 -138
  116. package/dist/hub/api/plans/plan.js +0 -18
  117. package/dist/hub/api/realtime/index.d.ts +0 -1
  118. package/dist/hub/api/realtime/index.js +0 -1
  119. package/dist/hub/api/realtime/vehicle-position.d.ts +0 -66
  120. package/dist/hub/api/realtime/vehicle-position.js +0 -31
  121. package/dist/hub/api/realtime-eta-gtfs.d.ts +0 -41
  122. package/dist/hub/api/realtime-eta-gtfs.js +0 -2
  123. package/dist/hub/api/shapes.d.ts +0 -148
  124. package/dist/hub/api/shapes.js +0 -26
  125. package/dist/hub/api/timetables.d.ts +0 -36
  126. package/dist/hub/api/timetables.js +0 -2
  127. package/dist/hub/gtfs/index.d.ts +0 -1
  128. package/dist/hub/gtfs/index.js +0 -1
  129. package/dist/hub/gtfs/stops.d.ts +0 -66
  130. package/dist/hub/gtfs/stops.js +0 -24
  131. package/dist/hub/index.d.ts +0 -2
  132. package/dist/hub/index.js +0 -2
@@ -1,29 +0,0 @@
1
- /* * */
2
- import { StopFlagSchema } from '../../../stops/flag.js';
3
- import { StopIdSchema } from '../../../stops/stop-id.js';
4
- import { LifecycleStatusSchema } from '@tmlmobilidade/go-types-shared';
5
- import { z } from 'zod';
6
- /* * */
7
- export const HubStopSchema = z.object({
8
- _id: StopIdSchema,
9
- agency_ids: z.array(z.string()),
10
- district_id: z.string(),
11
- district_name: z.string(),
12
- flags: z.array(StopFlagSchema),
13
- latitude: z.number(),
14
- legacy_ids: z.array(z.string()),
15
- lifecycle_status: LifecycleStatusSchema,
16
- line_ids: z.array(z.string()),
17
- locality_id: z.string().nullable(),
18
- locality_name: z.string().nullable(),
19
- longitude: z.number(),
20
- municipality_id: z.string(),
21
- municipality_name: z.string(),
22
- name: z.string(),
23
- parish_id: z.string(),
24
- parish_name: z.string(),
25
- pattern_ids: z.array(z.string()),
26
- route_ids: z.array(z.string()),
27
- short_name: z.string(),
28
- tts_name: z.string(),
29
- });
@@ -1,49 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const HubTripSchema: z.ZodObject<{
3
- schedule: z.ZodArray<z.ZodObject<{
4
- arrival_time: z.ZodString;
5
- arrival_time_24h: z.ZodString;
6
- stop_id: z.ZodString;
7
- stop_sequence: z.ZodNumber;
8
- }, "strip", z.ZodTypeAny, {
9
- stop_id: string;
10
- arrival_time: string;
11
- stop_sequence: number;
12
- arrival_time_24h: string;
13
- }, {
14
- stop_id: string;
15
- arrival_time: string;
16
- stop_sequence: number;
17
- arrival_time_24h: string;
18
- }>, "many">;
19
- service_ids: z.ZodArray<z.ZodString, "many">;
20
- trip_ids: z.ZodArray<z.ZodString, "many">;
21
- valid_on: z.ZodArray<z.ZodString, "many">;
22
- version_id: z.ZodString;
23
- }, "strip", z.ZodTypeAny, {
24
- schedule: {
25
- stop_id: string;
26
- arrival_time: string;
27
- stop_sequence: number;
28
- arrival_time_24h: string;
29
- }[];
30
- service_ids: string[];
31
- trip_ids: string[];
32
- valid_on: string[];
33
- version_id: string;
34
- }, {
35
- schedule: {
36
- stop_id: string;
37
- arrival_time: string;
38
- stop_sequence: number;
39
- arrival_time_24h: string;
40
- }[];
41
- service_ids: string[];
42
- trip_ids: string[];
43
- valid_on: string[];
44
- version_id: string;
45
- }>;
46
- /**
47
- * Publishable trip data for the Hub Network API.
48
- */
49
- export type HubTrip = z.infer<typeof HubTripSchema>;
@@ -1,11 +0,0 @@
1
- /* * */
2
- import { HubScheduledArrivalSchema } from './scheduled-arrival.js';
3
- import { z } from 'zod';
4
- /* * */
5
- export const HubTripSchema = z.object({
6
- schedule: z.array(HubScheduledArrivalSchema),
7
- service_ids: z.array(z.string()),
8
- trip_ids: z.array(z.string()),
9
- valid_on: z.array(z.string()),
10
- version_id: z.string(),
11
- });
@@ -1,27 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const HubWaypointSchema: z.ZodObject<{
3
- allow_drop_off: z.ZodBoolean;
4
- allow_pickup: z.ZodBoolean;
5
- distance: z.ZodNumber;
6
- distance_delta: z.ZodNumber;
7
- stop_id: z.ZodString;
8
- stop_sequence: z.ZodNumber;
9
- }, "strip", z.ZodTypeAny, {
10
- stop_id: string;
11
- stop_sequence: number;
12
- allow_drop_off: boolean;
13
- allow_pickup: boolean;
14
- distance: number;
15
- distance_delta: number;
16
- }, {
17
- stop_id: string;
18
- stop_sequence: number;
19
- allow_drop_off: boolean;
20
- allow_pickup: boolean;
21
- distance: number;
22
- distance_delta: number;
23
- }>;
24
- /**
25
- * Publishable waypoint data for the Hub Network API.
26
- */
27
- export type HubWaypoint = z.infer<typeof HubWaypointSchema>;
@@ -1,11 +0,0 @@
1
- /* * */
2
- import { z } from 'zod';
3
- /* * */
4
- export const HubWaypointSchema = z.object({
5
- allow_drop_off: z.boolean(),
6
- allow_pickup: z.boolean(),
7
- distance: z.number(),
8
- distance_delta: z.number(),
9
- stop_id: z.string(),
10
- stop_sequence: z.number(),
11
- });
@@ -1,16 +0,0 @@
1
- export interface HubPatternRealtime {
2
- estimated_arrival: null | string;
3
- estimated_arrival_unix: null | number;
4
- headsign: string;
5
- line_id: string;
6
- observed_arrival: null | string;
7
- observed_arrival_unix: null | number;
8
- pattern_id: string;
9
- route_id: string;
10
- scheduled_arrival: string;
11
- scheduled_arrival_unix: number;
12
- stop_id: string;
13
- stop_sequence: number;
14
- trip_id: string;
15
- vehicle_id: null | string;
16
- }
@@ -1,3 +0,0 @@
1
- /* * */
2
- ;
3
- export {};
@@ -1 +0,0 @@
1
- export * from './plan.js';
@@ -1 +0,0 @@
1
- export * from './plan.js';
@@ -1,138 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const HubPlanSchema: z.ZodObject<{
3
- _id: z.ZodString;
4
- agency_id: z.ZodString;
5
- created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
6
- gtfs_agency: z.ZodObject<{
7
- agency_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
- agency_fare_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
- agency_id: z.ZodString;
10
- agency_lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
- agency_name: z.ZodString;
12
- agency_phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
- agency_timezone: z.ZodString;
14
- agency_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
- }, "strip", z.ZodTypeAny, {
16
- agency_id: string;
17
- agency_name: string;
18
- agency_timezone: string;
19
- agency_email?: string | null | undefined;
20
- agency_fare_url?: string | null | undefined;
21
- agency_lang?: string | null | undefined;
22
- agency_phone?: string | null | undefined;
23
- agency_url?: string | null | undefined;
24
- }, {
25
- agency_id: string;
26
- agency_name: string;
27
- agency_timezone: string;
28
- agency_email?: string | null | undefined;
29
- agency_fare_url?: string | null | undefined;
30
- agency_lang?: string | null | undefined;
31
- agency_phone?: string | null | undefined;
32
- agency_url?: string | null | undefined;
33
- }>;
34
- gtfs_feed_info: z.ZodObject<{
35
- default_lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
- feed_contact_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37
- feed_contact_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
38
- feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-shared").OperationalDate, string>>>;
39
- feed_lang: z.ZodString;
40
- feed_publisher_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
41
- feed_publisher_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
42
- feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-shared").OperationalDate, string>>>;
43
- feed_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
- }, "strip", z.ZodTypeAny, {
45
- feed_lang: string;
46
- feed_end_date?: import("@tmlmobilidade/go-types-shared").OperationalDate | null | undefined;
47
- feed_start_date?: import("@tmlmobilidade/go-types-shared").OperationalDate | null | undefined;
48
- feed_version?: string | null | undefined;
49
- default_lang?: string | null | undefined;
50
- feed_contact_email?: string | null | undefined;
51
- feed_contact_url?: string | null | undefined;
52
- feed_publisher_name?: string | null | undefined;
53
- feed_publisher_url?: string | null | undefined;
54
- }, {
55
- feed_lang: string;
56
- feed_end_date?: string | null | undefined;
57
- feed_start_date?: string | null | undefined;
58
- feed_version?: string | null | undefined;
59
- default_lang?: string | null | undefined;
60
- feed_contact_email?: string | null | undefined;
61
- feed_contact_url?: string | null | undefined;
62
- feed_publisher_name?: string | null | undefined;
63
- feed_publisher_url?: string | null | undefined;
64
- }>;
65
- hash: z.ZodString;
66
- is_active: z.ZodDefault<z.ZodBoolean>;
67
- operation_file_id: z.ZodString;
68
- operation_file_url: z.ZodString;
69
- updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
70
- }, "strip", z.ZodTypeAny, {
71
- _id: string;
72
- created_at: number & {
73
- __brand: "UnixTimestamp";
74
- };
75
- updated_at: number & {
76
- __brand: "UnixTimestamp";
77
- };
78
- agency_id: string;
79
- gtfs_agency: {
80
- agency_id: string;
81
- agency_name: string;
82
- agency_timezone: string;
83
- agency_email?: string | null | undefined;
84
- agency_fare_url?: string | null | undefined;
85
- agency_lang?: string | null | undefined;
86
- agency_phone?: string | null | undefined;
87
- agency_url?: string | null | undefined;
88
- };
89
- gtfs_feed_info: {
90
- feed_lang: string;
91
- feed_end_date?: import("@tmlmobilidade/go-types-shared").OperationalDate | null | undefined;
92
- feed_start_date?: import("@tmlmobilidade/go-types-shared").OperationalDate | null | undefined;
93
- feed_version?: string | null | undefined;
94
- default_lang?: string | null | undefined;
95
- feed_contact_email?: string | null | undefined;
96
- feed_contact_url?: string | null | undefined;
97
- feed_publisher_name?: string | null | undefined;
98
- feed_publisher_url?: string | null | undefined;
99
- };
100
- hash: string;
101
- is_active: boolean;
102
- operation_file_id: string;
103
- operation_file_url: string;
104
- }, {
105
- _id: string;
106
- created_at: number;
107
- updated_at: number;
108
- agency_id: string;
109
- gtfs_agency: {
110
- agency_id: string;
111
- agency_name: string;
112
- agency_timezone: string;
113
- agency_email?: string | null | undefined;
114
- agency_fare_url?: string | null | undefined;
115
- agency_lang?: string | null | undefined;
116
- agency_phone?: string | null | undefined;
117
- agency_url?: string | null | undefined;
118
- };
119
- gtfs_feed_info: {
120
- feed_lang: string;
121
- feed_end_date?: string | null | undefined;
122
- feed_start_date?: string | null | undefined;
123
- feed_version?: string | null | undefined;
124
- default_lang?: string | null | undefined;
125
- feed_contact_email?: string | null | undefined;
126
- feed_contact_url?: string | null | undefined;
127
- feed_publisher_name?: string | null | undefined;
128
- feed_publisher_url?: string | null | undefined;
129
- };
130
- hash: string;
131
- operation_file_id: string;
132
- operation_file_url: string;
133
- is_active?: boolean | undefined;
134
- }>;
135
- /**
136
- * Publishable plan data for the Hub Plans API.
137
- */
138
- export type HubPlan = z.infer<typeof HubPlanSchema>;
@@ -1,18 +0,0 @@
1
- /* * */
2
- import { GtfsAgencySchema } from '../../../gtfs/agency.js';
3
- import { GtfsFeedInfoSchema } from '../../../gtfs/feed-info.js';
4
- import { UnixTimestampSchema } from '@tmlmobilidade/go-types-shared';
5
- import { z } from 'zod';
6
- /* * */
7
- export const HubPlanSchema = z.object({
8
- _id: z.string(),
9
- agency_id: z.string(),
10
- created_at: UnixTimestampSchema,
11
- gtfs_agency: GtfsAgencySchema,
12
- gtfs_feed_info: GtfsFeedInfoSchema,
13
- hash: z.string(),
14
- is_active: z.boolean().default(false),
15
- operation_file_id: z.string(),
16
- operation_file_url: z.string(),
17
- updated_at: UnixTimestampSchema,
18
- });
@@ -1 +0,0 @@
1
- export * from './vehicle-position.js';
@@ -1 +0,0 @@
1
- export * from './vehicle-position.js';
@@ -1,66 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const HubVehiclePositionSchema: z.ZodObject<{
3
- _id: z.ZodString;
4
- agency_id: z.ZodString;
5
- bearing: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
6
- calendar_date: z.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-shared").CalendarDate, string>;
7
- created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
8
- current_status: z.ZodDefault<z.ZodNullable<z.ZodEnum<["INCOMING_AT", "STOPPED_AT", "IN_TRANSIT_TO"]>>>;
9
- geohash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
10
- latitude: z.ZodEffects<z.ZodEffects<z.ZodNumber, string, number>, number, number>;
11
- line_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
12
- longitude: z.ZodEffects<z.ZodEffects<z.ZodNumber, string, number>, number, number>;
13
- pattern_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
14
- received_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
15
- ride_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
16
- speed: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
17
- stop_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
18
- trip_id: z.ZodString;
19
- vehicle_id: z.ZodString;
20
- }, "strip", z.ZodTypeAny, {
21
- _id: string;
22
- created_at: number & {
23
- __brand: "UnixTimestamp";
24
- };
25
- agency_id: string;
26
- line_id: string | null;
27
- ride_id: string | null;
28
- pattern_id: string | null;
29
- trip_id: string;
30
- vehicle_id: string;
31
- stop_id: string | null;
32
- latitude: number;
33
- longitude: number;
34
- bearing: number | null;
35
- speed: number | null;
36
- current_status: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO" | null;
37
- calendar_date: string & {
38
- __brand: "CalendarDate";
39
- };
40
- geohash: string | null;
41
- received_at: number & {
42
- __brand: "UnixTimestamp";
43
- };
44
- }, {
45
- _id: string;
46
- created_at: number;
47
- agency_id: string;
48
- trip_id: string;
49
- vehicle_id: string;
50
- latitude: number;
51
- longitude: number;
52
- calendar_date: string;
53
- received_at: number;
54
- line_id?: string | null | undefined;
55
- ride_id?: string | null | undefined;
56
- pattern_id?: string | null | undefined;
57
- stop_id?: string | null | undefined;
58
- bearing?: number | null | undefined;
59
- speed?: number | null | undefined;
60
- current_status?: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO" | null | undefined;
61
- geohash?: string | null | undefined;
62
- }>;
63
- /**
64
- * Publishable plan data for the Hub Plans API.
65
- */
66
- export type HubVehiclePosition = z.infer<typeof HubVehiclePositionSchema>;
@@ -1,31 +0,0 @@
1
- /* * */
2
- import { CalendarDateSchema, UnixTimestampSchema } from '@tmlmobilidade/go-types-shared';
3
- import { z } from 'zod';
4
- /* * */
5
- export const HubVehiclePositionSchema = z.object({
6
- _id: z.string(),
7
- agency_id: z.string(),
8
- bearing: z.number().nullable().default(null),
9
- calendar_date: CalendarDateSchema,
10
- created_at: UnixTimestampSchema,
11
- current_status: z.enum(['INCOMING_AT', 'STOPPED_AT', 'IN_TRANSIT_TO']).nullable().default(null),
12
- geohash: z.string().nullable().default(null),
13
- latitude: z.number()
14
- .min(-90)
15
- .max(90)
16
- .transform(value => value.toFixed(6))
17
- .transform(value => parseFloat(value)),
18
- line_id: z.string().nullable().default(null),
19
- longitude: z.number()
20
- .min(-180)
21
- .max(180)
22
- .transform(value => value.toFixed(6))
23
- .transform(value => parseFloat(value)),
24
- pattern_id: z.string().nullable().default(null),
25
- received_at: UnixTimestampSchema,
26
- ride_id: z.string().nullable().default(null),
27
- speed: z.number().nullable().default(null),
28
- stop_id: z.string().nullable().default(null),
29
- trip_id: z.string(),
30
- vehicle_id: z.string(),
31
- });
@@ -1,41 +0,0 @@
1
- export interface HubGtfsRtStopTimeEvent {
2
- delay?: null | number;
3
- time?: null | number;
4
- }
5
- export interface HubGtfsRtStopTimeUpdate {
6
- arrival?: HubGtfsRtStopTimeEvent | null;
7
- schedule_relationship?: null | string;
8
- stop_id?: null | string;
9
- stop_sequence?: null | number;
10
- }
11
- export interface HubGtfsRtTripDescriptor {
12
- schedule_relationship?: null | string;
13
- trip_id?: null | string;
14
- }
15
- export interface HubGtfsRtTripUpdate {
16
- stop_time_update?: HubGtfsRtStopTimeUpdate[] | null;
17
- timestamp?: null | number;
18
- trip?: HubGtfsRtTripDescriptor | null;
19
- vehicle?: null | {
20
- id?: null | string;
21
- };
22
- }
23
- export interface HubGtfsRtFeedEntity {
24
- id?: null | string;
25
- stop_time_update?: HubGtfsRtStopTimeUpdate[] | null;
26
- timestamp?: null | number;
27
- trip?: HubGtfsRtTripDescriptor | null;
28
- trip_update?: HubGtfsRtTripUpdate | null;
29
- vehicle?: null | {
30
- id?: null | string;
31
- };
32
- }
33
- export interface HubGtfsRtFeedHeader {
34
- gtfs_realtime_version?: string;
35
- incrementality?: string;
36
- timestamp?: number;
37
- }
38
- export interface HubGtfsRtFeedMessage {
39
- entity: HubGtfsRtFeedEntity[];
40
- header: HubGtfsRtFeedHeader;
41
- }
@@ -1,2 +0,0 @@
1
- /* * */
2
- export {};
@@ -1,148 +0,0 @@
1
- import { type Feature, type LineString } from 'geojson';
2
- import { z } from 'zod';
3
- export declare const HubShapeGeoJsonSchema: z.ZodObject<{
4
- geometry: z.ZodObject<{
5
- coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">;
6
- type: z.ZodLiteral<"LineString">;
7
- }, "strip", z.ZodTypeAny, {
8
- type: "LineString";
9
- coordinates: [number, number][];
10
- }, {
11
- type: "LineString";
12
- coordinates: [number, number][];
13
- }>;
14
- properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
15
- type: z.ZodLiteral<"Feature">;
16
- }, "strip", z.ZodTypeAny, {
17
- type: "Feature";
18
- geometry: {
19
- type: "LineString";
20
- coordinates: [number, number][];
21
- };
22
- properties?: Record<string, any> | undefined;
23
- }, {
24
- type: "Feature";
25
- geometry: {
26
- type: "LineString";
27
- coordinates: [number, number][];
28
- };
29
- properties?: Record<string, any> | undefined;
30
- }>;
31
- export declare const HubShapePointSchema: z.ZodObject<{
32
- shape_dist_traveled: z.ZodNumber;
33
- shape_pt_lat: z.ZodNumber;
34
- shape_pt_lon: z.ZodNumber;
35
- shape_pt_sequence: z.ZodNumber;
36
- }, "strip", z.ZodTypeAny, {
37
- shape_dist_traveled: number;
38
- shape_pt_lat: number;
39
- shape_pt_lon: number;
40
- shape_pt_sequence: number;
41
- }, {
42
- shape_dist_traveled: number;
43
- shape_pt_lat: number;
44
- shape_pt_lon: number;
45
- shape_pt_sequence: number;
46
- }>;
47
- /**
48
- * Publishable shape point data for the Hub Shapes API.
49
- */
50
- export type HubShapePoint = z.infer<typeof HubShapePointSchema>;
51
- export declare const HubShapeSchema: z.ZodObject<{
52
- _id: z.ZodString;
53
- agency_id: z.ZodString;
54
- encoded_polyline: z.ZodOptional<z.ZodString>;
55
- extension: z.ZodNumber;
56
- geojson: z.ZodObject<{
57
- geometry: z.ZodObject<{
58
- coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">;
59
- type: z.ZodLiteral<"LineString">;
60
- }, "strip", z.ZodTypeAny, {
61
- type: "LineString";
62
- coordinates: [number, number][];
63
- }, {
64
- type: "LineString";
65
- coordinates: [number, number][];
66
- }>;
67
- properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
68
- type: z.ZodLiteral<"Feature">;
69
- }, "strip", z.ZodTypeAny, {
70
- type: "Feature";
71
- geometry: {
72
- type: "LineString";
73
- coordinates: [number, number][];
74
- };
75
- properties?: Record<string, any> | undefined;
76
- }, {
77
- type: "Feature";
78
- geometry: {
79
- type: "LineString";
80
- coordinates: [number, number][];
81
- };
82
- properties?: Record<string, any> | undefined;
83
- }>;
84
- points: z.ZodArray<z.ZodObject<{
85
- shape_dist_traveled: z.ZodNumber;
86
- shape_pt_lat: z.ZodNumber;
87
- shape_pt_lon: z.ZodNumber;
88
- shape_pt_sequence: z.ZodNumber;
89
- }, "strip", z.ZodTypeAny, {
90
- shape_dist_traveled: number;
91
- shape_pt_lat: number;
92
- shape_pt_lon: number;
93
- shape_pt_sequence: number;
94
- }, {
95
- shape_dist_traveled: number;
96
- shape_pt_lat: number;
97
- shape_pt_lon: number;
98
- shape_pt_sequence: number;
99
- }>, "many">;
100
- }, "strip", z.ZodTypeAny, {
101
- _id: string;
102
- agency_id: string;
103
- extension: number;
104
- geojson: {
105
- type: "Feature";
106
- geometry: {
107
- type: "LineString";
108
- coordinates: [number, number][];
109
- };
110
- properties?: Record<string, any> | undefined;
111
- };
112
- points: {
113
- shape_dist_traveled: number;
114
- shape_pt_lat: number;
115
- shape_pt_lon: number;
116
- shape_pt_sequence: number;
117
- }[];
118
- encoded_polyline?: string | undefined;
119
- }, {
120
- _id: string;
121
- agency_id: string;
122
- extension: number;
123
- geojson: {
124
- type: "Feature";
125
- geometry: {
126
- type: "LineString";
127
- coordinates: [number, number][];
128
- };
129
- properties?: Record<string, any> | undefined;
130
- };
131
- points: {
132
- shape_dist_traveled: number;
133
- shape_pt_lat: number;
134
- shape_pt_lon: number;
135
- shape_pt_sequence: number;
136
- }[];
137
- encoded_polyline?: string | undefined;
138
- }>;
139
- /**
140
- * GeoJSON feature for a hub network shape line.
141
- */
142
- export type HubShapeGeoJson = Feature<LineString>;
143
- /**
144
- * Publishable shape data for the Hub Shapes API.
145
- */
146
- export type HubShape = Omit<z.infer<typeof HubShapeSchema>, 'geojson'> & {
147
- geojson: HubShapeGeoJson;
148
- };
@@ -1,26 +0,0 @@
1
- /* * */
2
- import { z } from 'zod';
3
- /* * */
4
- export const HubShapeGeoJsonSchema = z.object({
5
- geometry: z.object({
6
- coordinates: z.array(z.tuple([z.number(), z.number()])),
7
- type: z.literal('LineString'),
8
- }),
9
- properties: z.record(z.string(), z.any()).optional(),
10
- type: z.literal('Feature'),
11
- });
12
- export const HubShapePointSchema = z.object({
13
- shape_dist_traveled: z.number(),
14
- shape_pt_lat: z.number(),
15
- shape_pt_lon: z.number(),
16
- shape_pt_sequence: z.number(),
17
- });
18
- /* * */
19
- export const HubShapeSchema = z.object({
20
- _id: z.string(),
21
- agency_id: z.string(),
22
- encoded_polyline: z.string().optional(),
23
- extension: z.number(),
24
- geojson: HubShapeGeoJsonSchema,
25
- points: z.array(HubShapePointSchema),
26
- });
@@ -1,36 +0,0 @@
1
- export interface Timetable {
2
- exceptions: Exception[];
3
- hours: Hour[];
4
- }
5
- export interface Hour {
6
- hour_label: string;
7
- hour_value: number;
8
- minutes: Minute[];
9
- }
10
- export interface Minute {
11
- exception_ids: string[];
12
- minute_label: string;
13
- minute_value: number;
14
- trip_ids: string[];
15
- }
16
- interface ExceptionTemplate {
17
- exception_id: string;
18
- pattern_headsign: string;
19
- pattern_id: string;
20
- pattern_version_id: string;
21
- route_long_name: string;
22
- }
23
- interface ExceptionExtensionSchedule {
24
- calendar_desc: string;
25
- type: 'schedule';
26
- }
27
- interface ExceptionExtensionVariant {
28
- calendar_desc?: null;
29
- type: 'variant';
30
- }
31
- export type Exception = ((ExceptionExtensionSchedule | ExceptionExtensionVariant) & ExceptionTemplate);
32
- export interface NextArrival {
33
- type: 'realtime' | 'scheduled';
34
- unixTs: number;
35
- }
36
- export {};