@anthropic-ai/sdk
Version:
The official TypeScript library for the Anthropic API
63 lines • 2.73 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ComplianceSettings = void 0;
const resource_1 = require("../../core/resource.js");
const tracing_1 = require("../../internal/tracing.js");
class ComplianceSettings extends resource_1.APIResource {
/**
* Retrieve your organization's Compliance Settings.
*
* Compliance Settings is a singleton resource: there is exactly one per
* organization, addressed without an identifier. The `state` field reflects
* whether the Compliance API is enabled. An organization with a parent
* organization reads the state inherited from the parent's configuration.
*
* @example
* ```ts
* const organizationComplianceSettings =
* await client.organization.complianceSettings.retrieve();
* ```
*/
retrieve(options) {
return this._client.get('/v1/organizations/compliance_settings', {
...options,
__span: (0, tracing_1.startApiCallSpan)(this._client, 'anthropic.organization.compliance_settings.retrieve', options, {
route: '/v1/organizations/compliance_settings',
}),
});
}
/**
* Update your organization's Compliance Settings.
*
* Setting `state` to `enabled` turns on the Compliance API and begins capturing
* organization activity events. Setting it to `disabled` turns both off. `state`
* reflects whether the Compliance API is enabled.
*
* A request that sets `state` to its current value succeeds and leaves the
* resource unchanged. A `disabled` request stays in effect until a later `enabled`
* request or the organization's next provisioning action that enables Access
* Transparency: enabling Access Transparency also enables the Compliance API,
* which serves its activity events, so such provisioning (including re-runs)
* re-enables the Compliance API even after a `disabled` request. Automated
* provisioning never disables compliance settings.
*
* @example
* ```ts
* const organizationComplianceSettings =
* await client.organization.complianceSettings.update({
* state: { type: 'enabled' },
* });
* ```
*/
update(body, options) {
return this._client.post('/v1/organizations/compliance_settings', {
body,
...options,
__span: (0, tracing_1.startApiCallSpan)(this._client, 'anthropic.organization.compliance_settings.update', options, {
route: '/v1/organizations/compliance_settings',
}),
});
}
}
exports.ComplianceSettings = ComplianceSettings;
//# sourceMappingURL=compliance-settings.js.map