Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/wrike/actions/new-task/new-task.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import _ from "lodash";
export default {
key: "wrike-new-task",
name: "New Task",
description: "Create a Wrike task under a specified folder ID. [See the docs](https://developers.wrike.com/api/v4/tasks/#create-task)",
version: "0.3.0",
description: "Create a Wrike task under a specified folder ID. [See the documentation](https://developers.wrike.com/api/v4/tasks/#create-task)",
version: "0.3.1",
type: "action",
props: {
wrike,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { ConfigurationError } from "@pipedream/platform";
export default {
key: "wrike-update-task-custom-fields",
name: "Update Task Custom Fields",
description: "Update the custom fields for a task. [See the docs](https://developers.wrike.com/api/v4/tasks/#modify-tasks)",
version: "0.0.1",
description: "Update the custom fields for a task. [See the documentation](https://developers.wrike.com/api/v4/tasks/#modify-tasks)",
version: "0.0.2",
type: "action",
props: {
wrike,
Expand Down
4 changes: 2 additions & 2 deletions components/wrike/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/wrike",
"version": "0.0.2",
"version": "0.0.3",
"description": "Pipedream Wrike Components",
"main": "wrike.app.mjs",
"keywords": [
Expand All @@ -14,7 +14,7 @@
"access": "public"
},
"dependencies": {
"@pipedream/platform": "^1.3.0",
"@pipedream/platform": "^3.0.3",
"lodash": "^4.17.21"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
name: "New Folder Created",
description: "Emit new event when a folder is created",
type: "source",
version: "0.0.1",
version: "0.0.2",
props: {
...base.props,
folderId: {
Expand All @@ -17,7 +17,6 @@ export default {
],
description: "Receive notifications for folders in a folder and, optionally, in its subfolders. Leave blank to receive notifications for all folders in the account",
optional: true,
reloadProps: true,
},
spaceId: {
propDefinition: [
Expand All @@ -26,7 +25,6 @@ export default {
],
description: "Receive notifications for changes to folders within a space. Leave blank to receive notifications for all folders in the account",
optional: true,
reloadProps: true,
},
recursive: {
type: "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,32 @@ export default {
name: "New Subtask Created",
description: "Emit new event when a subtask is created",
type: "source",
version: "0.0.1",
version: "0.0.2",
props: {
...base.props,
taskId: {
taskIds: {
propDefinition: [
base.props.wrike,
"taskId",
(c) => ({
folderId: c.folderId,
spaceId: c.spaceId,
}),
],
description: "Receive notifications for subtasks of a task",
type: "string[]",
label: "Task IDs",
description: "Receive notifications for subtasks of the specified task(s)",
optional: true,
},
},
hooks: {
...base.hooks,
async deploy() {
console.log("Retrieving historical events...");
const subtasks = await this.wrike.getSubtasks({
taskId: this.taskId,
});
const taskIds = this.taskIds || (await this.wrike.listTasks({}))?.map(({ id }) => id) || [];
const subtasks = [];
for (const taskId of taskIds) {
const taskSubtasks = await this.wrike.getSubtasks({
taskId,
});
subtasks.push(...taskSubtasks);
}
for (const subtask of subtasks.slice(-constants.DEPLOY_LIMIT)) {
this.emitEvent(subtask);
}
Expand All @@ -55,7 +59,7 @@ export default {
const task = await this.wrike.getTask({
taskId: data.taskId,
});
if (task.superTaskIds.includes(this.taskId)) {
if (!this.taskIds || task.superTaskIds.some((id) => this.taskIds.includes(id))) {
this.emitEvent(task);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
name: "New Task Created",
description: "Emit new event when a task is created",
type: "source",
version: "0.0.1",
version: "0.0.2",
props: {
...base.props,
folderId: {
Expand All @@ -17,7 +17,6 @@ export default {
],
description: "Receive notifications for tasks in a folder and, optionally, in its subfolders. Leave blank to receive notifications for all tasks in the account",
optional: true,
reloadProps: true,
},
spaceId: {
propDefinition: [
Expand All @@ -26,7 +25,6 @@ export default {
],
description: "Receive notifications for changes to tasks, folders, and projects within a space. Leave blank to receive notifications for all tasks in the account",
optional: true,
reloadProps: true,
},
recursive: {
type: "boolean",
Expand Down
2 changes: 1 addition & 1 deletion components/wrike/wrike.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default {
},
methods: {
_baseUrl() {
return "https://www.wrike.com/api/v4";
return `https://${this.$auth.host}/api/v4`;
},
_buildPath({
basePath, folderId, spaceId,
Expand Down
106 changes: 53 additions & 53 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading