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
package/dist/ApiClient.js CHANGED
@@ -11,7 +11,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
11
11
  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); } }
12
12
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13
13
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
15
  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); } /*
16
16
  * Asana
17
17
  * 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).
@@ -21,14 +21,14 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
21
21
  * NOTE: This class is auto generated by the swagger code generator program.
22
22
  * https://github.com/swagger-api/swagger-codegen.git
23
23
  *
24
- * Swagger Codegen version: 3.0.52
24
+ * Swagger Codegen version: 3.0.54
25
25
  *
26
26
  * Do not edit the class manually.
27
27
  *
28
28
  */
29
29
  /**
30
30
  * @module ApiClient
31
- * @version 3.0.2
31
+ * @version 3.0.4
32
32
  */
33
33
  /**
34
34
  * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
@@ -107,7 +107,7 @@ var ApiClient = exports.ApiClient = /*#__PURE__*/function () {
107
107
  * @param param The actual parameter.
108
108
  * @returns {String} The string representation of <code>param</code>.
109
109
  */
110
- _createClass(ApiClient, [{
110
+ return _createClass(ApiClient, [{
111
111
  key: "paramToString",
112
112
  value: function paramToString(param) {
113
113
  if (param == undefined || param == null) {
@@ -400,14 +400,14 @@ var ApiClient = exports.ApiClient = /*#__PURE__*/function () {
400
400
  // set header parameters
401
401
  if (typeof navigator === 'undefined' || typeof window === 'undefined') {
402
402
  headerParams['X-Asana-Client-Lib'] = new URLSearchParams({
403
- 'version': "3.0.2",
403
+ 'version': "3.0.4",
404
404
  'language': 'NodeJS',
405
405
  'language_version': process.version,
406
406
  'os': process.platform
407
407
  }).toString();
408
408
  } else {
409
409
  headerParams['X-Asana-Client-Lib'] = new URLSearchParams({
410
- 'version': "3.0.2",
410
+ 'version': "3.0.4",
411
411
  'language': 'BrowserJS'
412
412
  }).toString();
413
413
  }
@@ -583,7 +583,6 @@ var ApiClient = exports.ApiClient = /*#__PURE__*/function () {
583
583
  }
584
584
  }
585
585
  }]);
586
- return ApiClient;
587
586
  }();
588
587
  /**
589
588
  * The default API client implementation.
@@ -0,0 +1,307 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AllocationsApi = void 0;
7
+ var _ApiClient = require("../ApiClient");
8
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
9
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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
+ 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 : i + ""; }
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
+ * Asana
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).
16
+ *
17
+ * OpenAPI spec version: 1.0
18
+ *
19
+ * NOTE: This class is auto generated by the swagger code generator program.
20
+ * https://github.com/swagger-api/swagger-codegen.git
21
+ *
22
+ * Swagger Codegen version: 3.0.54
23
+ *
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ var Collection = require('../utils/collection');
28
+
29
+ /**
30
+ * Allocations service.
31
+ * @module api/AllocationsApi
32
+ * @version 3.0.4
33
+ */
34
+ var AllocationsApi = exports.AllocationsApi = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new AllocationsApi.
37
+ * @alias module:api/AllocationsApi
38
+ * @class
39
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
40
+ * default to {@link module:ApiClient#instanc
41
+ e} if unspecified.
42
+ */
43
+ function AllocationsApi(apiClient) {
44
+ _classCallCheck(this, AllocationsApi);
45
+ this.apiClient = apiClient || _ApiClient.ApiClient.instance;
46
+ }
47
+
48
+ /**
49
+ * Create an allocation
50
+ * Creates a new allocation. Returns the full record of the newly created allocation.
51
+ * @param {module:model/Object} body The allocation to create.
52
+ * @param {Object} opts Optional parameters
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
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
55
+ */
56
+ return _createClass(AllocationsApi, [{
57
+ key: "createAllocationWithHttpInfo",
58
+ value: function createAllocationWithHttpInfo(body, opts) {
59
+ opts = opts || {};
60
+ var postBody = body;
61
+ // verify the required parameter 'body' is set
62
+ if (body === undefined || body === null) {
63
+ throw new Error("Missing the required parameter 'body' when calling createAllocation");
64
+ }
65
+ var pathParams = {};
66
+ var queryParams = {};
67
+ opts = opts || {};
68
+ queryParams = opts;
69
+ var headerParams = {};
70
+ var formParams = {};
71
+ var authNames = ['personalAccessToken'];
72
+ var contentTypes = ['application/json; charset=UTF-8'];
73
+ var accepts = ['application/json; charset=UTF-8'];
74
+ var returnType = 'Blob';
75
+ return this.apiClient.callApi('/allocations', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
76
+ }
77
+
78
+ /**
79
+ * Create an allocation
80
+ * Creates a new allocation. Returns the full record of the newly created allocation.
81
+ * @param {<&vendorExtensions.x-jsdoc-type>} body The allocation to create.
82
+ * @param {Object} opts Optional parameters
83
+ * @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.
84
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AllocationResponseData}
85
+ */
86
+ }, {
87
+ key: "createAllocation",
88
+ value: function createAllocation(body, opts) {
89
+ return this.createAllocationWithHttpInfo(body, opts).then(function (response_and_data) {
90
+ return response_and_data.data;
91
+ });
92
+ }
93
+
94
+ /**
95
+ * Delete an allocation
96
+ * A specific, existing allocation can be deleted by making a DELETE request on the URL for that allocation. Returns an empty data record.
97
+ * @param {String} allocation_gid Globally unique identifier for the allocation.
98
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
99
+ */
100
+ }, {
101
+ key: "deleteAllocationWithHttpInfo",
102
+ value: function deleteAllocationWithHttpInfo(allocation_gid) {
103
+ var postBody = null;
104
+ // verify the required parameter 'allocation_gid' is set
105
+ if (allocation_gid === undefined || allocation_gid === null) {
106
+ throw new Error("Missing the required parameter 'allocation_gid' when calling deleteAllocation");
107
+ }
108
+ var pathParams = {
109
+ 'allocation_gid': allocation_gid
110
+ };
111
+ var queryParams = {};
112
+ var headerParams = {};
113
+ var formParams = {};
114
+ var authNames = ['personalAccessToken'];
115
+ var contentTypes = [];
116
+ var accepts = ['application/json; charset=UTF-8'];
117
+ var returnType = 'Blob';
118
+ return this.apiClient.callApi('/allocations/{allocation_gid}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
119
+ }
120
+
121
+ /**
122
+ * Delete an allocation
123
+ * A specific, existing allocation can be deleted by making a DELETE request on the URL for that allocation. Returns an empty data record.
124
+ * @param {<&vendorExtensions.x-jsdoc-type>} allocation_gid Globally unique identifier for the allocation.
125
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmptyResponseData}
126
+ */
127
+ }, {
128
+ key: "deleteAllocation",
129
+ value: function deleteAllocation(allocation_gid) {
130
+ return this.deleteAllocationWithHttpInfo(allocation_gid).then(function (response_and_data) {
131
+ return response_and_data.data;
132
+ });
133
+ }
134
+
135
+ /**
136
+ * Get an allocation
137
+ * Returns the complete allocation record for a single allocation.
138
+ * @param {String} allocation_gid Globally unique identifier for the allocation.
139
+ * @param {Object} opts Optional parameters
140
+ * @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.
141
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
142
+ */
143
+ }, {
144
+ key: "getAllocationWithHttpInfo",
145
+ value: function getAllocationWithHttpInfo(allocation_gid, opts) {
146
+ opts = opts || {};
147
+ var postBody = null;
148
+ // verify the required parameter 'allocation_gid' is set
149
+ if (allocation_gid === undefined || allocation_gid === null) {
150
+ throw new Error("Missing the required parameter 'allocation_gid' when calling getAllocation");
151
+ }
152
+ var pathParams = {
153
+ 'allocation_gid': allocation_gid
154
+ };
155
+ var queryParams = {};
156
+ opts = opts || {};
157
+ queryParams = opts;
158
+ var headerParams = {};
159
+ var formParams = {};
160
+ var authNames = ['personalAccessToken'];
161
+ var contentTypes = [];
162
+ var accepts = ['application/json; charset=UTF-8'];
163
+ var returnType = 'Blob';
164
+ return this.apiClient.callApi('/allocations/{allocation_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
165
+ }
166
+
167
+ /**
168
+ * Get an allocation
169
+ * Returns the complete allocation record for a single allocation.
170
+ * @param {<&vendorExtensions.x-jsdoc-type>} allocation_gid Globally unique identifier for the allocation.
171
+ * @param {Object} opts Optional parameters
172
+ * @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.
173
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AllocationResponseData}
174
+ */
175
+ }, {
176
+ key: "getAllocation",
177
+ value: function getAllocation(allocation_gid, opts) {
178
+ return this.getAllocationWithHttpInfo(allocation_gid, opts).then(function (response_and_data) {
179
+ return response_and_data.data;
180
+ });
181
+ }
182
+
183
+ /**
184
+ * Get multiple allocations
185
+ * Returns a list of allocations filtered to a specific project or user.
186
+ * @param {Object} opts Optional parameters
187
+ * @param {String} opts.parent Globally unique identifier for the project to filter allocations by.
188
+ * @param {String} opts.assignee Globally unique identifier for the user the allocation is assigned to.
189
+ * @param {String} opts.workspace Globally unique identifier for the workspace.
190
+ * @param {Number} opts.limit Results per page. The number of objects to return per page. The value must be between 1 and 100.
191
+ * @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. &#x27;Note: You can only pass in an offset that was returned to you via a previously paginated request.&#x27;
192
+ * @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.
193
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
194
+ */
195
+ }, {
196
+ key: "getAllocationsWithHttpInfo",
197
+ value: function getAllocationsWithHttpInfo(opts) {
198
+ opts = opts || {};
199
+ var postBody = null;
200
+ var pathParams = {};
201
+ var queryParams = {};
202
+ opts = opts || {};
203
+ queryParams = opts;
204
+ var headerParams = {};
205
+ var formParams = {};
206
+ var authNames = ['personalAccessToken'];
207
+ var contentTypes = [];
208
+ var accepts = ['application/json; charset=UTF-8'];
209
+ var returnType = 'Blob';
210
+ // Check if RETURN_COLLECTION is set and return a collection object if it is
211
+ if (this.apiClient.RETURN_COLLECTION) {
212
+ return Collection.fromApiClient(this.apiClient.callApi('/allocations', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
213
+ 'path': '/allocations',
214
+ 'httpMethod': 'GET',
215
+ 'pathParams': pathParams,
216
+ 'queryParams': queryParams,
217
+ 'headerParams': headerParams,
218
+ 'formParams': formParams,
219
+ 'bodyParam': postBody,
220
+ 'authNames': authNames,
221
+ 'contentTypes': contentTypes,
222
+ 'accepts': accepts,
223
+ 'returnType': returnType
224
+ });
225
+ }
226
+ return this.apiClient.callApi('/allocations', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
227
+ }
228
+
229
+ /**
230
+ * Get multiple allocations
231
+ * Returns a list of allocations filtered to a specific project or user.
232
+ * @param {Object} opts Optional parameters
233
+ * @param {String} opts.parent Globally unique identifier for the project to filter allocations by.
234
+ * @param {String} opts.assignee Globally unique identifier for the user the allocation is assigned to.
235
+ * @param {String} opts.workspace Globally unique identifier for the workspace.
236
+ * @param {Number} opts.limit Results per page. The number of objects to return per page. The value must be between 1 and 100.
237
+ * @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. &#x27;Note: You can only pass in an offset that was returned to you via a previously paginated request.&#x27;
238
+ * @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.
239
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AllocationResponseArray}
240
+ */
241
+ }, {
242
+ key: "getAllocations",
243
+ value: function getAllocations(opts) {
244
+ // Check if RETURN_COLLECTION is set and return a collection object if it is
245
+ if (this.apiClient.RETURN_COLLECTION) {
246
+ return this.getAllocationsWithHttpInfo(opts);
247
+ }
248
+ return this.getAllocationsWithHttpInfo(opts).then(function (response_and_data) {
249
+ return response_and_data.data;
250
+ });
251
+ }
252
+
253
+ /**
254
+ * Update an allocation
255
+ * An existing allocation can be updated by making a PUT request on the URL for that allocation. Only the fields provided in the &#x60;data&#x60; block will be updated; any unspecified fields will remain unchanged. Returns the complete updated allocation record.
256
+ * @param {module:model/Object} body The updated fields for the allocation.
257
+ * @param {String} allocation_gid Globally unique identifier for the allocation.
258
+ * @param {Object} opts Optional parameters
259
+ * @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.
260
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
261
+ */
262
+ }, {
263
+ key: "updateAllocationWithHttpInfo",
264
+ value: function updateAllocationWithHttpInfo(body, allocation_gid, opts) {
265
+ opts = opts || {};
266
+ var postBody = body;
267
+ // verify the required parameter 'body' is set
268
+ if (body === undefined || body === null) {
269
+ throw new Error("Missing the required parameter 'body' when calling updateAllocation");
270
+ }
271
+ // verify the required parameter 'allocation_gid' is set
272
+ if (allocation_gid === undefined || allocation_gid === null) {
273
+ throw new Error("Missing the required parameter 'allocation_gid' when calling updateAllocation");
274
+ }
275
+ var pathParams = {
276
+ 'allocation_gid': allocation_gid
277
+ };
278
+ var queryParams = {};
279
+ opts = opts || {};
280
+ queryParams = opts;
281
+ var headerParams = {};
282
+ var formParams = {};
283
+ var authNames = ['personalAccessToken'];
284
+ var contentTypes = ['application/json; charset=UTF-8'];
285
+ var accepts = ['application/json; charset=UTF-8'];
286
+ var returnType = 'Blob';
287
+ return this.apiClient.callApi('/allocations/{allocation_gid}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
288
+ }
289
+
290
+ /**
291
+ * Update an allocation
292
+ * An existing allocation can be updated by making a PUT request on the URL for that allocation. Only the fields provided in the &#x60;data&#x60; block will be updated; any unspecified fields will remain unchanged. Returns the complete updated allocation record.
293
+ * @param {<&vendorExtensions.x-jsdoc-type>} body The updated fields for the allocation.
294
+ * @param {<&vendorExtensions.x-jsdoc-type>} allocation_gid Globally unique identifier for the allocation.
295
+ * @param {Object} opts Optional parameters
296
+ * @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.
297
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AllocationResponseData}
298
+ */
299
+ }, {
300
+ key: "updateAllocation",
301
+ value: function updateAllocation(body, allocation_gid, opts) {
302
+ return this.updateAllocationWithHttpInfo(body, allocation_gid, opts).then(function (response_and_data) {
303
+ return response_and_data.data;
304
+ });
305
+ }
306
+ }]);
307
+ }();
@@ -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
  * Attachments service.
31
31
  * @module api/AttachmentsApi
32
- * @version 3.0.2
32
+ * @version 3.0.4
33
33
  */
34
34
  var AttachmentsApi = exports.AttachmentsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -58,7 +58,7 @@ var AttachmentsApi = exports.AttachmentsApi = /*#__PURE__*/function () {
58
58
  * @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.
59
59
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
60
60
  */
61
- _createClass(AttachmentsApi, [{
61
+ return _createClass(AttachmentsApi, [{
62
62
  key: "createAttachmentForObjectWithHttpInfo",
63
63
  value: function createAttachmentForObjectWithHttpInfo(opts) {
64
64
  opts = opts || {};
@@ -80,25 +80,7 @@ var AttachmentsApi = exports.AttachmentsApi = /*#__PURE__*/function () {
80
80
  var contentTypes = ['multipart/form-data'];
81
81
  var accepts = ['application/json; charset=UTF-8'];
82
82
  var returnType = 'Blob';
83
-
84
- // Check if RETURN_COLLECTION is set and return a collection object if it is
85
- if (this.apiClient.RETURN_COLLECTION && false) {
86
- return Collection.fromApiClient(this.apiClient.callApi('/attachments', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
87
- 'path': '/attachments',
88
- 'httpMethod': 'POST',
89
- 'pathParams': pathParams,
90
- 'queryParams': queryParams,
91
- 'headerParams': headerParams,
92
- 'formParams': formParams,
93
- 'bodyParam': postBody,
94
- 'authNames': authNames,
95
- 'contentTypes': contentTypes,
96
- 'accepts': accepts,
97
- 'returnType': returnType
98
- });
99
- } else {
100
- return this.apiClient.callApi('/attachments', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
101
- }
83
+ return this.apiClient.callApi('/attachments', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
102
84
  }
103
85
 
104
86
  /**
@@ -117,14 +99,9 @@ var AttachmentsApi = exports.AttachmentsApi = /*#__PURE__*/function () {
117
99
  }, {
118
100
  key: "createAttachmentForObject",
119
101
  value: function createAttachmentForObject(opts) {
120
- // Check if RETURN_COLLECTION is set and return a collection object if it is
121
- if (this.apiClient.RETURN_COLLECTION && false) {
122
- return this.createAttachmentForObjectWithHttpInfo(opts);
123
- } else {
124
- return this.createAttachmentForObjectWithHttpInfo(opts).then(function (response_and_data) {
125
- return response_and_data.data;
126
- });
127
- }
102
+ return this.createAttachmentForObjectWithHttpInfo(opts).then(function (response_and_data) {
103
+ return response_and_data.data;
104
+ });
128
105
  }
129
106
 
130
107
  /**
@@ -151,25 +128,7 @@ var AttachmentsApi = exports.AttachmentsApi = /*#__PURE__*/function () {
151
128
  var contentTypes = [];
152
129
  var accepts = ['application/json; charset=UTF-8'];
153
130
  var returnType = 'Blob';
154
-
155
- // Check if RETURN_COLLECTION is set and return a collection object if it is
156
- if (this.apiClient.RETURN_COLLECTION && false) {
157
- return Collection.fromApiClient(this.apiClient.callApi('/attachments/{attachment_gid}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
158
- 'path': '/attachments/{attachment_gid}',
159
- 'httpMethod': 'DELETE',
160
- 'pathParams': pathParams,
161
- 'queryParams': queryParams,
162
- 'headerParams': headerParams,
163
- 'formParams': formParams,
164
- 'bodyParam': postBody,
165
- 'authNames': authNames,
166
- 'contentTypes': contentTypes,
167
- 'accepts': accepts,
168
- 'returnType': returnType
169
- });
170
- } else {
171
- return this.apiClient.callApi('/attachments/{attachment_gid}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
172
- }
131
+ return this.apiClient.callApi('/attachments/{attachment_gid}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
173
132
  }
174
133
 
175
134
  /**
@@ -181,14 +140,9 @@ var AttachmentsApi = exports.AttachmentsApi = /*#__PURE__*/function () {
181
140
  }, {
182
141
  key: "deleteAttachment",
183
142
  value: function deleteAttachment(attachment_gid) {
184
- // Check if RETURN_COLLECTION is set and return a collection object if it is
185
- if (this.apiClient.RETURN_COLLECTION && false) {
186
- return this.deleteAttachmentWithHttpInfo(attachment_gid);
187
- } else {
188
- return this.deleteAttachmentWithHttpInfo(attachment_gid).then(function (response_and_data) {
189
- return response_and_data.data;
190
- });
191
- }
143
+ return this.deleteAttachmentWithHttpInfo(attachment_gid).then(function (response_and_data) {
144
+ return response_and_data.data;
145
+ });
192
146
  }
193
147
 
194
148
  /**
@@ -220,25 +174,7 @@ var AttachmentsApi = exports.AttachmentsApi = /*#__PURE__*/function () {
220
174
  var contentTypes = [];
221
175
  var accepts = ['application/json; charset=UTF-8'];
222
176
  var returnType = 'Blob';
223
-
224
- // Check if RETURN_COLLECTION is set and return a collection object if it is
225
- if (this.apiClient.RETURN_COLLECTION && false) {
226
- return Collection.fromApiClient(this.apiClient.callApi('/attachments/{attachment_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
227
- 'path': '/attachments/{attachment_gid}',
228
- 'httpMethod': 'GET',
229
- 'pathParams': pathParams,
230
- 'queryParams': queryParams,
231
- 'headerParams': headerParams,
232
- 'formParams': formParams,
233
- 'bodyParam': postBody,
234
- 'authNames': authNames,
235
- 'contentTypes': contentTypes,
236
- 'accepts': accepts,
237
- 'returnType': returnType
238
- });
239
- } else {
240
- return this.apiClient.callApi('/attachments/{attachment_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
241
- }
177
+ return this.apiClient.callApi('/attachments/{attachment_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
242
178
  }
243
179
 
244
180
  /**
@@ -252,14 +188,9 @@ var AttachmentsApi = exports.AttachmentsApi = /*#__PURE__*/function () {
252
188
  }, {
253
189
  key: "getAttachment",
254
190
  value: function getAttachment(attachment_gid, opts) {
255
- // Check if RETURN_COLLECTION is set and return a collection object if it is
256
- if (this.apiClient.RETURN_COLLECTION && false) {
257
- return this.getAttachmentWithHttpInfo(attachment_gid, opts);
258
- } else {
259
- return this.getAttachmentWithHttpInfo(attachment_gid, opts).then(function (response_and_data) {
260
- return response_and_data.data;
261
- });
262
- }
191
+ return this.getAttachmentWithHttpInfo(attachment_gid, opts).then(function (response_and_data) {
192
+ return response_and_data.data;
193
+ });
263
194
  }
264
195
 
265
196
  /**
@@ -292,9 +223,8 @@ var AttachmentsApi = exports.AttachmentsApi = /*#__PURE__*/function () {
292
223
  var contentTypes = [];
293
224
  var accepts = ['application/json; charset=UTF-8'];
294
225
  var returnType = 'Blob';
295
-
296
226
  // Check if RETURN_COLLECTION is set and return a collection object if it is
297
- if (this.apiClient.RETURN_COLLECTION && true) {
227
+ if (this.apiClient.RETURN_COLLECTION) {
298
228
  return Collection.fromApiClient(this.apiClient.callApi('/attachments', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
299
229
  'path': '/attachments',
300
230
  'httpMethod': 'GET',
@@ -308,9 +238,8 @@ var AttachmentsApi = exports.AttachmentsApi = /*#__PURE__*/function () {
308
238
  'accepts': accepts,
309
239
  'returnType': returnType
310
240
  });
311
- } else {
312
- return this.apiClient.callApi('/attachments', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
313
241
  }
242
+ return this.apiClient.callApi('/attachments', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
314
243
  }
315
244
 
316
245
  /**
@@ -327,14 +256,12 @@ var AttachmentsApi = exports.AttachmentsApi = /*#__PURE__*/function () {
327
256
  key: "getAttachmentsForObject",
328
257
  value: function getAttachmentsForObject(parent, opts) {
329
258
  // Check if RETURN_COLLECTION is set and return a collection object if it is
330
- if (this.apiClient.RETURN_COLLECTION && true) {
259
+ if (this.apiClient.RETURN_COLLECTION) {
331
260
  return this.getAttachmentsForObjectWithHttpInfo(parent, opts);
332
- } else {
333
- return this.getAttachmentsForObjectWithHttpInfo(parent, opts).then(function (response_and_data) {
334
- return response_and_data.data;
335
- });
336
261
  }
262
+ return this.getAttachmentsForObjectWithHttpInfo(parent, opts).then(function (response_and_data) {
263
+ return response_and_data.data;
264
+ });
337
265
  }
338
266
  }]);
339
- return AttachmentsApi;
340
267
  }();
@@ -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
  * AuditLogAPI service.
31
31
  * @module api/AuditLogAPIApi
32
- * @version 3.0.2
32
+ * @version 3.0.4
33
33
  */
34
34
  var AuditLogAPIApi = exports.AuditLogAPIApi = /*#__PURE__*/function () {
35
35
  /**
@@ -60,7 +60,7 @@ var AuditLogAPIApi = exports.AuditLogAPIApi = /*#__PURE__*/function () {
60
60
  * @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. &#x27;Note: You can only pass in an offset that was returned to you via a previously paginated request.&#x27;
61
61
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
62
62
  */
63
- _createClass(AuditLogAPIApi, [{
63
+ return _createClass(AuditLogAPIApi, [{
64
64
  key: "getAuditLogEventsWithHttpInfo",
65
65
  value: function getAuditLogEventsWithHttpInfo(workspace_gid, opts) {
66
66
  opts = opts || {};
@@ -81,9 +81,8 @@ var AuditLogAPIApi = exports.AuditLogAPIApi = /*#__PURE__*/function () {
81
81
  var contentTypes = [];
82
82
  var accepts = ['application/json; charset=UTF-8'];
83
83
  var returnType = 'Blob';
84
-
85
84
  // Check if RETURN_COLLECTION is set and return a collection object if it is
86
- if (this.apiClient.RETURN_COLLECTION && true) {
85
+ if (this.apiClient.RETURN_COLLECTION) {
87
86
  return Collection.fromApiClient(this.apiClient.callApi('/workspaces/{workspace_gid}/audit_log_events', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
88
87
  'path': '/workspaces/{workspace_gid}/audit_log_events',
89
88
  'httpMethod': 'GET',
@@ -97,9 +96,8 @@ var AuditLogAPIApi = exports.AuditLogAPIApi = /*#__PURE__*/function () {
97
96
  'accepts': accepts,
98
97
  'returnType': returnType
99
98
  });
100
- } else {
101
- return this.apiClient.callApi('/workspaces/{workspace_gid}/audit_log_events', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
102
99
  }
100
+ return this.apiClient.callApi('/workspaces/{workspace_gid}/audit_log_events', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
103
101
  }
104
102
 
105
103
  /**
@@ -121,14 +119,12 @@ var AuditLogAPIApi = exports.AuditLogAPIApi = /*#__PURE__*/function () {
121
119
  key: "getAuditLogEvents",
122
120
  value: function getAuditLogEvents(workspace_gid, opts) {
123
121
  // Check if RETURN_COLLECTION is set and return a collection object if it is
124
- if (this.apiClient.RETURN_COLLECTION && true) {
122
+ if (this.apiClient.RETURN_COLLECTION) {
125
123
  return this.getAuditLogEventsWithHttpInfo(workspace_gid, opts);
126
- } else {
127
- return this.getAuditLogEventsWithHttpInfo(workspace_gid, opts).then(function (response_and_data) {
128
- return response_and_data.data;
129
- });
130
124
  }
125
+ return this.getAuditLogEventsWithHttpInfo(workspace_gid, opts).then(function (response_and_data) {
126
+ return response_and_data.data;
127
+ });
131
128
  }
132
129
  }]);
133
- return AuditLogAPIApi;
134
130
  }();