asana 3.0.2 → 3.0.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.
Files changed (82) hide show
  1. package/.github/workflows/publish.yaml +78 -38
  2. package/.swagger-codegen/VERSION +1 -1
  3. package/README.md +140 -29
  4. package/codegen/templates/README.mustache +129 -26
  5. package/codegen/templates/api.mustache +17 -15
  6. package/dist/ApiClient.js +6 -7
  7. package/dist/api/AllocationsApi.js +307 -0
  8. package/dist/api/AttachmentsApi.js +22 -95
  9. package/dist/api/AuditLogAPIApi.js +10 -14
  10. package/dist/api/BatchAPIApi.js +10 -14
  11. package/dist/api/CustomFieldSettingsApi.js +16 -23
  12. package/dist/api/CustomFieldsApi.js +38 -203
  13. package/dist/api/EventsApi.js +12 -16
  14. package/dist/api/GoalRelationshipsApi.js +26 -122
  15. package/dist/api/GoalsApi.js +48 -239
  16. package/dist/api/JobsApi.js +8 -32
  17. package/dist/api/MembershipsApi.js +73 -99
  18. package/dist/api/OrganizationExportsApi.js +12 -59
  19. package/dist/api/PortfolioMembershipsApi.js +20 -50
  20. package/dist/api/PortfoliosApi.js +56 -293
  21. package/dist/api/ProjectBriefsApi.js +20 -113
  22. package/dist/api/ProjectMembershipsApi.js +14 -41
  23. package/dist/api/ProjectStatusesApi.js +22 -95
  24. package/dist/api/ProjectTemplatesApi.js +28 -104
  25. package/dist/api/ProjectsApi.js +88 -446
  26. package/dist/api/RulesApi.js +8 -32
  27. package/dist/api/SectionsApi.js +34 -176
  28. package/dist/api/StatusUpdatesApi.js +22 -95
  29. package/dist/api/StoriesApi.js +26 -122
  30. package/dist/api/TagsApi.js +42 -167
  31. package/dist/api/TaskTemplatesApi.js +63 -72
  32. package/dist/api/TasksApi.js +173 -544
  33. package/dist/api/TeamMembershipsApi.js +26 -59
  34. package/dist/api/TeamsApi.js +36 -158
  35. package/dist/api/TimePeriodsApi.js +14 -41
  36. package/dist/api/TimeTrackingEntriesApi.js +26 -122
  37. package/dist/api/TypeaheadApi.js +12 -16
  38. package/dist/api/UserTaskListsApi.js +12 -59
  39. package/dist/api/UsersApi.js +32 -68
  40. package/dist/api/WebhooksApi.js +26 -122
  41. package/dist/api/WorkspaceMembershipsApi.js +20 -50
  42. package/dist/api/WorkspacesApi.js +26 -122
  43. package/dist/index.js +7 -0
  44. package/package.json +1 -1
  45. package/src/ApiClient.js +4 -4
  46. package/src/api/AllocationsApi.js +365 -0
  47. package/src/api/AttachmentsApi.js +42 -134
  48. package/src/api/AuditLogAPIApi.js +15 -17
  49. package/src/api/BatchAPIApi.js +15 -17
  50. package/src/api/CustomFieldSettingsApi.js +28 -32
  51. package/src/api/CustomFieldsApi.js +78 -290
  52. package/src/api/EventsApi.js +17 -19
  53. package/src/api/GoalRelationshipsApi.js +51 -173
  54. package/src/api/GoalsApi.js +100 -344
  55. package/src/api/JobsApi.js +11 -41
  56. package/src/api/MembershipsApi.js +105 -138
  57. package/src/api/OrganizationExportsApi.js +20 -80
  58. package/src/api/PortfolioMembershipsApi.js +37 -71
  59. package/src/api/PortfoliosApi.js +118 -422
  60. package/src/api/ProjectBriefsApi.js +38 -158
  61. package/src/api/ProjectMembershipsApi.js +24 -56
  62. package/src/api/ProjectStatusesApi.js +42 -134
  63. package/src/api/ProjectTemplatesApi.js +55 -149
  64. package/src/api/ProjectsApi.js +189 -647
  65. package/src/api/RulesApi.js +11 -41
  66. package/src/api/SectionsApi.js +69 -251
  67. package/src/api/StatusUpdatesApi.js +42 -134
  68. package/src/api/StoriesApi.js +51 -173
  69. package/src/api/TagsApi.js +86 -242
  70. package/src/api/TaskTemplatesApi.js +86 -95
  71. package/src/api/TasksApi.js +330 -799
  72. package/src/api/TeamMembershipsApi.js +50 -86
  73. package/src/api/TeamsApi.js +73 -227
  74. package/src/api/TimePeriodsApi.js +24 -56
  75. package/src/api/TimeTrackingEntriesApi.js +51 -173
  76. package/src/api/TypeaheadApi.js +17 -19
  77. package/src/api/UserTaskListsApi.js +20 -80
  78. package/src/api/UsersApi.js +63 -101
  79. package/src/api/WebhooksApi.js +51 -173
  80. package/src/api/WorkspaceMembershipsApi.js +37 -71
  81. package/src/api/WorkspacesApi.js +51 -173
  82. package/src/index.js +9 -2
@@ -7,7 +7,7 @@
7
7
  * NOTE: This class is auto generated by the swagger code generator program.
8
8
  * https://github.com/swagger-api/swagger-codegen.git
9
9
  *
10
- * Swagger Codegen version: 3.0.52
10
+ * Swagger Codegen version: 3.0.54
11
11
  *
12
12
  * Do not edit the class manually.
13
13
  *
@@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
18
18
  /**
19
19
  * UserTaskLists service.
20
20
  * @module api/UserTaskListsApi
21
- * @version 3.0.2
21
+ * @version 3.0.4
22
22
  */
23
23
  export class UserTaskListsApi {
24
24
 
@@ -71,36 +71,11 @@ export class UserTaskListsApi {
71
71
  let accepts = ['application/json; charset=UTF-8'];
72
72
  let returnType = 'Blob';
73
73
 
74
- // Check if RETURN_COLLECTION is set and return a collection object if it is
75
- if (this.apiClient.RETURN_COLLECTION && false) {
76
- return Collection.fromApiClient(
77
- this.apiClient.callApi(
78
- '/user_task_lists/{user_task_list_gid}', 'GET',
79
- pathParams, queryParams, headerParams, formParams, postBody,
80
- authNames, contentTypes, accepts, returnType
81
- ),
82
- this.apiClient,
83
- {
84
- 'path': '/user_task_lists/{user_task_list_gid}',
85
- 'httpMethod': 'GET',
86
- 'pathParams': pathParams,
87
- 'queryParams': queryParams,
88
- 'headerParams': headerParams,
89
- 'formParams': formParams,
90
- 'bodyParam': postBody,
91
- 'authNames': authNames,
92
- 'contentTypes': contentTypes,
93
- 'accepts': accepts,
94
- 'returnType': returnType
95
- }
96
- )
97
- } else {
98
- return this.apiClient.callApi(
99
- '/user_task_lists/{user_task_list_gid}', 'GET',
100
- pathParams, queryParams, headerParams, formParams, postBody,
101
- authNames, contentTypes, accepts, returnType
102
- );
103
- }
74
+ return this.apiClient.callApi(
75
+ '/user_task_lists/{user_task_list_gid}', 'GET',
76
+ pathParams, queryParams, headerParams, formParams, postBody,
77
+ authNames, contentTypes, accepts, returnType
78
+ );
104
79
  }
105
80
 
106
81
  /**
@@ -113,15 +88,10 @@ export class UserTaskListsApi {
113
88
  */
114
89
  getUserTaskList(user_task_list_gid, opts) {
115
90
 
116
- // Check if RETURN_COLLECTION is set and return a collection object if it is
117
- if (this.apiClient.RETURN_COLLECTION && false) {
118
- return this.getUserTaskListWithHttpInfo(user_task_list_gid, opts)
119
- } else {
120
- return this.getUserTaskListWithHttpInfo(user_task_list_gid, opts)
121
- .then(function(response_and_data) {
122
- return response_and_data.data;
123
- });
124
- }
91
+ return this.getUserTaskListWithHttpInfo(user_task_list_gid, opts)
92
+ .then(function(response_and_data) {
93
+ return response_and_data.data;
94
+ });
125
95
  }
126
96
 
127
97
 
@@ -166,36 +136,11 @@ export class UserTaskListsApi {
166
136
  let accepts = ['application/json; charset=UTF-8'];
167
137
  let returnType = 'Blob';
168
138
 
169
- // Check if RETURN_COLLECTION is set and return a collection object if it is
170
- if (this.apiClient.RETURN_COLLECTION && false) {
171
- return Collection.fromApiClient(
172
- this.apiClient.callApi(
173
- '/users/{user_gid}/user_task_list', 'GET',
174
- pathParams, queryParams, headerParams, formParams, postBody,
175
- authNames, contentTypes, accepts, returnType
176
- ),
177
- this.apiClient,
178
- {
179
- 'path': '/users/{user_gid}/user_task_list',
180
- 'httpMethod': 'GET',
181
- 'pathParams': pathParams,
182
- 'queryParams': queryParams,
183
- 'headerParams': headerParams,
184
- 'formParams': formParams,
185
- 'bodyParam': postBody,
186
- 'authNames': authNames,
187
- 'contentTypes': contentTypes,
188
- 'accepts': accepts,
189
- 'returnType': returnType
190
- }
191
- )
192
- } else {
193
- return this.apiClient.callApi(
194
- '/users/{user_gid}/user_task_list', 'GET',
195
- pathParams, queryParams, headerParams, formParams, postBody,
196
- authNames, contentTypes, accepts, returnType
197
- );
198
- }
139
+ return this.apiClient.callApi(
140
+ '/users/{user_gid}/user_task_list', 'GET',
141
+ pathParams, queryParams, headerParams, formParams, postBody,
142
+ authNames, contentTypes, accepts, returnType
143
+ );
199
144
  }
200
145
 
201
146
  /**
@@ -209,15 +154,10 @@ export class UserTaskListsApi {
209
154
  */
210
155
  getUserTaskListForUser(user_gid, workspace, opts) {
211
156
 
212
- // Check if RETURN_COLLECTION is set and return a collection object if it is
213
- if (this.apiClient.RETURN_COLLECTION && false) {
214
- return this.getUserTaskListForUserWithHttpInfo(user_gid, workspace, opts)
215
- } else {
216
- return this.getUserTaskListForUserWithHttpInfo(user_gid, workspace, opts)
217
- .then(function(response_and_data) {
218
- return response_and_data.data;
219
- });
220
- }
157
+ return this.getUserTaskListForUserWithHttpInfo(user_gid, workspace, opts)
158
+ .then(function(response_and_data) {
159
+ return response_and_data.data;
160
+ });
221
161
  }
222
162
 
223
163
  }
@@ -7,7 +7,7 @@
7
7
  * NOTE: This class is auto generated by the swagger code generator program.
8
8
  * https://github.com/swagger-api/swagger-codegen.git
9
9
  *
10
- * Swagger Codegen version: 3.0.52
10
+ * Swagger Codegen version: 3.0.54
11
11
  *
12
12
  * Do not edit the class manually.
13
13
  *
@@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
18
18
  /**
19
19
  * Users service.
20
20
  * @module api/UsersApi
21
- * @version 3.0.2
21
+ * @version 3.0.4
22
22
  */
23
23
  export class UsersApi {
24
24
 
@@ -84,9 +84,8 @@ export class UsersApi {
84
84
  let contentTypes = [];
85
85
  let accepts = ['application/json; charset=UTF-8'];
86
86
  let returnType = 'Blob';
87
-
88
87
  // Check if RETURN_COLLECTION is set and return a collection object if it is
89
- if (this.apiClient.RETURN_COLLECTION && true) {
88
+ if (this.apiClient.RETURN_COLLECTION) {
90
89
  return Collection.fromApiClient(
91
90
  this.apiClient.callApi(
92
91
  '/users/{user_gid}/favorites', 'GET',
@@ -108,13 +107,13 @@ export class UsersApi {
108
107
  'returnType': returnType
109
108
  }
110
109
  )
111
- } else {
112
- return this.apiClient.callApi(
113
- '/users/{user_gid}/favorites', 'GET',
114
- pathParams, queryParams, headerParams, formParams, postBody,
115
- authNames, contentTypes, accepts, returnType
116
- );
117
110
  }
111
+
112
+ return this.apiClient.callApi(
113
+ '/users/{user_gid}/favorites', 'GET',
114
+ pathParams, queryParams, headerParams, formParams, postBody,
115
+ authNames, contentTypes, accepts, returnType
116
+ );
118
117
  }
119
118
 
120
119
  /**
@@ -130,16 +129,15 @@ export class UsersApi {
130
129
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AsanaNamedResourceArray}
131
130
  */
132
131
  getFavoritesForUser(user_gid, resource_type, workspace, opts) {
133
-
134
132
  // Check if RETURN_COLLECTION is set and return a collection object if it is
135
- if (this.apiClient.RETURN_COLLECTION && true) {
133
+ if (this.apiClient.RETURN_COLLECTION) {
136
134
  return this.getFavoritesForUserWithHttpInfo(user_gid, resource_type, workspace, opts)
137
- } else {
138
- return this.getFavoritesForUserWithHttpInfo(user_gid, resource_type, workspace, opts)
139
- .then(function(response_and_data) {
140
- return response_and_data.data;
141
- });
142
135
  }
136
+
137
+ return this.getFavoritesForUserWithHttpInfo(user_gid, resource_type, workspace, opts)
138
+ .then(function(response_and_data) {
139
+ return response_and_data.data;
140
+ });
143
141
  }
144
142
 
145
143
 
@@ -178,36 +176,11 @@ export class UsersApi {
178
176
  let accepts = ['application/json; charset=UTF-8'];
179
177
  let returnType = 'Blob';
180
178
 
181
- // Check if RETURN_COLLECTION is set and return a collection object if it is
182
- if (this.apiClient.RETURN_COLLECTION && false) {
183
- return Collection.fromApiClient(
184
- this.apiClient.callApi(
185
- '/users/{user_gid}', 'GET',
186
- pathParams, queryParams, headerParams, formParams, postBody,
187
- authNames, contentTypes, accepts, returnType
188
- ),
189
- this.apiClient,
190
- {
191
- 'path': '/users/{user_gid}',
192
- 'httpMethod': 'GET',
193
- 'pathParams': pathParams,
194
- 'queryParams': queryParams,
195
- 'headerParams': headerParams,
196
- 'formParams': formParams,
197
- 'bodyParam': postBody,
198
- 'authNames': authNames,
199
- 'contentTypes': contentTypes,
200
- 'accepts': accepts,
201
- 'returnType': returnType
202
- }
203
- )
204
- } else {
205
- return this.apiClient.callApi(
206
- '/users/{user_gid}', 'GET',
207
- pathParams, queryParams, headerParams, formParams, postBody,
208
- authNames, contentTypes, accepts, returnType
209
- );
210
- }
179
+ return this.apiClient.callApi(
180
+ '/users/{user_gid}', 'GET',
181
+ pathParams, queryParams, headerParams, formParams, postBody,
182
+ authNames, contentTypes, accepts, returnType
183
+ );
211
184
  }
212
185
 
213
186
  /**
@@ -220,15 +193,10 @@ export class UsersApi {
220
193
  */
221
194
  getUser(user_gid, opts) {
222
195
 
223
- // Check if RETURN_COLLECTION is set and return a collection object if it is
224
- if (this.apiClient.RETURN_COLLECTION && false) {
225
- return this.getUserWithHttpInfo(user_gid, opts)
226
- } else {
227
- return this.getUserWithHttpInfo(user_gid, opts)
228
- .then(function(response_and_data) {
229
- return response_and_data.data;
230
- });
231
- }
196
+ return this.getUserWithHttpInfo(user_gid, opts)
197
+ .then(function(response_and_data) {
198
+ return response_and_data.data;
199
+ });
232
200
  }
233
201
 
234
202
 
@@ -265,9 +233,8 @@ export class UsersApi {
265
233
  let contentTypes = [];
266
234
  let accepts = ['application/json; charset=UTF-8'];
267
235
  let returnType = 'Blob';
268
-
269
236
  // Check if RETURN_COLLECTION is set and return a collection object if it is
270
- if (this.apiClient.RETURN_COLLECTION && true) {
237
+ if (this.apiClient.RETURN_COLLECTION) {
271
238
  return Collection.fromApiClient(
272
239
  this.apiClient.callApi(
273
240
  '/users', 'GET',
@@ -289,13 +256,13 @@ export class UsersApi {
289
256
  'returnType': returnType
290
257
  }
291
258
  )
292
- } else {
293
- return this.apiClient.callApi(
294
- '/users', 'GET',
295
- pathParams, queryParams, headerParams, formParams, postBody,
296
- authNames, contentTypes, accepts, returnType
297
- );
298
259
  }
260
+
261
+ return this.apiClient.callApi(
262
+ '/users', 'GET',
263
+ pathParams, queryParams, headerParams, formParams, postBody,
264
+ authNames, contentTypes, accepts, returnType
265
+ );
299
266
  }
300
267
 
301
268
  /**
@@ -310,16 +277,15 @@ export class UsersApi {
310
277
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserResponseArray}
311
278
  */
312
279
  getUsers(opts) {
313
-
314
280
  // Check if RETURN_COLLECTION is set and return a collection object if it is
315
- if (this.apiClient.RETURN_COLLECTION && true) {
281
+ if (this.apiClient.RETURN_COLLECTION) {
316
282
  return this.getUsersWithHttpInfo(opts)
317
- } else {
318
- return this.getUsersWithHttpInfo(opts)
319
- .then(function(response_and_data) {
320
- return response_and_data.data;
321
- });
322
283
  }
284
+
285
+ return this.getUsersWithHttpInfo(opts)
286
+ .then(function(response_and_data) {
287
+ return response_and_data.data;
288
+ });
323
289
  }
324
290
 
325
291
 
@@ -358,9 +324,8 @@ export class UsersApi {
358
324
  let contentTypes = [];
359
325
  let accepts = ['application/json; charset=UTF-8'];
360
326
  let returnType = 'Blob';
361
-
362
327
  // Check if RETURN_COLLECTION is set and return a collection object if it is
363
- if (this.apiClient.RETURN_COLLECTION && true) {
328
+ if (this.apiClient.RETURN_COLLECTION) {
364
329
  return Collection.fromApiClient(
365
330
  this.apiClient.callApi(
366
331
  '/teams/{team_gid}/users', 'GET',
@@ -382,13 +347,13 @@ export class UsersApi {
382
347
  'returnType': returnType
383
348
  }
384
349
  )
385
- } else {
386
- return this.apiClient.callApi(
387
- '/teams/{team_gid}/users', 'GET',
388
- pathParams, queryParams, headerParams, formParams, postBody,
389
- authNames, contentTypes, accepts, returnType
390
- );
391
350
  }
351
+
352
+ return this.apiClient.callApi(
353
+ '/teams/{team_gid}/users', 'GET',
354
+ pathParams, queryParams, headerParams, formParams, postBody,
355
+ authNames, contentTypes, accepts, returnType
356
+ );
392
357
  }
393
358
 
394
359
  /**
@@ -401,16 +366,15 @@ export class UsersApi {
401
366
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserResponseArray}
402
367
  */
403
368
  getUsersForTeam(team_gid, opts) {
404
-
405
369
  // Check if RETURN_COLLECTION is set and return a collection object if it is
406
- if (this.apiClient.RETURN_COLLECTION && true) {
370
+ if (this.apiClient.RETURN_COLLECTION) {
407
371
  return this.getUsersForTeamWithHttpInfo(team_gid, opts)
408
- } else {
409
- return this.getUsersForTeamWithHttpInfo(team_gid, opts)
410
- .then(function(response_and_data) {
411
- return response_and_data.data;
412
- });
413
372
  }
373
+
374
+ return this.getUsersForTeamWithHttpInfo(team_gid, opts)
375
+ .then(function(response_and_data) {
376
+ return response_and_data.data;
377
+ });
414
378
  }
415
379
 
416
380
 
@@ -449,9 +413,8 @@ export class UsersApi {
449
413
  let contentTypes = [];
450
414
  let accepts = ['application/json; charset=UTF-8'];
451
415
  let returnType = 'Blob';
452
-
453
416
  // Check if RETURN_COLLECTION is set and return a collection object if it is
454
- if (this.apiClient.RETURN_COLLECTION && true) {
417
+ if (this.apiClient.RETURN_COLLECTION) {
455
418
  return Collection.fromApiClient(
456
419
  this.apiClient.callApi(
457
420
  '/workspaces/{workspace_gid}/users', 'GET',
@@ -473,13 +436,13 @@ export class UsersApi {
473
436
  'returnType': returnType
474
437
  }
475
438
  )
476
- } else {
477
- return this.apiClient.callApi(
478
- '/workspaces/{workspace_gid}/users', 'GET',
479
- pathParams, queryParams, headerParams, formParams, postBody,
480
- authNames, contentTypes, accepts, returnType
481
- );
482
439
  }
440
+
441
+ return this.apiClient.callApi(
442
+ '/workspaces/{workspace_gid}/users', 'GET',
443
+ pathParams, queryParams, headerParams, formParams, postBody,
444
+ authNames, contentTypes, accepts, returnType
445
+ );
483
446
  }
484
447
 
485
448
  /**
@@ -492,16 +455,15 @@ export class UsersApi {
492
455
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserResponseArray}
493
456
  */
494
457
  getUsersForWorkspace(workspace_gid, opts) {
495
-
496
458
  // Check if RETURN_COLLECTION is set and return a collection object if it is
497
- if (this.apiClient.RETURN_COLLECTION && true) {
459
+ if (this.apiClient.RETURN_COLLECTION) {
498
460
  return this.getUsersForWorkspaceWithHttpInfo(workspace_gid, opts)
499
- } else {
500
- return this.getUsersForWorkspaceWithHttpInfo(workspace_gid, opts)
501
- .then(function(response_and_data) {
502
- return response_and_data.data;
503
- });
504
461
  }
462
+
463
+ return this.getUsersForWorkspaceWithHttpInfo(workspace_gid, opts)
464
+ .then(function(response_and_data) {
465
+ return response_and_data.data;
466
+ });
505
467
  }
506
468
 
507
469
  }