Class: SessionManager
Manages session resources for a project.
Constructors
new SessionManager()
Internal
Parameters
| Parameter | Type |
|---|---|
ctx | ClientContext |
projectId | string |
Returns
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:57
Methods
create()
Create a new session
Parameters
| Parameter | Type | Description |
|---|---|---|
body | object | Session creation payload |
body.autoStart? | boolean | Description Whether to automatically start the bot after session creation. Defaults to true when omitted; set to false to disable. Example true |
body.externalRoomId | string | Description External Room ID Example room_abc123 |
body.gateway? | string | Description ODIN Gateway URL Example gateway.odin.4players.io |
body.idleTimeout? | number | Description Idle timeout in seconds. If > 0, session auto-stops after this duration with no participants. 0 or omitted means no auto-stop. Example 300 |
body.title | string | Description Title of the session Example Daily Standup |
Returns
Promise<Session>
Live Session object
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:99
get()
Get a session by ID
Parameters
| Parameter | Type | Description |
|---|---|---|
sessionId | string | Session ID |
Returns
Promise<Session>
Live Session object
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:113
list()
List all sessions for this project (newest first, no paging). For projects with many sessions prefer listPaged.
Returns
Promise<object[]>
Array of sessions
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:67
listPaged()
List sessions one page at a time, newest first, optionally filtered by
status. Pass the returned nextCursor back as cursor until it is null.
Parameters
| Parameter | Type | Description |
|---|---|---|
query | object | status (active / inactive), limit (1–200, default 50), cursor |
query.cursor? | string | Description Opaque cursor from the nextCursor of the previous page. Sessions are listed newest first. |
query.limit? | number | Description Page size (1–200). Defaults to 50. |
query.status? | "active" | "inactive" | Description Only sessions with this status |
Returns
Promise<object>
One page of sessions and the cursor of the next one
| Name | Type | Description | Defined in |
|---|---|---|---|
nextCursor | null | string | Description Opaque cursor for the next page (cursor=<nextCursor>), or null when this page is the last one | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2054 |
sessions | object[] | Description One page of sessions, newest first | odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2052 |
Defined in
odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:84
watch()
watch()
Live-subscribe to sessions. With no argument, watches the whole collection; with a session ID, watches that single session.
Returns a subscription handle — register onSnapshot/onError, read the
synchronous current state, and call unsubscribe() to stop. The initial
state is loaded via REST, then kept in sync over SSE.
Returns
CollectionSubscription<object>
A CollectionSubscription (no id) or DocumentSubscription (with id)
| 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:132
watch(sessionId)
Parameters
| Parameter | Type |
|---|---|
sessionId | string |
Returns
DocumentSubscription<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:133