@pipedream/asana 0.6.0 → 0.6.2
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/actions/add-task-to-section/add-task-to-section.mjs +6 -4
- package/actions/common/common.mjs +3 -2
- package/actions/create-project/create-project.mjs +6 -4
- package/actions/create-subtask/create-subtask.mjs +6 -4
- package/actions/create-task/create-task.mjs +6 -4
- package/actions/create-task-comment/create-task-comment.mjs +6 -4
- package/actions/delete-task/delete-task.mjs +6 -4
- package/actions/find-task-by-id/find-task-by-id.mjs +6 -3
- package/actions/get-tasks-from-task-list/get-tasks-from-task-list.mjs +9 -7
- package/actions/search-projects/search-projects.mjs +9 -5
- package/actions/search-sections/search-sections.mjs +6 -3
- package/actions/search-tasks/search-tasks.mjs +6 -5
- package/actions/search-user-projects/search-user-projects.mjs +13 -5
- package/actions/update-task/update-task.mjs +7 -5
- package/asana.app.mjs +292 -145
- package/package.json +3 -2
- package/sources/common/common.mjs +5 -4
- package/sources/new-completed-task/new-completed-task.mjs +4 -2
- package/sources/new-project/new-project.mjs +4 -2
- package/sources/new-story/new-story.mjs +4 -2
- package/sources/new-subtask/new-subtask.mjs +4 -2
- package/sources/new-tag/new-tag.mjs +6 -4
- package/sources/new-task/new-task.mjs +8 -3
- package/sources/new-team/new-team.mjs +5 -3
- package/sources/new-user/new-user.mjs +7 -3
- package/sources/new-workspace/new-workspace.mjs +6 -5
- package/sources/tag-added-to-task/tag-added-to-task.mjs +7 -3
- package/sources/tags-added-to-any-task/tags-added-to-any-task.mjs +8 -7
- package/sources/task-assigned-in-project/task-assigned-in-project.mjs +5 -3
- package/sources/task-field-updated-in-project/task-field-updated-in-project.mjs +5 -3
- package/sources/task-updated-in-project/task-updated-in-project.mjs +4 -2
|
@@ -3,9 +3,9 @@ import common from "../common/common.mjs";
|
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
name: "Add Task To Section",
|
|
6
|
-
description: "Add a task to a specific, existing section. This will remove the task from other sections of the project. [See the
|
|
6
|
+
description: "Add a task to a specific, existing section. This will remove the task from other sections of the project. [See the documentation](https://developers.asana.com/docs/add-task-to-section)",
|
|
7
7
|
key: "asana-add-task-to-section",
|
|
8
|
-
version: "0.2.
|
|
8
|
+
version: "0.2.5",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
...common.props,
|
|
@@ -61,7 +61,8 @@ export default {
|
|
|
61
61
|
},
|
|
62
62
|
},
|
|
63
63
|
async run({ $ }) {
|
|
64
|
-
const response = await this.asana._makeRequest(
|
|
64
|
+
const response = await this.asana._makeRequest({
|
|
65
|
+
path: `sections/${this.section_gid}/addTask`,
|
|
65
66
|
method: "post",
|
|
66
67
|
data: {
|
|
67
68
|
data: {
|
|
@@ -70,7 +71,8 @@ export default {
|
|
|
70
71
|
insert_after: this.insert_after,
|
|
71
72
|
},
|
|
72
73
|
},
|
|
73
|
-
|
|
74
|
+
$,
|
|
75
|
+
});
|
|
74
76
|
|
|
75
77
|
$.export("$summary", "Successfully added task to section");
|
|
76
78
|
|
|
@@ -11,7 +11,6 @@ export default {
|
|
|
11
11
|
asana,
|
|
12
12
|
"workspaces",
|
|
13
13
|
],
|
|
14
|
-
optional: true,
|
|
15
14
|
},
|
|
16
15
|
project: {
|
|
17
16
|
label: "Project",
|
|
@@ -19,8 +18,10 @@ export default {
|
|
|
19
18
|
propDefinition: [
|
|
20
19
|
asana,
|
|
21
20
|
"projects",
|
|
21
|
+
(c) => ({
|
|
22
|
+
workspace: c.workspace,
|
|
23
|
+
}),
|
|
22
24
|
],
|
|
23
|
-
optional: true,
|
|
24
25
|
},
|
|
25
26
|
},
|
|
26
27
|
};
|
|
@@ -4,8 +4,8 @@ import constants from "../common/constants.mjs";
|
|
|
4
4
|
export default {
|
|
5
5
|
key: "asana-create-project",
|
|
6
6
|
name: "Create Project",
|
|
7
|
-
description: "Create a new project in a workspace or team. [See the
|
|
8
|
-
version: "0.9.
|
|
7
|
+
description: "Create a new project in a workspace or team. [See the documentation](https://developers.asana.com/docs/create-a-project)",
|
|
8
|
+
version: "0.9.5",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
asana,
|
|
@@ -113,7 +113,8 @@ export default {
|
|
|
113
113
|
},
|
|
114
114
|
},
|
|
115
115
|
async run({ $ }) {
|
|
116
|
-
const response = await this.asana._makeRequest(
|
|
116
|
+
const response = await this.asana._makeRequest({
|
|
117
|
+
path: "projects",
|
|
117
118
|
method: "post",
|
|
118
119
|
data: {
|
|
119
120
|
data: {
|
|
@@ -133,7 +134,8 @@ export default {
|
|
|
133
134
|
owner: this.owner,
|
|
134
135
|
},
|
|
135
136
|
},
|
|
136
|
-
|
|
137
|
+
$,
|
|
138
|
+
});
|
|
137
139
|
|
|
138
140
|
$.export("$summary", "Successfully created project");
|
|
139
141
|
|
|
@@ -4,8 +4,8 @@ import common from "../common/common.mjs";
|
|
|
4
4
|
export default {
|
|
5
5
|
key: "asana-create-subtask",
|
|
6
6
|
name: "Create Subtask",
|
|
7
|
-
description: "Creates a new subtask and adds it to the parent task. [See the
|
|
8
|
-
version: "0.3.
|
|
7
|
+
description: "Creates a new subtask and adds it to the parent task. [See the documentation](https://developers.asana.com/docs/create-a-subtask)",
|
|
8
|
+
version: "0.3.5",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
...common.props,
|
|
@@ -104,7 +104,8 @@ export default {
|
|
|
104
104
|
},
|
|
105
105
|
},
|
|
106
106
|
async run({ $ }) {
|
|
107
|
-
const response = await this.asana._makeRequest(
|
|
107
|
+
const response = await this.asana._makeRequest({
|
|
108
|
+
path: `tasks/${this.task_gid}/subtasks`,
|
|
108
109
|
method: "post",
|
|
109
110
|
data: {
|
|
110
111
|
data: {
|
|
@@ -123,7 +124,8 @@ export default {
|
|
|
123
124
|
workspace: this.workspace,
|
|
124
125
|
},
|
|
125
126
|
},
|
|
126
|
-
|
|
127
|
+
$,
|
|
128
|
+
});
|
|
127
129
|
|
|
128
130
|
$.export("$summary", "Successfully created subtask");
|
|
129
131
|
|
|
@@ -4,8 +4,8 @@ import common from "../common/common.mjs";
|
|
|
4
4
|
export default {
|
|
5
5
|
key: "asana-create-task",
|
|
6
6
|
name: "Create Task",
|
|
7
|
-
description: "Creates a new task. [See the
|
|
8
|
-
version: "0.3.
|
|
7
|
+
description: "Creates a new task. [See the documentation](https://developers.asana.com/docs/create-a-task)",
|
|
8
|
+
version: "0.3.5",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
...common.props,
|
|
@@ -117,7 +117,8 @@ export default {
|
|
|
117
117
|
let customFields;
|
|
118
118
|
if (this.custom_fields) customFields = JSON.parse(this.custom_fields);
|
|
119
119
|
|
|
120
|
-
const response = await this.asana._makeRequest(
|
|
120
|
+
const response = await this.asana._makeRequest({
|
|
121
|
+
path: "tasks",
|
|
121
122
|
method: "post",
|
|
122
123
|
data: {
|
|
123
124
|
data: {
|
|
@@ -138,7 +139,8 @@ export default {
|
|
|
138
139
|
custom_fields: customFields,
|
|
139
140
|
},
|
|
140
141
|
},
|
|
141
|
-
|
|
142
|
+
$,
|
|
143
|
+
});
|
|
142
144
|
|
|
143
145
|
$.export("$summary", "Successfully created task");
|
|
144
146
|
|
|
@@ -4,8 +4,8 @@ import common from "../common/common.mjs";
|
|
|
4
4
|
export default {
|
|
5
5
|
key: "asana-create-task-comment",
|
|
6
6
|
name: "Create Task Comment",
|
|
7
|
-
description: "Adds a comment to a task. [See the
|
|
8
|
-
version: "0.2.
|
|
7
|
+
description: "Adds a comment to a task. [See the documentation](https://developers.asana.com/docs/create-a-story-on-a-task)",
|
|
8
|
+
version: "0.2.5",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
...common.props,
|
|
@@ -47,7 +47,8 @@ export default {
|
|
|
47
47
|
},
|
|
48
48
|
},
|
|
49
49
|
async run({ $ }) {
|
|
50
|
-
const response = await this.asana._makeRequest(
|
|
50
|
+
const response = await this.asana._makeRequest({
|
|
51
|
+
path: `tasks/${this.task_gid}/stories`,
|
|
51
52
|
method: "post",
|
|
52
53
|
data: {
|
|
53
54
|
data: {
|
|
@@ -57,7 +58,8 @@ export default {
|
|
|
57
58
|
sticker_name: this.sticker_name,
|
|
58
59
|
},
|
|
59
60
|
},
|
|
60
|
-
|
|
61
|
+
$,
|
|
62
|
+
});
|
|
61
63
|
|
|
62
64
|
$.export("$summary", "Successfully created task comment");
|
|
63
65
|
|
|
@@ -4,8 +4,8 @@ import common from "../common/common.mjs";
|
|
|
4
4
|
export default {
|
|
5
5
|
key: "asana-delete-task",
|
|
6
6
|
name: "Delete Task",
|
|
7
|
-
description: "Deletes a specific and existing task. [See the
|
|
8
|
-
version: "0.0.
|
|
7
|
+
description: "Deletes a specific and existing task. [See the documentation](https://developers.asana.com/docs/delete-a-task)",
|
|
8
|
+
version: "0.0.6",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
...common.props,
|
|
@@ -23,9 +23,11 @@ export default {
|
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
async run({ $ }) {
|
|
26
|
-
const response = await this.asana._makeRequest(
|
|
26
|
+
const response = await this.asana._makeRequest({
|
|
27
|
+
path: `tasks/${this.task_gid}`,
|
|
27
28
|
method: "delete",
|
|
28
|
-
|
|
29
|
+
$,
|
|
30
|
+
});
|
|
29
31
|
|
|
30
32
|
$.export("$summary", "Successfully deleted task");
|
|
31
33
|
|
|
@@ -4,8 +4,8 @@ import common from "../common/common.mjs";
|
|
|
4
4
|
export default {
|
|
5
5
|
key: "asana-find-task-by-id",
|
|
6
6
|
name: "Find Task by ID",
|
|
7
|
-
description: "Searches for a task by id. Returns the complete task record for a single task. [See the
|
|
8
|
-
version: "0.2.
|
|
7
|
+
description: "Searches for a task by id. Returns the complete task record for a single task. [See the documentation](https://developers.asana.com/docs/get-a-task)",
|
|
8
|
+
version: "0.2.5",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
...common.props,
|
|
@@ -23,7 +23,10 @@ export default {
|
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
async run({ $ }) {
|
|
26
|
-
const response = await this.asana.getTask(
|
|
26
|
+
const { data: response } = await this.asana.getTask({
|
|
27
|
+
taskId: this.task_gid,
|
|
28
|
+
$,
|
|
29
|
+
});
|
|
27
30
|
|
|
28
31
|
$.export("$summary", "Successfully retrieved task");
|
|
29
32
|
|
|
@@ -3,18 +3,20 @@ import common from "../common/common.mjs";
|
|
|
3
3
|
export default {
|
|
4
4
|
key: "asana-get-tasks-from-task-list",
|
|
5
5
|
name: "Get Tasks From Task List",
|
|
6
|
-
description: "Returns the compact list of tasks in a user’s My Tasks list
|
|
7
|
-
version: "0.0.
|
|
6
|
+
description: "Returns the compact list of tasks in a user’s My Tasks list. [See the documentation](https://developers.asana.com/reference/gettasksforusertasklist)",
|
|
7
|
+
version: "0.0.3",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
...common.props,
|
|
11
11
|
},
|
|
12
12
|
async run({ $ }) {
|
|
13
|
-
const response = await this.asana.getTasksFromUserTaskList({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
const { data: response } = await this.asana.getTasksFromUserTaskList({
|
|
14
|
+
params: {
|
|
15
|
+
workspace: this.workspace,
|
|
16
|
+
project: this.project,
|
|
17
|
+
},
|
|
18
|
+
$,
|
|
19
|
+
});
|
|
18
20
|
|
|
19
21
|
$.export("$summary", `Successfully retrieved ${response.length} tasks`);
|
|
20
22
|
|
|
@@ -3,9 +3,9 @@ import asana from "../../asana.app.mjs";
|
|
|
3
3
|
export default {
|
|
4
4
|
type: "action",
|
|
5
5
|
key: "asana-search-projects",
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.5",
|
|
7
7
|
name: "Search Projects",
|
|
8
|
-
description: "Finds an existing project. [See the
|
|
8
|
+
description: "Finds an existing project. [See the documentation](https://developers.asana.com/docs/get-multiple-projects)",
|
|
9
9
|
props: {
|
|
10
10
|
asana,
|
|
11
11
|
name: {
|
|
@@ -38,9 +38,13 @@ export default {
|
|
|
38
38
|
archived,
|
|
39
39
|
} = this;
|
|
40
40
|
|
|
41
|
-
const projects = await this.asana.getProjects(
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
const { data: projects } = await this.asana.getProjects({
|
|
42
|
+
params: {
|
|
43
|
+
workspace,
|
|
44
|
+
archived,
|
|
45
|
+
},
|
|
46
|
+
$,
|
|
47
|
+
});
|
|
44
48
|
|
|
45
49
|
$.export("$summary", "Successfully retrieved projects");
|
|
46
50
|
|
|
@@ -3,8 +3,8 @@ import common from "../common/common.mjs";
|
|
|
3
3
|
export default {
|
|
4
4
|
key: "asana-search-sections",
|
|
5
5
|
name: "Search Sections",
|
|
6
|
-
description: "Searches for a section by name within a particular project. [See the
|
|
7
|
-
version: "0.2.
|
|
6
|
+
description: "Searches for a section by name within a particular project. [See the documentation](https://developers.asana.com/docs/get-sections-in-a-project)",
|
|
7
|
+
version: "0.2.5",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
...common.props,
|
|
@@ -15,7 +15,10 @@ export default {
|
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
17
|
async run({ $ }) {
|
|
18
|
-
const sections = await this.asana.getSections(
|
|
18
|
+
const { data: sections } = await this.asana.getSections({
|
|
19
|
+
project: this.project,
|
|
20
|
+
$,
|
|
21
|
+
});
|
|
19
22
|
|
|
20
23
|
$.export("$summary", "Successfully retrieved sections");
|
|
21
24
|
|
|
@@ -4,8 +4,8 @@ import common from "../common/common.mjs";
|
|
|
4
4
|
export default {
|
|
5
5
|
key: "asana-search-tasks",
|
|
6
6
|
name: "Search Tasks",
|
|
7
|
-
description: "Searches for a Task by name within a Project. [See the
|
|
8
|
-
version: "0.2.
|
|
7
|
+
description: "Searches for a Task by name within a Project. [See the documentation](https://developers.asana.com/docs/get-multiple-tasks)",
|
|
8
|
+
version: "0.2.5",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
...common.props,
|
|
@@ -52,10 +52,10 @@ export default {
|
|
|
52
52
|
},
|
|
53
53
|
async run({ $ }) {
|
|
54
54
|
if ((!this.workspace || !this.assignee) && !this.project && !this.section) {
|
|
55
|
-
throw new Error("You must specify
|
|
55
|
+
throw new Error("You must specify a Project or Section if you do not specify Assignee and Workspace");
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
const tasks = await this.asana.getTasks({
|
|
58
|
+
const { data: tasks } = await this.asana.getTasks({
|
|
59
59
|
params: {
|
|
60
60
|
assignee: this.assignee,
|
|
61
61
|
project: this.project,
|
|
@@ -64,7 +64,8 @@ export default {
|
|
|
64
64
|
completed_since: this.completed_since,
|
|
65
65
|
modified_since: this.modified_since,
|
|
66
66
|
},
|
|
67
|
-
|
|
67
|
+
$,
|
|
68
|
+
});
|
|
68
69
|
|
|
69
70
|
$.export("$summary", "Successfully retrieved tasks");
|
|
70
71
|
|
|
@@ -4,8 +4,8 @@ import _ from "lodash";
|
|
|
4
4
|
export default {
|
|
5
5
|
key: "asana-search-user-projects",
|
|
6
6
|
name: "Get list of user projects",
|
|
7
|
-
description: "Return list of projects given the user and workspace gid. [See the
|
|
8
|
-
version: "0.4.
|
|
7
|
+
description: "Return list of projects given the user and workspace gid. [See the documentation](https://developers.asana.com/docs/get-multiple-projects)",
|
|
8
|
+
version: "0.4.5",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
asana,
|
|
@@ -30,12 +30,20 @@ export default {
|
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
32
|
async run({ $ }) {
|
|
33
|
-
let projects = await this.asana.getProjects(
|
|
33
|
+
let { data: projects } = await this.asana.getProjects({
|
|
34
|
+
params: {
|
|
35
|
+
workspace: this.workspace,
|
|
36
|
+
},
|
|
37
|
+
$,
|
|
38
|
+
});
|
|
34
39
|
|
|
35
40
|
projects = projects.filter(async (project) => {
|
|
36
|
-
|
|
41
|
+
const { data } = await this.asana.getProject({
|
|
42
|
+
projectId: project.gid,
|
|
43
|
+
$,
|
|
44
|
+
});
|
|
37
45
|
|
|
38
|
-
return
|
|
46
|
+
return data.members && !!_.find(data.members, {
|
|
39
47
|
gid: this.user,
|
|
40
48
|
});
|
|
41
49
|
});
|
|
@@ -4,8 +4,8 @@ import common from "../common/common.mjs";
|
|
|
4
4
|
export default {
|
|
5
5
|
key: "asana-update-task",
|
|
6
6
|
name: "Update Task",
|
|
7
|
-
description: "Updates a specific and existing task. [See the
|
|
8
|
-
version: "0.3.
|
|
7
|
+
description: "Updates a specific and existing task. [See the documentation](https://developers.asana.com/docs/update-a-task)",
|
|
8
|
+
version: "0.3.5",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
...common.props,
|
|
@@ -99,7 +99,8 @@ export default {
|
|
|
99
99
|
let customFields;
|
|
100
100
|
if (this.custom_fields) customFields = JSON.parse(this.custom_fields);
|
|
101
101
|
|
|
102
|
-
const response = await this.asana._makeRequest(
|
|
102
|
+
const { data: response } = await this.asana._makeRequest({
|
|
103
|
+
path: `tasks/${this.task_gid}`,
|
|
103
104
|
method: "put",
|
|
104
105
|
data: {
|
|
105
106
|
data: {
|
|
@@ -116,10 +117,11 @@ export default {
|
|
|
116
117
|
custom_fields: customFields,
|
|
117
118
|
},
|
|
118
119
|
},
|
|
119
|
-
|
|
120
|
+
$,
|
|
121
|
+
});
|
|
120
122
|
|
|
121
123
|
$.export("$summary", "Successfully updated task");
|
|
122
124
|
|
|
123
|
-
return response
|
|
125
|
+
return response;
|
|
124
126
|
},
|
|
125
127
|
};
|