@siva-sub/mcp-public-transport
Version:
A Model Context Protocol server for Singapore transport data with real-time information and routing
20 lines (19 loc) • 904 B
TypeScript
import { CacheService } from './cache.js';
import { LocationResult, OneMapSearchResult } from '../types/location.js';
interface OneMapServiceInterface {
geocodeWithAuth(query: string): Promise<OneMapSearchResult[]>;
}
export declare class PostalCodeService {
private oneMapService;
private cache?;
constructor(oneMapService: OneMapServiceInterface, cache?: CacheService | undefined);
isValidSingaporePostalCode(code: string): boolean;
extractPostalCodeFromText(text: string): string | null;
getLocationFromPostalCode(postalCode: string): Promise<LocationResult | null>;
validateAndResolvePostalCode(input: string): Promise<LocationResult | null>;
private convertToLocationResult;
getDistrictFromPostalCode(postalCode: string): string | null;
isInArea(postalCode: string, area: string): boolean;
getAreaType(postalCode: string): string | null;
}
export {};