Skip to main content

Class: SessionManager

Manages session resources for a project.

Constructors​

new SessionManager()​

new SessionManager(ctx, projectId): SessionManager

Internal

Parameters​

ParameterType
ctxClientContext
projectIdstring

Returns​

SessionManager

Defined in​

odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:57

Methods​

create()​

create(body): Promise<Session>

Create a new session

Parameters​

ParameterTypeDescription
bodyobjectSession creation payload
body.autoStart?booleanDescription Whether to automatically start the bot after session creation. Defaults to true when omitted; set to false to disable. Example true
body.externalRoomIdstringDescription External Room ID Example room_abc123
body.gateway?stringDescription ODIN Gateway URL Example gateway.odin.4players.io
body.idleTimeout?numberDescription 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.titlestringDescription 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(sessionId): Promise<Session>

Get a session by ID

Parameters​

ParameterTypeDescription
sessionIdstringSession ID

Returns​

Promise<Session>

Live Session object

Defined in​

odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:113


list()​

list(): Promise<object[]>

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()​

listPaged(query): Promise<object>

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​

ParameterTypeDescription
queryobjectstatus (active / inactive), limit (1–200, default 50), cursor
query.cursor?stringDescription Opaque cursor from the nextCursor of the previous page. Sessions are listed newest first.
query.limit?numberDescription 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

NameTypeDescriptionDefined in
nextCursornull | stringDescription Opaque cursor for the next page (cursor=<nextCursor>), or null when this page is the last oneodin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2054
sessionsobject[]Description One page of sessions, newest firstodin-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()​

watch(): CollectionSubscription<object>

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)

NameTypeDescriptionDefined in
createdAtstringFormat: date-time Description Creation timestamp Example 2023-10-01T10:00:00Zodin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2032
createdByUserIdstringDescription ID of the user who created the session Example user_123odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2026
endedAt?null | stringFormat: 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:00Zodin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2043
externalRoomIdstringDescription External Room ID Example room_abc123odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2006
gatewaystringDescription ODIN Gateway URL Example gateway.odin.4players.ioodin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2016
idstringDescription Session ID Example sess_789odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:1996
idleTimeout?numberDescription Idle timeout in seconds. 0 or null means no auto-stop. Example 300odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2048
projectIdstringDescription Project ID Example proj_123odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2011
statusstringDescription Session Status Example activeodin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2037
tenantIdstringDescription Tenant ID Example tenant_456odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2001
titlestringDescription Session Title Example Daily Standupodin-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)​

watch(sessionId): DocumentSubscription<object>
Parameters​
ParameterType
sessionIdstring
Returns​

DocumentSubscription<object>

NameTypeDescriptionDefined in
createdAtstringFormat: date-time Description Creation timestamp Example 2023-10-01T10:00:00Zodin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2032
createdByUserIdstringDescription ID of the user who created the session Example user_123odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2026
endedAt?null | stringFormat: 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:00Zodin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2043
externalRoomIdstringDescription External Room ID Example room_abc123odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2006
gatewaystringDescription ODIN Gateway URL Example gateway.odin.4players.ioodin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2016
idstringDescription Session ID Example sess_789odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:1996
idleTimeout?numberDescription Idle timeout in seconds. 0 or null means no auto-stop. Example 300odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2048
projectIdstringDescription Project ID Example proj_123odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2011
statusstringDescription Session Status Example activeodin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2037
tenantIdstringDescription Tenant ID Example tenant_456odin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2001
titlestringDescription Session Title Example Daily Standupodin-transcription-service/packages/cortex-typescript-sdk/src/types.ts:2021
Defined in​

odin-transcription-service/packages/cortex-typescript-sdk/src/resources/sessions.ts:133