This version (v0.7) has not been published to npm yet.
Skip to content

Reference / @getenginex/sdk / EnginexClient

EnginexClient ​

EngineX SDK client: one object per app (browser) or per request (server).

Properties ​

auth ​

readonly auth: AuthApi

Sign-up, login, verification, password and 2FA.


config ​

readonly config: ConfigApi

The operator's public configuration.


deposits ​

readonly deposits: DepositsApi

Deposits via PIX.


kyc ​

readonly kyc: KycApi

Identity verification (KYC): status and document upload.


notifications ​

readonly notifications: NotificationsApi

The player's notifications and channel preferences.


pixKeys ​

readonly pixKeys: PixKeysApi

The player's PIX keys, the destination of withdrawals.


profile ​

readonly profile: ProfileApi

The player's profile and their login sessions.


responsibleGambling ​

readonly responsibleGambling: ResponsibleGamblingApi

Responsible gambling: limits, self-exclusion and reality check.


session ​

readonly session: SessionApi

Current session.


wallet ​

readonly wallet: WalletApi

Wallet balance and statement.


withdrawals ​

readonly withdrawals: WithdrawalsApi

Withdrawals via PIX, with OTP confirmation when the operator requires it.

Methods ​

dispose() ​

dispose(): void

Disposes the client: releases the session subscription on the tokenStore (removes the storage listener of localStorageTokenStore when this was the last one) and cancels nothing in flight. Once called, every method of this client rejects with an EnginexError CONFIGURATION_ERROR and session.subscribe becomes a no-op (it does not add the listener; the returned unsubscribe does not throw). Idempotent. Use it when unmounting a client created per request (e.g. tests, short-lived scripts) so as not to leave the storage listener hanging.

Returns ​

void

Example ​

ts
client.dispose()

setLocale() ​

setLocale(locale): void

Switches the language sent in Accept-Language. The next requests already go out with the new locale — including the retry of a call already in flight (after a renewed 401): only the attempt that was already sent to fetch keeps the old locale.

Parameters ​

locale ​

string

Returns ​

void

Example ​

ts
client.setLocale('en-US')