Skip to main content
Go to Latest
interface IFlagshipConfig
Re-export
import { type IFlagshipConfig } from "https://deno.land/x/flagship_io_js_sdk@3.2.3/mod.ts";

Properties

optional
envId: string

Specify the environment id provided by Flagship, to use.

optional
apiKey: string

Specify the secure api key provided by Flagship, to use.

optional
timeout: number

Specify timeout in seconds for api request. Default is 2s.

optional
logLevel: LogLevel

Set the maximum log level to display

optional
decisionMode: DecisionMode

Specify the SDK running mode. BUCKETING or DECISION_API

optional
statusChangedCallback: (status: FlagshipStatus) => void

Define a callable in order to get callback when the SDK status has changed.

optional
logManager: IFlagshipLogManager

Specify a custom implementation of LogManager in order to receive logs from the SDK.

optional
fetchNow: boolean

Decide to fetch automatically modifications data when creating a new FlagshipVisitor

optional
pollingInterval: number

Specify delay between two bucketing polling. Default is 2s.

Note: If 0 is given then it should poll only once at start time.

optional
fetchThirdPartyData: boolean
optional
enableClientCache: boolean

Indicates whether enables or disables the client cache manager. By enabling the client cache, it will allow you to keep cross sessions visitor experience.

optional
onBucketingSuccess: (param: { status: number; payload: BucketingDTO; }) => void

Define a callable in order to get callback when the first bucketing polling succeed.

optional
onBucketingFail: (error: Error) => void

Define a callable to get callback when the first bucketing polling failed.

optional
onBucketingUpdated: (lastUpdate: Date) => void

Define a callable to get callback each time bucketing data from Flagship has updated.

optional
initialBucketing: BucketingDTO

This is a set of flag data provided to avoid the SDK to have an empty cache during the first initialization.

optional
decisionApiUrl: string
optional
hitDeduplicationTime: number

Specify delay in seconds of hit deduplication. After a hit is sent, all future sending of this hit will be blocked until the expiration of the delay.

Note: if 0 is given, no deduplication process will be used

optional
visitorCacheImplementation: IVisitorCacheImplementation

Define an object that implement the interface visitorCacheImplementation, to handle the visitor cache.

optional
hitCacheImplementation: IHitCacheImplementation

Define an object that implement the interface IHitCacheImplementation, to handle the visitor cache.

optional
disableCache: boolean

If it's set to true, hit cache and visitor cache will be disabled otherwise will be enabled.

optional
language: 0 | 1 | 2
optional
trackingMangerConfig: ITrackingManagerConfig

Define options to configure hit batching

optional
deprecated
onUserExposure: (param: UserExposureInfo) => void

Define a callable to get callback each time a Flag have been user exposed (activation hit has been sent) by SDK

optional
onVisitorExposed: (arg: OnVisitorExposed) => void
optional
sdkVersion: string
optional
onLog: (
level: LogLevel,
tag: string,
message: string,
) => void

Define a callable to get a callback whenever the SDK needs to report a log