Skip to content

Commit 1e57be7

Browse files
Updated JavaScript SDK: v3.1.6
1 parent 361d4bb commit 1e57be7

55 files changed

Lines changed: 149 additions & 139 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# asana [![GitHub release][release-image]][release-url] [![NPM Version][npm-image]][npm-url]
22

33
- API version: 1.0
4-
- Package version: 3.1.5
4+
- Package version: 3.1.6
55

66
## Installation
77

@@ -18,7 +18,7 @@ npm install asana --save
1818
Include the latest release directly from GitHub:
1919

2020
```html
21-
<script src="https://github.com/Asana/node-asana/releases/download/v3.1.5/asana-min.js"></script>
21+
<script src="https://github.com/Asana/node-asana/releases/download/v3.1.6/asana-min.js"></script>
2222
```
2323

2424
Example usage (**NOTE**: be careful not to expose your access token):
@@ -1119,6 +1119,6 @@ client.callApi(
11191119
```
11201120

11211121
[release-image]: https://img.shields.io/github/release/asana/node-asana.svg
1122-
[release-url]: https://github.com/Asana/node-asana/releases/tag/v3.1.5
1122+
[release-url]: https://github.com/Asana/node-asana/releases/tag/v3.1.6
11231123
[npm-image]: http://img.shields.io/npm/v/asana.svg?style=flat-square
11241124
[npm-url]: https://www.npmjs.org/package/asana

docs/CustomFieldSettingsApi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Method | HTTP request | Description
1414

1515
Get a goal&#x27;s custom fields
1616

17-
Returns a list of all of the custom fields settings on a goal, in compact form. Note that, as in all queries to collections which return compact representation, `opt_fields` can be used to include more data than is returned in the compact representation. See the [documentation for input/output options](https://developers.asana.com/docs/inputoutput-options) for more information.
17+
<b>Required scope: </b><code>goals:read</code> Returns a list of all of the custom fields settings on a goal, in compact form. Note that, as in all queries to collections which return compact representation, `opt_fields` can be used to include more data than is returned in the compact representation. See the [documentation for input/output options](https://developers.asana.com/docs/inputoutput-options) for more information.
1818

1919
([more information](https://developers.asana.com/reference/getcustomfieldsettingsforgoal))
2020

@@ -63,7 +63,7 @@ object
6363

6464
Get a portfolio&#x27;s custom fields
6565

66-
Returns a list of all of the custom fields settings on a portfolio, in compact form.
66+
<b>Required scope: </b><code>portfolios:read</code> Returns a list of all of the custom fields settings on a portfolio, in compact form.
6767

6868
([more information](https://developers.asana.com/reference/getcustomfieldsettingsforportfolio))
6969

@@ -112,7 +112,7 @@ object
112112

113113
Get a project&#x27;s custom fields
114114

115-
Returns a list of all of the custom fields settings on a project, in compact form. Note that, as in all queries to collections which return compact representation, `opt_fields` can be used to include more data than is returned in the compact representation. See the [documentation for input/output options](https://developers.asana.com/docs/inputoutput-options) for more information.
115+
<b>Required scope: </b><code>projects:read</code> Returns a list of all of the custom fields settings on a project, in compact form. Note that, as in all queries to collections which return compact representation, `opt_fields` can be used to include more data than is returned in the compact representation. See the [documentation for input/output options](https://developers.asana.com/docs/inputoutput-options) for more information.
116116

117117
([more information](https://developers.asana.com/reference/getcustomfieldsettingsforproject))
118118

@@ -161,7 +161,7 @@ object
161161

162162
Get a team&#x27;s custom fields
163163

164-
Returns a list of all of the custom fields settings on a team, in compact form. Note that, as in all queries to collections which return compact representation, `opt_fields` can be used to include more data than is returned in the compact representation. See the [documentation for input/output options](https://developers.asana.com/docs/inputoutput-options) for more information.
164+
<b>Required scope: </b><code>teams:read</code> Returns a list of all of the custom fields settings on a team, in compact form. Note that, as in all queries to collections which return compact representation, `opt_fields` can be used to include more data than is returned in the compact representation. See the [documentation for input/output options](https://developers.asana.com/docs/inputoutput-options) for more information.
165165

166166
([more information](https://developers.asana.com/reference/getcustomfieldsettingsforteam))
167167

docs/JobsApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Method | HTTP request | Description
1111

1212
Get a job by id
1313

14-
Returns the full record for a job.
14+
<b>Required scope: </b><code>jobs:read</code> Returns the full record for a job.
1515

1616
([more information](https://developers.asana.com/reference/getjob))
1717

docs/MembershipsApi.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Method | HTTP request | Description
1515

1616
Create a membership
1717

18-
Creates a new membership in a `goal`, `project`, `portfolio`, or `custom_field`, where members can be Teams or Users. Returns the full record of the newly created membership.
18+
Creates a new membership in a `goal`, `project`, `portfolio`, `custom_type`, or `custom_field`, where members can be Teams or Users. Returns the full record of the newly created membership.
1919

2020
([more information](https://developers.asana.com/reference/createmembership))
2121

@@ -58,7 +58,7 @@ object
5858

5959
Delete a membership
6060

61-
A specific, existing membership for a `goal`, `project`, `portfolio` or `custom_field` can be deleted by making a `DELETE` request on the URL for that membership. Returns an empty data record.
61+
A specific, existing membership for a `goal`, `project`, `portfolio`, `custom_type`, or `custom_field` can be deleted by making a `DELETE` request on the URL for that membership. Returns an empty data record.
6262

6363
([more information](https://developers.asana.com/reference/deletemembership))
6464

@@ -100,7 +100,7 @@ object
100100

101101
Get a membership
102102

103-
Returns a `project_membership`, `goal_membership`, `portfolio_membership`, or `custom_field_membership` record for a membership id.
103+
Returns a `project_membership`, `goal_membership`, `portfolio_membership`, `custom_type_membership`, or `custom_field_membership` record for a membership id.
104104

105105
([more information](https://developers.asana.com/reference/getmembership))
106106

@@ -142,7 +142,7 @@ object
142142

143143
Get multiple memberships
144144

145-
Returns compact `goal_membership`, `project_membership`, `portfolio_membership`, or `custom_field_membership` records. The possible types for `parent` in this request are `goal`, `project`, `portfolio`, or `custom_field`. An additional member (user GID or team GID) can be passed in to filter to a specific membership.
145+
Returns compact `goal_membership`, `project_membership`, `portfolio_membership`, `custom_type_membership`, or `custom_field_membership` records. The possible types for `parent` in this request are `goal`, `project`, `portfolio`, `custom_type`, or `custom_field`. An additional member (user GID or team GID) can be passed in to filter to a specific membership. Alternatively, when `parent` is absent, you can use the `member` and `resource_subtype` parameters together to fetch all memberships of a specific type for a given member. For example, passing `member` as a team GID and `resource_subtype` as `project_membership` will return all project memberships for that team.
146146

147147
([more information](https://developers.asana.com/reference/getmemberships))
148148

@@ -157,6 +157,7 @@ let membershipsApiInstance = new Asana.MembershipsApi(client);
157157
let opts = {
158158
'parent': "159874",
159159
'member': "1061493",
160+
'resource_subtype': "project_membership",
160161
'limit': 50,
161162
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
162163
'opt_fields': "offset,path,uri"
@@ -173,8 +174,9 @@ membershipsApiInstance.getMemberships(opts).then((result) => {
173174

174175
Name | Type | Description | Notes
175176
------------- | ------------- | ------------- | -------------
176-
**parent** | **String**| Globally unique identifier for &#x60;goal&#x60;, &#x60;project&#x60;, &#x60;portfolio&#x60;, or &#x60;custom_field&#x60;. | [optional]
177-
**member** | **String**| Globally unique identifier for &#x60;team&#x60; or &#x60;user&#x60;. | [optional]
177+
**parent** | **String**| Globally unique identifier for &#x60;goal&#x60;, &#x60;project&#x60;, &#x60;portfolio&#x60;, &#x60;custom_type&#x60;, or &#x60;custom_field&#x60;. This parameter is optional when &#x60;resource_subtype&#x60; is provided along with &#x60;member&#x60;. | [optional]
178+
**member** | **String**| Globally unique identifier for &#x60;team&#x60; or &#x60;user&#x60;. When used with &#x60;resource_subtype&#x60; and without &#x60;parent&#x60;, returns all memberships of the specified subtype for this member. | [optional]
179+
**resource_subtype** | **String**| The type of membership to return. Required when &#x60;parent&#x60; is absent. Currently supported value is &#x60;project_membership&#x60; (when &#x60;member&#x60; is a team GID, returns all project memberships for that team). | [optional]
178180
**limit** | **Number**| Results per page. The number of objects to return per page. The value must be between 1 and 100. | [optional]
179181
**offset** | **String**| 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.* | [optional]
180182
**opt_fields** | **Object**| This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. | [optional]
@@ -193,7 +195,7 @@ object
193195

194196
Update a membership
195197

196-
An existing membership can be updated by making a `PUT` request on the membership. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged. Memberships on `goals`, `projects`, `portfolios`, and `custom_fields` can be updated. Returns the full record of the updated membership.
198+
An existing membership can be updated by making a `PUT` request on the membership. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged. Memberships on `goals`, `projects`, `portfolios`, `custom_types`, and `custom_fields` can be updated. Returns the full record of the updated membership.
197199

198200
([more information](https://developers.asana.com/reference/updatemembership))
199201

docs/MembershipsApi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ MembershipsApi:
5555
let opts = {
5656
'parent': "159874",
5757
'member': "1061493",
58+
'resource_subtype': "project_membership",
5859
'limit': 50,
5960
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
6061
'opt_fields': "offset,path,uri"

docs/ProjectsApi.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ object
170170

171171
Create a project
172172

173-
<b>Required scope: </b><code>projects:write</code> Create a new project in a workspace or team. Every project is required to be created in a specific workspace or organization, and this cannot be changed once set. Note that you can use the `workspace` parameter regardless of whether or not it is an organization. If the workspace for your project is an organization, you must also supply a `team` to share the project with. Returns the full record of the newly created project.
173+
<b>Required scope: </b><code>projects:write</code> Create a new project in a workspace or team. Every project is required to be created in a specific workspace or organization, and this cannot be changed once set. Note that you can use the `workspace` parameter regardless of whether or not it is an organization. If the workspace for your project is an organization, you must also supply a `team` to share the project with. Returns the full record of the newly created project. **Deprecation notice:** The `team` parameter and the `private_to_team` value for `privacy_setting` are deprecated. When either is included in the request, the `Asana-Change` response header will indicate an affected deprecation. Clients should switch to using `POST /memberships` with `{ parent: project, member: team }` to share a project with a team after creation.
174174

175175
([more information](https://developers.asana.com/reference/createproject))
176176

@@ -443,7 +443,7 @@ object
443443

444444
Get multiple projects
445445

446-
<b>Required scope: </b><code>projects:read</code> Returns the compact project records for some filtered set of projects. Use one or more of the parameters provided to filter the projects returned. *Note: This endpoint may timeout for large domains. Try filtering by team!*
446+
<b>Required scope: </b><code>projects:read</code> Returns the compact project records for some filtered set of projects. Use one or more of the parameters provided to filter the projects returned. *Note: This endpoint may timeout for large domains. Try filtering by team!* **The `team` filter is deprecated.** Please use `GET /memberships` with `{ member: team, resource_subtype: project_membership }` to find projects shared with a team.
447447

448448
([more information](https://developers.asana.com/reference/getprojects))
449449

@@ -478,7 +478,7 @@ Name | Type | Description | Notes
478478
**limit** | **Number**| Results per page. The number of objects to return per page. The value must be between 1 and 100. | [optional]
479479
**offset** | **String**| 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.* | [optional]
480480
**workspace** | **String**| The workspace or organization to filter projects on. | [optional]
481-
**team** | **String**| The team to filter projects on. | [optional]
481+
**team** | **String**| **Deprecated.** The team to filter projects on. Please use &#x60;GET /memberships&#x60; with &#x60;{ member: team, resource_subtype: project_membership }&#x60; instead. | [optional]
482482
**archived** | **Boolean**| Only return projects whose &#x60;archived&#x60; field takes on the value of this parameter. | [optional]
483483
**opt_fields** | **Object**| This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. | [optional]
484484

@@ -545,7 +545,7 @@ object
545545

546546
Get a team&#x27;s projects
547547

548-
<b>Required scope: </b><code>projects:read</code> Returns the compact project records for all projects in the team.
548+
<b>Required scope: </b><code>projects:read</code> Returns the compact project records for all projects in the team. *Deprecated: This endpoint is deprecated. Use `GET /memberships` with `member` set to the team GID and `resource_subtype` set to `project_membership` to fetch projects shared with a team.*
549549

550550
([more information](https://developers.asana.com/reference/getprojectsforteam))
551551

@@ -596,7 +596,7 @@ object
596596

597597
Get all projects in a workspace
598598

599-
<b>Required scope: </b><code>projects:read</code> Returns the compact project records for all projects in the workspace. *Note: This endpoint may timeout for large domains. Prefer the `/teams/{team_gid}/projects` endpoint.*
599+
<b>Required scope: </b><code>projects:read</code> Returns the compact project records for all projects in the workspace. *Note: This endpoint may timeout for large domains. To fetch projects shared with a specific team, use `GET /memberships` with `member` set to the team GID and `resource_subtype` set to `project_membership`.*
600600

601601
([more information](https://developers.asana.com/reference/getprojectsforworkspace))
602602

@@ -877,7 +877,7 @@ object
877877

878878
Update a project
879879

880-
<b>Required scope: </b><code>projects:write</code> A specific, existing project can be updated by making a PUT request on the URL for that project. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged. When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the task. Returns the complete updated project record.
880+
<b>Required scope: </b><code>projects:write</code> A specific, existing project can be updated by making a PUT request on the URL for that project. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged. When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the task. Returns the complete updated project record. **Deprecation notice:** Updating the `team` field is deprecated. When this field is included in the request, the `Asana-Change` response header will indicate an affected deprecation. Clients should switch to using `POST /memberships` with `{ parent: project, member: team }` to share a project with a team.
881881

882882
([more information](https://developers.asana.com/reference/updateproject))
883883

0 commit comments

Comments
 (0)