Skip to content

Commit

Permalink
Updated JavaScript SDK: v3.0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
1 parent 43b490b commit 85bae94
Show file tree
Hide file tree
Showing 48 changed files with 92 additions and 83 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# asana [![GitHub release][release-image]][release-url] [![NPM Version][npm-image]][npm-url]

- API version: 1.0
- Package version: 3.0.11
- Package version: 3.0.12

## Installation

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

```html
<script src="https://github.com/Asana/node-asana/releases/download/v3.0.11/asana-min.js"></script>
<script src="https://github.com/Asana/node-asana/releases/download/v3.0.12/asana-min.js"></script>
```

Example usage (**NOTE**: be careful not to expose your access token):
Expand Down Expand Up @@ -1111,6 +1111,6 @@ client.callApi(
```

[release-image]: https://img.shields.io/github/release/asana/node-asana.svg
[release-url]: https://github.com/Asana/node-asana/releases/tag/v3.0.11
[release-url]: https://github.com/Asana/node-asana/releases/tag/v3.0.12
[npm-image]: http://img.shields.io/npm/v/asana.svg?style=flat-square
[npm-url]: https://www.npmjs.org/package/asana
6 changes: 3 additions & 3 deletions docs/MembershipsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Method | HTTP request | Description

Create a membership

Creates a new membership in a `goal` or `project`. `Teams` or `users` can be a member of `goals` or `projects`. Returns the full record of the newly created membership.
Creates a new membership in a `goal`, `project`, or `portfolio`. Teams or users can be members of `goals` or `projects`. Portfolios only support `users` as members. Returns the full record of the newly created membership.

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

Expand Down Expand Up @@ -59,7 +59,7 @@ object

Delete a membership

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

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

Expand Down Expand Up @@ -200,7 +200,7 @@ object

Update a membership

An existing membership can be updated by making a `PUT` request on the URL for that goal. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged. Memberships on `goals` and `projects` can be updated. Returns the full record of the updated membership.
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` and `portfolios` can be updated. Returns the full record of the updated membership.

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

Expand Down
2 changes: 1 addition & 1 deletion docs/ProjectsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ object

Create a project template from a project

Creates and returns a job that will asynchronously handle the project template creation. Note that while the resulting project template can be accessed with the API, it won't be visible in the Asana UI until Project Templates 2.0 is launched in the app. See more in [this forum post](https://forum.asana.com/t/a-new-api-for-project-templates/156432).
Creates and returns a job that will asynchronously handle the project template creation.

([more information](https://developers.asana.com/reference/projectsaveastemplate))

Expand Down
6 changes: 4 additions & 2 deletions docs/TagsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,12 @@ let token = client.authentications['token'];
token.accessToken = '<YOUR_ACCESS_TOKEN>';

let tagsApiInstance = new Asana.TagsApi();
let body = {"data": {"<PARAM_1>": "<VALUE_1>", "<PARAM_2>": "<VALUE_2>",}}; // Object | The tag to update.
let tag_gid = "11235"; // String | Globally unique identifier for the tag.
let opts = {
'opt_fields': "color,created_at,followers,followers.name,name,notes,permalink_url,workspace,workspace.name"
};
tagsApiInstance.updateTag(tag_gid, opts).then((result) => {
tagsApiInstance.updateTag(body, tag_gid, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
}, (error) => {
console.error(error.response.body);
Expand All @@ -380,6 +381,7 @@ tagsApiInstance.updateTag(tag_gid, opts).then((result) => {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **Object**| The tag to update. |
**tag_gid** | **String**| Globally unique identifier for the tag. |
**opt_fields** | **Object**| This endpoint returns a compact 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]

Expand All @@ -389,6 +391,6 @@ object

### HTTP request headers

- **Content-Type**: Not defined
- **Content-Type**: application/json; charset=UTF-8
- **Accept**: application/json; charset=UTF-8

3 changes: 2 additions & 1 deletion docs/TagsApi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,12 @@ TagsApi:
token.accessToken = '<YOUR_ACCESS_TOKEN>';
let tagsApiInstance = new Asana.TagsApi();
let body = {"data": {"<PARAM_1>": "<VALUE_1>", "<PARAM_2>": "<VALUE_2>",}}; // Object | The tag to update.
let tag_gid = "11235"; // String | Globally unique identifier for the tag.
let opts = {
'opt_fields': "color,created_at,followers,followers.name,name,notes,permalink_url,workspace,workspace.name"
};
tagsApiInstance.updateTag(tag_gid, opts).then((result) => {
tagsApiInstance.updateTag(body, tag_gid, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
}, (error) => {
console.error(error.response.body);
Expand Down
10 changes: 5 additions & 5 deletions docs/TeamsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ token.accessToken = '<YOUR_ACCESS_TOKEN>';
let teamsApiInstance = new Asana.TeamsApi();
let body = {"data": {"<PARAM_1>": "<VALUE_1>", "<PARAM_2>": "<VALUE_2>",}}; // Object | The team to create.
let opts = {
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,organization,organization.name,permalink_url,team_content_management_access_level,team_member_removal_access_level,visibility"
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,endorsed,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,organization,organization.name,permalink_url,team_content_management_access_level,team_member_removal_access_level,visibility"
};
teamsApiInstance.createTeam(body, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down Expand Up @@ -126,7 +126,7 @@ token.accessToken = '<YOUR_ACCESS_TOKEN>';
let teamsApiInstance = new Asana.TeamsApi();
let team_gid = "159874"; // String | Globally unique identifier for the team.
let opts = {
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,organization,organization.name,permalink_url,team_content_management_access_level,team_member_removal_access_level,visibility"
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,endorsed,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,organization,organization.name,permalink_url,team_content_management_access_level,team_member_removal_access_level,visibility"
};
teamsApiInstance.getTeam(team_gid, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down Expand Up @@ -175,7 +175,7 @@ let organization = "1331"; // String | The workspace or organization to filter t
let opts = {
'limit': 50,
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,offset,organization,organization.name,path,permalink_url,team_content_management_access_level,team_member_removal_access_level,uri,visibility"
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,endorsed,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,offset,organization,organization.name,path,permalink_url,team_content_management_access_level,team_member_removal_access_level,uri,visibility"
};
teamsApiInstance.getTeamsForUser(user_gid, organization, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down Expand Up @@ -226,7 +226,7 @@ let workspace_gid = "12345"; // String | Globally unique identifier for the work
let opts = {
'limit': 50,
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,offset,organization,organization.name,path,permalink_url,team_content_management_access_level,team_member_removal_access_level,uri,visibility"
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,endorsed,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,offset,organization,organization.name,path,permalink_url,team_content_management_access_level,team_member_removal_access_level,uri,visibility"
};
teamsApiInstance.getTeamsForWorkspace(workspace_gid, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down Expand Up @@ -320,7 +320,7 @@ let teamsApiInstance = new Asana.TeamsApi();
let body = {"data": {"<PARAM_1>": "<VALUE_1>", "<PARAM_2>": "<VALUE_2>",}}; // Object | The team to update.
let team_gid = "159874"; // String | Globally unique identifier for the team.
let opts = {
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,organization,organization.name,permalink_url,team_content_management_access_level,team_member_removal_access_level,visibility"
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,endorsed,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,organization,organization.name,permalink_url,team_content_management_access_level,team_member_removal_access_level,visibility"
};
teamsApiInstance.updateTeam(body, team_gid, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down
10 changes: 5 additions & 5 deletions docs/TeamsApi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ TeamsApi:
let teamsApiInstance = new Asana.TeamsApi();
let body = {"data": {"<PARAM_1>": "<VALUE_1>", "<PARAM_2>": "<VALUE_2>",}}; // Object | The team to create.
let opts = {
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,organization,organization.name,permalink_url,team_content_management_access_level,team_member_removal_access_level,visibility"
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,endorsed,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,organization,organization.name,permalink_url,team_content_management_access_level,team_member_removal_access_level,visibility"
};
teamsApiInstance.createTeam(body, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand All @@ -46,7 +46,7 @@ TeamsApi:
let teamsApiInstance = new Asana.TeamsApi();
let team_gid = "159874"; // String | Globally unique identifier for the team.
let opts = {
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,organization,organization.name,permalink_url,team_content_management_access_level,team_member_removal_access_level,visibility"
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,endorsed,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,organization,organization.name,permalink_url,team_content_management_access_level,team_member_removal_access_level,visibility"
};
teamsApiInstance.getTeam(team_gid, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand All @@ -67,7 +67,7 @@ TeamsApi:
let opts = {
'limit': 50,
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,offset,organization,organization.name,path,permalink_url,team_content_management_access_level,team_member_removal_access_level,uri,visibility"
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,endorsed,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,offset,organization,organization.name,path,permalink_url,team_content_management_access_level,team_member_removal_access_level,uri,visibility"
};
teamsApiInstance.getTeamsForUser(user_gid, organization, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand All @@ -87,7 +87,7 @@ TeamsApi:
let opts = {
'limit': 50,
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,offset,organization,organization.name,path,permalink_url,team_content_management_access_level,team_member_removal_access_level,uri,visibility"
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,endorsed,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,offset,organization,organization.name,path,permalink_url,team_content_management_access_level,team_member_removal_access_level,uri,visibility"
};
teamsApiInstance.getTeamsForWorkspace(workspace_gid, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down Expand Up @@ -123,7 +123,7 @@ TeamsApi:
let body = {"data": {"<PARAM_1>": "<VALUE_1>", "<PARAM_2>": "<VALUE_2>",}}; // Object | The team to update.
let team_gid = "159874"; // String | Globally unique identifier for the team.
let opts = {
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,organization,organization.name,permalink_url,team_content_management_access_level,team_member_removal_access_level,visibility"
'opt_fields': "description,edit_team_name_or_description_access_level,edit_team_visibility_or_trash_team_access_level,endorsed,guest_invite_management_access_level,html_description,join_request_management_access_level,member_invite_management_access_level,name,organization,organization.name,permalink_url,team_content_management_access_level,team_member_removal_access_level,visibility"
};
teamsApiInstance.updateTeam(body, team_gid, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down
6 changes: 3 additions & 3 deletions docs/WorkspaceMembershipsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ token.accessToken = '<YOUR_ACCESS_TOKEN>';
let workspaceMembershipsApiInstance = new Asana.WorkspaceMembershipsApi();
let workspace_membership_gid = "12345"; // String |
let opts = {
'opt_fields': "created_at,is_active,is_admin,is_guest,user,user.name,user_task_list,user_task_list.name,user_task_list.owner,user_task_list.workspace,vacation_dates,vacation_dates.end_on,vacation_dates.start_on,workspace,workspace.name"
'opt_fields': "created_at,is_active,is_admin,is_guest,is_view_only,user,user.name,user_task_list,user_task_list.name,user_task_list.owner,user_task_list.workspace,vacation_dates,vacation_dates.end_on,vacation_dates.start_on,workspace,workspace.name"
};
workspaceMembershipsApiInstance.getWorkspaceMembership(workspace_membership_gid, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down Expand Up @@ -76,7 +76,7 @@ let user_gid = "me"; // String | A string identifying a user. This can either be
let opts = {
'limit': 50,
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
'opt_fields': "created_at,is_active,is_admin,is_guest,offset,path,uri,user,user.name,user_task_list,user_task_list.name,user_task_list.owner,user_task_list.workspace,vacation_dates,vacation_dates.end_on,vacation_dates.start_on,workspace,workspace.name"
'opt_fields': "created_at,is_active,is_admin,is_guest,is_view_only,offset,path,uri,user,user.name,user_task_list,user_task_list.name,user_task_list.owner,user_task_list.workspace,vacation_dates,vacation_dates.end_on,vacation_dates.start_on,workspace,workspace.name"
};
workspaceMembershipsApiInstance.getWorkspaceMembershipsForUser(user_gid, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down Expand Up @@ -127,7 +127,7 @@ let opts = {
'user': "me",
'limit': 50,
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
'opt_fields': "created_at,is_active,is_admin,is_guest,offset,path,uri,user,user.name,user_task_list,user_task_list.name,user_task_list.owner,user_task_list.workspace,vacation_dates,vacation_dates.end_on,vacation_dates.start_on,workspace,workspace.name"
'opt_fields': "created_at,is_active,is_admin,is_guest,is_view_only,offset,path,uri,user,user.name,user_task_list,user_task_list.name,user_task_list.owner,user_task_list.workspace,vacation_dates,vacation_dates.end_on,vacation_dates.start_on,workspace,workspace.name"
};
workspaceMembershipsApiInstance.getWorkspaceMembershipsForWorkspace(workspace_gid, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down
Loading

0 comments on commit 85bae94

Please sign in to comment.