asana 3.0.0 → 3.0.2

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 (84) hide show
  1. package/.github/workflows/publish.yaml +1 -1
  2. package/.swagger-codegen/VERSION +1 -1
  3. package/README.md +15 -21
  4. package/build-tests/README.md +19 -0
  5. package/build-tests/api/ProjectsApi.js +178 -0
  6. package/build-tests/api/TasksApi.js +260 -0
  7. package/codegen/swagger/src/main/java/com/asana/codegen/JavascriptClientCodegenGenerator.java +1 -1
  8. package/codegen/templates/ApiClient.mustache +18 -10
  9. package/codegen/templates/README.mustache +12 -18
  10. package/codegen/templates/package.mustache +3 -1
  11. package/dist/ApiClient.js +30 -24
  12. package/dist/api/AttachmentsApi.js +16 -16
  13. package/dist/api/AuditLogAPIApi.js +16 -16
  14. package/dist/api/BatchAPIApi.js +16 -16
  15. package/dist/api/CustomFieldSettingsApi.js +16 -16
  16. package/dist/api/CustomFieldsApi.js +16 -16
  17. package/dist/api/EventsApi.js +16 -16
  18. package/dist/api/GoalRelationshipsApi.js +16 -16
  19. package/dist/api/GoalsApi.js +18 -16
  20. package/dist/api/JobsApi.js +16 -16
  21. package/dist/api/MembershipsApi.js +16 -16
  22. package/dist/api/OrganizationExportsApi.js +16 -16
  23. package/dist/api/PortfolioMembershipsApi.js +16 -16
  24. package/dist/api/PortfoliosApi.js +16 -16
  25. package/dist/api/ProjectBriefsApi.js +16 -16
  26. package/dist/api/ProjectMembershipsApi.js +16 -16
  27. package/dist/api/ProjectStatusesApi.js +16 -16
  28. package/dist/api/ProjectTemplatesApi.js +16 -16
  29. package/dist/api/ProjectsApi.js +27 -20
  30. package/dist/api/RulesApi.js +16 -16
  31. package/dist/api/SectionsApi.js +16 -16
  32. package/dist/api/StatusUpdatesApi.js +16 -16
  33. package/dist/api/StoriesApi.js +16 -16
  34. package/dist/api/TagsApi.js +16 -16
  35. package/dist/api/TaskTemplatesApi.js +16 -16
  36. package/dist/api/TasksApi.js +16 -16
  37. package/dist/api/TeamMembershipsApi.js +16 -16
  38. package/dist/api/TeamsApi.js +16 -16
  39. package/dist/api/TimePeriodsApi.js +16 -16
  40. package/dist/api/TimeTrackingEntriesApi.js +16 -16
  41. package/dist/api/TypeaheadApi.js +16 -16
  42. package/dist/api/UserTaskListsApi.js +16 -16
  43. package/dist/api/UsersApi.js +16 -16
  44. package/dist/api/WebhooksApi.js +16 -16
  45. package/dist/api/WorkspaceMembershipsApi.js +16 -16
  46. package/dist/api/WorkspacesApi.js +16 -16
  47. package/package.json +3 -1
  48. package/src/ApiClient.js +20 -12
  49. package/src/api/AttachmentsApi.js +2 -2
  50. package/src/api/AuditLogAPIApi.js +2 -2
  51. package/src/api/BatchAPIApi.js +2 -2
  52. package/src/api/CustomFieldSettingsApi.js +2 -2
  53. package/src/api/CustomFieldsApi.js +2 -2
  54. package/src/api/EventsApi.js +2 -2
  55. package/src/api/GoalRelationshipsApi.js +2 -2
  56. package/src/api/GoalsApi.js +4 -2
  57. package/src/api/JobsApi.js +2 -2
  58. package/src/api/MembershipsApi.js +2 -2
  59. package/src/api/OrganizationExportsApi.js +2 -2
  60. package/src/api/PortfolioMembershipsApi.js +2 -2
  61. package/src/api/PortfoliosApi.js +2 -2
  62. package/src/api/ProjectBriefsApi.js +2 -2
  63. package/src/api/ProjectMembershipsApi.js +2 -2
  64. package/src/api/ProjectStatusesApi.js +2 -2
  65. package/src/api/ProjectTemplatesApi.js +2 -2
  66. package/src/api/ProjectsApi.js +13 -7
  67. package/src/api/RulesApi.js +2 -2
  68. package/src/api/SectionsApi.js +2 -2
  69. package/src/api/StatusUpdatesApi.js +2 -2
  70. package/src/api/StoriesApi.js +2 -2
  71. package/src/api/TagsApi.js +2 -2
  72. package/src/api/TaskTemplatesApi.js +2 -2
  73. package/src/api/TasksApi.js +2 -2
  74. package/src/api/TeamMembershipsApi.js +2 -2
  75. package/src/api/TeamsApi.js +2 -2
  76. package/src/api/TimePeriodsApi.js +2 -2
  77. package/src/api/TimeTrackingEntriesApi.js +2 -2
  78. package/src/api/TypeaheadApi.js +2 -2
  79. package/src/api/UserTaskListsApi.js +2 -2
  80. package/src/api/UsersApi.js +2 -2
  81. package/src/api/WebhooksApi.js +2 -2
  82. package/src/api/WorkspaceMembershipsApi.js +2 -2
  83. package/src/api/WorkspacesApi.js +2 -2
  84. package/src/index.js +2 -2
@@ -9,27 +9,27 @@ 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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /*
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.46
23
- *
24
- * Do not edit the class manually.
25
- *
26
- */
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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.52
23
+ *
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
27
  var Collection = require('../utils/collection');
28
28
 
29
29
  /**
30
30
  * Teams service.
31
31
  * @module api/TeamsApi
32
- * @version 3.0.0
32
+ * @version 3.0.2
33
33
  */
34
34
  var TeamsApi = exports.TeamsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -9,27 +9,27 @@ 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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /*
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.46
23
- *
24
- * Do not edit the class manually.
25
- *
26
- */
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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.52
23
+ *
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
27
  var Collection = require('../utils/collection');
28
28
 
29
29
  /**
30
30
  * TimePeriods service.
31
31
  * @module api/TimePeriodsApi
32
- * @version 3.0.0
32
+ * @version 3.0.2
33
33
  */
34
34
  var TimePeriodsApi = exports.TimePeriodsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -9,27 +9,27 @@ 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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /*
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.46
23
- *
24
- * Do not edit the class manually.
25
- *
26
- */
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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.52
23
+ *
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
27
  var Collection = require('../utils/collection');
28
28
 
29
29
  /**
30
30
  * TimeTrackingEntries service.
31
31
  * @module api/TimeTrackingEntriesApi
32
- * @version 3.0.0
32
+ * @version 3.0.2
33
33
  */
34
34
  var TimeTrackingEntriesApi = exports.TimeTrackingEntriesApi = /*#__PURE__*/function () {
35
35
  /**
@@ -9,27 +9,27 @@ 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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /*
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.46
23
- *
24
- * Do not edit the class manually.
25
- *
26
- */
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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.52
23
+ *
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
27
  var Collection = require('../utils/collection');
28
28
 
29
29
  /**
30
30
  * Typeahead service.
31
31
  * @module api/TypeaheadApi
32
- * @version 3.0.0
32
+ * @version 3.0.2
33
33
  */
34
34
  var TypeaheadApi = exports.TypeaheadApi = /*#__PURE__*/function () {
35
35
  /**
@@ -9,27 +9,27 @@ 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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /*
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.46
23
- *
24
- * Do not edit the class manually.
25
- *
26
- */
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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.52
23
+ *
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
27
  var Collection = require('../utils/collection');
28
28
 
29
29
  /**
30
30
  * UserTaskLists service.
31
31
  * @module api/UserTaskListsApi
32
- * @version 3.0.0
32
+ * @version 3.0.2
33
33
  */
34
34
  var UserTaskListsApi = exports.UserTaskListsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -9,27 +9,27 @@ 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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /*
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.46
23
- *
24
- * Do not edit the class manually.
25
- *
26
- */
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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.52
23
+ *
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
27
  var Collection = require('../utils/collection');
28
28
 
29
29
  /**
30
30
  * Users service.
31
31
  * @module api/UsersApi
32
- * @version 3.0.0
32
+ * @version 3.0.2
33
33
  */
34
34
  var UsersApi = exports.UsersApi = /*#__PURE__*/function () {
35
35
  /**
@@ -9,27 +9,27 @@ 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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /*
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.46
23
- *
24
- * Do not edit the class manually.
25
- *
26
- */
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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.52
23
+ *
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
27
  var Collection = require('../utils/collection');
28
28
 
29
29
  /**
30
30
  * Webhooks service.
31
31
  * @module api/WebhooksApi
32
- * @version 3.0.0
32
+ * @version 3.0.2
33
33
  */
34
34
  var WebhooksApi = exports.WebhooksApi = /*#__PURE__*/function () {
35
35
  /**
@@ -9,27 +9,27 @@ 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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /*
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.46
23
- *
24
- * Do not edit the class manually.
25
- *
26
- */
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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.52
23
+ *
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
27
  var Collection = require('../utils/collection');
28
28
 
29
29
  /**
30
30
  * WorkspaceMemberships service.
31
31
  * @module api/WorkspaceMembershipsApi
32
- * @version 3.0.0
32
+ * @version 3.0.2
33
33
  */
34
34
  var WorkspaceMembershipsApi = exports.WorkspaceMembershipsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -9,27 +9,27 @@ 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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /*
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.46
23
- *
24
- * Do not edit the class manually.
25
- *
26
- */
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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.52
23
+ *
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
27
  var Collection = require('../utils/collection');
28
28
 
29
29
  /**
30
30
  * Workspaces service.
31
31
  * @module api/WorkspacesApi
32
- * @version 3.0.0
32
+ * @version 3.0.2
33
33
  */
34
34
  var WorkspacesApi = exports.WorkspacesApi = /*#__PURE__*/function () {
35
35
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asana",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
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",
@@ -10,6 +10,7 @@
10
10
  },
11
11
  "scripts": {
12
12
  "test": "mocha --require @babel/register --recursive",
13
+ "testbuild": "mocha --timeout 20000 --require @babel/register --recursive 'build-tests/api/*.js'",
13
14
  "build": "babel src -d dist",
14
15
  "prepare": "npm run build"
15
16
  },
@@ -40,6 +41,7 @@
40
41
  "@babel/plugin-syntax-import-meta": "^7.0.0",
41
42
  "@babel/preset-env": "^7.0.0",
42
43
  "@babel/register": "^7.0.0",
44
+ "dotenv": "^16.4.1",
43
45
  "expect.js": "^0.3.1",
44
46
  "mocha": "^8.0.1",
45
47
  "sinon": "^7.2.0"
package/src/ApiClient.js CHANGED
@@ -7,17 +7,16 @@
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.46
10
+ * Swagger Codegen version: 3.0.52
11
11
  *
12
12
  * Do not edit the class manually.
13
13
  *
14
14
  */
15
15
  import superagent from "superagent";
16
- import querystring from "querystring";
17
16
 
18
17
  /**
19
18
  * @module ApiClient
20
- * @version 3.0.0
19
+ * @version 3.0.2
21
20
  */
22
21
 
23
22
  /**
@@ -410,14 +409,23 @@ export class ApiClient {
410
409
  request.query(this.normalizeParams(queryParams));
411
410
 
412
411
  // set header parameters
413
- headerParams['X-Asana-Client-Lib'] = querystring.stringify(
414
- {
415
- 'version': "3.0.0",
416
- 'language': 'NodeJS',
417
- 'language_version': process.version,
418
- 'os': process.platform
419
- }
420
- );
412
+ if (typeof(navigator) === 'undefined' || typeof(window) === 'undefined') {
413
+ headerParams['X-Asana-Client-Lib'] = new URLSearchParams(
414
+ {
415
+ 'version': "3.0.2",
416
+ 'language': 'NodeJS',
417
+ 'language_version': process.version,
418
+ 'os': process.platform
419
+ }
420
+ ).toString();
421
+ } else {
422
+ headerParams['X-Asana-Client-Lib'] = new URLSearchParams(
423
+ {
424
+ 'version': "3.0.2",
425
+ 'language': 'BrowserJS'
426
+ }
427
+ ).toString();
428
+ }
421
429
  request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));
422
430
 
423
431
  // set requestAgent if it is set by user
@@ -439,7 +447,7 @@ export class ApiClient {
439
447
  }
440
448
 
441
449
  if (contentType === 'application/x-www-form-urlencoded') {
442
- request.send(querystring.stringify(this.normalizeParams(formParams)));
450
+ request.send(new URLSearchParams(this.normalizeParams(formParams)).toString());
443
451
  } else if (contentType == 'multipart/form-data') {
444
452
  var _formParams = this.normalizeParams(formParams);
445
453
  for (var key in _formParams) {