@bradsearch/search-sdk
Version:
TypeScript SDK for BradSearch API with JWT authentication, field mapping, and faceted search capabilities
23 lines • 881 B
TypeScript
import { ItemMapping, Item } from "../types";
/**
* Get nested value from object using dot notation
* @param obj Source object
* @param path Dot notation path (e.g., 'categoryDefault.localizedName')
* @returns Value at the path or undefined
*/
export declare function getNestedValue(obj: any, path: string): any;
/**
* Transform API response item to mapped item
* @param apiItem Raw API response item
* @param mapping Field mapping configuration
* @returns Mapped item
*/
export declare function transformItem<T = Item>(apiItem: any, mapping?: ItemMapping): T;
/**
* Transform array of API items to mapped items
* @param apiItems Raw API response items
* @param mapping Field mapping configuration
* @returns Array of mapped items
*/
export declare function transformItems<T = Item>(apiItems: any[], mapping?: ItemMapping): T[];
//# sourceMappingURL=mapping.d.ts.map