@wix/auto_sdk_crm_tasks 1.0.7 → 1.0.9
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 +47 -0
- package/build/cjs/src/crm-tasks-v2-task-tasks.http.js +264 -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 +94 -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 +528 -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/{crm-tasks-v2-task-tasks.universal-DHOV27KP.d.mts → cjs/src/crm-tasks-v2-task-tasks.universal.d.ts} +238 -67
- package/build/cjs/src/crm-tasks-v2-task-tasks.universal.js +363 -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 +47 -0
- package/build/es/src/crm-tasks-v2-task-tasks.http.js +254 -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 +94 -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 +528 -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/{crm-tasks-v2-task-tasks.universal-DHOV27KP.d.ts → es/src/crm-tasks-v2-task-tasks.universal.d.ts} +238 -67
- package/build/es/src/crm-tasks-v2-task-tasks.universal.js +330 -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 +47 -0
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.http.js +264 -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 +94 -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 +528 -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/{crm-tasks-v2-task-tasks.universal-DHOV27KP.d.mts → cjs/src/crm-tasks-v2-task-tasks.universal.d.ts} +238 -67
- package/build/internal/cjs/src/crm-tasks-v2-task-tasks.universal.js +363 -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 +47 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.http.js +254 -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 +94 -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 +528 -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/{crm-tasks-v2-task-tasks.universal-DHOV27KP.d.ts → es/src/crm-tasks-v2-task-tasks.universal.d.ts} +238 -67
- package/build/internal/es/src/crm-tasks-v2-task-tasks.universal.js +330 -0
- package/build/internal/es/src/crm-tasks-v2-task-tasks.universal.js.map +1 -0
- package/package.json +11 -12
- package/build/index.d.mts +0 -115
- package/build/index.d.ts +0 -115
- package/build/index.js +0 -640
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -601
- package/build/index.mjs.map +0 -1
- package/build/internal/index.d.mts +0 -115
- package/build/internal/index.d.ts +0 -115
- package/build/internal/index.js +0 -640
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -601
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/meta.d.mts +0 -290
- package/build/internal/meta.d.ts +0 -290
- package/build/internal/meta.js +0 -386
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs +0 -353
- package/build/internal/meta.mjs.map +0 -1
- package/build/meta.d.mts +0 -290
- package/build/meta.d.ts +0 -290
- package/build/meta.js +0 -386
- package/build/meta.js.map +0 -1
- package/build/meta.mjs +0 -353
- package/build/meta.mjs.map +0 -1
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
|
|
2
|
+
import { queryBuilder } from '@wix/sdk-runtime/query-builder';
|
|
3
|
+
import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
|
|
4
|
+
import * as ambassadorWixCrmTasksV2Task from './crm-tasks-v2-task-tasks.http.js';
|
|
5
|
+
/** Possible statuses in which the task may be. */
|
|
6
|
+
export var TaskStatus;
|
|
7
|
+
(function (TaskStatus) {
|
|
8
|
+
/** Action needed. */
|
|
9
|
+
TaskStatus["ACTION_NEEDED"] = "ACTION_NEEDED";
|
|
10
|
+
/** Task completed. */
|
|
11
|
+
TaskStatus["COMPLETED"] = "COMPLETED";
|
|
12
|
+
})(TaskStatus || (TaskStatus = {}));
|
|
13
|
+
/** Possible sources that can create tasks. */
|
|
14
|
+
export var SourceType;
|
|
15
|
+
(function (SourceType) {
|
|
16
|
+
/** Task was created by an app. */
|
|
17
|
+
SourceType["APP"] = "APP";
|
|
18
|
+
/** Task was created by a Wix user. */
|
|
19
|
+
SourceType["USER"] = "USER";
|
|
20
|
+
})(SourceType || (SourceType = {}));
|
|
21
|
+
export var SortOrder;
|
|
22
|
+
(function (SortOrder) {
|
|
23
|
+
/** Sort by ascending order. */
|
|
24
|
+
SortOrder["ASC"] = "ASC";
|
|
25
|
+
/** Sort by descending order. */
|
|
26
|
+
SortOrder["DESC"] = "DESC";
|
|
27
|
+
})(SortOrder || (SortOrder = {}));
|
|
28
|
+
export var WebhookIdentityType;
|
|
29
|
+
(function (WebhookIdentityType) {
|
|
30
|
+
WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
|
|
31
|
+
WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
32
|
+
WebhookIdentityType["MEMBER"] = "MEMBER";
|
|
33
|
+
WebhookIdentityType["WIX_USER"] = "WIX_USER";
|
|
34
|
+
WebhookIdentityType["APP"] = "APP";
|
|
35
|
+
})(WebhookIdentityType || (WebhookIdentityType = {}));
|
|
36
|
+
export var ReminderType;
|
|
37
|
+
(function (ReminderType) {
|
|
38
|
+
ReminderType["UNKNOWN_REMINDER_TYPE"] = "UNKNOWN_REMINDER_TYPE";
|
|
39
|
+
ReminderType["FIRST_REMINDER"] = "FIRST_REMINDER";
|
|
40
|
+
ReminderType["LAST_REMINDER"] = "LAST_REMINDER";
|
|
41
|
+
})(ReminderType || (ReminderType = {}));
|
|
42
|
+
/**
|
|
43
|
+
* Creates a new task.
|
|
44
|
+
* @param task - Task to create.
|
|
45
|
+
* @public
|
|
46
|
+
* @requiredField task
|
|
47
|
+
* @permissionId CRM_TASKS.TASK_CREATE
|
|
48
|
+
* @permissionScope Manage Tasks
|
|
49
|
+
* @permissionScopeId SCOPE.DC-CRM.MANAGE-TASKS
|
|
50
|
+
* @applicableIdentity APP
|
|
51
|
+
* @returns The created task.
|
|
52
|
+
* @fqn wix.crm.tasks.v2.Tasks.CreateTask
|
|
53
|
+
*/
|
|
54
|
+
export async function createTask(task) {
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
57
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ task: task });
|
|
58
|
+
const reqOpts = ambassadorWixCrmTasksV2Task.createTask(payload);
|
|
59
|
+
sideEffects?.onSiteCall?.();
|
|
60
|
+
try {
|
|
61
|
+
const result = await httpClient.request(reqOpts);
|
|
62
|
+
sideEffects?.onSuccess?.(result);
|
|
63
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.task;
|
|
64
|
+
}
|
|
65
|
+
catch (err) {
|
|
66
|
+
const transformedError = sdkTransformError(err, {
|
|
67
|
+
spreadPathsToArguments: {},
|
|
68
|
+
explicitPathsToArguments: { task: '$[0]' },
|
|
69
|
+
singleArgumentUnchanged: false,
|
|
70
|
+
}, ['task']);
|
|
71
|
+
sideEffects?.onError?.(err);
|
|
72
|
+
throw transformedError;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Retrieves a task by ID.
|
|
77
|
+
* @param taskId - ID of the task to retrieve.
|
|
78
|
+
* @public
|
|
79
|
+
* @requiredField taskId
|
|
80
|
+
* @permissionId CRM_TASKS.TASK_READ
|
|
81
|
+
* @permissionScope Read Tasks
|
|
82
|
+
* @permissionScopeId SCOPE.DC-CRM.READ-TASKS
|
|
83
|
+
* @permissionScope Manage Tasks
|
|
84
|
+
* @permissionScopeId SCOPE.DC-CRM.MANAGE-TASKS
|
|
85
|
+
* @applicableIdentity APP
|
|
86
|
+
* @returns The retrieved task.
|
|
87
|
+
* @fqn wix.crm.tasks.v2.Tasks.GetTask
|
|
88
|
+
*/
|
|
89
|
+
export async function getTask(taskId) {
|
|
90
|
+
// @ts-ignore
|
|
91
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
92
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ taskId: taskId });
|
|
93
|
+
const reqOpts = ambassadorWixCrmTasksV2Task.getTask(payload);
|
|
94
|
+
sideEffects?.onSiteCall?.();
|
|
95
|
+
try {
|
|
96
|
+
const result = await httpClient.request(reqOpts);
|
|
97
|
+
sideEffects?.onSuccess?.(result);
|
|
98
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.task;
|
|
99
|
+
}
|
|
100
|
+
catch (err) {
|
|
101
|
+
const transformedError = sdkTransformError(err, {
|
|
102
|
+
spreadPathsToArguments: {},
|
|
103
|
+
explicitPathsToArguments: { taskId: '$[0]' },
|
|
104
|
+
singleArgumentUnchanged: false,
|
|
105
|
+
}, ['taskId']);
|
|
106
|
+
sideEffects?.onError?.(err);
|
|
107
|
+
throw transformedError;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Updates a task.
|
|
112
|
+
*
|
|
113
|
+
* Each time the task is updated, `revision` increments by 1.
|
|
114
|
+
* The existing `revision` must be included when updating the task.
|
|
115
|
+
* This ensures you're working with the latest task
|
|
116
|
+
* and prevents unintended overwrites.
|
|
117
|
+
* @param _id - Task ID.
|
|
118
|
+
* @public
|
|
119
|
+
* @requiredField _id
|
|
120
|
+
* @requiredField task
|
|
121
|
+
* @requiredField task.revision
|
|
122
|
+
* @param task - Task to update.
|
|
123
|
+
* @permissionId CRM_TASKS.TASK_UPDATE
|
|
124
|
+
* @permissionScope Manage Tasks
|
|
125
|
+
* @permissionScopeId SCOPE.DC-CRM.MANAGE-TASKS
|
|
126
|
+
* @applicableIdentity APP
|
|
127
|
+
* @returns The updated task.
|
|
128
|
+
* @fqn wix.crm.tasks.v2.Tasks.UpdateTask
|
|
129
|
+
*/
|
|
130
|
+
export async function updateTask(_id, task) {
|
|
131
|
+
// @ts-ignore
|
|
132
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
133
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
134
|
+
task: { ...task, id: _id },
|
|
135
|
+
});
|
|
136
|
+
const reqOpts = ambassadorWixCrmTasksV2Task.updateTask(payload);
|
|
137
|
+
sideEffects?.onSiteCall?.();
|
|
138
|
+
try {
|
|
139
|
+
const result = await httpClient.request(reqOpts);
|
|
140
|
+
sideEffects?.onSuccess?.(result);
|
|
141
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.task;
|
|
142
|
+
}
|
|
143
|
+
catch (err) {
|
|
144
|
+
const transformedError = sdkTransformError(err, {
|
|
145
|
+
spreadPathsToArguments: { task: '$[1]' },
|
|
146
|
+
explicitPathsToArguments: { 'task.id': '$[0]' },
|
|
147
|
+
singleArgumentUnchanged: false,
|
|
148
|
+
}, ['_id', 'task']);
|
|
149
|
+
sideEffects?.onError?.(err);
|
|
150
|
+
throw transformedError;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Deletes a task by ID.
|
|
155
|
+
* @param taskId - ID of the task to delete.
|
|
156
|
+
* @public
|
|
157
|
+
* @requiredField taskId
|
|
158
|
+
* @permissionId CRM_TASKS.TASK_DELETE
|
|
159
|
+
* @permissionScope Manage Tasks
|
|
160
|
+
* @permissionScopeId SCOPE.DC-CRM.MANAGE-TASKS
|
|
161
|
+
* @applicableIdentity APP
|
|
162
|
+
* @fqn wix.crm.tasks.v2.Tasks.DeleteTask
|
|
163
|
+
*/
|
|
164
|
+
export async function deleteTask(taskId) {
|
|
165
|
+
// @ts-ignore
|
|
166
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
167
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ taskId: taskId });
|
|
168
|
+
const reqOpts = ambassadorWixCrmTasksV2Task.deleteTask(payload);
|
|
169
|
+
sideEffects?.onSiteCall?.();
|
|
170
|
+
try {
|
|
171
|
+
const result = await httpClient.request(reqOpts);
|
|
172
|
+
sideEffects?.onSuccess?.(result);
|
|
173
|
+
}
|
|
174
|
+
catch (err) {
|
|
175
|
+
const transformedError = sdkTransformError(err, {
|
|
176
|
+
spreadPathsToArguments: {},
|
|
177
|
+
explicitPathsToArguments: { taskId: '$[0]' },
|
|
178
|
+
singleArgumentUnchanged: false,
|
|
179
|
+
}, ['taskId']);
|
|
180
|
+
sideEffects?.onError?.(err);
|
|
181
|
+
throw transformedError;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Creates a query to retrieve a list of tasks.
|
|
186
|
+
*
|
|
187
|
+
* The `queryTasks()` method builds a query to retrieve a list of tasks and returns a `TasksQueryBuilder` object.
|
|
188
|
+
*
|
|
189
|
+
* The returned object contains the query definition which is typically used to run the query using the `find()` method. You can refine the query by chaining `TasksQueryBuilder` methods onto the query. `TasksQueryBuilder` methods enable you to sort, filter, and control the results that `queryTasks()` returns.
|
|
190
|
+
*
|
|
191
|
+
* `queryTasks()` runs with these `TasksQueryBuilder` defaults, which you can override:
|
|
192
|
+
* - `limit(50)`
|
|
193
|
+
* - `descending('_createdDate')`
|
|
194
|
+
*
|
|
195
|
+
* The methods 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.
|
|
196
|
+
*
|
|
197
|
+
* The following `TasksQueryBuilder` methods are supported for `queryTasks()`. For a full description of the `task` object, see the object returned for the `items` property in `TasksQueryResult`.
|
|
198
|
+
* @public
|
|
199
|
+
* @permissionScope Read Tasks
|
|
200
|
+
* @permissionScopeId SCOPE.DC-CRM.READ-TASKS
|
|
201
|
+
* @permissionScope Manage Tasks
|
|
202
|
+
* @permissionScopeId SCOPE.DC-CRM.MANAGE-TASKS
|
|
203
|
+
* @permissionId CRM_TASKS.TASK_READ
|
|
204
|
+
* @applicableIdentity APP
|
|
205
|
+
* @fqn wix.crm.tasks.v2.Tasks.QueryTasks
|
|
206
|
+
*/
|
|
207
|
+
export function queryTasks() {
|
|
208
|
+
// @ts-ignore
|
|
209
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
210
|
+
return queryBuilder({
|
|
211
|
+
func: async (payload) => {
|
|
212
|
+
const reqOpts = ambassadorWixCrmTasksV2Task.queryTasks(payload);
|
|
213
|
+
sideEffects?.onSiteCall?.();
|
|
214
|
+
try {
|
|
215
|
+
const result = await httpClient.request(reqOpts);
|
|
216
|
+
sideEffects?.onSuccess?.(result);
|
|
217
|
+
return result;
|
|
218
|
+
}
|
|
219
|
+
catch (err) {
|
|
220
|
+
sideEffects?.onError?.(err);
|
|
221
|
+
throw err;
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
requestTransformer: (query) => {
|
|
225
|
+
const args = [query, {}];
|
|
226
|
+
return renameKeysFromSDKRequestToRESTRequest({
|
|
227
|
+
...args?.[1],
|
|
228
|
+
query: args?.[0],
|
|
229
|
+
});
|
|
230
|
+
},
|
|
231
|
+
responseTransformer: ({ data }) => {
|
|
232
|
+
const transformedData = renameKeysFromRESTResponseToSDKResponse(data);
|
|
233
|
+
return {
|
|
234
|
+
items: transformedData?.tasks,
|
|
235
|
+
pagingMetadata: transformedData?.pagingMetadata,
|
|
236
|
+
};
|
|
237
|
+
},
|
|
238
|
+
errorTransformer: (err) => {
|
|
239
|
+
const transformedError = sdkTransformError(err, {
|
|
240
|
+
spreadPathsToArguments: {},
|
|
241
|
+
explicitPathsToArguments: { query: '$[0]' },
|
|
242
|
+
singleArgumentUnchanged: false,
|
|
243
|
+
});
|
|
244
|
+
throw transformedError;
|
|
245
|
+
},
|
|
246
|
+
pagingMethod: 'CURSOR',
|
|
247
|
+
transformationPaths: {},
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Counts the number of tasks.
|
|
252
|
+
*
|
|
253
|
+
*
|
|
254
|
+
* This method returns the count of all tasks regardless of their `status`.
|
|
255
|
+
*
|
|
256
|
+
* Optionally, you can specify a filter to count only tasks that meet certain criteria.
|
|
257
|
+
* @public
|
|
258
|
+
* @param options - Filtering options.
|
|
259
|
+
* @permissionId CRM_TASKS.TASK_READ
|
|
260
|
+
* @permissionScope Read Tasks
|
|
261
|
+
* @permissionScopeId SCOPE.DC-CRM.READ-TASKS
|
|
262
|
+
* @permissionScope Manage Tasks
|
|
263
|
+
* @permissionScopeId SCOPE.DC-CRM.MANAGE-TASKS
|
|
264
|
+
* @applicableIdentity APP
|
|
265
|
+
* @fqn wix.crm.tasks.v2.Tasks.CountTasks
|
|
266
|
+
*/
|
|
267
|
+
export async function countTasks(options) {
|
|
268
|
+
// @ts-ignore
|
|
269
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
270
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
271
|
+
filter: options?.filter,
|
|
272
|
+
});
|
|
273
|
+
const reqOpts = ambassadorWixCrmTasksV2Task.countTasks(payload);
|
|
274
|
+
sideEffects?.onSiteCall?.();
|
|
275
|
+
try {
|
|
276
|
+
const result = await httpClient.request(reqOpts);
|
|
277
|
+
sideEffects?.onSuccess?.(result);
|
|
278
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
279
|
+
}
|
|
280
|
+
catch (err) {
|
|
281
|
+
const transformedError = sdkTransformError(err, {
|
|
282
|
+
spreadPathsToArguments: {},
|
|
283
|
+
explicitPathsToArguments: { filter: '$[0].filter' },
|
|
284
|
+
singleArgumentUnchanged: false,
|
|
285
|
+
}, ['options']);
|
|
286
|
+
sideEffects?.onError?.(err);
|
|
287
|
+
throw transformedError;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Moves a task specified by ID to be placed after another task in the task display.
|
|
292
|
+
*
|
|
293
|
+
* You can reposition a task to be first in the display by omitting `beforeTaskId`.
|
|
294
|
+
* @param taskId - ID of the task to move.
|
|
295
|
+
* @public
|
|
296
|
+
* @requiredField taskId
|
|
297
|
+
* @param options - Options for moving the task.
|
|
298
|
+
* @permissionId CRM_TASKS.TASK_UPDATE
|
|
299
|
+
* @permissionScope Manage Tasks
|
|
300
|
+
* @permissionScopeId SCOPE.DC-CRM.MANAGE-TASKS
|
|
301
|
+
* @applicableIdentity APP
|
|
302
|
+
* @fqn wix.crm.tasks.v2.Tasks.MoveTaskAfter
|
|
303
|
+
*/
|
|
304
|
+
export async function moveTaskAfter(taskId, options) {
|
|
305
|
+
// @ts-ignore
|
|
306
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
307
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
308
|
+
taskId: taskId,
|
|
309
|
+
beforeTaskId: options?.beforeTaskId,
|
|
310
|
+
});
|
|
311
|
+
const reqOpts = ambassadorWixCrmTasksV2Task.moveTaskAfter(payload);
|
|
312
|
+
sideEffects?.onSiteCall?.();
|
|
313
|
+
try {
|
|
314
|
+
const result = await httpClient.request(reqOpts);
|
|
315
|
+
sideEffects?.onSuccess?.(result);
|
|
316
|
+
}
|
|
317
|
+
catch (err) {
|
|
318
|
+
const transformedError = sdkTransformError(err, {
|
|
319
|
+
spreadPathsToArguments: {},
|
|
320
|
+
explicitPathsToArguments: {
|
|
321
|
+
taskId: '$[0]',
|
|
322
|
+
beforeTaskId: '$[1].beforeTaskId',
|
|
323
|
+
},
|
|
324
|
+
singleArgumentUnchanged: false,
|
|
325
|
+
}, ['taskId', 'options']);
|
|
326
|
+
sideEffects?.onError?.(err);
|
|
327
|
+
throw transformedError;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
//# sourceMappingURL=crm-tasks-v2-task-tasks.universal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crm-tasks-v2-task-tasks.universal.js","sourceRoot":"","sources":["../../../../src/crm-tasks-v2-task-tasks.universal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EACL,qCAAqC,EACrC,uCAAuC,GACxC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,2BAA2B,MAAM,mCAAmC,CAAC;AAmDjF,kDAAkD;AAClD,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,qBAAqB;IACrB,6CAA+B,CAAA;IAC/B,sBAAsB;IACtB,qCAAuB,CAAA;AACzB,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB;AAsBD,8CAA8C;AAC9C,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,kCAAkC;IAClC,yBAAW,CAAA;IACX,sCAAsC;IACtC,2BAAa,CAAA;AACf,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB;AAiJD,MAAM,CAAN,IAAY,SAKX;AALD,WAA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ACtB,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto_sdk_crm_tasks",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
8
|
"keywords": [],
|
|
9
9
|
"sideEffects": false,
|
|
10
|
-
"main": "
|
|
11
|
-
"types": "./build/index.d.
|
|
10
|
+
"main": "./build/cjs/index.js",
|
|
11
|
+
"types": "./build/es/index.d.ts",
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
|
-
"import": "./build/index.
|
|
15
|
-
"require": "./build/index.js",
|
|
16
|
-
"types": "./build/index.d.
|
|
14
|
+
"import": "./build/es/index.js",
|
|
15
|
+
"require": "./build/cjs/index.js",
|
|
16
|
+
"types": "./build/es/index.d.ts"
|
|
17
17
|
},
|
|
18
18
|
"./package.json": "./package.json",
|
|
19
19
|
"./meta": {
|
|
20
|
-
"import": "./build/meta.
|
|
21
|
-
"require": "./build/meta.js",
|
|
22
|
-
"types": "./build/meta.d.
|
|
20
|
+
"import": "./build/es/meta.js",
|
|
21
|
+
"require": "./build/cjs/meta.js",
|
|
22
|
+
"types": "./build/es/meta.d.ts"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
@@ -32,11 +32,10 @@
|
|
|
32
32
|
"@wix/sdk-types": "^1.13.16"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"tsup": "^8.4.0",
|
|
36
35
|
"typescript": "^5.3.2"
|
|
37
36
|
},
|
|
38
37
|
"scripts": {
|
|
39
|
-
"build": "
|
|
38
|
+
"build": "tsc -b tsconfig.json tsconfig.esm.json tsconfig.internal.json tsconfig.internal.esm.json",
|
|
40
39
|
"test": ":"
|
|
41
40
|
},
|
|
42
41
|
"wix": {
|
|
@@ -49,5 +48,5 @@
|
|
|
49
48
|
"fqdn": "wix.crm.tasks.v2.task"
|
|
50
49
|
}
|
|
51
50
|
},
|
|
52
|
-
"falconPackageHash": "
|
|
51
|
+
"falconPackageHash": "d9b794f128ed7b49dc0a6167de90c33ecd6e65a47582b60be1c32a72"
|
|
53
52
|
}
|
package/build/index.d.mts
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { T as Task, U as UpdateTask, a as TasksQueryBuilder, C as CountTasksOptions, b as CountTasksResponse, M as MoveTaskAfterOptions } from './crm-tasks-v2-task-tasks.universal-DHOV27KP.mjs';
|
|
3
|
-
export { Y as ActionEvent, a4 as BaseEventMetadata, f as ContactInfo, l as ContactNotFoundError, x as CountTasksRequest, j as CreateTaskRequest, k as CreateTaskResponse, t as CursorPaging, v as CursorPagingMetadata, q as CursorQuery, r as CursorQueryPagingMethodOneOf, w as Cursors, a0 as DeleteCompletedTasksRequest, a1 as DeleteCompletedTasksResponse, D as DeleteTaskRequest, p as DeleteTaskResponse, K as DomainEvent, L as DomainEventBodyOneOf, J as Empty, N as EntityCreatedEvent, X as EntityDeletedEvent, V as EntityUpdatedEvent, a5 as EventMetadata, G as GetTaskRequest, m as GetTaskResponse, _ as IdentificationData, $ as IdentificationDataIdOneOf, Z as MessageEnvelope, F as MoveTaskAfterRequest, H as MoveTaskAfterResponse, P as Paging, E as PagingMetadataV2, y as QueryTasksInternalRequest, B as QueryTasksInternalResponse, Q as QueryTasksRequest, u as QueryTasksResponse, z as QueryV2, A as QueryV2PagingMethodOneOf, R as ReminderType, g as RepositionTask, O as RestoreInfo, a2 as SendTasksReminderRequest, a3 as SendTasksReminderResponse, d as SortOrder, s as Sorting, S as SourceType, i as TaskAssigned, a6 as TaskCreatedEnvelope, a7 as TaskDeletedEnvelope, I as TaskNotFoundError, h as TaskOverdue, a8 as TaskOverdueEnvelope, e as TaskSource, c as TaskStatus, a9 as TaskUpdatedEnvelope, aa as TasksQueryResult, n as UpdateTaskRequest, o as UpdateTaskResponse, W as WebhookIdentityType } from './crm-tasks-v2-task-tasks.universal-DHOV27KP.mjs';
|
|
4
|
-
import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
|
|
5
|
-
|
|
6
|
-
declare function createTask$1(httpClient: HttpClient): CreateTaskSignature;
|
|
7
|
-
interface CreateTaskSignature {
|
|
8
|
-
/**
|
|
9
|
-
* Creates a new task.
|
|
10
|
-
* @param - Task to create.
|
|
11
|
-
* @returns The created task.
|
|
12
|
-
*/
|
|
13
|
-
(task: Task): Promise<Task>;
|
|
14
|
-
}
|
|
15
|
-
declare function getTask$1(httpClient: HttpClient): GetTaskSignature;
|
|
16
|
-
interface GetTaskSignature {
|
|
17
|
-
/**
|
|
18
|
-
* Retrieves a task by ID.
|
|
19
|
-
* @param - ID of the task to retrieve.
|
|
20
|
-
* @returns The retrieved task.
|
|
21
|
-
*/
|
|
22
|
-
(taskId: string): Promise<Task>;
|
|
23
|
-
}
|
|
24
|
-
declare function updateTask$1(httpClient: HttpClient): UpdateTaskSignature;
|
|
25
|
-
interface UpdateTaskSignature {
|
|
26
|
-
/**
|
|
27
|
-
* Updates a task.
|
|
28
|
-
*
|
|
29
|
-
* Each time the task is updated, `revision` increments by 1.
|
|
30
|
-
* The existing `revision` must be included when updating the task.
|
|
31
|
-
* This ensures you're working with the latest task
|
|
32
|
-
* and prevents unintended overwrites.
|
|
33
|
-
* @param - Task ID.
|
|
34
|
-
* @param - Task to update.
|
|
35
|
-
* @returns The updated task.
|
|
36
|
-
*/
|
|
37
|
-
(_id: string, task: UpdateTask): Promise<Task>;
|
|
38
|
-
}
|
|
39
|
-
declare function deleteTask$1(httpClient: HttpClient): DeleteTaskSignature;
|
|
40
|
-
interface DeleteTaskSignature {
|
|
41
|
-
/**
|
|
42
|
-
* Deletes a task by ID.
|
|
43
|
-
* @param - ID of the task to delete.
|
|
44
|
-
*/
|
|
45
|
-
(taskId: string): Promise<void>;
|
|
46
|
-
}
|
|
47
|
-
declare function queryTasks$1(httpClient: HttpClient): QueryTasksSignature;
|
|
48
|
-
interface QueryTasksSignature {
|
|
49
|
-
/**
|
|
50
|
-
* Creates a query to retrieve a list of tasks.
|
|
51
|
-
*
|
|
52
|
-
* The `queryTasks()` method builds a query to retrieve a list of tasks and returns a `TasksQueryBuilder` object.
|
|
53
|
-
*
|
|
54
|
-
* The returned object contains the query definition which is typically used to run the query using the `find()` method. You can refine the query by chaining `TasksQueryBuilder` methods onto the query. `TasksQueryBuilder` methods enable you to sort, filter, and control the results that `queryTasks()` returns.
|
|
55
|
-
*
|
|
56
|
-
* `queryTasks()` runs with these `TasksQueryBuilder` defaults, which you can override:
|
|
57
|
-
* - `limit(50)`
|
|
58
|
-
* - `descending('_createdDate')`
|
|
59
|
-
*
|
|
60
|
-
* The methods 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.
|
|
61
|
-
*
|
|
62
|
-
* The following `TasksQueryBuilder` methods are supported for `queryTasks()`. For a full description of the `task` object, see the object returned for the `items` property in `TasksQueryResult`.
|
|
63
|
-
*/
|
|
64
|
-
(): TasksQueryBuilder;
|
|
65
|
-
}
|
|
66
|
-
declare function countTasks$1(httpClient: HttpClient): CountTasksSignature;
|
|
67
|
-
interface CountTasksSignature {
|
|
68
|
-
/**
|
|
69
|
-
* Counts the number of tasks.
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* This method returns the count of all tasks regardless of their `status`.
|
|
73
|
-
*
|
|
74
|
-
* Optionally, you can specify a filter to count only tasks that meet certain criteria.
|
|
75
|
-
* @param - Filtering options.
|
|
76
|
-
*/
|
|
77
|
-
(options?: CountTasksOptions | undefined): Promise<CountTasksResponse>;
|
|
78
|
-
}
|
|
79
|
-
declare function moveTaskAfter$1(httpClient: HttpClient): MoveTaskAfterSignature;
|
|
80
|
-
interface MoveTaskAfterSignature {
|
|
81
|
-
/**
|
|
82
|
-
* Moves a task specified by ID to be placed after another task in the task display.
|
|
83
|
-
*
|
|
84
|
-
* You can reposition a task to be first in the display by omitting `beforeTaskId`.
|
|
85
|
-
* @param - ID of the task to move.
|
|
86
|
-
* @param - Options for moving the task.
|
|
87
|
-
*/
|
|
88
|
-
(taskId: string, options?: MoveTaskAfterOptions | undefined): Promise<void>;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
declare const createTask: MaybeContext<BuildRESTFunction<typeof createTask$1> & typeof createTask$1>;
|
|
92
|
-
declare const getTask: MaybeContext<BuildRESTFunction<typeof getTask$1> & typeof getTask$1>;
|
|
93
|
-
declare const updateTask: MaybeContext<BuildRESTFunction<typeof updateTask$1> & typeof updateTask$1>;
|
|
94
|
-
declare const deleteTask: MaybeContext<BuildRESTFunction<typeof deleteTask$1> & typeof deleteTask$1>;
|
|
95
|
-
declare const queryTasks: MaybeContext<BuildRESTFunction<typeof queryTasks$1> & typeof queryTasks$1>;
|
|
96
|
-
declare const countTasks: MaybeContext<BuildRESTFunction<typeof countTasks$1> & typeof countTasks$1>;
|
|
97
|
-
declare const moveTaskAfter: MaybeContext<BuildRESTFunction<typeof moveTaskAfter$1> & typeof moveTaskAfter$1>;
|
|
98
|
-
/**
|
|
99
|
-
* Triggered when a task is created.
|
|
100
|
-
*/
|
|
101
|
-
declare const onTaskCreated: ReturnType<typeof createEventModule<typeof publicOnTaskCreated>>;
|
|
102
|
-
/**
|
|
103
|
-
* Triggered when a task is deleted.
|
|
104
|
-
*/
|
|
105
|
-
declare const onTaskDeleted: ReturnType<typeof createEventModule<typeof publicOnTaskDeleted>>;
|
|
106
|
-
/**
|
|
107
|
-
* Triggered when a task reaches its due date.
|
|
108
|
-
*/
|
|
109
|
-
declare const onTaskOverdue: ReturnType<typeof createEventModule<typeof publicOnTaskOverdue>>;
|
|
110
|
-
/**
|
|
111
|
-
* Triggered when a task is updated.
|
|
112
|
-
*/
|
|
113
|
-
declare const onTaskUpdated: ReturnType<typeof createEventModule<typeof publicOnTaskUpdated>>;
|
|
114
|
-
|
|
115
|
-
export { CountTasksOptions, CountTasksResponse, MoveTaskAfterOptions, Task, TasksQueryBuilder, UpdateTask, countTasks, createTask, deleteTask, getTask, moveTaskAfter, onTaskCreated, onTaskDeleted, onTaskOverdue, onTaskUpdated, queryTasks, updateTask };
|
package/build/index.d.ts
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { T as Task, U as UpdateTask, a as TasksQueryBuilder, C as CountTasksOptions, b as CountTasksResponse, M as MoveTaskAfterOptions } from './crm-tasks-v2-task-tasks.universal-DHOV27KP.js';
|
|
3
|
-
export { Y as ActionEvent, a4 as BaseEventMetadata, f as ContactInfo, l as ContactNotFoundError, x as CountTasksRequest, j as CreateTaskRequest, k as CreateTaskResponse, t as CursorPaging, v as CursorPagingMetadata, q as CursorQuery, r as CursorQueryPagingMethodOneOf, w as Cursors, a0 as DeleteCompletedTasksRequest, a1 as DeleteCompletedTasksResponse, D as DeleteTaskRequest, p as DeleteTaskResponse, K as DomainEvent, L as DomainEventBodyOneOf, J as Empty, N as EntityCreatedEvent, X as EntityDeletedEvent, V as EntityUpdatedEvent, a5 as EventMetadata, G as GetTaskRequest, m as GetTaskResponse, _ as IdentificationData, $ as IdentificationDataIdOneOf, Z as MessageEnvelope, F as MoveTaskAfterRequest, H as MoveTaskAfterResponse, P as Paging, E as PagingMetadataV2, y as QueryTasksInternalRequest, B as QueryTasksInternalResponse, Q as QueryTasksRequest, u as QueryTasksResponse, z as QueryV2, A as QueryV2PagingMethodOneOf, R as ReminderType, g as RepositionTask, O as RestoreInfo, a2 as SendTasksReminderRequest, a3 as SendTasksReminderResponse, d as SortOrder, s as Sorting, S as SourceType, i as TaskAssigned, a6 as TaskCreatedEnvelope, a7 as TaskDeletedEnvelope, I as TaskNotFoundError, h as TaskOverdue, a8 as TaskOverdueEnvelope, e as TaskSource, c as TaskStatus, a9 as TaskUpdatedEnvelope, aa as TasksQueryResult, n as UpdateTaskRequest, o as UpdateTaskResponse, W as WebhookIdentityType } from './crm-tasks-v2-task-tasks.universal-DHOV27KP.js';
|
|
4
|
-
import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
|
|
5
|
-
|
|
6
|
-
declare function createTask$1(httpClient: HttpClient): CreateTaskSignature;
|
|
7
|
-
interface CreateTaskSignature {
|
|
8
|
-
/**
|
|
9
|
-
* Creates a new task.
|
|
10
|
-
* @param - Task to create.
|
|
11
|
-
* @returns The created task.
|
|
12
|
-
*/
|
|
13
|
-
(task: Task): Promise<Task>;
|
|
14
|
-
}
|
|
15
|
-
declare function getTask$1(httpClient: HttpClient): GetTaskSignature;
|
|
16
|
-
interface GetTaskSignature {
|
|
17
|
-
/**
|
|
18
|
-
* Retrieves a task by ID.
|
|
19
|
-
* @param - ID of the task to retrieve.
|
|
20
|
-
* @returns The retrieved task.
|
|
21
|
-
*/
|
|
22
|
-
(taskId: string): Promise<Task>;
|
|
23
|
-
}
|
|
24
|
-
declare function updateTask$1(httpClient: HttpClient): UpdateTaskSignature;
|
|
25
|
-
interface UpdateTaskSignature {
|
|
26
|
-
/**
|
|
27
|
-
* Updates a task.
|
|
28
|
-
*
|
|
29
|
-
* Each time the task is updated, `revision` increments by 1.
|
|
30
|
-
* The existing `revision` must be included when updating the task.
|
|
31
|
-
* This ensures you're working with the latest task
|
|
32
|
-
* and prevents unintended overwrites.
|
|
33
|
-
* @param - Task ID.
|
|
34
|
-
* @param - Task to update.
|
|
35
|
-
* @returns The updated task.
|
|
36
|
-
*/
|
|
37
|
-
(_id: string, task: UpdateTask): Promise<Task>;
|
|
38
|
-
}
|
|
39
|
-
declare function deleteTask$1(httpClient: HttpClient): DeleteTaskSignature;
|
|
40
|
-
interface DeleteTaskSignature {
|
|
41
|
-
/**
|
|
42
|
-
* Deletes a task by ID.
|
|
43
|
-
* @param - ID of the task to delete.
|
|
44
|
-
*/
|
|
45
|
-
(taskId: string): Promise<void>;
|
|
46
|
-
}
|
|
47
|
-
declare function queryTasks$1(httpClient: HttpClient): QueryTasksSignature;
|
|
48
|
-
interface QueryTasksSignature {
|
|
49
|
-
/**
|
|
50
|
-
* Creates a query to retrieve a list of tasks.
|
|
51
|
-
*
|
|
52
|
-
* The `queryTasks()` method builds a query to retrieve a list of tasks and returns a `TasksQueryBuilder` object.
|
|
53
|
-
*
|
|
54
|
-
* The returned object contains the query definition which is typically used to run the query using the `find()` method. You can refine the query by chaining `TasksQueryBuilder` methods onto the query. `TasksQueryBuilder` methods enable you to sort, filter, and control the results that `queryTasks()` returns.
|
|
55
|
-
*
|
|
56
|
-
* `queryTasks()` runs with these `TasksQueryBuilder` defaults, which you can override:
|
|
57
|
-
* - `limit(50)`
|
|
58
|
-
* - `descending('_createdDate')`
|
|
59
|
-
*
|
|
60
|
-
* The methods 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.
|
|
61
|
-
*
|
|
62
|
-
* The following `TasksQueryBuilder` methods are supported for `queryTasks()`. For a full description of the `task` object, see the object returned for the `items` property in `TasksQueryResult`.
|
|
63
|
-
*/
|
|
64
|
-
(): TasksQueryBuilder;
|
|
65
|
-
}
|
|
66
|
-
declare function countTasks$1(httpClient: HttpClient): CountTasksSignature;
|
|
67
|
-
interface CountTasksSignature {
|
|
68
|
-
/**
|
|
69
|
-
* Counts the number of tasks.
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* This method returns the count of all tasks regardless of their `status`.
|
|
73
|
-
*
|
|
74
|
-
* Optionally, you can specify a filter to count only tasks that meet certain criteria.
|
|
75
|
-
* @param - Filtering options.
|
|
76
|
-
*/
|
|
77
|
-
(options?: CountTasksOptions | undefined): Promise<CountTasksResponse>;
|
|
78
|
-
}
|
|
79
|
-
declare function moveTaskAfter$1(httpClient: HttpClient): MoveTaskAfterSignature;
|
|
80
|
-
interface MoveTaskAfterSignature {
|
|
81
|
-
/**
|
|
82
|
-
* Moves a task specified by ID to be placed after another task in the task display.
|
|
83
|
-
*
|
|
84
|
-
* You can reposition a task to be first in the display by omitting `beforeTaskId`.
|
|
85
|
-
* @param - ID of the task to move.
|
|
86
|
-
* @param - Options for moving the task.
|
|
87
|
-
*/
|
|
88
|
-
(taskId: string, options?: MoveTaskAfterOptions | undefined): Promise<void>;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
declare const createTask: MaybeContext<BuildRESTFunction<typeof createTask$1> & typeof createTask$1>;
|
|
92
|
-
declare const getTask: MaybeContext<BuildRESTFunction<typeof getTask$1> & typeof getTask$1>;
|
|
93
|
-
declare const updateTask: MaybeContext<BuildRESTFunction<typeof updateTask$1> & typeof updateTask$1>;
|
|
94
|
-
declare const deleteTask: MaybeContext<BuildRESTFunction<typeof deleteTask$1> & typeof deleteTask$1>;
|
|
95
|
-
declare const queryTasks: MaybeContext<BuildRESTFunction<typeof queryTasks$1> & typeof queryTasks$1>;
|
|
96
|
-
declare const countTasks: MaybeContext<BuildRESTFunction<typeof countTasks$1> & typeof countTasks$1>;
|
|
97
|
-
declare const moveTaskAfter: MaybeContext<BuildRESTFunction<typeof moveTaskAfter$1> & typeof moveTaskAfter$1>;
|
|
98
|
-
/**
|
|
99
|
-
* Triggered when a task is created.
|
|
100
|
-
*/
|
|
101
|
-
declare const onTaskCreated: ReturnType<typeof createEventModule<typeof publicOnTaskCreated>>;
|
|
102
|
-
/**
|
|
103
|
-
* Triggered when a task is deleted.
|
|
104
|
-
*/
|
|
105
|
-
declare const onTaskDeleted: ReturnType<typeof createEventModule<typeof publicOnTaskDeleted>>;
|
|
106
|
-
/**
|
|
107
|
-
* Triggered when a task reaches its due date.
|
|
108
|
-
*/
|
|
109
|
-
declare const onTaskOverdue: ReturnType<typeof createEventModule<typeof publicOnTaskOverdue>>;
|
|
110
|
-
/**
|
|
111
|
-
* Triggered when a task is updated.
|
|
112
|
-
*/
|
|
113
|
-
declare const onTaskUpdated: ReturnType<typeof createEventModule<typeof publicOnTaskUpdated>>;
|
|
114
|
-
|
|
115
|
-
export { CountTasksOptions, CountTasksResponse, MoveTaskAfterOptions, Task, TasksQueryBuilder, UpdateTask, countTasks, createTask, deleteTask, getTask, moveTaskAfter, onTaskCreated, onTaskDeleted, onTaskOverdue, onTaskUpdated, queryTasks, updateTask };
|