@tmlmobilidade/types 20260605.149.34 → 20260605.1254.9
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.
- package/dist/_common/status.d.ts +4 -0
- package/dist/_common/status.js +4 -0
- package/dist/hub/api/index.d.ts +1 -0
- package/dist/hub/api/index.js +1 -0
- package/dist/hub/api/patterns.d.ts +3 -0
- package/dist/hub/api/realtime-eta-gtfs.d.ts +41 -0
- package/dist/hub/api/realtime-eta-gtfs.js +2 -0
- package/dist/operation/rides/batch-query.d.ts +3 -0
- package/dist/operation/rides/batch-query.js +4 -1
- package/package.json +1 -1
package/dist/_common/status.d.ts
CHANGED
|
@@ -31,3 +31,7 @@ export type ValidityStatus = z.infer<typeof ValidityStatusSchema>;
|
|
|
31
31
|
export declare const SystemStatusValues: readonly ["waiting", "incomplete", "complete", "error"];
|
|
32
32
|
export declare const SystemStatusSchema: z.ZodEnum<["waiting", "incomplete", "complete", "error"]>;
|
|
33
33
|
export type SystemStatus = z.infer<typeof SystemStatusSchema>;
|
|
34
|
+
/***/
|
|
35
|
+
export declare const TicketingStatusValues: readonly ["has_ticketing", "no_ticketing"];
|
|
36
|
+
export declare const TicketingStatusSchema: z.ZodEnum<["has_ticketing", "no_ticketing"]>;
|
|
37
|
+
export type TicketingStatus = z.infer<typeof TicketingStatusSchema>;
|
package/dist/_common/status.js
CHANGED
|
@@ -44,3 +44,7 @@ export const ValidityStatusSchema = z.enum(ValidityStatusValues);
|
|
|
44
44
|
/* SYSTEM STATUS */
|
|
45
45
|
export const SystemStatusValues = ['waiting', 'incomplete', 'complete', 'error'];
|
|
46
46
|
export const SystemStatusSchema = z.enum(SystemStatusValues);
|
|
47
|
+
/***/
|
|
48
|
+
/* TICKETING STATUS */
|
|
49
|
+
export const TicketingStatusValues = ['has_ticketing', 'no_ticketing'];
|
|
50
|
+
export const TicketingStatusSchema = z.enum(TicketingStatusValues);
|
package/dist/hub/api/index.d.ts
CHANGED
|
@@ -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-eta-gtfs.js';
|
|
5
6
|
export * from './realtime/index.js';
|
|
6
7
|
export * from './shapes.js';
|
|
7
8
|
export * from './stop.js';
|
package/dist/hub/api/index.js
CHANGED
|
@@ -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-eta-gtfs.js';
|
|
5
6
|
export * from './realtime/index.js';
|
|
6
7
|
export * from './shapes.js';
|
|
7
8
|
export * from './stop.js';
|
|
@@ -38,8 +38,11 @@ export interface HubTrip {
|
|
|
38
38
|
export interface HubArrival {
|
|
39
39
|
arrival_time: string;
|
|
40
40
|
arrival_time_24h: string;
|
|
41
|
+
line_id: string;
|
|
42
|
+
pattern_id: string;
|
|
41
43
|
stop_id: string;
|
|
42
44
|
stop_sequence: number;
|
|
45
|
+
trip_id: string;
|
|
43
46
|
}
|
|
44
47
|
export interface HubPatternRealtime {
|
|
45
48
|
estimated_arrival: null | string;
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
}
|
|
@@ -15,6 +15,7 @@ export declare const GetRidesBatchQuerySchema: z.ZodObject<{
|
|
|
15
15
|
stop_ids: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
|
|
16
16
|
acceptance_status: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["justification_required", "under_review", "accepted", "rejected", "none"]>, "many">, ("none" | "rejected" | "justification_required" | "under_review" | "accepted")[], unknown>>;
|
|
17
17
|
favorites: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
ticketing_status: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["has_ticketing", "no_ticketing"]>, "many">, ("has_ticketing" | "no_ticketing")[], unknown>>;
|
|
18
19
|
}, "strip", z.ZodTypeAny, {
|
|
19
20
|
agency_ids: string[];
|
|
20
21
|
date_end: number & {
|
|
@@ -35,6 +36,7 @@ export declare const GetRidesBatchQuerySchema: z.ZodObject<{
|
|
|
35
36
|
analysis_ended_at_last_stop_grade?: ("error" | "none" | "pass" | "fail" | "skip")[] | undefined;
|
|
36
37
|
analysis_simple_three_vehicle_events_grade?: ("error" | "none" | "pass" | "fail" | "skip")[] | undefined;
|
|
37
38
|
favorites?: boolean | undefined;
|
|
39
|
+
ticketing_status?: ("has_ticketing" | "no_ticketing")[] | undefined;
|
|
38
40
|
}, {
|
|
39
41
|
date_end: number;
|
|
40
42
|
date_start: number;
|
|
@@ -51,5 +53,6 @@ export declare const GetRidesBatchQuerySchema: z.ZodObject<{
|
|
|
51
53
|
analysis_ended_at_last_stop_grade?: unknown;
|
|
52
54
|
analysis_simple_three_vehicle_events_grade?: unknown;
|
|
53
55
|
favorites?: boolean | undefined;
|
|
56
|
+
ticketing_status?: unknown;
|
|
54
57
|
}>;
|
|
55
58
|
export type GetRidesBatchQuery = z.infer<typeof GetRidesBatchQuerySchema>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* * */
|
|
2
|
-
import { DelayStatusSchema, OperationalStatusSchema, SeenStatusSchema } from '../../_common/status.js';
|
|
2
|
+
import { DelayStatusSchema, OperationalStatusSchema, SeenStatusSchema, TicketingStatusSchema } from '../../_common/status.js';
|
|
3
3
|
import { UnixTimestampSchema } from '../../_common/unix-timestamp.js';
|
|
4
4
|
import { RideAcceptanceStatusSchema } from './ride-acceptance.js';
|
|
5
5
|
import { RideAnalysisGradeSchema } from './ride-analysis.js';
|
|
@@ -55,4 +55,7 @@ export const GetRidesBatchQuerySchema = z.object({
|
|
|
55
55
|
favorites: z
|
|
56
56
|
.boolean()
|
|
57
57
|
.optional(),
|
|
58
|
+
ticketing_status: z
|
|
59
|
+
.preprocess((val) => (val && typeof val === 'string') ? val.split(',').map(status => status.trim()) : [], z.array(TicketingStatusSchema))
|
|
60
|
+
.optional(),
|
|
58
61
|
});
|