@@ -2,12 +2,10 @@ import { StreamCall } from './StreamCall';
22import { StreamClient } from './StreamClient' ;
33import {
44 CheckExternalStorageRequest ,
5- DefaultApi ,
65 DeleteCallTypeRequest ,
76 DeleteExternalStorageRequest ,
87 GetCallTypeRequest ,
9- ServerSideApi ,
10- SettingsApi ,
8+ ProductvideoApi ,
119 VideoCreateCallTypeRequest ,
1210 VideoCreateExternalStorageRequest ,
1311 VideoQueryCallsRequest ,
@@ -16,15 +14,11 @@ import {
1614} from './gen/video' ;
1715
1816export class StreamVideoClient {
19- private readonly apiClient : DefaultApi ;
20- private readonly videoServerSideApiClient : ServerSideApi ;
21- private readonly settingsApi : SettingsApi ;
17+ private readonly apiClient : ProductvideoApi ;
2218
2319 constructor ( private readonly streamClient : StreamClient ) {
2420 const configuration = this . streamClient . getConfiguration ( 'video' ) ;
25- this . apiClient = new DefaultApi ( configuration ) ;
26- this . settingsApi = new SettingsApi ( configuration ) ;
27- this . videoServerSideApiClient = new ServerSideApi ( configuration ) ;
21+ this . apiClient = new ProductvideoApi ( configuration ) ;
2822 }
2923
3024 call = ( type : string , id : string ) => {
@@ -38,60 +32,60 @@ export class StreamVideoClient {
3832 } ;
3933
4034 createCallType = ( videoCreateCallTypeRequest : VideoCreateCallTypeRequest ) => {
41- return this . videoServerSideApiClient . createCallType ( {
35+ return this . apiClient . createCallType ( {
4236 videoCreateCallTypeRequest,
4337 } ) ;
4438 } ;
4539
4640 deleteCallType = ( request : DeleteCallTypeRequest ) => {
47- return this . videoServerSideApiClient . deleteCallType ( request ) ;
41+ return this . apiClient . deleteCallType ( request ) ;
4842 } ;
4943
5044 getCallType = ( request : GetCallTypeRequest ) => {
51- return this . videoServerSideApiClient . getCallType ( request ) ;
45+ return this . apiClient . getCallType ( request ) ;
5246 } ;
5347
5448 listCallTypes = ( ) => {
55- return this . videoServerSideApiClient . listCallTypes ( ) ;
49+ return this . apiClient . listCallTypes ( ) ;
5650 } ;
5751
5852 updateCallType = (
5953 name : string ,
6054 videoUpdateCallTypeRequest : VideoUpdateCallTypeRequest ,
6155 ) => {
62- return this . videoServerSideApiClient . updateCallType ( {
56+ return this . apiClient . updateCallType ( {
6357 name,
6458 videoUpdateCallTypeRequest,
6559 } ) ;
6660 } ;
6761
6862 listExternalStorages = ( ) => {
69- return this . settingsApi . listExternalStorage ( ) ;
63+ return this . apiClient . listExternalStorage ( ) ;
7064 } ;
7165
7266 createExternalStorage = (
7367 videoCreateExternalStorageRequest : VideoCreateExternalStorageRequest ,
7468 ) => {
75- return this . settingsApi . createExternalStorage ( {
69+ return this . apiClient . createExternalStorage ( {
7670 videoCreateExternalStorageRequest,
7771 } ) ;
7872 } ;
7973
8074 deleteExternalStorage = ( request : DeleteExternalStorageRequest ) => {
81- return this . settingsApi . deleteExternalStorage ( request ) ;
75+ return this . apiClient . deleteExternalStorage ( request ) ;
8276 } ;
8377
8478 updateExternalStorage = (
8579 name : string ,
8680 videoUpdateExternalStorageRequest : VideoUpdateExternalStorageRequest ,
8781 ) => {
88- return this . videoServerSideApiClient . updateExternalStorage ( {
82+ return this . apiClient . updateExternalStorage ( {
8983 name,
9084 videoUpdateExternalStorageRequest,
9185 } ) ;
9286 } ;
9387
9488 checkExternalStorage = ( request : CheckExternalStorageRequest ) => {
95- return this . videoServerSideApiClient . checkExternalStorage ( request ) ;
89+ return this . apiClient . checkExternalStorage ( request ) ;
9690 } ;
9791}
0 commit comments