Skip to content

Class: SettingsClient

@kortexya/reasoninglayer


@kortexya/reasoninglayer / SettingsClient

Defined in: src/resources/settings.ts:9

Read and write the Space’s settings, and narrow them for a project.

get(key, options?, requestOptions?): Promise<Setting>

Defined in: src/resources/settings.ts:25

Read a setting as it applies to the Space or to one of its projects.

string

The key: web_search, approval_mode, ai_disclosure, answer_model or query_model.

project: a project of the Space; absent reads the Space.

string

RequestOptions

Per-call cancellation, timeout and request options.

Promise<Setting>

The value that applies, where it came from, and what the key admits.

404 for an unknown key (unknown_setting); 422 for a malformed project id (invalid_project); 503 when the tenant’s lattice has no shared setting sort (setting_sort_missing).

Uses GET /api/v1/settings/{key}. The engine resolves the cascade.

const setting = await client.settings.get('web_search', { project: projectId });

put(key, request, requestOptions?): Promise<Setting>

Defined in: src/resources/settings.ts:53

Set a key for the Space, or narrow it for one of its projects.

string

The key.

PutSettingRequest

The value, the project (absent: the Space) and the reason.

RequestOptions

Per-call cancellation, timeout and request options.

Promise<Setting>

The setting as it now applies at that scope.

403 without an acting Space admin (acting_user_required, settings_admin_required, setting_not_admitted); 404 for an unknown key; 409 when the key is changed elsewhere (setting_not_writable_here), a project value widens what applies above it (setting_widens) or the key is Space-only (setting_space_only); 422 for a value the key does not admit (setting_value_not_allowed) or a malformed project id; 503 without the setting sort.

Uses PUT /api/v1/settings/{key}. The value is a term of the setting sort.

await client.settings.put('web_search', { value: 'off', project: projectId, reason: 'Client data' });