@stream-io/node-sdk 0.8.7 → 0.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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(
@@ -783,22 +740,20 @@ export class VideoApi {
783
740
  const body = {
784
741
  video: request?.video,
785
742
  members_ids: request?.members_ids,
743
+ custom: request?.custom,
786
744
  };
787
745
 
788
- const response = await this.apiClient.sendRequest<
789
- StreamResponse<RingCallResponse>
790
- >(
746
+ const response = await this.apiClient.sendRequest<RingCallResponse>(
791
747
  'POST',
792
748
  '/api/v2/video/call/{type}/{id}/ring',
793
749
  pathParams,
794
750
  undefined,
795
751
  body,
796
- 'application/json',
797
752
  );
798
753
 
799
- decoders['RingCallResponse']?.(response.body);
754
+ decoders['RingCallResponse']?.(response);
800
755
 
801
- return { ...response.body, metadata: response.metadata };
756
+ return response;
802
757
  }
803
758
 
804
759
  async startRTMPBroadcasts(
@@ -812,20 +767,18 @@ export class VideoApi {
812
767
  broadcasts: request?.broadcasts,
813
768
  };
814
769
 
815
- const response = await this.apiClient.sendRequest<
816
- StreamResponse<StartRTMPBroadcastsResponse>
817
- >(
818
- 'POST',
819
- '/api/v2/video/call/{type}/{id}/rtmp_broadcasts',
820
- pathParams,
821
- undefined,
822
- body,
823
- 'application/json',
824
- );
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
+ );
825
778
 
826
- decoders['StartRTMPBroadcastsResponse']?.(response.body);
779
+ decoders['StartRTMPBroadcastsResponse']?.(response);
827
780
 
828
- return { ...response.body, metadata: response.metadata };
781
+ return response;
829
782
  }
830
783
 
831
784
  async stopAllRTMPBroadcasts(request: {
@@ -837,18 +790,17 @@ export class VideoApi {
837
790
  id: request?.id,
838
791
  };
839
792
 
840
- const response = await this.apiClient.sendRequest<
841
- StreamResponse<StopAllRTMPBroadcastsResponse>
842
- >(
843
- 'POST',
844
- '/api/v2/video/call/{type}/{id}/rtmp_broadcasts/stop',
845
- pathParams,
846
- undefined,
847
- );
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
+ );
848
800
 
849
- decoders['StopAllRTMPBroadcastsResponse']?.(response.body);
801
+ decoders['StopAllRTMPBroadcastsResponse']?.(response);
850
802
 
851
- return { ...response.body, metadata: response.metadata };
803
+ return response;
852
804
  }
853
805
 
854
806
  async stopRTMPBroadcast(
@@ -865,20 +817,18 @@ export class VideoApi {
865
817
  };
866
818
  const body = {};
867
819
 
868
- const response = await this.apiClient.sendRequest<
869
- StreamResponse<StopRTMPBroadcastsResponse>
870
- >(
871
- 'POST',
872
- '/api/v2/video/call/{type}/{id}/rtmp_broadcasts/{name}/stop',
873
- pathParams,
874
- undefined,
875
- body,
876
- 'application/json',
877
- );
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
+ );
878
828
 
879
- decoders['StopRTMPBroadcastsResponse']?.(response.body);
829
+ decoders['StopRTMPBroadcastsResponse']?.(response);
880
830
 
881
- return { ...response.body, metadata: response.metadata };
831
+ return response;
882
832
  }
883
833
 
884
834
  async getCallParticipantSessionMetrics(request: {
@@ -902,18 +852,17 @@ export class VideoApi {
902
852
  user_session: request?.user_session,
903
853
  };
904
854
 
905
- const response = await this.apiClient.sendRequest<
906
- StreamResponse<GetCallParticipantSessionMetricsResponse>
907
- >(
908
- 'GET',
909
- '/api/v2/video/call/{type}/{id}/session/{session}/participant/{user}/{user_session}/details/track',
910
- pathParams,
911
- queryParams,
912
- );
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
+ );
913
862
 
914
- decoders['GetCallParticipantSessionMetricsResponse']?.(response.body);
863
+ decoders['GetCallParticipantSessionMetricsResponse']?.(response);
915
864
 
916
- return { ...response.body, metadata: response.metadata };
865
+ return response;
917
866
  }
918
867
 
919
868
  async queryCallParticipantSessions(request: {
@@ -937,18 +886,17 @@ export class VideoApi {
937
886
  session: request?.session,
938
887
  };
939
888
 
940
- const response = await this.apiClient.sendRequest<
941
- StreamResponse<QueryCallParticipantSessionsResponse>
942
- >(
943
- 'GET',
944
- '/api/v2/video/call/{type}/{id}/session/{session}/participant_sessions',
945
- pathParams,
946
- queryParams,
947
- );
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
+ );
948
896
 
949
- decoders['QueryCallParticipantSessionsResponse']?.(response.body);
897
+ decoders['QueryCallParticipantSessionsResponse']?.(response);
950
898
 
951
- return { ...response.body, metadata: response.metadata };
899
+ return response;
952
900
  }
953
901
 
954
902
  async startHLSBroadcasting(request: {
@@ -960,18 +908,17 @@ export class VideoApi {
960
908
  id: request?.id,
961
909
  };
962
910
 
963
- const response = await this.apiClient.sendRequest<
964
- StreamResponse<StartHLSBroadcastingResponse>
965
- >(
966
- 'POST',
967
- '/api/v2/video/call/{type}/{id}/start_broadcasting',
968
- pathParams,
969
- undefined,
970
- );
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
+ );
971
918
 
972
- decoders['StartHLSBroadcastingResponse']?.(response.body);
919
+ decoders['StartHLSBroadcastingResponse']?.(response);
973
920
 
974
- return { ...response.body, metadata: response.metadata };
921
+ return response;
975
922
  }
976
923
 
977
924
  async startClosedCaptions(
@@ -988,20 +935,18 @@ export class VideoApi {
988
935
  speech_segment_config: request?.speech_segment_config,
989
936
  };
990
937
 
991
- const response = await this.apiClient.sendRequest<
992
- StreamResponse<StartClosedCaptionsResponse>
993
- >(
994
- 'POST',
995
- '/api/v2/video/call/{type}/{id}/start_closed_captions',
996
- pathParams,
997
- undefined,
998
- body,
999
- 'application/json',
1000
- );
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
+ );
1001
946
 
1002
- decoders['StartClosedCaptionsResponse']?.(response.body);
947
+ decoders['StartClosedCaptionsResponse']?.(response);
1003
948
 
1004
- return { ...response.body, metadata: response.metadata };
949
+ return response;
1005
950
  }
1006
951
 
1007
952
  async startFrameRecording(
@@ -1015,20 +960,18 @@ export class VideoApi {
1015
960
  recording_external_storage: request?.recording_external_storage,
1016
961
  };
1017
962
 
1018
- const response = await this.apiClient.sendRequest<
1019
- StreamResponse<StartFrameRecordingResponse>
1020
- >(
1021
- 'POST',
1022
- '/api/v2/video/call/{type}/{id}/start_frame_recording',
1023
- pathParams,
1024
- undefined,
1025
- body,
1026
- 'application/json',
1027
- );
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
+ );
1028
971
 
1029
- decoders['StartFrameRecordingResponse']?.(response.body);
972
+ decoders['StartFrameRecordingResponse']?.(response);
1030
973
 
1031
- return { ...response.body, metadata: response.metadata };
974
+ return response;
1032
975
  }
1033
976
 
1034
977
  async startTranscription(
@@ -1044,20 +987,18 @@ export class VideoApi {
1044
987
  transcription_external_storage: request?.transcription_external_storage,
1045
988
  };
1046
989
 
1047
- const response = await this.apiClient.sendRequest<
1048
- StreamResponse<StartTranscriptionResponse>
1049
- >(
1050
- 'POST',
1051
- '/api/v2/video/call/{type}/{id}/start_transcription',
1052
- pathParams,
1053
- undefined,
1054
- body,
1055
- 'application/json',
1056
- );
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
+ );
1057
998
 
1058
- decoders['StartTranscriptionResponse']?.(response.body);
999
+ decoders['StartTranscriptionResponse']?.(response);
1059
1000
 
1060
- return { ...response.body, metadata: response.metadata };
1001
+ return response;
1061
1002
  }
1062
1003
 
1063
1004
  async stopHLSBroadcasting(request: {
@@ -1069,18 +1010,17 @@ export class VideoApi {
1069
1010
  id: request?.id,
1070
1011
  };
1071
1012
 
1072
- const response = await this.apiClient.sendRequest<
1073
- StreamResponse<StopHLSBroadcastingResponse>
1074
- >(
1075
- 'POST',
1076
- '/api/v2/video/call/{type}/{id}/stop_broadcasting',
1077
- pathParams,
1078
- undefined,
1079
- );
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
+ );
1080
1020
 
1081
- decoders['StopHLSBroadcastingResponse']?.(response.body);
1021
+ decoders['StopHLSBroadcastingResponse']?.(response);
1082
1022
 
1083
- return { ...response.body, metadata: response.metadata };
1023
+ return response;
1084
1024
  }
1085
1025
 
1086
1026
  async stopClosedCaptions(
@@ -1094,20 +1034,18 @@ export class VideoApi {
1094
1034
  stop_transcription: request?.stop_transcription,
1095
1035
  };
1096
1036
 
1097
- const response = await this.apiClient.sendRequest<
1098
- StreamResponse<StopClosedCaptionsResponse>
1099
- >(
1100
- 'POST',
1101
- '/api/v2/video/call/{type}/{id}/stop_closed_captions',
1102
- pathParams,
1103
- undefined,
1104
- body,
1105
- 'application/json',
1106
- );
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
+ );
1107
1045
 
1108
- decoders['StopClosedCaptionsResponse']?.(response.body);
1046
+ decoders['StopClosedCaptionsResponse']?.(response);
1109
1047
 
1110
- return { ...response.body, metadata: response.metadata };
1048
+ return response;
1111
1049
  }
1112
1050
 
1113
1051
  async stopFrameRecording(request: {
@@ -1119,18 +1057,17 @@ export class VideoApi {
1119
1057
  id: request?.id,
1120
1058
  };
1121
1059
 
1122
- const response = await this.apiClient.sendRequest<
1123
- StreamResponse<StopFrameRecordingResponse>
1124
- >(
1125
- 'POST',
1126
- '/api/v2/video/call/{type}/{id}/stop_frame_recording',
1127
- pathParams,
1128
- undefined,
1129
- );
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
+ );
1130
1067
 
1131
- decoders['StopFrameRecordingResponse']?.(response.body);
1068
+ decoders['StopFrameRecordingResponse']?.(response);
1132
1069
 
1133
- return { ...response.body, metadata: response.metadata };
1070
+ return response;
1134
1071
  }
1135
1072
 
1136
1073
  async stopLive(
@@ -1151,20 +1088,17 @@ export class VideoApi {
1151
1088
  continue_transcription: request?.continue_transcription,
1152
1089
  };
1153
1090
 
1154
- const response = await this.apiClient.sendRequest<
1155
- StreamResponse<StopLiveResponse>
1156
- >(
1091
+ const response = await this.apiClient.sendRequest<StopLiveResponse>(
1157
1092
  'POST',
1158
1093
  '/api/v2/video/call/{type}/{id}/stop_live',
1159
1094
  pathParams,
1160
1095
  undefined,
1161
1096
  body,
1162
- 'application/json',
1163
1097
  );
1164
1098
 
1165
- decoders['StopLiveResponse']?.(response.body);
1099
+ decoders['StopLiveResponse']?.(response);
1166
1100
 
1167
- return { ...response.body, metadata: response.metadata };
1101
+ return response;
1168
1102
  }
1169
1103
 
1170
1104
  async stopTranscription(
@@ -1178,20 +1112,18 @@ export class VideoApi {
1178
1112
  stop_closed_captions: request?.stop_closed_captions,
1179
1113
  };
1180
1114
 
1181
- const response = await this.apiClient.sendRequest<
1182
- StreamResponse<StopTranscriptionResponse>
1183
- >(
1184
- 'POST',
1185
- '/api/v2/video/call/{type}/{id}/stop_transcription',
1186
- pathParams,
1187
- undefined,
1188
- body,
1189
- 'application/json',
1190
- );
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
+ );
1191
1123
 
1192
- decoders['StopTranscriptionResponse']?.(response.body);
1124
+ decoders['StopTranscriptionResponse']?.(response);
1193
1125
 
1194
- return { ...response.body, metadata: response.metadata };
1126
+ return response;
1195
1127
  }
1196
1128
 
1197
1129
  async listTranscriptions(request: {
@@ -1203,18 +1135,17 @@ export class VideoApi {
1203
1135
  id: request?.id,
1204
1136
  };
1205
1137
 
1206
- const response = await this.apiClient.sendRequest<
1207
- StreamResponse<ListTranscriptionsResponse>
1208
- >(
1209
- 'GET',
1210
- '/api/v2/video/call/{type}/{id}/transcriptions',
1211
- pathParams,
1212
- undefined,
1213
- );
1138
+ const response =
1139
+ await this.apiClient.sendRequest<ListTranscriptionsResponse>(
1140
+ 'GET',
1141
+ '/api/v2/video/call/{type}/{id}/transcriptions',
1142
+ pathParams,
1143
+ undefined,
1144
+ );
1214
1145
 
1215
- decoders['ListTranscriptionsResponse']?.(response.body);
1146
+ decoders['ListTranscriptionsResponse']?.(response);
1216
1147
 
1217
- return { ...response.body, metadata: response.metadata };
1148
+ return response;
1218
1149
  }
1219
1150
 
1220
1151
  async unblockUser(
@@ -1228,20 +1159,17 @@ export class VideoApi {
1228
1159
  user_id: request?.user_id,
1229
1160
  };
1230
1161
 
1231
- const response = await this.apiClient.sendRequest<
1232
- StreamResponse<UnblockUserResponse>
1233
- >(
1162
+ const response = await this.apiClient.sendRequest<UnblockUserResponse>(
1234
1163
  'POST',
1235
1164
  '/api/v2/video/call/{type}/{id}/unblock',
1236
1165
  pathParams,
1237
1166
  undefined,
1238
1167
  body,
1239
- 'application/json',
1240
1168
  );
1241
1169
 
1242
- decoders['UnblockUserResponse']?.(response.body);
1170
+ decoders['UnblockUserResponse']?.(response);
1243
1171
 
1244
- return { ...response.body, metadata: response.metadata };
1172
+ return response;
1245
1173
  }
1246
1174
 
1247
1175
  async videoUnpin(
@@ -1256,20 +1184,17 @@ export class VideoApi {
1256
1184
  user_id: request?.user_id,
1257
1185
  };
1258
1186
 
1259
- const response = await this.apiClient.sendRequest<
1260
- StreamResponse<UnpinResponse>
1261
- >(
1187
+ const response = await this.apiClient.sendRequest<UnpinResponse>(
1262
1188
  'POST',
1263
1189
  '/api/v2/video/call/{type}/{id}/unpin',
1264
1190
  pathParams,
1265
1191
  undefined,
1266
1192
  body,
1267
- 'application/json',
1268
1193
  );
1269
1194
 
1270
- decoders['UnpinResponse']?.(response.body);
1195
+ decoders['UnpinResponse']?.(response);
1271
1196
 
1272
- return { ...response.body, metadata: response.metadata };
1197
+ return response;
1273
1198
  }
1274
1199
 
1275
1200
  async updateUserPermissions(
@@ -1285,20 +1210,18 @@ export class VideoApi {
1285
1210
  revoke_permissions: request?.revoke_permissions,
1286
1211
  };
1287
1212
 
1288
- const response = await this.apiClient.sendRequest<
1289
- StreamResponse<UpdateUserPermissionsResponse>
1290
- >(
1291
- 'POST',
1292
- '/api/v2/video/call/{type}/{id}/user_permissions',
1293
- pathParams,
1294
- undefined,
1295
- body,
1296
- 'application/json',
1297
- );
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
+ );
1298
1221
 
1299
- decoders['UpdateUserPermissionsResponse']?.(response.body);
1222
+ decoders['UpdateUserPermissionsResponse']?.(response);
1300
1223
 
1301
- return { ...response.body, metadata: response.metadata };
1224
+ return response;
1302
1225
  }
1303
1226
 
1304
1227
  async deleteRecording(request: {
@@ -1314,18 +1237,16 @@ export class VideoApi {
1314
1237
  filename: request?.filename,
1315
1238
  };
1316
1239
 
1317
- const response = await this.apiClient.sendRequest<
1318
- StreamResponse<DeleteRecordingResponse>
1319
- >(
1240
+ const response = await this.apiClient.sendRequest<DeleteRecordingResponse>(
1320
1241
  'DELETE',
1321
1242
  '/api/v2/video/call/{type}/{id}/{session}/recordings/{filename}',
1322
1243
  pathParams,
1323
1244
  undefined,
1324
1245
  );
1325
1246
 
1326
- decoders['DeleteRecordingResponse']?.(response.body);
1247
+ decoders['DeleteRecordingResponse']?.(response);
1327
1248
 
1328
- return { ...response.body, metadata: response.metadata };
1249
+ return response;
1329
1250
  }
1330
1251
 
1331
1252
  async deleteTranscription(request: {
@@ -1341,18 +1262,17 @@ export class VideoApi {
1341
1262
  filename: request?.filename,
1342
1263
  };
1343
1264
 
1344
- const response = await this.apiClient.sendRequest<
1345
- StreamResponse<DeleteTranscriptionResponse>
1346
- >(
1347
- 'DELETE',
1348
- '/api/v2/video/call/{type}/{id}/{session}/transcriptions/{filename}',
1349
- pathParams,
1350
- undefined,
1351
- );
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
+ );
1352
1272
 
1353
- decoders['DeleteTranscriptionResponse']?.(response.body);
1273
+ decoders['DeleteTranscriptionResponse']?.(response);
1354
1274
 
1355
- return { ...response.body, metadata: response.metadata };
1275
+ return response;
1356
1276
  }
1357
1277
 
1358
1278
  async reportClientCallEvent(
@@ -1362,20 +1282,18 @@ export class VideoApi {
1362
1282
  events: request?.events,
1363
1283
  };
1364
1284
 
1365
- const response = await this.apiClient.sendRequest<
1366
- StreamResponse<ReportClientEventResponse>
1367
- >(
1368
- 'POST',
1369
- '/api/v2/video/call_client_event',
1370
- undefined,
1371
- undefined,
1372
- body,
1373
- 'application/json',
1374
- );
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
+ );
1375
1293
 
1376
- decoders['ReportClientEventResponse']?.(response.body);
1294
+ decoders['ReportClientEventResponse']?.(response);
1377
1295
 
1378
- return { ...response.body, metadata: response.metadata };
1296
+ return response;
1379
1297
  }
1380
1298
 
1381
1299
  async queryCallSessionStats(
@@ -1389,20 +1307,18 @@ export class VideoApi {
1389
1307
  filter_conditions: request?.filter_conditions,
1390
1308
  };
1391
1309
 
1392
- const response = await this.apiClient.sendRequest<
1393
- StreamResponse<QueryCallSessionStatsResponse>
1394
- >(
1395
- 'POST',
1396
- '/api/v2/video/call_stats',
1397
- undefined,
1398
- undefined,
1399
- body,
1400
- 'application/json',
1401
- );
1310
+ const response =
1311
+ await this.apiClient.sendRequest<QueryCallSessionStatsResponse>(
1312
+ 'POST',
1313
+ '/api/v2/video/call_stats',
1314
+ undefined,
1315
+ undefined,
1316
+ body,
1317
+ );
1402
1318
 
1403
- decoders['QueryCallSessionStatsResponse']?.(response.body);
1319
+ decoders['QueryCallSessionStatsResponse']?.(response);
1404
1320
 
1405
- return { ...response.body, metadata: response.metadata };
1321
+ return response;
1406
1322
  }
1407
1323
 
1408
1324
  async getCallStatsMap(request: {
@@ -1428,18 +1344,17 @@ export class VideoApi {
1428
1344
  session: request?.session,
1429
1345
  };
1430
1346
 
1431
- const response = await this.apiClient.sendRequest<
1432
- StreamResponse<QueryCallStatsMapResponse>
1433
- >(
1434
- 'GET',
1435
- '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/map',
1436
- pathParams,
1437
- queryParams,
1438
- );
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
+ );
1439
1354
 
1440
- decoders['QueryCallStatsMapResponse']?.(response.body);
1355
+ decoders['QueryCallStatsMapResponse']?.(response);
1441
1356
 
1442
- return { ...response.body, metadata: response.metadata };
1357
+ return response;
1443
1358
  }
1444
1359
 
1445
1360
  async getCallSessionParticipantStatsDetails(request: {
@@ -1465,18 +1380,17 @@ export class VideoApi {
1465
1380
  user_session: request?.user_session,
1466
1381
  };
1467
1382
 
1468
- const response = await this.apiClient.sendRequest<
1469
- StreamResponse<GetCallSessionParticipantStatsDetailsResponse>
1470
- >(
1471
- 'GET',
1472
- '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participant/{user}/{user_session}/details',
1473
- pathParams,
1474
- queryParams,
1475
- );
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
+ );
1476
1390
 
1477
- decoders['GetCallSessionParticipantStatsDetailsResponse']?.(response.body);
1391
+ decoders['GetCallSessionParticipantStatsDetailsResponse']?.(response);
1478
1392
 
1479
- return { ...response.body, metadata: response.metadata };
1393
+ return response;
1480
1394
  }
1481
1395
 
1482
1396
  async queryCallSessionParticipantStats(request: {
@@ -1502,18 +1416,17 @@ export class VideoApi {
1502
1416
  session: request?.session,
1503
1417
  };
1504
1418
 
1505
- const response = await this.apiClient.sendRequest<
1506
- StreamResponse<QueryCallSessionParticipantStatsResponse>
1507
- >(
1508
- 'GET',
1509
- '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participants',
1510
- pathParams,
1511
- queryParams,
1512
- );
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
+ );
1513
1426
 
1514
- decoders['QueryCallSessionParticipantStatsResponse']?.(response.body);
1427
+ decoders['QueryCallSessionParticipantStatsResponse']?.(response);
1515
1428
 
1516
- return { ...response.body, metadata: response.metadata };
1429
+ return response;
1517
1430
  }
1518
1431
 
1519
1432
  async getCallSessionParticipantStatsTimeline(request: {
@@ -1541,20 +1454,17 @@ export class VideoApi {
1541
1454
  user_session: request?.user_session,
1542
1455
  };
1543
1456
 
1544
- const response = await this.apiClient.sendRequest<
1545
- StreamResponse<QueryCallSessionParticipantStatsTimelineResponse>
1546
- >(
1547
- 'GET',
1548
- '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participants/{user}/{user_session}/timeline',
1549
- pathParams,
1550
- queryParams,
1551
- );
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
+ );
1552
1464
 
1553
- decoders['QueryCallSessionParticipantStatsTimelineResponse']?.(
1554
- response.body,
1555
- );
1465
+ decoders['QueryCallSessionParticipantStatsTimelineResponse']?.(response);
1556
1466
 
1557
- return { ...response.body, metadata: response.metadata };
1467
+ return response;
1558
1468
  }
1559
1469
 
1560
1470
  async queryCalls(
@@ -1568,30 +1478,30 @@ export class VideoApi {
1568
1478
  filter_conditions: request?.filter_conditions,
1569
1479
  };
1570
1480
 
1571
- const response = await this.apiClient.sendRequest<
1572
- StreamResponse<QueryCallsResponse>
1573
- >(
1481
+ const response = await this.apiClient.sendRequest<QueryCallsResponse>(
1574
1482
  'POST',
1575
1483
  '/api/v2/video/calls',
1576
1484
  undefined,
1577
1485
  undefined,
1578
1486
  body,
1579
- 'application/json',
1580
1487
  );
1581
1488
 
1582
- decoders['QueryCallsResponse']?.(response.body);
1489
+ decoders['QueryCallsResponse']?.(response);
1583
1490
 
1584
- return { ...response.body, metadata: response.metadata };
1491
+ return response;
1585
1492
  }
1586
1493
 
1587
1494
  async listCallTypes(): Promise<StreamResponse<ListCallTypeResponse>> {
1588
- const response = await this.apiClient.sendRequest<
1589
- StreamResponse<ListCallTypeResponse>
1590
- >('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
+ );
1591
1501
 
1592
- decoders['ListCallTypeResponse']?.(response.body);
1502
+ decoders['ListCallTypeResponse']?.(response);
1593
1503
 
1594
- return { ...response.body, metadata: response.metadata };
1504
+ return response;
1595
1505
  }
1596
1506
 
1597
1507
  async createCallType(
@@ -1605,20 +1515,17 @@ export class VideoApi {
1605
1515
  settings: request?.settings,
1606
1516
  };
1607
1517
 
1608
- const response = await this.apiClient.sendRequest<
1609
- StreamResponse<CreateCallTypeResponse>
1610
- >(
1518
+ const response = await this.apiClient.sendRequest<CreateCallTypeResponse>(
1611
1519
  'POST',
1612
1520
  '/api/v2/video/calltypes',
1613
1521
  undefined,
1614
1522
  undefined,
1615
1523
  body,
1616
- 'application/json',
1617
1524
  );
1618
1525
 
1619
- decoders['CreateCallTypeResponse']?.(response.body);
1526
+ decoders['CreateCallTypeResponse']?.(response);
1620
1527
 
1621
- return { ...response.body, metadata: response.metadata };
1528
+ return response;
1622
1529
  }
1623
1530
 
1624
1531
  async deleteCallType(request: {
@@ -1628,16 +1535,16 @@ export class VideoApi {
1628
1535
  name: request?.name,
1629
1536
  };
1630
1537
 
1631
- const response = await this.apiClient.sendRequest<StreamResponse<Response>>(
1538
+ const response = await this.apiClient.sendRequest<Response>(
1632
1539
  'DELETE',
1633
1540
  '/api/v2/video/calltypes/{name}',
1634
1541
  pathParams,
1635
1542
  undefined,
1636
1543
  );
1637
1544
 
1638
- decoders['Response']?.(response.body);
1545
+ decoders['Response']?.(response);
1639
1546
 
1640
- return { ...response.body, metadata: response.metadata };
1547
+ return response;
1641
1548
  }
1642
1549
 
1643
1550
  async getCallType(request: {
@@ -1647,13 +1554,16 @@ export class VideoApi {
1647
1554
  name: request?.name,
1648
1555
  };
1649
1556
 
1650
- const response = await this.apiClient.sendRequest<
1651
- StreamResponse<GetCallTypeResponse>
1652
- >('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
+ );
1653
1563
 
1654
- decoders['GetCallTypeResponse']?.(response.body);
1564
+ decoders['GetCallTypeResponse']?.(response);
1655
1565
 
1656
- return { ...response.body, metadata: response.metadata };
1566
+ return response;
1657
1567
  }
1658
1568
 
1659
1569
  async updateCallType(
@@ -1669,30 +1579,30 @@ export class VideoApi {
1669
1579
  settings: request?.settings,
1670
1580
  };
1671
1581
 
1672
- const response = await this.apiClient.sendRequest<
1673
- StreamResponse<UpdateCallTypeResponse>
1674
- >(
1582
+ const response = await this.apiClient.sendRequest<UpdateCallTypeResponse>(
1675
1583
  'PUT',
1676
1584
  '/api/v2/video/calltypes/{name}',
1677
1585
  pathParams,
1678
1586
  undefined,
1679
1587
  body,
1680
- 'application/json',
1681
1588
  );
1682
1589
 
1683
- decoders['UpdateCallTypeResponse']?.(response.body);
1590
+ decoders['UpdateCallTypeResponse']?.(response);
1684
1591
 
1685
- return { ...response.body, metadata: response.metadata };
1592
+ return response;
1686
1593
  }
1687
1594
 
1688
1595
  async getEdges(): Promise<StreamResponse<GetEdgesResponse>> {
1689
- const response = await this.apiClient.sendRequest<
1690
- StreamResponse<GetEdgesResponse>
1691
- >('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
+ );
1692
1602
 
1693
- decoders['GetEdgesResponse']?.(response.body);
1603
+ decoders['GetEdgesResponse']?.(response);
1694
1604
 
1695
- return { ...response.body, metadata: response.metadata };
1605
+ return response;
1696
1606
  }
1697
1607
 
1698
1608
  async resolveSipAuth(
@@ -1705,32 +1615,33 @@ export class VideoApi {
1705
1615
  source_ip: request?.source_ip,
1706
1616
  };
1707
1617
 
1708
- const response = await this.apiClient.sendRequest<
1709
- StreamResponse<ResolveSipAuthResponse>
1710
- >(
1618
+ const response = await this.apiClient.sendRequest<ResolveSipAuthResponse>(
1711
1619
  'POST',
1712
1620
  '/api/v2/video/sip/auth',
1713
1621
  undefined,
1714
1622
  undefined,
1715
1623
  body,
1716
- 'application/json',
1717
1624
  );
1718
1625
 
1719
- decoders['ResolveSipAuthResponse']?.(response.body);
1626
+ decoders['ResolveSipAuthResponse']?.(response);
1720
1627
 
1721
- return { ...response.body, metadata: response.metadata };
1628
+ return response;
1722
1629
  }
1723
1630
 
1724
1631
  async listSIPInboundRoutingRule(): Promise<
1725
1632
  StreamResponse<ListSIPInboundRoutingRuleResponse>
1726
1633
  > {
1727
- const response = await this.apiClient.sendRequest<
1728
- StreamResponse<ListSIPInboundRoutingRuleResponse>
1729
- >('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
+ );
1730
1641
 
1731
- decoders['ListSIPInboundRoutingRuleResponse']?.(response.body);
1642
+ decoders['ListSIPInboundRoutingRuleResponse']?.(response);
1732
1643
 
1733
- return { ...response.body, metadata: response.metadata };
1644
+ return response;
1734
1645
  }
1735
1646
 
1736
1647
  async createSIPInboundRoutingRule(
@@ -1748,20 +1659,18 @@ export class VideoApi {
1748
1659
  pin_routing_configs: request?.pin_routing_configs,
1749
1660
  };
1750
1661
 
1751
- const response = await this.apiClient.sendRequest<
1752
- StreamResponse<SIPInboundRoutingRuleResponse>
1753
- >(
1754
- 'POST',
1755
- '/api/v2/video/sip/inbound_routing_rules',
1756
- undefined,
1757
- undefined,
1758
- body,
1759
- 'application/json',
1760
- );
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
+ );
1761
1670
 
1762
- decoders['SIPInboundRoutingRuleResponse']?.(response.body);
1671
+ decoders['SIPInboundRoutingRuleResponse']?.(response);
1763
1672
 
1764
- return { ...response.body, metadata: response.metadata };
1673
+ return response;
1765
1674
  }
1766
1675
 
1767
1676
  async deleteSIPInboundRoutingRule(request: {
@@ -1771,18 +1680,17 @@ export class VideoApi {
1771
1680
  id: request?.id,
1772
1681
  };
1773
1682
 
1774
- const response = await this.apiClient.sendRequest<
1775
- StreamResponse<DeleteSIPInboundRoutingRuleResponse>
1776
- >(
1777
- 'DELETE',
1778
- '/api/v2/video/sip/inbound_routing_rules/{id}',
1779
- pathParams,
1780
- undefined,
1781
- );
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
+ );
1782
1690
 
1783
- decoders['DeleteSIPInboundRoutingRuleResponse']?.(response.body);
1691
+ decoders['DeleteSIPInboundRoutingRuleResponse']?.(response);
1784
1692
 
1785
- return { ...response.body, metadata: response.metadata };
1693
+ return response;
1786
1694
  }
1787
1695
 
1788
1696
  async updateSIPInboundRoutingRule(
@@ -1803,30 +1711,31 @@ export class VideoApi {
1803
1711
  pin_routing_configs: request?.pin_routing_configs,
1804
1712
  };
1805
1713
 
1806
- const response = await this.apiClient.sendRequest<
1807
- StreamResponse<UpdateSIPInboundRoutingRuleResponse>
1808
- >(
1809
- 'PUT',
1810
- '/api/v2/video/sip/inbound_routing_rules/{id}',
1811
- pathParams,
1812
- undefined,
1813
- body,
1814
- 'application/json',
1815
- );
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
+ );
1816
1722
 
1817
- decoders['UpdateSIPInboundRoutingRuleResponse']?.(response.body);
1723
+ decoders['UpdateSIPInboundRoutingRuleResponse']?.(response);
1818
1724
 
1819
- return { ...response.body, metadata: response.metadata };
1725
+ return response;
1820
1726
  }
1821
1727
 
1822
1728
  async listSIPTrunks(): Promise<StreamResponse<ListSIPTrunksResponse>> {
1823
- const response = await this.apiClient.sendRequest<
1824
- StreamResponse<ListSIPTrunksResponse>
1825
- >('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
+ );
1826
1735
 
1827
- decoders['ListSIPTrunksResponse']?.(response.body);
1736
+ decoders['ListSIPTrunksResponse']?.(response);
1828
1737
 
1829
- return { ...response.body, metadata: response.metadata };
1738
+ return response;
1830
1739
  }
1831
1740
 
1832
1741
  async createSIPTrunk(
@@ -1839,20 +1748,17 @@ export class VideoApi {
1839
1748
  allowed_ips: request?.allowed_ips,
1840
1749
  };
1841
1750
 
1842
- const response = await this.apiClient.sendRequest<
1843
- StreamResponse<CreateSIPTrunkResponse>
1844
- >(
1751
+ const response = await this.apiClient.sendRequest<CreateSIPTrunkResponse>(
1845
1752
  'POST',
1846
1753
  '/api/v2/video/sip/inbound_trunks',
1847
1754
  undefined,
1848
1755
  undefined,
1849
1756
  body,
1850
- 'application/json',
1851
1757
  );
1852
1758
 
1853
- decoders['CreateSIPTrunkResponse']?.(response.body);
1759
+ decoders['CreateSIPTrunkResponse']?.(response);
1854
1760
 
1855
- return { ...response.body, metadata: response.metadata };
1761
+ return response;
1856
1762
  }
1857
1763
 
1858
1764
  async deleteSIPTrunk(request: {
@@ -1862,13 +1768,16 @@ export class VideoApi {
1862
1768
  id: request?.id,
1863
1769
  };
1864
1770
 
1865
- const response = await this.apiClient.sendRequest<
1866
- StreamResponse<DeleteSIPTrunkResponse>
1867
- >('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
+ );
1868
1777
 
1869
- decoders['DeleteSIPTrunkResponse']?.(response.body);
1778
+ decoders['DeleteSIPTrunkResponse']?.(response);
1870
1779
 
1871
- return { ...response.body, metadata: response.metadata };
1780
+ return response;
1872
1781
  }
1873
1782
 
1874
1783
  async updateSIPTrunk(
@@ -1884,20 +1793,17 @@ export class VideoApi {
1884
1793
  allowed_ips: request?.allowed_ips,
1885
1794
  };
1886
1795
 
1887
- const response = await this.apiClient.sendRequest<
1888
- StreamResponse<UpdateSIPTrunkResponse>
1889
- >(
1796
+ const response = await this.apiClient.sendRequest<UpdateSIPTrunkResponse>(
1890
1797
  'PUT',
1891
1798
  '/api/v2/video/sip/inbound_trunks/{id}',
1892
1799
  pathParams,
1893
1800
  undefined,
1894
1801
  body,
1895
- 'application/json',
1896
1802
  );
1897
1803
 
1898
- decoders['UpdateSIPTrunkResponse']?.(response.body);
1804
+ decoders['UpdateSIPTrunkResponse']?.(response);
1899
1805
 
1900
- return { ...response.body, metadata: response.metadata };
1806
+ return response;
1901
1807
  }
1902
1808
 
1903
1809
  async resolveSipInbound(
@@ -1912,20 +1818,18 @@ export class VideoApi {
1912
1818
  sip_headers: request?.sip_headers,
1913
1819
  };
1914
1820
 
1915
- const response = await this.apiClient.sendRequest<
1916
- StreamResponse<ResolveSipInboundResponse>
1917
- >(
1918
- 'POST',
1919
- '/api/v2/video/sip/resolve',
1920
- undefined,
1921
- undefined,
1922
- body,
1923
- 'application/json',
1924
- );
1821
+ const response =
1822
+ await this.apiClient.sendRequest<ResolveSipInboundResponse>(
1823
+ 'POST',
1824
+ '/api/v2/video/sip/resolve',
1825
+ undefined,
1826
+ undefined,
1827
+ body,
1828
+ );
1925
1829
 
1926
- decoders['ResolveSipInboundResponse']?.(response.body);
1830
+ decoders['ResolveSipInboundResponse']?.(response);
1927
1831
 
1928
- return { ...response.body, metadata: response.metadata };
1832
+ return response;
1929
1833
  }
1930
1834
 
1931
1835
  async queryAggregateCallStats(
@@ -1937,20 +1841,18 @@ export class VideoApi {
1937
1841
  report_types: request?.report_types,
1938
1842
  };
1939
1843
 
1940
- const response = await this.apiClient.sendRequest<
1941
- StreamResponse<QueryAggregateCallStatsResponse>
1942
- >(
1943
- 'POST',
1944
- '/api/v2/video/stats',
1945
- undefined,
1946
- undefined,
1947
- body,
1948
- 'application/json',
1949
- );
1844
+ const response =
1845
+ await this.apiClient.sendRequest<QueryAggregateCallStatsResponse>(
1846
+ 'POST',
1847
+ '/api/v2/video/stats',
1848
+ undefined,
1849
+ undefined,
1850
+ body,
1851
+ );
1950
1852
 
1951
- decoders['QueryAggregateCallStatsResponse']?.(response.body);
1853
+ decoders['QueryAggregateCallStatsResponse']?.(response);
1952
1854
 
1953
- return { ...response.body, metadata: response.metadata };
1855
+ return response;
1954
1856
  }
1955
1857
 
1956
1858
  async getDailyDigest(request?: {
@@ -1962,12 +1864,15 @@ export class VideoApi {
1962
1864
  target_app_id: request?.target_app_id,
1963
1865
  };
1964
1866
 
1965
- const response = await this.apiClient.sendRequest<
1966
- StreamResponse<GetDailyDigestResponse>
1967
- >('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
+ );
1968
1873
 
1969
- decoders['GetDailyDigestResponse']?.(response.body);
1874
+ decoders['GetDailyDigestResponse']?.(response);
1970
1875
 
1971
- return { ...response.body, metadata: response.metadata };
1876
+ return response;
1972
1877
  }
1973
1878
  }