import type { PaginatedConciseTaskList } from "../models/PaginatedConciseTaskList"; import type { TaskDescriptionUpdate } from "../models/TaskDescriptionUpdate"; import type { TaskMove } from "../models/TaskMove"; import type { TaskTimeTrackingCreate } from "../models/TaskTimeTrackingCreate"; import type { WrappedTask } from "../models/WrappedTask"; import type { WrappedTaskCreate } from "../models/WrappedTaskCreate"; import type { WrappedTaskUpdate } from "../models/WrappedTaskUpdate"; import type { CancelablePromise } from "../core/CancelablePromise"; export declare class TaskService { /** * Create a new task * Record a new task that the user intends to do. By default the task will be assigned to the current user, have an unstarted status, have no parent, and be in the default dartboard. More information can be included in the description. * @param requestBody * @returns WrappedTask * @throws ApiError */ static createTask(requestBody: WrappedTaskCreate): CancelablePromise; /** * Retrieve an existing task * Retrieve an existing task. This will return the task's information, including the title, dartboard, status, description and others. * @param id * @returns WrappedTask Success, including the retrieved task * @throws ApiError */ static getTask(id: string): CancelablePromise; /** * Update an existing task * Update properties of an existing task. For customProperties, use property NAME (not ID) as key. Get property names from workspace config. Example: {"customTextProperty": "Some text"}. Fields not provided are unchanged. * @param id * @param requestBody * @returns WrappedTask Success, including the updated task * @throws ApiError */ static updateTask(id: string, requestBody: WrappedTaskUpdate): CancelablePromise; /** * Delete an existing task * Move an existing task to the trash, where it can be recovered if needed. Nothing else about the task will be changed. * @param id * @returns WrappedTask Success, including the deleted task * @throws ApiError */ static deleteTask(id: string): CancelablePromise; /** * Move a task within its dartboard * Move a task to a specific position within results sorted by the order field. Use afterTaskId to place the task after a specific task, or beforeTaskId to place it before one. * @param id * @param requestBody * @returns WrappedTask Success, including the updated task with its new ordering * @throws ApiError */ static moveTask(id: string, requestBody?: TaskMove): CancelablePromise; /** * Add a time tracking entry to a task * Record an additional time tracking entry on a task and return the updated task with refreshed time tracking. * @param id * @param requestBody * @returns WrappedTask Success, including the updated task with refreshed time tracking * @throws ApiError */ static addTaskTimeTracking(id: string, requestBody: TaskTimeTrackingCreate): CancelablePromise; /** * Update a task's description with text updates * Apply targeted text updates to a task's description; use instead of updateTask when only the description changes. Each update is one of: "replace" (swap oldText for newText), "insert_before" / "insert_after" (insert newText relative to anchorText), or "delete" (remove oldText), applied in order and atomically. When occurrence is omitted, the target text must be unique; otherwise specify occurrence (1-indexed). Preferred over a full update for long content: fewer tokens, and no risk of rewriting unrelated text. * @param id * @param requestBody * @returns WrappedTask Success, including the updated task * @throws ApiError */ static updateTaskDescription(id: string, requestBody: TaskDescriptionUpdate): CancelablePromise; /** * List tasks with powerful filtering options. Filter by dartboard, status, assignee, tags, priority, dates, completion state, view, and more. Supports pagination with limit/offset. * @returns PaginatedConciseTaskList * @throws ApiError */ static listTasks({ assignee, assigneeId, completedAt, completedAtAfter, completedAtBefore, createdAt, createdAtAfter, createdAtBefore, createdBy, createdById, dartboard, dartboardId, description, dueAt, dueAtAfter, dueAtBefore, ids, inTrash, isCompleted, limit, noDefaults, o, offset, parentId, priority, reviewer, reviewerId, size, startAt, startAtAfter, startAtBefore, status, statusId, tag, tagId, title, type, typeId, updatedAt, updatedAtAfter, updatedAtBefore, updatedBy, updatedById, view, viewId, }: { assignee?: string; assigneeId?: string; completedAt?: string; completedAtAfter?: string; completedAtBefore?: string; createdAt?: string; createdAtAfter?: string; createdAtBefore?: string; createdBy?: string; createdById?: string; dartboard?: string; dartboardId?: string; description?: string; dueAt?: string; dueAtAfter?: string; dueAtBefore?: string; /** * Filter by IDs */ ids?: string; inTrash?: boolean; isCompleted?: boolean; /** * Number of results to return per page. */ limit?: number; /** * Whether default filters and sorting are applied when false (default) or no defaults are applied when true. Explicit filters or sorting always override defaults. */ noDefaults?: boolean; /** * Ordering * * * `dartboard__order` - Dartboard order * * `-dartboard__order` - Dartboard order (desc) * * `order` - Order * * `-order` - Order (desc) * * `created_at` - Created * * `-created_at` - Created (desc) * * `updated_at` - Updated * * `-updated_at` - Updated (desc) * * `completed_at` - Completed * * `-completed_at` - Completed (desc) * * `title` - Title * * `-title` - Title (desc) */ o?: Array<"-completed_at" | "-created_at" | "-dartboard__order" | "-order" | "-title" | "-updated_at" | "completed_at" | "created_at" | "dartboard__order" | "order" | "title" | "updated_at">; /** * The initial index from which to return the results. */ offset?: number; parentId?: string; priority?: string; reviewer?: string; reviewerId?: string; size?: number; startAt?: string; startAtAfter?: string; startAtBefore?: string; status?: string; statusId?: string; tag?: string; tagId?: string; title?: string; type?: string; typeId?: string; updatedAt?: string; updatedAtAfter?: string; updatedAtBefore?: string; updatedBy?: string; updatedById?: string; view?: string; viewId?: string; }): CancelablePromise; }