UNPKG

ws-dottie

Version:

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

79 lines (75 loc) 2.37 kB
export { FlowData, TrafficFlowByIdInput, TrafficFlowsInput, flowDataSchema, trafficFlowByIdInputSchema, trafficFlowsInputSchema } from './schemas.mjs'; import { H as HookFactory, F as FetchFactory } from '../../types-D3jt2o5t.mjs'; import 'zod'; import '@tanstack/react-query'; /** * Fetch function and React Query hook for retrieving current traffic flow condition for a specific station by ID */ declare const fetchTrafficFlowById: FetchFactory<{ FlowDataID: number; }, { 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; }>; declare const useTrafficFlowById: HookFactory<{ FlowDataID: number; }, { 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; }>; /** * Fetch function and React Query hook for retrieving current traffic flow conditions for all stations statewide */ declare const fetchTrafficFlows: FetchFactory<{}, { 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; }[]>; declare const useTrafficFlows: HookFactory<{}, { 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; }[]>; export { useTrafficFlows as a, fetchTrafficFlowById, fetchTrafficFlows, useTrafficFlowById as u };