Skip to content

Commit b2e5e6f

Browse files
committed
updates
1 parent 43c4d08 commit b2e5e6f

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

components/wrike/actions/new-task/new-task.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import _ from "lodash";
44
export default {
55
key: "wrike-new-task",
66
name: "New Task",
7-
description: "Create a Wrike task under a specified folder ID. [See the docs](https://developers.wrike.com/api/v4/tasks/#create-task)",
7+
description: "Create a Wrike task under a specified folder ID. [See the documentation](https://developers.wrike.com/api/v4/tasks/#create-task)",
88
version: "0.3.1",
99
type: "action",
1010
props: {

components/wrike/actions/update-task-custom-fields/update-task-custom-fields.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ConfigurationError } from "@pipedream/platform";
44
export default {
55
key: "wrike-update-task-custom-fields",
66
name: "Update Task Custom Fields",
7-
description: "Update the custom fields for a task. [See the docs](https://developers.wrike.com/api/v4/tasks/#modify-tasks)",
7+
description: "Update the custom fields for a task. [See the documentation](https://developers.wrike.com/api/v4/tasks/#modify-tasks)",
88
version: "0.0.2",
99
type: "action",
1010
props: {

components/wrike/sources/new-folder-created/new-folder-created.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export default {
1717
],
1818
description: "Receive notifications for folders in a folder and, optionally, in its subfolders. Leave blank to receive notifications for all folders in the account",
1919
optional: true,
20-
reloadProps: true,
2120
},
2221
spaceId: {
2322
propDefinition: [
@@ -26,7 +25,6 @@ export default {
2625
],
2726
description: "Receive notifications for changes to folders within a space. Leave blank to receive notifications for all folders in the account",
2827
optional: true,
29-
reloadProps: true,
3028
},
3129
recursive: {
3230
type: "boolean",

components/wrike/sources/new-subtask-created/new-subtask-created.mjs

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,29 @@ export default {
1010
version: "0.0.2",
1111
props: {
1212
...base.props,
13-
taskId: {
13+
taskIds: {
1414
propDefinition: [
1515
base.props.wrike,
1616
"taskId",
17-
(c) => ({
18-
folderId: c.folderId,
19-
spaceId: c.spaceId,
20-
}),
2117
],
22-
description: "Receive notifications for subtasks of a task",
18+
type: "string[]",
19+
label: "Task IDs",
20+
description: "Receive notifications for subtasks of the specified task(s)",
21+
optional: true,
2322
},
2423
},
2524
hooks: {
2625
...base.hooks,
2726
async deploy() {
2827
console.log("Retrieving historical events...");
29-
const subtasks = await this.wrike.getSubtasks({
30-
taskId: this.taskId,
31-
});
28+
const taskIds = this.taskIds || (await this.wrike.listTasks({}))?.map(({ id }) => id) || [];
29+
const subtasks = [];
30+
for (const taskId of taskIds) {
31+
const taskSubtasks = await this.wrike.getSubtasks({
32+
taskId,
33+
});
34+
subtasks.push(...taskSubtasks);
35+
}
3236
for (const subtask of subtasks.slice(-constants.DEPLOY_LIMIT)) {
3337
this.emitEvent(subtask);
3438
}
@@ -55,7 +59,7 @@ export default {
5559
const task = await this.wrike.getTask({
5660
taskId: data.taskId,
5761
});
58-
if (task.superTaskIds.includes(this.taskId)) {
62+
if (!this.taskIds || task.superTaskIds.some((id) => this.taskIds.includes(id))) {
5963
this.emitEvent(task);
6064
}
6165
}

components/wrike/sources/new-task-created/new-task-created.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export default {
1717
],
1818
description: "Receive notifications for tasks in a folder and, optionally, in its subfolders. Leave blank to receive notifications for all tasks in the account",
1919
optional: true,
20-
reloadProps: true,
2120
},
2221
spaceId: {
2322
propDefinition: [
@@ -26,7 +25,6 @@ export default {
2625
],
2726
description: "Receive notifications for changes to tasks, folders, and projects within a space. Leave blank to receive notifications for all tasks in the account",
2827
optional: true,
29-
reloadProps: true,
3028
},
3129
recursive: {
3230
type: "boolean",

0 commit comments

Comments
 (0)