import type { Reference } from '@ninetailed/experience.js-shared'; import { BaselineWithExperiencesEntry } from '../types/BaselineWithExperiencesEntry'; import { EntryLike } from '../types/Entry'; import type { EntryFields } from '../types/EntryFields'; import { ExperienceEntry, ExperienceEntryLike } from '../types/ExperienceEntry'; import { ExperimentEntry } from '../types/ExperimentEntry'; export type MapVariantFunction = (input: EntryLike) => Out; export type MapVariantFunctionAsync = (input: EntryLike) => Promise; export declare class ExperienceMapper { static isExperienceEntry(entry: ExperienceEntryLike): entry is ExperienceEntry; /** * Maps a Contentful Ninetailed Experience Entry to a format compatible with the Experience.js SDK. * * @param ctfEntry A Contentful Ninetailed Experience Entry */ static mapExperience(ctfEntry: ExperienceEntryLike): import("@ninetailed/experience.js-shared").ExperienceConfiguration<{ id: string; sys: { id: string; type?: string | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; locale?: string | undefined; revision?: number | undefined; space?: { sys: { id: string; type?: string | undefined; linkType?: string | undefined; }; } | undefined; environment?: { sys: { id: string; type?: string | undefined; linkType?: string | undefined; }; } | undefined; contentType?: { sys: { id: string; type?: string | undefined; linkType?: string | undefined; }; } | undefined; }; metadata?: { tags: { sys: { linkType: string; id: string; type?: string | undefined; }; }[]; } | undefined; fields: VariantFields; }>; /** * * Maps a Contentful Ninetailed Experience Entry to a format compatible with the Experience.js SDK * using a custom mapping function for the Experience's variants. * * @param ctfEntry A Contentful Ninetailed Experience Entry * @param mapFn A custom function to map the Experience's variants */ static mapCustomExperience(ctfEntry: ExperienceEntryLike, mapFn: MapVariantFunction): import("@ninetailed/experience.js-shared").ExperienceConfiguration; /** * Similar to `mapCustomExperience` but supports asynchronous mapping functions. * @see mapCustomExperience */ static mapCustomExperienceAsync(ctfEntry: ExperienceEntryLike, mapFn: MapVariantFunctionAsync): Promise>>; static isExperiment(entry: ExperienceEntryLike): entry is ExperimentEntry; static mapExperiment(entry: ExperienceEntryLike): import("@ninetailed/experience.js-shared").ExperienceConfiguration<{ id: string; }>; static mapBaselineWithExperiences(entry: BaselineWithExperiencesEntry): import("@ninetailed/experience.js-shared").ExperienceConfiguration<{ id: string; sys: { id: string; type?: string | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; locale?: string | undefined; revision?: number | undefined; space?: { sys: { id: string; type?: string | undefined; linkType?: string | undefined; }; } | undefined; environment?: { sys: { id: string; type?: string | undefined; linkType?: string | undefined; }; } | undefined; contentType?: { sys: { id: string; type?: string | undefined; linkType?: string | undefined; }; } | undefined; }; metadata?: { tags: { sys: { linkType: string; id: string; type?: string | undefined; }; }[]; } | undefined; fields: {}; }>[]; }