Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
class VisitorDelegate
import { VisitorDelegate } from "https://deno.land/x/flagship_io_js_sdk@3.2.3/visitor/VisitorDelegate.ts";

Methods

activateModification(key: string): Promise<void>
activateModifications(keys: { key: string; }[]): Promise<void>
activateModifications(keys: string[]): Promise<void>
authenticate(visitorId: string): void
clearContext(): void
fetchFlags(): Promise<void>
getAllFlagsData(activate?): Promise<{ visitorId: string; campaigns: CampaignDTO[]; }>
getAllModifications(activate?): Promise<{ visitorId: string; campaigns: CampaignDTO[]; }>
getFlag<T>(key: string, defaultValue: T): IFlag<T>
getFlagMetadata(param: { metadata: IFlagMetadata; key?: string; hasSameType: boolean; }): IFlagMetadata
getFlagValue<T>(param: { key: string; defaultValue: T; flag?: FlagDTO; userExposed?: boolean; }): T
getFlatsDataForCampaign(campaignId: string, activate?): Promise<{ visitorId: string; campaigns: CampaignDTO[]; }>
getModification<T>(params: modificationsRequested<T>): Promise<T>
getModificationInfo(key: string): Promise<FlagDTO | null>
getModificationInfoSync(key: string): FlagDTO | null
getModifications<T>(params: modificationsRequested<T>[], activateAll?: boolean): Promise<Record<string, T>>
getModificationsForCampaign(campaignId: string, activate?): Promise<{ visitorId: string; campaigns: CampaignDTO[]; }>
getModificationsSync<T>(params: modificationsRequested<T>[], activateAll?: boolean): Record<string, T>
sendHit(hit: HitAbstract): Promise<void>
sendHit(hit: IHit): Promise<void>
sendHit(hit: HitShape): Promise<void>
sendHit(hit: HitAbstract | IHit | HitShape): Promise<void>
sendHits(hits: HitAbstract[]): Promise<void>
sendHits(hits: IHit[]): Promise<void>
sendHits(hit: HitShape[]): Promise<void>
sendHits(hits: HitAbstract[] | IHit[] | HitShape[]): Promise<void>
synchronizeModifications(): Promise<void>
updateContext(key: string, value: primitive): void
updateContext(context: Record<string, primitive>): void
visitorExposed<T>(param: { key: string; flag?: FlagDTO; defaultValue: T; }): Promise<void>