@stream-io/node-sdk 0.8.8 → 0.8.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -121,13 +121,17 @@ export class VideoApi {
121
121
  async getActiveCallsStatus(): Promise<
122
122
  StreamResponse<GetActiveCallsStatusResponse>
123
123
  > {
124
- const response = await this.apiClient.sendRequest<
125
- StreamResponse<GetActiveCallsStatusResponse>
126
- >('GET', '/api/v2/video/active_calls_status', undefined, undefined);
124
+ const response =
125
+ await this.apiClient.sendRequest<GetActiveCallsStatusResponse>(
126
+ 'GET',
127
+ '/api/v2/video/active_calls_status',
128
+ undefined,
129
+ undefined,
130
+ );
127
131
 
128
- decoders['GetActiveCallsStatusResponse']?.(response.body);
132
+ decoders['GetActiveCallsStatusResponse']?.(response);
129
133
 
130
- return { ...response.body, metadata: response.metadata };
134
+ return response;
131
135
  }
132
136
 
133
137
  async queryUserFeedback(
@@ -144,20 +148,18 @@ export class VideoApi {
144
148
  filter_conditions: request?.filter_conditions,
145
149
  };
146
150
 
147
- const response = await this.apiClient.sendRequest<
148
- StreamResponse<QueryUserFeedbackResponse>
149
- >(
150
- 'POST',
151
- '/api/v2/video/call/feedback',
152
- undefined,
153
- queryParams,
154
- body,
155
- 'application/json',
156
- );
151
+ const response =
152
+ await this.apiClient.sendRequest<QueryUserFeedbackResponse>(
153
+ 'POST',
154
+ '/api/v2/video/call/feedback',
155
+ undefined,
156
+ queryParams,
157
+ body,
158
+ );
157
159
 
158
- decoders['QueryUserFeedbackResponse']?.(response.body);
160
+ decoders['QueryUserFeedbackResponse']?.(response);
159
161
 
160
- return { ...response.body, metadata: response.metadata };
162
+ return response;
161
163
  }
162
164
 
163
165
  async queryCallMembers(
@@ -173,20 +175,17 @@ export class VideoApi {
173
175
  filter_conditions: request?.filter_conditions,
174
176
  };
175
177
 
176
- const response = await this.apiClient.sendRequest<
177
- StreamResponse<QueryCallMembersResponse>
178
- >(
178
+ const response = await this.apiClient.sendRequest<QueryCallMembersResponse>(
179
179
  'POST',
180
180
  '/api/v2/video/call/members',
181
181
  undefined,
182
182
  undefined,
183
183
  body,
184
- 'application/json',
185
184
  );
186
185
 
187
- decoders['QueryCallMembersResponse']?.(response.body);
186
+ decoders['QueryCallMembersResponse']?.(response);
188
187
 
189
- return { ...response.body, metadata: response.metadata };
188
+ return response;
190
189
  }
191
190
 
192
191
  async queryCallStats(
@@ -200,20 +199,17 @@ export class VideoApi {
200
199
  filter_conditions: request?.filter_conditions,
201
200
  };
202
201
 
203
- const response = await this.apiClient.sendRequest<
204
- StreamResponse<QueryCallStatsResponse>
205
- >(
202
+ const response = await this.apiClient.sendRequest<QueryCallStatsResponse>(
206
203
  'POST',
207
204
  '/api/v2/video/call/stats',
208
205
  undefined,
209
206
  undefined,
210
207
  body,
211
- 'application/json',
212
208
  );
213
209
 
214
- decoders['QueryCallStatsResponse']?.(response.body);
210
+ decoders['QueryCallStatsResponse']?.(response);
215
211
 
216
- return { ...response.body, metadata: response.metadata };
212
+ return response;
217
213
  }
218
214
 
219
215
  async getCall(request: {
@@ -235,13 +231,16 @@ export class VideoApi {
235
231
  id: request?.id,
236
232
  };
237
233
 
238
- const response = await this.apiClient.sendRequest<
239
- StreamResponse<GetCallResponse>
240
- >('GET', '/api/v2/video/call/{type}/{id}', pathParams, queryParams);
234
+ const response = await this.apiClient.sendRequest<GetCallResponse>(
235
+ 'GET',
236
+ '/api/v2/video/call/{type}/{id}',
237
+ pathParams,
238
+ queryParams,
239
+ );
241
240
 
242
- decoders['GetCallResponse']?.(response.body);
241
+ decoders['GetCallResponse']?.(response);
243
242
 
244
- return { ...response.body, metadata: response.metadata };
243
+ return response;
245
244
  }
246
245
 
247
246
  async updateCall(
@@ -257,20 +256,17 @@ export class VideoApi {
257
256
  settings_override: request?.settings_override,
258
257
  };
259
258
 
260
- const response = await this.apiClient.sendRequest<
261
- StreamResponse<UpdateCallResponse>
262
- >(
259
+ const response = await this.apiClient.sendRequest<UpdateCallResponse>(
263
260
  'PATCH',
264
261
  '/api/v2/video/call/{type}/{id}',
265
262
  pathParams,
266
263
  undefined,
267
264
  body,
268
- 'application/json',
269
265
  );
270
266
 
271
- decoders['UpdateCallResponse']?.(response.body);
267
+ decoders['UpdateCallResponse']?.(response);
272
268
 
273
- return { ...response.body, metadata: response.metadata };
269
+ return response;
274
270
  }
275
271
 
276
272
  async getOrCreateCall(
@@ -288,20 +284,17 @@ export class VideoApi {
288
284
  data: request?.data,
289
285
  };
290
286
 
291
- const response = await this.apiClient.sendRequest<
292
- StreamResponse<GetOrCreateCallResponse>
293
- >(
287
+ const response = await this.apiClient.sendRequest<GetOrCreateCallResponse>(
294
288
  'POST',
295
289
  '/api/v2/video/call/{type}/{id}',
296
290
  pathParams,
297
291
  undefined,
298
292
  body,
299
- 'application/json',
300
293
  );
301
294
 
302
- decoders['GetOrCreateCallResponse']?.(response.body);
295
+ decoders['GetOrCreateCallResponse']?.(response);
303
296
 
304
- return { ...response.body, metadata: response.metadata };
297
+ return response;
305
298
  }
306
299
 
307
300
  async blockUser(
@@ -315,20 +308,17 @@ export class VideoApi {
315
308
  user_id: request?.user_id,
316
309
  };
317
310
 
318
- const response = await this.apiClient.sendRequest<
319
- StreamResponse<BlockUserResponse>
320
- >(
311
+ const response = await this.apiClient.sendRequest<BlockUserResponse>(
321
312
  'POST',
322
313
  '/api/v2/video/call/{type}/{id}/block',
323
314
  pathParams,
324
315
  undefined,
325
316
  body,
326
- 'application/json',
327
317
  );
328
318
 
329
- decoders['BlockUserResponse']?.(response.body);
319
+ decoders['BlockUserResponse']?.(response);
330
320
 
331
- return { ...response.body, metadata: response.metadata };
321
+ return response;
332
322
  }
333
323
 
334
324
  async sendClosedCaption(
@@ -350,20 +340,18 @@ export class VideoApi {
350
340
  user: request?.user,
351
341
  };
352
342
 
353
- const response = await this.apiClient.sendRequest<
354
- StreamResponse<SendClosedCaptionResponse>
355
- >(
356
- 'POST',
357
- '/api/v2/video/call/{type}/{id}/closed_captions',
358
- pathParams,
359
- undefined,
360
- body,
361
- 'application/json',
362
- );
343
+ const response =
344
+ await this.apiClient.sendRequest<SendClosedCaptionResponse>(
345
+ 'POST',
346
+ '/api/v2/video/call/{type}/{id}/closed_captions',
347
+ pathParams,
348
+ undefined,
349
+ body,
350
+ );
363
351
 
364
- decoders['SendClosedCaptionResponse']?.(response.body);
352
+ decoders['SendClosedCaptionResponse']?.(response);
365
353
 
366
- return { ...response.body, metadata: response.metadata };
354
+ return response;
367
355
  }
368
356
 
369
357
  async deleteCall(
@@ -377,20 +365,17 @@ export class VideoApi {
377
365
  hard: request?.hard,
378
366
  };
379
367
 
380
- const response = await this.apiClient.sendRequest<
381
- StreamResponse<DeleteCallResponse>
382
- >(
368
+ const response = await this.apiClient.sendRequest<DeleteCallResponse>(
383
369
  'POST',
384
370
  '/api/v2/video/call/{type}/{id}/delete',
385
371
  pathParams,
386
372
  undefined,
387
373
  body,
388
- 'application/json',
389
374
  );
390
375
 
391
- decoders['DeleteCallResponse']?.(response.body);
376
+ decoders['DeleteCallResponse']?.(response);
392
377
 
393
- return { ...response.body, metadata: response.metadata };
378
+ return response;
394
379
  }
395
380
 
396
381
  async sendCallEvent(
@@ -406,20 +391,17 @@ export class VideoApi {
406
391
  user: request?.user,
407
392
  };
408
393
 
409
- const response = await this.apiClient.sendRequest<
410
- StreamResponse<SendCallEventResponse>
411
- >(
394
+ const response = await this.apiClient.sendRequest<SendCallEventResponse>(
412
395
  'POST',
413
396
  '/api/v2/video/call/{type}/{id}/event',
414
397
  pathParams,
415
398
  undefined,
416
399
  body,
417
- 'application/json',
418
400
  );
419
401
 
420
- decoders['SendCallEventResponse']?.(response.body);
402
+ decoders['SendCallEventResponse']?.(response);
421
403
 
422
- return { ...response.body, metadata: response.metadata };
404
+ return response;
423
405
  }
424
406
 
425
407
  async collectUserFeedback(
@@ -438,20 +420,18 @@ export class VideoApi {
438
420
  custom: request?.custom,
439
421
  };
440
422
 
441
- const response = await this.apiClient.sendRequest<
442
- StreamResponse<CollectUserFeedbackResponse>
443
- >(
444
- 'POST',
445
- '/api/v2/video/call/{type}/{id}/feedback',
446
- pathParams,
447
- undefined,
448
- body,
449
- 'application/json',
450
- );
423
+ const response =
424
+ await this.apiClient.sendRequest<CollectUserFeedbackResponse>(
425
+ 'POST',
426
+ '/api/v2/video/call/{type}/{id}/feedback',
427
+ pathParams,
428
+ undefined,
429
+ body,
430
+ );
451
431
 
452
- decoders['CollectUserFeedbackResponse']?.(response.body);
432
+ decoders['CollectUserFeedbackResponse']?.(response);
453
433
 
454
- return { ...response.body, metadata: response.metadata };
434
+ return response;
455
435
  }
456
436
 
457
437
  async goLive(
@@ -473,20 +453,17 @@ export class VideoApi {
473
453
  transcription_storage_name: request?.transcription_storage_name,
474
454
  };
475
455
 
476
- const response = await this.apiClient.sendRequest<
477
- StreamResponse<GoLiveResponse>
478
- >(
456
+ const response = await this.apiClient.sendRequest<GoLiveResponse>(
479
457
  'POST',
480
458
  '/api/v2/video/call/{type}/{id}/go_live',
481
459
  pathParams,
482
460
  undefined,
483
461
  body,
484
- 'application/json',
485
462
  );
486
463
 
487
- decoders['GoLiveResponse']?.(response.body);
464
+ decoders['GoLiveResponse']?.(response);
488
465
 
489
- return { ...response.body, metadata: response.metadata };
466
+ return response;
490
467
  }
491
468
 
492
469
  async kickUser(
@@ -503,20 +480,17 @@ export class VideoApi {
503
480
  kicked_by: request?.kicked_by,
504
481
  };
505
482
 
506
- const response = await this.apiClient.sendRequest<
507
- StreamResponse<KickUserResponse>
508
- >(
483
+ const response = await this.apiClient.sendRequest<KickUserResponse>(
509
484
  'POST',
510
485
  '/api/v2/video/call/{type}/{id}/kick',
511
486
  pathParams,
512
487
  undefined,
513
488
  body,
514
- 'application/json',
515
489
  );
516
490
 
517
- decoders['KickUserResponse']?.(response.body);
491
+ decoders['KickUserResponse']?.(response);
518
492
 
519
- return { ...response.body, metadata: response.metadata };
493
+ return response;
520
494
  }
521
495
 
522
496
  async endCall(request: {
@@ -528,18 +502,16 @@ export class VideoApi {
528
502
  id: request?.id,
529
503
  };
530
504
 
531
- const response = await this.apiClient.sendRequest<
532
- StreamResponse<EndCallResponse>
533
- >(
505
+ const response = await this.apiClient.sendRequest<EndCallResponse>(
534
506
  'POST',
535
507
  '/api/v2/video/call/{type}/{id}/mark_ended',
536
508
  pathParams,
537
509
  undefined,
538
510
  );
539
511
 
540
- decoders['EndCallResponse']?.(response.body);
512
+ decoders['EndCallResponse']?.(response);
541
513
 
542
- return { ...response.body, metadata: response.metadata };
514
+ return response;
543
515
  }
544
516
 
545
517
  async updateCallMembers(
@@ -554,20 +526,18 @@ export class VideoApi {
554
526
  update_members: request?.update_members,
555
527
  };
556
528
 
557
- const response = await this.apiClient.sendRequest<
558
- StreamResponse<UpdateCallMembersResponse>
559
- >(
560
- 'POST',
561
- '/api/v2/video/call/{type}/{id}/members',
562
- pathParams,
563
- undefined,
564
- body,
565
- 'application/json',
566
- );
529
+ const response =
530
+ await this.apiClient.sendRequest<UpdateCallMembersResponse>(
531
+ 'POST',
532
+ '/api/v2/video/call/{type}/{id}/members',
533
+ pathParams,
534
+ undefined,
535
+ body,
536
+ );
567
537
 
568
- decoders['UpdateCallMembersResponse']?.(response.body);
538
+ decoders['UpdateCallMembersResponse']?.(response);
569
539
 
570
- return { ...response.body, metadata: response.metadata };
540
+ return response;
571
541
  }
572
542
 
573
543
  async muteUsers(
@@ -588,20 +558,17 @@ export class VideoApi {
588
558
  muted_by: request?.muted_by,
589
559
  };
590
560
 
591
- const response = await this.apiClient.sendRequest<
592
- StreamResponse<MuteUsersResponse>
593
- >(
561
+ const response = await this.apiClient.sendRequest<MuteUsersResponse>(
594
562
  'POST',
595
563
  '/api/v2/video/call/{type}/{id}/mute_users',
596
564
  pathParams,
597
565
  undefined,
598
566
  body,
599
- 'application/json',
600
567
  );
601
568
 
602
- decoders['MuteUsersResponse']?.(response.body);
569
+ decoders['MuteUsersResponse']?.(response);
603
570
 
604
- return { ...response.body, metadata: response.metadata };
571
+ return response;
605
572
  }
606
573
 
607
574
  async queryCallParticipants(
@@ -622,20 +589,18 @@ export class VideoApi {
622
589
  filter_conditions: request?.filter_conditions,
623
590
  };
624
591
 
625
- const response = await this.apiClient.sendRequest<
626
- StreamResponse<QueryCallParticipantsResponse>
627
- >(
628
- 'POST',
629
- '/api/v2/video/call/{type}/{id}/participants',
630
- pathParams,
631
- queryParams,
632
- body,
633
- 'application/json',
634
- );
592
+ const response =
593
+ await this.apiClient.sendRequest<QueryCallParticipantsResponse>(
594
+ 'POST',
595
+ '/api/v2/video/call/{type}/{id}/participants',
596
+ pathParams,
597
+ queryParams,
598
+ body,
599
+ );
635
600
 
636
- decoders['QueryCallParticipantsResponse']?.(response.body);
601
+ decoders['QueryCallParticipantsResponse']?.(response);
637
602
 
638
- return { ...response.body, metadata: response.metadata };
603
+ return response;
639
604
  }
640
605
 
641
606
  async videoPin(
@@ -650,20 +615,17 @@ export class VideoApi {
650
615
  user_id: request?.user_id,
651
616
  };
652
617
 
653
- const response = await this.apiClient.sendRequest<
654
- StreamResponse<PinResponse>
655
- >(
618
+ const response = await this.apiClient.sendRequest<PinResponse>(
656
619
  'POST',
657
620
  '/api/v2/video/call/{type}/{id}/pin',
658
621
  pathParams,
659
622
  undefined,
660
623
  body,
661
- 'application/json',
662
624
  );
663
625
 
664
- decoders['PinResponse']?.(response.body);
626
+ decoders['PinResponse']?.(response);
665
627
 
666
- return { ...response.body, metadata: response.metadata };
628
+ return response;
667
629
  }
668
630
 
669
631
  async listRecordings(request: {
@@ -675,18 +637,16 @@ export class VideoApi {
675
637
  id: request?.id,
676
638
  };
677
639
 
678
- const response = await this.apiClient.sendRequest<
679
- StreamResponse<ListRecordingsResponse>
680
- >(
640
+ const response = await this.apiClient.sendRequest<ListRecordingsResponse>(
681
641
  'GET',
682
642
  '/api/v2/video/call/{type}/{id}/recordings',
683
643
  pathParams,
684
644
  undefined,
685
645
  );
686
646
 
687
- decoders['ListRecordingsResponse']?.(response.body);
647
+ decoders['ListRecordingsResponse']?.(response);
688
648
 
689
- return { ...response.body, metadata: response.metadata };
649
+ return response;
690
650
  }
691
651
 
692
652
  async startRecording(
@@ -705,20 +665,17 @@ export class VideoApi {
705
665
  recording_external_storage: request?.recording_external_storage,
706
666
  };
707
667
 
708
- const response = await this.apiClient.sendRequest<
709
- StreamResponse<StartRecordingResponse>
710
- >(
668
+ const response = await this.apiClient.sendRequest<StartRecordingResponse>(
711
669
  'POST',
712
670
  '/api/v2/video/call/{type}/{id}/recordings/{recording_type}/start',
713
671
  pathParams,
714
672
  undefined,
715
673
  body,
716
- 'application/json',
717
674
  );
718
675
 
719
- decoders['StartRecordingResponse']?.(response.body);
676
+ decoders['StartRecordingResponse']?.(response);
720
677
 
721
- return { ...response.body, metadata: response.metadata };
678
+ return response;
722
679
  }
723
680
 
724
681
  async stopRecording(
@@ -735,20 +692,17 @@ export class VideoApi {
735
692
  };
736
693
  const body = {};
737
694
 
738
- const response = await this.apiClient.sendRequest<
739
- StreamResponse<StopRecordingResponse>
740
- >(
695
+ const response = await this.apiClient.sendRequest<StopRecordingResponse>(
741
696
  'POST',
742
697
  '/api/v2/video/call/{type}/{id}/recordings/{recording_type}/stop',
743
698
  pathParams,
744
699
  undefined,
745
700
  body,
746
- 'application/json',
747
701
  );
748
702
 
749
- decoders['StopRecordingResponse']?.(response.body);
703
+ decoders['StopRecordingResponse']?.(response);
750
704
 
751
- return { ...response.body, metadata: response.metadata };
705
+ return response;
752
706
  }
753
707
 
754
708
  async getCallReport(request: {
@@ -764,13 +718,16 @@ export class VideoApi {
764
718
  id: request?.id,
765
719
  };
766
720
 
767
- const response = await this.apiClient.sendRequest<
768
- StreamResponse<GetCallReportResponse>
769
- >('GET', '/api/v2/video/call/{type}/{id}/report', pathParams, queryParams);
721
+ const response = await this.apiClient.sendRequest<GetCallReportResponse>(
722
+ 'GET',
723
+ '/api/v2/video/call/{type}/{id}/report',
724
+ pathParams,
725
+ queryParams,
726
+ );
770
727
 
771
- decoders['GetCallReportResponse']?.(response.body);
728
+ decoders['GetCallReportResponse']?.(response);
772
729
 
773
- return { ...response.body, metadata: response.metadata };
730
+ return response;
774
731
  }
775
732
 
776
733
  async ringCall(
@@ -786,20 +743,17 @@ export class VideoApi {
786
743
  custom: request?.custom,
787
744
  };
788
745
 
789
- const response = await this.apiClient.sendRequest<
790
- StreamResponse<RingCallResponse>
791
- >(
746
+ const response = await this.apiClient.sendRequest<RingCallResponse>(
792
747
  'POST',
793
748
  '/api/v2/video/call/{type}/{id}/ring',
794
749
  pathParams,
795
750
  undefined,
796
751
  body,
797
- 'application/json',
798
752
  );
799
753
 
800
- decoders['RingCallResponse']?.(response.body);
754
+ decoders['RingCallResponse']?.(response);
801
755
 
802
- return { ...response.body, metadata: response.metadata };
756
+ return response;
803
757
  }
804
758
 
805
759
  async startRTMPBroadcasts(
@@ -813,20 +767,18 @@ export class VideoApi {
813
767
  broadcasts: request?.broadcasts,
814
768
  };
815
769
 
816
- const response = await this.apiClient.sendRequest<
817
- StreamResponse<StartRTMPBroadcastsResponse>
818
- >(
819
- 'POST',
820
- '/api/v2/video/call/{type}/{id}/rtmp_broadcasts',
821
- pathParams,
822
- undefined,
823
- body,
824
- 'application/json',
825
- );
770
+ const response =
771
+ await this.apiClient.sendRequest<StartRTMPBroadcastsResponse>(
772
+ 'POST',
773
+ '/api/v2/video/call/{type}/{id}/rtmp_broadcasts',
774
+ pathParams,
775
+ undefined,
776
+ body,
777
+ );
826
778
 
827
- decoders['StartRTMPBroadcastsResponse']?.(response.body);
779
+ decoders['StartRTMPBroadcastsResponse']?.(response);
828
780
 
829
- return { ...response.body, metadata: response.metadata };
781
+ return response;
830
782
  }
831
783
 
832
784
  async stopAllRTMPBroadcasts(request: {
@@ -838,18 +790,17 @@ export class VideoApi {
838
790
  id: request?.id,
839
791
  };
840
792
 
841
- const response = await this.apiClient.sendRequest<
842
- StreamResponse<StopAllRTMPBroadcastsResponse>
843
- >(
844
- 'POST',
845
- '/api/v2/video/call/{type}/{id}/rtmp_broadcasts/stop',
846
- pathParams,
847
- undefined,
848
- );
793
+ const response =
794
+ await this.apiClient.sendRequest<StopAllRTMPBroadcastsResponse>(
795
+ 'POST',
796
+ '/api/v2/video/call/{type}/{id}/rtmp_broadcasts/stop',
797
+ pathParams,
798
+ undefined,
799
+ );
849
800
 
850
- decoders['StopAllRTMPBroadcastsResponse']?.(response.body);
801
+ decoders['StopAllRTMPBroadcastsResponse']?.(response);
851
802
 
852
- return { ...response.body, metadata: response.metadata };
803
+ return response;
853
804
  }
854
805
 
855
806
  async stopRTMPBroadcast(
@@ -866,20 +817,18 @@ export class VideoApi {
866
817
  };
867
818
  const body = {};
868
819
 
869
- const response = await this.apiClient.sendRequest<
870
- StreamResponse<StopRTMPBroadcastsResponse>
871
- >(
872
- 'POST',
873
- '/api/v2/video/call/{type}/{id}/rtmp_broadcasts/{name}/stop',
874
- pathParams,
875
- undefined,
876
- body,
877
- 'application/json',
878
- );
820
+ const response =
821
+ await this.apiClient.sendRequest<StopRTMPBroadcastsResponse>(
822
+ 'POST',
823
+ '/api/v2/video/call/{type}/{id}/rtmp_broadcasts/{name}/stop',
824
+ pathParams,
825
+ undefined,
826
+ body,
827
+ );
879
828
 
880
- decoders['StopRTMPBroadcastsResponse']?.(response.body);
829
+ decoders['StopRTMPBroadcastsResponse']?.(response);
881
830
 
882
- return { ...response.body, metadata: response.metadata };
831
+ return response;
883
832
  }
884
833
 
885
834
  async getCallParticipantSessionMetrics(request: {
@@ -903,18 +852,17 @@ export class VideoApi {
903
852
  user_session: request?.user_session,
904
853
  };
905
854
 
906
- const response = await this.apiClient.sendRequest<
907
- StreamResponse<GetCallParticipantSessionMetricsResponse>
908
- >(
909
- 'GET',
910
- '/api/v2/video/call/{type}/{id}/session/{session}/participant/{user}/{user_session}/details/track',
911
- pathParams,
912
- queryParams,
913
- );
855
+ const response =
856
+ await this.apiClient.sendRequest<GetCallParticipantSessionMetricsResponse>(
857
+ 'GET',
858
+ '/api/v2/video/call/{type}/{id}/session/{session}/participant/{user}/{user_session}/details/track',
859
+ pathParams,
860
+ queryParams,
861
+ );
914
862
 
915
- decoders['GetCallParticipantSessionMetricsResponse']?.(response.body);
863
+ decoders['GetCallParticipantSessionMetricsResponse']?.(response);
916
864
 
917
- return { ...response.body, metadata: response.metadata };
865
+ return response;
918
866
  }
919
867
 
920
868
  async queryCallParticipantSessions(request: {
@@ -938,18 +886,17 @@ export class VideoApi {
938
886
  session: request?.session,
939
887
  };
940
888
 
941
- const response = await this.apiClient.sendRequest<
942
- StreamResponse<QueryCallParticipantSessionsResponse>
943
- >(
944
- 'GET',
945
- '/api/v2/video/call/{type}/{id}/session/{session}/participant_sessions',
946
- pathParams,
947
- queryParams,
948
- );
889
+ const response =
890
+ await this.apiClient.sendRequest<QueryCallParticipantSessionsResponse>(
891
+ 'GET',
892
+ '/api/v2/video/call/{type}/{id}/session/{session}/participant_sessions',
893
+ pathParams,
894
+ queryParams,
895
+ );
949
896
 
950
- decoders['QueryCallParticipantSessionsResponse']?.(response.body);
897
+ decoders['QueryCallParticipantSessionsResponse']?.(response);
951
898
 
952
- return { ...response.body, metadata: response.metadata };
899
+ return response;
953
900
  }
954
901
 
955
902
  async startHLSBroadcasting(request: {
@@ -961,18 +908,17 @@ export class VideoApi {
961
908
  id: request?.id,
962
909
  };
963
910
 
964
- const response = await this.apiClient.sendRequest<
965
- StreamResponse<StartHLSBroadcastingResponse>
966
- >(
967
- 'POST',
968
- '/api/v2/video/call/{type}/{id}/start_broadcasting',
969
- pathParams,
970
- undefined,
971
- );
911
+ const response =
912
+ await this.apiClient.sendRequest<StartHLSBroadcastingResponse>(
913
+ 'POST',
914
+ '/api/v2/video/call/{type}/{id}/start_broadcasting',
915
+ pathParams,
916
+ undefined,
917
+ );
972
918
 
973
- decoders['StartHLSBroadcastingResponse']?.(response.body);
919
+ decoders['StartHLSBroadcastingResponse']?.(response);
974
920
 
975
- return { ...response.body, metadata: response.metadata };
921
+ return response;
976
922
  }
977
923
 
978
924
  async startClosedCaptions(
@@ -989,20 +935,18 @@ export class VideoApi {
989
935
  speech_segment_config: request?.speech_segment_config,
990
936
  };
991
937
 
992
- const response = await this.apiClient.sendRequest<
993
- StreamResponse<StartClosedCaptionsResponse>
994
- >(
995
- 'POST',
996
- '/api/v2/video/call/{type}/{id}/start_closed_captions',
997
- pathParams,
998
- undefined,
999
- body,
1000
- 'application/json',
1001
- );
938
+ const response =
939
+ await this.apiClient.sendRequest<StartClosedCaptionsResponse>(
940
+ 'POST',
941
+ '/api/v2/video/call/{type}/{id}/start_closed_captions',
942
+ pathParams,
943
+ undefined,
944
+ body,
945
+ );
1002
946
 
1003
- decoders['StartClosedCaptionsResponse']?.(response.body);
947
+ decoders['StartClosedCaptionsResponse']?.(response);
1004
948
 
1005
- return { ...response.body, metadata: response.metadata };
949
+ return response;
1006
950
  }
1007
951
 
1008
952
  async startFrameRecording(
@@ -1016,20 +960,18 @@ export class VideoApi {
1016
960
  recording_external_storage: request?.recording_external_storage,
1017
961
  };
1018
962
 
1019
- const response = await this.apiClient.sendRequest<
1020
- StreamResponse<StartFrameRecordingResponse>
1021
- >(
1022
- 'POST',
1023
- '/api/v2/video/call/{type}/{id}/start_frame_recording',
1024
- pathParams,
1025
- undefined,
1026
- body,
1027
- 'application/json',
1028
- );
963
+ const response =
964
+ await this.apiClient.sendRequest<StartFrameRecordingResponse>(
965
+ 'POST',
966
+ '/api/v2/video/call/{type}/{id}/start_frame_recording',
967
+ pathParams,
968
+ undefined,
969
+ body,
970
+ );
1029
971
 
1030
- decoders['StartFrameRecordingResponse']?.(response.body);
972
+ decoders['StartFrameRecordingResponse']?.(response);
1031
973
 
1032
- return { ...response.body, metadata: response.metadata };
974
+ return response;
1033
975
  }
1034
976
 
1035
977
  async startTranscription(
@@ -1045,20 +987,18 @@ export class VideoApi {
1045
987
  transcription_external_storage: request?.transcription_external_storage,
1046
988
  };
1047
989
 
1048
- const response = await this.apiClient.sendRequest<
1049
- StreamResponse<StartTranscriptionResponse>
1050
- >(
1051
- 'POST',
1052
- '/api/v2/video/call/{type}/{id}/start_transcription',
1053
- pathParams,
1054
- undefined,
1055
- body,
1056
- 'application/json',
1057
- );
990
+ const response =
991
+ await this.apiClient.sendRequest<StartTranscriptionResponse>(
992
+ 'POST',
993
+ '/api/v2/video/call/{type}/{id}/start_transcription',
994
+ pathParams,
995
+ undefined,
996
+ body,
997
+ );
1058
998
 
1059
- decoders['StartTranscriptionResponse']?.(response.body);
999
+ decoders['StartTranscriptionResponse']?.(response);
1060
1000
 
1061
- return { ...response.body, metadata: response.metadata };
1001
+ return response;
1062
1002
  }
1063
1003
 
1064
1004
  async stopHLSBroadcasting(request: {
@@ -1070,18 +1010,17 @@ export class VideoApi {
1070
1010
  id: request?.id,
1071
1011
  };
1072
1012
 
1073
- const response = await this.apiClient.sendRequest<
1074
- StreamResponse<StopHLSBroadcastingResponse>
1075
- >(
1076
- 'POST',
1077
- '/api/v2/video/call/{type}/{id}/stop_broadcasting',
1078
- pathParams,
1079
- undefined,
1080
- );
1013
+ const response =
1014
+ await this.apiClient.sendRequest<StopHLSBroadcastingResponse>(
1015
+ 'POST',
1016
+ '/api/v2/video/call/{type}/{id}/stop_broadcasting',
1017
+ pathParams,
1018
+ undefined,
1019
+ );
1081
1020
 
1082
- decoders['StopHLSBroadcastingResponse']?.(response.body);
1021
+ decoders['StopHLSBroadcastingResponse']?.(response);
1083
1022
 
1084
- return { ...response.body, metadata: response.metadata };
1023
+ return response;
1085
1024
  }
1086
1025
 
1087
1026
  async stopClosedCaptions(
@@ -1095,20 +1034,18 @@ export class VideoApi {
1095
1034
  stop_transcription: request?.stop_transcription,
1096
1035
  };
1097
1036
 
1098
- const response = await this.apiClient.sendRequest<
1099
- StreamResponse<StopClosedCaptionsResponse>
1100
- >(
1101
- 'POST',
1102
- '/api/v2/video/call/{type}/{id}/stop_closed_captions',
1103
- pathParams,
1104
- undefined,
1105
- body,
1106
- 'application/json',
1107
- );
1037
+ const response =
1038
+ await this.apiClient.sendRequest<StopClosedCaptionsResponse>(
1039
+ 'POST',
1040
+ '/api/v2/video/call/{type}/{id}/stop_closed_captions',
1041
+ pathParams,
1042
+ undefined,
1043
+ body,
1044
+ );
1108
1045
 
1109
- decoders['StopClosedCaptionsResponse']?.(response.body);
1046
+ decoders['StopClosedCaptionsResponse']?.(response);
1110
1047
 
1111
- return { ...response.body, metadata: response.metadata };
1048
+ return response;
1112
1049
  }
1113
1050
 
1114
1051
  async stopFrameRecording(request: {
@@ -1120,18 +1057,17 @@ export class VideoApi {
1120
1057
  id: request?.id,
1121
1058
  };
1122
1059
 
1123
- const response = await this.apiClient.sendRequest<
1124
- StreamResponse<StopFrameRecordingResponse>
1125
- >(
1126
- 'POST',
1127
- '/api/v2/video/call/{type}/{id}/stop_frame_recording',
1128
- pathParams,
1129
- undefined,
1130
- );
1060
+ const response =
1061
+ await this.apiClient.sendRequest<StopFrameRecordingResponse>(
1062
+ 'POST',
1063
+ '/api/v2/video/call/{type}/{id}/stop_frame_recording',
1064
+ pathParams,
1065
+ undefined,
1066
+ );
1131
1067
 
1132
- decoders['StopFrameRecordingResponse']?.(response.body);
1068
+ decoders['StopFrameRecordingResponse']?.(response);
1133
1069
 
1134
- return { ...response.body, metadata: response.metadata };
1070
+ return response;
1135
1071
  }
1136
1072
 
1137
1073
  async stopLive(
@@ -1152,20 +1088,17 @@ export class VideoApi {
1152
1088
  continue_transcription: request?.continue_transcription,
1153
1089
  };
1154
1090
 
1155
- const response = await this.apiClient.sendRequest<
1156
- StreamResponse<StopLiveResponse>
1157
- >(
1091
+ const response = await this.apiClient.sendRequest<StopLiveResponse>(
1158
1092
  'POST',
1159
1093
  '/api/v2/video/call/{type}/{id}/stop_live',
1160
1094
  pathParams,
1161
1095
  undefined,
1162
1096
  body,
1163
- 'application/json',
1164
1097
  );
1165
1098
 
1166
- decoders['StopLiveResponse']?.(response.body);
1099
+ decoders['StopLiveResponse']?.(response);
1167
1100
 
1168
- return { ...response.body, metadata: response.metadata };
1101
+ return response;
1169
1102
  }
1170
1103
 
1171
1104
  async stopTranscription(
@@ -1179,20 +1112,18 @@ export class VideoApi {
1179
1112
  stop_closed_captions: request?.stop_closed_captions,
1180
1113
  };
1181
1114
 
1182
- const response = await this.apiClient.sendRequest<
1183
- StreamResponse<StopTranscriptionResponse>
1184
- >(
1185
- 'POST',
1186
- '/api/v2/video/call/{type}/{id}/stop_transcription',
1187
- pathParams,
1188
- undefined,
1189
- body,
1190
- 'application/json',
1191
- );
1115
+ const response =
1116
+ await this.apiClient.sendRequest<StopTranscriptionResponse>(
1117
+ 'POST',
1118
+ '/api/v2/video/call/{type}/{id}/stop_transcription',
1119
+ pathParams,
1120
+ undefined,
1121
+ body,
1122
+ );
1192
1123
 
1193
- decoders['StopTranscriptionResponse']?.(response.body);
1124
+ decoders['StopTranscriptionResponse']?.(response);
1194
1125
 
1195
- return { ...response.body, metadata: response.metadata };
1126
+ return response;
1196
1127
  }
1197
1128
 
1198
1129
  async listTranscriptions(request: {
@@ -1204,18 +1135,17 @@ export class VideoApi {
1204
1135
  id: request?.id,
1205
1136
  };
1206
1137
 
1207
- const response = await this.apiClient.sendRequest<
1208
- StreamResponse<ListTranscriptionsResponse>
1209
- >(
1210
- 'GET',
1211
- '/api/v2/video/call/{type}/{id}/transcriptions',
1212
- pathParams,
1213
- undefined,
1214
- );
1138
+ const response =
1139
+ await this.apiClient.sendRequest<ListTranscriptionsResponse>(
1140
+ 'GET',
1141
+ '/api/v2/video/call/{type}/{id}/transcriptions',
1142
+ pathParams,
1143
+ undefined,
1144
+ );
1215
1145
 
1216
- decoders['ListTranscriptionsResponse']?.(response.body);
1146
+ decoders['ListTranscriptionsResponse']?.(response);
1217
1147
 
1218
- return { ...response.body, metadata: response.metadata };
1148
+ return response;
1219
1149
  }
1220
1150
 
1221
1151
  async unblockUser(
@@ -1229,20 +1159,17 @@ export class VideoApi {
1229
1159
  user_id: request?.user_id,
1230
1160
  };
1231
1161
 
1232
- const response = await this.apiClient.sendRequest<
1233
- StreamResponse<UnblockUserResponse>
1234
- >(
1162
+ const response = await this.apiClient.sendRequest<UnblockUserResponse>(
1235
1163
  'POST',
1236
1164
  '/api/v2/video/call/{type}/{id}/unblock',
1237
1165
  pathParams,
1238
1166
  undefined,
1239
1167
  body,
1240
- 'application/json',
1241
1168
  );
1242
1169
 
1243
- decoders['UnblockUserResponse']?.(response.body);
1170
+ decoders['UnblockUserResponse']?.(response);
1244
1171
 
1245
- return { ...response.body, metadata: response.metadata };
1172
+ return response;
1246
1173
  }
1247
1174
 
1248
1175
  async videoUnpin(
@@ -1257,20 +1184,17 @@ export class VideoApi {
1257
1184
  user_id: request?.user_id,
1258
1185
  };
1259
1186
 
1260
- const response = await this.apiClient.sendRequest<
1261
- StreamResponse<UnpinResponse>
1262
- >(
1187
+ const response = await this.apiClient.sendRequest<UnpinResponse>(
1263
1188
  'POST',
1264
1189
  '/api/v2/video/call/{type}/{id}/unpin',
1265
1190
  pathParams,
1266
1191
  undefined,
1267
1192
  body,
1268
- 'application/json',
1269
1193
  );
1270
1194
 
1271
- decoders['UnpinResponse']?.(response.body);
1195
+ decoders['UnpinResponse']?.(response);
1272
1196
 
1273
- return { ...response.body, metadata: response.metadata };
1197
+ return response;
1274
1198
  }
1275
1199
 
1276
1200
  async updateUserPermissions(
@@ -1286,20 +1210,18 @@ export class VideoApi {
1286
1210
  revoke_permissions: request?.revoke_permissions,
1287
1211
  };
1288
1212
 
1289
- const response = await this.apiClient.sendRequest<
1290
- StreamResponse<UpdateUserPermissionsResponse>
1291
- >(
1292
- 'POST',
1293
- '/api/v2/video/call/{type}/{id}/user_permissions',
1294
- pathParams,
1295
- undefined,
1296
- body,
1297
- 'application/json',
1298
- );
1213
+ const response =
1214
+ await this.apiClient.sendRequest<UpdateUserPermissionsResponse>(
1215
+ 'POST',
1216
+ '/api/v2/video/call/{type}/{id}/user_permissions',
1217
+ pathParams,
1218
+ undefined,
1219
+ body,
1220
+ );
1299
1221
 
1300
- decoders['UpdateUserPermissionsResponse']?.(response.body);
1222
+ decoders['UpdateUserPermissionsResponse']?.(response);
1301
1223
 
1302
- return { ...response.body, metadata: response.metadata };
1224
+ return response;
1303
1225
  }
1304
1226
 
1305
1227
  async deleteRecording(request: {
@@ -1315,18 +1237,16 @@ export class VideoApi {
1315
1237
  filename: request?.filename,
1316
1238
  };
1317
1239
 
1318
- const response = await this.apiClient.sendRequest<
1319
- StreamResponse<DeleteRecordingResponse>
1320
- >(
1240
+ const response = await this.apiClient.sendRequest<DeleteRecordingResponse>(
1321
1241
  'DELETE',
1322
1242
  '/api/v2/video/call/{type}/{id}/{session}/recordings/{filename}',
1323
1243
  pathParams,
1324
1244
  undefined,
1325
1245
  );
1326
1246
 
1327
- decoders['DeleteRecordingResponse']?.(response.body);
1247
+ decoders['DeleteRecordingResponse']?.(response);
1328
1248
 
1329
- return { ...response.body, metadata: response.metadata };
1249
+ return response;
1330
1250
  }
1331
1251
 
1332
1252
  async deleteTranscription(request: {
@@ -1342,18 +1262,17 @@ export class VideoApi {
1342
1262
  filename: request?.filename,
1343
1263
  };
1344
1264
 
1345
- const response = await this.apiClient.sendRequest<
1346
- StreamResponse<DeleteTranscriptionResponse>
1347
- >(
1348
- 'DELETE',
1349
- '/api/v2/video/call/{type}/{id}/{session}/transcriptions/{filename}',
1350
- pathParams,
1351
- undefined,
1352
- );
1265
+ const response =
1266
+ await this.apiClient.sendRequest<DeleteTranscriptionResponse>(
1267
+ 'DELETE',
1268
+ '/api/v2/video/call/{type}/{id}/{session}/transcriptions/{filename}',
1269
+ pathParams,
1270
+ undefined,
1271
+ );
1353
1272
 
1354
- decoders['DeleteTranscriptionResponse']?.(response.body);
1273
+ decoders['DeleteTranscriptionResponse']?.(response);
1355
1274
 
1356
- return { ...response.body, metadata: response.metadata };
1275
+ return response;
1357
1276
  }
1358
1277
 
1359
1278
  async reportClientCallEvent(
@@ -1363,20 +1282,18 @@ export class VideoApi {
1363
1282
  events: request?.events,
1364
1283
  };
1365
1284
 
1366
- const response = await this.apiClient.sendRequest<
1367
- StreamResponse<ReportClientEventResponse>
1368
- >(
1369
- 'POST',
1370
- '/api/v2/video/call_client_event',
1371
- undefined,
1372
- undefined,
1373
- body,
1374
- 'application/json',
1375
- );
1285
+ const response =
1286
+ await this.apiClient.sendRequest<ReportClientEventResponse>(
1287
+ 'POST',
1288
+ '/api/v2/video/call_client_event',
1289
+ undefined,
1290
+ undefined,
1291
+ body,
1292
+ );
1376
1293
 
1377
- decoders['ReportClientEventResponse']?.(response.body);
1294
+ decoders['ReportClientEventResponse']?.(response);
1378
1295
 
1379
- return { ...response.body, metadata: response.metadata };
1296
+ return response;
1380
1297
  }
1381
1298
 
1382
1299
  async queryCallSessionStats(
@@ -1390,20 +1307,18 @@ export class VideoApi {
1390
1307
  filter_conditions: request?.filter_conditions,
1391
1308
  };
1392
1309
 
1393
- const response = await this.apiClient.sendRequest<
1394
- StreamResponse<QueryCallSessionStatsResponse>
1395
- >(
1396
- 'POST',
1397
- '/api/v2/video/call_stats',
1398
- undefined,
1399
- undefined,
1400
- body,
1401
- 'application/json',
1402
- );
1310
+ const response =
1311
+ await this.apiClient.sendRequest<QueryCallSessionStatsResponse>(
1312
+ 'POST',
1313
+ '/api/v2/video/call_stats',
1314
+ undefined,
1315
+ undefined,
1316
+ body,
1317
+ );
1403
1318
 
1404
- decoders['QueryCallSessionStatsResponse']?.(response.body);
1319
+ decoders['QueryCallSessionStatsResponse']?.(response);
1405
1320
 
1406
- return { ...response.body, metadata: response.metadata };
1321
+ return response;
1407
1322
  }
1408
1323
 
1409
1324
  async getCallStatsMap(request: {
@@ -1429,18 +1344,17 @@ export class VideoApi {
1429
1344
  session: request?.session,
1430
1345
  };
1431
1346
 
1432
- const response = await this.apiClient.sendRequest<
1433
- StreamResponse<QueryCallStatsMapResponse>
1434
- >(
1435
- 'GET',
1436
- '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/map',
1437
- pathParams,
1438
- queryParams,
1439
- );
1347
+ const response =
1348
+ await this.apiClient.sendRequest<QueryCallStatsMapResponse>(
1349
+ 'GET',
1350
+ '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/map',
1351
+ pathParams,
1352
+ queryParams,
1353
+ );
1440
1354
 
1441
- decoders['QueryCallStatsMapResponse']?.(response.body);
1355
+ decoders['QueryCallStatsMapResponse']?.(response);
1442
1356
 
1443
- return { ...response.body, metadata: response.metadata };
1357
+ return response;
1444
1358
  }
1445
1359
 
1446
1360
  async getCallSessionParticipantStatsDetails(request: {
@@ -1466,18 +1380,17 @@ export class VideoApi {
1466
1380
  user_session: request?.user_session,
1467
1381
  };
1468
1382
 
1469
- const response = await this.apiClient.sendRequest<
1470
- StreamResponse<GetCallSessionParticipantStatsDetailsResponse>
1471
- >(
1472
- 'GET',
1473
- '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participant/{user}/{user_session}/details',
1474
- pathParams,
1475
- queryParams,
1476
- );
1383
+ const response =
1384
+ await this.apiClient.sendRequest<GetCallSessionParticipantStatsDetailsResponse>(
1385
+ 'GET',
1386
+ '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participant/{user}/{user_session}/details',
1387
+ pathParams,
1388
+ queryParams,
1389
+ );
1477
1390
 
1478
- decoders['GetCallSessionParticipantStatsDetailsResponse']?.(response.body);
1391
+ decoders['GetCallSessionParticipantStatsDetailsResponse']?.(response);
1479
1392
 
1480
- return { ...response.body, metadata: response.metadata };
1393
+ return response;
1481
1394
  }
1482
1395
 
1483
1396
  async queryCallSessionParticipantStats(request: {
@@ -1503,18 +1416,17 @@ export class VideoApi {
1503
1416
  session: request?.session,
1504
1417
  };
1505
1418
 
1506
- const response = await this.apiClient.sendRequest<
1507
- StreamResponse<QueryCallSessionParticipantStatsResponse>
1508
- >(
1509
- 'GET',
1510
- '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participants',
1511
- pathParams,
1512
- queryParams,
1513
- );
1419
+ const response =
1420
+ await this.apiClient.sendRequest<QueryCallSessionParticipantStatsResponse>(
1421
+ 'GET',
1422
+ '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participants',
1423
+ pathParams,
1424
+ queryParams,
1425
+ );
1514
1426
 
1515
- decoders['QueryCallSessionParticipantStatsResponse']?.(response.body);
1427
+ decoders['QueryCallSessionParticipantStatsResponse']?.(response);
1516
1428
 
1517
- return { ...response.body, metadata: response.metadata };
1429
+ return response;
1518
1430
  }
1519
1431
 
1520
1432
  async getCallSessionParticipantStatsTimeline(request: {
@@ -1542,20 +1454,17 @@ export class VideoApi {
1542
1454
  user_session: request?.user_session,
1543
1455
  };
1544
1456
 
1545
- const response = await this.apiClient.sendRequest<
1546
- StreamResponse<QueryCallSessionParticipantStatsTimelineResponse>
1547
- >(
1548
- 'GET',
1549
- '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participants/{user}/{user_session}/timeline',
1550
- pathParams,
1551
- queryParams,
1552
- );
1457
+ const response =
1458
+ await this.apiClient.sendRequest<QueryCallSessionParticipantStatsTimelineResponse>(
1459
+ 'GET',
1460
+ '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participants/{user}/{user_session}/timeline',
1461
+ pathParams,
1462
+ queryParams,
1463
+ );
1553
1464
 
1554
- decoders['QueryCallSessionParticipantStatsTimelineResponse']?.(
1555
- response.body,
1556
- );
1465
+ decoders['QueryCallSessionParticipantStatsTimelineResponse']?.(response);
1557
1466
 
1558
- return { ...response.body, metadata: response.metadata };
1467
+ return response;
1559
1468
  }
1560
1469
 
1561
1470
  async queryCalls(
@@ -1569,30 +1478,30 @@ export class VideoApi {
1569
1478
  filter_conditions: request?.filter_conditions,
1570
1479
  };
1571
1480
 
1572
- const response = await this.apiClient.sendRequest<
1573
- StreamResponse<QueryCallsResponse>
1574
- >(
1481
+ const response = await this.apiClient.sendRequest<QueryCallsResponse>(
1575
1482
  'POST',
1576
1483
  '/api/v2/video/calls',
1577
1484
  undefined,
1578
1485
  undefined,
1579
1486
  body,
1580
- 'application/json',
1581
1487
  );
1582
1488
 
1583
- decoders['QueryCallsResponse']?.(response.body);
1489
+ decoders['QueryCallsResponse']?.(response);
1584
1490
 
1585
- return { ...response.body, metadata: response.metadata };
1491
+ return response;
1586
1492
  }
1587
1493
 
1588
1494
  async listCallTypes(): Promise<StreamResponse<ListCallTypeResponse>> {
1589
- const response = await this.apiClient.sendRequest<
1590
- StreamResponse<ListCallTypeResponse>
1591
- >('GET', '/api/v2/video/calltypes', undefined, undefined);
1495
+ const response = await this.apiClient.sendRequest<ListCallTypeResponse>(
1496
+ 'GET',
1497
+ '/api/v2/video/calltypes',
1498
+ undefined,
1499
+ undefined,
1500
+ );
1592
1501
 
1593
- decoders['ListCallTypeResponse']?.(response.body);
1502
+ decoders['ListCallTypeResponse']?.(response);
1594
1503
 
1595
- return { ...response.body, metadata: response.metadata };
1504
+ return response;
1596
1505
  }
1597
1506
 
1598
1507
  async createCallType(
@@ -1606,20 +1515,17 @@ export class VideoApi {
1606
1515
  settings: request?.settings,
1607
1516
  };
1608
1517
 
1609
- const response = await this.apiClient.sendRequest<
1610
- StreamResponse<CreateCallTypeResponse>
1611
- >(
1518
+ const response = await this.apiClient.sendRequest<CreateCallTypeResponse>(
1612
1519
  'POST',
1613
1520
  '/api/v2/video/calltypes',
1614
1521
  undefined,
1615
1522
  undefined,
1616
1523
  body,
1617
- 'application/json',
1618
1524
  );
1619
1525
 
1620
- decoders['CreateCallTypeResponse']?.(response.body);
1526
+ decoders['CreateCallTypeResponse']?.(response);
1621
1527
 
1622
- return { ...response.body, metadata: response.metadata };
1528
+ return response;
1623
1529
  }
1624
1530
 
1625
1531
  async deleteCallType(request: {
@@ -1629,16 +1535,16 @@ export class VideoApi {
1629
1535
  name: request?.name,
1630
1536
  };
1631
1537
 
1632
- const response = await this.apiClient.sendRequest<StreamResponse<Response>>(
1538
+ const response = await this.apiClient.sendRequest<Response>(
1633
1539
  'DELETE',
1634
1540
  '/api/v2/video/calltypes/{name}',
1635
1541
  pathParams,
1636
1542
  undefined,
1637
1543
  );
1638
1544
 
1639
- decoders['Response']?.(response.body);
1545
+ decoders['Response']?.(response);
1640
1546
 
1641
- return { ...response.body, metadata: response.metadata };
1547
+ return response;
1642
1548
  }
1643
1549
 
1644
1550
  async getCallType(request: {
@@ -1648,13 +1554,16 @@ export class VideoApi {
1648
1554
  name: request?.name,
1649
1555
  };
1650
1556
 
1651
- const response = await this.apiClient.sendRequest<
1652
- StreamResponse<GetCallTypeResponse>
1653
- >('GET', '/api/v2/video/calltypes/{name}', pathParams, undefined);
1557
+ const response = await this.apiClient.sendRequest<GetCallTypeResponse>(
1558
+ 'GET',
1559
+ '/api/v2/video/calltypes/{name}',
1560
+ pathParams,
1561
+ undefined,
1562
+ );
1654
1563
 
1655
- decoders['GetCallTypeResponse']?.(response.body);
1564
+ decoders['GetCallTypeResponse']?.(response);
1656
1565
 
1657
- return { ...response.body, metadata: response.metadata };
1566
+ return response;
1658
1567
  }
1659
1568
 
1660
1569
  async updateCallType(
@@ -1670,30 +1579,30 @@ export class VideoApi {
1670
1579
  settings: request?.settings,
1671
1580
  };
1672
1581
 
1673
- const response = await this.apiClient.sendRequest<
1674
- StreamResponse<UpdateCallTypeResponse>
1675
- >(
1582
+ const response = await this.apiClient.sendRequest<UpdateCallTypeResponse>(
1676
1583
  'PUT',
1677
1584
  '/api/v2/video/calltypes/{name}',
1678
1585
  pathParams,
1679
1586
  undefined,
1680
1587
  body,
1681
- 'application/json',
1682
1588
  );
1683
1589
 
1684
- decoders['UpdateCallTypeResponse']?.(response.body);
1590
+ decoders['UpdateCallTypeResponse']?.(response);
1685
1591
 
1686
- return { ...response.body, metadata: response.metadata };
1592
+ return response;
1687
1593
  }
1688
1594
 
1689
1595
  async getEdges(): Promise<StreamResponse<GetEdgesResponse>> {
1690
- const response = await this.apiClient.sendRequest<
1691
- StreamResponse<GetEdgesResponse>
1692
- >('GET', '/api/v2/video/edges', undefined, undefined);
1596
+ const response = await this.apiClient.sendRequest<GetEdgesResponse>(
1597
+ 'GET',
1598
+ '/api/v2/video/edges',
1599
+ undefined,
1600
+ undefined,
1601
+ );
1693
1602
 
1694
- decoders['GetEdgesResponse']?.(response.body);
1603
+ decoders['GetEdgesResponse']?.(response);
1695
1604
 
1696
- return { ...response.body, metadata: response.metadata };
1605
+ return response;
1697
1606
  }
1698
1607
 
1699
1608
  async resolveSipAuth(
@@ -1706,32 +1615,33 @@ export class VideoApi {
1706
1615
  source_ip: request?.source_ip,
1707
1616
  };
1708
1617
 
1709
- const response = await this.apiClient.sendRequest<
1710
- StreamResponse<ResolveSipAuthResponse>
1711
- >(
1618
+ const response = await this.apiClient.sendRequest<ResolveSipAuthResponse>(
1712
1619
  'POST',
1713
1620
  '/api/v2/video/sip/auth',
1714
1621
  undefined,
1715
1622
  undefined,
1716
1623
  body,
1717
- 'application/json',
1718
1624
  );
1719
1625
 
1720
- decoders['ResolveSipAuthResponse']?.(response.body);
1626
+ decoders['ResolveSipAuthResponse']?.(response);
1721
1627
 
1722
- return { ...response.body, metadata: response.metadata };
1628
+ return response;
1723
1629
  }
1724
1630
 
1725
1631
  async listSIPInboundRoutingRule(): Promise<
1726
1632
  StreamResponse<ListSIPInboundRoutingRuleResponse>
1727
1633
  > {
1728
- const response = await this.apiClient.sendRequest<
1729
- StreamResponse<ListSIPInboundRoutingRuleResponse>
1730
- >('GET', '/api/v2/video/sip/inbound_routing_rules', undefined, undefined);
1634
+ const response =
1635
+ await this.apiClient.sendRequest<ListSIPInboundRoutingRuleResponse>(
1636
+ 'GET',
1637
+ '/api/v2/video/sip/inbound_routing_rules',
1638
+ undefined,
1639
+ undefined,
1640
+ );
1731
1641
 
1732
- decoders['ListSIPInboundRoutingRuleResponse']?.(response.body);
1642
+ decoders['ListSIPInboundRoutingRuleResponse']?.(response);
1733
1643
 
1734
- return { ...response.body, metadata: response.metadata };
1644
+ return response;
1735
1645
  }
1736
1646
 
1737
1647
  async createSIPInboundRoutingRule(
@@ -1749,20 +1659,18 @@ export class VideoApi {
1749
1659
  pin_routing_configs: request?.pin_routing_configs,
1750
1660
  };
1751
1661
 
1752
- const response = await this.apiClient.sendRequest<
1753
- StreamResponse<SIPInboundRoutingRuleResponse>
1754
- >(
1755
- 'POST',
1756
- '/api/v2/video/sip/inbound_routing_rules',
1757
- undefined,
1758
- undefined,
1759
- body,
1760
- 'application/json',
1761
- );
1662
+ const response =
1663
+ await this.apiClient.sendRequest<SIPInboundRoutingRuleResponse>(
1664
+ 'POST',
1665
+ '/api/v2/video/sip/inbound_routing_rules',
1666
+ undefined,
1667
+ undefined,
1668
+ body,
1669
+ );
1762
1670
 
1763
- decoders['SIPInboundRoutingRuleResponse']?.(response.body);
1671
+ decoders['SIPInboundRoutingRuleResponse']?.(response);
1764
1672
 
1765
- return { ...response.body, metadata: response.metadata };
1673
+ return response;
1766
1674
  }
1767
1675
 
1768
1676
  async deleteSIPInboundRoutingRule(request: {
@@ -1772,18 +1680,17 @@ export class VideoApi {
1772
1680
  id: request?.id,
1773
1681
  };
1774
1682
 
1775
- const response = await this.apiClient.sendRequest<
1776
- StreamResponse<DeleteSIPInboundRoutingRuleResponse>
1777
- >(
1778
- 'DELETE',
1779
- '/api/v2/video/sip/inbound_routing_rules/{id}',
1780
- pathParams,
1781
- undefined,
1782
- );
1683
+ const response =
1684
+ await this.apiClient.sendRequest<DeleteSIPInboundRoutingRuleResponse>(
1685
+ 'DELETE',
1686
+ '/api/v2/video/sip/inbound_routing_rules/{id}',
1687
+ pathParams,
1688
+ undefined,
1689
+ );
1783
1690
 
1784
- decoders['DeleteSIPInboundRoutingRuleResponse']?.(response.body);
1691
+ decoders['DeleteSIPInboundRoutingRuleResponse']?.(response);
1785
1692
 
1786
- return { ...response.body, metadata: response.metadata };
1693
+ return response;
1787
1694
  }
1788
1695
 
1789
1696
  async updateSIPInboundRoutingRule(
@@ -1804,30 +1711,31 @@ export class VideoApi {
1804
1711
  pin_routing_configs: request?.pin_routing_configs,
1805
1712
  };
1806
1713
 
1807
- const response = await this.apiClient.sendRequest<
1808
- StreamResponse<UpdateSIPInboundRoutingRuleResponse>
1809
- >(
1810
- 'PUT',
1811
- '/api/v2/video/sip/inbound_routing_rules/{id}',
1812
- pathParams,
1813
- undefined,
1814
- body,
1815
- 'application/json',
1816
- );
1714
+ const response =
1715
+ await this.apiClient.sendRequest<UpdateSIPInboundRoutingRuleResponse>(
1716
+ 'PUT',
1717
+ '/api/v2/video/sip/inbound_routing_rules/{id}',
1718
+ pathParams,
1719
+ undefined,
1720
+ body,
1721
+ );
1817
1722
 
1818
- decoders['UpdateSIPInboundRoutingRuleResponse']?.(response.body);
1723
+ decoders['UpdateSIPInboundRoutingRuleResponse']?.(response);
1819
1724
 
1820
- return { ...response.body, metadata: response.metadata };
1725
+ return response;
1821
1726
  }
1822
1727
 
1823
1728
  async listSIPTrunks(): Promise<StreamResponse<ListSIPTrunksResponse>> {
1824
- const response = await this.apiClient.sendRequest<
1825
- StreamResponse<ListSIPTrunksResponse>
1826
- >('GET', '/api/v2/video/sip/inbound_trunks', undefined, undefined);
1729
+ const response = await this.apiClient.sendRequest<ListSIPTrunksResponse>(
1730
+ 'GET',
1731
+ '/api/v2/video/sip/inbound_trunks',
1732
+ undefined,
1733
+ undefined,
1734
+ );
1827
1735
 
1828
- decoders['ListSIPTrunksResponse']?.(response.body);
1736
+ decoders['ListSIPTrunksResponse']?.(response);
1829
1737
 
1830
- return { ...response.body, metadata: response.metadata };
1738
+ return response;
1831
1739
  }
1832
1740
 
1833
1741
  async createSIPTrunk(
@@ -1840,20 +1748,17 @@ export class VideoApi {
1840
1748
  allowed_ips: request?.allowed_ips,
1841
1749
  };
1842
1750
 
1843
- const response = await this.apiClient.sendRequest<
1844
- StreamResponse<CreateSIPTrunkResponse>
1845
- >(
1751
+ const response = await this.apiClient.sendRequest<CreateSIPTrunkResponse>(
1846
1752
  'POST',
1847
1753
  '/api/v2/video/sip/inbound_trunks',
1848
1754
  undefined,
1849
1755
  undefined,
1850
1756
  body,
1851
- 'application/json',
1852
1757
  );
1853
1758
 
1854
- decoders['CreateSIPTrunkResponse']?.(response.body);
1759
+ decoders['CreateSIPTrunkResponse']?.(response);
1855
1760
 
1856
- return { ...response.body, metadata: response.metadata };
1761
+ return response;
1857
1762
  }
1858
1763
 
1859
1764
  async deleteSIPTrunk(request: {
@@ -1863,13 +1768,16 @@ export class VideoApi {
1863
1768
  id: request?.id,
1864
1769
  };
1865
1770
 
1866
- const response = await this.apiClient.sendRequest<
1867
- StreamResponse<DeleteSIPTrunkResponse>
1868
- >('DELETE', '/api/v2/video/sip/inbound_trunks/{id}', pathParams, undefined);
1771
+ const response = await this.apiClient.sendRequest<DeleteSIPTrunkResponse>(
1772
+ 'DELETE',
1773
+ '/api/v2/video/sip/inbound_trunks/{id}',
1774
+ pathParams,
1775
+ undefined,
1776
+ );
1869
1777
 
1870
- decoders['DeleteSIPTrunkResponse']?.(response.body);
1778
+ decoders['DeleteSIPTrunkResponse']?.(response);
1871
1779
 
1872
- return { ...response.body, metadata: response.metadata };
1780
+ return response;
1873
1781
  }
1874
1782
 
1875
1783
  async updateSIPTrunk(
@@ -1885,20 +1793,17 @@ export class VideoApi {
1885
1793
  allowed_ips: request?.allowed_ips,
1886
1794
  };
1887
1795
 
1888
- const response = await this.apiClient.sendRequest<
1889
- StreamResponse<UpdateSIPTrunkResponse>
1890
- >(
1796
+ const response = await this.apiClient.sendRequest<UpdateSIPTrunkResponse>(
1891
1797
  'PUT',
1892
1798
  '/api/v2/video/sip/inbound_trunks/{id}',
1893
1799
  pathParams,
1894
1800
  undefined,
1895
1801
  body,
1896
- 'application/json',
1897
1802
  );
1898
1803
 
1899
- decoders['UpdateSIPTrunkResponse']?.(response.body);
1804
+ decoders['UpdateSIPTrunkResponse']?.(response);
1900
1805
 
1901
- return { ...response.body, metadata: response.metadata };
1806
+ return response;
1902
1807
  }
1903
1808
 
1904
1809
  async resolveSipInbound(
@@ -1913,20 +1818,18 @@ export class VideoApi {
1913
1818
  sip_headers: request?.sip_headers,
1914
1819
  };
1915
1820
 
1916
- const response = await this.apiClient.sendRequest<
1917
- StreamResponse<ResolveSipInboundResponse>
1918
- >(
1919
- 'POST',
1920
- '/api/v2/video/sip/resolve',
1921
- undefined,
1922
- undefined,
1923
- body,
1924
- 'application/json',
1925
- );
1821
+ const response =
1822
+ await this.apiClient.sendRequest<ResolveSipInboundResponse>(
1823
+ 'POST',
1824
+ '/api/v2/video/sip/resolve',
1825
+ undefined,
1826
+ undefined,
1827
+ body,
1828
+ );
1926
1829
 
1927
- decoders['ResolveSipInboundResponse']?.(response.body);
1830
+ decoders['ResolveSipInboundResponse']?.(response);
1928
1831
 
1929
- return { ...response.body, metadata: response.metadata };
1832
+ return response;
1930
1833
  }
1931
1834
 
1932
1835
  async queryAggregateCallStats(
@@ -1938,20 +1841,18 @@ export class VideoApi {
1938
1841
  report_types: request?.report_types,
1939
1842
  };
1940
1843
 
1941
- const response = await this.apiClient.sendRequest<
1942
- StreamResponse<QueryAggregateCallStatsResponse>
1943
- >(
1944
- 'POST',
1945
- '/api/v2/video/stats',
1946
- undefined,
1947
- undefined,
1948
- body,
1949
- 'application/json',
1950
- );
1844
+ const response =
1845
+ await this.apiClient.sendRequest<QueryAggregateCallStatsResponse>(
1846
+ 'POST',
1847
+ '/api/v2/video/stats',
1848
+ undefined,
1849
+ undefined,
1850
+ body,
1851
+ );
1951
1852
 
1952
- decoders['QueryAggregateCallStatsResponse']?.(response.body);
1853
+ decoders['QueryAggregateCallStatsResponse']?.(response);
1953
1854
 
1954
- return { ...response.body, metadata: response.metadata };
1855
+ return response;
1955
1856
  }
1956
1857
 
1957
1858
  async getDailyDigest(request?: {
@@ -1963,12 +1864,15 @@ export class VideoApi {
1963
1864
  target_app_id: request?.target_app_id,
1964
1865
  };
1965
1866
 
1966
- const response = await this.apiClient.sendRequest<
1967
- StreamResponse<GetDailyDigestResponse>
1968
- >('GET', '/api/v2/video/stats/daily_digest', undefined, queryParams);
1867
+ const response = await this.apiClient.sendRequest<GetDailyDigestResponse>(
1868
+ 'GET',
1869
+ '/api/v2/video/stats/daily_digest',
1870
+ undefined,
1871
+ queryParams,
1872
+ );
1969
1873
 
1970
- decoders['GetDailyDigestResponse']?.(response.body);
1874
+ decoders['GetDailyDigestResponse']?.(response);
1971
1875
 
1972
- return { ...response.body, metadata: response.metadata };
1876
+ return response;
1973
1877
  }
1974
1878
  }