import { type IFlagshipConfig } from "https://deno.land/x/flagship_io_js_sdk@4.0.2/config/IFlagshipConfig.ts";
Represents the configuration options for the Flagship SDK.
Properties
The maximum log level to display.
The SDK running mode. Can be "BUCKETING", "DECISION_API" or "BUCKETING_EDGE".
A callback function to be called when the SDK status has changed.
A custom implementation of the LogManager interface to receive logs from the SDK.
Determines whether to automatically fetch modification data when creating a new FlagshipVisitor.
Bucketing mode only
The delay in seconds between two bucketing polling requests.
If 0 is given, it will only poll once at start time.
Default value is 5 seconds.
Bucketing mode only
If true, the SDK will fetch the visitor's segment from the universal data connector each time fetchFlags
is called and append those segments in the visitor context.
client-side only
If true, the SDK will save the visitor ID and/or anonymous ID in the local storage and reuse it for the next session if visitorId
is not set, to maintain cross-session visitor experience.
Default value is true.
A callback function to be called when the first bucketing polling succeeds.
A callback function to be called when the first bucketing polling fails.
A callback function to be called each time bucketing data from Flagship has been updated.
An object containing the data received when fetching the bucketing endpoint. Providing this object will make bucketing ready to use and the first polling will immediately check for updates.
The delay in seconds for hit deduplication. After a hit is sent, any future attempts to send the same hit will be blocked until the specified delay has expired. If a value of 0 is given, no deduplication process will be used.
An object that implements the IVisitorCacheImplementation interface to handle the visitor cache.
An object that implements the IHitCacheImplementation interface to manage hits cache.
If set to true, hit cache and visitor cache will be disabled; otherwise, they will be enabled.
Options to configure hit batching.
A callback function to be called each time a flag is exposed to a visitor (i.e., when an activation hit is sent by the SDK).
In Next.js 13, you can define the time in seconds for storing SDK route cache before revalidation.
The delay in seconds for buffering fetch flags calls. After the SDK has fetched flags, they will be buffered for the specified delay. During this delay, any subsequent fetch flags calls will return the same flags. If a value of 0 is given, no buffering process will be used. If visitor data has changed, the buffering will be bypassed.