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 • 9.87 kB
Source Map (JSON)
{"version":3,"sources":["../src/apis/wsdot-commercial-vehicle-restrictions/apiMeta.ts","../src/apis/wsdot-commercial-vehicle-restrictions/cvRestrictionData/shared/cvRestrictionData.endpoints.ts","../src/apis/wsdot-commercial-vehicle-restrictions/cvRestrictionData/commercialVehicleRestrictions.ts","../src/apis/wsdot-commercial-vehicle-restrictions/cvRestrictionDataWithId/shared/cvRestrictionDataWithId.endpoints.ts","../src/apis/wsdot-commercial-vehicle-restrictions/cvRestrictionDataWithId/commercialVehicleRestrictionsWithId.ts"],"names":["wsdotCommercialVehicleRestrictionsApiMeta","init_apiMeta","__esmMin","cvRestrictionData_endpoints_exports","__export","cvRestrictionDataGroup","init_cvRestrictionData_endpoints","init_commercialVehicleRestrictions","commercialVehicleRestrictionsMeta","fetch","useHook","fetchCommercialVehicleRestrictions","useCommercialVehicleRestrictions","init_factories","init_cvRestrictionData_input","init_cvRestrictionData_output","commercialVehicleRestrictionsInputSchema","cvRestrictionSchema","createFetchAndHook","n","cvRestrictionDataWithId_endpoints_exports","cvRestrictionDataWithIdGroup","init_cvRestrictionDataWithId_endpoints","init_commercialVehicleRestrictionsWithId","commercialVehicleRestrictionsWithIdMeta","fetchCommercialVehicleRestrictionsWithId","useCommercialVehicleRestrictionsWithId","init_cvRestrictionDataWithId_input","init_cvRestrictionDataWithId_output","commercialVehicleRestrictionsWithIdInputSchema","cvRestrictionWithIdSchema"],"mappings":"kMAAA,IAKaA,CAAAA,CALbC,EAAAC,CAAAA,CAAA,IAAA,CAKaF,EAAqD,CAChE,IAAA,CAAM,wCACN,OAAA,CACE,4EACJ,KCTA,IAAAG,CAAAA,CAAA,GAAAC,GAAAA,CAAAD,CAAAA,CAAA,4BAAAE,CAAAA,CAAAA,CAAAA,CAAA,IAMaA,EANbC,CAAAA,CAAAJ,CAAAA,CAAA,KACAK,CAAAA,EAA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A,SAAA,CAAW,CAACG,CAAuC,CACrD,EAAA,CAAA,ECtBA,IAmBaA,CAAAA,CAaLf,CAAAA,CAAOC,EAeFe,CAAAA,CAQAC,CAAAA,CAvDbH,EAAArB,CAAAA,CAAA,IAAA,CACAW,MAKAZ,CAAAA,EAAAA,CACA0B,GAAAA,EAAAA,CAIAC,IAQaJ,CAAAA,CAA0C,CACrD,aAAc,0CAAA,CACd,QAAA,CAAU,gDACV,WAAA,CAAaK,CAAAA,CACb,aAAcC,CAAAA,CAA0B,KAAA,EAAM,CAC9C,YAAA,CAAc,EAAC,CACf,oBACE,iGACJ,CAAA,CAKM,CAAE,KAAA,CAAArB,CAAAA,CAAO,QAAAC,CAAAA,CAAAA,CAAYQ,GAAAA,CAGzB,CACA,GAAA,CAAKlB,CAAAA,CACL,SAAUwB,CAAAA,CACV,gBAAA,CAAkB,IAEhB,CAAA,CAAA,EAAA,CAAAL,GAAA,CAAA,CAAA,CAAA,EACG,4BAAA,CAA6B,aACpC,CAAC,CAAA,CAKYM,CAAAA,CAGThB,CAAAA,CAKSiB,CAAAA,CAGThB,EAAAA,CAAAA","file":"chunk-QMDVX2UD.mjs","sourcesContent":["import type { ApiMeta } from \"@/apis/types\";\n\n/**\n * API metadata for WSDOT Commercial Vehicle Restrictions API\n */\nexport const wsdotCommercialVehicleRestrictionsApiMeta: ApiMeta = {\n name: \"wsdot-commercial-vehicle-restrictions\",\n baseUrl:\n \"https://www.wsdot.wa.gov/traffic/api/cvrestrictions/cvrestrictionsrest.svc\",\n};\n","import type { EndpointGroupMeta } from \"@/apis/types\";\nimport { commercialVehicleRestrictionsMeta } from \"../commercialVehicleRestrictions\";\n\n/**\n * Endpoint group metadata for commercial vehicle restriction data endpoints\n */\nexport const cvRestrictionDataGroup: EndpointGroupMeta = {\n name: \"cv-restriction-data\",\n cacheStrategy: \"STATIC\",\n documentation: {\n summary: \"Commercial vehicle restrictions for Washington State highways.\",\n description:\n \"Weight limits, height clearances, axle restrictions, and location details for bridge and road restrictions statewide.\",\n useCases: [\n \"Check vehicle restrictions for commercial route planning.\",\n \"Determine route feasibility and permit requirements.\",\n \"Identify weight and height limitations for trucking operations.\",\n ],\n updateFrequency: \"daily\",\n },\n endpoints: [commercialVehicleRestrictionsMeta],\n};\n","import type { EndpointMeta } from \"@/apis/types\";\nimport {\n createFetchAndHook,\n type FetchFactory,\n type HookFactory,\n} from \"@/shared/factories\";\nimport { wsdotCommercialVehicleRestrictionsApiMeta } from \"../apiMeta\";\nimport {\n type CommercialVehicleRestrictionsInput,\n commercialVehicleRestrictionsInputSchema,\n} from \"./shared/cvRestrictionData.input\";\nimport {\n type CVRestriction,\n cvRestrictionSchema,\n} from \"./shared/cvRestrictionData.output\";\n\n/**\n * Metadata for the fetchCommercialVehicleRestrictions endpoint\n */\nexport const commercialVehicleRestrictionsMeta = {\n functionName: \"fetchCommercialVehicleRestrictions\",\n endpoint: \"/getCommercialVehicleRestrictionsAsJson\",\n inputSchema: commercialVehicleRestrictionsInputSchema,\n outputSchema: cvRestrictionSchema.array(),\n sampleParams: {},\n endpointDescription:\n \"List commercial vehicle restrictions for all Washington State highways.\",\n} satisfies EndpointMeta<CommercialVehicleRestrictionsInput, CVRestriction[]>;\n\nconst { fetch, useHook } = createFetchAndHook<\n CommercialVehicleRestrictionsInput,\n CVRestriction[]\n>({\n api: wsdotCommercialVehicleRestrictionsApiMeta,\n endpoint: commercialVehicleRestrictionsMeta,\n getCacheStrategy: () =>\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n require(\"./shared/cvRestrictionData.endpoints\").cvRestrictionDataGroup\n .cacheStrategy,\n});\n\n/**\n * Fetch function for retrieving commercial vehicle restrictions for all Washington State highways\n */\nexport const fetchCommercialVehicleRestrictions: FetchFactory<\n CommercialVehicleRestrictionsInput,\n CVRestriction[]\n> = fetch;\n\n/**\n * React Query hook for retrieving commercial vehicle restrictions for all Washington State highways\n */\nexport const useCommercialVehicleRestrictions: HookFactory<\n CommercialVehicleRestrictionsInput,\n CVRestriction[]\n> = useHook;\n","import type { EndpointGroupMeta } from \"@/apis/types\";\nimport { commercialVehicleRestrictionsWithIdMeta } from \"../commercialVehicleRestrictionsWithId\";\n\n/**\n * Endpoint group metadata for commercial vehicle restriction data with ID endpoints\n */\nexport const cvRestrictionDataWithIdGroup: EndpointGroupMeta = {\n name: \"cv-restriction-data-with-id\",\n cacheStrategy: \"STATIC\",\n documentation: {\n summary:\n \"Commercial vehicle restrictions with unique identifiers for Washington State highways.\",\n description:\n \"Weight limits, height clearances, axle restrictions, and location details with unique tracking IDs for bridge and road restrictions statewide.\",\n useCases: [\n \"Track specific restrictions using unique identifiers.\",\n \"Monitor restriction changes over time.\",\n \"Manage permit requirements with ID-based lookups.\",\n ],\n updateFrequency: \"daily\",\n },\n endpoints: [commercialVehicleRestrictionsWithIdMeta],\n};\n","import type { EndpointMeta } from \"@/apis/types\";\nimport {\n createFetchAndHook,\n type FetchFactory,\n type HookFactory,\n} from \"@/shared/factories\";\nimport { wsdotCommercialVehicleRestrictionsApiMeta } from \"../apiMeta\";\nimport {\n type CommercialVehicleRestrictionsWithIdInput,\n commercialVehicleRestrictionsWithIdInputSchema,\n} from \"./shared/cvRestrictionDataWithId.input\";\nimport {\n type CVRestrictionWithId,\n cvRestrictionWithIdSchema,\n} from \"./shared/cvRestrictionDataWithId.output\";\n\n/**\n * Metadata for the fetchCommercialVehicleRestrictionsWithId endpoint\n */\nexport const commercialVehicleRestrictionsWithIdMeta = {\n functionName: \"fetchCommercialVehicleRestrictionsWithId\",\n endpoint: \"/getCommercialVehicleRestrictionsWithIdAsJson\",\n inputSchema: commercialVehicleRestrictionsWithIdInputSchema,\n outputSchema: cvRestrictionWithIdSchema.array(),\n sampleParams: {},\n endpointDescription:\n \"List commercial vehicle restrictions with unique identifiers for all Washington State highways.\",\n} satisfies EndpointMeta<\n CommercialVehicleRestrictionsWithIdInput,\n CVRestrictionWithId[]\n>;\n\nconst { fetch, useHook } = createFetchAndHook<\n CommercialVehicleRestrictionsWithIdInput,\n CVRestrictionWithId[]\n>({\n api: wsdotCommercialVehicleRestrictionsApiMeta,\n endpoint: commercialVehicleRestrictionsWithIdMeta,\n getCacheStrategy: () =>\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n require(\"./shared/cvRestrictionDataWithId.endpoints\")\n .cvRestrictionDataWithIdGroup.cacheStrategy,\n});\n\n/**\n * Fetch function for retrieving commercial vehicle restrictions with unique identifiers for all Washington State highways\n */\nexport const fetchCommercialVehicleRestrictionsWithId: FetchFactory<\n CommercialVehicleRestrictionsWithIdInput,\n CVRestrictionWithId[]\n> = fetch;\n\n/**\n * React Query hook for retrieving commercial vehicle restrictions with unique identifiers for all Washington State highways\n */\nexport const useCommercialVehicleRestrictionsWithId: HookFactory<\n CommercialVehicleRestrictionsWithIdInput,\n CVRestrictionWithId[]\n> = useHook;\n"]}