@tmlmobilidade/types 20260605.28.48 → 20260605.142.19

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.
@@ -2,6 +2,7 @@ export * from './alerts/index.js';
2
2
  export * from './lines.js';
3
3
  export * from './patterns.js';
4
4
  export * from './plans/index.js';
5
+ export * from './realtime/index.js';
5
6
  export * from './shapes.js';
6
7
  export * from './stop.js';
7
8
  export * from './timetables.js';
@@ -2,6 +2,7 @@ export * from './alerts/index.js';
2
2
  export * from './lines.js';
3
3
  export * from './patterns.js';
4
4
  export * from './plans/index.js';
5
+ export * from './realtime/index.js';
5
6
  export * from './shapes.js';
6
7
  export * from './stop.js';
7
8
  export * from './timetables.js';
@@ -63,6 +63,7 @@ export declare const HubPlanSchema: z.ZodObject<{
63
63
  feed_publisher_url?: string | null | undefined;
64
64
  }>;
65
65
  hash: z.ZodString;
66
+ is_active: z.ZodDefault<z.ZodBoolean>;
66
67
  operation_file_id: z.ZodString;
67
68
  operation_file_url: z.ZodString;
68
69
  updated_at: z.ZodEffects<z.ZodNumber, import("../../../_common/unix-timestamp.js").UnixTimestamp, number>;
@@ -97,6 +98,7 @@ export declare const HubPlanSchema: z.ZodObject<{
97
98
  feed_publisher_url?: string | null | undefined;
98
99
  };
99
100
  hash: string;
101
+ is_active: boolean;
100
102
  operation_file_id: string;
101
103
  operation_file_url: string;
102
104
  }, {
@@ -128,6 +130,7 @@ export declare const HubPlanSchema: z.ZodObject<{
128
130
  hash: string;
129
131
  operation_file_id: string;
130
132
  operation_file_url: string;
133
+ is_active?: boolean | undefined;
131
134
  }>;
132
135
  /**
133
136
  * Publishable plan data for the Hub Plans API.
@@ -11,6 +11,7 @@ export const HubPlanSchema = z.object({
11
11
  gtfs_agency: GtfsAgencySchema,
12
12
  gtfs_feed_info: GtfsFeedInfoSchema,
13
13
  hash: z.string(),
14
+ is_active: z.boolean().default(false),
14
15
  operation_file_id: z.string(),
15
16
  operation_file_url: z.string(),
16
17
  updated_at: UnixTimestampSchema,
@@ -0,0 +1 @@
1
+ export * from './vehicle-position.js';
@@ -0,0 +1 @@
1
+ export * from './vehicle-position.js';
@@ -0,0 +1,57 @@
1
+ import { z } from 'zod';
2
+ export declare const HubVehiclePositionSchema: z.ZodObject<{
3
+ _id: z.ZodString;
4
+ agency_id: z.ZodString;
5
+ calendar_date: z.ZodEffects<z.ZodString, import("../../../index.js").OperationalDate, string>;
6
+ created_at: z.ZodEffects<z.ZodNumber, import("../../../index.js").UnixTimestamp, number>;
7
+ geohash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
+ latitude: z.ZodEffects<z.ZodNumber, number, number>;
9
+ longitude: z.ZodEffects<z.ZodNumber, number, number>;
10
+ received_at: z.ZodEffects<z.ZodNumber, import("../../../index.js").UnixTimestamp, number>;
11
+ trip_id: z.ZodString;
12
+ vehicle_id: z.ZodString;
13
+ bearing: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
14
+ current_status: z.ZodDefault<z.ZodNullable<z.ZodEnum<["INCOMING_AT", "STOPPED_AT", "IN_TRANSIT_TO"]>>>;
15
+ speed: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
16
+ stop_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ _id: string;
19
+ created_at: number & {
20
+ __brand: "UnixTimestamp";
21
+ };
22
+ latitude: number;
23
+ longitude: number;
24
+ agency_id: string;
25
+ received_at: number & {
26
+ __brand: "UnixTimestamp";
27
+ };
28
+ stop_id: string | null;
29
+ trip_id: string;
30
+ vehicle_id: string;
31
+ bearing: number | null;
32
+ speed: number | null;
33
+ current_status: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO" | null;
34
+ calendar_date: string & {
35
+ __brand: "OperationalDate";
36
+ };
37
+ geohash?: string | null | undefined;
38
+ }, {
39
+ _id: string;
40
+ created_at: number;
41
+ latitude: number;
42
+ longitude: number;
43
+ agency_id: string;
44
+ received_at: number;
45
+ trip_id: string;
46
+ vehicle_id: string;
47
+ calendar_date: string;
48
+ geohash?: string | null | undefined;
49
+ stop_id?: string | null | undefined;
50
+ bearing?: number | null | undefined;
51
+ speed?: number | null | undefined;
52
+ current_status?: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO" | null | undefined;
53
+ }>;
54
+ /**
55
+ * Publishable plan data for the Hub Plans API.
56
+ */
57
+ export type HubVehiclePosition = z.infer<typeof HubVehiclePositionSchema>;
@@ -0,0 +1,31 @@
1
+ /* * */
2
+ import { UnixTimestampSchema } from '../../../_common/unix-timestamp.js';
3
+ import { OperationalDateSchema } from '../../../index.js';
4
+ import { z } from 'zod';
5
+ /* * */
6
+ export const HubVehiclePositionSchema = z.object({
7
+ //
8
+ // Required Fields
9
+ _id: z.string(),
10
+ agency_id: z.string(),
11
+ calendar_date: OperationalDateSchema,
12
+ created_at: UnixTimestampSchema,
13
+ geohash: z.string().nullish(),
14
+ latitude: z.number()
15
+ .min(-90)
16
+ .max(90)
17
+ .refine(value => value.toFixed(6) === value.toString()),
18
+ longitude: z.number()
19
+ .min(-180)
20
+ .max(180)
21
+ .refine(value => value.toFixed(6) === value.toString()),
22
+ received_at: UnixTimestampSchema,
23
+ trip_id: z.string(),
24
+ vehicle_id: z.string(),
25
+ //
26
+ // Optional Fields
27
+ bearing: z.number().nullable().default(null),
28
+ current_status: z.enum(['INCOMING_AT', 'STOPPED_AT', 'IN_TRANSIT_TO']).nullable().default(null),
29
+ speed: z.number().nullable().default(null),
30
+ stop_id: z.string().nullable().default(null),
31
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/types",
3
- "version": "20260605.28.48",
3
+ "version": "20260605.142.19",
4
4
  "author": {
5
5
  "email": "iso@tmlmobilidade.pt",
6
6
  "name": "TML-ISO"