class Visitor
implements IVisitor
extends EventEmitter
import { Visitor } from "https://deno.land/x/flagship_io_js_sdk@3.1.3/visitor/index.ts";
Methods
activateModification(key: string): Promise<void>
activateModifications(keys: { key: string; }[]): Promise<void>
activateModifications(keys: string[]): Promise<void>
activateModifications(params: Array<{ key: string; }> | Array<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>
getFlagsDataArray(): FlagDTO[]
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>>
getModificationsArray(): FlagDTO[]
getModificationsForCampaign(campaignId: string, activate?): Promise<{ visitorId: string; campaigns: CampaignDTO[]; }>
getModificationsSync<T>(params: modificationsRequested<T>[], activateAll?: boolean): Record<string, T>
getModificationSync<T>(params: modificationsRequested<T>): T
sendHit(hit: HitAbstract): Promise<void>
sendHit(hit: IHit): Promise<void>
sendHit(hit: HitShape): Promise<void>
sendHit(hit: IHit | HitAbstract | 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>
setConsent(hasConsented: boolean): void
synchronizeModifications(): Promise<void>
unauthenticate(): void
updateContext(key: string, value: primitive): void
updateContext(context: Record<string, primitive>): void