Skip to main content

Class: ProjectSettingsManager

Manages settings for a project.

Constructors

new ProjectSettingsManager()

new ProjectSettingsManager(ctx, projectId): ProjectSettingsManager

Internal

Parameters

ParameterType
ctxClientContext
projectIdstring

Returns

ProjectSettingsManager

Defined in

4Players/cortex-typescript-sdk/src/resources/settings.ts:20

Methods

delete()

delete(): Promise<void>

Delete project settings

Returns

Promise<void>

Defined in

4Players/cortex-typescript-sdk/src/resources/settings.ts:79


get()

get(): Promise<object>

Get project settings

Returns

Promise<object>

Project settings

NameTypeDescriptionDefined in
appIdstringDescription App ID4Players/cortex-typescript-sdk/src/types.ts:2452
botUserData?objectDescription Bot peer userData4Players/cortex-typescript-sdk/src/types.ts:2465
botUserId?stringDescription Bot User ID (for access_key provider)4Players/cortex-typescript-sdk/src/types.ts:2459
debugAudioEnabledbooleanDescription Whether debug audio storage is enabled for transcription debugging Default false4Players/cortex-typescript-sdk/src/types.ts:2474
e2eEncryptionMode"disabled" | "automatic" | "manual"Description End-to-end encryption mode for the bot Default disabled @enum {string}4Players/cortex-typescript-sdk/src/types.ts:2482
e2eEncryptionPassword?stringDescription Decrypted manual cipher password (only returned when mode=manual). Will be removed once a webhook-based mechanism replaces at-rest storage.4Players/cortex-typescript-sdk/src/types.ts:2484
hasSecretbooleanDescription Whether a project secret is cached locally for HMAC authentication4Players/cortex-typescript-sdk/src/types.ts:2469
idstringDescription Settings ID4Players/cortex-typescript-sdk/src/types.ts:2450
projectName?stringDescription Human-readable project name (synced from Payment system)4Players/cortex-typescript-sdk/src/types.ts:2476
tokenProviderType"access_key" | "webservice" | "rooms"Description Token provider type4Players/cortex-typescript-sdk/src/types.ts:2457
webserviceMethod?stringDescription Webservice method4Players/cortex-typescript-sdk/src/types.ts:2463
webserviceUrl?stringDescription Webservice URL (for webservice provider)4Players/cortex-typescript-sdk/src/types.ts:2461

Defined in

4Players/cortex-typescript-sdk/src/resources/settings.ts:29


update()

update(body): Promise<object>

Partially update project settings.

Only the fields you pass are changed; everything else (provider config, secret, other flags) is preserved. Use this to tweak a single setting — e.g. the bot peer userData — without first reading the current settings or re-supplying the provider configuration.

Parameters

ParameterTypeDescription
bodyobjectPartial settings to merge
body.accessKeyConfig?objectDescription Access Key config (required for access_key provider)
body.accessKeyConfig.accessKeystringDescription ODIN Access Key Example AK...
body.accessKeyConfig.botUserIdstringDescription Bot User ID Example transcription-bot
body.botUserData?objectDescription Bot peer userData as JSON Example { * "name": "Transcription Bot", * "role": "bot" * }
body.debugAudioEnabled?booleanDescription Enable debug audio storage for transcription debugging (auto-deleted after 24h). Defaults to false when omitted.
body.e2eEncryptionMode?"disabled" | "automatic" | "manual"Description End-to-end encryption mode for the bot
body.e2eEncryptionPassword?stringDescription Manual cipher password (only used when mode=manual). Stored encrypted at rest.
body.tokenProviderType?"access_key" | "webservice" | "rooms"Description Token provider type
body.webserviceConfig?objectDescription Webservice config (required for webservice provider)
body.webserviceConfig.bodyTemplate?stringDescription Request body template with {{roomId}} placeholder Example {"roomId": "{{roomId}}"}
body.webserviceConfig.headers?objectDescription HTTP headers Example { * "Authorization": "Bearer xxx" * }
body.webserviceConfig.method"GET" | "POST"Description HTTP method Example POST @enum {string}
body.webserviceConfig.responseTokenPathstringDescription JSONPath to extract token from response Example data.token
body.webserviceConfig.urlstringDescription Token generation endpoint URL Example https://myserver.com/token

Returns

Promise<object>

The updated settings

NameTypeDescriptionDefined in
appIdstringDescription App ID4Players/cortex-typescript-sdk/src/types.ts:2452
botUserData?objectDescription Bot peer userData4Players/cortex-typescript-sdk/src/types.ts:2465
botUserId?stringDescription Bot User ID (for access_key provider)4Players/cortex-typescript-sdk/src/types.ts:2459
debugAudioEnabledbooleanDescription Whether debug audio storage is enabled for transcription debugging Default false4Players/cortex-typescript-sdk/src/types.ts:2474
e2eEncryptionMode"disabled" | "automatic" | "manual"Description End-to-end encryption mode for the bot Default disabled @enum {string}4Players/cortex-typescript-sdk/src/types.ts:2482
e2eEncryptionPassword?stringDescription Decrypted manual cipher password (only returned when mode=manual). Will be removed once a webhook-based mechanism replaces at-rest storage.4Players/cortex-typescript-sdk/src/types.ts:2484
hasSecretbooleanDescription Whether a project secret is cached locally for HMAC authentication4Players/cortex-typescript-sdk/src/types.ts:2469
idstringDescription Settings ID4Players/cortex-typescript-sdk/src/types.ts:2450
projectName?stringDescription Human-readable project name (synced from Payment system)4Players/cortex-typescript-sdk/src/types.ts:2476
tokenProviderType"access_key" | "webservice" | "rooms"Description Token provider type4Players/cortex-typescript-sdk/src/types.ts:2457
webserviceMethod?stringDescription Webservice method4Players/cortex-typescript-sdk/src/types.ts:2463
webserviceUrl?stringDescription Webservice URL (for webservice provider)4Players/cortex-typescript-sdk/src/types.ts:2461

Defined in

4Players/cortex-typescript-sdk/src/resources/settings.ts:67


updateDebugAudio()

updateDebugAudio(enabled): Promise<void>

Enable or disable debug audio recording for transcription debugging.

When enabled, the WAV file that was sent to the transcription API is stored alongside each transcribed message and can be downloaded via Session.downloadDebugAudio. Stored recordings are automatically deleted after 24 hours. Use this to diagnose bad transcription results (audio issues, background noise, clipping, etc).

Parameters

ParameterTypeDescription
enabledbooleantrue to enable debug audio storage, false to disable

Returns

Promise<void>

Defined in

4Players/cortex-typescript-sdk/src/resources/settings.ts:98


upsert()

upsert(body): Promise<object>

Create or update project settings (full payload).

Replaces the configuration — tokenProviderType is required. To change just one field, prefer update.

Parameters

ParameterTypeDescription
bodyobjectSettings payload
body.accessKeyConfig?objectDescription Access Key config (required for access_key provider)
body.accessKeyConfig.accessKeystringDescription ODIN Access Key Example AK...
body.accessKeyConfig.botUserIdstringDescription Bot User ID Example transcription-bot
body.botUserData?objectDescription Bot peer userData as JSON Example { * "name": "Transcription Bot", * "role": "bot" * }
body.debugAudioEnabled?booleanDescription Enable debug audio storage for transcription debugging (auto-deleted after 24h). Defaults to false when omitted.
body.e2eEncryptionMode?"disabled" | "automatic" | "manual"Description End-to-end encryption mode for the bot
body.e2eEncryptionPassword?stringDescription Manual cipher password (only used when mode=manual). Stored encrypted at rest.
body.tokenProviderType"access_key" | "webservice" | "rooms"Description Token provider type
body.webserviceConfig?objectDescription Webservice config (required for webservice provider)
body.webserviceConfig.bodyTemplate?stringDescription Request body template with {{roomId}} placeholder Example {"roomId": "{{roomId}}"}
body.webserviceConfig.headers?objectDescription HTTP headers Example { * "Authorization": "Bearer xxx" * }
body.webserviceConfig.method"GET" | "POST"Description HTTP method Example POST @enum {string}
body.webserviceConfig.responseTokenPathstringDescription JSONPath to extract token from response Example data.token
body.webserviceConfig.urlstringDescription Token generation endpoint URL Example https://myserver.com/token

Returns

Promise<object>

Updated settings

NameTypeDescriptionDefined in
appIdstringDescription App ID4Players/cortex-typescript-sdk/src/types.ts:2452
botUserData?objectDescription Bot peer userData4Players/cortex-typescript-sdk/src/types.ts:2465
botUserId?stringDescription Bot User ID (for access_key provider)4Players/cortex-typescript-sdk/src/types.ts:2459
debugAudioEnabledbooleanDescription Whether debug audio storage is enabled for transcription debugging Default false4Players/cortex-typescript-sdk/src/types.ts:2474
e2eEncryptionMode"disabled" | "automatic" | "manual"Description End-to-end encryption mode for the bot Default disabled @enum {string}4Players/cortex-typescript-sdk/src/types.ts:2482
e2eEncryptionPassword?stringDescription Decrypted manual cipher password (only returned when mode=manual). Will be removed once a webhook-based mechanism replaces at-rest storage.4Players/cortex-typescript-sdk/src/types.ts:2484
hasSecretbooleanDescription Whether a project secret is cached locally for HMAC authentication4Players/cortex-typescript-sdk/src/types.ts:2469
idstringDescription Settings ID4Players/cortex-typescript-sdk/src/types.ts:2450
projectName?stringDescription Human-readable project name (synced from Payment system)4Players/cortex-typescript-sdk/src/types.ts:2476
tokenProviderType"access_key" | "webservice" | "rooms"Description Token provider type4Players/cortex-typescript-sdk/src/types.ts:2457
webserviceMethod?stringDescription Webservice method4Players/cortex-typescript-sdk/src/types.ts:2463
webserviceUrl?stringDescription Webservice URL (for webservice provider)4Players/cortex-typescript-sdk/src/types.ts:2461

Defined in

4Players/cortex-typescript-sdk/src/resources/settings.ts:47