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
  * Workspaces service.
31
31
  * @module api/WorkspacesApi
32
- * @version 3.0.2
32
+ * @version 3.0.4
33
33
  */
34
34
  var WorkspacesApi = exports.WorkspacesApi = /*#__PURE__*/function () {
35
35
  /**
@@ -54,7 +54,7 @@ var WorkspacesApi = exports.WorkspacesApi = /*#__PURE__*/function () {
54
54
  * @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.
55
55
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
56
56
  */
57
- _createClass(WorkspacesApi, [{
57
+ return _createClass(WorkspacesApi, [{
58
58
  key: "addUserForWorkspaceWithHttpInfo",
59
59
  value: function addUserForWorkspaceWithHttpInfo(body, workspace_gid, opts) {
60
60
  opts = opts || {};
@@ -79,25 +79,7 @@ var WorkspacesApi = exports.WorkspacesApi = /*#__PURE__*/function () {
79
79
  var contentTypes = ['application/json; charset=UTF-8'];
80
80
  var accepts = ['application/json; charset=UTF-8'];
81
81
  var returnType = 'Blob';
82
-
83
- // Check if RETURN_COLLECTION is set and return a collection object if it is
84
- if (this.apiClient.RETURN_COLLECTION && false) {
85
- return Collection.fromApiClient(this.apiClient.callApi('/workspaces/{workspace_gid}/addUser', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
86
- 'path': '/workspaces/{workspace_gid}/addUser',
87
- 'httpMethod': 'POST',
88
- 'pathParams': pathParams,
89
- 'queryParams': queryParams,
90
- 'headerParams': headerParams,
91
- 'formParams': formParams,
92
- 'bodyParam': postBody,
93
- 'authNames': authNames,
94
- 'contentTypes': contentTypes,
95
- 'accepts': accepts,
96
- 'returnType': returnType
97
- });
98
- } else {
99
- return this.apiClient.callApi('/workspaces/{workspace_gid}/addUser', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
100
- }
82
+ return this.apiClient.callApi('/workspaces/{workspace_gid}/addUser', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
101
83
  }
102
84
 
103
85
  /**
@@ -112,14 +94,9 @@ var WorkspacesApi = exports.WorkspacesApi = /*#__PURE__*/function () {
112
94
  }, {
113
95
  key: "addUserForWorkspace",
114
96
  value: function addUserForWorkspace(body, workspace_gid, opts) {
115
- // Check if RETURN_COLLECTION is set and return a collection object if it is
116
- if (this.apiClient.RETURN_COLLECTION && false) {
117
- return this.addUserForWorkspaceWithHttpInfo(body, workspace_gid, opts);
118
- } else {
119
- return this.addUserForWorkspaceWithHttpInfo(body, workspace_gid, opts).then(function (response_and_data) {
120
- return response_and_data.data;
121
- });
122
- }
97
+ return this.addUserForWorkspaceWithHttpInfo(body, workspace_gid, opts).then(function (response_and_data) {
98
+ return response_and_data.data;
99
+ });
123
100
  }
124
101
 
125
102
  /**
@@ -151,25 +128,7 @@ var WorkspacesApi = exports.WorkspacesApi = /*#__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('/workspaces/{workspace_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
158
- 'path': '/workspaces/{workspace_gid}',
159
- 'httpMethod': 'GET',
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('/workspaces/{workspace_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
172
- }
131
+ return this.apiClient.callApi('/workspaces/{workspace_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
173
132
  }
174
133
 
175
134
  /**
@@ -183,14 +142,9 @@ var WorkspacesApi = exports.WorkspacesApi = /*#__PURE__*/function () {
183
142
  }, {
184
143
  key: "getWorkspace",
185
144
  value: function getWorkspace(workspace_gid, opts) {
186
- // Check if RETURN_COLLECTION is set and return a collection object if it is
187
- if (this.apiClient.RETURN_COLLECTION && false) {
188
- return this.getWorkspaceWithHttpInfo(workspace_gid, opts);
189
- } else {
190
- return this.getWorkspaceWithHttpInfo(workspace_gid, opts).then(function (response_and_data) {
191
- return response_and_data.data;
192
- });
193
- }
145
+ return this.getWorkspaceWithHttpInfo(workspace_gid, opts).then(function (response_and_data) {
146
+ return response_and_data.data;
147
+ });
194
148
  }
195
149
 
196
150
  /**
@@ -217,9 +171,8 @@ var WorkspacesApi = exports.WorkspacesApi = /*#__PURE__*/function () {
217
171
  var contentTypes = [];
218
172
  var accepts = ['application/json; charset=UTF-8'];
219
173
  var returnType = 'Blob';
220
-
221
174
  // Check if RETURN_COLLECTION is set and return a collection object if it is
222
- if (this.apiClient.RETURN_COLLECTION && true) {
175
+ if (this.apiClient.RETURN_COLLECTION) {
223
176
  return Collection.fromApiClient(this.apiClient.callApi('/workspaces', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
224
177
  'path': '/workspaces',
225
178
  'httpMethod': 'GET',
@@ -233,9 +186,8 @@ var WorkspacesApi = exports.WorkspacesApi = /*#__PURE__*/function () {
233
186
  'accepts': accepts,
234
187
  'returnType': returnType
235
188
  });
236
- } else {
237
- return this.apiClient.callApi('/workspaces', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
238
189
  }
190
+ return this.apiClient.callApi('/workspaces', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
239
191
  }
240
192
 
241
193
  /**
@@ -251,13 +203,12 @@ var WorkspacesApi = exports.WorkspacesApi = /*#__PURE__*/function () {
251
203
  key: "getWorkspaces",
252
204
  value: function getWorkspaces(opts) {
253
205
  // Check if RETURN_COLLECTION is set and return a collection object if it is
254
- if (this.apiClient.RETURN_COLLECTION && true) {
206
+ if (this.apiClient.RETURN_COLLECTION) {
255
207
  return this.getWorkspacesWithHttpInfo(opts);
256
- } else {
257
- return this.getWorkspacesWithHttpInfo(opts).then(function (response_and_data) {
258
- return response_and_data.data;
259
- });
260
208
  }
209
+ return this.getWorkspacesWithHttpInfo(opts).then(function (response_and_data) {
210
+ return response_and_data.data;
211
+ });
261
212
  }
262
213
 
263
214
  /**
@@ -289,25 +240,7 @@ var WorkspacesApi = exports.WorkspacesApi = /*#__PURE__*/function () {
289
240
  var contentTypes = ['application/json; charset=UTF-8'];
290
241
  var accepts = ['application/json; charset=UTF-8'];
291
242
  var returnType = 'Blob';
292
-
293
- // Check if RETURN_COLLECTION is set and return a collection object if it is
294
- if (this.apiClient.RETURN_COLLECTION && false) {
295
- return Collection.fromApiClient(this.apiClient.callApi('/workspaces/{workspace_gid}/removeUser', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
296
- 'path': '/workspaces/{workspace_gid}/removeUser',
297
- 'httpMethod': 'POST',
298
- 'pathParams': pathParams,
299
- 'queryParams': queryParams,
300
- 'headerParams': headerParams,
301
- 'formParams': formParams,
302
- 'bodyParam': postBody,
303
- 'authNames': authNames,
304
- 'contentTypes': contentTypes,
305
- 'accepts': accepts,
306
- 'returnType': returnType
307
- });
308
- } else {
309
- return this.apiClient.callApi('/workspaces/{workspace_gid}/removeUser', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
310
- }
243
+ return this.apiClient.callApi('/workspaces/{workspace_gid}/removeUser', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
311
244
  }
312
245
 
313
246
  /**
@@ -320,14 +253,9 @@ var WorkspacesApi = exports.WorkspacesApi = /*#__PURE__*/function () {
320
253
  }, {
321
254
  key: "removeUserForWorkspace",
322
255
  value: function removeUserForWorkspace(body, workspace_gid) {
323
- // Check if RETURN_COLLECTION is set and return a collection object if it is
324
- if (this.apiClient.RETURN_COLLECTION && false) {
325
- return this.removeUserForWorkspaceWithHttpInfo(body, workspace_gid);
326
- } else {
327
- return this.removeUserForWorkspaceWithHttpInfo(body, workspace_gid).then(function (response_and_data) {
328
- return response_and_data.data;
329
- });
330
- }
256
+ return this.removeUserForWorkspaceWithHttpInfo(body, workspace_gid).then(function (response_and_data) {
257
+ return response_and_data.data;
258
+ });
331
259
  }
332
260
 
333
261
  /**
@@ -364,25 +292,7 @@ var WorkspacesApi = exports.WorkspacesApi = /*#__PURE__*/function () {
364
292
  var contentTypes = ['application/json; charset=UTF-8'];
365
293
  var accepts = ['application/json; charset=UTF-8'];
366
294
  var returnType = 'Blob';
367
-
368
- // Check if RETURN_COLLECTION is set and return a collection object if it is
369
- if (this.apiClient.RETURN_COLLECTION && false) {
370
- return Collection.fromApiClient(this.apiClient.callApi('/workspaces/{workspace_gid}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
371
- 'path': '/workspaces/{workspace_gid}',
372
- 'httpMethod': 'PUT',
373
- 'pathParams': pathParams,
374
- 'queryParams': queryParams,
375
- 'headerParams': headerParams,
376
- 'formParams': formParams,
377
- 'bodyParam': postBody,
378
- 'authNames': authNames,
379
- 'contentTypes': contentTypes,
380
- 'accepts': accepts,
381
- 'returnType': returnType
382
- });
383
- } else {
384
- return this.apiClient.callApi('/workspaces/{workspace_gid}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
385
- }
295
+ return this.apiClient.callApi('/workspaces/{workspace_gid}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
386
296
  }
387
297
 
388
298
  /**
@@ -397,15 +307,9 @@ var WorkspacesApi = exports.WorkspacesApi = /*#__PURE__*/function () {
397
307
  }, {
398
308
  key: "updateWorkspace",
399
309
  value: function updateWorkspace(body, workspace_gid, opts) {
400
- // Check if RETURN_COLLECTION is set and return a collection object if it is
401
- if (this.apiClient.RETURN_COLLECTION && false) {
402
- return this.updateWorkspaceWithHttpInfo(body, workspace_gid, opts);
403
- } else {
404
- return this.updateWorkspaceWithHttpInfo(body, workspace_gid, opts).then(function (response_and_data) {
405
- return response_and_data.data;
406
- });
407
- }
310
+ return this.updateWorkspaceWithHttpInfo(body, workspace_gid, opts).then(function (response_and_data) {
311
+ return response_and_data.data;
312
+ });
408
313
  }
409
314
  }]);
410
- return WorkspacesApi;
411
315
  }();
package/dist/index.js CHANGED
@@ -3,6 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ Object.defineProperty(exports, "AllocationsApi", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _AllocationsApi.AllocationsApi;
10
+ }
11
+ });
6
12
  Object.defineProperty(exports, "ApiClient", {
7
13
  enumerable: true,
8
14
  get: function get() {
@@ -220,6 +226,7 @@ Object.defineProperty(exports, "WorkspacesApi", {
220
226
  }
221
227
  });
222
228
  var _ApiClient = require("./ApiClient");
229
+ var _AllocationsApi = require("./api/AllocationsApi");
223
230
  var _AttachmentsApi = require("./api/AttachmentsApi");
224
231
  var _AuditLogAPIApi = require("./api/AuditLogAPIApi");
225
232
  var _BatchAPIApi = require("./api/BatchAPIApi");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asana",
3
- "version": "3.0.2",
3
+ "version": "3.0.4",
4
4
  "description": "This_is_the_interface_for_interacting_with_the__Asana_Platform_httpsdevelopers_asana_com__Our_API_reference_is_generated_from_our__OpenAPI_spec__httpsraw_githubusercontent_comAsanaopenapimasterdefsasana_oas_yaml_",
5
5
  "license": "Apache 2.0",
6
6
  "main": "dist/index.js",
package/src/ApiClient.js CHANGED
@@ -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
  *
@@ -16,7 +16,7 @@ import superagent from "superagent";
16
16
 
17
17
  /**
18
18
  * @module ApiClient
19
- * @version 3.0.2
19
+ * @version 3.0.4
20
20
  */
21
21
 
22
22
  /**
@@ -412,7 +412,7 @@ export class ApiClient {
412
412
  if (typeof(navigator) === 'undefined' || typeof(window) === 'undefined') {
413
413
  headerParams['X-Asana-Client-Lib'] = new URLSearchParams(
414
414
  {
415
- 'version': "3.0.2",
415
+ 'version': "3.0.4",
416
416
  'language': 'NodeJS',
417
417
  'language_version': process.version,
418
418
  'os': process.platform
@@ -421,7 +421,7 @@ export class ApiClient {
421
421
  } else {
422
422
  headerParams['X-Asana-Client-Lib'] = new URLSearchParams(
423
423
  {
424
- 'version': "3.0.2",
424
+ 'version': "3.0.4",
425
425
  'language': 'BrowserJS'
426
426
  }
427
427
  ).toString();