Skip to main content
Latest
class Flagship
Re-export
import { Flagship } from "https://deno.land/x/flagship_io_js_sdk@3.3.2/index.ts";

Constructors

new
private
Flagship()

Properties

private
_config: IFlagshipConfig
private
_configManager: IConfigManager
private
_status: FlagshipStatus
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: FlagshipStatus): void

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.

newVisitor(visitorId?: string | null, context?: Record<string, primitive>): Visitor

Create a new visitor with a context.

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.

newVisitor(visitorId?: string | null, context?: Record<string, primitive>): Visitor

Create a new visitor with a context.

Create a new visitor with a context.

newVisitor(param1?: NewVisitor | string | null, param2?: Record<string, primitive>): Visitor
start(
envId: string,
apiKey: string,
config?: IDecisionApiConfig | IBucketingConfig | IEdgeConfig,
): Flagship

Start the flagship SDK, with a custom configuration implementation