asana 3.1.3 → 3.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -60
- package/codegen/templates/code_sample.mustache +1 -1
- package/codegen/templates/code_sample_client.mustache +2 -3
- package/dist/ApiClient.js +3 -3
- package/dist/api/AccessRequestsApi.js +1 -1
- package/dist/api/AllocationsApi.js +1 -1
- package/dist/api/AttachmentsApi.js +1 -1
- package/dist/api/AuditLogAPIApi.js +1 -1
- package/dist/api/BatchAPIApi.js +1 -1
- package/dist/api/BudgetsApi.js +1 -1
- package/dist/api/CustomFieldSettingsApi.js +144 -4
- package/dist/api/CustomFieldsApi.js +1 -1
- package/dist/api/CustomTypesApi.js +1 -1
- package/dist/api/EventsApi.js +1 -1
- package/dist/api/ExportsApi.js +1 -1
- package/dist/api/GoalRelationshipsApi.js +1 -1
- package/dist/api/GoalsApi.js +100 -6
- package/dist/api/JobsApi.js +1 -1
- package/dist/api/MembershipsApi.js +1 -1
- package/dist/api/OrganizationExportsApi.js +1 -1
- package/dist/api/PortfolioMembershipsApi.js +1 -1
- package/dist/api/PortfoliosApi.js +1 -1
- package/dist/api/ProjectBriefsApi.js +1 -1
- package/dist/api/ProjectMembershipsApi.js +1 -1
- package/dist/api/ProjectStatusesApi.js +1 -1
- package/dist/api/ProjectTemplatesApi.js +1 -1
- package/dist/api/ProjectsApi.js +1 -1
- package/dist/api/RatesApi.js +1 -1
- package/dist/api/ReactionsApi.js +1 -1
- package/dist/api/RulesApi.js +1 -1
- package/dist/api/SectionsApi.js +1 -1
- package/dist/api/StatusUpdatesApi.js +1 -1
- package/dist/api/StoriesApi.js +1 -1
- package/dist/api/TagsApi.js +1 -1
- package/dist/api/TaskTemplatesApi.js +1 -1
- package/dist/api/TasksApi.js +1 -1
- package/dist/api/TeamMembershipsApi.js +1 -1
- package/dist/api/TeamsApi.js +1 -1
- package/dist/api/TimePeriodsApi.js +1 -1
- package/dist/api/TimeTrackingEntriesApi.js +7 -3
- package/dist/api/TypeaheadApi.js +1 -1
- package/dist/api/UserTaskListsApi.js +1 -1
- package/dist/api/UsersApi.js +175 -1
- package/dist/api/WebhooksApi.js +1 -1
- package/dist/api/WorkspaceMembershipsApi.js +1 -1
- package/dist/api/WorkspacesApi.js +1 -1
- package/package.json +1 -1
- package/src/ApiClient.js +3 -3
- package/src/api/AccessRequestsApi.js +1 -1
- package/src/api/AllocationsApi.js +1 -1
- package/src/api/AttachmentsApi.js +1 -1
- package/src/api/AuditLogAPIApi.js +1 -1
- package/src/api/BatchAPIApi.js +1 -1
- package/src/api/BudgetsApi.js +1 -1
- package/src/api/CustomFieldSettingsApi.js +179 -1
- package/src/api/CustomFieldsApi.js +1 -1
- package/src/api/CustomTypesApi.js +1 -1
- package/src/api/EventsApi.js +1 -1
- package/src/api/ExportsApi.js +1 -1
- package/src/api/GoalRelationshipsApi.js +1 -1
- package/src/api/GoalsApi.js +119 -1
- package/src/api/JobsApi.js +1 -1
- package/src/api/MembershipsApi.js +1 -1
- package/src/api/OrganizationExportsApi.js +1 -1
- package/src/api/PortfolioMembershipsApi.js +1 -1
- package/src/api/PortfoliosApi.js +1 -1
- package/src/api/ProjectBriefsApi.js +1 -1
- package/src/api/ProjectMembershipsApi.js +1 -1
- package/src/api/ProjectStatusesApi.js +1 -1
- package/src/api/ProjectTemplatesApi.js +1 -1
- package/src/api/ProjectsApi.js +1 -1
- package/src/api/RatesApi.js +1 -1
- package/src/api/ReactionsApi.js +1 -1
- package/src/api/RulesApi.js +1 -1
- package/src/api/SectionsApi.js +1 -1
- package/src/api/StatusUpdatesApi.js +1 -1
- package/src/api/StoriesApi.js +1 -1
- package/src/api/TagsApi.js +1 -1
- package/src/api/TaskTemplatesApi.js +1 -1
- package/src/api/TasksApi.js +1 -1
- package/src/api/TeamMembershipsApi.js +1 -1
- package/src/api/TeamsApi.js +1 -1
- package/src/api/TimePeriodsApi.js +1 -1
- package/src/api/TimeTrackingEntriesApi.js +7 -3
- package/src/api/TypeaheadApi.js +1 -1
- package/src/api/UserTaskListsApi.js +1 -1
- package/src/api/UsersApi.js +206 -1
- package/src/api/WebhooksApi.js +1 -1
- package/src/api/WorkspaceMembershipsApi.js +1 -1
- package/src/api/WorkspacesApi.js +1 -1
- package/src/index.js +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# asana [![GitHub release][release-image]][release-url] [![NPM Version][npm-image]][npm-url]
|
|
2
2
|
|
|
3
3
|
- API version: 1.0
|
|
4
|
-
- Package version: 3.1.
|
|
4
|
+
- Package version: 3.1.4
|
|
5
5
|
|
|
6
6
|
## Installation
|
|
7
7
|
|
|
@@ -18,7 +18,7 @@ npm install asana --save
|
|
|
18
18
|
Include the latest release directly from GitHub:
|
|
19
19
|
|
|
20
20
|
```html
|
|
21
|
-
<script src="https://github.com/Asana/node-asana/releases/download/v3.1.
|
|
21
|
+
<script src="https://github.com/Asana/node-asana/releases/download/v3.1.4/asana-min.js"></script>
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
Example usage (**NOTE**: be careful not to expose your access token):
|
|
@@ -66,9 +66,8 @@ Please follow the [installation](#installation) instruction and execute the foll
|
|
|
66
66
|
```javascript
|
|
67
67
|
const Asana = require('asana');
|
|
68
68
|
|
|
69
|
-
let client = Asana.ApiClient
|
|
70
|
-
|
|
71
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
69
|
+
let client = new Asana.ApiClient();
|
|
70
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
72
71
|
|
|
73
72
|
let usersApiInstance = new Asana.UsersApi();
|
|
74
73
|
let user_gid = "me"; // String | A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
|
|
@@ -89,9 +88,8 @@ usersApiInstance.getUser(user_gid, opts).then((result) => {
|
|
|
89
88
|
```javascript
|
|
90
89
|
const Asana = require('asana');
|
|
91
90
|
|
|
92
|
-
let client = Asana.ApiClient
|
|
93
|
-
|
|
94
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
91
|
+
let client = new Asana.ApiClient();
|
|
92
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
95
93
|
|
|
96
94
|
let tasksApiInstance = new Asana.TasksApi();
|
|
97
95
|
let opts = {
|
|
@@ -113,9 +111,8 @@ tasksApiInstance.getTasks(opts).then((result) => {
|
|
|
113
111
|
```javascript
|
|
114
112
|
const Asana = require('asana');
|
|
115
113
|
|
|
116
|
-
let client = Asana.ApiClient
|
|
117
|
-
|
|
118
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
114
|
+
let client = new Asana.ApiClient();
|
|
115
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
119
116
|
|
|
120
117
|
let tasksApiInstance = new Asana.TasksApi();
|
|
121
118
|
let body = {
|
|
@@ -149,9 +146,8 @@ tasksApiInstance.createTask(body, opts).then((result) => {
|
|
|
149
146
|
```javascript
|
|
150
147
|
const Asana = require('asana');
|
|
151
148
|
|
|
152
|
-
let client = Asana.ApiClient
|
|
153
|
-
|
|
154
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
149
|
+
let client = new Asana.ApiClient();
|
|
150
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
155
151
|
|
|
156
152
|
let tasksApiInstance = new Asana.TasksApi();
|
|
157
153
|
let task_gid = "<YOUR_TASK_GID>";
|
|
@@ -174,9 +170,8 @@ tasksApiInstance.updateTask(body, task_gid, opts).then((result) => {
|
|
|
174
170
|
```javascript
|
|
175
171
|
const Asana = require('asana');
|
|
176
172
|
|
|
177
|
-
let client = Asana.ApiClient
|
|
178
|
-
|
|
179
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
173
|
+
let client = new Asana.ApiClient();
|
|
174
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
180
175
|
|
|
181
176
|
let tasksApiInstance = new Asana.TasksApi();
|
|
182
177
|
let task_gid = "<YOUR_TASK_GID>";
|
|
@@ -215,8 +210,10 @@ Class | Method | HTTP request | Description
|
|
|
215
210
|
*Asana.BudgetsApi* | [**getBudget**](docs/BudgetsApi.md#getBudget) | **GET** /budgets/{budget_gid} | Get a budget
|
|
216
211
|
*Asana.BudgetsApi* | [**getBudgets**](docs/BudgetsApi.md#getBudgets) | **GET** /budgets | Get all budgets
|
|
217
212
|
*Asana.BudgetsApi* | [**updateBudget**](docs/BudgetsApi.md#updateBudget) | **PUT** /budgets/{budget_gid} | Update a budget
|
|
213
|
+
*Asana.CustomFieldSettingsApi* | [**getCustomFieldSettingsForGoal**](docs/CustomFieldSettingsApi.md#getCustomFieldSettingsForGoal) | **GET** /goals/{goal_gid}/custom_field_settings | Get a goal's custom fields
|
|
218
214
|
*Asana.CustomFieldSettingsApi* | [**getCustomFieldSettingsForPortfolio**](docs/CustomFieldSettingsApi.md#getCustomFieldSettingsForPortfolio) | **GET** /portfolios/{portfolio_gid}/custom_field_settings | Get a portfolio's custom fields
|
|
219
215
|
*Asana.CustomFieldSettingsApi* | [**getCustomFieldSettingsForProject**](docs/CustomFieldSettingsApi.md#getCustomFieldSettingsForProject) | **GET** /projects/{project_gid}/custom_field_settings | Get a project's custom fields
|
|
216
|
+
*Asana.CustomFieldSettingsApi* | [**getCustomFieldSettingsForTeam**](docs/CustomFieldSettingsApi.md#getCustomFieldSettingsForTeam) | **GET** /teams/{team_gid}/custom_field_settings | Get a team's custom fields
|
|
220
217
|
*Asana.CustomFieldsApi* | [**createCustomField**](docs/CustomFieldsApi.md#createCustomField) | **POST** /custom_fields | Create a custom field
|
|
221
218
|
*Asana.CustomFieldsApi* | [**createEnumOptionForCustomField**](docs/CustomFieldsApi.md#createEnumOptionForCustomField) | **POST** /custom_fields/{custom_field_gid}/enum_options | Create an enum option
|
|
222
219
|
*Asana.CustomFieldsApi* | [**deleteCustomField**](docs/CustomFieldsApi.md#deleteCustomField) | **DELETE** /custom_fields/{custom_field_gid} | Delete a custom field
|
|
@@ -235,6 +232,7 @@ Class | Method | HTTP request | Description
|
|
|
235
232
|
*Asana.GoalRelationshipsApi* | [**getGoalRelationships**](docs/GoalRelationshipsApi.md#getGoalRelationships) | **GET** /goal_relationships | Get goal relationships
|
|
236
233
|
*Asana.GoalRelationshipsApi* | [**removeSupportingRelationship**](docs/GoalRelationshipsApi.md#removeSupportingRelationship) | **POST** /goals/{goal_gid}/removeSupportingRelationship | Removes a supporting goal relationship
|
|
237
234
|
*Asana.GoalRelationshipsApi* | [**updateGoalRelationship**](docs/GoalRelationshipsApi.md#updateGoalRelationship) | **PUT** /goal_relationships/{goal_relationship_gid} | Update a goal relationship
|
|
235
|
+
*Asana.GoalsApi* | [**addCustomFieldSettingForGoal**](docs/GoalsApi.md#addCustomFieldSettingForGoal) | **POST** /goals/{goal_gid}/addCustomFieldSetting | Add a custom field to a goal
|
|
238
236
|
*Asana.GoalsApi* | [**addFollowers**](docs/GoalsApi.md#addFollowers) | **POST** /goals/{goal_gid}/addFollowers | Add a collaborator to a goal
|
|
239
237
|
*Asana.GoalsApi* | [**createGoal**](docs/GoalsApi.md#createGoal) | **POST** /goals | Create a goal
|
|
240
238
|
*Asana.GoalsApi* | [**createGoalMetric**](docs/GoalsApi.md#createGoalMetric) | **POST** /goals/{goal_gid}/setMetric | Create a goal metric
|
|
@@ -242,6 +240,7 @@ Class | Method | HTTP request | Description
|
|
|
242
240
|
*Asana.GoalsApi* | [**getGoal**](docs/GoalsApi.md#getGoal) | **GET** /goals/{goal_gid} | Get a goal
|
|
243
241
|
*Asana.GoalsApi* | [**getGoals**](docs/GoalsApi.md#getGoals) | **GET** /goals | Get goals
|
|
244
242
|
*Asana.GoalsApi* | [**getParentGoalsForGoal**](docs/GoalsApi.md#getParentGoalsForGoal) | **GET** /goals/{goal_gid}/parentGoals | Get parent goals from a goal
|
|
243
|
+
*Asana.GoalsApi* | [**removeCustomFieldSettingForGoal**](docs/GoalsApi.md#removeCustomFieldSettingForGoal) | **POST** /goals/{goal_gid}/removeCustomFieldSetting | Remove a custom field from a goal
|
|
245
244
|
*Asana.GoalsApi* | [**removeFollowers**](docs/GoalsApi.md#removeFollowers) | **POST** /goals/{goal_gid}/removeFollowers | Remove a collaborator from a goal
|
|
246
245
|
*Asana.GoalsApi* | [**updateGoal**](docs/GoalsApi.md#updateGoal) | **PUT** /goals/{goal_gid} | Update a goal
|
|
247
246
|
*Asana.GoalsApi* | [**updateGoalMetric**](docs/GoalsApi.md#updateGoalMetric) | **POST** /goals/{goal_gid}/setMetricCurrentValue | Update a goal metric
|
|
@@ -388,9 +387,12 @@ Class | Method | HTTP request | Description
|
|
|
388
387
|
*Asana.UserTaskListsApi* | [**getUserTaskListForUser**](docs/UserTaskListsApi.md#getUserTaskListForUser) | **GET** /users/{user_gid}/user_task_list | Get a user's task list
|
|
389
388
|
*Asana.UsersApi* | [**getFavoritesForUser**](docs/UsersApi.md#getFavoritesForUser) | **GET** /users/{user_gid}/favorites | Get a user's favorites
|
|
390
389
|
*Asana.UsersApi* | [**getUser**](docs/UsersApi.md#getUser) | **GET** /users/{user_gid} | Get a user
|
|
390
|
+
*Asana.UsersApi* | [**getUserForWorkspace**](docs/UsersApi.md#getUserForWorkspace) | **GET** /workspaces/{workspace_gid}/users/{user_gid} | Get a user in a workspace or organization
|
|
391
391
|
*Asana.UsersApi* | [**getUsers**](docs/UsersApi.md#getUsers) | **GET** /users | Get multiple users
|
|
392
392
|
*Asana.UsersApi* | [**getUsersForTeam**](docs/UsersApi.md#getUsersForTeam) | **GET** /teams/{team_gid}/users | Get users in a team
|
|
393
393
|
*Asana.UsersApi* | [**getUsersForWorkspace**](docs/UsersApi.md#getUsersForWorkspace) | **GET** /workspaces/{workspace_gid}/users | Get users in a workspace or organization
|
|
394
|
+
*Asana.UsersApi* | [**updateUser**](docs/UsersApi.md#updateUser) | **PUT** /users/{user_gid} | Update a user
|
|
395
|
+
*Asana.UsersApi* | [**updateUserForWorkspace**](docs/UsersApi.md#updateUserForWorkspace) | **PUT** /workspaces/{workspace_gid}/users/{user_gid} | Update a user in a workspace or organization
|
|
394
396
|
*Asana.WebhooksApi* | [**createWebhook**](docs/WebhooksApi.md#createWebhook) | **POST** /webhooks | Establish a webhook
|
|
395
397
|
*Asana.WebhooksApi* | [**deleteWebhook**](docs/WebhooksApi.md#deleteWebhook) | **DELETE** /webhooks/{webhook_gid} | Delete a webhook
|
|
396
398
|
*Asana.WebhooksApi* | [**getWebhook**](docs/WebhooksApi.md#getWebhook) | **GET** /webhooks/{webhook_gid} | Get a webhook
|
|
@@ -418,9 +420,8 @@ Our `opt_fields` feature allows you to request for properties of a resource that
|
|
|
418
420
|
```javascript
|
|
419
421
|
const Asana = require('asana');
|
|
420
422
|
|
|
421
|
-
let client = Asana.ApiClient
|
|
422
|
-
|
|
423
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
423
|
+
let client = new Asana.ApiClient();
|
|
424
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
424
425
|
|
|
425
426
|
let tasksApiInstance = new Asana.TasksApi();
|
|
426
427
|
let opts = {
|
|
@@ -460,9 +461,8 @@ tasksApiInstance.getTasks(opts).then((result) => {
|
|
|
460
461
|
```javascript
|
|
461
462
|
const Asana = require('asana');
|
|
462
463
|
|
|
463
|
-
let client = Asana.ApiClient
|
|
464
|
-
|
|
465
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
464
|
+
let client = new Asana.ApiClient();
|
|
465
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
466
466
|
|
|
467
467
|
let tasksApiInstance = new Asana.TasksApi();
|
|
468
468
|
let opts = {
|
|
@@ -609,9 +609,8 @@ EX: Pagination gather all resources
|
|
|
609
609
|
```javascript
|
|
610
610
|
const Asana = require('asana');
|
|
611
611
|
|
|
612
|
-
let client = Asana.ApiClient
|
|
613
|
-
|
|
614
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
612
|
+
let client = new Asana.ApiClient();
|
|
613
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
615
614
|
|
|
616
615
|
let tasksApiInstance = new Asana.TasksApi();
|
|
617
616
|
let opts = {
|
|
@@ -721,9 +720,8 @@ EX: Pagination do something per page
|
|
|
721
720
|
```javascript
|
|
722
721
|
const Asana = require('asana');
|
|
723
722
|
|
|
724
|
-
let client = Asana.ApiClient
|
|
725
|
-
|
|
726
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
723
|
+
let client = new Asana.ApiClient();
|
|
724
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
727
725
|
|
|
728
726
|
let tasksApiInstance = new Asana.TasksApi();
|
|
729
727
|
let opts = {
|
|
@@ -787,9 +785,8 @@ EX: Turning off pagination
|
|
|
787
785
|
```javascript
|
|
788
786
|
const Asana = require('asana');
|
|
789
787
|
|
|
790
|
-
let client = Asana.ApiClient
|
|
791
|
-
|
|
792
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
788
|
+
let client = new Asana.ApiClient();
|
|
789
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
793
790
|
|
|
794
791
|
// Turn off pagination
|
|
795
792
|
client.RETURN_COLLECTION = false;
|
|
@@ -831,9 +828,8 @@ request to [getEvents](docs/EventsApi.md#getEvents).
|
|
|
831
828
|
```javascript
|
|
832
829
|
const Asana = require('asana');
|
|
833
830
|
|
|
834
|
-
let client = Asana.ApiClient
|
|
835
|
-
|
|
836
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
831
|
+
let client = new Asana.ApiClient();
|
|
832
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
837
833
|
|
|
838
834
|
let eventsApiInstance = new Asana.EventsApi();
|
|
839
835
|
let resource = "<YOUR_TASK_OR_PROJECT_GID>"; // String | A resource ID to subscribe to. The resource can be a task or project.
|
|
@@ -903,9 +899,8 @@ Use the `<METHOD_NAME>WithHttpInfo` (EX: `getTaskWithHttpInfo`) method to make a
|
|
|
903
899
|
```javascript
|
|
904
900
|
const Asana = require('asana');
|
|
905
901
|
|
|
906
|
-
let client = Asana.ApiClient
|
|
907
|
-
|
|
908
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
902
|
+
let client = new Asana.ApiClient();
|
|
903
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
909
904
|
|
|
910
905
|
let tasksApiInstance = new Asana.TasksApi();
|
|
911
906
|
let task_gid = "<YOUR_TASK_GID>";
|
|
@@ -929,9 +924,8 @@ EX: Asana-Enable header
|
|
|
929
924
|
```javascript
|
|
930
925
|
const Asana = require('asana');
|
|
931
926
|
|
|
932
|
-
let client = Asana.ApiClient
|
|
933
|
-
|
|
934
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
927
|
+
let client = new Asana.ApiClient();
|
|
928
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
935
929
|
|
|
936
930
|
// Add asana-enable header for the client
|
|
937
931
|
client.defaultHeaders['asana-enable'] = 'new_goal_memberships';
|
|
@@ -941,9 +935,8 @@ EX: Asana-Disable header
|
|
|
941
935
|
```javascript
|
|
942
936
|
const Asana = require('asana');
|
|
943
937
|
|
|
944
|
-
let client = Asana.ApiClient
|
|
945
|
-
|
|
946
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
938
|
+
let client = new Asana.ApiClient();
|
|
939
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
947
940
|
|
|
948
941
|
// Add asana-disable header for the client
|
|
949
942
|
client.defaultHeaders['asana-disable'] = 'new_goal_memberships';
|
|
@@ -959,9 +952,8 @@ Use the `callApi` method to make http calls when the endpoint does not exist in
|
|
|
959
952
|
```javascript
|
|
960
953
|
const Asana = require('asana');
|
|
961
954
|
|
|
962
|
-
let client = Asana.ApiClient
|
|
963
|
-
|
|
964
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
955
|
+
let client = new Asana.ApiClient();
|
|
956
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
965
957
|
|
|
966
958
|
// GET - get a task
|
|
967
959
|
client.callApi(
|
|
@@ -989,9 +981,8 @@ client.callApi(
|
|
|
989
981
|
```javascript
|
|
990
982
|
const Asana = require('asana');
|
|
991
983
|
|
|
992
|
-
let client = Asana.ApiClient
|
|
993
|
-
|
|
994
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
984
|
+
let client = new Asana.ApiClient();
|
|
985
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
995
986
|
|
|
996
987
|
// GET - get multiple tasks -> with opt_fields
|
|
997
988
|
client.callApi(
|
|
@@ -1027,9 +1018,8 @@ client.callApi(
|
|
|
1027
1018
|
```javascript
|
|
1028
1019
|
const Asana = require('asana');
|
|
1029
1020
|
|
|
1030
|
-
let client = Asana.ApiClient
|
|
1031
|
-
|
|
1032
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
1021
|
+
let client = new Asana.ApiClient();
|
|
1022
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
1033
1023
|
|
|
1034
1024
|
// POST - create a task
|
|
1035
1025
|
client.callApi(
|
|
@@ -1069,9 +1059,8 @@ client.callApi(
|
|
|
1069
1059
|
```javascript
|
|
1070
1060
|
const Asana = require('asana');
|
|
1071
1061
|
|
|
1072
|
-
let client = Asana.ApiClient
|
|
1073
|
-
|
|
1074
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
1062
|
+
let client = new Asana.ApiClient();
|
|
1063
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
1075
1064
|
|
|
1076
1065
|
// PUT - update a task
|
|
1077
1066
|
client.callApi(
|
|
@@ -1105,9 +1094,8 @@ client.callApi(
|
|
|
1105
1094
|
```javascript
|
|
1106
1095
|
const Asana = require('asana');
|
|
1107
1096
|
|
|
1108
|
-
let client = Asana.ApiClient
|
|
1109
|
-
|
|
1110
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
1097
|
+
let client = new Asana.ApiClient();
|
|
1098
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';
|
|
1111
1099
|
|
|
1112
1100
|
// DELETE - delete a task
|
|
1113
1101
|
client.callApi(
|
|
@@ -1132,6 +1120,6 @@ client.callApi(
|
|
|
1132
1120
|
```
|
|
1133
1121
|
|
|
1134
1122
|
[release-image]: https://img.shields.io/github/release/asana/node-asana.svg
|
|
1135
|
-
[release-url]: https://github.com/Asana/node-asana/releases/tag/v3.1.
|
|
1123
|
+
[release-url]: https://github.com/Asana/node-asana/releases/tag/v3.1.4
|
|
1136
1124
|
[npm-image]: http://img.shields.io/npm/v/asana.svg?style=flat-square
|
|
1137
1125
|
[npm-url]: https://www.npmjs.org/package/asana
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{{>code_sample_client}}
|
|
2
2
|
|
|
3
|
-
let {{{vendorExtensions.x-codegen-resourceInstanceName}}} = new {{{moduleName}}}.{{{classname}}}();{{#hasParams}}
|
|
3
|
+
let {{{vendorExtensions.x-codegen-resourceInstanceName}}} = new {{{moduleName}}}.{{{classname}}}(client);{{#hasParams}}
|
|
4
4
|
{{#vendorExtensions.x-codegen-hasRequiredParams}}{{#parameters}}{{#required}}
|
|
5
5
|
let {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}}
|
|
6
6
|
{{/required}}{{/parameters}}{{/vendorExtensions.x-codegen-hasRequiredParams}}{{#hasOptionalParams}}
|
|
@@ -6,7 +6,7 @@ const fs = require("fs");
|
|
|
6
6
|
{{/hasParams}}
|
|
7
7
|
|
|
8
8
|
{{#hasAuthMethods}}
|
|
9
|
-
let client = {{{moduleName}}}.ApiClient
|
|
9
|
+
let client = new {{{moduleName}}}.ApiClient();{{#authMethods}}{{#isBasic}}
|
|
10
10
|
// Configure HTTP basic authorization: {{{name}}}
|
|
11
11
|
let {{{name}}} = client.authentications['{{{name}}}'];
|
|
12
12
|
{{{name}}}.username = 'YOUR USERNAME';
|
|
@@ -19,7 +19,6 @@ let {{{name}}} = client.authentications['{{{name}}}'];
|
|
|
19
19
|
// Configure OAuth2 access token for authorization: {{{name}}}
|
|
20
20
|
let {{{name}}} = client.authentications['{{{name}}}'];
|
|
21
21
|
{{{name}}}.accessToken = '<YOUR_ACCESS_TOKEN>';{{/isOAuth}}{{#isBearer}}
|
|
22
|
-
|
|
23
|
-
token.accessToken = '<YOUR_ACCESS_TOKEN>';{{/isBearer}}
|
|
22
|
+
client.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';{{/isBearer}}
|
|
24
23
|
{{/authMethods}}
|
|
25
24
|
{{/hasAuthMethods}}
|
package/dist/ApiClient.js
CHANGED
|
@@ -28,7 +28,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
28
28
|
*/
|
|
29
29
|
/**
|
|
30
30
|
* @module ApiClient
|
|
31
|
-
* @version 3.1.
|
|
31
|
+
* @version 3.1.4
|
|
32
32
|
*/
|
|
33
33
|
/**
|
|
34
34
|
* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
|
|
@@ -405,14 +405,14 @@ var ApiClient = exports.ApiClient = /*#__PURE__*/function () {
|
|
|
405
405
|
// set header parameters
|
|
406
406
|
if (typeof navigator === 'undefined' || typeof window === 'undefined') {
|
|
407
407
|
headerParams['X-Asana-Client-Lib'] = new URLSearchParams({
|
|
408
|
-
'version': "3.1.
|
|
408
|
+
'version': "3.1.4",
|
|
409
409
|
'language': 'NodeJS',
|
|
410
410
|
'language_version': process.version,
|
|
411
411
|
'os': process.platform
|
|
412
412
|
}).toString();
|
|
413
413
|
} else {
|
|
414
414
|
headerParams['X-Asana-Client-Lib'] = new URLSearchParams({
|
|
415
|
-
'version': "3.1.
|
|
415
|
+
'version': "3.1.4",
|
|
416
416
|
'language': 'BrowserJS'
|
|
417
417
|
}).toString();
|
|
418
418
|
}
|
package/dist/api/BatchAPIApi.js
CHANGED
package/dist/api/BudgetsApi.js
CHANGED
|
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
|
|
|
29
29
|
/**
|
|
30
30
|
* CustomFieldSettings service.
|
|
31
31
|
* @module api/CustomFieldSettingsApi
|
|
32
|
-
* @version 3.1.
|
|
32
|
+
* @version 3.1.4
|
|
33
33
|
*/
|
|
34
34
|
var CustomFieldSettingsApi = exports.CustomFieldSettingsApi = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -46,9 +46,9 @@ var CustomFieldSettingsApi = exports.CustomFieldSettingsApi = /*#__PURE__*/funct
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
* Get a
|
|
50
|
-
* Returns a list of all of the custom fields settings on a
|
|
51
|
-
* @param {String}
|
|
49
|
+
* Get a goal's custom fields
|
|
50
|
+
* Returns a list of all of the custom fields settings on a goal, in compact form. Note that, as in all queries to collections which return compact representation, `opt_fields` can be used to include more data than is returned in the compact representation. See the [documentation for input/output options](https://developers.asana.com/docs/inputoutput-options) for more information.
|
|
51
|
+
* @param {String} goal_gid Globally unique identifier for the goal.
|
|
52
52
|
* @param {Object} opts Optional parameters
|
|
53
53
|
* @param {Number} opts.limit Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
|
54
54
|
* @param {String} opts.offset 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.*
|
|
@@ -56,6 +56,78 @@ var CustomFieldSettingsApi = exports.CustomFieldSettingsApi = /*#__PURE__*/funct
|
|
|
56
56
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
57
57
|
*/
|
|
58
58
|
return _createClass(CustomFieldSettingsApi, [{
|
|
59
|
+
key: "getCustomFieldSettingsForGoalWithHttpInfo",
|
|
60
|
+
value: function getCustomFieldSettingsForGoalWithHttpInfo(goal_gid, opts) {
|
|
61
|
+
opts = opts || {};
|
|
62
|
+
var postBody = null;
|
|
63
|
+
// verify the required parameter 'goal_gid' is set
|
|
64
|
+
if (goal_gid === undefined || goal_gid === null) {
|
|
65
|
+
throw new Error("Missing the required parameter 'goal_gid' when calling getCustomFieldSettingsForGoal");
|
|
66
|
+
}
|
|
67
|
+
var pathParams = {
|
|
68
|
+
'goal_gid': goal_gid
|
|
69
|
+
};
|
|
70
|
+
var queryParams = {};
|
|
71
|
+
opts = opts || {};
|
|
72
|
+
queryParams = opts;
|
|
73
|
+
var headerParams = {};
|
|
74
|
+
var formParams = {};
|
|
75
|
+
var authNames = ['personalAccessToken'];
|
|
76
|
+
var contentTypes = [];
|
|
77
|
+
var accepts = ['application/json; charset=UTF-8'];
|
|
78
|
+
var returnType = 'Blob';
|
|
79
|
+
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
80
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
81
|
+
return Collection.fromApiClient(this.apiClient.callApi('/goals/{goal_gid}/custom_field_settings', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
|
|
82
|
+
'path': '/goals/{goal_gid}/custom_field_settings',
|
|
83
|
+
'httpMethod': 'GET',
|
|
84
|
+
'pathParams': pathParams,
|
|
85
|
+
'queryParams': queryParams,
|
|
86
|
+
'headerParams': headerParams,
|
|
87
|
+
'formParams': formParams,
|
|
88
|
+
'bodyParam': postBody,
|
|
89
|
+
'authNames': authNames,
|
|
90
|
+
'contentTypes': contentTypes,
|
|
91
|
+
'accepts': accepts,
|
|
92
|
+
'returnType': returnType
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
return this.apiClient.callApi('/goals/{goal_gid}/custom_field_settings', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Get a goal's custom fields
|
|
100
|
+
* Returns a list of all of the custom fields settings on a goal, in compact form. Note that, as in all queries to collections which return compact representation, `opt_fields` can be used to include more data than is returned in the compact representation. See the [documentation for input/output options](https://developers.asana.com/docs/inputoutput-options) for more information.
|
|
101
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} goal_gid Globally unique identifier for the goal.
|
|
102
|
+
* @param {Object} opts Optional parameters
|
|
103
|
+
* @param {Number} opts.limit Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
|
104
|
+
* @param {String} opts.offset 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.*
|
|
105
|
+
* @param {Array.<module:model/String>} opts.opt_fields This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
106
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CustomFieldSettingResponseArray}
|
|
107
|
+
*/
|
|
108
|
+
}, {
|
|
109
|
+
key: "getCustomFieldSettingsForGoal",
|
|
110
|
+
value: function getCustomFieldSettingsForGoal(goal_gid, opts) {
|
|
111
|
+
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
112
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
113
|
+
return this.getCustomFieldSettingsForGoalWithHttpInfo(goal_gid, opts);
|
|
114
|
+
}
|
|
115
|
+
return this.getCustomFieldSettingsForGoalWithHttpInfo(goal_gid, opts).then(function (response_and_data) {
|
|
116
|
+
return response_and_data.data;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Get a portfolio's custom fields
|
|
122
|
+
* Returns a list of all of the custom fields settings on a portfolio, in compact form.
|
|
123
|
+
* @param {String} portfolio_gid Globally unique identifier for the portfolio.
|
|
124
|
+
* @param {Object} opts Optional parameters
|
|
125
|
+
* @param {Number} opts.limit Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
|
126
|
+
* @param {String} opts.offset 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.*
|
|
127
|
+
* @param {Array.<module:model/String>} opts.opt_fields This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
128
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
129
|
+
*/
|
|
130
|
+
}, {
|
|
59
131
|
key: "getCustomFieldSettingsForPortfolioWithHttpInfo",
|
|
60
132
|
value: function getCustomFieldSettingsForPortfolioWithHttpInfo(portfolio_gid, opts) {
|
|
61
133
|
opts = opts || {};
|
|
@@ -188,5 +260,73 @@ var CustomFieldSettingsApi = exports.CustomFieldSettingsApi = /*#__PURE__*/funct
|
|
|
188
260
|
return response_and_data.data;
|
|
189
261
|
});
|
|
190
262
|
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Get a team's custom fields
|
|
266
|
+
* Returns a list of all of the custom fields settings on a team, in compact form. Note that, as in all queries to collections which return compact representation, `opt_fields` can be used to include more data than is returned in the compact representation. See the [documentation for input/output options](https://developers.asana.com/docs/inputoutput-options) for more information.
|
|
267
|
+
* @param {String} team_gid Globally unique identifier for the team.
|
|
268
|
+
* @param {Object} opts Optional parameters
|
|
269
|
+
* @param {Array.<module:model/String>} opts.opt_fields This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
270
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
271
|
+
*/
|
|
272
|
+
}, {
|
|
273
|
+
key: "getCustomFieldSettingsForTeamWithHttpInfo",
|
|
274
|
+
value: function getCustomFieldSettingsForTeamWithHttpInfo(team_gid, opts) {
|
|
275
|
+
opts = opts || {};
|
|
276
|
+
var postBody = null;
|
|
277
|
+
// verify the required parameter 'team_gid' is set
|
|
278
|
+
if (team_gid === undefined || team_gid === null) {
|
|
279
|
+
throw new Error("Missing the required parameter 'team_gid' when calling getCustomFieldSettingsForTeam");
|
|
280
|
+
}
|
|
281
|
+
var pathParams = {
|
|
282
|
+
'team_gid': team_gid
|
|
283
|
+
};
|
|
284
|
+
var queryParams = {};
|
|
285
|
+
opts = opts || {};
|
|
286
|
+
queryParams = opts;
|
|
287
|
+
var headerParams = {};
|
|
288
|
+
var formParams = {};
|
|
289
|
+
var authNames = ['personalAccessToken'];
|
|
290
|
+
var contentTypes = [];
|
|
291
|
+
var accepts = ['application/json; charset=UTF-8'];
|
|
292
|
+
var returnType = 'Blob';
|
|
293
|
+
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
294
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
295
|
+
return Collection.fromApiClient(this.apiClient.callApi('/teams/{team_gid}/custom_field_settings', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
|
|
296
|
+
'path': '/teams/{team_gid}/custom_field_settings',
|
|
297
|
+
'httpMethod': 'GET',
|
|
298
|
+
'pathParams': pathParams,
|
|
299
|
+
'queryParams': queryParams,
|
|
300
|
+
'headerParams': headerParams,
|
|
301
|
+
'formParams': formParams,
|
|
302
|
+
'bodyParam': postBody,
|
|
303
|
+
'authNames': authNames,
|
|
304
|
+
'contentTypes': contentTypes,
|
|
305
|
+
'accepts': accepts,
|
|
306
|
+
'returnType': returnType
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
return this.apiClient.callApi('/teams/{team_gid}/custom_field_settings', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Get a team's custom fields
|
|
314
|
+
* Returns a list of all of the custom fields settings on a team, in compact form. Note that, as in all queries to collections which return compact representation, `opt_fields` can be used to include more data than is returned in the compact representation. See the [documentation for input/output options](https://developers.asana.com/docs/inputoutput-options) for more information.
|
|
315
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} team_gid Globally unique identifier for the team.
|
|
316
|
+
* @param {Object} opts Optional parameters
|
|
317
|
+
* @param {Array.<module:model/String>} opts.opt_fields This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
318
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CustomFieldSettingResponseArray}
|
|
319
|
+
*/
|
|
320
|
+
}, {
|
|
321
|
+
key: "getCustomFieldSettingsForTeam",
|
|
322
|
+
value: function getCustomFieldSettingsForTeam(team_gid, opts) {
|
|
323
|
+
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
324
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
325
|
+
return this.getCustomFieldSettingsForTeamWithHttpInfo(team_gid, opts);
|
|
326
|
+
}
|
|
327
|
+
return this.getCustomFieldSettingsForTeamWithHttpInfo(team_gid, opts).then(function (response_and_data) {
|
|
328
|
+
return response_and_data.data;
|
|
329
|
+
});
|
|
330
|
+
}
|
|
191
331
|
}]);
|
|
192
332
|
}();
|
package/dist/api/EventsApi.js
CHANGED
package/dist/api/ExportsApi.js
CHANGED
|
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
|
|
|
29
29
|
/**
|
|
30
30
|
* GoalRelationships service.
|
|
31
31
|
* @module api/GoalRelationshipsApi
|
|
32
|
-
* @version 3.1.
|
|
32
|
+
* @version 3.1.4
|
|
33
33
|
*/
|
|
34
34
|
var GoalRelationshipsApi = exports.GoalRelationshipsApi = /*#__PURE__*/function () {
|
|
35
35
|
/**
|