import { APIResource } from "../../core/resource.mjs"; import * as EvaluationsAPI from "./evaluations.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; export declare class Tasks extends APIResource { /** * Replace the full configuration of a single test criteria, identified by its * alias. * * The alias must match an existing test criteria on the evaluation, and the * replacement configuration is validated against the evaluation's current items * before being applied. The request is rejected if the evaluation is archived, if * no test criteria matches the alias, or if any contributor annotation task for * the evaluation has already been claimed or completed — at that point labelers * are in-flight and mutating the task definition would corrupt their work. */ update(alias: string, params: TaskUpdateParams, options?: RequestOptions): APIPromise; /** * Add a new test criteria to an existing evaluation. * * Narrowed to contributor question tasks (`contributor_evaluation.question`); * other task types must be configured when the evaluation is first created and are * rejected here. The request is also rejected if the evaluation is archived, if a * test criteria with the same alias already exists, or if any contributor * annotation task for the evaluation has already been claimed or completed. * Because only contributor question tasks are accepted, the added criteria is * applied synchronously and contributors answer it against the evaluation's * existing items — no async job or Temporal workflow is started. */ add(evaluationID: string, body: TaskAddParams, options?: RequestOptions): APIPromise; } export interface TaskUpdateParams { /** * Path param */ evaluation_id: string; /** * Body param: Full replacement for the test criteria's configuration JSON. Only * allowed when no contributor annotation tasks for this evaluation have been * claimed or completed. */ configuration: { [key: string]: unknown; }; } export interface TaskAddParams { /** * New test criteria to add to the evaluation. Rejected when contributor annotation * tasks for this evaluation have already been claimed or completed. Triggers a * rerun so the new task executes against existing items. */ task: EvaluationsAPI.EvaluationTask; } export declare namespace Tasks { export { type TaskUpdateParams as TaskUpdateParams, type TaskAddParams as TaskAddParams }; } //# sourceMappingURL=tasks.d.mts.map