{"version":3,"sources":["../src/apis/wsdot-weather-stations/weatherStations/weatherStations.ts"],"names":["weatherStationsMeta","weatherStationsInputSchema","weatherStationSchema","fetchWeatherStations","createFetchFunction","wsdotWeatherStationsApi","weatherStationsGroup","useWeatherStations","createHook"],"mappings":"oFAwBO,IAAMA,CAAAA,CAAsB,CACjC,YAAA,CAAc,sBAAA,CACd,QAAA,CAAU,2BAAA,CACV,WAAA,CAAaC,CAAAA,CACb,YAAA,CAAcC,CAAAA,CAAqB,KAAA,EAAM,CACzC,YAAA,CAAc,EAAC,CACf,mBAAA,CACE,2DACJ,CAAA,CAKaC,CAAAA,CAEoBC,EAAAA,CAC/BC,CAAAA,CACAC,CAAAA,CACAN,CACF,CAAA,CAKaO,CAAAA,CAGkCC,EAAAA,CAC7CH,CAAAA,CACAC,CAAAA,CACAN,CACF","file":"chunk-DIVLTDCP.mjs","sourcesContent":["import type { UseQueryResult } from \"@tanstack/react-query\";\nimport { wsdotWeatherStationsApi } from \"../api\";\nimport type {\n  EndpointMeta,\n  FetchFunctionParams,\n  QueryHookOptions,\n} from \"@/apis/types\";\nimport {\n  createFetchFunction,\n  createHook,\n} from \"@/shared/factories\";\nimport { weatherStationsGroup } from \"./shared/weatherStations.endpoints\";\nimport {\n  type WeatherStationsInput,\n  weatherStationsInputSchema,\n} from \"./shared/weatherStations.input\";\nimport {\n  type WeatherStation,\n  weatherStationSchema,\n} from \"./shared/weatherStations.output\";\n\n/**\n * Metadata for the fetchWeatherStations endpoint\n */\nexport const weatherStationsMeta = {\n  functionName: \"fetchWeatherStations\",\n  endpoint: \"/GetCurrentStationsAsJson\",\n  inputSchema: weatherStationsInputSchema,\n  outputSchema: weatherStationSchema.array(),\n  sampleParams: {},\n  endpointDescription:\n    \"List weather station metadata for all stations statewide.\",\n} satisfies EndpointMeta<WeatherStationsInput, WeatherStation[]>;\n\n/**\n * Fetch function for retrieving weather station metadata for all stations statewide\n */\nexport const fetchWeatherStations: (\n  params?: FetchFunctionParams<WeatherStationsInput>\n) => Promise<WeatherStation[]> = createFetchFunction(\n  wsdotWeatherStationsApi,\n  weatherStationsGroup,\n  weatherStationsMeta\n);\n\n/**\n * React Query hook for retrieving weather station metadata for all stations statewide\n */\nexport const useWeatherStations: (\n  params?: FetchFunctionParams<WeatherStationsInput>,\n  options?: QueryHookOptions<WeatherStation[]>\n) => UseQueryResult<WeatherStation[], Error> = createHook(\n  wsdotWeatherStationsApi,\n  weatherStationsGroup,\n  weatherStationsMeta\n);\n"]}