Hierarchy

  • LDOptions
    • LDOptions

Properties

allAttributesPrivate?: boolean
applicationInfo?: {
    id?: string;
    name?: string;
    version?: string;
    versionName?: string;
}

Type declaration

  • Optional id?: string
  • Optional name?: string
  • Optional version?: string
  • Optional versionName?: string
baseUri?: string
capacity?: number
cleanOldPersistentData?: boolean
dataSystem?: LDClientDataSystemOptions
debug?: boolean
diagnosticOptOut?: boolean
diagnosticRecordingInterval?: number
disableCache?: boolean
enableEventCompression?: boolean

Set to true to opt in to compressing event payloads if the SDK supports it.

Defaults to false.

eventsUri?: string
flushInterval?: number
hash?: string

The Secure Mode hash for the configured context.

This value can be overridden on a per-identify basis via NodeIdentifyOptions.hash.

hooks?: Hook[]
initialConnectionMode?: ConnectionMode

Sets the mode to use for connections when the SDK is initialized.

Remarks

Possible values are offline, streaming, or polling. See ConnectionMode for more information.

Defaults to streaming.

This option applies only when the FDv2 data system is not configured. When dataSystem is set, the FDv2 data system owns the initial connection mode and this option is ignored; a warning is logged in that case. Use dataSystem.automaticModeSwitching.initialConnectionMode (with automaticModeSwitching.type set to 'manual') to set the initial connection mode for the FDv2 data system.

inspectors?: LDInspection[]
localStoragePath?: string

Directory for the built-in file-backed persistent flag and anonymous-key cache.

Defaults to <process.cwd()>/ldclient-user-cache. Ignored when storage is also set - a warning will be logged in that case.

logger?: LDLogger
maxCachedContexts?: number
payloadFilterKey?: string
plugins?: LDPlugin[]

A list of plugins to be used with the SDK.

Plugin support is currently experimental and subject to change.

pollInterval?: number
privateAttributes?: string[]
sendEvents?: boolean
storage?: LDStorage

Custom storage implementation for the persistent flag and anonymous-key cache.

When provided, the SDK uses this implementation instead of the built-in file-backed storage. Use localStoragePath if you only need to change the directory used by the default file-backed storage.

Setting both storage and localStoragePath is not supported. When both are present, storage takes precedence and localStoragePath is ignored.

streamInitialReconnectDelay?: number
streamUri?: string
tlsParams?: LDTLSOptions

Additional parameters to pass to the Node HTTPS API for secure requests. These can include any of the TLS-related parameters supported by https.request(), such as ca, cert, and key.

For more information, see the Node documentation for https.request() and tls.connect().

useMobileKey?: boolean

If true, the credential passed to createClient is treated as a mobile key rather than a client-side ID. The SDK then uses the mobile event paths (/mobile, /mobile/events/diagnostic), the mobile FDv1 data source endpoints (/msdk/evalx/..., /meval/...), and the 'mobileKey' credential type. The credential is sent as an Authorization header rather than embedded in URLs.

Defaults to false (client-side ID mode).

Note: secure mode (NodeOptions.hash) is not supported in mobile key mode. Setting both useMobileKey: true and hash will cause createClient to throw.

useReport?: boolean
withReasons?: boolean
wrapperName?: string
wrapperVersion?: string

Generated using TypeDoc