import { CreateTaskRequest as CreateTaskRequest$1, CreateTaskResponse as CreateTaskResponse$1, GetTaskRequest as GetTaskRequest$1, GetTaskResponse as GetTaskResponse$1, UpdateTaskRequest as UpdateTaskRequest$1, UpdateTaskResponse as UpdateTaskResponse$1, DeleteTaskRequest as DeleteTaskRequest$1, DeleteTaskResponse as DeleteTaskResponse$1, QueryTasksRequest as QueryTasksRequest$1, QueryTasksResponse as QueryTasksResponse$1, CountTasksRequest as CountTasksRequest$1, CountTasksResponse as CountTasksResponse$1, MoveTaskAfterRequest as MoveTaskAfterRequest$1, MoveTaskAfterResponse as MoveTaskAfterResponse$1 } from './index.typings.mjs'; import '@wix/sdk-types'; interface Task { /** * Task ID. * @format GUID * @readonly */ id?: string | null; /** * Revision number, which increments by 1 each time the task is updated. To prevent conflicting changes, the existing `revision` must be used when updating a task. * @readonly */ revision?: string | null; /** * Title of the task. * @minLength 1 * @maxLength 250 */ title?: string | null; /** * Description of the task. * @minLength 1 * @maxLength 500 */ description?: string | null; /** * Date and time the task was created. * @readonly */ createdDate?: Date | null; /** * Date and time the task was last updated. * @readonly */ updatedDate?: Date | null; /** Due date for the task. */ dueDate?: Date | null; /** * Status of the task. * * Default: `ACTION_NEEDED` */ status?: TaskStatusWithLiterals; /** Details about the task source. */ source?: TaskSource; /** Information about the contact associated with the task. */ contact?: ContactInfo; } /** Possible statuses in which the task may be. */ declare enum TaskStatus { /** Action needed. */ ACTION_NEEDED = "ACTION_NEEDED", /** Task completed. */ COMPLETED = "COMPLETED" } /** @enumType */ type TaskStatusWithLiterals = TaskStatus | 'ACTION_NEEDED' | 'COMPLETED'; interface TaskSource { /** * How the task was created. * @readonly */ sourceType?: SourceTypeWithLiterals; /** * App ID, if the task was created by an app. * @format GUID * @readonly */ appId?: string | null; /** * User ID, if the task was created by a Wix user. * @format GUID * @readonly */ userId?: string | null; } /** Possible sources that can create tasks. */ declare enum SourceType { /** Task was created by an app. */ APP = "APP", /** Task was created by a Wix user. */ USER = "USER" } /** @enumType */ type SourceTypeWithLiterals = SourceType | 'APP' | 'USER'; interface ContactInfo { /** * ID of the contact associated with the task. * @format GUID */ id?: string | null; /** * Contact's first name. * @readonly */ firstName?: string | null; /** * Contact's last name. * @readonly */ lastName?: string | null; /** * Contact's image URL. * @readonly */ imageUrl?: string | null; /** * Contact's primary email. * @readonly */ email?: string | null; /** * Contact's primary phone. * @readonly */ phone?: string | null; /** * Image URL expiration date. * @readonly */ imageUrlExpirationDate?: Date | null; } interface RepositionTask { /** * The id of the last task that was re-positioned * @format GUID */ taskId?: string | null; /** The position of the last task that was re-positioned */ position?: string | null; } interface TaskOverdue { /** The overdue task. */ task?: Task; } interface TaskAssigned { /** * The id of the assignee * @format GUID */ assigneeId?: string; /** The task that was assigned */ task?: Task; } interface CreateTaskRequest { /** Task to create. */ task: Task; } interface CreateTaskResponse { /** The created task. */ task?: Task; } interface ContactNotFoundError { /** @format GUID */ contactId?: string; } interface GetTaskRequest { /** * ID of the task to retrieve. * @format GUID */ taskId: string; } interface GetTaskResponse { /** The retrieved task. */ task?: Task; } interface UpdateTaskRequest { /** Task to update. */ task: Task; } interface UpdateTaskResponse { /** The updated task. */ task?: Task; } interface DeleteTaskRequest { /** * ID of the task to delete. * @format GUID */ taskId: string; } interface DeleteTaskResponse { } interface QueryTasksRequest { /** Query options. */ query?: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; } interface Sorting { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { /** Sort by ascending order. */ ASC = "ASC", /** Sort by descending order. */ DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface CursorPaging { /** * Number of items to load. * @max 1000 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * You can get the relevant cursor token * from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface QueryTasksResponse { /** The retrieved tasks. */ tasks?: Task[]; /** Paging metadata. */ pagingMetadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ cursors?: Cursors; /** * Indicates if there are more results after the current page. * If `true`, another page of results can be retrieved. * If `false`, this is the last page. */ hasNext?: boolean | null; } interface Cursors { /** Cursor pointing to next page in the list of results. */ next?: string | null; /** Cursor pointing to previous page in the list of results. */ prev?: string | null; } interface CountTasksRequest { /** * Filter which tasks to count. See [supported filters](https://dev.wix.com/docs/rest/api-reference/crm/tasks/task-v2/filter-and-sort). * * Filter tasks in the following format: * * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`. */ filter?: Record | null; } interface CountTasksResponse { /** The number of tasks that match the specified filter. */ count?: number; } interface QueryTasksInternalRequest { /** WQL expression */ query?: QueryV2; } interface QueryV2 extends QueryV2PagingMethodOneOf { /** Paging options to limit and skip the number of items. */ paging?: Paging; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Sorting[]; /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */ fields?: string[]; /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */ fieldsets?: string[]; } /** @oneof */ interface QueryV2PagingMethodOneOf { /** Paging options to limit and skip the number of items. */ paging?: Paging; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; } interface Paging { /** * Number of items to load. * @max 1000 */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface QueryTasksInternalResponse { /** The retrieved tasks. */ tasks?: Task[]; /** Details on the paged set of results returned. */ pagingMetadata?: PagingMetadataV2; } interface PagingMetadataV2 { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: Cursors; } interface MoveTaskAfterRequest { /** * ID of the task to move. * @format GUID */ taskId: string; /** * The ID of the task after which the moved task is positioned in the task display. * If `beforeTaskId` is not specified, the moved task is positioned first in the task display. * @format GUID */ beforeTaskId?: string | null; } interface MoveTaskAfterResponse { } interface TaskNotFoundError { /** * The task id that was not found * @format GUID */ taskId?: string; } interface Empty { } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } interface DeleteCompletedTasksRequest { /** * Optional list of tasks ids of the tasks to delete. If the list is not provided the filter is used. * @format GUID * @maxSize 1000 */ taskIds?: string[]; /** An optional filter of tasks to count. See 'queryTasks' for supported filter options. */ filter?: Record | null; } interface DeleteCompletedTasksResponse { } interface SendTasksReminderRequest { /** * Ids of the tasks to remind * @format GUID * @maxSize 50 */ taskIds?: string[]; /** The reminder type */ reminderType?: ReminderTypeWithLiterals; } declare enum ReminderType { UNKNOWN_REMINDER_TYPE = "UNKNOWN_REMINDER_TYPE", FIRST_REMINDER = "FIRST_REMINDER", LAST_REMINDER = "LAST_REMINDER" } /** @enumType */ type ReminderTypeWithLiterals = ReminderType | 'UNKNOWN_REMINDER_TYPE' | 'FIRST_REMINDER' | 'LAST_REMINDER'; interface SendTasksReminderResponse { } /** @docsIgnore */ type CreateTaskApplicationErrors = { code?: 'CONTACT_NOT_FOUND'; description?: string; data?: ContactNotFoundError; }; /** @docsIgnore */ type UpdateTaskApplicationErrors = { code?: 'CONTACT_NOT_FOUND'; description?: string; data?: ContactNotFoundError; }; /** @docsIgnore */ type CountTasksApplicationErrors = { code?: 'TOO_MANY_TO_COUNT'; description?: string; data?: Record; }; /** @docsIgnore */ type MoveTaskAfterApplicationErrors = { code?: 'TASK_NOT_FOUND'; description?: string; data?: TaskNotFoundError; }; type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function createTask(): __PublicMethodMetaInfo<'POST', {}, CreateTaskRequest$1, CreateTaskRequest, CreateTaskResponse$1, CreateTaskResponse>; declare function getTask(): __PublicMethodMetaInfo<'GET', { taskId: string; }, GetTaskRequest$1, GetTaskRequest, GetTaskResponse$1, GetTaskResponse>; declare function updateTask(): __PublicMethodMetaInfo<'PATCH', { taskId: string; }, UpdateTaskRequest$1, UpdateTaskRequest, UpdateTaskResponse$1, UpdateTaskResponse>; declare function deleteTask(): __PublicMethodMetaInfo<'DELETE', { taskId: string; }, DeleteTaskRequest$1, DeleteTaskRequest, DeleteTaskResponse$1, DeleteTaskResponse>; declare function queryTasks(): __PublicMethodMetaInfo<'POST', {}, QueryTasksRequest$1, QueryTasksRequest, QueryTasksResponse$1, QueryTasksResponse>; declare function countTasks(): __PublicMethodMetaInfo<'POST', {}, CountTasksRequest$1, CountTasksRequest, CountTasksResponse$1, CountTasksResponse>; declare function moveTaskAfter(): __PublicMethodMetaInfo<'POST', { taskId: string; }, MoveTaskAfterRequest$1, MoveTaskAfterRequest, MoveTaskAfterResponse$1, MoveTaskAfterResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type ContactInfo as ContactInfoOriginal, type ContactNotFoundError as ContactNotFoundErrorOriginal, type CountTasksApplicationErrors as CountTasksApplicationErrorsOriginal, type CountTasksRequest as CountTasksRequestOriginal, type CountTasksResponse as CountTasksResponseOriginal, type CreateTaskApplicationErrors as CreateTaskApplicationErrorsOriginal, type CreateTaskRequest as CreateTaskRequestOriginal, type CreateTaskResponse as CreateTaskResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DeleteCompletedTasksRequest as DeleteCompletedTasksRequestOriginal, type DeleteCompletedTasksResponse as DeleteCompletedTasksResponseOriginal, type DeleteTaskRequest as DeleteTaskRequestOriginal, type DeleteTaskResponse as DeleteTaskResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type GetTaskRequest as GetTaskRequestOriginal, type GetTaskResponse as GetTaskResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MoveTaskAfterApplicationErrors as MoveTaskAfterApplicationErrorsOriginal, type MoveTaskAfterRequest as MoveTaskAfterRequestOriginal, type MoveTaskAfterResponse as MoveTaskAfterResponseOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type Paging as PagingOriginal, type QueryTasksInternalRequest as QueryTasksInternalRequestOriginal, type QueryTasksInternalResponse as QueryTasksInternalResponseOriginal, type QueryTasksRequest as QueryTasksRequestOriginal, type QueryTasksResponse as QueryTasksResponseOriginal, type QueryV2 as QueryV2Original, type QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOfOriginal, ReminderType as ReminderTypeOriginal, type ReminderTypeWithLiterals as ReminderTypeWithLiteralsOriginal, type RepositionTask as RepositionTaskOriginal, type RestoreInfo as RestoreInfoOriginal, type SendTasksReminderRequest as SendTasksReminderRequestOriginal, type SendTasksReminderResponse as SendTasksReminderResponseOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, SourceType as SourceTypeOriginal, type SourceTypeWithLiterals as SourceTypeWithLiteralsOriginal, type TaskAssigned as TaskAssignedOriginal, type TaskNotFoundError as TaskNotFoundErrorOriginal, type Task as TaskOriginal, type TaskOverdue as TaskOverdueOriginal, type TaskSource as TaskSourceOriginal, TaskStatus as TaskStatusOriginal, type TaskStatusWithLiterals as TaskStatusWithLiteralsOriginal, type UpdateTaskApplicationErrors as UpdateTaskApplicationErrorsOriginal, type UpdateTaskRequest as UpdateTaskRequestOriginal, type UpdateTaskResponse as UpdateTaskResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, countTasks, createTask, deleteTask, getTask, moveTaskAfter, queryTasks, updateTask };