class DefaultStrategy
extends VisitorStrategyAbstract
import { DefaultStrategy } from "https://deno.land/x/flagship_io_js_sdk@3.1.3/visitor/DefaultStrategy.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): HitAbstract | nullprivate
getHitLegacy(hit: HitShape)private
isDeDuplicated(key: string, deDuplicationTime: number): booleanprivate
prepareAndSendHit(hit: IHit | HitShape | HitAbstract, functionName?)private
updateContextKeyValue(key: string, value: primitive): voidprotected
fetchVisitorCampaigns(visitor: VisitorDelegate): CampaignDTO[] | nullprotected
globalFetchFlags(functionName: string): Promise<void>protected
logDeactivateOnBucketing(functionName: string): voidprotected
onUserExposedCallback(unnamed 0: { flag: FlagDTO; visitor: IVisitor; }): voidprotected
sendActivate(flagDto: FlagDTO): 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: HitAbstract): Promise<void>
sendHits(hits: HitAbstract[]): Promise<void>
synchronizeModifications(): Promise<void>
unauthenticate(): void
updateContext(key: string, value: primitive): void
updateContext(context: Record<string, primitive>): void
userExposed<T>(param: { key: string; flag?: FlagDTO; defaultValue: T; }): Promise<void>