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 • 114 kB
JavaScript
'use strict';var zod=require('zod'),reactQuery=require('@tanstack/react-query'),Br=require('chalk');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Br__default=/*#__PURE__*/_interopDefault(Br);var Za=Object.defineProperty;var b=(t,i)=>{for(var a in i)Za(t,a,{get:i[a],enumerable:true});};var qe=t=>{if(!t||typeof t!="string"||!t.startsWith("/Date(")||!t.endsWith(")/"))return null;let i=t.slice(6,-6),a=i.search(/[+-]/),o=a>0?i.slice(0,a):i,u=parseInt(o,10);if(Number.isNaN(u))return null;let w=new Date(u);return Number.isNaN(w.getTime())?null:w},It=t=>t.toISOString().split("T")[0],Ar=t=>JSON.parse(JSON.stringify(t),(i,a)=>{if(typeof a=="string"){let o=qe(a);if(o)return o;let u=new Date(a);return !Number.isNaN(u.getTime())&&Ya(a)?u:a}return a}),Ya=t=>/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d{1,3})?)?(Z|[+-]\d{2}:\d{2})?$/.test(t);var n={tomorrow:()=>new Date(Date.now()+864e5),dayAfterTomorrow:()=>new Date(Date.now()+1728e5),today:()=>new Date,yesterday:()=>new Date(Date.now()-864e5),startOfMonth:()=>new Date(2025,7,1),endOfMonth:()=>new Date(2025,7,31)};var r=()=>zod.z.string().refine(t=>wr(t)||eo(t),{message:"Invalid date format. Expected /Date(timestamp)/ or ISO-8601 string"}).transform(t=>{if(wr(t)){let i=qe(t.replace(/\\\//g,"/"));if(!i)throw new Error(`Failed to parse WSDOT date: ${t}`);return i}return new Date(t)}),wr=t=>t.length>=19&&(t.startsWith("/Date(")||t.startsWith("\\/Date("))&&(t.endsWith(")/")||t.endsWith(")\\/")),eo=t=>/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d{1,3})?)?(Z|[+-]\d{2}:\d{2})?$/.test(t);var Rr={REALTIME:{staleTime:5*1e3,gcTime:3600*1e3,refetchInterval:5*1e3,retry:2,retryDelay:5*1e3},FREQUENT:{staleTime:300*1e3,gcTime:3600*1e3,refetchInterval:300*1e3,retry:3,retryDelay:5*1e3},MODERATE:{staleTime:3600*1e3,gcTime:2880*60*1e3,refetchInterval:3600*1e3,retry:3,retryDelay:60*1e3},STATIC:{staleTime:1440*60*1e3,gcTime:2880*60*1e3,refetchInterval:1440*60*1e3,retry:2,retryDelay:5*1e3}};function ro(t,i,a){return o=>reactQuery.queryOptions({queryKey:[...i,o],queryFn:()=>t(o),...Rr[a]})}var io="http://www.wsdot.wa.gov",ke={apiKey:process.env.WSDOT_ACCESS_TOKEN||"",domain:process.env.WSDOT_BASE_URL||io},no=()=>ke.apiKey,ao=()=>ke.domain,oo=t=>{ke.apiKey=t;},so=t=>{ke.domain=t;},ce={getApiKey:no,getDomain:ao,setApiKey:oo,setDomain:so};var vt=(t,i)=>{let a=ce.getDomain(),o=t;return i&&Object.entries(i).forEach(([u,w])=>{let Ne=`{${u}}`,pe=w instanceof Date?It(w):String(w);o=o.replace(Ne,pe);}),o=o.replace(/&[^&]*\{[^}]+\}/g,""),o=o.replace(/([?&])[^=&]+=&/g,"$1"),new URL(o,a).toString()},Dt=t=>{let i=lo(t),a=ce.getApiKey(),o=new URL(t);return i==="wsdot"?o.searchParams.set("accesscode",a):i==="wsf"&&o.searchParams.set("apiaccesscode",a),o.toString()},lo=t=>{let i=t.toLowerCase();return i.includes("/traffic/")?"wsdot":i.includes("/ferries/")?"wsf":"unknown"};var Oe=()=>typeof process<"u"&&(process.env.NODE_ENV==="test"||process.env.VITEST==="true"||process.env.JEST_WORKER_ID!==void 0),Je=()=>typeof window<"u"&&typeof document<"u",xt=()=>typeof process<"u"&&process.env.FORCE_JSONP==="true",mo=()=>Oe()?"test":Je()?"web":"server";var Rt=()=>xt()?At:Oe()?wt:Je()?At:wt,At=async t=>new Promise((i,a)=>{let o=document.createElement("script"),u=`jsonp_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;window[u]=w=>{document.head.removeChild(o),delete window[u],i(JSON.stringify(w));},o.onerror=()=>{document.head.removeChild(o),delete window[u],a(new Error("JSONP request failed"));},o.src=`${t}${t.includes("?")?"&":"?"}callback=${u}`,document.head.appendChild(o);}),wt=async t=>{let i=await fetch(t);if(!i.ok)throw new Error(`HTTP ${i.status}: ${i.statusText}`);return i.text()};var Bt=(t,i)=>{let{message:a,status:o}=uo(t);return {name:"ApiError",message:a,status:o,context:{timestamp:new Date,endpoint:i,url:i}}},co=t=>t!==null&&typeof t=="object"&&"name"in t&&t.name==="ApiError",uo=t=>{if(t instanceof Error&&t.name==="ZodError"){let i=t;return {message:`Validation failed:
${zod.z.prettifyError(i)}`}}if(t instanceof Error){let i=t.message.match(/HTTP (\d+)/),a=i?parseInt(i[1],10):void 0;return {message:t.message,status:a}}return {message:"An unexpected error occurred"}};var ho={debug:t=>{process.env.NODE_ENV==="development"&&console.debug(`[WS-Dottie] ${t}`);},info:t=>{console.info(`[WS-Dottie] ${t}`);},warn:t=>{console.warn(`[WS-Dottie] ${t}`);},error:t=>{console.error(`[WS-Dottie] ${t}`);}},Ct=(t,i)=>{let a=t.split("/").pop()||t,o=i?JSON.stringify(i):"none",u=Br__default.default.blue(`Calling ${a} with parameters ${o}...`);console.log(u);},zt=(t,i,a)=>{let o=Date.now()-i,u=Array.isArray(t)?t.length:1,w=(o/1e3).toFixed(1),Ne=(a/1024).toFixed(1),pe=Br__default.default.green(` Retrieved ${u} objects in ${w} sec (${Ne} kb).`);console.log(pe);};var Cr=async({endpoint:t,params:i,logMode:a})=>{let o=Date.now();a!=="none"&&Ct(t,i);try{let u=vt(t,i);a!=="none"&&console.log(`Fetching: ${u}`);let w=Dt(u),pe=await Rt()(w),xr=JSON.parse(pe);return a!=="none"&&zt(xr,o,pe.length),xr}catch(u){throw Bt(u,t)}},fo=async(t,i,a)=>{i&&t.inputSchema.parse(i);let o=await Cr({endpoint:t.endpoint,params:i,logMode:a});return t.outputSchema.parse(o)},bo=async(t,i,a)=>{let o=await Cr({endpoint:t.endpoint,params:i,logMode:a});return Ar(o)};var Et={};b(Et,{getBorderCrossings:()=>To});var S=zod.z.object({Description:zod.z.string().nullable().describe("A description of the location. This could be a cross street or a nearby landmark."),RoadName:zod.z.string().nullable().describe("The name of the road."),Direction:zod.z.string().nullable().describe("The side of the road the location is on (Northbound, Southbound). This does not necessarily correspond to an actual compass direction."),MilePost:zod.z.number().describe("The milepost of the location."),Latitude:zod.z.number().describe("Latitude of the location."),Longitude:zod.z.number().describe("Longitude of the location.")}).describe("Describes a specific location on a WA State Highway.");var yo=zod.z.object({BorderCrossingLocation:S.nullable().describe("Where the crossing is located"),CrossingName:zod.z.string().nullable().describe("Border crossing name (e.g., 'I5', 'SR 543') or null when not available"),Time:r().describe("Report time (JS Date)"),WaitTime:zod.z.number().int().describe("Estimated wait time in minutes (can be negative to indicate no wait or special conditions)")}).describe("Information about Canadian border crossing wait times."),zr=zod.z.array(yo).describe("Coverage Area: I-5, SR-543, SR-539, and SR-9 crossings. Provides current wait times for the various border crossings into Canada.");var So=zod.z.object({}).strict(),Er={id:"wsdot-border-crossings/getBorderCrossings",endpoint:"/Traffic/api/BorderCrossings/BorderCrossingsREST.svc/GetBorderCrossingsAsJson",inputSchema:So,outputSchema:zr,sampleParams:{},cacheStrategy:"FREQUENT"};var To=e(Er);var Mt={};b(Mt,{getBridgeClearances:()=>Ao,getBridgeClearancesByRoute:()=>wo});var Io=zod.z.object({APILastUpdate:r().describe("Date record was last updated."),BridgeNumber:zod.z.string().nullable().describe("A 2-part identifier with up to 10 alphanumeric characters."),ControlEntityGuid:zod.z.string().uuid().describe("An identifier for the bridge."),CrossingDescription:zod.z.string().nullable().describe("Description of the crossing."),CrossingLocationId:zod.z.number().int().describe("Unique identifier for bridge."),CrossingRecordGuid:zod.z.string().uuid().describe("An identifier for the bridge."),InventoryDirection:zod.z.enum(["I","D","B","i","d","b"]).nullable().describe("Code representing the direction of the inventory."),Latitude:zod.z.number().describe("Latitude of the bridge."),LocationGuid:zod.z.string().uuid().describe("An identifier for the bridge."),Longitude:zod.z.number().describe("Longitude of the bridge."),RouteDate:r().describe("Date of the route."),SRMP:zod.z.number().describe("State Route Mile Post."),SRMPAheadBackIndicator:zod.z.string().nullable().describe("Indicator for milepost within a back mileage equation area."),StateRouteID:zod.z.string().nullable().describe("State Route identifier."),StateStructureId:zod.z.string().nullable().describe("State structure identifier."),VerticalClearanceMaximumFeetInch:zod.z.string().nullable().describe("Maximum vertical clearance in feet and inches."),VerticalClearanceMaximumInches:zod.z.number().int().describe("Maximum vertical clearance in inches."),VerticalClearanceMinimumFeetInch:zod.z.string().nullable().describe("Minimum vertical clearance in feet and inches."),VerticalClearanceMinimumInches:zod.z.number().int().describe("Minimum vertical clearance in inches.")}).describe("A record containing the location and clearance information of a bridge structure."),$e=zod.z.array(Io).describe("Bridge clearance information, see disclaimer.");var Do=zod.z.object({}).strict(),Mr={id:"wsdot-bridge-clearances/getBridgeClearances",endpoint:"/Traffic/api/Bridges/ClearanceREST.svc/GetClearancesAsJson",inputSchema:Do,outputSchema:$e,sampleParams:{},cacheStrategy:"STATIC"};var xo=zod.z.object({route:zod.z.string().min(1,"Route parameter is required")}),Fr={id:"wsdot-bridge-clearances/getBridgeClearancesByRoute",endpoint:"/Traffic/api/Bridges/ClearanceREST.svc/GetClearancesAsJson?Route={route}",inputSchema:xo,outputSchema:$e,sampleParams:{route:"005"},cacheStrategy:"STATIC"};var Ao=e(Mr),wo=e(Fr);var Ft={};b(Ft,{getCommercialVehicleRestrictions:()=>Mo,getCommercialVehicleRestrictionsWithId:()=>Vo});var Vt=zod.z.object({BLMaxAxle:zod.z.number().int().nullable().describe("BL Max Axle weight"),BridgeName:zod.z.string().nullable().describe("Name of the bridge"),BridgeNumber:zod.z.string().nullable().describe("WSDOT Identifier for bridge"),CL8MaxAxle:zod.z.number().int().nullable().describe("CL8 Max Axle weight"),DateEffective:r().describe("Date when the restriction comes into effect"),DateExpires:r().describe("Date when the restriction is no longer in force"),DatePosted:r().describe("Date when the restriction was first posted"),EndRoadwayLocation:S.nullable().describe("End location for the restriction on the roadway"),IsDetourAvailable:zod.z.boolean().describe("Indicates if a detour is available"),IsExceptionsAllowed:zod.z.boolean().describe("Indicates if exceptions are allowed"),IsPermanentRestriction:zod.z.boolean().describe("Indicates whether the restriction is permanent"),IsWarning:zod.z.boolean().describe("Indicates if this is a warning"),Latitude:zod.z.number().describe("Latitude of location of bridge"),LocationDescription:zod.z.string().nullable().describe("Description of the location"),LocationName:zod.z.string().nullable().describe("Name of the location"),Longitude:zod.z.number().describe("Longitude of location of bridge"),MaximumGrossVehicleWeightInPounds:zod.z.number().int().nullable().describe("Maximum gross vehicle weight in pounds"),RestrictionComment:zod.z.string().nullable().describe("Comment about the restriction"),RestrictionHeightInInches:zod.z.number().int().nullable().describe("Restriction height in inches"),RestrictionLengthInInches:zod.z.number().int().nullable().describe("Restriction length in inches"),RestrictionType:zod.z.union([zod.z.literal(0),zod.z.literal(1)]).describe("Restriction type (0 = BridgeRestriction, 1 = RoadRestriction)"),RestrictionWeightInPounds:zod.z.number().int().nullable().describe("Restriction weight in pounds"),RestrictionWidthInInches:zod.z.number().int().nullable().describe("Restriction width in inches"),SAMaxAxle:zod.z.number().int().nullable().describe("SA Max Axle weight"),StartRoadwayLocation:S.nullable().describe("Start location for the restriction on the roadway"),State:zod.z.string().nullable().describe("State abbreviation"),StateRouteID:zod.z.string().nullable().describe("State Route identifier"),TDMaxAxle:zod.z.number().int().nullable().describe("TD Max Axle weight"),VehicleType:zod.z.string().nullable().describe("Vehicle type description"),UniqueID:zod.z.string().optional().describe("Unique ID")}).describe("Represents a Commercial Vehicle Restriction."),Lr=zod.z.array(Vt).describe("Coverage Area: Statewide. Provides list of restrictions for commercial vehicles.");var Bo=zod.z.object({}).strict(),Wr={id:"wsdot-commercial-vehicle-restrictions/getCommercialVehicleRestrictions",endpoint:"/Traffic/api/CVRestrictions/CVRestrictionsREST.svc/GetCommercialVehicleRestrictionsAsJson",inputSchema:Bo,outputSchema:Lr,sampleParams:{},cacheStrategy:"STATIC"};var Co=Vt.extend({UniqueID:zod.z.string().nullable().describe("Unique restriction identifier")}).describe("Represents a Commercial Vehicle Restriction with UniqueID."),Pr=zod.z.array(Co).describe("Coverage Area: Statewide. Provides list of restrictions for commercial vehicles with UniqueID.");var Eo=zod.z.object({}).strict(),Hr={id:"wsdot-commercial-vehicle-restrictions/getCommercialVehicleRestrictionsWithId",endpoint:"/Traffic/api/CVRestrictions/CVRestrictionsREST.svc/GetCommercialVehicleRestrictionsWithIdAsJson",inputSchema:Eo,outputSchema:Pr,sampleParams:{},cacheStrategy:"STATIC"};var Mo=e(Wr),Vo=e(Hr);var Wt={};b(Wt,{getAlert:()=>Jo,getAlerts:()=>Go,getAlertsByRegionId:()=>$o,getAlertsForMapArea:()=>Ko,getEventCategories:()=>Qo,getMapAreas:()=>_o,searchAlerts:()=>Zo});var Lt=zod.z.object({AlertID:zod.z.number().int().describe("Unique Identifier for the alert."),County:zod.z.string().nullable().describe("Used for countywide alerts, name of the affected county."),EndRoadwayLocation:S.nullable().describe("End location for the alert on the roadway."),EndTime:r().nullable().describe("Estimated end time for alert."),EventCategory:zod.z.string().nullable().describe("Categorization of alert, i.e. Collision, Maintenance, etc."),EventStatus:zod.z.enum(["Open","Closed"]).nullable().describe("Current status of alert, Open, Closed."),ExtendedDescription:zod.z.string().nullable().describe("Optional - Additional information about the alert, used for relaying useful extra information for an alert."),HeadlineDescription:zod.z.string().nullable().describe("Information about what the alert has been issued for."),LastUpdatedTime:r().nullable().describe("When was alert was last changed."),Priority:zod.z.enum(["Highest","High","Medium","Low","Lowest"]).nullable().describe("Expected impact on traffic, Highest, High, Medium, Low, Lowest."),Region:zod.z.string().nullable().describe("WSDOT Region which entered the alert, valid values: Eastern (EA), North Central (NC), Northwest (NW), Olympic (OL), South Central (SC), Southwest (SW)."),StartRoadwayLocation:S.nullable().describe("Start location for the alert on the roadway."),StartTime:r().nullable().describe("When the impact on traffic began.")}).describe("A Highway Alert."),O=zod.z.array(Lt).describe("Coverage Area: Statewide. Provides access to all of the active incidents currently logged in our ROADS system.");var Fo=zod.z.object({AlertID:zod.z.number().int().positive()}),Nr={id:"wsdot-highway-alerts/getAlert",endpoint:"/Traffic/api/HighwayAlerts/HighwayAlertsREST.svc/GetAlertAsJson?AlertID={AlertID}",inputSchema:Fo,outputSchema:Lt,sampleParams:{AlertID:468632},cacheStrategy:"FREQUENT"};var Wo=zod.z.object({}).strict(),qr={id:"wsdot-highway-alerts/getAlerts",endpoint:"/Traffic/api/HighwayAlerts/HighwayAlertsREST.svc/GetAlertsAsJson",inputSchema:Wo,outputSchema:O,sampleParams:{},cacheStrategy:"FREQUENT"};var jo=zod.z.object({RegionId:zod.z.number().int().positive()}),Or={id:"wsdot-highway-alerts/getAlertsByRegionId",endpoint:"/Traffic/api/HighwayAlerts/HighwayAlertsREST.svc/GetAlertsByRegionIDAsJson?RegionId={RegionId}",inputSchema:jo,outputSchema:O,sampleParams:{RegionId:9},cacheStrategy:"FREQUENT"};var Po=zod.z.object({MapArea:zod.z.string().min(1,"Map area cannot be empty")}),Gr={id:"wsdot-highway-alerts/getAlertsForMapArea",endpoint:"/Traffic/api/HighwayAlerts/HighwayAlertsREST.svc/GetAlertsByMapAreaAsJson?MapArea={MapArea}",inputSchema:Po,outputSchema:O,sampleParams:{MapArea:"Seattle"},cacheStrategy:"FREQUENT"};var Kr=zod.z.array(zod.z.string().nullable()).describe("Array of event category strings used for classifying highway alerts.");var Uo=zod.z.object({}).strict(),Qr={id:"wsdot-highway-alerts/getEventCategories",endpoint:"/Traffic/api/HighwayAlerts/HighwayAlertsREST.svc/GetEventCategoriesAsJson",inputSchema:Uo,outputSchema:Kr,sampleParams:{},cacheStrategy:"FREQUENT"};var No=zod.z.object({MapArea:zod.z.string().nullable().describe("Name of area on map."),MapAreaDescription:zod.z.string().nullable().describe("Description of area.")}).describe("List of map areas available for traffic alert queries."),_r=zod.z.array(No).describe("Array of map areas used for filtering highway alerts.");var ko=zod.z.object({}).strict(),Zr={id:"wsdot-highway-alerts/getMapAreas",endpoint:"/Traffic/api/HighwayAlerts/HighwayAlertsREST.svc/GetMapAreasAsJson",inputSchema:ko,outputSchema:_r,sampleParams:{},cacheStrategy:"FREQUENT"};var Oo=zod.z.object({StateRoute:zod.z.string().optional(),Region:zod.z.string().optional(),SearchTimeStart:zod.z.date().optional(),SearchTimeEnd:zod.z.date().optional(),StartingMilepost:zod.z.number().optional(),EndingMilepost:zod.z.number().optional()}).strict(),Yr={id:"wsdot-highway-alerts/searchAlerts",endpoint:"/Traffic/api/HighwayAlerts/HighwayAlertsREST.svc/SearchAlertsAsJson?StateRoute={StateRoute}&Region={Region}&SearchTimeStart={SearchTimeStart}&SearchTimeEnd={SearchTimeEnd}&StartingMilepost={StartingMilepost}&EndingMilepost={EndingMilepost}",inputSchema:Oo,outputSchema:O,sampleParams:{StateRoute:"405",SearchTimeStart:new Date("2025-08-01"),SearchTimeEnd:new Date("2025-09-30")},cacheStrategy:"FREQUENT"};var Jo=e(Nr),Go=e(qr),$o=e(Or),Ko=e(Gr),Qo=e(Qr),_o=e(Zr),Zo=e(Yr);var Pt={};b(Pt,{getHighwayCamera:()=>rs,getHighwayCameras:()=>is,searchHighwayCameras:()=>ns});var jt=zod.z.object({CameraID:zod.z.number().int().describe("Unique identifier for the camera"),CameraLocation:S.nullable().describe("Structure identifying where the camera is located"),CameraOwner:zod.z.string().nullable().describe("Owner of camera when not WSDOT"),Description:zod.z.string().nullable().describe("Short description for the camera"),DisplayLatitude:zod.z.number().describe("Latitude of where to display the camera on a map"),DisplayLongitude:zod.z.number().describe("Longitude of where to display the camera on a map"),ImageHeight:zod.z.number().int().describe("Pixel height of the image"),ImageURL:zod.z.string().nullable().describe("Stored location of the camera image"),ImageWidth:zod.z.number().int().describe("Pixel width of the image"),IsActive:zod.z.boolean().describe("Whether the camera is active"),OwnerURL:zod.z.string().nullable().describe("URL of the camera owner"),Region:zod.z.enum(["ER","NC","NW","OL","OS","SC","SW","WA"]).nullable().describe("WSDOT Region which entered the alert, valid values: ER - Eastern, NC - North Central, NW - Northwest, OL - Olympic, OS - Olympic South, SC - South Central, SW - Southwest, WA - Washington Aviation."),SortOrder:zod.z.number().int().describe("Sort order for display"),Title:zod.z.string().nullable().describe("Title of the camera")}).describe("Information about traffic camera."),Qe=zod.z.array(jt).describe("Coverage Area: Statewide. Provides access to the camera images that appear on our Traffic pages. Currently only supports snap shots (not full video). The available cameras does not change very often.");var Yo=zod.z.object({cameraID:zod.z.number().int()}),ei={id:"wsdot-highway-cameras/getHighwayCamera",endpoint:"/Traffic/api/HighwayCameras/HighwayCamerasREST.svc/GetCameraAsJson?CameraID={cameraID}",inputSchema:Yo,outputSchema:jt,sampleParams:{cameraID:9818},cacheStrategy:"STATIC"};var es=zod.z.object({}).strict(),ti={id:"wsdot-highway-cameras/getHighwayCameras",endpoint:"/Traffic/api/HighwayCameras/HighwayCamerasREST.svc/GetCamerasAsJson",inputSchema:es,outputSchema:Qe,sampleParams:{},cacheStrategy:"STATIC"};var ts=zod.z.object({StateRoute:zod.z.string().optional(),Region:zod.z.string().optional(),StartingMilepost:zod.z.number().optional(),EndingMilepost:zod.z.number().optional()}).strict(),ri={id:"wsdot-highway-cameras/searchHighwayCameras",endpoint:"/Traffic/api/HighwayCameras/HighwayCamerasREST.svc/SearchCamerasAsJson",inputSchema:ts,outputSchema:Qe,sampleParams:{},cacheStrategy:"STATIC"};var rs=e(ei),is=e(ti),ns=e(ri);var qt={};b(qt,{getMountainPassCondition:()=>ls,getMountainPassConditions:()=>ms});var Ut=zod.z.object({RestrictionText:zod.z.string().nullable().describe("The text of this restriction."),TravelDirection:zod.z.string().nullable().describe("The direction of this restriction.")}).describe("A travel restriction for mountain passes.");var Nt=zod.z.object({DateUpdated:r().describe("Date and time to display to public, DisplayDate in the database"),ElevationInFeet:zod.z.number().int().describe("The elevation of the mountain pass in feet."),Latitude:zod.z.number().describe("The latitude of the mountain pass."),Longitude:zod.z.number().describe("The longitude of the mountain pass."),MountainPassId:zod.z.number().int().describe("A unique identifier for a mountain pass."),MountainPassName:zod.z.string().nullable().describe("A friendly name for a mountain pass."),RestrictionOne:Ut.nullable().describe("The travel restriction in the primary direction."),RestrictionTwo:Ut.nullable().describe("The travel restriction in the secondary direction."),RoadCondition:zod.z.string().nullable().describe("The roadway conditions at the pass."),TemperatureInFahrenheit:zod.z.number().int().nullable().describe("The temperature reading at the mountain pass in degrees fahrenheit."),TravelAdvisoryActive:zod.z.boolean().describe("Indicates if a travel advisory is active."),WeatherCondition:zod.z.string().nullable().describe("The weather conditions at the pass.")}).describe("A data structure that represents the conditions of the mountain pass."),ii=zod.z.array(Nt).describe("Coverage Area: 15 passes (see http://www.wsdot.wa.gov/traffic/passes/). Provides real-time data on pass conditions. The data is provided by the Mountain Pass Entry system.");var as=zod.z.object({passConditionId:zod.z.number().int().positive()}),ai={id:"wsdot-mountain-pass-conditions/getMountainPassCondition",endpoint:"/Traffic/api/MountainPassConditions/MountainPassConditionsREST.svc/GetMountainPassConditionAsJon?PassConditionID={passConditionId}",inputSchema:as,outputSchema:Nt,sampleParams:{passConditionId:1},cacheStrategy:"STATIC"};var ss=zod.z.object({}).strict(),oi={id:"wsdot-mountain-pass-conditions/getMountainPassConditions",endpoint:"/Traffic/api/MountainPassConditions/MountainPassConditionsREST.svc/GetMountainPassConditionsAsJson",inputSchema:ss,outputSchema:ii,sampleParams:{},cacheStrategy:"STATIC"};var ls=e(ai),ms=e(oi);var Jt={};b(Jt,{getTollRates:()=>Ds,getTollTripInfo:()=>xs,getTollTripRates:()=>As,getTollTripVersion:()=>ws,getTripRatesByDate:()=>Rs,getTripRatesByVersion:()=>Bs});var ps=zod.z.object({CurrentMessage:zod.z.string().nullable().describe("Current message displayed on sign"),CurrentToll:zod.z.number().describe("Current toll in cents"),EndLatitude:zod.z.number().describe("End latitude"),EndLocationName:zod.z.string().nullable().describe("End location name (nullable)"),EndLongitude:zod.z.number().describe("End longitude"),EndMilepost:zod.z.number().describe("End milepost"),StartLatitude:zod.z.number().describe("Start latitude"),StartLocationName:zod.z.string().nullable().describe("Start location name (nullable)"),StartLongitude:zod.z.number().describe("Start longitude"),StartMilepost:zod.z.number().describe("Start milepost"),StateRoute:zod.z.string().nullable().describe("State route (nullable)"),TimeUpdated:r().describe("Time updated"),TravelDirection:zod.z.string().nullable().describe("Travel direction (nullable)"),TripName:zod.z.string().nullable().describe("Trip identifier (nullable)")}),si=zod.z.array(ps).describe("Current toll rates and related metadata for WSDOT tolled corridors.");var ds=zod.z.object({}).strict(),li={id:"wsdot-toll-rates/getTollRates",endpoint:"/Traffic/api/TollRates/TollRatesREST.svc/GetTollRatesAsJson",inputSchema:ds,outputSchema:si,sampleParams:{},cacheStrategy:"FREQUENT"};var us=zod.z.object({EndLatitude:zod.z.number().describe("End latitude"),EndLocationName:zod.z.string().nullable().describe("End location name (nullable)"),EndLongitude:zod.z.number().describe("End longitude"),EndMilepost:zod.z.number().describe("End milepost"),Geometry:zod.z.string().nullable().describe("WGS84 LineString geometry (string)"),ModifiedDate:r().describe("Last modified date (JS Date)"),StartLatitude:zod.z.number().describe("Start latitude"),StartLocationName:zod.z.string().nullable().describe("Start location name (nullable)"),StartLongitude:zod.z.number().describe("Start longitude"),StartMilepost:zod.z.number().describe("Start milepost"),TravelDirection:zod.z.string().nullable().describe("Travel direction (nullable)"),TripName:zod.z.string().nullable().describe("Trip identifier (nullable)")}),mi=zod.z.array(us).describe("Array of toll trip info records.");var fs=zod.z.object({}).strict(),pi={id:"wsdot-toll-rates/getTollTripInfo",endpoint:"/Traffic/api/TollRates/TollRatesREST.svc/GetTollTripInfoAsJson",inputSchema:fs,outputSchema:mi,sampleParams:{},cacheStrategy:"FREQUENT"};var ci=zod.z.object({Message:zod.z.string().nullable().describe("Status/message for the trip rate"),MessageUpdateTime:r().describe("Message update time"),Toll:zod.z.number().describe("Toll amount in cents"),TripName:zod.z.string().nullable().describe("Trip identifier")});var de=zod.z.object({LastUpdated:r().describe("Last updated time for this data (JS Date)"),Trips:zod.z.array(ci).nullable().describe("Array of trip rate objects"),Version:zod.z.number().describe("Version number for the trip rates data")});var ys=zod.z.object({}).strict(),di={id:"wsdot-toll-rates/getTollTripRates",endpoint:"/Traffic/api/TollRates/TollRatesREST.svc/GetTollTripRatesAsJson",inputSchema:ys,outputSchema:de,sampleParams:{},cacheStrategy:"FREQUENT"};var hi=zod.z.object({TimeStamp:r().describe("Time stamp for the version data (JS Date)"),Version:zod.z.number().describe("Version number for the toll trip dataset")});var Ss=zod.z.object({}).strict(),fi={id:"wsdot-toll-rates/getTollTripVersion",endpoint:"/Traffic/api/TollRates/TollRatesREST.svc/GetTollTripVersionAsJson",inputSchema:Ss,outputSchema:hi,sampleParams:{},cacheStrategy:"FREQUENT"};var bi=zod.z.array(de).describe("Historical trip rates for a date range - returns array of trip rates");var Is=zod.z.object({fromDate:zod.z.date(),toDate:zod.z.date()}),yi={id:"wsdot-toll-rates/getTripRatesByDate",endpoint:"/Traffic/api/TollRates/TollRatesREST.svc/GetTripRatesByDateAsJson?fromDate={fromDate}&toDate={toDate}",inputSchema:Is,outputSchema:bi,sampleParams:{fromDate:n.startOfMonth(),toDate:n.endOfMonth()},cacheStrategy:"STATIC"};var vs=zod.z.object({version:zod.z.number().describe("Version number to retrieve")}),Si={id:"wsdot-toll-rates/getTripRatesByVersion",endpoint:"/Traffic/api/TollRates/TollRatesREST.svc/GetTripRatesByVersionAsJson?version={version}",inputSchema:vs,outputSchema:de,sampleParams:{version:352417},cacheStrategy:"FREQUENT"};var Ds=e(li),xs=e(pi),As=e(di),ws=e(fi),Rs=e(yi),Bs=e(Si);var $t={};b($t,{getTrafficFlow:()=>Ms,getTrafficFlowById:()=>Vs});var Gt=zod.z.object({FlowDataID:zod.z.number().int().describe("A unique ID that identifies a specific station."),FlowReadingValue:zod.z.union([zod.z.literal(0),zod.z.literal(1),zod.z.literal(2),zod.z.literal(3),zod.z.literal(4)]).describe("The current traffic condition at the flow station. Possible values: 0 = Unknown, 1 = WideOpen, 2 = Moderate, 3 = Heavy, 4 = StopAndGo"),FlowStationLocation:S.nullable().describe("The location of the flow station."),Region:zod.z.string().nullable().describe("The region that maintains the flow station."),StationName:zod.z.string().nullable().describe("The name of the flow station."),Time:r().describe("The time of the station reading.")}).describe("A data structure that represents a Flow Station."),Ti=zod.z.array(Gt).describe("Array of traffic flow data from WSDOT flow stations.");var zs=zod.z.object({}).strict(),Ii={id:"wsdot-traffic-flow/getTrafficFlow",endpoint:"/traffic/api/TrafficFlow/TrafficFlowREST.svc/GetTrafficFlowsAsJson",inputSchema:zs,outputSchema:Ti,sampleParams:{},cacheStrategy:"FREQUENT"};var Es=zod.z.object({flowDataID:zod.z.number()}),Di={id:"wsdot-traffic-flow/getTrafficFlowById",endpoint:"/traffic/api/TrafficFlow/TrafficFlowREST.svc/GetTrafficFlowAsJson?FlowDataID={flowDataID}",inputSchema:Es,outputSchema:Gt,sampleParams:{flowDataID:2482},cacheStrategy:"FREQUENT"};var Ms=e(Ii),Vs=e(Di);var Qt={};b(Qt,{getTravelTime:()=>js,getTravelTimes:()=>Ps});var Kt=zod.z.object({AverageTime:zod.z.number().int().describe("The average time in minutes that it takes to complete this route."),CurrentTime:zod.z.number().int().describe("The current estimated time in minutes that it takes to complete this route."),Description:zod.z.string().nullable().describe("A description for the route."),Distance:zod.z.number().describe("Total distance of this route in miles."),EndPoint:S.nullable().describe("The location where this route ends."),Name:zod.z.string().nullable().describe("A friendly name for the route."),StartPoint:S.nullable().describe("The location where this route begins."),TimeUpdated:r().describe("The last time that the data for this route was updated."),TravelTimeID:zod.z.number().int().describe("Unique ID that is specific to a route.")}).describe("Data structure that represents a travel time route."),xi=zod.z.array(Kt).describe("Coverage Area: Seattle, Tacoma, Snoqualmie Pass. Provides travel times for many popular travel routes around Washington State.");var Fs=zod.z.object({travelTimeId:zod.z.number().int().positive()}),wi={id:"wsdot-travel-times/getTravelTime",endpoint:"/Traffic/api/TravelTimes/TravelTimesREST.svc/GetTravelTimeAsJson?TravelTimeID={travelTimeId}",inputSchema:Fs,outputSchema:Kt,sampleParams:{travelTimeId:1},cacheStrategy:"STATIC"};var Ws=zod.z.object({}).strict(),Ri={id:"wsdot-travel-times/getTravelTimes",endpoint:"/Traffic/api/TravelTimes/TravelTimesREST.svc/GetTravelTimesAsJson",inputSchema:Ws,outputSchema:xi,sampleParams:{},cacheStrategy:"STATIC"};var js=e(wi),Ps=e(Ri);var Zt={};b(Zt,{getWeatherInformation:()=>qs,getWeatherInformationByStationId:()=>ks});var _t=zod.z.object({BarometricPressure:zod.z.number().nullable().describe("Barometric pressure"),Latitude:zod.z.number().describe("Latitude"),Longitude:zod.z.number().describe("Longitude"),PrecipitationInInches:zod.z.number().nullable().describe("Precipitation in inches"),ReadingTime:r().describe("Reading time"),RelativeHumidity:zod.z.number().nullable().describe("Relative humidity"),SkyCoverage:zod.z.string().nullable().describe("Sky coverage"),StationID:zod.z.number().int().describe("Station ID"),StationName:zod.z.string().nullable().describe("Station name"),TemperatureInFahrenheit:zod.z.number().nullable().describe("Temperature in Fahrenheit"),Visibility:zod.z.number().int().nullable().describe("Visibility"),WindDirection:zod.z.number().nullable().describe("Wind direction"),WindDirectionCardinal:zod.z.string().nullable().describe("Wind direction cardinal"),WindGustSpeedInMPH:zod.z.number().nullable().describe("Wind gust speed in MPH"),WindSpeedInMPH:zod.z.number().nullable().describe("Wind speed in MPH")}).describe("Current information from a weather station."),Bi=zod.z.array(_t).describe("Returns current weather information from weather stations that are run by the Washington State Department of Transportation");var Us=zod.z.object({}).strict(),Ci={id:"wsdot-weather-information/getWeatherInformation",endpoint:"/Traffic/api/WeatherInformation/WeatherInformationREST.svc/GetCurrentWeatherInformationAsJson",inputSchema:Us,outputSchema:Bi,sampleParams:{},cacheStrategy:"FREQUENT"};var Ns=zod.z.object({stationId:zod.z.number().int().positive().describe("Unique identifier for the specific weather station to retrieve. This ID corresponds to specific monitoring stations like 1909 (S 144th St on SB I-5), 1928 (EB I-90 Echo Lake), 1966 (NE 130th Street on I-5), or 1983 (Satus Pass on US 97). The ID is assigned by the WSDOT system and can be obtained from the getWeatherInformation endpoint response.")}).describe("Parameters for retrieving weather information for a specific weather station by its unique identifier"),Ei={id:"wsdot-weather-information/getWeatherInformationByStationId",endpoint:"/Traffic/api/WeatherInformation/WeatherInformationREST.svc/GetCurrentWeatherInformationByStationIDAsJson?StationID={stationId}",inputSchema:Ns,outputSchema:_t,sampleParams:{stationId:1909},cacheStrategy:"FREQUENT"};var qs=e(Ci),ks=e(Ei);var Yt={};b(Yt,{getWeatherInformationExtended:()=>Qs});var Os=zod.z.object({SensorId:zod.z.number().int().describe(""),SurfaceTemperature:zod.z.number().nullable().describe(""),RoadFreezingTemperature:zod.z.number().nullable().describe(""),RoadSurfaceCondition:zod.z.number().nullable().describe("")}).describe(""),Js=zod.z.object({SensorId:zod.z.number().int().describe(""),SubSurfaceTemperature:zod.z.number().nullable().describe("")}).describe(""),Mi=zod.z.object({StationId:zod.z.string().describe("NWS assigned name for station"),StationName:zod.z.string().describe("WSDOT assigned name"),Latitude:zod.z.number().describe("Latitude of station"),Longitude:zod.z.number().describe("Longitude of station"),Elevation:zod.z.number().int().describe("Elevation from sea level in meters"),ReadingTime:r().nullable().describe("Date and Time reading was taken"),AirTemperature:zod.z.number().nullable().describe("Air temperature at the site in Celcius."),RelativeHumidty:zod.z.number().int().nullable().describe("Percent of moisture in the air. A relative humidity of 0% shows that the air contains no moisture and 100% shows that the air is completely saturated and cannot absorb more moisture."),AverageWindSpeed:zod.z.number().int().nullable().describe("Average speed of the wind during an evaluation cycle in Kilometers per hour."),AverageWindDirection:zod.z.number().int().nullable().describe("Average wind direction during an evaluation cycle in degrees."),WindGust:zod.z.number().int().nullable().describe("Maximum wind speed measured during an evaluation cycle. The time period over which wind gust speed is monitored can vary based on the type and manufacturer of the RWIS site."),Visibility:zod.z.number().int().nullable().describe("Average distance that you can see, both day and night, computed every three minutes in meters."),PrecipitationIntensity:zod.z.number().int().nullable().describe("Intensity of the precipitation as derived from the precipitation rate."),PrecipitationType:zod.z.number().int().nullable().describe("Type of precipitation detected by a precipitation sensor, if one is available. Certain types of precipitation sensors can only detect the presence or absence of precipitation and will display Yes or No (1 or 0 respectively)."),PrecipitationPast1Hour:zod.z.number().nullable().describe("Rainfall amount or snowfall liquid equivalent for the previous 1 hour period. Measured in millimeters."),PrecipitationPast3Hours:zod.z.number().nullable().describe("Rainfall amount or snowfall liquid equivalent for the previous 3 hour period. Measured in millimeters."),PrecipitationPast6Hours:zod.z.number().nullable().describe("Rainfall amount or snowfall liquid equivalent for the previous 6 hour period. Measured in millimeters."),PrecipitationPast12Hours:zod.z.number().nullable().describe("Rainfall amount or snowfall liquid equivalent for the previous 12 hour period. Measured in millimeters."),PrecipitationPast24Hours:zod.z.number().nullable().describe("Rainfall amount or snowfall liquid equivalent for the previous 24 hour period. Measured in millimeters."),PrecipitationAccumulation:zod.z.number().nullable().describe("Rainfall amount or snowfall liquid equivalent for the period from midnight GMT to the current time. At midnight GMT the total accumulation is reset to zero. Measured in millimeters."),BarometricPressure:zod.z.number().int().nullable().describe("The force per unit area exerted by the atmosphere in millibars. This reading is not adjusted for site elevation."),SnowDepth:zod.z.number().int().nullable().describe("The depth of snow on representative areas other than the highway pavement, avoiding drifts and plowed areas in centimeters."),SurfaceMeasurements:zod.z.array(Os).nullable().describe("Surface measurements"),SubSurfaceMeasurements:zod.z.array(Js).nullable().describe("Sub-surface measurements")}).describe("Information from a weather station.");var Vi=zod.z.array(Mi).describe("Array of weather readings from WSDOT weather stations.");var Ks=zod.z.object({}).strict(),Fi={id:"wsdot-weather-information-extended/getWeatherInformationExtended",endpoint:"/traffic/api/api/Scanweb",inputSchema:Ks,outputSchema:Vi,sampleParams:{},cacheStrategy:"MODERATE"};var Qs=e(Fi);var Xt={};b(Xt,{getWeatherStations:()=>Xs});var Li=zod.z.object({Latitude:zod.z.number().describe("Latitude of station"),Longitude:zod.z.number().describe("Longitude of station"),StationCode:zod.z.number().int().describe("Identifier of weather station"),StationName:zod.z.string().nullable().describe("Common name assigned to weather station")}).describe("Contains information about weather stations.");var Wi=zod.z.array(Li).describe("Return current list of weather stations maintained by WSDOT");var Ys=zod.z.object({}).strict(),ji={id:"wsdot-weather-stations/getWeatherStations",endpoint:"/Traffic/api/WeatherStations/WeatherStationsREST.svc/GetCurrentStationsAsJson",inputSchema:Ys,outputSchema:Wi,sampleParams:{},cacheStrategy:"STATIC"};var Xs=e(ji);var or={};b(or,{fareLineItems:()=>yl,fareLineItemsBasic:()=>gl,fareLineItemsVerbose:()=>Sl,fareTotals:()=>Tl,faresTerminals:()=>Il,faresValidDateRange:()=>vl,getFaresCacheFlushDate:()=>bl,getFaresTerminalCombo:()=>Dl,getFaresTerminalComboVerbose:()=>xl,getFaresTerminalMates:()=>Al});var el=zod.z.object({CacheFlushDate:r().nullable().describe("If present, notes the date that certain service data was last changed (see description).")}),tl=r().nullable().describe("If present, notes the date that certain service data was last changed."),G=r().nullable().describe("If present, notes the date that certain service data was last changed.");zod.z.union([el,tl]);var il=zod.z.object({}).strict(),Hi={id:"wsf-fares/cacheFlushDate",endpoint:"/ferries/api/fares/rest/cacheflushdate",inputSchema:il,outputSchema:G,sampleParams:{},cacheStrategy:"STATIC"};var er=zod.z.object({FareLineItemID:zod.z.number().int().positive().describe("Unique identifier for a line item."),FareLineItem:zod.z.string().nullable().describe('A description of the fare (eg. "Adult (age 19 - 64)").'),Category:zod.z.string().nullable().describe('A logical grouping that the fare belongs to (eg. "Passenger").'),DirectionIndependent:zod.z.boolean().describe("A flag that, when true, indicates that the fare Amount is not influenced by the departing terminal of use. When false, the Amount might change depending on the departing terminal."),Amount:zod.z.number().describe("The cost of the fare in dollars.")});zod.z.array(er).describe("Array of fares for either round trip or one-way departures available for a given departing terminal, arriving terminal and trip date.");var nl=zod.z.object({tripDate:zod.z.date(),departingTerminalId:zod.z.number().int().positive(),arrivingTerminalId:zod.z.number().int().positive(),roundTrip:zod.z.boolean()}),Ui={id:"wsf-fares/fareLineItems",endpoint:"/ferries/api/fares/rest/farelineitems/{tripDate}/{departingTerminalId}/{arrivingTerminalId}/{roundTrip}",inputSchema:nl,outputSchema:zod.z.array(er),sampleParams:{tripDate:n.tomorrow(),departingTerminalId:1,arrivingTerminalId:10,roundTrip:false},cacheStrategy:"STATIC"};var tr=zod.z.object({FareLineItemID:zod.z.number().int().positive().describe("Unique identifier for a line item."),FareLineItem:zod.z.string().nullable().describe('A description of the fare (eg. "Adult (age 19 - 64)").'),Category:zod.z.string().nullable().describe('A logical grouping that the fare belongs to (eg. "Passenger").'),DirectionIndependent:zod.z.boolean().describe("A flag that, when true, indicates that the fare Amount is not influenced by the departing terminal of use. When false, the Amount might change depending on the departing terminal."),Amount:zod.z.number().describe("The cost of the fare in dollars.")});zod.z.array(tr).describe("Array of the most popular fares for either round trip or one-way departures available for a given departing terminal, arriving terminal and trip date.");var al=zod.z.object({tripDate:zod.z.date(),departingTerminalId:zod.z.number().int().positive(),arrivingTerminalId:zod.z.number().int().positive(),roundTrip:zod.z.boolean()}),Ni={id:"wsf-fares/fareLineItemsBasic",endpoint:"/ferries/api/fares/rest/farelineitemsbasic/{tripDate}/{departingTerminalId}/{arrivingTerminalId}/{roundTrip}",inputSchema:al,outputSchema:zod.z.array(tr),sampleParams:{tripDate:n.tomorrow(),departingTerminalId:1,arrivingTerminalId:10,roundTrip:false},cacheStrategy:"STATIC"};var qi=zod.z.object({FareLineItemID:zod.z.number().int().positive().describe("Unique identifier for a line item."),FareLineItem:zod.z.string().nullable().describe('A description of the fare (eg. "Adult (age 19 - 64)").'),Category:zod.z.string().nullable().describe('A logical grouping that the fare belongs to (eg. "Passenger").'),DirectionIndependent:zod.z.boolean().describe("A flag that, when true, indicates that the fare Amount is not influenced by the departing terminal of use. When false, the Amount might change depending on the departing terminal."),Amount:zod.z.number().describe("The cost of the fare in dollars.")});var ki=zod.z.object({TerminalComboIndex:zod.z.number().int().nonnegative().describe("An array index from TerminalComboVerbose."),LineItemIndex:zod.z.number().int().nonnegative().describe("An array index from LineItems."),RoundTripLineItemIndex:zod.z.number().int().nonnegative().describe("An array index from RoundTripLineItems.")});var Oi=zod.z.object({FareLineItemID:zod.z.number().int().positive().describe("Unique identifier for a line item."),FareLineItem:zod.z.string().nullable().describe('A description of the fare (eg. "Adult (age 19 - 64)").'),Category:zod.z.string().nullable().describe('A logical grouping that the fare belongs to (eg. "Passenger").'),DirectionIndependent:zod.z.boolean().describe("A flag that, when true, indicates that the fare Amount is not influenced by the departing terminal of use. When false, the Amount might change depending on the departing terminal."),Amount:zod.z.number().describe("The cost of the fare in dollars.")});var Ye=zod.z.object({DepartingTerminalID:zod.z.number().int().positive().describe("Unique identifier for the departing terminal."),DepartingDescription:zod.z.string().nullable().describe("The name of the departing terminal."),ArrivingTerminalID:zod.z.number().int().positive().describe("Unique identifier for the arriving terminal."),ArrivingDescription:zod.z.string().nullable().describe("The name of the arriving terminal."),CollectionDescription:zod.z.string().nullable().describe("Text describing what fares are collected at the departing terminal (vehicle/driver, passenger, etc).")});var Ji=zod.z.object({TerminalComboVerbose:zod.z.array(Ye).describe("All valid terminal combinations associated with the trip date."),LineItemLookup:zod.z.array(ki).describe("Associates a terminal combination with a one-way fare and a round trip fare for the given trip date."),LineItems:zod.z.array(zod.z.array(qi)).describe("All one-way fare line items associated with the trip date. Each terminal combination has its own array of fare items."),RoundTripLineItems:zod.z.array(zod.z.array(Oi)).describe("All round trip line items associated with the trip date. Each terminal combination has its own array of fare items.")});var ol=zod.z.object({tripDate:zod.z.date()}),$i={id:"wsf-fares/fareLineItemsVerbose",endpoint:"/ferries/api/fares/rest/farelineitemsverbose/{tripDate}",inputSchema:ol,outputSchema:Ji,sampleParams:{tripDate:n.tomorrow()},cacheStrategy:"STATIC"};var rr=zod.z.object({TerminalID:zod.z.number().int().positive().describe("Unique identifier for a terminal."),Description:zod.z.string().nullable().describe("The name of the terminal.")});zod.z.array(rr).describe("Array of valid departing terminals for a given trip date.");var sl=zod.z.object({tripDate:zod.z.date()}),Ki={id:"wsf-fares/faresTerminals",endpoint:"/ferries/api/fares/rest/terminals/{tripDate}",inputSchema:sl,outputSchema:zod.z.array(rr),sampleParams:{tripDate:n.tomorrow()},cacheStrategy:"STATIC"};var et=zod.z.object({DateFrom:r().describe("Information is available from this date onward."),DateThru:r().describe("Information is not available after this date.")});var pl=zod.z.object({}).strict(),Qi={id:"wsf-fares/faresValidDateRange",endpoint:"/ferries/api/fares/rest/validdaterange",inputSchema:pl,outputSchema:et,sampleParams:{},cacheStrategy:"STATIC"};var cl=zod.z.object({TotalType:zod.z.union([zod.z.literal(1),zod.z.literal(2),zod.z.literal(3),zod.z.literal(4)]).describe("Indicates a logical grouping for the total. 1 for Departing, 2 for Return, 3 for Either (direction independent) and 4 for Total."),Description:zod.z.string().nullable().describe("A description of the amount."),BriefDescription:zod.z.string().nullable().describe("A string representation of the FareTotalType."),Amount:zod.z.number().describe("A total of the fares in dollars.")}),_i=zod.z.array(cl).describe("Array of fare totals for a set of fares and associated quantities for either a round trip or one-way journey.");var dl=zod.z.object({tripDate:zod.z.date(),departingTerminalId:zod.z.number().int().positive(),arrivingTerminalId:zod.z.number().int().positive(),roundTrip:zod.z.boolean(),fareLineItemId:zod.z.number().int().positive(),quantity:zod.z.number().int().positive()}),Zi={id:"wsf-fares/fareTotals",endpoint:"/ferries/api/fares/rest/faretotals/{tripDate}/{departingTerminalId}/{arrivingTerminalId}/{roundTrip}/{fareLineItemId}/{quantity}",inputSchema:dl,outputSchema:_i,sampleParams:{tripDate:n.tomorrow(),departingTerminalId:1,arrivingTerminalId:10,roundTrip:false,fareLineItemId:1,quantity:2},cacheStrategy:"STATIC"};var Yi=zod.z.object({DepartingDescription:zod.z.string().nullable().describe("The name of the departing terminal."),ArrivingDescription:zod.z.string().nullable().describe("The name of the arriving terminal."),CollectionDescription:zod.z.string().nullable().describe("Text describing what fares are collected at the departing terminal (vehicle/driver, passenger, etc).")});var ul=zod.z.object({tripDate:zod.z.date(),departingTerminalId:zod.z.number().int().positive(),arrivingTerminalId:zod.z.number().int().positive()}),Xi={id:"wsf-fares/terminalCombo",endpoint:"/ferries/api/fares/rest/terminalcombo/{tripDate}/{departingTerminalId}/{arrivingTerminalId}",inputSchema:ul,outputSchema:Yi,sampleParams:{tripDate:n.tomorrow(),departingTerminalId:1,arrivingTerminalId:10},cacheStrategy:"STATIC"};var hl=zod.z.object({tripDate:zod.z.date()}),en={id:"wsf-fares/terminalComboVerbose",endpoint:"/ferries/api/fares/rest/terminalcomboverbose/{tripDate}",inputSchema:hl,outputSchema:zod.z.array(Ye),sampleParams:{tripDate:n.tomorrow()},cacheStrategy:"STATIC"};var ar=zod.z.object({TerminalID:zod.z.number().int().positive().describe("Unique identifier for a terminal."),Description:zod.z.string().nullable().describe("The name of the terminal.")});zod.z.array(ar).describe("Array of arriving terminals for a given departing terminal and trip date.");var fl=zod.z.object({tripDate:zod.z.date(),terminalId:zod.z.number().int().positive()}),tn={id:"wsf-fares/terminalMates",endpoint:"/ferries/api/fares/rest/terminalmates/{tripDate}/{terminalId}",inputSchema:fl,outputSchema:zod.z.array(ar),sampleParams:{tripDate:n.tomorrow(),terminalId:1},cacheStrategy:"STATIC"};var bl=e(Hi),yl=e(Ui),gl=e(Ni),Sl=e($i),Tl=e(Zi),Il=e(Ki),vl=e(Qi),Dl=e(Xi),xl=e(en),Al=e(tn);var Sr={};b(Sr,{activeSeasons:()=>dm,allSailings:()=>um,getScheduleCacheFlushDate:()=>hm,routeDetails:()=>fm,routeDetailsByRoute:()=>bm,routeDetailsByTerminals:()=>ym,routes:()=>gm,routesByTerminals:()=>Sm,routesHavingServiceDisruptions:()=>Tm,routesWithDisruptions:()=>Im,sailings:()=>vm,scheduleAlerts:()=>Dm,scheduleByRoute:()=>xm,scheduleByTerminals:()=>Am,scheduleTodayByRoute:()=>wm,scheduleTodayByTerminals:()=>Rm,scheduleValidDateRange:()=>Bm,scheduledRoutes:()=>Cm,scheduledRoutesBySeason:()=>zm,terminalMates:()=>Em,terminals:()=>Mm,terminalsAndMates:()=>Vm,terminalsAndMatesByRoute:()=>Fm,timeAdjustments:()=>Lm,timeAdjustmentsByRoute:()=>Wm});var wl=zod.z.object({ScheduleID:zod.z.number().int().describe("Unique identifier for a season."),ScheduleName:zod.z.string().nullable().describe("The name of the season."),ScheduleSeason:zod.z.union([zod.z.literal(0),zod.z.literal(1),zod.z.literal(2),zod.z.literal(3)]).describe("Indicates the season name (0 = Spring, 1 = Summer, 2 = Fall, 3 = Winter)."),SchedulePDFUrl:zod.z.string().nullable().describe("A URL to the season in PDF format."),ScheduleStart:r().describe("A trip date that represents the start of the season. If the consumer needs specifics about time, they can translate this trip date value to 3:00am. For example, if a ScheduleStart of 2014-06-15 is returned, this would indicate the season starts precisely on 2014-06-15 at 3:00am."),ScheduleEnd:r().describe("A trip date that represents the end of the season. If the consumer needs specifics about time, they can translate this trip date value to the next calendar date at 2:59am. For example, if a ScheduleEnd of 2014-09-20 is returned, this would indicate the season ends precisely on 2014-09-21 at 2:59am.")}),rn=zod.z.array(wl).describe("A summary of active seasons.");var Bl=zod.z.object({}).strict(),nn={id:"wsf-schedule/activeSeasons",endpoint:"/ferries/api/schedule/rest/activeseasons",inputSchema:Bl,outputSchema:rn,sampleParams:{},cacheStrategy:"STATIC"};var Re=zod.z.object({DateFrom:r().describe("A trip date that represents the start of the active sailin