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.
- package/README.md +13 -3
- package/dist/ApiClient.js +3 -3
- package/dist/api/AccessRequestsApi.js +1 -1
- package/dist/api/AllocationsApi.js +1 -1
- package/dist/api/AttachmentsApi.js +1 -1
- package/dist/api/AuditLogAPIApi.js +1 -1
- package/dist/api/BatchAPIApi.js +1 -1
- package/dist/api/BudgetsApi.js +290 -0
- package/dist/api/CustomFieldSettingsApi.js +1 -1
- package/dist/api/CustomFieldsApi.js +1 -1
- package/dist/api/CustomTypesApi.js +1 -1
- package/dist/api/EventsApi.js +1 -1
- package/dist/api/ExportsApi.js +1 -1
- package/dist/api/GoalRelationshipsApi.js +1 -1
- package/dist/api/GoalsApi.js +1 -1
- package/dist/api/JobsApi.js +1 -1
- package/dist/api/MembershipsApi.js +1 -1
- package/dist/api/OrganizationExportsApi.js +1 -1
- package/dist/api/PortfolioMembershipsApi.js +1 -1
- package/dist/api/PortfoliosApi.js +1 -1
- package/dist/api/ProjectBriefsApi.js +1 -1
- package/dist/api/ProjectMembershipsApi.js +1 -1
- package/dist/api/ProjectStatusesApi.js +1 -1
- package/dist/api/ProjectTemplatesApi.js +1 -1
- package/dist/api/ProjectsApi.js +1 -1
- package/dist/api/RatesApi.js +305 -0
- package/dist/api/ReactionsApi.js +1 -1
- package/dist/api/RulesApi.js +1 -1
- package/dist/api/SectionsApi.js +1 -1
- package/dist/api/StatusUpdatesApi.js +1 -1
- package/dist/api/StoriesApi.js +1 -1
- package/dist/api/TagsApi.js +1 -1
- package/dist/api/TaskTemplatesApi.js +1 -1
- package/dist/api/TasksApi.js +3 -3
- package/dist/api/TeamMembershipsApi.js +1 -1
- package/dist/api/TeamsApi.js +1 -1
- package/dist/api/TimePeriodsApi.js +1 -1
- package/dist/api/TimeTrackingEntriesApi.js +7 -7
- package/dist/api/TypeaheadApi.js +1 -1
- package/dist/api/UserTaskListsApi.js +1 -1
- package/dist/api/UsersApi.js +1 -1
- package/dist/api/WebhooksApi.js +1 -1
- package/dist/api/WorkspaceMembershipsApi.js +1 -1
- package/dist/api/WorkspacesApi.js +3 -3
- package/dist/index.js +14 -0
- package/package.json +1 -1
- package/src/ApiClient.js +3 -3
- package/src/api/AccessRequestsApi.js +1 -1
- package/src/api/AllocationsApi.js +1 -1
- package/src/api/AttachmentsApi.js +1 -1
- package/src/api/AuditLogAPIApi.js +1 -1
- package/src/api/BatchAPIApi.js +1 -1
- package/src/api/BudgetsApi.js +350 -0
- package/src/api/CustomFieldSettingsApi.js +1 -1
- package/src/api/CustomFieldsApi.js +1 -1
- package/src/api/CustomTypesApi.js +1 -1
- package/src/api/EventsApi.js +1 -1
- package/src/api/ExportsApi.js +1 -1
- package/src/api/GoalRelationshipsApi.js +1 -1
- package/src/api/GoalsApi.js +1 -1
- package/src/api/JobsApi.js +1 -1
- package/src/api/MembershipsApi.js +1 -1
- package/src/api/OrganizationExportsApi.js +1 -1
- package/src/api/PortfolioMembershipsApi.js +1 -1
- package/src/api/PortfoliosApi.js +1 -1
- package/src/api/ProjectBriefsApi.js +1 -1
- package/src/api/ProjectMembershipsApi.js +1 -1
- package/src/api/ProjectStatusesApi.js +1 -1
- package/src/api/ProjectTemplatesApi.js +1 -1
- package/src/api/ProjectsApi.js +1 -1
- package/src/api/RatesApi.js +363 -0
- package/src/api/ReactionsApi.js +1 -1
- package/src/api/RulesApi.js +1 -1
- package/src/api/SectionsApi.js +1 -1
- package/src/api/StatusUpdatesApi.js +1 -1
- package/src/api/StoriesApi.js +1 -1
- package/src/api/TagsApi.js +1 -1
- package/src/api/TaskTemplatesApi.js +1 -1
- package/src/api/TasksApi.js +3 -3
- package/src/api/TeamMembershipsApi.js +1 -1
- package/src/api/TeamsApi.js +1 -1
- package/src/api/TimePeriodsApi.js +1 -1
- package/src/api/TimeTrackingEntriesApi.js +7 -7
- package/src/api/TypeaheadApi.js +1 -1
- package/src/api/UserTaskListsApi.js +1 -1
- package/src/api/UsersApi.js +1 -1
- package/src/api/WebhooksApi.js +1 -1
- package/src/api/WorkspaceMembershipsApi.js +1 -1
- package/src/api/WorkspacesApi.js +3 -3
- package/src/index.js +15 -1
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Asana
|
|
3
|
+
* 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).
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 1.0
|
|
6
|
+
*
|
|
7
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
8
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
*
|
|
10
|
+
* Swagger Codegen version: 3.0.54
|
|
11
|
+
*
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
import {ApiClient} from "../ApiClient";
|
|
16
|
+
var Collection = require('../utils/collection');
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Rates service.
|
|
20
|
+
* @module api/RatesApi
|
|
21
|
+
* @version 3.1.3
|
|
22
|
+
*/
|
|
23
|
+
export class RatesApi {
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a new RatesApi.
|
|
27
|
+
* @alias module:api/RatesApi
|
|
28
|
+
* @class
|
|
29
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
30
|
+
* default to {@link module:ApiClient#instanc
|
|
31
|
+
e} if unspecified.
|
|
32
|
+
*/
|
|
33
|
+
constructor(apiClient) {
|
|
34
|
+
this.apiClient = apiClient || ApiClient.instance;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Create a rate
|
|
41
|
+
* Creates a new rate for a `parent` + `resource` combination.
|
|
42
|
+
* @param {module:model/Object} body The rate to create.
|
|
43
|
+
* @param {Object} opts Optional parameters
|
|
44
|
+
* @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.
|
|
45
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
46
|
+
*/
|
|
47
|
+
createRateWithHttpInfo(body, opts) {
|
|
48
|
+
opts = opts || {};
|
|
49
|
+
let postBody = body;
|
|
50
|
+
// verify the required parameter 'body' is set
|
|
51
|
+
if (body === undefined || body === null) {
|
|
52
|
+
throw new Error("Missing the required parameter 'body' when calling createRate");
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
let pathParams = {
|
|
56
|
+
|
|
57
|
+
};
|
|
58
|
+
let queryParams = {};
|
|
59
|
+
opts = opts || {};
|
|
60
|
+
queryParams = opts;
|
|
61
|
+
|
|
62
|
+
let headerParams = {
|
|
63
|
+
|
|
64
|
+
};
|
|
65
|
+
let formParams = {
|
|
66
|
+
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
let authNames = ['personalAccessToken'];
|
|
70
|
+
let contentTypes = ['application/json; charset=UTF-8'];
|
|
71
|
+
let accepts = ['application/json; charset=UTF-8'];
|
|
72
|
+
let returnType = 'Blob';
|
|
73
|
+
|
|
74
|
+
return this.apiClient.callApi(
|
|
75
|
+
'/rates', 'POST',
|
|
76
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
77
|
+
authNames, contentTypes, accepts, returnType
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Create a rate
|
|
83
|
+
* Creates a new rate for a `parent` + `resource` combination.
|
|
84
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} body The rate to create.
|
|
85
|
+
* @param {Object} opts Optional parameters
|
|
86
|
+
* @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.
|
|
87
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RateResponseData}
|
|
88
|
+
*/
|
|
89
|
+
createRate(body, opts) {
|
|
90
|
+
|
|
91
|
+
return this.createRateWithHttpInfo(body, opts)
|
|
92
|
+
.then(function(response_and_data) {
|
|
93
|
+
return response_and_data.data;
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Delete a rate
|
|
100
|
+
* Deletes a rate.
|
|
101
|
+
* @param {String} rate_gid Globally unique identifier for the rate.
|
|
102
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
103
|
+
*/
|
|
104
|
+
deleteRateWithHttpInfo(rate_gid) {
|
|
105
|
+
|
|
106
|
+
let postBody = null;
|
|
107
|
+
// verify the required parameter 'rate_gid' is set
|
|
108
|
+
if (rate_gid === undefined || rate_gid === null) {
|
|
109
|
+
throw new Error("Missing the required parameter 'rate_gid' when calling deleteRate");
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
let pathParams = {
|
|
113
|
+
'rate_gid': rate_gid
|
|
114
|
+
};
|
|
115
|
+
let queryParams = {};
|
|
116
|
+
|
|
117
|
+
let headerParams = {
|
|
118
|
+
|
|
119
|
+
};
|
|
120
|
+
let formParams = {
|
|
121
|
+
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
let authNames = ['personalAccessToken'];
|
|
125
|
+
let contentTypes = [];
|
|
126
|
+
let accepts = ['application/json; charset=UTF-8'];
|
|
127
|
+
let returnType = 'Blob';
|
|
128
|
+
|
|
129
|
+
return this.apiClient.callApi(
|
|
130
|
+
'/rates/{rate_gid}', 'DELETE',
|
|
131
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
132
|
+
authNames, contentTypes, accepts, returnType
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Delete a rate
|
|
138
|
+
* Deletes a rate.
|
|
139
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} rate_gid Globally unique identifier for the rate.
|
|
140
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmptyResponseData}
|
|
141
|
+
*/
|
|
142
|
+
deleteRate(rate_gid) {
|
|
143
|
+
|
|
144
|
+
return this.deleteRateWithHttpInfo(rate_gid)
|
|
145
|
+
.then(function(response_and_data) {
|
|
146
|
+
return response_and_data.data;
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Get a rate
|
|
153
|
+
* Returns the complete rate record for a single rate.
|
|
154
|
+
* @param {String} rate_gid Globally unique identifier for the rate.
|
|
155
|
+
* @param {Object} opts Optional parameters
|
|
156
|
+
* @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.
|
|
157
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
158
|
+
*/
|
|
159
|
+
getRateWithHttpInfo(rate_gid, opts) {
|
|
160
|
+
opts = opts || {};
|
|
161
|
+
let postBody = null;
|
|
162
|
+
// verify the required parameter 'rate_gid' is set
|
|
163
|
+
if (rate_gid === undefined || rate_gid === null) {
|
|
164
|
+
throw new Error("Missing the required parameter 'rate_gid' when calling getRate");
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
let pathParams = {
|
|
168
|
+
'rate_gid': rate_gid
|
|
169
|
+
};
|
|
170
|
+
let queryParams = {};
|
|
171
|
+
opts = opts || {};
|
|
172
|
+
queryParams = opts;
|
|
173
|
+
|
|
174
|
+
let headerParams = {
|
|
175
|
+
|
|
176
|
+
};
|
|
177
|
+
let formParams = {
|
|
178
|
+
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
let authNames = ['personalAccessToken'];
|
|
182
|
+
let contentTypes = [];
|
|
183
|
+
let accepts = ['application/json; charset=UTF-8'];
|
|
184
|
+
let returnType = 'Blob';
|
|
185
|
+
|
|
186
|
+
return this.apiClient.callApi(
|
|
187
|
+
'/rates/{rate_gid}', 'GET',
|
|
188
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
189
|
+
authNames, contentTypes, accepts, returnType
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Get a rate
|
|
195
|
+
* Returns the complete rate record for a single rate.
|
|
196
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} rate_gid Globally unique identifier for the rate.
|
|
197
|
+
* @param {Object} opts Optional parameters
|
|
198
|
+
* @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.
|
|
199
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RateResponseData}
|
|
200
|
+
*/
|
|
201
|
+
getRate(rate_gid, opts) {
|
|
202
|
+
|
|
203
|
+
return this.getRateWithHttpInfo(rate_gid, opts)
|
|
204
|
+
.then(function(response_and_data) {
|
|
205
|
+
return response_and_data.data;
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Get multiple rates
|
|
212
|
+
* Returns a list of `rate` records. The possible types for `parent` in this request are `project`. An additional `resource` (`user` GID or `placeholder` GID) can be passed in to filter to a specific rate. Modifying placeholder rates is only available for Enterprise and Enterprise+ users.
|
|
213
|
+
* @param {Object} opts Optional parameters
|
|
214
|
+
* @param {String} opts.parent Globally unique identifier for `project`.
|
|
215
|
+
* @param {String} opts.resource Globally unique identifier for `user` or `placeholder`.
|
|
216
|
+
* @param {Number} opts.limit Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
|
217
|
+
* @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. *Note: You can only pass in an offset that was returned to you via a previously paginated request.*
|
|
218
|
+
* @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.
|
|
219
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
220
|
+
*/
|
|
221
|
+
getRatesWithHttpInfo(opts) {
|
|
222
|
+
opts = opts || {};
|
|
223
|
+
let postBody = null;
|
|
224
|
+
|
|
225
|
+
let pathParams = {
|
|
226
|
+
|
|
227
|
+
};
|
|
228
|
+
let queryParams = {};
|
|
229
|
+
opts = opts || {};
|
|
230
|
+
queryParams = opts;
|
|
231
|
+
|
|
232
|
+
let headerParams = {
|
|
233
|
+
|
|
234
|
+
};
|
|
235
|
+
let formParams = {
|
|
236
|
+
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
let authNames = ['personalAccessToken'];
|
|
240
|
+
let contentTypes = [];
|
|
241
|
+
let accepts = ['application/json; charset=UTF-8'];
|
|
242
|
+
let returnType = 'Blob';
|
|
243
|
+
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
244
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
245
|
+
return Collection.fromApiClient(
|
|
246
|
+
this.apiClient.callApi(
|
|
247
|
+
'/rates', 'GET',
|
|
248
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
249
|
+
authNames, contentTypes, accepts, returnType
|
|
250
|
+
),
|
|
251
|
+
this.apiClient,
|
|
252
|
+
{
|
|
253
|
+
'path': '/rates',
|
|
254
|
+
'httpMethod': 'GET',
|
|
255
|
+
'pathParams': pathParams,
|
|
256
|
+
'queryParams': queryParams,
|
|
257
|
+
'headerParams': headerParams,
|
|
258
|
+
'formParams': formParams,
|
|
259
|
+
'bodyParam': postBody,
|
|
260
|
+
'authNames': authNames,
|
|
261
|
+
'contentTypes': contentTypes,
|
|
262
|
+
'accepts': accepts,
|
|
263
|
+
'returnType': returnType
|
|
264
|
+
}
|
|
265
|
+
)
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
return this.apiClient.callApi(
|
|
269
|
+
'/rates', 'GET',
|
|
270
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
271
|
+
authNames, contentTypes, accepts, returnType
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Get multiple rates
|
|
277
|
+
* Returns a list of `rate` records. The possible types for `parent` in this request are `project`. An additional `resource` (`user` GID or `placeholder` GID) can be passed in to filter to a specific rate. Modifying placeholder rates is only available for Enterprise and Enterprise+ users.
|
|
278
|
+
* @param {Object} opts Optional parameters
|
|
279
|
+
* @param {String} opts.parent Globally unique identifier for `project`.
|
|
280
|
+
* @param {String} opts.resource Globally unique identifier for `user` or `placeholder`.
|
|
281
|
+
* @param {Number} opts.limit Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
|
282
|
+
* @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. *Note: You can only pass in an offset that was returned to you via a previously paginated request.*
|
|
283
|
+
* @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.
|
|
284
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RateOrPlaceholderCompactArray}
|
|
285
|
+
*/
|
|
286
|
+
getRates(opts) {
|
|
287
|
+
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
288
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
289
|
+
return this.getRatesWithHttpInfo(opts)
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
return this.getRatesWithHttpInfo(opts)
|
|
293
|
+
.then(function(response_and_data) {
|
|
294
|
+
return response_and_data.data;
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Update a rate
|
|
301
|
+
* An existing rate can be updated by making a PUT request on the URL for that rate. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged. (note that at this time, the only field that can be updated is the `rate` field.) Returns the complete updated rate record.
|
|
302
|
+
* @param {module:model/Object} body The updated fields for the rate.
|
|
303
|
+
* @param {String} rate_gid Globally unique identifier for the rate.
|
|
304
|
+
* @param {Object} opts Optional parameters
|
|
305
|
+
* @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.
|
|
306
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
307
|
+
*/
|
|
308
|
+
updateRateWithHttpInfo(body, rate_gid, opts) {
|
|
309
|
+
opts = opts || {};
|
|
310
|
+
let postBody = body;
|
|
311
|
+
// verify the required parameter 'body' is set
|
|
312
|
+
if (body === undefined || body === null) {
|
|
313
|
+
throw new Error("Missing the required parameter 'body' when calling updateRate");
|
|
314
|
+
}
|
|
315
|
+
// verify the required parameter 'rate_gid' is set
|
|
316
|
+
if (rate_gid === undefined || rate_gid === null) {
|
|
317
|
+
throw new Error("Missing the required parameter 'rate_gid' when calling updateRate");
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
let pathParams = {
|
|
321
|
+
'rate_gid': rate_gid
|
|
322
|
+
};
|
|
323
|
+
let queryParams = {};
|
|
324
|
+
opts = opts || {};
|
|
325
|
+
queryParams = opts;
|
|
326
|
+
|
|
327
|
+
let headerParams = {
|
|
328
|
+
|
|
329
|
+
};
|
|
330
|
+
let formParams = {
|
|
331
|
+
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
let authNames = ['personalAccessToken'];
|
|
335
|
+
let contentTypes = ['application/json; charset=UTF-8'];
|
|
336
|
+
let accepts = ['application/json; charset=UTF-8'];
|
|
337
|
+
let returnType = 'Blob';
|
|
338
|
+
|
|
339
|
+
return this.apiClient.callApi(
|
|
340
|
+
'/rates/{rate_gid}', 'PUT',
|
|
341
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
342
|
+
authNames, contentTypes, accepts, returnType
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Update a rate
|
|
348
|
+
* An existing rate can be updated by making a PUT request on the URL for that rate. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged. (note that at this time, the only field that can be updated is the `rate` field.) Returns the complete updated rate record.
|
|
349
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} body The updated fields for the rate.
|
|
350
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} rate_gid Globally unique identifier for the rate.
|
|
351
|
+
* @param {Object} opts Optional parameters
|
|
352
|
+
* @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.
|
|
353
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RateResponseData}
|
|
354
|
+
*/
|
|
355
|
+
updateRate(body, rate_gid, opts) {
|
|
356
|
+
|
|
357
|
+
return this.updateRateWithHttpInfo(body, rate_gid, opts)
|
|
358
|
+
.then(function(response_and_data) {
|
|
359
|
+
return response_and_data.data;
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
}
|
package/src/api/ReactionsApi.js
CHANGED
package/src/api/RulesApi.js
CHANGED
package/src/api/SectionsApi.js
CHANGED
package/src/api/StoriesApi.js
CHANGED
package/src/api/TagsApi.js
CHANGED
package/src/api/TasksApi.js
CHANGED
|
@@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
|
|
|
18
18
|
/**
|
|
19
19
|
* Tasks service.
|
|
20
20
|
* @module api/TasksApi
|
|
21
|
-
* @version 3.1.
|
|
21
|
+
* @version 3.1.3
|
|
22
22
|
*/
|
|
23
23
|
export class TasksApi {
|
|
24
24
|
|
|
@@ -1947,7 +1947,7 @@ export class TasksApi {
|
|
|
1947
1947
|
|
|
1948
1948
|
/**
|
|
1949
1949
|
* Set the parent of a task
|
|
1950
|
-
* <b>Required scope: </b><code>tasks:write</code> parent
|
|
1950
|
+
* <b>Required scope: </b><code>tasks:write</code> Updates the parent of a given task. This endpoint can be used to make a task a subtask of another task, or to remove its existing parent. When using `insert_before` and `insert_after`, at most one of those two options can be specified, and they must already be subtasks of the parent. Returns the complete, updated record of the affected [task](/reference/tasks#/task).
|
|
1951
1951
|
* @param {module:model/Object} body The new parent of the subtask.
|
|
1952
1952
|
* @param {String} task_gid The task to operate on.
|
|
1953
1953
|
* @param {Object} opts Optional parameters
|
|
@@ -1994,7 +1994,7 @@ export class TasksApi {
|
|
|
1994
1994
|
|
|
1995
1995
|
/**
|
|
1996
1996
|
* Set the parent of a task
|
|
1997
|
-
* <b>Required scope: </b><code>tasks:write</code> parent
|
|
1997
|
+
* <b>Required scope: </b><code>tasks:write</code> Updates the parent of a given task. This endpoint can be used to make a task a subtask of another task, or to remove its existing parent. When using `insert_before` and `insert_after`, at most one of those two options can be specified, and they must already be subtasks of the parent. Returns the complete, updated record of the affected [task](/reference/tasks#/task).
|
|
1998
1998
|
* @param {<&vendorExtensions.x-jsdoc-type>} body The new parent of the subtask.
|
|
1999
1999
|
* @param {<&vendorExtensions.x-jsdoc-type>} task_gid The task to operate on.
|
|
2000
2000
|
* @param {Object} opts Optional parameters
|
package/src/api/TeamsApi.js
CHANGED
|
@@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
|
|
|
18
18
|
/**
|
|
19
19
|
* TimeTrackingEntries service.
|
|
20
20
|
* @module api/TimeTrackingEntriesApi
|
|
21
|
-
* @version 3.1.
|
|
21
|
+
* @version 3.1.3
|
|
22
22
|
*/
|
|
23
23
|
export class TimeTrackingEntriesApi {
|
|
24
24
|
|
|
@@ -156,7 +156,7 @@ export class TimeTrackingEntriesApi {
|
|
|
156
156
|
|
|
157
157
|
/**
|
|
158
158
|
* Get multiple time tracking entries
|
|
159
|
-
* Returns a list of time tracking entries filtered to a task, attributed project, portfolio or user.
|
|
159
|
+
* <b>Required scope: </b><code>time_tracking_entries:read</code> Returns a list of time tracking entries filtered to a task, attributed project, portfolio or user.
|
|
160
160
|
* @param {Object} opts Optional parameters
|
|
161
161
|
* @param {String} opts.task Globally unique identifier for the task to filter time tracking entries by.
|
|
162
162
|
* @param {String} opts.attributable_to Globally unique identifier for the project the time tracking entries are attributed to.
|
|
@@ -224,7 +224,7 @@ export class TimeTrackingEntriesApi {
|
|
|
224
224
|
|
|
225
225
|
/**
|
|
226
226
|
* Get multiple time tracking entries
|
|
227
|
-
* Returns a list of time tracking entries filtered to a task, attributed project, portfolio or user.
|
|
227
|
+
* <b>Required scope: </b><code>time_tracking_entries:read</code> Returns a list of time tracking entries filtered to a task, attributed project, portfolio or user.
|
|
228
228
|
* @param {Object} opts Optional parameters
|
|
229
229
|
* @param {String} opts.task Globally unique identifier for the task to filter time tracking entries by.
|
|
230
230
|
* @param {String} opts.attributable_to Globally unique identifier for the project the time tracking entries are attributed to.
|
|
@@ -251,7 +251,7 @@ export class TimeTrackingEntriesApi {
|
|
|
251
251
|
|
|
252
252
|
/**
|
|
253
253
|
* Get time tracking entries for a task
|
|
254
|
-
* Returns time tracking entries for a given task.
|
|
254
|
+
* <b>Required scope: </b><code>time_tracking_entries:read</code> Returns time tracking entries for a given task.
|
|
255
255
|
* @param {String} task_gid The task to operate on.
|
|
256
256
|
* @param {Object} opts Optional parameters
|
|
257
257
|
* @param {Number} opts.limit Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
|
@@ -319,7 +319,7 @@ export class TimeTrackingEntriesApi {
|
|
|
319
319
|
|
|
320
320
|
/**
|
|
321
321
|
* Get time tracking entries for a task
|
|
322
|
-
* Returns time tracking entries for a given task.
|
|
322
|
+
* <b>Required scope: </b><code>time_tracking_entries:read</code> Returns time tracking entries for a given task.
|
|
323
323
|
* @param {<&vendorExtensions.x-jsdoc-type>} task_gid The task to operate on.
|
|
324
324
|
* @param {Object} opts Optional parameters
|
|
325
325
|
* @param {Number} opts.limit Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
|
@@ -342,7 +342,7 @@ export class TimeTrackingEntriesApi {
|
|
|
342
342
|
|
|
343
343
|
/**
|
|
344
344
|
* Get a time tracking entry
|
|
345
|
-
* Returns the complete time tracking entry record for a single time tracking entry.
|
|
345
|
+
* <b>Required scope: </b><code>time_tracking_entries:read</code> Returns the complete time tracking entry record for a single time tracking entry.
|
|
346
346
|
* @param {String} time_tracking_entry_gid Globally unique identifier for the time tracking entry.
|
|
347
347
|
* @param {Object} opts Optional parameters
|
|
348
348
|
* @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.
|
|
@@ -384,7 +384,7 @@ export class TimeTrackingEntriesApi {
|
|
|
384
384
|
|
|
385
385
|
/**
|
|
386
386
|
* Get a time tracking entry
|
|
387
|
-
* Returns the complete time tracking entry record for a single time tracking entry.
|
|
387
|
+
* <b>Required scope: </b><code>time_tracking_entries:read</code> Returns the complete time tracking entry record for a single time tracking entry.
|
|
388
388
|
* @param {<&vendorExtensions.x-jsdoc-type>} time_tracking_entry_gid Globally unique identifier for the time tracking entry.
|
|
389
389
|
* @param {Object} opts Optional parameters
|
|
390
390
|
* @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.
|
package/src/api/TypeaheadApi.js
CHANGED
package/src/api/UsersApi.js
CHANGED
package/src/api/WebhooksApi.js
CHANGED
package/src/api/WorkspacesApi.js
CHANGED
|
@@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
|
|
|
18
18
|
/**
|
|
19
19
|
* Workspaces service.
|
|
20
20
|
* @module api/WorkspacesApi
|
|
21
|
-
* @version 3.1.
|
|
21
|
+
* @version 3.1.3
|
|
22
22
|
*/
|
|
23
23
|
export class WorkspacesApi {
|
|
24
24
|
|
|
@@ -334,7 +334,7 @@ export class WorkspacesApi {
|
|
|
334
334
|
|
|
335
335
|
/**
|
|
336
336
|
* Remove a user from a workspace or organization
|
|
337
|
-
* Remove a user from a workspace or organization.
|
|
337
|
+
* Remove a user from a workspace or organization. The user making this call must be an admin in the workspace. The user can be referenced by their globally unique user ID or their email address. When invoked using a **Service Account Token (SAT)**, this endpoint follows the same behavior as the [SCIM API Delete endpoint](/docs/scim). To learn more about how Asana handles user deprovisioning, refer to our [Help Center article on deprovisioning users](https://help.asana.com/s/article/user-deprovisioning). When invoked using a **Personal Access Token (PAT)**, the endpoint behaves similarly, except that ownership of the user’s resources is transferred to the **PAT owner** instead of the admin [specified in the Admin Console](https://help.asana.com/s/article/user-deprovisioning#gl-deprovisioning). **Note:** If you wish to retain access to a user’s private resources (i.e., those visible only to that user), you have to make them public manually (or ask the user to do so) before removal. Returns an empty data record.
|
|
338
338
|
* @param {module:model/Object} body The user to remove from the workspace.
|
|
339
339
|
* @param {String} workspace_gid Globally unique identifier for the workspace or organization.
|
|
340
340
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
@@ -377,7 +377,7 @@ export class WorkspacesApi {
|
|
|
377
377
|
|
|
378
378
|
/**
|
|
379
379
|
* Remove a user from a workspace or organization
|
|
380
|
-
* Remove a user from a workspace or organization.
|
|
380
|
+
* Remove a user from a workspace or organization. The user making this call must be an admin in the workspace. The user can be referenced by their globally unique user ID or their email address. When invoked using a **Service Account Token (SAT)**, this endpoint follows the same behavior as the [SCIM API Delete endpoint](/docs/scim). To learn more about how Asana handles user deprovisioning, refer to our [Help Center article on deprovisioning users](https://help.asana.com/s/article/user-deprovisioning). When invoked using a **Personal Access Token (PAT)**, the endpoint behaves similarly, except that ownership of the user’s resources is transferred to the **PAT owner** instead of the admin [specified in the Admin Console](https://help.asana.com/s/article/user-deprovisioning#gl-deprovisioning). **Note:** If you wish to retain access to a user’s private resources (i.e., those visible only to that user), you have to make them public manually (or ask the user to do so) before removal. Returns an empty data record.
|
|
381
381
|
* @param {<&vendorExtensions.x-jsdoc-type>} body The user to remove from the workspace.
|
|
382
382
|
* @param {<&vendorExtensions.x-jsdoc-type>} workspace_gid Globally unique identifier for the workspace or organization.
|
|
383
383
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmptyResponseData}
|