@anthropic-ai/sdk
Version:
The official TypeScript library for the Anthropic API
87 lines • 4.08 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RBACGroupDefault = void 0;
const resource_1 = require("../../../../../core/resource.js");
const headers_1 = require("../../../../../internal/headers.js");
const tracing_1 = require("../../../../../internal/tracing.js");
class RBACGroupDefault extends resource_1.APIResource {
/**
* Retrieve the default Claude Code managed settings, which members who belong to
* no RBAC Group in `rbac_group_order` receive in `rbac_groups` mode.
*
* **Accepted credentials:** an organization-level Admin API key with the
* `read:claude_code_managed_settings` scope.
*
* Every request must include the beta header
* `anthropic-beta: ce-claude-code-managed-settings-2026-10-06`. A request without
* it, or from an organization not enabled for this beta, returns `404`. The Claude
* Code Managed Settings API is in beta and is available to Claude Enterprise
* organizations only.
*
* @throws {BetaCMEKFeatureUnsupportedError}
* @throws {CMEKKeyDisabledError}
*
* @example
* ```ts
* const betaClaudeCodeRBACGroupDefaultManagedSettings =
* await client.beta.organization.claudeCode.managedSettings.rbacGroupDefault.retrieve();
* ```
*/
retrieve(params = {}, options) {
const { betas } = params ?? {};
return this._client.get('/v1/organizations/claude_code/managed_settings/rbac_group_default', {
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'ce-claude-code-managed-settings-2026-10-06'].toString() },
options?.headers,
]),
__qualifiers: { beta: 'true' },
__span: (0, tracing_1.startApiCallSpan)(this._client, 'anthropic.organization.claude_code.managed_settings.rbac_group_default.retrieve', options, { route: '/v1/organizations/claude_code/managed_settings/rbac_group_default' }),
});
}
/**
* Set or replace the default Claude Code managed settings, or clear them with
* `null`.
*
* **Accepted credentials:** an organization-level Admin API key with the
* `write:claude_code_managed_settings` scope.
*
* Every request must include the beta header
* `anthropic-beta: ce-claude-code-managed-settings-2026-10-06`. A request without
* it, or from an organization not enabled for this beta, returns `404`. The Claude
* Code Managed Settings API is in beta and is available to Claude Enterprise
* organizations only.
*
* A write that returns `503` may have applied. Retrying it is safe.
*
* @throws {BetaCMEKFeatureUnsupportedError}
* @throws {CMEKKeyDisabledError}
* @throws {BetaRequestBodyTimeoutError}
* @throws {BetaSettingsDocumentLimitExceededError}
* @throws {BetaSettingsHistoryLimitExceededError}
* @throws {SandboxEgressRestrictedError}
*
* @example
* ```ts
* const betaClaudeCodeRBACGroupDefaultManagedSettings =
* await client.beta.organization.claudeCode.managedSettings.rbacGroupDefault.update(
* { settings: { foo: 'bar' } },
* );
* ```
*/
update(params, options) {
const { betas, ...body } = params;
return this._client.post('/v1/organizations/claude_code/managed_settings/rbac_group_default', {
body,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'ce-claude-code-managed-settings-2026-10-06'].toString() },
options?.headers,
]),
__qualifiers: { beta: 'true' },
__span: (0, tracing_1.startApiCallSpan)(this._client, 'anthropic.organization.claude_code.managed_settings.rbac_group_default.update', options, { route: '/v1/organizations/claude_code/managed_settings/rbac_group_default' }),
});
}
}
exports.RBACGroupDefault = RBACGroupDefault;
//# sourceMappingURL=rbac-group-default.js.map