import type { Review, ReviewQueue, ReviewQueueMembership } from "../_internal/types.gen";
import type { RequestOptions } from "../base-client";
import { RequestBuilder } from "../request-builder";
export type AdminReviewPriority = "low" | "normal" | "high" | "urgent";
export type AdminReviewQueueMembershipRole = "member" | "supervisor";
/** Workspace-scoped review queue summary row. */
export type AdminReviewQueueSummary = {
    queue_id: string;
    slug: string;
    name: string;
    pending_count: number;
    sla_overdue_count: number;
};
export type AdminCreateReviewQueueAttributes = {
    workspace_id: string;
    name: string;
    slug: string;
    description?: string | null;
    default_sla_minutes?: number | null;
};
export type AdminUpdateReviewQueueAttributes = {
    name?: string;
    description?: string | null;
    default_sla_minutes?: number | null;
    is_archived?: boolean;
};
export type AdminCreateReviewQueueMembershipAttributes = {
    workspace_id: string;
    queue_id: string;
    user_id: string;
    membership_role?: AdminReviewQueueMembershipRole;
};
export type AdminAssignReviewAttributes = {
    assigned_user_id: string | null;
};
export type AdminApproveReviewAttributes = {
    decision_payload?: Record<string, unknown> | null;
    notes?: string | null;
};
export type AdminRejectReviewAttributes = {
    decision_payload?: Record<string, unknown> | null;
    notes?: string | null;
};
export type AdminCorrectReviewAttributes = {
    correction_payload?: Record<string, unknown> | null;
    notes?: string | null;
};
export type AdminEscalateReviewAttributes = {
    queue_id?: string;
    assigned_user_id?: string | null;
    priority?: AdminReviewPriority;
};
/**
 * Reviews namespace — admin access to human-review queues, memberships, and lifecycle actions.
 *
 * Admin callers can inspect review queues, grant queue membership, and drive
 * review lifecycle transitions through the JSON:API resources.
 */
export declare function createReviewsNamespace(rb: RequestBuilder): {
    /** Review records and lifecycle transitions. */
    reviews: {
        /**
         * List Reviews visible to the admin caller.
         *
         * @param options - Optional pagination and request settings.
         * @returns A promise resolving to Review records.
         */
        list: (options?: {
            page?: number;
            pageSize?: number;
        } & RequestOptions) => Promise<Review[]>;
        /**
         * Fetch a Review by id.
         *
         * @param id - Review id.
         * @param options - Optional request settings.
         * @returns A promise resolving to the Review.
         */
        get: (id: string, options?: RequestOptions) => Promise<Review>;
        /**
         * Assign a Review to a user or clear the assignee.
         *
         * @param id - Review id.
         * @param attributes - Assignment attributes accepted by the Review action.
         * @param options - Optional request settings.
         * @returns A promise resolving to the assigned Review.
         * @example
         * ```typescript
         * await admin.reviews.reviews.assign(reviewId, { assigned_user_id: userId });
         * ```
         */
        assign: (id: string, attributes: AdminAssignReviewAttributes, options?: RequestOptions) => Promise<Review>;
        /**
         * Claim an open or assigned Review for the current reviewer.
         *
         * @param id - Review id.
         * @param options - Optional request settings.
         * @returns A promise resolving to the claimed Review.
         * @example
         * ```typescript
         * await admin.reviews.reviews.claim(reviewId);
         * ```
         */
        claim: (id: string, options?: RequestOptions) => Promise<Review>;
        /**
         * Release a claimed Review back to its queue or assignee.
         *
         * @param id - Review id.
         * @param options - Optional request settings.
         * @returns A promise resolving to the unclaimed Review.
         * @example
         * ```typescript
         * await admin.reviews.reviews.unclaim(reviewId);
         * ```
         */
        unclaim: (id: string, options?: RequestOptions) => Promise<Review>;
        /**
         * Approve a Review and attach an optional decision payload.
         *
         * @param id - Review id.
         * @param attributes - Approval decision attributes.
         * @param options - Optional request settings.
         * @returns A promise resolving to the approved Review.
         * @example
         * ```typescript
         * await admin.reviews.reviews.approve(reviewId, { notes: "Verified" });
         * ```
         */
        approve: (id: string, attributes?: AdminApproveReviewAttributes, options?: RequestOptions) => Promise<Review>;
        /**
         * Reject a Review and attach an optional decision payload.
         *
         * @param id - Review id.
         * @param attributes - Rejection decision attributes.
         * @param options - Optional request settings.
         * @returns A promise resolving to the rejected Review.
         * @example
         * ```typescript
         * await admin.reviews.reviews.reject(reviewId, { notes: "Missing consent" });
         * ```
         */
        reject: (id: string, attributes?: AdminRejectReviewAttributes, options?: RequestOptions) => Promise<Review>;
        /**
         * Correct a Review with field-level correction data.
         *
         * @param id - Review id.
         * @param attributes - Correction payload and optional notes.
         * @param options - Optional request settings.
         * @returns A promise resolving to the corrected Review.
         * @example
         * ```typescript
         * await admin.reviews.reviews.correct(reviewId, { correction_payload: { total: 42 } });
         * ```
         */
        correct: (id: string, attributes?: AdminCorrectReviewAttributes, options?: RequestOptions) => Promise<Review>;
        /**
         * Escalate a Review to another queue, assignee, or priority.
         *
         * @param id - Review id.
         * @param attributes - Escalation attributes accepted by the Review action.
         * @param options - Optional request settings.
         * @returns A promise resolving to the escalated Review.
         * @example
         * ```typescript
         * await admin.reviews.reviews.escalate(reviewId, { queue_id: supervisorQueueId });
         * ```
         */
        escalate: (id: string, attributes: AdminEscalateReviewAttributes, options?: RequestOptions) => Promise<Review>;
    };
    /** Review queues used to route human work. */
    queues: {
        /**
         * List ReviewQueues visible to the admin caller.
         *
         * @param options - Optional pagination and request settings.
         * @returns A promise resolving to ReviewQueue records.
         */
        list: (options?: {
            page?: number;
            pageSize?: number;
        } & RequestOptions) => Promise<ReviewQueue[]>;
        /**
         * Fetch a ReviewQueue by id.
         *
         * @param id - ReviewQueue id.
         * @param options - Optional request settings.
         * @returns A promise resolving to the ReviewQueue.
         */
        get: (id: string, options?: RequestOptions) => Promise<ReviewQueue>;
        /**
         * Return review queue summary rows for a workspace.
         *
         * @param workspaceId - Workspace UUID to scope the admin request.
         * @param options - Optional request settings.
         * @returns A promise resolving to non-archived queue summary rows.
         */
        summaries: (workspaceId: string, options?: RequestOptions) => Promise<AdminReviewQueueSummary[]>;
        /**
         * Create a ReviewQueue.
         *
         * @param attributes - Accepted ReviewQueue create attributes.
         * @param options - Optional request settings.
         * @returns A promise resolving to the created ReviewQueue.
         * @example
         * ```typescript
         * await admin.reviews.queues.create({ workspace_id, name, slug });
         * ```
         */
        create: (attributes: AdminCreateReviewQueueAttributes, options?: RequestOptions) => Promise<ReviewQueue>;
        /**
         * Update mutable ReviewQueue fields.
         *
         * @param id - ReviewQueue id.
         * @param attributes - Accepted ReviewQueue update attributes.
         * @param options - Optional request settings.
         * @returns A promise resolving to the updated ReviewQueue.
         * @example
         * ```typescript
         * await admin.reviews.queues.update(queueId, { is_archived: true });
         * ```
         */
        update: (id: string, attributes: AdminUpdateReviewQueueAttributes, options?: RequestOptions) => Promise<ReviewQueue>;
        /**
         * Delete a ReviewQueue.
         *
         * @param id - ReviewQueue id.
         * @param options - Optional request settings.
         * @returns A promise resolving to true when the delete succeeds.
         */
        delete: (id: string, options?: RequestOptions) => Promise<true>;
    };
    /** Review queue memberships for reviewer and supervisor access. */
    memberships: {
        /**
         * List ReviewQueueMembership records visible to the admin caller.
         *
         * @param options - Optional pagination and request settings.
         * @returns A promise resolving to ReviewQueueMembership records.
         */
        list: (options?: {
            page?: number;
            pageSize?: number;
        } & RequestOptions) => Promise<ReviewQueueMembership[]>;
        /**
         * Fetch a ReviewQueueMembership by id.
         *
         * @param id - ReviewQueueMembership id.
         * @param options - Optional request settings.
         * @returns A promise resolving to the ReviewQueueMembership.
         */
        get: (id: string, options?: RequestOptions) => Promise<ReviewQueueMembership>;
        /**
         * Grant a user membership on a ReviewQueue.
         *
         * @param attributes - Accepted ReviewQueueMembership create attributes.
         * @param options - Optional request settings.
         * @returns A promise resolving to the created ReviewQueueMembership.
         * @example
         * ```typescript
         * await admin.reviews.memberships.create({ workspace_id, queue_id, user_id });
         * ```
         */
        create: (attributes: AdminCreateReviewQueueMembershipAttributes, options?: RequestOptions) => Promise<ReviewQueueMembership>;
        /**
         * Revoke a ReviewQueueMembership.
         *
         * @param id - ReviewQueueMembership id.
         * @param options - Optional request settings.
         * @returns A promise resolving to true when the delete succeeds.
         */
        delete: (id: string, options?: RequestOptions) => Promise<true>;
    };
};
//# sourceMappingURL=reviews.d.ts.map