import { APIResource } from "../../../../core/resource.js";
import * as BetaAPI from "../../beta.js";
import * as MembersAPI from "./members.js";
import { MemberAddParams, MemberListParams, MemberRemoveParams, MemberRemoveResponse, MemberRetrieveParams, MemberUpdateParams, Members } from "./members.js";
import * as RateLimitsAPI from "./rate-limits.js";
import { BetaWorkspaceRateLimit, BetaWorkspaceRateLimitOrganizationSource, BetaWorkspaceRateLimitType, BetaWorkspaceRateLimitUpdateValue, BetaWorkspaceRateLimitValue, BetaWorkspaceRateLimitWorkspaceSource, BetaWorkspaceRateLimitsPageCursor, RateLimitListParams, RateLimitUpdateParams, RateLimits } from "./rate-limits.js";
import * as ServiceAccountsAPI from "./service-accounts.js";
import { ServiceAccountAddParams, ServiceAccountListParams, ServiceAccountRemoveParams, ServiceAccountRemoveResponse, ServiceAccountRetrieveParams, ServiceAccountUpdateParams, ServiceAccounts } from "./service-accounts.js";
import { APIPromise } from "../../../../core/api-promise.js";
import { Page, type PageParams, PagePromise } from "../../../../core/pagination.js";
import { RequestOptions } from "../../../../internal/request-options.js";
export declare class Workspaces extends APIResource {
    rateLimits: RateLimitsAPI.RateLimits;
    members: MembersAPI.Members;
    serviceAccounts: ServiceAccountsAPI.ServiceAccounts;
    /**
     * Create Workspace
     *
     * @throws {ExternalKeyValidationFailedError}
     * @throws {ExternalKeyValidationTimedOutError}
     * @throws {KeyProfileMismatchError}
     * @throws {UserProfileNotFoundError}
     * @throws {WorkspacePolicyViolationError}
     * @throws {SandboxEgressRestrictedError}
     * @throws {ExternalKeyChangedError}
     *
     * @example
     * ```ts
     * const betaWorkspace =
     *   await client.beta.organization.workspaces.create({
     *     name: 'Workspace Name',
     *   });
     * ```
     */
    create(params: WorkspaceCreateParams, options?: RequestOptions): APIPromise<BetaWorkspace>;
    /**
     * Get Workspace
     *
     * @example
     * ```ts
     * const betaWorkspace =
     *   await client.beta.organization.workspaces.retrieve(
     *     'workspace_id',
     *   );
     * ```
     */
    retrieve(workspaceID: string, options?: RequestOptions): APIPromise<BetaWorkspace>;
    /**
     * Update Workspace
     *
     * @throws {ExternalKeyValidationFailedError}
     * @throws {ExternalKeyValidationTimedOutError}
     * @throws {KeyProfileMismatchError}
     * @throws {UserProfileNotFoundError}
     * @throws {WorkspacePolicyViolationError}
     * @throws {SandboxEgressRestrictedError}
     * @throws {ExternalKeyChangedError}
     *
     * @example
     * ```ts
     * const betaWorkspace =
     *   await client.beta.organization.workspaces.update(
     *     'workspace_id',
     *     {},
     *   );
     * ```
     */
    update(workspaceID: string, body: WorkspaceUpdateParams, options?: RequestOptions): APIPromise<BetaWorkspace>;
    /**
     * List Workspaces
     *
     * @example
     * ```ts
     * // Automatically fetches more pages as needed.
     * for await (const betaWorkspace of client.beta.organization.workspaces.list()) {
     *   // ...
     * }
     * ```
     */
    list(query?: WorkspaceListParams | null | undefined, options?: RequestOptions): PagePromise<BetaWorkspacesPage, BetaWorkspace>;
    /**
     * Archive Workspace
     *
     * @throws {SandboxEgressRestrictedError}
     *
     * @example
     * ```ts
     * const betaWorkspace =
     *   await client.beta.organization.workspaces.archive(
     *     'workspace_id',
     *   );
     * ```
     */
    archive(workspaceID: string, options?: RequestOptions): APIPromise<BetaWorkspace>;
}
export type BetaWorkspacesPage = Page<BetaWorkspace>;
export type BetaWorkspaceMembersPage = Page<BetaWorkspaceMember>;
export type BetaAllowedInferenceGeo = 'global' | 'us';
export interface BetaDataResidency {
    /**
     * Permitted inference geo values. 'unrestricted' means all geos are allowed.
     */
    allowed_inference_geos: Array<BetaAllowedInferenceGeo> | 'unrestricted';
    /**
     * Default inference geo applied when requests omit the parameter.
     */
    default_inference_geo: 'global' | 'us';
    /**
     * Geographic region for workspace data storage. Immutable after creation.
     */
    workspace_geo: 'us';
}
export interface BetaDataResidencyCreateConfig {
    /**
     * Permitted inference geo values. Defaults to 'unrestricted' if omitted, which
     * allows all geos. Use the string 'unrestricted' to allow all geos, or a list of
     * specific geos.
     */
    allowed_inference_geos?: Array<BetaAllowedInferenceGeo> | 'unrestricted' | null;
    /**
     * Default inference geo applied when requests omit the parameter. Defaults to
     * 'global' if omitted. Must be a member of `allowed_inference_geos` unless
     * `allowed_inference_geos` is `"unrestricted"`.
     */
    default_inference_geo?: 'global' | 'us' | null;
    /**
     * Geographic region for workspace data storage. Immutable after creation. Defaults
     * to 'us' if omitted.
     */
    workspace_geo?: 'us' | null;
}
export interface BetaDataResidencyUpdateConfig {
    /**
     * Permitted inference geo values. Use 'unrestricted' to allow all geos, or a list
     * of specific geos.
     */
    allowed_inference_geos?: Array<BetaAllowedInferenceGeo> | 'unrestricted' | null;
    /**
     * Default inference geo applied when requests omit the parameter. Must be a member
     * of `allowed_inference_geos` unless `allowed_inference_geos` is `"unrestricted"`.
     */
    default_inference_geo?: 'global' | 'us' | null;
}
export type BetaNoBillingWorkspaceRole = 'workspace_admin' | 'workspace_developer' | 'workspace_restricted_developer' | 'workspace_user';
export interface BetaWorkspace {
    /**
     * ID of the Workspace.
     */
    id: string;
    /**
     * RFC 3339 datetime string indicating when the Workspace was archived, or `null`
     * if the Workspace is not archived.
     */
    archived_at: string | null;
    /**
     * Identifier for this Workspace's encryption compartment. When you configure an
     * AWS KMS customer-managed encryption key (CMEK) that isn't bound to a user
     * profile, reference this value in your KMS key-policy condition so the key is
     * scoped to this compartment. On GCP and Azure, Anthropic enforces the compartment
     * binding automatically; you do not need to reference this value in your key
     * configuration. See the CMEK integration guide for the required key
     * configuration; unless your organization is on Claude Platform on AWS, it
     * includes a separate value used during key validation. On Claude Platform on AWS
     * there is no separate validation value: your organization's own key is validated
     * against this Workspace's own value when it is attached, so if its key policy
     * uses the compartment condition, add this value to it before attaching the key.
     */
    compartment_id: string;
    /**
     * RFC 3339 datetime string indicating when the Workspace was created.
     */
    created_at: string;
    /**
     * Data residency configuration.
     */
    data_residency: BetaDataResidency;
    /**
     * Hex color code representing the Workspace in the Anthropic Console.
     */
    display_color: string;
    /**
     * ID of the customer-managed encryption key (CMEK) configuration to use for this
     * Workspace. Setting this field requires CMEK to be enabled for your organization.
     * When set, data stored for this Workspace is encrypted with the referenced key.
     * Create key configurations with the External Keys API. On Claude Platform on AWS
     * the value for an AWS KMS key is the key's ARN, and your organization's own key
     * must be a single-Region key in the same Region as the Workspace. If that key is
     * outside the Workspace's AWS account, it can be attached only by updating an
     * active Workspace. On that platform the key is validated against this Workspace
     * when it is attached, so a key-policy problem is reported as an error on this
     * request. This field is write-once: once a key is attached to a Workspace it
     * cannot be detached or replaced. To rotate key material, rotate the underlying
     * key on your cloud KMS; the `external_key_id` stays the same.
     */
    external_key_id: string | null;
    /**
     * Name of the Workspace.
     */
    name: string;
    /**
     * User-defined tags as string key-value pairs. Keys may not begin with
     * `anthropic`.
     */
    tags: {
        [key: string]: string;
    };
    /**
     * Object type.
     *
     * For Workspaces, this is always `"workspace"`.
     */
    type: 'workspace';
    /**
     * ID of the user profile attached to the Workspace, or null if it has none. Every
     * inference request through a Workspace that has a user profile must name that
     * profile.
     */
    user_profile_id: string | null;
}
export interface BetaWorkspaceMember {
    /**
     * Object type.
     *
     * For Workspace Members, this is always `"workspace_member"`.
     */
    type: 'workspace_member';
    /**
     * ID of the User.
     */
    user_id: string;
    /**
     * ID of the Workspace.
     */
    workspace_id: string;
    /**
     * Role of the Workspace Member.
     */
    workspace_role: BetaWorkspaceRole;
}
export type BetaWorkspaceRole = 'workspace_admin' | 'workspace_billing' | 'workspace_developer' | 'workspace_restricted_developer' | 'workspace_user';
export interface WorkspaceCreateParams {
    /**
     * Body param: Name of the Workspace.
     */
    name: string;
    /**
     * Body param: Data residency configuration for the workspace. If omitted, defaults
     * to `workspace_geo: "us"`, `allowed_inference_geos: "unrestricted"`, and
     * `default_inference_geo: "global"`.
     */
    data_residency?: BetaDataResidencyCreateConfig | null;
    /**
     * Body param: Hex color code representing the Workspace in the Anthropic Console.
     */
    display_color?: string | null;
    /**
     * Body param: ID of the customer-managed encryption key (CMEK) configuration to
     * use for this Workspace. Setting this field requires CMEK to be enabled for your
     * organization. When set, data stored for this Workspace is encrypted with the
     * referenced key. Create key configurations with the External Keys API. On Claude
     * Platform on AWS the value for an AWS KMS key is the key's ARN, and your
     * organization's own key must be a single-Region key in the same Region as the
     * Workspace. If that key is outside the Workspace's AWS account, it can be
     * attached only by updating an active Workspace. On that platform the key is
     * validated against this Workspace when it is attached, so a key-policy problem is
     * reported as an error on this request. This field is write-once: once a key is
     * attached to a Workspace it cannot be detached or replaced. To rotate key
     * material, rotate the underlying key on your cloud KMS; the `external_key_id`
     * stays the same.
     */
    external_key_id?: string | null;
    /**
     * Body param: User-defined tags as string key-value pairs. Keys may not begin with
     * `anthropic`.
     */
    tags?: {
        [key: string]: string;
    } | null;
    /**
     * Body param: ID of a user profile to attach to the Workspace. Every inference
     * request through the Workspace must then name this user profile; the API rejects
     * a request that names none or a different one. The user profile can't be replaced
     * or removed later; only deleting the user profile clears it.
     */
    user_profile_id?: string | null;
    /**
     * Header param: Optional header to specify the beta version(s) you want to use.
     */
    betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface WorkspaceUpdateParams {
    /**
     * Data residency configuration for the workspace.
     */
    data_residency?: BetaDataResidencyUpdateConfig | null;
    /**
     * Hex color code representing the Workspace in the Anthropic Console.
     */
    display_color?: string;
    /**
     * ID of the customer-managed encryption key (CMEK) configuration to use for this
     * Workspace. Setting this field requires CMEK to be enabled for your organization.
     * When set, data stored for this Workspace is encrypted with the referenced key.
     * Create key configurations with the External Keys API. On Claude Platform on AWS
     * the value for an AWS KMS key is the key's ARN, and your organization's own key
     * must be a single-Region key in the same Region as the Workspace. If that key is
     * outside the Workspace's AWS account, it can be attached only by updating an
     * active Workspace. On that platform the key is validated against this Workspace
     * when it is attached, so a key-policy problem is reported as an error on this
     * request. This field is write-once: once a key is attached to a Workspace it
     * cannot be detached or replaced. To rotate key material, rotate the underlying
     * key on your cloud KMS; the `external_key_id` stays the same.
     */
    external_key_id?: string;
    /**
     * Name of the Workspace.
     */
    name?: string;
    /**
     * User-defined tags as string key-value pairs. Keys may not begin with
     * `anthropic`.
     */
    tags?: {
        [key: string]: string | null;
    } | null;
    /**
     * ID of a user profile to attach to the Workspace. Every inference request through
     * the Workspace must then name this user profile; the API rejects a request that
     * names none or a different one. Once set, it can't be replaced or removed
     * (sending the same ID again changes nothing); only deleting the user profile
     * clears it. It can't be set on a Workspace whose External Key isn't bound to this
     * user profile. The default Workspace can't have a user profile.
     */
    user_profile_id?: string;
}
export interface WorkspaceListParams extends PageParams {
    /**
     * Only the Workspaces with these IDs, at most 100. `include_archived` and
     * `include_default` still apply, and IDs of Workspaces the caller can't list are
     * left out.
     */
    ids?: Array<string>;
    /**
     * Whether to include Workspaces that have been archived in the response
     */
    include_archived?: boolean;
    /**
     * Whether to include the organization's default Workspace in the response
     */
    include_default?: boolean;
}
export declare namespace Workspaces {
    export { type BetaAllowedInferenceGeo as BetaAllowedInferenceGeo, type BetaDataResidency as BetaDataResidency, type BetaDataResidencyCreateConfig as BetaDataResidencyCreateConfig, type BetaDataResidencyUpdateConfig as BetaDataResidencyUpdateConfig, type BetaNoBillingWorkspaceRole as BetaNoBillingWorkspaceRole, type BetaWorkspace as BetaWorkspace, type BetaWorkspaceMember as BetaWorkspaceMember, type BetaWorkspaceRole as BetaWorkspaceRole, type BetaWorkspacesPage as BetaWorkspacesPage, type WorkspaceCreateParams as WorkspaceCreateParams, type WorkspaceUpdateParams as WorkspaceUpdateParams, type WorkspaceListParams as WorkspaceListParams, };
    export { RateLimits as RateLimits, type BetaWorkspaceRateLimit as BetaWorkspaceRateLimit, type BetaWorkspaceRateLimitOrganizationSource as BetaWorkspaceRateLimitOrganizationSource, type BetaWorkspaceRateLimitType as BetaWorkspaceRateLimitType, type BetaWorkspaceRateLimitUpdateValue as BetaWorkspaceRateLimitUpdateValue, type BetaWorkspaceRateLimitValue as BetaWorkspaceRateLimitValue, type BetaWorkspaceRateLimitWorkspaceSource as BetaWorkspaceRateLimitWorkspaceSource, type BetaWorkspaceRateLimitsPageCursor as BetaWorkspaceRateLimitsPageCursor, type RateLimitUpdateParams as RateLimitUpdateParams, type RateLimitListParams as RateLimitListParams, };
    export { Members as Members, type MemberRemoveResponse as MemberRemoveResponse, type MemberRetrieveParams as MemberRetrieveParams, type MemberUpdateParams as MemberUpdateParams, type MemberListParams as MemberListParams, type MemberAddParams as MemberAddParams, type MemberRemoveParams as MemberRemoveParams, };
    export { ServiceAccounts as ServiceAccounts, type ServiceAccountRemoveResponse as ServiceAccountRemoveResponse, type ServiceAccountRetrieveParams as ServiceAccountRetrieveParams, type ServiceAccountUpdateParams as ServiceAccountUpdateParams, type ServiceAccountListParams as ServiceAccountListParams, type ServiceAccountAddParams as ServiceAccountAddParams, type ServiceAccountRemoveParams as ServiceAccountRemoveParams, };
}
//# sourceMappingURL=workspaces.d.ts.map