asana 3.0.2 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/.github/workflows/publish.yaml +78 -38
  2. package/.swagger-codegen/VERSION +1 -1
  3. package/README.md +140 -29
  4. package/codegen/templates/README.mustache +129 -26
  5. package/codegen/templates/api.mustache +17 -15
  6. package/dist/ApiClient.js +6 -7
  7. package/dist/api/AllocationsApi.js +307 -0
  8. package/dist/api/AttachmentsApi.js +22 -95
  9. package/dist/api/AuditLogAPIApi.js +10 -14
  10. package/dist/api/BatchAPIApi.js +10 -14
  11. package/dist/api/CustomFieldSettingsApi.js +16 -23
  12. package/dist/api/CustomFieldsApi.js +38 -203
  13. package/dist/api/EventsApi.js +12 -16
  14. package/dist/api/GoalRelationshipsApi.js +26 -122
  15. package/dist/api/GoalsApi.js +48 -239
  16. package/dist/api/JobsApi.js +8 -32
  17. package/dist/api/MembershipsApi.js +73 -99
  18. package/dist/api/OrganizationExportsApi.js +12 -59
  19. package/dist/api/PortfolioMembershipsApi.js +20 -50
  20. package/dist/api/PortfoliosApi.js +56 -293
  21. package/dist/api/ProjectBriefsApi.js +20 -113
  22. package/dist/api/ProjectMembershipsApi.js +14 -41
  23. package/dist/api/ProjectStatusesApi.js +22 -95
  24. package/dist/api/ProjectTemplatesApi.js +28 -104
  25. package/dist/api/ProjectsApi.js +88 -446
  26. package/dist/api/RulesApi.js +8 -32
  27. package/dist/api/SectionsApi.js +34 -176
  28. package/dist/api/StatusUpdatesApi.js +22 -95
  29. package/dist/api/StoriesApi.js +26 -122
  30. package/dist/api/TagsApi.js +42 -167
  31. package/dist/api/TaskTemplatesApi.js +63 -72
  32. package/dist/api/TasksApi.js +173 -544
  33. package/dist/api/TeamMembershipsApi.js +26 -59
  34. package/dist/api/TeamsApi.js +36 -158
  35. package/dist/api/TimePeriodsApi.js +14 -41
  36. package/dist/api/TimeTrackingEntriesApi.js +26 -122
  37. package/dist/api/TypeaheadApi.js +12 -16
  38. package/dist/api/UserTaskListsApi.js +12 -59
  39. package/dist/api/UsersApi.js +32 -68
  40. package/dist/api/WebhooksApi.js +26 -122
  41. package/dist/api/WorkspaceMembershipsApi.js +20 -50
  42. package/dist/api/WorkspacesApi.js +26 -122
  43. package/dist/index.js +7 -0
  44. package/package.json +1 -1
  45. package/src/ApiClient.js +4 -4
  46. package/src/api/AllocationsApi.js +365 -0
  47. package/src/api/AttachmentsApi.js +42 -134
  48. package/src/api/AuditLogAPIApi.js +15 -17
  49. package/src/api/BatchAPIApi.js +15 -17
  50. package/src/api/CustomFieldSettingsApi.js +28 -32
  51. package/src/api/CustomFieldsApi.js +78 -290
  52. package/src/api/EventsApi.js +17 -19
  53. package/src/api/GoalRelationshipsApi.js +51 -173
  54. package/src/api/GoalsApi.js +100 -344
  55. package/src/api/JobsApi.js +11 -41
  56. package/src/api/MembershipsApi.js +105 -138
  57. package/src/api/OrganizationExportsApi.js +20 -80
  58. package/src/api/PortfolioMembershipsApi.js +37 -71
  59. package/src/api/PortfoliosApi.js +118 -422
  60. package/src/api/ProjectBriefsApi.js +38 -158
  61. package/src/api/ProjectMembershipsApi.js +24 -56
  62. package/src/api/ProjectStatusesApi.js +42 -134
  63. package/src/api/ProjectTemplatesApi.js +55 -149
  64. package/src/api/ProjectsApi.js +189 -647
  65. package/src/api/RulesApi.js +11 -41
  66. package/src/api/SectionsApi.js +69 -251
  67. package/src/api/StatusUpdatesApi.js +42 -134
  68. package/src/api/StoriesApi.js +51 -173
  69. package/src/api/TagsApi.js +86 -242
  70. package/src/api/TaskTemplatesApi.js +86 -95
  71. package/src/api/TasksApi.js +330 -799
  72. package/src/api/TeamMembershipsApi.js +50 -86
  73. package/src/api/TeamsApi.js +73 -227
  74. package/src/api/TimePeriodsApi.js +24 -56
  75. package/src/api/TimeTrackingEntriesApi.js +51 -173
  76. package/src/api/TypeaheadApi.js +17 -19
  77. package/src/api/UserTaskListsApi.js +20 -80
  78. package/src/api/UsersApi.js +63 -101
  79. package/src/api/WebhooksApi.js +51 -173
  80. package/src/api/WorkspaceMembershipsApi.js +37 -71
  81. package/src/api/WorkspacesApi.js +51 -173
  82. package/src/index.js +9 -2
@@ -7,7 +7,7 @@
7
7
  * NOTE: This class is auto generated by the swagger code generator program.
8
8
  * https://github.com/swagger-api/swagger-codegen.git
9
9
  *
10
- * Swagger Codegen version: 3.0.52
10
+ * Swagger Codegen version: 3.0.54
11
11
  *
12
12
  * Do not edit the class manually.
13
13
  *
@@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
18
18
  /**
19
19
  * Webhooks service.
20
20
  * @module api/WebhooksApi
21
- * @version 3.0.2
21
+ * @version 3.0.4
22
22
  */
23
23
  export class WebhooksApi {
24
24
 
@@ -71,36 +71,11 @@ export class WebhooksApi {
71
71
  let accepts = ['application/json; charset=UTF-8'];
72
72
  let returnType = 'Blob';
73
73
 
74
- // Check if RETURN_COLLECTION is set and return a collection object if it is
75
- if (this.apiClient.RETURN_COLLECTION && false) {
76
- return Collection.fromApiClient(
77
- this.apiClient.callApi(
78
- '/webhooks', 'POST',
79
- pathParams, queryParams, headerParams, formParams, postBody,
80
- authNames, contentTypes, accepts, returnType
81
- ),
82
- this.apiClient,
83
- {
84
- 'path': '/webhooks',
85
- 'httpMethod': 'POST',
86
- 'pathParams': pathParams,
87
- 'queryParams': queryParams,
88
- 'headerParams': headerParams,
89
- 'formParams': formParams,
90
- 'bodyParam': postBody,
91
- 'authNames': authNames,
92
- 'contentTypes': contentTypes,
93
- 'accepts': accepts,
94
- 'returnType': returnType
95
- }
96
- )
97
- } else {
98
- return this.apiClient.callApi(
99
- '/webhooks', 'POST',
100
- pathParams, queryParams, headerParams, formParams, postBody,
101
- authNames, contentTypes, accepts, returnType
102
- );
103
- }
74
+ return this.apiClient.callApi(
75
+ '/webhooks', 'POST',
76
+ pathParams, queryParams, headerParams, formParams, postBody,
77
+ authNames, contentTypes, accepts, returnType
78
+ );
104
79
  }
105
80
 
106
81
  /**
@@ -113,15 +88,10 @@ export class WebhooksApi {
113
88
  */
114
89
  createWebhook(body, opts) {
115
90
 
116
- // Check if RETURN_COLLECTION is set and return a collection object if it is
117
- if (this.apiClient.RETURN_COLLECTION && false) {
118
- return this.createWebhookWithHttpInfo(body, opts)
119
- } else {
120
- return this.createWebhookWithHttpInfo(body, opts)
121
- .then(function(response_and_data) {
122
- return response_and_data.data;
123
- });
124
- }
91
+ return this.createWebhookWithHttpInfo(body, opts)
92
+ .then(function(response_and_data) {
93
+ return response_and_data.data;
94
+ });
125
95
  }
126
96
 
127
97
 
@@ -156,36 +126,11 @@ export class WebhooksApi {
156
126
  let accepts = ['application/json; charset=UTF-8'];
157
127
  let returnType = 'Blob';
158
128
 
159
- // Check if RETURN_COLLECTION is set and return a collection object if it is
160
- if (this.apiClient.RETURN_COLLECTION && false) {
161
- return Collection.fromApiClient(
162
- this.apiClient.callApi(
163
- '/webhooks/{webhook_gid}', 'DELETE',
164
- pathParams, queryParams, headerParams, formParams, postBody,
165
- authNames, contentTypes, accepts, returnType
166
- ),
167
- this.apiClient,
168
- {
169
- 'path': '/webhooks/{webhook_gid}',
170
- 'httpMethod': 'DELETE',
171
- 'pathParams': pathParams,
172
- 'queryParams': queryParams,
173
- 'headerParams': headerParams,
174
- 'formParams': formParams,
175
- 'bodyParam': postBody,
176
- 'authNames': authNames,
177
- 'contentTypes': contentTypes,
178
- 'accepts': accepts,
179
- 'returnType': returnType
180
- }
181
- )
182
- } else {
183
- return this.apiClient.callApi(
184
- '/webhooks/{webhook_gid}', 'DELETE',
185
- pathParams, queryParams, headerParams, formParams, postBody,
186
- authNames, contentTypes, accepts, returnType
187
- );
188
- }
129
+ return this.apiClient.callApi(
130
+ '/webhooks/{webhook_gid}', 'DELETE',
131
+ pathParams, queryParams, headerParams, formParams, postBody,
132
+ authNames, contentTypes, accepts, returnType
133
+ );
189
134
  }
190
135
 
191
136
  /**
@@ -196,15 +141,10 @@ export class WebhooksApi {
196
141
  */
197
142
  deleteWebhook(webhook_gid) {
198
143
 
199
- // Check if RETURN_COLLECTION is set and return a collection object if it is
200
- if (this.apiClient.RETURN_COLLECTION && false) {
201
- return this.deleteWebhookWithHttpInfo(webhook_gid)
202
- } else {
203
- return this.deleteWebhookWithHttpInfo(webhook_gid)
204
- .then(function(response_and_data) {
205
- return response_and_data.data;
206
- });
207
- }
144
+ return this.deleteWebhookWithHttpInfo(webhook_gid)
145
+ .then(function(response_and_data) {
146
+ return response_and_data.data;
147
+ });
208
148
  }
209
149
 
210
150
 
@@ -243,36 +183,11 @@ export class WebhooksApi {
243
183
  let accepts = ['application/json; charset=UTF-8'];
244
184
  let returnType = 'Blob';
245
185
 
246
- // Check if RETURN_COLLECTION is set and return a collection object if it is
247
- if (this.apiClient.RETURN_COLLECTION && false) {
248
- return Collection.fromApiClient(
249
- this.apiClient.callApi(
250
- '/webhooks/{webhook_gid}', 'GET',
251
- pathParams, queryParams, headerParams, formParams, postBody,
252
- authNames, contentTypes, accepts, returnType
253
- ),
254
- this.apiClient,
255
- {
256
- 'path': '/webhooks/{webhook_gid}',
257
- 'httpMethod': 'GET',
258
- 'pathParams': pathParams,
259
- 'queryParams': queryParams,
260
- 'headerParams': headerParams,
261
- 'formParams': formParams,
262
- 'bodyParam': postBody,
263
- 'authNames': authNames,
264
- 'contentTypes': contentTypes,
265
- 'accepts': accepts,
266
- 'returnType': returnType
267
- }
268
- )
269
- } else {
270
- return this.apiClient.callApi(
271
- '/webhooks/{webhook_gid}', 'GET',
272
- pathParams, queryParams, headerParams, formParams, postBody,
273
- authNames, contentTypes, accepts, returnType
274
- );
275
- }
186
+ return this.apiClient.callApi(
187
+ '/webhooks/{webhook_gid}', 'GET',
188
+ pathParams, queryParams, headerParams, formParams, postBody,
189
+ authNames, contentTypes, accepts, returnType
190
+ );
276
191
  }
277
192
 
278
193
  /**
@@ -285,15 +200,10 @@ export class WebhooksApi {
285
200
  */
286
201
  getWebhook(webhook_gid, opts) {
287
202
 
288
- // Check if RETURN_COLLECTION is set and return a collection object if it is
289
- if (this.apiClient.RETURN_COLLECTION && false) {
290
- return this.getWebhookWithHttpInfo(webhook_gid, opts)
291
- } else {
292
- return this.getWebhookWithHttpInfo(webhook_gid, opts)
293
- .then(function(response_and_data) {
294
- return response_and_data.data;
295
- });
296
- }
203
+ return this.getWebhookWithHttpInfo(webhook_gid, opts)
204
+ .then(function(response_and_data) {
205
+ return response_and_data.data;
206
+ });
297
207
  }
298
208
 
299
209
 
@@ -335,9 +245,8 @@ export class WebhooksApi {
335
245
  let contentTypes = [];
336
246
  let accepts = ['application/json; charset=UTF-8'];
337
247
  let returnType = 'Blob';
338
-
339
248
  // Check if RETURN_COLLECTION is set and return a collection object if it is
340
- if (this.apiClient.RETURN_COLLECTION && true) {
249
+ if (this.apiClient.RETURN_COLLECTION) {
341
250
  return Collection.fromApiClient(
342
251
  this.apiClient.callApi(
343
252
  '/webhooks', 'GET',
@@ -359,13 +268,13 @@ export class WebhooksApi {
359
268
  'returnType': returnType
360
269
  }
361
270
  )
362
- } else {
363
- return this.apiClient.callApi(
364
- '/webhooks', 'GET',
365
- pathParams, queryParams, headerParams, formParams, postBody,
366
- authNames, contentTypes, accepts, returnType
367
- );
368
271
  }
272
+
273
+ return this.apiClient.callApi(
274
+ '/webhooks', 'GET',
275
+ pathParams, queryParams, headerParams, formParams, postBody,
276
+ authNames, contentTypes, accepts, returnType
277
+ );
369
278
  }
370
279
 
371
280
  /**
@@ -380,16 +289,15 @@ export class WebhooksApi {
380
289
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WebhookResponseArray}
381
290
  */
382
291
  getWebhooks(workspace, opts) {
383
-
384
292
  // Check if RETURN_COLLECTION is set and return a collection object if it is
385
- if (this.apiClient.RETURN_COLLECTION && true) {
386
- return this.getWebhooksWithHttpInfo(workspace, opts)
387
- } else {
293
+ if (this.apiClient.RETURN_COLLECTION) {
388
294
  return this.getWebhooksWithHttpInfo(workspace, opts)
389
- .then(function(response_and_data) {
390
- return response_and_data.data;
391
- });
392
295
  }
296
+
297
+ return this.getWebhooksWithHttpInfo(workspace, opts)
298
+ .then(function(response_and_data) {
299
+ return response_and_data.data;
300
+ });
393
301
  }
394
302
 
395
303
 
@@ -433,36 +341,11 @@ export class WebhooksApi {
433
341
  let accepts = ['application/json; charset=UTF-8'];
434
342
  let returnType = 'Blob';
435
343
 
436
- // Check if RETURN_COLLECTION is set and return a collection object if it is
437
- if (this.apiClient.RETURN_COLLECTION && false) {
438
- return Collection.fromApiClient(
439
- this.apiClient.callApi(
440
- '/webhooks/{webhook_gid}', 'PUT',
441
- pathParams, queryParams, headerParams, formParams, postBody,
442
- authNames, contentTypes, accepts, returnType
443
- ),
444
- this.apiClient,
445
- {
446
- 'path': '/webhooks/{webhook_gid}',
447
- 'httpMethod': 'PUT',
448
- 'pathParams': pathParams,
449
- 'queryParams': queryParams,
450
- 'headerParams': headerParams,
451
- 'formParams': formParams,
452
- 'bodyParam': postBody,
453
- 'authNames': authNames,
454
- 'contentTypes': contentTypes,
455
- 'accepts': accepts,
456
- 'returnType': returnType
457
- }
458
- )
459
- } else {
460
- return this.apiClient.callApi(
461
- '/webhooks/{webhook_gid}', 'PUT',
462
- pathParams, queryParams, headerParams, formParams, postBody,
463
- authNames, contentTypes, accepts, returnType
464
- );
465
- }
344
+ return this.apiClient.callApi(
345
+ '/webhooks/{webhook_gid}', 'PUT',
346
+ pathParams, queryParams, headerParams, formParams, postBody,
347
+ authNames, contentTypes, accepts, returnType
348
+ );
466
349
  }
467
350
 
468
351
  /**
@@ -476,15 +359,10 @@ export class WebhooksApi {
476
359
  */
477
360
  updateWebhook(body, webhook_gid, opts) {
478
361
 
479
- // Check if RETURN_COLLECTION is set and return a collection object if it is
480
- if (this.apiClient.RETURN_COLLECTION && false) {
481
- return this.updateWebhookWithHttpInfo(body, webhook_gid, opts)
482
- } else {
483
- return this.updateWebhookWithHttpInfo(body, webhook_gid, opts)
484
- .then(function(response_and_data) {
485
- return response_and_data.data;
486
- });
487
- }
362
+ return this.updateWebhookWithHttpInfo(body, webhook_gid, opts)
363
+ .then(function(response_and_data) {
364
+ return response_and_data.data;
365
+ });
488
366
  }
489
367
 
490
368
  }
@@ -7,7 +7,7 @@
7
7
  * NOTE: This class is auto generated by the swagger code generator program.
8
8
  * https://github.com/swagger-api/swagger-codegen.git
9
9
  *
10
- * Swagger Codegen version: 3.0.52
10
+ * Swagger Codegen version: 3.0.54
11
11
  *
12
12
  * Do not edit the class manually.
13
13
  *
@@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
18
18
  /**
19
19
  * WorkspaceMemberships service.
20
20
  * @module api/WorkspaceMembershipsApi
21
- * @version 3.0.2
21
+ * @version 3.0.4
22
22
  */
23
23
  export class WorkspaceMembershipsApi {
24
24
 
@@ -71,36 +71,11 @@ export class WorkspaceMembershipsApi {
71
71
  let accepts = ['application/json; charset=UTF-8'];
72
72
  let returnType = 'Blob';
73
73
 
74
- // Check if RETURN_COLLECTION is set and return a collection object if it is
75
- if (this.apiClient.RETURN_COLLECTION && false) {
76
- return Collection.fromApiClient(
77
- this.apiClient.callApi(
78
- '/workspace_memberships/{workspace_membership_gid}', 'GET',
79
- pathParams, queryParams, headerParams, formParams, postBody,
80
- authNames, contentTypes, accepts, returnType
81
- ),
82
- this.apiClient,
83
- {
84
- 'path': '/workspace_memberships/{workspace_membership_gid}',
85
- 'httpMethod': 'GET',
86
- 'pathParams': pathParams,
87
- 'queryParams': queryParams,
88
- 'headerParams': headerParams,
89
- 'formParams': formParams,
90
- 'bodyParam': postBody,
91
- 'authNames': authNames,
92
- 'contentTypes': contentTypes,
93
- 'accepts': accepts,
94
- 'returnType': returnType
95
- }
96
- )
97
- } else {
98
- return this.apiClient.callApi(
99
- '/workspace_memberships/{workspace_membership_gid}', 'GET',
100
- pathParams, queryParams, headerParams, formParams, postBody,
101
- authNames, contentTypes, accepts, returnType
102
- );
103
- }
74
+ return this.apiClient.callApi(
75
+ '/workspace_memberships/{workspace_membership_gid}', 'GET',
76
+ pathParams, queryParams, headerParams, formParams, postBody,
77
+ authNames, contentTypes, accepts, returnType
78
+ );
104
79
  }
105
80
 
106
81
  /**
@@ -113,15 +88,10 @@ export class WorkspaceMembershipsApi {
113
88
  */
114
89
  getWorkspaceMembership(workspace_membership_gid, opts) {
115
90
 
116
- // Check if RETURN_COLLECTION is set and return a collection object if it is
117
- if (this.apiClient.RETURN_COLLECTION && false) {
118
- return this.getWorkspaceMembershipWithHttpInfo(workspace_membership_gid, opts)
119
- } else {
120
- return this.getWorkspaceMembershipWithHttpInfo(workspace_membership_gid, opts)
121
- .then(function(response_and_data) {
122
- return response_and_data.data;
123
- });
124
- }
91
+ return this.getWorkspaceMembershipWithHttpInfo(workspace_membership_gid, opts)
92
+ .then(function(response_and_data) {
93
+ return response_and_data.data;
94
+ });
125
95
  }
126
96
 
127
97
 
@@ -161,9 +131,8 @@ export class WorkspaceMembershipsApi {
161
131
  let contentTypes = [];
162
132
  let accepts = ['application/json; charset=UTF-8'];
163
133
  let returnType = 'Blob';
164
-
165
134
  // Check if RETURN_COLLECTION is set and return a collection object if it is
166
- if (this.apiClient.RETURN_COLLECTION && true) {
135
+ if (this.apiClient.RETURN_COLLECTION) {
167
136
  return Collection.fromApiClient(
168
137
  this.apiClient.callApi(
169
138
  '/users/{user_gid}/workspace_memberships', 'GET',
@@ -185,13 +154,13 @@ export class WorkspaceMembershipsApi {
185
154
  'returnType': returnType
186
155
  }
187
156
  )
188
- } else {
189
- return this.apiClient.callApi(
190
- '/users/{user_gid}/workspace_memberships', 'GET',
191
- pathParams, queryParams, headerParams, formParams, postBody,
192
- authNames, contentTypes, accepts, returnType
193
- );
194
157
  }
158
+
159
+ return this.apiClient.callApi(
160
+ '/users/{user_gid}/workspace_memberships', 'GET',
161
+ pathParams, queryParams, headerParams, formParams, postBody,
162
+ authNames, contentTypes, accepts, returnType
163
+ );
195
164
  }
196
165
 
197
166
  /**
@@ -205,16 +174,15 @@ export class WorkspaceMembershipsApi {
205
174
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WorkspaceMembershipResponseArray}
206
175
  */
207
176
  getWorkspaceMembershipsForUser(user_gid, opts) {
208
-
209
177
  // Check if RETURN_COLLECTION is set and return a collection object if it is
210
- if (this.apiClient.RETURN_COLLECTION && true) {
211
- return this.getWorkspaceMembershipsForUserWithHttpInfo(user_gid, opts)
212
- } else {
178
+ if (this.apiClient.RETURN_COLLECTION) {
213
179
  return this.getWorkspaceMembershipsForUserWithHttpInfo(user_gid, opts)
214
- .then(function(response_and_data) {
215
- return response_and_data.data;
216
- });
217
180
  }
181
+
182
+ return this.getWorkspaceMembershipsForUserWithHttpInfo(user_gid, opts)
183
+ .then(function(response_and_data) {
184
+ return response_and_data.data;
185
+ });
218
186
  }
219
187
 
220
188
 
@@ -255,9 +223,8 @@ export class WorkspaceMembershipsApi {
255
223
  let contentTypes = [];
256
224
  let accepts = ['application/json; charset=UTF-8'];
257
225
  let returnType = 'Blob';
258
-
259
226
  // Check if RETURN_COLLECTION is set and return a collection object if it is
260
- if (this.apiClient.RETURN_COLLECTION && true) {
227
+ if (this.apiClient.RETURN_COLLECTION) {
261
228
  return Collection.fromApiClient(
262
229
  this.apiClient.callApi(
263
230
  '/workspaces/{workspace_gid}/workspace_memberships', 'GET',
@@ -279,13 +246,13 @@ export class WorkspaceMembershipsApi {
279
246
  'returnType': returnType
280
247
  }
281
248
  )
282
- } else {
283
- return this.apiClient.callApi(
284
- '/workspaces/{workspace_gid}/workspace_memberships', 'GET',
285
- pathParams, queryParams, headerParams, formParams, postBody,
286
- authNames, contentTypes, accepts, returnType
287
- );
288
249
  }
250
+
251
+ return this.apiClient.callApi(
252
+ '/workspaces/{workspace_gid}/workspace_memberships', 'GET',
253
+ pathParams, queryParams, headerParams, formParams, postBody,
254
+ authNames, contentTypes, accepts, returnType
255
+ );
289
256
  }
290
257
 
291
258
  /**
@@ -300,16 +267,15 @@ export class WorkspaceMembershipsApi {
300
267
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WorkspaceMembershipResponseArray}
301
268
  */
302
269
  getWorkspaceMembershipsForWorkspace(workspace_gid, opts) {
303
-
304
270
  // Check if RETURN_COLLECTION is set and return a collection object if it is
305
- if (this.apiClient.RETURN_COLLECTION && true) {
271
+ if (this.apiClient.RETURN_COLLECTION) {
306
272
  return this.getWorkspaceMembershipsForWorkspaceWithHttpInfo(workspace_gid, opts)
307
- } else {
308
- return this.getWorkspaceMembershipsForWorkspaceWithHttpInfo(workspace_gid, opts)
309
- .then(function(response_and_data) {
310
- return response_and_data.data;
311
- });
312
273
  }
274
+
275
+ return this.getWorkspaceMembershipsForWorkspaceWithHttpInfo(workspace_gid, opts)
276
+ .then(function(response_and_data) {
277
+ return response_and_data.data;
278
+ });
313
279
  }
314
280
 
315
281
  }