@stream-io/node-sdk 0.1.0
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/.readme-assets/Github-Graphic-JS.jpg +0 -0
- package/LICENSE +219 -0
- package/README.md +29 -0
- package/dist/__tests__/block-lists.test.d.ts +1 -0
- package/dist/__tests__/call-members.test.d.ts +1 -0
- package/dist/__tests__/call-types.test.d.ts +1 -0
- package/dist/__tests__/call.test.d.ts +1 -0
- package/dist/__tests__/channel-types.test.d.ts +1 -0
- package/dist/__tests__/channel.test.d.ts +1 -0
- package/dist/__tests__/command.test.d.ts +1 -0
- package/dist/__tests__/create-token.test.d.ts +1 -0
- package/dist/__tests__/devices-push.test.d.ts +1 -0
- package/dist/__tests__/messages.test.d.ts +1 -0
- package/dist/__tests__/permissions-app-settings.test.d.ts +1 -0
- package/dist/__tests__/user-compat.test.d.ts +1 -0
- package/dist/__tests__/users.test.d.ts +1 -0
- package/dist/index.cjs.js +8789 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.es.js +8708 -0
- package/dist/index.es.js.map +1 -0
- package/dist/src/StreamCall.d.ts +37 -0
- package/dist/src/StreamChannel.d.ts +39 -0
- package/dist/src/StreamChatClient.d.ts +31 -0
- package/dist/src/StreamClient.d.ts +68 -0
- package/dist/src/StreamVideoClient.d.ts +16 -0
- package/dist/src/gen/chat/apis/ChannelTypesApi.d.ts +81 -0
- package/dist/src/gen/chat/apis/ChannelsApi.d.ts +308 -0
- package/dist/src/gen/chat/apis/CustomCommandsApi.d.ts +81 -0
- package/dist/src/gen/chat/apis/DefaultApi.d.ts +60 -0
- package/dist/src/gen/chat/apis/DevicesApi.d.ts +58 -0
- package/dist/src/gen/chat/apis/EventsApi.d.ts +64 -0
- package/dist/src/gen/chat/apis/FilesApi.d.ts +81 -0
- package/dist/src/gen/chat/apis/GDPRApi.d.ts +114 -0
- package/dist/src/gen/chat/apis/ImportsApi.d.ts +67 -0
- package/dist/src/gen/chat/apis/MessagesApi.d.ts +370 -0
- package/dist/src/gen/chat/apis/ModerationApi.d.ts +271 -0
- package/dist/src/gen/chat/apis/PermissionsV2Api.d.ts +77 -0
- package/dist/src/gen/chat/apis/PushApi.d.ts +65 -0
- package/dist/src/gen/chat/apis/ReactionsApi.d.ts +62 -0
- package/dist/src/gen/chat/apis/ServerSideApi.d.ts +31 -0
- package/dist/src/gen/chat/apis/SettingsApi.d.ts +257 -0
- package/dist/src/gen/chat/apis/TasksApi.d.ts +31 -0
- package/dist/src/gen/chat/apis/TestingApi.d.ts +57 -0
- package/dist/src/gen/chat/apis/UsersApi.d.ts +313 -0
- package/dist/src/gen/chat/apis/index.d.ts +19 -0
- package/dist/src/gen/chat/index.d.ts +3 -0
- package/dist/src/gen/chat/models/index.d.ts +15624 -0
- package/dist/src/gen/chat/runtime.d.ts +180 -0
- package/dist/src/gen/video/apis/DefaultApi.d.ts +505 -0
- package/dist/src/gen/video/apis/ServerSideApi.d.ts +81 -0
- package/dist/src/gen/video/apis/index.d.ts +2 -0
- package/dist/src/gen/video/index.d.ts +3 -0
- package/dist/src/gen/video/models/index.d.ts +4733 -0
- package/dist/src/gen/video/runtime.d.ts +180 -0
- package/dist/src/types.d.ts +1 -0
- package/dist/src/utils/create-token.d.ts +3 -0
- package/index.ts +7 -0
- package/package.json +47 -0
- package/src/StreamCall.ts +161 -0
- package/src/StreamChannel.ts +165 -0
- package/src/StreamChatClient.ts +102 -0
- package/src/StreamClient.ts +440 -0
- package/src/StreamVideoClient.ts +63 -0
- package/src/gen/chat/.openapi-generator/FILES +24 -0
- package/src/gen/chat/.openapi-generator/VERSION +1 -0
- package/src/gen/chat/.openapi-generator-ignore +23 -0
- package/src/gen/chat/apis/ChannelTypesApi.ts +275 -0
- package/src/gen/chat/apis/ChannelsApi.ts +1221 -0
- package/src/gen/chat/apis/CustomCommandsApi.ts +276 -0
- package/src/gen/chat/apis/DefaultApi.ts +196 -0
- package/src/gen/chat/apis/DevicesApi.ts +180 -0
- package/src/gen/chat/apis/EventsApi.ts +220 -0
- package/src/gen/chat/apis/FilesApi.ts +312 -0
- package/src/gen/chat/apis/GDPRApi.ts +418 -0
- package/src/gen/chat/apis/ImportsApi.ts +222 -0
- package/src/gen/chat/apis/MessagesApi.ts +1475 -0
- package/src/gen/chat/apis/ModerationApi.ts +1038 -0
- package/src/gen/chat/apis/PermissionsV2Api.ts +259 -0
- package/src/gen/chat/apis/PushApi.ts +183 -0
- package/src/gen/chat/apis/ReactionsApi.ts +202 -0
- package/src/gen/chat/apis/ServerSideApi.ts +79 -0
- package/src/gen/chat/apis/SettingsApi.ts +948 -0
- package/src/gen/chat/apis/TasksApi.ts +75 -0
- package/src/gen/chat/apis/TestingApi.ts +185 -0
- package/src/gen/chat/apis/UsersApi.ts +1203 -0
- package/src/gen/chat/apis/index.ts +30 -0
- package/src/gen/chat/index.ts +5 -0
- package/src/gen/chat/models/index.ts +15541 -0
- package/src/gen/chat/runtime.ts +415 -0
- package/src/gen/video/.openapi-generator/FILES +7 -0
- package/src/gen/video/.openapi-generator/VERSION +1 -0
- package/src/gen/video/.openapi-generator-ignore +23 -0
- package/src/gen/video/apis/DefaultApi.ts +1997 -0
- package/src/gen/video/apis/ServerSideApi.ts +276 -0
- package/src/gen/video/apis/index.ts +4 -0
- package/src/gen/video/index.ts +5 -0
- package/src/gen/video/models/index.ts +4642 -0
- package/src/gen/video/runtime.ts +415 -0
- package/src/types.ts +1 -0
- package/src/utils/create-token.ts +49 -0
|
@@ -0,0 +1,1997 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Stream Video API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v89.9.2
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
VideoAPIError,
|
|
19
|
+
VideoAcceptCallResponse,
|
|
20
|
+
VideoBlockUserRequest,
|
|
21
|
+
VideoBlockUserResponse,
|
|
22
|
+
VideoCreateDeviceRequest,
|
|
23
|
+
VideoCreateGuestRequest,
|
|
24
|
+
VideoCreateGuestResponse,
|
|
25
|
+
VideoEndCallResponse,
|
|
26
|
+
VideoGetCallResponse,
|
|
27
|
+
VideoGetEdgesResponse,
|
|
28
|
+
VideoGetOrCreateCallRequest,
|
|
29
|
+
VideoGetOrCreateCallResponse,
|
|
30
|
+
VideoGoLiveRequest,
|
|
31
|
+
VideoGoLiveResponse,
|
|
32
|
+
VideoJoinCallRequest,
|
|
33
|
+
VideoJoinCallResponse,
|
|
34
|
+
VideoListDevicesResponse,
|
|
35
|
+
VideoListRecordingsResponse,
|
|
36
|
+
VideoMuteUsersRequest,
|
|
37
|
+
VideoMuteUsersResponse,
|
|
38
|
+
VideoPinRequest,
|
|
39
|
+
VideoPinResponse,
|
|
40
|
+
VideoQueryCallsRequest,
|
|
41
|
+
VideoQueryCallsResponse,
|
|
42
|
+
VideoQueryMembersRequest,
|
|
43
|
+
VideoQueryMembersResponse,
|
|
44
|
+
VideoRejectCallResponse,
|
|
45
|
+
VideoRequestPermissionRequest,
|
|
46
|
+
VideoRequestPermissionResponse,
|
|
47
|
+
VideoResponse,
|
|
48
|
+
VideoSendEventRequest,
|
|
49
|
+
VideoSendEventResponse,
|
|
50
|
+
VideoSendReactionRequest,
|
|
51
|
+
VideoSendReactionResponse,
|
|
52
|
+
VideoStartHLSBroadcastingResponse,
|
|
53
|
+
VideoStartRecordingResponse,
|
|
54
|
+
VideoStartTranscriptionResponse,
|
|
55
|
+
VideoStopHLSBroadcastingResponse,
|
|
56
|
+
VideoStopLiveResponse,
|
|
57
|
+
VideoStopRecordingResponse,
|
|
58
|
+
VideoStopTranscriptionResponse,
|
|
59
|
+
VideoUnblockUserRequest,
|
|
60
|
+
VideoUnblockUserResponse,
|
|
61
|
+
VideoUnpinRequest,
|
|
62
|
+
VideoUnpinResponse,
|
|
63
|
+
VideoUpdateCallMembersRequest,
|
|
64
|
+
VideoUpdateCallMembersResponse,
|
|
65
|
+
VideoUpdateCallRequest,
|
|
66
|
+
VideoUpdateCallResponse,
|
|
67
|
+
VideoUpdateUserPermissionsRequest,
|
|
68
|
+
VideoUpdateUserPermissionsResponse,
|
|
69
|
+
VideoWSAuthMessageRequest,
|
|
70
|
+
} from '../models';
|
|
71
|
+
|
|
72
|
+
export interface AcceptCallRequest {
|
|
73
|
+
type: string;
|
|
74
|
+
id: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface BlockUserRequest {
|
|
78
|
+
type: string;
|
|
79
|
+
id: string;
|
|
80
|
+
videoBlockUserRequest: VideoBlockUserRequest | null;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface CreateDeviceRequest {
|
|
84
|
+
videoCreateDeviceRequest: VideoCreateDeviceRequest | null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface CreateGuestRequest {
|
|
88
|
+
videoCreateGuestRequest: VideoCreateGuestRequest | null;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface DeleteDeviceRequest {
|
|
92
|
+
id?: string;
|
|
93
|
+
userId?: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface EndCallRequest {
|
|
97
|
+
type: string;
|
|
98
|
+
id: string;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface GetCallRequest {
|
|
102
|
+
type: string;
|
|
103
|
+
id: string;
|
|
104
|
+
connectionId?: string;
|
|
105
|
+
membersLimit?: number;
|
|
106
|
+
ring?: boolean;
|
|
107
|
+
notify?: boolean;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface GetOrCreateCallRequest {
|
|
111
|
+
type: string;
|
|
112
|
+
id: string;
|
|
113
|
+
videoGetOrCreateCallRequest: VideoGetOrCreateCallRequest | null;
|
|
114
|
+
connectionId?: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface GoLiveRequest {
|
|
118
|
+
type: string;
|
|
119
|
+
id: string;
|
|
120
|
+
videoGoLiveRequest: VideoGoLiveRequest | null;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface JoinCallRequest {
|
|
124
|
+
type: string;
|
|
125
|
+
id: string;
|
|
126
|
+
videoJoinCallRequest: VideoJoinCallRequest | null;
|
|
127
|
+
connectionId?: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface ListDevicesRequest {
|
|
131
|
+
userId?: string;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export interface ListRecordingsRequest {
|
|
135
|
+
type: string;
|
|
136
|
+
id: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface MuteUsersRequest {
|
|
140
|
+
type: string;
|
|
141
|
+
id: string;
|
|
142
|
+
videoMuteUsersRequest: VideoMuteUsersRequest | null;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface QueryCallsRequest {
|
|
146
|
+
videoQueryCallsRequest: VideoQueryCallsRequest | null;
|
|
147
|
+
connectionId?: string;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface QueryMembersRequest {
|
|
151
|
+
videoQueryMembersRequest: VideoQueryMembersRequest | null;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface RejectCallRequest {
|
|
155
|
+
type: string;
|
|
156
|
+
id: string;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface RequestPermissionRequest {
|
|
160
|
+
type: string;
|
|
161
|
+
id: string;
|
|
162
|
+
videoRequestPermissionRequest: VideoRequestPermissionRequest | null;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface SendEventRequest {
|
|
166
|
+
type: string;
|
|
167
|
+
id: string;
|
|
168
|
+
videoSendEventRequest: VideoSendEventRequest | null;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export interface SendVideoReactionRequest {
|
|
172
|
+
type: string;
|
|
173
|
+
id: string;
|
|
174
|
+
videoSendReactionRequest: VideoSendReactionRequest | null;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface StartHLSBroadcastingRequest {
|
|
178
|
+
type: string;
|
|
179
|
+
id: string;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export interface StartRecordingRequest {
|
|
183
|
+
type: string;
|
|
184
|
+
id: string;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export interface StartTranscriptionRequest {
|
|
188
|
+
type: string;
|
|
189
|
+
id: string;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export interface StopHLSBroadcastingRequest {
|
|
193
|
+
type: string;
|
|
194
|
+
id: string;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface StopLiveRequest {
|
|
198
|
+
type: string;
|
|
199
|
+
id: string;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export interface StopRecordingRequest {
|
|
203
|
+
type: string;
|
|
204
|
+
id: string;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export interface StopTranscriptionRequest {
|
|
208
|
+
type: string;
|
|
209
|
+
id: string;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export interface UnblockUserRequest {
|
|
213
|
+
type: string;
|
|
214
|
+
id: string;
|
|
215
|
+
videoUnblockUserRequest: VideoUnblockUserRequest | null;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export interface UpdateCallRequest {
|
|
219
|
+
type: string;
|
|
220
|
+
id: string;
|
|
221
|
+
videoUpdateCallRequest: VideoUpdateCallRequest | null;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export interface UpdateCallMembersRequest {
|
|
225
|
+
type: string;
|
|
226
|
+
id: string;
|
|
227
|
+
videoUpdateCallMembersRequest: VideoUpdateCallMembersRequest | null;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export interface UpdateUserPermissionsRequest {
|
|
231
|
+
type: string;
|
|
232
|
+
id: string;
|
|
233
|
+
videoUpdateUserPermissionsRequest: VideoUpdateUserPermissionsRequest | null;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export interface VideoConnectRequest {
|
|
237
|
+
videoWSAuthMessageRequest: VideoWSAuthMessageRequest | null;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export interface VideoPinOperationRequest {
|
|
241
|
+
type: string;
|
|
242
|
+
id: string;
|
|
243
|
+
videoPinRequest: VideoPinRequest | null;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export interface VideoUnpinOperationRequest {
|
|
247
|
+
type: string;
|
|
248
|
+
id: string;
|
|
249
|
+
videoUnpinRequest: VideoUnpinRequest | null;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
*
|
|
254
|
+
*/
|
|
255
|
+
export class DefaultApi extends runtime.BaseAPI {
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Sends events: - call.accepted Required permissions: - JoinCall
|
|
259
|
+
* Accept Call
|
|
260
|
+
*/
|
|
261
|
+
async acceptCallRaw(requestParameters: AcceptCallRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoAcceptCallResponse>> {
|
|
262
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
263
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling acceptCall.');
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
267
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling acceptCall.');
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
const queryParameters: any = {};
|
|
271
|
+
|
|
272
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
273
|
+
|
|
274
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
275
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
279
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
283
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
const response = await this.request({
|
|
287
|
+
path: `/call/{type}/{id}/accept`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
288
|
+
method: 'POST',
|
|
289
|
+
headers: headerParameters,
|
|
290
|
+
query: queryParameters,
|
|
291
|
+
}, initOverrides);
|
|
292
|
+
|
|
293
|
+
return new runtime.JSONApiResponse(response);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Sends events: - call.accepted Required permissions: - JoinCall
|
|
298
|
+
* Accept Call
|
|
299
|
+
*/
|
|
300
|
+
async acceptCall(requestParameters: AcceptCallRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoAcceptCallResponse> {
|
|
301
|
+
const response = await this.acceptCallRaw(requestParameters, initOverrides);
|
|
302
|
+
return await response.value();
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Block a user, preventing them from joining the call until they are unblocked. Sends events: - call.blocked_user Required permissions: - BlockUser
|
|
307
|
+
* Block user on a call
|
|
308
|
+
*/
|
|
309
|
+
async blockUserRaw(requestParameters: BlockUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoBlockUserResponse>> {
|
|
310
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
311
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling blockUser.');
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
315
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling blockUser.');
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
if (requestParameters.videoBlockUserRequest === null || requestParameters.videoBlockUserRequest === undefined) {
|
|
319
|
+
throw new runtime.RequiredError('videoBlockUserRequest','Required parameter requestParameters.videoBlockUserRequest was null or undefined when calling blockUser.');
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
const queryParameters: any = {};
|
|
323
|
+
|
|
324
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
325
|
+
|
|
326
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
327
|
+
|
|
328
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
329
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
333
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
337
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
const response = await this.request({
|
|
341
|
+
path: `/call/{type}/{id}/block`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
342
|
+
method: 'POST',
|
|
343
|
+
headers: headerParameters,
|
|
344
|
+
query: queryParameters,
|
|
345
|
+
body: requestParameters.videoBlockUserRequest,
|
|
346
|
+
}, initOverrides);
|
|
347
|
+
|
|
348
|
+
return new runtime.JSONApiResponse(response);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Block a user, preventing them from joining the call until they are unblocked. Sends events: - call.blocked_user Required permissions: - BlockUser
|
|
353
|
+
* Block user on a call
|
|
354
|
+
*/
|
|
355
|
+
async blockUser(requestParameters: BlockUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoBlockUserResponse> {
|
|
356
|
+
const response = await this.blockUserRaw(requestParameters, initOverrides);
|
|
357
|
+
return await response.value();
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Adds a new device to a user, if the same device already exists the call will have no effect
|
|
362
|
+
* Create device
|
|
363
|
+
*/
|
|
364
|
+
async createDeviceRaw(requestParameters: CreateDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoResponse>> {
|
|
365
|
+
if (requestParameters.videoCreateDeviceRequest === null || requestParameters.videoCreateDeviceRequest === undefined) {
|
|
366
|
+
throw new runtime.RequiredError('videoCreateDeviceRequest','Required parameter requestParameters.videoCreateDeviceRequest was null or undefined when calling createDevice.');
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
const queryParameters: any = {};
|
|
370
|
+
|
|
371
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
372
|
+
|
|
373
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
374
|
+
|
|
375
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
376
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
380
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
384
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
const response = await this.request({
|
|
388
|
+
path: `/devices`,
|
|
389
|
+
method: 'POST',
|
|
390
|
+
headers: headerParameters,
|
|
391
|
+
query: queryParameters,
|
|
392
|
+
body: requestParameters.videoCreateDeviceRequest,
|
|
393
|
+
}, initOverrides);
|
|
394
|
+
|
|
395
|
+
return new runtime.JSONApiResponse(response);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Adds a new device to a user, if the same device already exists the call will have no effect
|
|
400
|
+
* Create device
|
|
401
|
+
*/
|
|
402
|
+
async createDevice(requestParameters: CreateDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoResponse> {
|
|
403
|
+
const response = await this.createDeviceRaw(requestParameters, initOverrides);
|
|
404
|
+
return await response.value();
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
*
|
|
409
|
+
* Create Guest
|
|
410
|
+
*/
|
|
411
|
+
async createGuestRaw(requestParameters: CreateGuestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoCreateGuestResponse>> {
|
|
412
|
+
if (requestParameters.videoCreateGuestRequest === null || requestParameters.videoCreateGuestRequest === undefined) {
|
|
413
|
+
throw new runtime.RequiredError('videoCreateGuestRequest','Required parameter requestParameters.videoCreateGuestRequest was null or undefined when calling createGuest.');
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
const queryParameters: any = {};
|
|
417
|
+
|
|
418
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
419
|
+
|
|
420
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
421
|
+
|
|
422
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
423
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
427
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
431
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
const response = await this.request({
|
|
435
|
+
path: `/guest`,
|
|
436
|
+
method: 'POST',
|
|
437
|
+
headers: headerParameters,
|
|
438
|
+
query: queryParameters,
|
|
439
|
+
body: requestParameters.videoCreateGuestRequest,
|
|
440
|
+
}, initOverrides);
|
|
441
|
+
|
|
442
|
+
return new runtime.JSONApiResponse(response);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
*
|
|
447
|
+
* Create Guest
|
|
448
|
+
*/
|
|
449
|
+
async createGuest(requestParameters: CreateGuestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoCreateGuestResponse> {
|
|
450
|
+
const response = await this.createGuestRaw(requestParameters, initOverrides);
|
|
451
|
+
return await response.value();
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Deletes one device
|
|
456
|
+
* Delete device
|
|
457
|
+
*/
|
|
458
|
+
async deleteDeviceRaw(requestParameters: DeleteDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoResponse>> {
|
|
459
|
+
const queryParameters: any = {};
|
|
460
|
+
|
|
461
|
+
if (requestParameters.id !== undefined) {
|
|
462
|
+
queryParameters['id'] = requestParameters.id;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
if (requestParameters.userId !== undefined) {
|
|
466
|
+
queryParameters['user_id'] = requestParameters.userId;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
470
|
+
|
|
471
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
472
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
476
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
480
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
const response = await this.request({
|
|
484
|
+
path: `/devices`,
|
|
485
|
+
method: 'DELETE',
|
|
486
|
+
headers: headerParameters,
|
|
487
|
+
query: queryParameters,
|
|
488
|
+
}, initOverrides);
|
|
489
|
+
|
|
490
|
+
return new runtime.JSONApiResponse(response);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Deletes one device
|
|
495
|
+
* Delete device
|
|
496
|
+
*/
|
|
497
|
+
async deleteDevice(requestParameters: DeleteDeviceRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoResponse> {
|
|
498
|
+
const response = await this.deleteDeviceRaw(requestParameters, initOverrides);
|
|
499
|
+
return await response.value();
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Sends events: - call.ended Required permissions: - EndCall
|
|
504
|
+
* End call
|
|
505
|
+
*/
|
|
506
|
+
async endCallRaw(requestParameters: EndCallRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoEndCallResponse>> {
|
|
507
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
508
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling endCall.');
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
512
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling endCall.');
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
const queryParameters: any = {};
|
|
516
|
+
|
|
517
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
518
|
+
|
|
519
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
520
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
524
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
528
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
const response = await this.request({
|
|
532
|
+
path: `/call/{type}/{id}/mark_ended`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
533
|
+
method: 'POST',
|
|
534
|
+
headers: headerParameters,
|
|
535
|
+
query: queryParameters,
|
|
536
|
+
}, initOverrides);
|
|
537
|
+
|
|
538
|
+
return new runtime.JSONApiResponse(response);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Sends events: - call.ended Required permissions: - EndCall
|
|
543
|
+
* End call
|
|
544
|
+
*/
|
|
545
|
+
async endCall(requestParameters: EndCallRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoEndCallResponse> {
|
|
546
|
+
const response = await this.endCallRaw(requestParameters, initOverrides);
|
|
547
|
+
return await response.value();
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* Required permissions: - ReadCall
|
|
552
|
+
* Get Call
|
|
553
|
+
*/
|
|
554
|
+
async getCallRaw(requestParameters: GetCallRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoGetCallResponse>> {
|
|
555
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
556
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling getCall.');
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
560
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getCall.');
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
const queryParameters: any = {};
|
|
564
|
+
|
|
565
|
+
if (requestParameters.connectionId !== undefined) {
|
|
566
|
+
queryParameters['connection_id'] = requestParameters.connectionId;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
if (requestParameters.membersLimit !== undefined) {
|
|
570
|
+
queryParameters['members_limit'] = requestParameters.membersLimit;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
if (requestParameters.ring !== undefined) {
|
|
574
|
+
queryParameters['ring'] = requestParameters.ring;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
if (requestParameters.notify !== undefined) {
|
|
578
|
+
queryParameters['notify'] = requestParameters.notify;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
582
|
+
|
|
583
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
584
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
588
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
592
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
const response = await this.request({
|
|
596
|
+
path: `/call/{type}/{id}`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
597
|
+
method: 'GET',
|
|
598
|
+
headers: headerParameters,
|
|
599
|
+
query: queryParameters,
|
|
600
|
+
}, initOverrides);
|
|
601
|
+
|
|
602
|
+
return new runtime.JSONApiResponse(response);
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Required permissions: - ReadCall
|
|
607
|
+
* Get Call
|
|
608
|
+
*/
|
|
609
|
+
async getCall(requestParameters: GetCallRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoGetCallResponse> {
|
|
610
|
+
const response = await this.getCallRaw(requestParameters, initOverrides);
|
|
611
|
+
return await response.value();
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Returns the list of all edges available for video calls.
|
|
616
|
+
* Get Edges
|
|
617
|
+
*/
|
|
618
|
+
async getEdgesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoGetEdgesResponse>> {
|
|
619
|
+
const queryParameters: any = {};
|
|
620
|
+
|
|
621
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
622
|
+
|
|
623
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
624
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
628
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
632
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
const response = await this.request({
|
|
636
|
+
path: `/edges`,
|
|
637
|
+
method: 'GET',
|
|
638
|
+
headers: headerParameters,
|
|
639
|
+
query: queryParameters,
|
|
640
|
+
}, initOverrides);
|
|
641
|
+
|
|
642
|
+
return new runtime.JSONApiResponse(response);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Returns the list of all edges available for video calls.
|
|
647
|
+
* Get Edges
|
|
648
|
+
*/
|
|
649
|
+
async getEdges(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoGetEdgesResponse> {
|
|
650
|
+
const response = await this.getEdgesRaw(initOverrides);
|
|
651
|
+
return await response.value();
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Gets or creates a new call Sends events: - call.created - call.notification - call.ring Required permissions: - CreateCall - ReadCall - UpdateCallSettings
|
|
656
|
+
* Get or create a call
|
|
657
|
+
*/
|
|
658
|
+
async getOrCreateCallRaw(requestParameters: GetOrCreateCallRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoGetOrCreateCallResponse>> {
|
|
659
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
660
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling getOrCreateCall.');
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
664
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getOrCreateCall.');
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
if (requestParameters.videoGetOrCreateCallRequest === null || requestParameters.videoGetOrCreateCallRequest === undefined) {
|
|
668
|
+
throw new runtime.RequiredError('videoGetOrCreateCallRequest','Required parameter requestParameters.videoGetOrCreateCallRequest was null or undefined when calling getOrCreateCall.');
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
const queryParameters: any = {};
|
|
672
|
+
|
|
673
|
+
if (requestParameters.connectionId !== undefined) {
|
|
674
|
+
queryParameters['connection_id'] = requestParameters.connectionId;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
678
|
+
|
|
679
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
680
|
+
|
|
681
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
682
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
686
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
690
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
const response = await this.request({
|
|
694
|
+
path: `/call/{type}/{id}`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
695
|
+
method: 'POST',
|
|
696
|
+
headers: headerParameters,
|
|
697
|
+
query: queryParameters,
|
|
698
|
+
body: requestParameters.videoGetOrCreateCallRequest,
|
|
699
|
+
}, initOverrides);
|
|
700
|
+
|
|
701
|
+
return new runtime.JSONApiResponse(response);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* Gets or creates a new call Sends events: - call.created - call.notification - call.ring Required permissions: - CreateCall - ReadCall - UpdateCallSettings
|
|
706
|
+
* Get or create a call
|
|
707
|
+
*/
|
|
708
|
+
async getOrCreateCall(requestParameters: GetOrCreateCallRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoGetOrCreateCallResponse> {
|
|
709
|
+
const response = await this.getOrCreateCallRaw(requestParameters, initOverrides);
|
|
710
|
+
return await response.value();
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* Sends events: - call.live_started Required permissions: - UpdateCall
|
|
715
|
+
* Set call as live
|
|
716
|
+
*/
|
|
717
|
+
async goLiveRaw(requestParameters: GoLiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoGoLiveResponse>> {
|
|
718
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
719
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling goLive.');
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
723
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling goLive.');
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
if (requestParameters.videoGoLiveRequest === null || requestParameters.videoGoLiveRequest === undefined) {
|
|
727
|
+
throw new runtime.RequiredError('videoGoLiveRequest','Required parameter requestParameters.videoGoLiveRequest was null or undefined when calling goLive.');
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
const queryParameters: any = {};
|
|
731
|
+
|
|
732
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
733
|
+
|
|
734
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
735
|
+
|
|
736
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
737
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
741
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
745
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
const response = await this.request({
|
|
749
|
+
path: `/call/{type}/{id}/go_live`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
750
|
+
method: 'POST',
|
|
751
|
+
headers: headerParameters,
|
|
752
|
+
query: queryParameters,
|
|
753
|
+
body: requestParameters.videoGoLiveRequest,
|
|
754
|
+
}, initOverrides);
|
|
755
|
+
|
|
756
|
+
return new runtime.JSONApiResponse(response);
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* Sends events: - call.live_started Required permissions: - UpdateCall
|
|
761
|
+
* Set call as live
|
|
762
|
+
*/
|
|
763
|
+
async goLive(requestParameters: GoLiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoGoLiveResponse> {
|
|
764
|
+
const response = await this.goLiveRaw(requestParameters, initOverrides);
|
|
765
|
+
return await response.value();
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* Request to join a call Required permissions: - CreateCall - JoinCall
|
|
770
|
+
* Join call
|
|
771
|
+
*/
|
|
772
|
+
async joinCallRaw(requestParameters: JoinCallRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoJoinCallResponse>> {
|
|
773
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
774
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling joinCall.');
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
778
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling joinCall.');
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
if (requestParameters.videoJoinCallRequest === null || requestParameters.videoJoinCallRequest === undefined) {
|
|
782
|
+
throw new runtime.RequiredError('videoJoinCallRequest','Required parameter requestParameters.videoJoinCallRequest was null or undefined when calling joinCall.');
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
const queryParameters: any = {};
|
|
786
|
+
|
|
787
|
+
if (requestParameters.connectionId !== undefined) {
|
|
788
|
+
queryParameters['connection_id'] = requestParameters.connectionId;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
792
|
+
|
|
793
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
794
|
+
|
|
795
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
796
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
800
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
804
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
const response = await this.request({
|
|
808
|
+
path: `/call/{type}/{id}/join`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
809
|
+
method: 'POST',
|
|
810
|
+
headers: headerParameters,
|
|
811
|
+
query: queryParameters,
|
|
812
|
+
body: requestParameters.videoJoinCallRequest,
|
|
813
|
+
}, initOverrides);
|
|
814
|
+
|
|
815
|
+
return new runtime.JSONApiResponse(response);
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Request to join a call Required permissions: - CreateCall - JoinCall
|
|
820
|
+
* Join call
|
|
821
|
+
*/
|
|
822
|
+
async joinCall(requestParameters: JoinCallRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoJoinCallResponse> {
|
|
823
|
+
const response = await this.joinCallRaw(requestParameters, initOverrides);
|
|
824
|
+
return await response.value();
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* Returns all available devices
|
|
829
|
+
* List devices
|
|
830
|
+
*/
|
|
831
|
+
async listDevicesRaw(requestParameters: ListDevicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoListDevicesResponse>> {
|
|
832
|
+
const queryParameters: any = {};
|
|
833
|
+
|
|
834
|
+
if (requestParameters.userId !== undefined) {
|
|
835
|
+
queryParameters['user_id'] = requestParameters.userId;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
839
|
+
|
|
840
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
841
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
845
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
849
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
const response = await this.request({
|
|
853
|
+
path: `/devices`,
|
|
854
|
+
method: 'GET',
|
|
855
|
+
headers: headerParameters,
|
|
856
|
+
query: queryParameters,
|
|
857
|
+
}, initOverrides);
|
|
858
|
+
|
|
859
|
+
return new runtime.JSONApiResponse(response);
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* Returns all available devices
|
|
864
|
+
* List devices
|
|
865
|
+
*/
|
|
866
|
+
async listDevices(requestParameters: ListDevicesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoListDevicesResponse> {
|
|
867
|
+
const response = await this.listDevicesRaw(requestParameters, initOverrides);
|
|
868
|
+
return await response.value();
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
/**
|
|
872
|
+
* Lists recordings Required permissions: - ListRecordings
|
|
873
|
+
* List recordings
|
|
874
|
+
*/
|
|
875
|
+
async listRecordingsRaw(requestParameters: ListRecordingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoListRecordingsResponse>> {
|
|
876
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
877
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling listRecordings.');
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
881
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling listRecordings.');
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
const queryParameters: any = {};
|
|
885
|
+
|
|
886
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
887
|
+
|
|
888
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
889
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
893
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
897
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
const response = await this.request({
|
|
901
|
+
path: `/call/{type}/{id}/recordings`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
902
|
+
method: 'GET',
|
|
903
|
+
headers: headerParameters,
|
|
904
|
+
query: queryParameters,
|
|
905
|
+
}, initOverrides);
|
|
906
|
+
|
|
907
|
+
return new runtime.JSONApiResponse(response);
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* Lists recordings Required permissions: - ListRecordings
|
|
912
|
+
* List recordings
|
|
913
|
+
*/
|
|
914
|
+
async listRecordings(requestParameters: ListRecordingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoListRecordingsResponse> {
|
|
915
|
+
const response = await this.listRecordingsRaw(requestParameters, initOverrides);
|
|
916
|
+
return await response.value();
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* Mutes users in a call Required permissions: - MuteUsers
|
|
921
|
+
* Mute users
|
|
922
|
+
*/
|
|
923
|
+
async muteUsersRaw(requestParameters: MuteUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoMuteUsersResponse>> {
|
|
924
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
925
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling muteUsers.');
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
929
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling muteUsers.');
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
if (requestParameters.videoMuteUsersRequest === null || requestParameters.videoMuteUsersRequest === undefined) {
|
|
933
|
+
throw new runtime.RequiredError('videoMuteUsersRequest','Required parameter requestParameters.videoMuteUsersRequest was null or undefined when calling muteUsers.');
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
const queryParameters: any = {};
|
|
937
|
+
|
|
938
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
939
|
+
|
|
940
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
941
|
+
|
|
942
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
943
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
947
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
951
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
const response = await this.request({
|
|
955
|
+
path: `/call/{type}/{id}/mute_users`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
956
|
+
method: 'POST',
|
|
957
|
+
headers: headerParameters,
|
|
958
|
+
query: queryParameters,
|
|
959
|
+
body: requestParameters.videoMuteUsersRequest,
|
|
960
|
+
}, initOverrides);
|
|
961
|
+
|
|
962
|
+
return new runtime.JSONApiResponse(response);
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* Mutes users in a call Required permissions: - MuteUsers
|
|
967
|
+
* Mute users
|
|
968
|
+
*/
|
|
969
|
+
async muteUsers(requestParameters: MuteUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoMuteUsersResponse> {
|
|
970
|
+
const response = await this.muteUsersRaw(requestParameters, initOverrides);
|
|
971
|
+
return await response.value();
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* Query calls with filter query Required permissions: - ReadCall
|
|
976
|
+
* Query call
|
|
977
|
+
*/
|
|
978
|
+
async queryCallsRaw(requestParameters: QueryCallsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoQueryCallsResponse>> {
|
|
979
|
+
if (requestParameters.videoQueryCallsRequest === null || requestParameters.videoQueryCallsRequest === undefined) {
|
|
980
|
+
throw new runtime.RequiredError('videoQueryCallsRequest','Required parameter requestParameters.videoQueryCallsRequest was null or undefined when calling queryCalls.');
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
const queryParameters: any = {};
|
|
984
|
+
|
|
985
|
+
if (requestParameters.connectionId !== undefined) {
|
|
986
|
+
queryParameters['connection_id'] = requestParameters.connectionId;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
990
|
+
|
|
991
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
992
|
+
|
|
993
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
994
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
998
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1002
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
const response = await this.request({
|
|
1006
|
+
path: `/calls`,
|
|
1007
|
+
method: 'POST',
|
|
1008
|
+
headers: headerParameters,
|
|
1009
|
+
query: queryParameters,
|
|
1010
|
+
body: requestParameters.videoQueryCallsRequest,
|
|
1011
|
+
}, initOverrides);
|
|
1012
|
+
|
|
1013
|
+
return new runtime.JSONApiResponse(response);
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* Query calls with filter query Required permissions: - ReadCall
|
|
1018
|
+
* Query call
|
|
1019
|
+
*/
|
|
1020
|
+
async queryCalls(requestParameters: QueryCallsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoQueryCallsResponse> {
|
|
1021
|
+
const response = await this.queryCallsRaw(requestParameters, initOverrides);
|
|
1022
|
+
return await response.value();
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* Query call members with filter query Required permissions: - ReadCall
|
|
1027
|
+
* Query call members
|
|
1028
|
+
*/
|
|
1029
|
+
async queryMembersRaw(requestParameters: QueryMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoQueryMembersResponse>> {
|
|
1030
|
+
if (requestParameters.videoQueryMembersRequest === null || requestParameters.videoQueryMembersRequest === undefined) {
|
|
1031
|
+
throw new runtime.RequiredError('videoQueryMembersRequest','Required parameter requestParameters.videoQueryMembersRequest was null or undefined when calling queryMembers.');
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
const queryParameters: any = {};
|
|
1035
|
+
|
|
1036
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1037
|
+
|
|
1038
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1039
|
+
|
|
1040
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1041
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1045
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1049
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
const response = await this.request({
|
|
1053
|
+
path: `/call/members`,
|
|
1054
|
+
method: 'POST',
|
|
1055
|
+
headers: headerParameters,
|
|
1056
|
+
query: queryParameters,
|
|
1057
|
+
body: requestParameters.videoQueryMembersRequest,
|
|
1058
|
+
}, initOverrides);
|
|
1059
|
+
|
|
1060
|
+
return new runtime.JSONApiResponse(response);
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
/**
|
|
1064
|
+
* Query call members with filter query Required permissions: - ReadCall
|
|
1065
|
+
* Query call members
|
|
1066
|
+
*/
|
|
1067
|
+
async queryMembers(requestParameters: QueryMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoQueryMembersResponse> {
|
|
1068
|
+
const response = await this.queryMembersRaw(requestParameters, initOverrides);
|
|
1069
|
+
return await response.value();
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* Sends events: - call.rejected Required permissions: - JoinCall
|
|
1074
|
+
* Reject Call
|
|
1075
|
+
*/
|
|
1076
|
+
async rejectCallRaw(requestParameters: RejectCallRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoRejectCallResponse>> {
|
|
1077
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
1078
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling rejectCall.');
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
1082
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling rejectCall.');
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
const queryParameters: any = {};
|
|
1086
|
+
|
|
1087
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1088
|
+
|
|
1089
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1090
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1094
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1098
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
const response = await this.request({
|
|
1102
|
+
path: `/call/{type}/{id}/reject`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1103
|
+
method: 'POST',
|
|
1104
|
+
headers: headerParameters,
|
|
1105
|
+
query: queryParameters,
|
|
1106
|
+
}, initOverrides);
|
|
1107
|
+
|
|
1108
|
+
return new runtime.JSONApiResponse(response);
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* Sends events: - call.rejected Required permissions: - JoinCall
|
|
1113
|
+
* Reject Call
|
|
1114
|
+
*/
|
|
1115
|
+
async rejectCall(requestParameters: RejectCallRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoRejectCallResponse> {
|
|
1116
|
+
const response = await this.rejectCallRaw(requestParameters, initOverrides);
|
|
1117
|
+
return await response.value();
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* Request permission to perform an action Sends events: - call.permission_request
|
|
1122
|
+
* Request permission
|
|
1123
|
+
*/
|
|
1124
|
+
async requestPermissionRaw(requestParameters: RequestPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoRequestPermissionResponse>> {
|
|
1125
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
1126
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling requestPermission.');
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
1130
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling requestPermission.');
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
if (requestParameters.videoRequestPermissionRequest === null || requestParameters.videoRequestPermissionRequest === undefined) {
|
|
1134
|
+
throw new runtime.RequiredError('videoRequestPermissionRequest','Required parameter requestParameters.videoRequestPermissionRequest was null or undefined when calling requestPermission.');
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
const queryParameters: any = {};
|
|
1138
|
+
|
|
1139
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1140
|
+
|
|
1141
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1142
|
+
|
|
1143
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1144
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1148
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1152
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
const response = await this.request({
|
|
1156
|
+
path: `/call/{type}/{id}/request_permission`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1157
|
+
method: 'POST',
|
|
1158
|
+
headers: headerParameters,
|
|
1159
|
+
query: queryParameters,
|
|
1160
|
+
body: requestParameters.videoRequestPermissionRequest,
|
|
1161
|
+
}, initOverrides);
|
|
1162
|
+
|
|
1163
|
+
return new runtime.JSONApiResponse(response);
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
/**
|
|
1167
|
+
* Request permission to perform an action Sends events: - call.permission_request
|
|
1168
|
+
* Request permission
|
|
1169
|
+
*/
|
|
1170
|
+
async requestPermission(requestParameters: RequestPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoRequestPermissionResponse> {
|
|
1171
|
+
const response = await this.requestPermissionRaw(requestParameters, initOverrides);
|
|
1172
|
+
return await response.value();
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
/**
|
|
1176
|
+
* Sends custom event to the call Sends events: - custom Required permissions: - SendEvent
|
|
1177
|
+
* Send custom event
|
|
1178
|
+
*/
|
|
1179
|
+
async sendEventRaw(requestParameters: SendEventRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoSendEventResponse>> {
|
|
1180
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
1181
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling sendEvent.');
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
1185
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling sendEvent.');
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
if (requestParameters.videoSendEventRequest === null || requestParameters.videoSendEventRequest === undefined) {
|
|
1189
|
+
throw new runtime.RequiredError('videoSendEventRequest','Required parameter requestParameters.videoSendEventRequest was null or undefined when calling sendEvent.');
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
const queryParameters: any = {};
|
|
1193
|
+
|
|
1194
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1195
|
+
|
|
1196
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1197
|
+
|
|
1198
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1199
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1203
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1207
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
const response = await this.request({
|
|
1211
|
+
path: `/call/{type}/{id}/event`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1212
|
+
method: 'POST',
|
|
1213
|
+
headers: headerParameters,
|
|
1214
|
+
query: queryParameters,
|
|
1215
|
+
body: requestParameters.videoSendEventRequest,
|
|
1216
|
+
}, initOverrides);
|
|
1217
|
+
|
|
1218
|
+
return new runtime.JSONApiResponse(response);
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
/**
|
|
1222
|
+
* Sends custom event to the call Sends events: - custom Required permissions: - SendEvent
|
|
1223
|
+
* Send custom event
|
|
1224
|
+
*/
|
|
1225
|
+
async sendEvent(requestParameters: SendEventRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoSendEventResponse> {
|
|
1226
|
+
const response = await this.sendEventRaw(requestParameters, initOverrides);
|
|
1227
|
+
return await response.value();
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* Sends reaction to the call Sends events: - call.reaction_new Required permissions: - CreateCallReaction
|
|
1232
|
+
* Send reaction to the call
|
|
1233
|
+
*/
|
|
1234
|
+
async sendVideoReactionRaw(requestParameters: SendVideoReactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoSendReactionResponse>> {
|
|
1235
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
1236
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling sendVideoReaction.');
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
1240
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling sendVideoReaction.');
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
if (requestParameters.videoSendReactionRequest === null || requestParameters.videoSendReactionRequest === undefined) {
|
|
1244
|
+
throw new runtime.RequiredError('videoSendReactionRequest','Required parameter requestParameters.videoSendReactionRequest was null or undefined when calling sendVideoReaction.');
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
const queryParameters: any = {};
|
|
1248
|
+
|
|
1249
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1250
|
+
|
|
1251
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1252
|
+
|
|
1253
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1254
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1258
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1262
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
const response = await this.request({
|
|
1266
|
+
path: `/call/{type}/{id}/reaction`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1267
|
+
method: 'POST',
|
|
1268
|
+
headers: headerParameters,
|
|
1269
|
+
query: queryParameters,
|
|
1270
|
+
body: requestParameters.videoSendReactionRequest,
|
|
1271
|
+
}, initOverrides);
|
|
1272
|
+
|
|
1273
|
+
return new runtime.JSONApiResponse(response);
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
/**
|
|
1277
|
+
* Sends reaction to the call Sends events: - call.reaction_new Required permissions: - CreateCallReaction
|
|
1278
|
+
* Send reaction to the call
|
|
1279
|
+
*/
|
|
1280
|
+
async sendVideoReaction(requestParameters: SendVideoReactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoSendReactionResponse> {
|
|
1281
|
+
const response = await this.sendVideoReactionRaw(requestParameters, initOverrides);
|
|
1282
|
+
return await response.value();
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* Starts HLS broadcasting Required permissions: - StartBroadcasting
|
|
1287
|
+
* Start HLS broadcasting
|
|
1288
|
+
*/
|
|
1289
|
+
async startHLSBroadcastingRaw(requestParameters: StartHLSBroadcastingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoStartHLSBroadcastingResponse>> {
|
|
1290
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
1291
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling startHLSBroadcasting.');
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
1295
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling startHLSBroadcasting.');
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
const queryParameters: any = {};
|
|
1299
|
+
|
|
1300
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1301
|
+
|
|
1302
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1303
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1307
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1311
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
const response = await this.request({
|
|
1315
|
+
path: `/call/{type}/{id}/start_broadcasting`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1316
|
+
method: 'POST',
|
|
1317
|
+
headers: headerParameters,
|
|
1318
|
+
query: queryParameters,
|
|
1319
|
+
}, initOverrides);
|
|
1320
|
+
|
|
1321
|
+
return new runtime.JSONApiResponse(response);
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
/**
|
|
1325
|
+
* Starts HLS broadcasting Required permissions: - StartBroadcasting
|
|
1326
|
+
* Start HLS broadcasting
|
|
1327
|
+
*/
|
|
1328
|
+
async startHLSBroadcasting(requestParameters: StartHLSBroadcastingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoStartHLSBroadcastingResponse> {
|
|
1329
|
+
const response = await this.startHLSBroadcastingRaw(requestParameters, initOverrides);
|
|
1330
|
+
return await response.value();
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
/**
|
|
1334
|
+
* Starts recording Sends events: - call.recording_started Required permissions: - StopRecording
|
|
1335
|
+
* Start recording
|
|
1336
|
+
*/
|
|
1337
|
+
async startRecordingRaw(requestParameters: StartRecordingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoStartRecordingResponse>> {
|
|
1338
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
1339
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling startRecording.');
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
1343
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling startRecording.');
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
const queryParameters: any = {};
|
|
1347
|
+
|
|
1348
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1349
|
+
|
|
1350
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1351
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1355
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1359
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
const response = await this.request({
|
|
1363
|
+
path: `/call/{type}/{id}/start_recording`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1364
|
+
method: 'POST',
|
|
1365
|
+
headers: headerParameters,
|
|
1366
|
+
query: queryParameters,
|
|
1367
|
+
}, initOverrides);
|
|
1368
|
+
|
|
1369
|
+
return new runtime.JSONApiResponse(response);
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
/**
|
|
1373
|
+
* Starts recording Sends events: - call.recording_started Required permissions: - StopRecording
|
|
1374
|
+
* Start recording
|
|
1375
|
+
*/
|
|
1376
|
+
async startRecording(requestParameters: StartRecordingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoStartRecordingResponse> {
|
|
1377
|
+
const response = await this.startRecordingRaw(requestParameters, initOverrides);
|
|
1378
|
+
return await response.value();
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
/**
|
|
1382
|
+
* Starts transcription Required permissions: - StartTranscription
|
|
1383
|
+
* Start transcription
|
|
1384
|
+
*/
|
|
1385
|
+
async startTranscriptionRaw(requestParameters: StartTranscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoStartTranscriptionResponse>> {
|
|
1386
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
1387
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling startTranscription.');
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
1391
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling startTranscription.');
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
const queryParameters: any = {};
|
|
1395
|
+
|
|
1396
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1397
|
+
|
|
1398
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1399
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1403
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1407
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
const response = await this.request({
|
|
1411
|
+
path: `/call/{type}/{id}/start_transcription`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1412
|
+
method: 'POST',
|
|
1413
|
+
headers: headerParameters,
|
|
1414
|
+
query: queryParameters,
|
|
1415
|
+
}, initOverrides);
|
|
1416
|
+
|
|
1417
|
+
return new runtime.JSONApiResponse(response);
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
/**
|
|
1421
|
+
* Starts transcription Required permissions: - StartTranscription
|
|
1422
|
+
* Start transcription
|
|
1423
|
+
*/
|
|
1424
|
+
async startTranscription(requestParameters: StartTranscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoStartTranscriptionResponse> {
|
|
1425
|
+
const response = await this.startTranscriptionRaw(requestParameters, initOverrides);
|
|
1426
|
+
return await response.value();
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
/**
|
|
1430
|
+
* Stops HLS broadcasting Required permissions: - StopBroadcasting
|
|
1431
|
+
* Stop HLS broadcasting
|
|
1432
|
+
*/
|
|
1433
|
+
async stopHLSBroadcastingRaw(requestParameters: StopHLSBroadcastingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoStopHLSBroadcastingResponse>> {
|
|
1434
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
1435
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling stopHLSBroadcasting.');
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
1439
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling stopHLSBroadcasting.');
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
const queryParameters: any = {};
|
|
1443
|
+
|
|
1444
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1445
|
+
|
|
1446
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1447
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1451
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1455
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
const response = await this.request({
|
|
1459
|
+
path: `/call/{type}/{id}/stop_broadcasting`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1460
|
+
method: 'POST',
|
|
1461
|
+
headers: headerParameters,
|
|
1462
|
+
query: queryParameters,
|
|
1463
|
+
}, initOverrides);
|
|
1464
|
+
|
|
1465
|
+
return new runtime.JSONApiResponse(response);
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
/**
|
|
1469
|
+
* Stops HLS broadcasting Required permissions: - StopBroadcasting
|
|
1470
|
+
* Stop HLS broadcasting
|
|
1471
|
+
*/
|
|
1472
|
+
async stopHLSBroadcasting(requestParameters: StopHLSBroadcastingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoStopHLSBroadcastingResponse> {
|
|
1473
|
+
const response = await this.stopHLSBroadcastingRaw(requestParameters, initOverrides);
|
|
1474
|
+
return await response.value();
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
/**
|
|
1478
|
+
* Sends events: - call.updated Required permissions: - UpdateCall
|
|
1479
|
+
* Set call as not live
|
|
1480
|
+
*/
|
|
1481
|
+
async stopLiveRaw(requestParameters: StopLiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoStopLiveResponse>> {
|
|
1482
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
1483
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling stopLive.');
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
1487
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling stopLive.');
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
const queryParameters: any = {};
|
|
1491
|
+
|
|
1492
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1493
|
+
|
|
1494
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1495
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1499
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1503
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
const response = await this.request({
|
|
1507
|
+
path: `/call/{type}/{id}/stop_live`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1508
|
+
method: 'POST',
|
|
1509
|
+
headers: headerParameters,
|
|
1510
|
+
query: queryParameters,
|
|
1511
|
+
}, initOverrides);
|
|
1512
|
+
|
|
1513
|
+
return new runtime.JSONApiResponse(response);
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
/**
|
|
1517
|
+
* Sends events: - call.updated Required permissions: - UpdateCall
|
|
1518
|
+
* Set call as not live
|
|
1519
|
+
*/
|
|
1520
|
+
async stopLive(requestParameters: StopLiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoStopLiveResponse> {
|
|
1521
|
+
const response = await this.stopLiveRaw(requestParameters, initOverrides);
|
|
1522
|
+
return await response.value();
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
/**
|
|
1526
|
+
* Stops recording Sends events: - call.recording_stopped Required permissions: - StopRecording
|
|
1527
|
+
* Stop recording
|
|
1528
|
+
*/
|
|
1529
|
+
async stopRecordingRaw(requestParameters: StopRecordingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoStopRecordingResponse>> {
|
|
1530
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
1531
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling stopRecording.');
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
1535
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling stopRecording.');
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
const queryParameters: any = {};
|
|
1539
|
+
|
|
1540
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1541
|
+
|
|
1542
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1543
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1547
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1551
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
const response = await this.request({
|
|
1555
|
+
path: `/call/{type}/{id}/stop_recording`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1556
|
+
method: 'POST',
|
|
1557
|
+
headers: headerParameters,
|
|
1558
|
+
query: queryParameters,
|
|
1559
|
+
}, initOverrides);
|
|
1560
|
+
|
|
1561
|
+
return new runtime.JSONApiResponse(response);
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
/**
|
|
1565
|
+
* Stops recording Sends events: - call.recording_stopped Required permissions: - StopRecording
|
|
1566
|
+
* Stop recording
|
|
1567
|
+
*/
|
|
1568
|
+
async stopRecording(requestParameters: StopRecordingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoStopRecordingResponse> {
|
|
1569
|
+
const response = await this.stopRecordingRaw(requestParameters, initOverrides);
|
|
1570
|
+
return await response.value();
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
/**
|
|
1574
|
+
* Stops transcription Required permissions: - StopTranscription
|
|
1575
|
+
* Stop transcription
|
|
1576
|
+
*/
|
|
1577
|
+
async stopTranscriptionRaw(requestParameters: StopTranscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoStopTranscriptionResponse>> {
|
|
1578
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
1579
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling stopTranscription.');
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
1583
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling stopTranscription.');
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
const queryParameters: any = {};
|
|
1587
|
+
|
|
1588
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1589
|
+
|
|
1590
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1591
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1595
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1599
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
const response = await this.request({
|
|
1603
|
+
path: `/call/{type}/{id}/stop_transcription`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1604
|
+
method: 'POST',
|
|
1605
|
+
headers: headerParameters,
|
|
1606
|
+
query: queryParameters,
|
|
1607
|
+
}, initOverrides);
|
|
1608
|
+
|
|
1609
|
+
return new runtime.JSONApiResponse(response);
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
/**
|
|
1613
|
+
* Stops transcription Required permissions: - StopTranscription
|
|
1614
|
+
* Stop transcription
|
|
1615
|
+
*/
|
|
1616
|
+
async stopTranscription(requestParameters: StopTranscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoStopTranscriptionResponse> {
|
|
1617
|
+
const response = await this.stopTranscriptionRaw(requestParameters, initOverrides);
|
|
1618
|
+
return await response.value();
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
/**
|
|
1622
|
+
* Removes the block for a user on a call. The user will be able to join the call again. Sends events: - call.unblocked_user Required permissions: - BlockUser
|
|
1623
|
+
* Unblocks user on a call
|
|
1624
|
+
*/
|
|
1625
|
+
async unblockUserRaw(requestParameters: UnblockUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoUnblockUserResponse>> {
|
|
1626
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
1627
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling unblockUser.');
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
1631
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling unblockUser.');
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
if (requestParameters.videoUnblockUserRequest === null || requestParameters.videoUnblockUserRequest === undefined) {
|
|
1635
|
+
throw new runtime.RequiredError('videoUnblockUserRequest','Required parameter requestParameters.videoUnblockUserRequest was null or undefined when calling unblockUser.');
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
const queryParameters: any = {};
|
|
1639
|
+
|
|
1640
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1641
|
+
|
|
1642
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1643
|
+
|
|
1644
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1645
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1649
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1653
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
const response = await this.request({
|
|
1657
|
+
path: `/call/{type}/{id}/unblock`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1658
|
+
method: 'POST',
|
|
1659
|
+
headers: headerParameters,
|
|
1660
|
+
query: queryParameters,
|
|
1661
|
+
body: requestParameters.videoUnblockUserRequest,
|
|
1662
|
+
}, initOverrides);
|
|
1663
|
+
|
|
1664
|
+
return new runtime.JSONApiResponse(response);
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
/**
|
|
1668
|
+
* Removes the block for a user on a call. The user will be able to join the call again. Sends events: - call.unblocked_user Required permissions: - BlockUser
|
|
1669
|
+
* Unblocks user on a call
|
|
1670
|
+
*/
|
|
1671
|
+
async unblockUser(requestParameters: UnblockUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoUnblockUserResponse> {
|
|
1672
|
+
const response = await this.unblockUserRaw(requestParameters, initOverrides);
|
|
1673
|
+
return await response.value();
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
/**
|
|
1677
|
+
* Sends events: - call.updated Required permissions: - UpdateCall
|
|
1678
|
+
* Update Call
|
|
1679
|
+
*/
|
|
1680
|
+
async updateCallRaw(requestParameters: UpdateCallRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoUpdateCallResponse>> {
|
|
1681
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
1682
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling updateCall.');
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
1686
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updateCall.');
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
if (requestParameters.videoUpdateCallRequest === null || requestParameters.videoUpdateCallRequest === undefined) {
|
|
1690
|
+
throw new runtime.RequiredError('videoUpdateCallRequest','Required parameter requestParameters.videoUpdateCallRequest was null or undefined when calling updateCall.');
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
const queryParameters: any = {};
|
|
1694
|
+
|
|
1695
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1696
|
+
|
|
1697
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1698
|
+
|
|
1699
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1700
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1704
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1708
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
const response = await this.request({
|
|
1712
|
+
path: `/call/{type}/{id}`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1713
|
+
method: 'PATCH',
|
|
1714
|
+
headers: headerParameters,
|
|
1715
|
+
query: queryParameters,
|
|
1716
|
+
body: requestParameters.videoUpdateCallRequest,
|
|
1717
|
+
}, initOverrides);
|
|
1718
|
+
|
|
1719
|
+
return new runtime.JSONApiResponse(response);
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
/**
|
|
1723
|
+
* Sends events: - call.updated Required permissions: - UpdateCall
|
|
1724
|
+
* Update Call
|
|
1725
|
+
*/
|
|
1726
|
+
async updateCall(requestParameters: UpdateCallRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoUpdateCallResponse> {
|
|
1727
|
+
const response = await this.updateCallRaw(requestParameters, initOverrides);
|
|
1728
|
+
return await response.value();
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
/**
|
|
1732
|
+
* Sends events: - call.member_added - call.member_removed - call.member_updated Required permissions: - RemoveCallMember - UpdateCallMember - UpdateCallMemberRole
|
|
1733
|
+
* Update Call Member
|
|
1734
|
+
*/
|
|
1735
|
+
async updateCallMembersRaw(requestParameters: UpdateCallMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoUpdateCallMembersResponse>> {
|
|
1736
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
1737
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling updateCallMembers.');
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
1741
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updateCallMembers.');
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
if (requestParameters.videoUpdateCallMembersRequest === null || requestParameters.videoUpdateCallMembersRequest === undefined) {
|
|
1745
|
+
throw new runtime.RequiredError('videoUpdateCallMembersRequest','Required parameter requestParameters.videoUpdateCallMembersRequest was null or undefined when calling updateCallMembers.');
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
const queryParameters: any = {};
|
|
1749
|
+
|
|
1750
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1751
|
+
|
|
1752
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1753
|
+
|
|
1754
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1755
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1759
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1763
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
const response = await this.request({
|
|
1767
|
+
path: `/call/{type}/{id}/members`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1768
|
+
method: 'POST',
|
|
1769
|
+
headers: headerParameters,
|
|
1770
|
+
query: queryParameters,
|
|
1771
|
+
body: requestParameters.videoUpdateCallMembersRequest,
|
|
1772
|
+
}, initOverrides);
|
|
1773
|
+
|
|
1774
|
+
return new runtime.JSONApiResponse(response);
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
/**
|
|
1778
|
+
* Sends events: - call.member_added - call.member_removed - call.member_updated Required permissions: - RemoveCallMember - UpdateCallMember - UpdateCallMemberRole
|
|
1779
|
+
* Update Call Member
|
|
1780
|
+
*/
|
|
1781
|
+
async updateCallMembers(requestParameters: UpdateCallMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoUpdateCallMembersResponse> {
|
|
1782
|
+
const response = await this.updateCallMembersRaw(requestParameters, initOverrides);
|
|
1783
|
+
return await response.value();
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
/**
|
|
1787
|
+
* Updates user permissions Sends events: - call.permissions_updated Required permissions: - UpdateCallPermissions
|
|
1788
|
+
* Update user permissions
|
|
1789
|
+
*/
|
|
1790
|
+
async updateUserPermissionsRaw(requestParameters: UpdateUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoUpdateUserPermissionsResponse>> {
|
|
1791
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
1792
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling updateUserPermissions.');
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
1796
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updateUserPermissions.');
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
if (requestParameters.videoUpdateUserPermissionsRequest === null || requestParameters.videoUpdateUserPermissionsRequest === undefined) {
|
|
1800
|
+
throw new runtime.RequiredError('videoUpdateUserPermissionsRequest','Required parameter requestParameters.videoUpdateUserPermissionsRequest was null or undefined when calling updateUserPermissions.');
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
const queryParameters: any = {};
|
|
1804
|
+
|
|
1805
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1806
|
+
|
|
1807
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1808
|
+
|
|
1809
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1810
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1814
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1818
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
const response = await this.request({
|
|
1822
|
+
path: `/call/{type}/{id}/user_permissions`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1823
|
+
method: 'POST',
|
|
1824
|
+
headers: headerParameters,
|
|
1825
|
+
query: queryParameters,
|
|
1826
|
+
body: requestParameters.videoUpdateUserPermissionsRequest,
|
|
1827
|
+
}, initOverrides);
|
|
1828
|
+
|
|
1829
|
+
return new runtime.JSONApiResponse(response);
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
/**
|
|
1833
|
+
* Updates user permissions Sends events: - call.permissions_updated Required permissions: - UpdateCallPermissions
|
|
1834
|
+
* Update user permissions
|
|
1835
|
+
*/
|
|
1836
|
+
async updateUserPermissions(requestParameters: UpdateUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoUpdateUserPermissionsResponse> {
|
|
1837
|
+
const response = await this.updateUserPermissionsRaw(requestParameters, initOverrides);
|
|
1838
|
+
return await response.value();
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
/**
|
|
1842
|
+
* Establishes WebSocket connection for user to video Sends events: - connection.ok - health.check
|
|
1843
|
+
* Video Connect (WebSocket)
|
|
1844
|
+
*/
|
|
1845
|
+
async videoConnectRaw(requestParameters: VideoConnectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
1846
|
+
if (requestParameters.videoWSAuthMessageRequest === null || requestParameters.videoWSAuthMessageRequest === undefined) {
|
|
1847
|
+
throw new runtime.RequiredError('videoWSAuthMessageRequest','Required parameter requestParameters.videoWSAuthMessageRequest was null or undefined when calling videoConnect.');
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
const queryParameters: any = {};
|
|
1851
|
+
|
|
1852
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1853
|
+
|
|
1854
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1855
|
+
|
|
1856
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1857
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1861
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1865
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
const response = await this.request({
|
|
1869
|
+
path: `/video/connect`,
|
|
1870
|
+
method: 'GET',
|
|
1871
|
+
headers: headerParameters,
|
|
1872
|
+
query: queryParameters,
|
|
1873
|
+
body: requestParameters.videoWSAuthMessageRequest,
|
|
1874
|
+
}, initOverrides);
|
|
1875
|
+
|
|
1876
|
+
return new runtime.VoidApiResponse(response);
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
/**
|
|
1880
|
+
* Establishes WebSocket connection for user to video Sends events: - connection.ok - health.check
|
|
1881
|
+
* Video Connect (WebSocket)
|
|
1882
|
+
*/
|
|
1883
|
+
async videoConnect(requestParameters: VideoConnectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
1884
|
+
await this.videoConnectRaw(requestParameters, initOverrides);
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
/**
|
|
1888
|
+
* Pins a track for all users in the call. Required permissions: - PinCallTrack
|
|
1889
|
+
* Pin
|
|
1890
|
+
*/
|
|
1891
|
+
async videoPinRaw(requestParameters: VideoPinOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoPinResponse>> {
|
|
1892
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
1893
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling videoPin.');
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
1897
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling videoPin.');
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
if (requestParameters.videoPinRequest === null || requestParameters.videoPinRequest === undefined) {
|
|
1901
|
+
throw new runtime.RequiredError('videoPinRequest','Required parameter requestParameters.videoPinRequest was null or undefined when calling videoPin.');
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
const queryParameters: any = {};
|
|
1905
|
+
|
|
1906
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1907
|
+
|
|
1908
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1909
|
+
|
|
1910
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1911
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1915
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1916
|
+
}
|
|
1917
|
+
|
|
1918
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1919
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
const response = await this.request({
|
|
1923
|
+
path: `/call/{type}/{id}/pin`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1924
|
+
method: 'POST',
|
|
1925
|
+
headers: headerParameters,
|
|
1926
|
+
query: queryParameters,
|
|
1927
|
+
body: requestParameters.videoPinRequest,
|
|
1928
|
+
}, initOverrides);
|
|
1929
|
+
|
|
1930
|
+
return new runtime.JSONApiResponse(response);
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
/**
|
|
1934
|
+
* Pins a track for all users in the call. Required permissions: - PinCallTrack
|
|
1935
|
+
* Pin
|
|
1936
|
+
*/
|
|
1937
|
+
async videoPin(requestParameters: VideoPinOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoPinResponse> {
|
|
1938
|
+
const response = await this.videoPinRaw(requestParameters, initOverrides);
|
|
1939
|
+
return await response.value();
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
/**
|
|
1943
|
+
* Unpins a track for all users in the call. Required permissions: - PinCallTrack
|
|
1944
|
+
* Unpin
|
|
1945
|
+
*/
|
|
1946
|
+
async videoUnpinRaw(requestParameters: VideoUnpinOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoUnpinResponse>> {
|
|
1947
|
+
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
1948
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling videoUnpin.');
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
1952
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling videoUnpin.');
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
if (requestParameters.videoUnpinRequest === null || requestParameters.videoUnpinRequest === undefined) {
|
|
1956
|
+
throw new runtime.RequiredError('videoUnpinRequest','Required parameter requestParameters.videoUnpinRequest was null or undefined when calling videoUnpin.');
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
const queryParameters: any = {};
|
|
1960
|
+
|
|
1961
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1962
|
+
|
|
1963
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1964
|
+
|
|
1965
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1966
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1970
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1974
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
const response = await this.request({
|
|
1978
|
+
path: `/call/{type}/{id}/unpin`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
1979
|
+
method: 'POST',
|
|
1980
|
+
headers: headerParameters,
|
|
1981
|
+
query: queryParameters,
|
|
1982
|
+
body: requestParameters.videoUnpinRequest,
|
|
1983
|
+
}, initOverrides);
|
|
1984
|
+
|
|
1985
|
+
return new runtime.JSONApiResponse(response);
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
/**
|
|
1989
|
+
* Unpins a track for all users in the call. Required permissions: - PinCallTrack
|
|
1990
|
+
* Unpin
|
|
1991
|
+
*/
|
|
1992
|
+
async videoUnpin(requestParameters: VideoUnpinOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoUnpinResponse> {
|
|
1993
|
+
const response = await this.videoUnpinRaw(requestParameters, initOverrides);
|
|
1994
|
+
return await response.value();
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1997
|
+
}
|