Class: ClientScope
The participant-token view of Cortex: everything the holder of one token may see about itself, and nothing else.
These are the only routes a participant token opens. They take no project id — the token already says which project, which player and (optionally) which gathering it speaks for, and the server authorises from those claims. That is also why there is no way to widen the view: a method that could read another player's data would simply be refused.
Constructors
new ClientScope()
Internal
Parameters
| Parameter | Type |
|---|---|
ctx | ClientContext |
Returns
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/client.ts:49
Methods
gathering()
Read the gathering this token is bound to, including its members.
Only the gathering in the token's gth claim is reachable, and only while
the holder is still a member — anything else is a 404.
Requires the gatherings.read scope.
Parameters
| Parameter | Type | Description |
|---|---|---|
gatheringId | string | Must be the gathering the token was issued for |
Returns
Promise<object>
| Name | Type | Description | Defined in |
|---|---|---|---|
accessPolicy | string | Description Access policy | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3795 |
autoStartSession | boolean | Description Whether session starts automatically | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3813 |
createdAt | string | Format: date-time Description Creation timestamp | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3828 |
description? | string | Description Gathering description | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3775 |
endsAt? | string | Format: date-time Description Scheduled end time | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3807 |
expiresAt? | string | Format: date-time Description Expiration timestamp | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3833 |
id | string | Description Gathering ID | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3767 |
inviterEmail? | string | Description Email address of the gathering organizer (used as Reply-To in invitation emails) | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3779 |
inviterName? | string | Description Display name of the gathering organizer | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3777 |
joinCode | string | Description Join code for sharing | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3817 |
listed | boolean | Description Whether gathering is listed for discovery | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3797 |
maxMembers | number | Description Maximum members allowed | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3791 |
memberCount | number | Description Current member count | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3793 |
members? | object[] | Description Members (included in detailed view) | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3835 |
name | string | Description Gathering name | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3773 |
ownerId? | string | Description Owner participant ID | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3823 |
projectId | string | Description Project ID | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3769 |
properties? | object | Description Custom properties | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3819 |
roomId? | string | Description Target ODIN room ID | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3811 |
sessionId? | string | Description Created session ID | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3815 |
startsAt? | string | Format: date-time Description Scheduled start time | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3802 |
status | | "active" | "pending" | "started" | "ended" | "cancelled" | "expired" | Description Gathering status | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3789 |
tenantId | string | Description Tenant ID | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3771 |
timezone? | string | Description Timezone for scheduled times | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3809 |
type | "lobby" | "appointment" | "open" | Description Gathering type | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3784 |
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/client.ts:146
identity()
Who this token belongs to, what it may do and when it expires.
Call it once after receiving a token: it confirms the token was accepted and
tells you when to fetch the next one (expiresAt).
Requires the me scope.
Returns
Promise<object>
| Name | Type | Description | Defined in |
|---|---|---|---|
displayName? | null | string | Description Display name of the participant. | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:5537 |
expiresAt | string | Description When the token expires (ISO 8601). Fetch a new one from your backend before then. Example 2026-09-22T12:15:00.000Z | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:5554 |
externalUserId | string | Description The game's own user identifier (the ext claim). Example steam:76561198000000000 | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:5530 |
gatheringId? | null | string | Description Gathering the token is bound to (the gth claim). | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:5539 |
participantId | string | Description Cortex participant UUID (the sub claim). Example 0f4a7c1e-6a5b-4f28-9f7e-2b1d6b3c9a10 | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:5525 |
projectId | string | Description Project the token is scoped to (the pid claim). Example abc123 | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:5535 |
roomId? | null | string | Description ODIN room the token is bound to (the rid claim). | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:5541 |
scopes | string[] | Description Capabilities of the token (the scp claim). Example [ "me", "messages.read" ] | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:5549 |
userData? | null | Record<string, never> | Description Arbitrary user data stored on the participant. | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:5556 |
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/client.ts:59
listMessages()
listMessages(sessionId, query)
Read one page of a session transcript — the same cursor/ETag contract as Session.listMessages, from the client side.
The session must belong to the token's project; when the token is bound to a gathering it must be that gathering's session. Anything else is a 404.
While nothing changed the call resolves to null (HTTP 304), which costs
Cortex one Redis read and no database query — poll on that.
Requires the messages.read scope.
Parameters
| Parameter | Type | Description |
|---|---|---|
sessionId | string | Session to read |
query? | object | after (cursor), limit (1–200, default 50), order, include |
query.after? | number | Description Cursor: only messages with a seq greater than this. Pass the nextCursor (or latestSeq) of the previous response. 0 or omitted starts at the beginning. |
query.include? | ("annotations" | "debugAudio")[] | Description Extras to include per message, comma-separated or repeated: annotations (plugin annotations) and/or debugAudio (the hasDebugAudio flag). Each costs one extra query; omit what you do not need. |
query.limit? | number | Description Page size (1–200). Defaults to 50. |
query.order? | "asc" | "desc" | Description asc (default) walks the transcript forward from after; desc returns the newest page first (no continuation cursor). |
Returns
Promise<MessagePage>
The page, or null when the server answered 304 Not Modified
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/client.ts:103
listMessages(sessionId, query, options)
Parameters
| Parameter | Type |
|---|---|
sessionId | string |
query | undefined | object |
options | ListMessagesOptions |
Returns
Promise<null | MessagePage>
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/client.ts:104
markReady()
Mark yourself ready in your own gathering.
The member row is resolved from the token, never from anything you pass, so this can only ever ready the caller.
Requires the gatherings.ready scope.
Parameters
| Parameter | Type | Description |
|---|---|---|
gatheringId | string | Must be the gathering the token was issued for |
Returns
Promise<object>
The updated member
| Name | Type | Description | Defined in |
|---|---|---|---|
displayName | string | Description Participant display name | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3734 |
gatheringId | string | Description Gathering ID | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3730 |
id | string | Description Member record ID | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3728 |
invitedAt? | string | Format: date-time Description When the member was invited | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3753 |
joinedAt? | string | Format: date-time Description When the member joined | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3758 |
participantId | string | Description Participant ID | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3732 |
properties? | object | Description Custom member properties | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3746 |
readyAt? | string | Format: date-time Description When the member marked as ready | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3763 |
role | "owner" | "member" | Description Member role | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3744 |
status | "invited" | "joined" | "ready" | "left" | Description Member status | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:3739 |
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/client.ts:165
sanctions()
The caller's own active sanctions, plus the two derived answers a client
usually wants: muted (may I speak?) and banned (am I out?).
Requires the sanctions.read scope.
Returns
Promise<object>
| Name | Type | Description | Defined in |
|---|---|---|---|
banned | boolean | Description Whether any active sanction bans the holder from the project. Example false | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:5570 |
muted | boolean | Description Whether any active sanction prevents speaking (mute, listen_only, or a ban). Example false | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:5565 |
sanctions | object[] | Description Currently active sanctions of the token holder. | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:5560 |
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/client.ts:71