From a3493f7437a4a160b8fba74f51cf633d15cce196 Mon Sep 17 00:00:00 2001 From: "asana-publish-client-libraries[bot]" <159857493+asana-publish-client-libraries[bot]@users.noreply.github.com> Date: Sat, 27 Jul 2024 01:37:13 +0000 Subject: [PATCH] Updated JavaScript SDK: v3.0.8 --- README.md | 6 +++--- docs/TeamsApi.md | 10 +++++----- docs/TeamsApi.yaml | 10 +++++----- docs/WebhooksApi.md | 2 +- package.json | 2 +- src/ApiClient.js | 6 +++--- src/api/AllocationsApi.js | 2 +- src/api/AttachmentsApi.js | 2 +- src/api/AuditLogAPIApi.js | 2 +- src/api/BatchAPIApi.js | 2 +- src/api/CustomFieldSettingsApi.js | 2 +- src/api/CustomFieldsApi.js | 2 +- src/api/EventsApi.js | 2 +- src/api/GoalRelationshipsApi.js | 2 +- src/api/GoalsApi.js | 2 +- src/api/JobsApi.js | 2 +- src/api/MembershipsApi.js | 2 +- src/api/OrganizationExportsApi.js | 2 +- src/api/PortfolioMembershipsApi.js | 2 +- src/api/PortfoliosApi.js | 2 +- src/api/ProjectBriefsApi.js | 2 +- src/api/ProjectMembershipsApi.js | 2 +- src/api/ProjectStatusesApi.js | 2 +- src/api/ProjectTemplatesApi.js | 2 +- src/api/ProjectsApi.js | 2 +- src/api/RulesApi.js | 2 +- src/api/SectionsApi.js | 2 +- src/api/StatusUpdatesApi.js | 2 +- src/api/StoriesApi.js | 2 +- src/api/TagsApi.js | 2 +- src/api/TaskTemplatesApi.js | 2 +- src/api/TasksApi.js | 2 +- src/api/TeamMembershipsApi.js | 2 +- src/api/TeamsApi.js | 2 +- src/api/TimePeriodsApi.js | 2 +- src/api/TimeTrackingEntriesApi.js | 2 +- src/api/TypeaheadApi.js | 2 +- src/api/UserTaskListsApi.js | 2 +- src/api/UsersApi.js | 2 +- src/api/WebhooksApi.js | 6 +++--- src/api/WorkspaceMembershipsApi.js | 2 +- src/api/WorkspacesApi.js | 2 +- src/index.js | 2 +- 43 files changed, 57 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index 179291c..b8f4eda 100644 --- a/README.md +++ b/README.md @@ -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 @@ -18,7 +18,7 @@ npm install asana --save Include the latest release directly from GitHub: ```html - + ``` Example usage (**NOTE**: be careful not to expose your access token): @@ -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 diff --git a/docs/TeamsApi.md b/docs/TeamsApi.md index 7264597..2e329bf 100644 --- a/docs/TeamsApi.md +++ b/docs/TeamsApi.md @@ -80,7 +80,7 @@ token.accessToken = ''; let teamsApiInstance = new Asana.TeamsApi(); let body = {"data": {"": "", "": "",}}; // 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)); @@ -126,7 +126,7 @@ token.accessToken = ''; 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)); @@ -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)); @@ -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)); @@ -320,7 +320,7 @@ let teamsApiInstance = new Asana.TeamsApi(); let body = {"data": {"": "", "": "",}}; // 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)); diff --git a/docs/TeamsApi.yaml b/docs/TeamsApi.yaml index c8ff670..e2287f4 100644 --- a/docs/TeamsApi.yaml +++ b/docs/TeamsApi.yaml @@ -28,7 +28,7 @@ TeamsApi: let teamsApiInstance = new Asana.TeamsApi(); let body = {"data": {"": "", "": "",}}; // 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)); @@ -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)); @@ -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)); @@ -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)); @@ -123,7 +123,7 @@ TeamsApi: let body = {"data": {"": "", "": "",}}; // 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)); diff --git a/docs/WebhooksApi.md b/docs/WebhooksApi.md index 8d12075..68b65fe 100644 --- a/docs/WebhooksApi.md +++ b/docs/WebhooksApi.md @@ -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 \" \\ -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 \" \\ -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)) diff --git a/package.json b/package.json index 36feb88..629c17a 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/ApiClient.js b/src/ApiClient.js index a52a0e3..33a6b1b 100644 --- a/src/ApiClient.js +++ b/src/ApiClient.js @@ -16,7 +16,7 @@ import superagent from "superagent"; /** * @module ApiClient -* @version 3.0.7 +* @version 3.0.8 */ /** @@ -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 @@ -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(); diff --git a/src/api/AllocationsApi.js b/src/api/AllocationsApi.js index d7d48c8..51a9d83 100644 --- a/src/api/AllocationsApi.js +++ b/src/api/AllocationsApi.js @@ -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 { diff --git a/src/api/AttachmentsApi.js b/src/api/AttachmentsApi.js index b6baa42..19d009d 100644 --- a/src/api/AttachmentsApi.js +++ b/src/api/AttachmentsApi.js @@ -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 { diff --git a/src/api/AuditLogAPIApi.js b/src/api/AuditLogAPIApi.js index 37c34e8..ecbd525 100644 --- a/src/api/AuditLogAPIApi.js +++ b/src/api/AuditLogAPIApi.js @@ -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 { diff --git a/src/api/BatchAPIApi.js b/src/api/BatchAPIApi.js index f2dae2f..2cca69b 100644 --- a/src/api/BatchAPIApi.js +++ b/src/api/BatchAPIApi.js @@ -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 { diff --git a/src/api/CustomFieldSettingsApi.js b/src/api/CustomFieldSettingsApi.js index 8d78668..d964820 100644 --- a/src/api/CustomFieldSettingsApi.js +++ b/src/api/CustomFieldSettingsApi.js @@ -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 { diff --git a/src/api/CustomFieldsApi.js b/src/api/CustomFieldsApi.js index 09d7e84..3268956 100644 --- a/src/api/CustomFieldsApi.js +++ b/src/api/CustomFieldsApi.js @@ -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 { diff --git a/src/api/EventsApi.js b/src/api/EventsApi.js index 585b34d..9b915e1 100644 --- a/src/api/EventsApi.js +++ b/src/api/EventsApi.js @@ -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 { diff --git a/src/api/GoalRelationshipsApi.js b/src/api/GoalRelationshipsApi.js index ec01769..c03e719 100644 --- a/src/api/GoalRelationshipsApi.js +++ b/src/api/GoalRelationshipsApi.js @@ -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 { diff --git a/src/api/GoalsApi.js b/src/api/GoalsApi.js index ebf1e1f..e18f17e 100644 --- a/src/api/GoalsApi.js +++ b/src/api/GoalsApi.js @@ -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 { diff --git a/src/api/JobsApi.js b/src/api/JobsApi.js index f7046b7..30d3f86 100644 --- a/src/api/JobsApi.js +++ b/src/api/JobsApi.js @@ -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 { diff --git a/src/api/MembershipsApi.js b/src/api/MembershipsApi.js index 7d9d8ab..d7dd15a 100644 --- a/src/api/MembershipsApi.js +++ b/src/api/MembershipsApi.js @@ -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 { diff --git a/src/api/OrganizationExportsApi.js b/src/api/OrganizationExportsApi.js index 700b0c7..b0adeed 100644 --- a/src/api/OrganizationExportsApi.js +++ b/src/api/OrganizationExportsApi.js @@ -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 { diff --git a/src/api/PortfolioMembershipsApi.js b/src/api/PortfolioMembershipsApi.js index 542a495..41611ea 100644 --- a/src/api/PortfolioMembershipsApi.js +++ b/src/api/PortfolioMembershipsApi.js @@ -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 { diff --git a/src/api/PortfoliosApi.js b/src/api/PortfoliosApi.js index ca6650a..2981faa 100644 --- a/src/api/PortfoliosApi.js +++ b/src/api/PortfoliosApi.js @@ -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 { diff --git a/src/api/ProjectBriefsApi.js b/src/api/ProjectBriefsApi.js index 4a3c0aa..45ac53c 100644 --- a/src/api/ProjectBriefsApi.js +++ b/src/api/ProjectBriefsApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * ProjectBriefs service. * @module api/ProjectBriefsApi -* @version 3.0.7 +* @version 3.0.8 */ export class ProjectBriefsApi { diff --git a/src/api/ProjectMembershipsApi.js b/src/api/ProjectMembershipsApi.js index 1d436df..8c74044 100644 --- a/src/api/ProjectMembershipsApi.js +++ b/src/api/ProjectMembershipsApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * ProjectMemberships service. * @module api/ProjectMembershipsApi -* @version 3.0.7 +* @version 3.0.8 */ export class ProjectMembershipsApi { diff --git a/src/api/ProjectStatusesApi.js b/src/api/ProjectStatusesApi.js index 23d14e8..f153bc8 100644 --- a/src/api/ProjectStatusesApi.js +++ b/src/api/ProjectStatusesApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * ProjectStatuses service. * @module api/ProjectStatusesApi -* @version 3.0.7 +* @version 3.0.8 */ export class ProjectStatusesApi { diff --git a/src/api/ProjectTemplatesApi.js b/src/api/ProjectTemplatesApi.js index 614dde4..07ffad5 100644 --- a/src/api/ProjectTemplatesApi.js +++ b/src/api/ProjectTemplatesApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * ProjectTemplates service. * @module api/ProjectTemplatesApi -* @version 3.0.7 +* @version 3.0.8 */ export class ProjectTemplatesApi { diff --git a/src/api/ProjectsApi.js b/src/api/ProjectsApi.js index 35b32a0..6667eb1 100644 --- a/src/api/ProjectsApi.js +++ b/src/api/ProjectsApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * Projects service. * @module api/ProjectsApi -* @version 3.0.7 +* @version 3.0.8 */ export class ProjectsApi { diff --git a/src/api/RulesApi.js b/src/api/RulesApi.js index 04b0349..6455a36 100644 --- a/src/api/RulesApi.js +++ b/src/api/RulesApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * Rules service. * @module api/RulesApi -* @version 3.0.7 +* @version 3.0.8 */ export class RulesApi { diff --git a/src/api/SectionsApi.js b/src/api/SectionsApi.js index a0e11f7..06b326b 100644 --- a/src/api/SectionsApi.js +++ b/src/api/SectionsApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * Sections service. * @module api/SectionsApi -* @version 3.0.7 +* @version 3.0.8 */ export class SectionsApi { diff --git a/src/api/StatusUpdatesApi.js b/src/api/StatusUpdatesApi.js index 5ffe1c7..6fc2ac4 100644 --- a/src/api/StatusUpdatesApi.js +++ b/src/api/StatusUpdatesApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * StatusUpdates service. * @module api/StatusUpdatesApi -* @version 3.0.7 +* @version 3.0.8 */ export class StatusUpdatesApi { diff --git a/src/api/StoriesApi.js b/src/api/StoriesApi.js index 8c7018c..7cd67d5 100644 --- a/src/api/StoriesApi.js +++ b/src/api/StoriesApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * Stories service. * @module api/StoriesApi -* @version 3.0.7 +* @version 3.0.8 */ export class StoriesApi { diff --git a/src/api/TagsApi.js b/src/api/TagsApi.js index 49d54eb..156533f 100644 --- a/src/api/TagsApi.js +++ b/src/api/TagsApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * Tags service. * @module api/TagsApi -* @version 3.0.7 +* @version 3.0.8 */ export class TagsApi { diff --git a/src/api/TaskTemplatesApi.js b/src/api/TaskTemplatesApi.js index a82fd19..c3c5b88 100644 --- a/src/api/TaskTemplatesApi.js +++ b/src/api/TaskTemplatesApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * TaskTemplates service. * @module api/TaskTemplatesApi -* @version 3.0.7 +* @version 3.0.8 */ export class TaskTemplatesApi { diff --git a/src/api/TasksApi.js b/src/api/TasksApi.js index 926b072..ba089f8 100644 --- a/src/api/TasksApi.js +++ b/src/api/TasksApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * Tasks service. * @module api/TasksApi -* @version 3.0.7 +* @version 3.0.8 */ export class TasksApi { diff --git a/src/api/TeamMembershipsApi.js b/src/api/TeamMembershipsApi.js index cdd3ac9..f8c5ddb 100644 --- a/src/api/TeamMembershipsApi.js +++ b/src/api/TeamMembershipsApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * TeamMemberships service. * @module api/TeamMembershipsApi -* @version 3.0.7 +* @version 3.0.8 */ export class TeamMembershipsApi { diff --git a/src/api/TeamsApi.js b/src/api/TeamsApi.js index 2fa9307..a6aecf2 100644 --- a/src/api/TeamsApi.js +++ b/src/api/TeamsApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * Teams service. * @module api/TeamsApi -* @version 3.0.7 +* @version 3.0.8 */ export class TeamsApi { diff --git a/src/api/TimePeriodsApi.js b/src/api/TimePeriodsApi.js index d5ccad9..fed9e52 100644 --- a/src/api/TimePeriodsApi.js +++ b/src/api/TimePeriodsApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * TimePeriods service. * @module api/TimePeriodsApi -* @version 3.0.7 +* @version 3.0.8 */ export class TimePeriodsApi { diff --git a/src/api/TimeTrackingEntriesApi.js b/src/api/TimeTrackingEntriesApi.js index 5ff3365..a66d74f 100644 --- a/src/api/TimeTrackingEntriesApi.js +++ b/src/api/TimeTrackingEntriesApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * TimeTrackingEntries service. * @module api/TimeTrackingEntriesApi -* @version 3.0.7 +* @version 3.0.8 */ export class TimeTrackingEntriesApi { diff --git a/src/api/TypeaheadApi.js b/src/api/TypeaheadApi.js index f16d32f..1ba0ba5 100644 --- a/src/api/TypeaheadApi.js +++ b/src/api/TypeaheadApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * Typeahead service. * @module api/TypeaheadApi -* @version 3.0.7 +* @version 3.0.8 */ export class TypeaheadApi { diff --git a/src/api/UserTaskListsApi.js b/src/api/UserTaskListsApi.js index d0c1f78..d5d2709 100644 --- a/src/api/UserTaskListsApi.js +++ b/src/api/UserTaskListsApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * UserTaskLists service. * @module api/UserTaskListsApi -* @version 3.0.7 +* @version 3.0.8 */ export class UserTaskListsApi { diff --git a/src/api/UsersApi.js b/src/api/UsersApi.js index 6f3ac8c..f2a2d86 100644 --- a/src/api/UsersApi.js +++ b/src/api/UsersApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * Users service. * @module api/UsersApi -* @version 3.0.7 +* @version 3.0.8 */ export class UsersApi { diff --git a/src/api/WebhooksApi.js b/src/api/WebhooksApi.js index cb41b24..badcdb3 100644 --- a/src/api/WebhooksApi.js +++ b/src/api/WebhooksApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * Webhooks service. * @module api/WebhooksApi -* @version 3.0.7 +* @version 3.0.8 */ export class WebhooksApi { @@ -38,7 +38,7 @@ export class WebhooksApi { /** * 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\" } ``` * @param {module:model/Object} body The webhook workspace and target. * @param {Object} opts Optional parameters * @param {Array.} opts.opt_fields 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. @@ -80,7 +80,7 @@ export class WebhooksApi { /** * 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\" } ``` * @param {<&vendorExtensions.x-jsdoc-type>} body The webhook workspace and target. * @param {Object} opts Optional parameters * @param {Array.} opts.opt_fields 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. diff --git a/src/api/WorkspaceMembershipsApi.js b/src/api/WorkspaceMembershipsApi.js index 360e4fa..0d8f7e6 100644 --- a/src/api/WorkspaceMembershipsApi.js +++ b/src/api/WorkspaceMembershipsApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * WorkspaceMemberships service. * @module api/WorkspaceMembershipsApi -* @version 3.0.7 +* @version 3.0.8 */ export class WorkspaceMembershipsApi { diff --git a/src/api/WorkspacesApi.js b/src/api/WorkspacesApi.js index 147665e..5a80c6d 100644 --- a/src/api/WorkspacesApi.js +++ b/src/api/WorkspacesApi.js @@ -18,7 +18,7 @@ var Collection = require('../utils/collection'); /** * Workspaces service. * @module api/WorkspacesApi -* @version 3.0.7 +* @version 3.0.8 */ export class WorkspacesApi { diff --git a/src/index.js b/src/index.js index 50a288f..7cc43eb 100644 --- a/src/index.js +++ b/src/index.js @@ -79,7 +79,7 @@ import {WorkspacesApi} from './api/WorkspacesApi'; * *

* @module index -* @version 3.0.7 +* @version 3.0.8 */ export { /**