@pipedream/asana 0.10.0 → 0.12.0

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.
@@ -0,0 +1,24 @@
1
+ import asana from "../../asana.app.mjs";
2
+
3
+ export default {
4
+ key: "asana-list-organizations-options",
5
+ name: "List Organizations Options",
6
+ description: "Retrieves available options for the Organizations field.",
7
+ version: "0.0.1",
8
+ type: "action",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: true,
13
+ },
14
+ props: {
15
+ asana,
16
+ },
17
+ async run({ $ }) {
18
+ const options = await asana.propDefinitions.organizations.options.call(this.asana);
19
+ $.export("$summary", `Successfully retrieved ${options.length} option${options.length === 1
20
+ ? ""
21
+ : "s"}`);
22
+ return options;
23
+ },
24
+ };
@@ -0,0 +1,58 @@
1
+ import asana from "../../asana.app.mjs";
2
+
3
+ export default {
4
+ key: "asana-list-workspaces",
5
+ name: "List Workspaces",
6
+ description: "List workspaces available to the authenticated Asana account. Use this when you need a workspace GID before running **List Teams** or other workspace-scoped actions. `optFields` can include optional workspace properties such as `email_domains` and `is_organization`; leave `offset` empty for the first page and pass a returned offset token (for example, `3:0:abcdef123456`) to fetch the next page. [See the documentation](https://developers.asana.com/reference/getworkspaces)",
7
+ version: "0.0.1",
8
+ type: "action",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: true,
13
+ },
14
+ props: {
15
+ asana,
16
+ optFields: {
17
+ type: "string[]",
18
+ label: "Opt Fields",
19
+ description: "This action returns a resource which excludes some properties by default. To include those optional properties, set this prop to a list of the properties you wish to include (e.g. `[\"name\", \"email_domains\", \"is_organization\"]`).",
20
+ optional: true,
21
+ options: [
22
+ "resource_type",
23
+ "name",
24
+ "email_domains",
25
+ "is_organization",
26
+ ],
27
+ },
28
+ limit: {
29
+ type: "integer",
30
+ label: "Limit",
31
+ description: "The number of workspaces to return per page. Defaults to 25. Maximum is 100.",
32
+ optional: true,
33
+ default: 25,
34
+ min: 1,
35
+ max: 100,
36
+ },
37
+ offset: {
38
+ type: "string",
39
+ label: "Offset",
40
+ description: "Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. Note: You can only pass in an offset that was returned to you via a previously paginated request (e.g. \"3:0:abcdef123456\").",
41
+ optional: true,
42
+ },
43
+ },
44
+ async run({ $ }) {
45
+ const response = await this.asana.getWorkspaces({
46
+ $,
47
+ params: {
48
+ opt_fields: Array.isArray(this.optFields) && this.optFields.length
49
+ ? this.optFields.join(",")
50
+ : undefined,
51
+ limit: this.limit,
52
+ offset: this.offset?.trim() || undefined,
53
+ },
54
+ });
55
+ $.export("$summary", `Successfully fetched ${response.data?.length} workspaces`);
56
+ return response;
57
+ },
58
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/asana",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "Pipedream Asana Components",
5
5
  "main": "asana.app.mjs",
6
6
  "keywords": [