import { AdapterHelper } from './adapter-helper'; import { HttpClient } from '@contentstack/cli-utilities'; import { ProjectStruct, Personalization, GetProjectsParams, CreateProjectInput, CreateAttributeInput, APIConfig, GetVariantGroupInput, EventStruct, AudienceStruct, AttributeStruct, CreateAudienceInput, CreateEventInput, CreateExperienceInput, ExperienceStruct, UpdateExperienceInput, CMSExperienceStruct, VariantAPIRes, APIResponse, VariantGroupStruct, VariantGroup, CreateExperienceVersionInput, ExportConfig } from '../types'; export declare class PersonalizationAdapter extends AdapterHelper implements Personalization { exportConfig?: ExportConfig; constructor(options: APIConfig); init(): Promise; projects(options: GetProjectsParams): Promise; /** * This TypeScript function creates a project by making an asynchronous API call to retrieve project * data. * @param {CreateProjectInput} input - The `input` parameter in the `createProject` function likely * represents the data needed to create a new project. It could include details such as the project * name, description, owner, deadline, or any other relevant information required to set up a new * project. * @returns The `createProject` function is returning a Promise that resolves to either a * `ProjectStruct` object or `void`. */ createProject(project: CreateProjectInput): Promise; /** * The function `createAttribute` asynchronously retrieves attribute data from an API endpoint. * @param {CreateAttributeInput} input - The `input` parameter in the `createAttribute` function is * of type `CreateAttributeInput`. This parameter likely contains the necessary data or information * needed to create a new attribute. * @returns The `createAttribute` function is returning the data obtained from a GET request to the * `/attributes` endpoint using the `apiClient` with the input provided. The data returned is of type * `ProjectStruct`. */ createAttribute(attribute: CreateAttributeInput): Promise; getExperiences(): Promise; getExperience(experienceUid: string): Promise; getExperienceVersions(experienceUid: string): Promise; createExperienceVersion(experienceUid: string, input: CreateExperienceVersionInput): Promise; updateExperienceVersion(experienceUid: string, versionId: string, input: CreateExperienceVersionInput): Promise; getVariantGroup(input: GetVariantGroupInput): Promise; updateVariantGroup(input: VariantGroup): Promise; getEvents(): Promise; createEvents(event: CreateEventInput): Promise; getAudiences(): Promise; getAttributes(): Promise; /** * @param {CreateAudienceInput} audience - The `audience` parameter in the `createAudience` function is * of type `CreateAudienceInput`. This parameter likely contains the necessary data or information * needed to create a new audience. * @returns The `createAudience` function is returning the data obtained from a GET request to the * `/audiences` endpoint using the `apiClient` with the input provided. The data returned is of type * `AudienceStruct`. */ createAudience(audience: CreateAudienceInput): Promise; /** * @param {CreateExperienceInput} experience - The `experience` parameter in the `createExperience` function is * of type `CreateExperienceInput`. This parameter likely contains the necessary data or information * needed to create a new audience. * @returns The `createExperience` function is returning the data obtained from a GET request to the * `/experiences` endpoint using the `apiClient` with the input provided. The data returned is of type * `ExperienceStruct`. */ createExperience(experience: CreateExperienceInput): Promise; /** * @param {UpdateExperienceInput} experience - The `experience` parameter in the `updateCTsInExperience` function is * of type `UpdateExperienceInput`. This parameter likely contains the necessary data or information * needed to attach CT in new created experience. */ updateCTsInExperience(experience: UpdateExperienceInput, experienceUid: string): Promise; /** * @param {UpdateExperienceInput} experienceUid - The `experienceUid` parameter in the `getCTsFromExperience` function is * of type `string`. This parameter likely contains the necessary data or information * needed to fetch CT details related to experience. */ getCTsFromExperience(experienceUid: string): Promise; /** * Handles the API response for variant requests. * @param res - The API response object. * @returns The variant API response data. * @throws If the API response status is not within the success range, an error message is thrown. */ handleVariantAPIRes(res: APIResponse): Promise; }