import { Category } from '../../common/types'; import { CodecError } from './codec-error'; /** * Find a category in the category tree by slug. * @param categories Root categories in category tree * @param slug Category slug * @returns Found category, if present */ export declare const findInCategoryTree: (categories: Category[], slug: string) => Category; /** * Flattens categories to a single dimensional array, rather than a tree * @param categories Root categories * @returns Flattened list of categories */ export declare const flattenCategories: (categories: Category[]) => Category[]; /** * Helper method for logging requests/responses when the LOG_INTEGRATION environment variable is set. * @param response Response */ export declare const logResponse: (method: string, request: string, response: T) => T; /** * Ensures a given array of identifiable objects has matching position to a list of IDs. * Missing items are replaced with null. * @param ids List of IDs * @param items List of items * @returns Items in the order of the specified ID list */ export declare const mapIdentifiers: (ids: (string | number)[], items: T[]) => T[]; /** * Construct a CodecError for when get products arguments are missing * @param method Method name * @returns Codec error */ export declare const getProductsArgError: (method: string) => CodecError;