UNPKG

ws-dottie

Version:

Your friendly TypeScript companion for Washington State transportation APIs - WSDOT and WSF data with smart caching and React Query integration

103 lines (97 loc) 3.4 kB
import { z } from 'zod'; /** * @fileoverview WSDOT Traffic Flow API Input Schemas * * This module provides Zod schemas for validating input parameters for the WSDOT * Traffic Flow API endpoints. */ /** * Schema for GetTrafficFlow input parameters * * Provides real-time data on Traffic Flow sensors for the entire state. Data is updated every 90 seconds. Coverage Area: Statewide. */ declare const trafficFlowByIdInputSchema: z.ZodObject<{ FlowDataID: z.ZodNumber; }, "strip", z.ZodTypeAny, { FlowDataID: number; }, { FlowDataID: number; }>; type TrafficFlowByIdInput = z.infer<typeof trafficFlowByIdInputSchema>; /** * Schema for GetTrafficFlows input parameters * * Provides real-time data on Traffic Flow sensors for the entire state. Data is updated every 90 seconds. Coverage Area: Statewide. */ declare const trafficFlowsInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>; type TrafficFlowsInput = z.infer<typeof trafficFlowsInputSchema>; /** * @fileoverview WSDOT Traffic Flow API Output Schemas * * This module provides Zod schemas for validating responses from the WSDOT * Traffic Flow API, which provides real-time traffic flow data for the entire state. */ /** * Schema for FlowData - represents a traffic flow station * * Provides real-time data on Traffic Flow sensors for the entire state. Data is updated every 90 seconds. Coverage Area: Statewide. */ declare const flowDataSchema: z.ZodObject<{ FlowDataID: z.ZodNumber; FlowReadingValue: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>; FlowStationLocation: z.ZodNullable<z.ZodObject<{ Description: z.ZodNullable<z.ZodString>; Direction: z.ZodNullable<z.ZodString>; Latitude: z.ZodNumber; Longitude: z.ZodNumber; MilePost: z.ZodNumber; RoadName: z.ZodNullable<z.ZodString>; }, "strip", z.ZodTypeAny, { Description: string | null; Direction: string | null; Latitude: number; Longitude: number; MilePost: number; RoadName: string | null; }, { Description: string | null; Direction: string | null; Latitude: number; Longitude: number; MilePost: number; RoadName: string | null; }>>; Region: z.ZodNullable<z.ZodString>; StationName: z.ZodNullable<z.ZodString>; Time: z.ZodDate; }, "strip", z.ZodTypeAny, { Time: Date; Region: string | null; FlowDataID: number; FlowReadingValue: 0 | 2 | 1 | 5 | 3 | 4; FlowStationLocation: { Description: string | null; Direction: string | null; Latitude: number; Longitude: number; MilePost: number; RoadName: string | null; } | null; StationName: string | null; }, { Time: Date; Region: string | null; FlowDataID: number; FlowReadingValue: 0 | 2 | 1 | 5 | 3 | 4; FlowStationLocation: { Description: string | null; Direction: string | null; Latitude: number; Longitude: number; MilePost: number; RoadName: string | null; } | null; StationName: string | null; }>; type FlowData = z.infer<typeof flowDataSchema>; export { type FlowData, type TrafficFlowByIdInput, type TrafficFlowsInput, flowDataSchema, trafficFlowByIdInputSchema, trafficFlowsInputSchema };