@vepler/area-reference-types
Version:
TypeScript type definitions for Vepler Area Reference API
97 lines (96 loc) • 2.02 kB
TypeScript
/**
* Check Resolution Capability API Types
*
* /geographic/capability endpoint
*/
import { GeographicEntityType } from '../../common';
import { ResolutionStrategy } from './common';
/**
* Resolution capability information
*/
export interface ResolutionCapability {
/**
* Whether resolution is possible
*/
canResolve: boolean;
/**
* Strategy that would be used
*/
strategy: ResolutionStrategy;
/**
* Target geography types that would be resolved to
*/
targetTypes: GeographicEntityType[];
/**
* Explanation of the resolution path
*/
explanation: string;
/**
* Whether the resolution would be optimal
*/
isOptimal: boolean;
}
/**
* Check resolution capability query parameters
*/
export interface CheckResolutionCapabilityQueryParams {
/**
* Input geography type to check
*/
inputType: GeographicEntityType;
/**
* Supported target geography types (comma-separated)
*/
supportedTiers: string;
/**
* Include detailed explanation
*/
includeExplanation?: boolean;
}
/**
* Geographic hierarchy context
*/
export interface HierarchyContext {
/**
* Input geography level
*/
inputLevel: number;
/**
* Target geography levels
*/
targetLevels: number[];
/**
* Possible resolution strategies
*/
possibleStrategies: ResolutionStrategy[];
}
/**
* Capability check metadata
*/
export interface CapabilityCheckMetadata {
/**
* Check execution time in milliseconds
*/
executionTimeMs: number;
/**
* Geographic hierarchy context
*/
hierarchyContext: HierarchyContext;
}
/**
* Check resolution capability response
*/
export interface CheckResolutionCapabilityResponse {
/**
* Success flag
*/
success: boolean;
/**
* Capability assessment result
*/
result: ResolutionCapability;
/**
* Response metadata
*/
meta?: CapabilityCheckMetadata;
}