@stream-io/node-sdk 0.8.8 → 0.8.10

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.
@@ -54,6 +54,8 @@ import {
54
54
  DeleteFeedViewResponse,
55
55
  DeleteFeedsBatchRequest,
56
56
  DeleteFeedsBatchResponse,
57
+ DeleteFeedsRetentionPolicyRequest,
58
+ DeleteFeedsRetentionPolicyResponse,
57
59
  DeleteUserInterestsResponse,
58
60
  ExportFeedUserDataResponse,
59
61
  FollowBatchRequest,
@@ -68,6 +70,9 @@ import {
68
70
  GetFeedViewResponse,
69
71
  GetFeedVisibilityResponse,
70
72
  GetFeedsRateLimitsResponse,
73
+ GetFeedsRetentionPolicyResponse,
74
+ GetFeedsRetentionPolicyRunsRequest,
75
+ GetFeedsRetentionPolicyRunsResponse,
71
76
  GetFollowSuggestionsResponse,
72
77
  GetOrCreateFeedGroupRequest,
73
78
  GetOrCreateFeedGroupResponse,
@@ -128,6 +133,8 @@ import {
128
133
  RestoreCommentRequest,
129
134
  RestoreCommentResponse,
130
135
  RestoreFeedGroupResponse,
136
+ SetFeedsRetentionPolicyRequest,
137
+ SetFeedsRetentionPolicyResponse,
131
138
  SingleFollowResponse,
132
139
  TrackActivityMetricsRequest,
133
140
  TrackActivityMetricsResponse,
@@ -216,20 +223,17 @@ export class FeedsApi {
216
223
  search_data: request?.search_data,
217
224
  };
218
225
 
219
- const response = await this.apiClient.sendRequest<
220
- StreamResponse<AddActivityResponse>
221
- >(
226
+ const response = await this.apiClient.sendRequest<AddActivityResponse>(
222
227
  'POST',
223
228
  '/api/v2/feeds/activities',
224
229
  undefined,
225
230
  undefined,
226
231
  body,
227
- 'application/json',
228
232
  );
229
233
 
230
- decoders['AddActivityResponse']?.(response.body);
234
+ decoders['AddActivityResponse']?.(response);
231
235
 
232
- return { ...response.body, metadata: response.metadata };
236
+ return response;
233
237
  }
234
238
 
235
239
  async upsertActivities(
@@ -242,20 +246,17 @@ export class FeedsApi {
242
246
  force_moderation: request?.force_moderation,
243
247
  };
244
248
 
245
- const response = await this.apiClient.sendRequest<
246
- StreamResponse<UpsertActivitiesResponse>
247
- >(
249
+ const response = await this.apiClient.sendRequest<UpsertActivitiesResponse>(
248
250
  'POST',
249
251
  '/api/v2/feeds/activities/batch',
250
252
  undefined,
251
253
  undefined,
252
254
  body,
253
- 'application/json',
254
255
  );
255
256
 
256
- decoders['UpsertActivitiesResponse']?.(response.body);
257
+ decoders['UpsertActivitiesResponse']?.(response);
257
258
 
258
- return { ...response.body, metadata: response.metadata };
259
+ return response;
259
260
  }
260
261
 
261
262
  async updateActivitiesPartialBatch(
@@ -266,20 +267,18 @@ export class FeedsApi {
266
267
  force_moderation: request?.force_moderation,
267
268
  };
268
269
 
269
- const response = await this.apiClient.sendRequest<
270
- StreamResponse<UpdateActivitiesPartialBatchResponse>
271
- >(
272
- 'PATCH',
273
- '/api/v2/feeds/activities/batch/partial',
274
- undefined,
275
- undefined,
276
- body,
277
- 'application/json',
278
- );
270
+ const response =
271
+ await this.apiClient.sendRequest<UpdateActivitiesPartialBatchResponse>(
272
+ 'PATCH',
273
+ '/api/v2/feeds/activities/batch/partial',
274
+ undefined,
275
+ undefined,
276
+ body,
277
+ );
279
278
 
280
- decoders['UpdateActivitiesPartialBatchResponse']?.(response.body);
279
+ decoders['UpdateActivitiesPartialBatchResponse']?.(response);
281
280
 
282
- return { ...response.body, metadata: response.metadata };
281
+ return response;
283
282
  }
284
283
 
285
284
  async deleteActivities(
@@ -293,20 +292,17 @@ export class FeedsApi {
293
292
  user: request?.user,
294
293
  };
295
294
 
296
- const response = await this.apiClient.sendRequest<
297
- StreamResponse<DeleteActivitiesResponse>
298
- >(
295
+ const response = await this.apiClient.sendRequest<DeleteActivitiesResponse>(
299
296
  'POST',
300
297
  '/api/v2/feeds/activities/delete',
301
298
  undefined,
302
299
  undefined,
303
300
  body,
304
- 'application/json',
305
301
  );
306
302
 
307
- decoders['DeleteActivitiesResponse']?.(response.body);
303
+ decoders['DeleteActivitiesResponse']?.(response);
308
304
 
309
- return { ...response.body, metadata: response.metadata };
305
+ return response;
310
306
  }
311
307
 
312
308
  async trackActivityMetrics(
@@ -318,20 +314,18 @@ export class FeedsApi {
318
314
  user: request?.user,
319
315
  };
320
316
 
321
- const response = await this.apiClient.sendRequest<
322
- StreamResponse<TrackActivityMetricsResponse>
323
- >(
324
- 'POST',
325
- '/api/v2/feeds/activities/metrics/track',
326
- undefined,
327
- undefined,
328
- body,
329
- 'application/json',
330
- );
317
+ const response =
318
+ await this.apiClient.sendRequest<TrackActivityMetricsResponse>(
319
+ 'POST',
320
+ '/api/v2/feeds/activities/metrics/track',
321
+ undefined,
322
+ undefined,
323
+ body,
324
+ );
331
325
 
332
- decoders['TrackActivityMetricsResponse']?.(response.body);
326
+ decoders['TrackActivityMetricsResponse']?.(response);
333
327
 
334
- return { ...response.body, metadata: response.metadata };
328
+ return response;
335
329
  }
336
330
 
337
331
  async queryActivities(
@@ -358,20 +352,17 @@ export class FeedsApi {
358
352
  user: request?.user,
359
353
  };
360
354
 
361
- const response = await this.apiClient.sendRequest<
362
- StreamResponse<QueryActivitiesResponse>
363
- >(
355
+ const response = await this.apiClient.sendRequest<QueryActivitiesResponse>(
364
356
  'POST',
365
357
  '/api/v2/feeds/activities/query',
366
358
  undefined,
367
359
  queryParams,
368
360
  body,
369
- 'application/json',
370
361
  );
371
362
 
372
- decoders['QueryActivitiesResponse']?.(response.body);
363
+ decoders['QueryActivitiesResponse']?.(response);
373
364
 
374
- return { ...response.body, metadata: response.metadata };
365
+ return response;
375
366
  }
376
367
 
377
368
  async batchQueryActivityReactions(
@@ -388,20 +379,18 @@ export class FeedsApi {
388
379
  user: request?.user,
389
380
  };
390
381
 
391
- const response = await this.apiClient.sendRequest<
392
- StreamResponse<BatchQueryActivityReactionsResponse>
393
- >(
394
- 'POST',
395
- '/api/v2/feeds/activities/reactions/query',
396
- undefined,
397
- undefined,
398
- body,
399
- 'application/json',
400
- );
382
+ const response =
383
+ await this.apiClient.sendRequest<BatchQueryActivityReactionsResponse>(
384
+ 'POST',
385
+ '/api/v2/feeds/activities/reactions/query',
386
+ undefined,
387
+ undefined,
388
+ body,
389
+ );
401
390
 
402
- decoders['BatchQueryActivityReactionsResponse']?.(response.body);
391
+ decoders['BatchQueryActivityReactionsResponse']?.(response);
403
392
 
404
- return { ...response.body, metadata: response.metadata };
393
+ return response;
405
394
  }
406
395
 
407
396
  async deleteBookmark(request: {
@@ -417,18 +406,16 @@ export class FeedsApi {
417
406
  activity_id: request?.activity_id,
418
407
  };
419
408
 
420
- const response = await this.apiClient.sendRequest<
421
- StreamResponse<DeleteBookmarkResponse>
422
- >(
409
+ const response = await this.apiClient.sendRequest<DeleteBookmarkResponse>(
423
410
  'DELETE',
424
411
  '/api/v2/feeds/activities/{activity_id}/bookmarks',
425
412
  pathParams,
426
413
  queryParams,
427
414
  );
428
415
 
429
- decoders['DeleteBookmarkResponse']?.(response.body);
416
+ decoders['DeleteBookmarkResponse']?.(response);
430
417
 
431
- return { ...response.body, metadata: response.metadata };
418
+ return response;
432
419
  }
433
420
 
434
421
  async updateBookmark(
@@ -446,20 +433,17 @@ export class FeedsApi {
446
433
  user: request?.user,
447
434
  };
448
435
 
449
- const response = await this.apiClient.sendRequest<
450
- StreamResponse<UpdateBookmarkResponse>
451
- >(
436
+ const response = await this.apiClient.sendRequest<UpdateBookmarkResponse>(
452
437
  'PATCH',
453
438
  '/api/v2/feeds/activities/{activity_id}/bookmarks',
454
439
  pathParams,
455
440
  undefined,
456
441
  body,
457
- 'application/json',
458
442
  );
459
443
 
460
- decoders['UpdateBookmarkResponse']?.(response.body);
444
+ decoders['UpdateBookmarkResponse']?.(response);
461
445
 
462
- return { ...response.body, metadata: response.metadata };
446
+ return response;
463
447
  }
464
448
 
465
449
  async addBookmark(
@@ -476,20 +460,17 @@ export class FeedsApi {
476
460
  user: request?.user,
477
461
  };
478
462
 
479
- const response = await this.apiClient.sendRequest<
480
- StreamResponse<AddBookmarkResponse>
481
- >(
463
+ const response = await this.apiClient.sendRequest<AddBookmarkResponse>(
482
464
  'POST',
483
465
  '/api/v2/feeds/activities/{activity_id}/bookmarks',
484
466
  pathParams,
485
467
  undefined,
486
468
  body,
487
- 'application/json',
488
469
  );
489
470
 
490
- decoders['AddBookmarkResponse']?.(response.body);
471
+ decoders['AddBookmarkResponse']?.(response);
491
472
 
492
- return { ...response.body, metadata: response.metadata };
473
+ return response;
493
474
  }
494
475
 
495
476
  async activityFeedback(
@@ -506,20 +487,17 @@ export class FeedsApi {
506
487
  user: request?.user,
507
488
  };
508
489
 
509
- const response = await this.apiClient.sendRequest<
510
- StreamResponse<ActivityFeedbackResponse>
511
- >(
490
+ const response = await this.apiClient.sendRequest<ActivityFeedbackResponse>(
512
491
  'POST',
513
492
  '/api/v2/feeds/activities/{activity_id}/feedback',
514
493
  pathParams,
515
494
  undefined,
516
495
  body,
517
- 'application/json',
518
496
  );
519
497
 
520
- decoders['ActivityFeedbackResponse']?.(response.body);
498
+ decoders['ActivityFeedbackResponse']?.(response);
521
499
 
522
- return { ...response.body, metadata: response.metadata };
500
+ return response;
523
501
  }
524
502
 
525
503
  async castPollVote(
@@ -535,20 +513,17 @@ export class FeedsApi {
535
513
  vote: request?.vote,
536
514
  };
537
515
 
538
- const response = await this.apiClient.sendRequest<
539
- StreamResponse<PollVoteResponse>
540
- >(
516
+ const response = await this.apiClient.sendRequest<PollVoteResponse>(
541
517
  'POST',
542
518
  '/api/v2/feeds/activities/{activity_id}/polls/{poll_id}/vote',
543
519
  pathParams,
544
520
  undefined,
545
521
  body,
546
- 'application/json',
547
522
  );
548
523
 
549
- decoders['PollVoteResponse']?.(response.body);
524
+ decoders['PollVoteResponse']?.(response);
550
525
 
551
- return { ...response.body, metadata: response.metadata };
526
+ return response;
552
527
  }
553
528
 
554
529
  async deletePollVote(request: {
@@ -566,18 +541,16 @@ export class FeedsApi {
566
541
  vote_id: request?.vote_id,
567
542
  };
568
543
 
569
- const response = await this.apiClient.sendRequest<
570
- StreamResponse<PollVoteResponse>
571
- >(
544
+ const response = await this.apiClient.sendRequest<PollVoteResponse>(
572
545
  'DELETE',
573
546
  '/api/v2/feeds/activities/{activity_id}/polls/{poll_id}/vote/{vote_id}',
574
547
  pathParams,
575
548
  queryParams,
576
549
  );
577
550
 
578
- decoders['PollVoteResponse']?.(response.body);
551
+ decoders['PollVoteResponse']?.(response);
579
552
 
580
- return { ...response.body, metadata: response.metadata };
553
+ return response;
581
554
  }
582
555
 
583
556
  async addActivityReaction(
@@ -599,20 +572,17 @@ export class FeedsApi {
599
572
  user: request?.user,
600
573
  };
601
574
 
602
- const response = await this.apiClient.sendRequest<
603
- StreamResponse<AddReactionResponse>
604
- >(
575
+ const response = await this.apiClient.sendRequest<AddReactionResponse>(
605
576
  'POST',
606
577
  '/api/v2/feeds/activities/{activity_id}/reactions',
607
578
  pathParams,
608
579
  undefined,
609
580
  body,
610
- 'application/json',
611
581
  );
612
582
 
613
- decoders['AddReactionResponse']?.(response.body);
583
+ decoders['AddReactionResponse']?.(response);
614
584
 
615
- return { ...response.body, metadata: response.metadata };
585
+ return response;
616
586
  }
617
587
 
618
588
  async queryActivityReactions(
@@ -629,20 +599,18 @@ export class FeedsApi {
629
599
  filter: request?.filter,
630
600
  };
631
601
 
632
- const response = await this.apiClient.sendRequest<
633
- StreamResponse<QueryActivityReactionsResponse>
634
- >(
635
- 'POST',
636
- '/api/v2/feeds/activities/{activity_id}/reactions/query',
637
- pathParams,
638
- undefined,
639
- body,
640
- 'application/json',
641
- );
602
+ const response =
603
+ await this.apiClient.sendRequest<QueryActivityReactionsResponse>(
604
+ 'POST',
605
+ '/api/v2/feeds/activities/{activity_id}/reactions/query',
606
+ pathParams,
607
+ undefined,
608
+ body,
609
+ );
642
610
 
643
- decoders['QueryActivityReactionsResponse']?.(response.body);
611
+ decoders['QueryActivityReactionsResponse']?.(response);
644
612
 
645
- return { ...response.body, metadata: response.metadata };
613
+ return response;
646
614
  }
647
615
 
648
616
  async deleteActivityReaction(request: {
@@ -660,18 +628,17 @@ export class FeedsApi {
660
628
  type: request?.type,
661
629
  };
662
630
 
663
- const response = await this.apiClient.sendRequest<
664
- StreamResponse<DeleteActivityReactionResponse>
665
- >(
666
- 'DELETE',
667
- '/api/v2/feeds/activities/{activity_id}/reactions/{type}',
668
- pathParams,
669
- queryParams,
670
- );
631
+ const response =
632
+ await this.apiClient.sendRequest<DeleteActivityReactionResponse>(
633
+ 'DELETE',
634
+ '/api/v2/feeds/activities/{activity_id}/reactions/{type}',
635
+ pathParams,
636
+ queryParams,
637
+ );
671
638
 
672
- decoders['DeleteActivityReactionResponse']?.(response.body);
639
+ decoders['DeleteActivityReactionResponse']?.(response);
673
640
 
674
- return { ...response.body, metadata: response.metadata };
641
+ return response;
675
642
  }
676
643
 
677
644
  async queryActivityShares(request: {
@@ -689,18 +656,17 @@ export class FeedsApi {
689
656
  activity_id: request?.activity_id,
690
657
  };
691
658
 
692
- const response = await this.apiClient.sendRequest<
693
- StreamResponse<QueryActivitySharesResponse>
694
- >(
695
- 'GET',
696
- '/api/v2/feeds/activities/{activity_id}/shares',
697
- pathParams,
698
- queryParams,
699
- );
659
+ const response =
660
+ await this.apiClient.sendRequest<QueryActivitySharesResponse>(
661
+ 'GET',
662
+ '/api/v2/feeds/activities/{activity_id}/shares',
663
+ pathParams,
664
+ queryParams,
665
+ );
700
666
 
701
- decoders['QueryActivitySharesResponse']?.(response.body);
667
+ decoders['QueryActivitySharesResponse']?.(response);
702
668
 
703
- return { ...response.body, metadata: response.metadata };
669
+ return response;
704
670
  }
705
671
 
706
672
  async deleteActivity(request: {
@@ -716,13 +682,16 @@ export class FeedsApi {
716
682
  id: request?.id,
717
683
  };
718
684
 
719
- const response = await this.apiClient.sendRequest<
720
- StreamResponse<DeleteActivityResponse>
721
- >('DELETE', '/api/v2/feeds/activities/{id}', pathParams, queryParams);
685
+ const response = await this.apiClient.sendRequest<DeleteActivityResponse>(
686
+ 'DELETE',
687
+ '/api/v2/feeds/activities/{id}',
688
+ pathParams,
689
+ queryParams,
690
+ );
722
691
 
723
- decoders['DeleteActivityResponse']?.(response.body);
692
+ decoders['DeleteActivityResponse']?.(response);
724
693
 
725
- return { ...response.body, metadata: response.metadata };
694
+ return response;
726
695
  }
727
696
 
728
697
  async getActivity(request: {
@@ -733,6 +702,7 @@ export class FeedsApi {
733
702
  user_id?: string;
734
703
  language?: string;
735
704
  translate_text?: boolean;
705
+ include_top_level_comment_count?: boolean;
736
706
  }): Promise<StreamResponse<GetActivityResponse>> {
737
707
  const queryParams = {
738
708
  comment_sort: request?.comment_sort,
@@ -741,18 +711,22 @@ export class FeedsApi {
741
711
  user_id: request?.user_id,
742
712
  language: request?.language,
743
713
  translate_text: request?.translate_text,
714
+ include_top_level_comment_count: request?.include_top_level_comment_count,
744
715
  };
745
716
  const pathParams = {
746
717
  id: request?.id,
747
718
  };
748
719
 
749
- const response = await this.apiClient.sendRequest<
750
- StreamResponse<GetActivityResponse>
751
- >('GET', '/api/v2/feeds/activities/{id}', pathParams, queryParams);
720
+ const response = await this.apiClient.sendRequest<GetActivityResponse>(
721
+ 'GET',
722
+ '/api/v2/feeds/activities/{id}',
723
+ pathParams,
724
+ queryParams,
725
+ );
752
726
 
753
- decoders['GetActivityResponse']?.(response.body);
727
+ decoders['GetActivityResponse']?.(response);
754
728
 
755
- return { ...response.body, metadata: response.metadata };
729
+ return response;
756
730
  }
757
731
 
758
732
  async updateActivityPartial(
@@ -773,20 +747,18 @@ export class FeedsApi {
773
747
  user: request?.user,
774
748
  };
775
749
 
776
- const response = await this.apiClient.sendRequest<
777
- StreamResponse<UpdateActivityPartialResponse>
778
- >(
779
- 'PATCH',
780
- '/api/v2/feeds/activities/{id}',
781
- pathParams,
782
- undefined,
783
- body,
784
- 'application/json',
785
- );
750
+ const response =
751
+ await this.apiClient.sendRequest<UpdateActivityPartialResponse>(
752
+ 'PATCH',
753
+ '/api/v2/feeds/activities/{id}',
754
+ pathParams,
755
+ undefined,
756
+ body,
757
+ );
786
758
 
787
- decoders['UpdateActivityPartialResponse']?.(response.body);
759
+ decoders['UpdateActivityPartialResponse']?.(response);
788
760
 
789
- return { ...response.body, metadata: response.metadata };
761
+ return response;
790
762
  }
791
763
 
792
764
  async updateActivity(
@@ -821,20 +793,17 @@ export class FeedsApi {
821
793
  user: request?.user,
822
794
  };
823
795
 
824
- const response = await this.apiClient.sendRequest<
825
- StreamResponse<UpdateActivityResponse>
826
- >(
796
+ const response = await this.apiClient.sendRequest<UpdateActivityResponse>(
827
797
  'PUT',
828
798
  '/api/v2/feeds/activities/{id}',
829
799
  pathParams,
830
800
  undefined,
831
801
  body,
832
- 'application/json',
833
802
  );
834
803
 
835
- decoders['UpdateActivityResponse']?.(response.body);
804
+ decoders['UpdateActivityResponse']?.(response);
836
805
 
837
- return { ...response.body, metadata: response.metadata };
806
+ return response;
838
807
  }
839
808
 
840
809
  async restoreActivity(
@@ -854,20 +823,17 @@ export class FeedsApi {
854
823
  user: request?.user,
855
824
  };
856
825
 
857
- const response = await this.apiClient.sendRequest<
858
- StreamResponse<RestoreActivityResponse>
859
- >(
826
+ const response = await this.apiClient.sendRequest<RestoreActivityResponse>(
860
827
  'POST',
861
828
  '/api/v2/feeds/activities/{id}/restore',
862
829
  pathParams,
863
830
  queryParams,
864
831
  body,
865
- 'application/json',
866
832
  );
867
833
 
868
- decoders['RestoreActivityResponse']?.(response.body);
834
+ decoders['RestoreActivityResponse']?.(response);
869
835
 
870
- return { ...response.body, metadata: response.metadata };
836
+ return response;
871
837
  }
872
838
 
873
839
  async translateActivity(
@@ -880,20 +846,18 @@ export class FeedsApi {
880
846
  language: request?.language,
881
847
  };
882
848
 
883
- const response = await this.apiClient.sendRequest<
884
- StreamResponse<TranslateActivityResponse>
885
- >(
886
- 'POST',
887
- '/api/v2/feeds/activities/{id}/translate',
888
- pathParams,
889
- undefined,
890
- body,
891
- 'application/json',
892
- );
849
+ const response =
850
+ await this.apiClient.sendRequest<TranslateActivityResponse>(
851
+ 'POST',
852
+ '/api/v2/feeds/activities/{id}/translate',
853
+ pathParams,
854
+ undefined,
855
+ body,
856
+ );
893
857
 
894
- decoders['TranslateActivityResponse']?.(response.body);
858
+ decoders['TranslateActivityResponse']?.(response);
895
859
 
896
- return { ...response.body, metadata: response.metadata };
860
+ return response;
897
861
  }
898
862
 
899
863
  async queryBookmarkFolders(
@@ -907,20 +871,18 @@ export class FeedsApi {
907
871
  filter: request?.filter,
908
872
  };
909
873
 
910
- const response = await this.apiClient.sendRequest<
911
- StreamResponse<QueryBookmarkFoldersResponse>
912
- >(
913
- 'POST',
914
- '/api/v2/feeds/bookmark_folders/query',
915
- undefined,
916
- undefined,
917
- body,
918
- 'application/json',
919
- );
874
+ const response =
875
+ await this.apiClient.sendRequest<QueryBookmarkFoldersResponse>(
876
+ 'POST',
877
+ '/api/v2/feeds/bookmark_folders/query',
878
+ undefined,
879
+ undefined,
880
+ body,
881
+ );
920
882
 
921
- decoders['QueryBookmarkFoldersResponse']?.(response.body);
883
+ decoders['QueryBookmarkFoldersResponse']?.(response);
922
884
 
923
- return { ...response.body, metadata: response.metadata };
885
+ return response;
924
886
  }
925
887
 
926
888
  async deleteBookmarkFolder(request: {
@@ -930,18 +892,17 @@ export class FeedsApi {
930
892
  folder_id: request?.folder_id,
931
893
  };
932
894
 
933
- const response = await this.apiClient.sendRequest<
934
- StreamResponse<DeleteBookmarkFolderResponse>
935
- >(
936
- 'DELETE',
937
- '/api/v2/feeds/bookmark_folders/{folder_id}',
938
- pathParams,
939
- undefined,
940
- );
895
+ const response =
896
+ await this.apiClient.sendRequest<DeleteBookmarkFolderResponse>(
897
+ 'DELETE',
898
+ '/api/v2/feeds/bookmark_folders/{folder_id}',
899
+ pathParams,
900
+ undefined,
901
+ );
941
902
 
942
- decoders['DeleteBookmarkFolderResponse']?.(response.body);
903
+ decoders['DeleteBookmarkFolderResponse']?.(response);
943
904
 
944
- return { ...response.body, metadata: response.metadata };
905
+ return response;
945
906
  }
946
907
 
947
908
  async updateBookmarkFolder(
@@ -957,20 +918,18 @@ export class FeedsApi {
957
918
  user: request?.user,
958
919
  };
959
920
 
960
- const response = await this.apiClient.sendRequest<
961
- StreamResponse<UpdateBookmarkFolderResponse>
962
- >(
963
- 'PATCH',
964
- '/api/v2/feeds/bookmark_folders/{folder_id}',
965
- pathParams,
966
- undefined,
967
- body,
968
- 'application/json',
969
- );
921
+ const response =
922
+ await this.apiClient.sendRequest<UpdateBookmarkFolderResponse>(
923
+ 'PATCH',
924
+ '/api/v2/feeds/bookmark_folders/{folder_id}',
925
+ pathParams,
926
+ undefined,
927
+ body,
928
+ );
970
929
 
971
- decoders['UpdateBookmarkFolderResponse']?.(response.body);
930
+ decoders['UpdateBookmarkFolderResponse']?.(response);
972
931
 
973
- return { ...response.body, metadata: response.metadata };
932
+ return response;
974
933
  }
975
934
 
976
935
  async queryBookmarks(
@@ -994,20 +953,17 @@ export class FeedsApi {
994
953
  user: request?.user,
995
954
  };
996
955
 
997
- const response = await this.apiClient.sendRequest<
998
- StreamResponse<QueryBookmarksResponse>
999
- >(
956
+ const response = await this.apiClient.sendRequest<QueryBookmarksResponse>(
1000
957
  'POST',
1001
958
  '/api/v2/feeds/bookmarks/query',
1002
959
  undefined,
1003
960
  queryParams,
1004
961
  body,
1005
- 'application/json',
1006
962
  );
1007
963
 
1008
- decoders['QueryBookmarksResponse']?.(response.body);
964
+ decoders['QueryBookmarksResponse']?.(response);
1009
965
 
1010
- return { ...response.body, metadata: response.metadata };
966
+ return response;
1011
967
  }
1012
968
 
1013
969
  async deleteCollections(request: {
@@ -1017,13 +973,17 @@ export class FeedsApi {
1017
973
  collection_refs: request?.collection_refs,
1018
974
  };
1019
975
 
1020
- const response = await this.apiClient.sendRequest<
1021
- StreamResponse<DeleteCollectionsResponse>
1022
- >('DELETE', '/api/v2/feeds/collections', undefined, queryParams);
976
+ const response =
977
+ await this.apiClient.sendRequest<DeleteCollectionsResponse>(
978
+ 'DELETE',
979
+ '/api/v2/feeds/collections',
980
+ undefined,
981
+ queryParams,
982
+ );
1023
983
 
1024
- decoders['DeleteCollectionsResponse']?.(response.body);
984
+ decoders['DeleteCollectionsResponse']?.(response);
1025
985
 
1026
- return { ...response.body, metadata: response.metadata };
986
+ return response;
1027
987
  }
1028
988
 
1029
989
  async readCollections(request?: {
@@ -1035,13 +995,16 @@ export class FeedsApi {
1035
995
  collection_refs: request?.collection_refs,
1036
996
  };
1037
997
 
1038
- const response = await this.apiClient.sendRequest<
1039
- StreamResponse<ReadCollectionsResponse>
1040
- >('GET', '/api/v2/feeds/collections', undefined, queryParams);
998
+ const response = await this.apiClient.sendRequest<ReadCollectionsResponse>(
999
+ 'GET',
1000
+ '/api/v2/feeds/collections',
1001
+ undefined,
1002
+ queryParams,
1003
+ );
1041
1004
 
1042
- decoders['ReadCollectionsResponse']?.(response.body);
1005
+ decoders['ReadCollectionsResponse']?.(response);
1043
1006
 
1044
- return { ...response.body, metadata: response.metadata };
1007
+ return response;
1045
1008
  }
1046
1009
 
1047
1010
  async updateCollections(
@@ -1053,20 +1016,18 @@ export class FeedsApi {
1053
1016
  user: request?.user,
1054
1017
  };
1055
1018
 
1056
- const response = await this.apiClient.sendRequest<
1057
- StreamResponse<UpdateCollectionsResponse>
1058
- >(
1059
- 'PATCH',
1060
- '/api/v2/feeds/collections',
1061
- undefined,
1062
- undefined,
1063
- body,
1064
- 'application/json',
1065
- );
1019
+ const response =
1020
+ await this.apiClient.sendRequest<UpdateCollectionsResponse>(
1021
+ 'PATCH',
1022
+ '/api/v2/feeds/collections',
1023
+ undefined,
1024
+ undefined,
1025
+ body,
1026
+ );
1066
1027
 
1067
- decoders['UpdateCollectionsResponse']?.(response.body);
1028
+ decoders['UpdateCollectionsResponse']?.(response);
1068
1029
 
1069
- return { ...response.body, metadata: response.metadata };
1030
+ return response;
1070
1031
  }
1071
1032
 
1072
1033
  async createCollections(
@@ -1078,20 +1039,18 @@ export class FeedsApi {
1078
1039
  user: request?.user,
1079
1040
  };
1080
1041
 
1081
- const response = await this.apiClient.sendRequest<
1082
- StreamResponse<CreateCollectionsResponse>
1083
- >(
1084
- 'POST',
1085
- '/api/v2/feeds/collections',
1086
- undefined,
1087
- undefined,
1088
- body,
1089
- 'application/json',
1090
- );
1042
+ const response =
1043
+ await this.apiClient.sendRequest<CreateCollectionsResponse>(
1044
+ 'POST',
1045
+ '/api/v2/feeds/collections',
1046
+ undefined,
1047
+ undefined,
1048
+ body,
1049
+ );
1091
1050
 
1092
- decoders['CreateCollectionsResponse']?.(response.body);
1051
+ decoders['CreateCollectionsResponse']?.(response);
1093
1052
 
1094
- return { ...response.body, metadata: response.metadata };
1053
+ return response;
1095
1054
  }
1096
1055
 
1097
1056
  async upsertCollections(
@@ -1101,20 +1060,18 @@ export class FeedsApi {
1101
1060
  collections: request?.collections,
1102
1061
  };
1103
1062
 
1104
- const response = await this.apiClient.sendRequest<
1105
- StreamResponse<UpsertCollectionsResponse>
1106
- >(
1107
- 'PUT',
1108
- '/api/v2/feeds/collections',
1109
- undefined,
1110
- undefined,
1111
- body,
1112
- 'application/json',
1113
- );
1063
+ const response =
1064
+ await this.apiClient.sendRequest<UpsertCollectionsResponse>(
1065
+ 'PUT',
1066
+ '/api/v2/feeds/collections',
1067
+ undefined,
1068
+ undefined,
1069
+ body,
1070
+ );
1114
1071
 
1115
- decoders['UpsertCollectionsResponse']?.(response.body);
1072
+ decoders['UpsertCollectionsResponse']?.(response);
1116
1073
 
1117
- return { ...response.body, metadata: response.metadata };
1074
+ return response;
1118
1075
  }
1119
1076
 
1120
1077
  async queryCollections(
@@ -1130,20 +1087,17 @@ export class FeedsApi {
1130
1087
  user: request?.user,
1131
1088
  };
1132
1089
 
1133
- const response = await this.apiClient.sendRequest<
1134
- StreamResponse<QueryCollectionsResponse>
1135
- >(
1090
+ const response = await this.apiClient.sendRequest<QueryCollectionsResponse>(
1136
1091
  'POST',
1137
1092
  '/api/v2/feeds/collections/query',
1138
1093
  undefined,
1139
1094
  undefined,
1140
1095
  body,
1141
- 'application/json',
1142
1096
  );
1143
1097
 
1144
- decoders['QueryCollectionsResponse']?.(response.body);
1098
+ decoders['QueryCollectionsResponse']?.(response);
1145
1099
 
1146
- return { ...response.body, metadata: response.metadata };
1100
+ return response;
1147
1101
  }
1148
1102
 
1149
1103
  async getComments(request: {
@@ -1159,6 +1113,7 @@ export class FeedsApi {
1159
1113
  limit?: number;
1160
1114
  prev?: string;
1161
1115
  next?: string;
1116
+ include_top_level_comment_count?: boolean;
1162
1117
  }): Promise<StreamResponse<GetCommentsResponse>> {
1163
1118
  const queryParams = {
1164
1119
  object_id: request?.object_id,
@@ -1173,15 +1128,19 @@ export class FeedsApi {
1173
1128
  limit: request?.limit,
1174
1129
  prev: request?.prev,
1175
1130
  next: request?.next,
1131
+ include_top_level_comment_count: request?.include_top_level_comment_count,
1176
1132
  };
1177
1133
 
1178
- const response = await this.apiClient.sendRequest<
1179
- StreamResponse<GetCommentsResponse>
1180
- >('GET', '/api/v2/feeds/comments', undefined, queryParams);
1134
+ const response = await this.apiClient.sendRequest<GetCommentsResponse>(
1135
+ 'GET',
1136
+ '/api/v2/feeds/comments',
1137
+ undefined,
1138
+ queryParams,
1139
+ );
1181
1140
 
1182
- decoders['GetCommentsResponse']?.(response.body);
1141
+ decoders['GetCommentsResponse']?.(response);
1183
1142
 
1184
- return { ...response.body, metadata: response.metadata };
1143
+ return response;
1185
1144
  }
1186
1145
 
1187
1146
  async addComment(
@@ -1205,20 +1164,17 @@ export class FeedsApi {
1205
1164
  user: request?.user,
1206
1165
  };
1207
1166
 
1208
- const response = await this.apiClient.sendRequest<
1209
- StreamResponse<AddCommentResponse>
1210
- >(
1167
+ const response = await this.apiClient.sendRequest<AddCommentResponse>(
1211
1168
  'POST',
1212
1169
  '/api/v2/feeds/comments',
1213
1170
  undefined,
1214
1171
  undefined,
1215
1172
  body,
1216
- 'application/json',
1217
1173
  );
1218
1174
 
1219
- decoders['AddCommentResponse']?.(response.body);
1175
+ decoders['AddCommentResponse']?.(response);
1220
1176
 
1221
- return { ...response.body, metadata: response.metadata };
1177
+ return response;
1222
1178
  }
1223
1179
 
1224
1180
  async addCommentsBatch(
@@ -1228,20 +1184,17 @@ export class FeedsApi {
1228
1184
  comments: request?.comments,
1229
1185
  };
1230
1186
 
1231
- const response = await this.apiClient.sendRequest<
1232
- StreamResponse<AddCommentsBatchResponse>
1233
- >(
1187
+ const response = await this.apiClient.sendRequest<AddCommentsBatchResponse>(
1234
1188
  'POST',
1235
1189
  '/api/v2/feeds/comments/batch',
1236
1190
  undefined,
1237
1191
  undefined,
1238
1192
  body,
1239
- 'application/json',
1240
1193
  );
1241
1194
 
1242
- decoders['AddCommentsBatchResponse']?.(response.body);
1195
+ decoders['AddCommentsBatchResponse']?.(response);
1243
1196
 
1244
- return { ...response.body, metadata: response.metadata };
1197
+ return response;
1245
1198
  }
1246
1199
 
1247
1200
  async queryComments(
@@ -1266,20 +1219,17 @@ export class FeedsApi {
1266
1219
  user: request?.user,
1267
1220
  };
1268
1221
 
1269
- const response = await this.apiClient.sendRequest<
1270
- StreamResponse<QueryCommentsResponse>
1271
- >(
1222
+ const response = await this.apiClient.sendRequest<QueryCommentsResponse>(
1272
1223
  'POST',
1273
1224
  '/api/v2/feeds/comments/query',
1274
1225
  undefined,
1275
1226
  queryParams,
1276
1227
  body,
1277
- 'application/json',
1278
1228
  );
1279
1229
 
1280
- decoders['QueryCommentsResponse']?.(response.body);
1230
+ decoders['QueryCommentsResponse']?.(response);
1281
1231
 
1282
- return { ...response.body, metadata: response.metadata };
1232
+ return response;
1283
1233
  }
1284
1234
 
1285
1235
  async batchQueryCommentReactions(
@@ -1296,20 +1246,18 @@ export class FeedsApi {
1296
1246
  user: request?.user,
1297
1247
  };
1298
1248
 
1299
- const response = await this.apiClient.sendRequest<
1300
- StreamResponse<BatchQueryCommentReactionsResponse>
1301
- >(
1302
- 'POST',
1303
- '/api/v2/feeds/comments/reactions/query',
1304
- undefined,
1305
- undefined,
1306
- body,
1307
- 'application/json',
1308
- );
1249
+ const response =
1250
+ await this.apiClient.sendRequest<BatchQueryCommentReactionsResponse>(
1251
+ 'POST',
1252
+ '/api/v2/feeds/comments/reactions/query',
1253
+ undefined,
1254
+ undefined,
1255
+ body,
1256
+ );
1309
1257
 
1310
- decoders['BatchQueryCommentReactionsResponse']?.(response.body);
1258
+ decoders['BatchQueryCommentReactionsResponse']?.(response);
1311
1259
 
1312
- return { ...response.body, metadata: response.metadata };
1260
+ return response;
1313
1261
  }
1314
1262
 
1315
1263
  async deleteCommentBookmark(request: {
@@ -1325,18 +1273,17 @@ export class FeedsApi {
1325
1273
  comment_id: request?.comment_id,
1326
1274
  };
1327
1275
 
1328
- const response = await this.apiClient.sendRequest<
1329
- StreamResponse<DeleteCommentBookmarkResponse>
1330
- >(
1331
- 'DELETE',
1332
- '/api/v2/feeds/comments/{comment_id}/bookmarks',
1333
- pathParams,
1334
- queryParams,
1335
- );
1276
+ const response =
1277
+ await this.apiClient.sendRequest<DeleteCommentBookmarkResponse>(
1278
+ 'DELETE',
1279
+ '/api/v2/feeds/comments/{comment_id}/bookmarks',
1280
+ pathParams,
1281
+ queryParams,
1282
+ );
1336
1283
 
1337
- decoders['DeleteCommentBookmarkResponse']?.(response.body);
1284
+ decoders['DeleteCommentBookmarkResponse']?.(response);
1338
1285
 
1339
- return { ...response.body, metadata: response.metadata };
1286
+ return response;
1340
1287
  }
1341
1288
 
1342
1289
  async updateCommentBookmark(
@@ -1354,20 +1301,18 @@ export class FeedsApi {
1354
1301
  user: request?.user,
1355
1302
  };
1356
1303
 
1357
- const response = await this.apiClient.sendRequest<
1358
- StreamResponse<UpdateCommentBookmarkResponse>
1359
- >(
1360
- 'PATCH',
1361
- '/api/v2/feeds/comments/{comment_id}/bookmarks',
1362
- pathParams,
1363
- undefined,
1364
- body,
1365
- 'application/json',
1366
- );
1304
+ const response =
1305
+ await this.apiClient.sendRequest<UpdateCommentBookmarkResponse>(
1306
+ 'PATCH',
1307
+ '/api/v2/feeds/comments/{comment_id}/bookmarks',
1308
+ pathParams,
1309
+ undefined,
1310
+ body,
1311
+ );
1367
1312
 
1368
- decoders['UpdateCommentBookmarkResponse']?.(response.body);
1313
+ decoders['UpdateCommentBookmarkResponse']?.(response);
1369
1314
 
1370
- return { ...response.body, metadata: response.metadata };
1315
+ return response;
1371
1316
  }
1372
1317
 
1373
1318
  async addCommentBookmark(
@@ -1384,20 +1329,18 @@ export class FeedsApi {
1384
1329
  user: request?.user,
1385
1330
  };
1386
1331
 
1387
- const response = await this.apiClient.sendRequest<
1388
- StreamResponse<AddCommentBookmarkResponse>
1389
- >(
1390
- 'POST',
1391
- '/api/v2/feeds/comments/{comment_id}/bookmarks',
1392
- pathParams,
1393
- undefined,
1394
- body,
1395
- 'application/json',
1396
- );
1332
+ const response =
1333
+ await this.apiClient.sendRequest<AddCommentBookmarkResponse>(
1334
+ 'POST',
1335
+ '/api/v2/feeds/comments/{comment_id}/bookmarks',
1336
+ pathParams,
1337
+ undefined,
1338
+ body,
1339
+ );
1397
1340
 
1398
- decoders['AddCommentBookmarkResponse']?.(response.body);
1341
+ decoders['AddCommentBookmarkResponse']?.(response);
1399
1342
 
1400
- return { ...response.body, metadata: response.metadata };
1343
+ return response;
1401
1344
  }
1402
1345
 
1403
1346
  async deleteComment(request: {
@@ -1413,13 +1356,16 @@ export class FeedsApi {
1413
1356
  id: request?.id,
1414
1357
  };
1415
1358
 
1416
- const response = await this.apiClient.sendRequest<
1417
- StreamResponse<DeleteCommentResponse>
1418
- >('DELETE', '/api/v2/feeds/comments/{id}', pathParams, queryParams);
1359
+ const response = await this.apiClient.sendRequest<DeleteCommentResponse>(
1360
+ 'DELETE',
1361
+ '/api/v2/feeds/comments/{id}',
1362
+ pathParams,
1363
+ queryParams,
1364
+ );
1419
1365
 
1420
- decoders['DeleteCommentResponse']?.(response.body);
1366
+ decoders['DeleteCommentResponse']?.(response);
1421
1367
 
1422
- return { ...response.body, metadata: response.metadata };
1368
+ return response;
1423
1369
  }
1424
1370
 
1425
1371
  async getComment(request: {
@@ -1437,13 +1383,16 @@ export class FeedsApi {
1437
1383
  id: request?.id,
1438
1384
  };
1439
1385
 
1440
- const response = await this.apiClient.sendRequest<
1441
- StreamResponse<GetCommentResponse>
1442
- >('GET', '/api/v2/feeds/comments/{id}', pathParams, queryParams);
1386
+ const response = await this.apiClient.sendRequest<GetCommentResponse>(
1387
+ 'GET',
1388
+ '/api/v2/feeds/comments/{id}',
1389
+ pathParams,
1390
+ queryParams,
1391
+ );
1443
1392
 
1444
- decoders['GetCommentResponse']?.(response.body);
1393
+ decoders['GetCommentResponse']?.(response);
1445
1394
 
1446
- return { ...response.body, metadata: response.metadata };
1395
+ return response;
1447
1396
  }
1448
1397
 
1449
1398
  async updateComment(
@@ -1466,20 +1415,17 @@ export class FeedsApi {
1466
1415
  user: request?.user,
1467
1416
  };
1468
1417
 
1469
- const response = await this.apiClient.sendRequest<
1470
- StreamResponse<UpdateCommentResponse>
1471
- >(
1418
+ const response = await this.apiClient.sendRequest<UpdateCommentResponse>(
1472
1419
  'PATCH',
1473
1420
  '/api/v2/feeds/comments/{id}',
1474
1421
  pathParams,
1475
1422
  undefined,
1476
1423
  body,
1477
- 'application/json',
1478
1424
  );
1479
1425
 
1480
- decoders['UpdateCommentResponse']?.(response.body);
1426
+ decoders['UpdateCommentResponse']?.(response);
1481
1427
 
1482
- return { ...response.body, metadata: response.metadata };
1428
+ return response;
1483
1429
  }
1484
1430
 
1485
1431
  async updateCommentPartial(
@@ -1500,20 +1446,18 @@ export class FeedsApi {
1500
1446
  user: request?.user,
1501
1447
  };
1502
1448
 
1503
- const response = await this.apiClient.sendRequest<
1504
- StreamResponse<UpdateCommentPartialResponse>
1505
- >(
1506
- 'POST',
1507
- '/api/v2/feeds/comments/{id}/partial',
1508
- pathParams,
1509
- undefined,
1510
- body,
1511
- 'application/json',
1512
- );
1449
+ const response =
1450
+ await this.apiClient.sendRequest<UpdateCommentPartialResponse>(
1451
+ 'POST',
1452
+ '/api/v2/feeds/comments/{id}/partial',
1453
+ pathParams,
1454
+ undefined,
1455
+ body,
1456
+ );
1513
1457
 
1514
- decoders['UpdateCommentPartialResponse']?.(response.body);
1458
+ decoders['UpdateCommentPartialResponse']?.(response);
1515
1459
 
1516
- return { ...response.body, metadata: response.metadata };
1460
+ return response;
1517
1461
  }
1518
1462
 
1519
1463
  async addCommentReaction(
@@ -1534,20 +1478,18 @@ export class FeedsApi {
1534
1478
  user: request?.user,
1535
1479
  };
1536
1480
 
1537
- const response = await this.apiClient.sendRequest<
1538
- StreamResponse<AddCommentReactionResponse>
1539
- >(
1540
- 'POST',
1541
- '/api/v2/feeds/comments/{id}/reactions',
1542
- pathParams,
1543
- undefined,
1544
- body,
1545
- 'application/json',
1546
- );
1481
+ const response =
1482
+ await this.apiClient.sendRequest<AddCommentReactionResponse>(
1483
+ 'POST',
1484
+ '/api/v2/feeds/comments/{id}/reactions',
1485
+ pathParams,
1486
+ undefined,
1487
+ body,
1488
+ );
1547
1489
 
1548
- decoders['AddCommentReactionResponse']?.(response.body);
1490
+ decoders['AddCommentReactionResponse']?.(response);
1549
1491
 
1550
- return { ...response.body, metadata: response.metadata };
1492
+ return response;
1551
1493
  }
1552
1494
 
1553
1495
  async queryCommentReactions(
@@ -1564,20 +1506,18 @@ export class FeedsApi {
1564
1506
  filter: request?.filter,
1565
1507
  };
1566
1508
 
1567
- const response = await this.apiClient.sendRequest<
1568
- StreamResponse<QueryCommentReactionsResponse>
1569
- >(
1570
- 'POST',
1571
- '/api/v2/feeds/comments/{id}/reactions/query',
1572
- pathParams,
1573
- undefined,
1574
- body,
1575
- 'application/json',
1576
- );
1509
+ const response =
1510
+ await this.apiClient.sendRequest<QueryCommentReactionsResponse>(
1511
+ 'POST',
1512
+ '/api/v2/feeds/comments/{id}/reactions/query',
1513
+ pathParams,
1514
+ undefined,
1515
+ body,
1516
+ );
1577
1517
 
1578
- decoders['QueryCommentReactionsResponse']?.(response.body);
1518
+ decoders['QueryCommentReactionsResponse']?.(response);
1579
1519
 
1580
- return { ...response.body, metadata: response.metadata };
1520
+ return response;
1581
1521
  }
1582
1522
 
1583
1523
  async deleteCommentReaction(request: {
@@ -1595,18 +1535,17 @@ export class FeedsApi {
1595
1535
  type: request?.type,
1596
1536
  };
1597
1537
 
1598
- const response = await this.apiClient.sendRequest<
1599
- StreamResponse<DeleteCommentReactionResponse>
1600
- >(
1601
- 'DELETE',
1602
- '/api/v2/feeds/comments/{id}/reactions/{type}',
1603
- pathParams,
1604
- queryParams,
1605
- );
1538
+ const response =
1539
+ await this.apiClient.sendRequest<DeleteCommentReactionResponse>(
1540
+ 'DELETE',
1541
+ '/api/v2/feeds/comments/{id}/reactions/{type}',
1542
+ pathParams,
1543
+ queryParams,
1544
+ );
1606
1545
 
1607
- decoders['DeleteCommentReactionResponse']?.(response.body);
1546
+ decoders['DeleteCommentReactionResponse']?.(response);
1608
1547
 
1609
- return { ...response.body, metadata: response.metadata };
1548
+ return response;
1610
1549
  }
1611
1550
 
1612
1551
  async getCommentReplies(request: {
@@ -1638,13 +1577,17 @@ export class FeedsApi {
1638
1577
  id: request?.id,
1639
1578
  };
1640
1579
 
1641
- const response = await this.apiClient.sendRequest<
1642
- StreamResponse<GetCommentRepliesResponse>
1643
- >('GET', '/api/v2/feeds/comments/{id}/replies', pathParams, queryParams);
1580
+ const response =
1581
+ await this.apiClient.sendRequest<GetCommentRepliesResponse>(
1582
+ 'GET',
1583
+ '/api/v2/feeds/comments/{id}/replies',
1584
+ pathParams,
1585
+ queryParams,
1586
+ );
1644
1587
 
1645
- decoders['GetCommentRepliesResponse']?.(response.body);
1588
+ decoders['GetCommentRepliesResponse']?.(response);
1646
1589
 
1647
- return { ...response.body, metadata: response.metadata };
1590
+ return response;
1648
1591
  }
1649
1592
 
1650
1593
  async restoreComment(
@@ -1658,20 +1601,17 @@ export class FeedsApi {
1658
1601
  user: request?.user,
1659
1602
  };
1660
1603
 
1661
- const response = await this.apiClient.sendRequest<
1662
- StreamResponse<RestoreCommentResponse>
1663
- >(
1604
+ const response = await this.apiClient.sendRequest<RestoreCommentResponse>(
1664
1605
  'POST',
1665
1606
  '/api/v2/feeds/comments/{id}/restore',
1666
1607
  pathParams,
1667
1608
  undefined,
1668
1609
  body,
1669
- 'application/json',
1670
1610
  );
1671
1611
 
1672
- decoders['RestoreCommentResponse']?.(response.body);
1612
+ decoders['RestoreCommentResponse']?.(response);
1673
1613
 
1674
- return { ...response.body, metadata: response.metadata };
1614
+ return response;
1675
1615
  }
1676
1616
 
1677
1617
  async translateComment(
@@ -1684,20 +1624,17 @@ export class FeedsApi {
1684
1624
  language: request?.language,
1685
1625
  };
1686
1626
 
1687
- const response = await this.apiClient.sendRequest<
1688
- StreamResponse<TranslateCommentResponse>
1689
- >(
1627
+ const response = await this.apiClient.sendRequest<TranslateCommentResponse>(
1690
1628
  'POST',
1691
1629
  '/api/v2/feeds/comments/{id}/translate',
1692
1630
  pathParams,
1693
1631
  undefined,
1694
1632
  body,
1695
- 'application/json',
1696
1633
  );
1697
1634
 
1698
- decoders['TranslateCommentResponse']?.(response.body);
1635
+ decoders['TranslateCommentResponse']?.(response);
1699
1636
 
1700
- return { ...response.body, metadata: response.metadata };
1637
+ return response;
1701
1638
  }
1702
1639
 
1703
1640
  async listFeedGroups(request?: {
@@ -1707,13 +1644,16 @@ export class FeedsApi {
1707
1644
  include_soft_deleted: request?.include_soft_deleted,
1708
1645
  };
1709
1646
 
1710
- const response = await this.apiClient.sendRequest<
1711
- StreamResponse<ListFeedGroupsResponse>
1712
- >('GET', '/api/v2/feeds/feed_groups', undefined, queryParams);
1647
+ const response = await this.apiClient.sendRequest<ListFeedGroupsResponse>(
1648
+ 'GET',
1649
+ '/api/v2/feeds/feed_groups',
1650
+ undefined,
1651
+ queryParams,
1652
+ );
1713
1653
 
1714
- decoders['ListFeedGroupsResponse']?.(response.body);
1654
+ decoders['ListFeedGroupsResponse']?.(response);
1715
1655
 
1716
- return { ...response.body, metadata: response.metadata };
1656
+ return response;
1717
1657
  }
1718
1658
 
1719
1659
  async createFeedGroup(
@@ -1736,20 +1676,17 @@ export class FeedsApi {
1736
1676
  stories: request?.stories,
1737
1677
  };
1738
1678
 
1739
- const response = await this.apiClient.sendRequest<
1740
- StreamResponse<CreateFeedGroupResponse>
1741
- >(
1679
+ const response = await this.apiClient.sendRequest<CreateFeedGroupResponse>(
1742
1680
  'POST',
1743
1681
  '/api/v2/feeds/feed_groups',
1744
1682
  undefined,
1745
1683
  undefined,
1746
1684
  body,
1747
- 'application/json',
1748
1685
  );
1749
1686
 
1750
- decoders['CreateFeedGroupResponse']?.(response.body);
1687
+ decoders['CreateFeedGroupResponse']?.(response);
1751
1688
 
1752
- return { ...response.body, metadata: response.metadata };
1689
+ return response;
1753
1690
  }
1754
1691
 
1755
1692
  async deleteFeed(request: {
@@ -1767,18 +1704,16 @@ export class FeedsApi {
1767
1704
  feed_id: request?.feed_id,
1768
1705
  };
1769
1706
 
1770
- const response = await this.apiClient.sendRequest<
1771
- StreamResponse<DeleteFeedResponse>
1772
- >(
1707
+ const response = await this.apiClient.sendRequest<DeleteFeedResponse>(
1773
1708
  'DELETE',
1774
1709
  '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}',
1775
1710
  pathParams,
1776
1711
  queryParams,
1777
1712
  );
1778
1713
 
1779
- decoders['DeleteFeedResponse']?.(response.body);
1714
+ decoders['DeleteFeedResponse']?.(response);
1780
1715
 
1781
- return { ...response.body, metadata: response.metadata };
1716
+ return response;
1782
1717
  }
1783
1718
 
1784
1719
  async getOrCreateFeed(
@@ -1818,20 +1753,17 @@ export class FeedsApi {
1818
1753
  user: request?.user,
1819
1754
  };
1820
1755
 
1821
- const response = await this.apiClient.sendRequest<
1822
- StreamResponse<GetOrCreateFeedResponse>
1823
- >(
1756
+ const response = await this.apiClient.sendRequest<GetOrCreateFeedResponse>(
1824
1757
  'POST',
1825
1758
  '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}',
1826
1759
  pathParams,
1827
1760
  queryParams,
1828
1761
  body,
1829
- 'application/json',
1830
1762
  );
1831
1763
 
1832
- decoders['GetOrCreateFeedResponse']?.(response.body);
1764
+ decoders['GetOrCreateFeedResponse']?.(response);
1833
1765
 
1834
- return { ...response.body, metadata: response.metadata };
1766
+ return response;
1835
1767
  }
1836
1768
 
1837
1769
  async updateFeed(
@@ -1852,20 +1784,17 @@ export class FeedsApi {
1852
1784
  location: request?.location,
1853
1785
  };
1854
1786
 
1855
- const response = await this.apiClient.sendRequest<
1856
- StreamResponse<UpdateFeedResponse>
1857
- >(
1787
+ const response = await this.apiClient.sendRequest<UpdateFeedResponse>(
1858
1788
  'PUT',
1859
1789
  '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}',
1860
1790
  pathParams,
1861
1791
  undefined,
1862
1792
  body,
1863
- 'application/json',
1864
1793
  );
1865
1794
 
1866
- decoders['UpdateFeedResponse']?.(response.body);
1795
+ decoders['UpdateFeedResponse']?.(response);
1867
1796
 
1868
- return { ...response.body, metadata: response.metadata };
1797
+ return response;
1869
1798
  }
1870
1799
 
1871
1800
  async markActivity(
@@ -1885,18 +1814,17 @@ export class FeedsApi {
1885
1814
  user: request?.user,
1886
1815
  };
1887
1816
 
1888
- const response = await this.apiClient.sendRequest<StreamResponse<Response>>(
1817
+ const response = await this.apiClient.sendRequest<Response>(
1889
1818
  'POST',
1890
1819
  '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/activities/mark/batch',
1891
1820
  pathParams,
1892
1821
  undefined,
1893
1822
  body,
1894
- 'application/json',
1895
1823
  );
1896
1824
 
1897
- decoders['Response']?.(response.body);
1825
+ decoders['Response']?.(response);
1898
1826
 
1899
- return { ...response.body, metadata: response.metadata };
1827
+ return response;
1900
1828
  }
1901
1829
 
1902
1830
  async unpinActivity(request: {
@@ -1916,18 +1844,16 @@ export class FeedsApi {
1916
1844
  activity_id: request?.activity_id,
1917
1845
  };
1918
1846
 
1919
- const response = await this.apiClient.sendRequest<
1920
- StreamResponse<UnpinActivityResponse>
1921
- >(
1847
+ const response = await this.apiClient.sendRequest<UnpinActivityResponse>(
1922
1848
  'DELETE',
1923
1849
  '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/activities/{activity_id}/pin',
1924
1850
  pathParams,
1925
1851
  queryParams,
1926
1852
  );
1927
1853
 
1928
- decoders['UnpinActivityResponse']?.(response.body);
1854
+ decoders['UnpinActivityResponse']?.(response);
1929
1855
 
1930
- return { ...response.body, metadata: response.metadata };
1856
+ return response;
1931
1857
  }
1932
1858
 
1933
1859
  async pinActivity(
@@ -1948,20 +1874,17 @@ export class FeedsApi {
1948
1874
  user: request?.user,
1949
1875
  };
1950
1876
 
1951
- const response = await this.apiClient.sendRequest<
1952
- StreamResponse<PinActivityResponse>
1953
- >(
1877
+ const response = await this.apiClient.sendRequest<PinActivityResponse>(
1954
1878
  'POST',
1955
1879
  '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/activities/{activity_id}/pin',
1956
1880
  pathParams,
1957
1881
  undefined,
1958
1882
  body,
1959
- 'application/json',
1960
1883
  );
1961
1884
 
1962
- decoders['PinActivityResponse']?.(response.body);
1885
+ decoders['PinActivityResponse']?.(response);
1963
1886
 
1964
- return { ...response.body, metadata: response.metadata };
1887
+ return response;
1965
1888
  }
1966
1889
 
1967
1890
  async changeFeedVisibility(
@@ -1979,20 +1902,18 @@ export class FeedsApi {
1979
1902
  pending_follows_action: request?.pending_follows_action,
1980
1903
  };
1981
1904
 
1982
- const response = await this.apiClient.sendRequest<
1983
- StreamResponse<ChangeFeedVisibilityResponse>
1984
- >(
1985
- 'POST',
1986
- '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/change_visibility',
1987
- pathParams,
1988
- undefined,
1989
- body,
1990
- 'application/json',
1991
- );
1905
+ const response =
1906
+ await this.apiClient.sendRequest<ChangeFeedVisibilityResponse>(
1907
+ 'POST',
1908
+ '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/change_visibility',
1909
+ pathParams,
1910
+ undefined,
1911
+ body,
1912
+ );
1992
1913
 
1993
- decoders['ChangeFeedVisibilityResponse']?.(response.body);
1914
+ decoders['ChangeFeedVisibilityResponse']?.(response);
1994
1915
 
1995
- return { ...response.body, metadata: response.metadata };
1916
+ return response;
1996
1917
  }
1997
1918
 
1998
1919
  async getFeedCounts(request: {
@@ -2004,18 +1925,16 @@ export class FeedsApi {
2004
1925
  feed_id: request?.feed_id,
2005
1926
  };
2006
1927
 
2007
- const response = await this.apiClient.sendRequest<
2008
- StreamResponse<GetFeedCountsResponse>
2009
- >(
1928
+ const response = await this.apiClient.sendRequest<GetFeedCountsResponse>(
2010
1929
  'GET',
2011
1930
  '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/counts',
2012
1931
  pathParams,
2013
1932
  undefined,
2014
1933
  );
2015
1934
 
2016
- decoders['GetFeedCountsResponse']?.(response.body);
1935
+ decoders['GetFeedCountsResponse']?.(response);
2017
1936
 
2018
- return { ...response.body, metadata: response.metadata };
1937
+ return response;
2019
1938
  }
2020
1939
 
2021
1940
  async updateFeedMembers(
@@ -2036,20 +1955,18 @@ export class FeedsApi {
2036
1955
  members: request?.members,
2037
1956
  };
2038
1957
 
2039
- const response = await this.apiClient.sendRequest<
2040
- StreamResponse<UpdateFeedMembersResponse>
2041
- >(
2042
- 'PATCH',
2043
- '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/members',
2044
- pathParams,
2045
- undefined,
2046
- body,
2047
- 'application/json',
2048
- );
1958
+ const response =
1959
+ await this.apiClient.sendRequest<UpdateFeedMembersResponse>(
1960
+ 'PATCH',
1961
+ '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/members',
1962
+ pathParams,
1963
+ undefined,
1964
+ body,
1965
+ );
2049
1966
 
2050
- decoders['UpdateFeedMembersResponse']?.(response.body);
1967
+ decoders['UpdateFeedMembersResponse']?.(response);
2051
1968
 
2052
- return { ...response.body, metadata: response.metadata };
1969
+ return response;
2053
1970
  }
2054
1971
 
2055
1972
  async acceptFeedMemberInvite(
@@ -2067,20 +1984,18 @@ export class FeedsApi {
2067
1984
  user: request?.user,
2068
1985
  };
2069
1986
 
2070
- const response = await this.apiClient.sendRequest<
2071
- StreamResponse<AcceptFeedMemberInviteResponse>
2072
- >(
2073
- 'POST',
2074
- '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/members/accept',
2075
- pathParams,
2076
- undefined,
2077
- body,
2078
- 'application/json',
2079
- );
1987
+ const response =
1988
+ await this.apiClient.sendRequest<AcceptFeedMemberInviteResponse>(
1989
+ 'POST',
1990
+ '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/members/accept',
1991
+ pathParams,
1992
+ undefined,
1993
+ body,
1994
+ );
2080
1995
 
2081
- decoders['AcceptFeedMemberInviteResponse']?.(response.body);
1996
+ decoders['AcceptFeedMemberInviteResponse']?.(response);
2082
1997
 
2083
- return { ...response.body, metadata: response.metadata };
1998
+ return response;
2084
1999
  }
2085
2000
 
2086
2001
  async queryFeedMembers(
@@ -2101,20 +2016,17 @@ export class FeedsApi {
2101
2016
  filter: request?.filter,
2102
2017
  };
2103
2018
 
2104
- const response = await this.apiClient.sendRequest<
2105
- StreamResponse<QueryFeedMembersResponse>
2106
- >(
2019
+ const response = await this.apiClient.sendRequest<QueryFeedMembersResponse>(
2107
2020
  'POST',
2108
2021
  '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/members/query',
2109
2022
  pathParams,
2110
2023
  undefined,
2111
2024
  body,
2112
- 'application/json',
2113
2025
  );
2114
2026
 
2115
- decoders['QueryFeedMembersResponse']?.(response.body);
2027
+ decoders['QueryFeedMembersResponse']?.(response);
2116
2028
 
2117
- return { ...response.body, metadata: response.metadata };
2029
+ return response;
2118
2030
  }
2119
2031
 
2120
2032
  async rejectFeedMemberInvite(
@@ -2132,20 +2044,18 @@ export class FeedsApi {
2132
2044
  user: request?.user,
2133
2045
  };
2134
2046
 
2135
- const response = await this.apiClient.sendRequest<
2136
- StreamResponse<RejectFeedMemberInviteResponse>
2137
- >(
2138
- 'POST',
2139
- '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/members/reject',
2140
- pathParams,
2141
- undefined,
2142
- body,
2143
- 'application/json',
2144
- );
2047
+ const response =
2048
+ await this.apiClient.sendRequest<RejectFeedMemberInviteResponse>(
2049
+ 'POST',
2050
+ '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/members/reject',
2051
+ pathParams,
2052
+ undefined,
2053
+ body,
2054
+ );
2145
2055
 
2146
- decoders['RejectFeedMemberInviteResponse']?.(response.body);
2056
+ decoders['RejectFeedMemberInviteResponse']?.(response);
2147
2057
 
2148
- return { ...response.body, metadata: response.metadata };
2058
+ return response;
2149
2059
  }
2150
2060
 
2151
2061
  async queryPinnedActivities(
@@ -2173,20 +2083,18 @@ export class FeedsApi {
2173
2083
  filter: request?.filter,
2174
2084
  };
2175
2085
 
2176
- const response = await this.apiClient.sendRequest<
2177
- StreamResponse<QueryPinnedActivitiesResponse>
2178
- >(
2179
- 'POST',
2180
- '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/pinned_activities/query',
2181
- pathParams,
2182
- queryParams,
2183
- body,
2184
- 'application/json',
2185
- );
2086
+ const response =
2087
+ await this.apiClient.sendRequest<QueryPinnedActivitiesResponse>(
2088
+ 'POST',
2089
+ '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/pinned_activities/query',
2090
+ pathParams,
2091
+ queryParams,
2092
+ body,
2093
+ );
2186
2094
 
2187
- decoders['QueryPinnedActivitiesResponse']?.(response.body);
2095
+ decoders['QueryPinnedActivitiesResponse']?.(response);
2188
2096
 
2189
- return { ...response.body, metadata: response.metadata };
2097
+ return response;
2190
2098
  }
2191
2099
 
2192
2100
  async getFollowSuggestions(request: {
@@ -2202,18 +2110,17 @@ export class FeedsApi {
2202
2110
  feed_group_id: request?.feed_group_id,
2203
2111
  };
2204
2112
 
2205
- const response = await this.apiClient.sendRequest<
2206
- StreamResponse<GetFollowSuggestionsResponse>
2207
- >(
2208
- 'GET',
2209
- '/api/v2/feeds/feed_groups/{feed_group_id}/follow_suggestions',
2210
- pathParams,
2211
- queryParams,
2212
- );
2113
+ const response =
2114
+ await this.apiClient.sendRequest<GetFollowSuggestionsResponse>(
2115
+ 'GET',
2116
+ '/api/v2/feeds/feed_groups/{feed_group_id}/follow_suggestions',
2117
+ pathParams,
2118
+ queryParams,
2119
+ );
2213
2120
 
2214
- decoders['GetFollowSuggestionsResponse']?.(response.body);
2121
+ decoders['GetFollowSuggestionsResponse']?.(response);
2215
2122
 
2216
- return { ...response.body, metadata: response.metadata };
2123
+ return response;
2217
2124
  }
2218
2125
 
2219
2126
  async restoreFeedGroup(request: {
@@ -2223,18 +2130,16 @@ export class FeedsApi {
2223
2130
  feed_group_id: request?.feed_group_id,
2224
2131
  };
2225
2132
 
2226
- const response = await this.apiClient.sendRequest<
2227
- StreamResponse<RestoreFeedGroupResponse>
2228
- >(
2133
+ const response = await this.apiClient.sendRequest<RestoreFeedGroupResponse>(
2229
2134
  'POST',
2230
2135
  '/api/v2/feeds/feed_groups/{feed_group_id}/restore',
2231
2136
  pathParams,
2232
2137
  undefined,
2233
2138
  );
2234
2139
 
2235
- decoders['RestoreFeedGroupResponse']?.(response.body);
2140
+ decoders['RestoreFeedGroupResponse']?.(response);
2236
2141
 
2237
- return { ...response.body, metadata: response.metadata };
2142
+ return response;
2238
2143
  }
2239
2144
 
2240
2145
  async deleteFeedGroup(request: {
@@ -2248,13 +2153,16 @@ export class FeedsApi {
2248
2153
  id: request?.id,
2249
2154
  };
2250
2155
 
2251
- const response = await this.apiClient.sendRequest<
2252
- StreamResponse<DeleteFeedGroupResponse>
2253
- >('DELETE', '/api/v2/feeds/feed_groups/{id}', pathParams, queryParams);
2156
+ const response = await this.apiClient.sendRequest<DeleteFeedGroupResponse>(
2157
+ 'DELETE',
2158
+ '/api/v2/feeds/feed_groups/{id}',
2159
+ pathParams,
2160
+ queryParams,
2161
+ );
2254
2162
 
2255
- decoders['DeleteFeedGroupResponse']?.(response.body);
2163
+ decoders['DeleteFeedGroupResponse']?.(response);
2256
2164
 
2257
- return { ...response.body, metadata: response.metadata };
2165
+ return response;
2258
2166
  }
2259
2167
 
2260
2168
  async getFeedGroup(request: {
@@ -2268,13 +2176,16 @@ export class FeedsApi {
2268
2176
  id: request?.id,
2269
2177
  };
2270
2178
 
2271
- const response = await this.apiClient.sendRequest<
2272
- StreamResponse<GetFeedGroupResponse>
2273
- >('GET', '/api/v2/feeds/feed_groups/{id}', pathParams, queryParams);
2179
+ const response = await this.apiClient.sendRequest<GetFeedGroupResponse>(
2180
+ 'GET',
2181
+ '/api/v2/feeds/feed_groups/{id}',
2182
+ pathParams,
2183
+ queryParams,
2184
+ );
2274
2185
 
2275
- decoders['GetFeedGroupResponse']?.(response.body);
2186
+ decoders['GetFeedGroupResponse']?.(response);
2276
2187
 
2277
- return { ...response.body, metadata: response.metadata };
2188
+ return response;
2278
2189
  }
2279
2190
 
2280
2191
  async getOrCreateFeedGroup(
@@ -2299,20 +2210,18 @@ export class FeedsApi {
2299
2210
  stories: request?.stories,
2300
2211
  };
2301
2212
 
2302
- const response = await this.apiClient.sendRequest<
2303
- StreamResponse<GetOrCreateFeedGroupResponse>
2304
- >(
2305
- 'POST',
2306
- '/api/v2/feeds/feed_groups/{id}',
2307
- pathParams,
2308
- undefined,
2309
- body,
2310
- 'application/json',
2311
- );
2213
+ const response =
2214
+ await this.apiClient.sendRequest<GetOrCreateFeedGroupResponse>(
2215
+ 'POST',
2216
+ '/api/v2/feeds/feed_groups/{id}',
2217
+ pathParams,
2218
+ undefined,
2219
+ body,
2220
+ );
2312
2221
 
2313
- decoders['GetOrCreateFeedGroupResponse']?.(response.body);
2222
+ decoders['GetOrCreateFeedGroupResponse']?.(response);
2314
2223
 
2315
- return { ...response.body, metadata: response.metadata };
2224
+ return response;
2316
2225
  }
2317
2226
 
2318
2227
  async updateFeedGroup(
@@ -2337,30 +2246,30 @@ export class FeedsApi {
2337
2246
  stories: request?.stories,
2338
2247
  };
2339
2248
 
2340
- const response = await this.apiClient.sendRequest<
2341
- StreamResponse<UpdateFeedGroupResponse>
2342
- >(
2249
+ const response = await this.apiClient.sendRequest<UpdateFeedGroupResponse>(
2343
2250
  'PUT',
2344
2251
  '/api/v2/feeds/feed_groups/{id}',
2345
2252
  pathParams,
2346
2253
  undefined,
2347
2254
  body,
2348
- 'application/json',
2349
2255
  );
2350
2256
 
2351
- decoders['UpdateFeedGroupResponse']?.(response.body);
2257
+ decoders['UpdateFeedGroupResponse']?.(response);
2352
2258
 
2353
- return { ...response.body, metadata: response.metadata };
2259
+ return response;
2354
2260
  }
2355
2261
 
2356
2262
  async listFeedViews(): Promise<StreamResponse<ListFeedViewsResponse>> {
2357
- const response = await this.apiClient.sendRequest<
2358
- StreamResponse<ListFeedViewsResponse>
2359
- >('GET', '/api/v2/feeds/feed_views', undefined, undefined);
2263
+ const response = await this.apiClient.sendRequest<ListFeedViewsResponse>(
2264
+ 'GET',
2265
+ '/api/v2/feeds/feed_views',
2266
+ undefined,
2267
+ undefined,
2268
+ );
2360
2269
 
2361
- decoders['ListFeedViewsResponse']?.(response.body);
2270
+ decoders['ListFeedViewsResponse']?.(response);
2362
2271
 
2363
- return { ...response.body, metadata: response.metadata };
2272
+ return response;
2364
2273
  }
2365
2274
 
2366
2275
  async createFeedView(
@@ -2373,20 +2282,17 @@ export class FeedsApi {
2373
2282
  ranking: request?.ranking,
2374
2283
  };
2375
2284
 
2376
- const response = await this.apiClient.sendRequest<
2377
- StreamResponse<CreateFeedViewResponse>
2378
- >(
2285
+ const response = await this.apiClient.sendRequest<CreateFeedViewResponse>(
2379
2286
  'POST',
2380
2287
  '/api/v2/feeds/feed_views',
2381
2288
  undefined,
2382
2289
  undefined,
2383
2290
  body,
2384
- 'application/json',
2385
2291
  );
2386
2292
 
2387
- decoders['CreateFeedViewResponse']?.(response.body);
2293
+ decoders['CreateFeedViewResponse']?.(response);
2388
2294
 
2389
- return { ...response.body, metadata: response.metadata };
2295
+ return response;
2390
2296
  }
2391
2297
 
2392
2298
  async deleteFeedView(request: {
@@ -2396,13 +2302,16 @@ export class FeedsApi {
2396
2302
  id: request?.id,
2397
2303
  };
2398
2304
 
2399
- const response = await this.apiClient.sendRequest<
2400
- StreamResponse<DeleteFeedViewResponse>
2401
- >('DELETE', '/api/v2/feeds/feed_views/{id}', pathParams, undefined);
2305
+ const response = await this.apiClient.sendRequest<DeleteFeedViewResponse>(
2306
+ 'DELETE',
2307
+ '/api/v2/feeds/feed_views/{id}',
2308
+ pathParams,
2309
+ undefined,
2310
+ );
2402
2311
 
2403
- decoders['DeleteFeedViewResponse']?.(response.body);
2312
+ decoders['DeleteFeedViewResponse']?.(response);
2404
2313
 
2405
- return { ...response.body, metadata: response.metadata };
2314
+ return response;
2406
2315
  }
2407
2316
 
2408
2317
  async getFeedView(request: {
@@ -2412,13 +2321,16 @@ export class FeedsApi {
2412
2321
  id: request?.id,
2413
2322
  };
2414
2323
 
2415
- const response = await this.apiClient.sendRequest<
2416
- StreamResponse<GetFeedViewResponse>
2417
- >('GET', '/api/v2/feeds/feed_views/{id}', pathParams, undefined);
2324
+ const response = await this.apiClient.sendRequest<GetFeedViewResponse>(
2325
+ 'GET',
2326
+ '/api/v2/feeds/feed_views/{id}',
2327
+ pathParams,
2328
+ undefined,
2329
+ );
2418
2330
 
2419
- decoders['GetFeedViewResponse']?.(response.body);
2331
+ decoders['GetFeedViewResponse']?.(response);
2420
2332
 
2421
- return { ...response.body, metadata: response.metadata };
2333
+ return response;
2422
2334
  }
2423
2335
 
2424
2336
  async getOrCreateFeedView(
@@ -2433,20 +2345,18 @@ export class FeedsApi {
2433
2345
  ranking: request?.ranking,
2434
2346
  };
2435
2347
 
2436
- const response = await this.apiClient.sendRequest<
2437
- StreamResponse<GetOrCreateFeedViewResponse>
2438
- >(
2439
- 'POST',
2440
- '/api/v2/feeds/feed_views/{id}',
2441
- pathParams,
2442
- undefined,
2443
- body,
2444
- 'application/json',
2445
- );
2348
+ const response =
2349
+ await this.apiClient.sendRequest<GetOrCreateFeedViewResponse>(
2350
+ 'POST',
2351
+ '/api/v2/feeds/feed_views/{id}',
2352
+ pathParams,
2353
+ undefined,
2354
+ body,
2355
+ );
2446
2356
 
2447
- decoders['GetOrCreateFeedViewResponse']?.(response.body);
2357
+ decoders['GetOrCreateFeedViewResponse']?.(response);
2448
2358
 
2449
- return { ...response.body, metadata: response.metadata };
2359
+ return response;
2450
2360
  }
2451
2361
 
2452
2362
  async updateFeedView(
@@ -2461,32 +2371,33 @@ export class FeedsApi {
2461
2371
  ranking: request?.ranking,
2462
2372
  };
2463
2373
 
2464
- const response = await this.apiClient.sendRequest<
2465
- StreamResponse<UpdateFeedViewResponse>
2466
- >(
2374
+ const response = await this.apiClient.sendRequest<UpdateFeedViewResponse>(
2467
2375
  'PUT',
2468
2376
  '/api/v2/feeds/feed_views/{id}',
2469
2377
  pathParams,
2470
2378
  undefined,
2471
2379
  body,
2472
- 'application/json',
2473
2380
  );
2474
2381
 
2475
- decoders['UpdateFeedViewResponse']?.(response.body);
2382
+ decoders['UpdateFeedViewResponse']?.(response);
2476
2383
 
2477
- return { ...response.body, metadata: response.metadata };
2384
+ return response;
2478
2385
  }
2479
2386
 
2480
2387
  async listFeedVisibilities(): Promise<
2481
2388
  StreamResponse<ListFeedVisibilitiesResponse>
2482
2389
  > {
2483
- const response = await this.apiClient.sendRequest<
2484
- StreamResponse<ListFeedVisibilitiesResponse>
2485
- >('GET', '/api/v2/feeds/feed_visibilities', undefined, undefined);
2390
+ const response =
2391
+ await this.apiClient.sendRequest<ListFeedVisibilitiesResponse>(
2392
+ 'GET',
2393
+ '/api/v2/feeds/feed_visibilities',
2394
+ undefined,
2395
+ undefined,
2396
+ );
2486
2397
 
2487
- decoders['ListFeedVisibilitiesResponse']?.(response.body);
2398
+ decoders['ListFeedVisibilitiesResponse']?.(response);
2488
2399
 
2489
- return { ...response.body, metadata: response.metadata };
2400
+ return response;
2490
2401
  }
2491
2402
 
2492
2403
  async getFeedVisibility(request: {
@@ -2496,13 +2407,17 @@ export class FeedsApi {
2496
2407
  name: request?.name,
2497
2408
  };
2498
2409
 
2499
- const response = await this.apiClient.sendRequest<
2500
- StreamResponse<GetFeedVisibilityResponse>
2501
- >('GET', '/api/v2/feeds/feed_visibilities/{name}', pathParams, undefined);
2410
+ const response =
2411
+ await this.apiClient.sendRequest<GetFeedVisibilityResponse>(
2412
+ 'GET',
2413
+ '/api/v2/feeds/feed_visibilities/{name}',
2414
+ pathParams,
2415
+ undefined,
2416
+ );
2502
2417
 
2503
- decoders['GetFeedVisibilityResponse']?.(response.body);
2418
+ decoders['GetFeedVisibilityResponse']?.(response);
2504
2419
 
2505
- return { ...response.body, metadata: response.metadata };
2420
+ return response;
2506
2421
  }
2507
2422
 
2508
2423
  async updateFeedVisibility(
@@ -2515,20 +2430,18 @@ export class FeedsApi {
2515
2430
  grants: request?.grants,
2516
2431
  };
2517
2432
 
2518
- const response = await this.apiClient.sendRequest<
2519
- StreamResponse<UpdateFeedVisibilityResponse>
2520
- >(
2521
- 'PUT',
2522
- '/api/v2/feeds/feed_visibilities/{name}',
2523
- pathParams,
2524
- undefined,
2525
- body,
2526
- 'application/json',
2527
- );
2433
+ const response =
2434
+ await this.apiClient.sendRequest<UpdateFeedVisibilityResponse>(
2435
+ 'PUT',
2436
+ '/api/v2/feeds/feed_visibilities/{name}',
2437
+ pathParams,
2438
+ undefined,
2439
+ body,
2440
+ );
2528
2441
 
2529
- decoders['UpdateFeedVisibilityResponse']?.(response.body);
2442
+ decoders['UpdateFeedVisibilityResponse']?.(response);
2530
2443
 
2531
- return { ...response.body, metadata: response.metadata };
2444
+ return response;
2532
2445
  }
2533
2446
 
2534
2447
  async createFeedsBatch(
@@ -2540,20 +2453,17 @@ export class FeedsApi {
2540
2453
  enrich_own_fields: request?.enrich_own_fields,
2541
2454
  };
2542
2455
 
2543
- const response = await this.apiClient.sendRequest<
2544
- StreamResponse<CreateFeedsBatchResponse>
2545
- >(
2456
+ const response = await this.apiClient.sendRequest<CreateFeedsBatchResponse>(
2546
2457
  'POST',
2547
2458
  '/api/v2/feeds/feeds/batch',
2548
2459
  undefined,
2549
2460
  undefined,
2550
2461
  body,
2551
- 'application/json',
2552
2462
  );
2553
2463
 
2554
- decoders['CreateFeedsBatchResponse']?.(response.body);
2464
+ decoders['CreateFeedsBatchResponse']?.(response);
2555
2465
 
2556
- return { ...response.body, metadata: response.metadata };
2466
+ return response;
2557
2467
  }
2558
2468
 
2559
2469
  async deleteFeedsBatch(
@@ -2565,20 +2475,17 @@ export class FeedsApi {
2565
2475
  purge_user_activities: request?.purge_user_activities,
2566
2476
  };
2567
2477
 
2568
- const response = await this.apiClient.sendRequest<
2569
- StreamResponse<DeleteFeedsBatchResponse>
2570
- >(
2478
+ const response = await this.apiClient.sendRequest<DeleteFeedsBatchResponse>(
2571
2479
  'POST',
2572
2480
  '/api/v2/feeds/feeds/delete',
2573
2481
  undefined,
2574
2482
  undefined,
2575
2483
  body,
2576
- 'application/json',
2577
2484
  );
2578
2485
 
2579
- decoders['DeleteFeedsBatchResponse']?.(response.body);
2486
+ decoders['DeleteFeedsBatchResponse']?.(response);
2580
2487
 
2581
- return { ...response.body, metadata: response.metadata };
2488
+ return response;
2582
2489
  }
2583
2490
 
2584
2491
  async ownBatch(
@@ -2591,20 +2498,17 @@ export class FeedsApi {
2591
2498
  user: request?.user,
2592
2499
  };
2593
2500
 
2594
- const response = await this.apiClient.sendRequest<
2595
- StreamResponse<OwnBatchResponse>
2596
- >(
2501
+ const response = await this.apiClient.sendRequest<OwnBatchResponse>(
2597
2502
  'POST',
2598
2503
  '/api/v2/feeds/feeds/own/batch',
2599
2504
  undefined,
2600
2505
  undefined,
2601
2506
  body,
2602
- 'application/json',
2603
2507
  );
2604
2508
 
2605
- decoders['OwnBatchResponse']?.(response.body);
2509
+ decoders['OwnBatchResponse']?.(response);
2606
2510
 
2607
- return { ...response.body, metadata: response.metadata };
2511
+ return response;
2608
2512
  }
2609
2513
 
2610
2514
  protected async _queryFeeds(
@@ -2620,20 +2524,17 @@ export class FeedsApi {
2620
2524
  filter: request?.filter,
2621
2525
  };
2622
2526
 
2623
- const response = await this.apiClient.sendRequest<
2624
- StreamResponse<QueryFeedsResponse>
2625
- >(
2527
+ const response = await this.apiClient.sendRequest<QueryFeedsResponse>(
2626
2528
  'POST',
2627
2529
  '/api/v2/feeds/feeds/query',
2628
2530
  undefined,
2629
2531
  undefined,
2630
2532
  body,
2631
- 'application/json',
2632
2533
  );
2633
2534
 
2634
- decoders['QueryFeedsResponse']?.(response.body);
2535
+ decoders['QueryFeedsResponse']?.(response);
2635
2536
 
2636
- return { ...response.body, metadata: response.metadata };
2537
+ return response;
2637
2538
  }
2638
2539
 
2639
2540
  async getFeedsRateLimits(request?: {
@@ -2657,13 +2558,17 @@ export class FeedsApi {
2657
2558
  server_side: request?.server_side,
2658
2559
  };
2659
2560
 
2660
- const response = await this.apiClient.sendRequest<
2661
- StreamResponse<GetFeedsRateLimitsResponse>
2662
- >('GET', '/api/v2/feeds/feeds/rate_limits', undefined, queryParams);
2561
+ const response =
2562
+ await this.apiClient.sendRequest<GetFeedsRateLimitsResponse>(
2563
+ 'GET',
2564
+ '/api/v2/feeds/feeds/rate_limits',
2565
+ undefined,
2566
+ queryParams,
2567
+ );
2663
2568
 
2664
- decoders['GetFeedsRateLimitsResponse']?.(response.body);
2569
+ decoders['GetFeedsRateLimitsResponse']?.(response);
2665
2570
 
2666
- return { ...response.body, metadata: response.metadata };
2571
+ return response;
2667
2572
  }
2668
2573
 
2669
2574
  async updateFollow(
@@ -2684,20 +2589,17 @@ export class FeedsApi {
2684
2589
  custom: request?.custom,
2685
2590
  };
2686
2591
 
2687
- const response = await this.apiClient.sendRequest<
2688
- StreamResponse<UpdateFollowResponse>
2689
- >(
2592
+ const response = await this.apiClient.sendRequest<UpdateFollowResponse>(
2690
2593
  'PATCH',
2691
2594
  '/api/v2/feeds/follows',
2692
2595
  undefined,
2693
2596
  undefined,
2694
2597
  body,
2695
- 'application/json',
2696
2598
  );
2697
2599
 
2698
- decoders['UpdateFollowResponse']?.(response.body);
2600
+ decoders['UpdateFollowResponse']?.(response);
2699
2601
 
2700
- return { ...response.body, metadata: response.metadata };
2602
+ return response;
2701
2603
  }
2702
2604
 
2703
2605
  async follow(
@@ -2717,20 +2619,17 @@ export class FeedsApi {
2717
2619
  custom: request?.custom,
2718
2620
  };
2719
2621
 
2720
- const response = await this.apiClient.sendRequest<
2721
- StreamResponse<SingleFollowResponse>
2722
- >(
2622
+ const response = await this.apiClient.sendRequest<SingleFollowResponse>(
2723
2623
  'POST',
2724
2624
  '/api/v2/feeds/follows',
2725
2625
  undefined,
2726
2626
  undefined,
2727
2627
  body,
2728
- 'application/json',
2729
2628
  );
2730
2629
 
2731
- decoders['SingleFollowResponse']?.(response.body);
2630
+ decoders['SingleFollowResponse']?.(response);
2732
2631
 
2733
- return { ...response.body, metadata: response.metadata };
2632
+ return response;
2734
2633
  }
2735
2634
 
2736
2635
  async acceptFollow(
@@ -2742,20 +2641,17 @@ export class FeedsApi {
2742
2641
  follower_role: request?.follower_role,
2743
2642
  };
2744
2643
 
2745
- const response = await this.apiClient.sendRequest<
2746
- StreamResponse<AcceptFollowResponse>
2747
- >(
2644
+ const response = await this.apiClient.sendRequest<AcceptFollowResponse>(
2748
2645
  'POST',
2749
2646
  '/api/v2/feeds/follows/accept',
2750
2647
  undefined,
2751
2648
  undefined,
2752
2649
  body,
2753
- 'application/json',
2754
2650
  );
2755
2651
 
2756
- decoders['AcceptFollowResponse']?.(response.body);
2652
+ decoders['AcceptFollowResponse']?.(response);
2757
2653
 
2758
- return { ...response.body, metadata: response.metadata };
2654
+ return response;
2759
2655
  }
2760
2656
 
2761
2657
  async followBatch(
@@ -2767,20 +2663,17 @@ export class FeedsApi {
2767
2663
  enrich_own_fields: request?.enrich_own_fields,
2768
2664
  };
2769
2665
 
2770
- const response = await this.apiClient.sendRequest<
2771
- StreamResponse<FollowBatchResponse>
2772
- >(
2666
+ const response = await this.apiClient.sendRequest<FollowBatchResponse>(
2773
2667
  'POST',
2774
2668
  '/api/v2/feeds/follows/batch',
2775
2669
  undefined,
2776
2670
  undefined,
2777
2671
  body,
2778
- 'application/json',
2779
2672
  );
2780
2673
 
2781
- decoders['FollowBatchResponse']?.(response.body);
2674
+ decoders['FollowBatchResponse']?.(response);
2782
2675
 
2783
- return { ...response.body, metadata: response.metadata };
2676
+ return response;
2784
2677
  }
2785
2678
 
2786
2679
  async getOrCreateFollows(
@@ -2792,20 +2685,17 @@ export class FeedsApi {
2792
2685
  enrich_own_fields: request?.enrich_own_fields,
2793
2686
  };
2794
2687
 
2795
- const response = await this.apiClient.sendRequest<
2796
- StreamResponse<FollowBatchResponse>
2797
- >(
2688
+ const response = await this.apiClient.sendRequest<FollowBatchResponse>(
2798
2689
  'POST',
2799
2690
  '/api/v2/feeds/follows/batch/upsert',
2800
2691
  undefined,
2801
2692
  undefined,
2802
2693
  body,
2803
- 'application/json',
2804
2694
  );
2805
2695
 
2806
- decoders['FollowBatchResponse']?.(response.body);
2696
+ decoders['FollowBatchResponse']?.(response);
2807
2697
 
2808
- return { ...response.body, metadata: response.metadata };
2698
+ return response;
2809
2699
  }
2810
2700
 
2811
2701
  async queryFollows(
@@ -2819,20 +2709,17 @@ export class FeedsApi {
2819
2709
  filter: request?.filter,
2820
2710
  };
2821
2711
 
2822
- const response = await this.apiClient.sendRequest<
2823
- StreamResponse<QueryFollowsResponse>
2824
- >(
2712
+ const response = await this.apiClient.sendRequest<QueryFollowsResponse>(
2825
2713
  'POST',
2826
2714
  '/api/v2/feeds/follows/query',
2827
2715
  undefined,
2828
2716
  undefined,
2829
2717
  body,
2830
- 'application/json',
2831
2718
  );
2832
2719
 
2833
- decoders['QueryFollowsResponse']?.(response.body);
2720
+ decoders['QueryFollowsResponse']?.(response);
2834
2721
 
2835
- return { ...response.body, metadata: response.metadata };
2722
+ return response;
2836
2723
  }
2837
2724
 
2838
2725
  async rejectFollow(
@@ -2843,20 +2730,17 @@ export class FeedsApi {
2843
2730
  target: request?.target,
2844
2731
  };
2845
2732
 
2846
- const response = await this.apiClient.sendRequest<
2847
- StreamResponse<RejectFollowResponse>
2848
- >(
2733
+ const response = await this.apiClient.sendRequest<RejectFollowResponse>(
2849
2734
  'POST',
2850
2735
  '/api/v2/feeds/follows/reject',
2851
2736
  undefined,
2852
2737
  undefined,
2853
2738
  body,
2854
- 'application/json',
2855
2739
  );
2856
2740
 
2857
- decoders['RejectFollowResponse']?.(response.body);
2741
+ decoders['RejectFollowResponse']?.(response);
2858
2742
 
2859
- return { ...response.body, metadata: response.metadata };
2743
+ return response;
2860
2744
  }
2861
2745
 
2862
2746
  async getOrCreateFollow(
@@ -2876,20 +2760,18 @@ export class FeedsApi {
2876
2760
  custom: request?.custom,
2877
2761
  };
2878
2762
 
2879
- const response = await this.apiClient.sendRequest<
2880
- StreamResponse<GetOrCreateFollowResponse>
2881
- >(
2882
- 'POST',
2883
- '/api/v2/feeds/follows/upsert',
2884
- undefined,
2885
- undefined,
2886
- body,
2887
- 'application/json',
2888
- );
2763
+ const response =
2764
+ await this.apiClient.sendRequest<GetOrCreateFollowResponse>(
2765
+ 'POST',
2766
+ '/api/v2/feeds/follows/upsert',
2767
+ undefined,
2768
+ undefined,
2769
+ body,
2770
+ );
2889
2771
 
2890
- decoders['GetOrCreateFollowResponse']?.(response.body);
2772
+ decoders['GetOrCreateFollowResponse']?.(response);
2891
2773
 
2892
- return { ...response.body, metadata: response.metadata };
2774
+ return response;
2893
2775
  }
2894
2776
 
2895
2777
  async unfollow(request: {
@@ -2909,18 +2791,16 @@ export class FeedsApi {
2909
2791
  target: request?.target,
2910
2792
  };
2911
2793
 
2912
- const response = await this.apiClient.sendRequest<
2913
- StreamResponse<UnfollowResponse>
2914
- >(
2794
+ const response = await this.apiClient.sendRequest<UnfollowResponse>(
2915
2795
  'DELETE',
2916
2796
  '/api/v2/feeds/follows/{source}/{target}',
2917
2797
  pathParams,
2918
2798
  queryParams,
2919
2799
  );
2920
2800
 
2921
- decoders['UnfollowResponse']?.(response.body);
2801
+ decoders['UnfollowResponse']?.(response);
2922
2802
 
2923
- return { ...response.body, metadata: response.metadata };
2803
+ return response;
2924
2804
  }
2925
2805
 
2926
2806
  async createMembershipLevel(
@@ -2935,20 +2815,18 @@ export class FeedsApi {
2935
2815
  custom: request?.custom,
2936
2816
  };
2937
2817
 
2938
- const response = await this.apiClient.sendRequest<
2939
- StreamResponse<CreateMembershipLevelResponse>
2940
- >(
2941
- 'POST',
2942
- '/api/v2/feeds/membership_levels',
2943
- undefined,
2944
- undefined,
2945
- body,
2946
- 'application/json',
2947
- );
2818
+ const response =
2819
+ await this.apiClient.sendRequest<CreateMembershipLevelResponse>(
2820
+ 'POST',
2821
+ '/api/v2/feeds/membership_levels',
2822
+ undefined,
2823
+ undefined,
2824
+ body,
2825
+ );
2948
2826
 
2949
- decoders['CreateMembershipLevelResponse']?.(response.body);
2827
+ decoders['CreateMembershipLevelResponse']?.(response);
2950
2828
 
2951
- return { ...response.body, metadata: response.metadata };
2829
+ return response;
2952
2830
  }
2953
2831
 
2954
2832
  async queryMembershipLevels(
@@ -2962,20 +2840,18 @@ export class FeedsApi {
2962
2840
  filter: request?.filter,
2963
2841
  };
2964
2842
 
2965
- const response = await this.apiClient.sendRequest<
2966
- StreamResponse<QueryMembershipLevelsResponse>
2967
- >(
2968
- 'POST',
2969
- '/api/v2/feeds/membership_levels/query',
2970
- undefined,
2971
- undefined,
2972
- body,
2973
- 'application/json',
2974
- );
2843
+ const response =
2844
+ await this.apiClient.sendRequest<QueryMembershipLevelsResponse>(
2845
+ 'POST',
2846
+ '/api/v2/feeds/membership_levels/query',
2847
+ undefined,
2848
+ undefined,
2849
+ body,
2850
+ );
2975
2851
 
2976
- decoders['QueryMembershipLevelsResponse']?.(response.body);
2852
+ decoders['QueryMembershipLevelsResponse']?.(response);
2977
2853
 
2978
- return { ...response.body, metadata: response.metadata };
2854
+ return response;
2979
2855
  }
2980
2856
 
2981
2857
  async deleteMembershipLevel(request: {
@@ -2985,16 +2861,16 @@ export class FeedsApi {
2985
2861
  id: request?.id,
2986
2862
  };
2987
2863
 
2988
- const response = await this.apiClient.sendRequest<StreamResponse<Response>>(
2864
+ const response = await this.apiClient.sendRequest<Response>(
2989
2865
  'DELETE',
2990
2866
  '/api/v2/feeds/membership_levels/{id}',
2991
2867
  pathParams,
2992
2868
  undefined,
2993
2869
  );
2994
2870
 
2995
- decoders['Response']?.(response.body);
2871
+ decoders['Response']?.(response);
2996
2872
 
2997
- return { ...response.body, metadata: response.metadata };
2873
+ return response;
2998
2874
  }
2999
2875
 
3000
2876
  async updateMembershipLevel(
@@ -3011,20 +2887,103 @@ export class FeedsApi {
3011
2887
  custom: request?.custom,
3012
2888
  };
3013
2889
 
3014
- const response = await this.apiClient.sendRequest<
3015
- StreamResponse<UpdateMembershipLevelResponse>
3016
- >(
3017
- 'PATCH',
3018
- '/api/v2/feeds/membership_levels/{id}',
3019
- pathParams,
3020
- undefined,
3021
- body,
3022
- 'application/json',
3023
- );
2890
+ const response =
2891
+ await this.apiClient.sendRequest<UpdateMembershipLevelResponse>(
2892
+ 'PATCH',
2893
+ '/api/v2/feeds/membership_levels/{id}',
2894
+ pathParams,
2895
+ undefined,
2896
+ body,
2897
+ );
2898
+
2899
+ decoders['UpdateMembershipLevelResponse']?.(response);
2900
+
2901
+ return response;
2902
+ }
2903
+
2904
+ async feedsGetRetentionPolicy(): Promise<
2905
+ StreamResponse<GetFeedsRetentionPolicyResponse>
2906
+ > {
2907
+ const response =
2908
+ await this.apiClient.sendRequest<GetFeedsRetentionPolicyResponse>(
2909
+ 'GET',
2910
+ '/api/v2/feeds/retention_policy',
2911
+ undefined,
2912
+ undefined,
2913
+ );
2914
+
2915
+ decoders['GetFeedsRetentionPolicyResponse']?.(response);
2916
+
2917
+ return response;
2918
+ }
2919
+
2920
+ async feedsSetRetentionPolicy(
2921
+ request: SetFeedsRetentionPolicyRequest,
2922
+ ): Promise<StreamResponse<SetFeedsRetentionPolicyResponse>> {
2923
+ const body = {
2924
+ max_age_hours: request?.max_age_hours,
2925
+ policy: request?.policy,
2926
+ enabled: request?.enabled,
2927
+ };
2928
+
2929
+ const response =
2930
+ await this.apiClient.sendRequest<SetFeedsRetentionPolicyResponse>(
2931
+ 'POST',
2932
+ '/api/v2/feeds/retention_policy',
2933
+ undefined,
2934
+ undefined,
2935
+ body,
2936
+ );
2937
+
2938
+ decoders['SetFeedsRetentionPolicyResponse']?.(response);
2939
+
2940
+ return response;
2941
+ }
2942
+
2943
+ async feedsDeleteRetentionPolicy(
2944
+ request: DeleteFeedsRetentionPolicyRequest,
2945
+ ): Promise<StreamResponse<DeleteFeedsRetentionPolicyResponse>> {
2946
+ const body = {
2947
+ policy: request?.policy,
2948
+ };
2949
+
2950
+ const response =
2951
+ await this.apiClient.sendRequest<DeleteFeedsRetentionPolicyResponse>(
2952
+ 'POST',
2953
+ '/api/v2/feeds/retention_policy/delete',
2954
+ undefined,
2955
+ undefined,
2956
+ body,
2957
+ );
2958
+
2959
+ decoders['DeleteFeedsRetentionPolicyResponse']?.(response);
2960
+
2961
+ return response;
2962
+ }
2963
+
2964
+ async feedsGetRetentionPolicyRuns(
2965
+ request?: GetFeedsRetentionPolicyRunsRequest,
2966
+ ): Promise<StreamResponse<GetFeedsRetentionPolicyRunsResponse>> {
2967
+ const body = {
2968
+ limit: request?.limit,
2969
+ next: request?.next,
2970
+ prev: request?.prev,
2971
+ sort: request?.sort,
2972
+ filter_conditions: request?.filter_conditions,
2973
+ };
3024
2974
 
3025
- decoders['UpdateMembershipLevelResponse']?.(response.body);
2975
+ const response =
2976
+ await this.apiClient.sendRequest<GetFeedsRetentionPolicyRunsResponse>(
2977
+ 'POST',
2978
+ '/api/v2/feeds/retention_policy/runs',
2979
+ undefined,
2980
+ undefined,
2981
+ body,
2982
+ );
3026
2983
 
3027
- return { ...response.body, metadata: response.metadata };
2984
+ decoders['GetFeedsRetentionPolicyRunsResponse']?.(response);
2985
+
2986
+ return response;
3028
2987
  }
3029
2988
 
3030
2989
  async queryRevisionHistory(
@@ -3038,20 +2997,18 @@ export class FeedsApi {
3038
2997
  sort: request?.sort,
3039
2998
  };
3040
2999
 
3041
- const response = await this.apiClient.sendRequest<
3042
- StreamResponse<QueryRevisionHistoryResponse>
3043
- >(
3044
- 'POST',
3045
- '/api/v2/feeds/revisions/query',
3046
- undefined,
3047
- undefined,
3048
- body,
3049
- 'application/json',
3050
- );
3000
+ const response =
3001
+ await this.apiClient.sendRequest<QueryRevisionHistoryResponse>(
3002
+ 'POST',
3003
+ '/api/v2/feeds/revisions/query',
3004
+ undefined,
3005
+ undefined,
3006
+ body,
3007
+ );
3051
3008
 
3052
- decoders['QueryRevisionHistoryResponse']?.(response.body);
3009
+ decoders['QueryRevisionHistoryResponse']?.(response);
3053
3010
 
3054
- return { ...response.body, metadata: response.metadata };
3011
+ return response;
3055
3012
  }
3056
3013
 
3057
3014
  async queryFeedsUsageStats(
@@ -3062,20 +3019,18 @@ export class FeedsApi {
3062
3019
  to: request?.to,
3063
3020
  };
3064
3021
 
3065
- const response = await this.apiClient.sendRequest<
3066
- StreamResponse<QueryFeedsUsageStatsResponse>
3067
- >(
3068
- 'POST',
3069
- '/api/v2/feeds/stats/usage',
3070
- undefined,
3071
- undefined,
3072
- body,
3073
- 'application/json',
3074
- );
3022
+ const response =
3023
+ await this.apiClient.sendRequest<QueryFeedsUsageStatsResponse>(
3024
+ 'POST',
3025
+ '/api/v2/feeds/stats/usage',
3026
+ undefined,
3027
+ undefined,
3028
+ body,
3029
+ );
3075
3030
 
3076
- decoders['QueryFeedsUsageStatsResponse']?.(response.body);
3031
+ decoders['QueryFeedsUsageStatsResponse']?.(response);
3077
3032
 
3078
- return { ...response.body, metadata: response.metadata };
3033
+ return response;
3079
3034
  }
3080
3035
 
3081
3036
  async unfollowBatch(
@@ -3087,20 +3042,17 @@ export class FeedsApi {
3087
3042
  enrich_own_fields: request?.enrich_own_fields,
3088
3043
  };
3089
3044
 
3090
- const response = await this.apiClient.sendRequest<
3091
- StreamResponse<UnfollowBatchResponse>
3092
- >(
3045
+ const response = await this.apiClient.sendRequest<UnfollowBatchResponse>(
3093
3046
  'POST',
3094
3047
  '/api/v2/feeds/unfollow/batch',
3095
3048
  undefined,
3096
3049
  undefined,
3097
3050
  body,
3098
- 'application/json',
3099
3051
  );
3100
3052
 
3101
- decoders['UnfollowBatchResponse']?.(response.body);
3053
+ decoders['UnfollowBatchResponse']?.(response);
3102
3054
 
3103
- return { ...response.body, metadata: response.metadata };
3055
+ return response;
3104
3056
  }
3105
3057
 
3106
3058
  async getOrCreateUnfollows(
@@ -3112,20 +3064,17 @@ export class FeedsApi {
3112
3064
  enrich_own_fields: request?.enrich_own_fields,
3113
3065
  };
3114
3066
 
3115
- const response = await this.apiClient.sendRequest<
3116
- StreamResponse<UnfollowBatchResponse>
3117
- >(
3067
+ const response = await this.apiClient.sendRequest<UnfollowBatchResponse>(
3118
3068
  'POST',
3119
3069
  '/api/v2/feeds/unfollow/batch/upsert',
3120
3070
  undefined,
3121
3071
  undefined,
3122
3072
  body,
3123
- 'application/json',
3124
3073
  );
3125
3074
 
3126
- decoders['UnfollowBatchResponse']?.(response.body);
3075
+ decoders['UnfollowBatchResponse']?.(response);
3127
3076
 
3128
- return { ...response.body, metadata: response.metadata };
3077
+ return response;
3129
3078
  }
3130
3079
 
3131
3080
  async getOrCreateUnfollow(
@@ -3139,20 +3088,18 @@ export class FeedsApi {
3139
3088
  keep_history: request?.keep_history,
3140
3089
  };
3141
3090
 
3142
- const response = await this.apiClient.sendRequest<
3143
- StreamResponse<GetOrCreateUnfollowResponse>
3144
- >(
3145
- 'POST',
3146
- '/api/v2/feeds/unfollow/upsert',
3147
- undefined,
3148
- undefined,
3149
- body,
3150
- 'application/json',
3151
- );
3091
+ const response =
3092
+ await this.apiClient.sendRequest<GetOrCreateUnfollowResponse>(
3093
+ 'POST',
3094
+ '/api/v2/feeds/unfollow/upsert',
3095
+ undefined,
3096
+ undefined,
3097
+ body,
3098
+ );
3152
3099
 
3153
- decoders['GetOrCreateUnfollowResponse']?.(response.body);
3100
+ decoders['GetOrCreateUnfollowResponse']?.(response);
3154
3101
 
3155
- return { ...response.body, metadata: response.metadata };
3102
+ return response;
3156
3103
  }
3157
3104
 
3158
3105
  async deleteFeedUserData(
@@ -3165,20 +3112,18 @@ export class FeedsApi {
3165
3112
  hard_delete: request?.hard_delete,
3166
3113
  };
3167
3114
 
3168
- const response = await this.apiClient.sendRequest<
3169
- StreamResponse<DeleteFeedUserDataResponse>
3170
- >(
3171
- 'POST',
3172
- '/api/v2/feeds/users/{user_id}/delete',
3173
- pathParams,
3174
- undefined,
3175
- body,
3176
- 'application/json',
3177
- );
3115
+ const response =
3116
+ await this.apiClient.sendRequest<DeleteFeedUserDataResponse>(
3117
+ 'POST',
3118
+ '/api/v2/feeds/users/{user_id}/delete',
3119
+ pathParams,
3120
+ undefined,
3121
+ body,
3122
+ );
3178
3123
 
3179
- decoders['DeleteFeedUserDataResponse']?.(response.body);
3124
+ decoders['DeleteFeedUserDataResponse']?.(response);
3180
3125
 
3181
- return { ...response.body, metadata: response.metadata };
3126
+ return response;
3182
3127
  }
3183
3128
 
3184
3129
  async exportFeedUserData(request: {
@@ -3188,13 +3133,17 @@ export class FeedsApi {
3188
3133
  user_id: request?.user_id,
3189
3134
  };
3190
3135
 
3191
- const response = await this.apiClient.sendRequest<
3192
- StreamResponse<ExportFeedUserDataResponse>
3193
- >('POST', '/api/v2/feeds/users/{user_id}/export', pathParams, undefined);
3136
+ const response =
3137
+ await this.apiClient.sendRequest<ExportFeedUserDataResponse>(
3138
+ 'POST',
3139
+ '/api/v2/feeds/users/{user_id}/export',
3140
+ pathParams,
3141
+ undefined,
3142
+ );
3194
3143
 
3195
- decoders['ExportFeedUserDataResponse']?.(response.body);
3144
+ decoders['ExportFeedUserDataResponse']?.(response);
3196
3145
 
3197
- return { ...response.body, metadata: response.metadata };
3146
+ return response;
3198
3147
  }
3199
3148
 
3200
3149
  async deleteUserInterests(request: {
@@ -3208,18 +3157,17 @@ export class FeedsApi {
3208
3157
  user_id: request?.user_id,
3209
3158
  };
3210
3159
 
3211
- const response = await this.apiClient.sendRequest<
3212
- StreamResponse<DeleteUserInterestsResponse>
3213
- >(
3214
- 'DELETE',
3215
- '/api/v2/feeds/users/{user_id}/interests',
3216
- pathParams,
3217
- queryParams,
3218
- );
3160
+ const response =
3161
+ await this.apiClient.sendRequest<DeleteUserInterestsResponse>(
3162
+ 'DELETE',
3163
+ '/api/v2/feeds/users/{user_id}/interests',
3164
+ pathParams,
3165
+ queryParams,
3166
+ );
3219
3167
 
3220
- decoders['DeleteUserInterestsResponse']?.(response.body);
3168
+ decoders['DeleteUserInterestsResponse']?.(response);
3221
3169
 
3222
- return { ...response.body, metadata: response.metadata };
3170
+ return response;
3223
3171
  }
3224
3172
 
3225
3173
  async getUserInterests(request: {
@@ -3233,18 +3181,16 @@ export class FeedsApi {
3233
3181
  user_id: request?.user_id,
3234
3182
  };
3235
3183
 
3236
- const response = await this.apiClient.sendRequest<
3237
- StreamResponse<GetUserInterestsResponse>
3238
- >(
3184
+ const response = await this.apiClient.sendRequest<GetUserInterestsResponse>(
3239
3185
  'GET',
3240
3186
  '/api/v2/feeds/users/{user_id}/interests',
3241
3187
  pathParams,
3242
3188
  queryParams,
3243
3189
  );
3244
3190
 
3245
- decoders['GetUserInterestsResponse']?.(response.body);
3191
+ decoders['GetUserInterestsResponse']?.(response);
3246
3192
 
3247
- return { ...response.body, metadata: response.metadata };
3193
+ return response;
3248
3194
  }
3249
3195
 
3250
3196
  async upsertUserInterests(
@@ -3257,19 +3203,17 @@ export class FeedsApi {
3257
3203
  interests: request?.interests,
3258
3204
  };
3259
3205
 
3260
- const response = await this.apiClient.sendRequest<
3261
- StreamResponse<UpsertUserInterestsResponse>
3262
- >(
3263
- 'PUT',
3264
- '/api/v2/feeds/users/{user_id}/interests',
3265
- pathParams,
3266
- undefined,
3267
- body,
3268
- 'application/json',
3269
- );
3206
+ const response =
3207
+ await this.apiClient.sendRequest<UpsertUserInterestsResponse>(
3208
+ 'PUT',
3209
+ '/api/v2/feeds/users/{user_id}/interests',
3210
+ pathParams,
3211
+ undefined,
3212
+ body,
3213
+ );
3270
3214
 
3271
- decoders['UpsertUserInterestsResponse']?.(response.body);
3215
+ decoders['UpsertUserInterestsResponse']?.(response);
3272
3216
 
3273
- return { ...response.body, metadata: response.metadata };
3217
+ return response;
3274
3218
  }
3275
3219
  }