import type { ItemRecommendationDisplayPayload, SettingRecommendationProps } from '../../../types'; import type { AttributeDisplay } from './Display'; import type { CardItemProps } from '../../../components/WidgetDisplay'; type TCollectPayloadToGetRecommendation = Omit & Pick; export declare const mapItemRecommendationToDto: (data: Record[], attributeDisplay: AttributeDisplay) => Omit[]; /** * Collects and constructs a payload object to request item recommendations. * * This function processes various input data, including content sources, image details, * and user identifiers, to build a payload that can be sent to an item recommendation service. * * @param {TCollectPayloadToGetRecommendation} params - The input parameters for building the recommendation payload. * @param {TContentSourceGroup[]} params.contentSources - An array of content source groups, where the first group's properties are used in the payload. * @param {TItem[]} params.image - An array of image objects, each containing an `id` attribute to be included in the recommendation attributes. * @param {TItem[]} params.imageTitle - An array of image title objects, each containing an `id` attribute to be included in the recommendation attributes. * @param {TItem[]} params.itemLink - An array of item link objects, each containing an `id` attribute to be included in the recommendation attributes. * @param {string} params.cid - The customer ID to be included in the payload. * @param {string} params.uid - The user ID to be included in the payload. * @param {number} params.portalId - The portal ID to be included in the payload. * * @returns {ItemRecommendationDisplayPayload | undefined} - Returns an object representing the payload for item recommendations, or undefined if an error occurs. * * @throws {Error} - Logs the error to the console if an exception occurs during payload construction. * * @example * const payload = collectPayloadToGetRecommendation({ * contentSources: contentSourcesData, * image: imageData, * imageTitle: imageTitleData, * itemLink: itemLinkData, * cid: 'customer123', * uid: 'user456', * portalId: 789, * }); * if (payload) { * // Send payload to recommendation service * } */ export declare const collectPayloadToGetRecommendation: ({ contentSources, image, imageTitle, itemLink, cid, uid, portalId, }: TCollectPayloadToGetRecommendation) => ItemRecommendationDisplayPayload | undefined; export {};