Optional allOptional applicationOptional id?: stringOptional name?: stringOptional version?: stringOptional versionOptional baseOptional capacityOptional cleanOptional dataOptional debugOptional diagnosticOptional diagnosticOptional disableOptional enableOptional eventsOptional flushOptional hashThe Secure Mode hash for the configured context.
This value can be overridden on a per-identify basis via NodeIdentifyOptions.hash.
Optional hooksOptional initialSets the mode to use for connections when the SDK is initialized.
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.
Optional inspectorsOptional localDirectory 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.
Optional loggerOptional maxOptional payloadOptional pluginsA list of plugins to be used with the SDK.
Plugin support is currently experimental and subject to change.
Optional pollOptional privateOptional sendOptional storageCustom 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.
Optional streamOptional streamOptional tlsAdditional 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().
Optional useIf 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.
Optional useOptional withOptional wrapperOptional wrapperGenerated using TypeDoc
Set to true to opt in to compressing event payloads if the SDK supports it.
Defaults to false.