asana 3.0.2 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yaml +78 -38
- package/.swagger-codegen/VERSION +1 -1
- package/README.md +140 -29
- package/codegen/templates/README.mustache +129 -26
- package/codegen/templates/api.mustache +17 -15
- package/dist/ApiClient.js +6 -7
- package/dist/api/AllocationsApi.js +307 -0
- package/dist/api/AttachmentsApi.js +22 -95
- package/dist/api/AuditLogAPIApi.js +10 -14
- package/dist/api/BatchAPIApi.js +10 -14
- package/dist/api/CustomFieldSettingsApi.js +16 -23
- package/dist/api/CustomFieldsApi.js +38 -203
- package/dist/api/EventsApi.js +12 -16
- package/dist/api/GoalRelationshipsApi.js +26 -122
- package/dist/api/GoalsApi.js +48 -239
- package/dist/api/JobsApi.js +8 -32
- package/dist/api/MembershipsApi.js +73 -99
- package/dist/api/OrganizationExportsApi.js +12 -59
- package/dist/api/PortfolioMembershipsApi.js +20 -50
- package/dist/api/PortfoliosApi.js +56 -293
- package/dist/api/ProjectBriefsApi.js +20 -113
- package/dist/api/ProjectMembershipsApi.js +14 -41
- package/dist/api/ProjectStatusesApi.js +22 -95
- package/dist/api/ProjectTemplatesApi.js +28 -104
- package/dist/api/ProjectsApi.js +88 -446
- package/dist/api/RulesApi.js +8 -32
- package/dist/api/SectionsApi.js +34 -176
- package/dist/api/StatusUpdatesApi.js +22 -95
- package/dist/api/StoriesApi.js +26 -122
- package/dist/api/TagsApi.js +42 -167
- package/dist/api/TaskTemplatesApi.js +63 -72
- package/dist/api/TasksApi.js +173 -544
- package/dist/api/TeamMembershipsApi.js +26 -59
- package/dist/api/TeamsApi.js +36 -158
- package/dist/api/TimePeriodsApi.js +14 -41
- package/dist/api/TimeTrackingEntriesApi.js +26 -122
- package/dist/api/TypeaheadApi.js +12 -16
- package/dist/api/UserTaskListsApi.js +12 -59
- package/dist/api/UsersApi.js +32 -68
- package/dist/api/WebhooksApi.js +26 -122
- package/dist/api/WorkspaceMembershipsApi.js +20 -50
- package/dist/api/WorkspacesApi.js +26 -122
- package/dist/index.js +7 -0
- package/package.json +1 -1
- package/src/ApiClient.js +4 -4
- package/src/api/AllocationsApi.js +365 -0
- package/src/api/AttachmentsApi.js +42 -134
- package/src/api/AuditLogAPIApi.js +15 -17
- package/src/api/BatchAPIApi.js +15 -17
- package/src/api/CustomFieldSettingsApi.js +28 -32
- package/src/api/CustomFieldsApi.js +78 -290
- package/src/api/EventsApi.js +17 -19
- package/src/api/GoalRelationshipsApi.js +51 -173
- package/src/api/GoalsApi.js +100 -344
- package/src/api/JobsApi.js +11 -41
- package/src/api/MembershipsApi.js +105 -138
- package/src/api/OrganizationExportsApi.js +20 -80
- package/src/api/PortfolioMembershipsApi.js +37 -71
- package/src/api/PortfoliosApi.js +118 -422
- package/src/api/ProjectBriefsApi.js +38 -158
- package/src/api/ProjectMembershipsApi.js +24 -56
- package/src/api/ProjectStatusesApi.js +42 -134
- package/src/api/ProjectTemplatesApi.js +55 -149
- package/src/api/ProjectsApi.js +189 -647
- package/src/api/RulesApi.js +11 -41
- package/src/api/SectionsApi.js +69 -251
- package/src/api/StatusUpdatesApi.js +42 -134
- package/src/api/StoriesApi.js +51 -173
- package/src/api/TagsApi.js +86 -242
- package/src/api/TaskTemplatesApi.js +86 -95
- package/src/api/TasksApi.js +330 -799
- package/src/api/TeamMembershipsApi.js +50 -86
- package/src/api/TeamsApi.js +73 -227
- package/src/api/TimePeriodsApi.js +24 -56
- package/src/api/TimeTrackingEntriesApi.js +51 -173
- package/src/api/TypeaheadApi.js +17 -19
- package/src/api/UserTaskListsApi.js +20 -80
- package/src/api/UsersApi.js +63 -101
- package/src/api/WebhooksApi.js +51 -173
- package/src/api/WorkspaceMembershipsApi.js +37 -71
- package/src/api/WorkspacesApi.js +51 -173
- package/src/index.js +9 -2
|
@@ -0,0 +1,365 @@
|
|
|
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
|
+
* Allocations service.
|
|
20
|
+
* @module api/AllocationsApi
|
|
21
|
+
* @version 3.0.4
|
|
22
|
+
*/
|
|
23
|
+
export class AllocationsApi {
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a new AllocationsApi.
|
|
27
|
+
* @alias module:api/AllocationsApi
|
|
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 an allocation
|
|
41
|
+
* Creates a new allocation. Returns the full record of the newly created allocation.
|
|
42
|
+
* @param {module:model/Object} body The allocation to create.
|
|
43
|
+
* @param {Object} opts Optional parameters
|
|
44
|
+
* @param {Array.<module:model/String>} opts.opt_fields This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
45
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
46
|
+
*/
|
|
47
|
+
createAllocationWithHttpInfo(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 createAllocation");
|
|
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
|
+
'/allocations', 'POST',
|
|
76
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
77
|
+
authNames, contentTypes, accepts, returnType
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Create an allocation
|
|
83
|
+
* Creates a new allocation. Returns the full record of the newly created allocation.
|
|
84
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} body The allocation to create.
|
|
85
|
+
* @param {Object} opts Optional parameters
|
|
86
|
+
* @param {Array.<module:model/String>} opts.opt_fields This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
87
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AllocationResponseData}
|
|
88
|
+
*/
|
|
89
|
+
createAllocation(body, opts) {
|
|
90
|
+
|
|
91
|
+
return this.createAllocationWithHttpInfo(body, opts)
|
|
92
|
+
.then(function(response_and_data) {
|
|
93
|
+
return response_and_data.data;
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Delete an allocation
|
|
100
|
+
* A specific, existing allocation can be deleted by making a DELETE request on the URL for that allocation. Returns an empty data record.
|
|
101
|
+
* @param {String} allocation_gid Globally unique identifier for the allocation.
|
|
102
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
103
|
+
*/
|
|
104
|
+
deleteAllocationWithHttpInfo(allocation_gid) {
|
|
105
|
+
|
|
106
|
+
let postBody = null;
|
|
107
|
+
// verify the required parameter 'allocation_gid' is set
|
|
108
|
+
if (allocation_gid === undefined || allocation_gid === null) {
|
|
109
|
+
throw new Error("Missing the required parameter 'allocation_gid' when calling deleteAllocation");
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
let pathParams = {
|
|
113
|
+
'allocation_gid': allocation_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
|
+
'/allocations/{allocation_gid}', 'DELETE',
|
|
131
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
132
|
+
authNames, contentTypes, accepts, returnType
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Delete an allocation
|
|
138
|
+
* A specific, existing allocation can be deleted by making a DELETE request on the URL for that allocation. Returns an empty data record.
|
|
139
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} allocation_gid Globally unique identifier for the allocation.
|
|
140
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmptyResponseData}
|
|
141
|
+
*/
|
|
142
|
+
deleteAllocation(allocation_gid) {
|
|
143
|
+
|
|
144
|
+
return this.deleteAllocationWithHttpInfo(allocation_gid)
|
|
145
|
+
.then(function(response_and_data) {
|
|
146
|
+
return response_and_data.data;
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Get an allocation
|
|
153
|
+
* Returns the complete allocation record for a single allocation.
|
|
154
|
+
* @param {String} allocation_gid Globally unique identifier for the allocation.
|
|
155
|
+
* @param {Object} opts Optional parameters
|
|
156
|
+
* @param {Array.<module:model/String>} opts.opt_fields This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
157
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
158
|
+
*/
|
|
159
|
+
getAllocationWithHttpInfo(allocation_gid, opts) {
|
|
160
|
+
opts = opts || {};
|
|
161
|
+
let postBody = null;
|
|
162
|
+
// verify the required parameter 'allocation_gid' is set
|
|
163
|
+
if (allocation_gid === undefined || allocation_gid === null) {
|
|
164
|
+
throw new Error("Missing the required parameter 'allocation_gid' when calling getAllocation");
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
let pathParams = {
|
|
168
|
+
'allocation_gid': allocation_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
|
+
'/allocations/{allocation_gid}', 'GET',
|
|
188
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
189
|
+
authNames, contentTypes, accepts, returnType
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Get an allocation
|
|
195
|
+
* Returns the complete allocation record for a single allocation.
|
|
196
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} allocation_gid Globally unique identifier for the allocation.
|
|
197
|
+
* @param {Object} opts Optional parameters
|
|
198
|
+
* @param {Array.<module:model/String>} opts.opt_fields This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
199
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AllocationResponseData}
|
|
200
|
+
*/
|
|
201
|
+
getAllocation(allocation_gid, opts) {
|
|
202
|
+
|
|
203
|
+
return this.getAllocationWithHttpInfo(allocation_gid, opts)
|
|
204
|
+
.then(function(response_and_data) {
|
|
205
|
+
return response_and_data.data;
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Get multiple allocations
|
|
212
|
+
* Returns a list of allocations filtered to a specific project or user.
|
|
213
|
+
* @param {Object} opts Optional parameters
|
|
214
|
+
* @param {String} opts.parent Globally unique identifier for the project to filter allocations by.
|
|
215
|
+
* @param {String} opts.assignee Globally unique identifier for the user the allocation is assigned to.
|
|
216
|
+
* @param {String} opts.workspace Globally unique identifier for the workspace.
|
|
217
|
+
* @param {Number} opts.limit Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
|
218
|
+
* @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.'
|
|
219
|
+
* @param {Array.<module:model/String>} opts.opt_fields This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
220
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
221
|
+
*/
|
|
222
|
+
getAllocationsWithHttpInfo(opts) {
|
|
223
|
+
opts = opts || {};
|
|
224
|
+
let postBody = null;
|
|
225
|
+
|
|
226
|
+
let pathParams = {
|
|
227
|
+
|
|
228
|
+
};
|
|
229
|
+
let queryParams = {};
|
|
230
|
+
opts = opts || {};
|
|
231
|
+
queryParams = opts;
|
|
232
|
+
|
|
233
|
+
let headerParams = {
|
|
234
|
+
|
|
235
|
+
};
|
|
236
|
+
let formParams = {
|
|
237
|
+
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
let authNames = ['personalAccessToken'];
|
|
241
|
+
let contentTypes = [];
|
|
242
|
+
let accepts = ['application/json; charset=UTF-8'];
|
|
243
|
+
let returnType = 'Blob';
|
|
244
|
+
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
245
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
246
|
+
return Collection.fromApiClient(
|
|
247
|
+
this.apiClient.callApi(
|
|
248
|
+
'/allocations', 'GET',
|
|
249
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
250
|
+
authNames, contentTypes, accepts, returnType
|
|
251
|
+
),
|
|
252
|
+
this.apiClient,
|
|
253
|
+
{
|
|
254
|
+
'path': '/allocations',
|
|
255
|
+
'httpMethod': 'GET',
|
|
256
|
+
'pathParams': pathParams,
|
|
257
|
+
'queryParams': queryParams,
|
|
258
|
+
'headerParams': headerParams,
|
|
259
|
+
'formParams': formParams,
|
|
260
|
+
'bodyParam': postBody,
|
|
261
|
+
'authNames': authNames,
|
|
262
|
+
'contentTypes': contentTypes,
|
|
263
|
+
'accepts': accepts,
|
|
264
|
+
'returnType': returnType
|
|
265
|
+
}
|
|
266
|
+
)
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
return this.apiClient.callApi(
|
|
270
|
+
'/allocations', 'GET',
|
|
271
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
272
|
+
authNames, contentTypes, accepts, returnType
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Get multiple allocations
|
|
278
|
+
* Returns a list of allocations filtered to a specific project or user.
|
|
279
|
+
* @param {Object} opts Optional parameters
|
|
280
|
+
* @param {String} opts.parent Globally unique identifier for the project to filter allocations by.
|
|
281
|
+
* @param {String} opts.assignee Globally unique identifier for the user the allocation is assigned to.
|
|
282
|
+
* @param {String} opts.workspace Globally unique identifier for the workspace.
|
|
283
|
+
* @param {Number} opts.limit Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
|
284
|
+
* @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.'
|
|
285
|
+
* @param {Array.<module:model/String>} opts.opt_fields This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
286
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AllocationResponseArray}
|
|
287
|
+
*/
|
|
288
|
+
getAllocations(opts) {
|
|
289
|
+
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
290
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
291
|
+
return this.getAllocationsWithHttpInfo(opts)
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
return this.getAllocationsWithHttpInfo(opts)
|
|
295
|
+
.then(function(response_and_data) {
|
|
296
|
+
return response_and_data.data;
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Update an allocation
|
|
303
|
+
* An existing allocation can be updated by making a PUT request on the URL for that allocation. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged. Returns the complete updated allocation record.
|
|
304
|
+
* @param {module:model/Object} body The updated fields for the allocation.
|
|
305
|
+
* @param {String} allocation_gid Globally unique identifier for the allocation.
|
|
306
|
+
* @param {Object} opts Optional parameters
|
|
307
|
+
* @param {Array.<module:model/String>} opts.opt_fields This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
308
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
309
|
+
*/
|
|
310
|
+
updateAllocationWithHttpInfo(body, allocation_gid, opts) {
|
|
311
|
+
opts = opts || {};
|
|
312
|
+
let postBody = body;
|
|
313
|
+
// verify the required parameter 'body' is set
|
|
314
|
+
if (body === undefined || body === null) {
|
|
315
|
+
throw new Error("Missing the required parameter 'body' when calling updateAllocation");
|
|
316
|
+
}
|
|
317
|
+
// verify the required parameter 'allocation_gid' is set
|
|
318
|
+
if (allocation_gid === undefined || allocation_gid === null) {
|
|
319
|
+
throw new Error("Missing the required parameter 'allocation_gid' when calling updateAllocation");
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
let pathParams = {
|
|
323
|
+
'allocation_gid': allocation_gid
|
|
324
|
+
};
|
|
325
|
+
let queryParams = {};
|
|
326
|
+
opts = opts || {};
|
|
327
|
+
queryParams = opts;
|
|
328
|
+
|
|
329
|
+
let headerParams = {
|
|
330
|
+
|
|
331
|
+
};
|
|
332
|
+
let formParams = {
|
|
333
|
+
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
let authNames = ['personalAccessToken'];
|
|
337
|
+
let contentTypes = ['application/json; charset=UTF-8'];
|
|
338
|
+
let accepts = ['application/json; charset=UTF-8'];
|
|
339
|
+
let returnType = 'Blob';
|
|
340
|
+
|
|
341
|
+
return this.apiClient.callApi(
|
|
342
|
+
'/allocations/{allocation_gid}', 'PUT',
|
|
343
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
344
|
+
authNames, contentTypes, accepts, returnType
|
|
345
|
+
);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Update an allocation
|
|
350
|
+
* An existing allocation can be updated by making a PUT request on the URL for that allocation. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged. Returns the complete updated allocation record.
|
|
351
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} body The updated fields for the allocation.
|
|
352
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} allocation_gid Globally unique identifier for the allocation.
|
|
353
|
+
* @param {Object} opts Optional parameters
|
|
354
|
+
* @param {Array.<module:model/String>} opts.opt_fields This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
355
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AllocationResponseData}
|
|
356
|
+
*/
|
|
357
|
+
updateAllocation(body, allocation_gid, opts) {
|
|
358
|
+
|
|
359
|
+
return this.updateAllocationWithHttpInfo(body, allocation_gid, opts)
|
|
360
|
+
.then(function(response_and_data) {
|
|
361
|
+
return response_and_data.data;
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* NOTE: This class is auto generated by the swagger code generator program.
|
|
8
8
|
* https://github.com/swagger-api/swagger-codegen.git
|
|
9
9
|
*
|
|
10
|
-
* Swagger Codegen version: 3.0.
|
|
10
|
+
* Swagger Codegen version: 3.0.54
|
|
11
11
|
*
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*
|
|
@@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
|
|
|
18
18
|
/**
|
|
19
19
|
* Attachments service.
|
|
20
20
|
* @module api/AttachmentsApi
|
|
21
|
-
* @version 3.0.
|
|
21
|
+
* @version 3.0.4
|
|
22
22
|
*/
|
|
23
23
|
export class AttachmentsApi {
|
|
24
24
|
|
|
@@ -72,36 +72,11 @@ export class AttachmentsApi {
|
|
|
72
72
|
let accepts = ['application/json; charset=UTF-8'];
|
|
73
73
|
let returnType = 'Blob';
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
81
|
-
authNames, contentTypes, accepts, returnType
|
|
82
|
-
),
|
|
83
|
-
this.apiClient,
|
|
84
|
-
{
|
|
85
|
-
'path': '/attachments',
|
|
86
|
-
'httpMethod': 'POST',
|
|
87
|
-
'pathParams': pathParams,
|
|
88
|
-
'queryParams': queryParams,
|
|
89
|
-
'headerParams': headerParams,
|
|
90
|
-
'formParams': formParams,
|
|
91
|
-
'bodyParam': postBody,
|
|
92
|
-
'authNames': authNames,
|
|
93
|
-
'contentTypes': contentTypes,
|
|
94
|
-
'accepts': accepts,
|
|
95
|
-
'returnType': returnType
|
|
96
|
-
}
|
|
97
|
-
)
|
|
98
|
-
} else {
|
|
99
|
-
return this.apiClient.callApi(
|
|
100
|
-
'/attachments', 'POST',
|
|
101
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
102
|
-
authNames, contentTypes, accepts, returnType
|
|
103
|
-
);
|
|
104
|
-
}
|
|
75
|
+
return this.apiClient.callApi(
|
|
76
|
+
'/attachments', 'POST',
|
|
77
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
78
|
+
authNames, contentTypes, accepts, returnType
|
|
79
|
+
);
|
|
105
80
|
}
|
|
106
81
|
|
|
107
82
|
/**
|
|
@@ -119,15 +94,10 @@ export class AttachmentsApi {
|
|
|
119
94
|
*/
|
|
120
95
|
createAttachmentForObject(opts) {
|
|
121
96
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
return this.createAttachmentForObjectWithHttpInfo(opts)
|
|
127
|
-
.then(function(response_and_data) {
|
|
128
|
-
return response_and_data.data;
|
|
129
|
-
});
|
|
130
|
-
}
|
|
97
|
+
return this.createAttachmentForObjectWithHttpInfo(opts)
|
|
98
|
+
.then(function(response_and_data) {
|
|
99
|
+
return response_and_data.data;
|
|
100
|
+
});
|
|
131
101
|
}
|
|
132
102
|
|
|
133
103
|
|
|
@@ -162,36 +132,11 @@ export class AttachmentsApi {
|
|
|
162
132
|
let accepts = ['application/json; charset=UTF-8'];
|
|
163
133
|
let returnType = 'Blob';
|
|
164
134
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
171
|
-
authNames, contentTypes, accepts, returnType
|
|
172
|
-
),
|
|
173
|
-
this.apiClient,
|
|
174
|
-
{
|
|
175
|
-
'path': '/attachments/{attachment_gid}',
|
|
176
|
-
'httpMethod': 'DELETE',
|
|
177
|
-
'pathParams': pathParams,
|
|
178
|
-
'queryParams': queryParams,
|
|
179
|
-
'headerParams': headerParams,
|
|
180
|
-
'formParams': formParams,
|
|
181
|
-
'bodyParam': postBody,
|
|
182
|
-
'authNames': authNames,
|
|
183
|
-
'contentTypes': contentTypes,
|
|
184
|
-
'accepts': accepts,
|
|
185
|
-
'returnType': returnType
|
|
186
|
-
}
|
|
187
|
-
)
|
|
188
|
-
} else {
|
|
189
|
-
return this.apiClient.callApi(
|
|
190
|
-
'/attachments/{attachment_gid}', 'DELETE',
|
|
191
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
192
|
-
authNames, contentTypes, accepts, returnType
|
|
193
|
-
);
|
|
194
|
-
}
|
|
135
|
+
return this.apiClient.callApi(
|
|
136
|
+
'/attachments/{attachment_gid}', 'DELETE',
|
|
137
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
138
|
+
authNames, contentTypes, accepts, returnType
|
|
139
|
+
);
|
|
195
140
|
}
|
|
196
141
|
|
|
197
142
|
/**
|
|
@@ -202,15 +147,10 @@ export class AttachmentsApi {
|
|
|
202
147
|
*/
|
|
203
148
|
deleteAttachment(attachment_gid) {
|
|
204
149
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
return this.deleteAttachmentWithHttpInfo(attachment_gid)
|
|
210
|
-
.then(function(response_and_data) {
|
|
211
|
-
return response_and_data.data;
|
|
212
|
-
});
|
|
213
|
-
}
|
|
150
|
+
return this.deleteAttachmentWithHttpInfo(attachment_gid)
|
|
151
|
+
.then(function(response_and_data) {
|
|
152
|
+
return response_and_data.data;
|
|
153
|
+
});
|
|
214
154
|
}
|
|
215
155
|
|
|
216
156
|
|
|
@@ -249,36 +189,11 @@ export class AttachmentsApi {
|
|
|
249
189
|
let accepts = ['application/json; charset=UTF-8'];
|
|
250
190
|
let returnType = 'Blob';
|
|
251
191
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
258
|
-
authNames, contentTypes, accepts, returnType
|
|
259
|
-
),
|
|
260
|
-
this.apiClient,
|
|
261
|
-
{
|
|
262
|
-
'path': '/attachments/{attachment_gid}',
|
|
263
|
-
'httpMethod': 'GET',
|
|
264
|
-
'pathParams': pathParams,
|
|
265
|
-
'queryParams': queryParams,
|
|
266
|
-
'headerParams': headerParams,
|
|
267
|
-
'formParams': formParams,
|
|
268
|
-
'bodyParam': postBody,
|
|
269
|
-
'authNames': authNames,
|
|
270
|
-
'contentTypes': contentTypes,
|
|
271
|
-
'accepts': accepts,
|
|
272
|
-
'returnType': returnType
|
|
273
|
-
}
|
|
274
|
-
)
|
|
275
|
-
} else {
|
|
276
|
-
return this.apiClient.callApi(
|
|
277
|
-
'/attachments/{attachment_gid}', 'GET',
|
|
278
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
279
|
-
authNames, contentTypes, accepts, returnType
|
|
280
|
-
);
|
|
281
|
-
}
|
|
192
|
+
return this.apiClient.callApi(
|
|
193
|
+
'/attachments/{attachment_gid}', 'GET',
|
|
194
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
195
|
+
authNames, contentTypes, accepts, returnType
|
|
196
|
+
);
|
|
282
197
|
}
|
|
283
198
|
|
|
284
199
|
/**
|
|
@@ -291,15 +206,10 @@ export class AttachmentsApi {
|
|
|
291
206
|
*/
|
|
292
207
|
getAttachment(attachment_gid, opts) {
|
|
293
208
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
return this.getAttachmentWithHttpInfo(attachment_gid, opts)
|
|
299
|
-
.then(function(response_and_data) {
|
|
300
|
-
return response_and_data.data;
|
|
301
|
-
});
|
|
302
|
-
}
|
|
209
|
+
return this.getAttachmentWithHttpInfo(attachment_gid, opts)
|
|
210
|
+
.then(function(response_and_data) {
|
|
211
|
+
return response_and_data.data;
|
|
212
|
+
});
|
|
303
213
|
}
|
|
304
214
|
|
|
305
215
|
|
|
@@ -340,9 +250,8 @@ export class AttachmentsApi {
|
|
|
340
250
|
let contentTypes = [];
|
|
341
251
|
let accepts = ['application/json; charset=UTF-8'];
|
|
342
252
|
let returnType = 'Blob';
|
|
343
|
-
|
|
344
253
|
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
345
|
-
if (this.apiClient.RETURN_COLLECTION
|
|
254
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
346
255
|
return Collection.fromApiClient(
|
|
347
256
|
this.apiClient.callApi(
|
|
348
257
|
'/attachments', 'GET',
|
|
@@ -364,13 +273,13 @@ export class AttachmentsApi {
|
|
|
364
273
|
'returnType': returnType
|
|
365
274
|
}
|
|
366
275
|
)
|
|
367
|
-
} else {
|
|
368
|
-
return this.apiClient.callApi(
|
|
369
|
-
'/attachments', 'GET',
|
|
370
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
371
|
-
authNames, contentTypes, accepts, returnType
|
|
372
|
-
);
|
|
373
276
|
}
|
|
277
|
+
|
|
278
|
+
return this.apiClient.callApi(
|
|
279
|
+
'/attachments', 'GET',
|
|
280
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
281
|
+
authNames, contentTypes, accepts, returnType
|
|
282
|
+
);
|
|
374
283
|
}
|
|
375
284
|
|
|
376
285
|
/**
|
|
@@ -384,16 +293,15 @@ export class AttachmentsApi {
|
|
|
384
293
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AttachmentResponseArray}
|
|
385
294
|
*/
|
|
386
295
|
getAttachmentsForObject(parent, opts) {
|
|
387
|
-
|
|
388
296
|
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
389
|
-
if (this.apiClient.RETURN_COLLECTION
|
|
297
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
390
298
|
return this.getAttachmentsForObjectWithHttpInfo(parent, opts)
|
|
391
|
-
} else {
|
|
392
|
-
return this.getAttachmentsForObjectWithHttpInfo(parent, opts)
|
|
393
|
-
.then(function(response_and_data) {
|
|
394
|
-
return response_and_data.data;
|
|
395
|
-
});
|
|
396
299
|
}
|
|
300
|
+
|
|
301
|
+
return this.getAttachmentsForObjectWithHttpInfo(parent, opts)
|
|
302
|
+
.then(function(response_and_data) {
|
|
303
|
+
return response_and_data.data;
|
|
304
|
+
});
|
|
397
305
|
}
|
|
398
306
|
|
|
399
307
|
}
|