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
  * Goals service.
20
20
  * @module api/GoalsApi
21
- * @version 3.0.2
21
+ * @version 3.0.4
22
22
  */
23
23
  export class GoalsApi {
24
24
 
@@ -76,36 +76,11 @@ export class GoalsApi {
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
- '/goals/{goal_gid}/addFollowers', 'POST',
84
- pathParams, queryParams, headerParams, formParams, postBody,
85
- authNames, contentTypes, accepts, returnType
86
- ),
87
- this.apiClient,
88
- {
89
- 'path': '/goals/{goal_gid}/addFollowers',
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
- '/goals/{goal_gid}/addFollowers', 'POST',
105
- pathParams, queryParams, headerParams, formParams, postBody,
106
- authNames, contentTypes, accepts, returnType
107
- );
108
- }
79
+ return this.apiClient.callApi(
80
+ '/goals/{goal_gid}/addFollowers', '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 GoalsApi {
119
94
  */
120
95
  addFollowers(body, goal_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.addFollowersWithHttpInfo(body, goal_gid, opts)
125
- } else {
126
- return this.addFollowersWithHttpInfo(body, goal_gid, opts)
127
- .then(function(response_and_data) {
128
- return response_and_data.data;
129
- });
130
- }
97
+ return this.addFollowersWithHttpInfo(body, goal_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 GoalsApi {
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
- '/goals', 'POST',
174
- pathParams, queryParams, headerParams, formParams, postBody,
175
- authNames, contentTypes, accepts, returnType
176
- ),
177
- this.apiClient,
178
- {
179
- 'path': '/goals',
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
- '/goals', 'POST',
195
- pathParams, queryParams, headerParams, formParams, postBody,
196
- authNames, contentTypes, accepts, returnType
197
- );
198
- }
139
+ return this.apiClient.callApi(
140
+ '/goals', '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 GoalsApi {
208
153
  */
209
154
  createGoal(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.createGoalWithHttpInfo(body, opts)
214
- } else {
215
- return this.createGoalWithHttpInfo(body, opts)
216
- .then(function(response_and_data) {
217
- return response_and_data.data;
218
- });
219
- }
156
+ return this.createGoalWithHttpInfo(body, opts)
157
+ .then(function(response_and_data) {
158
+ return response_and_data.data;
159
+ });
220
160
  }
221
161
 
222
162
 
@@ -260,36 +200,11 @@ export class GoalsApi {
260
200
  let accepts = ['application/json; charset=UTF-8'];
261
201
  let returnType = 'Blob';
262
202
 
263
- // Check if RETURN_COLLECTION is set and return a collection object if it is
264
- if (this.apiClient.RETURN_COLLECTION && false) {
265
- return Collection.fromApiClient(
266
- this.apiClient.callApi(
267
- '/goals/{goal_gid}/setMetric', 'POST',
268
- pathParams, queryParams, headerParams, formParams, postBody,
269
- authNames, contentTypes, accepts, returnType
270
- ),
271
- this.apiClient,
272
- {
273
- 'path': '/goals/{goal_gid}/setMetric',
274
- 'httpMethod': 'POST',
275
- 'pathParams': pathParams,
276
- 'queryParams': queryParams,
277
- 'headerParams': headerParams,
278
- 'formParams': formParams,
279
- 'bodyParam': postBody,
280
- 'authNames': authNames,
281
- 'contentTypes': contentTypes,
282
- 'accepts': accepts,
283
- 'returnType': returnType
284
- }
285
- )
286
- } else {
287
- return this.apiClient.callApi(
288
- '/goals/{goal_gid}/setMetric', 'POST',
289
- pathParams, queryParams, headerParams, formParams, postBody,
290
- authNames, contentTypes, accepts, returnType
291
- );
292
- }
203
+ return this.apiClient.callApi(
204
+ '/goals/{goal_gid}/setMetric', 'POST',
205
+ pathParams, queryParams, headerParams, formParams, postBody,
206
+ authNames, contentTypes, accepts, returnType
207
+ );
293
208
  }
294
209
 
295
210
  /**
@@ -303,15 +218,10 @@ export class GoalsApi {
303
218
  */
304
219
  createGoalMetric(body, goal_gid, opts) {
305
220
 
306
- // Check if RETURN_COLLECTION is set and return a collection object if it is
307
- if (this.apiClient.RETURN_COLLECTION && false) {
308
- return this.createGoalMetricWithHttpInfo(body, goal_gid, opts)
309
- } else {
310
- return this.createGoalMetricWithHttpInfo(body, goal_gid, opts)
311
- .then(function(response_and_data) {
312
- return response_and_data.data;
313
- });
314
- }
221
+ return this.createGoalMetricWithHttpInfo(body, goal_gid, opts)
222
+ .then(function(response_and_data) {
223
+ return response_and_data.data;
224
+ });
315
225
  }
316
226
 
317
227
 
@@ -346,36 +256,11 @@ export class GoalsApi {
346
256
  let accepts = ['application/json; charset=UTF-8'];
347
257
  let returnType = 'Blob';
348
258
 
349
- // Check if RETURN_COLLECTION is set and return a collection object if it is
350
- if (this.apiClient.RETURN_COLLECTION && false) {
351
- return Collection.fromApiClient(
352
- this.apiClient.callApi(
353
- '/goals/{goal_gid}', 'DELETE',
354
- pathParams, queryParams, headerParams, formParams, postBody,
355
- authNames, contentTypes, accepts, returnType
356
- ),
357
- this.apiClient,
358
- {
359
- 'path': '/goals/{goal_gid}',
360
- 'httpMethod': 'DELETE',
361
- 'pathParams': pathParams,
362
- 'queryParams': queryParams,
363
- 'headerParams': headerParams,
364
- 'formParams': formParams,
365
- 'bodyParam': postBody,
366
- 'authNames': authNames,
367
- 'contentTypes': contentTypes,
368
- 'accepts': accepts,
369
- 'returnType': returnType
370
- }
371
- )
372
- } else {
373
- return this.apiClient.callApi(
374
- '/goals/{goal_gid}', 'DELETE',
375
- pathParams, queryParams, headerParams, formParams, postBody,
376
- authNames, contentTypes, accepts, returnType
377
- );
378
- }
259
+ return this.apiClient.callApi(
260
+ '/goals/{goal_gid}', 'DELETE',
261
+ pathParams, queryParams, headerParams, formParams, postBody,
262
+ authNames, contentTypes, accepts, returnType
263
+ );
379
264
  }
380
265
 
381
266
  /**
@@ -386,15 +271,10 @@ export class GoalsApi {
386
271
  */
387
272
  deleteGoal(goal_gid) {
388
273
 
389
- // Check if RETURN_COLLECTION is set and return a collection object if it is
390
- if (this.apiClient.RETURN_COLLECTION && false) {
391
- return this.deleteGoalWithHttpInfo(goal_gid)
392
- } else {
393
- return this.deleteGoalWithHttpInfo(goal_gid)
394
- .then(function(response_and_data) {
395
- return response_and_data.data;
396
- });
397
- }
274
+ return this.deleteGoalWithHttpInfo(goal_gid)
275
+ .then(function(response_and_data) {
276
+ return response_and_data.data;
277
+ });
398
278
  }
399
279
 
400
280
 
@@ -433,36 +313,11 @@ export class GoalsApi {
433
313
  let accepts = ['application/json; charset=UTF-8'];
434
314
  let returnType = 'Blob';
435
315
 
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
- '/goals/{goal_gid}', 'GET',
441
- pathParams, queryParams, headerParams, formParams, postBody,
442
- authNames, contentTypes, accepts, returnType
443
- ),
444
- this.apiClient,
445
- {
446
- 'path': '/goals/{goal_gid}',
447
- 'httpMethod': 'GET',
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
- '/goals/{goal_gid}', 'GET',
462
- pathParams, queryParams, headerParams, formParams, postBody,
463
- authNames, contentTypes, accepts, returnType
464
- );
465
- }
316
+ return this.apiClient.callApi(
317
+ '/goals/{goal_gid}', 'GET',
318
+ pathParams, queryParams, headerParams, formParams, postBody,
319
+ authNames, contentTypes, accepts, returnType
320
+ );
466
321
  }
467
322
 
468
323
  /**
@@ -475,15 +330,10 @@ export class GoalsApi {
475
330
  */
476
331
  getGoal(goal_gid, opts) {
477
332
 
478
- // Check if RETURN_COLLECTION is set and return a collection object if it is
479
- if (this.apiClient.RETURN_COLLECTION && false) {
480
- return this.getGoalWithHttpInfo(goal_gid, opts)
481
- } else {
482
- return this.getGoalWithHttpInfo(goal_gid, opts)
483
- .then(function(response_and_data) {
484
- return response_and_data.data;
485
- });
486
- }
333
+ return this.getGoalWithHttpInfo(goal_gid, opts)
334
+ .then(function(response_and_data) {
335
+ return response_and_data.data;
336
+ });
487
337
  }
488
338
 
489
339
 
@@ -525,9 +375,8 @@ export class GoalsApi {
525
375
  let contentTypes = [];
526
376
  let accepts = ['application/json; charset=UTF-8'];
527
377
  let returnType = 'Blob';
528
-
529
378
  // Check if RETURN_COLLECTION is set and return a collection object if it is
530
- if (this.apiClient.RETURN_COLLECTION && true) {
379
+ if (this.apiClient.RETURN_COLLECTION) {
531
380
  return Collection.fromApiClient(
532
381
  this.apiClient.callApi(
533
382
  '/goals', 'GET',
@@ -549,13 +398,13 @@ export class GoalsApi {
549
398
  'returnType': returnType
550
399
  }
551
400
  )
552
- } else {
553
- return this.apiClient.callApi(
554
- '/goals', 'GET',
555
- pathParams, queryParams, headerParams, formParams, postBody,
556
- authNames, contentTypes, accepts, returnType
557
- );
558
401
  }
402
+
403
+ return this.apiClient.callApi(
404
+ '/goals', 'GET',
405
+ pathParams, queryParams, headerParams, formParams, postBody,
406
+ authNames, contentTypes, accepts, returnType
407
+ );
559
408
  }
560
409
 
561
410
  /**
@@ -575,16 +424,15 @@ export class GoalsApi {
575
424
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GoalResponseArray}
576
425
  */
577
426
  getGoals(opts) {
578
-
579
427
  // Check if RETURN_COLLECTION is set and return a collection object if it is
580
- if (this.apiClient.RETURN_COLLECTION && true) {
428
+ if (this.apiClient.RETURN_COLLECTION) {
581
429
  return this.getGoalsWithHttpInfo(opts)
582
- } else {
583
- return this.getGoalsWithHttpInfo(opts)
584
- .then(function(response_and_data) {
585
- return response_and_data.data;
586
- });
587
430
  }
431
+
432
+ return this.getGoalsWithHttpInfo(opts)
433
+ .then(function(response_and_data) {
434
+ return response_and_data.data;
435
+ });
588
436
  }
589
437
 
590
438
 
@@ -622,9 +470,8 @@ export class GoalsApi {
622
470
  let contentTypes = [];
623
471
  let accepts = ['application/json; charset=UTF-8'];
624
472
  let returnType = 'Blob';
625
-
626
473
  // Check if RETURN_COLLECTION is set and return a collection object if it is
627
- if (this.apiClient.RETURN_COLLECTION && true) {
474
+ if (this.apiClient.RETURN_COLLECTION) {
628
475
  return Collection.fromApiClient(
629
476
  this.apiClient.callApi(
630
477
  '/goals/{goal_gid}/parentGoals', 'GET',
@@ -646,13 +493,13 @@ export class GoalsApi {
646
493
  'returnType': returnType
647
494
  }
648
495
  )
649
- } else {
650
- return this.apiClient.callApi(
651
- '/goals/{goal_gid}/parentGoals', 'GET',
652
- pathParams, queryParams, headerParams, formParams, postBody,
653
- authNames, contentTypes, accepts, returnType
654
- );
655
496
  }
497
+
498
+ return this.apiClient.callApi(
499
+ '/goals/{goal_gid}/parentGoals', 'GET',
500
+ pathParams, queryParams, headerParams, formParams, postBody,
501
+ authNames, contentTypes, accepts, returnType
502
+ );
656
503
  }
657
504
 
658
505
  /**
@@ -664,16 +511,15 @@ export class GoalsApi {
664
511
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GoalResponseArray}
665
512
  */
666
513
  getParentGoalsForGoal(goal_gid, opts) {
667
-
668
514
  // Check if RETURN_COLLECTION is set and return a collection object if it is
669
- if (this.apiClient.RETURN_COLLECTION && true) {
670
- return this.getParentGoalsForGoalWithHttpInfo(goal_gid, opts)
671
- } else {
515
+ if (this.apiClient.RETURN_COLLECTION) {
672
516
  return this.getParentGoalsForGoalWithHttpInfo(goal_gid, opts)
673
- .then(function(response_and_data) {
674
- return response_and_data.data;
675
- });
676
517
  }
518
+
519
+ return this.getParentGoalsForGoalWithHttpInfo(goal_gid, opts)
520
+ .then(function(response_and_data) {
521
+ return response_and_data.data;
522
+ });
677
523
  }
678
524
 
679
525
 
@@ -717,36 +563,11 @@ export class GoalsApi {
717
563
  let accepts = ['application/json; charset=UTF-8'];
718
564
  let returnType = 'Blob';
719
565
 
720
- // Check if RETURN_COLLECTION is set and return a collection object if it is
721
- if (this.apiClient.RETURN_COLLECTION && false) {
722
- return Collection.fromApiClient(
723
- this.apiClient.callApi(
724
- '/goals/{goal_gid}/removeFollowers', 'POST',
725
- pathParams, queryParams, headerParams, formParams, postBody,
726
- authNames, contentTypes, accepts, returnType
727
- ),
728
- this.apiClient,
729
- {
730
- 'path': '/goals/{goal_gid}/removeFollowers',
731
- 'httpMethod': 'POST',
732
- 'pathParams': pathParams,
733
- 'queryParams': queryParams,
734
- 'headerParams': headerParams,
735
- 'formParams': formParams,
736
- 'bodyParam': postBody,
737
- 'authNames': authNames,
738
- 'contentTypes': contentTypes,
739
- 'accepts': accepts,
740
- 'returnType': returnType
741
- }
742
- )
743
- } else {
744
- return this.apiClient.callApi(
745
- '/goals/{goal_gid}/removeFollowers', 'POST',
746
- pathParams, queryParams, headerParams, formParams, postBody,
747
- authNames, contentTypes, accepts, returnType
748
- );
749
- }
566
+ return this.apiClient.callApi(
567
+ '/goals/{goal_gid}/removeFollowers', 'POST',
568
+ pathParams, queryParams, headerParams, formParams, postBody,
569
+ authNames, contentTypes, accepts, returnType
570
+ );
750
571
  }
751
572
 
752
573
  /**
@@ -760,15 +581,10 @@ export class GoalsApi {
760
581
  */
761
582
  removeFollowers(body, goal_gid, opts) {
762
583
 
763
- // Check if RETURN_COLLECTION is set and return a collection object if it is
764
- if (this.apiClient.RETURN_COLLECTION && false) {
765
- return this.removeFollowersWithHttpInfo(body, goal_gid, opts)
766
- } else {
767
- return this.removeFollowersWithHttpInfo(body, goal_gid, opts)
768
- .then(function(response_and_data) {
769
- return response_and_data.data;
770
- });
771
- }
584
+ return this.removeFollowersWithHttpInfo(body, goal_gid, opts)
585
+ .then(function(response_and_data) {
586
+ return response_and_data.data;
587
+ });
772
588
  }
773
589
 
774
590
 
@@ -812,36 +628,11 @@ export class GoalsApi {
812
628
  let accepts = ['application/json; charset=UTF-8'];
813
629
  let returnType = 'Blob';
814
630
 
815
- // Check if RETURN_COLLECTION is set and return a collection object if it is
816
- if (this.apiClient.RETURN_COLLECTION && false) {
817
- return Collection.fromApiClient(
818
- this.apiClient.callApi(
819
- '/goals/{goal_gid}', 'PUT',
820
- pathParams, queryParams, headerParams, formParams, postBody,
821
- authNames, contentTypes, accepts, returnType
822
- ),
823
- this.apiClient,
824
- {
825
- 'path': '/goals/{goal_gid}',
826
- 'httpMethod': 'PUT',
827
- 'pathParams': pathParams,
828
- 'queryParams': queryParams,
829
- 'headerParams': headerParams,
830
- 'formParams': formParams,
831
- 'bodyParam': postBody,
832
- 'authNames': authNames,
833
- 'contentTypes': contentTypes,
834
- 'accepts': accepts,
835
- 'returnType': returnType
836
- }
837
- )
838
- } else {
839
- return this.apiClient.callApi(
840
- '/goals/{goal_gid}', 'PUT',
841
- pathParams, queryParams, headerParams, formParams, postBody,
842
- authNames, contentTypes, accepts, returnType
843
- );
844
- }
631
+ return this.apiClient.callApi(
632
+ '/goals/{goal_gid}', 'PUT',
633
+ pathParams, queryParams, headerParams, formParams, postBody,
634
+ authNames, contentTypes, accepts, returnType
635
+ );
845
636
  }
846
637
 
847
638
  /**
@@ -855,15 +646,10 @@ export class GoalsApi {
855
646
  */
856
647
  updateGoal(body, goal_gid, opts) {
857
648
 
858
- // Check if RETURN_COLLECTION is set and return a collection object if it is
859
- if (this.apiClient.RETURN_COLLECTION && false) {
860
- return this.updateGoalWithHttpInfo(body, goal_gid, opts)
861
- } else {
862
- return this.updateGoalWithHttpInfo(body, goal_gid, opts)
863
- .then(function(response_and_data) {
864
- return response_and_data.data;
865
- });
866
- }
649
+ return this.updateGoalWithHttpInfo(body, goal_gid, opts)
650
+ .then(function(response_and_data) {
651
+ return response_and_data.data;
652
+ });
867
653
  }
868
654
 
869
655
 
@@ -907,36 +693,11 @@ export class GoalsApi {
907
693
  let accepts = ['application/json; charset=UTF-8'];
908
694
  let returnType = 'Blob';
909
695
 
910
- // Check if RETURN_COLLECTION is set and return a collection object if it is
911
- if (this.apiClient.RETURN_COLLECTION && false) {
912
- return Collection.fromApiClient(
913
- this.apiClient.callApi(
914
- '/goals/{goal_gid}/setMetricCurrentValue', 'POST',
915
- pathParams, queryParams, headerParams, formParams, postBody,
916
- authNames, contentTypes, accepts, returnType
917
- ),
918
- this.apiClient,
919
- {
920
- 'path': '/goals/{goal_gid}/setMetricCurrentValue',
921
- 'httpMethod': 'POST',
922
- 'pathParams': pathParams,
923
- 'queryParams': queryParams,
924
- 'headerParams': headerParams,
925
- 'formParams': formParams,
926
- 'bodyParam': postBody,
927
- 'authNames': authNames,
928
- 'contentTypes': contentTypes,
929
- 'accepts': accepts,
930
- 'returnType': returnType
931
- }
932
- )
933
- } else {
934
- return this.apiClient.callApi(
935
- '/goals/{goal_gid}/setMetricCurrentValue', 'POST',
936
- pathParams, queryParams, headerParams, formParams, postBody,
937
- authNames, contentTypes, accepts, returnType
938
- );
939
- }
696
+ return this.apiClient.callApi(
697
+ '/goals/{goal_gid}/setMetricCurrentValue', 'POST',
698
+ pathParams, queryParams, headerParams, formParams, postBody,
699
+ authNames, contentTypes, accepts, returnType
700
+ );
940
701
  }
941
702
 
942
703
  /**
@@ -950,15 +711,10 @@ export class GoalsApi {
950
711
  */
951
712
  updateGoalMetric(body, goal_gid, opts) {
952
713
 
953
- // Check if RETURN_COLLECTION is set and return a collection object if it is
954
- if (this.apiClient.RETURN_COLLECTION && false) {
955
- return this.updateGoalMetricWithHttpInfo(body, goal_gid, opts)
956
- } else {
957
- return this.updateGoalMetricWithHttpInfo(body, goal_gid, opts)
958
- .then(function(response_and_data) {
959
- return response_and_data.data;
960
- });
961
- }
714
+ return this.updateGoalMetricWithHttpInfo(body, goal_gid, opts)
715
+ .then(function(response_and_data) {
716
+ return response_and_data.data;
717
+ });
962
718
  }
963
719
 
964
720
  }