import { type AnthropicClientOptions, type AnthropicRequestOptions } from "./anthropic-client.js"; /** Types use Anthropic's snake_case wire names so request and response bodies are unchanged. */ export type UserProfileAccessType = "application" | "passthrough"; export type UserProfileAccountStatus = "active" | "suspended" | "blocked"; export type UserProfileEntityType = "individual" | "business" | "non_profit" | "government"; export interface UserProfileExternalUserDetailsParams { account_status?: UserProfileAccountStatus | null; country?: string | null; email_hash?: string | null; entity_type?: UserProfileEntityType | null; name_hash?: string | null; onboarded_at?: string; reference_id?: string | null; } export interface UserProfileExternalUserDetails { account_status: UserProfileAccountStatus | null; country: string | null; email_hash: string | null; entity_type: UserProfileEntityType | null; name_hash: string | null; onboarded_at: string | null; reference_id: string | null; } /** Update accepts only supplied, non-null detail values; existing values cannot be cleared. */ export type UserProfileExternalUserDetailsUpdateParams = { [K in keyof UserProfileExternalUserDetails]?: NonNullable; }; export interface UserProfile { type: "user_profile"; id: string; created_at: string; updated_at: string; metadata: Record; trust_grants: Record; access_type?: UserProfileAccessType; external_user_details?: UserProfileExternalUserDetails; external_user_onboarded_at?: string | null; name?: string | null; } export interface CreateUserProfileParams { access_type?: UserProfileAccessType; external_user_details?: UserProfileExternalUserDetailsParams; external_user_onboarded_at?: string; metadata?: Record; name?: string | null; } export interface UpdateUserProfileParams { access_type?: UserProfileAccessType | null; /** Sent fields replace existing values; null is rejected by the 2026-09-04 API. */ external_user_details?: UserProfileExternalUserDetailsUpdateParams; external_user_onboarded_at?: string; /** Empty values remove existing metadata keys. */ metadata?: Record; name?: string | null; } export interface ListUserProfilesParams { limit?: number; order?: "asc" | "desc"; order_by?: "created_at" | "name"; page?: string; } export interface UserProfilePage { data: UserProfile[]; next_page: string | null; } export interface UserProfileEnrollmentUrl { type: "enrollment_url"; expires_at: string; url: string; } /** Optional Workspace selection and transport overrides for any profile operation. */ export interface UserProfileRequestOptions extends AnthropicRequestOptions { workspaceId?: string; } /** Beta User Profiles REST API. Uses the same authentication, retries and errors as Messages. */ export declare class AnthropicUserProfilesClient { #private; constructor(options: AnthropicClientOptions); createUserProfile(params?: CreateUserProfileParams, options?: UserProfileRequestOptions): Promise; listUserProfiles(params?: ListUserProfilesParams, options?: UserProfileRequestOptions): Promise; /** Fetch all pages in cursor order, without buffering the complete list. */ iterateUserProfilePages(params?: ListUserProfilesParams, options?: UserProfileRequestOptions): AsyncGenerator; getUserProfile(id: string, options?: UserProfileRequestOptions): Promise; updateUserProfile(id: string, params: UpdateUserProfileParams, options?: UserProfileRequestOptions): Promise; createEnrollmentUrl(id: string, options?: UserProfileRequestOptions): Promise; }