UNPKG

@anthropic-ai/sdk

Version:
97 lines • 4.47 kB
import { APIResource } from "../../../../core/resource.js"; import * as PermissionsAPI from "./permissions.js"; import { BetaRBACAllConnectorsPermissionResource, BetaRBACConnectorPermissionResource, BetaRBACConnectorScopePermissionResource, BetaRBACConnectorToolPermissionResource, BetaRBACOrganizationPermissionResource, BetaRBACRolePermission, BetaRBACRolePermissionsPageCursor, PermissionListParams, Permissions } from "./permissions.js"; import { APIPromise } from "../../../../core/api-promise.js"; import { PageCursor, type PageCursorParams, PagePromise } from "../../../../core/pagination.js"; import { RequestOptions } from "../../../../internal/request-options.js"; export declare class RBACRoles extends APIResource { permissions: PermissionsAPI.Permissions; /** * Retrieve an RBAC Role by ID. * * The RBAC Roles API is available to Claude Enterprise organizations only. * * @throws {OrganizationTypeNotSupportedError} * @throws {ParentOrganizationRequiredError} * @throws {RBACRoleNotFoundError} * * @example * ```ts * const betaRBACRole = * await client.beta.organization.rbacRoles.retrieve( * 'rbac_role_id', * ); * ``` */ retrieve(rbacRoleID: string, options?: RequestOptions): APIPromise<BetaRBACRole>; /** * List RBAC Roles in the organization. * * The RBAC Roles API is available to Claude Enterprise organizations only. * * @throws {OrganizationTypeNotSupportedError} * @throws {ParentOrganizationRequiredError} * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const betaRBACRole of client.beta.organization.rbacRoles.list()) { * // ... * } * ``` */ list(query?: RBACRoleListParams | null | undefined, options?: RequestOptions): PagePromise<BetaRBACRolesPageCursor, BetaRBACRole>; } export type BetaRBACRolesPageCursor = PageCursor<BetaRBACRole>; export interface BetaRBACRole { /** * ID of the RBAC Role. */ id: string; /** * RFC 3339 datetime string indicating when the RBAC Role was created. */ created_at: string; /** * Name of the RBAC Role. For a built-in role, this is Anthropic's name for the * access that the role grants. Anthropic may change this name, so to keep a * lasting reference to a role, store its `id`. */ display_name: string; /** * Whether the RBAC Role is built-in or custom. More values of `type` may be added, * so do not treat every role that is not `built_in` as `custom`. */ source: BetaRBACRoleSource; /** * Object type. * * For RBAC Roles, this is always `"rbac_role"`. */ type: 'rbac_role'; /** * RFC 3339 datetime string indicating when the RBAC Role was last updated. */ updated_at: string; } export type BetaRBACRoleSource = BetaRBACRoleSourceBuiltIn | BetaRBACRoleSourceCustom; export interface BetaRBACRoleSourceBuiltIn { /** * Anthropic provisions the RBAC Role, and the organization's administrators cannot * change or delete it. */ type: 'built_in'; } export interface BetaRBACRoleSourceCustom { /** * The organization's administrators can change and delete the RBAC Role. */ type: 'custom'; } export interface RBACRoleListParams extends PageCursorParams { } export declare namespace RBACRoles { export { type BetaRBACRole as BetaRBACRole, type BetaRBACRoleSource as BetaRBACRoleSource, type BetaRBACRoleSourceBuiltIn as BetaRBACRoleSourceBuiltIn, type BetaRBACRoleSourceCustom as BetaRBACRoleSourceCustom, type BetaRBACRolesPageCursor as BetaRBACRolesPageCursor, type RBACRoleListParams as RBACRoleListParams, }; export { Permissions as Permissions, type BetaRBACAllConnectorsPermissionResource as BetaRBACAllConnectorsPermissionResource, type BetaRBACConnectorPermissionResource as BetaRBACConnectorPermissionResource, type BetaRBACConnectorScopePermissionResource as BetaRBACConnectorScopePermissionResource, type BetaRBACConnectorToolPermissionResource as BetaRBACConnectorToolPermissionResource, type BetaRBACOrganizationPermissionResource as BetaRBACOrganizationPermissionResource, type BetaRBACRolePermission as BetaRBACRolePermission, type BetaRBACRolePermissionsPageCursor as BetaRBACRolePermissionsPageCursor, type PermissionListParams as PermissionListParams, }; } //# sourceMappingURL=rbac-roles.d.ts.map