@tmlmobilidade/types 20260531.1600.32 → 20260601.2.32

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.
@@ -1,2 +1,3 @@
1
1
  export * from './alerts.js';
2
2
  export * from './lines.js';
3
+ export * from './stop.js';
package/dist/hub/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './alerts.js';
2
2
  export * from './lines.js';
3
+ export * from './stop.js';
@@ -0,0 +1,351 @@
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>;
@@ -0,0 +1,23 @@
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
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/types",
3
- "version": "20260531.1600.32",
3
+ "version": "20260601.2.32",
4
4
  "author": {
5
5
  "email": "iso@tmlmobilidade.pt",
6
6
  "name": "TML-ISO"