UNPKG

@vepler/safety-types

Version:

TypeScript type definitions for Vepler Safety Service API

114 lines (113 loc) 2.44 kB
/** * Get Neighbourhood Watch Tiles API Types * * /api/neighborhood-watch/tiles endpoint */ /** * Tile coordinate specification */ export interface TileCoordinate { /** * Zoom level (0-22) */ z: number; /** * X coordinate of the tile */ x: number; /** * Y coordinate of the tile */ y: number; } /** * Get neighbourhood watch tiles query parameters */ export interface GetNeighborhoodWatchTilesQueryParams { /** * Comma-separated list of tile coordinates (e.g., "10/512/512,10/513/512") */ tiles: string; /** * Response format */ format?: 'geojson'; /** * Filter by scheme status (e.g., "active") */ status?: string; /** * Maximum number of results per tile */ limit?: number; /** * Include boundary polygon geometry in response */ includeGeometry?: boolean; /** * Include additional metadata in response */ includeMetadata?: boolean; } /** * Neighbourhood watch scheme GeoJSON feature */ export interface NeighborhoodWatchFeature { type: 'Feature'; geometry: { type: 'Point' | 'Polygon'; coordinates: number[] | number[][][] | number[][][][]; }; properties: { id: string; provider: string; key: string; title: string; areaId: string; recordType: string; url: string; countryCode: string; latitude: number; longitude: number; metadata?: Record<string, any>; updatedAt?: string; }; } /** * Get neighbourhood watch tiles response metadata */ export interface GetNeighborhoodWatchTilesMetadata { /** * Total tiles queried */ tilesQueried: number; /** * Total scheme features returned */ totalFeatures: number; /** * Applied status filters */ statusFilters?: string[]; /** * Query execution time in milliseconds */ executionTimeMs?: number; /** * Applied limit per tile */ limitPerTile?: number; /** * Tile coordinates that were queried */ queriedTiles: TileCoordinate[]; } /** * Get neighbourhood watch tiles GeoJSON response */ export interface GetNeighborhoodWatchTilesGeoJSONResponse { type: 'FeatureCollection'; features: NeighborhoodWatchFeature[]; meta: GetNeighborhoodWatchTilesMetadata; success: boolean; }