Skip to main content

Interface: ClientContext

Shared context passed to all resource managers and live objects.

Properties​

PropertyModifierTypeDescriptionDefined in
httpClientreadonlyClient<paths, `${string}/${string}`>The configured openapi-fetch client instance4Players/cortex-typescript-sdk/src/internal.ts:22

Methods​

getRealtimeConnection()​

getRealtimeConnection(projectId?): RealtimeConnection

Internal

Get (or lazily create) the shared, ref-counted realtime connection for a project. Pass undefined for the tenant-wide stream. Subscribers filter client-side; the connection closes when its last subscriber unsubscribes.

Parameters​

ParameterType
projectId?string

Returns​

RealtimeConnection

Defined in​

4Players/cortex-typescript-sdk/src/internal.ts:31


handleError()​

handleError(operation, error): never

Centralized error handler — always throws

Parameters​

ParameterType
operationstring
errorunknown

Returns​

never

Defined in​

4Players/cortex-typescript-sdk/src/internal.ts:24