UNPKG

ws-dottie

Version:

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

318 lines (313 loc) 13.7 kB
openapi: 3.0.0 info: title: Wsdot Mountain Pass Conditions API version: 1.0.0 description: Wsdot Mountain Pass Conditions API - Washington State Department of Transportation APIs servers: - url: https://www.wsdot.wa.gov/traffic/api/mountainpassconditions/mountainpassconditionsrest.svc description: Production server components: schemas: RoadwayLocation: type: object properties: Description: type: string nullable: true description: Human-readable description of the roadway location, such as interchange names or cross streets. Direction: type: string nullable: true description: 'Traffic direction designation: N, S, B, NB, or SB, indicating which side of the highway is affected.' Latitude: type: number description: Latitude of the roadway location in decimal degrees. Longitude: type: number description: Longitude of the roadway location in decimal degrees. MilePost: type: number description: Milepost marker along the highway corridor, with 0 indicating route terminus. RoadName: type: string nullable: true description: Highway or route designation code, such as '005' for I-5 or '090' for I-90. required: - Description - Direction - Latitude - Longitude - MilePost - RoadName description: Roadway location information including route, milepost, coordinates, and direction. FetchMountainPassConditionByIdOutput: type: object properties: MountainPassId: type: integer description: Numeric ID of the mountain pass. MountainPassName: type: string nullable: true description: Display name of the mountain pass. Latitude: type: number description: Latitude of the mountain pass in decimal degrees. Longitude: type: number description: Longitude of the mountain pass in decimal degrees. DateUpdated: type: string description: UTC datetime when the pass condition data was last updated. format: date-time TemperatureInFahrenheit: type: integer nullable: true description: Current temperature at the mountain pass in degrees Fahrenheit. ElevationInFeet: type: integer nullable: true description: Elevation of the mountain pass above sea level in feet. WeatherCondition: type: string nullable: true description: Current weather conditions at the mountain pass. RoadCondition: type: string nullable: true description: Current roadway surface conditions at the mountain pass. TravelAdvisoryActive: type: boolean description: True if a travel advisory is currently active for the pass; otherwise false. RestrictionOne: type: object nullable: true properties: RestrictionText: type: string nullable: true description: Text description of travel restrictions for this direction, such as 'No restrictions', 'Closed for the season', or chain requirements. TravelDirection: type: string nullable: true description: Direction of travel for which this restriction applies, such as 'Eastbound', 'Westbound', 'Northbound', or 'Southbound'. required: - RestrictionText - TravelDirection description: Travel restriction information for the primary direction of the pass. RestrictionTwo: type: object nullable: true properties: RestrictionText: type: string nullable: true description: Text description of travel restrictions for this direction, such as 'No restrictions', 'Closed for the season', or chain requirements. TravelDirection: type: string nullable: true description: Direction of travel for which this restriction applies, such as 'Eastbound', 'Westbound', 'Northbound', or 'Southbound'. required: - RestrictionText - TravelDirection description: Travel restriction information for the secondary direction of the pass. required: - MountainPassId - MountainPassName - Latitude - Longitude - DateUpdated - TemperatureInFahrenheit - ElevationInFeet - WeatherCondition - RoadCondition - TravelAdvisoryActive - RestrictionOne - RestrictionTwo description: Real-time mountain pass condition information including weather, road surface conditions, temperature, elevation, travel restrictions by direction, and advisory status. parameters: {} paths: /getMountainPassConditionsAsJson: get: summary: List current conditions for all monitored mountain passes. operationId: fetchMountainPassConditions tags: - pass-conditions x-codeSamples: - lang: JavaScript source: |- import { fetchMountainPassConditions } from 'ws-dottie/wsdot-mountain-pass-conditions/core'; const data = await fetchMountainPassConditions({ fetchMode: 'native', validate: true }); console.log(data); responses: '200': description: Success content: application/json: schema: type: array items: type: object properties: MountainPassId: type: integer description: Numeric ID of the mountain pass. MountainPassName: type: string nullable: true description: Display name of the mountain pass. Latitude: type: number description: Latitude of the mountain pass in decimal degrees. Longitude: type: number description: Longitude of the mountain pass in decimal degrees. DateUpdated: type: string description: UTC datetime when the pass condition data was last updated. format: date-time TemperatureInFahrenheit: type: integer nullable: true description: Current temperature at the mountain pass in degrees Fahrenheit. ElevationInFeet: type: integer nullable: true description: Elevation of the mountain pass above sea level in feet. WeatherCondition: type: string nullable: true description: Current weather conditions at the mountain pass. RoadCondition: type: string nullable: true description: Current roadway surface conditions at the mountain pass. TravelAdvisoryActive: type: boolean description: True if a travel advisory is currently active for the pass; otherwise false. RestrictionOne: type: object nullable: true properties: RestrictionText: type: string nullable: true description: Text description of travel restrictions for this direction, such as 'No restrictions', 'Closed for the season', or chain requirements. TravelDirection: type: string nullable: true description: Direction of travel for which this restriction applies, such as 'Eastbound', 'Westbound', 'Northbound', or 'Southbound'. required: - RestrictionText - TravelDirection description: Travel restriction information for the primary direction of the pass. RestrictionTwo: type: object nullable: true properties: RestrictionText: type: string nullable: true description: Text description of travel restrictions for this direction, such as 'No restrictions', 'Closed for the season', or chain requirements. TravelDirection: type: string nullable: true description: Direction of travel for which this restriction applies, such as 'Eastbound', 'Westbound', 'Northbound', or 'Southbound'. required: - RestrictionText - TravelDirection description: Travel restriction information for the secondary direction of the pass. required: - MountainPassId - MountainPassName - Latitude - Longitude - DateUpdated - TemperatureInFahrenheit - ElevationInFeet - WeatherCondition - RoadCondition - TravelAdvisoryActive - RestrictionOne - RestrictionTwo description: Real-time mountain pass condition information including weather, road surface conditions, temperature, elevation, travel restrictions by direction, and advisory status. examples: sampleResponse: summary: Sample response description: Example of a successful response from the API (showing first item of 16 total) value: - MountainPassId: 1 MountainPassName: Blewett Pass US 97 Latitude: 47.335298205 Longitude: -120.581068216 DateUpdated: '2025-11-15T14:49:36.827Z' TemperatureInFahrenheit: 43 ElevationInFeet: 4102 WeatherCondition: Partly cloudy. RoadCondition: Bare and wet. TravelAdvisoryActive: true RestrictionOne: RestrictionText: No restrictions TravelDirection: Northbound RestrictionTwo: RestrictionText: No restrictions TravelDirection: Southbound /getMountainPassConditionAsJon?PassConditionID={PassConditionID}: get: summary: Get current conditions for a specific mountain pass by ID. operationId: fetchMountainPassConditionById tags: - pass-conditions x-codeSamples: - lang: JavaScript source: |- import { fetchMountainPassConditionById } from 'ws-dottie/wsdot-mountain-pass-conditions/core'; const data = await fetchMountainPassConditionById({ params: { "PassConditionID": 12 }, fetchMode: 'native', validate: true }); console.log(data); responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/FetchMountainPassConditionByIdOutput' examples: sampleResponse: summary: Sample response description: Example of a successful response from the API value: MountainPassId: 12 MountainPassName: White Pass US 12 Latitude: 46.638333 Longitude: -121.39 DateUpdated: '2025-11-15T16:32:50.010Z' TemperatureInFahrenheit: 44 ElevationInFeet: 4500 WeatherCondition: Raining RoadCondition: Bare and wet TravelAdvisoryActive: true RestrictionOne: RestrictionText: No restrictions TravelDirection: Eastbound RestrictionTwo: RestrictionText: No restrictions TravelDirection: Westbound tags: - name: pass-conditions description: Real-time mountain pass conditions including weather, road status, and travel restrictions. x-description: Current conditions for 15 monitored mountain passes statewide, including temperature, elevation, weather, road surface conditions, and direction-specific travel restrictions. x-cacheStrategy: FREQUENT x-useCases: - Assess pass conditions for winter travel planning. - Monitor weather and road conditions for route decisions. - Check travel restrictions and advisories before mountain travel. x-updateFrequency: 15m