Class: CortexClient
Shared context passed to all resource managers and live objects.
Implements
Constructors
new CortexClient()
Parameters
| Parameter | Type |
|---|---|
config | CortexClientConfig |
Returns
Defined in
4Players/cortex-typescript-sdk/src/client.ts:71
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
httpClient | readonly | Client<paths, `${string}/${string}`> | Internal | 4Players/cortex-typescript-sdk/src/client.ts:64 |
Accessors
apiKeys
API key management
Returns
Defined in
4Players/cortex-typescript-sdk/src/client.ts:225
auth
Authentication operations (login, profile)
Returns
Defined in
4Players/cortex-typescript-sdk/src/client.ts:219
pluginCatalog
Global plugin catalog and annotations
Returns
Defined in
4Players/cortex-typescript-sdk/src/client.ts:231
Methods
generateToken()
Generate an access token (legacy)
Parameters
| Parameter | Type | Description |
|---|---|---|
body | object | Token generation payload |
body.projectId | string | Description The Project ID (API Key) |
body.roomId | string | Description The Room ID |
body.secret | string | Description The Project Secret |
Returns
Promise<object>
Generated token
| Name | Type | Description | Defined in |
|---|---|---|---|
token | string | Description The generated access token | 4Players/cortex-typescript-sdk/src/types.ts:2853 |
Defined in
4Players/cortex-typescript-sdk/src/client.ts:251
getRealtimeConnection()
Internal
Parameters
| Parameter | Type |
|---|---|
projectId? | string |
Returns
RealtimeConnection
Implementation of
ClientContext.getRealtimeConnection
Defined in
4Players/cortex-typescript-sdk/src/client.ts:187
handleError()
Internal
Parameters
| Parameter | Type |
|---|---|
operation | string |
error | unknown |
Returns
never
Implementation of
Defined in
4Players/cortex-typescript-sdk/src/client.ts:142
healthCheck()
Health check
Returns
Promise<void>
void — confirms the API is running
Defined in
4Players/cortex-typescript-sdk/src/client.ts:241
openEventStream()
Internal
Open a raw event stream for a project (or tenant-wide when projectId is
omitted). Streams through the authenticated openapi-fetch client so all auth
middleware (API key / Bearer / HMAC) applies. Throws a Cortex*Error on a
non-OK response.
Parameters
| Parameter | Type |
|---|---|
projectId | undefined | string |
signal | AbortSignal |
Returns
Promise<ReadableStream<Uint8Array>>
Defined in
4Players/cortex-typescript-sdk/src/client.ts:155
project()
Scope all project-specific resources to a single project. Returns a new ProjectScope each time (stateless, cheap).
Parameters
| Parameter | Type | Description |
|---|---|---|
projectId | string | Project ID |
Returns
ProjectScope with access to all project-scoped resource managers
Defined in
4Players/cortex-typescript-sdk/src/client.ts:211