asana 3.1.2 → 3.1.3

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 (90) hide show
  1. package/README.md +13 -3
  2. package/dist/ApiClient.js +3 -3
  3. package/dist/api/AccessRequestsApi.js +1 -1
  4. package/dist/api/AllocationsApi.js +1 -1
  5. package/dist/api/AttachmentsApi.js +1 -1
  6. package/dist/api/AuditLogAPIApi.js +1 -1
  7. package/dist/api/BatchAPIApi.js +1 -1
  8. package/dist/api/BudgetsApi.js +290 -0
  9. package/dist/api/CustomFieldSettingsApi.js +1 -1
  10. package/dist/api/CustomFieldsApi.js +1 -1
  11. package/dist/api/CustomTypesApi.js +1 -1
  12. package/dist/api/EventsApi.js +1 -1
  13. package/dist/api/ExportsApi.js +1 -1
  14. package/dist/api/GoalRelationshipsApi.js +1 -1
  15. package/dist/api/GoalsApi.js +1 -1
  16. package/dist/api/JobsApi.js +1 -1
  17. package/dist/api/MembershipsApi.js +1 -1
  18. package/dist/api/OrganizationExportsApi.js +1 -1
  19. package/dist/api/PortfolioMembershipsApi.js +1 -1
  20. package/dist/api/PortfoliosApi.js +1 -1
  21. package/dist/api/ProjectBriefsApi.js +1 -1
  22. package/dist/api/ProjectMembershipsApi.js +1 -1
  23. package/dist/api/ProjectStatusesApi.js +1 -1
  24. package/dist/api/ProjectTemplatesApi.js +1 -1
  25. package/dist/api/ProjectsApi.js +1 -1
  26. package/dist/api/RatesApi.js +305 -0
  27. package/dist/api/ReactionsApi.js +1 -1
  28. package/dist/api/RulesApi.js +1 -1
  29. package/dist/api/SectionsApi.js +1 -1
  30. package/dist/api/StatusUpdatesApi.js +1 -1
  31. package/dist/api/StoriesApi.js +1 -1
  32. package/dist/api/TagsApi.js +1 -1
  33. package/dist/api/TaskTemplatesApi.js +1 -1
  34. package/dist/api/TasksApi.js +3 -3
  35. package/dist/api/TeamMembershipsApi.js +1 -1
  36. package/dist/api/TeamsApi.js +1 -1
  37. package/dist/api/TimePeriodsApi.js +1 -1
  38. package/dist/api/TimeTrackingEntriesApi.js +7 -7
  39. package/dist/api/TypeaheadApi.js +1 -1
  40. package/dist/api/UserTaskListsApi.js +1 -1
  41. package/dist/api/UsersApi.js +1 -1
  42. package/dist/api/WebhooksApi.js +1 -1
  43. package/dist/api/WorkspaceMembershipsApi.js +1 -1
  44. package/dist/api/WorkspacesApi.js +3 -3
  45. package/dist/index.js +14 -0
  46. package/package.json +1 -1
  47. package/src/ApiClient.js +3 -3
  48. package/src/api/AccessRequestsApi.js +1 -1
  49. package/src/api/AllocationsApi.js +1 -1
  50. package/src/api/AttachmentsApi.js +1 -1
  51. package/src/api/AuditLogAPIApi.js +1 -1
  52. package/src/api/BatchAPIApi.js +1 -1
  53. package/src/api/BudgetsApi.js +350 -0
  54. package/src/api/CustomFieldSettingsApi.js +1 -1
  55. package/src/api/CustomFieldsApi.js +1 -1
  56. package/src/api/CustomTypesApi.js +1 -1
  57. package/src/api/EventsApi.js +1 -1
  58. package/src/api/ExportsApi.js +1 -1
  59. package/src/api/GoalRelationshipsApi.js +1 -1
  60. package/src/api/GoalsApi.js +1 -1
  61. package/src/api/JobsApi.js +1 -1
  62. package/src/api/MembershipsApi.js +1 -1
  63. package/src/api/OrganizationExportsApi.js +1 -1
  64. package/src/api/PortfolioMembershipsApi.js +1 -1
  65. package/src/api/PortfoliosApi.js +1 -1
  66. package/src/api/ProjectBriefsApi.js +1 -1
  67. package/src/api/ProjectMembershipsApi.js +1 -1
  68. package/src/api/ProjectStatusesApi.js +1 -1
  69. package/src/api/ProjectTemplatesApi.js +1 -1
  70. package/src/api/ProjectsApi.js +1 -1
  71. package/src/api/RatesApi.js +363 -0
  72. package/src/api/ReactionsApi.js +1 -1
  73. package/src/api/RulesApi.js +1 -1
  74. package/src/api/SectionsApi.js +1 -1
  75. package/src/api/StatusUpdatesApi.js +1 -1
  76. package/src/api/StoriesApi.js +1 -1
  77. package/src/api/TagsApi.js +1 -1
  78. package/src/api/TaskTemplatesApi.js +1 -1
  79. package/src/api/TasksApi.js +3 -3
  80. package/src/api/TeamMembershipsApi.js +1 -1
  81. package/src/api/TeamsApi.js +1 -1
  82. package/src/api/TimePeriodsApi.js +1 -1
  83. package/src/api/TimeTrackingEntriesApi.js +7 -7
  84. package/src/api/TypeaheadApi.js +1 -1
  85. package/src/api/UserTaskListsApi.js +1 -1
  86. package/src/api/UsersApi.js +1 -1
  87. package/src/api/WebhooksApi.js +1 -1
  88. package/src/api/WorkspaceMembershipsApi.js +1 -1
  89. package/src/api/WorkspacesApi.js +3 -3
  90. package/src/index.js +15 -1
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # asana [![GitHub release][release-image]][release-url] [![NPM Version][npm-image]][npm-url]
2
2
 
3
3
  - API version: 1.0
4
- - Package version: 3.1.2
4
+ - Package version: 3.1.3
5
5
 
6
6
  ## Installation
7
7
 
@@ -18,7 +18,7 @@ npm install asana --save
18
18
  Include the latest release directly from GitHub:
19
19
 
20
20
  ```html
21
- <script src="https://github.com/Asana/node-asana/releases/download/v3.1.2/asana-min.js"></script>
21
+ <script src="https://github.com/Asana/node-asana/releases/download/v3.1.3/asana-min.js"></script>
22
22
  ```
23
23
 
24
24
  Example usage (**NOTE**: be careful not to expose your access token):
@@ -210,6 +210,11 @@ Class | Method | HTTP request | Description
210
210
  *Asana.AttachmentsApi* | [**getAttachmentsForObject**](docs/AttachmentsApi.md#getAttachmentsForObject) | **GET** /attachments | Get attachments from an object
211
211
  *Asana.AuditLogAPIApi* | [**getAuditLogEvents**](docs/AuditLogAPIApi.md#getAuditLogEvents) | **GET** /workspaces/{workspace_gid}/audit_log_events | Get audit log events
212
212
  *Asana.BatchAPIApi* | [**createBatchRequest**](docs/BatchAPIApi.md#createBatchRequest) | **POST** /batch | Submit parallel requests
213
+ *Asana.BudgetsApi* | [**createBudget**](docs/BudgetsApi.md#createBudget) | **POST** /budgets | Create a budget
214
+ *Asana.BudgetsApi* | [**deleteBudget**](docs/BudgetsApi.md#deleteBudget) | **DELETE** /budgets/{budget_gid} | Delete a budget
215
+ *Asana.BudgetsApi* | [**getBudget**](docs/BudgetsApi.md#getBudget) | **GET** /budgets/{budget_gid} | Get a budget
216
+ *Asana.BudgetsApi* | [**getBudgets**](docs/BudgetsApi.md#getBudgets) | **GET** /budgets | Get all budgets
217
+ *Asana.BudgetsApi* | [**updateBudget**](docs/BudgetsApi.md#updateBudget) | **PUT** /budgets/{budget_gid} | Update a budget
213
218
  *Asana.CustomFieldSettingsApi* | [**getCustomFieldSettingsForPortfolio**](docs/CustomFieldSettingsApi.md#getCustomFieldSettingsForPortfolio) | **GET** /portfolios/{portfolio_gid}/custom_field_settings | Get a portfolio&#x27;s custom fields
214
219
  *Asana.CustomFieldSettingsApi* | [**getCustomFieldSettingsForProject**](docs/CustomFieldSettingsApi.md#getCustomFieldSettingsForProject) | **GET** /projects/{project_gid}/custom_field_settings | Get a project&#x27;s custom fields
215
220
  *Asana.CustomFieldsApi* | [**createCustomField**](docs/CustomFieldsApi.md#createCustomField) | **POST** /custom_fields | Create a custom field
@@ -297,6 +302,11 @@ Class | Method | HTTP request | Description
297
302
  *Asana.ProjectsApi* | [**removeFollowersForProject**](docs/ProjectsApi.md#removeFollowersForProject) | **POST** /projects/{project_gid}/removeFollowers | Remove followers from a project
298
303
  *Asana.ProjectsApi* | [**removeMembersForProject**](docs/ProjectsApi.md#removeMembersForProject) | **POST** /projects/{project_gid}/removeMembers | Remove users from a project
299
304
  *Asana.ProjectsApi* | [**updateProject**](docs/ProjectsApi.md#updateProject) | **PUT** /projects/{project_gid} | Update a project
305
+ *Asana.RatesApi* | [**createRate**](docs/RatesApi.md#createRate) | **POST** /rates | Create a rate
306
+ *Asana.RatesApi* | [**deleteRate**](docs/RatesApi.md#deleteRate) | **DELETE** /rates/{rate_gid} | Delete a rate
307
+ *Asana.RatesApi* | [**getRate**](docs/RatesApi.md#getRate) | **GET** /rates/{rate_gid} | Get a rate
308
+ *Asana.RatesApi* | [**getRates**](docs/RatesApi.md#getRates) | **GET** /rates | Get multiple rates
309
+ *Asana.RatesApi* | [**updateRate**](docs/RatesApi.md#updateRate) | **PUT** /rates/{rate_gid} | Update a rate
300
310
  *Asana.ReactionsApi* | [**getReactionsOnObject**](docs/ReactionsApi.md#getReactionsOnObject) | **GET** /reactions | Get reactions with an emoji base on an object.
301
311
  *Asana.RulesApi* | [**triggerRule**](docs/RulesApi.md#triggerRule) | **POST** /rule_triggers/{rule_trigger_gid}/run | Trigger a rule
302
312
  *Asana.SectionsApi* | [**addTaskForSection**](docs/SectionsApi.md#addTaskForSection) | **POST** /sections/{section_gid}/addTask | Add task to section
@@ -1122,6 +1132,6 @@ client.callApi(
1122
1132
  ```
1123
1133
 
1124
1134
  [release-image]: https://img.shields.io/github/release/asana/node-asana.svg
1125
- [release-url]: https://github.com/Asana/node-asana/releases/tag/v3.1.2
1135
+ [release-url]: https://github.com/Asana/node-asana/releases/tag/v3.1.3
1126
1136
  [npm-image]: http://img.shields.io/npm/v/asana.svg?style=flat-square
1127
1137
  [npm-url]: https://www.npmjs.org/package/asana
package/dist/ApiClient.js CHANGED
@@ -28,7 +28,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
28
28
  */
29
29
  /**
30
30
  * @module ApiClient
31
- * @version 3.1.2
31
+ * @version 3.1.3
32
32
  */
33
33
  /**
34
34
  * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
@@ -405,14 +405,14 @@ var ApiClient = exports.ApiClient = /*#__PURE__*/function () {
405
405
  // set header parameters
406
406
  if (typeof navigator === 'undefined' || typeof window === 'undefined') {
407
407
  headerParams['X-Asana-Client-Lib'] = new URLSearchParams({
408
- 'version': "3.1.2",
408
+ 'version': "3.1.3",
409
409
  'language': 'NodeJS',
410
410
  'language_version': process.version,
411
411
  'os': process.platform
412
412
  }).toString();
413
413
  } else {
414
414
  headerParams['X-Asana-Client-Lib'] = new URLSearchParams({
415
- 'version': "3.1.2",
415
+ 'version': "3.1.3",
416
416
  'language': 'BrowserJS'
417
417
  }).toString();
418
418
  }
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * AccessRequests service.
31
31
  * @module api/AccessRequestsApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var AccessRequestsApi = exports.AccessRequestsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * Allocations service.
31
31
  * @module api/AllocationsApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var AllocationsApi = exports.AllocationsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * Attachments service.
31
31
  * @module api/AttachmentsApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var AttachmentsApi = exports.AttachmentsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * AuditLogAPI service.
31
31
  * @module api/AuditLogAPIApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var AuditLogAPIApi = exports.AuditLogAPIApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * BatchAPI service.
31
31
  * @module api/BatchAPIApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var BatchAPIApi = exports.BatchAPIApi = /*#__PURE__*/function () {
35
35
  /**
@@ -0,0 +1,290 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BudgetsApi = 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(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
10
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
11
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
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
+ * Budgets service.
31
+ * @module api/BudgetsApi
32
+ * @version 3.1.3
33
+ */
34
+ var BudgetsApi = exports.BudgetsApi = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new BudgetsApi.
37
+ * @alias module:api/BudgetsApi
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 BudgetsApi(apiClient) {
44
+ _classCallCheck(this, BudgetsApi);
45
+ this.apiClient = apiClient || _ApiClient.ApiClient.instance;
46
+ }
47
+
48
+ /**
49
+ * Create a budget
50
+ * Creates a new budget.
51
+ * @param {module:model/Object} body The budget to create.
52
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
53
+ */
54
+ return _createClass(BudgetsApi, [{
55
+ key: "createBudgetWithHttpInfo",
56
+ value: function createBudgetWithHttpInfo(body) {
57
+ var postBody = body;
58
+ // verify the required parameter 'body' is set
59
+ if (body === undefined || body === null) {
60
+ throw new Error("Missing the required parameter 'body' when calling createBudget");
61
+ }
62
+ var pathParams = {};
63
+ var queryParams = {};
64
+ var headerParams = {};
65
+ var formParams = {};
66
+ var authNames = ['personalAccessToken'];
67
+ var contentTypes = ['application/json; charset=UTF-8'];
68
+ var accepts = ['application/json; charset=UTF-8'];
69
+ var returnType = 'Blob';
70
+ return this.apiClient.callApi('/budgets', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
71
+ }
72
+
73
+ /**
74
+ * Create a budget
75
+ * Creates a new budget.
76
+ * @param {<&vendorExtensions.x-jsdoc-type>} body The budget to create.
77
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BudgetResponseData}
78
+ */
79
+ }, {
80
+ key: "createBudget",
81
+ value: function createBudget(body) {
82
+ return this.createBudgetWithHttpInfo(body).then(function (response_and_data) {
83
+ return response_and_data.data;
84
+ });
85
+ }
86
+
87
+ /**
88
+ * Delete a budget
89
+ * A specific, existing budget can be deleted by making a DELETE request on the URL for that budget. Returns an empty data record.
90
+ * @param {String} budget_gid Globally unique identifier for the budget.
91
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
92
+ */
93
+ }, {
94
+ key: "deleteBudgetWithHttpInfo",
95
+ value: function deleteBudgetWithHttpInfo(budget_gid) {
96
+ var postBody = null;
97
+ // verify the required parameter 'budget_gid' is set
98
+ if (budget_gid === undefined || budget_gid === null) {
99
+ throw new Error("Missing the required parameter 'budget_gid' when calling deleteBudget");
100
+ }
101
+ var pathParams = {
102
+ 'budget_gid': budget_gid
103
+ };
104
+ var queryParams = {};
105
+ var headerParams = {};
106
+ var formParams = {};
107
+ var authNames = ['personalAccessToken'];
108
+ var contentTypes = [];
109
+ var accepts = ['application/json; charset=UTF-8'];
110
+ var returnType = 'Blob';
111
+ return this.apiClient.callApi('/budgets/{budget_gid}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
112
+ }
113
+
114
+ /**
115
+ * Delete a budget
116
+ * A specific, existing budget can be deleted by making a DELETE request on the URL for that budget. Returns an empty data record.
117
+ * @param {<&vendorExtensions.x-jsdoc-type>} budget_gid Globally unique identifier for the budget.
118
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmptyResponseData}
119
+ */
120
+ }, {
121
+ key: "deleteBudget",
122
+ value: function deleteBudget(budget_gid) {
123
+ return this.deleteBudgetWithHttpInfo(budget_gid).then(function (response_and_data) {
124
+ return response_and_data.data;
125
+ });
126
+ }
127
+
128
+ /**
129
+ * Get a budget
130
+ * Returns the complete budget record for a single budget.
131
+ * @param {String} budget_gid Globally unique identifier for the budget.
132
+ * @param {Object} opts Optional parameters
133
+ * @param {Array.<module:model/String>} opts.opt_fields This endpoint returns a 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.
134
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
135
+ */
136
+ }, {
137
+ key: "getBudgetWithHttpInfo",
138
+ value: function getBudgetWithHttpInfo(budget_gid, opts) {
139
+ opts = opts || {};
140
+ var postBody = null;
141
+ // verify the required parameter 'budget_gid' is set
142
+ if (budget_gid === undefined || budget_gid === null) {
143
+ throw new Error("Missing the required parameter 'budget_gid' when calling getBudget");
144
+ }
145
+ var pathParams = {
146
+ 'budget_gid': budget_gid
147
+ };
148
+ var queryParams = {};
149
+ opts = opts || {};
150
+ queryParams = opts;
151
+ var headerParams = {};
152
+ var formParams = {};
153
+ var authNames = ['personalAccessToken'];
154
+ var contentTypes = [];
155
+ var accepts = ['application/json; charset=UTF-8'];
156
+ var returnType = 'Blob';
157
+ return this.apiClient.callApi('/budgets/{budget_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
158
+ }
159
+
160
+ /**
161
+ * Get a budget
162
+ * Returns the complete budget record for a single budget.
163
+ * @param {<&vendorExtensions.x-jsdoc-type>} budget_gid Globally unique identifier for the budget.
164
+ * @param {Object} opts Optional parameters
165
+ * @param {Array.<module:model/String>} opts.opt_fields This endpoint returns a 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.
166
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BudgetResponseData}
167
+ */
168
+ }, {
169
+ key: "getBudget",
170
+ value: function getBudget(budget_gid, opts) {
171
+ return this.getBudgetWithHttpInfo(budget_gid, opts).then(function (response_and_data) {
172
+ return response_and_data.data;
173
+ });
174
+ }
175
+
176
+ /**
177
+ * Get all budgets
178
+ * Gets all budgets for a given *parent*. This will at most return a list of size 1 for a given *parent*.
179
+ * @param {String} parent Globally unique identifier for the budget&#x27;s parent object. This currently can only be a &#x60;project&#x60;.
180
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
181
+ */
182
+ }, {
183
+ key: "getBudgetsWithHttpInfo",
184
+ value: function getBudgetsWithHttpInfo(parent) {
185
+ var postBody = null;
186
+ // verify the required parameter 'parent' is set
187
+ if (parent === undefined || parent === null) {
188
+ throw new Error("Missing the required parameter 'parent' when calling getBudgets");
189
+ }
190
+ var pathParams = {};
191
+ var queryParams = {};
192
+ queryParams['parent'] = parent;
193
+ var headerParams = {};
194
+ var formParams = {};
195
+ var authNames = ['personalAccessToken'];
196
+ var contentTypes = [];
197
+ var accepts = ['application/json; charset=UTF-8'];
198
+ var returnType = 'Blob';
199
+ // Check if RETURN_COLLECTION is set and return a collection object if it is
200
+ if (this.apiClient.RETURN_COLLECTION) {
201
+ return Collection.fromApiClient(this.apiClient.callApi('/budgets', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
202
+ 'path': '/budgets',
203
+ 'httpMethod': 'GET',
204
+ 'pathParams': pathParams,
205
+ 'queryParams': queryParams,
206
+ 'headerParams': headerParams,
207
+ 'formParams': formParams,
208
+ 'bodyParam': postBody,
209
+ 'authNames': authNames,
210
+ 'contentTypes': contentTypes,
211
+ 'accepts': accepts,
212
+ 'returnType': returnType
213
+ });
214
+ }
215
+ return this.apiClient.callApi('/budgets', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
216
+ }
217
+
218
+ /**
219
+ * Get all budgets
220
+ * Gets all budgets for a given *parent*. This will at most return a list of size 1 for a given *parent*.
221
+ * @param {<&vendorExtensions.x-jsdoc-type>} parent Globally unique identifier for the budget&#x27;s parent object. This currently can only be a &#x60;project&#x60;.
222
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BudgetResponseArray}
223
+ */
224
+ }, {
225
+ key: "getBudgets",
226
+ value: function getBudgets(parent) {
227
+ // Check if RETURN_COLLECTION is set and return a collection object if it is
228
+ if (this.apiClient.RETURN_COLLECTION) {
229
+ return this.getBudgetsWithHttpInfo(parent);
230
+ }
231
+ return this.getBudgetsWithHttpInfo(parent).then(function (response_and_data) {
232
+ return response_and_data.data;
233
+ });
234
+ }
235
+
236
+ /**
237
+ * Update a budget
238
+ * An existing budget can be updated by making a PUT request on the URL for that budget. Only the fields provided in the &#x60;data&#x60; block will be updated; any unspecified fields will remain unchanged.
239
+ * @param {module:model/Object} body The budget to update.
240
+ * @param {String} budget_gid Globally unique identifier for the budget.
241
+ * @param {Object} opts Optional parameters
242
+ * @param {Array.<module:model/String>} opts.opt_fields This endpoint returns a 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.
243
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
244
+ */
245
+ }, {
246
+ key: "updateBudgetWithHttpInfo",
247
+ value: function updateBudgetWithHttpInfo(body, budget_gid, opts) {
248
+ opts = opts || {};
249
+ var postBody = body;
250
+ // verify the required parameter 'body' is set
251
+ if (body === undefined || body === null) {
252
+ throw new Error("Missing the required parameter 'body' when calling updateBudget");
253
+ }
254
+ // verify the required parameter 'budget_gid' is set
255
+ if (budget_gid === undefined || budget_gid === null) {
256
+ throw new Error("Missing the required parameter 'budget_gid' when calling updateBudget");
257
+ }
258
+ var pathParams = {
259
+ 'budget_gid': budget_gid
260
+ };
261
+ var queryParams = {};
262
+ opts = opts || {};
263
+ queryParams = opts;
264
+ var headerParams = {};
265
+ var formParams = {};
266
+ var authNames = ['personalAccessToken'];
267
+ var contentTypes = ['application/json; charset=UTF-8'];
268
+ var accepts = ['application/json; charset=UTF-8'];
269
+ var returnType = 'Blob';
270
+ return this.apiClient.callApi('/budgets/{budget_gid}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
271
+ }
272
+
273
+ /**
274
+ * Update a budget
275
+ * An existing budget can be updated by making a PUT request on the URL for that budget. Only the fields provided in the &#x60;data&#x60; block will be updated; any unspecified fields will remain unchanged.
276
+ * @param {<&vendorExtensions.x-jsdoc-type>} body The budget to update.
277
+ * @param {<&vendorExtensions.x-jsdoc-type>} budget_gid Globally unique identifier for the budget.
278
+ * @param {Object} opts Optional parameters
279
+ * @param {Array.<module:model/String>} opts.opt_fields This endpoint returns a 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.
280
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BudgetResponseData}
281
+ */
282
+ }, {
283
+ key: "updateBudget",
284
+ value: function updateBudget(body, budget_gid, opts) {
285
+ return this.updateBudgetWithHttpInfo(body, budget_gid, opts).then(function (response_and_data) {
286
+ return response_and_data.data;
287
+ });
288
+ }
289
+ }]);
290
+ }();
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * CustomFieldSettings service.
31
31
  * @module api/CustomFieldSettingsApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var CustomFieldSettingsApi = exports.CustomFieldSettingsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * CustomFields service.
31
31
  * @module api/CustomFieldsApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * CustomTypes service.
31
31
  * @module api/CustomTypesApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var CustomTypesApi = exports.CustomTypesApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * Events service.
31
31
  * @module api/EventsApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var EventsApi = exports.EventsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * Exports service.
31
31
  * @module api/ExportsApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var ExportsApi = exports.ExportsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * GoalRelationships service.
31
31
  * @module api/GoalRelationshipsApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var GoalRelationshipsApi = exports.GoalRelationshipsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * Goals service.
31
31
  * @module api/GoalsApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var GoalsApi = exports.GoalsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * Jobs service.
31
31
  * @module api/JobsApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var JobsApi = exports.JobsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * Memberships service.
31
31
  * @module api/MembershipsApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var MembershipsApi = exports.MembershipsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * OrganizationExports service.
31
31
  * @module api/OrganizationExportsApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var OrganizationExportsApi = exports.OrganizationExportsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * PortfolioMemberships service.
31
31
  * @module api/PortfolioMembershipsApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var PortfolioMembershipsApi = exports.PortfolioMembershipsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * Portfolios service.
31
31
  * @module api/PortfoliosApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var PortfoliosApi = exports.PortfoliosApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * ProjectBriefs service.
31
31
  * @module api/ProjectBriefsApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var ProjectBriefsApi = exports.ProjectBriefsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * ProjectMemberships service.
31
31
  * @module api/ProjectMembershipsApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var ProjectMembershipsApi = exports.ProjectMembershipsApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * ProjectStatuses service.
31
31
  * @module api/ProjectStatusesApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var ProjectStatusesApi = exports.ProjectStatusesApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * ProjectTemplates service.
31
31
  * @module api/ProjectTemplatesApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var ProjectTemplatesApi = exports.ProjectTemplatesApi = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
29
29
  /**
30
30
  * Projects service.
31
31
  * @module api/ProjectsApi
32
- * @version 3.1.2
32
+ * @version 3.1.3
33
33
  */
34
34
  var ProjectsApi = exports.ProjectsApi = /*#__PURE__*/function () {
35
35
  /**