Skip to content

Commit

Permalink
Updated JavaScript SDK: v3.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
asana-publish-client-libraries[bot] committed Aug 22, 2024
1 parent a3493f7 commit 4d06a3a
Show file tree
Hide file tree
Showing 47 changed files with 79 additions and 79 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.8
- Package version: 3.0.9

## 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.8/asana-min.js"></script>
<script src="https://github.com/Asana/node-asana/releases/download/v3.0.9/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.8
[release-url]: https://github.com/Asana/node-asana/releases/tag/v3.0.9
[npm-image]: http://img.shields.io/npm/v/asana.svg?style=flat-square
[npm-url]: https://www.npmjs.org/package/asana
4 changes: 2 additions & 2 deletions docs/MembershipsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ object

Get multiple memberships

Returns compact `goal_membership` or `project_membership` records. The possible types for `parent` in this request are `goal` or `project`. An additional member (user GID or team GID) can be passed in to filter to a specific membership.
Returns compact `goal_membership`, `project_membership`, or `portfolio_membership` records. The possible types for `parent` in this request are `goal`, `project`, or `portfolio`. An additional member (user GID or team GID) can be passed in to filter to a specific membership. Teams are not supported for portfolios yet.

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

Expand Down Expand Up @@ -180,7 +180,7 @@ membershipsApiInstance.getMemberships(opts).then((result) => {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**parent** | **String**| Globally unique identifier for &#x60;goal&#x60; or &#x60;project&#x60;. | [optional]
**parent** | **String**| Globally unique identifier for &#x60;goal&#x60;, &#x60;project&#x60;, or &#x60;portfolio&#x60;. | [optional]
**member** | **String**| Globally unique identifier for &#x60;team&#x60; or &#x60;user&#x60;. | [optional]
**limit** | **Number**| Results per page. The number of objects to return per page. The value must be between 1 and 100. | [optional]
**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]
Expand Down
6 changes: 3 additions & 3 deletions docs/PortfolioMembershipsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ token.accessToken = '<YOUR_ACCESS_TOKEN>';
let portfolioMembershipsApiInstance = new Asana.PortfolioMembershipsApi();
let portfolio_membership_gid = "1331"; // String |
let opts = {
'opt_fields': "portfolio,portfolio.name,user,user.name"
'opt_fields': "access_level,portfolio,portfolio.name,user,user.name"
};
portfolioMembershipsApiInstance.getPortfolioMembership(portfolio_membership_gid, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down Expand Up @@ -78,7 +78,7 @@ let opts = {
'user': "me",
'limit': 50,
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
'opt_fields': "offset,path,portfolio,portfolio.name,uri,user,user.name"
'opt_fields': "access_level,offset,path,portfolio,portfolio.name,uri,user,user.name"
};
portfolioMembershipsApiInstance.getPortfolioMemberships(opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down Expand Up @@ -131,7 +131,7 @@ let opts = {
'user': "me",
'limit': 50,
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
'opt_fields': "offset,path,portfolio,portfolio.name,uri,user,user.name"
'opt_fields': "access_level,offset,path,portfolio,portfolio.name,uri,user,user.name"
};
portfolioMembershipsApiInstance.getPortfolioMembershipsForPortfolio(portfolio_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/PortfolioMembershipsApi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ PortfolioMembershipsApi:
let portfolioMembershipsApiInstance = new Asana.PortfolioMembershipsApi();
let portfolio_membership_gid = "1331"; // String |
let opts = {
'opt_fields': "portfolio,portfolio.name,user,user.name"
'opt_fields': "access_level,portfolio,portfolio.name,user,user.name"
};
portfolioMembershipsApiInstance.getPortfolioMembership(portfolio_membership_gid, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand All @@ -31,7 +31,7 @@ PortfolioMembershipsApi:
'user': "me",
'limit': 50,
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
'opt_fields': "offset,path,portfolio,portfolio.name,uri,user,user.name"
'opt_fields': "access_level,offset,path,portfolio,portfolio.name,uri,user,user.name"
};
portfolioMembershipsApiInstance.getPortfolioMemberships(opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand All @@ -52,7 +52,7 @@ PortfolioMembershipsApi:
'user': "me",
'limit': 50,
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
'opt_fields': "offset,path,portfolio,portfolio.name,uri,user,user.name"
'opt_fields': "access_level,offset,path,portfolio,portfolio.name,uri,user,user.name"
};
portfolioMembershipsApiInstance.getPortfolioMembershipsForPortfolio(portfolio_gid, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down
12 changes: 6 additions & 6 deletions docs/PortfoliosApi.md

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions docs/PortfoliosApi.yaml

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions 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 }, \"X-Hook-Secret\": \"b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81\" } ```
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 receive 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 All @@ -30,7 +30,7 @@ token.accessToken = '<YOUR_ACCESS_TOKEN>';
let webhooksApiInstance = new Asana.WebhooksApi();
let body = {"data": {"<PARAM_1>": "<VALUE_1>", "<PARAM_2>": "<VALUE_2>",}}; // Object | The webhook workspace and target.
let opts = {
'opt_fields': "active,created_at,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,resource,resource.name,target"
'opt_fields': "active,created_at,delivery_retry_count,failure_deletion_timestamp,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,next_attempt_after,resource,resource.name,target"
};
webhooksApiInstance.createWebhook(body, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down Expand Up @@ -119,7 +119,7 @@ token.accessToken = '<YOUR_ACCESS_TOKEN>';
let webhooksApiInstance = new Asana.WebhooksApi();
let webhook_gid = "12345"; // String | Globally unique identifier for the webhook.
let opts = {
'opt_fields': "active,created_at,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,resource,resource.name,target"
'opt_fields': "active,created_at,delivery_retry_count,failure_deletion_timestamp,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,next_attempt_after,resource,resource.name,target"
};
webhooksApiInstance.getWebhook(webhook_gid, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down Expand Up @@ -168,7 +168,7 @@ let opts = {
'limit': 50,
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
'resource': "51648",
'opt_fields': "active,created_at,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,offset,path,resource,resource.name,target,uri"
'opt_fields': "active,created_at,delivery_retry_count,failure_deletion_timestamp,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,next_attempt_after,offset,path,resource,resource.name,target,uri"
};
webhooksApiInstance.getWebhooks(workspace, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down Expand Up @@ -218,7 +218,7 @@ let webhooksApiInstance = new Asana.WebhooksApi();
let body = {"data": {"<PARAM_1>": "<VALUE_1>", "<PARAM_2>": "<VALUE_2>",}}; // Object | The updated filters for the webhook.
let webhook_gid = "12345"; // String | Globally unique identifier for the webhook.
let opts = {
'opt_fields': "active,created_at,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,resource,resource.name,target"
'opt_fields': "active,created_at,delivery_retry_count,failure_deletion_timestamp,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,next_attempt_after,resource,resource.name,target"
};
webhooksApiInstance.updateWebhook(body, webhook_gid, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down
8 changes: 4 additions & 4 deletions docs/WebhooksApi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ WebhooksApi:
let webhooksApiInstance = new Asana.WebhooksApi();
let body = {"data": {"<PARAM_1>": "<VALUE_1>", "<PARAM_2>": "<VALUE_2>",}}; // Object | The webhook workspace and target.
let opts = {
'opt_fields': "active,created_at,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,resource,resource.name,target"
'opt_fields': "active,created_at,delivery_retry_count,failure_deletion_timestamp,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,next_attempt_after,resource,resource.name,target"
};
webhooksApiInstance.createWebhook(body, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand Down Expand Up @@ -43,7 +43,7 @@ WebhooksApi:
let webhooksApiInstance = new Asana.WebhooksApi();
let webhook_gid = "12345"; // String | Globally unique identifier for the webhook.
let opts = {
'opt_fields': "active,created_at,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,resource,resource.name,target"
'opt_fields': "active,created_at,delivery_retry_count,failure_deletion_timestamp,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,next_attempt_after,resource,resource.name,target"
};
webhooksApiInstance.getWebhook(webhook_gid, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand All @@ -64,7 +64,7 @@ WebhooksApi:
'limit': 50,
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
'resource': "51648",
'opt_fields': "active,created_at,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,offset,path,resource,resource.name,target,uri"
'opt_fields': "active,created_at,delivery_retry_count,failure_deletion_timestamp,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,next_attempt_after,offset,path,resource,resource.name,target,uri"
};
webhooksApiInstance.getWebhooks(workspace, opts).then((result) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
Expand All @@ -83,7 +83,7 @@ WebhooksApi:
let body = {"data": {"<PARAM_1>": "<VALUE_1>", "<PARAM_2>": "<VALUE_2>",}}; // Object | The updated filters for the webhook.
let webhook_gid = "12345"; // String | Globally unique identifier for the webhook.
let opts = {
'opt_fields': "active,created_at,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,resource,resource.name,target"
'opt_fields': "active,created_at,delivery_retry_count,failure_deletion_timestamp,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,next_attempt_after,resource,resource.name,target"
};
webhooksApiInstance.updateWebhook(body, webhook_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 package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "asana",
"version": "3.0.8",
"version": "3.0.9",
"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.8
* @version 3.0.9
*/

/**
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.8",
'version': "3.0.9",
'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.8",
'version': "3.0.9",
'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.8
* @version 3.0.9
*/
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.8
* @version 3.0.9
*/
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.8
* @version 3.0.9
*/
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.8
* @version 3.0.9
*/
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.8
* @version 3.0.9
*/
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.8
* @version 3.0.9
*/
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.8
* @version 3.0.9
*/
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.8
* @version 3.0.9
*/
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.8
* @version 3.0.9
*/
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.8
* @version 3.0.9
*/
export class JobsApi {

Expand Down
Loading

0 comments on commit 4d06a3a

Please sign in to comment.