import { CamundaPlatform8Configuration, DeepPartial } from '../../lib';
import { IOAuthProvider } from '../../oauth';
import { Form, TaskResponse, TaskSearchAfterOrEqualRequest, TaskSearchAfterRequest, TaskSearchBeforeOrEqualRequest, TaskSearchBeforeRequest, TaskSearchRequestBase, TaskSearchResponse, Variable, VariableSearchResponse } from './TasklistDto';
import { JSONDoc } from './utils';
/**
 * @description The high-level client for the Tasklist REST API
 * @example
 * ```
 *
 * ```
 */
export declare class TasklistApiClient {
    private userAgentString;
    private oAuthProvider;
    private rest;
    /**
     * @example
     * ```
     * const tasklist = new TasklistApiClient()
     * const tasks = await tasklist.getTasks({ state: TaskState.CREATED })
     * ```
     * @description
     *
     */
    constructor(options?: {
        config?: DeepPartial<CamundaPlatform8Configuration>;
        oAuthProvider?: IOAuthProvider;
    });
    private getHeaders;
    private replaceDatesWithString;
    /**
     * @description Query Tasklist for a list of tasks. See the [API documentation](https://docs.camunda.io/docs/apis-clients/tasklist-api/queries/tasks/).
     * @throws Status 400 - An error is returned when more than one search parameters among [`searchAfter`, `searchAfterOrEqual`, `searchBefore`, `searchBeforeOrEqual`] are present in request
     * @throws {RESTError}
     * @example
     * ```
     * const tasklist = new TasklistApiClient()
     *
     * async function getTasks() {
     *   const res = await tasklist.searchTasks({
     *     state: TaskState.CREATED
     *   })
     *   console.log(res ? 'Nothing' : JSON.stringify(res, null, 2))
     *   return res
     * }
     * ```
     * @param query
     */
    searchTasks(query: TaskSearchAfterRequest | TaskSearchAfterOrEqualRequest | TaskSearchBeforeRequest | TaskSearchBeforeOrEqualRequest | Partial<TaskSearchRequestBase>): Promise<TaskSearchResponse[]>;
    /**
     * @description Return a task by id, or throw if not found.
     * @throws {RESTError} Will throw if no task of the given taskId exists
     * @returns
     */
    getTask(taskId: string): Promise<TaskResponse>;
    /**
     * @description Get the form details by form id and processDefinitionKey.
     * @throws {RESTError}
     */
    getForm(formId: string, processDefinitionKey: string, version?: string | number): Promise<Form>;
    /**
     * @description This method returns a list of task variables for the specified taskId and variableNames. If the variableNames parameter is empty, all variables associated with the task will be returned.
     * @throws {RESTError}
     */
    getVariables({ taskId, variableNames, includeVariables, }: {
        taskId: string;
        variableNames?: string[];
        includeVariables?: {
            name: string;
            alwaysReturnFullValue: boolean;
        }[];
    }): Promise<VariableSearchResponse[]>;
    /**
     * @description https://docs.camunda.io/docs/apis-clients/tasklist-api/queries/variable/
     * @throws Throws 404 if no variable of the id is found
     */
    getVariable(variableId: string): Promise<Variable>;
    /**
     * @description Assign a task with taskId to assignee or the active user.
     * @throws {RESTError}
     * @throws Status 400 - An error is returned when the task is not active (not in the CREATED state).
     * Status 400 - An error is returned when task was already assigned, except the case when JWT authentication token used and allowOverrideAssignment = true.
     * Status 403 - An error is returned when user doesn't have the permission to assign another user to this task.
     * Status 404 - An error is returned when the task with the taskId is not found.
     */
    assignTask({ taskId, allowOverrideAssignment, assignee, }: {
        taskId: string;
        assignee?: string;
        allowOverrideAssignment?: boolean;
    }): Promise<TaskResponse>;
    /**
     * @description Complete a task with taskId and optional variables
     * @throws {RESTError}
     * @throws Status 400 An error is returned when the task is not active (not in the CREATED state).
     * @throws Status 400 An error is returned if the task was not claimed (assigned) before.
     * @throws Status 400 An error is returned if the task is not assigned to the current user.
     * @throws Status 403 User has no permission to access the task (Self-managed only).
     * @throws Status 404 An error is returned when the task with the taskId is not found.
     */
    completeTask(taskId: string, variables?: JSONDoc): Promise<TaskResponse>;
    /**
     * @description Unassign a task with taskId
     * @throws Status 400 An error is returned when the task is not active (not in the CREATED state).
     * @throws Status 400 An error is returned if the task was not claimed (assigned) before.
     * @throws Status 404 An error is returned when the task with the taskId is not found.
     * @throws {RESTError}
     */
    unassignTask(taskId: string): Promise<TaskResponse>;
}
