Skip to content

Commit

Permalink
Updated JavaScript SDK: v3.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
asana-publish-client-libraries[bot] committed Jul 27, 2024
1 parent f4375cc commit a3493f7
Show file tree
Hide file tree
Showing 43 changed files with 57 additions and 57 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.7
- Package version: 3.0.8

## 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.7/asana-min.js"></script>
<script src="https://github.com/Asana/node-asana/releases/download/v3.0.8/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.7
[release-url]: https://github.com/Asana/node-asana/releases/tag/v3.0.8
[npm-image]: http://img.shields.io/npm/v/asana.svg?style=flat-square
[npm-url]: https://www.npmjs.org/package/asana
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_member_removal_access_level,visibility"
'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"
};
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_member_removal_access_level,visibility"
'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"
};
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_member_removal_access_level,uri,visibility"
'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"
};
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_member_removal_access_level,uri,visibility"
'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"
};
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_member_removal_access_level,visibility"
'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"
};
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_member_removal_access_level,visibility"
'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"
};
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_member_removal_access_level,visibility"
'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"
};
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_member_removal_access_level,uri,visibility"
'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"
};
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_member_removal_access_level,uri,visibility"
'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"
};
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_member_removal_access_level,visibility"
'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"
};
teamsApiInstance.updateTeam(body, team_gid, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down
2 changes: 1 addition & 1 deletion docs/WebhooksApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Method | HTTP request | Description

Establish a webhook

Establishing a webhook is a two-part process. First, a simple HTTP POST request initiates the creation similar to creating any other resource. Next, in the middle of this request comes the confirmation handshake. When a webhook is created, we will send a test POST to the target with an `X-Hook-Secret` header. The target must respond with a `200 OK` or `204 No Content` and a matching `X-Hook-Secret` header to confirm that this webhook subscription is indeed expected. We strongly recommend storing this secret to be used to verify future webhook event signatures. The POST request to create the webhook will then return with the status of the request. If you do not acknowledge the webhook’s confirmation handshake it will fail to setup, and you will receive an error in response to your attempt to create it. This means you need to be able to receive and complete the webhook *while* the POST request is in-flight (in other words, have a server that can handle requests asynchronously). Invalid hostnames like localhost will recieve a 403 Forbidden status code. ``` # Request curl -H \"Authorization: Bearer <personal_access_token>\" \\ -X POST https://app.asana.com/api/1.0/webhooks \\ -d \"resource=8675309\" \\ -d \"target=https://example.com/receive-webhook/7654\" ``` ``` # Handshake sent to https://example.com/ POST /receive-webhook/7654 X-Hook-Secret: b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81 ``` ``` # Handshake response sent by example.com HTTP/1.1 200 X-Hook-Secret: b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81 ``` ``` # Response HTTP/1.1 201 { \"data\": { \"gid\": \"43214\", \"resource\": { \"gid\": \"8675309\", \"name\": \"Bugs\" }, \"target\": \"https://example.com/receive-webhook/7654\", \"active\": false, \"last_success_at\": null, \"last_failure_at\": null, \"last_failure_content\": null } } ```
Establishing a webhook is a two-part process. First, a simple HTTP POST request initiates the creation similar to creating any other resource. Next, in the middle of this request comes the confirmation handshake. When a webhook is created, we will send a test POST to the target with an `X-Hook-Secret` header. The target must respond with a `200 OK` or `204 No Content` and a matching `X-Hook-Secret` header to confirm that this webhook subscription is indeed expected. We strongly recommend storing this secret to be used to verify future webhook event signatures. The POST request to create the webhook will then return with the status of the request. If you do not acknowledge the webhook’s confirmation handshake it will fail to setup, and you will receive an error in response to your attempt to create it. This means you need to be able to receive and complete the webhook *while* the POST request is in-flight (in other words, have a server that can handle requests asynchronously). Invalid hostnames like localhost will recieve a 403 Forbidden status code. ``` # Request curl -H \"Authorization: Bearer <personal_access_token>\" \\ -X POST https://app.asana.com/api/1.0/webhooks \\ -d \"resource=8675309\" \\ -d \"target=https://example.com/receive-webhook/7654\" ``` ``` # Handshake sent to https://example.com/ POST /receive-webhook/7654 X-Hook-Secret: b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81 ``` ``` # Handshake response sent by example.com HTTP/1.1 200 X-Hook-Secret: b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81 ``` ``` # Response HTTP/1.1 201 { \"data\": { \"gid\": \"43214\", \"resource\": { \"gid\": \"8675309\", \"name\": \"Bugs\" }, \"target\": \"https://example.com/receive-webhook/7654\", \"active\": false, \"last_success_at\": null, \"last_failure_at\": null, \"last_failure_content\": null }, \"X-Hook-Secret\": \"b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81\" } ```

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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "asana",
"version": "3.0.7",
"version": "3.0.8",
"description": "This_is_the_interface_for_interacting_with_the__Asana_Platform_httpsdevelopers_asana_com__Our_API_reference_is_generated_from_our__OpenAPI_spec__httpsraw_githubusercontent_comAsanaopenapimasterdefsasana_oas_yaml_",
"license": "Apache 2.0",
"main": "src/index.js",
Expand Down
6 changes: 3 additions & 3 deletions src/ApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import superagent from "superagent";

/**
* @module ApiClient
* @version 3.0.7
* @version 3.0.8
*/

/**
Expand Down Expand Up @@ -412,7 +412,7 @@ export class ApiClient {
if (typeof(navigator) === 'undefined' || typeof(window) === 'undefined') {
headerParams['X-Asana-Client-Lib'] = new URLSearchParams(
{
'version': "3.0.7",
'version': "3.0.8",
'language': 'NodeJS',
'language_version': process.version,
'os': process.platform
Expand All @@ -421,7 +421,7 @@ export class ApiClient {
} else {
headerParams['X-Asana-Client-Lib'] = new URLSearchParams(
{
'version': "3.0.7",
'version': "3.0.8",
'language': 'BrowserJS'
}
).toString();
Expand Down
2 changes: 1 addition & 1 deletion src/api/AllocationsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
/**
* Allocations service.
* @module api/AllocationsApi
* @version 3.0.7
* @version 3.0.8
*/
export class AllocationsApi {

Expand Down
2 changes: 1 addition & 1 deletion src/api/AttachmentsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
/**
* Attachments service.
* @module api/AttachmentsApi
* @version 3.0.7
* @version 3.0.8
*/
export class AttachmentsApi {

Expand Down
2 changes: 1 addition & 1 deletion src/api/AuditLogAPIApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
/**
* AuditLogAPI service.
* @module api/AuditLogAPIApi
* @version 3.0.7
* @version 3.0.8
*/
export class AuditLogAPIApi {

Expand Down
2 changes: 1 addition & 1 deletion src/api/BatchAPIApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
/**
* BatchAPI service.
* @module api/BatchAPIApi
* @version 3.0.7
* @version 3.0.8
*/
export class BatchAPIApi {

Expand Down
2 changes: 1 addition & 1 deletion src/api/CustomFieldSettingsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
/**
* CustomFieldSettings service.
* @module api/CustomFieldSettingsApi
* @version 3.0.7
* @version 3.0.8
*/
export class CustomFieldSettingsApi {

Expand Down
2 changes: 1 addition & 1 deletion src/api/CustomFieldsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
/**
* CustomFields service.
* @module api/CustomFieldsApi
* @version 3.0.7
* @version 3.0.8
*/
export class CustomFieldsApi {

Expand Down
2 changes: 1 addition & 1 deletion src/api/EventsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
/**
* Events service.
* @module api/EventsApi
* @version 3.0.7
* @version 3.0.8
*/
export class EventsApi {

Expand Down
2 changes: 1 addition & 1 deletion src/api/GoalRelationshipsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
/**
* GoalRelationships service.
* @module api/GoalRelationshipsApi
* @version 3.0.7
* @version 3.0.8
*/
export class GoalRelationshipsApi {

Expand Down
2 changes: 1 addition & 1 deletion src/api/GoalsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
/**
* Goals service.
* @module api/GoalsApi
* @version 3.0.7
* @version 3.0.8
*/
export class GoalsApi {

Expand Down
2 changes: 1 addition & 1 deletion src/api/JobsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
/**
* Jobs service.
* @module api/JobsApi
* @version 3.0.7
* @version 3.0.8
*/
export class JobsApi {

Expand Down
2 changes: 1 addition & 1 deletion src/api/MembershipsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
/**
* Memberships service.
* @module api/MembershipsApi
* @version 3.0.7
* @version 3.0.8
*/
export class MembershipsApi {

Expand Down
2 changes: 1 addition & 1 deletion src/api/OrganizationExportsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
/**
* OrganizationExports service.
* @module api/OrganizationExportsApi
* @version 3.0.7
* @version 3.0.8
*/
export class OrganizationExportsApi {

Expand Down
2 changes: 1 addition & 1 deletion src/api/PortfolioMembershipsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
/**
* PortfolioMemberships service.
* @module api/PortfolioMembershipsApi
* @version 3.0.7
* @version 3.0.8
*/
export class PortfolioMembershipsApi {

Expand Down
2 changes: 1 addition & 1 deletion src/api/PortfoliosApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
/**
* Portfolios service.
* @module api/PortfoliosApi
* @version 3.0.7
* @version 3.0.8
*/
export class PortfoliosApi {

Expand Down
Loading

0 comments on commit a3493f7

Please sign in to comment.