UNPKG

@tmlmobilidade/types

Version:
180 lines (179 loc) • 4.98 kB
import { z } from 'zod'; export declare const ClickHouseVehicleEventSchema: z.ZodObject<Omit<Omit<{ _id: z.ZodString; created_at: z.ZodEffects<z.ZodNumber, import("../_common/index.js").UnixTimestamp, number>; created_by: z.ZodOptional<z.ZodString>; is_locked: z.ZodDefault<z.ZodBoolean>; updated_at: z.ZodEffects<z.ZodNumber, import("../_common/index.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/index.js").UnixTimestamp, number>; stop_id: z.ZodString; trigger_activity: z.ZodString; trigger_door: z.ZodString; trip_id: z.ZodString; vehicle_id: z.ZodString; }, "position"> & { h3_1: z.ZodString; h3_2: z.ZodString; h3_3: z.ZodString; h3_4: z.ZodString; h3_5: z.ZodString; h3_6: z.ZodString; h3_7: z.ZodString; h3_8: z.ZodString; h3_9: z.ZodString; h3_10: z.ZodString; h3_11: z.ZodString; h3_12: z.ZodString; geohash_2: z.ZodString; geohash_3: z.ZodString; geohash_4: z.ZodString; geohash_5: z.ZodString; geohash_6: z.ZodString; geohash_7: z.ZodString; geohash_8: z.ZodString; geohash_9: z.ZodString; geohash_10: z.ZodString; geohash_11: z.ZodString; geohash_12: z.ZodString; hour: z.ZodNumber; operational_date: z.ZodEffects<z.ZodString, import("../_common/index.js").OperationalDate, string>; plan_id: z.ZodString; route_id: z.ZodString; }, "strip", z.ZodTypeAny, { _id: string; created_at: number & { __brand: "UnixTimestamp"; }; updated_at: number & { __brand: "UnixTimestamp"; }; latitude: number; longitude: number; geohash_2: string; geohash_3: string; geohash_4: string; geohash_5: string; geohash_6: string; geohash_7: string; geohash_8: string; geohash_9: string; geohash_10: string; geohash_11: string; geohash_12: string; h3_1: string; h3_2: string; h3_3: string; h3_4: string; h3_5: string; h3_6: string; h3_7: string; h3_8: string; h3_9: string; h3_10: string; h3_11: string; h3_12: string; agency_id: string; pattern_id: string; received_at: number & { __brand: "UnixTimestamp"; }; stop_id: string; trip_id: string; vehicle_id: string; plan_id: string; route_id: string; operational_date: string & { __brand: "OperationalDate"; }; hour: number; current_status: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO"; driver_id: string; event_id: string; odometer: 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; geohash_2: string; geohash_3: string; geohash_4: string; geohash_5: string; geohash_6: string; geohash_7: string; geohash_8: string; geohash_9: string; geohash_10: string; geohash_11: string; geohash_12: string; h3_1: string; h3_2: string; h3_3: string; h3_4: string; h3_5: string; h3_6: string; h3_7: string; h3_8: string; h3_9: string; h3_10: string; h3_11: string; h3_12: string; agency_id: string; pattern_id: string; received_at: number; stop_id: string; trip_id: string; vehicle_id: string; plan_id: string; route_id: string; operational_date: string; hour: number; current_status: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO"; driver_id: string; event_id: string; odometer: number; trigger_activity: string; trigger_door: string; created_by?: string | undefined; updated_by?: string | undefined; extra_trip_id?: string | null | undefined; }>; /** * ClickHouse Vehicle Events are used to store vehicle events in ClickHouse. * They are based on the SimplifiedVehicleEventSchema but extended with additional fields * specific to ClickHouse. */ export type ClickHouseVehicleEvent = z.infer<typeof ClickHouseVehicleEventSchema>;