UNPKG

ws-dottie

Version:

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

2 lines 1.33 kB
import {a}from'./chunk-6REGGRVO.mjs';var r=a.object({Description:a.string().nullable().describe("Human-readable description of the roadway location, such as interchange names or cross streets."),Direction:a.string().nullable().describe("Traffic direction designation: N, S, B, NB, or SB, indicating which side of the highway is affected."),Latitude:a.number().describe("Latitude of the roadway location in decimal degrees."),Longitude:a.number().describe("Longitude of the roadway location in decimal degrees."),MilePost:a.number().describe("Milepost marker along the highway corridor, with 0 indicating route terminus."),RoadName:a.string().nullable().describe("Highway or route designation code, such as '005' for I-5 or '090' for I-90.")}).describe("Roadway location information including route, milepost, coordinates, and direction.");var i=()=>a.string().refine(t=>n(t),{message:"Invalid date format. Expected ISO date string format"}).transform(t=>{let o=new Date(t);if(Number.isNaN(o.getTime()))throw new Error(`Failed to parse ISO date: ${t}`);return o}),n=t=>{if(!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d{1,3})?)?(Z|[+-]\d{2}:\d{2})?$/.test(t)){let a=new Date(t);return !Number.isNaN(a.getTime())}return true};export{r as a,i as b};//# sourceMappingURL=chunk-ADNUROX2.mjs.map //# sourceMappingURL=chunk-ADNUROX2.mjs.map