ws-dottie
Version:
Your friendly TypeScript companion for Washington State transportation APIs - WSDOT and WSF data with smart caching and React Query integration
472 lines (467 loc) • 15.3 kB
TypeScript
export { Camera, HighwayCameraByCameraIdInput, HighwayCamerasByRouteAndMilepostInput, HighwayCamerasInput, cameraSchema, highwayCameraByCameraIdInputSchema, highwayCamerasByRouteAndMilepostInputSchema, highwayCamerasInputSchema } from './schemas.js';
export { R as RoadwayLocation } from '../../roadwayLocationSchema-ByZokQ0d.js';
import * as zod from 'zod';
import { H as HookFactory, F as FetchFactory } from '../../types-D3jt2o5t.js';
import '@tanstack/react-query';
/**
* Metadata for the fetchHighwayCameraByCameraId endpoint
*/
declare const highwayCameraByCameraIdMeta: {
functionName: string;
endpoint: string;
inputSchema: zod.ZodObject<{
CameraID: zod.ZodNumber;
}, "strip", zod.ZodTypeAny, {
CameraID: number;
}, {
CameraID: number;
}>;
outputSchema: zod.ZodObject<{
CameraID: zod.ZodNumber;
CameraLocation: zod.ZodNullable<zod.ZodObject<{
Description: zod.ZodNullable<zod.ZodString>;
Direction: zod.ZodNullable<zod.ZodString>;
Latitude: zod.ZodNumber;
Longitude: zod.ZodNumber;
MilePost: zod.ZodNumber;
RoadName: zod.ZodNullable<zod.ZodString>;
}, "strip", zod.ZodTypeAny, {
Description: string | null;
Direction: string | null;
Latitude: number;
Longitude: number;
MilePost: number;
RoadName: string | null;
}, {
Description: string | null;
Direction: string | null;
Latitude: number;
Longitude: number;
MilePost: number;
RoadName: string | null;
}>>;
CameraOwner: zod.ZodNullable<zod.ZodString>;
Description: zod.ZodNullable<zod.ZodString>;
DisplayLatitude: zod.ZodNumber;
DisplayLongitude: zod.ZodNumber;
ImageHeight: zod.ZodNumber;
ImageURL: zod.ZodNullable<zod.ZodString>;
ImageWidth: zod.ZodNumber;
IsActive: zod.ZodBoolean;
OwnerURL: zod.ZodNullable<zod.ZodString>;
Region: zod.ZodNullable<zod.ZodString>;
SortOrder: zod.ZodNumber;
Title: zod.ZodNullable<zod.ZodString>;
}, "strip", zod.ZodTypeAny, {
Description: string | null;
Region: string | null;
CameraID: number;
CameraLocation: {
Description: string | null;
Direction: string | null;
Latitude: number;
Longitude: number;
MilePost: number;
RoadName: string | null;
} | null;
CameraOwner: string | null;
DisplayLatitude: number;
DisplayLongitude: number;
ImageHeight: number;
ImageURL: string | null;
ImageWidth: number;
IsActive: boolean;
OwnerURL: string | null;
SortOrder: number;
Title: string | null;
}, {
Description: string | null;
Region: string | null;
CameraID: number;
CameraLocation: {
Description: string | null;
Direction: string | null;
Latitude: number;
Longitude: number;
MilePost: number;
RoadName: string | null;
} | null;
CameraOwner: string | null;
DisplayLatitude: number;
DisplayLongitude: number;
ImageHeight: number;
ImageURL: string | null;
ImageWidth: number;
IsActive: boolean;
OwnerURL: string | null;
SortOrder: number;
Title: string | null;
}>;
sampleParams: {
CameraID: number;
};
endpointDescription: string;
};
/**
* Fetch function and React Query hook for retrieving camera details by camera ID
*/
declare const fetchHighwayCameraByCameraId: FetchFactory<{
CameraID: number;
}, {
Description: string | null;
Region: string | null;
CameraID: number;
CameraLocation: {
Description: string | null;
Direction: string | null;
Latitude: number;
Longitude: number;
MilePost: number;
RoadName: string | null;
} | null;
CameraOwner: string | null;
DisplayLatitude: number;
DisplayLongitude: number;
ImageHeight: number;
ImageURL: string | null;
ImageWidth: number;
IsActive: boolean;
OwnerURL: string | null;
SortOrder: number;
Title: string | null;
}>;
declare const useHighwayCameraByCameraId: HookFactory<{
CameraID: number;
}, {
Description: string | null;
Region: string | null;
CameraID: number;
CameraLocation: {
Description: string | null;
Direction: string | null;
Latitude: number;
Longitude: number;
MilePost: number;
RoadName: string | null;
} | null;
CameraOwner: string | null;
DisplayLatitude: number;
DisplayLongitude: number;
ImageHeight: number;
ImageURL: string | null;
ImageWidth: number;
IsActive: boolean;
OwnerURL: string | null;
SortOrder: number;
Title: string | null;
}>;
/**
* Metadata for the fetchHighwayCameras endpoint
*/
declare const highwayCamerasMeta: {
functionName: string;
endpoint: string;
inputSchema: zod.ZodObject<{}, "strip", zod.ZodTypeAny, {}, {}>;
outputSchema: zod.ZodArray<zod.ZodObject<{
CameraID: zod.ZodNumber;
CameraLocation: zod.ZodNullable<zod.ZodObject<{
Description: zod.ZodNullable<zod.ZodString>;
Direction: zod.ZodNullable<zod.ZodString>;
Latitude: zod.ZodNumber;
Longitude: zod.ZodNumber;
MilePost: zod.ZodNumber;
RoadName: zod.ZodNullable<zod.ZodString>;
}, "strip", zod.ZodTypeAny, {
Description: string | null;
Direction: string | null;
Latitude: number;
Longitude: number;
MilePost: number;
RoadName: string | null;
}, {
Description: string | null;
Direction: string | null;
Latitude: number;
Longitude: number;
MilePost: number;
RoadName: string | null;
}>>;
CameraOwner: zod.ZodNullable<zod.ZodString>;
Description: zod.ZodNullable<zod.ZodString>;
DisplayLatitude: zod.ZodNumber;
DisplayLongitude: zod.ZodNumber;
ImageHeight: zod.ZodNumber;
ImageURL: zod.ZodNullable<zod.ZodString>;
ImageWidth: zod.ZodNumber;
IsActive: zod.ZodBoolean;
OwnerURL: zod.ZodNullable<zod.ZodString>;
Region: zod.ZodNullable<zod.ZodString>;
SortOrder: zod.ZodNumber;
Title: zod.ZodNullable<zod.ZodString>;
}, "strip", zod.ZodTypeAny, {
Description: string | null;
Region: string | null;
CameraID: number;
CameraLocation: {
Description: string | null;
Direction: string | null;
Latitude: number;
Longitude: number;
MilePost: number;
RoadName: string | null;
} | null;
CameraOwner: string | null;
DisplayLatitude: number;
DisplayLongitude: number;
ImageHeight: number;
ImageURL: string | null;
ImageWidth: number;
IsActive: boolean;
OwnerURL: string | null;
SortOrder: number;
Title: string | null;
}, {
Description: string | null;
Region: string | null;
CameraID: number;
CameraLocation: {
Description: string | null;
Direction: string | null;
Latitude: number;
Longitude: number;
MilePost: number;
RoadName: string | null;
} | null;
CameraOwner: string | null;
DisplayLatitude: number;
DisplayLongitude: number;
ImageHeight: number;
ImageURL: string | null;
ImageWidth: number;
IsActive: boolean;
OwnerURL: string | null;
SortOrder: number;
Title: string | null;
}>, "many">;
sampleParams: {};
endpointDescription: string;
};
/**
* Fetch function and React Query hook for retrieving all highway cameras statewide
*/
declare const fetchHighwayCameras: FetchFactory<{}, {
Description: string | null;
Region: string | null;
CameraID: number;
CameraLocation: {
Description: string | null;
Direction: string | null;
Latitude: number;
Longitude: number;
MilePost: number;
RoadName: string | null;
} | null;
CameraOwner: string | null;
DisplayLatitude: number;
DisplayLongitude: number;
ImageHeight: number;
ImageURL: string | null;
ImageWidth: number;
IsActive: boolean;
OwnerURL: string | null;
SortOrder: number;
Title: string | null;
}[]>;
declare const useHighwayCameras: HookFactory<{}, {
Description: string | null;
Region: string | null;
CameraID: number;
CameraLocation: {
Description: string | null;
Direction: string | null;
Latitude: number;
Longitude: number;
MilePost: number;
RoadName: string | null;
} | null;
CameraOwner: string | null;
DisplayLatitude: number;
DisplayLongitude: number;
ImageHeight: number;
ImageURL: string | null;
ImageWidth: number;
IsActive: boolean;
OwnerURL: string | null;
SortOrder: number;
Title: string | null;
}[]>;
/**
* Metadata for the searchHighwayCamerasByRouteAndMilepost endpoint
*/
declare const searchHighwayCamerasByRouteAndMilepostMeta: {
functionName: string;
endpoint: string;
inputSchema: zod.ZodObject<{
StateRoute: zod.ZodOptional<zod.ZodString>;
Region: zod.ZodOptional<zod.ZodString>;
StartingMilepost: zod.ZodOptional<zod.ZodNullable<zod.ZodNumber>>;
EndingMilepost: zod.ZodOptional<zod.ZodNullable<zod.ZodNumber>>;
}, "strip", zod.ZodTypeAny, {
StateRoute?: string | undefined;
Region?: string | undefined;
StartingMilepost?: number | null | undefined;
EndingMilepost?: number | null | undefined;
}, {
StateRoute?: string | undefined;
Region?: string | undefined;
StartingMilepost?: number | null | undefined;
EndingMilepost?: number | null | undefined;
}>;
outputSchema: zod.ZodArray<zod.ZodObject<{
CameraID: zod.ZodNumber;
CameraLocation: zod.ZodNullable<zod.ZodObject<{
Description: zod.ZodNullable<zod.ZodString>;
Direction: zod.ZodNullable<zod.ZodString>;
Latitude: zod.ZodNumber;
Longitude: zod.ZodNumber;
MilePost: zod.ZodNumber;
RoadName: zod.ZodNullable<zod.ZodString>;
}, "strip", zod.ZodTypeAny, {
Description: string | null;
Direction: string | null;
Latitude: number;
Longitude: number;
MilePost: number;
RoadName: string | null;
}, {
Description: string | null;
Direction: string | null;
Latitude: number;
Longitude: number;
MilePost: number;
RoadName: string | null;
}>>;
CameraOwner: zod.ZodNullable<zod.ZodString>;
Description: zod.ZodNullable<zod.ZodString>;
DisplayLatitude: zod.ZodNumber;
DisplayLongitude: zod.ZodNumber;
ImageHeight: zod.ZodNumber;
ImageURL: zod.ZodNullable<zod.ZodString>;
ImageWidth: zod.ZodNumber;
IsActive: zod.ZodBoolean;
OwnerURL: zod.ZodNullable<zod.ZodString>;
Region: zod.ZodNullable<zod.ZodString>;
SortOrder: zod.ZodNumber;
Title: zod.ZodNullable<zod.ZodString>;
}, "strip", zod.ZodTypeAny, {
Description: string | null;
Region: string | null;
CameraID: number;
CameraLocation: {
Description: string | null;
Direction: string | null;
Latitude: number;
Longitude: number;
MilePost: number;
RoadName: string | null;
} | null;
CameraOwner: string | null;
DisplayLatitude: number;
DisplayLongitude: number;
ImageHeight: number;
ImageURL: string | null;
ImageWidth: number;
IsActive: boolean;
OwnerURL: string | null;
SortOrder: number;
Title: string | null;
}, {
Description: string | null;
Region: string | null;
CameraID: number;
CameraLocation: {
Description: string | null;
Direction: string | null;
Latitude: number;
Longitude: number;
MilePost: number;
RoadName: string | null;
} | null;
CameraOwner: string | null;
DisplayLatitude: number;
DisplayLongitude: number;
ImageHeight: number;
ImageURL: string | null;
ImageWidth: number;
IsActive: boolean;
OwnerURL: string | null;
SortOrder: number;
Title: string | null;
}>, "many">;
sampleParams: {
StateRoute: string;
StartingMilepost: number;
EndingMilepost: number;
};
endpointDescription: string;
};
/**
* Fetch function and React Query hook for searching cameras by route and milepost range
*/
declare const searchHighwayCamerasByRouteAndMilepost: FetchFactory<{
StateRoute?: string | undefined;
Region?: string | undefined;
StartingMilepost?: number | null | undefined;
EndingMilepost?: number | null | undefined;
}, {
Description: string | null;
Region: string | null;
CameraID: number;
CameraLocation: {
Description: string | null;
Direction: string | null;
Latitude: number;
Longitude: number;
MilePost: number;
RoadName: string | null;
} | null;
CameraOwner: string | null;
DisplayLatitude: number;
DisplayLongitude: number;
ImageHeight: number;
ImageURL: string | null;
ImageWidth: number;
IsActive: boolean;
OwnerURL: string | null;
SortOrder: number;
Title: string | null;
}[]>;
declare const useSearchHighwayCamerasByRouteAndMilepost: HookFactory<{
StateRoute?: string | undefined;
Region?: string | undefined;
StartingMilepost?: number | null | undefined;
EndingMilepost?: number | null | undefined;
}, {
Description: string | null;
Region: string | null;
CameraID: number;
CameraLocation: {
Description: string | null;
Direction: string | null;
Latitude: number;
Longitude: number;
MilePost: number;
RoadName: string | null;
} | null;
CameraOwner: string | null;
DisplayLatitude: number;
DisplayLongitude: number;
ImageHeight: number;
ImageURL: string | null;
ImageWidth: number;
IsActive: boolean;
OwnerURL: string | null;
SortOrder: number;
Title: string | null;
}[]>;
export { fetchHighwayCameraByCameraId, fetchHighwayCameras, highwayCameraByCameraIdMeta, highwayCamerasMeta, searchHighwayCamerasByRouteAndMilepost, searchHighwayCamerasByRouteAndMilepostMeta, useHighwayCameraByCameraId, useHighwayCameras, useSearchHighwayCamerasByRouteAndMilepost };