@stream-io/node-sdk 0.1.9 → 0.1.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.
- package/dist/index.cjs.js +311 -57
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +311 -57
- package/dist/index.es.js.map +1 -1
- package/dist/src/StreamCall.d.ts +2 -2
- package/dist/src/StreamClient.d.ts +3 -3
- package/dist/src/StreamVideoClient.d.ts +7 -1
- package/dist/src/gen/video/apis/DefaultApi.d.ts +4 -3
- package/dist/src/gen/video/apis/ServerSideApi.d.ts +30 -3
- package/dist/src/gen/video/apis/SettingsApi.d.ts +54 -0
- package/dist/src/gen/video/apis/index.d.ts +1 -0
- package/dist/src/gen/video/models/index.d.ts +425 -1450
- package/dist/src/gen/video/runtime.d.ts +2 -2
- package/package.json +1 -1
- package/src/StreamCall.ts +7 -7
- package/src/StreamClient.ts +21 -2
- package/src/StreamVideoClient.ts +38 -5
- package/src/gen/video/.openapi-generator/FILES +1 -0
- package/src/gen/video/apis/DefaultApi.ts +39 -30
- package/src/gen/video/apis/ServerSideApi.ts +114 -7
- package/src/gen/video/apis/SettingsApi.ts +169 -0
- package/src/gen/video/apis/index.ts +1 -0
- package/src/gen/video/models/index.ts +428 -1353
- package/src/gen/video/runtime.ts +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Stream
|
|
2
|
+
* Stream API
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document:
|
|
5
|
+
* The version of the OpenAPI document: v98.0.2-ingress-test.3
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/package.json
CHANGED
package/src/StreamCall.ts
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
VideoUpdateCallMembersRequest,
|
|
14
14
|
VideoUpdateUserPermissionsRequest,
|
|
15
15
|
VideoQueryMembersRequest,
|
|
16
|
+
VideoStartRecordingRequest,
|
|
16
17
|
} from './gen/video';
|
|
17
18
|
import { OmitTypeId } from './types';
|
|
18
19
|
|
|
@@ -26,11 +27,7 @@ export class StreamCall {
|
|
|
26
27
|
private readonly id: string,
|
|
27
28
|
) {
|
|
28
29
|
this.baseRequest = { id: this.id, type: this.type };
|
|
29
|
-
const configuration = this.streamClient.getConfiguration(
|
|
30
|
-
basePath:
|
|
31
|
-
this.streamClient.options.basePath ??
|
|
32
|
-
'https://video.stream-io-api.com/video',
|
|
33
|
-
});
|
|
30
|
+
const configuration = this.streamClient.getConfiguration('video');
|
|
34
31
|
this.apiClient = new DefaultApi(configuration);
|
|
35
32
|
}
|
|
36
33
|
|
|
@@ -97,8 +94,11 @@ export class StreamCall {
|
|
|
97
94
|
return this.apiClient.startHLSBroadcasting({ ...this.baseRequest });
|
|
98
95
|
};
|
|
99
96
|
|
|
100
|
-
startRecording = () => {
|
|
101
|
-
return this.apiClient.startRecording({
|
|
97
|
+
startRecording = (request?: VideoStartRecordingRequest) => {
|
|
98
|
+
return this.apiClient.startRecording({
|
|
99
|
+
...this.baseRequest,
|
|
100
|
+
videoStartRecordingRequest: request ?? {},
|
|
101
|
+
});
|
|
102
102
|
};
|
|
103
103
|
|
|
104
104
|
startTranscription = () => {
|
package/src/StreamClient.ts
CHANGED
|
@@ -57,6 +57,7 @@ import {
|
|
|
57
57
|
} from './gen/video';
|
|
58
58
|
import { v4 as uuidv4 } from 'uuid';
|
|
59
59
|
import { JWTServerToken, JWTUserToken } from './utils/create-token';
|
|
60
|
+
import crypto from 'crypto';
|
|
60
61
|
|
|
61
62
|
export interface StreamClientOptions {
|
|
62
63
|
timeout?: number;
|
|
@@ -428,7 +429,21 @@ export class StreamClient {
|
|
|
428
429
|
return this.tasksApi.getTask(request);
|
|
429
430
|
};
|
|
430
431
|
|
|
431
|
-
|
|
432
|
+
verifyWebhook = (requestBody: string | Buffer, xSignature: string) => {
|
|
433
|
+
const key = Buffer.from(this.secret, 'utf8');
|
|
434
|
+
const hash = crypto
|
|
435
|
+
.createHmac('sha256', key)
|
|
436
|
+
.update(requestBody)
|
|
437
|
+
.digest('hex');
|
|
438
|
+
|
|
439
|
+
try {
|
|
440
|
+
return crypto.timingSafeEqual(Buffer.from(hash), Buffer.from(xSignature));
|
|
441
|
+
} catch (err) {
|
|
442
|
+
return false;
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
getConfiguration = (product: 'chat' | 'video' = 'chat') => {
|
|
432
447
|
return new Configuration({
|
|
433
448
|
apiKey: (name: string) => {
|
|
434
449
|
const mapping: Record<string, string> = {
|
|
@@ -439,7 +454,11 @@ export class StreamClient {
|
|
|
439
454
|
|
|
440
455
|
return mapping[name];
|
|
441
456
|
},
|
|
442
|
-
basePath:
|
|
457
|
+
basePath:
|
|
458
|
+
this.options.basePath ??
|
|
459
|
+
(product === 'chat'
|
|
460
|
+
? 'https://chat.stream-io-api.com'
|
|
461
|
+
: 'https://video.stream-io-api.com'),
|
|
443
462
|
headers: {
|
|
444
463
|
'X-Stream-Client': 'stream-node-' + process.env.PKG_VERSION,
|
|
445
464
|
},
|
package/src/StreamVideoClient.ts
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
import { StreamCall } from './StreamCall';
|
|
2
2
|
import { StreamClient } from './StreamClient';
|
|
3
3
|
import {
|
|
4
|
+
CheckExternalStorageRequest,
|
|
4
5
|
DefaultApi,
|
|
5
6
|
DeleteCallTypeRequest,
|
|
7
|
+
DeleteExternalStorageRequest,
|
|
6
8
|
GetCallTypeRequest,
|
|
7
9
|
ServerSideApi,
|
|
10
|
+
SettingsApi,
|
|
8
11
|
VideoCreateCallTypeRequest,
|
|
12
|
+
VideoCreateExternalStorageRequest,
|
|
9
13
|
VideoQueryCallsRequest,
|
|
10
14
|
VideoUpdateCallTypeRequest,
|
|
15
|
+
VideoUpdateExternalStorageRequest,
|
|
11
16
|
} from './gen/video';
|
|
12
17
|
|
|
13
18
|
export class StreamVideoClient {
|
|
14
19
|
private readonly apiClient: DefaultApi;
|
|
15
20
|
private readonly videoServerSideApiClient: ServerSideApi;
|
|
21
|
+
private readonly settingsApi: SettingsApi;
|
|
16
22
|
|
|
17
23
|
constructor(private readonly streamClient: StreamClient) {
|
|
18
|
-
const configuration = this.streamClient.getConfiguration(
|
|
19
|
-
basePath:
|
|
20
|
-
this.streamClient.options.basePath ??
|
|
21
|
-
'https://video.stream-io-api.com/video',
|
|
22
|
-
});
|
|
24
|
+
const configuration = this.streamClient.getConfiguration('video');
|
|
23
25
|
this.apiClient = new DefaultApi(configuration);
|
|
26
|
+
this.settingsApi = new SettingsApi(configuration);
|
|
24
27
|
this.videoServerSideApiClient = new ServerSideApi(configuration);
|
|
25
28
|
}
|
|
26
29
|
|
|
@@ -61,4 +64,34 @@ export class StreamVideoClient {
|
|
|
61
64
|
videoUpdateCallTypeRequest,
|
|
62
65
|
});
|
|
63
66
|
};
|
|
67
|
+
|
|
68
|
+
listExternalStorages = () => {
|
|
69
|
+
return this.settingsApi.listExternalStorage();
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
createExternalStorage = (
|
|
73
|
+
videoCreateExternalStorageRequest: VideoCreateExternalStorageRequest,
|
|
74
|
+
) => {
|
|
75
|
+
return this.settingsApi.createExternalStorage({
|
|
76
|
+
videoCreateExternalStorageRequest,
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
deleteExternalStorage = (request: DeleteExternalStorageRequest) => {
|
|
81
|
+
return this.settingsApi.deleteExternalStorage(request);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
updateExternalStorage = (
|
|
85
|
+
name: string,
|
|
86
|
+
videoUpdateExternalStorageRequest: VideoUpdateExternalStorageRequest,
|
|
87
|
+
) => {
|
|
88
|
+
return this.videoServerSideApiClient.updateExternalStorage({
|
|
89
|
+
name,
|
|
90
|
+
videoUpdateExternalStorageRequest,
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
checkExternalStorage = (request: CheckExternalStorageRequest) => {
|
|
95
|
+
return this.videoServerSideApiClient.checkExternalStorage(request);
|
|
96
|
+
};
|
|
64
97
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
* Stream
|
|
4
|
+
* Stream API
|
|
5
5
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document:
|
|
7
|
+
* The version of the OpenAPI document: v98.0.2-ingress-test.3
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -42,6 +42,7 @@ import type {
|
|
|
42
42
|
VideoSendEventRequest,
|
|
43
43
|
VideoSendEventResponse,
|
|
44
44
|
VideoStartHLSBroadcastingResponse,
|
|
45
|
+
VideoStartRecordingRequest,
|
|
45
46
|
VideoStartRecordingResponse,
|
|
46
47
|
VideoStartTranscriptionResponse,
|
|
47
48
|
VideoStopHLSBroadcastingResponse,
|
|
@@ -145,6 +146,7 @@ export interface StartHLSBroadcastingRequest {
|
|
|
145
146
|
export interface StartRecordingRequest {
|
|
146
147
|
type: string;
|
|
147
148
|
id: string;
|
|
149
|
+
videoStartRecordingRequest: VideoStartRecordingRequest | null;
|
|
148
150
|
}
|
|
149
151
|
|
|
150
152
|
export interface StartTranscriptionRequest {
|
|
@@ -253,7 +255,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
253
255
|
}
|
|
254
256
|
|
|
255
257
|
const response = await this.request({
|
|
256
|
-
path: `/call/{type}/{id}/block`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
258
|
+
path: `/video/call/{type}/{id}/block`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
257
259
|
method: 'POST',
|
|
258
260
|
headers: headerParameters,
|
|
259
261
|
query: queryParameters,
|
|
@@ -300,7 +302,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
300
302
|
}
|
|
301
303
|
|
|
302
304
|
const response = await this.request({
|
|
303
|
-
path: `/devices`,
|
|
305
|
+
path: `/video/devices`,
|
|
304
306
|
method: 'POST',
|
|
305
307
|
headers: headerParameters,
|
|
306
308
|
query: queryParameters,
|
|
@@ -347,7 +349,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
347
349
|
}
|
|
348
350
|
|
|
349
351
|
const response = await this.request({
|
|
350
|
-
path: `/guest`,
|
|
352
|
+
path: `/video/guest`,
|
|
351
353
|
method: 'POST',
|
|
352
354
|
headers: headerParameters,
|
|
353
355
|
query: queryParameters,
|
|
@@ -396,7 +398,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
396
398
|
}
|
|
397
399
|
|
|
398
400
|
const response = await this.request({
|
|
399
|
-
path: `/devices`,
|
|
401
|
+
path: `/video/devices`,
|
|
400
402
|
method: 'DELETE',
|
|
401
403
|
headers: headerParameters,
|
|
402
404
|
query: queryParameters,
|
|
@@ -444,7 +446,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
444
446
|
}
|
|
445
447
|
|
|
446
448
|
const response = await this.request({
|
|
447
|
-
path: `/call/{type}/{id}/mark_ended`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
449
|
+
path: `/video/call/{type}/{id}/mark_ended`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
448
450
|
method: 'POST',
|
|
449
451
|
headers: headerParameters,
|
|
450
452
|
query: queryParameters,
|
|
@@ -508,7 +510,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
508
510
|
}
|
|
509
511
|
|
|
510
512
|
const response = await this.request({
|
|
511
|
-
path: `/call/{type}/{id}`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
513
|
+
path: `/video/call/{type}/{id}`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
512
514
|
method: 'GET',
|
|
513
515
|
headers: headerParameters,
|
|
514
516
|
query: queryParameters,
|
|
@@ -548,7 +550,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
548
550
|
}
|
|
549
551
|
|
|
550
552
|
const response = await this.request({
|
|
551
|
-
path: `/edges`,
|
|
553
|
+
path: `/video/edges`,
|
|
552
554
|
method: 'GET',
|
|
553
555
|
headers: headerParameters,
|
|
554
556
|
query: queryParameters,
|
|
@@ -606,7 +608,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
606
608
|
}
|
|
607
609
|
|
|
608
610
|
const response = await this.request({
|
|
609
|
-
path: `/call/{type}/{id}`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
611
|
+
path: `/video/call/{type}/{id}`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
610
612
|
method: 'POST',
|
|
611
613
|
headers: headerParameters,
|
|
612
614
|
query: queryParameters,
|
|
@@ -661,7 +663,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
661
663
|
}
|
|
662
664
|
|
|
663
665
|
const response = await this.request({
|
|
664
|
-
path: `/call/{type}/{id}/go_live`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
666
|
+
path: `/video/call/{type}/{id}/go_live`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
665
667
|
method: 'POST',
|
|
666
668
|
headers: headerParameters,
|
|
667
669
|
query: queryParameters,
|
|
@@ -706,7 +708,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
706
708
|
}
|
|
707
709
|
|
|
708
710
|
const response = await this.request({
|
|
709
|
-
path: `/devices`,
|
|
711
|
+
path: `/video/devices`,
|
|
710
712
|
method: 'GET',
|
|
711
713
|
headers: headerParameters,
|
|
712
714
|
query: queryParameters,
|
|
@@ -754,7 +756,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
754
756
|
}
|
|
755
757
|
|
|
756
758
|
const response = await this.request({
|
|
757
|
-
path: `/call/{type}/{id}/recordings`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
759
|
+
path: `/video/call/{type}/{id}/recordings`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
758
760
|
method: 'GET',
|
|
759
761
|
headers: headerParameters,
|
|
760
762
|
query: queryParameters,
|
|
@@ -808,7 +810,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
808
810
|
}
|
|
809
811
|
|
|
810
812
|
const response = await this.request({
|
|
811
|
-
path: `/call/{type}/{id}/mute_users`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
813
|
+
path: `/video/call/{type}/{id}/mute_users`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
812
814
|
method: 'POST',
|
|
813
815
|
headers: headerParameters,
|
|
814
816
|
query: queryParameters,
|
|
@@ -859,7 +861,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
859
861
|
}
|
|
860
862
|
|
|
861
863
|
const response = await this.request({
|
|
862
|
-
path: `/calls`,
|
|
864
|
+
path: `/video/calls`,
|
|
863
865
|
method: 'POST',
|
|
864
866
|
headers: headerParameters,
|
|
865
867
|
query: queryParameters,
|
|
@@ -906,7 +908,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
906
908
|
}
|
|
907
909
|
|
|
908
910
|
const response = await this.request({
|
|
909
|
-
path: `/call/members`,
|
|
911
|
+
path: `/video/call/members`,
|
|
910
912
|
method: 'POST',
|
|
911
913
|
headers: headerParameters,
|
|
912
914
|
query: queryParameters,
|
|
@@ -961,7 +963,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
961
963
|
}
|
|
962
964
|
|
|
963
965
|
const response = await this.request({
|
|
964
|
-
path: `/call/{type}/{id}/event`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
966
|
+
path: `/video/call/{type}/{id}/event`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
965
967
|
method: 'POST',
|
|
966
968
|
headers: headerParameters,
|
|
967
969
|
query: queryParameters,
|
|
@@ -1010,7 +1012,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1010
1012
|
}
|
|
1011
1013
|
|
|
1012
1014
|
const response = await this.request({
|
|
1013
|
-
path: `/call/{type}/{id}/start_broadcasting`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1015
|
+
path: `/video/call/{type}/{id}/start_broadcasting`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1014
1016
|
method: 'POST',
|
|
1015
1017
|
headers: headerParameters,
|
|
1016
1018
|
query: queryParameters,
|
|
@@ -1041,10 +1043,16 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1041
1043
|
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling startRecording.');
|
|
1042
1044
|
}
|
|
1043
1045
|
|
|
1046
|
+
if (requestParameters.videoStartRecordingRequest === null || requestParameters.videoStartRecordingRequest === undefined) {
|
|
1047
|
+
throw new runtime.RequiredError('videoStartRecordingRequest','Required parameter requestParameters.videoStartRecordingRequest was null or undefined when calling startRecording.');
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1044
1050
|
const queryParameters: any = {};
|
|
1045
1051
|
|
|
1046
1052
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
1047
1053
|
|
|
1054
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1055
|
+
|
|
1048
1056
|
if (this.configuration && this.configuration.apiKey) {
|
|
1049
1057
|
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1050
1058
|
}
|
|
@@ -1058,10 +1066,11 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1058
1066
|
}
|
|
1059
1067
|
|
|
1060
1068
|
const response = await this.request({
|
|
1061
|
-
path: `/call/{type}/{id}/start_recording`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1069
|
+
path: `/video/call/{type}/{id}/start_recording`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1062
1070
|
method: 'POST',
|
|
1063
1071
|
headers: headerParameters,
|
|
1064
1072
|
query: queryParameters,
|
|
1073
|
+
body: requestParameters.videoStartRecordingRequest,
|
|
1065
1074
|
}, initOverrides);
|
|
1066
1075
|
|
|
1067
1076
|
return new runtime.JSONApiResponse(response);
|
|
@@ -1106,7 +1115,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1106
1115
|
}
|
|
1107
1116
|
|
|
1108
1117
|
const response = await this.request({
|
|
1109
|
-
path: `/call/{type}/{id}/start_transcription`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1118
|
+
path: `/video/call/{type}/{id}/start_transcription`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1110
1119
|
method: 'POST',
|
|
1111
1120
|
headers: headerParameters,
|
|
1112
1121
|
query: queryParameters,
|
|
@@ -1154,7 +1163,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1154
1163
|
}
|
|
1155
1164
|
|
|
1156
1165
|
const response = await this.request({
|
|
1157
|
-
path: `/call/{type}/{id}/stop_broadcasting`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1166
|
+
path: `/video/call/{type}/{id}/stop_broadcasting`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1158
1167
|
method: 'POST',
|
|
1159
1168
|
headers: headerParameters,
|
|
1160
1169
|
query: queryParameters,
|
|
@@ -1202,7 +1211,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1202
1211
|
}
|
|
1203
1212
|
|
|
1204
1213
|
const response = await this.request({
|
|
1205
|
-
path: `/call/{type}/{id}/stop_live`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1214
|
+
path: `/video/call/{type}/{id}/stop_live`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1206
1215
|
method: 'POST',
|
|
1207
1216
|
headers: headerParameters,
|
|
1208
1217
|
query: queryParameters,
|
|
@@ -1250,7 +1259,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1250
1259
|
}
|
|
1251
1260
|
|
|
1252
1261
|
const response = await this.request({
|
|
1253
|
-
path: `/call/{type}/{id}/stop_recording`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1262
|
+
path: `/video/call/{type}/{id}/stop_recording`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1254
1263
|
method: 'POST',
|
|
1255
1264
|
headers: headerParameters,
|
|
1256
1265
|
query: queryParameters,
|
|
@@ -1298,7 +1307,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1298
1307
|
}
|
|
1299
1308
|
|
|
1300
1309
|
const response = await this.request({
|
|
1301
|
-
path: `/call/{type}/{id}/stop_transcription`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1310
|
+
path: `/video/call/{type}/{id}/stop_transcription`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1302
1311
|
method: 'POST',
|
|
1303
1312
|
headers: headerParameters,
|
|
1304
1313
|
query: queryParameters,
|
|
@@ -1352,7 +1361,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1352
1361
|
}
|
|
1353
1362
|
|
|
1354
1363
|
const response = await this.request({
|
|
1355
|
-
path: `/call/{type}/{id}/unblock`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1364
|
+
path: `/video/call/{type}/{id}/unblock`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1356
1365
|
method: 'POST',
|
|
1357
1366
|
headers: headerParameters,
|
|
1358
1367
|
query: queryParameters,
|
|
@@ -1407,7 +1416,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1407
1416
|
}
|
|
1408
1417
|
|
|
1409
1418
|
const response = await this.request({
|
|
1410
|
-
path: `/call/{type}/{id}`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1419
|
+
path: `/video/call/{type}/{id}`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1411
1420
|
method: 'PATCH',
|
|
1412
1421
|
headers: headerParameters,
|
|
1413
1422
|
query: queryParameters,
|
|
@@ -1462,7 +1471,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1462
1471
|
}
|
|
1463
1472
|
|
|
1464
1473
|
const response = await this.request({
|
|
1465
|
-
path: `/call/{type}/{id}/members`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1474
|
+
path: `/video/call/{type}/{id}/members`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1466
1475
|
method: 'POST',
|
|
1467
1476
|
headers: headerParameters,
|
|
1468
1477
|
query: queryParameters,
|
|
@@ -1517,7 +1526,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1517
1526
|
}
|
|
1518
1527
|
|
|
1519
1528
|
const response = await this.request({
|
|
1520
|
-
path: `/call/{type}/{id}/user_permissions`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1529
|
+
path: `/video/call/{type}/{id}/user_permissions`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1521
1530
|
method: 'POST',
|
|
1522
1531
|
headers: headerParameters,
|
|
1523
1532
|
query: queryParameters,
|
|
@@ -1618,7 +1627,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1618
1627
|
}
|
|
1619
1628
|
|
|
1620
1629
|
const response = await this.request({
|
|
1621
|
-
path: `/call/{type}/{id}/pin`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1630
|
+
path: `/video/call/{type}/{id}/pin`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1622
1631
|
method: 'POST',
|
|
1623
1632
|
headers: headerParameters,
|
|
1624
1633
|
query: queryParameters,
|
|
@@ -1673,7 +1682,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1673
1682
|
}
|
|
1674
1683
|
|
|
1675
1684
|
const response = await this.request({
|
|
1676
|
-
path: `/call/{type}/{id}/unpin`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1685
|
+
path: `/video/call/{type}/{id}/unpin`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1677
1686
|
method: 'POST',
|
|
1678
1687
|
headers: headerParameters,
|
|
1679
1688
|
query: queryParameters,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
* Stream
|
|
4
|
+
* Stream API
|
|
5
5
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document:
|
|
7
|
+
* The version of the OpenAPI document: v98.0.2-ingress-test.3
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
VideoAPIError,
|
|
19
|
+
VideoCheckExternalStorageResponse,
|
|
19
20
|
VideoCreateCallTypeRequest,
|
|
20
21
|
VideoCreateCallTypeResponse,
|
|
21
22
|
VideoGetCallTypeResponse,
|
|
@@ -23,8 +24,14 @@ import type {
|
|
|
23
24
|
VideoResponse,
|
|
24
25
|
VideoUpdateCallTypeRequest,
|
|
25
26
|
VideoUpdateCallTypeResponse,
|
|
27
|
+
VideoUpdateExternalStorageRequest,
|
|
28
|
+
VideoUpdateExternalStorageResponse,
|
|
26
29
|
} from '../models';
|
|
27
30
|
|
|
31
|
+
export interface CheckExternalStorageRequest {
|
|
32
|
+
name: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
28
35
|
export interface CreateCallTypeRequest {
|
|
29
36
|
videoCreateCallTypeRequest: VideoCreateCallTypeRequest | null;
|
|
30
37
|
}
|
|
@@ -42,11 +49,60 @@ export interface UpdateCallTypeRequest {
|
|
|
42
49
|
videoUpdateCallTypeRequest: VideoUpdateCallTypeRequest | null;
|
|
43
50
|
}
|
|
44
51
|
|
|
52
|
+
export interface UpdateExternalStorageRequest {
|
|
53
|
+
name: string;
|
|
54
|
+
videoUpdateExternalStorageRequest: VideoUpdateExternalStorageRequest | null;
|
|
55
|
+
}
|
|
56
|
+
|
|
45
57
|
/**
|
|
46
58
|
*
|
|
47
59
|
*/
|
|
48
60
|
export class ServerSideApi extends runtime.BaseAPI {
|
|
49
61
|
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* Check External Storage
|
|
65
|
+
*/
|
|
66
|
+
async checkExternalStorageRaw(requestParameters: CheckExternalStorageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoCheckExternalStorageResponse>> {
|
|
67
|
+
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
68
|
+
throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling checkExternalStorage.');
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const queryParameters: any = {};
|
|
72
|
+
|
|
73
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
74
|
+
|
|
75
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
76
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
80
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
84
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const response = await this.request({
|
|
88
|
+
path: `/video/external_storage/{name}/check`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
|
|
89
|
+
method: 'GET',
|
|
90
|
+
headers: headerParameters,
|
|
91
|
+
query: queryParameters,
|
|
92
|
+
}, initOverrides);
|
|
93
|
+
|
|
94
|
+
return new runtime.JSONApiResponse(response);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* Check External Storage
|
|
100
|
+
*/
|
|
101
|
+
async checkExternalStorage(requestParameters: CheckExternalStorageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoCheckExternalStorageResponse> {
|
|
102
|
+
const response = await this.checkExternalStorageRaw(requestParameters, initOverrides);
|
|
103
|
+
return await response.value();
|
|
104
|
+
}
|
|
105
|
+
|
|
50
106
|
/**
|
|
51
107
|
*
|
|
52
108
|
* Create Call Type
|
|
@@ -75,7 +131,7 @@ export class ServerSideApi extends runtime.BaseAPI {
|
|
|
75
131
|
}
|
|
76
132
|
|
|
77
133
|
const response = await this.request({
|
|
78
|
-
path: `/calltypes`,
|
|
134
|
+
path: `/video/calltypes`,
|
|
79
135
|
method: 'POST',
|
|
80
136
|
headers: headerParameters,
|
|
81
137
|
query: queryParameters,
|
|
@@ -120,7 +176,7 @@ export class ServerSideApi extends runtime.BaseAPI {
|
|
|
120
176
|
}
|
|
121
177
|
|
|
122
178
|
const response = await this.request({
|
|
123
|
-
path: `/calltypes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
|
|
179
|
+
path: `/video/calltypes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
|
|
124
180
|
method: 'DELETE',
|
|
125
181
|
headers: headerParameters,
|
|
126
182
|
query: queryParameters,
|
|
@@ -164,7 +220,7 @@ export class ServerSideApi extends runtime.BaseAPI {
|
|
|
164
220
|
}
|
|
165
221
|
|
|
166
222
|
const response = await this.request({
|
|
167
|
-
path: `/calltypes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
|
|
223
|
+
path: `/video/calltypes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
|
|
168
224
|
method: 'GET',
|
|
169
225
|
headers: headerParameters,
|
|
170
226
|
query: queryParameters,
|
|
@@ -204,7 +260,7 @@ export class ServerSideApi extends runtime.BaseAPI {
|
|
|
204
260
|
}
|
|
205
261
|
|
|
206
262
|
const response = await this.request({
|
|
207
|
-
path: `/calltypes`,
|
|
263
|
+
path: `/video/calltypes`,
|
|
208
264
|
method: 'GET',
|
|
209
265
|
headers: headerParameters,
|
|
210
266
|
query: queryParameters,
|
|
@@ -254,7 +310,7 @@ export class ServerSideApi extends runtime.BaseAPI {
|
|
|
254
310
|
}
|
|
255
311
|
|
|
256
312
|
const response = await this.request({
|
|
257
|
-
path: `/calltypes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
|
|
313
|
+
path: `/video/calltypes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
|
|
258
314
|
method: 'PUT',
|
|
259
315
|
headers: headerParameters,
|
|
260
316
|
query: queryParameters,
|
|
@@ -273,4 +329,55 @@ export class ServerSideApi extends runtime.BaseAPI {
|
|
|
273
329
|
return await response.value();
|
|
274
330
|
}
|
|
275
331
|
|
|
332
|
+
/**
|
|
333
|
+
*
|
|
334
|
+
* Update External Storage
|
|
335
|
+
*/
|
|
336
|
+
async updateExternalStorageRaw(requestParameters: UpdateExternalStorageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoUpdateExternalStorageResponse>> {
|
|
337
|
+
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
338
|
+
throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling updateExternalStorage.');
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
if (requestParameters.videoUpdateExternalStorageRequest === null || requestParameters.videoUpdateExternalStorageRequest === undefined) {
|
|
342
|
+
throw new runtime.RequiredError('videoUpdateExternalStorageRequest','Required parameter requestParameters.videoUpdateExternalStorageRequest was null or undefined when calling updateExternalStorage.');
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
const queryParameters: any = {};
|
|
346
|
+
|
|
347
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
348
|
+
|
|
349
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
350
|
+
|
|
351
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
352
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
356
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
360
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
const response = await this.request({
|
|
364
|
+
path: `/video/external_storage/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
|
|
365
|
+
method: 'PUT',
|
|
366
|
+
headers: headerParameters,
|
|
367
|
+
query: queryParameters,
|
|
368
|
+
body: requestParameters.videoUpdateExternalStorageRequest,
|
|
369
|
+
}, initOverrides);
|
|
370
|
+
|
|
371
|
+
return new runtime.JSONApiResponse(response);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
*
|
|
376
|
+
* Update External Storage
|
|
377
|
+
*/
|
|
378
|
+
async updateExternalStorage(requestParameters: UpdateExternalStorageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoUpdateExternalStorageResponse> {
|
|
379
|
+
const response = await this.updateExternalStorageRaw(requestParameters, initOverrides);
|
|
380
|
+
return await response.value();
|
|
381
|
+
}
|
|
382
|
+
|
|
276
383
|
}
|