import { APIResource } from "../../../../core/resource.js"; import * as ActiveAPI from "./active.js"; import { Active, ActiveCancelParams, ActiveCancelResponse } from "./active.js"; import { APIPromise } from "../../../../core/api-promise.js"; import { RequestOptions } from "../../../../internal/request-options.js"; export declare class Requests extends APIResource { active: ActiveAPI.Active; /** * Queue a personal data export after step-up OTP verification. Does not return a * download URL. */ create(params: RequestCreateParams, options?: RequestOptions): APIPromise; /** * Get export request status scoped to the caller. * * Args: request_id (str): Export request ID. current_user (CurrentUser): * Authenticated user with send-message permission. service * (PersonalDataExportRequestService): Export request business logic. * * Returns: PersonalDataExportRequestStatusResponse: Status fields without storage * keys or presigned URLs. * * Raises: HTTPException: 404 when the request is not owned by the caller in the * active organization. */ retrieve(requestID: string, params?: RequestRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; } /** * Export request lifecycle status. */ export type PersonalDataExportStatus = 'queued' | 'processing' | 'completed' | 'failed' | 'expired'; /** * Accepted export request (202). */ export interface RequestCreateResponse { /** * User-facing confirmation message. */ message: string; /** * Export request identifier. */ request_id: string; /** * Initial lifecycle status. */ status: PersonalDataExportStatus; } /** * Export request status for the authenticated owner. */ export interface RequestRetrieveResponse { request_id: string; requested_at: string; sections: Array; /** * Export request lifecycle status. */ status: PersonalDataExportStatus; completed_at?: string | null; expires_at?: string | null; failure_reason?: string | null; } export interface RequestCreateParams { /** * Body param: Client-generated UUID for idempotent retries. */ idempotency_key: string; /** * Body param: One-time token from OTP verification. */ otp_verification_token: string; /** * Body param: Export sections; omit or empty for all sections. */ sections?: Array<'personal_data' | 'chat_history' | 'uploaded_files' | 'memories' | 'personalization' | 'account_activity_log'> | null; /** * Header param */ 'Accept-Language'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export interface RequestRetrieveParams { 'Accept-Language'?: string; /** * Set to `structured` to receive errors in the structured envelope. Omit it to * keep the legacy error body. */ 'X-Error-Format'?: string; } export declare namespace Requests { export { type PersonalDataExportStatus as PersonalDataExportStatus, type RequestCreateResponse as RequestCreateResponse, type RequestRetrieveResponse as RequestRetrieveResponse, type RequestCreateParams as RequestCreateParams, type RequestRetrieveParams as RequestRetrieveParams, }; export { Active as Active, type ActiveCancelResponse as ActiveCancelResponse, type ActiveCancelParams as ActiveCancelParams, }; } //# sourceMappingURL=requests.d.ts.map