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 • 13 kB
Source Map (JSON)
{"version":3,"sources":["../src/apis/wsdot-toll-rates/tollRates/tollRates.ts","../src/apis/wsdot-toll-rates/tollTripInfo/tollTripInfo.ts","../src/apis/wsdot-toll-rates/tollTripRates/tollTripRates.ts","../src/apis/wsdot-toll-rates/tollTripRates/tripRatesByDate.ts","../src/apis/wsdot-toll-rates/tollTripRates/tripRatesByVersion.ts","../src/apis/wsdot-toll-rates/tollTripVersion/tollTripVersion.ts"],"names":["tollRatesMeta","tollRatesInputSchema","tollRateSchema","fetchTollRates","createFetchFunction","wsdotTollRatesApi","tollRatesGroup","useTollRates","createHook","tollTripInfoMeta","tollTripInfoInputSchema","tollTripInfoSchema","fetchTollTripInfo","tollTripInfoGroup","useTollTripInfo","tollTripRatesMeta","tollTripRatesInputSchema","tollTripsRatesSchema","fetchTollTripRates","tollTripRatesGroup","useTollTripRates","tripRatesByDateMeta","tripRatesByDateInputSchema","datesHelper","fetchTripRatesByDate","useTripRatesByDate","tripRatesByVersionMeta","tripRatesByVersionInputSchema","fetchTripRatesByVersion","useTripRatesByVersion","tollTripVersionMeta","tollTripVersionInputSchema","tollTripVersionSchema","fetchTollTripVersion","tollTripVersionGroup","useTollTripVersion"],"mappings":"2KAqBO,IAAMA,EAAgB,CAC3B,YAAA,CAAc,iBACd,QAAA,CAAU,qBAAA,CACV,YAAaC,CAAAA,CACb,YAAA,CAAcC,EAAe,KAAA,EAAM,CACnC,aAAc,EAAC,CACf,oBACE,2DACJ,CAAA,CAKaC,EAEcC,EAAAA,CACzBC,CAAAA,CACAC,EACAN,CACF,CAAA,CAKaO,EAG4BC,EAAAA,CACvCH,CAAAA,CACAC,EACAN,CACF,MC5BaS,CAAAA,CAAmB,CAC9B,aAAc,mBAAA,CACd,QAAA,CAAU,yBACV,WAAA,CAAaC,CAAAA,CACb,aAAcC,GAAAA,CAAmB,KAAA,GACjC,Y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EAAC,CACf,oBAAqB,uDACvB,CAAA,CAKaC,GAEmB7B,EAAAA,CAC9BC,CAAAA,CACA6B,EACAJ,CACF,CAAA,CAKaK,GAGiC3B,EAAAA,CAC5CH,CAAAA,CACA6B,EACAJ,CACF","file":"chunk-W6QURYEY.mjs","sourcesContent":["import type { UseQueryResult } from \"@tanstack/react-query\";\nimport { wsdotTollRatesApi } from \"../api\";\nimport type {\n EndpointMeta,\n FetchFunctionParams,\n QueryHookOptions,\n} from \"@/apis/types\";\nimport {\n createFetchFunction,\n createHook,\n} from \"@/shared/factories\";\nimport { tollRatesGroup } from \"./shared/tollRates.endpoints\";\nimport {\n type TollRatesInput,\n tollRatesInputSchema,\n} from \"./shared/tollRates.input\";\nimport { type TollRate, tollRateSchema } from \"./shared/tollRates.output\";\n\n/**\n * Metadata for the fetchTollRates endpoint\n */\nexport const tollRatesMeta = {\n functionName: \"fetchTollRates\",\n endpoint: \"/getTollRatesAsJson\",\n inputSchema: tollRatesInputSchema,\n outputSchema: tollRateSchema.array(),\n sampleParams: {},\n endpointDescription:\n \"List current toll rates for all HOV toll lanes statewide.\",\n} satisfies EndpointMeta<TollRatesInput, TollRate[]>;\n\n/**\n * Fetch function for retrieving current toll rates for all HOV toll lanes statewide\n */\nexport const fetchTollRates: (\n params?: FetchFunctionParams<TollRatesInput>\n) => Promise<TollRate[]> = createFetchFunction(\n wsdotTollRatesApi,\n tollRatesGroup,\n tollRatesMeta\n);\n\n/**\n * React Query hook for retrieving current toll rates for all HOV toll lanes statewide\n */\nexport const useTollRates: (\n params?: FetchFunctionParams<TollRatesInput>,\n options?: QueryHookOptions<TollRate[]>\n) => UseQueryResult<TollRate[], Error> = createHook(\n wsdotTollRatesApi,\n tollRatesGroup,\n tollRatesMeta\n);\n","import type { UseQueryResult } from \"@tanstack/react-query\";\nimport { wsdotTollRatesApi } from \"../api\";\nimport type {\n EndpointMeta,\n FetchFunctionParams,\n QueryHookOptions,\n} from \"@/apis/types\";\nimport {\n createFetchFunction,\n createHook,\n} from \"@/shared/factories\";\nimport { tollTripInfoGroup } from \"./shared/tollTripInfo.endpoints\";\nimport {\n type TollTripInfoInput,\n tollTripInfoInputSchema,\n} from \"./shared/tollTripInfo.input\";\nimport {\n type TollTripInfo,\n tollTripInfoSchema,\n} from \"./shared/tollTripInfo.output\";\n\n/**\n * Metadata for the fetchTollTripInfo endpoint\n */\nexport const tollTripInfoMeta = {\n functionName: \"fetchTollTripInfo\",\n endpoint: \"/getTollTripInfoAsJson\",\n inputSchema: tollTripInfoInputSchema,\n outputSchema: tollTripInfoSchema.array(),\n sampleParams: {},\n endpointDescription: \"List trip information for all toll trips statewide.\",\n} satisfies EndpointMeta<TollTripInfoInput, TollTripInfo[]>;\n\n/**\n * Fetch function for retrieving trip information for all toll trips statewide\n */\nexport const fetchTollTripInfo: (\n params?: FetchFunctionParams<TollTripInfoInput>\n) => Promise<TollTripInfo[]> = createFetchFunction(\n wsdotTollRatesApi,\n tollTripInfoGroup,\n tollTripInfoMeta\n);\n\n/**\n * React Query hook for retrieving trip information for all toll trips statewide\n */\nexport const useTollTripInfo: (\n params?: FetchFunctionParams<TollTripInfoInput>,\n options?: QueryHookOptions<TollTripInfo[]>\n) => UseQueryResult<TollTripInfo[], Error> = createHook(\n wsdotTollRatesApi,\n tollTripInfoGroup,\n tollTripInfoMeta\n);\n","import type { UseQueryResult } from \"@tanstack/react-query\";\nimport { wsdotTollRatesApi } from \"../api\";\nimport type {\n EndpointMeta,\n FetchFunctionParams,\n QueryHookOptions,\n} from \"@/apis/types\";\nimport {\n createFetchFunction,\n createHook,\n} from \"@/shared/factories\";\nimport { tollTripRatesGroup } from \"./shared/tollTripRates.endpoints\";\nimport {\n type TollTripRatesInput,\n tollTripRatesInputSchema,\n} from \"./shared/tollTripRates.input\";\nimport {\n type TollTripsRates,\n tollTripsRatesSchema,\n} from \"./shared/tollTripRates.output\";\n\n/**\n * Metadata for the fetchTollTripRates endpoint\n */\nexport const tollTripRatesMeta = {\n functionName: \"fetchTollTripRates\",\n endpoint: \"/getTollTripRatesAsJson\",\n inputSchema: tollTripRatesInputSchema,\n outputSchema: tollTripsRatesSchema,\n sampleParams: {},\n endpointDescription: \"Get current toll rates for all trips.\",\n} satisfies EndpointMeta<TollTripRatesInput, TollTripsRates>;\n\n/**\n * Fetch function for retrieving current toll rates for all trips\n */\nexport const fetchTollTripRates: (\n params?: FetchFunctionParams<TollTripRatesInput>\n) => Promise<TollTripsRates> = createFetchFunction(\n wsdotTollRatesApi,\n tollTripRatesGroup,\n tollTripRatesMeta\n);\n\n/**\n * React Query hook for retrieving current toll rates for all trips\n */\nexport const useTollTripRates: (\n params?: FetchFunctionParams<TollTripRatesInput>,\n options?: QueryHookOptions<TollTripsRates>\n) => UseQueryResult<TollTripsRates, Error> = createHook(\n wsdotTollRatesApi,\n tollTripRatesGroup,\n tollTripRatesMeta\n);\n","import type { UseQueryResult } from \"@tanstack/react-query\";\nimport { wsdotTollRatesApi } from \"../api\";\nimport type {\n EndpointMeta,\n FetchFunctionParams,\n QueryHookOptions,\n} from \"@/apis/types\";\nimport {\n createFetchFunction,\n createHook,\n} from \"@/shared/factories\";\nimport { datesHelper } from \"@/shared/utils\";\nimport { tollTripRatesGroup } from \"./shared/tollTripRates.endpoints\";\nimport {\n type TripRatesByDateInput,\n tripRatesByDateInputSchema,\n} from \"./shared/tollTripRates.input\";\nimport {\n type TollTripsRates,\n tollTripsRatesSchema,\n} from \"./shared/tollTripRates.output\";\n\n/**\n * Metadata for the fetchTripRatesByDate endpoint\n */\nexport const tripRatesByDateMeta = {\n functionName: \"fetchTripRatesByDate\",\n endpoint: \"/getTripRatesByDateAsJson?FromDate={FromDate}&ToDate={ToDate}\",\n inputSchema: tripRatesByDateInputSchema,\n outputSchema: tollTripsRatesSchema.array(),\n sampleParams: {\n FromDate: datesHelper.yesterday(),\n ToDate: datesHelper.today(),\n },\n endpointDescription: \"Get historical toll rates for a specified date range.\",\n} satisfies EndpointMeta<TripRatesByDateInput, TollTripsRates[]>;\n\n/**\n * Fetch function for retrieving historical toll rates for a specified date range\n */\nexport const fetchTripRatesByDate: (\n params?: FetchFunctionParams<TripRatesByDateInput>\n) => Promise<TollTripsRates[]> = createFetchFunction(\n wsdotTollRatesApi,\n tollTripRatesGroup,\n tripRatesByDateMeta\n);\n\n/**\n * React Query hook for retrieving historical toll rates for a specified date range\n */\nexport const useTripRatesByDate: (\n params?: FetchFunctionParams<TripRatesByDateInput>,\n options?: QueryHookOptions<TollTripsRates[]>\n) => UseQueryResult<TollTripsRates[], Error> = createHook(\n wsdotTollRatesApi,\n tollTripRatesGroup,\n tripRatesByDateMeta\n);\n","import type { UseQueryResult } from \"@tanstack/react-query\";\nimport { wsdotTollRatesApi } from \"../api\";\nimport type {\n EndpointMeta,\n FetchFunctionParams,\n QueryHookOptions,\n} from \"@/apis/types\";\nimport {\n createFetchFunction,\n createHook,\n} from \"@/shared/factories\";\nimport { tollTripRatesGroup } from \"./shared/tollTripRates.endpoints\";\nimport {\n type TripRatesByVersionInput,\n tripRatesByVersionInputSchema,\n} from \"./shared/tollTripRates.input\";\nimport {\n type TollTripsRates,\n tollTripsRatesSchema,\n} from \"./shared/tollTripRates.output\";\n\n/**\n * Metadata for the fetchTripRatesByVersion endpoint\n */\nexport const tripRatesByVersionMeta = {\n functionName: \"fetchTripRatesByVersion\",\n endpoint: \"/getTripRatesByVersionAsJson?Version={Version}\",\n inputSchema: tripRatesByVersionInputSchema,\n outputSchema: tollTripsRatesSchema,\n sampleParams: { Version: 352417 },\n endpointDescription: \"Get toll rates for a specific version number.\",\n} satisfies EndpointMeta<TripRatesByVersionInput, TollTripsRates>;\n\n/**\n * Fetch function for retrieving toll rates for a specific version number\n */\nexport const fetchTripRatesByVersion: (\n params?: FetchFunctionParams<TripRatesByVersionInput>\n) => Promise<TollTripsRates> = createFetchFunction(\n wsdotTollRatesApi,\n tollTripRatesGroup,\n tripRatesByVersionMeta\n);\n\n/**\n * React Query hook for retrieving toll rates for a specific version number\n */\nexport const useTripRatesByVersion: (\n params?: FetchFunctionParams<TripRatesByVersionInput>,\n options?: QueryHookOptions<TollTripsRates>\n) => UseQueryResult<TollTripsRates, Error> = createHook(\n wsdotTollRatesApi,\n tollTripRatesGroup,\n tripRatesByVersionMeta\n);\n","import type { UseQueryResult } from \"@tanstack/react-query\";\nimport { wsdotTollRatesApi } from \"../api\";\nimport type {\n EndpointMeta,\n FetchFunctionParams,\n QueryHookOptions,\n} from \"@/apis/types\";\nimport {\n createFetchFunction,\n createHook,\n} from \"@/shared/factories\";\nimport { tollTripVersionGroup } from \"./shared/tollTripVersion.endpoints\";\nimport {\n type TollTripVersionInput,\n tollTripVersionInputSchema,\n} from \"./shared/tollTripVersion.input\";\nimport {\n type TollTripVersion,\n tollTripVersionSchema,\n} from \"./shared/tollTripVersion.output\";\n\n/**\n * Metadata for the fetchTollTripVersion endpoint\n */\nexport const tollTripVersionMeta = {\n functionName: \"fetchTollTripVersion\",\n endpoint: \"/getTollTripVersionAsJson\",\n inputSchema: tollTripVersionInputSchema,\n outputSchema: tollTripVersionSchema,\n sampleParams: {},\n endpointDescription: \"Get current version and timestamp for toll trip data.\",\n} satisfies EndpointMeta<TollTripVersionInput, TollTripVersion>;\n\n/**\n * Fetch function for retrieving current version and timestamp for toll trip data\n */\nexport const fetchTollTripVersion: (\n params?: FetchFunctionParams<TollTripVersionInput>\n) => Promise<TollTripVersion> = createFetchFunction(\n wsdotTollRatesApi,\n tollTripVersionGroup,\n tollTripVersionMeta\n);\n\n/**\n * React Query hook for retrieving current version and timestamp for toll trip data\n */\nexport const useTollTripVersion: (\n params?: FetchFunctionParams<TollTripVersionInput>,\n options?: QueryHookOptions<TollTripVersion>\n) => UseQueryResult<TollTripVersion, Error> = createHook(\n wsdotTollRatesApi,\n tollTripVersionGroup,\n tollTripVersionMeta\n);\n\n"]}