@stream-io/node-sdk 0.1.9 → 0.1.11
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 +330 -76
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +330 -76
- 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/chat/apis/FilesApi.d.ts +5 -1
- package/dist/src/gen/chat/apis/MessagesApi.d.ts +5 -1
- package/dist/src/gen/chat/apis/index.d.ts +8 -0
- 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 +3 -2
- package/src/StreamCall.ts +7 -7
- package/src/StreamChannel.ts +3 -3
- package/src/StreamChatClient.ts +4 -4
- package/src/StreamClient.ts +33 -14
- package/src/StreamVideoClient.ts +38 -5
- package/src/gen/chat/apis/FilesApi.ts +2 -2
- package/src/gen/chat/apis/MessagesApi.ts +2 -2
- package/src/gen/chat/apis/index.ts +8 -8
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/node-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
"@openapitools/openapi-generator-cli": "^2.7.0",
|
|
43
43
|
"@rollup/plugin-replace": "^5.0.2",
|
|
44
44
|
"@rollup/plugin-typescript": "^11.1.4",
|
|
45
|
-
"@types/jsonwebtoken": "^9.0.3",
|
|
46
45
|
"@types/uuid": "^9.0.4",
|
|
47
46
|
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
|
48
47
|
"dotenv": "^16.3.1",
|
|
@@ -62,6 +61,8 @@
|
|
|
62
61
|
"vitest-mock-extended": "^1.2.1"
|
|
63
62
|
},
|
|
64
63
|
"dependencies": {
|
|
64
|
+
"@types/jsonwebtoken": "^9.0.3",
|
|
65
|
+
"@types/node": "^20.11.24",
|
|
65
66
|
"jsonwebtoken": "^9.0.2",
|
|
66
67
|
"uuid": "^9.0.1"
|
|
67
68
|
}
|
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/StreamChannel.ts
CHANGED
|
@@ -42,11 +42,11 @@ export class StreamChannel {
|
|
|
42
42
|
public id?: string,
|
|
43
43
|
) {
|
|
44
44
|
const configuration = this.streamClient.getConfiguration();
|
|
45
|
-
|
|
45
|
+
/** @ts-expect-error */
|
|
46
46
|
this.channelsApi = new ChannelsApi(configuration);
|
|
47
|
-
|
|
47
|
+
/** @ts-expect-error */
|
|
48
48
|
this.messagesApi = new MessagesApi(configuration);
|
|
49
|
-
|
|
49
|
+
/** @ts-expect-error */
|
|
50
50
|
this.eventsApi = new EventsApi(configuration);
|
|
51
51
|
}
|
|
52
52
|
|
package/src/StreamChatClient.ts
CHANGED
|
@@ -31,13 +31,13 @@ export class StreamChatClient {
|
|
|
31
31
|
|
|
32
32
|
constructor(private readonly streamClient: StreamClient) {
|
|
33
33
|
const configuration = this.streamClient.getConfiguration();
|
|
34
|
-
|
|
34
|
+
/** @ts-expect-error */
|
|
35
35
|
this.settingsApi = new SettingsApi(configuration);
|
|
36
|
-
|
|
36
|
+
/** @ts-expect-error */
|
|
37
37
|
this.channelTypesApi = new ChannelTypesApi(configuration);
|
|
38
|
-
|
|
38
|
+
/** @ts-expect-error */
|
|
39
39
|
this.channelsApi = new ChannelsApi(configuration);
|
|
40
|
-
|
|
40
|
+
/** @ts-expect-error */
|
|
41
41
|
this.commandsApi = new CustomCommandsApi(configuration);
|
|
42
42
|
}
|
|
43
43
|
|
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;
|
|
@@ -102,23 +103,23 @@ export class StreamClient {
|
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
const chatConfiguration = this.getConfiguration();
|
|
105
|
-
|
|
106
|
+
/** @ts-expect-error */
|
|
106
107
|
this.usersApi = new UsersApi(chatConfiguration);
|
|
107
|
-
|
|
108
|
+
/** @ts-expect-error */
|
|
108
109
|
this.devicesApi = new DevicesApi(chatConfiguration);
|
|
109
|
-
|
|
110
|
+
/** @ts-expect-error */
|
|
110
111
|
this.pushApi = new PushApi(chatConfiguration);
|
|
111
|
-
|
|
112
|
+
/** @ts-expect-error */
|
|
112
113
|
this.serversideApi = new ServerSideApi(chatConfiguration);
|
|
113
|
-
|
|
114
|
+
/** @ts-expect-error */
|
|
114
115
|
this.testingApi = new TestingApi(chatConfiguration);
|
|
115
|
-
|
|
116
|
+
/** @ts-expect-error */
|
|
116
117
|
this.permissionsApi = new PermissionsV2Api(chatConfiguration);
|
|
117
|
-
|
|
118
|
+
/** @ts-expect-error */
|
|
118
119
|
this.settingsApi = new SettingsApi(chatConfiguration);
|
|
119
|
-
|
|
120
|
+
/** @ts-expect-error */
|
|
120
121
|
this.eventsApi = new EventsApi(chatConfiguration);
|
|
121
|
-
|
|
122
|
+
/** @ts-expect-error */
|
|
122
123
|
this.tasksApi = new TasksApi(chatConfiguration);
|
|
123
124
|
}
|
|
124
125
|
|
|
@@ -291,7 +292,7 @@ export class StreamClient {
|
|
|
291
292
|
queryUsers = async (payload: QueryUsersRequest) => {
|
|
292
293
|
payload.user = this.mapCustomDataBeforeSend(payload.user);
|
|
293
294
|
const response = await this.usersApi.queryUsers({ payload });
|
|
294
|
-
|
|
295
|
+
/** @ts-expect-error */
|
|
295
296
|
response.users = response.users.map((u) =>
|
|
296
297
|
this.mapCustomDataAfterReceive(u),
|
|
297
298
|
);
|
|
@@ -348,7 +349,7 @@ export class StreamClient {
|
|
|
348
349
|
users: UpdateUserPartialRequest[];
|
|
349
350
|
}) => {
|
|
350
351
|
const response = await this.usersApi.updateUsersPartial({
|
|
351
|
-
|
|
352
|
+
/** @ts-expect-error */
|
|
352
353
|
updateUserPartialRequest: request,
|
|
353
354
|
});
|
|
354
355
|
Object.keys(response.users).forEach((key) => {
|
|
@@ -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
|
},
|
|
@@ -553,7 +572,7 @@ export class StreamClient {
|
|
|
553
572
|
if (!user) {
|
|
554
573
|
return undefined;
|
|
555
574
|
}
|
|
556
|
-
|
|
575
|
+
/** @ts-expect-error */
|
|
557
576
|
const result: UserObject | UserResponse = {};
|
|
558
577
|
Object.keys(user).forEach((key) => {
|
|
559
578
|
if (!this.reservedKeywords.includes(key)) {
|
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
|
}
|
|
@@ -18,10 +18,10 @@ import type {
|
|
|
18
18
|
APIError,
|
|
19
19
|
FileDeleteResponse,
|
|
20
20
|
FileUploadResponse,
|
|
21
|
-
|
|
21
|
+
/** @ts-expect-error */
|
|
22
22
|
ImageSizeRequest,
|
|
23
23
|
ImageUploadResponse,
|
|
24
|
-
|
|
24
|
+
/** @ts-expect-error */
|
|
25
25
|
OnlyUserIDRequest,
|
|
26
26
|
} from '../models';
|
|
27
27
|
|
|
@@ -24,7 +24,7 @@ import type {
|
|
|
24
24
|
GetOGResponse,
|
|
25
25
|
GetReactionsResponse,
|
|
26
26
|
GetRepliesResponse,
|
|
27
|
-
|
|
27
|
+
/** @ts-expect-error */
|
|
28
28
|
ImageSizeRequest,
|
|
29
29
|
ImageUploadResponse,
|
|
30
30
|
MarkChannelsReadRequest,
|
|
@@ -34,7 +34,7 @@ import type {
|
|
|
34
34
|
MessageActionRequest,
|
|
35
35
|
MessageResponse,
|
|
36
36
|
MessageWithPendingMetadataResponse,
|
|
37
|
-
|
|
37
|
+
/** @ts-expect-error */
|
|
38
38
|
OnlyUserIDRequest,
|
|
39
39
|
QueryMessageFlagsRequest,
|
|
40
40
|
QueryMessageFlagsResponse,
|
|
@@ -7,23 +7,23 @@ export * from './DefaultApi';
|
|
|
7
7
|
export * from './DevicesApi';
|
|
8
8
|
export * from './EventsApi';
|
|
9
9
|
export * from './FilesApi';
|
|
10
|
-
|
|
10
|
+
/** @ts-expect-error */
|
|
11
11
|
export * from './GDPRApi';
|
|
12
12
|
export * from './ImportsApi';
|
|
13
|
-
|
|
13
|
+
/** @ts-expect-error */
|
|
14
14
|
export * from './MessagesApi';
|
|
15
|
-
|
|
15
|
+
/** @ts-expect-error */
|
|
16
16
|
export * from './ModerationApi';
|
|
17
17
|
export * from './PermissionsV2Api';
|
|
18
|
-
|
|
18
|
+
/** @ts-expect-error */
|
|
19
19
|
export * from './PushApi';
|
|
20
|
-
|
|
20
|
+
/** @ts-expect-error */
|
|
21
21
|
export * from './ReactionsApi';
|
|
22
22
|
export * from './ServerSideApi';
|
|
23
|
-
|
|
23
|
+
/** @ts-expect-error */
|
|
24
24
|
export * from './SettingsApi';
|
|
25
25
|
export * from './TasksApi';
|
|
26
|
-
|
|
26
|
+
/** @ts-expect-error */
|
|
27
27
|
export * from './TestingApi';
|
|
28
|
-
|
|
28
|
+
/** @ts-expect-error */
|
|
29
29
|
export * from './UsersApi';
|
|
@@ -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,
|