/**
 * Type definitions for browser profiles.
 *
 * All types use camelCase for SDK ergonomics.
 * API responses are normalized from snake_case to camelCase.
 */
/**
 * A browser profile that stores login state (cookies, localStorage).
 *
 * @example
 * ```typescript
 * const profile = await morph.browser.profiles.getProfile('profile-id');
 * console.log(profile.cookieDomains); // ['linkedin.com', 'google.com']
 * ```
 */
interface Profile {
    /** Unique profile identifier (UUID) */
    id: string;
    /** Human-readable profile name */
    name: string;
    /** Repository ID this profile is associated with */
    repoId: string;
    /** List of domains with stored cookies */
    cookieDomains?: string[];
    /** ISO 8601 timestamp of last use */
    lastUsedAt?: string;
    /** ISO 8601 timestamp of creation */
    createdAt: string;
    /** ISO 8601 timestamp of last update */
    updatedAt: string;
}
/**
 * Input for creating a new profile.
 *
 * @example
 * ```typescript
 * await morph.browser.profiles.createProfile({
 *   name: 'LinkedIn Production',
 *   repoId: 'owner/repo'
 * });
 * ```
 */
interface CreateProfileInput {
    /** Profile name (1-100 characters) */
    name: string;
    /** Repository ID - profiles are repo-specific */
    repoId: string;
}
/**
 * Input for updating a profile.
 */
/**
 * Response for listing profiles.
 */
interface ProfileListResponse {
    profiles: Profile[];
}
/**
 * A browser session for profile setup.
 *
 * @example
 * ```typescript
 * const session = await morph.browser.profiles.startSession();
 * console.log('Sign in at:', session.debugUrl);
 * // After user signs in...
 * await morph.browser.profiles.saveSession(session.sessionId, profile.id);
 * ```
 */
interface ProfileSession {
    /** Unique session identifier */
    sessionId: string;
    /** Live session URL for viewing/interacting with the browser */
    debugUrl: string;
}
/**
 * Profile setup handle returned by create/update.
 *
 * Provides a live URL for login and an explicit save() helper.
 */
interface ProfileSetup {
    profile: Profile;
    session: ProfileSession;
    save: () => Promise<Profile>;
}
/**
 * Input for starting a profile session.
 */
interface ProfileSessionInput {
    /** Optional profile ID to update an existing profile */
    profileId?: string;
}
/**
 * Input for saving a profile session.
 */
interface SaveProfileSessionInput {
    /** The browser session ID to extract state from */
    sessionId: string;
    /** The profile ID to save state to */
    profileId: string;
}
/**
 * Response for profile state URL.
 */
interface ProfileStateResponse {
    /** Profile ID */
    profileId: string;
    /** Presigned URL to download the profile state (expires in `expiresIn` seconds) */
    stateUrl: string;
    /** URL expiry time in seconds */
    expiresIn: number;
}
/**
 * Repo summary for profile discovery.
 */
interface RepoSummary {
    repoId: string;
    repoFullName?: string;
    profileCount: number;
}
/**
 * Response for repo discovery.
 */
interface RepoListResponse {
    repos: RepoSummary[];
}
/**
 * Profile with convenience methods attached.
 *
 * @example
 * ```typescript
 * const profile = await morph.browser.profiles.getProfile('id');
 * const state = await profile.getState();
 * await profile.delete();
 * ```
 */
interface ProfileWithMethods extends Profile {
    /** Get presigned URL for profile state */
    getState: () => Promise<ProfileStateResponse>;
    /** Delete this profile */
    delete: () => Promise<void>;
}
/** @internal API response format */
interface APIProfile {
    id: string;
    name: string;
    repo_id: string;
    cookie_domains?: string[];
    last_used_at?: string;
    created_at: string;
    updated_at: string;
}
/** @internal API response format */
interface APIProfileSession {
    session_id: string;
    debug_url?: string;
}
/** @internal API response format */
interface APIProfileStateResponse {
    profile_id: string;
    state_url: string;
    expires_in: number;
}
/**
 * Transform API profile response to SDK format.
 * @internal
 */
declare function transformProfile(api: APIProfile): Profile;
/**
 * Transform SDK input to API format.
 * @internal
 */
declare function transformCreateInput(input: CreateProfileInput): {
    name: string;
    repo_id: string;
};
/**
 * Transform API session response to SDK format.
 * @internal
 */
declare function transformSession(api: APIProfileSession): ProfileSession;
/**
 * Transform SDK save input to API format.
 * @internal
 */
declare function transformSaveInput(input: SaveProfileSessionInput): {
    session_id: string;
    profile_id: string;
};
/**
 * Transform API state response to SDK format.
 * @internal
 */
declare function transformStateResponse(api: APIProfileStateResponse): ProfileStateResponse;

export { type APIProfile, type APIProfileSession, type APIProfileStateResponse, type CreateProfileInput, type Profile, type ProfileListResponse, type ProfileSession, type ProfileSessionInput, type ProfileSetup, type ProfileStateResponse, type ProfileWithMethods, type RepoListResponse, type RepoSummary, type SaveProfileSessionInput, transformCreateInput, transformProfile, transformSaveInput, transformSession, transformStateResponse };
