@tmlmobilidade/types
Version:
78 lines (77 loc) • 3.2 kB
TypeScript
import { z } from 'zod';
export declare const SimplifiedVehicleEventSchema: z.ZodObject<{
_id: z.ZodString;
agency_id: z.ZodString;
created_at: z.ZodEffects<z.ZodNumber, import("../../index.js").UnixTimestamp, number>;
geohash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
latitude: z.ZodEffects<z.ZodNumber, number, number>;
longitude: z.ZodEffects<z.ZodNumber, number, number>;
operational_date: z.ZodEffects<z.ZodString, import("../../index.js").OperationalDate, string>;
received_at: z.ZodEffects<z.ZodNumber, import("../../index.js").UnixTimestamp, number>;
trip_id: z.ZodString;
vehicle_id: z.ZodString;
bearing: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
current_status: z.ZodDefault<z.ZodNullable<z.ZodEnum<["INCOMING_AT", "STOPPED_AT", "IN_TRANSIT_TO"]>>>;
door: z.ZodDefault<z.ZodNullable<z.ZodString>>;
driver_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
extra_trip_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
odometer: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
pattern_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
speed: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
stop_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
_id: string;
created_at: number & {
__brand: "UnixTimestamp";
};
agency_id: string;
pattern_id: string | null;
trip_id: string;
operational_date: string & {
__brand: "OperationalDate";
};
vehicle_id: string;
stop_id: string | null;
latitude: number;
longitude: number;
received_at: number & {
__brand: "UnixTimestamp";
};
current_status: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO" | null;
bearing: number | null;
speed: number | null;
odometer: number | null;
door: string | null;
driver_id: string | null;
extra_trip_id: string | null;
geohash?: string | null | undefined;
}, {
_id: string;
created_at: number;
agency_id: string;
trip_id: string;
operational_date: string;
vehicle_id: string;
latitude: number;
longitude: number;
received_at: number;
pattern_id?: string | null | undefined;
stop_id?: string | null | undefined;
current_status?: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO" | null | undefined;
bearing?: number | null | undefined;
speed?: number | null | undefined;
odometer?: number | null | undefined;
door?: string | null | undefined;
geohash?: string | null | undefined;
driver_id?: string | null | undefined;
extra_trip_id?: string | null | undefined;
}>;
/**
* Simplified Vehicle Events are data structures that represent the essential
* information about a vehicle's status and location at a given time. They are derived
* from the raw vehicle events produced by the vehicle's on-board computer, but they
* have been processed and simplified to include only the most relevant fields for analysis
* and reporting purposes. These events are used to track the vehicle's location, speed
* and status, as well as the current service being provided by the vehicle.
*/
export type SimplifiedVehicleEvent = z.infer<typeof SimplifiedVehicleEventSchema>;