import EcomClient from './index'; import { Product } from './product'; import { Category } from './category'; declare type ProductMap = { [key: string]: Product; }; declare type ProductPathCategoriesMap = { [key: string]: Category[]; }; export declare class CategoryTree { client: EcomClient; leafCategories: Category[]; nonLeafCategories: Category[]; productPathCategoriesMap: ProductPathCategoriesMap; allProducts: ProductMap; hasProduct: any; root: Category | null; loaded: boolean; constructor(client: EcomClient); getRootCategory(): Category | null; /** * Find a Category in the tree by path * e.g. a/c/f/j/n * @returns {Category|null} object or null if not found */ findCategoryByPath(path: string): Category | null; findProductByPath(path: string): Product | null; getMidRangeCategories(): object[]; getBottomLevelCategories(): object[]; getAllProducts(): ProductMap; load(forceLoad?: boolean): Promise; unload(): void; static strDumpTree(category: Category): string; } export {};