ws-dottie
Version:
Your friendly TypeScript companion for Washington State transportation APIs - WSDOT and WSF data with smart caching and React Query integration
1 lines • 20.7 kB
Source Map (JSON)
{"version":3,"sources":["../src/apis/wsdot-highway-alerts/apiMeta.ts","../src/apis/wsdot-highway-alerts/alertAreas/shared/alertAreas.endpoints.ts","../src/apis/wsdot-highway-alerts/alertAreas/mapAreas.ts","../src/apis/wsdot-highway-alerts/eventCategories/shared/eventCategories.endpoints.ts","../src/apis/wsdot-highway-alerts/eventCategories/eventCategories.ts","../src/apis/wsdot-highway-alerts/highwayAlerts/alerts.ts","../src/apis/wsdot-highway-alerts/highwayAlerts/alertsByMapArea.ts","../src/apis/wsdot-highway-alerts/highwayAlerts/alertsByRegionId.ts","../src/apis/wsdot-highway-alerts/highwayAlerts/searchAlerts.ts","../src/apis/wsdot-highway-alerts/highwayAlerts/shared/highwayAlerts.endpoints.ts","../src/apis/wsdot-highway-alerts/highwayAlerts/alertById.ts"],"names":["wsdotHighwayAlertsApiMeta","init_apiMeta","__esmMin","alertAreas_endpoints_exports","__export","alertAreasGroup","init_alertAreas_endpoints","init_mapAreas","mapAreasMeta","mapAreasFactory","fetchMapAreas","useMapAreas","init_factories","init_alertAreas_input","init_alertAreas_output","mapAreasInputSchema","areaSchema","createFetchAndHook","i","eventCategories_endpoints_exports","eventCategoriesGroup","init_eventCategories_endpoints","init_eventCategories","eventCategoriesMeta","eventCategoriesFactory","fetchEventCategories","useEventCategories","init_zod","init_eventCategories_input","eventCategoriesInputSchema","z","alertsMeta","alertsFactory","fetchAlerts","useAlerts","init_alerts","init_highwayAlerts_input","init_highwayAlerts_output","alertsInputSchema","alertSchema","alertsByMapAreaMeta","alertsByMapAreaFactory","fetchAlertsByMapArea","useAlertsByMapArea","init_alertsByMapArea","alertsByMapAreaInputSchema","alertsByRegionIdMeta","alertsByRegionIdFactory","fetchAlertsByRegionId","useAlertsByRegionId","init_alertsByRegionId","alertsByRegionIDInputSchema","searchAlertsMeta","searchAlertsFactory","searchAlerts","useSearchAlerts","init_searchAlerts","init_utils","searchAlertsInputSchema","datesHelper","highwayAlerts_endpoints_exports","highwayAlertsGroup","init_highwayAlerts_endpoints","init_alertById","alertByIdMeta","alertByIdFactory","fetchAlertById","useAlertById","alertByIdInputSchema"],"mappings":"yWAAA,IAKaA,CAAAA,CALbC,CAAAA,CAAAC,CAAAA,CAAA,IAAA,CAKaF,CAAAA,CAAqC,CAChD,IAAA,CAAM,sBAAA,CACN,OAAA,CACE,0EACJ,EAAA,CAAA,ECTA,IAAAG,CAAAA,CAAA,EAAA,CAAAC,GAAAA,CAAAD,CAAAA,CAAA,CAAA,eAAA,CAAA,IAAAE,CAAAA,CAAAA,CAAAA,CAAA,IAMaA,CAAAA,CANbC,CAAAA,CAAAJ,CAAAA,CAAA,IAAA,CACAK,CAAAA,EAAAA,CAKaF,CAAAA,CAAqC,CAChD,IAAA,CAAM,YAAA,CACN,aAAA,CAAe,WACf,aAAA,CAAe,CACb,OAAA,CAAS,8DAAA,CACT,WAAA,CACE,6GAAA,CACF,QAAA,CAAU,CACR,+CAAA,CACA,4CAAA,CACA,yDACF,CAAA,CACA,eAAA,CAAiB,IACnB,CAAA,CACA,SAAA,CAAW,CAACG,CAAY,CAC1B,EAAA,CAAA,ECrBA,IAYaA,CAAAA,CAaPC,CAAAA,CAUgBC,EAAAA,CAAqBC,EAAAA,CAnC3CJ,CAAAA,CAAAL,CAAAA,CAAA,IAAA,CACAU,GAAAA,EAAAA,CACAX,CAAAA,EAAAA,CACAY,MAIAC,GAAAA,EAAAA,CAKaN,CAAAA,CAAe,CAC1B,YAAA,CAAc,eAAA,CACd,QAAA,CAAU,oBAAA,CACV,WAAA,CAAaO,GAAAA,CACb,YAAA,CAAcC,CAAAA,CAAW,KAAA,EAAM,CAC/B,YAAA,CAAc,EAAC,CACf,mBAAA,CACE,+DACJ,CAAA,CAKMP,CAAAA,CAAkBQ,CAAAA,CAA0C,CAChE,GAAA,CAAKjB,CAAAA,CACL,QAAA,CAAUQ,C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BC,EAAAA,CAlC5CJ,CAAAA,CAAA7D,CAAAA,CAAA,IAAA,CACAU,GAAAA,EAAAA,CACAX,CAAAA,EAAAA,CACAmC,CAAAA,EAAAA,CAIAC,CAAAA,EAAAA,CAKa2B,CAAAA,CAAgB,CAC3B,YAAA,CAAc,gBAAA,CACd,QAAA,CAAU,mCAAA,CACV,WAAA,CAAaI,CAAAA,CACb,YAAA,CAAc7B,CAAAA,CACd,YAAA,CAAc,CAAE,OAAA,CAAS,MAAO,CAAA,CAChC,mBAAA,CAAqB,oDACvB,CAAA,CAKM0B,EAAAA,CAAmBhD,CAAAA,CAA0C,CACjE,GAAA,CAAKjB,CAAAA,CACL,QAAA,CAAUgE,CAAAA,CACV,gBAAA,CAAkB,IAChB,CAAA,CAAA,EAAA,CAAA9C,GAAA,CAAA,CAAA,CAAA,EAA4C,kBAChD,CAAC,CAAA,CAKY,CAAE,KAAA,CAAOgD,EAAAA,CAAgB,IAAA,CAAMC,EAAAA,CAAAA,CAAiBF,GAAAA,CAAAA","file":"chunk-3IOICVDD.mjs","sourcesContent":["import type { ApiMeta } from \"@/apis/types\";\n\n/**\n * API metadata for WSDOT Highway Alerts API\n */\nexport const wsdotHighwayAlertsApiMeta: ApiMeta = {\n name: \"wsdot-highway-alerts\",\n baseUrl:\n \"https://www.wsdot.wa.gov/traffic/api/highwayalerts/highwayalertsrest.svc\",\n};\n","import type { EndpointGroupMeta } from \"@/apis/types\";\nimport { mapAreasMeta } from \"../mapAreas\";\n\n/**\n * Endpoint group metadata for alert areas endpoints\n */\nexport const alertAreasGroup: EndpointGroupMeta = {\n name: \"alertAreas\",\n cacheStrategy: \"FREQUENT\",\n documentation: {\n summary: \"Geographic map areas for filtering highway alerts by region.\",\n description:\n \"Area codes and names used to organize and filter highway alerts across Washington State geographic regions.\",\n useCases: [\n \"Filter highway alerts by geographic map area.\",\n \"Obtain valid area codes for alert queries.\",\n \"Display regional alert organization in user interfaces.\",\n ],\n updateFrequency: \"5m\",\n },\n endpoints: [mapAreasMeta],\n};\n","import type { EndpointMeta } from \"@/apis/types\";\nimport { createFetchAndHook } from \"@/shared/factories\";\nimport { wsdotHighwayAlertsApiMeta } from \"../apiMeta\";\nimport {\n type MapAreasInput,\n mapAreasInputSchema,\n} from \"./shared/alertAreas.input\";\nimport { type Area, areaSchema } from \"./shared/alertAreas.output\";\n\n/**\n * Metadata for the fetchMapAreas endpoint\n */\nexport const mapAreasMeta = {\n functionName: \"fetchMapAreas\",\n endpoint: \"/getMapAreasAsJson\",\n inputSchema: mapAreasInputSchema,\n outputSchema: areaSchema.array(),\n sampleParams: {},\n endpointDescription:\n \"List all available geographic map areas for filtering alerts.\",\n} satisfies EndpointMeta<MapAreasInput, Area[]>;\n\n/**\n * Factory result for map areas\n */\nconst mapAreasFactory = createFetchAndHook<MapAreasInput, Area[]>({\n api: wsdotHighwayAlertsApiMeta,\n endpoint: mapAreasMeta,\n getEndpointGroup: () =>\n require(\"./shared/alertAreas.endpoints\").alertAreasGroup,\n});\n\n/**\n * Fetch function and React Query hook for retrieving all available geographic map areas for filtering alerts\n */\nexport const { fetch: fetchMapAreas, hook: useMapAreas } = mapAreasFactory;\n","import type { EndpointGroupMeta } from \"@/apis/types\";\nimport { eventCategoriesMeta } from \"../eventCategories\";\n\n/**\n * Endpoint group metadata for event categories endpoints\n */\nexport const eventCategoriesGroup: EndpointGroupMeta = {\n name: \"event-categories\",\n cacheStrategy: \"FREQUENT\",\n documentation: {\n summary: \"Event category classifications for highway alerts.\",\n description:\n \"Standardized category names used to classify and filter highway alerts by incident type, such as construction, collisions, maintenance, and weather events.\",\n useCases: [\n \"Filter highway alerts by event category type.\",\n \"Obtain valid category names for alert searches.\",\n \"Categorize alerts in user interfaces by incident type.\",\n ],\n updateFrequency: \"5m\",\n },\n endpoints: [eventCategoriesMeta],\n};\n","import type { EndpointMeta } from \"@/apis/types\";\nimport { createFetchAndHook } from \"@/shared/factories\";\nimport { z } from \"@/shared/zod\";\nimport { wsdotHighwayAlertsApiMeta } from \"../apiMeta\";\nimport {\n type EventCategoriesInput,\n eventCategoriesInputSchema,\n} from \"./shared/eventCategories.input\";\n\n/**\n * Metadata for the fetchEventCategories endpoint\n */\nexport const eventCategoriesMeta = {\n functionName: \"fetchEventCategories\",\n endpoint: \"/getEventCategoriesAsJson\",\n inputSchema: eventCategoriesInputSchema,\n outputSchema: z.string().array(),\n sampleParams: {},\n endpointDescription:\n \"List all available event category names for filtering alerts.\",\n} satisfies EndpointMeta<EventCategoriesInput, string[]>;\n\n/**\n * Factory result for event categories\n */\nconst eventCategoriesFactory = createFetchAndHook<\n EventCategoriesInput,\n string[]\n>({\n api: wsdotHighwayAlertsApiMeta,\n endpoint: eventCategoriesMeta,\n getEndpointGroup: () =>\n require(\"./shared/eventCategories.endpoints\").eventCategoriesGroup,\n});\n\n/**\n * Fetch function and React Query hook for retrieving all available event category names for filtering alerts\n */\nexport const { fetch: fetchEventCategories, hook: useEventCategories } =\n eventCategoriesFactory;\n","import type { EndpointMeta } from \"@/apis/types\";\nimport { createFetchAndHook } from \"@/shared/factories\";\nimport { wsdotHighwayAlertsApiMeta } from \"../apiMeta\";\nimport {\n type AlertsInput,\n alertsInputSchema,\n} from \"./shared/highwayAlerts.input\";\nimport { type Alert, alertSchema } from \"./shared/highwayAlerts.output\";\n\n/**\n * Metadata for the fetchAlerts endpoint\n */\nexport const alertsMeta = {\n functionName: \"fetchAlerts\",\n endpoint: \"/getAlertsAsJson\",\n inputSchema: alertsInputSchema,\n outputSchema: alertSchema.array(),\n sampleParams: {},\n endpointDescription: \"List all current highway alerts statewide.\",\n} satisfies EndpointMeta<AlertsInput, Alert[]>;\n\n/**\n * Factory result for alerts\n */\nconst alertsFactory = createFetchAndHook<AlertsInput, Alert[]>({\n api: wsdotHighwayAlertsApiMeta,\n endpoint: alertsMeta,\n getEndpointGroup: () =>\n require(\"./shared/highwayAlerts.endpoints\").highwayAlertsGroup,\n});\n\n/**\n * Fetch function and React Query hook for retrieving all current highway alerts statewide\n */\nexport const { fetch: fetchAlerts, hook: useAlerts } = alertsFactory;\n","import type { EndpointMeta } from \"@/apis/types\";\nimport { createFetchAndHook } from \"@/shared/factories\";\nimport { wsdotHighwayAlertsApiMeta } from \"../apiMeta\";\nimport {\n type AlertsByMapAreaInput,\n alertsByMapAreaInputSchema,\n} from \"./shared/highwayAlerts.input\";\nimport { type Alert, alertSchema } from \"./shared/highwayAlerts.output\";\n\n/**\n * Metadata for the fetchAlertsByMapArea endpoint\n */\nexport const alertsByMapAreaMeta = {\n functionName: \"fetchAlertsByMapArea\",\n endpoint: \"/getAlertsByMapAreaAsJson?MapArea={MapArea}\",\n inputSchema: alertsByMapAreaInputSchema,\n outputSchema: alertSchema.array(),\n sampleParams: { MapArea: \"Seattle\" },\n endpointDescription: \"List highway alerts filtered by map area code.\",\n} satisfies EndpointMeta<AlertsByMapAreaInput, Alert[]>;\n\n/**\n * Factory result for alerts by map area\n */\nconst alertsByMapAreaFactory = createFetchAndHook<\n AlertsByMapAreaInput,\n Alert[]\n>({\n api: wsdotHighwayAlertsApiMeta,\n endpoint: alertsByMapAreaMeta,\n getEndpointGroup: () =>\n require(\"./shared/highwayAlerts.endpoints\").highwayAlertsGroup,\n});\n\n/**\n * Fetch function and React Query hook for retrieving highway alerts filtered by map area code\n */\nexport const { fetch: fetchAlertsByMapArea, hook: useAlertsByMapArea } =\n alertsByMapAreaFactory;\n","import type { EndpointMeta } from \"@/apis/types\";\nimport { createFetchAndHook } from \"@/shared/factories\";\nimport { wsdotHighwayAlertsApiMeta } from \"../apiMeta\";\nimport {\n type AlertsByRegionIDInput,\n alertsByRegionIDInputSchema,\n} from \"./shared/highwayAlerts.input\";\nimport { type Alert, alertSchema } from \"./shared/highwayAlerts.output\";\n\n/**\n * Metadata for the fetchAlertsByRegionId endpoint\n */\nexport const alertsByRegionIdMeta = {\n functionName: \"fetchAlertsByRegionId\",\n endpoint: \"/getAlertsByRegionIDAsJson?RegionID={RegionID}\",\n inputSchema: alertsByRegionIDInputSchema,\n outputSchema: alertSchema.array(),\n sampleParams: { RegionID: 4 },\n endpointDescription: \"List highway alerts filtered by WSDOT region ID.\",\n} satisfies EndpointMeta<AlertsByRegionIDInput, Alert[]>;\n\n/**\n * Factory result for alerts by region ID\n */\nconst alertsByRegionIdFactory = createFetchAndHook<\n AlertsByRegionIDInput,\n Alert[]\n>({\n api: wsdotHighwayAlertsApiMeta,\n endpoint: alertsByRegionIdMeta,\n getEndpointGroup: () =>\n require(\"./shared/highwayAlerts.endpoints\").highwayAlertsGroup,\n});\n\n/**\n * Fetch function and React Query hook for retrieving highway alerts filtered by WSDOT region ID\n */\nexport const { fetch: fetchAlertsByRegionId, hook: useAlertsByRegionId } =\n alertsByRegionIdFactory;\n","import type { EndpointMeta } from \"@/apis/types\";\nimport { createFetchAndHook } from \"@/shared/factories\";\nimport { datesHelper } from \"@/shared/utils\";\nimport { wsdotHighwayAlertsApiMeta } from \"../apiMeta\";\nimport {\n type SearchAlertsInput,\n searchAlertsInputSchema,\n} from \"./shared/highwayAlerts.input\";\nimport { type Alert, alertSchema } from \"./shared/highwayAlerts.output\";\n\n/**\n * Metadata for the searchAlerts endpoint\n */\nexport const searchAlertsMeta = {\n functionName: \"searchAlerts\",\n endpoint:\n \"/searchAlertsAsJson?StateRoute={StateRoute}&Region={Region}&SearchTimeStart={SearchTimeStart}&SearchTimeEnd={SearchTimeEnd}&StartingMilepost={StartingMilepost}&EndingMilepost={EndingMilepost}\",\n inputSchema: searchAlertsInputSchema,\n outputSchema: alertSchema.array(),\n sampleParams: {\n StateRoute: \"405\",\n StartingMilepost: 10,\n EndingMilepost: 20,\n SearchTimeStart: datesHelper.yesterday(),\n SearchTimeEnd: datesHelper.today(),\n },\n endpointDescription:\n \"Search highway alerts by route, region, time range, and milepost.\",\n} satisfies EndpointMeta<SearchAlertsInput, Alert[]>;\n\n/**\n * Factory result for search alerts\n */\nconst searchAlertsFactory = createFetchAndHook<SearchAlertsInput, Alert[]>({\n api: wsdotHighwayAlertsApiMeta,\n endpoint: searchAlertsMeta,\n getEndpointGroup: () =>\n require(\"./shared/highwayAlerts.endpoints\").highwayAlertsGroup,\n});\n\n/**\n * Fetch function and React Query hook for searching highway alerts by route, region, time range, and milepost\n */\nexport const { fetch: searchAlerts, hook: useSearchAlerts } =\n searchAlertsFactory;\n","import type { EndpointGroupMeta } from \"@/apis/types\";\nimport { alertByIdMeta } from \"../alertById\";\nimport { alertsMeta } from \"../alerts\";\nimport { alertsByMapAreaMeta } from \"../alertsByMapArea\";\nimport { alertsByRegionIdMeta } from \"../alertsByRegionId\";\nimport { searchAlertsMeta } from \"../searchAlerts\";\n\n/**\n * Endpoint group metadata for highway alerts endpoints\n */\nexport const highwayAlertsGroup: EndpointGroupMeta = {\n name: \"highwayAlerts\",\n // Using FREQUENT strategy because highway alerts can change every few minutes as incidents occur\n cacheStrategy: \"FREQUENT\",\n documentation: {\n summary:\n \"Real-time highway alerts for traffic incidents and road conditions.\",\n description:\n \"Traffic incidents, construction, maintenance, and other events affecting Washington State highways, including location details, impact levels, timestamps, and event classifications.\",\n useCases: [\n \"Monitor real-time traffic incidents and road conditions.\",\n \"Plan alternate routes based on current highway alerts.\",\n \"Display active alerts filtered by location, region, or category.\",\n \"Track alert status and estimated resolution times.\",\n ],\n updateFrequency: \"5m\",\n },\n endpoints: [\n alertsMeta,\n searchAlertsMeta,\n alertsByRegionIdMeta,\n alertsByMapAreaMeta,\n alertByIdMeta,\n ],\n};\n","import type { EndpointMeta } from \"@/apis/types\";\nimport { createFetchAndHook } from \"@/shared/factories\";\nimport { wsdotHighwayAlertsApiMeta } from \"../apiMeta\";\nimport {\n type AlertByIdInput,\n alertByIdInputSchema,\n} from \"./shared/highwayAlerts.input\";\nimport { type Alert, alertSchema } from \"./shared/highwayAlerts.output\";\n\n/**\n * Metadata for the fetchAlertById endpoint\n */\nexport const alertByIdMeta = {\n functionName: \"fetchAlertById\",\n endpoint: \"/getAlertAsJson?AlertID={AlertID}\",\n inputSchema: alertByIdInputSchema,\n outputSchema: alertSchema,\n sampleParams: { AlertID: 468632 },\n endpointDescription: \"Get highway alert details for a specific alert ID.\",\n} satisfies EndpointMeta<AlertByIdInput, Alert>;\n\n/**\n * Factory result for alert by ID\n */\nconst alertByIdFactory = createFetchAndHook<AlertByIdInput, Alert>({\n api: wsdotHighwayAlertsApiMeta,\n endpoint: alertByIdMeta,\n getEndpointGroup: () =>\n require(\"./shared/highwayAlerts.endpoints\").highwayAlertsGroup,\n});\n\n/**\n * Fetch function and React Query hook for retrieving highway alert details for a specific alert ID\n */\nexport const { fetch: fetchAlertById, hook: useAlertById } = alertByIdFactory;\n"]}