UNPKG

salsify-experiences-sdk

Version:

SDK to be used by commerce websites to implement product experiences.

23 lines (22 loc) 664 B
import { Logger } from '../utils/logger'; export type PerProductConfig = { content: Array<Source>; }; type Source = { source: string | null; weight: number; }; export declare function isPerProductConfig(config: unknown, logger?: Logger, url?: string): config is PerProductConfig; interface SelectSourceArgs { productId: string; content: Array<Source>; sessionId: string; } export declare function selectSource(args: SelectSourceArgs): Source; export declare class PerProductConfigCache { #private; /** @internal */ constructor(logger: Logger); getConfig(cdnPath: string): Promise<PerProductConfig | undefined>; } export {};