@tmlmobilidade/types
Version:
110 lines (109 loc) • 3.47 kB
TypeScript
import { z } from 'zod';
export declare const SimplifiedVehicleEventSchema: z.ZodObject<Omit<{
_id: z.ZodString;
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
created_by: z.ZodOptional<z.ZodString>;
is_locked: z.ZodDefault<z.ZodBoolean>;
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
updated_by: z.ZodOptional<z.ZodString>;
}, "is_locked"> & {
agency_id: z.ZodString;
current_status: z.ZodEnum<["INCOMING_AT", "STOPPED_AT", "IN_TRANSIT_TO"]>;
driver_id: z.ZodString;
event_id: z.ZodString;
extra_trip_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
latitude: z.ZodNumber;
longitude: z.ZodNumber;
odometer: z.ZodNumber;
pattern_id: z.ZodString;
position: z.ZodObject<{
geohash: z.ZodString;
h3: z.ZodString;
latitude: z.ZodNumber;
longitude: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
geohash: string;
h3: string;
latitude: number;
longitude: number;
}, {
geohash: string;
h3: string;
latitude: number;
longitude: number;
}>;
received_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
stop_id: z.ZodString;
trigger_activity: z.ZodString;
trigger_door: z.ZodString;
trip_id: z.ZodString;
vehicle_id: z.ZodString;
}, "strip", z.ZodTypeAny, {
_id: string;
created_at: number & {
__brand: "UnixTimestamp";
};
updated_at: number & {
__brand: "UnixTimestamp";
};
latitude: number;
longitude: number;
agency_id: string;
pattern_id: string;
received_at: number & {
__brand: "UnixTimestamp";
};
stop_id: string;
trip_id: string;
vehicle_id: string;
current_status: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO";
driver_id: string;
event_id: string;
odometer: number;
position: {
geohash: string;
h3: string;
latitude: number;
longitude: number;
};
trigger_activity: string;
trigger_door: string;
created_by?: string | undefined;
updated_by?: string | undefined;
extra_trip_id?: string | null | undefined;
}, {
_id: string;
created_at: number;
updated_at: number;
latitude: number;
longitude: number;
agency_id: string;
pattern_id: string;
received_at: number;
stop_id: string;
trip_id: string;
vehicle_id: string;
current_status: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO";
driver_id: string;
event_id: string;
odometer: number;
position: {
geohash: string;
h3: string;
latitude: number;
longitude: number;
};
trigger_activity: string;
trigger_door: string;
created_by?: string | undefined;
updated_by?: string | undefined;
extra_trip_id?: string | null | undefined;
}>;
/**
* Vehicle Events are produced by the vehicle's on-board computer on a regular schedule
* or whenever a significant event occurs. These events are used to track the vehicle's
* location, speed, and status, as well as the current service being provided by the vehicle.
* These events are based on the GTFS-RT specification but extended with additional fields
* specific to TML's needs.
*/
export type SimplifiedVehicleEvent = z.infer<typeof SimplifiedVehicleEventSchema>;