Class: Session
A live Session object. Every field from the API response is available directly
on the object (e.g. session.title, session.status), and the object also
exposes action methods (start(), stop(), getMessages(), watch(), …).
Extends
Constructors
new Session()
Internal
Parameters
| Parameter | Type | Description |
|---|---|---|
ctx | ClientContext | - |
_projectId | string | - |
data | object | - |
data.createdAt | string | Format: date-time Description Creation timestamp Example 2023-10-01T10:00:00Z |
data.createdByUserId | string | Description ID of the user who created the session Example user_123 |
data.endedAt? | null | string | Format: date-time Description When the session was stopped. Set the first time the session goes to inactive (manual stop, the owning gathering ending or being cancelled, or the bot idle timeout) and cleared again if the session is restarted. Null while the session is running, and for sessions created with autoStart: false that were never started. Example 2023-10-01T11:30:00Z |
data.externalRoomId | string | Description External Room ID Example room_abc123 |
data.gateway | string | Description ODIN Gateway URL Example gateway.odin.4players.io |
data.id | string | Description Session ID Example sess_789 |
data.idleTimeout? | number | Description Idle timeout in seconds. 0 or null means no auto-stop. Example 300 |
data.projectId | string | Description Project ID Example proj_123 |
data.status | string | Description Session Status Example active |
data.tenantId | string | Description Tenant ID Example tenant_456 |
data.title | string | Description Session Title Example Daily Standup |
Returns
Inherited from
SessionResponse.constructor
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:179
Properties
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
createdAt | string | Format: date-time Description Creation timestamp Example 2023-10-01T10:00:00Z | SessionResponse.createdAt | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2032 |
createdByUserId | string | Description ID of the user who created the session Example user_123 | SessionResponse.createdByUserId | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2026 |
endedAt? | null | string | Format: date-time Description When the session was stopped. Set the first time the session goes to inactive (manual stop, the owning gathering ending or being cancelled, or the bot idle timeout) and cleared again if the session is restarted. Null while the session is running, and for sessions created with autoStart: false that were never started. Example 2023-10-01T11:30:00Z | SessionResponse.endedAt | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2043 |
externalRoomId | string | Description External Room ID Example room_abc123 | SessionResponse.externalRoomId | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2006 |
gateway | string | Description ODIN Gateway URL Example gateway.odin.4players.io | SessionResponse.gateway | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2016 |
id | string | Description Session ID Example sess_789 | SessionResponse.id | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:1996 |
idleTimeout? | number | Description Idle timeout in seconds. 0 or null means no auto-stop. Example 300 | SessionResponse.idleTimeout | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2048 |
projectId | string | Description Project ID Example proj_123 | SessionResponse.projectId | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2011 |
status | string | Description Session Status Example active | SessionResponse.status | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2037 |
tenantId | string | Description Tenant ID Example tenant_456 | SessionResponse.tenantId | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2001 |
title | string | Description Session Title Example Daily Standup | SessionResponse.title | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2021 |
Accessors
data
The raw API response object.
Deprecated
The response fields are now available directly on this object
(e.g. session.title instead of session.data.title). This accessor will be
removed before the stable release.
Returns
object
| Name | Type | Description | Defined in |
|---|---|---|---|
createdAt | string | Format: date-time Description Creation timestamp Example 2023-10-01T10:00:00Z | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2032 |
createdByUserId | string | Description ID of the user who created the session Example user_123 | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2026 |
endedAt? | null | string | Format: date-time Description When the session was stopped. Set the first time the session goes to inactive (manual stop, the owning gathering ending or being cancelled, or the bot idle timeout) and cleared again if the session is restarted. Null while the session is running, and for sessions created with autoStart: false that were never started. Example 2023-10-01T11:30:00Z | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2043 |
externalRoomId | string | Description External Room ID Example room_abc123 | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2006 |
gateway | string | Description ODIN Gateway URL Example gateway.odin.4players.io | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2016 |
id | string | Description Session ID Example sess_789 | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:1996 |
idleTimeout? | number | Description Idle timeout in seconds. 0 or null means no auto-stop. Example 300 | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2048 |
projectId | string | Description Project ID Example proj_123 | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2011 |
status | string | Description Session Status Example active | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2037 |
tenantId | string | Description Tenant ID Example tenant_456 | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2001 |
title | string | Description Session Title Example Daily Standup | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2021 |
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:195
Methods
downloadDebugAudio()
Download the debug audio WAV file that was sent to the transcription API for a specific message. Only available when debug audio is enabled on the project settings and within the 24-hour retention window. Use this to investigate transcription quality issues (audio glitches, noise, etc).
Check message.hasDebugAudio on a Message to determine whether a
recording is available before calling this method.
Parameters
| Parameter | Type | Description |
|---|---|---|
messageId | string | Message ID whose debug audio should be downloaded |
Returns
Promise<Blob>
WAV audio data as a Blob
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:327
getActions()
Get available plugin actions for this session, grouped by the plugin that contributes them. Use this to render action menus (e.g. "Generate minutes").
Returns
Promise<object>
The session's available plugin actions
| Name | Type | Description | Defined in |
|---|---|---|---|
plugins | object[] | Description Plugins (with their actions) available for this session | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2151 |
sessionId | string | Description Session ID the actions apply to | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2149 |
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:230
getMessages()
Get the whole message transcript for this session, in order, with the
hasDebugAudio flag on every message. This is the full-list read: fine for
showing a finished session, wrong for polling — use listMessages
(cursor + ETag) for anything that runs in a loop.
Returns
Promise<object[]>
Array of messages
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:246
listMessages()
listMessages(query)
Read one page of the transcript by cursor — the read built for polling.
Every message has a per-session seq. Ask for after: <seq> to get only
newer messages, keep latestSeq of the response as the next after, and
pass it (or the page's etag) as ifNoneMatch: while nothing changed the
call resolves to null (HTTP 304), which costs Cortex one Redis read and no
database query. include attaches plugin annotations and/or the
hasDebugAudio flag per message; both are omitted unless asked for.
Parameters
| Parameter | Type | Description |
|---|---|---|
query? | object | after (cursor), limit (1–200, default 50), order (asc walks forward, desc newest first), 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/sessions.ts:279
listMessages(query, options)
Parameters
| Parameter | Type |
|---|---|
query | undefined | object |
options | ListMessagesOptions |
Returns
Promise<null | MessagePage>
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:280
regenerateSummary()
Regenerate the summary for this session
Returns
Promise<void>
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:307
start()
Start this session (command the bot to join the room)
Returns
Promise<object>
Start confirmation
| Name | Type | Description | Defined in |
|---|---|---|---|
message | string | Description Status message Example Bot start command sent | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2088 |
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:203
stop()
Stop this session (command the bot to leave the room)
Returns
Promise<object>
Stop confirmation
| Name | Type | Description | Defined in |
|---|---|---|---|
message | string | Description Status message Example Bot stop command sent | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2095 |
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:216
watch()
Live-subscribe to this session. The initial value is loaded via REST, then
kept in sync over SSE; current becomes undefined if the session is deleted.
Returns
DocumentSubscription<object>
A DocumentSubscription for this session
| Name | Type | Description | Defined in |
|---|---|---|---|
createdAt | string | Format: date-time Description Creation timestamp Example 2023-10-01T10:00:00Z | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2032 |
createdByUserId | string | Description ID of the user who created the session Example user_123 | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2026 |
endedAt? | null | string | Format: date-time Description When the session was stopped. Set the first time the session goes to inactive (manual stop, the owning gathering ending or being cancelled, or the bot idle timeout) and cleared again if the session is restarted. Null while the session is running, and for sessions created with autoStart: false that were never started. Example 2023-10-01T11:30:00Z | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2043 |
externalRoomId | string | Description External Room ID Example room_abc123 | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2006 |
gateway | string | Description ODIN Gateway URL Example gateway.odin.4players.io | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2016 |
id | string | Description Session ID Example sess_789 | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:1996 |
idleTimeout? | number | Description Idle timeout in seconds. 0 or null means no auto-stop. Example 300 | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2048 |
projectId | string | Description Project ID Example proj_123 | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2011 |
status | string | Description Session Status Example active | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2037 |
tenantId | string | Description Tenant ID Example tenant_456 | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2001 |
title | string | Description Session Title Example Daily Standup | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2021 |
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:348
watchMessageAnnotations()
Live-subscribe to message annotations for this session's messages.
The initial snapshot fetches the session's messages and batches their
annotations from the plugin catalog. message.annotation.created events
fold new annotations in as plugins emit them.
Note: message.annotation.created is message-scoped (its resourceId
is message:{id}, not the session) and the reducer can't cheaply verify
which session a given messageId belongs to. Consumers should group the
returned annotations by messageId and only render the ones for messages
they already know belong to this session — i.e. pair this watch with
watchMessages or getMessages and use that messageId set as the
filter on the rendering side.
Returns
CollectionSubscription<object>
A CollectionSubscription of MessageAnnotations.
| Name | Type | Description | Defined in |
|---|---|---|---|
createdAt | string | Format: date-time Description Creation timestamp | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2173 |
data | object | Description Annotation data | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2166 |
id | string | Description Annotation UUID | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2155 |
messageId | string | Description Message ID this annotation is attached to | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2175 |
pluginInstanceId? | string | Description Plugin instance that created this | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2159 |
tenantId | string | Description Tenant ID | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2157 |
type | "profanity" | "summary" | "action_items" | "sentiment" | Description Annotation type | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2164 |
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:415
watchMessages()
Live-subscribe to this session's transcript. The initial messages are loaded
via REST, then new messages are appended as they are transcribed (kept
in chronological order to match getMessages()'s server-side ordering).
Returns
CollectionSubscription<object>
A CollectionSubscription of messages
| Name | Type | Description | Defined in |
|---|---|---|---|
annotations? | object[] | Description Plugin annotations of this message. Only present when the request includes annotations. | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2226 |
content | string | Description Message content Example Hello team! | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2213 |
externalUserId? | null | string | Description External user ID of the speaker from ODIN (null for system messages) | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2203 |
hasDebugAudio | boolean | Description Whether a debug audio WAV file is available for download. Only computed when the request includes debugAudio (or on the legacy full-list read); otherwise omitted. Default false | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2224 |
id | string | Description Message ID Example msg_123 | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2182 |
participantId? | null | string | Description Participant who spoke (null for system messages) | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2201 |
senderName | string | Description Sender name (or [System] for system messages) Example Alice | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2208 |
seq | number | Description Per-session sequence number, starting at 1 and gap-free. Use it as the after cursor of the messages route and as the value of If-None-Match when polling. Example 42 | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2192 |
sessionId | string | Description Session ID Example sess_789 | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2187 |
timestamp | string | Format: date-time Description Timestamp Example 2023-10-01T10:05:00Z | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2219 |
type | "user" | "system" | Description Message type: user (transcribed speech) or system (join/leave events) Default user Example user @enum {string} | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2199 |
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:358
watchSessionAnnotations()
Live-subscribe to session-level annotations for this session (summaries,
action items, etc.). The initial snapshot fetches the existing annotations
from the plugin catalog and session.annotation.created events scoped to
this session (resourceId === session:{id}) fold new ones in.
Returns
CollectionSubscription<object>
A CollectionSubscription of SessionAnnotations.
| Name | Type | Description | Defined in |
|---|---|---|---|
createdAt | string | Format: date-time Description Creation timestamp | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2588 |
data | object | Description Annotation data | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2581 |
id | string | Description Annotation UUID | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2570 |
pluginInstanceId? | string | Description Plugin instance that created this | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2574 |
sessionId | string | Description Session ID this annotation is attached to | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2590 |
tenantId | string | Description Tenant ID | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2572 |
type | "profanity" | "summary" | "action_items" | "sentiment" | Description Annotation type | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2579 |
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:483