UNPKG

autotrader-connect-api

Version:

Production-ready TypeScript wrapper for Auto Trader UK Connect APIs

170 lines 4.71 kB
/** * Taxonomy module for AutoTrader API * Handles vehicle classification and taxonomy endpoints */ /** * Vehicle make information */ export interface VehicleMake { id: string; name: string; displayName: string; logoUrl?: string; country?: string; established?: number; modelCount?: number; popularModels?: string[]; } /** * Vehicle model information */ export interface VehicleModel { id: string; makeId: string; name: string; displayName: string; category: string; bodyTypes: string[]; generations?: VehicleGeneration[]; productionYears?: { start: number; end?: number; }; popularVariants?: string[]; } /** * Vehicle generation information */ export interface VehicleGeneration { id: string; modelId: string; name: string; displayName: string; productionYears: { start: number; end?: number; }; bodyTypes: string[]; engineOptions: string[]; variants: string[]; } /** * Get all vehicle makes * @returns Promise resolving to array of vehicle makes */ export declare function getVehicleMakes(): Promise<VehicleMake[]>; /** * Get vehicle models for a specific make * @param makeId Make identifier * @returns Promise resolving to array of vehicle models */ export declare function getVehicleModels(makeId: string): Promise<VehicleModel[]>; /** * Get vehicle generations for a specific model * @param modelId Model identifier * @returns Promise resolving to array of vehicle generations */ export declare function getVehicleGenerations(modelId: string): Promise<VehicleGeneration[]>; /** * Get popular vehicle makes * @param limit Maximum number of makes to return * @returns Promise resolving to popular makes */ export declare function getPopularMakes(limit?: number): Promise<VehicleMake[]>; /** * Get popular models for a specific make * @param makeId Make identifier * @param limit Maximum number of models to return * @returns Promise resolving to popular models */ export declare function getPopularModels(makeId: string, limit?: number): Promise<VehicleModel[]>; /** * Get vehicle body types * @returns Promise resolving to array of body types */ export declare function getBodyTypes(): Promise<Array<{ value: string; label: string; description?: string; category: string; }>>; /** * Get vehicle fuel types * @returns Promise resolving to array of fuel types */ export declare function getFuelTypes(): Promise<Array<{ value: string; label: string; description?: string; category: 'Traditional' | 'Alternative' | 'Electric'; efficiency?: string; }>>; /** * Get vehicle transmission types * @returns Promise resolving to array of transmission types */ export declare function getTransmissionTypes(): Promise<Array<{ value: string; label: string; description?: string; category: 'Manual' | 'Automatic' | 'Semi-Automatic'; }>>; /** * Get vehicle colors * @returns Promise resolving to array of colors */ export declare function getVehicleColors(): Promise<Array<{ value: string; label: string; hexCode?: string; category: 'Standard' | 'Metallic' | 'Pearl' | 'Matte' | 'Special'; popularity?: number; }>>; /** * Search taxonomy by keyword * @param query Search query * @param type Type of taxonomy to search * @returns Promise resolving to search results */ export declare function searchTaxonomy(query: string, type?: 'makes' | 'models' | 'body-types' | 'colors' | 'all'): Promise<{ makes?: VehicleMake[]; models?: VehicleModel[]; bodyTypes?: string[]; colors?: string[]; }>; /** * Get taxonomy hierarchy for a specific vehicle * @param makeId Make identifier * @param modelId Model identifier * @param generationId Optional generation identifier * @returns Promise resolving to taxonomy hierarchy */ export declare function getTaxonomyHierarchy(makeId: string, modelId: string, generationId?: string): Promise<{ make: VehicleMake; model: VehicleModel; generation?: VehicleGeneration; breadcrumb: Array<{ level: 'make' | 'model' | 'generation'; id: string; name: string; }>; }>; /** * Get taxonomy statistics * @returns Promise resolving to taxonomy statistics */ export declare function getTaxonomyStatistics(): Promise<{ makesCount: number; modelsCount: number; generationsCount: number; bodyTypesCount: number; fuelTypesCount: number; mostPopularMake: string; mostPopularModel: string; mostPopularBodyType: string; recentlyAdded: { makes: VehicleMake[]; models: VehicleModel[]; }; }>; //# sourceMappingURL=taxonomy.d.ts.map