import { DefaultStrategy } from "https://deno.land/x/flagship_io_js_sdk@3.0.12/visitor/index.ts";
Methods
private
activate(key: string)private
checkAndGetModification<T>(params: modificationsRequested<T>, activateAll?: boolean): Tprivate
checkPredefinedContext(key: string, value: primitive): boolean | nullprivate
getHit(hit: IHit | BatchDTO): HitAbstract | nullprivate
getHitLegacy(hit: HitShape)private
isDeDuplicated(key: string, deDuplicationTime: number): booleanprivate
prepareAndSendHit(hit: | IHit
| HitShape
| HitAbstract
| BatchDTO
private
updateContextKeyValue(key: string, value: primitive): voidUpdate the visitor context values, matching the given keys, used for targeting.
A new context value associated with this key will be created if there is no previous matching value. Context key must be String, and value type must be one of the following : Number, Boolean, String.
protected
fetchVisitorCampaigns(visitor: VisitorDelegate): CampaignDTO[] | nullprotected
globalFetchFlags(functionName: string): Promise<void>protected
logDeactivateOnBucketing(functionName: string): voidprotected
onUserExposedCallback(unnamed 0: { flag: FlagDTO; visitor: IVisitor; }): voidprotected
sendActivate(flag: FlagDTO, functionName?): Promise<void>activateModification(params: 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: boolean): Promise<{ visitorId: string; campaigns: CampaignDTO[]; }>
deprecated
getAllModifications(activate?): Promise<{ visitorId: string; campaigns: CampaignDTO[]; }>returns a Promise containing all the data for all the campaigns associated with the current visitor.
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: boolean): 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>>
deprecated
getModificationsForCampaign(campaignId: string, activate?): Promise<{ visitorId: string; campaigns: CampaignDTO[]; }>Get data for a specific campaign.
getModificationsSync<T>(params: modificationsRequested<T>[], activateAll?: boolean): Record<string, T>
getModificationSync<T>(params: modificationsRequested<T>): T
sendHit(hit: BatchDTO): Promise<void>
sendHit(hit: HitAbstract): Promise<void>
sendHit(hit: IHit): Promise<void>
sendHit(hit: HitShape): Promise<void>
sendHits(hits: BatchDTO[]): Promise<void>
sendHits(hits: HitAbstract[]): Promise<void>
sendHits(hits: IHit[]): Promise<void>
sendHits(hits: HitShape[]): Promise<void>
synchronizeModifications(): Promise<void>
unauthenticate(): void
updateContext(context: Record<string, primitive>): void
userExposed<T>(param: { key: string; flag?: FlagDTO; defaultValue: T; }): Promise<void>