ws-dottie
Version:
Your friendly TypeScript companion for Washington State transportation APIs - WSDOT and WSF data with smart caching and React Query integration
169 lines (161 loc) • 5.11 kB
TypeScript
export { TollRate, TollRatesInput, TollTripInfo, TollTripInfoInput, TollTripRatesInput, TollTripVersion, TollTripVersionInput, TollTripsRates, TripRate, TripRatesByDateInput, TripRatesByVersionInput, tollRateSchema, tollRatesInputSchema, tollTripInfoInputSchema, tollTripInfoSchema, tollTripRatesInputSchema, tollTripVersionInputSchema, tollTripVersionSchema, tollTripsRatesSchema, tripRateSchema, tripRatesByDateInputSchema, tripRatesByVersionInputSchema } from './schemas.js';
import { H as HookFactory, F as FetchFactory } from '../../types-D3jt2o5t.js';
import 'zod';
import '@tanstack/react-query';
/**
* Fetch function and React Query hook for retrieving current toll rates for all HOV toll lanes statewide
*/
declare const fetchTollRates: FetchFactory<{}, {
StateRoute: string | null;
TravelDirection: string | null;
EndLatitude: number;
EndLocationName: string | null;
EndLongitude: number;
EndMilepost: number;
StartLatitude: number;
StartLocationName: string | null;
StartLongitude: number;
StartMilepost: number;
TripName: string | null;
CurrentToll: number;
CurrentMessage: string | null;
TimeUpdated: Date;
}[]>;
declare const useTollRates: HookFactory<{}, {
StateRoute: string | null;
TravelDirection: string | null;
EndLatitude: number;
EndLocationName: string | null;
EndLongitude: number;
EndMilepost: number;
StartLatitude: number;
StartLocationName: string | null;
StartLongitude: number;
StartMilepost: number;
TripName: string | null;
CurrentToll: number;
CurrentMessage: string | null;
TimeUpdated: Date;
}[]>;
/**
* Fetch function and React Query hook for retrieving trip information for all toll trips statewide
*/
declare const fetchTollTripInfo: FetchFactory<{}, {
TravelDirection: string | null;
EndLatitude: number;
EndLocationName: string | null;
EndLongitude: number;
EndMilepost: number;
StartLatitude: number;
StartLocationName: string | null;
StartLongitude: number;
StartMilepost: number;
TripName: string | null;
Geometry: string | null;
ModifiedDate: Date;
}[]>;
declare const useTollTripInfo: HookFactory<{}, {
TravelDirection: string | null;
EndLatitude: number;
EndLocationName: string | null;
EndLongitude: number;
EndMilepost: number;
StartLatitude: number;
StartLocationName: string | null;
StartLongitude: number;
StartMilepost: number;
TripName: string | null;
Geometry: string | null;
ModifiedDate: Date;
}[]>;
/**
* Fetch function and React Query hook for retrieving current toll rates for all trips
*/
declare const fetchTollTripRates: FetchFactory<{}, {
Version: number;
LastUpdated: Date;
Trips: {
TripName: string | null;
Message: string | null;
MessageUpdateTime: Date;
Toll: number;
}[] | null;
}>;
declare const useTollTripRates: HookFactory<{}, {
Version: number;
LastUpdated: Date;
Trips: {
TripName: string | null;
Message: string | null;
MessageUpdateTime: Date;
Toll: number;
}[] | null;
}>;
/**
* Fetch function and React Query hook for retrieving historical toll rates for a specified date range
*/
declare const fetchTripRatesByDate: FetchFactory<{
FromDate: string;
ToDate: string;
}, {
Version: number;
LastUpdated: Date;
Trips: {
TripName: string | null;
Message: string | null;
MessageUpdateTime: Date;
Toll: number;
}[] | null;
}[]>;
declare const useTripRatesByDate: HookFactory<{
FromDate: string;
ToDate: string;
}, {
Version: number;
LastUpdated: Date;
Trips: {
TripName: string | null;
Message: string | null;
MessageUpdateTime: Date;
Toll: number;
}[] | null;
}[]>;
/**
* Fetch function and React Query hook for retrieving toll rates for a specific version number
*/
declare const fetchTripRatesByVersion: FetchFactory<{
Version: number;
}, {
Version: number;
LastUpdated: Date;
Trips: {
TripName: string | null;
Message: string | null;
MessageUpdateTime: Date;
Toll: number;
}[] | null;
}>;
declare const useTripRatesByVersion: HookFactory<{
Version: number;
}, {
Version: number;
LastUpdated: Date;
Trips: {
TripName: string | null;
Message: string | null;
MessageUpdateTime: Date;
Toll: number;
}[] | null;
}>;
/**
* Fetch function and React Query hook for retrieving current version and timestamp for toll trip data
*/
declare const fetchTollTripVersion: FetchFactory<{}, {
Version: number;
TimeStamp: Date;
}>;
declare const useTollTripVersion: HookFactory<{}, {
Version: number;
TimeStamp: Date;
}>;
export { useTollTripInfo as a, useTollTripRates as b, useTripRatesByDate as c, useTripRatesByVersion as d, useTollTripVersion as e, fetchTollRates, fetchTollTripInfo, fetchTollTripRates, fetchTollTripVersion, fetchTripRatesByDate, fetchTripRatesByVersion, useTollRates as u };