@wix/crm 1.0.73 → 1.0.74
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 +2 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +2 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +2 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/src/crm-tasks-v1-task.http.d.ts +43 -0
- package/build/cjs/src/crm-tasks-v1-task.http.js +215 -0
- package/build/cjs/src/crm-tasks-v1-task.http.js.map +1 -0
- package/build/cjs/src/crm-tasks-v1-task.meta.d.ts +25 -0
- package/build/cjs/src/crm-tasks-v1-task.meta.js +119 -0
- package/build/cjs/src/crm-tasks-v1-task.meta.js.map +1 -0
- package/build/cjs/src/crm-tasks-v1-task.public.d.ts +12 -0
- package/build/cjs/src/crm-tasks-v1-task.public.js +40 -0
- package/build/cjs/src/crm-tasks-v1-task.public.js.map +1 -0
- package/build/cjs/src/crm-tasks-v1-task.types.d.ts +269 -0
- package/build/cjs/src/crm-tasks-v1-task.types.js +21 -0
- package/build/cjs/src/crm-tasks-v1-task.types.js.map +1 -0
- package/build/cjs/src/crm-tasks-v1-task.universal.d.ts +350 -0
- package/build/cjs/src/crm-tasks-v1-task.universal.js +361 -0
- package/build/cjs/src/crm-tasks-v1-task.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +1 -0
- package/build/es/index.js.map +1 -1
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +1 -0
- package/build/es/index.typings.js.map +1 -1
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +1 -0
- package/build/es/meta.js.map +1 -1
- package/build/es/src/crm-tasks-v1-task.http.d.ts +43 -0
- package/build/es/src/crm-tasks-v1-task.http.js +207 -0
- package/build/es/src/crm-tasks-v1-task.http.js.map +1 -0
- package/build/es/src/crm-tasks-v1-task.meta.d.ts +25 -0
- package/build/es/src/crm-tasks-v1-task.meta.js +92 -0
- package/build/es/src/crm-tasks-v1-task.meta.js.map +1 -0
- package/build/es/src/crm-tasks-v1-task.public.d.ts +12 -0
- package/build/es/src/crm-tasks-v1-task.public.js +29 -0
- package/build/es/src/crm-tasks-v1-task.public.js.map +1 -0
- package/build/es/src/crm-tasks-v1-task.types.d.ts +269 -0
- package/build/es/src/crm-tasks-v1-task.types.js +18 -0
- package/build/es/src/crm-tasks-v1-task.types.js.map +1 -0
- package/build/es/src/crm-tasks-v1-task.universal.d.ts +350 -0
- package/build/es/src/crm-tasks-v1-task.universal.js +334 -0
- package/build/es/src/crm-tasks-v1-task.universal.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
export interface Task {
|
|
2
|
+
/**
|
|
3
|
+
* The id of the task. Should not be passed on creation
|
|
4
|
+
* @readonly
|
|
5
|
+
*/
|
|
6
|
+
taskId?: string;
|
|
7
|
+
/** The id of the creator of the task. */
|
|
8
|
+
creator?: Creator;
|
|
9
|
+
/** Task's title. */
|
|
10
|
+
title?: string;
|
|
11
|
+
/** States if the task is completed */
|
|
12
|
+
isCompleted?: boolean;
|
|
13
|
+
/** Due Date fot the task. */
|
|
14
|
+
dueAt?: Date;
|
|
15
|
+
/** Assigned contactId to the task */
|
|
16
|
+
contactId?: string;
|
|
17
|
+
/** Task's version. Each change on the task will magnify it. */
|
|
18
|
+
version?: number;
|
|
19
|
+
/** Assigned wix user id to the task */
|
|
20
|
+
assigneeId?: string;
|
|
21
|
+
/** The labels assigned to the task */
|
|
22
|
+
labels?: Label[];
|
|
23
|
+
}
|
|
24
|
+
export interface Creator {
|
|
25
|
+
/**
|
|
26
|
+
* Creator id
|
|
27
|
+
* @readonly
|
|
28
|
+
*/
|
|
29
|
+
id?: string;
|
|
30
|
+
/** Creator type */
|
|
31
|
+
creatorType?: CreatorType;
|
|
32
|
+
}
|
|
33
|
+
export declare enum CreatorType {
|
|
34
|
+
USER = "USER",
|
|
35
|
+
APP = "APP"
|
|
36
|
+
}
|
|
37
|
+
export interface Label {
|
|
38
|
+
/**
|
|
39
|
+
* The id of the label. Should not be passed on creation
|
|
40
|
+
* @readonly
|
|
41
|
+
*/
|
|
42
|
+
labelId?: string;
|
|
43
|
+
/** Label's name. up to 50 characters */
|
|
44
|
+
name?: string;
|
|
45
|
+
/** Label's color. */
|
|
46
|
+
color?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface GetTaskRequest {
|
|
49
|
+
/** Task id */
|
|
50
|
+
id: string;
|
|
51
|
+
}
|
|
52
|
+
export interface GetTaskResponse {
|
|
53
|
+
/** The Task object */
|
|
54
|
+
task?: Task;
|
|
55
|
+
}
|
|
56
|
+
export interface GetTasksListRequest {
|
|
57
|
+
/** Assigned contact id to the task - Optional. */
|
|
58
|
+
contactId?: string;
|
|
59
|
+
/** Sort key. */
|
|
60
|
+
key?: SortKey;
|
|
61
|
+
}
|
|
62
|
+
export declare enum SortKey {
|
|
63
|
+
/** Sort by position */
|
|
64
|
+
position = "position",
|
|
65
|
+
/** Sort by date created */
|
|
66
|
+
dateCreated = "dateCreated"
|
|
67
|
+
}
|
|
68
|
+
export interface GetTasksListResponse {
|
|
69
|
+
/** Array of the site's tasks */
|
|
70
|
+
tasks?: Task[];
|
|
71
|
+
}
|
|
72
|
+
export interface ListTasksRequest extends ListTasksRequestGetByOneOf {
|
|
73
|
+
/** List params */
|
|
74
|
+
params?: ListParams;
|
|
75
|
+
/** Optional cursor */
|
|
76
|
+
cursor?: string | null;
|
|
77
|
+
}
|
|
78
|
+
/** @oneof */
|
|
79
|
+
export interface ListTasksRequestGetByOneOf {
|
|
80
|
+
/** List params */
|
|
81
|
+
params?: ListParams;
|
|
82
|
+
/** Optional cursor */
|
|
83
|
+
cursor?: string | null;
|
|
84
|
+
}
|
|
85
|
+
export interface ListParams {
|
|
86
|
+
/** Filter */
|
|
87
|
+
filter?: FilterBy;
|
|
88
|
+
/** Order */
|
|
89
|
+
order?: string[];
|
|
90
|
+
/** Limit */
|
|
91
|
+
limit?: number;
|
|
92
|
+
/** Offset */
|
|
93
|
+
offset?: number;
|
|
94
|
+
}
|
|
95
|
+
export interface FilterBy {
|
|
96
|
+
/** List of contact ids */
|
|
97
|
+
contactIds?: string[];
|
|
98
|
+
/** From due date */
|
|
99
|
+
fromDate?: Date;
|
|
100
|
+
/** To due date */
|
|
101
|
+
toDate?: Date;
|
|
102
|
+
/** Is completed status */
|
|
103
|
+
isCompleted?: boolean | null;
|
|
104
|
+
/** Assignee id */
|
|
105
|
+
assigneeId?: string | null;
|
|
106
|
+
/** Task title */
|
|
107
|
+
title?: string | null;
|
|
108
|
+
/** Task title contains substring */
|
|
109
|
+
subtitle?: string | null;
|
|
110
|
+
/** List of tasks ids */
|
|
111
|
+
tasksIds?: string[];
|
|
112
|
+
/** List of labels ids */
|
|
113
|
+
labelIds?: string[];
|
|
114
|
+
}
|
|
115
|
+
export interface ListTasksResponse {
|
|
116
|
+
/** Array of the site's tasks */
|
|
117
|
+
tasks?: Task[];
|
|
118
|
+
/** Pagination information */
|
|
119
|
+
pagination?: Pagination;
|
|
120
|
+
}
|
|
121
|
+
export interface Pagination {
|
|
122
|
+
/** Pagination offset */
|
|
123
|
+
offset?: number;
|
|
124
|
+
/** Pagination limit */
|
|
125
|
+
limit?: number;
|
|
126
|
+
/** Pagination total */
|
|
127
|
+
total?: number;
|
|
128
|
+
/** Optional cursor */
|
|
129
|
+
cursor?: string | null;
|
|
130
|
+
}
|
|
131
|
+
export interface CountTasksRequest {
|
|
132
|
+
/** Group by field */
|
|
133
|
+
field?: GroupBy;
|
|
134
|
+
/** Where strings */
|
|
135
|
+
where?: string[];
|
|
136
|
+
}
|
|
137
|
+
export declare enum GroupBy {
|
|
138
|
+
total = "total",
|
|
139
|
+
contactId = "contactId"
|
|
140
|
+
}
|
|
141
|
+
export interface CountTasksResponse {
|
|
142
|
+
/** Tasks in site */
|
|
143
|
+
tasksInSite?: number;
|
|
144
|
+
/** Map by requested field */
|
|
145
|
+
byRequestedField?: Record<string, number>;
|
|
146
|
+
}
|
|
147
|
+
export interface CreateTaskRequest {
|
|
148
|
+
/** Task object with the creation data */
|
|
149
|
+
task?: TaskData;
|
|
150
|
+
}
|
|
151
|
+
export interface TaskData {
|
|
152
|
+
/** Task's title. up to 500 characters */
|
|
153
|
+
title?: string;
|
|
154
|
+
/** Due Date fot the task. */
|
|
155
|
+
dueAt?: Date;
|
|
156
|
+
/** Assigned contactId to the task */
|
|
157
|
+
contactId?: string;
|
|
158
|
+
/** Assigned assigneeId to the task */
|
|
159
|
+
assigneeId?: string;
|
|
160
|
+
/** The label ids assigned to the task */
|
|
161
|
+
labelIds?: string[];
|
|
162
|
+
}
|
|
163
|
+
export interface CreateTaskResponse {
|
|
164
|
+
/** Task id */
|
|
165
|
+
id?: string;
|
|
166
|
+
/** The task version. Incremented on each change */
|
|
167
|
+
version?: number;
|
|
168
|
+
}
|
|
169
|
+
export interface TaskNotification {
|
|
170
|
+
/** InstanceId of the task in Tasks App */
|
|
171
|
+
instanceId?: string;
|
|
172
|
+
/** Task id */
|
|
173
|
+
taskId?: string;
|
|
174
|
+
/** The changed task */
|
|
175
|
+
task?: Task;
|
|
176
|
+
/** The action that was performed on the task */
|
|
177
|
+
taskAction?: string;
|
|
178
|
+
/** Set of updated fields */
|
|
179
|
+
changes?: string[];
|
|
180
|
+
}
|
|
181
|
+
export interface UpdateTaskRequest {
|
|
182
|
+
/** Task id */
|
|
183
|
+
id: string;
|
|
184
|
+
/** Set of desired fields. */
|
|
185
|
+
fields?: string[];
|
|
186
|
+
/** Task object with the updated data */
|
|
187
|
+
task?: TaskData;
|
|
188
|
+
}
|
|
189
|
+
export interface UpdateTaskResponse {
|
|
190
|
+
/** Task id */
|
|
191
|
+
id?: string;
|
|
192
|
+
/** The task version. Incremented on each change */
|
|
193
|
+
version?: number;
|
|
194
|
+
}
|
|
195
|
+
export interface CompleteTaskRequest {
|
|
196
|
+
/** Task id */
|
|
197
|
+
id: string;
|
|
198
|
+
/** Indication whether the task is completed */
|
|
199
|
+
isCompleted?: boolean | null;
|
|
200
|
+
}
|
|
201
|
+
export interface CompleteTaskResponse {
|
|
202
|
+
/** Task id */
|
|
203
|
+
id?: string;
|
|
204
|
+
/** The task version. Incremented on each change */
|
|
205
|
+
version?: number;
|
|
206
|
+
}
|
|
207
|
+
export interface MoveTaskRequest {
|
|
208
|
+
/** Task id */
|
|
209
|
+
id?: string;
|
|
210
|
+
/** Task id of the task positioned before */
|
|
211
|
+
taskBeforeId?: string;
|
|
212
|
+
}
|
|
213
|
+
export interface MoveTaskResponse {
|
|
214
|
+
/** Task id */
|
|
215
|
+
id?: string;
|
|
216
|
+
/** The task version. Incremented on each change */
|
|
217
|
+
version?: number;
|
|
218
|
+
}
|
|
219
|
+
export interface DeleteTaskRequest {
|
|
220
|
+
/** Task id */
|
|
221
|
+
id: string;
|
|
222
|
+
}
|
|
223
|
+
export interface DeleteTaskResponse {
|
|
224
|
+
/** Task id */
|
|
225
|
+
id?: string;
|
|
226
|
+
/** The task version. Incremented on each change */
|
|
227
|
+
version?: number;
|
|
228
|
+
}
|
|
229
|
+
export interface DeleteCompletedRequest {
|
|
230
|
+
}
|
|
231
|
+
export interface DeleteCompletedResponse {
|
|
232
|
+
/** Array of deleted tasks ids */
|
|
233
|
+
ids?: string[];
|
|
234
|
+
}
|
|
235
|
+
export interface GetTaskResponseNonNullableFields {
|
|
236
|
+
task?: {
|
|
237
|
+
taskId: string;
|
|
238
|
+
creator?: {
|
|
239
|
+
id: string;
|
|
240
|
+
creatorType: CreatorType;
|
|
241
|
+
};
|
|
242
|
+
title: string;
|
|
243
|
+
isCompleted: boolean;
|
|
244
|
+
contactId: string;
|
|
245
|
+
version: number;
|
|
246
|
+
assigneeId: string;
|
|
247
|
+
labels: {
|
|
248
|
+
labelId: string;
|
|
249
|
+
name: string;
|
|
250
|
+
color: string;
|
|
251
|
+
}[];
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
export interface CreateTaskResponseNonNullableFields {
|
|
255
|
+
id: string;
|
|
256
|
+
version: number;
|
|
257
|
+
}
|
|
258
|
+
export interface UpdateTaskResponseNonNullableFields {
|
|
259
|
+
id: string;
|
|
260
|
+
version: number;
|
|
261
|
+
}
|
|
262
|
+
export interface CompleteTaskResponseNonNullableFields {
|
|
263
|
+
id: string;
|
|
264
|
+
version: number;
|
|
265
|
+
}
|
|
266
|
+
export interface DeleteTaskResponseNonNullableFields {
|
|
267
|
+
id: string;
|
|
268
|
+
version: number;
|
|
269
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GroupBy = exports.SortKey = exports.CreatorType = void 0;
|
|
4
|
+
var CreatorType;
|
|
5
|
+
(function (CreatorType) {
|
|
6
|
+
CreatorType["USER"] = "USER";
|
|
7
|
+
CreatorType["APP"] = "APP";
|
|
8
|
+
})(CreatorType = exports.CreatorType || (exports.CreatorType = {}));
|
|
9
|
+
var SortKey;
|
|
10
|
+
(function (SortKey) {
|
|
11
|
+
/** Sort by position */
|
|
12
|
+
SortKey["position"] = "position";
|
|
13
|
+
/** Sort by date created */
|
|
14
|
+
SortKey["dateCreated"] = "dateCreated";
|
|
15
|
+
})(SortKey = exports.SortKey || (exports.SortKey = {}));
|
|
16
|
+
var GroupBy;
|
|
17
|
+
(function (GroupBy) {
|
|
18
|
+
GroupBy["total"] = "total";
|
|
19
|
+
GroupBy["contactId"] = "contactId";
|
|
20
|
+
})(GroupBy = exports.GroupBy || (exports.GroupBy = {}));
|
|
21
|
+
//# sourceMappingURL=crm-tasks-v1-task.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crm-tasks-v1-task.types.js","sourceRoot":"","sources":["../../../src/crm-tasks-v1-task.types.ts"],"names":[],"mappings":";;;AAkCA,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,0BAAW,CAAA;AACb,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB;AA+BD,IAAY,OAKX;AALD,WAAY,OAAO;IACjB,uBAAuB;IACvB,gCAAqB,CAAA;IACrB,2BAA2B;IAC3B,sCAA2B,CAAA;AAC7B,CAAC,EALW,OAAO,GAAP,eAAO,KAAP,eAAO,QAKlB;AA+ED,IAAY,OAGX;AAHD,WAAY,OAAO;IACjB,0BAAe,CAAA;IACf,kCAAuB,CAAA;AACzB,CAAC,EAHW,OAAO,GAAP,eAAO,KAAP,eAAO,QAGlB"}
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
export declare const __debug: {
|
|
2
|
+
verboseLogging: {
|
|
3
|
+
on: () => boolean;
|
|
4
|
+
off: () => boolean;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export interface Task {
|
|
8
|
+
/**
|
|
9
|
+
* The ID of the task. Should not be populated in `createTask`.
|
|
10
|
+
* @readonly
|
|
11
|
+
*/
|
|
12
|
+
taskId?: string;
|
|
13
|
+
/** The ID of the creator of the task. */
|
|
14
|
+
creator?: Creator;
|
|
15
|
+
/** The title of the task. */
|
|
16
|
+
title?: string;
|
|
17
|
+
/** Indicates if the task is completed. */
|
|
18
|
+
isCompleted?: boolean;
|
|
19
|
+
/** Expected due date for the task. */
|
|
20
|
+
dueAt?: Date;
|
|
21
|
+
/** Assigned contact ID for the task */
|
|
22
|
+
contactId?: string;
|
|
23
|
+
/** Task version. Incremented on each change. */
|
|
24
|
+
version?: number;
|
|
25
|
+
/** Assignee ID for the task. */
|
|
26
|
+
assigneeId?: string;
|
|
27
|
+
/** The labels assigned to the task */
|
|
28
|
+
labels?: Label[];
|
|
29
|
+
}
|
|
30
|
+
export interface Creator {
|
|
31
|
+
/**
|
|
32
|
+
* Creator ID.
|
|
33
|
+
* @readonly
|
|
34
|
+
*/
|
|
35
|
+
_id?: string;
|
|
36
|
+
/** Creator type */
|
|
37
|
+
creatorType?: CreatorType;
|
|
38
|
+
}
|
|
39
|
+
export declare enum CreatorType {
|
|
40
|
+
USER = "USER",
|
|
41
|
+
APP = "APP"
|
|
42
|
+
}
|
|
43
|
+
export interface Label {
|
|
44
|
+
/**
|
|
45
|
+
* The ID of the label. Should not be populated in `createTask`.
|
|
46
|
+
* @readonly
|
|
47
|
+
*/
|
|
48
|
+
labelId?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Label name.
|
|
51
|
+
*
|
|
52
|
+
* Max: 50 characters
|
|
53
|
+
*/
|
|
54
|
+
name?: string;
|
|
55
|
+
/** Label's color. */
|
|
56
|
+
color?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface GetTaskRequest {
|
|
59
|
+
/** Task ID. */
|
|
60
|
+
_id: string;
|
|
61
|
+
}
|
|
62
|
+
export interface GetTaskResponse {
|
|
63
|
+
/** Task information. */
|
|
64
|
+
task?: Task;
|
|
65
|
+
}
|
|
66
|
+
export interface GetTasksListRequest {
|
|
67
|
+
/** Assigned contact ID for the task. Optional. */
|
|
68
|
+
contactId?: string;
|
|
69
|
+
/** Sort key. */
|
|
70
|
+
key?: SortKey;
|
|
71
|
+
}
|
|
72
|
+
export declare enum SortKey {
|
|
73
|
+
/** Sort by position */
|
|
74
|
+
position = "position",
|
|
75
|
+
/** Sort by date created */
|
|
76
|
+
dateCreated = "dateCreated"
|
|
77
|
+
}
|
|
78
|
+
export interface GetTasksListResponse {
|
|
79
|
+
/** Array of the site's tasks */
|
|
80
|
+
tasks?: Task[];
|
|
81
|
+
}
|
|
82
|
+
export interface ListTasksRequest extends ListTasksRequestGetByOneOf {
|
|
83
|
+
/** List params */
|
|
84
|
+
params?: ListParams;
|
|
85
|
+
/** Optional cursor */
|
|
86
|
+
cursor?: string | null;
|
|
87
|
+
}
|
|
88
|
+
/** @oneof */
|
|
89
|
+
export interface ListTasksRequestGetByOneOf {
|
|
90
|
+
/** List params */
|
|
91
|
+
params?: ListParams;
|
|
92
|
+
/** Optional cursor */
|
|
93
|
+
cursor?: string | null;
|
|
94
|
+
}
|
|
95
|
+
export interface ListParams {
|
|
96
|
+
/** Filter */
|
|
97
|
+
filter?: FilterBy;
|
|
98
|
+
/** Order */
|
|
99
|
+
order?: string[];
|
|
100
|
+
/** Limit */
|
|
101
|
+
limit?: number;
|
|
102
|
+
/** Offset */
|
|
103
|
+
offset?: number;
|
|
104
|
+
}
|
|
105
|
+
export interface FilterBy {
|
|
106
|
+
/** List of contact IDs. */
|
|
107
|
+
contactIds?: string[];
|
|
108
|
+
/** From due date */
|
|
109
|
+
fromDate?: Date;
|
|
110
|
+
/** To due date */
|
|
111
|
+
toDate?: Date;
|
|
112
|
+
/** Completed status. */
|
|
113
|
+
isCompleted?: boolean | null;
|
|
114
|
+
/** Assignee ID. */
|
|
115
|
+
assigneeId?: string | null;
|
|
116
|
+
/** The title of the task. */
|
|
117
|
+
title?: string | null;
|
|
118
|
+
/** Task title contains substring */
|
|
119
|
+
subtitle?: string | null;
|
|
120
|
+
/** List of tasks IDs. */
|
|
121
|
+
tasksIds?: string[];
|
|
122
|
+
/** List of labels IDs. */
|
|
123
|
+
labelIds?: string[];
|
|
124
|
+
}
|
|
125
|
+
export interface ListTasksResponse {
|
|
126
|
+
/** Array of the site's tasks */
|
|
127
|
+
tasks?: Task[];
|
|
128
|
+
/** Pagination information */
|
|
129
|
+
pagination?: Pagination;
|
|
130
|
+
}
|
|
131
|
+
export interface Pagination {
|
|
132
|
+
/** Pagination offset */
|
|
133
|
+
offset?: number;
|
|
134
|
+
/** Pagination limit */
|
|
135
|
+
limit?: number;
|
|
136
|
+
/** Pagination total */
|
|
137
|
+
total?: number;
|
|
138
|
+
/** Optional cursor */
|
|
139
|
+
cursor?: string | null;
|
|
140
|
+
}
|
|
141
|
+
export interface CountTasksRequest {
|
|
142
|
+
/** Group by field */
|
|
143
|
+
field?: GroupBy;
|
|
144
|
+
/** Where strings */
|
|
145
|
+
where?: string[];
|
|
146
|
+
}
|
|
147
|
+
export declare enum GroupBy {
|
|
148
|
+
total = "total",
|
|
149
|
+
contactId = "contactId"
|
|
150
|
+
}
|
|
151
|
+
export interface CountTasksResponse {
|
|
152
|
+
/** Tasks in site */
|
|
153
|
+
tasksInSite?: number;
|
|
154
|
+
/** Map by requested field */
|
|
155
|
+
byRequestedField?: Record<string, number>;
|
|
156
|
+
}
|
|
157
|
+
export interface CreateTaskRequest {
|
|
158
|
+
/** Task information. */
|
|
159
|
+
task?: TaskData;
|
|
160
|
+
}
|
|
161
|
+
export interface TaskData {
|
|
162
|
+
/**
|
|
163
|
+
* The title of the task.
|
|
164
|
+
*
|
|
165
|
+
* Max: 500 characters.
|
|
166
|
+
*/
|
|
167
|
+
title?: string;
|
|
168
|
+
/** Expected due date for the task. */
|
|
169
|
+
dueAt?: Date;
|
|
170
|
+
/** Assigned contact ID for the task. */
|
|
171
|
+
contactId?: string;
|
|
172
|
+
/** Assignee ID for the task. */
|
|
173
|
+
assigneeId?: string;
|
|
174
|
+
/** The label IDs assigned to the task. */
|
|
175
|
+
labelIds?: string[];
|
|
176
|
+
}
|
|
177
|
+
export interface CreateTaskResponse {
|
|
178
|
+
/** Task ID. */
|
|
179
|
+
_id?: string;
|
|
180
|
+
/** The task version. Incremented on each change */
|
|
181
|
+
version?: number;
|
|
182
|
+
}
|
|
183
|
+
export interface TaskNotification {
|
|
184
|
+
/** Instance ID of the task in Tasks App. */
|
|
185
|
+
instanceId?: string;
|
|
186
|
+
/** Task ID. */
|
|
187
|
+
taskId?: string;
|
|
188
|
+
/** The changed task */
|
|
189
|
+
task?: Task;
|
|
190
|
+
/** The action that was performed on the task */
|
|
191
|
+
taskAction?: string;
|
|
192
|
+
/** Set of updated fields */
|
|
193
|
+
changes?: string[];
|
|
194
|
+
}
|
|
195
|
+
export interface UpdateTaskRequest {
|
|
196
|
+
/** Task ID. */
|
|
197
|
+
_id: string;
|
|
198
|
+
/** Required fields. */
|
|
199
|
+
fields?: string[];
|
|
200
|
+
/** Task information. */
|
|
201
|
+
task?: TaskData;
|
|
202
|
+
}
|
|
203
|
+
export interface UpdateTaskResponse {
|
|
204
|
+
/** Task ID. */
|
|
205
|
+
_id?: string;
|
|
206
|
+
/** The task version. Incremented on each change */
|
|
207
|
+
version?: number;
|
|
208
|
+
}
|
|
209
|
+
export interface CompleteTaskRequest {
|
|
210
|
+
/** Task ID. */
|
|
211
|
+
_id: string;
|
|
212
|
+
/** Indicates whether the task is completed. */
|
|
213
|
+
isCompleted?: boolean | null;
|
|
214
|
+
}
|
|
215
|
+
export interface CompleteTaskResponse {
|
|
216
|
+
/** Task ID. */
|
|
217
|
+
_id?: string;
|
|
218
|
+
/** The task version. Incremented on each change */
|
|
219
|
+
version?: number;
|
|
220
|
+
}
|
|
221
|
+
export interface MoveTaskRequest {
|
|
222
|
+
/** Task ID. */
|
|
223
|
+
_id?: string;
|
|
224
|
+
/** Task ID of the task positioned before. */
|
|
225
|
+
taskBeforeId?: string;
|
|
226
|
+
}
|
|
227
|
+
export interface MoveTaskResponse {
|
|
228
|
+
/** Task ID. */
|
|
229
|
+
_id?: string;
|
|
230
|
+
/** The task version. Incremented on each change */
|
|
231
|
+
version?: number;
|
|
232
|
+
}
|
|
233
|
+
export interface DeleteTaskRequest {
|
|
234
|
+
/** Task ID. */
|
|
235
|
+
_id: string;
|
|
236
|
+
}
|
|
237
|
+
export interface DeleteTaskResponse {
|
|
238
|
+
/** Task ID. */
|
|
239
|
+
_id?: string;
|
|
240
|
+
/** The task version. Incremented on each change */
|
|
241
|
+
version?: number;
|
|
242
|
+
}
|
|
243
|
+
export interface DeleteCompletedRequest {
|
|
244
|
+
}
|
|
245
|
+
export interface DeleteCompletedResponse {
|
|
246
|
+
/** Array of deleted task IDs. */
|
|
247
|
+
ids?: string[];
|
|
248
|
+
}
|
|
249
|
+
export interface GetTaskResponseNonNullableFields {
|
|
250
|
+
task?: {
|
|
251
|
+
taskId: string;
|
|
252
|
+
creator?: {
|
|
253
|
+
_id: string;
|
|
254
|
+
creatorType: CreatorType;
|
|
255
|
+
};
|
|
256
|
+
title: string;
|
|
257
|
+
isCompleted: boolean;
|
|
258
|
+
contactId: string;
|
|
259
|
+
version: number;
|
|
260
|
+
assigneeId: string;
|
|
261
|
+
labels: {
|
|
262
|
+
labelId: string;
|
|
263
|
+
name: string;
|
|
264
|
+
color: string;
|
|
265
|
+
}[];
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
export interface CreateTaskResponseNonNullableFields {
|
|
269
|
+
_id: string;
|
|
270
|
+
version: number;
|
|
271
|
+
}
|
|
272
|
+
export interface UpdateTaskResponseNonNullableFields {
|
|
273
|
+
_id: string;
|
|
274
|
+
version: number;
|
|
275
|
+
}
|
|
276
|
+
export interface CompleteTaskResponseNonNullableFields {
|
|
277
|
+
_id: string;
|
|
278
|
+
version: number;
|
|
279
|
+
}
|
|
280
|
+
export interface DeleteTaskResponseNonNullableFields {
|
|
281
|
+
_id: string;
|
|
282
|
+
version: number;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Gets a task by ID.
|
|
286
|
+
*
|
|
287
|
+
*
|
|
288
|
+
* The `getTask()` function returns a Promise that resolves to the task with the given ID.
|
|
289
|
+
* @public
|
|
290
|
+
* @documentationMaturity preview
|
|
291
|
+
* @requiredField _id
|
|
292
|
+
* @param _id - Task ID.
|
|
293
|
+
*/
|
|
294
|
+
export declare function getTask(_id: string): Promise<GetTaskResponse & GetTaskResponseNonNullableFields>;
|
|
295
|
+
/**
|
|
296
|
+
* Creates a new task.
|
|
297
|
+
*
|
|
298
|
+
*
|
|
299
|
+
* The `createTask()` function returns a Promise that resolves to the ID of the created task.
|
|
300
|
+
*
|
|
301
|
+
* When creating a new task, the specified `task` object must contain a `title` value.
|
|
302
|
+
* @public
|
|
303
|
+
* @documentationMaturity preview
|
|
304
|
+
* @requiredField task
|
|
305
|
+
* @param task - Task information.
|
|
306
|
+
*/
|
|
307
|
+
export declare function createTask(task: TaskData): Promise<CreateTaskResponse & CreateTaskResponseNonNullableFields>;
|
|
308
|
+
/**
|
|
309
|
+
* Updates the specified fields of an existing task.
|
|
310
|
+
*
|
|
311
|
+
*
|
|
312
|
+
* The `updateTaskFields()` function returns a Promise that resolves to the ID of the updated task after it has been successfully updated.
|
|
313
|
+
*
|
|
314
|
+
* Only the properties in the `task` object are updated. All other properties remain the same.
|
|
315
|
+
*
|
|
316
|
+
* To remove a value from the task, pass its corresponding property with a value of `null`.
|
|
317
|
+
* @public
|
|
318
|
+
* @documentationMaturity preview
|
|
319
|
+
* @requiredField _id
|
|
320
|
+
* @requiredField fields
|
|
321
|
+
* @requiredField task
|
|
322
|
+
* @param _id - Task ID.
|
|
323
|
+
* @param task - Task information.
|
|
324
|
+
* @param fields - Required fields.
|
|
325
|
+
*/
|
|
326
|
+
export declare function updateTaskFields(_id: string, fields: string[], task: TaskData): Promise<UpdateTaskResponse & UpdateTaskResponseNonNullableFields>;
|
|
327
|
+
/**
|
|
328
|
+
* Updates completed status of task.
|
|
329
|
+
*
|
|
330
|
+
*
|
|
331
|
+
* The `updateTaskStatus()` function returns a Promise that resolves to the ID of the task whose completed status was updated.
|
|
332
|
+
* @public
|
|
333
|
+
* @documentationMaturity preview
|
|
334
|
+
* @requiredField _id
|
|
335
|
+
* @requiredField isCompleted
|
|
336
|
+
* @param _id - Task ID.
|
|
337
|
+
* @param isCompleted - Indicates whether the task is completed.
|
|
338
|
+
*/
|
|
339
|
+
export declare function updateTaskStatus(_id: string, isCompleted: boolean | null): Promise<CompleteTaskResponse & CompleteTaskResponseNonNullableFields>;
|
|
340
|
+
/**
|
|
341
|
+
* Removes an existing task.
|
|
342
|
+
*
|
|
343
|
+
*
|
|
344
|
+
* The `removeTask()` function returns a Promise that resolves to the ID of the removed task after it has been successfully removed.
|
|
345
|
+
* @public
|
|
346
|
+
* @documentationMaturity preview
|
|
347
|
+
* @requiredField _id
|
|
348
|
+
* @param _id - Task ID.
|
|
349
|
+
*/
|
|
350
|
+
export declare function removeTask(_id: string): Promise<DeleteTaskResponse & DeleteTaskResponseNonNullableFields>;
|