@stream-io/node-sdk 0.8.7 → 0.8.9

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(
@@ -1265,20 +1218,17 @@ export class FeedsApi {
1265
1218
  user: request?.user,
1266
1219
  };
1267
1220
 
1268
- const response = await this.apiClient.sendRequest<
1269
- StreamResponse<QueryCommentsResponse>
1270
- >(
1221
+ const response = await this.apiClient.sendRequest<QueryCommentsResponse>(
1271
1222
  'POST',
1272
1223
  '/api/v2/feeds/comments/query',
1273
1224
  undefined,
1274
1225
  queryParams,
1275
1226
  body,
1276
- 'application/json',
1277
1227
  );
1278
1228
 
1279
- decoders['QueryCommentsResponse']?.(response.body);
1229
+ decoders['QueryCommentsResponse']?.(response);
1280
1230
 
1281
- return { ...response.body, metadata: response.metadata };
1231
+ return response;
1282
1232
  }
1283
1233
 
1284
1234
  async batchQueryCommentReactions(
@@ -1295,20 +1245,18 @@ export class FeedsApi {
1295
1245
  user: request?.user,
1296
1246
  };
1297
1247
 
1298
- const response = await this.apiClient.sendRequest<
1299
- StreamResponse<BatchQueryCommentReactionsResponse>
1300
- >(
1301
- 'POST',
1302
- '/api/v2/feeds/comments/reactions/query',
1303
- undefined,
1304
- undefined,
1305
- body,
1306
- 'application/json',
1307
- );
1248
+ const response =
1249
+ await this.apiClient.sendRequest<BatchQueryCommentReactionsResponse>(
1250
+ 'POST',
1251
+ '/api/v2/feeds/comments/reactions/query',
1252
+ undefined,
1253
+ undefined,
1254
+ body,
1255
+ );
1308
1256
 
1309
- decoders['BatchQueryCommentReactionsResponse']?.(response.body);
1257
+ decoders['BatchQueryCommentReactionsResponse']?.(response);
1310
1258
 
1311
- return { ...response.body, metadata: response.metadata };
1259
+ return response;
1312
1260
  }
1313
1261
 
1314
1262
  async deleteCommentBookmark(request: {
@@ -1324,18 +1272,17 @@ export class FeedsApi {
1324
1272
  comment_id: request?.comment_id,
1325
1273
  };
1326
1274
 
1327
- const response = await this.apiClient.sendRequest<
1328
- StreamResponse<DeleteCommentBookmarkResponse>
1329
- >(
1330
- 'DELETE',
1331
- '/api/v2/feeds/comments/{comment_id}/bookmarks',
1332
- pathParams,
1333
- queryParams,
1334
- );
1275
+ const response =
1276
+ await this.apiClient.sendRequest<DeleteCommentBookmarkResponse>(
1277
+ 'DELETE',
1278
+ '/api/v2/feeds/comments/{comment_id}/bookmarks',
1279
+ pathParams,
1280
+ queryParams,
1281
+ );
1335
1282
 
1336
- decoders['DeleteCommentBookmarkResponse']?.(response.body);
1283
+ decoders['DeleteCommentBookmarkResponse']?.(response);
1337
1284
 
1338
- return { ...response.body, metadata: response.metadata };
1285
+ return response;
1339
1286
  }
1340
1287
 
1341
1288
  async updateCommentBookmark(
@@ -1353,20 +1300,18 @@ export class FeedsApi {
1353
1300
  user: request?.user,
1354
1301
  };
1355
1302
 
1356
- const response = await this.apiClient.sendRequest<
1357
- StreamResponse<UpdateCommentBookmarkResponse>
1358
- >(
1359
- 'PATCH',
1360
- '/api/v2/feeds/comments/{comment_id}/bookmarks',
1361
- pathParams,
1362
- undefined,
1363
- body,
1364
- 'application/json',
1365
- );
1303
+ const response =
1304
+ await this.apiClient.sendRequest<UpdateCommentBookmarkResponse>(
1305
+ 'PATCH',
1306
+ '/api/v2/feeds/comments/{comment_id}/bookmarks',
1307
+ pathParams,
1308
+ undefined,
1309
+ body,
1310
+ );
1366
1311
 
1367
- decoders['UpdateCommentBookmarkResponse']?.(response.body);
1312
+ decoders['UpdateCommentBookmarkResponse']?.(response);
1368
1313
 
1369
- return { ...response.body, metadata: response.metadata };
1314
+ return response;
1370
1315
  }
1371
1316
 
1372
1317
  async addCommentBookmark(
@@ -1383,20 +1328,18 @@ export class FeedsApi {
1383
1328
  user: request?.user,
1384
1329
  };
1385
1330
 
1386
- const response = await this.apiClient.sendRequest<
1387
- StreamResponse<AddCommentBookmarkResponse>
1388
- >(
1389
- 'POST',
1390
- '/api/v2/feeds/comments/{comment_id}/bookmarks',
1391
- pathParams,
1392
- undefined,
1393
- body,
1394
- 'application/json',
1395
- );
1331
+ const response =
1332
+ await this.apiClient.sendRequest<AddCommentBookmarkResponse>(
1333
+ 'POST',
1334
+ '/api/v2/feeds/comments/{comment_id}/bookmarks',
1335
+ pathParams,
1336
+ undefined,
1337
+ body,
1338
+ );
1396
1339
 
1397
- decoders['AddCommentBookmarkResponse']?.(response.body);
1340
+ decoders['AddCommentBookmarkResponse']?.(response);
1398
1341
 
1399
- return { ...response.body, metadata: response.metadata };
1342
+ return response;
1400
1343
  }
1401
1344
 
1402
1345
  async deleteComment(request: {
@@ -1412,13 +1355,16 @@ export class FeedsApi {
1412
1355
  id: request?.id,
1413
1356
  };
1414
1357
 
1415
- const response = await this.apiClient.sendRequest<
1416
- StreamResponse<DeleteCommentResponse>
1417
- >('DELETE', '/api/v2/feeds/comments/{id}', pathParams, queryParams);
1358
+ const response = await this.apiClient.sendRequest<DeleteCommentResponse>(
1359
+ 'DELETE',
1360
+ '/api/v2/feeds/comments/{id}',
1361
+ pathParams,
1362
+ queryParams,
1363
+ );
1418
1364
 
1419
- decoders['DeleteCommentResponse']?.(response.body);
1365
+ decoders['DeleteCommentResponse']?.(response);
1420
1366
 
1421
- return { ...response.body, metadata: response.metadata };
1367
+ return response;
1422
1368
  }
1423
1369
 
1424
1370
  async getComment(request: {
@@ -1436,13 +1382,16 @@ export class FeedsApi {
1436
1382
  id: request?.id,
1437
1383
  };
1438
1384
 
1439
- const response = await this.apiClient.sendRequest<
1440
- StreamResponse<GetCommentResponse>
1441
- >('GET', '/api/v2/feeds/comments/{id}', pathParams, queryParams);
1385
+ const response = await this.apiClient.sendRequest<GetCommentResponse>(
1386
+ 'GET',
1387
+ '/api/v2/feeds/comments/{id}',
1388
+ pathParams,
1389
+ queryParams,
1390
+ );
1442
1391
 
1443
- decoders['GetCommentResponse']?.(response.body);
1392
+ decoders['GetCommentResponse']?.(response);
1444
1393
 
1445
- return { ...response.body, metadata: response.metadata };
1394
+ return response;
1446
1395
  }
1447
1396
 
1448
1397
  async updateComment(
@@ -1465,20 +1414,17 @@ export class FeedsApi {
1465
1414
  user: request?.user,
1466
1415
  };
1467
1416
 
1468
- const response = await this.apiClient.sendRequest<
1469
- StreamResponse<UpdateCommentResponse>
1470
- >(
1417
+ const response = await this.apiClient.sendRequest<UpdateCommentResponse>(
1471
1418
  'PATCH',
1472
1419
  '/api/v2/feeds/comments/{id}',
1473
1420
  pathParams,
1474
1421
  undefined,
1475
1422
  body,
1476
- 'application/json',
1477
1423
  );
1478
1424
 
1479
- decoders['UpdateCommentResponse']?.(response.body);
1425
+ decoders['UpdateCommentResponse']?.(response);
1480
1426
 
1481
- return { ...response.body, metadata: response.metadata };
1427
+ return response;
1482
1428
  }
1483
1429
 
1484
1430
  async updateCommentPartial(
@@ -1499,20 +1445,18 @@ export class FeedsApi {
1499
1445
  user: request?.user,
1500
1446
  };
1501
1447
 
1502
- const response = await this.apiClient.sendRequest<
1503
- StreamResponse<UpdateCommentPartialResponse>
1504
- >(
1505
- 'POST',
1506
- '/api/v2/feeds/comments/{id}/partial',
1507
- pathParams,
1508
- undefined,
1509
- body,
1510
- 'application/json',
1511
- );
1448
+ const response =
1449
+ await this.apiClient.sendRequest<UpdateCommentPartialResponse>(
1450
+ 'POST',
1451
+ '/api/v2/feeds/comments/{id}/partial',
1452
+ pathParams,
1453
+ undefined,
1454
+ body,
1455
+ );
1512
1456
 
1513
- decoders['UpdateCommentPartialResponse']?.(response.body);
1457
+ decoders['UpdateCommentPartialResponse']?.(response);
1514
1458
 
1515
- return { ...response.body, metadata: response.metadata };
1459
+ return response;
1516
1460
  }
1517
1461
 
1518
1462
  async addCommentReaction(
@@ -1533,20 +1477,18 @@ export class FeedsApi {
1533
1477
  user: request?.user,
1534
1478
  };
1535
1479
 
1536
- const response = await this.apiClient.sendRequest<
1537
- StreamResponse<AddCommentReactionResponse>
1538
- >(
1539
- 'POST',
1540
- '/api/v2/feeds/comments/{id}/reactions',
1541
- pathParams,
1542
- undefined,
1543
- body,
1544
- 'application/json',
1545
- );
1480
+ const response =
1481
+ await this.apiClient.sendRequest<AddCommentReactionResponse>(
1482
+ 'POST',
1483
+ '/api/v2/feeds/comments/{id}/reactions',
1484
+ pathParams,
1485
+ undefined,
1486
+ body,
1487
+ );
1546
1488
 
1547
- decoders['AddCommentReactionResponse']?.(response.body);
1489
+ decoders['AddCommentReactionResponse']?.(response);
1548
1490
 
1549
- return { ...response.body, metadata: response.metadata };
1491
+ return response;
1550
1492
  }
1551
1493
 
1552
1494
  async queryCommentReactions(
@@ -1563,20 +1505,18 @@ export class FeedsApi {
1563
1505
  filter: request?.filter,
1564
1506
  };
1565
1507
 
1566
- const response = await this.apiClient.sendRequest<
1567
- StreamResponse<QueryCommentReactionsResponse>
1568
- >(
1569
- 'POST',
1570
- '/api/v2/feeds/comments/{id}/reactions/query',
1571
- pathParams,
1572
- undefined,
1573
- body,
1574
- 'application/json',
1575
- );
1508
+ const response =
1509
+ await this.apiClient.sendRequest<QueryCommentReactionsResponse>(
1510
+ 'POST',
1511
+ '/api/v2/feeds/comments/{id}/reactions/query',
1512
+ pathParams,
1513
+ undefined,
1514
+ body,
1515
+ );
1576
1516
 
1577
- decoders['QueryCommentReactionsResponse']?.(response.body);
1517
+ decoders['QueryCommentReactionsResponse']?.(response);
1578
1518
 
1579
- return { ...response.body, metadata: response.metadata };
1519
+ return response;
1580
1520
  }
1581
1521
 
1582
1522
  async deleteCommentReaction(request: {
@@ -1594,18 +1534,17 @@ export class FeedsApi {
1594
1534
  type: request?.type,
1595
1535
  };
1596
1536
 
1597
- const response = await this.apiClient.sendRequest<
1598
- StreamResponse<DeleteCommentReactionResponse>
1599
- >(
1600
- 'DELETE',
1601
- '/api/v2/feeds/comments/{id}/reactions/{type}',
1602
- pathParams,
1603
- queryParams,
1604
- );
1537
+ const response =
1538
+ await this.apiClient.sendRequest<DeleteCommentReactionResponse>(
1539
+ 'DELETE',
1540
+ '/api/v2/feeds/comments/{id}/reactions/{type}',
1541
+ pathParams,
1542
+ queryParams,
1543
+ );
1605
1544
 
1606
- decoders['DeleteCommentReactionResponse']?.(response.body);
1545
+ decoders['DeleteCommentReactionResponse']?.(response);
1607
1546
 
1608
- return { ...response.body, metadata: response.metadata };
1547
+ return response;
1609
1548
  }
1610
1549
 
1611
1550
  async getCommentReplies(request: {
@@ -1637,13 +1576,17 @@ export class FeedsApi {
1637
1576
  id: request?.id,
1638
1577
  };
1639
1578
 
1640
- const response = await this.apiClient.sendRequest<
1641
- StreamResponse<GetCommentRepliesResponse>
1642
- >('GET', '/api/v2/feeds/comments/{id}/replies', pathParams, queryParams);
1579
+ const response =
1580
+ await this.apiClient.sendRequest<GetCommentRepliesResponse>(
1581
+ 'GET',
1582
+ '/api/v2/feeds/comments/{id}/replies',
1583
+ pathParams,
1584
+ queryParams,
1585
+ );
1643
1586
 
1644
- decoders['GetCommentRepliesResponse']?.(response.body);
1587
+ decoders['GetCommentRepliesResponse']?.(response);
1645
1588
 
1646
- return { ...response.body, metadata: response.metadata };
1589
+ return response;
1647
1590
  }
1648
1591
 
1649
1592
  async restoreComment(
@@ -1657,20 +1600,17 @@ export class FeedsApi {
1657
1600
  user: request?.user,
1658
1601
  };
1659
1602
 
1660
- const response = await this.apiClient.sendRequest<
1661
- StreamResponse<RestoreCommentResponse>
1662
- >(
1603
+ const response = await this.apiClient.sendRequest<RestoreCommentResponse>(
1663
1604
  'POST',
1664
1605
  '/api/v2/feeds/comments/{id}/restore',
1665
1606
  pathParams,
1666
1607
  undefined,
1667
1608
  body,
1668
- 'application/json',
1669
1609
  );
1670
1610
 
1671
- decoders['RestoreCommentResponse']?.(response.body);
1611
+ decoders['RestoreCommentResponse']?.(response);
1672
1612
 
1673
- return { ...response.body, metadata: response.metadata };
1613
+ return response;
1674
1614
  }
1675
1615
 
1676
1616
  async translateComment(
@@ -1683,20 +1623,17 @@ export class FeedsApi {
1683
1623
  language: request?.language,
1684
1624
  };
1685
1625
 
1686
- const response = await this.apiClient.sendRequest<
1687
- StreamResponse<TranslateCommentResponse>
1688
- >(
1626
+ const response = await this.apiClient.sendRequest<TranslateCommentResponse>(
1689
1627
  'POST',
1690
1628
  '/api/v2/feeds/comments/{id}/translate',
1691
1629
  pathParams,
1692
1630
  undefined,
1693
1631
  body,
1694
- 'application/json',
1695
1632
  );
1696
1633
 
1697
- decoders['TranslateCommentResponse']?.(response.body);
1634
+ decoders['TranslateCommentResponse']?.(response);
1698
1635
 
1699
- return { ...response.body, metadata: response.metadata };
1636
+ return response;
1700
1637
  }
1701
1638
 
1702
1639
  async listFeedGroups(request?: {
@@ -1706,13 +1643,16 @@ export class FeedsApi {
1706
1643
  include_soft_deleted: request?.include_soft_deleted,
1707
1644
  };
1708
1645
 
1709
- const response = await this.apiClient.sendRequest<
1710
- StreamResponse<ListFeedGroupsResponse>
1711
- >('GET', '/api/v2/feeds/feed_groups', undefined, queryParams);
1646
+ const response = await this.apiClient.sendRequest<ListFeedGroupsResponse>(
1647
+ 'GET',
1648
+ '/api/v2/feeds/feed_groups',
1649
+ undefined,
1650
+ queryParams,
1651
+ );
1712
1652
 
1713
- decoders['ListFeedGroupsResponse']?.(response.body);
1653
+ decoders['ListFeedGroupsResponse']?.(response);
1714
1654
 
1715
- return { ...response.body, metadata: response.metadata };
1655
+ return response;
1716
1656
  }
1717
1657
 
1718
1658
  async createFeedGroup(
@@ -1735,20 +1675,17 @@ export class FeedsApi {
1735
1675
  stories: request?.stories,
1736
1676
  };
1737
1677
 
1738
- const response = await this.apiClient.sendRequest<
1739
- StreamResponse<CreateFeedGroupResponse>
1740
- >(
1678
+ const response = await this.apiClient.sendRequest<CreateFeedGroupResponse>(
1741
1679
  'POST',
1742
1680
  '/api/v2/feeds/feed_groups',
1743
1681
  undefined,
1744
1682
  undefined,
1745
1683
  body,
1746
- 'application/json',
1747
1684
  );
1748
1685
 
1749
- decoders['CreateFeedGroupResponse']?.(response.body);
1686
+ decoders['CreateFeedGroupResponse']?.(response);
1750
1687
 
1751
- return { ...response.body, metadata: response.metadata };
1688
+ return response;
1752
1689
  }
1753
1690
 
1754
1691
  async deleteFeed(request: {
@@ -1766,18 +1703,16 @@ export class FeedsApi {
1766
1703
  feed_id: request?.feed_id,
1767
1704
  };
1768
1705
 
1769
- const response = await this.apiClient.sendRequest<
1770
- StreamResponse<DeleteFeedResponse>
1771
- >(
1706
+ const response = await this.apiClient.sendRequest<DeleteFeedResponse>(
1772
1707
  'DELETE',
1773
1708
  '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}',
1774
1709
  pathParams,
1775
1710
  queryParams,
1776
1711
  );
1777
1712
 
1778
- decoders['DeleteFeedResponse']?.(response.body);
1713
+ decoders['DeleteFeedResponse']?.(response);
1779
1714
 
1780
- return { ...response.body, metadata: response.metadata };
1715
+ return response;
1781
1716
  }
1782
1717
 
1783
1718
  async getOrCreateFeed(
@@ -1817,20 +1752,17 @@ export class FeedsApi {
1817
1752
  user: request?.user,
1818
1753
  };
1819
1754
 
1820
- const response = await this.apiClient.sendRequest<
1821
- StreamResponse<GetOrCreateFeedResponse>
1822
- >(
1755
+ const response = await this.apiClient.sendRequest<GetOrCreateFeedResponse>(
1823
1756
  'POST',
1824
1757
  '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}',
1825
1758
  pathParams,
1826
1759
  queryParams,
1827
1760
  body,
1828
- 'application/json',
1829
1761
  );
1830
1762
 
1831
- decoders['GetOrCreateFeedResponse']?.(response.body);
1763
+ decoders['GetOrCreateFeedResponse']?.(response);
1832
1764
 
1833
- return { ...response.body, metadata: response.metadata };
1765
+ return response;
1834
1766
  }
1835
1767
 
1836
1768
  async updateFeed(
@@ -1851,20 +1783,17 @@ export class FeedsApi {
1851
1783
  location: request?.location,
1852
1784
  };
1853
1785
 
1854
- const response = await this.apiClient.sendRequest<
1855
- StreamResponse<UpdateFeedResponse>
1856
- >(
1786
+ const response = await this.apiClient.sendRequest<UpdateFeedResponse>(
1857
1787
  'PUT',
1858
1788
  '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}',
1859
1789
  pathParams,
1860
1790
  undefined,
1861
1791
  body,
1862
- 'application/json',
1863
1792
  );
1864
1793
 
1865
- decoders['UpdateFeedResponse']?.(response.body);
1794
+ decoders['UpdateFeedResponse']?.(response);
1866
1795
 
1867
- return { ...response.body, metadata: response.metadata };
1796
+ return response;
1868
1797
  }
1869
1798
 
1870
1799
  async markActivity(
@@ -1884,18 +1813,17 @@ export class FeedsApi {
1884
1813
  user: request?.user,
1885
1814
  };
1886
1815
 
1887
- const response = await this.apiClient.sendRequest<StreamResponse<Response>>(
1816
+ const response = await this.apiClient.sendRequest<Response>(
1888
1817
  'POST',
1889
1818
  '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/activities/mark/batch',
1890
1819
  pathParams,
1891
1820
  undefined,
1892
1821
  body,
1893
- 'application/json',
1894
1822
  );
1895
1823
 
1896
- decoders['Response']?.(response.body);
1824
+ decoders['Response']?.(response);
1897
1825
 
1898
- return { ...response.body, metadata: response.metadata };
1826
+ return response;
1899
1827
  }
1900
1828
 
1901
1829
  async unpinActivity(request: {
@@ -1915,18 +1843,16 @@ export class FeedsApi {
1915
1843
  activity_id: request?.activity_id,
1916
1844
  };
1917
1845
 
1918
- const response = await this.apiClient.sendRequest<
1919
- StreamResponse<UnpinActivityResponse>
1920
- >(
1846
+ const response = await this.apiClient.sendRequest<UnpinActivityResponse>(
1921
1847
  'DELETE',
1922
1848
  '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/activities/{activity_id}/pin',
1923
1849
  pathParams,
1924
1850
  queryParams,
1925
1851
  );
1926
1852
 
1927
- decoders['UnpinActivityResponse']?.(response.body);
1853
+ decoders['UnpinActivityResponse']?.(response);
1928
1854
 
1929
- return { ...response.body, metadata: response.metadata };
1855
+ return response;
1930
1856
  }
1931
1857
 
1932
1858
  async pinActivity(
@@ -1947,20 +1873,17 @@ export class FeedsApi {
1947
1873
  user: request?.user,
1948
1874
  };
1949
1875
 
1950
- const response = await this.apiClient.sendRequest<
1951
- StreamResponse<PinActivityResponse>
1952
- >(
1876
+ const response = await this.apiClient.sendRequest<PinActivityResponse>(
1953
1877
  'POST',
1954
1878
  '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/activities/{activity_id}/pin',
1955
1879
  pathParams,
1956
1880
  undefined,
1957
1881
  body,
1958
- 'application/json',
1959
1882
  );
1960
1883
 
1961
- decoders['PinActivityResponse']?.(response.body);
1884
+ decoders['PinActivityResponse']?.(response);
1962
1885
 
1963
- return { ...response.body, metadata: response.metadata };
1886
+ return response;
1964
1887
  }
1965
1888
 
1966
1889
  async changeFeedVisibility(
@@ -1978,20 +1901,18 @@ export class FeedsApi {
1978
1901
  pending_follows_action: request?.pending_follows_action,
1979
1902
  };
1980
1903
 
1981
- const response = await this.apiClient.sendRequest<
1982
- StreamResponse<ChangeFeedVisibilityResponse>
1983
- >(
1984
- 'POST',
1985
- '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/change_visibility',
1986
- pathParams,
1987
- undefined,
1988
- body,
1989
- 'application/json',
1990
- );
1904
+ const response =
1905
+ await this.apiClient.sendRequest<ChangeFeedVisibilityResponse>(
1906
+ 'POST',
1907
+ '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/change_visibility',
1908
+ pathParams,
1909
+ undefined,
1910
+ body,
1911
+ );
1991
1912
 
1992
- decoders['ChangeFeedVisibilityResponse']?.(response.body);
1913
+ decoders['ChangeFeedVisibilityResponse']?.(response);
1993
1914
 
1994
- return { ...response.body, metadata: response.metadata };
1915
+ return response;
1995
1916
  }
1996
1917
 
1997
1918
  async getFeedCounts(request: {
@@ -2003,18 +1924,16 @@ export class FeedsApi {
2003
1924
  feed_id: request?.feed_id,
2004
1925
  };
2005
1926
 
2006
- const response = await this.apiClient.sendRequest<
2007
- StreamResponse<GetFeedCountsResponse>
2008
- >(
1927
+ const response = await this.apiClient.sendRequest<GetFeedCountsResponse>(
2009
1928
  'GET',
2010
1929
  '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/counts',
2011
1930
  pathParams,
2012
1931
  undefined,
2013
1932
  );
2014
1933
 
2015
- decoders['GetFeedCountsResponse']?.(response.body);
1934
+ decoders['GetFeedCountsResponse']?.(response);
2016
1935
 
2017
- return { ...response.body, metadata: response.metadata };
1936
+ return response;
2018
1937
  }
2019
1938
 
2020
1939
  async updateFeedMembers(
@@ -2035,20 +1954,18 @@ export class FeedsApi {
2035
1954
  members: request?.members,
2036
1955
  };
2037
1956
 
2038
- const response = await this.apiClient.sendRequest<
2039
- StreamResponse<UpdateFeedMembersResponse>
2040
- >(
2041
- 'PATCH',
2042
- '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/members',
2043
- pathParams,
2044
- undefined,
2045
- body,
2046
- 'application/json',
2047
- );
1957
+ const response =
1958
+ await this.apiClient.sendRequest<UpdateFeedMembersResponse>(
1959
+ 'PATCH',
1960
+ '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/members',
1961
+ pathParams,
1962
+ undefined,
1963
+ body,
1964
+ );
2048
1965
 
2049
- decoders['UpdateFeedMembersResponse']?.(response.body);
1966
+ decoders['UpdateFeedMembersResponse']?.(response);
2050
1967
 
2051
- return { ...response.body, metadata: response.metadata };
1968
+ return response;
2052
1969
  }
2053
1970
 
2054
1971
  async acceptFeedMemberInvite(
@@ -2066,20 +1983,18 @@ export class FeedsApi {
2066
1983
  user: request?.user,
2067
1984
  };
2068
1985
 
2069
- const response = await this.apiClient.sendRequest<
2070
- StreamResponse<AcceptFeedMemberInviteResponse>
2071
- >(
2072
- 'POST',
2073
- '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/members/accept',
2074
- pathParams,
2075
- undefined,
2076
- body,
2077
- 'application/json',
2078
- );
1986
+ const response =
1987
+ await this.apiClient.sendRequest<AcceptFeedMemberInviteResponse>(
1988
+ 'POST',
1989
+ '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/members/accept',
1990
+ pathParams,
1991
+ undefined,
1992
+ body,
1993
+ );
2079
1994
 
2080
- decoders['AcceptFeedMemberInviteResponse']?.(response.body);
1995
+ decoders['AcceptFeedMemberInviteResponse']?.(response);
2081
1996
 
2082
- return { ...response.body, metadata: response.metadata };
1997
+ return response;
2083
1998
  }
2084
1999
 
2085
2000
  async queryFeedMembers(
@@ -2100,20 +2015,17 @@ export class FeedsApi {
2100
2015
  filter: request?.filter,
2101
2016
  };
2102
2017
 
2103
- const response = await this.apiClient.sendRequest<
2104
- StreamResponse<QueryFeedMembersResponse>
2105
- >(
2018
+ const response = await this.apiClient.sendRequest<QueryFeedMembersResponse>(
2106
2019
  'POST',
2107
2020
  '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/members/query',
2108
2021
  pathParams,
2109
2022
  undefined,
2110
2023
  body,
2111
- 'application/json',
2112
2024
  );
2113
2025
 
2114
- decoders['QueryFeedMembersResponse']?.(response.body);
2026
+ decoders['QueryFeedMembersResponse']?.(response);
2115
2027
 
2116
- return { ...response.body, metadata: response.metadata };
2028
+ return response;
2117
2029
  }
2118
2030
 
2119
2031
  async rejectFeedMemberInvite(
@@ -2131,20 +2043,18 @@ export class FeedsApi {
2131
2043
  user: request?.user,
2132
2044
  };
2133
2045
 
2134
- const response = await this.apiClient.sendRequest<
2135
- StreamResponse<RejectFeedMemberInviteResponse>
2136
- >(
2137
- 'POST',
2138
- '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/members/reject',
2139
- pathParams,
2140
- undefined,
2141
- body,
2142
- 'application/json',
2143
- );
2046
+ const response =
2047
+ await this.apiClient.sendRequest<RejectFeedMemberInviteResponse>(
2048
+ 'POST',
2049
+ '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/members/reject',
2050
+ pathParams,
2051
+ undefined,
2052
+ body,
2053
+ );
2144
2054
 
2145
- decoders['RejectFeedMemberInviteResponse']?.(response.body);
2055
+ decoders['RejectFeedMemberInviteResponse']?.(response);
2146
2056
 
2147
- return { ...response.body, metadata: response.metadata };
2057
+ return response;
2148
2058
  }
2149
2059
 
2150
2060
  async queryPinnedActivities(
@@ -2172,20 +2082,18 @@ export class FeedsApi {
2172
2082
  filter: request?.filter,
2173
2083
  };
2174
2084
 
2175
- const response = await this.apiClient.sendRequest<
2176
- StreamResponse<QueryPinnedActivitiesResponse>
2177
- >(
2178
- 'POST',
2179
- '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/pinned_activities/query',
2180
- pathParams,
2181
- queryParams,
2182
- body,
2183
- 'application/json',
2184
- );
2085
+ const response =
2086
+ await this.apiClient.sendRequest<QueryPinnedActivitiesResponse>(
2087
+ 'POST',
2088
+ '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/pinned_activities/query',
2089
+ pathParams,
2090
+ queryParams,
2091
+ body,
2092
+ );
2185
2093
 
2186
- decoders['QueryPinnedActivitiesResponse']?.(response.body);
2094
+ decoders['QueryPinnedActivitiesResponse']?.(response);
2187
2095
 
2188
- return { ...response.body, metadata: response.metadata };
2096
+ return response;
2189
2097
  }
2190
2098
 
2191
2099
  async getFollowSuggestions(request: {
@@ -2201,18 +2109,17 @@ export class FeedsApi {
2201
2109
  feed_group_id: request?.feed_group_id,
2202
2110
  };
2203
2111
 
2204
- const response = await this.apiClient.sendRequest<
2205
- StreamResponse<GetFollowSuggestionsResponse>
2206
- >(
2207
- 'GET',
2208
- '/api/v2/feeds/feed_groups/{feed_group_id}/follow_suggestions',
2209
- pathParams,
2210
- queryParams,
2211
- );
2112
+ const response =
2113
+ await this.apiClient.sendRequest<GetFollowSuggestionsResponse>(
2114
+ 'GET',
2115
+ '/api/v2/feeds/feed_groups/{feed_group_id}/follow_suggestions',
2116
+ pathParams,
2117
+ queryParams,
2118
+ );
2212
2119
 
2213
- decoders['GetFollowSuggestionsResponse']?.(response.body);
2120
+ decoders['GetFollowSuggestionsResponse']?.(response);
2214
2121
 
2215
- return { ...response.body, metadata: response.metadata };
2122
+ return response;
2216
2123
  }
2217
2124
 
2218
2125
  async restoreFeedGroup(request: {
@@ -2222,18 +2129,16 @@ export class FeedsApi {
2222
2129
  feed_group_id: request?.feed_group_id,
2223
2130
  };
2224
2131
 
2225
- const response = await this.apiClient.sendRequest<
2226
- StreamResponse<RestoreFeedGroupResponse>
2227
- >(
2132
+ const response = await this.apiClient.sendRequest<RestoreFeedGroupResponse>(
2228
2133
  'POST',
2229
2134
  '/api/v2/feeds/feed_groups/{feed_group_id}/restore',
2230
2135
  pathParams,
2231
2136
  undefined,
2232
2137
  );
2233
2138
 
2234
- decoders['RestoreFeedGroupResponse']?.(response.body);
2139
+ decoders['RestoreFeedGroupResponse']?.(response);
2235
2140
 
2236
- return { ...response.body, metadata: response.metadata };
2141
+ return response;
2237
2142
  }
2238
2143
 
2239
2144
  async deleteFeedGroup(request: {
@@ -2247,13 +2152,16 @@ export class FeedsApi {
2247
2152
  id: request?.id,
2248
2153
  };
2249
2154
 
2250
- const response = await this.apiClient.sendRequest<
2251
- StreamResponse<DeleteFeedGroupResponse>
2252
- >('DELETE', '/api/v2/feeds/feed_groups/{id}', pathParams, queryParams);
2155
+ const response = await this.apiClient.sendRequest<DeleteFeedGroupResponse>(
2156
+ 'DELETE',
2157
+ '/api/v2/feeds/feed_groups/{id}',
2158
+ pathParams,
2159
+ queryParams,
2160
+ );
2253
2161
 
2254
- decoders['DeleteFeedGroupResponse']?.(response.body);
2162
+ decoders['DeleteFeedGroupResponse']?.(response);
2255
2163
 
2256
- return { ...response.body, metadata: response.metadata };
2164
+ return response;
2257
2165
  }
2258
2166
 
2259
2167
  async getFeedGroup(request: {
@@ -2267,13 +2175,16 @@ export class FeedsApi {
2267
2175
  id: request?.id,
2268
2176
  };
2269
2177
 
2270
- const response = await this.apiClient.sendRequest<
2271
- StreamResponse<GetFeedGroupResponse>
2272
- >('GET', '/api/v2/feeds/feed_groups/{id}', pathParams, queryParams);
2178
+ const response = await this.apiClient.sendRequest<GetFeedGroupResponse>(
2179
+ 'GET',
2180
+ '/api/v2/feeds/feed_groups/{id}',
2181
+ pathParams,
2182
+ queryParams,
2183
+ );
2273
2184
 
2274
- decoders['GetFeedGroupResponse']?.(response.body);
2185
+ decoders['GetFeedGroupResponse']?.(response);
2275
2186
 
2276
- return { ...response.body, metadata: response.metadata };
2187
+ return response;
2277
2188
  }
2278
2189
 
2279
2190
  async getOrCreateFeedGroup(
@@ -2298,20 +2209,18 @@ export class FeedsApi {
2298
2209
  stories: request?.stories,
2299
2210
  };
2300
2211
 
2301
- const response = await this.apiClient.sendRequest<
2302
- StreamResponse<GetOrCreateFeedGroupResponse>
2303
- >(
2304
- 'POST',
2305
- '/api/v2/feeds/feed_groups/{id}',
2306
- pathParams,
2307
- undefined,
2308
- body,
2309
- 'application/json',
2310
- );
2212
+ const response =
2213
+ await this.apiClient.sendRequest<GetOrCreateFeedGroupResponse>(
2214
+ 'POST',
2215
+ '/api/v2/feeds/feed_groups/{id}',
2216
+ pathParams,
2217
+ undefined,
2218
+ body,
2219
+ );
2311
2220
 
2312
- decoders['GetOrCreateFeedGroupResponse']?.(response.body);
2221
+ decoders['GetOrCreateFeedGroupResponse']?.(response);
2313
2222
 
2314
- return { ...response.body, metadata: response.metadata };
2223
+ return response;
2315
2224
  }
2316
2225
 
2317
2226
  async updateFeedGroup(
@@ -2336,30 +2245,30 @@ export class FeedsApi {
2336
2245
  stories: request?.stories,
2337
2246
  };
2338
2247
 
2339
- const response = await this.apiClient.sendRequest<
2340
- StreamResponse<UpdateFeedGroupResponse>
2341
- >(
2248
+ const response = await this.apiClient.sendRequest<UpdateFeedGroupResponse>(
2342
2249
  'PUT',
2343
2250
  '/api/v2/feeds/feed_groups/{id}',
2344
2251
  pathParams,
2345
2252
  undefined,
2346
2253
  body,
2347
- 'application/json',
2348
2254
  );
2349
2255
 
2350
- decoders['UpdateFeedGroupResponse']?.(response.body);
2256
+ decoders['UpdateFeedGroupResponse']?.(response);
2351
2257
 
2352
- return { ...response.body, metadata: response.metadata };
2258
+ return response;
2353
2259
  }
2354
2260
 
2355
2261
  async listFeedViews(): Promise<StreamResponse<ListFeedViewsResponse>> {
2356
- const response = await this.apiClient.sendRequest<
2357
- StreamResponse<ListFeedViewsResponse>
2358
- >('GET', '/api/v2/feeds/feed_views', undefined, undefined);
2262
+ const response = await this.apiClient.sendRequest<ListFeedViewsResponse>(
2263
+ 'GET',
2264
+ '/api/v2/feeds/feed_views',
2265
+ undefined,
2266
+ undefined,
2267
+ );
2359
2268
 
2360
- decoders['ListFeedViewsResponse']?.(response.body);
2269
+ decoders['ListFeedViewsResponse']?.(response);
2361
2270
 
2362
- return { ...response.body, metadata: response.metadata };
2271
+ return response;
2363
2272
  }
2364
2273
 
2365
2274
  async createFeedView(
@@ -2372,20 +2281,17 @@ export class FeedsApi {
2372
2281
  ranking: request?.ranking,
2373
2282
  };
2374
2283
 
2375
- const response = await this.apiClient.sendRequest<
2376
- StreamResponse<CreateFeedViewResponse>
2377
- >(
2284
+ const response = await this.apiClient.sendRequest<CreateFeedViewResponse>(
2378
2285
  'POST',
2379
2286
  '/api/v2/feeds/feed_views',
2380
2287
  undefined,
2381
2288
  undefined,
2382
2289
  body,
2383
- 'application/json',
2384
2290
  );
2385
2291
 
2386
- decoders['CreateFeedViewResponse']?.(response.body);
2292
+ decoders['CreateFeedViewResponse']?.(response);
2387
2293
 
2388
- return { ...response.body, metadata: response.metadata };
2294
+ return response;
2389
2295
  }
2390
2296
 
2391
2297
  async deleteFeedView(request: {
@@ -2395,13 +2301,16 @@ export class FeedsApi {
2395
2301
  id: request?.id,
2396
2302
  };
2397
2303
 
2398
- const response = await this.apiClient.sendRequest<
2399
- StreamResponse<DeleteFeedViewResponse>
2400
- >('DELETE', '/api/v2/feeds/feed_views/{id}', pathParams, undefined);
2304
+ const response = await this.apiClient.sendRequest<DeleteFeedViewResponse>(
2305
+ 'DELETE',
2306
+ '/api/v2/feeds/feed_views/{id}',
2307
+ pathParams,
2308
+ undefined,
2309
+ );
2401
2310
 
2402
- decoders['DeleteFeedViewResponse']?.(response.body);
2311
+ decoders['DeleteFeedViewResponse']?.(response);
2403
2312
 
2404
- return { ...response.body, metadata: response.metadata };
2313
+ return response;
2405
2314
  }
2406
2315
 
2407
2316
  async getFeedView(request: {
@@ -2411,13 +2320,16 @@ export class FeedsApi {
2411
2320
  id: request?.id,
2412
2321
  };
2413
2322
 
2414
- const response = await this.apiClient.sendRequest<
2415
- StreamResponse<GetFeedViewResponse>
2416
- >('GET', '/api/v2/feeds/feed_views/{id}', pathParams, undefined);
2323
+ const response = await this.apiClient.sendRequest<GetFeedViewResponse>(
2324
+ 'GET',
2325
+ '/api/v2/feeds/feed_views/{id}',
2326
+ pathParams,
2327
+ undefined,
2328
+ );
2417
2329
 
2418
- decoders['GetFeedViewResponse']?.(response.body);
2330
+ decoders['GetFeedViewResponse']?.(response);
2419
2331
 
2420
- return { ...response.body, metadata: response.metadata };
2332
+ return response;
2421
2333
  }
2422
2334
 
2423
2335
  async getOrCreateFeedView(
@@ -2432,20 +2344,18 @@ export class FeedsApi {
2432
2344
  ranking: request?.ranking,
2433
2345
  };
2434
2346
 
2435
- const response = await this.apiClient.sendRequest<
2436
- StreamResponse<GetOrCreateFeedViewResponse>
2437
- >(
2438
- 'POST',
2439
- '/api/v2/feeds/feed_views/{id}',
2440
- pathParams,
2441
- undefined,
2442
- body,
2443
- 'application/json',
2444
- );
2347
+ const response =
2348
+ await this.apiClient.sendRequest<GetOrCreateFeedViewResponse>(
2349
+ 'POST',
2350
+ '/api/v2/feeds/feed_views/{id}',
2351
+ pathParams,
2352
+ undefined,
2353
+ body,
2354
+ );
2445
2355
 
2446
- decoders['GetOrCreateFeedViewResponse']?.(response.body);
2356
+ decoders['GetOrCreateFeedViewResponse']?.(response);
2447
2357
 
2448
- return { ...response.body, metadata: response.metadata };
2358
+ return response;
2449
2359
  }
2450
2360
 
2451
2361
  async updateFeedView(
@@ -2460,32 +2370,33 @@ export class FeedsApi {
2460
2370
  ranking: request?.ranking,
2461
2371
  };
2462
2372
 
2463
- const response = await this.apiClient.sendRequest<
2464
- StreamResponse<UpdateFeedViewResponse>
2465
- >(
2373
+ const response = await this.apiClient.sendRequest<UpdateFeedViewResponse>(
2466
2374
  'PUT',
2467
2375
  '/api/v2/feeds/feed_views/{id}',
2468
2376
  pathParams,
2469
2377
  undefined,
2470
2378
  body,
2471
- 'application/json',
2472
2379
  );
2473
2380
 
2474
- decoders['UpdateFeedViewResponse']?.(response.body);
2381
+ decoders['UpdateFeedViewResponse']?.(response);
2475
2382
 
2476
- return { ...response.body, metadata: response.metadata };
2383
+ return response;
2477
2384
  }
2478
2385
 
2479
2386
  async listFeedVisibilities(): Promise<
2480
2387
  StreamResponse<ListFeedVisibilitiesResponse>
2481
2388
  > {
2482
- const response = await this.apiClient.sendRequest<
2483
- StreamResponse<ListFeedVisibilitiesResponse>
2484
- >('GET', '/api/v2/feeds/feed_visibilities', undefined, undefined);
2389
+ const response =
2390
+ await this.apiClient.sendRequest<ListFeedVisibilitiesResponse>(
2391
+ 'GET',
2392
+ '/api/v2/feeds/feed_visibilities',
2393
+ undefined,
2394
+ undefined,
2395
+ );
2485
2396
 
2486
- decoders['ListFeedVisibilitiesResponse']?.(response.body);
2397
+ decoders['ListFeedVisibilitiesResponse']?.(response);
2487
2398
 
2488
- return { ...response.body, metadata: response.metadata };
2399
+ return response;
2489
2400
  }
2490
2401
 
2491
2402
  async getFeedVisibility(request: {
@@ -2495,13 +2406,17 @@ export class FeedsApi {
2495
2406
  name: request?.name,
2496
2407
  };
2497
2408
 
2498
- const response = await this.apiClient.sendRequest<
2499
- StreamResponse<GetFeedVisibilityResponse>
2500
- >('GET', '/api/v2/feeds/feed_visibilities/{name}', pathParams, undefined);
2409
+ const response =
2410
+ await this.apiClient.sendRequest<GetFeedVisibilityResponse>(
2411
+ 'GET',
2412
+ '/api/v2/feeds/feed_visibilities/{name}',
2413
+ pathParams,
2414
+ undefined,
2415
+ );
2501
2416
 
2502
- decoders['GetFeedVisibilityResponse']?.(response.body);
2417
+ decoders['GetFeedVisibilityResponse']?.(response);
2503
2418
 
2504
- return { ...response.body, metadata: response.metadata };
2419
+ return response;
2505
2420
  }
2506
2421
 
2507
2422
  async updateFeedVisibility(
@@ -2514,20 +2429,18 @@ export class FeedsApi {
2514
2429
  grants: request?.grants,
2515
2430
  };
2516
2431
 
2517
- const response = await this.apiClient.sendRequest<
2518
- StreamResponse<UpdateFeedVisibilityResponse>
2519
- >(
2520
- 'PUT',
2521
- '/api/v2/feeds/feed_visibilities/{name}',
2522
- pathParams,
2523
- undefined,
2524
- body,
2525
- 'application/json',
2526
- );
2432
+ const response =
2433
+ await this.apiClient.sendRequest<UpdateFeedVisibilityResponse>(
2434
+ 'PUT',
2435
+ '/api/v2/feeds/feed_visibilities/{name}',
2436
+ pathParams,
2437
+ undefined,
2438
+ body,
2439
+ );
2527
2440
 
2528
- decoders['UpdateFeedVisibilityResponse']?.(response.body);
2441
+ decoders['UpdateFeedVisibilityResponse']?.(response);
2529
2442
 
2530
- return { ...response.body, metadata: response.metadata };
2443
+ return response;
2531
2444
  }
2532
2445
 
2533
2446
  async createFeedsBatch(
@@ -2539,20 +2452,17 @@ export class FeedsApi {
2539
2452
  enrich_own_fields: request?.enrich_own_fields,
2540
2453
  };
2541
2454
 
2542
- const response = await this.apiClient.sendRequest<
2543
- StreamResponse<CreateFeedsBatchResponse>
2544
- >(
2455
+ const response = await this.apiClient.sendRequest<CreateFeedsBatchResponse>(
2545
2456
  'POST',
2546
2457
  '/api/v2/feeds/feeds/batch',
2547
2458
  undefined,
2548
2459
  undefined,
2549
2460
  body,
2550
- 'application/json',
2551
2461
  );
2552
2462
 
2553
- decoders['CreateFeedsBatchResponse']?.(response.body);
2463
+ decoders['CreateFeedsBatchResponse']?.(response);
2554
2464
 
2555
- return { ...response.body, metadata: response.metadata };
2465
+ return response;
2556
2466
  }
2557
2467
 
2558
2468
  async deleteFeedsBatch(
@@ -2564,20 +2474,17 @@ export class FeedsApi {
2564
2474
  purge_user_activities: request?.purge_user_activities,
2565
2475
  };
2566
2476
 
2567
- const response = await this.apiClient.sendRequest<
2568
- StreamResponse<DeleteFeedsBatchResponse>
2569
- >(
2477
+ const response = await this.apiClient.sendRequest<DeleteFeedsBatchResponse>(
2570
2478
  'POST',
2571
2479
  '/api/v2/feeds/feeds/delete',
2572
2480
  undefined,
2573
2481
  undefined,
2574
2482
  body,
2575
- 'application/json',
2576
2483
  );
2577
2484
 
2578
- decoders['DeleteFeedsBatchResponse']?.(response.body);
2485
+ decoders['DeleteFeedsBatchResponse']?.(response);
2579
2486
 
2580
- return { ...response.body, metadata: response.metadata };
2487
+ return response;
2581
2488
  }
2582
2489
 
2583
2490
  async ownBatch(
@@ -2590,20 +2497,17 @@ export class FeedsApi {
2590
2497
  user: request?.user,
2591
2498
  };
2592
2499
 
2593
- const response = await this.apiClient.sendRequest<
2594
- StreamResponse<OwnBatchResponse>
2595
- >(
2500
+ const response = await this.apiClient.sendRequest<OwnBatchResponse>(
2596
2501
  'POST',
2597
2502
  '/api/v2/feeds/feeds/own/batch',
2598
2503
  undefined,
2599
2504
  undefined,
2600
2505
  body,
2601
- 'application/json',
2602
2506
  );
2603
2507
 
2604
- decoders['OwnBatchResponse']?.(response.body);
2508
+ decoders['OwnBatchResponse']?.(response);
2605
2509
 
2606
- return { ...response.body, metadata: response.metadata };
2510
+ return response;
2607
2511
  }
2608
2512
 
2609
2513
  protected async _queryFeeds(
@@ -2619,20 +2523,17 @@ export class FeedsApi {
2619
2523
  filter: request?.filter,
2620
2524
  };
2621
2525
 
2622
- const response = await this.apiClient.sendRequest<
2623
- StreamResponse<QueryFeedsResponse>
2624
- >(
2526
+ const response = await this.apiClient.sendRequest<QueryFeedsResponse>(
2625
2527
  'POST',
2626
2528
  '/api/v2/feeds/feeds/query',
2627
2529
  undefined,
2628
2530
  undefined,
2629
2531
  body,
2630
- 'application/json',
2631
2532
  );
2632
2533
 
2633
- decoders['QueryFeedsResponse']?.(response.body);
2534
+ decoders['QueryFeedsResponse']?.(response);
2634
2535
 
2635
- return { ...response.body, metadata: response.metadata };
2536
+ return response;
2636
2537
  }
2637
2538
 
2638
2539
  async getFeedsRateLimits(request?: {
@@ -2656,13 +2557,17 @@ export class FeedsApi {
2656
2557
  server_side: request?.server_side,
2657
2558
  };
2658
2559
 
2659
- const response = await this.apiClient.sendRequest<
2660
- StreamResponse<GetFeedsRateLimitsResponse>
2661
- >('GET', '/api/v2/feeds/feeds/rate_limits', undefined, queryParams);
2560
+ const response =
2561
+ await this.apiClient.sendRequest<GetFeedsRateLimitsResponse>(
2562
+ 'GET',
2563
+ '/api/v2/feeds/feeds/rate_limits',
2564
+ undefined,
2565
+ queryParams,
2566
+ );
2662
2567
 
2663
- decoders['GetFeedsRateLimitsResponse']?.(response.body);
2568
+ decoders['GetFeedsRateLimitsResponse']?.(response);
2664
2569
 
2665
- return { ...response.body, metadata: response.metadata };
2570
+ return response;
2666
2571
  }
2667
2572
 
2668
2573
  async updateFollow(
@@ -2683,20 +2588,17 @@ export class FeedsApi {
2683
2588
  custom: request?.custom,
2684
2589
  };
2685
2590
 
2686
- const response = await this.apiClient.sendRequest<
2687
- StreamResponse<UpdateFollowResponse>
2688
- >(
2591
+ const response = await this.apiClient.sendRequest<UpdateFollowResponse>(
2689
2592
  'PATCH',
2690
2593
  '/api/v2/feeds/follows',
2691
2594
  undefined,
2692
2595
  undefined,
2693
2596
  body,
2694
- 'application/json',
2695
2597
  );
2696
2598
 
2697
- decoders['UpdateFollowResponse']?.(response.body);
2599
+ decoders['UpdateFollowResponse']?.(response);
2698
2600
 
2699
- return { ...response.body, metadata: response.metadata };
2601
+ return response;
2700
2602
  }
2701
2603
 
2702
2604
  async follow(
@@ -2716,20 +2618,17 @@ export class FeedsApi {
2716
2618
  custom: request?.custom,
2717
2619
  };
2718
2620
 
2719
- const response = await this.apiClient.sendRequest<
2720
- StreamResponse<SingleFollowResponse>
2721
- >(
2621
+ const response = await this.apiClient.sendRequest<SingleFollowResponse>(
2722
2622
  'POST',
2723
2623
  '/api/v2/feeds/follows',
2724
2624
  undefined,
2725
2625
  undefined,
2726
2626
  body,
2727
- 'application/json',
2728
2627
  );
2729
2628
 
2730
- decoders['SingleFollowResponse']?.(response.body);
2629
+ decoders['SingleFollowResponse']?.(response);
2731
2630
 
2732
- return { ...response.body, metadata: response.metadata };
2631
+ return response;
2733
2632
  }
2734
2633
 
2735
2634
  async acceptFollow(
@@ -2741,20 +2640,17 @@ export class FeedsApi {
2741
2640
  follower_role: request?.follower_role,
2742
2641
  };
2743
2642
 
2744
- const response = await this.apiClient.sendRequest<
2745
- StreamResponse<AcceptFollowResponse>
2746
- >(
2643
+ const response = await this.apiClient.sendRequest<AcceptFollowResponse>(
2747
2644
  'POST',
2748
2645
  '/api/v2/feeds/follows/accept',
2749
2646
  undefined,
2750
2647
  undefined,
2751
2648
  body,
2752
- 'application/json',
2753
2649
  );
2754
2650
 
2755
- decoders['AcceptFollowResponse']?.(response.body);
2651
+ decoders['AcceptFollowResponse']?.(response);
2756
2652
 
2757
- return { ...response.body, metadata: response.metadata };
2653
+ return response;
2758
2654
  }
2759
2655
 
2760
2656
  async followBatch(
@@ -2766,20 +2662,17 @@ export class FeedsApi {
2766
2662
  enrich_own_fields: request?.enrich_own_fields,
2767
2663
  };
2768
2664
 
2769
- const response = await this.apiClient.sendRequest<
2770
- StreamResponse<FollowBatchResponse>
2771
- >(
2665
+ const response = await this.apiClient.sendRequest<FollowBatchResponse>(
2772
2666
  'POST',
2773
2667
  '/api/v2/feeds/follows/batch',
2774
2668
  undefined,
2775
2669
  undefined,
2776
2670
  body,
2777
- 'application/json',
2778
2671
  );
2779
2672
 
2780
- decoders['FollowBatchResponse']?.(response.body);
2673
+ decoders['FollowBatchResponse']?.(response);
2781
2674
 
2782
- return { ...response.body, metadata: response.metadata };
2675
+ return response;
2783
2676
  }
2784
2677
 
2785
2678
  async getOrCreateFollows(
@@ -2791,20 +2684,17 @@ export class FeedsApi {
2791
2684
  enrich_own_fields: request?.enrich_own_fields,
2792
2685
  };
2793
2686
 
2794
- const response = await this.apiClient.sendRequest<
2795
- StreamResponse<FollowBatchResponse>
2796
- >(
2687
+ const response = await this.apiClient.sendRequest<FollowBatchResponse>(
2797
2688
  'POST',
2798
2689
  '/api/v2/feeds/follows/batch/upsert',
2799
2690
  undefined,
2800
2691
  undefined,
2801
2692
  body,
2802
- 'application/json',
2803
2693
  );
2804
2694
 
2805
- decoders['FollowBatchResponse']?.(response.body);
2695
+ decoders['FollowBatchResponse']?.(response);
2806
2696
 
2807
- return { ...response.body, metadata: response.metadata };
2697
+ return response;
2808
2698
  }
2809
2699
 
2810
2700
  async queryFollows(
@@ -2818,20 +2708,17 @@ export class FeedsApi {
2818
2708
  filter: request?.filter,
2819
2709
  };
2820
2710
 
2821
- const response = await this.apiClient.sendRequest<
2822
- StreamResponse<QueryFollowsResponse>
2823
- >(
2711
+ const response = await this.apiClient.sendRequest<QueryFollowsResponse>(
2824
2712
  'POST',
2825
2713
  '/api/v2/feeds/follows/query',
2826
2714
  undefined,
2827
2715
  undefined,
2828
2716
  body,
2829
- 'application/json',
2830
2717
  );
2831
2718
 
2832
- decoders['QueryFollowsResponse']?.(response.body);
2719
+ decoders['QueryFollowsResponse']?.(response);
2833
2720
 
2834
- return { ...response.body, metadata: response.metadata };
2721
+ return response;
2835
2722
  }
2836
2723
 
2837
2724
  async rejectFollow(
@@ -2842,20 +2729,17 @@ export class FeedsApi {
2842
2729
  target: request?.target,
2843
2730
  };
2844
2731
 
2845
- const response = await this.apiClient.sendRequest<
2846
- StreamResponse<RejectFollowResponse>
2847
- >(
2732
+ const response = await this.apiClient.sendRequest<RejectFollowResponse>(
2848
2733
  'POST',
2849
2734
  '/api/v2/feeds/follows/reject',
2850
2735
  undefined,
2851
2736
  undefined,
2852
2737
  body,
2853
- 'application/json',
2854
2738
  );
2855
2739
 
2856
- decoders['RejectFollowResponse']?.(response.body);
2740
+ decoders['RejectFollowResponse']?.(response);
2857
2741
 
2858
- return { ...response.body, metadata: response.metadata };
2742
+ return response;
2859
2743
  }
2860
2744
 
2861
2745
  async getOrCreateFollow(
@@ -2875,20 +2759,18 @@ export class FeedsApi {
2875
2759
  custom: request?.custom,
2876
2760
  };
2877
2761
 
2878
- const response = await this.apiClient.sendRequest<
2879
- StreamResponse<GetOrCreateFollowResponse>
2880
- >(
2881
- 'POST',
2882
- '/api/v2/feeds/follows/upsert',
2883
- undefined,
2884
- undefined,
2885
- body,
2886
- 'application/json',
2887
- );
2762
+ const response =
2763
+ await this.apiClient.sendRequest<GetOrCreateFollowResponse>(
2764
+ 'POST',
2765
+ '/api/v2/feeds/follows/upsert',
2766
+ undefined,
2767
+ undefined,
2768
+ body,
2769
+ );
2888
2770
 
2889
- decoders['GetOrCreateFollowResponse']?.(response.body);
2771
+ decoders['GetOrCreateFollowResponse']?.(response);
2890
2772
 
2891
- return { ...response.body, metadata: response.metadata };
2773
+ return response;
2892
2774
  }
2893
2775
 
2894
2776
  async unfollow(request: {
@@ -2908,18 +2790,16 @@ export class FeedsApi {
2908
2790
  target: request?.target,
2909
2791
  };
2910
2792
 
2911
- const response = await this.apiClient.sendRequest<
2912
- StreamResponse<UnfollowResponse>
2913
- >(
2793
+ const response = await this.apiClient.sendRequest<UnfollowResponse>(
2914
2794
  'DELETE',
2915
2795
  '/api/v2/feeds/follows/{source}/{target}',
2916
2796
  pathParams,
2917
2797
  queryParams,
2918
2798
  );
2919
2799
 
2920
- decoders['UnfollowResponse']?.(response.body);
2800
+ decoders['UnfollowResponse']?.(response);
2921
2801
 
2922
- return { ...response.body, metadata: response.metadata };
2802
+ return response;
2923
2803
  }
2924
2804
 
2925
2805
  async createMembershipLevel(
@@ -2934,20 +2814,18 @@ export class FeedsApi {
2934
2814
  custom: request?.custom,
2935
2815
  };
2936
2816
 
2937
- const response = await this.apiClient.sendRequest<
2938
- StreamResponse<CreateMembershipLevelResponse>
2939
- >(
2940
- 'POST',
2941
- '/api/v2/feeds/membership_levels',
2942
- undefined,
2943
- undefined,
2944
- body,
2945
- 'application/json',
2946
- );
2817
+ const response =
2818
+ await this.apiClient.sendRequest<CreateMembershipLevelResponse>(
2819
+ 'POST',
2820
+ '/api/v2/feeds/membership_levels',
2821
+ undefined,
2822
+ undefined,
2823
+ body,
2824
+ );
2947
2825
 
2948
- decoders['CreateMembershipLevelResponse']?.(response.body);
2826
+ decoders['CreateMembershipLevelResponse']?.(response);
2949
2827
 
2950
- return { ...response.body, metadata: response.metadata };
2828
+ return response;
2951
2829
  }
2952
2830
 
2953
2831
  async queryMembershipLevels(
@@ -2961,20 +2839,18 @@ export class FeedsApi {
2961
2839
  filter: request?.filter,
2962
2840
  };
2963
2841
 
2964
- const response = await this.apiClient.sendRequest<
2965
- StreamResponse<QueryMembershipLevelsResponse>
2966
- >(
2967
- 'POST',
2968
- '/api/v2/feeds/membership_levels/query',
2969
- undefined,
2970
- undefined,
2971
- body,
2972
- 'application/json',
2973
- );
2842
+ const response =
2843
+ await this.apiClient.sendRequest<QueryMembershipLevelsResponse>(
2844
+ 'POST',
2845
+ '/api/v2/feeds/membership_levels/query',
2846
+ undefined,
2847
+ undefined,
2848
+ body,
2849
+ );
2974
2850
 
2975
- decoders['QueryMembershipLevelsResponse']?.(response.body);
2851
+ decoders['QueryMembershipLevelsResponse']?.(response);
2976
2852
 
2977
- return { ...response.body, metadata: response.metadata };
2853
+ return response;
2978
2854
  }
2979
2855
 
2980
2856
  async deleteMembershipLevel(request: {
@@ -2984,16 +2860,16 @@ export class FeedsApi {
2984
2860
  id: request?.id,
2985
2861
  };
2986
2862
 
2987
- const response = await this.apiClient.sendRequest<StreamResponse<Response>>(
2863
+ const response = await this.apiClient.sendRequest<Response>(
2988
2864
  'DELETE',
2989
2865
  '/api/v2/feeds/membership_levels/{id}',
2990
2866
  pathParams,
2991
2867
  undefined,
2992
2868
  );
2993
2869
 
2994
- decoders['Response']?.(response.body);
2870
+ decoders['Response']?.(response);
2995
2871
 
2996
- return { ...response.body, metadata: response.metadata };
2872
+ return response;
2997
2873
  }
2998
2874
 
2999
2875
  async updateMembershipLevel(
@@ -3010,20 +2886,103 @@ export class FeedsApi {
3010
2886
  custom: request?.custom,
3011
2887
  };
3012
2888
 
3013
- const response = await this.apiClient.sendRequest<
3014
- StreamResponse<UpdateMembershipLevelResponse>
3015
- >(
3016
- 'PATCH',
3017
- '/api/v2/feeds/membership_levels/{id}',
3018
- pathParams,
3019
- undefined,
3020
- body,
3021
- 'application/json',
3022
- );
2889
+ const response =
2890
+ await this.apiClient.sendRequest<UpdateMembershipLevelResponse>(
2891
+ 'PATCH',
2892
+ '/api/v2/feeds/membership_levels/{id}',
2893
+ pathParams,
2894
+ undefined,
2895
+ body,
2896
+ );
2897
+
2898
+ decoders['UpdateMembershipLevelResponse']?.(response);
2899
+
2900
+ return response;
2901
+ }
2902
+
2903
+ async feedsGetRetentionPolicy(): Promise<
2904
+ StreamResponse<GetFeedsRetentionPolicyResponse>
2905
+ > {
2906
+ const response =
2907
+ await this.apiClient.sendRequest<GetFeedsRetentionPolicyResponse>(
2908
+ 'GET',
2909
+ '/api/v2/feeds/retention_policy',
2910
+ undefined,
2911
+ undefined,
2912
+ );
2913
+
2914
+ decoders['GetFeedsRetentionPolicyResponse']?.(response);
2915
+
2916
+ return response;
2917
+ }
2918
+
2919
+ async feedsSetRetentionPolicy(
2920
+ request: SetFeedsRetentionPolicyRequest,
2921
+ ): Promise<StreamResponse<SetFeedsRetentionPolicyResponse>> {
2922
+ const body = {
2923
+ max_age_hours: request?.max_age_hours,
2924
+ policy: request?.policy,
2925
+ enabled: request?.enabled,
2926
+ };
2927
+
2928
+ const response =
2929
+ await this.apiClient.sendRequest<SetFeedsRetentionPolicyResponse>(
2930
+ 'POST',
2931
+ '/api/v2/feeds/retention_policy',
2932
+ undefined,
2933
+ undefined,
2934
+ body,
2935
+ );
2936
+
2937
+ decoders['SetFeedsRetentionPolicyResponse']?.(response);
2938
+
2939
+ return response;
2940
+ }
2941
+
2942
+ async feedsDeleteRetentionPolicy(
2943
+ request: DeleteFeedsRetentionPolicyRequest,
2944
+ ): Promise<StreamResponse<DeleteFeedsRetentionPolicyResponse>> {
2945
+ const body = {
2946
+ policy: request?.policy,
2947
+ };
2948
+
2949
+ const response =
2950
+ await this.apiClient.sendRequest<DeleteFeedsRetentionPolicyResponse>(
2951
+ 'POST',
2952
+ '/api/v2/feeds/retention_policy/delete',
2953
+ undefined,
2954
+ undefined,
2955
+ body,
2956
+ );
2957
+
2958
+ decoders['DeleteFeedsRetentionPolicyResponse']?.(response);
2959
+
2960
+ return response;
2961
+ }
2962
+
2963
+ async feedsGetRetentionPolicyRuns(
2964
+ request?: GetFeedsRetentionPolicyRunsRequest,
2965
+ ): Promise<StreamResponse<GetFeedsRetentionPolicyRunsResponse>> {
2966
+ const body = {
2967
+ limit: request?.limit,
2968
+ next: request?.next,
2969
+ prev: request?.prev,
2970
+ sort: request?.sort,
2971
+ filter_conditions: request?.filter_conditions,
2972
+ };
3023
2973
 
3024
- decoders['UpdateMembershipLevelResponse']?.(response.body);
2974
+ const response =
2975
+ await this.apiClient.sendRequest<GetFeedsRetentionPolicyRunsResponse>(
2976
+ 'POST',
2977
+ '/api/v2/feeds/retention_policy/runs',
2978
+ undefined,
2979
+ undefined,
2980
+ body,
2981
+ );
3025
2982
 
3026
- return { ...response.body, metadata: response.metadata };
2983
+ decoders['GetFeedsRetentionPolicyRunsResponse']?.(response);
2984
+
2985
+ return response;
3027
2986
  }
3028
2987
 
3029
2988
  async queryRevisionHistory(
@@ -3037,20 +2996,18 @@ export class FeedsApi {
3037
2996
  sort: request?.sort,
3038
2997
  };
3039
2998
 
3040
- const response = await this.apiClient.sendRequest<
3041
- StreamResponse<QueryRevisionHistoryResponse>
3042
- >(
3043
- 'POST',
3044
- '/api/v2/feeds/revisions/query',
3045
- undefined,
3046
- undefined,
3047
- body,
3048
- 'application/json',
3049
- );
2999
+ const response =
3000
+ await this.apiClient.sendRequest<QueryRevisionHistoryResponse>(
3001
+ 'POST',
3002
+ '/api/v2/feeds/revisions/query',
3003
+ undefined,
3004
+ undefined,
3005
+ body,
3006
+ );
3050
3007
 
3051
- decoders['QueryRevisionHistoryResponse']?.(response.body);
3008
+ decoders['QueryRevisionHistoryResponse']?.(response);
3052
3009
 
3053
- return { ...response.body, metadata: response.metadata };
3010
+ return response;
3054
3011
  }
3055
3012
 
3056
3013
  async queryFeedsUsageStats(
@@ -3061,20 +3018,18 @@ export class FeedsApi {
3061
3018
  to: request?.to,
3062
3019
  };
3063
3020
 
3064
- const response = await this.apiClient.sendRequest<
3065
- StreamResponse<QueryFeedsUsageStatsResponse>
3066
- >(
3067
- 'POST',
3068
- '/api/v2/feeds/stats/usage',
3069
- undefined,
3070
- undefined,
3071
- body,
3072
- 'application/json',
3073
- );
3021
+ const response =
3022
+ await this.apiClient.sendRequest<QueryFeedsUsageStatsResponse>(
3023
+ 'POST',
3024
+ '/api/v2/feeds/stats/usage',
3025
+ undefined,
3026
+ undefined,
3027
+ body,
3028
+ );
3074
3029
 
3075
- decoders['QueryFeedsUsageStatsResponse']?.(response.body);
3030
+ decoders['QueryFeedsUsageStatsResponse']?.(response);
3076
3031
 
3077
- return { ...response.body, metadata: response.metadata };
3032
+ return response;
3078
3033
  }
3079
3034
 
3080
3035
  async unfollowBatch(
@@ -3086,20 +3041,17 @@ export class FeedsApi {
3086
3041
  enrich_own_fields: request?.enrich_own_fields,
3087
3042
  };
3088
3043
 
3089
- const response = await this.apiClient.sendRequest<
3090
- StreamResponse<UnfollowBatchResponse>
3091
- >(
3044
+ const response = await this.apiClient.sendRequest<UnfollowBatchResponse>(
3092
3045
  'POST',
3093
3046
  '/api/v2/feeds/unfollow/batch',
3094
3047
  undefined,
3095
3048
  undefined,
3096
3049
  body,
3097
- 'application/json',
3098
3050
  );
3099
3051
 
3100
- decoders['UnfollowBatchResponse']?.(response.body);
3052
+ decoders['UnfollowBatchResponse']?.(response);
3101
3053
 
3102
- return { ...response.body, metadata: response.metadata };
3054
+ return response;
3103
3055
  }
3104
3056
 
3105
3057
  async getOrCreateUnfollows(
@@ -3111,20 +3063,17 @@ export class FeedsApi {
3111
3063
  enrich_own_fields: request?.enrich_own_fields,
3112
3064
  };
3113
3065
 
3114
- const response = await this.apiClient.sendRequest<
3115
- StreamResponse<UnfollowBatchResponse>
3116
- >(
3066
+ const response = await this.apiClient.sendRequest<UnfollowBatchResponse>(
3117
3067
  'POST',
3118
3068
  '/api/v2/feeds/unfollow/batch/upsert',
3119
3069
  undefined,
3120
3070
  undefined,
3121
3071
  body,
3122
- 'application/json',
3123
3072
  );
3124
3073
 
3125
- decoders['UnfollowBatchResponse']?.(response.body);
3074
+ decoders['UnfollowBatchResponse']?.(response);
3126
3075
 
3127
- return { ...response.body, metadata: response.metadata };
3076
+ return response;
3128
3077
  }
3129
3078
 
3130
3079
  async getOrCreateUnfollow(
@@ -3138,20 +3087,18 @@ export class FeedsApi {
3138
3087
  keep_history: request?.keep_history,
3139
3088
  };
3140
3089
 
3141
- const response = await this.apiClient.sendRequest<
3142
- StreamResponse<GetOrCreateUnfollowResponse>
3143
- >(
3144
- 'POST',
3145
- '/api/v2/feeds/unfollow/upsert',
3146
- undefined,
3147
- undefined,
3148
- body,
3149
- 'application/json',
3150
- );
3090
+ const response =
3091
+ await this.apiClient.sendRequest<GetOrCreateUnfollowResponse>(
3092
+ 'POST',
3093
+ '/api/v2/feeds/unfollow/upsert',
3094
+ undefined,
3095
+ undefined,
3096
+ body,
3097
+ );
3151
3098
 
3152
- decoders['GetOrCreateUnfollowResponse']?.(response.body);
3099
+ decoders['GetOrCreateUnfollowResponse']?.(response);
3153
3100
 
3154
- return { ...response.body, metadata: response.metadata };
3101
+ return response;
3155
3102
  }
3156
3103
 
3157
3104
  async deleteFeedUserData(
@@ -3164,20 +3111,18 @@ export class FeedsApi {
3164
3111
  hard_delete: request?.hard_delete,
3165
3112
  };
3166
3113
 
3167
- const response = await this.apiClient.sendRequest<
3168
- StreamResponse<DeleteFeedUserDataResponse>
3169
- >(
3170
- 'POST',
3171
- '/api/v2/feeds/users/{user_id}/delete',
3172
- pathParams,
3173
- undefined,
3174
- body,
3175
- 'application/json',
3176
- );
3114
+ const response =
3115
+ await this.apiClient.sendRequest<DeleteFeedUserDataResponse>(
3116
+ 'POST',
3117
+ '/api/v2/feeds/users/{user_id}/delete',
3118
+ pathParams,
3119
+ undefined,
3120
+ body,
3121
+ );
3177
3122
 
3178
- decoders['DeleteFeedUserDataResponse']?.(response.body);
3123
+ decoders['DeleteFeedUserDataResponse']?.(response);
3179
3124
 
3180
- return { ...response.body, metadata: response.metadata };
3125
+ return response;
3181
3126
  }
3182
3127
 
3183
3128
  async exportFeedUserData(request: {
@@ -3187,13 +3132,17 @@ export class FeedsApi {
3187
3132
  user_id: request?.user_id,
3188
3133
  };
3189
3134
 
3190
- const response = await this.apiClient.sendRequest<
3191
- StreamResponse<ExportFeedUserDataResponse>
3192
- >('POST', '/api/v2/feeds/users/{user_id}/export', pathParams, undefined);
3135
+ const response =
3136
+ await this.apiClient.sendRequest<ExportFeedUserDataResponse>(
3137
+ 'POST',
3138
+ '/api/v2/feeds/users/{user_id}/export',
3139
+ pathParams,
3140
+ undefined,
3141
+ );
3193
3142
 
3194
- decoders['ExportFeedUserDataResponse']?.(response.body);
3143
+ decoders['ExportFeedUserDataResponse']?.(response);
3195
3144
 
3196
- return { ...response.body, metadata: response.metadata };
3145
+ return response;
3197
3146
  }
3198
3147
 
3199
3148
  async deleteUserInterests(request: {
@@ -3207,18 +3156,17 @@ export class FeedsApi {
3207
3156
  user_id: request?.user_id,
3208
3157
  };
3209
3158
 
3210
- const response = await this.apiClient.sendRequest<
3211
- StreamResponse<DeleteUserInterestsResponse>
3212
- >(
3213
- 'DELETE',
3214
- '/api/v2/feeds/users/{user_id}/interests',
3215
- pathParams,
3216
- queryParams,
3217
- );
3159
+ const response =
3160
+ await this.apiClient.sendRequest<DeleteUserInterestsResponse>(
3161
+ 'DELETE',
3162
+ '/api/v2/feeds/users/{user_id}/interests',
3163
+ pathParams,
3164
+ queryParams,
3165
+ );
3218
3166
 
3219
- decoders['DeleteUserInterestsResponse']?.(response.body);
3167
+ decoders['DeleteUserInterestsResponse']?.(response);
3220
3168
 
3221
- return { ...response.body, metadata: response.metadata };
3169
+ return response;
3222
3170
  }
3223
3171
 
3224
3172
  async getUserInterests(request: {
@@ -3232,18 +3180,16 @@ export class FeedsApi {
3232
3180
  user_id: request?.user_id,
3233
3181
  };
3234
3182
 
3235
- const response = await this.apiClient.sendRequest<
3236
- StreamResponse<GetUserInterestsResponse>
3237
- >(
3183
+ const response = await this.apiClient.sendRequest<GetUserInterestsResponse>(
3238
3184
  'GET',
3239
3185
  '/api/v2/feeds/users/{user_id}/interests',
3240
3186
  pathParams,
3241
3187
  queryParams,
3242
3188
  );
3243
3189
 
3244
- decoders['GetUserInterestsResponse']?.(response.body);
3190
+ decoders['GetUserInterestsResponse']?.(response);
3245
3191
 
3246
- return { ...response.body, metadata: response.metadata };
3192
+ return response;
3247
3193
  }
3248
3194
 
3249
3195
  async upsertUserInterests(
@@ -3256,19 +3202,17 @@ export class FeedsApi {
3256
3202
  interests: request?.interests,
3257
3203
  };
3258
3204
 
3259
- const response = await this.apiClient.sendRequest<
3260
- StreamResponse<UpsertUserInterestsResponse>
3261
- >(
3262
- 'PUT',
3263
- '/api/v2/feeds/users/{user_id}/interests',
3264
- pathParams,
3265
- undefined,
3266
- body,
3267
- 'application/json',
3268
- );
3205
+ const response =
3206
+ await this.apiClient.sendRequest<UpsertUserInterestsResponse>(
3207
+ 'PUT',
3208
+ '/api/v2/feeds/users/{user_id}/interests',
3209
+ pathParams,
3210
+ undefined,
3211
+ body,
3212
+ );
3269
3213
 
3270
- decoders['UpsertUserInterestsResponse']?.(response.body);
3214
+ decoders['UpsertUserInterestsResponse']?.(response);
3271
3215
 
3272
- return { ...response.body, metadata: response.metadata };
3216
+ return response;
3273
3217
  }
3274
3218
  }