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
@@ -9,7 +9,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
9
9
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10
10
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
11
11
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
13
13
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
14
14
  * Asana
15
15
  * This is the interface for interacting with the [Asana Platform](https://developers.asana.com). Our API reference is generated from our [OpenAPI spec] (https://raw.githubusercontent.com/Asana/openapi/master/defs/asana_oas.yaml).
@@ -19,7 +19,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
19
19
  * NOTE: This class is auto generated by the swagger code generator program.
20
20
  * https://github.com/swagger-api/swagger-codegen.git
21
21
  *
22
- * Swagger Codegen version: 3.0.52
22
+ * Swagger Codegen version: 3.0.54
23
23
  *
24
24
  * Do not edit the class manually.
25
25
  *
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * Users service.
31
31
  * @module api/UsersApi
32
- * @version 3.0.2
32
+ * @version 3.0.4
33
33
  */
34
34
  var UsersApi = exports.UsersApi = /*#__PURE__*/function () {
35
35
  /**
@@ -57,7 +57,7 @@ var UsersApi = exports.UsersApi = /*#__PURE__*/function () {
57
57
  * @param {Array.<module:model/String>} 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.
58
58
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
59
59
  */
60
- _createClass(UsersApi, [{
60
+ return _createClass(UsersApi, [{
61
61
  key: "getFavoritesForUserWithHttpInfo",
62
62
  value: function getFavoritesForUserWithHttpInfo(user_gid, resource_type, workspace, opts) {
63
63
  opts = opts || {};
@@ -88,9 +88,8 @@ var UsersApi = exports.UsersApi = /*#__PURE__*/function () {
88
88
  var contentTypes = [];
89
89
  var accepts = ['application/json; charset=UTF-8'];
90
90
  var returnType = 'Blob';
91
-
92
91
  // Check if RETURN_COLLECTION is set and return a collection object if it is
93
- if (this.apiClient.RETURN_COLLECTION && true) {
92
+ if (this.apiClient.RETURN_COLLECTION) {
94
93
  return Collection.fromApiClient(this.apiClient.callApi('/users/{user_gid}/favorites', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
95
94
  'path': '/users/{user_gid}/favorites',
96
95
  'httpMethod': 'GET',
@@ -104,9 +103,8 @@ var UsersApi = exports.UsersApi = /*#__PURE__*/function () {
104
103
  'accepts': accepts,
105
104
  'returnType': returnType
106
105
  });
107
- } else {
108
- return this.apiClient.callApi('/users/{user_gid}/favorites', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
109
106
  }
107
+ return this.apiClient.callApi('/users/{user_gid}/favorites', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
110
108
  }
111
109
 
112
110
  /**
@@ -125,13 +123,12 @@ var UsersApi = exports.UsersApi = /*#__PURE__*/function () {
125
123
  key: "getFavoritesForUser",
126
124
  value: function getFavoritesForUser(user_gid, resource_type, workspace, opts) {
127
125
  // Check if RETURN_COLLECTION is set and return a collection object if it is
128
- if (this.apiClient.RETURN_COLLECTION && true) {
126
+ if (this.apiClient.RETURN_COLLECTION) {
129
127
  return this.getFavoritesForUserWithHttpInfo(user_gid, resource_type, workspace, opts);
130
- } else {
131
- return this.getFavoritesForUserWithHttpInfo(user_gid, resource_type, workspace, opts).then(function (response_and_data) {
132
- return response_and_data.data;
133
- });
134
128
  }
129
+ return this.getFavoritesForUserWithHttpInfo(user_gid, resource_type, workspace, opts).then(function (response_and_data) {
130
+ return response_and_data.data;
131
+ });
135
132
  }
136
133
 
137
134
  /**
@@ -163,25 +160,7 @@ var UsersApi = exports.UsersApi = /*#__PURE__*/function () {
163
160
  var contentTypes = [];
164
161
  var accepts = ['application/json; charset=UTF-8'];
165
162
  var returnType = 'Blob';
166
-
167
- // Check if RETURN_COLLECTION is set and return a collection object if it is
168
- if (this.apiClient.RETURN_COLLECTION && false) {
169
- return Collection.fromApiClient(this.apiClient.callApi('/users/{user_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
170
- 'path': '/users/{user_gid}',
171
- 'httpMethod': 'GET',
172
- 'pathParams': pathParams,
173
- 'queryParams': queryParams,
174
- 'headerParams': headerParams,
175
- 'formParams': formParams,
176
- 'bodyParam': postBody,
177
- 'authNames': authNames,
178
- 'contentTypes': contentTypes,
179
- 'accepts': accepts,
180
- 'returnType': returnType
181
- });
182
- } else {
183
- return this.apiClient.callApi('/users/{user_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
184
- }
163
+ return this.apiClient.callApi('/users/{user_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
185
164
  }
186
165
 
187
166
  /**
@@ -195,14 +174,9 @@ var UsersApi = exports.UsersApi = /*#__PURE__*/function () {
195
174
  }, {
196
175
  key: "getUser",
197
176
  value: function getUser(user_gid, opts) {
198
- // Check if RETURN_COLLECTION is set and return a collection object if it is
199
- if (this.apiClient.RETURN_COLLECTION && false) {
200
- return this.getUserWithHttpInfo(user_gid, opts);
201
- } else {
202
- return this.getUserWithHttpInfo(user_gid, opts).then(function (response_and_data) {
203
- return response_and_data.data;
204
- });
205
- }
177
+ return this.getUserWithHttpInfo(user_gid, opts).then(function (response_and_data) {
178
+ return response_and_data.data;
179
+ });
206
180
  }
207
181
 
208
182
  /**
@@ -231,9 +205,8 @@ var UsersApi = exports.UsersApi = /*#__PURE__*/function () {
231
205
  var contentTypes = [];
232
206
  var accepts = ['application/json; charset=UTF-8'];
233
207
  var returnType = 'Blob';
234
-
235
208
  // Check if RETURN_COLLECTION is set and return a collection object if it is
236
- if (this.apiClient.RETURN_COLLECTION && true) {
209
+ if (this.apiClient.RETURN_COLLECTION) {
237
210
  return Collection.fromApiClient(this.apiClient.callApi('/users', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
238
211
  'path': '/users',
239
212
  'httpMethod': 'GET',
@@ -247,9 +220,8 @@ var UsersApi = exports.UsersApi = /*#__PURE__*/function () {
247
220
  'accepts': accepts,
248
221
  'returnType': returnType
249
222
  });
250
- } else {
251
- return this.apiClient.callApi('/users', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
252
223
  }
224
+ return this.apiClient.callApi('/users', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
253
225
  }
254
226
 
255
227
  /**
@@ -267,13 +239,12 @@ var UsersApi = exports.UsersApi = /*#__PURE__*/function () {
267
239
  key: "getUsers",
268
240
  value: function getUsers(opts) {
269
241
  // Check if RETURN_COLLECTION is set and return a collection object if it is
270
- if (this.apiClient.RETURN_COLLECTION && true) {
242
+ if (this.apiClient.RETURN_COLLECTION) {
271
243
  return this.getUsersWithHttpInfo(opts);
272
- } else {
273
- return this.getUsersWithHttpInfo(opts).then(function (response_and_data) {
274
- return response_and_data.data;
275
- });
276
244
  }
245
+ return this.getUsersWithHttpInfo(opts).then(function (response_and_data) {
246
+ return response_and_data.data;
247
+ });
277
248
  }
278
249
 
279
250
  /**
@@ -306,9 +277,8 @@ var UsersApi = exports.UsersApi = /*#__PURE__*/function () {
306
277
  var contentTypes = [];
307
278
  var accepts = ['application/json; charset=UTF-8'];
308
279
  var returnType = 'Blob';
309
-
310
280
  // Check if RETURN_COLLECTION is set and return a collection object if it is
311
- if (this.apiClient.RETURN_COLLECTION && true) {
281
+ if (this.apiClient.RETURN_COLLECTION) {
312
282
  return Collection.fromApiClient(this.apiClient.callApi('/teams/{team_gid}/users', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
313
283
  'path': '/teams/{team_gid}/users',
314
284
  'httpMethod': 'GET',
@@ -322,9 +292,8 @@ var UsersApi = exports.UsersApi = /*#__PURE__*/function () {
322
292
  'accepts': accepts,
323
293
  'returnType': returnType
324
294
  });
325
- } else {
326
- return this.apiClient.callApi('/teams/{team_gid}/users', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
327
295
  }
296
+ return this.apiClient.callApi('/teams/{team_gid}/users', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
328
297
  }
329
298
 
330
299
  /**
@@ -340,13 +309,12 @@ var UsersApi = exports.UsersApi = /*#__PURE__*/function () {
340
309
  key: "getUsersForTeam",
341
310
  value: function getUsersForTeam(team_gid, opts) {
342
311
  // Check if RETURN_COLLECTION is set and return a collection object if it is
343
- if (this.apiClient.RETURN_COLLECTION && true) {
312
+ if (this.apiClient.RETURN_COLLECTION) {
344
313
  return this.getUsersForTeamWithHttpInfo(team_gid, opts);
345
- } else {
346
- return this.getUsersForTeamWithHttpInfo(team_gid, opts).then(function (response_and_data) {
347
- return response_and_data.data;
348
- });
349
314
  }
315
+ return this.getUsersForTeamWithHttpInfo(team_gid, opts).then(function (response_and_data) {
316
+ return response_and_data.data;
317
+ });
350
318
  }
351
319
 
352
320
  /**
@@ -379,9 +347,8 @@ var UsersApi = exports.UsersApi = /*#__PURE__*/function () {
379
347
  var contentTypes = [];
380
348
  var accepts = ['application/json; charset=UTF-8'];
381
349
  var returnType = 'Blob';
382
-
383
350
  // Check if RETURN_COLLECTION is set and return a collection object if it is
384
- if (this.apiClient.RETURN_COLLECTION && true) {
351
+ if (this.apiClient.RETURN_COLLECTION) {
385
352
  return Collection.fromApiClient(this.apiClient.callApi('/workspaces/{workspace_gid}/users', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
386
353
  'path': '/workspaces/{workspace_gid}/users',
387
354
  'httpMethod': 'GET',
@@ -395,9 +362,8 @@ var UsersApi = exports.UsersApi = /*#__PURE__*/function () {
395
362
  'accepts': accepts,
396
363
  'returnType': returnType
397
364
  });
398
- } else {
399
- return this.apiClient.callApi('/workspaces/{workspace_gid}/users', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
400
365
  }
366
+ return this.apiClient.callApi('/workspaces/{workspace_gid}/users', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
401
367
  }
402
368
 
403
369
  /**
@@ -413,14 +379,12 @@ var UsersApi = exports.UsersApi = /*#__PURE__*/function () {
413
379
  key: "getUsersForWorkspace",
414
380
  value: function getUsersForWorkspace(workspace_gid, opts) {
415
381
  // Check if RETURN_COLLECTION is set and return a collection object if it is
416
- if (this.apiClient.RETURN_COLLECTION && true) {
382
+ if (this.apiClient.RETURN_COLLECTION) {
417
383
  return this.getUsersForWorkspaceWithHttpInfo(workspace_gid, opts);
418
- } else {
419
- return this.getUsersForWorkspaceWithHttpInfo(workspace_gid, opts).then(function (response_and_data) {
420
- return response_and_data.data;
421
- });
422
384
  }
385
+ return this.getUsersForWorkspaceWithHttpInfo(workspace_gid, opts).then(function (response_and_data) {
386
+ return response_and_data.data;
387
+ });
423
388
  }
424
389
  }]);
425
- return UsersApi;
426
390
  }();
@@ -9,7 +9,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
9
9
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10
10
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
11
11
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
13
13
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
14
14
  * Asana
15
15
  * This is the interface for interacting with the [Asana Platform](https://developers.asana.com). Our API reference is generated from our [OpenAPI spec] (https://raw.githubusercontent.com/Asana/openapi/master/defs/asana_oas.yaml).
@@ -19,7 +19,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
19
19
  * NOTE: This class is auto generated by the swagger code generator program.
20
20
  * https://github.com/swagger-api/swagger-codegen.git
21
21
  *
22
- * Swagger Codegen version: 3.0.52
22
+ * Swagger Codegen version: 3.0.54
23
23
  *
24
24
  * Do not edit the class manually.
25
25
  *
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * Webhooks service.
31
31
  * @module api/WebhooksApi
32
- * @version 3.0.2
32
+ * @version 3.0.4
33
33
  */
34
34
  var WebhooksApi = exports.WebhooksApi = /*#__PURE__*/function () {
35
35
  /**
@@ -53,7 +53,7 @@ var WebhooksApi = exports.WebhooksApi = /*#__PURE__*/function () {
53
53
  * @param {Array.<module:model/String>} 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.
54
54
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
55
55
  */
56
- _createClass(WebhooksApi, [{
56
+ return _createClass(WebhooksApi, [{
57
57
  key: "createWebhookWithHttpInfo",
58
58
  value: function createWebhookWithHttpInfo(body, opts) {
59
59
  opts = opts || {};
@@ -72,25 +72,7 @@ var WebhooksApi = exports.WebhooksApi = /*#__PURE__*/function () {
72
72
  var contentTypes = ['application/json; charset=UTF-8'];
73
73
  var accepts = ['application/json; charset=UTF-8'];
74
74
  var returnType = 'Blob';
75
-
76
- // Check if RETURN_COLLECTION is set and return a collection object if it is
77
- if (this.apiClient.RETURN_COLLECTION && false) {
78
- return Collection.fromApiClient(this.apiClient.callApi('/webhooks', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
79
- 'path': '/webhooks',
80
- 'httpMethod': 'POST',
81
- 'pathParams': pathParams,
82
- 'queryParams': queryParams,
83
- 'headerParams': headerParams,
84
- 'formParams': formParams,
85
- 'bodyParam': postBody,
86
- 'authNames': authNames,
87
- 'contentTypes': contentTypes,
88
- 'accepts': accepts,
89
- 'returnType': returnType
90
- });
91
- } else {
92
- return this.apiClient.callApi('/webhooks', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
93
- }
75
+ return this.apiClient.callApi('/webhooks', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
94
76
  }
95
77
 
96
78
  /**
@@ -104,14 +86,9 @@ var WebhooksApi = exports.WebhooksApi = /*#__PURE__*/function () {
104
86
  }, {
105
87
  key: "createWebhook",
106
88
  value: function createWebhook(body, opts) {
107
- // Check if RETURN_COLLECTION is set and return a collection object if it is
108
- if (this.apiClient.RETURN_COLLECTION && false) {
109
- return this.createWebhookWithHttpInfo(body, opts);
110
- } else {
111
- return this.createWebhookWithHttpInfo(body, opts).then(function (response_and_data) {
112
- return response_and_data.data;
113
- });
114
- }
89
+ return this.createWebhookWithHttpInfo(body, opts).then(function (response_and_data) {
90
+ return response_and_data.data;
91
+ });
115
92
  }
116
93
 
117
94
  /**
@@ -138,25 +115,7 @@ var WebhooksApi = exports.WebhooksApi = /*#__PURE__*/function () {
138
115
  var contentTypes = [];
139
116
  var accepts = ['application/json; charset=UTF-8'];
140
117
  var returnType = 'Blob';
141
-
142
- // Check if RETURN_COLLECTION is set and return a collection object if it is
143
- if (this.apiClient.RETURN_COLLECTION && false) {
144
- return Collection.fromApiClient(this.apiClient.callApi('/webhooks/{webhook_gid}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
145
- 'path': '/webhooks/{webhook_gid}',
146
- 'httpMethod': 'DELETE',
147
- 'pathParams': pathParams,
148
- 'queryParams': queryParams,
149
- 'headerParams': headerParams,
150
- 'formParams': formParams,
151
- 'bodyParam': postBody,
152
- 'authNames': authNames,
153
- 'contentTypes': contentTypes,
154
- 'accepts': accepts,
155
- 'returnType': returnType
156
- });
157
- } else {
158
- return this.apiClient.callApi('/webhooks/{webhook_gid}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
159
- }
118
+ return this.apiClient.callApi('/webhooks/{webhook_gid}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
160
119
  }
161
120
 
162
121
  /**
@@ -168,14 +127,9 @@ var WebhooksApi = exports.WebhooksApi = /*#__PURE__*/function () {
168
127
  }, {
169
128
  key: "deleteWebhook",
170
129
  value: function deleteWebhook(webhook_gid) {
171
- // Check if RETURN_COLLECTION is set and return a collection object if it is
172
- if (this.apiClient.RETURN_COLLECTION && false) {
173
- return this.deleteWebhookWithHttpInfo(webhook_gid);
174
- } else {
175
- return this.deleteWebhookWithHttpInfo(webhook_gid).then(function (response_and_data) {
176
- return response_and_data.data;
177
- });
178
- }
130
+ return this.deleteWebhookWithHttpInfo(webhook_gid).then(function (response_and_data) {
131
+ return response_and_data.data;
132
+ });
179
133
  }
180
134
 
181
135
  /**
@@ -207,25 +161,7 @@ var WebhooksApi = exports.WebhooksApi = /*#__PURE__*/function () {
207
161
  var contentTypes = [];
208
162
  var accepts = ['application/json; charset=UTF-8'];
209
163
  var returnType = 'Blob';
210
-
211
- // Check if RETURN_COLLECTION is set and return a collection object if it is
212
- if (this.apiClient.RETURN_COLLECTION && false) {
213
- return Collection.fromApiClient(this.apiClient.callApi('/webhooks/{webhook_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
214
- 'path': '/webhooks/{webhook_gid}',
215
- 'httpMethod': 'GET',
216
- 'pathParams': pathParams,
217
- 'queryParams': queryParams,
218
- 'headerParams': headerParams,
219
- 'formParams': formParams,
220
- 'bodyParam': postBody,
221
- 'authNames': authNames,
222
- 'contentTypes': contentTypes,
223
- 'accepts': accepts,
224
- 'returnType': returnType
225
- });
226
- } else {
227
- return this.apiClient.callApi('/webhooks/{webhook_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
228
- }
164
+ return this.apiClient.callApi('/webhooks/{webhook_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
229
165
  }
230
166
 
231
167
  /**
@@ -239,14 +175,9 @@ var WebhooksApi = exports.WebhooksApi = /*#__PURE__*/function () {
239
175
  }, {
240
176
  key: "getWebhook",
241
177
  value: function getWebhook(webhook_gid, opts) {
242
- // Check if RETURN_COLLECTION is set and return a collection object if it is
243
- if (this.apiClient.RETURN_COLLECTION && false) {
244
- return this.getWebhookWithHttpInfo(webhook_gid, opts);
245
- } else {
246
- return this.getWebhookWithHttpInfo(webhook_gid, opts).then(function (response_and_data) {
247
- return response_and_data.data;
248
- });
249
- }
178
+ return this.getWebhookWithHttpInfo(webhook_gid, opts).then(function (response_and_data) {
179
+ return response_and_data.data;
180
+ });
250
181
  }
251
182
 
252
183
  /**
@@ -280,9 +211,8 @@ var WebhooksApi = exports.WebhooksApi = /*#__PURE__*/function () {
280
211
  var contentTypes = [];
281
212
  var accepts = ['application/json; charset=UTF-8'];
282
213
  var returnType = 'Blob';
283
-
284
214
  // Check if RETURN_COLLECTION is set and return a collection object if it is
285
- if (this.apiClient.RETURN_COLLECTION && true) {
215
+ if (this.apiClient.RETURN_COLLECTION) {
286
216
  return Collection.fromApiClient(this.apiClient.callApi('/webhooks', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
287
217
  'path': '/webhooks',
288
218
  'httpMethod': 'GET',
@@ -296,9 +226,8 @@ var WebhooksApi = exports.WebhooksApi = /*#__PURE__*/function () {
296
226
  'accepts': accepts,
297
227
  'returnType': returnType
298
228
  });
299
- } else {
300
- return this.apiClient.callApi('/webhooks', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
301
229
  }
230
+ return this.apiClient.callApi('/webhooks', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
302
231
  }
303
232
 
304
233
  /**
@@ -316,13 +245,12 @@ var WebhooksApi = exports.WebhooksApi = /*#__PURE__*/function () {
316
245
  key: "getWebhooks",
317
246
  value: function getWebhooks(workspace, opts) {
318
247
  // Check if RETURN_COLLECTION is set and return a collection object if it is
319
- if (this.apiClient.RETURN_COLLECTION && true) {
248
+ if (this.apiClient.RETURN_COLLECTION) {
320
249
  return this.getWebhooksWithHttpInfo(workspace, opts);
321
- } else {
322
- return this.getWebhooksWithHttpInfo(workspace, opts).then(function (response_and_data) {
323
- return response_and_data.data;
324
- });
325
250
  }
251
+ return this.getWebhooksWithHttpInfo(workspace, opts).then(function (response_and_data) {
252
+ return response_and_data.data;
253
+ });
326
254
  }
327
255
 
328
256
  /**
@@ -359,25 +287,7 @@ var WebhooksApi = exports.WebhooksApi = /*#__PURE__*/function () {
359
287
  var contentTypes = ['application/json; charset=UTF-8'];
360
288
  var accepts = ['application/json; charset=UTF-8'];
361
289
  var returnType = 'Blob';
362
-
363
- // Check if RETURN_COLLECTION is set and return a collection object if it is
364
- if (this.apiClient.RETURN_COLLECTION && false) {
365
- return Collection.fromApiClient(this.apiClient.callApi('/webhooks/{webhook_gid}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
366
- 'path': '/webhooks/{webhook_gid}',
367
- 'httpMethod': 'PUT',
368
- 'pathParams': pathParams,
369
- 'queryParams': queryParams,
370
- 'headerParams': headerParams,
371
- 'formParams': formParams,
372
- 'bodyParam': postBody,
373
- 'authNames': authNames,
374
- 'contentTypes': contentTypes,
375
- 'accepts': accepts,
376
- 'returnType': returnType
377
- });
378
- } else {
379
- return this.apiClient.callApi('/webhooks/{webhook_gid}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
380
- }
290
+ return this.apiClient.callApi('/webhooks/{webhook_gid}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
381
291
  }
382
292
 
383
293
  /**
@@ -392,15 +302,9 @@ var WebhooksApi = exports.WebhooksApi = /*#__PURE__*/function () {
392
302
  }, {
393
303
  key: "updateWebhook",
394
304
  value: function updateWebhook(body, webhook_gid, opts) {
395
- // Check if RETURN_COLLECTION is set and return a collection object if it is
396
- if (this.apiClient.RETURN_COLLECTION && false) {
397
- return this.updateWebhookWithHttpInfo(body, webhook_gid, opts);
398
- } else {
399
- return this.updateWebhookWithHttpInfo(body, webhook_gid, opts).then(function (response_and_data) {
400
- return response_and_data.data;
401
- });
402
- }
305
+ return this.updateWebhookWithHttpInfo(body, webhook_gid, opts).then(function (response_and_data) {
306
+ return response_and_data.data;
307
+ });
403
308
  }
404
309
  }]);
405
- return WebhooksApi;
406
310
  }();
@@ -9,7 +9,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
9
9
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10
10
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
11
11
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
13
13
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
14
14
  * Asana
15
15
  * This is the interface for interacting with the [Asana Platform](https://developers.asana.com). Our API reference is generated from our [OpenAPI spec] (https://raw.githubusercontent.com/Asana/openapi/master/defs/asana_oas.yaml).
@@ -19,7 +19,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
19
19
  * NOTE: This class is auto generated by the swagger code generator program.
20
20
  * https://github.com/swagger-api/swagger-codegen.git
21
21
  *
22
- * Swagger Codegen version: 3.0.52
22
+ * Swagger Codegen version: 3.0.54
23
23
  *
24
24
  * Do not edit the class manually.
25
25
  *
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * WorkspaceMemberships service.
31
31
  * @module api/WorkspaceMembershipsApi
32
- * @version 3.0.2
32
+ * @version 3.0.4
33
33
  */
34
34
  var WorkspaceMembershipsApi = exports.WorkspaceMembershipsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -53,7 +53,7 @@ var WorkspaceMembershipsApi = exports.WorkspaceMembershipsApi = /*#__PURE__*/fun
53
53
  * @param {Array.<module:model/String>} 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.
54
54
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
55
55
  */
56
- _createClass(WorkspaceMembershipsApi, [{
56
+ return _createClass(WorkspaceMembershipsApi, [{
57
57
  key: "getWorkspaceMembershipWithHttpInfo",
58
58
  value: function getWorkspaceMembershipWithHttpInfo(workspace_membership_gid, opts) {
59
59
  opts = opts || {};
@@ -74,25 +74,7 @@ var WorkspaceMembershipsApi = exports.WorkspaceMembershipsApi = /*#__PURE__*/fun
74
74
  var contentTypes = [];
75
75
  var accepts = ['application/json; charset=UTF-8'];
76
76
  var returnType = 'Blob';
77
-
78
- // Check if RETURN_COLLECTION is set and return a collection object if it is
79
- if (this.apiClient.RETURN_COLLECTION && false) {
80
- return Collection.fromApiClient(this.apiClient.callApi('/workspace_memberships/{workspace_membership_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
81
- 'path': '/workspace_memberships/{workspace_membership_gid}',
82
- 'httpMethod': 'GET',
83
- 'pathParams': pathParams,
84
- 'queryParams': queryParams,
85
- 'headerParams': headerParams,
86
- 'formParams': formParams,
87
- 'bodyParam': postBody,
88
- 'authNames': authNames,
89
- 'contentTypes': contentTypes,
90
- 'accepts': accepts,
91
- 'returnType': returnType
92
- });
93
- } else {
94
- return this.apiClient.callApi('/workspace_memberships/{workspace_membership_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
95
- }
77
+ return this.apiClient.callApi('/workspace_memberships/{workspace_membership_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
96
78
  }
97
79
 
98
80
  /**
@@ -106,14 +88,9 @@ var WorkspaceMembershipsApi = exports.WorkspaceMembershipsApi = /*#__PURE__*/fun
106
88
  }, {
107
89
  key: "getWorkspaceMembership",
108
90
  value: function getWorkspaceMembership(workspace_membership_gid, opts) {
109
- // Check if RETURN_COLLECTION is set and return a collection object if it is
110
- if (this.apiClient.RETURN_COLLECTION && false) {
111
- return this.getWorkspaceMembershipWithHttpInfo(workspace_membership_gid, opts);
112
- } else {
113
- return this.getWorkspaceMembershipWithHttpInfo(workspace_membership_gid, opts).then(function (response_and_data) {
114
- return response_and_data.data;
115
- });
116
- }
91
+ return this.getWorkspaceMembershipWithHttpInfo(workspace_membership_gid, opts).then(function (response_and_data) {
92
+ return response_and_data.data;
93
+ });
117
94
  }
118
95
 
119
96
  /**
@@ -147,9 +124,8 @@ var WorkspaceMembershipsApi = exports.WorkspaceMembershipsApi = /*#__PURE__*/fun
147
124
  var contentTypes = [];
148
125
  var accepts = ['application/json; charset=UTF-8'];
149
126
  var returnType = 'Blob';
150
-
151
127
  // Check if RETURN_COLLECTION is set and return a collection object if it is
152
- if (this.apiClient.RETURN_COLLECTION && true) {
128
+ if (this.apiClient.RETURN_COLLECTION) {
153
129
  return Collection.fromApiClient(this.apiClient.callApi('/users/{user_gid}/workspace_memberships', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
154
130
  'path': '/users/{user_gid}/workspace_memberships',
155
131
  'httpMethod': 'GET',
@@ -163,9 +139,8 @@ var WorkspaceMembershipsApi = exports.WorkspaceMembershipsApi = /*#__PURE__*/fun
163
139
  'accepts': accepts,
164
140
  'returnType': returnType
165
141
  });
166
- } else {
167
- return this.apiClient.callApi('/users/{user_gid}/workspace_memberships', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
168
142
  }
143
+ return this.apiClient.callApi('/users/{user_gid}/workspace_memberships', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
169
144
  }
170
145
 
171
146
  /**
@@ -182,13 +157,12 @@ var WorkspaceMembershipsApi = exports.WorkspaceMembershipsApi = /*#__PURE__*/fun
182
157
  key: "getWorkspaceMembershipsForUser",
183
158
  value: function getWorkspaceMembershipsForUser(user_gid, opts) {
184
159
  // Check if RETURN_COLLECTION is set and return a collection object if it is
185
- if (this.apiClient.RETURN_COLLECTION && true) {
160
+ if (this.apiClient.RETURN_COLLECTION) {
186
161
  return this.getWorkspaceMembershipsForUserWithHttpInfo(user_gid, opts);
187
- } else {
188
- return this.getWorkspaceMembershipsForUserWithHttpInfo(user_gid, opts).then(function (response_and_data) {
189
- return response_and_data.data;
190
- });
191
162
  }
163
+ return this.getWorkspaceMembershipsForUserWithHttpInfo(user_gid, opts).then(function (response_and_data) {
164
+ return response_and_data.data;
165
+ });
192
166
  }
193
167
 
194
168
  /**
@@ -223,9 +197,8 @@ var WorkspaceMembershipsApi = exports.WorkspaceMembershipsApi = /*#__PURE__*/fun
223
197
  var contentTypes = [];
224
198
  var accepts = ['application/json; charset=UTF-8'];
225
199
  var returnType = 'Blob';
226
-
227
200
  // Check if RETURN_COLLECTION is set and return a collection object if it is
228
- if (this.apiClient.RETURN_COLLECTION && true) {
201
+ if (this.apiClient.RETURN_COLLECTION) {
229
202
  return Collection.fromApiClient(this.apiClient.callApi('/workspaces/{workspace_gid}/workspace_memberships', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
230
203
  'path': '/workspaces/{workspace_gid}/workspace_memberships',
231
204
  'httpMethod': 'GET',
@@ -239,9 +212,8 @@ var WorkspaceMembershipsApi = exports.WorkspaceMembershipsApi = /*#__PURE__*/fun
239
212
  'accepts': accepts,
240
213
  'returnType': returnType
241
214
  });
242
- } else {
243
- return this.apiClient.callApi('/workspaces/{workspace_gid}/workspace_memberships', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
244
215
  }
216
+ return this.apiClient.callApi('/workspaces/{workspace_gid}/workspace_memberships', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
245
217
  }
246
218
 
247
219
  /**
@@ -259,14 +231,12 @@ var WorkspaceMembershipsApi = exports.WorkspaceMembershipsApi = /*#__PURE__*/fun
259
231
  key: "getWorkspaceMembershipsForWorkspace",
260
232
  value: function getWorkspaceMembershipsForWorkspace(workspace_gid, opts) {
261
233
  // Check if RETURN_COLLECTION is set and return a collection object if it is
262
- if (this.apiClient.RETURN_COLLECTION && true) {
234
+ if (this.apiClient.RETURN_COLLECTION) {
263
235
  return this.getWorkspaceMembershipsForWorkspaceWithHttpInfo(workspace_gid, opts);
264
- } else {
265
- return this.getWorkspaceMembershipsForWorkspaceWithHttpInfo(workspace_gid, opts).then(function (response_and_data) {
266
- return response_and_data.data;
267
- });
268
236
  }
237
+ return this.getWorkspaceMembershipsForWorkspaceWithHttpInfo(workspace_gid, opts).then(function (response_and_data) {
238
+ return response_and_data.data;
239
+ });
269
240
  }
270
241
  }]);
271
- return WorkspaceMembershipsApi;
272
242
  }();