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
  * CustomFields service.
20
20
  * @module api/CustomFieldsApi
21
- * @version 3.0.2
21
+ * @version 3.0.4
22
22
  */
23
23
  export class CustomFieldsApi {
24
24
 
@@ -71,36 +71,11 @@ export class CustomFieldsApi {
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
- '/custom_fields', 'POST',
79
- pathParams, queryParams, headerParams, formParams, postBody,
80
- authNames, contentTypes, accepts, returnType
81
- ),
82
- this.apiClient,
83
- {
84
- 'path': '/custom_fields',
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
- '/custom_fields', 'POST',
100
- pathParams, queryParams, headerParams, formParams, postBody,
101
- authNames, contentTypes, accepts, returnType
102
- );
103
- }
74
+ return this.apiClient.callApi(
75
+ '/custom_fields', '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 CustomFieldsApi {
113
88
  */
114
89
  createCustomField(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.createCustomFieldWithHttpInfo(body, opts)
119
- } else {
120
- return this.createCustomFieldWithHttpInfo(body, opts)
121
- .then(function(response_and_data) {
122
- return response_and_data.data;
123
- });
124
- }
91
+ return this.createCustomFieldWithHttpInfo(body, opts)
92
+ .then(function(response_and_data) {
93
+ return response_and_data.data;
94
+ });
125
95
  }
126
96
 
127
97
 
@@ -161,36 +131,11 @@ export class CustomFieldsApi {
161
131
  let accepts = ['application/json; charset=UTF-8'];
162
132
  let returnType = 'Blob';
163
133
 
164
- // Check if RETURN_COLLECTION is set and return a collection object if it is
165
- if (this.apiClient.RETURN_COLLECTION && false) {
166
- return Collection.fromApiClient(
167
- this.apiClient.callApi(
168
- '/custom_fields/{custom_field_gid}/enum_options', 'POST',
169
- pathParams, queryParams, headerParams, formParams, postBody,
170
- authNames, contentTypes, accepts, returnType
171
- ),
172
- this.apiClient,
173
- {
174
- 'path': '/custom_fields/{custom_field_gid}/enum_options',
175
- 'httpMethod': 'POST',
176
- 'pathParams': pathParams,
177
- 'queryParams': queryParams,
178
- 'headerParams': headerParams,
179
- 'formParams': formParams,
180
- 'bodyParam': postBody,
181
- 'authNames': authNames,
182
- 'contentTypes': contentTypes,
183
- 'accepts': accepts,
184
- 'returnType': returnType
185
- }
186
- )
187
- } else {
188
- return this.apiClient.callApi(
189
- '/custom_fields/{custom_field_gid}/enum_options', 'POST',
190
- pathParams, queryParams, headerParams, formParams, postBody,
191
- authNames, contentTypes, accepts, returnType
192
- );
193
- }
134
+ return this.apiClient.callApi(
135
+ '/custom_fields/{custom_field_gid}/enum_options', 'POST',
136
+ pathParams, queryParams, headerParams, formParams, postBody,
137
+ authNames, contentTypes, accepts, returnType
138
+ );
194
139
  }
195
140
 
196
141
  /**
@@ -204,15 +149,10 @@ export class CustomFieldsApi {
204
149
  */
205
150
  createEnumOptionForCustomField(custom_field_gid, opts) {
206
151
 
207
- // Check if RETURN_COLLECTION is set and return a collection object if it is
208
- if (this.apiClient.RETURN_COLLECTION && false) {
209
- return this.createEnumOptionForCustomFieldWithHttpInfo(custom_field_gid, opts)
210
- } else {
211
- return this.createEnumOptionForCustomFieldWithHttpInfo(custom_field_gid, opts)
212
- .then(function(response_and_data) {
213
- return response_and_data.data;
214
- });
215
- }
152
+ return this.createEnumOptionForCustomFieldWithHttpInfo(custom_field_gid, opts)
153
+ .then(function(response_and_data) {
154
+ return response_and_data.data;
155
+ });
216
156
  }
217
157
 
218
158
 
@@ -247,36 +187,11 @@ export class CustomFieldsApi {
247
187
  let accepts = ['application/json; charset=UTF-8'];
248
188
  let returnType = 'Blob';
249
189
 
250
- // Check if RETURN_COLLECTION is set and return a collection object if it is
251
- if (this.apiClient.RETURN_COLLECTION && false) {
252
- return Collection.fromApiClient(
253
- this.apiClient.callApi(
254
- '/custom_fields/{custom_field_gid}', 'DELETE',
255
- pathParams, queryParams, headerParams, formParams, postBody,
256
- authNames, contentTypes, accepts, returnType
257
- ),
258
- this.apiClient,
259
- {
260
- 'path': '/custom_fields/{custom_field_gid}',
261
- 'httpMethod': 'DELETE',
262
- 'pathParams': pathParams,
263
- 'queryParams': queryParams,
264
- 'headerParams': headerParams,
265
- 'formParams': formParams,
266
- 'bodyParam': postBody,
267
- 'authNames': authNames,
268
- 'contentTypes': contentTypes,
269
- 'accepts': accepts,
270
- 'returnType': returnType
271
- }
272
- )
273
- } else {
274
- return this.apiClient.callApi(
275
- '/custom_fields/{custom_field_gid}', 'DELETE',
276
- pathParams, queryParams, headerParams, formParams, postBody,
277
- authNames, contentTypes, accepts, returnType
278
- );
279
- }
190
+ return this.apiClient.callApi(
191
+ '/custom_fields/{custom_field_gid}', 'DELETE',
192
+ pathParams, queryParams, headerParams, formParams, postBody,
193
+ authNames, contentTypes, accepts, returnType
194
+ );
280
195
  }
281
196
 
282
197
  /**
@@ -287,15 +202,10 @@ export class CustomFieldsApi {
287
202
  */
288
203
  deleteCustomField(custom_field_gid) {
289
204
 
290
- // Check if RETURN_COLLECTION is set and return a collection object if it is
291
- if (this.apiClient.RETURN_COLLECTION && false) {
292
- return this.deleteCustomFieldWithHttpInfo(custom_field_gid)
293
- } else {
294
- return this.deleteCustomFieldWithHttpInfo(custom_field_gid)
295
- .then(function(response_and_data) {
296
- return response_and_data.data;
297
- });
298
- }
205
+ return this.deleteCustomFieldWithHttpInfo(custom_field_gid)
206
+ .then(function(response_and_data) {
207
+ return response_and_data.data;
208
+ });
299
209
  }
300
210
 
301
211
 
@@ -334,36 +244,11 @@ export class CustomFieldsApi {
334
244
  let accepts = ['application/json; charset=UTF-8'];
335
245
  let returnType = 'Blob';
336
246
 
337
- // Check if RETURN_COLLECTION is set and return a collection object if it is
338
- if (this.apiClient.RETURN_COLLECTION && false) {
339
- return Collection.fromApiClient(
340
- this.apiClient.callApi(
341
- '/custom_fields/{custom_field_gid}', 'GET',
342
- pathParams, queryParams, headerParams, formParams, postBody,
343
- authNames, contentTypes, accepts, returnType
344
- ),
345
- this.apiClient,
346
- {
347
- 'path': '/custom_fields/{custom_field_gid}',
348
- 'httpMethod': 'GET',
349
- 'pathParams': pathParams,
350
- 'queryParams': queryParams,
351
- 'headerParams': headerParams,
352
- 'formParams': formParams,
353
- 'bodyParam': postBody,
354
- 'authNames': authNames,
355
- 'contentTypes': contentTypes,
356
- 'accepts': accepts,
357
- 'returnType': returnType
358
- }
359
- )
360
- } else {
361
- return this.apiClient.callApi(
362
- '/custom_fields/{custom_field_gid}', 'GET',
363
- pathParams, queryParams, headerParams, formParams, postBody,
364
- authNames, contentTypes, accepts, returnType
365
- );
366
- }
247
+ return this.apiClient.callApi(
248
+ '/custom_fields/{custom_field_gid}', 'GET',
249
+ pathParams, queryParams, headerParams, formParams, postBody,
250
+ authNames, contentTypes, accepts, returnType
251
+ );
367
252
  }
368
253
 
369
254
  /**
@@ -376,15 +261,10 @@ export class CustomFieldsApi {
376
261
  */
377
262
  getCustomField(custom_field_gid, opts) {
378
263
 
379
- // Check if RETURN_COLLECTION is set and return a collection object if it is
380
- if (this.apiClient.RETURN_COLLECTION && false) {
381
- return this.getCustomFieldWithHttpInfo(custom_field_gid, opts)
382
- } else {
383
- return this.getCustomFieldWithHttpInfo(custom_field_gid, opts)
384
- .then(function(response_and_data) {
385
- return response_and_data.data;
386
- });
387
- }
264
+ return this.getCustomFieldWithHttpInfo(custom_field_gid, opts)
265
+ .then(function(response_and_data) {
266
+ return response_and_data.data;
267
+ });
388
268
  }
389
269
 
390
270
 
@@ -424,9 +304,8 @@ export class CustomFieldsApi {
424
304
  let contentTypes = [];
425
305
  let accepts = ['application/json; charset=UTF-8'];
426
306
  let returnType = 'Blob';
427
-
428
307
  // Check if RETURN_COLLECTION is set and return a collection object if it is
429
- if (this.apiClient.RETURN_COLLECTION && true) {
308
+ if (this.apiClient.RETURN_COLLECTION) {
430
309
  return Collection.fromApiClient(
431
310
  this.apiClient.callApi(
432
311
  '/workspaces/{workspace_gid}/custom_fields', 'GET',
@@ -448,13 +327,13 @@ export class CustomFieldsApi {
448
327
  'returnType': returnType
449
328
  }
450
329
  )
451
- } else {
452
- return this.apiClient.callApi(
453
- '/workspaces/{workspace_gid}/custom_fields', 'GET',
454
- pathParams, queryParams, headerParams, formParams, postBody,
455
- authNames, contentTypes, accepts, returnType
456
- );
457
330
  }
331
+
332
+ return this.apiClient.callApi(
333
+ '/workspaces/{workspace_gid}/custom_fields', 'GET',
334
+ pathParams, queryParams, headerParams, formParams, postBody,
335
+ authNames, contentTypes, accepts, returnType
336
+ );
458
337
  }
459
338
 
460
339
  /**
@@ -468,16 +347,15 @@ export class CustomFieldsApi {
468
347
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CustomFieldResponseArray}
469
348
  */
470
349
  getCustomFieldsForWorkspace(workspace_gid, opts) {
471
-
472
350
  // Check if RETURN_COLLECTION is set and return a collection object if it is
473
- if (this.apiClient.RETURN_COLLECTION && true) {
474
- return this.getCustomFieldsForWorkspaceWithHttpInfo(workspace_gid, opts)
475
- } else {
351
+ if (this.apiClient.RETURN_COLLECTION) {
476
352
  return this.getCustomFieldsForWorkspaceWithHttpInfo(workspace_gid, opts)
477
- .then(function(response_and_data) {
478
- return response_and_data.data;
479
- });
480
353
  }
354
+
355
+ return this.getCustomFieldsForWorkspaceWithHttpInfo(workspace_gid, opts)
356
+ .then(function(response_and_data) {
357
+ return response_and_data.data;
358
+ });
481
359
  }
482
360
 
483
361
 
@@ -517,36 +395,11 @@ export class CustomFieldsApi {
517
395
  let accepts = ['application/json; charset=UTF-8'];
518
396
  let returnType = 'Blob';
519
397
 
520
- // Check if RETURN_COLLECTION is set and return a collection object if it is
521
- if (this.apiClient.RETURN_COLLECTION && false) {
522
- return Collection.fromApiClient(
523
- this.apiClient.callApi(
524
- '/custom_fields/{custom_field_gid}/enum_options/insert', 'POST',
525
- pathParams, queryParams, headerParams, formParams, postBody,
526
- authNames, contentTypes, accepts, returnType
527
- ),
528
- this.apiClient,
529
- {
530
- 'path': '/custom_fields/{custom_field_gid}/enum_options/insert',
531
- 'httpMethod': 'POST',
532
- 'pathParams': pathParams,
533
- 'queryParams': queryParams,
534
- 'headerParams': headerParams,
535
- 'formParams': formParams,
536
- 'bodyParam': postBody,
537
- 'authNames': authNames,
538
- 'contentTypes': contentTypes,
539
- 'accepts': accepts,
540
- 'returnType': returnType
541
- }
542
- )
543
- } else {
544
- return this.apiClient.callApi(
545
- '/custom_fields/{custom_field_gid}/enum_options/insert', 'POST',
546
- pathParams, queryParams, headerParams, formParams, postBody,
547
- authNames, contentTypes, accepts, returnType
548
- );
549
- }
398
+ return this.apiClient.callApi(
399
+ '/custom_fields/{custom_field_gid}/enum_options/insert', 'POST',
400
+ pathParams, queryParams, headerParams, formParams, postBody,
401
+ authNames, contentTypes, accepts, returnType
402
+ );
550
403
  }
551
404
 
552
405
  /**
@@ -560,15 +413,10 @@ export class CustomFieldsApi {
560
413
  */
561
414
  insertEnumOptionForCustomField(custom_field_gid, opts) {
562
415
 
563
- // Check if RETURN_COLLECTION is set and return a collection object if it is
564
- if (this.apiClient.RETURN_COLLECTION && false) {
565
- return this.insertEnumOptionForCustomFieldWithHttpInfo(custom_field_gid, opts)
566
- } else {
567
- return this.insertEnumOptionForCustomFieldWithHttpInfo(custom_field_gid, opts)
568
- .then(function(response_and_data) {
569
- return response_and_data.data;
570
- });
571
- }
416
+ return this.insertEnumOptionForCustomFieldWithHttpInfo(custom_field_gid, opts)
417
+ .then(function(response_and_data) {
418
+ return response_and_data.data;
419
+ });
572
420
  }
573
421
 
574
422
 
@@ -608,36 +456,11 @@ export class CustomFieldsApi {
608
456
  let accepts = ['application/json; charset=UTF-8'];
609
457
  let returnType = 'Blob';
610
458
 
611
- // Check if RETURN_COLLECTION is set and return a collection object if it is
612
- if (this.apiClient.RETURN_COLLECTION && false) {
613
- return Collection.fromApiClient(
614
- this.apiClient.callApi(
615
- '/custom_fields/{custom_field_gid}', 'PUT',
616
- pathParams, queryParams, headerParams, formParams, postBody,
617
- authNames, contentTypes, accepts, returnType
618
- ),
619
- this.apiClient,
620
- {
621
- 'path': '/custom_fields/{custom_field_gid}',
622
- 'httpMethod': 'PUT',
623
- 'pathParams': pathParams,
624
- 'queryParams': queryParams,
625
- 'headerParams': headerParams,
626
- 'formParams': formParams,
627
- 'bodyParam': postBody,
628
- 'authNames': authNames,
629
- 'contentTypes': contentTypes,
630
- 'accepts': accepts,
631
- 'returnType': returnType
632
- }
633
- )
634
- } else {
635
- return this.apiClient.callApi(
636
- '/custom_fields/{custom_field_gid}', 'PUT',
637
- pathParams, queryParams, headerParams, formParams, postBody,
638
- authNames, contentTypes, accepts, returnType
639
- );
640
- }
459
+ return this.apiClient.callApi(
460
+ '/custom_fields/{custom_field_gid}', 'PUT',
461
+ pathParams, queryParams, headerParams, formParams, postBody,
462
+ authNames, contentTypes, accepts, returnType
463
+ );
641
464
  }
642
465
 
643
466
  /**
@@ -651,15 +474,10 @@ export class CustomFieldsApi {
651
474
  */
652
475
  updateCustomField(custom_field_gid, opts) {
653
476
 
654
- // Check if RETURN_COLLECTION is set and return a collection object if it is
655
- if (this.apiClient.RETURN_COLLECTION && false) {
656
- return this.updateCustomFieldWithHttpInfo(custom_field_gid, opts)
657
- } else {
658
- return this.updateCustomFieldWithHttpInfo(custom_field_gid, opts)
659
- .then(function(response_and_data) {
660
- return response_and_data.data;
661
- });
662
- }
477
+ return this.updateCustomFieldWithHttpInfo(custom_field_gid, opts)
478
+ .then(function(response_and_data) {
479
+ return response_and_data.data;
480
+ });
663
481
  }
664
482
 
665
483
 
@@ -699,36 +517,11 @@ export class CustomFieldsApi {
699
517
  let accepts = ['application/json; charset=UTF-8'];
700
518
  let returnType = 'Blob';
701
519
 
702
- // Check if RETURN_COLLECTION is set and return a collection object if it is
703
- if (this.apiClient.RETURN_COLLECTION && false) {
704
- return Collection.fromApiClient(
705
- this.apiClient.callApi(
706
- '/enum_options/{enum_option_gid}', 'PUT',
707
- pathParams, queryParams, headerParams, formParams, postBody,
708
- authNames, contentTypes, accepts, returnType
709
- ),
710
- this.apiClient,
711
- {
712
- 'path': '/enum_options/{enum_option_gid}',
713
- 'httpMethod': 'PUT',
714
- 'pathParams': pathParams,
715
- 'queryParams': queryParams,
716
- 'headerParams': headerParams,
717
- 'formParams': formParams,
718
- 'bodyParam': postBody,
719
- 'authNames': authNames,
720
- 'contentTypes': contentTypes,
721
- 'accepts': accepts,
722
- 'returnType': returnType
723
- }
724
- )
725
- } else {
726
- return this.apiClient.callApi(
727
- '/enum_options/{enum_option_gid}', 'PUT',
728
- pathParams, queryParams, headerParams, formParams, postBody,
729
- authNames, contentTypes, accepts, returnType
730
- );
731
- }
520
+ return this.apiClient.callApi(
521
+ '/enum_options/{enum_option_gid}', 'PUT',
522
+ pathParams, queryParams, headerParams, formParams, postBody,
523
+ authNames, contentTypes, accepts, returnType
524
+ );
732
525
  }
733
526
 
734
527
  /**
@@ -742,15 +535,10 @@ export class CustomFieldsApi {
742
535
  */
743
536
  updateEnumOption(enum_option_gid, opts) {
744
537
 
745
- // Check if RETURN_COLLECTION is set and return a collection object if it is
746
- if (this.apiClient.RETURN_COLLECTION && false) {
747
- return this.updateEnumOptionWithHttpInfo(enum_option_gid, opts)
748
- } else {
749
- return this.updateEnumOptionWithHttpInfo(enum_option_gid, opts)
750
- .then(function(response_and_data) {
751
- return response_and_data.data;
752
- });
753
- }
538
+ return this.updateEnumOptionWithHttpInfo(enum_option_gid, opts)
539
+ .then(function(response_and_data) {
540
+ return response_and_data.data;
541
+ });
754
542
  }
755
543
 
756
544
  }
@@ -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
  * Events service.
20
20
  * @module api/EventsApi
21
- * @version 3.0.2
21
+ * @version 3.0.4
22
22
  */
23
23
  export class EventsApi {
24
24
 
@@ -39,7 +39,7 @@ export class EventsApi {
39
39
  /**
40
40
  * Get events on a resource
41
41
  * Returns the full record for all events that have occurred since the sync token was created. A `GET` request to the endpoint `/[path_to_resource]/events` can be made in lieu of including the resource ID in the data for the request. Asana limits a single sync token to 100 events. If more than 100 events exist for a given resource, `has_more: true` will be returned in the response, indicating that there are more events to pull. *Note: The resource returned will be the resource that triggered the event. This may be different from the one that the events were requested for. For example, a subscription to a project will contain events for tasks contained within the project.*
42
- * @param {String} resource A resource ID to subscribe to. The resource can be a task or project.
42
+ * @param {String} resource A resource ID to subscribe to. The resource can be a task, project, or goal.
43
43
  * @param {Object} opts Optional parameters
44
44
  * @param {String} opts.sync A sync token received from the last request, or none on first sync. Events will be returned from the point in time that the sync token was generated. *Note: On your first request, omit the sync token. The response will be the same as for an expired sync token, and will include a new valid sync token.If the sync token is too old (which may happen from time to time) the API will return a `412 Precondition Failed` error, and include a fresh sync token in the response.*
45
45
  * @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.
@@ -72,9 +72,8 @@ export class EventsApi {
72
72
  let contentTypes = [];
73
73
  let accepts = ['application/json; charset=UTF-8'];
74
74
  let returnType = 'Blob';
75
-
76
75
  // Check if RETURN_COLLECTION is set and return a collection object if it is
77
- if (this.apiClient.RETURN_COLLECTION && true) {
76
+ if (this.apiClient.RETURN_COLLECTION) {
78
77
  return Collection.fromApiClient(
79
78
  this.apiClient.callApi(
80
79
  '/events', 'GET',
@@ -96,35 +95,34 @@ export class EventsApi {
96
95
  'returnType': returnType
97
96
  }
98
97
  )
99
- } else {
100
- return this.apiClient.callApi(
101
- '/events', 'GET',
102
- pathParams, queryParams, headerParams, formParams, postBody,
103
- authNames, contentTypes, accepts, returnType
104
- );
105
98
  }
99
+
100
+ return this.apiClient.callApi(
101
+ '/events', 'GET',
102
+ pathParams, queryParams, headerParams, formParams, postBody,
103
+ authNames, contentTypes, accepts, returnType
104
+ );
106
105
  }
107
106
 
108
107
  /**
109
108
  * Get events on a resource
110
109
  * Returns the full record for all events that have occurred since the sync token was created. A &#x60;GET&#x60; request to the endpoint &#x60;/[path_to_resource]/events&#x60; can be made in lieu of including the resource ID in the data for the request. Asana limits a single sync token to 100 events. If more than 100 events exist for a given resource, &#x60;has_more: true&#x60; will be returned in the response, indicating that there are more events to pull. *Note: The resource returned will be the resource that triggered the event. This may be different from the one that the events were requested for. For example, a subscription to a project will contain events for tasks contained within the project.*
111
- * @param {<&vendorExtensions.x-jsdoc-type>} resource A resource ID to subscribe to. The resource can be a task or project.
110
+ * @param {<&vendorExtensions.x-jsdoc-type>} resource A resource ID to subscribe to. The resource can be a task, project, or goal.
112
111
  * @param {Object} opts Optional parameters
113
112
  * @param {String} opts.sync A sync token received from the last request, or none on first sync. Events will be returned from the point in time that the sync token was generated. *Note: On your first request, omit the sync token. The response will be the same as for an expired sync token, and will include a new valid sync token.If the sync token is too old (which may happen from time to time) the API will return a &#x60;412 Precondition Failed&#x60; error, and include a fresh sync token in the response.*
114
113
  * @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.
115
114
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EventResponseArray}
116
115
  */
117
116
  getEvents(resource, opts) {
118
-
119
117
  // Check if RETURN_COLLECTION is set and return a collection object if it is
120
- if (this.apiClient.RETURN_COLLECTION && true) {
118
+ if (this.apiClient.RETURN_COLLECTION) {
121
119
  return this.getEventsWithHttpInfo(resource, opts)
122
- } else {
123
- return this.getEventsWithHttpInfo(resource, opts)
124
- .then(function(response_and_data) {
125
- return response_and_data.data;
126
- });
127
120
  }
121
+
122
+ return this.getEventsWithHttpInfo(resource, opts)
123
+ .then(function(response_and_data) {
124
+ return response_and_data.data;
125
+ });
128
126
  }
129
127
 
130
128
  }