UNPKG

ws-dottie

Version:

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

3 lines 5.44 kB
import {b as b$2,d as d$1,c,a as a$1,f as f$1,e,l,n,m,g as g$1,j as j$2,k as k$1,i as i$1,h}from'./chunk-LKIRU3C2.mjs';import {a as a$3}from'./chunk-W3LKNDK5.mjs';import {j as j$1,i}from'./chunk-ZI3JNZGU.mjs';import {b as b$3,a as a$2}from'./chunk-2S6SB7GP.mjs';import {d as d$2}from'./chunk-C3URDYFJ.mjs';import {a,b as b$1,c as c$1}from'./chunk-XEHBQAFR.mjs';var t,o=a(()=>{t={name:"wsdot-highway-alerts",baseUrl:"https://www.wsdot.wa.gov/traffic/api/highwayalerts/highwayalertsrest.svc"};});var x={};b$1(x,{alertAreasGroup:()=>W});var W,C=a(()=>{F();W={name:"alertAreas",cacheStrategy:"FREQUENT",documentation:{summary:"Geographic map areas for filtering highway alerts by region.",description:"Area codes and names used to organize and filter highway alerts across Washington State geographic regions.",useCases:["Filter highway alerts by geographic map area.","Obtain valid area codes for alert queries.","Display regional alert organization in user interfaces."],updateFrequency:"5m"},endpoints:[y]};});var y,j,se,pe,F=a(()=>{j$1();o();b$2();d$1();y={functionName:"fetchMapAreas",endpoint:"/getMapAreasAsJson",inputSchema:a$1,outputSchema:c.array(),sampleParams:{},endpointDescription:"List all available geographic map areas for filtering alerts."},j=i({api:t,endpoint:y,getEndpointGroup:()=>(C(),c$1(x)).alertAreasGroup}),{fetch:se,hook:pe}=j;});var b={};b$1(b,{eventCategoriesGroup:()=>K});var K,k=a(()=>{H();K={name:"event-categories",cacheStrategy:"FREQUENT",documentation:{summary:"Event category classifications for highway alerts.",description:"Standardized category names used to classify and filter highway alerts by incident type, such as construction, collisions, maintenance, and weather events.",useCases:["Filter highway alerts by event category type.","Obtain valid category names for alert searches.","Categorize alerts in user interfaces by incident type."],updateFrequency:"5m"},endpoints:[d]};});var d,V,Ae,ue,H=a(()=>{j$1();b$3();o();f$1();d={functionName:"fetchEventCategories",endpoint:"/getEventCategoriesAsJson",inputSchema:e,outputSchema:a$2.string().array(),sampleParams:{},endpointDescription:"List all available event category names for filtering alerts."},V=i({api:t,endpoint:d,getEndpointGroup:()=>(k(),c$1(b)).eventCategoriesGroup}),{fetch:Ae,hook:ue}=V;});var A,X,we,Ee,T=a(()=>{j$1();o();l();n();A={functionName:"fetchAlerts",endpoint:"/getAlertsAsJson",inputSchema:g$1,outputSchema:m.array(),sampleParams:{},endpointDescription:"List all current highway alerts statewide."},X=i({api:t,endpoint:A,getEndpointGroup:()=>(p(),c$1(s)).highwayAlertsGroup}),{fetch:we,hook:Ee}=X;});var u,Y,Fe,xe,q=a(()=>{j$1();o();l();n();u={functionName:"fetchAlertsByMapArea",endpoint:"/getAlertsByMapAreaAsJson?MapArea={MapArea}",inputSchema:j$2,outputSchema:m.array(),sampleParams:{MapArea:"Seattle"},endpointDescription:"List highway alerts filtered by map area code."},Y=i({api:t,endpoint:u,getEndpointGroup:()=>(p(),c$1(s)).highwayAlertsGroup}),{fetch:Fe,hook:xe}=Y;});var g,Z,qe,Ne,N=a(()=>{j$1();o();l();n();g={functionName:"fetchAlertsByRegionId",endpoint:"/getAlertsByRegionIDAsJson?RegionID={RegionID}",inputSchema:k$1,outputSchema:m.array(),sampleParams:{RegionID:4},endpointDescription:"List highway alerts filtered by WSDOT region ID."},Z=i({api:t,endpoint:g,getEndpointGroup:()=>(p(),c$1(s)).highwayAlertsGroup}),{fetch:qe,hook:Ne}=Z;});var f,_,Qe,We,P=a(()=>{j$1();a$3();o();l();n();f={functionName:"searchAlerts",endpoint:"/searchAlertsAsJson?StateRoute={StateRoute}&Region={Region}&SearchTimeStart={SearchTimeStart}&SearchTimeEnd={SearchTimeEnd}&StartingMilepost={StartingMilepost}&EndingMilepost={EndingMilepost}",inputSchema:i$1,outputSchema:m.array(),sampleParams:{StateRoute:"405",StartingMilepost:10,EndingMilepost:20,SearchTimeStart:d$2.yesterday(),SearchTimeEnd:d$2.today()},endpointDescription:"Search highway alerts by route, region, time range, and milepost."},_=i({api:t,endpoint:f,getEndpointGroup:()=>(p(),c$1(s)).highwayAlertsGroup}),{fetch:Qe,hook:We}=_;});var s={};b$1(s,{highwayAlertsGroup:()=>$});var $,p=a(()=>{J();T();q();N();P();$={name:"highwayAlerts",cacheStrategy:"FREQUENT",documentation:{summary:"Real-time highway alerts for traffic incidents and road conditions.",description:"Traffic incidents, construction, maintenance, and other events affecting Washington State highways, including location details, impact levels, timestamps, and event classifications.",useCases:["Monitor real-time traffic incidents and road conditions.","Plan alternate routes based on current highway alerts.","Display active alerts filtered by location, region, or category.","Track alert status and estimated resolution times."],updateFrequency:"5m"},endpoints:[A,f,g,u,M]};});var M,ee,rt,at,J=a(()=>{j$1();o();l();n();M={functionName:"fetchAlertById",endpoint:"/getAlertAsJson?AlertID={AlertID}",inputSchema:h,outputSchema:m,sampleParams:{AlertID:468632},endpointDescription:"Get highway alert details for a specific alert ID."},ee=i({api:t,endpoint:M,getEndpointGroup:()=>(p(),c$1(s)).highwayAlertsGroup}),{fetch:rt,hook:at}=ee;}); export{g as A,qe as B,Ne as C,N as D,f as E,Qe as F,We as G,P as H,$ as I,p as J,t as a,o as b,y as c,se as d,pe as e,F as f,W as g,C as h,d as i,Ae as j,ue as k,H as l,K as m,k as n,M as o,rt as p,at as q,J as r,A as s,we as t,Ee as u,T as v,u as w,Fe as x,xe as y,q as z};//# sourceMappingURL=chunk-3IOICVDD.mjs.map //# sourceMappingURL=chunk-3IOICVDD.mjs.map