Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Latest
class Flagship
Re-export
import { Flagship } from "https://deno.land/x/flagship_io_js_sdk@4.0.1/index.ts";

The Flagship class represents the SDK. It facilitates the initialization process and creation of new visitors.

Constructors

new
private
Flagship()

Properties

private
_config: IFlagshipConfig
private
_configManager: IConfigManager
private
_status: FSSdkStatus
private
optional
_visitorInstance: Visitor
private
configManager: IConfigManager
private
instanceId: string
private
lastInitializationTimestamp: string

Methods

private
buildConfig(config?: IDecisionApiConfig | IBucketingConfig | IEdgeConfig): FlagshipConfig
private
buildDecisionManager(
flagship: Flagship,
config: FlagshipConfig,
httpClient: HttpClient,
): DecisionManager
protected
setStatus(status: FSSdkStatus): void

When called, it will batch and send all hits that are in the pool before the application is closed

Return the current config set by the customer and used by the SDK.

Return current status of Flagship SDK.

getVisitor(): Visitor | undefined

Return the last visitor created if isNewInstance key is false. Return undefined otherwise.

Creates a new Visitor instance.

Static Properties

private
_instance: Flagship

Static Methods

protected
getInstance(): Flagship

When called, it will batch and send all hits that are in the pool before the application is closed

Return the current config set by the customer and used by the SDK.

Return current status of Flagship SDK.

getVisitor(): Visitor | undefined

Return the last visitor created if isNewInstance key is false. Return undefined otherwise.

Creates a new Visitor instance.

start(
envId: string,
apiKey: string,
config?: IDecisionApiConfig | IBucketingConfig | IEdgeConfig,
): Flagship

Start the flagship SDK, with a custom configuration implementation