@openfn/language-asana 2.0.0 → 2.0.1
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/README.md +17 -5
- package/lib/Adaptor.js +6 -0
- package/node_modules/@openfn/language-common/node_modules/axios/package.json +2 -2
- package/node_modules/@openfn/language-common/node_modules/follow-redirects/package.json +2 -2
- package/node_modules/@openfn/language-common/node_modules/jsonpath-plus/package.json +2 -2
- package/node_modules/@openfn/language-common/node_modules/lodash/package.json +2 -2
- package/node_modules/@openfn/language-common/package.json +13 -9
- package/node_modules/date-fns/package.json +13 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,11 +8,23 @@ Language Pack for connecting with Asana.
|
|
|
8
8
|
|
|
9
9
|
```json
|
|
10
10
|
{
|
|
11
|
-
"
|
|
12
|
-
"token": "
|
|
11
|
+
"apiVersion": "1.0",
|
|
12
|
+
"token": "shhhhhhhh"
|
|
13
13
|
}
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
+
### How to create an API token
|
|
17
|
+
|
|
18
|
+
Using Asana's API requires having an API token. To generate that token, head to
|
|
19
|
+
the [Asana developer console](https://app.asana.com/0/developer-console) and
|
|
20
|
+
enter the **Personal access tokens** section.
|
|
21
|
+
|
|
22
|
+
There you can click on **+New access token**. A prompt will be opened allowing
|
|
23
|
+
you to give the token a name and then create it.
|
|
24
|
+
|
|
25
|
+
_Note: Treat your PAT like you would with a password. Do not share it or display
|
|
26
|
+
it online._
|
|
27
|
+
|
|
16
28
|
### Sample expression
|
|
17
29
|
|
|
18
30
|
## Find a single task of a given project using the task id.
|
|
@@ -53,9 +65,9 @@ createTask({
|
|
|
53
65
|
|
|
54
66
|
## Update a task or create a new one
|
|
55
67
|
|
|
56
|
-
You can use a field name literal as `externalId` to match a specific task. If
|
|
57
|
-
does not exist, a new one will be created.
|
|
58
|
-
|
|
68
|
+
You can use a field name literal as `externalId` to match a specific task. If
|
|
69
|
+
the task does not exist, a new one will be created. The first parameter in this
|
|
70
|
+
function should be the `project_id`.
|
|
59
71
|
|
|
60
72
|
```js
|
|
61
73
|
upsertTask('12344', {
|
package/lib/Adaptor.js
CHANGED
|
@@ -240,6 +240,9 @@ function updateTask(task_gid, params, callback) {
|
|
|
240
240
|
};
|
|
241
241
|
if (callback) return callback(nextState);
|
|
242
242
|
return nextState;
|
|
243
|
+
}).catch(e => {
|
|
244
|
+
console.log('Asana says:', e.response.data);
|
|
245
|
+
throw e;
|
|
243
246
|
});
|
|
244
247
|
};
|
|
245
248
|
}
|
|
@@ -282,6 +285,9 @@ function createTask(params, callback) {
|
|
|
282
285
|
};
|
|
283
286
|
if (callback) return callback(nextState);
|
|
284
287
|
return nextState;
|
|
288
|
+
}).catch(e => {
|
|
289
|
+
console.log('Asana says:', e.response.data);
|
|
290
|
+
throw e;
|
|
285
291
|
});
|
|
286
292
|
};
|
|
287
293
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"_args": [
|
|
3
3
|
[
|
|
4
4
|
"axios@0.21.4",
|
|
5
|
-
"/Users/
|
|
5
|
+
"/Users/taylor/devtools/adaptors/language-asana"
|
|
6
6
|
]
|
|
7
7
|
],
|
|
8
8
|
"_from": "axios@0.21.4",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"_resolved": false,
|
|
28
28
|
"_shasum": "c67b90dc0568e5c1cf2b0b858c43ba28e2eda575",
|
|
29
29
|
"_spec": "0.21.4",
|
|
30
|
-
"_where": "/Users/
|
|
30
|
+
"_where": "/Users/taylor/devtools/adaptors/language-asana",
|
|
31
31
|
"author": {
|
|
32
32
|
"name": "Matt Zabriskie"
|
|
33
33
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"_args": [
|
|
3
3
|
[
|
|
4
4
|
"follow-redirects@1.14.3",
|
|
5
|
-
"/Users/
|
|
5
|
+
"/Users/taylor/devtools/adaptors/language-asana"
|
|
6
6
|
]
|
|
7
7
|
],
|
|
8
8
|
"_from": "follow-redirects@1.14.3",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"_resolved": false,
|
|
28
28
|
"_shasum": "6ada78118d8d24caee595595accdc0ac6abd022e",
|
|
29
29
|
"_spec": "1.14.3",
|
|
30
|
-
"_where": "/Users/
|
|
30
|
+
"_where": "/Users/taylor/devtools/adaptors/language-asana",
|
|
31
31
|
"author": {
|
|
32
32
|
"name": "Ruben Verborgh",
|
|
33
33
|
"email": "ruben@verborgh.org",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"_args": [
|
|
3
3
|
[
|
|
4
4
|
"jsonpath-plus@4.0.0",
|
|
5
|
-
"/Users/
|
|
5
|
+
"/Users/taylor/devtools/adaptors/language-asana"
|
|
6
6
|
]
|
|
7
7
|
],
|
|
8
8
|
"_from": "jsonpath-plus@4.0.0",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"_resolved": false,
|
|
28
28
|
"_spec": "4.0.0",
|
|
29
|
-
"_where": "/Users/
|
|
29
|
+
"_where": "/Users/taylor/devtools/adaptors/language-asana",
|
|
30
30
|
"author": {
|
|
31
31
|
"name": "Stefan Goessner"
|
|
32
32
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"_args": [
|
|
3
3
|
[
|
|
4
4
|
"lodash@4.17.21",
|
|
5
|
-
"/Users/
|
|
5
|
+
"/Users/taylor/devtools/adaptors/language-asana"
|
|
6
6
|
]
|
|
7
7
|
],
|
|
8
8
|
"_from": "lodash@4.17.21",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"_resolved": false,
|
|
28
28
|
"_spec": "4.17.21",
|
|
29
|
-
"_where": "/Users/
|
|
29
|
+
"_where": "/Users/taylor/devtools/adaptors/language-asana",
|
|
30
30
|
"author": {
|
|
31
31
|
"name": "John-David Dalton",
|
|
32
32
|
"email": "john.david.dalton@gmail.com"
|
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"_args": [
|
|
3
|
+
[
|
|
4
|
+
"@openfn/language-common@1.6.2",
|
|
5
|
+
"/Users/taylor/devtools/adaptors/language-asana"
|
|
6
|
+
]
|
|
7
|
+
],
|
|
8
|
+
"_from": "@openfn/language-common@1.6.2",
|
|
3
9
|
"_id": "@openfn/language-common@1.6.2",
|
|
4
10
|
"_inBundle": false,
|
|
5
11
|
"_integrity": "sha512-ZyjpC7S9Tf0zGvvHYQ+0n2PM5hpYLP3/yJImJQXoYa2hpL0yZo5ef0prGzLmPJJECraiRyY6vkBJp/uKg2SRdw==",
|
|
6
12
|
"_location": "/@openfn/language-common",
|
|
7
13
|
"_phantomChildren": {},
|
|
8
14
|
"_requested": {
|
|
9
|
-
"type": "
|
|
15
|
+
"type": "version",
|
|
10
16
|
"registry": true,
|
|
11
|
-
"raw": "@openfn/language-common
|
|
17
|
+
"raw": "@openfn/language-common@1.6.2",
|
|
12
18
|
"name": "@openfn/language-common",
|
|
13
19
|
"escapedName": "@openfn%2flanguage-common",
|
|
14
20
|
"scope": "@openfn",
|
|
15
|
-
"rawSpec": "
|
|
21
|
+
"rawSpec": "1.6.2",
|
|
16
22
|
"saveSpec": null,
|
|
17
|
-
"fetchSpec": "
|
|
23
|
+
"fetchSpec": "1.6.2"
|
|
18
24
|
},
|
|
19
25
|
"_requiredBy": [
|
|
20
26
|
"/"
|
|
21
27
|
],
|
|
22
28
|
"_resolved": "https://registry.npmjs.org/@openfn/language-common/-/language-common-1.6.2.tgz",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"_where": "/Users/mlcisse/Documents/OpenFn/devtools/adaptors/language-asana",
|
|
29
|
+
"_spec": "1.6.2",
|
|
30
|
+
"_where": "/Users/taylor/devtools/adaptors/language-asana",
|
|
26
31
|
"author": {
|
|
27
32
|
"name": "Open Function Group"
|
|
28
33
|
},
|
|
@@ -40,7 +45,6 @@
|
|
|
40
45
|
"jsonpath-plus": "^4.0.0",
|
|
41
46
|
"lodash": "^4.17.19"
|
|
42
47
|
},
|
|
43
|
-
"deprecated": false,
|
|
44
48
|
"description": "Common Expressions for OpenFn",
|
|
45
49
|
"devDependencies": {
|
|
46
50
|
"@babel/cli": "^7.8.4",
|
|
@@ -1,31 +1,35 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"_args": [
|
|
3
|
+
[
|
|
4
|
+
"date-fns@2.28.0",
|
|
5
|
+
"/Users/taylor/devtools/adaptors/language-asana"
|
|
6
|
+
]
|
|
7
|
+
],
|
|
8
|
+
"_from": "date-fns@2.28.0",
|
|
3
9
|
"_id": "date-fns@2.28.0",
|
|
4
10
|
"_inBundle": false,
|
|
5
11
|
"_integrity": "sha512-8d35hViGYx/QH0icHYCeLmsLmMUheMmTyV9Fcm6gvNwdw31yXXH+O85sOBJ+OLnLQMKZowvpKb6FgMIQjcpvQw==",
|
|
6
12
|
"_location": "/date-fns",
|
|
7
13
|
"_phantomChildren": {},
|
|
8
14
|
"_requested": {
|
|
9
|
-
"type": "
|
|
15
|
+
"type": "version",
|
|
10
16
|
"registry": true,
|
|
11
|
-
"raw": "date-fns
|
|
17
|
+
"raw": "date-fns@2.28.0",
|
|
12
18
|
"name": "date-fns",
|
|
13
19
|
"escapedName": "date-fns",
|
|
14
|
-
"rawSpec": "
|
|
20
|
+
"rawSpec": "2.28.0",
|
|
15
21
|
"saveSpec": null,
|
|
16
|
-
"fetchSpec": "
|
|
22
|
+
"fetchSpec": "2.28.0"
|
|
17
23
|
},
|
|
18
24
|
"_requiredBy": [
|
|
19
25
|
"/@openfn/language-common"
|
|
20
26
|
],
|
|
21
27
|
"_resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.28.0.tgz",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"_where": "/Users/mlcisse/Documents/OpenFn/devtools/adaptors/language-asana/node_modules/@openfn/language-common",
|
|
28
|
+
"_spec": "2.28.0",
|
|
29
|
+
"_where": "/Users/taylor/devtools/adaptors/language-asana",
|
|
25
30
|
"bugs": {
|
|
26
31
|
"url": "https://github.com/date-fns/date-fns/issues"
|
|
27
32
|
},
|
|
28
|
-
"bundleDependencies": false,
|
|
29
33
|
"contributors": [
|
|
30
34
|
{
|
|
31
35
|
"name": "Sasha Koss",
|
|
@@ -37,7 +41,6 @@
|
|
|
37
41
|
}
|
|
38
42
|
],
|
|
39
43
|
"dependencies": {},
|
|
40
|
-
"deprecated": false,
|
|
41
44
|
"description": "Modern JavaScript date utility library",
|
|
42
45
|
"devDependencies": {
|
|
43
46
|
"@babel/cli": "^7.13.10",
|