@tmlmobilidade/types 20260601.1041.27 → 20260601.1657.26

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.
@@ -71,6 +71,8 @@ export declare function validateGtfsStop(rawData: GTFS_Stop_Raw): GTFS_Stop;
71
71
  * should be used for working with the GTFS-TML standard.
72
72
  */
73
73
  export interface GTFS_Stop_Extended extends GTFS_Stop {
74
+ district_id?: string;
75
+ district_name?: string;
74
76
  has_bench?: GTFS_HasField;
75
77
  has_network_map?: GTFS_HasField;
76
78
  has_pip_real_time?: GTFS_HasField;
@@ -78,8 +80,12 @@ export interface GTFS_Stop_Extended extends GTFS_Stop {
78
80
  has_shelter?: GTFS_HasField;
79
81
  has_stop_sign?: GTFS_HasField;
80
82
  has_tariffs_information?: GTFS_HasField;
83
+ locality_id?: string;
84
+ locality_name?: string;
81
85
  municipality_id?: string;
86
+ municipality_name?: string;
82
87
  parish_id?: string;
88
+ parish_name?: string;
83
89
  public_visible?: GTFS_Binary;
84
90
  region_id?: string;
85
91
  shelter_code?: string;
@@ -94,6 +100,8 @@ export interface GTFS_Stop_Extended extends GTFS_Stop {
94
100
  * and transformation into the `GTFS_Stop_Extended` format.
95
101
  */
96
102
  export interface GTFS_Stop_Extended_Raw extends GTFS_Stop_Raw {
103
+ district_id?: string;
104
+ district_name?: string;
97
105
  has_bench?: string;
98
106
  has_network_map?: string;
99
107
  has_pip_real_time?: string;
@@ -101,8 +109,12 @@ export interface GTFS_Stop_Extended_Raw extends GTFS_Stop_Raw {
101
109
  has_shelter?: string;
102
110
  has_stop_sign?: string;
103
111
  has_tariffs_information?: string;
112
+ locality_id?: string;
113
+ locality_name?: string;
104
114
  municipality_id?: string;
115
+ municipality_name?: string;
105
116
  parish_id?: string;
117
+ parish_name?: string;
106
118
  public_visible?: string;
107
119
  region_id?: string;
108
120
  shelter_code?: string;
@@ -77,6 +77,8 @@ export function validateGtfsStopExtended(rawData) {
77
77
  // Transform the raw data into the output format
78
78
  return {
79
79
  ...stop,
80
+ district_id: rawData.district_id,
81
+ district_name: rawData.district_name,
80
82
  has_bench: validateGtfsHasField(rawData.has_bench),
81
83
  has_network_map: validateGtfsHasField(rawData.has_network_map),
82
84
  has_pip_real_time: validateGtfsHasField(rawData.has_pip_real_time),
@@ -84,8 +86,12 @@ export function validateGtfsStopExtended(rawData) {
84
86
  has_shelter: validateGtfsBinary(rawData.has_shelter),
85
87
  has_stop_sign: validateGtfsHasField(rawData.has_stop_sign),
86
88
  has_tariffs_information: validateGtfsHasField(rawData.has_tariffs_information),
89
+ locality_id: rawData.locality_id,
90
+ locality_name: rawData.locality_name,
87
91
  municipality_id: rawData.municipality_id,
92
+ municipality_name: rawData.municipality_name,
88
93
  parish_id: rawData.parish_id,
94
+ parish_name: rawData.parish_name,
89
95
  public_visible: validateGtfsBinary(rawData.public_visible),
90
96
  region_id: rawData.region_id,
91
97
  shelter_code: rawData.shelter_code,
@@ -1,14 +1,14 @@
1
1
  import { z } from 'zod';
2
2
  export declare const HubAlertSchema: z.ZodObject<Omit<{
3
3
  _id: z.ZodString;
4
- created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
4
+ created_at: z.ZodEffects<z.ZodNumber, import("../../index.js").UnixTimestamp, number>;
5
5
  created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
6
6
  is_locked: z.ZodDefault<z.ZodBoolean>;
7
- updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
7
+ updated_at: z.ZodEffects<z.ZodNumber, import("../../index.js").UnixTimestamp, number>;
8
8
  updated_by: z.ZodOptional<z.ZodString>;
9
9
  } & {
10
- active_period_end_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>>>;
11
- active_period_start_date: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
10
+ active_period_end_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../../index.js").UnixTimestamp, number>>>;
11
+ active_period_start_date: z.ZodEffects<z.ZodNumber, import("../../index.js").UnixTimestamp, number>;
12
12
  agency_id: z.ZodString;
13
13
  auto_texts: z.ZodDefault<z.ZodBoolean>;
14
14
  cause: z.ZodEnum<["ACCIDENT", "CONSTRUCTION", "DEMONSTRATION", "MEDICAL_EMERGENCY", "POLICE_ACTIVITY", "STRIKE", "TECHNICAL_ISSUE", "WEATHER", "ABUSIVE_PARKING", "DRIVER_ABSENCE", "DRIVER_ISSUE", "HIGH_PASSENGER_LOAD", "NETWORK_UPDATE", "ROAD_ISSUE", "TRAFFIC_JAM", "PUBLIC_DISORDER", "VEHICLE_ISSUE"]>;
@@ -19,8 +19,8 @@ export declare const HubAlertSchema: z.ZodObject<Omit<{
19
19
  file_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
20
20
  info_url: z.ZodDefault<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>>;
21
21
  municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
22
- publish_end_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>>>;
23
- publish_start_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>>>;
22
+ publish_end_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../../index.js").UnixTimestamp, number>>>;
23
+ publish_start_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../../index.js").UnixTimestamp, number>>>;
24
24
  publish_status: z.ZodDefault<z.ZodEnum<["published", "archived", "draft"]>>;
25
25
  reference_type: z.ZodEnum<["agency", "lines", "stops", "rides"]>;
26
26
  references: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -40,7 +40,7 @@ export declare const HubAlertSchema: z.ZodObject<Omit<{
40
40
  }, "strip", z.ZodTypeAny, {
41
41
  _id: string;
42
42
  description: string;
43
- active_period_end_date: import("../index.js").UnixTimestamp | null;
43
+ active_period_end_date: import("../../index.js").UnixTimestamp | null;
44
44
  active_period_start_date: number & {
45
45
  __brand: "UnixTimestamp";
46
46
  };
@@ -1,5 +1,5 @@
1
1
  /* * */
2
- import { AlertSchema } from '../alerts/alert.js';
2
+ import { AlertSchema } from '../../alerts/alert.js';
3
3
  import { z } from 'zod';
4
4
  /* * */
5
5
  export const HubAlertSchema = AlertSchema.omit({
@@ -0,0 +1,3 @@
1
+ export * from './alerts.js';
2
+ export * from './lines.js';
3
+ export * from './stop.js';
@@ -0,0 +1,3 @@
1
+ export * from './alerts.js';
2
+ export * from './lines.js';
3
+ export * from './stop.js';
@@ -0,0 +1,94 @@
1
+ import { z } from 'zod';
2
+ export declare const HubStopSchema: z.ZodObject<{
3
+ _id: z.ZodNumber;
4
+ district_id: z.ZodString;
5
+ district_name: z.ZodString;
6
+ flags: z.ZodArray<z.ZodObject<{
7
+ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
8
+ is_harmonized: z.ZodDefault<z.ZodBoolean>;
9
+ short_name: z.ZodString;
10
+ stop_id: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ short_name: string;
13
+ stop_id: string;
14
+ agency_ids: string[];
15
+ is_harmonized: boolean;
16
+ }, {
17
+ short_name: string;
18
+ stop_id: string;
19
+ agency_ids?: string[] | undefined;
20
+ is_harmonized?: boolean | undefined;
21
+ }>, "many">;
22
+ latitude: z.ZodNumber;
23
+ legacy_ids: z.ZodArray<z.ZodString, "many">;
24
+ lifecycle_status: z.ZodEnum<["draft", "active", "inactive", "provisional", "seasonal", "voided"]>;
25
+ line_ids: z.ZodArray<z.ZodString, "many">;
26
+ locality_id: z.ZodNullable<z.ZodString>;
27
+ locality_name: z.ZodNullable<z.ZodString>;
28
+ longitude: z.ZodNumber;
29
+ municipality_id: z.ZodString;
30
+ municipality_name: z.ZodString;
31
+ name: z.ZodString;
32
+ parish_id: z.ZodString;
33
+ parish_name: z.ZodString;
34
+ pattern_ids: z.ZodArray<z.ZodString, "many">;
35
+ route_ids: z.ZodArray<z.ZodString, "many">;
36
+ short_name: z.ZodString;
37
+ tts_name: z.ZodString;
38
+ }, "strip", z.ZodTypeAny, {
39
+ _id: number;
40
+ name: string;
41
+ latitude: number;
42
+ longitude: number;
43
+ short_name: string;
44
+ line_ids: string[];
45
+ flags: {
46
+ short_name: string;
47
+ stop_id: string;
48
+ agency_ids: string[];
49
+ is_harmonized: boolean;
50
+ }[];
51
+ legacy_ids: string[];
52
+ lifecycle_status: "draft" | "active" | "inactive" | "provisional" | "seasonal" | "voided";
53
+ tts_name: string;
54
+ district_id: string;
55
+ locality_id: string | null;
56
+ municipality_id: string;
57
+ parish_id: string;
58
+ district_name: string;
59
+ locality_name: string | null;
60
+ municipality_name: string;
61
+ parish_name: string;
62
+ pattern_ids: string[];
63
+ route_ids: string[];
64
+ }, {
65
+ _id: number;
66
+ name: string;
67
+ latitude: number;
68
+ longitude: number;
69
+ short_name: string;
70
+ line_ids: string[];
71
+ flags: {
72
+ short_name: string;
73
+ stop_id: string;
74
+ agency_ids?: string[] | undefined;
75
+ is_harmonized?: boolean | undefined;
76
+ }[];
77
+ legacy_ids: string[];
78
+ lifecycle_status: "draft" | "active" | "inactive" | "provisional" | "seasonal" | "voided";
79
+ tts_name: string;
80
+ district_id: string;
81
+ locality_id: string | null;
82
+ municipality_id: string;
83
+ parish_id: string;
84
+ district_name: string;
85
+ locality_name: string | null;
86
+ municipality_name: string;
87
+ parish_name: string;
88
+ pattern_ids: string[];
89
+ route_ids: string[];
90
+ }>;
91
+ /**
92
+ * Publishable stop data for the Hub Stops API.
93
+ */
94
+ export type HubStop = z.infer<typeof HubStopSchema>;
@@ -0,0 +1,28 @@
1
+ /* * */
2
+ import { LifecycleStatusSchema } from '../../_common/status.js';
3
+ import { StopFlagSchema } from '../../stops/flag.js';
4
+ import { StopIdSchema } from '../../stops/stop-id.js';
5
+ import { z } from 'zod';
6
+ /* * */
7
+ export const HubStopSchema = z.object({
8
+ _id: StopIdSchema,
9
+ district_id: z.string(),
10
+ district_name: z.string(),
11
+ flags: z.array(StopFlagSchema),
12
+ latitude: z.number(),
13
+ legacy_ids: z.array(z.string()),
14
+ lifecycle_status: LifecycleStatusSchema,
15
+ line_ids: z.array(z.string()),
16
+ locality_id: z.string().nullable(),
17
+ locality_name: z.string().nullable(),
18
+ longitude: z.number(),
19
+ municipality_id: z.string(),
20
+ municipality_name: z.string(),
21
+ name: z.string(),
22
+ parish_id: z.string(),
23
+ parish_name: z.string(),
24
+ pattern_ids: z.array(z.string()),
25
+ route_ids: z.array(z.string()),
26
+ short_name: z.string(),
27
+ tts_name: z.string(),
28
+ });
@@ -0,0 +1 @@
1
+ export * from './stops.js';
@@ -0,0 +1 @@
1
+ export * from './stops.js';
@@ -0,0 +1,66 @@
1
+ import { z } from 'zod';
2
+ export declare const HubGtfsExportStopsSchema: z.ZodObject<{
3
+ district_id: z.ZodString;
4
+ district_name: z.ZodString;
5
+ legacy_ids: z.ZodString;
6
+ locality_id: z.ZodOptional<z.ZodString>;
7
+ locality_name: z.ZodOptional<z.ZodString>;
8
+ location_type: z.ZodEnum<["0", "1", "2", "3", "4"]>;
9
+ municipality_id: z.ZodString;
10
+ municipality_name: z.ZodString;
11
+ parent_station: z.ZodString;
12
+ parish_id: z.ZodString;
13
+ parish_name: z.ZodString;
14
+ platform_code: z.ZodString;
15
+ stop_code: z.ZodNumber;
16
+ stop_id: z.ZodNumber;
17
+ stop_lat: z.ZodNumber;
18
+ stop_lon: z.ZodNumber;
19
+ stop_name: z.ZodString;
20
+ tts_stop_name: z.ZodString;
21
+ wheelchair_boarding: z.ZodEnum<["0", "1", "2"]>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ stop_id: number;
24
+ legacy_ids: string;
25
+ district_id: string;
26
+ municipality_id: string;
27
+ parish_id: string;
28
+ location_type: "0" | "1" | "2" | "3" | "4";
29
+ parent_station: string;
30
+ platform_code: string;
31
+ stop_code: number;
32
+ stop_lat: number;
33
+ stop_lon: number;
34
+ stop_name: string;
35
+ tts_stop_name: string;
36
+ wheelchair_boarding: "0" | "1" | "2";
37
+ district_name: string;
38
+ municipality_name: string;
39
+ parish_name: string;
40
+ locality_id?: string | undefined;
41
+ locality_name?: string | undefined;
42
+ }, {
43
+ stop_id: number;
44
+ legacy_ids: string;
45
+ district_id: string;
46
+ municipality_id: string;
47
+ parish_id: string;
48
+ location_type: "0" | "1" | "2" | "3" | "4";
49
+ parent_station: string;
50
+ platform_code: string;
51
+ stop_code: number;
52
+ stop_lat: number;
53
+ stop_lon: number;
54
+ stop_name: string;
55
+ tts_stop_name: string;
56
+ wheelchair_boarding: "0" | "1" | "2";
57
+ district_name: string;
58
+ municipality_name: string;
59
+ parish_name: string;
60
+ locality_id?: string | undefined;
61
+ locality_name?: string | undefined;
62
+ }>;
63
+ /**
64
+ * Structure for the Hub GTFS export of the `stops.txt` file.
65
+ */
66
+ export type HubGtfsExportStops = z.infer<typeof HubGtfsExportStopsSchema>;
@@ -0,0 +1,24 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const HubGtfsExportStopsSchema = z.object({
5
+ district_id: z.string(),
6
+ district_name: z.string(),
7
+ legacy_ids: z.string(),
8
+ locality_id: z.string().optional(),
9
+ locality_name: z.string().optional(),
10
+ location_type: z.enum(['0', '1', '2', '3', '4']),
11
+ municipality_id: z.string(),
12
+ municipality_name: z.string(),
13
+ parent_station: z.string(),
14
+ parish_id: z.string(),
15
+ parish_name: z.string(),
16
+ platform_code: z.string(),
17
+ stop_code: z.number(),
18
+ stop_id: z.number(),
19
+ stop_lat: z.number(),
20
+ stop_lon: z.number(),
21
+ stop_name: z.string(),
22
+ tts_stop_name: z.string(),
23
+ wheelchair_boarding: z.enum(['0', '1', '2']),
24
+ });
@@ -1,3 +1,2 @@
1
- export * from './alerts.js';
2
- export * from './lines.js';
3
- export * from './stop.js';
1
+ export * from './api/index.js';
2
+ export * from './gtfs/index.js';
package/dist/hub/index.js CHANGED
@@ -1,3 +1,2 @@
1
- export * from './alerts.js';
2
- export * from './lines.js';
3
- export * from './stop.js';
1
+ export * from './api/index.js';
2
+ export * from './gtfs/index.js';
@@ -124,6 +124,8 @@ export declare const OperationalLineSchema: z.ZodObject<{
124
124
  route_color: string;
125
125
  line_long_name: string;
126
126
  line_short_name: string;
127
+ pattern_ids: string[];
128
+ route_ids: string[];
127
129
  hashed_patterns: {
128
130
  _id: string;
129
131
  created_at: number & {
@@ -159,8 +161,6 @@ export declare const OperationalLineSchema: z.ZodObject<{
159
161
  __brand: "OperationalDate";
160
162
  };
161
163
  last_plan_id: string;
162
- pattern_ids: string[];
163
- route_ids: string[];
164
164
  }, {
165
165
  agency_id: string;
166
166
  line_id: number;
@@ -170,6 +170,8 @@ export declare const OperationalLineSchema: z.ZodObject<{
170
170
  last_operational_date: string;
171
171
  last_plan_id: string;
172
172
  stop_ids?: string[] | undefined;
173
+ pattern_ids?: string[] | undefined;
174
+ route_ids?: string[] | undefined;
173
175
  hashed_patterns?: {
174
176
  _id: string;
175
177
  created_at: number;
@@ -197,7 +199,5 @@ export declare const OperationalLineSchema: z.ZodObject<{
197
199
  stop_name: string;
198
200
  }[] | undefined;
199
201
  }[] | undefined;
200
- pattern_ids?: string[] | undefined;
201
- route_ids?: string[] | undefined;
202
202
  }>;
203
203
  export type OperationalLine = z.infer<typeof OperationalLineSchema>;
@@ -120,6 +120,8 @@ export declare const OperationalStopSchema: z.ZodObject<{
120
120
  agency_ids: string[];
121
121
  line_ids: number[];
122
122
  stop_name: string;
123
+ pattern_ids: string[];
124
+ route_ids: string[];
123
125
  hashed_patterns: {
124
126
  _id: string;
125
127
  created_at: number & {
@@ -155,8 +157,6 @@ export declare const OperationalStopSchema: z.ZodObject<{
155
157
  __brand: "OperationalDate";
156
158
  };
157
159
  last_plan_id: string;
158
- pattern_ids: string[];
159
- route_ids: string[];
160
160
  }, {
161
161
  stop_id: string;
162
162
  stop_name: string;
@@ -164,6 +164,8 @@ export declare const OperationalStopSchema: z.ZodObject<{
164
164
  last_plan_id: string;
165
165
  agency_ids?: string[] | undefined;
166
166
  line_ids?: number[] | undefined;
167
+ pattern_ids?: string[] | undefined;
168
+ route_ids?: string[] | undefined;
167
169
  hashed_patterns?: {
168
170
  _id: string;
169
171
  created_at: number;
@@ -191,7 +193,5 @@ export declare const OperationalStopSchema: z.ZodObject<{
191
193
  stop_name: string;
192
194
  }[] | undefined;
193
195
  }[] | undefined;
194
- pattern_ids?: string[] | undefined;
195
- route_ids?: string[] | undefined;
196
196
  }>;
197
197
  export type OperationalStop = z.infer<typeof OperationalStopSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/types",
3
- "version": "20260601.1041.27",
3
+ "version": "20260601.1657.26",
4
4
  "author": {
5
5
  "email": "iso@tmlmobilidade.pt",
6
6
  "name": "TML-ISO"
@@ -1,351 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const HubStopSchema: z.ZodObject<Pick<{
3
- created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
4
- created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
5
- is_locked: z.ZodDefault<z.ZodBoolean>;
6
- updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
7
- updated_by: z.ZodOptional<z.ZodString>;
8
- } & {
9
- _id: z.ZodNumber;
10
- flags: z.ZodDefault<z.ZodArray<z.ZodObject<{
11
- agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
12
- is_harmonized: z.ZodDefault<z.ZodBoolean>;
13
- short_name: z.ZodString;
14
- stop_id: z.ZodString;
15
- }, "strip", z.ZodTypeAny, {
16
- short_name: string;
17
- stop_id: string;
18
- agency_ids: string[];
19
- is_harmonized: boolean;
20
- }, {
21
- short_name: string;
22
- stop_id: string;
23
- agency_ids?: string[] | undefined;
24
- is_harmonized?: boolean | undefined;
25
- }>, "many">>;
26
- is_deleted: z.ZodDefault<z.ZodBoolean>;
27
- jurisdiction: z.ZodDefault<z.ZodEnum<["ip", "municipality", "other", "unknown"]>>;
28
- legacy_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
29
- legacy_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
30
- lifecycle_status: z.ZodDefault<z.ZodEnum<["draft", "active", "inactive", "provisional", "seasonal", "voided"]>>;
31
- name: z.ZodString;
32
- new_name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
33
- previous_go_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
34
- short_name: z.ZodString;
35
- tts_name: z.ZodString;
36
- district_id: z.ZodString;
37
- latitude: z.ZodNumber;
38
- locality_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
39
- longitude: z.ZodNumber;
40
- municipality_id: z.ZodString;
41
- parish_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
42
- bench_status: z.ZodDefault<z.ZodEnum<["not_applicable", "unknown", "missing", "damaged", "ok"]>>;
43
- electricity_status: z.ZodDefault<z.ZodEnum<["available", "unavailable", "unknown"]>>;
44
- pole_status: z.ZodDefault<z.ZodEnum<["not_applicable", "unknown", "missing", "damaged", "ok"]>>;
45
- road_type: z.ZodDefault<z.ZodEnum<["complementary_itinerary", "highway", "main_itinerary", "national_road", "regional_road", "secondary_road", "unknown"]>>;
46
- shelter_code: z.ZodDefault<z.ZodNullable<z.ZodString>>;
47
- shelter_frame_size: z.ZodDefault<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
48
- shelter_installation_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>>>;
49
- shelter_maintainer: z.ZodDefault<z.ZodNullable<z.ZodString>>;
50
- shelter_make: z.ZodDefault<z.ZodNullable<z.ZodString>>;
51
- shelter_model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
52
- shelter_status: z.ZodDefault<z.ZodEnum<["not_applicable", "unknown", "missing", "damaged", "ok"]>>;
53
- last_infrastructure_check: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>>>;
54
- last_infrastructure_maintenance: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>>>;
55
- last_schedules_check: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>>>;
56
- last_schedules_maintenance: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>>>;
57
- connections: z.ZodDefault<z.ZodArray<z.ZodEnum<["ferry", "light_rail", "subway", "train", "boat", "airport", "bike_sharing", "bike_parking", "car_parking"]>, "many">>;
58
- facilities: z.ZodDefault<z.ZodArray<z.ZodEnum<["fire_station", "health_clinic", "historic_building", "hospital", "police_station", "school", "shopping", "transit_office", "university", "beach"]>, "many">>;
59
- equipment: z.ZodDefault<z.ZodArray<z.ZodEnum<["pip", "mupi", "mini_pip"]>, "many">>;
60
- has_bench: z.ZodDefault<z.ZodEnum<["available", "unavailable", "unknown"]>>;
61
- has_mupi: z.ZodDefault<z.ZodEnum<["available", "unavailable", "unknown"]>>;
62
- has_network_map: z.ZodDefault<z.ZodEnum<["available", "unavailable", "unknown"]>>;
63
- has_schedules: z.ZodDefault<z.ZodEnum<["available", "unavailable", "unknown"]>>;
64
- has_shelter: z.ZodDefault<z.ZodEnum<["available", "unavailable", "unknown"]>>;
65
- has_stop_sign: z.ZodDefault<z.ZodEnum<["available", "unavailable", "unknown"]>>;
66
- file_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
67
- image_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
68
- comments: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
69
- _id: z.ZodOptional<z.ZodString>;
70
- created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
71
- created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
72
- updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
73
- updated_by: z.ZodOptional<z.ZodString>;
74
- message: z.ZodString;
75
- type: z.ZodLiteral<"note">;
76
- }, "strip", z.ZodTypeAny, {
77
- created_at: number & {
78
- __brand: "UnixTimestamp";
79
- };
80
- created_by: string | null;
81
- updated_at: number & {
82
- __brand: "UnixTimestamp";
83
- };
84
- message: string;
85
- type: "note";
86
- _id?: string | undefined;
87
- updated_by?: string | undefined;
88
- }, {
89
- created_at: number;
90
- updated_at: number;
91
- message: string;
92
- type: "note";
93
- _id?: string | undefined;
94
- created_by?: string | null | undefined;
95
- updated_by?: string | undefined;
96
- }>, z.ZodObject<{
97
- _id: z.ZodOptional<z.ZodString>;
98
- created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
99
- created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
100
- updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
101
- updated_by: z.ZodOptional<z.ZodString>;
102
- type: z.ZodLiteral<"field_changed">;
103
- metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{
104
- changes: z.ZodOptional<z.ZodArray<z.ZodObject<{
105
- curr_value: z.ZodAny;
106
- field: z.ZodString;
107
- prev_value: z.ZodAny;
108
- }, "strip", z.ZodTypeAny, {
109
- field: string;
110
- curr_value?: any;
111
- prev_value?: any;
112
- }, {
113
- field: string;
114
- curr_value?: any;
115
- prev_value?: any;
116
- }>, "many">>;
117
- }, "strip", z.ZodTypeAny, {
118
- changes?: {
119
- field: string;
120
- curr_value?: any;
121
- prev_value?: any;
122
- }[] | undefined;
123
- }, {
124
- changes?: {
125
- field: string;
126
- curr_value?: any;
127
- prev_value?: any;
128
- }[] | undefined;
129
- }>>>;
130
- curr_value: z.ZodAny;
131
- field: z.ZodString;
132
- prev_value: z.ZodAny;
133
- }, "strip", z.ZodTypeAny, {
134
- created_at: number & {
135
- __brand: "UnixTimestamp";
136
- };
137
- created_by: string | null;
138
- updated_at: number & {
139
- __brand: "UnixTimestamp";
140
- };
141
- type: "field_changed";
142
- field: string;
143
- _id?: string | undefined;
144
- updated_by?: string | undefined;
145
- metadata?: {
146
- changes?: {
147
- field: string;
148
- curr_value?: any;
149
- prev_value?: any;
150
- }[] | undefined;
151
- } | null | undefined;
152
- curr_value?: any;
153
- prev_value?: any;
154
- }, {
155
- created_at: number;
156
- updated_at: number;
157
- type: "field_changed";
158
- field: string;
159
- _id?: string | undefined;
160
- created_by?: string | null | undefined;
161
- updated_by?: string | undefined;
162
- metadata?: {
163
- changes?: {
164
- field: string;
165
- curr_value?: any;
166
- prev_value?: any;
167
- }[] | undefined;
168
- } | null | undefined;
169
- curr_value?: any;
170
- prev_value?: any;
171
- }>, z.ZodObject<{
172
- _id: z.ZodOptional<z.ZodString>;
173
- created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
174
- created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
175
- updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
176
- updated_by: z.ZodOptional<z.ZodString>;
177
- type: z.ZodLiteral<"crud">;
178
- action: z.ZodEnum<["create", "update", "delete", "archive", "restore"]>;
179
- }, "strip", z.ZodTypeAny, {
180
- created_at: number & {
181
- __brand: "UnixTimestamp";
182
- };
183
- created_by: string | null;
184
- updated_at: number & {
185
- __brand: "UnixTimestamp";
186
- };
187
- type: "crud";
188
- action: "create" | "update" | "delete" | "archive" | "restore";
189
- _id?: string | undefined;
190
- updated_by?: string | undefined;
191
- }, {
192
- created_at: number;
193
- updated_at: number;
194
- type: "crud";
195
- action: "create" | "update" | "delete" | "archive" | "restore";
196
- _id?: string | undefined;
197
- created_by?: string | null | undefined;
198
- updated_by?: string | undefined;
199
- }>]>, {
200
- created_at: number & {
201
- __brand: "UnixTimestamp";
202
- };
203
- created_by: string | null;
204
- updated_at: number & {
205
- __brand: "UnixTimestamp";
206
- };
207
- message: string;
208
- type: "note";
209
- _id?: string | undefined;
210
- updated_by?: string | undefined;
211
- } | {
212
- created_at: number & {
213
- __brand: "UnixTimestamp";
214
- };
215
- created_by: string | null;
216
- updated_at: number & {
217
- __brand: "UnixTimestamp";
218
- };
219
- type: "field_changed";
220
- field: string;
221
- _id?: string | undefined;
222
- updated_by?: string | undefined;
223
- metadata?: {
224
- changes?: {
225
- field: string;
226
- curr_value?: any;
227
- prev_value?: any;
228
- }[] | undefined;
229
- } | null | undefined;
230
- curr_value?: any;
231
- prev_value?: any;
232
- } | {
233
- created_at: number & {
234
- __brand: "UnixTimestamp";
235
- };
236
- created_by: string | null;
237
- updated_at: number & {
238
- __brand: "UnixTimestamp";
239
- };
240
- type: "crud";
241
- action: "create" | "update" | "delete" | "archive" | "restore";
242
- _id?: string | undefined;
243
- updated_by?: string | undefined;
244
- }, {
245
- created_at: number;
246
- updated_at: number;
247
- message: string;
248
- type: "note";
249
- _id?: string | undefined;
250
- created_by?: string | null | undefined;
251
- updated_by?: string | undefined;
252
- } | {
253
- created_at: number;
254
- updated_at: number;
255
- type: "field_changed";
256
- field: string;
257
- _id?: string | undefined;
258
- created_by?: string | null | undefined;
259
- updated_by?: string | undefined;
260
- metadata?: {
261
- changes?: {
262
- field: string;
263
- curr_value?: any;
264
- prev_value?: any;
265
- }[] | undefined;
266
- } | null | undefined;
267
- curr_value?: any;
268
- prev_value?: any;
269
- } | {
270
- created_at: number;
271
- updated_at: number;
272
- type: "crud";
273
- action: "create" | "update" | "delete" | "archive" | "restore";
274
- _id?: string | undefined;
275
- created_by?: string | null | undefined;
276
- updated_by?: string | undefined;
277
- }>, "many">>;
278
- observations: z.ZodDefault<z.ZodNullable<z.ZodString>>;
279
- associated_patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
280
- _id: z.ZodString;
281
- code: z.ZodString;
282
- headsign: z.ZodString;
283
- line_id: z.ZodString;
284
- route_id: z.ZodString;
285
- }, "strip", z.ZodTypeAny, {
286
- _id: string;
287
- code: string;
288
- line_id: string;
289
- headsign: string;
290
- route_id: string;
291
- }, {
292
- _id: string;
293
- code: string;
294
- line_id: string;
295
- headsign: string;
296
- route_id: string;
297
- }>, "many">>;
298
- }, "_id" | "name" | "latitude" | "longitude" | "short_name" | "flags" | "legacy_ids" | "lifecycle_status" | "tts_name" | "district_id" | "locality_id" | "municipality_id"> & {
299
- district_name: z.ZodString;
300
- locality_name: z.ZodString;
301
- municipality_name: z.ZodString;
302
- parish_name: z.ZodString;
303
- }, "strip", z.ZodTypeAny, {
304
- _id: number;
305
- name: string;
306
- latitude: number;
307
- longitude: number;
308
- short_name: string;
309
- flags: {
310
- short_name: string;
311
- stop_id: string;
312
- agency_ids: string[];
313
- is_harmonized: boolean;
314
- }[];
315
- legacy_ids: string[];
316
- lifecycle_status: "draft" | "active" | "inactive" | "provisional" | "seasonal" | "voided";
317
- tts_name: string;
318
- district_id: string;
319
- locality_id: string | null;
320
- municipality_id: string;
321
- district_name: string;
322
- locality_name: string;
323
- municipality_name: string;
324
- parish_name: string;
325
- }, {
326
- _id: number;
327
- name: string;
328
- latitude: number;
329
- longitude: number;
330
- short_name: string;
331
- tts_name: string;
332
- district_id: string;
333
- municipality_id: string;
334
- district_name: string;
335
- locality_name: string;
336
- municipality_name: string;
337
- parish_name: string;
338
- flags?: {
339
- short_name: string;
340
- stop_id: string;
341
- agency_ids?: string[] | undefined;
342
- is_harmonized?: boolean | undefined;
343
- }[] | undefined;
344
- legacy_ids?: string[] | undefined;
345
- lifecycle_status?: "draft" | "active" | "inactive" | "provisional" | "seasonal" | "voided" | undefined;
346
- locality_id?: string | null | undefined;
347
- }>;
348
- /**
349
- * Publishable stop data for the Hub Stops API.
350
- */
351
- export type HubStop = z.infer<typeof HubStopSchema>;
package/dist/hub/stop.js DELETED
@@ -1,23 +0,0 @@
1
- /* * */
2
- import { StopSchema } from '../stops/stop.js';
3
- import { z } from 'zod';
4
- /* * */
5
- export const HubStopSchema = StopSchema.pick({
6
- _id: true,
7
- district_id: true,
8
- flags: true,
9
- latitude: true,
10
- legacy_ids: true,
11
- lifecycle_status: true,
12
- locality_id: true,
13
- longitude: true,
14
- municipality_id: true,
15
- name: true,
16
- short_name: true,
17
- tts_name: true,
18
- }).extend({
19
- district_name: z.string(),
20
- locality_name: z.string(),
21
- municipality_name: z.string(),
22
- parish_name: z.string(),
23
- });
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes