import { EventDefinition, HttpClient } from '@wix/sdk-types'; import { CountTasksOptions, CountTasksResponse, CountTasksResponseNonNullableFields, MoveTaskAfterOptions, Task, TaskCreatedEnvelope, TaskDeletedEnvelope, TaskNonNullableFields, TaskOverdueEnvelope, TaskUpdatedEnvelope, TasksQueryBuilder, UpdateTask } from './crm-tasks-v2-task-tasks.universal.js'; export declare const __metadata: { PACKAGE_NAME: string; }; export declare function createTask(httpClient: HttpClient): CreateTaskSignature; interface CreateTaskSignature { /** * Creates a new task. * * All fields in the `task` object are optional. If you don't pass any fields in the `task` object, the function returns a task with the following core properties: * - `_id` * - `_createdDate` * - `_updatedDate` * - `status` * - `source` * - `revision` * * @param - Task to create. * @returns The created task. */ (task: Task): Promise; } export declare function getTask(httpClient: HttpClient): GetTaskSignature; interface GetTaskSignature { /** * Retrieves a task by ID. * @param - ID of the task to retrieve. * @returns The retrieved task. */ (taskId: string): Promise; } export declare function updateTask(httpClient: HttpClient): UpdateTaskSignature; interface UpdateTaskSignature { /** * Updates a task. * * Each time the task is updated, `revision` increments by 1. * The existing `revision` must be included when updating the task. * This ensures you're working with the latest task * and prevents unintended overwrites. * @param - Task ID. * @param - Task to update. * @returns The updated task. */ (_id: string | null, task: UpdateTask): Promise; } export declare function deleteTask(httpClient: HttpClient): DeleteTaskSignature; interface DeleteTaskSignature { /** * Deletes a task by ID. * @param - ID of the task to delete. */ (taskId: string): Promise; } export declare function queryTasks(httpClient: HttpClient): QueryTasksSignature; interface QueryTasksSignature { /** * Creates a query to retrieve a list of tasks. * * The `queryTasks()` function builds a query to retrieve a list of tasks and returns a `TasksQueryBuilder` object. * * The returned object contains the query definition which is typically used to run the query using the `find()` function. You can refine the query by chaining `TasksQueryBuilder` functions onto the query. `TasksQueryBuilder` functions enable you to sort, filter, and control the results that `queryTasks()` returns. * * `queryTasks()` runs with these `TasksQueryBuilder` defaults, which you can override: * - `limit(50)` * - `descending('_createdDate')` * * The functions that are chained to `queryTasks()` are applied in the order they are called. For example, if you apply `ascending('_createdDate')` and then `descending('_updatedDate')`, the results are sorted first by the created date and then, if there are multiple results with the same date, the items are sorted by the updated date. * * The following `TasksQueryBuilder` functions are supported for `queryTasks()`. For a full description of the `task` object, see the object returned for the `items` property in `TasksQueryResult`. */ (): TasksQueryBuilder; } export declare function countTasks(httpClient: HttpClient): CountTasksSignature; interface CountTasksSignature { /** * Counts the number of tasks. * * * This method returns the count of all tasks regardless of their `status`. * * Optionally, you can specify a filter to count only tasks that meet certain criteria. * @param - Filtering options. */ (options?: CountTasksOptions | undefined): Promise; } export declare function moveTaskAfter(httpClient: HttpClient): MoveTaskAfterSignature; interface MoveTaskAfterSignature { /** * Moves a task specified by ID to be placed after another task in the task display. * * You can reposition a task to be first in the display by omitting `beforeTaskId`. * @param - ID of the task to move. * @param - Options for moving the task. */ (taskId: string, options?: MoveTaskAfterOptions | undefined): Promise; } export declare const onTaskCreated: EventDefinition; export declare const onTaskDeleted: EventDefinition; export declare const onTaskOverdue: EventDefinition; export declare const onTaskUpdated: EventDefinition; export { ActionEvent, BaseEventMetadata, ContactInfo, ContactNotFoundError, CountTasksOptions, CountTasksRequest, CountTasksResponse, CountTasksResponseNonNullableFields, CreateTaskRequest, CreateTaskResponse, CreateTaskResponseNonNullableFields, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteCompletedTasksRequest, DeleteCompletedTasksResponse, DeleteTaskRequest, DeleteTaskResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, GetTaskRequest, GetTaskResponse, GetTaskResponseNonNullableFields, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, MoveTaskAfterOptions, MoveTaskAfterRequest, MoveTaskAfterResponse, Paging, PagingMetadataV2, QueryTasksInternalRequest, QueryTasksInternalResponse, QueryTasksRequest, QueryTasksResponse, QueryTasksResponseNonNullableFields, QueryV2, QueryV2PagingMethodOneOf, ReminderType, RepositionTask, RestoreInfo, SendTasksReminderRequest, SendTasksReminderResponse, SortOrder, Sorting, SourceType, Task, TaskAssigned, TaskCreatedEnvelope, TaskDeletedEnvelope, TaskNonNullableFields, TaskNotFoundError, TaskOverdue, TaskOverdueEnvelope, TaskSource, TaskStatus, TaskUpdatedEnvelope, TasksQueryBuilder, TasksQueryResult, UpdateTask, UpdateTaskRequest, UpdateTaskResponse, UpdateTaskResponseNonNullableFields, WebhookIdentityType, } from './crm-tasks-v2-task-tasks.universal.js';