Class: ProjectSettingsManager
Manages settings for a project.
Constructors
new ProjectSettingsManager()
Internal
Parameters
| Parameter | Type |
|---|---|
ctx | ClientContext |
projectId | string |
Returns
Defined in
4Players/cortex-typescript-sdk/src/resources/settings.ts:20
Methods
delete()
Delete project settings
Returns
Promise<void>
Defined in
4Players/cortex-typescript-sdk/src/resources/settings.ts:79
get()
Get project settings
Returns
Promise<object>
Project settings
| Name | Type | Description | Defined in |
|---|---|---|---|
appId | string | Description App ID | 4Players/cortex-typescript-sdk/src/types.ts:2859 |
botUserData? | Record<string, never> | Description Bot peer userData | 4Players/cortex-typescript-sdk/src/types.ts:2872 |
botUserId? | string | Description Bot User ID (for access_key provider) | 4Players/cortex-typescript-sdk/src/types.ts:2866 |
debugAudioEnabled | boolean | Description Whether debug audio storage is enabled for transcription debugging Default false | 4Players/cortex-typescript-sdk/src/types.ts:2881 |
e2eEncryptionMode | "disabled" | "automatic" | "manual" | Description End-to-end encryption mode for the bot Default disabled @enum {string} | 4Players/cortex-typescript-sdk/src/types.ts:2889 |
e2eEncryptionPassword? | string | Description 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:2891 |
hasSecret | boolean | Description Whether a project secret is cached locally for HMAC authentication | 4Players/cortex-typescript-sdk/src/types.ts:2876 |
id | string | Description Settings ID | 4Players/cortex-typescript-sdk/src/types.ts:2857 |
isConfigured | boolean | Description Whether settings are configured | 4Players/cortex-typescript-sdk/src/types.ts:2874 |
projectName? | string | Description Human-readable project name (synced from Payment system) | 4Players/cortex-typescript-sdk/src/types.ts:2883 |
tokenProviderType | "access_key" | "webservice" | "rooms" | Description Token provider type | 4Players/cortex-typescript-sdk/src/types.ts:2864 |
webserviceMethod? | string | Description Webservice method | 4Players/cortex-typescript-sdk/src/types.ts:2870 |
webserviceUrl? | string | Description Webservice URL (for webservice provider) | 4Players/cortex-typescript-sdk/src/types.ts:2868 |
Defined in
4Players/cortex-typescript-sdk/src/resources/settings.ts:29
update()
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
| Parameter | Type | Description |
|---|---|---|
body | object | Partial settings to merge |
body.accessKeyConfig? | object | Description Access Key config (required for access_key provider) |
body.accessKeyConfig.accessKey | string | Description ODIN Access Key Example AK... |
body.accessKeyConfig.botUserId | string | Description Bot User ID Example transcription-bot |
body.botUserData? | Record<string, never> | Description Bot peer userData as JSON Example { * "name": "Transcription Bot", * "role": "bot" * } |
body.debugAudioEnabled | boolean | Description Enable debug audio storage for transcription debugging (auto-deleted after 24h) Default false |
body.e2eEncryptionMode? | "disabled" | "automatic" | "manual" | Description End-to-end encryption mode for the bot |
body.e2eEncryptionPassword? | string | Description Manual cipher password (only used when mode=manual). Stored encrypted at rest. |
body.tokenProviderType? | "access_key" | "webservice" | "rooms" | Description Token provider type |
body.webserviceConfig? | object | Description Webservice config (required for webservice provider) |
body.webserviceConfig.bodyTemplate? | string | Description Request body template with {{roomId}} placeholder Example {"roomId": "{{roomId}}"} |
body.webserviceConfig.headers? | Record<string, never> | Description HTTP headers Example { * "Authorization": "Bearer xxx" * } |
body.webserviceConfig.method | "GET" | "POST" | Description HTTP method Example POST @enum {string} |
body.webserviceConfig.responseTokenPath | string | Description JSONPath to extract token from response Example data.token |
body.webserviceConfig.url | string | Description Token generation endpoint URL Example https://myserver.com/token |
Returns
Promise<object>
The updated settings
| Name | Type | Description | Defined in |
|---|---|---|---|
appId | string | Description App ID | 4Players/cortex-typescript-sdk/src/types.ts:2859 |
botUserData? | Record<string, never> | Description Bot peer userData | 4Players/cortex-typescript-sdk/src/types.ts:2872 |
botUserId? | string | Description Bot User ID (for access_key provider) | 4Players/cortex-typescript-sdk/src/types.ts:2866 |
debugAudioEnabled | boolean | Description Whether debug audio storage is enabled for transcription debugging Default false | 4Players/cortex-typescript-sdk/src/types.ts:2881 |
e2eEncryptionMode | "disabled" | "automatic" | "manual" | Description End-to-end encryption mode for the bot Default disabled @enum {string} | 4Players/cortex-typescript-sdk/src/types.ts:2889 |
e2eEncryptionPassword? | string | Description 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:2891 |
hasSecret | boolean | Description Whether a project secret is cached locally for HMAC authentication | 4Players/cortex-typescript-sdk/src/types.ts:2876 |
id | string | Description Settings ID | 4Players/cortex-typescript-sdk/src/types.ts:2857 |
isConfigured | boolean | Description Whether settings are configured | 4Players/cortex-typescript-sdk/src/types.ts:2874 |
projectName? | string | Description Human-readable project name (synced from Payment system) | 4Players/cortex-typescript-sdk/src/types.ts:2883 |
tokenProviderType | "access_key" | "webservice" | "rooms" | Description Token provider type | 4Players/cortex-typescript-sdk/src/types.ts:2864 |
webserviceMethod? | string | Description Webservice method | 4Players/cortex-typescript-sdk/src/types.ts:2870 |
webserviceUrl? | string | Description Webservice URL (for webservice provider) | 4Players/cortex-typescript-sdk/src/types.ts:2868 |
Defined in
4Players/cortex-typescript-sdk/src/resources/settings.ts:67
updateDebugAudio()
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
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | true to enable debug audio storage, false to disable |
Returns
Promise<void>
Defined in
4Players/cortex-typescript-sdk/src/resources/settings.ts:98
upsert()
Create or update project settings (full payload).
Replaces the configuration — tokenProviderType is required. To change just
one field, prefer update.
Parameters
| Parameter | Type | Description |
|---|---|---|
body | object | Settings payload |
body.accessKeyConfig? | object | Description Access Key config (required for access_key provider) |
body.accessKeyConfig.accessKey | string | Description ODIN Access Key Example AK... |
body.accessKeyConfig.botUserId | string | Description Bot User ID Example transcription-bot |
body.botUserData? | Record<string, never> | Description Bot peer userData as JSON Example { * "name": "Transcription Bot", * "role": "bot" * } |
body.debugAudioEnabled | boolean | Description Enable debug audio storage for transcription debugging (auto-deleted after 24h) Default false |
body.e2eEncryptionMode? | "disabled" | "automatic" | "manual" | Description End-to-end encryption mode for the bot |
body.e2eEncryptionPassword? | string | Description Manual cipher password (only used when mode=manual). Stored encrypted at rest. |
body.tokenProviderType | "access_key" | "webservice" | "rooms" | Description Token provider type |
body.webserviceConfig? | object | Description Webservice config (required for webservice provider) |
body.webserviceConfig.bodyTemplate? | string | Description Request body template with {{roomId}} placeholder Example {"roomId": "{{roomId}}"} |
body.webserviceConfig.headers? | Record<string, never> | Description HTTP headers Example { * "Authorization": "Bearer xxx" * } |
body.webserviceConfig.method | "GET" | "POST" | Description HTTP method Example POST @enum {string} |
body.webserviceConfig.responseTokenPath | string | Description JSONPath to extract token from response Example data.token |
body.webserviceConfig.url | string | Description Token generation endpoint URL Example https://myserver.com/token |
Returns
Promise<object>
Updated settings
| Name | Type | Description | Defined in |
|---|---|---|---|
appId | string | Description App ID | 4Players/cortex-typescript-sdk/src/types.ts:2859 |
botUserData? | Record<string, never> | Description Bot peer userData | 4Players/cortex-typescript-sdk/src/types.ts:2872 |
botUserId? | string | Description Bot User ID (for access_key provider) | 4Players/cortex-typescript-sdk/src/types.ts:2866 |
debugAudioEnabled | boolean | Description Whether debug audio storage is enabled for transcription debugging Default false | 4Players/cortex-typescript-sdk/src/types.ts:2881 |
e2eEncryptionMode | "disabled" | "automatic" | "manual" | Description End-to-end encryption mode for the bot Default disabled @enum {string} | 4Players/cortex-typescript-sdk/src/types.ts:2889 |
e2eEncryptionPassword? | string | Description 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:2891 |
hasSecret | boolean | Description Whether a project secret is cached locally for HMAC authentication | 4Players/cortex-typescript-sdk/src/types.ts:2876 |
id | string | Description Settings ID | 4Players/cortex-typescript-sdk/src/types.ts:2857 |
isConfigured | boolean | Description Whether settings are configured | 4Players/cortex-typescript-sdk/src/types.ts:2874 |
projectName? | string | Description Human-readable project name (synced from Payment system) | 4Players/cortex-typescript-sdk/src/types.ts:2883 |
tokenProviderType | "access_key" | "webservice" | "rooms" | Description Token provider type | 4Players/cortex-typescript-sdk/src/types.ts:2864 |
webserviceMethod? | string | Description Webservice method | 4Players/cortex-typescript-sdk/src/types.ts:2870 |
webserviceUrl? | string | Description Webservice URL (for webservice provider) | 4Players/cortex-typescript-sdk/src/types.ts:2868 |
Defined in
4Players/cortex-typescript-sdk/src/resources/settings.ts:47