Skip to Content

CreateCustomerClientConfig

type CreateCustomerClientConfig = object;

Everything a CustomerClient is configured with. Every field is optional.

Properties

appApiUrl?

appApiUrl?: string;

Override the resolved app API URL (rare; mostly for testing).


authentication?

authentication?: CustomerAuthentication;

How the customer authenticates. Without it, set a session with session.set().


customServerUrl?

customServerUrl?: string;

The project’s own authentication server, for customServer.


environment?

environment?: ModemEnvironment;

Target environment for the Modem services. Selects URL presets unless overridden by gatewayBaseUrl / appApiUrl or the PRETERNATURAL_MODEM_GATEWAY_URL / PRETERNATURAL_MODEM_APP_BACKEND_URL env vars. Defaults to PRETERNATURAL_MODEM_ENV. Construction throws if no environment or URL resolves.


gatewayBaseUrl?

gatewayBaseUrl?: string;

Override the resolved gateway base URL (rare; mostly for testing).


projectId?

projectId?: string;

A session that names a project, or a synthetic customer’s project, overrides it.


sandboxMode?

sandboxMode?: boolean;

Whether the client starts in sandbox mode, until a session says otherwise. Orthogonal to environment. Defaults to false, and to true for a synthetic customer, which cannot be false.


sessionStore?

sessionStore?: CustomerSessionStore;

Such as localStorageSessionStore(). Used at startup only when authentication holds no session or synthetic customer.


transport?

transport?: TransportConfig;
Last updated on