UNPKG

ws-dottie

Version:

Your friendly TypeScript companion for Washington State transportation APIs - WSDOT and WSF data with smart caching and React Query integration

38 lines 2.02 kB
import { z } from "zod"; /** * Cache flush date schema for WSF APIs * * Some of the retrieval operations in this service return data that changes infrequently. * As a result, you may wish to cache it in your application. Use the `/cacheflushdate` * operation to poll for changes. When the date returned from this operation is modified, * drop your application cache and retrieve fresh data from the service. */ /** * Schema for WSF Schedule and Terminals APIs cache flush date response. * Uses the "CacheFlushDate" field name. */ export declare const wsfScheduleCacheFlushDateSchema: z.ZodObject<{ CacheFlushDate: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>>; }, z.core.$strip>; /** * Schema for WSF Fares API cache flush date response. * Returns a direct nullable .NET timestamp string. */ export declare const wsfFaresCacheFlushDateSchema: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>>; /** * Standardized schema for all WSF API cache flush date responses. * All WSF APIs (fares, schedule, terminals, vessels) return raw .NET timestamp strings. */ export declare const wsfStandardCacheFlushDateSchema: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>>; /** * Union schema that can handle both WSF API cache flush date formats. * Use this when you need to validate responses from any WSF API. */ export declare const wsfCacheFlushDateSchema: z.ZodUnion<readonly [z.ZodObject<{ CacheFlushDate: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>>; }, z.core.$strip>, z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>>]>; export type WsfScheduleCacheFlushDate = z.infer<typeof wsfScheduleCacheFlushDateSchema>; export type WsfFaresCacheFlushDate = z.infer<typeof wsfFaresCacheFlushDateSchema>; export type WsfStandardCacheFlushDate = z.infer<typeof wsfStandardCacheFlushDateSchema>; export type WsfCacheFlushDate = z.infer<typeof wsfCacheFlushDateSchema>; //# sourceMappingURL=cacheFlushDate.zod.d.ts.map