Private
Optional
_Private
currentPrivate
initializedPrivate
sdkPrivate
tokenGet the token storage path (lazy-loaded).
Token storage file path
Smart method dispatcher with automatic case conversion. Handles special cases for login/logout/whoami and serializes results for IPC.
Method name (snake_case or camelCase)
Method arguments
Serialized result safe for IPC transmission
Private
clearClear stored token.
Get SDK configuration for debugging.
SDK configuration object
Get direct SDK access for complex operations.
DatalayerClient instance
Initialize the SDK bridge. Restores authentication from stored token if available. Call after app is ready.
Check if user is authenticated.
True if authenticated
Check if SDK is initialized.
True if initialized
Private
loadLoad stored token from secure storage with fallback support. Handles both system-encrypted tokens and fallback base64-encoded tokens.
Decrypted token or null if not found
Private
saveSave token securely using Electron's safeStorage with fallback. Falls back to base64 encoding if system encryption is unavailable (common on Linux).
Authentication token to save
Private
serializeSerialize data for safe IPC transmission. Converts SDK models using toJSON() method.
Data to serialize
IPC-safe serialized data
Private
toConvert snake_case to camelCase.
String to convert
Camel-cased string
Direct SDK bridge with smart method dispatching. Provides direct SDK access with IPC-safe serialization and secure token storage.