import { WorkspaceScopedResource, extractData } from './base.js';
export class ReviewQueueResource extends WorkspaceScopedResource {
    async list(params) {
        return extractData(await this.client.GET('/v1/{workspace_id}/review-queue', {
            params: { path: { workspace_id: this.workspaceId }, query: params },
        }));
    }
    listAutoPaging(params) {
        return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
    }
    async get(itemId) {
        return extractData(await this.client.GET('/v1/{workspace_id}/review-queue/{item_id}', {
            params: { path: { workspace_id: this.workspaceId, item_id: itemId } },
        }));
    }
    async getStats() {
        return extractData(await this.client.GET('/v1/{workspace_id}/review-queue/stats', {
            params: { path: { workspace_id: this.workspaceId } },
        }));
    }
    async getDashboard() {
        return extractData(await this.client.GET('/v1/{workspace_id}/review-queue/dashboard', {
            params: { path: { workspace_id: this.workspaceId } },
        }));
    }
    async getMyQueue(params) {
        return extractData(await this.client.GET('/v1/{workspace_id}/review-queue/my-queue', {
            params: { path: { workspace_id: this.workspaceId }, query: params },
        }));
    }
    getMyQueueAutoPaging(params) {
        return this.iteratePaginatedList((pageParams) => this.getMyQueue(pageParams), params);
    }
    async approve(itemId, body) {
        return extractData(await this.client.POST('/v1/{workspace_id}/review-queue/{item_id}/approve', {
            params: { path: { workspace_id: this.workspaceId, item_id: itemId } },
            body,
        }));
    }
    async reject(itemId, body) {
        return extractData(await this.client.POST('/v1/{workspace_id}/review-queue/{item_id}/reject', {
            params: { path: { workspace_id: this.workspaceId, item_id: itemId } },
            body,
        }));
    }
    async claim(itemId) {
        return extractData(await this.client.POST('/v1/{workspace_id}/review-queue/{item_id}/claim', {
            params: { path: { workspace_id: this.workspaceId, item_id: itemId } },
        }));
    }
    async unclaim(itemId) {
        return extractData(await this.client.POST('/v1/{workspace_id}/review-queue/{item_id}/unclaim', {
            params: { path: { workspace_id: this.workspaceId, item_id: itemId } },
        }));
    }
    async correct(itemId, body) {
        return extractData(await this.client.POST('/v1/{workspace_id}/review-queue/{item_id}/correct', {
            params: { path: { workspace_id: this.workspaceId, item_id: itemId } },
            body,
        }));
    }
    async batchApprove(body) {
        return extractData(await this.client.POST('/v1/{workspace_id}/review-queue/batch-approve', {
            params: { path: { workspace_id: this.workspaceId } },
            body,
        }));
    }
    async batchReject(body) {
        return extractData(await this.client.POST('/v1/{workspace_id}/review-queue/batch-reject', {
            params: { path: { workspace_id: this.workspaceId } },
            body,
        }));
    }
    async getHistory(params) {
        return extractData(await this.client.GET('/v1/{workspace_id}/review-queue/history', {
            params: { path: { workspace_id: this.workspaceId }, query: params },
        }));
    }
    getHistoryAutoPaging(params) {
        return this.iteratePaginatedList((pageParams) => this.getHistory(pageParams), params);
    }
    async getTrends(params) {
        return extractData(await this.client.GET('/v1/{workspace_id}/review-queue/trends', {
            params: { path: { workspace_id: this.workspaceId }, query: params },
        }));
    }
    async getPerformance(params) {
        return extractData(await this.client.GET('/v1/{workspace_id}/review-queue/performance', {
            params: { path: { workspace_id: this.workspaceId }, query: params },
        }));
    }
    async getCorrectionSchema(itemId) {
        return extractData(await this.client.GET('/v1/{workspace_id}/review-queue/{item_id}/correction-schema', {
            params: { path: { workspace_id: this.workspaceId, item_id: itemId } },
        }));
    }
    async getDiff(itemId) {
        return extractData(await this.client.GET('/v1/{workspace_id}/review-queue/{item_id}/diff', {
            params: { path: { workspace_id: this.workspaceId, item_id: itemId } },
        }));
    }
}
//# sourceMappingURL=review-queue.js.map