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