UNPKG

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 1.9 kB
{"version":3,"sources":["../src/apis/wsf-schedule/cacheFlushDate/cacheFlushDateSchedule.ts"],"names":["fetchCacheFlushDateSchedule","createFetchFunction","wsfScheduleApi","cacheFlushDateScheduleGroup","cacheFlushDateScheduleMeta","useCacheFlushDateSchedule","createHook"],"mappings":"gDAmBO,IAAMA,CAAAA,CAEwBC,EAAAA,CACnCC,EAAAA,CACAC,CAAAA,CACAC,CACF,EAKaC,CAAAA,CAGsCC,EAAAA,CACjDJ,EAAAA,CACAC,CAAAA,CACAC,CACF","file":"chunk-KDMDPREW.mjs","sourcesContent":["import type { UseQueryResult } from \"@tanstack/react-query\";\nimport { wsfScheduleApi } from \"../api\";\nimport type {\n CacheFlushDateInput,\n CacheFlushDateOutput,\n} from \"@/apis/shared/cacheFlushDate\";\nimport type { FetchFunctionParams, QueryHookOptions } from \"@/apis/types\";\nimport {\n createFetchFunction,\n createHook,\n} from \"@/shared/factories\";\nimport {\n cacheFlushDateScheduleGroup,\n cacheFlushDateScheduleMeta,\n} from \"./shared/cacheFlushDate.endpoints\";\n\n/**\n * Fetch function for retrieving timestamp of when static wsf-schedule data was last updated\n */\nexport const fetchCacheFlushDateSchedule: (\n params?: FetchFunctionParams<CacheFlushDateInput>\n) => Promise<CacheFlushDateOutput> = createFetchFunction(\n wsfScheduleApi,\n cacheFlushDateScheduleGroup,\n cacheFlushDateScheduleMeta\n);\n\n/**\n * React Query hook for retrieving timestamp of when static wsf-schedule data was last updated\n */\nexport const useCacheFlushDateSchedule: (\n params?: FetchFunctionParams<CacheFlushDateInput>,\n options?: QueryHookOptions<CacheFlushDateOutput>\n) => UseQueryResult<CacheFlushDateOutput, Error> = createHook(\n wsfScheduleApi,\n cacheFlushDateScheduleGroup,\n cacheFlushDateScheduleMeta\n);\n\n// Re-export with API-specific names for backward compatibility\nexport type CacheFlushDateScheduleInput = CacheFlushDateInput;\nexport type CacheFlushDateSchedules = CacheFlushDateOutput;\n"]}