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.91 kB
{"version":3,"sources":["../src/apis/wsf-vessels/cacheFlushDate/cacheFlushDateVessels.ts"],"names":["fetchCacheFlushDateVessels","createFetchFunction","wsfVesselsApi","cacheFlushDateVesselsGroup","cacheFlushDateVesselsMeta","useCacheFlushDateVessels","createHook"],"mappings":"kDAcO,IAAMA,CAAAA,CAEwBC,EAAAA,CACnCC,EAAAA,CACAC,EAAAA,CACAC,EACF,EAKaC,CAAAA,CAGsCC,EAAAA,CACjDJ,EAAAA,CACAC,EAAAA,CACAC,EACF","file":"chunk-255LJ6UR.mjs","sourcesContent":["import type { UseQueryResult } from \"@tanstack/react-query\";\nimport type { FetchFunctionParams, QueryHookOptions } from \"@/apis/types\";\nimport { createFetchFunction, createHook } from \"@/shared/factories\";\nimport { wsfVesselsApi } from \"../api\";\nimport {\n cacheFlushDateVesselsGroup,\n cacheFlushDateVesselsMeta,\n} from \"./shared/cacheFlushDate.endpoints\";\nimport type { CacheFlushDateInput } from \"./shared/cacheFlushDate.input\";\nimport type { CacheFlushDateOutput } from \"./shared/cacheFlushDate.output\";\n\n/**\n * Fetch function for retrieving cache invalidation timestamp for static vessel data\n */\nexport const fetchCacheFlushDateVessels: (\n params?: FetchFunctionParams<CacheFlushDateInput>\n) => Promise<CacheFlushDateOutput> = createFetchFunction(\n wsfVesselsApi,\n cacheFlushDateVesselsGroup,\n cacheFlushDateVesselsMeta\n);\n\n/**\n * React Query hook for retrieving cache invalidation timestamp for static vessel data\n */\nexport const useCacheFlushDateVessels: (\n params?: FetchFunctionParams<CacheFlushDateInput>,\n options?: QueryHookOptions<CacheFlushDateOutput>\n) => UseQueryResult<CacheFlushDateOutput, Error> = createHook(\n wsfVesselsApi,\n cacheFlushDateVesselsGroup,\n cacheFlushDateVesselsMeta\n);\n\n// Re-export with API-specific names for backward compatibility\nexport type CacheFlushDateVesselsInput = CacheFlushDateInput;\nexport type CacheFlushDateVessels = CacheFlushDateOutput;\n"]}