import { ClientConfig } from '@wirewheel/cmp/src/entities/ClientConfig'; import { Subject } from '@wirewheel/cmp/src/entities/Subject'; import { Session } from '@wirewheel/cmp/src/entities/Session'; import { Action } from './entities/Action'; import { GetUnifiedConsentResponse } from '@wirewheel/cmp/src/entities/GetUnifiedConsentResponse'; import { Channel } from '@wirewheel/cmp/src/entities/Channel'; import { EmbeddedHandler } from '@wirewheel/cmp/src/EmbeddedHandler'; export declare type HasConsentsPayload = { subjectId?: string; }; export declare type SaveProfilePayload = { email: string; profile?: any; }; export declare type VerifySubjectProfilePayload = { email: string; verificationCode: string; }; export declare type CreateConsentPayload = { subject?: Subject; actions: Action[]; attributes?: { [key: string]: any; }; tags?: string[]; compliance?: { privacyPolicy?: { version?: string; url: string; }; gpc?: 1; }; overrideCountryCode?: string; overrideRegionCode?: string; }; export declare class WireWheelClient { private readonly config; private readonly embeddedHandler?; private readonly httpClient; private readonly store; constructor(config: ClientConfig, embeddedHandler?: EmbeddedHandler | undefined); static new(config: ClientConfig, embeddedHandler?: EmbeddedHandler): WireWheelClient; get subject(): Subject | undefined; login(verifiedId: string): Promise; loginFromSession(sessionId: string): Promise; logout(): void; private get _getRegionHeaders(); createConsent(payload: CreateConsentPayload): Promise; getUnifiedConsent(subjectId?: string): Promise; saveProfile({ email, profile }: SaveProfilePayload): Promise; verifySubjectProfile({ email, verificationCode }: VerifySubjectProfilePayload): Promise; hasConsents(payload?: HasConsentsPayload): Promise; getProfileVerificationCode(email: string): Promise; /** * Retrieves the channel config given a channelId * @param channelId * @returns {Channel} */ getChannelConfig(channelId: string): Promise; /** * Merges the consents of the source subject into the target subject. * @param sourceSubjectId * @param targetSubjectId */ mergeSubjects(sourceSubjectId: string, targetSubjectId: string): Promise; }