@wix/auto_sdk_crm_tasks 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.context.d.ts +32 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.context.js +40 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.context.js.map +1 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.http.d.ts +58 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.http.js +275 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.http.js.map +1 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.meta.d.ts +27 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.meta.js +161 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.meta.js.map +1 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.public.d.ts +103 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.public.js +102 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.public.js.map +1 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.types.d.ts +473 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.types.js +41 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.types.js.map +1 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.universal.d.ts +811 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.universal.js +372 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/crm-tasks-v2-task-tasks.context.d.ts +32 -0
- package/build/es/src/crm-tasks-v2-task-tasks.context.js +32 -0
- package/build/es/src/crm-tasks-v2-task-tasks.context.js.map +1 -0
- package/build/es/src/crm-tasks-v2-task-tasks.http.d.ts +58 -0
- package/build/es/src/crm-tasks-v2-task-tasks.http.js +265 -0
- package/build/es/src/crm-tasks-v2-task-tasks.http.js.map +1 -0
- package/build/es/src/crm-tasks-v2-task-tasks.meta.d.ts +27 -0
- package/build/es/src/crm-tasks-v2-task-tasks.meta.js +128 -0
- package/build/es/src/crm-tasks-v2-task-tasks.meta.js.map +1 -0
- package/build/es/src/crm-tasks-v2-task-tasks.public.d.ts +103 -0
- package/build/es/src/crm-tasks-v2-task-tasks.public.js +87 -0
- package/build/es/src/crm-tasks-v2-task-tasks.public.js.map +1 -0
- package/build/es/src/crm-tasks-v2-task-tasks.types.d.ts +473 -0
- package/build/es/src/crm-tasks-v2-task-tasks.types.js +38 -0
- package/build/es/src/crm-tasks-v2-task-tasks.types.js.map +1 -0
- package/build/es/src/crm-tasks-v2-task-tasks.universal.d.ts +811 -0
- package/build/es/src/crm-tasks-v2-task-tasks.universal.js +339 -0
- package/build/es/src/crm-tasks-v2-task-tasks.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.context.d.ts +32 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.context.js +40 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.context.js.map +1 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.http.d.ts +58 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.http.js +275 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.http.js.map +1 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.meta.d.ts +27 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.meta.js +161 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.meta.js.map +1 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.public.d.ts +103 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.public.js +102 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.public.js.map +1 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.types.d.ts +473 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.types.js +41 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.types.js.map +1 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.universal.d.ts +811 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.universal.js +372 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.context.d.ts +32 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.context.js +32 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.context.js.map +1 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.http.d.ts +58 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.http.js +265 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.http.js.map +1 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.meta.d.ts +27 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.meta.js +128 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.meta.js.map +1 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.public.d.ts +103 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.public.js +87 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.public.js.map +1 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.types.d.ts +473 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.types.js +38 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.types.js.map +1 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.universal.d.ts +811 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.universal.js +339 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,811 @@
|
|
|
1
|
+
export interface Task {
|
|
2
|
+
/**
|
|
3
|
+
* Task ID.
|
|
4
|
+
* @readonly
|
|
5
|
+
*/
|
|
6
|
+
_id?: string | null;
|
|
7
|
+
/**
|
|
8
|
+
* 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.
|
|
9
|
+
* @readonly
|
|
10
|
+
*/
|
|
11
|
+
revision?: string | null;
|
|
12
|
+
/** Title of the task. */
|
|
13
|
+
title?: string | null;
|
|
14
|
+
/** Description of the task. */
|
|
15
|
+
description?: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* Date and time the task was created.
|
|
18
|
+
* @readonly
|
|
19
|
+
*/
|
|
20
|
+
_createdDate?: Date | null;
|
|
21
|
+
/**
|
|
22
|
+
* Date and time the task was last updated.
|
|
23
|
+
* @readonly
|
|
24
|
+
*/
|
|
25
|
+
_updatedDate?: Date | null;
|
|
26
|
+
/** Due date for the task. */
|
|
27
|
+
dueDate?: Date | null;
|
|
28
|
+
/**
|
|
29
|
+
* Status of the task.
|
|
30
|
+
*
|
|
31
|
+
* Default: `ACTION_NEEDED`
|
|
32
|
+
*/
|
|
33
|
+
status?: TaskStatus;
|
|
34
|
+
/** Details about the task source. */
|
|
35
|
+
source?: TaskSource;
|
|
36
|
+
/** Information about the contact associated with the task. */
|
|
37
|
+
contact?: ContactInfo;
|
|
38
|
+
}
|
|
39
|
+
/** Possible statuses in which the task may be. */
|
|
40
|
+
export declare enum TaskStatus {
|
|
41
|
+
/** Action needed. */
|
|
42
|
+
ACTION_NEEDED = "ACTION_NEEDED",
|
|
43
|
+
/** Task completed. */
|
|
44
|
+
COMPLETED = "COMPLETED"
|
|
45
|
+
}
|
|
46
|
+
export interface TaskSource {
|
|
47
|
+
/**
|
|
48
|
+
* How the task was created.
|
|
49
|
+
* @readonly
|
|
50
|
+
*/
|
|
51
|
+
sourceType?: SourceType;
|
|
52
|
+
/**
|
|
53
|
+
* App ID, if the task was created by an app.
|
|
54
|
+
* @readonly
|
|
55
|
+
*/
|
|
56
|
+
appId?: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* User ID, if the task was created by a Wix user.
|
|
59
|
+
* @readonly
|
|
60
|
+
*/
|
|
61
|
+
userId?: string | null;
|
|
62
|
+
}
|
|
63
|
+
/** Possible sources that can create tasks. */
|
|
64
|
+
export declare enum SourceType {
|
|
65
|
+
/** Task was created by an app. */
|
|
66
|
+
APP = "APP",
|
|
67
|
+
/** Task was created by a Wix user. */
|
|
68
|
+
USER = "USER"
|
|
69
|
+
}
|
|
70
|
+
export interface ContactInfo {
|
|
71
|
+
/** ID of the contact associated with the task. */
|
|
72
|
+
_id?: string | null;
|
|
73
|
+
/**
|
|
74
|
+
* Contact's first name.
|
|
75
|
+
* @readonly
|
|
76
|
+
*/
|
|
77
|
+
firstName?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Contact's last name.
|
|
80
|
+
* @readonly
|
|
81
|
+
*/
|
|
82
|
+
lastName?: string | null;
|
|
83
|
+
/**
|
|
84
|
+
* Contact's image URL.
|
|
85
|
+
* @readonly
|
|
86
|
+
*/
|
|
87
|
+
imageUrl?: string | null;
|
|
88
|
+
/**
|
|
89
|
+
* Contact's primary email.
|
|
90
|
+
* @readonly
|
|
91
|
+
*/
|
|
92
|
+
email?: string | null;
|
|
93
|
+
/**
|
|
94
|
+
* Contact's primary phone.
|
|
95
|
+
* @readonly
|
|
96
|
+
*/
|
|
97
|
+
phone?: string | null;
|
|
98
|
+
}
|
|
99
|
+
export interface DeleteCompletedTasksRequest {
|
|
100
|
+
/** Optional list of tasks ids of the tasks to delete. If the list is not provided the filter is used. */
|
|
101
|
+
taskIds?: string[];
|
|
102
|
+
/** An optional filter of tasks to count. See 'queryTasks' for supported filter options. */
|
|
103
|
+
filter?: Record<string, any> | null;
|
|
104
|
+
}
|
|
105
|
+
export interface DeleteCompletedTasksResponse {
|
|
106
|
+
}
|
|
107
|
+
export interface SendTasksReminderRequest {
|
|
108
|
+
/** Ids of the tasks to remind */
|
|
109
|
+
taskIds?: string[];
|
|
110
|
+
/** The reminder type */
|
|
111
|
+
reminderType?: ReminderType;
|
|
112
|
+
}
|
|
113
|
+
export declare enum ReminderType {
|
|
114
|
+
UNKNOWN_REMINDER_TYPE = "UNKNOWN_REMINDER_TYPE",
|
|
115
|
+
FIRST_REMINDER = "FIRST_REMINDER",
|
|
116
|
+
LAST_REMINDER = "LAST_REMINDER"
|
|
117
|
+
}
|
|
118
|
+
export interface SendTasksReminderResponse {
|
|
119
|
+
}
|
|
120
|
+
export interface RepositionTask {
|
|
121
|
+
/** The id of the last task that was re-positioned */
|
|
122
|
+
taskId?: string | null;
|
|
123
|
+
/** The position of the last task that was re-positioned */
|
|
124
|
+
position?: string | null;
|
|
125
|
+
}
|
|
126
|
+
export interface TaskOverdue {
|
|
127
|
+
/** The overdue task. */
|
|
128
|
+
task?: Task;
|
|
129
|
+
}
|
|
130
|
+
export interface TaskAssigned {
|
|
131
|
+
/** The id of the assignee */
|
|
132
|
+
assigneeId?: string;
|
|
133
|
+
/** The task that was assigned */
|
|
134
|
+
task?: Task;
|
|
135
|
+
}
|
|
136
|
+
export interface CreateTaskRequest {
|
|
137
|
+
/** Task to create. */
|
|
138
|
+
task: Task;
|
|
139
|
+
}
|
|
140
|
+
export interface CreateTaskResponse {
|
|
141
|
+
/** The created task. */
|
|
142
|
+
task?: Task;
|
|
143
|
+
}
|
|
144
|
+
export interface ContactNotFoundError {
|
|
145
|
+
contactId?: string;
|
|
146
|
+
}
|
|
147
|
+
export interface GetTaskRequest {
|
|
148
|
+
/** ID of the task to retrieve. */
|
|
149
|
+
taskId: string;
|
|
150
|
+
}
|
|
151
|
+
export interface GetTaskResponse {
|
|
152
|
+
/** The retrieved task. */
|
|
153
|
+
task?: Task;
|
|
154
|
+
}
|
|
155
|
+
export interface UpdateTaskRequest {
|
|
156
|
+
/** Task to update. */
|
|
157
|
+
task: Task;
|
|
158
|
+
}
|
|
159
|
+
export interface UpdateTaskResponse {
|
|
160
|
+
/** The updated task. */
|
|
161
|
+
task?: Task;
|
|
162
|
+
}
|
|
163
|
+
export interface DeleteTaskRequest {
|
|
164
|
+
/** ID of the task to delete. */
|
|
165
|
+
taskId: string;
|
|
166
|
+
}
|
|
167
|
+
export interface DeleteTaskResponse {
|
|
168
|
+
}
|
|
169
|
+
export interface QueryTasksRequest {
|
|
170
|
+
/** Query options. */
|
|
171
|
+
query?: CursorQuery;
|
|
172
|
+
}
|
|
173
|
+
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
174
|
+
/** 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`. */
|
|
175
|
+
cursorPaging?: CursorPaging;
|
|
176
|
+
/**
|
|
177
|
+
* Filter object in the following format:
|
|
178
|
+
* `"filter" : {
|
|
179
|
+
* "fieldName1": "value1",
|
|
180
|
+
* "fieldName2":{"$operator":"value2"}
|
|
181
|
+
* }`
|
|
182
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
183
|
+
*/
|
|
184
|
+
filter?: Record<string, any> | null;
|
|
185
|
+
/**
|
|
186
|
+
* Sort object in the following format:
|
|
187
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
188
|
+
*/
|
|
189
|
+
sort?: Sorting[];
|
|
190
|
+
}
|
|
191
|
+
/** @oneof */
|
|
192
|
+
export interface CursorQueryPagingMethodOneOf {
|
|
193
|
+
/** 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`. */
|
|
194
|
+
cursorPaging?: CursorPaging;
|
|
195
|
+
}
|
|
196
|
+
export interface Sorting {
|
|
197
|
+
/** Name of the field to sort by. */
|
|
198
|
+
fieldName?: string;
|
|
199
|
+
/** Sort order. */
|
|
200
|
+
order?: SortOrder;
|
|
201
|
+
}
|
|
202
|
+
export declare enum SortOrder {
|
|
203
|
+
/** Sort by ascending order. */
|
|
204
|
+
ASC = "ASC",
|
|
205
|
+
/** Sort by descending order. */
|
|
206
|
+
DESC = "DESC"
|
|
207
|
+
}
|
|
208
|
+
export interface CursorPaging {
|
|
209
|
+
/** Number of items to load. */
|
|
210
|
+
limit?: number | null;
|
|
211
|
+
/**
|
|
212
|
+
* Pointer to the next or previous page in the list of results.
|
|
213
|
+
*
|
|
214
|
+
* You can get the relevant cursor token
|
|
215
|
+
* from the `pagingMetadata` object in the previous call's response.
|
|
216
|
+
* Not relevant for the first request.
|
|
217
|
+
*/
|
|
218
|
+
cursor?: string | null;
|
|
219
|
+
}
|
|
220
|
+
export interface QueryTasksResponse {
|
|
221
|
+
/** The retrieved tasks. */
|
|
222
|
+
tasks?: Task[];
|
|
223
|
+
/** Paging metadata. */
|
|
224
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
225
|
+
}
|
|
226
|
+
export interface CursorPagingMetadata {
|
|
227
|
+
/** Number of items returned in the response. */
|
|
228
|
+
count?: number | null;
|
|
229
|
+
/** Offset that was requested. */
|
|
230
|
+
cursors?: Cursors;
|
|
231
|
+
/**
|
|
232
|
+
* Indicates if there are more results after the current page.
|
|
233
|
+
* If `true`, another page of results can be retrieved.
|
|
234
|
+
* If `false`, this is the last page.
|
|
235
|
+
*/
|
|
236
|
+
hasNext?: boolean | null;
|
|
237
|
+
}
|
|
238
|
+
export interface Cursors {
|
|
239
|
+
/** Cursor pointing to next page in the list of results. */
|
|
240
|
+
next?: string | null;
|
|
241
|
+
/** Cursor pointing to previous page in the list of results. */
|
|
242
|
+
prev?: string | null;
|
|
243
|
+
}
|
|
244
|
+
export interface CountTasksRequest {
|
|
245
|
+
/**
|
|
246
|
+
* Filter which tasks to count. See the list of supported filters in `queryContacts`.
|
|
247
|
+
*
|
|
248
|
+
* Filterable fields include:
|
|
249
|
+
* - `_id`
|
|
250
|
+
* - `_createdDate`
|
|
251
|
+
* - `_updatedDate`
|
|
252
|
+
* - `dueDate`
|
|
253
|
+
* - `status`
|
|
254
|
+
* - `contact.id`
|
|
255
|
+
*/
|
|
256
|
+
filter?: Record<string, any> | null;
|
|
257
|
+
}
|
|
258
|
+
export interface CountTasksResponse {
|
|
259
|
+
/** The number of tasks that match the specified filter. */
|
|
260
|
+
count?: number;
|
|
261
|
+
}
|
|
262
|
+
export interface QueryTasksInternalRequest {
|
|
263
|
+
/** WQL expression */
|
|
264
|
+
query?: QueryV2;
|
|
265
|
+
}
|
|
266
|
+
export interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
267
|
+
/** Paging options to limit and skip the number of items. */
|
|
268
|
+
paging?: Paging;
|
|
269
|
+
/** 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`. */
|
|
270
|
+
cursorPaging?: CursorPaging;
|
|
271
|
+
/**
|
|
272
|
+
* Filter object in the following format:
|
|
273
|
+
* `"filter" : {
|
|
274
|
+
* "fieldName1": "value1",
|
|
275
|
+
* "fieldName2":{"$operator":"value2"}
|
|
276
|
+
* }`
|
|
277
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
278
|
+
*/
|
|
279
|
+
filter?: Record<string, any> | null;
|
|
280
|
+
/**
|
|
281
|
+
* Sort object in the following format:
|
|
282
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
283
|
+
*/
|
|
284
|
+
sort?: Sorting[];
|
|
285
|
+
/** 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. */
|
|
286
|
+
fields?: string[];
|
|
287
|
+
/** 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. */
|
|
288
|
+
fieldsets?: string[];
|
|
289
|
+
}
|
|
290
|
+
/** @oneof */
|
|
291
|
+
export interface QueryV2PagingMethodOneOf {
|
|
292
|
+
/** Paging options to limit and skip the number of items. */
|
|
293
|
+
paging?: Paging;
|
|
294
|
+
/** 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`. */
|
|
295
|
+
cursorPaging?: CursorPaging;
|
|
296
|
+
}
|
|
297
|
+
export interface Paging {
|
|
298
|
+
/** Number of items to load. */
|
|
299
|
+
limit?: number | null;
|
|
300
|
+
/** Number of items to skip in the current sort order. */
|
|
301
|
+
offset?: number | null;
|
|
302
|
+
}
|
|
303
|
+
export interface QueryTasksInternalResponse {
|
|
304
|
+
/** The retrieved tasks. */
|
|
305
|
+
tasks?: Task[];
|
|
306
|
+
/** Details on the paged set of results returned. */
|
|
307
|
+
pagingMetadata?: PagingMetadataV2;
|
|
308
|
+
}
|
|
309
|
+
export interface PagingMetadataV2 {
|
|
310
|
+
/** Number of items returned in the response. */
|
|
311
|
+
count?: number | null;
|
|
312
|
+
/** Offset that was requested. */
|
|
313
|
+
offset?: number | null;
|
|
314
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
315
|
+
total?: number | null;
|
|
316
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
317
|
+
tooManyToCount?: boolean | null;
|
|
318
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
319
|
+
cursors?: Cursors;
|
|
320
|
+
}
|
|
321
|
+
export interface MoveTaskAfterRequest {
|
|
322
|
+
/** ID of the task to move. */
|
|
323
|
+
taskId: string;
|
|
324
|
+
/**
|
|
325
|
+
* The ID of the task after which the moved task is positioned in the task display.
|
|
326
|
+
* If `beforeTaskId` is not specified, the moved task is positioned first in the task display.
|
|
327
|
+
*/
|
|
328
|
+
beforeTaskId?: string | null;
|
|
329
|
+
}
|
|
330
|
+
export interface MoveTaskAfterResponse {
|
|
331
|
+
}
|
|
332
|
+
export interface TaskNotFoundError {
|
|
333
|
+
/** The task id that was not found */
|
|
334
|
+
taskId?: string;
|
|
335
|
+
}
|
|
336
|
+
export interface Empty {
|
|
337
|
+
}
|
|
338
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
339
|
+
createdEvent?: EntityCreatedEvent;
|
|
340
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
341
|
+
deletedEvent?: EntityDeletedEvent;
|
|
342
|
+
actionEvent?: ActionEvent;
|
|
343
|
+
/**
|
|
344
|
+
* Unique event ID.
|
|
345
|
+
* Allows clients to ignore duplicate webhooks.
|
|
346
|
+
*/
|
|
347
|
+
_id?: string;
|
|
348
|
+
/**
|
|
349
|
+
* Assumes actions are also always typed to an entity_type
|
|
350
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
351
|
+
*/
|
|
352
|
+
entityFqdn?: string;
|
|
353
|
+
/**
|
|
354
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
355
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
356
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
357
|
+
*/
|
|
358
|
+
slug?: string;
|
|
359
|
+
/** ID of the entity associated with the event. */
|
|
360
|
+
entityId?: string;
|
|
361
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
362
|
+
eventTime?: Date | null;
|
|
363
|
+
/**
|
|
364
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
365
|
+
* (for example, GDPR).
|
|
366
|
+
*/
|
|
367
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
368
|
+
/** If present, indicates the action that triggered the event. */
|
|
369
|
+
originatedFrom?: string | null;
|
|
370
|
+
/**
|
|
371
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
372
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
373
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
374
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
375
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
376
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
377
|
+
*/
|
|
378
|
+
entityEventSequence?: string | null;
|
|
379
|
+
}
|
|
380
|
+
/** @oneof */
|
|
381
|
+
export interface DomainEventBodyOneOf {
|
|
382
|
+
createdEvent?: EntityCreatedEvent;
|
|
383
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
384
|
+
deletedEvent?: EntityDeletedEvent;
|
|
385
|
+
actionEvent?: ActionEvent;
|
|
386
|
+
}
|
|
387
|
+
export interface EntityCreatedEvent {
|
|
388
|
+
entity?: string;
|
|
389
|
+
}
|
|
390
|
+
export interface RestoreInfo {
|
|
391
|
+
deletedDate?: Date | null;
|
|
392
|
+
}
|
|
393
|
+
export interface EntityUpdatedEvent {
|
|
394
|
+
/**
|
|
395
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
396
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
397
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
398
|
+
*/
|
|
399
|
+
currentEntity?: string;
|
|
400
|
+
}
|
|
401
|
+
export interface EntityDeletedEvent {
|
|
402
|
+
/** Entity that was deleted */
|
|
403
|
+
deletedEntity?: string | null;
|
|
404
|
+
}
|
|
405
|
+
export interface ActionEvent {
|
|
406
|
+
body?: string;
|
|
407
|
+
}
|
|
408
|
+
export interface MessageEnvelope {
|
|
409
|
+
/** App instance ID. */
|
|
410
|
+
instanceId?: string | null;
|
|
411
|
+
/** Event type. */
|
|
412
|
+
eventType?: string;
|
|
413
|
+
/** The identification type and identity data. */
|
|
414
|
+
identity?: IdentificationData;
|
|
415
|
+
/** Stringify payload. */
|
|
416
|
+
data?: string;
|
|
417
|
+
}
|
|
418
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
419
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
420
|
+
anonymousVisitorId?: string;
|
|
421
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
422
|
+
memberId?: string;
|
|
423
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
424
|
+
wixUserId?: string;
|
|
425
|
+
/** ID of an app. */
|
|
426
|
+
appId?: string;
|
|
427
|
+
/** @readonly */
|
|
428
|
+
identityType?: WebhookIdentityType;
|
|
429
|
+
}
|
|
430
|
+
/** @oneof */
|
|
431
|
+
export interface IdentificationDataIdOneOf {
|
|
432
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
433
|
+
anonymousVisitorId?: string;
|
|
434
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
435
|
+
memberId?: string;
|
|
436
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
437
|
+
wixUserId?: string;
|
|
438
|
+
/** ID of an app. */
|
|
439
|
+
appId?: string;
|
|
440
|
+
}
|
|
441
|
+
export declare enum WebhookIdentityType {
|
|
442
|
+
UNKNOWN = "UNKNOWN",
|
|
443
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
444
|
+
MEMBER = "MEMBER",
|
|
445
|
+
WIX_USER = "WIX_USER",
|
|
446
|
+
APP = "APP"
|
|
447
|
+
}
|
|
448
|
+
interface TaskSourceNonNullableFields {
|
|
449
|
+
sourceType: SourceType;
|
|
450
|
+
}
|
|
451
|
+
export interface TaskNonNullableFields {
|
|
452
|
+
status: TaskStatus;
|
|
453
|
+
source?: TaskSourceNonNullableFields;
|
|
454
|
+
}
|
|
455
|
+
export interface CreateTaskResponseNonNullableFields {
|
|
456
|
+
task?: TaskNonNullableFields;
|
|
457
|
+
}
|
|
458
|
+
export interface GetTaskResponseNonNullableFields {
|
|
459
|
+
task?: TaskNonNullableFields;
|
|
460
|
+
}
|
|
461
|
+
export interface UpdateTaskResponseNonNullableFields {
|
|
462
|
+
task?: TaskNonNullableFields;
|
|
463
|
+
}
|
|
464
|
+
export interface QueryTasksResponseNonNullableFields {
|
|
465
|
+
tasks: TaskNonNullableFields[];
|
|
466
|
+
}
|
|
467
|
+
export interface CountTasksResponseNonNullableFields {
|
|
468
|
+
count: number;
|
|
469
|
+
}
|
|
470
|
+
export interface BaseEventMetadata {
|
|
471
|
+
/** App instance ID. */
|
|
472
|
+
instanceId?: string | null;
|
|
473
|
+
/** Event type. */
|
|
474
|
+
eventType?: string;
|
|
475
|
+
/** The identification type and identity data. */
|
|
476
|
+
identity?: IdentificationData;
|
|
477
|
+
}
|
|
478
|
+
export interface EventMetadata extends BaseEventMetadata {
|
|
479
|
+
/**
|
|
480
|
+
* Unique event ID.
|
|
481
|
+
* Allows clients to ignore duplicate webhooks.
|
|
482
|
+
*/
|
|
483
|
+
_id?: string;
|
|
484
|
+
/**
|
|
485
|
+
* Assumes actions are also always typed to an entity_type
|
|
486
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
487
|
+
*/
|
|
488
|
+
entityFqdn?: string;
|
|
489
|
+
/**
|
|
490
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
491
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
492
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
493
|
+
*/
|
|
494
|
+
slug?: string;
|
|
495
|
+
/** ID of the entity associated with the event. */
|
|
496
|
+
entityId?: string;
|
|
497
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
498
|
+
eventTime?: Date | null;
|
|
499
|
+
/**
|
|
500
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
501
|
+
* (for example, GDPR).
|
|
502
|
+
*/
|
|
503
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
504
|
+
/** If present, indicates the action that triggered the event. */
|
|
505
|
+
originatedFrom?: string | null;
|
|
506
|
+
/**
|
|
507
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
508
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
509
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
510
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
511
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
512
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
513
|
+
*/
|
|
514
|
+
entityEventSequence?: string | null;
|
|
515
|
+
}
|
|
516
|
+
export interface TaskCreatedEnvelope {
|
|
517
|
+
entity: Task;
|
|
518
|
+
metadata: EventMetadata;
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Triggered when a task is created.
|
|
522
|
+
* @permissionScope Read Tasks
|
|
523
|
+
* @permissionScopeId SCOPE.DC-CRM.READ-TASKS
|
|
524
|
+
* @permissionScope Manage Tasks
|
|
525
|
+
* @permissionScopeId SCOPE.DC-CRM.MANAGE-TASKS
|
|
526
|
+
* @permissionId CRM_TASKS.TASK_READ
|
|
527
|
+
* @webhook
|
|
528
|
+
* @eventType wix.crm.tasks.v2.task_created
|
|
529
|
+
*/
|
|
530
|
+
export declare function onTaskCreated(handler: (event: TaskCreatedEnvelope) => void | Promise<void>): void;
|
|
531
|
+
export interface TaskDeletedEnvelope {
|
|
532
|
+
metadata: EventMetadata;
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Triggered when a task is deleted.
|
|
536
|
+
* @permissionScope Read Tasks
|
|
537
|
+
* @permissionScopeId SCOPE.DC-CRM.READ-TASKS
|
|
538
|
+
* @permissionScope Manage Tasks
|
|
539
|
+
* @permissionScopeId SCOPE.DC-CRM.MANAGE-TASKS
|
|
540
|
+
* @permissionId CRM_TASKS.TASK_READ
|
|
541
|
+
* @webhook
|
|
542
|
+
* @eventType wix.crm.tasks.v2.task_deleted
|
|
543
|
+
*/
|
|
544
|
+
export declare function onTaskDeleted(handler: (event: TaskDeletedEnvelope) => void | Promise<void>): void;
|
|
545
|
+
export interface TaskOverdueEnvelope {
|
|
546
|
+
data: TaskOverdue;
|
|
547
|
+
metadata: EventMetadata;
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* Triggered when a task reaches its due date.
|
|
551
|
+
* @permissionScope Read Tasks
|
|
552
|
+
* @permissionScopeId SCOPE.DC-CRM.READ-TASKS
|
|
553
|
+
* @permissionScope Manage Tasks
|
|
554
|
+
* @permissionScopeId SCOPE.DC-CRM.MANAGE-TASKS
|
|
555
|
+
* @permissionId CRM_TASKS.TASK_READ
|
|
556
|
+
* @webhook
|
|
557
|
+
* @eventType wix.crm.tasks.v2.task_task_overdue
|
|
558
|
+
*/
|
|
559
|
+
export declare function onTaskOverdue(handler: (event: TaskOverdueEnvelope) => void | Promise<void>): void;
|
|
560
|
+
export interface TaskUpdatedEnvelope {
|
|
561
|
+
entity: Task;
|
|
562
|
+
metadata: EventMetadata;
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Triggered when a task is updated.
|
|
566
|
+
* @permissionScope Read Tasks
|
|
567
|
+
* @permissionScopeId SCOPE.DC-CRM.READ-TASKS
|
|
568
|
+
* @permissionScope Manage Tasks
|
|
569
|
+
* @permissionScopeId SCOPE.DC-CRM.MANAGE-TASKS
|
|
570
|
+
* @permissionId CRM_TASKS.TASK_READ
|
|
571
|
+
* @webhook
|
|
572
|
+
* @eventType wix.crm.tasks.v2.task_updated
|
|
573
|
+
*/
|
|
574
|
+
export declare function onTaskUpdated(handler: (event: TaskUpdatedEnvelope) => void | Promise<void>): void;
|
|
575
|
+
/**
|
|
576
|
+
* Creates a new task.
|
|
577
|
+
*
|
|
578
|
+
* 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:
|
|
579
|
+
* - `_id`
|
|
580
|
+
* - `_createdDate`
|
|
581
|
+
* - `_updatedDate`
|
|
582
|
+
* - `status`
|
|
583
|
+
* - `source`
|
|
584
|
+
* - `revision`
|
|
585
|
+
*
|
|
586
|
+
* @param task - Task to create.
|
|
587
|
+
* @public
|
|
588
|
+
* @requiredField task
|
|
589
|
+
* @permissionId CRM_TASKS.TASK_CREATE
|
|
590
|
+
* @permissionScope Manage Tasks
|
|
591
|
+
* @permissionScopeId SCOPE.DC-CRM.MANAGE-TASKS
|
|
592
|
+
* @applicableIdentity APP
|
|
593
|
+
* @returns The created task.
|
|
594
|
+
* @fqn wix.crm.tasks.v2.Tasks.CreateTask
|
|
595
|
+
*/
|
|
596
|
+
export declare function createTask(task: Task): Promise<Task & TaskNonNullableFields>;
|
|
597
|
+
/**
|
|
598
|
+
* Retrieves a task by ID.
|
|
599
|
+
* @param taskId - ID of the task to retrieve.
|
|
600
|
+
* @public
|
|
601
|
+
* @requiredField taskId
|
|
602
|
+
* @permissionId CRM_TASKS.TASK_READ
|
|
603
|
+
* @permissionScope Read Tasks
|
|
604
|
+
* @permissionScopeId SCOPE.DC-CRM.READ-TASKS
|
|
605
|
+
* @permissionScope Manage Tasks
|
|
606
|
+
* @permissionScopeId SCOPE.DC-CRM.MANAGE-TASKS
|
|
607
|
+
* @applicableIdentity APP
|
|
608
|
+
* @returns The retrieved task.
|
|
609
|
+
* @fqn wix.crm.tasks.v2.Tasks.GetTask
|
|
610
|
+
*/
|
|
611
|
+
export declare function getTask(taskId: string): Promise<Task & TaskNonNullableFields>;
|
|
612
|
+
/**
|
|
613
|
+
* Updates a task.
|
|
614
|
+
*
|
|
615
|
+
* Each time the task is updated, `revision` increments by 1.
|
|
616
|
+
* The existing `revision` must be included when updating the task.
|
|
617
|
+
* This ensures you're working with the latest task
|
|
618
|
+
* and prevents unintended overwrites.
|
|
619
|
+
* @param _id - Task ID.
|
|
620
|
+
* @public
|
|
621
|
+
* @requiredField _id
|
|
622
|
+
* @requiredField task
|
|
623
|
+
* @requiredField task.revision
|
|
624
|
+
* @param task - Task to update.
|
|
625
|
+
* @permissionId CRM_TASKS.TASK_UPDATE
|
|
626
|
+
* @permissionScope Manage Tasks
|
|
627
|
+
* @permissionScopeId SCOPE.DC-CRM.MANAGE-TASKS
|
|
628
|
+
* @applicableIdentity APP
|
|
629
|
+
* @returns The updated task.
|
|
630
|
+
* @fqn wix.crm.tasks.v2.Tasks.UpdateTask
|
|
631
|
+
*/
|
|
632
|
+
export declare function updateTask(_id: string | null, task: UpdateTask): Promise<Task & TaskNonNullableFields>;
|
|
633
|
+
export interface UpdateTask {
|
|
634
|
+
/**
|
|
635
|
+
* Task ID.
|
|
636
|
+
* @readonly
|
|
637
|
+
*/
|
|
638
|
+
_id?: string | null;
|
|
639
|
+
/**
|
|
640
|
+
* 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.
|
|
641
|
+
* @readonly
|
|
642
|
+
*/
|
|
643
|
+
revision?: string | null;
|
|
644
|
+
/** Title of the task. */
|
|
645
|
+
title?: string | null;
|
|
646
|
+
/** Description of the task. */
|
|
647
|
+
description?: string | null;
|
|
648
|
+
/**
|
|
649
|
+
* Date and time the task was created.
|
|
650
|
+
* @readonly
|
|
651
|
+
*/
|
|
652
|
+
_createdDate?: Date | null;
|
|
653
|
+
/**
|
|
654
|
+
* Date and time the task was last updated.
|
|
655
|
+
* @readonly
|
|
656
|
+
*/
|
|
657
|
+
_updatedDate?: Date | null;
|
|
658
|
+
/** Due date for the task. */
|
|
659
|
+
dueDate?: Date | null;
|
|
660
|
+
/**
|
|
661
|
+
* Status of the task.
|
|
662
|
+
*
|
|
663
|
+
* Default: `ACTION_NEEDED`
|
|
664
|
+
*/
|
|
665
|
+
status?: TaskStatus;
|
|
666
|
+
/** Details about the task source. */
|
|
667
|
+
source?: TaskSource;
|
|
668
|
+
/** Information about the contact associated with the task. */
|
|
669
|
+
contact?: ContactInfo;
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* Deletes a task by ID.
|
|
673
|
+
* @param taskId - ID of the task to delete.
|
|
674
|
+
* @public
|
|
675
|
+
* @requiredField taskId
|
|
676
|
+
* @permissionId CRM_TASKS.TASK_DELETE
|
|
677
|
+
* @permissionScope Manage Tasks
|
|
678
|
+
* @permissionScopeId SCOPE.DC-CRM.MANAGE-TASKS
|
|
679
|
+
* @applicableIdentity APP
|
|
680
|
+
* @fqn wix.crm.tasks.v2.Tasks.DeleteTask
|
|
681
|
+
*/
|
|
682
|
+
export declare function deleteTask(taskId: string): Promise<void>;
|
|
683
|
+
/**
|
|
684
|
+
* Creates a query to retrieve a list of tasks.
|
|
685
|
+
*
|
|
686
|
+
* The `queryTasks()` function builds a query to retrieve a list of tasks and returns a `TasksQueryBuilder` object.
|
|
687
|
+
*
|
|
688
|
+
* 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.
|
|
689
|
+
*
|
|
690
|
+
* `queryTasks()` runs with these `TasksQueryBuilder` defaults, which you can override:
|
|
691
|
+
* - `limit(50)`
|
|
692
|
+
* - `descending('_createdDate')`
|
|
693
|
+
*
|
|
694
|
+
* 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.
|
|
695
|
+
*
|
|
696
|
+
* 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`.
|
|
697
|
+
* @public
|
|
698
|
+
* @permissionScope Read Tasks
|
|
699
|
+
* @permissionScopeId SCOPE.DC-CRM.READ-TASKS
|
|
700
|
+
* @permissionScope Manage Tasks
|
|
701
|
+
* @permissionScopeId SCOPE.DC-CRM.MANAGE-TASKS
|
|
702
|
+
* @permissionId CRM_TASKS.TASK_READ
|
|
703
|
+
* @applicableIdentity APP
|
|
704
|
+
* @fqn wix.crm.tasks.v2.Tasks.QueryTasks
|
|
705
|
+
*/
|
|
706
|
+
export declare function queryTasks(): TasksQueryBuilder;
|
|
707
|
+
interface QueryCursorResult {
|
|
708
|
+
cursors: Cursors;
|
|
709
|
+
hasNext: () => boolean;
|
|
710
|
+
hasPrev: () => boolean;
|
|
711
|
+
length: number;
|
|
712
|
+
pageSize: number;
|
|
713
|
+
}
|
|
714
|
+
export interface TasksQueryResult extends QueryCursorResult {
|
|
715
|
+
items: Task[];
|
|
716
|
+
query: TasksQueryBuilder;
|
|
717
|
+
next: () => Promise<TasksQueryResult>;
|
|
718
|
+
prev: () => Promise<TasksQueryResult>;
|
|
719
|
+
}
|
|
720
|
+
export interface TasksQueryBuilder {
|
|
721
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
722
|
+
* @param value - Value to compare against.
|
|
723
|
+
*/
|
|
724
|
+
eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'dueDate' | 'status' | 'contact.id', value: any) => TasksQueryBuilder;
|
|
725
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
726
|
+
* @param value - Value to compare against.
|
|
727
|
+
*/
|
|
728
|
+
ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'dueDate' | 'status' | 'contact.id', value: any) => TasksQueryBuilder;
|
|
729
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
730
|
+
* @param value - Value to compare against.
|
|
731
|
+
*/
|
|
732
|
+
ge: (propertyName: '_createdDate' | '_updatedDate' | 'dueDate', value: any) => TasksQueryBuilder;
|
|
733
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
734
|
+
* @param value - Value to compare against.
|
|
735
|
+
*/
|
|
736
|
+
gt: (propertyName: '_createdDate' | '_updatedDate' | 'dueDate', value: any) => TasksQueryBuilder;
|
|
737
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
738
|
+
* @param value - Value to compare against.
|
|
739
|
+
*/
|
|
740
|
+
le: (propertyName: '_createdDate' | '_updatedDate' | 'dueDate', value: any) => TasksQueryBuilder;
|
|
741
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
742
|
+
* @param value - Value to compare against.
|
|
743
|
+
*/
|
|
744
|
+
lt: (propertyName: '_createdDate' | '_updatedDate' | 'dueDate', value: any) => TasksQueryBuilder;
|
|
745
|
+
in: (propertyName: '_id' | 'status' | 'contact.id', value: any) => TasksQueryBuilder;
|
|
746
|
+
exists: (propertyName: 'contact.id', value: boolean) => TasksQueryBuilder;
|
|
747
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
748
|
+
ascending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'dueDate'>) => TasksQueryBuilder;
|
|
749
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
750
|
+
descending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'dueDate'>) => TasksQueryBuilder;
|
|
751
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
|
|
752
|
+
limit: (limit: number) => TasksQueryBuilder;
|
|
753
|
+
/** @param cursor - A pointer to specific record */
|
|
754
|
+
skipTo: (cursor: string) => TasksQueryBuilder;
|
|
755
|
+
find: () => Promise<TasksQueryResult>;
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* Counts the number of tasks.
|
|
759
|
+
*
|
|
760
|
+
*
|
|
761
|
+
* This method returns the count of all tasks regardless of their `status`.
|
|
762
|
+
*
|
|
763
|
+
* Optionally, you can specify a filter to count only tasks that meet certain criteria.
|
|
764
|
+
* @public
|
|
765
|
+
* @param options - Filtering options.
|
|
766
|
+
* @permissionId CRM_TASKS.TASK_READ
|
|
767
|
+
* @permissionScope Read Tasks
|
|
768
|
+
* @permissionScopeId SCOPE.DC-CRM.READ-TASKS
|
|
769
|
+
* @permissionScope Manage Tasks
|
|
770
|
+
* @permissionScopeId SCOPE.DC-CRM.MANAGE-TASKS
|
|
771
|
+
* @applicableIdentity APP
|
|
772
|
+
* @fqn wix.crm.tasks.v2.Tasks.CountTasks
|
|
773
|
+
*/
|
|
774
|
+
export declare function countTasks(options?: CountTasksOptions): Promise<CountTasksResponse & CountTasksResponseNonNullableFields>;
|
|
775
|
+
export interface CountTasksOptions {
|
|
776
|
+
/**
|
|
777
|
+
* Filter which tasks to count. See the list of supported filters in `queryContacts`.
|
|
778
|
+
*
|
|
779
|
+
* Filterable fields include:
|
|
780
|
+
* - `_id`
|
|
781
|
+
* - `_createdDate`
|
|
782
|
+
* - `_updatedDate`
|
|
783
|
+
* - `dueDate`
|
|
784
|
+
* - `status`
|
|
785
|
+
* - `contact.id`
|
|
786
|
+
*/
|
|
787
|
+
filter?: Record<string, any> | null;
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* Moves a task specified by ID to be placed after another task in the task display.
|
|
791
|
+
*
|
|
792
|
+
* You can reposition a task to be first in the display by omitting `beforeTaskId`.
|
|
793
|
+
* @param taskId - ID of the task to move.
|
|
794
|
+
* @public
|
|
795
|
+
* @requiredField taskId
|
|
796
|
+
* @param options - Options for moving the task.
|
|
797
|
+
* @permissionId CRM_TASKS.TASK_UPDATE
|
|
798
|
+
* @permissionScope Manage Tasks
|
|
799
|
+
* @permissionScopeId SCOPE.DC-CRM.MANAGE-TASKS
|
|
800
|
+
* @applicableIdentity APP
|
|
801
|
+
* @fqn wix.crm.tasks.v2.Tasks.MoveTaskAfter
|
|
802
|
+
*/
|
|
803
|
+
export declare function moveTaskAfter(taskId: string, options?: MoveTaskAfterOptions): Promise<void>;
|
|
804
|
+
export interface MoveTaskAfterOptions {
|
|
805
|
+
/**
|
|
806
|
+
* The ID of the task after which the moved task is positioned in the task display.
|
|
807
|
+
* If `beforeTaskId` is not specified, the moved task is positioned first in the task display.
|
|
808
|
+
*/
|
|
809
|
+
beforeTaskId?: string | null;
|
|
810
|
+
}
|
|
811
|
+
export {};
|