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
  * TeamMemberships service.
20
20
  * @module api/TeamMembershipsApi
21
- * @version 3.0.2
21
+ * @version 3.0.4
22
22
  */
23
23
  export class TeamMembershipsApi {
24
24
 
@@ -71,36 +71,11 @@ export class TeamMembershipsApi {
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
- '/team_memberships/{team_membership_gid}', 'GET',
79
- pathParams, queryParams, headerParams, formParams, postBody,
80
- authNames, contentTypes, accepts, returnType
81
- ),
82
- this.apiClient,
83
- {
84
- 'path': '/team_memberships/{team_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
- '/team_memberships/{team_membership_gid}', 'GET',
100
- pathParams, queryParams, headerParams, formParams, postBody,
101
- authNames, contentTypes, accepts, returnType
102
- );
103
- }
74
+ return this.apiClient.callApi(
75
+ '/team_memberships/{team_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 TeamMembershipsApi {
113
88
  */
114
89
  getTeamMembership(team_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.getTeamMembershipWithHttpInfo(team_membership_gid, opts)
119
- } else {
120
- return this.getTeamMembershipWithHttpInfo(team_membership_gid, opts)
121
- .then(function(response_and_data) {
122
- return response_and_data.data;
123
- });
124
- }
91
+ return this.getTeamMembershipWithHttpInfo(team_membership_gid, opts)
92
+ .then(function(response_and_data) {
93
+ return response_and_data.data;
94
+ });
125
95
  }
126
96
 
127
97
 
@@ -159,9 +129,8 @@ export class TeamMembershipsApi {
159
129
  let contentTypes = [];
160
130
  let accepts = ['application/json; charset=UTF-8'];
161
131
  let returnType = 'Blob';
162
-
163
132
  // Check if RETURN_COLLECTION is set and return a collection object if it is
164
- if (this.apiClient.RETURN_COLLECTION && true) {
133
+ if (this.apiClient.RETURN_COLLECTION) {
165
134
  return Collection.fromApiClient(
166
135
  this.apiClient.callApi(
167
136
  '/team_memberships', 'GET',
@@ -183,13 +152,13 @@ export class TeamMembershipsApi {
183
152
  'returnType': returnType
184
153
  }
185
154
  )
186
- } else {
187
- return this.apiClient.callApi(
188
- '/team_memberships', 'GET',
189
- pathParams, queryParams, headerParams, formParams, postBody,
190
- authNames, contentTypes, accepts, returnType
191
- );
192
155
  }
156
+
157
+ return this.apiClient.callApi(
158
+ '/team_memberships', 'GET',
159
+ pathParams, queryParams, headerParams, formParams, postBody,
160
+ authNames, contentTypes, accepts, returnType
161
+ );
193
162
  }
194
163
 
195
164
  /**
@@ -205,16 +174,15 @@ export class TeamMembershipsApi {
205
174
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TeamMembershipResponseArray}
206
175
  */
207
176
  getTeamMemberships(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.getTeamMembershipsWithHttpInfo(opts)
212
- } else {
178
+ if (this.apiClient.RETURN_COLLECTION) {
213
179
  return this.getTeamMembershipsWithHttpInfo(opts)
214
- .then(function(response_and_data) {
215
- return response_and_data.data;
216
- });
217
180
  }
181
+
182
+ return this.getTeamMembershipsWithHttpInfo(opts)
183
+ .then(function(response_and_data) {
184
+ return response_and_data.data;
185
+ });
218
186
  }
219
187
 
220
188
 
@@ -254,9 +222,8 @@ export class TeamMembershipsApi {
254
222
  let contentTypes = [];
255
223
  let accepts = ['application/json; charset=UTF-8'];
256
224
  let returnType = 'Blob';
257
-
258
225
  // Check if RETURN_COLLECTION is set and return a collection object if it is
259
- if (this.apiClient.RETURN_COLLECTION && true) {
226
+ if (this.apiClient.RETURN_COLLECTION) {
260
227
  return Collection.fromApiClient(
261
228
  this.apiClient.callApi(
262
229
  '/teams/{team_gid}/team_memberships', 'GET',
@@ -278,13 +245,13 @@ export class TeamMembershipsApi {
278
245
  'returnType': returnType
279
246
  }
280
247
  )
281
- } else {
282
- return this.apiClient.callApi(
283
- '/teams/{team_gid}/team_memberships', 'GET',
284
- pathParams, queryParams, headerParams, formParams, postBody,
285
- authNames, contentTypes, accepts, returnType
286
- );
287
248
  }
249
+
250
+ return this.apiClient.callApi(
251
+ '/teams/{team_gid}/team_memberships', 'GET',
252
+ pathParams, queryParams, headerParams, formParams, postBody,
253
+ authNames, contentTypes, accepts, returnType
254
+ );
288
255
  }
289
256
 
290
257
  /**
@@ -298,16 +265,15 @@ export class TeamMembershipsApi {
298
265
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TeamMembershipResponseArray}
299
266
  */
300
267
  getTeamMembershipsForTeam(team_gid, opts) {
301
-
302
268
  // Check if RETURN_COLLECTION is set and return a collection object if it is
303
- if (this.apiClient.RETURN_COLLECTION && true) {
304
- return this.getTeamMembershipsForTeamWithHttpInfo(team_gid, opts)
305
- } else {
269
+ if (this.apiClient.RETURN_COLLECTION) {
306
270
  return this.getTeamMembershipsForTeamWithHttpInfo(team_gid, opts)
307
- .then(function(response_and_data) {
308
- return response_and_data.data;
309
- });
310
271
  }
272
+
273
+ return this.getTeamMembershipsForTeamWithHttpInfo(team_gid, opts)
274
+ .then(function(response_and_data) {
275
+ return response_and_data.data;
276
+ });
311
277
  }
312
278
 
313
279
 
@@ -353,9 +319,8 @@ export class TeamMembershipsApi {
353
319
  let contentTypes = [];
354
320
  let accepts = ['application/json; charset=UTF-8'];
355
321
  let returnType = 'Blob';
356
-
357
322
  // Check if RETURN_COLLECTION is set and return a collection object if it is
358
- if (this.apiClient.RETURN_COLLECTION && true) {
323
+ if (this.apiClient.RETURN_COLLECTION) {
359
324
  return Collection.fromApiClient(
360
325
  this.apiClient.callApi(
361
326
  '/users/{user_gid}/team_memberships', 'GET',
@@ -377,13 +342,13 @@ export class TeamMembershipsApi {
377
342
  'returnType': returnType
378
343
  }
379
344
  )
380
- } else {
381
- return this.apiClient.callApi(
382
- '/users/{user_gid}/team_memberships', 'GET',
383
- pathParams, queryParams, headerParams, formParams, postBody,
384
- authNames, contentTypes, accepts, returnType
385
- );
386
345
  }
346
+
347
+ return this.apiClient.callApi(
348
+ '/users/{user_gid}/team_memberships', 'GET',
349
+ pathParams, queryParams, headerParams, formParams, postBody,
350
+ authNames, contentTypes, accepts, returnType
351
+ );
387
352
  }
388
353
 
389
354
  /**
@@ -398,16 +363,15 @@ export class TeamMembershipsApi {
398
363
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TeamMembershipResponseArray}
399
364
  */
400
365
  getTeamMembershipsForUser(user_gid, workspace, opts) {
401
-
402
366
  // Check if RETURN_COLLECTION is set and return a collection object if it is
403
- if (this.apiClient.RETURN_COLLECTION && true) {
367
+ if (this.apiClient.RETURN_COLLECTION) {
404
368
  return this.getTeamMembershipsForUserWithHttpInfo(user_gid, workspace, opts)
405
- } else {
406
- return this.getTeamMembershipsForUserWithHttpInfo(user_gid, workspace, opts)
407
- .then(function(response_and_data) {
408
- return response_and_data.data;
409
- });
410
369
  }
370
+
371
+ return this.getTeamMembershipsForUserWithHttpInfo(user_gid, workspace, opts)
372
+ .then(function(response_and_data) {
373
+ return response_and_data.data;
374
+ });
411
375
  }
412
376
 
413
377
  }
@@ -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
  * Teams service.
20
20
  * @module api/TeamsApi
21
- * @version 3.0.2
21
+ * @version 3.0.4
22
22
  */
23
23
  export class TeamsApi {
24
24
 
@@ -76,36 +76,11 @@ export class TeamsApi {
76
76
  let accepts = ['application/json; charset=UTF-8'];
77
77
  let returnType = 'Blob';
78
78
 
79
- // Check if RETURN_COLLECTION is set and return a collection object if it is
80
- if (this.apiClient.RETURN_COLLECTION && false) {
81
- return Collection.fromApiClient(
82
- this.apiClient.callApi(
83
- '/teams/{team_gid}/addUser', 'POST',
84
- pathParams, queryParams, headerParams, formParams, postBody,
85
- authNames, contentTypes, accepts, returnType
86
- ),
87
- this.apiClient,
88
- {
89
- 'path': '/teams/{team_gid}/addUser',
90
- 'httpMethod': 'POST',
91
- 'pathParams': pathParams,
92
- 'queryParams': queryParams,
93
- 'headerParams': headerParams,
94
- 'formParams': formParams,
95
- 'bodyParam': postBody,
96
- 'authNames': authNames,
97
- 'contentTypes': contentTypes,
98
- 'accepts': accepts,
99
- 'returnType': returnType
100
- }
101
- )
102
- } else {
103
- return this.apiClient.callApi(
104
- '/teams/{team_gid}/addUser', 'POST',
105
- pathParams, queryParams, headerParams, formParams, postBody,
106
- authNames, contentTypes, accepts, returnType
107
- );
108
- }
79
+ return this.apiClient.callApi(
80
+ '/teams/{team_gid}/addUser', 'POST',
81
+ pathParams, queryParams, headerParams, formParams, postBody,
82
+ authNames, contentTypes, accepts, returnType
83
+ );
109
84
  }
110
85
 
111
86
  /**
@@ -119,15 +94,10 @@ export class TeamsApi {
119
94
  */
120
95
  addUserForTeam(body, team_gid, opts) {
121
96
 
122
- // Check if RETURN_COLLECTION is set and return a collection object if it is
123
- if (this.apiClient.RETURN_COLLECTION && false) {
124
- return this.addUserForTeamWithHttpInfo(body, team_gid, opts)
125
- } else {
126
- return this.addUserForTeamWithHttpInfo(body, team_gid, opts)
127
- .then(function(response_and_data) {
128
- return response_and_data.data;
129
- });
130
- }
97
+ return this.addUserForTeamWithHttpInfo(body, team_gid, opts)
98
+ .then(function(response_and_data) {
99
+ return response_and_data.data;
100
+ });
131
101
  }
132
102
 
133
103
 
@@ -166,36 +136,11 @@ export class TeamsApi {
166
136
  let accepts = ['application/json; charset=UTF-8'];
167
137
  let returnType = 'Blob';
168
138
 
169
- // Check if RETURN_COLLECTION is set and return a collection object if it is
170
- if (this.apiClient.RETURN_COLLECTION && false) {
171
- return Collection.fromApiClient(
172
- this.apiClient.callApi(
173
- '/teams', 'POST',
174
- pathParams, queryParams, headerParams, formParams, postBody,
175
- authNames, contentTypes, accepts, returnType
176
- ),
177
- this.apiClient,
178
- {
179
- 'path': '/teams',
180
- 'httpMethod': 'POST',
181
- 'pathParams': pathParams,
182
- 'queryParams': queryParams,
183
- 'headerParams': headerParams,
184
- 'formParams': formParams,
185
- 'bodyParam': postBody,
186
- 'authNames': authNames,
187
- 'contentTypes': contentTypes,
188
- 'accepts': accepts,
189
- 'returnType': returnType
190
- }
191
- )
192
- } else {
193
- return this.apiClient.callApi(
194
- '/teams', 'POST',
195
- pathParams, queryParams, headerParams, formParams, postBody,
196
- authNames, contentTypes, accepts, returnType
197
- );
198
- }
139
+ return this.apiClient.callApi(
140
+ '/teams', 'POST',
141
+ pathParams, queryParams, headerParams, formParams, postBody,
142
+ authNames, contentTypes, accepts, returnType
143
+ );
199
144
  }
200
145
 
201
146
  /**
@@ -208,15 +153,10 @@ export class TeamsApi {
208
153
  */
209
154
  createTeam(body, opts) {
210
155
 
211
- // Check if RETURN_COLLECTION is set and return a collection object if it is
212
- if (this.apiClient.RETURN_COLLECTION && false) {
213
- return this.createTeamWithHttpInfo(body, opts)
214
- } else {
215
- return this.createTeamWithHttpInfo(body, opts)
216
- .then(function(response_and_data) {
217
- return response_and_data.data;
218
- });
219
- }
156
+ return this.createTeamWithHttpInfo(body, opts)
157
+ .then(function(response_and_data) {
158
+ return response_and_data.data;
159
+ });
220
160
  }
221
161
 
222
162
 
@@ -255,36 +195,11 @@ export class TeamsApi {
255
195
  let accepts = ['application/json; charset=UTF-8'];
256
196
  let returnType = 'Blob';
257
197
 
258
- // Check if RETURN_COLLECTION is set and return a collection object if it is
259
- if (this.apiClient.RETURN_COLLECTION && false) {
260
- return Collection.fromApiClient(
261
- this.apiClient.callApi(
262
- '/teams/{team_gid}', 'GET',
263
- pathParams, queryParams, headerParams, formParams, postBody,
264
- authNames, contentTypes, accepts, returnType
265
- ),
266
- this.apiClient,
267
- {
268
- 'path': '/teams/{team_gid}',
269
- 'httpMethod': 'GET',
270
- 'pathParams': pathParams,
271
- 'queryParams': queryParams,
272
- 'headerParams': headerParams,
273
- 'formParams': formParams,
274
- 'bodyParam': postBody,
275
- 'authNames': authNames,
276
- 'contentTypes': contentTypes,
277
- 'accepts': accepts,
278
- 'returnType': returnType
279
- }
280
- )
281
- } else {
282
- return this.apiClient.callApi(
283
- '/teams/{team_gid}', 'GET',
284
- pathParams, queryParams, headerParams, formParams, postBody,
285
- authNames, contentTypes, accepts, returnType
286
- );
287
- }
198
+ return this.apiClient.callApi(
199
+ '/teams/{team_gid}', 'GET',
200
+ pathParams, queryParams, headerParams, formParams, postBody,
201
+ authNames, contentTypes, accepts, returnType
202
+ );
288
203
  }
289
204
 
290
205
  /**
@@ -297,15 +212,10 @@ export class TeamsApi {
297
212
  */
298
213
  getTeam(team_gid, opts) {
299
214
 
300
- // Check if RETURN_COLLECTION is set and return a collection object if it is
301
- if (this.apiClient.RETURN_COLLECTION && false) {
302
- return this.getTeamWithHttpInfo(team_gid, opts)
303
- } else {
304
- return this.getTeamWithHttpInfo(team_gid, opts)
305
- .then(function(response_and_data) {
306
- return response_and_data.data;
307
- });
308
- }
215
+ return this.getTeamWithHttpInfo(team_gid, opts)
216
+ .then(function(response_and_data) {
217
+ return response_and_data.data;
218
+ });
309
219
  }
310
220
 
311
221
 
@@ -351,9 +261,8 @@ export class TeamsApi {
351
261
  let contentTypes = [];
352
262
  let accepts = ['application/json; charset=UTF-8'];
353
263
  let returnType = 'Blob';
354
-
355
264
  // Check if RETURN_COLLECTION is set and return a collection object if it is
356
- if (this.apiClient.RETURN_COLLECTION && true) {
265
+ if (this.apiClient.RETURN_COLLECTION) {
357
266
  return Collection.fromApiClient(
358
267
  this.apiClient.callApi(
359
268
  '/users/{user_gid}/teams', 'GET',
@@ -375,13 +284,13 @@ export class TeamsApi {
375
284
  'returnType': returnType
376
285
  }
377
286
  )
378
- } else {
379
- return this.apiClient.callApi(
380
- '/users/{user_gid}/teams', 'GET',
381
- pathParams, queryParams, headerParams, formParams, postBody,
382
- authNames, contentTypes, accepts, returnType
383
- );
384
287
  }
288
+
289
+ return this.apiClient.callApi(
290
+ '/users/{user_gid}/teams', 'GET',
291
+ pathParams, queryParams, headerParams, formParams, postBody,
292
+ authNames, contentTypes, accepts, returnType
293
+ );
385
294
  }
386
295
 
387
296
  /**
@@ -396,16 +305,15 @@ export class TeamsApi {
396
305
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TeamResponseArray}
397
306
  */
398
307
  getTeamsForUser(user_gid, organization, opts) {
399
-
400
308
  // Check if RETURN_COLLECTION is set and return a collection object if it is
401
- if (this.apiClient.RETURN_COLLECTION && true) {
402
- return this.getTeamsForUserWithHttpInfo(user_gid, organization, opts)
403
- } else {
309
+ if (this.apiClient.RETURN_COLLECTION) {
404
310
  return this.getTeamsForUserWithHttpInfo(user_gid, organization, opts)
405
- .then(function(response_and_data) {
406
- return response_and_data.data;
407
- });
408
311
  }
312
+
313
+ return this.getTeamsForUserWithHttpInfo(user_gid, organization, opts)
314
+ .then(function(response_and_data) {
315
+ return response_and_data.data;
316
+ });
409
317
  }
410
318
 
411
319
 
@@ -445,9 +353,8 @@ export class TeamsApi {
445
353
  let contentTypes = [];
446
354
  let accepts = ['application/json; charset=UTF-8'];
447
355
  let returnType = 'Blob';
448
-
449
356
  // Check if RETURN_COLLECTION is set and return a collection object if it is
450
- if (this.apiClient.RETURN_COLLECTION && true) {
357
+ if (this.apiClient.RETURN_COLLECTION) {
451
358
  return Collection.fromApiClient(
452
359
  this.apiClient.callApi(
453
360
  '/workspaces/{workspace_gid}/teams', 'GET',
@@ -469,13 +376,13 @@ export class TeamsApi {
469
376
  'returnType': returnType
470
377
  }
471
378
  )
472
- } else {
473
- return this.apiClient.callApi(
474
- '/workspaces/{workspace_gid}/teams', 'GET',
475
- pathParams, queryParams, headerParams, formParams, postBody,
476
- authNames, contentTypes, accepts, returnType
477
- );
478
379
  }
380
+
381
+ return this.apiClient.callApi(
382
+ '/workspaces/{workspace_gid}/teams', 'GET',
383
+ pathParams, queryParams, headerParams, formParams, postBody,
384
+ authNames, contentTypes, accepts, returnType
385
+ );
479
386
  }
480
387
 
481
388
  /**
@@ -489,16 +396,15 @@ export class TeamsApi {
489
396
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TeamResponseArray}
490
397
  */
491
398
  getTeamsForWorkspace(workspace_gid, opts) {
492
-
493
399
  // Check if RETURN_COLLECTION is set and return a collection object if it is
494
- if (this.apiClient.RETURN_COLLECTION && true) {
495
- return this.getTeamsForWorkspaceWithHttpInfo(workspace_gid, opts)
496
- } else {
400
+ if (this.apiClient.RETURN_COLLECTION) {
497
401
  return this.getTeamsForWorkspaceWithHttpInfo(workspace_gid, opts)
498
- .then(function(response_and_data) {
499
- return response_and_data.data;
500
- });
501
402
  }
403
+
404
+ return this.getTeamsForWorkspaceWithHttpInfo(workspace_gid, opts)
405
+ .then(function(response_and_data) {
406
+ return response_and_data.data;
407
+ });
502
408
  }
503
409
 
504
410
 
@@ -538,36 +444,11 @@ export class TeamsApi {
538
444
  let accepts = ['application/json; charset=UTF-8'];
539
445
  let returnType = 'Blob';
540
446
 
541
- // Check if RETURN_COLLECTION is set and return a collection object if it is
542
- if (this.apiClient.RETURN_COLLECTION && false) {
543
- return Collection.fromApiClient(
544
- this.apiClient.callApi(
545
- '/teams/{team_gid}/removeUser', 'POST',
546
- pathParams, queryParams, headerParams, formParams, postBody,
547
- authNames, contentTypes, accepts, returnType
548
- ),
549
- this.apiClient,
550
- {
551
- 'path': '/teams/{team_gid}/removeUser',
552
- 'httpMethod': 'POST',
553
- 'pathParams': pathParams,
554
- 'queryParams': queryParams,
555
- 'headerParams': headerParams,
556
- 'formParams': formParams,
557
- 'bodyParam': postBody,
558
- 'authNames': authNames,
559
- 'contentTypes': contentTypes,
560
- 'accepts': accepts,
561
- 'returnType': returnType
562
- }
563
- )
564
- } else {
565
- return this.apiClient.callApi(
566
- '/teams/{team_gid}/removeUser', 'POST',
567
- pathParams, queryParams, headerParams, formParams, postBody,
568
- authNames, contentTypes, accepts, returnType
569
- );
570
- }
447
+ return this.apiClient.callApi(
448
+ '/teams/{team_gid}/removeUser', 'POST',
449
+ pathParams, queryParams, headerParams, formParams, postBody,
450
+ authNames, contentTypes, accepts, returnType
451
+ );
571
452
  }
572
453
 
573
454
  /**
@@ -579,15 +460,10 @@ export class TeamsApi {
579
460
  */
580
461
  removeUserForTeam(body, team_gid) {
581
462
 
582
- // Check if RETURN_COLLECTION is set and return a collection object if it is
583
- if (this.apiClient.RETURN_COLLECTION && false) {
584
- return this.removeUserForTeamWithHttpInfo(body, team_gid)
585
- } else {
586
- return this.removeUserForTeamWithHttpInfo(body, team_gid)
587
- .then(function(response_and_data) {
588
- return response_and_data.data;
589
- });
590
- }
463
+ return this.removeUserForTeamWithHttpInfo(body, team_gid)
464
+ .then(function(response_and_data) {
465
+ return response_and_data.data;
466
+ });
591
467
  }
592
468
 
593
469
 
@@ -631,36 +507,11 @@ export class TeamsApi {
631
507
  let accepts = ['application/json; charset=UTF-8'];
632
508
  let returnType = 'Blob';
633
509
 
634
- // Check if RETURN_COLLECTION is set and return a collection object if it is
635
- if (this.apiClient.RETURN_COLLECTION && false) {
636
- return Collection.fromApiClient(
637
- this.apiClient.callApi(
638
- '/teams/{team_gid}', 'PUT',
639
- pathParams, queryParams, headerParams, formParams, postBody,
640
- authNames, contentTypes, accepts, returnType
641
- ),
642
- this.apiClient,
643
- {
644
- 'path': '/teams/{team_gid}',
645
- 'httpMethod': 'PUT',
646
- 'pathParams': pathParams,
647
- 'queryParams': queryParams,
648
- 'headerParams': headerParams,
649
- 'formParams': formParams,
650
- 'bodyParam': postBody,
651
- 'authNames': authNames,
652
- 'contentTypes': contentTypes,
653
- 'accepts': accepts,
654
- 'returnType': returnType
655
- }
656
- )
657
- } else {
658
- return this.apiClient.callApi(
659
- '/teams/{team_gid}', 'PUT',
660
- pathParams, queryParams, headerParams, formParams, postBody,
661
- authNames, contentTypes, accepts, returnType
662
- );
663
- }
510
+ return this.apiClient.callApi(
511
+ '/teams/{team_gid}', 'PUT',
512
+ pathParams, queryParams, headerParams, formParams, postBody,
513
+ authNames, contentTypes, accepts, returnType
514
+ );
664
515
  }
665
516
 
666
517
  /**
@@ -674,15 +525,10 @@ export class TeamsApi {
674
525
  */
675
526
  updateTeam(body, team_gid, opts) {
676
527
 
677
- // Check if RETURN_COLLECTION is set and return a collection object if it is
678
- if (this.apiClient.RETURN_COLLECTION && false) {
679
- return this.updateTeamWithHttpInfo(body, team_gid, opts)
680
- } else {
681
- return this.updateTeamWithHttpInfo(body, team_gid, opts)
682
- .then(function(response_and_data) {
683
- return response_and_data.data;
684
- });
685
- }
528
+ return this.updateTeamWithHttpInfo(body, team_gid, opts)
529
+ .then(function(response_and_data) {
530
+ return response_and_data.data;
531
+ });
686
532
  }
687
533
 
688
534
  }