@vepler/area-reference-types
Version:
TypeScript type definitions for Vepler Area Reference API
92 lines (91 loc) • 1.7 kB
TypeScript
/**
* Areas Query API Types
*
* /api/areas/query/{type} endpoint
*/
import { GeographicEntityResponse } from './common';
import { GeographicEntityType } from '../../common';
/**
* Query areas endpoint path parameters
*/
export interface QueryAreasPathParams {
/**
* Geographic entity type to query
*/
type: GeographicEntityType;
}
/**
* Query areas endpoint query parameters
*/
export interface QueryAreasQueryParams {
/**
* Search query string
*/
q?: string;
/**
* Maximum number of results
*/
limit?: number;
/**
* Result offset for pagination
*/
offset?: number;
/**
* Filter by specific codes (comma-separated)
*/
codes?: string;
/**
* Entity status filter
*/
status?: string;
/**
* Include relationship information
*/
includeRelationships?: boolean;
/**
* Include hierarchy information
*/
includeHierarchy?: boolean;
/**
* Include full geometry in response
*/
includeGeometry?: boolean;
}
/**
* Query areas response metadata
*/
export interface QueryAreasMetadata {
/**
* Total matching entities
*/
total?: number;
/**
* Applied limit
*/
limit?: number;
/**
* Applied offset
*/
offset?: number;
/**
* Queried entity type
*/
type?: string;
}
/**
* Query areas endpoint response
*/
export interface QueryAreasResponse {
/**
* Array of matching geographic entities
*/
result: GeographicEntityResponse[];
/**
* Response metadata
*/
meta: QueryAreasMetadata;
/**
* Success flag
*/
success: boolean;
}