@stream-io/node-sdk 0.4.25 → 0.5.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/dist/index.cjs.js +6265 -3834
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.es.mjs +6263 -3835
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/ApiClient.d.ts +15 -0
- package/dist/src/StreamCall.d.ts +2 -2
- package/dist/src/StreamClient.d.ts +10 -1
- package/dist/src/StreamFeed.d.ts +4 -0
- package/dist/src/StreamFeedsClient.d.ts +5 -0
- package/dist/src/StreamVideoClient.d.ts +3 -2
- package/dist/src/gen/chat/ChannelApi.d.ts +29 -30
- package/dist/src/gen/chat/ChatApi.d.ts +145 -180
- package/dist/src/gen/common/CommonApi.d.ts +122 -79
- package/dist/src/gen/feeds/FeedApi.d.ts +25 -0
- package/dist/src/gen/feeds/FeedsApi.d.ts +195 -0
- package/dist/src/gen/models/index.d.ts +1750 -47
- package/dist/src/gen/moderation/ModerationApi.d.ts +28 -27
- package/dist/src/gen/video/CallApi.d.ts +42 -43
- package/dist/src/gen/video/VideoApi.d.ts +91 -89
- package/dist/src/gen-imports.d.ts +5 -0
- package/index.ts +3 -1
- package/package.json +1 -1
- package/src/{BaseApi.ts → ApiClient.ts} +25 -6
- package/src/StreamCall.ts +2 -2
- package/src/StreamClient.ts +51 -14
- package/src/StreamFeed.ts +7 -0
- package/src/StreamFeedsClient.ts +8 -0
- package/src/StreamVideoClient.ts +9 -6
- package/src/gen/chat/ChannelApi.ts +74 -64
- package/src/gen/chat/ChatApi.ts +550 -681
- package/src/gen/common/CommonApi.ts +712 -262
- package/src/gen/feeds/FeedApi.ts +130 -0
- package/src/gen/feeds/FeedsApi.ts +1801 -0
- package/src/gen/model-decoders/{index.ts → decoders.ts} +2248 -336
- package/src/gen/models/index.ts +4668 -2088
- package/src/gen/moderation/ModerationApi.ts +159 -98
- package/src/gen/video/CallApi.ts +97 -108
- package/src/gen/video/VideoApi.ts +303 -203
- package/src/gen-imports.ts +5 -0
- package/dist/src/BaseApi.d.ts +0 -11
- /package/dist/src/gen/model-decoders/{index.d.ts → decoders.d.ts} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { StreamResponse } from '../../types';
|
|
1
|
+
import { ApiClient, StreamResponse } from '../../gen-imports';
|
|
3
2
|
import {
|
|
4
3
|
BlockUserRequest,
|
|
5
4
|
BlockUserResponse,
|
|
@@ -12,6 +11,7 @@ import {
|
|
|
12
11
|
DeleteRecordingResponse,
|
|
13
12
|
DeleteTranscriptionResponse,
|
|
14
13
|
EndCallResponse,
|
|
14
|
+
GetActiveCallsStatusResponse,
|
|
15
15
|
GetCallReportResponse,
|
|
16
16
|
GetCallResponse,
|
|
17
17
|
GetCallTypeResponse,
|
|
@@ -78,12 +78,26 @@ import {
|
|
|
78
78
|
UpdateUserPermissionsRequest,
|
|
79
79
|
UpdateUserPermissionsResponse,
|
|
80
80
|
} from '../models';
|
|
81
|
-
import { decoders } from '../model-decoders';
|
|
81
|
+
import { decoders } from '../model-decoders/decoders';
|
|
82
82
|
|
|
83
|
-
export class VideoApi
|
|
84
|
-
|
|
83
|
+
export class VideoApi {
|
|
84
|
+
constructor(public readonly apiClient: ApiClient) {}
|
|
85
|
+
|
|
86
|
+
async getActiveCallsStatus(): Promise<
|
|
87
|
+
StreamResponse<GetActiveCallsStatusResponse>
|
|
88
|
+
> {
|
|
89
|
+
const response = await this.apiClient.sendRequest<
|
|
90
|
+
StreamResponse<GetActiveCallsStatusResponse>
|
|
91
|
+
>('GET', '/api/v2/video/active_calls_status', undefined, undefined);
|
|
92
|
+
|
|
93
|
+
decoders.GetActiveCallsStatusResponse?.(response.body);
|
|
94
|
+
|
|
95
|
+
return { ...response.body, metadata: response.metadata };
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
async queryUserFeedback(
|
|
85
99
|
request?: QueryUserFeedbackRequest & { full?: boolean },
|
|
86
|
-
): Promise<StreamResponse<QueryUserFeedbackResponse>>
|
|
100
|
+
): Promise<StreamResponse<QueryUserFeedbackResponse>> {
|
|
87
101
|
const queryParams = {
|
|
88
102
|
full: request?.full,
|
|
89
103
|
};
|
|
@@ -95,18 +109,25 @@ export class VideoApi extends BaseApi {
|
|
|
95
109
|
filter_conditions: request?.filter_conditions,
|
|
96
110
|
};
|
|
97
111
|
|
|
98
|
-
const response = await this.sendRequest<
|
|
112
|
+
const response = await this.apiClient.sendRequest<
|
|
99
113
|
StreamResponse<QueryUserFeedbackResponse>
|
|
100
|
-
>(
|
|
114
|
+
>(
|
|
115
|
+
'POST',
|
|
116
|
+
'/api/v2/video/call/feedback',
|
|
117
|
+
undefined,
|
|
118
|
+
queryParams,
|
|
119
|
+
body,
|
|
120
|
+
'application/json',
|
|
121
|
+
);
|
|
101
122
|
|
|
102
123
|
decoders.QueryUserFeedbackResponse?.(response.body);
|
|
103
124
|
|
|
104
125
|
return { ...response.body, metadata: response.metadata };
|
|
105
|
-
}
|
|
126
|
+
}
|
|
106
127
|
|
|
107
|
-
|
|
128
|
+
async queryCallMembers(
|
|
108
129
|
request: QueryCallMembersRequest,
|
|
109
|
-
): Promise<StreamResponse<QueryCallMembersResponse>>
|
|
130
|
+
): Promise<StreamResponse<QueryCallMembersResponse>> {
|
|
110
131
|
const body = {
|
|
111
132
|
id: request?.id,
|
|
112
133
|
type: request?.type,
|
|
@@ -117,18 +138,25 @@ export class VideoApi extends BaseApi {
|
|
|
117
138
|
filter_conditions: request?.filter_conditions,
|
|
118
139
|
};
|
|
119
140
|
|
|
120
|
-
const response = await this.sendRequest<
|
|
141
|
+
const response = await this.apiClient.sendRequest<
|
|
121
142
|
StreamResponse<QueryCallMembersResponse>
|
|
122
|
-
>(
|
|
143
|
+
>(
|
|
144
|
+
'POST',
|
|
145
|
+
'/api/v2/video/call/members',
|
|
146
|
+
undefined,
|
|
147
|
+
undefined,
|
|
148
|
+
body,
|
|
149
|
+
'application/json',
|
|
150
|
+
);
|
|
123
151
|
|
|
124
152
|
decoders.QueryCallMembersResponse?.(response.body);
|
|
125
153
|
|
|
126
154
|
return { ...response.body, metadata: response.metadata };
|
|
127
|
-
}
|
|
155
|
+
}
|
|
128
156
|
|
|
129
|
-
|
|
157
|
+
async queryCallStats(
|
|
130
158
|
request?: QueryCallStatsRequest,
|
|
131
|
-
): Promise<StreamResponse<QueryCallStatsResponse>>
|
|
159
|
+
): Promise<StreamResponse<QueryCallStatsResponse>> {
|
|
132
160
|
const body = {
|
|
133
161
|
limit: request?.limit,
|
|
134
162
|
next: request?.next,
|
|
@@ -137,23 +165,30 @@ export class VideoApi extends BaseApi {
|
|
|
137
165
|
filter_conditions: request?.filter_conditions,
|
|
138
166
|
};
|
|
139
167
|
|
|
140
|
-
const response = await this.sendRequest<
|
|
168
|
+
const response = await this.apiClient.sendRequest<
|
|
141
169
|
StreamResponse<QueryCallStatsResponse>
|
|
142
|
-
>(
|
|
170
|
+
>(
|
|
171
|
+
'POST',
|
|
172
|
+
'/api/v2/video/call/stats',
|
|
173
|
+
undefined,
|
|
174
|
+
undefined,
|
|
175
|
+
body,
|
|
176
|
+
'application/json',
|
|
177
|
+
);
|
|
143
178
|
|
|
144
179
|
decoders.QueryCallStatsResponse?.(response.body);
|
|
145
180
|
|
|
146
181
|
return { ...response.body, metadata: response.metadata };
|
|
147
|
-
}
|
|
182
|
+
}
|
|
148
183
|
|
|
149
|
-
|
|
184
|
+
async getCall(request: {
|
|
150
185
|
type: string;
|
|
151
186
|
id: string;
|
|
152
187
|
members_limit?: number;
|
|
153
188
|
ring?: boolean;
|
|
154
189
|
notify?: boolean;
|
|
155
190
|
video?: boolean;
|
|
156
|
-
}): Promise<StreamResponse<GetCallResponse>>
|
|
191
|
+
}): Promise<StreamResponse<GetCallResponse>> {
|
|
157
192
|
const queryParams = {
|
|
158
193
|
members_limit: request?.members_limit,
|
|
159
194
|
ring: request?.ring,
|
|
@@ -165,21 +200,18 @@ export class VideoApi extends BaseApi {
|
|
|
165
200
|
id: request?.id,
|
|
166
201
|
};
|
|
167
202
|
|
|
168
|
-
const response = await this.sendRequest<
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
pathParams,
|
|
172
|
-
queryParams,
|
|
173
|
-
);
|
|
203
|
+
const response = await this.apiClient.sendRequest<
|
|
204
|
+
StreamResponse<GetCallResponse>
|
|
205
|
+
>('GET', '/api/v2/video/call/{type}/{id}', pathParams, queryParams);
|
|
174
206
|
|
|
175
207
|
decoders.GetCallResponse?.(response.body);
|
|
176
208
|
|
|
177
209
|
return { ...response.body, metadata: response.metadata };
|
|
178
|
-
}
|
|
210
|
+
}
|
|
179
211
|
|
|
180
|
-
|
|
212
|
+
async updateCall(
|
|
181
213
|
request: UpdateCallRequest & { type: string; id: string },
|
|
182
|
-
): Promise<StreamResponse<UpdateCallResponse>>
|
|
214
|
+
): Promise<StreamResponse<UpdateCallResponse>> {
|
|
183
215
|
const pathParams = {
|
|
184
216
|
type: request?.type,
|
|
185
217
|
id: request?.id,
|
|
@@ -190,22 +222,25 @@ export class VideoApi extends BaseApi {
|
|
|
190
222
|
settings_override: request?.settings_override,
|
|
191
223
|
};
|
|
192
224
|
|
|
193
|
-
const response = await this.sendRequest<
|
|
225
|
+
const response = await this.apiClient.sendRequest<
|
|
226
|
+
StreamResponse<UpdateCallResponse>
|
|
227
|
+
>(
|
|
194
228
|
'PATCH',
|
|
195
229
|
'/api/v2/video/call/{type}/{id}',
|
|
196
230
|
pathParams,
|
|
197
231
|
undefined,
|
|
198
232
|
body,
|
|
233
|
+
'application/json',
|
|
199
234
|
);
|
|
200
235
|
|
|
201
236
|
decoders.UpdateCallResponse?.(response.body);
|
|
202
237
|
|
|
203
238
|
return { ...response.body, metadata: response.metadata };
|
|
204
|
-
}
|
|
239
|
+
}
|
|
205
240
|
|
|
206
|
-
|
|
241
|
+
async getOrCreateCall(
|
|
207
242
|
request: GetOrCreateCallRequest & { type: string; id: string },
|
|
208
|
-
): Promise<StreamResponse<GetOrCreateCallResponse>>
|
|
243
|
+
): Promise<StreamResponse<GetOrCreateCallResponse>> {
|
|
209
244
|
const pathParams = {
|
|
210
245
|
type: request?.type,
|
|
211
246
|
id: request?.id,
|
|
@@ -218,18 +253,25 @@ export class VideoApi extends BaseApi {
|
|
|
218
253
|
data: request?.data,
|
|
219
254
|
};
|
|
220
255
|
|
|
221
|
-
const response = await this.sendRequest<
|
|
256
|
+
const response = await this.apiClient.sendRequest<
|
|
222
257
|
StreamResponse<GetOrCreateCallResponse>
|
|
223
|
-
>(
|
|
258
|
+
>(
|
|
259
|
+
'POST',
|
|
260
|
+
'/api/v2/video/call/{type}/{id}',
|
|
261
|
+
pathParams,
|
|
262
|
+
undefined,
|
|
263
|
+
body,
|
|
264
|
+
'application/json',
|
|
265
|
+
);
|
|
224
266
|
|
|
225
267
|
decoders.GetOrCreateCallResponse?.(response.body);
|
|
226
268
|
|
|
227
269
|
return { ...response.body, metadata: response.metadata };
|
|
228
|
-
}
|
|
270
|
+
}
|
|
229
271
|
|
|
230
|
-
|
|
272
|
+
async blockUser(
|
|
231
273
|
request: BlockUserRequest & { type: string; id: string },
|
|
232
|
-
): Promise<StreamResponse<BlockUserResponse>>
|
|
274
|
+
): Promise<StreamResponse<BlockUserResponse>> {
|
|
233
275
|
const pathParams = {
|
|
234
276
|
type: request?.type,
|
|
235
277
|
id: request?.id,
|
|
@@ -238,22 +280,25 @@ export class VideoApi extends BaseApi {
|
|
|
238
280
|
user_id: request?.user_id,
|
|
239
281
|
};
|
|
240
282
|
|
|
241
|
-
const response = await this.sendRequest<
|
|
283
|
+
const response = await this.apiClient.sendRequest<
|
|
284
|
+
StreamResponse<BlockUserResponse>
|
|
285
|
+
>(
|
|
242
286
|
'POST',
|
|
243
287
|
'/api/v2/video/call/{type}/{id}/block',
|
|
244
288
|
pathParams,
|
|
245
289
|
undefined,
|
|
246
290
|
body,
|
|
291
|
+
'application/json',
|
|
247
292
|
);
|
|
248
293
|
|
|
249
294
|
decoders.BlockUserResponse?.(response.body);
|
|
250
295
|
|
|
251
296
|
return { ...response.body, metadata: response.metadata };
|
|
252
|
-
}
|
|
297
|
+
}
|
|
253
298
|
|
|
254
|
-
|
|
299
|
+
async deleteCall(
|
|
255
300
|
request: DeleteCallRequest & { type: string; id: string },
|
|
256
|
-
): Promise<StreamResponse<DeleteCallResponse>>
|
|
301
|
+
): Promise<StreamResponse<DeleteCallResponse>> {
|
|
257
302
|
const pathParams = {
|
|
258
303
|
type: request?.type,
|
|
259
304
|
id: request?.id,
|
|
@@ -262,22 +307,25 @@ export class VideoApi extends BaseApi {
|
|
|
262
307
|
hard: request?.hard,
|
|
263
308
|
};
|
|
264
309
|
|
|
265
|
-
const response = await this.sendRequest<
|
|
310
|
+
const response = await this.apiClient.sendRequest<
|
|
311
|
+
StreamResponse<DeleteCallResponse>
|
|
312
|
+
>(
|
|
266
313
|
'POST',
|
|
267
314
|
'/api/v2/video/call/{type}/{id}/delete',
|
|
268
315
|
pathParams,
|
|
269
316
|
undefined,
|
|
270
317
|
body,
|
|
318
|
+
'application/json',
|
|
271
319
|
);
|
|
272
320
|
|
|
273
321
|
decoders.DeleteCallResponse?.(response.body);
|
|
274
322
|
|
|
275
323
|
return { ...response.body, metadata: response.metadata };
|
|
276
|
-
}
|
|
324
|
+
}
|
|
277
325
|
|
|
278
|
-
|
|
326
|
+
async sendCallEvent(
|
|
279
327
|
request: SendCallEventRequest & { type: string; id: string },
|
|
280
|
-
): Promise<StreamResponse<SendCallEventResponse>>
|
|
328
|
+
): Promise<StreamResponse<SendCallEventResponse>> {
|
|
281
329
|
const pathParams = {
|
|
282
330
|
type: request?.type,
|
|
283
331
|
id: request?.id,
|
|
@@ -288,7 +336,7 @@ export class VideoApi extends BaseApi {
|
|
|
288
336
|
user: request?.user,
|
|
289
337
|
};
|
|
290
338
|
|
|
291
|
-
const response = await this.sendRequest<
|
|
339
|
+
const response = await this.apiClient.sendRequest<
|
|
292
340
|
StreamResponse<SendCallEventResponse>
|
|
293
341
|
>(
|
|
294
342
|
'POST',
|
|
@@ -296,16 +344,17 @@ export class VideoApi extends BaseApi {
|
|
|
296
344
|
pathParams,
|
|
297
345
|
undefined,
|
|
298
346
|
body,
|
|
347
|
+
'application/json',
|
|
299
348
|
);
|
|
300
349
|
|
|
301
350
|
decoders.SendCallEventResponse?.(response.body);
|
|
302
351
|
|
|
303
352
|
return { ...response.body, metadata: response.metadata };
|
|
304
|
-
}
|
|
353
|
+
}
|
|
305
354
|
|
|
306
|
-
|
|
355
|
+
async collectUserFeedback(
|
|
307
356
|
request: CollectUserFeedbackRequest & { type: string; id: string },
|
|
308
|
-
): Promise<StreamResponse<CollectUserFeedbackResponse>>
|
|
357
|
+
): Promise<StreamResponse<CollectUserFeedbackResponse>> {
|
|
309
358
|
const pathParams = {
|
|
310
359
|
type: request?.type,
|
|
311
360
|
id: request?.id,
|
|
@@ -319,7 +368,7 @@ export class VideoApi extends BaseApi {
|
|
|
319
368
|
custom: request?.custom,
|
|
320
369
|
};
|
|
321
370
|
|
|
322
|
-
const response = await this.sendRequest<
|
|
371
|
+
const response = await this.apiClient.sendRequest<
|
|
323
372
|
StreamResponse<CollectUserFeedbackResponse>
|
|
324
373
|
>(
|
|
325
374
|
'POST',
|
|
@@ -327,16 +376,17 @@ export class VideoApi extends BaseApi {
|
|
|
327
376
|
pathParams,
|
|
328
377
|
undefined,
|
|
329
378
|
body,
|
|
379
|
+
'application/json',
|
|
330
380
|
);
|
|
331
381
|
|
|
332
382
|
decoders.CollectUserFeedbackResponse?.(response.body);
|
|
333
383
|
|
|
334
384
|
return { ...response.body, metadata: response.metadata };
|
|
335
|
-
}
|
|
385
|
+
}
|
|
336
386
|
|
|
337
|
-
|
|
387
|
+
async goLive(
|
|
338
388
|
request: GoLiveRequest & { type: string; id: string },
|
|
339
|
-
): Promise<StreamResponse<GoLiveResponse>>
|
|
389
|
+
): Promise<StreamResponse<GoLiveResponse>> {
|
|
340
390
|
const pathParams = {
|
|
341
391
|
type: request?.type,
|
|
342
392
|
id: request?.id,
|
|
@@ -350,29 +400,34 @@ export class VideoApi extends BaseApi {
|
|
|
350
400
|
transcription_storage_name: request?.transcription_storage_name,
|
|
351
401
|
};
|
|
352
402
|
|
|
353
|
-
const response = await this.sendRequest<
|
|
403
|
+
const response = await this.apiClient.sendRequest<
|
|
404
|
+
StreamResponse<GoLiveResponse>
|
|
405
|
+
>(
|
|
354
406
|
'POST',
|
|
355
407
|
'/api/v2/video/call/{type}/{id}/go_live',
|
|
356
408
|
pathParams,
|
|
357
409
|
undefined,
|
|
358
410
|
body,
|
|
411
|
+
'application/json',
|
|
359
412
|
);
|
|
360
413
|
|
|
361
414
|
decoders.GoLiveResponse?.(response.body);
|
|
362
415
|
|
|
363
416
|
return { ...response.body, metadata: response.metadata };
|
|
364
|
-
}
|
|
417
|
+
}
|
|
365
418
|
|
|
366
|
-
|
|
419
|
+
async endCall(request: {
|
|
367
420
|
type: string;
|
|
368
421
|
id: string;
|
|
369
|
-
}): Promise<StreamResponse<EndCallResponse>>
|
|
422
|
+
}): Promise<StreamResponse<EndCallResponse>> {
|
|
370
423
|
const pathParams = {
|
|
371
424
|
type: request?.type,
|
|
372
425
|
id: request?.id,
|
|
373
426
|
};
|
|
374
427
|
|
|
375
|
-
const response = await this.sendRequest<
|
|
428
|
+
const response = await this.apiClient.sendRequest<
|
|
429
|
+
StreamResponse<EndCallResponse>
|
|
430
|
+
>(
|
|
376
431
|
'POST',
|
|
377
432
|
'/api/v2/video/call/{type}/{id}/mark_ended',
|
|
378
433
|
pathParams,
|
|
@@ -382,11 +437,11 @@ export class VideoApi extends BaseApi {
|
|
|
382
437
|
decoders.EndCallResponse?.(response.body);
|
|
383
438
|
|
|
384
439
|
return { ...response.body, metadata: response.metadata };
|
|
385
|
-
}
|
|
440
|
+
}
|
|
386
441
|
|
|
387
|
-
|
|
442
|
+
async updateCallMembers(
|
|
388
443
|
request: UpdateCallMembersRequest & { type: string; id: string },
|
|
389
|
-
): Promise<StreamResponse<UpdateCallMembersResponse>>
|
|
444
|
+
): Promise<StreamResponse<UpdateCallMembersResponse>> {
|
|
390
445
|
const pathParams = {
|
|
391
446
|
type: request?.type,
|
|
392
447
|
id: request?.id,
|
|
@@ -396,7 +451,7 @@ export class VideoApi extends BaseApi {
|
|
|
396
451
|
update_members: request?.update_members,
|
|
397
452
|
};
|
|
398
453
|
|
|
399
|
-
const response = await this.sendRequest<
|
|
454
|
+
const response = await this.apiClient.sendRequest<
|
|
400
455
|
StreamResponse<UpdateCallMembersResponse>
|
|
401
456
|
>(
|
|
402
457
|
'POST',
|
|
@@ -404,16 +459,17 @@ export class VideoApi extends BaseApi {
|
|
|
404
459
|
pathParams,
|
|
405
460
|
undefined,
|
|
406
461
|
body,
|
|
462
|
+
'application/json',
|
|
407
463
|
);
|
|
408
464
|
|
|
409
465
|
decoders.UpdateCallMembersResponse?.(response.body);
|
|
410
466
|
|
|
411
467
|
return { ...response.body, metadata: response.metadata };
|
|
412
|
-
}
|
|
468
|
+
}
|
|
413
469
|
|
|
414
|
-
|
|
470
|
+
async muteUsers(
|
|
415
471
|
request: MuteUsersRequest & { type: string; id: string },
|
|
416
|
-
): Promise<StreamResponse<MuteUsersResponse>>
|
|
472
|
+
): Promise<StreamResponse<MuteUsersResponse>> {
|
|
417
473
|
const pathParams = {
|
|
418
474
|
type: request?.type,
|
|
419
475
|
id: request?.id,
|
|
@@ -429,26 +485,29 @@ export class VideoApi extends BaseApi {
|
|
|
429
485
|
muted_by: request?.muted_by,
|
|
430
486
|
};
|
|
431
487
|
|
|
432
|
-
const response = await this.sendRequest<
|
|
488
|
+
const response = await this.apiClient.sendRequest<
|
|
489
|
+
StreamResponse<MuteUsersResponse>
|
|
490
|
+
>(
|
|
433
491
|
'POST',
|
|
434
492
|
'/api/v2/video/call/{type}/{id}/mute_users',
|
|
435
493
|
pathParams,
|
|
436
494
|
undefined,
|
|
437
495
|
body,
|
|
496
|
+
'application/json',
|
|
438
497
|
);
|
|
439
498
|
|
|
440
499
|
decoders.MuteUsersResponse?.(response.body);
|
|
441
500
|
|
|
442
501
|
return { ...response.body, metadata: response.metadata };
|
|
443
|
-
}
|
|
502
|
+
}
|
|
444
503
|
|
|
445
|
-
|
|
504
|
+
async queryCallParticipants(
|
|
446
505
|
request: QueryCallParticipantsRequest & {
|
|
447
506
|
id: string;
|
|
448
507
|
type: string;
|
|
449
508
|
limit?: number;
|
|
450
509
|
},
|
|
451
|
-
): Promise<StreamResponse<QueryCallParticipantsResponse>>
|
|
510
|
+
): Promise<StreamResponse<QueryCallParticipantsResponse>> {
|
|
452
511
|
const queryParams = {
|
|
453
512
|
limit: request?.limit,
|
|
454
513
|
};
|
|
@@ -460,7 +519,7 @@ export class VideoApi extends BaseApi {
|
|
|
460
519
|
filter_conditions: request?.filter_conditions,
|
|
461
520
|
};
|
|
462
521
|
|
|
463
|
-
const response = await this.sendRequest<
|
|
522
|
+
const response = await this.apiClient.sendRequest<
|
|
464
523
|
StreamResponse<QueryCallParticipantsResponse>
|
|
465
524
|
>(
|
|
466
525
|
'POST',
|
|
@@ -468,16 +527,17 @@ export class VideoApi extends BaseApi {
|
|
|
468
527
|
pathParams,
|
|
469
528
|
queryParams,
|
|
470
529
|
body,
|
|
530
|
+
'application/json',
|
|
471
531
|
);
|
|
472
532
|
|
|
473
533
|
decoders.QueryCallParticipantsResponse?.(response.body);
|
|
474
534
|
|
|
475
535
|
return { ...response.body, metadata: response.metadata };
|
|
476
|
-
}
|
|
536
|
+
}
|
|
477
537
|
|
|
478
|
-
|
|
538
|
+
async videoPin(
|
|
479
539
|
request: PinRequest & { type: string; id: string },
|
|
480
|
-
): Promise<StreamResponse<PinResponse>>
|
|
540
|
+
): Promise<StreamResponse<PinResponse>> {
|
|
481
541
|
const pathParams = {
|
|
482
542
|
type: request?.type,
|
|
483
543
|
id: request?.id,
|
|
@@ -487,29 +547,32 @@ export class VideoApi extends BaseApi {
|
|
|
487
547
|
user_id: request?.user_id,
|
|
488
548
|
};
|
|
489
549
|
|
|
490
|
-
const response = await this.sendRequest<
|
|
550
|
+
const response = await this.apiClient.sendRequest<
|
|
551
|
+
StreamResponse<PinResponse>
|
|
552
|
+
>(
|
|
491
553
|
'POST',
|
|
492
554
|
'/api/v2/video/call/{type}/{id}/pin',
|
|
493
555
|
pathParams,
|
|
494
556
|
undefined,
|
|
495
557
|
body,
|
|
558
|
+
'application/json',
|
|
496
559
|
);
|
|
497
560
|
|
|
498
561
|
decoders.PinResponse?.(response.body);
|
|
499
562
|
|
|
500
563
|
return { ...response.body, metadata: response.metadata };
|
|
501
|
-
}
|
|
564
|
+
}
|
|
502
565
|
|
|
503
|
-
|
|
566
|
+
async listRecordings(request: {
|
|
504
567
|
type: string;
|
|
505
568
|
id: string;
|
|
506
|
-
}): Promise<StreamResponse<ListRecordingsResponse>>
|
|
569
|
+
}): Promise<StreamResponse<ListRecordingsResponse>> {
|
|
507
570
|
const pathParams = {
|
|
508
571
|
type: request?.type,
|
|
509
572
|
id: request?.id,
|
|
510
573
|
};
|
|
511
574
|
|
|
512
|
-
const response = await this.sendRequest<
|
|
575
|
+
const response = await this.apiClient.sendRequest<
|
|
513
576
|
StreamResponse<ListRecordingsResponse>
|
|
514
577
|
>(
|
|
515
578
|
'GET',
|
|
@@ -521,13 +584,13 @@ export class VideoApi extends BaseApi {
|
|
|
521
584
|
decoders.ListRecordingsResponse?.(response.body);
|
|
522
585
|
|
|
523
586
|
return { ...response.body, metadata: response.metadata };
|
|
524
|
-
}
|
|
587
|
+
}
|
|
525
588
|
|
|
526
|
-
|
|
589
|
+
async getCallReport(request: {
|
|
527
590
|
type: string;
|
|
528
591
|
id: string;
|
|
529
592
|
session_id?: string;
|
|
530
|
-
}): Promise<StreamResponse<GetCallReportResponse>>
|
|
593
|
+
}): Promise<StreamResponse<GetCallReportResponse>> {
|
|
531
594
|
const queryParams = {
|
|
532
595
|
session_id: request?.session_id,
|
|
533
596
|
};
|
|
@@ -536,18 +599,18 @@ export class VideoApi extends BaseApi {
|
|
|
536
599
|
id: request?.id,
|
|
537
600
|
};
|
|
538
601
|
|
|
539
|
-
const response = await this.sendRequest<
|
|
602
|
+
const response = await this.apiClient.sendRequest<
|
|
540
603
|
StreamResponse<GetCallReportResponse>
|
|
541
604
|
>('GET', '/api/v2/video/call/{type}/{id}/report', pathParams, queryParams);
|
|
542
605
|
|
|
543
606
|
decoders.GetCallReportResponse?.(response.body);
|
|
544
607
|
|
|
545
608
|
return { ...response.body, metadata: response.metadata };
|
|
546
|
-
}
|
|
609
|
+
}
|
|
547
610
|
|
|
548
|
-
|
|
611
|
+
async startRTMPBroadcasts(
|
|
549
612
|
request: StartRTMPBroadcastsRequest & { type: string; id: string },
|
|
550
|
-
): Promise<StreamResponse<StartRTMPBroadcastsResponse>>
|
|
613
|
+
): Promise<StreamResponse<StartRTMPBroadcastsResponse>> {
|
|
551
614
|
const pathParams = {
|
|
552
615
|
type: request?.type,
|
|
553
616
|
id: request?.id,
|
|
@@ -556,7 +619,7 @@ export class VideoApi extends BaseApi {
|
|
|
556
619
|
broadcasts: request?.broadcasts,
|
|
557
620
|
};
|
|
558
621
|
|
|
559
|
-
const response = await this.sendRequest<
|
|
622
|
+
const response = await this.apiClient.sendRequest<
|
|
560
623
|
StreamResponse<StartRTMPBroadcastsResponse>
|
|
561
624
|
>(
|
|
562
625
|
'POST',
|
|
@@ -564,23 +627,24 @@ export class VideoApi extends BaseApi {
|
|
|
564
627
|
pathParams,
|
|
565
628
|
undefined,
|
|
566
629
|
body,
|
|
630
|
+
'application/json',
|
|
567
631
|
);
|
|
568
632
|
|
|
569
633
|
decoders.StartRTMPBroadcastsResponse?.(response.body);
|
|
570
634
|
|
|
571
635
|
return { ...response.body, metadata: response.metadata };
|
|
572
|
-
}
|
|
636
|
+
}
|
|
573
637
|
|
|
574
|
-
|
|
638
|
+
async stopAllRTMPBroadcasts(request: {
|
|
575
639
|
type: string;
|
|
576
640
|
id: string;
|
|
577
|
-
}): Promise<StreamResponse<StopAllRTMPBroadcastsResponse>>
|
|
641
|
+
}): Promise<StreamResponse<StopAllRTMPBroadcastsResponse>> {
|
|
578
642
|
const pathParams = {
|
|
579
643
|
type: request?.type,
|
|
580
644
|
id: request?.id,
|
|
581
645
|
};
|
|
582
646
|
|
|
583
|
-
const response = await this.sendRequest<
|
|
647
|
+
const response = await this.apiClient.sendRequest<
|
|
584
648
|
StreamResponse<StopAllRTMPBroadcastsResponse>
|
|
585
649
|
>(
|
|
586
650
|
'POST',
|
|
@@ -592,15 +656,15 @@ export class VideoApi extends BaseApi {
|
|
|
592
656
|
decoders.StopAllRTMPBroadcastsResponse?.(response.body);
|
|
593
657
|
|
|
594
658
|
return { ...response.body, metadata: response.metadata };
|
|
595
|
-
}
|
|
659
|
+
}
|
|
596
660
|
|
|
597
|
-
|
|
661
|
+
async stopRTMPBroadcast(
|
|
598
662
|
request: StopRTMPBroadcastsRequest & {
|
|
599
663
|
type: string;
|
|
600
664
|
id: string;
|
|
601
665
|
name: string;
|
|
602
666
|
},
|
|
603
|
-
): Promise<StreamResponse<StopRTMPBroadcastsResponse>>
|
|
667
|
+
): Promise<StreamResponse<StopRTMPBroadcastsResponse>> {
|
|
604
668
|
const pathParams = {
|
|
605
669
|
type: request?.type,
|
|
606
670
|
id: request?.id,
|
|
@@ -608,7 +672,7 @@ export class VideoApi extends BaseApi {
|
|
|
608
672
|
};
|
|
609
673
|
const body = {};
|
|
610
674
|
|
|
611
|
-
const response = await this.sendRequest<
|
|
675
|
+
const response = await this.apiClient.sendRequest<
|
|
612
676
|
StreamResponse<StopRTMPBroadcastsResponse>
|
|
613
677
|
>(
|
|
614
678
|
'POST',
|
|
@@ -616,23 +680,24 @@ export class VideoApi extends BaseApi {
|
|
|
616
680
|
pathParams,
|
|
617
681
|
undefined,
|
|
618
682
|
body,
|
|
683
|
+
'application/json',
|
|
619
684
|
);
|
|
620
685
|
|
|
621
686
|
decoders.StopRTMPBroadcastsResponse?.(response.body);
|
|
622
687
|
|
|
623
688
|
return { ...response.body, metadata: response.metadata };
|
|
624
|
-
}
|
|
689
|
+
}
|
|
625
690
|
|
|
626
|
-
|
|
691
|
+
async startHLSBroadcasting(request: {
|
|
627
692
|
type: string;
|
|
628
693
|
id: string;
|
|
629
|
-
}): Promise<StreamResponse<StartHLSBroadcastingResponse>>
|
|
694
|
+
}): Promise<StreamResponse<StartHLSBroadcastingResponse>> {
|
|
630
695
|
const pathParams = {
|
|
631
696
|
type: request?.type,
|
|
632
697
|
id: request?.id,
|
|
633
698
|
};
|
|
634
699
|
|
|
635
|
-
const response = await this.sendRequest<
|
|
700
|
+
const response = await this.apiClient.sendRequest<
|
|
636
701
|
StreamResponse<StartHLSBroadcastingResponse>
|
|
637
702
|
>(
|
|
638
703
|
'POST',
|
|
@@ -644,11 +709,11 @@ export class VideoApi extends BaseApi {
|
|
|
644
709
|
decoders.StartHLSBroadcastingResponse?.(response.body);
|
|
645
710
|
|
|
646
711
|
return { ...response.body, metadata: response.metadata };
|
|
647
|
-
}
|
|
712
|
+
}
|
|
648
713
|
|
|
649
|
-
|
|
714
|
+
async startClosedCaptions(
|
|
650
715
|
request: StartClosedCaptionsRequest & { type: string; id: string },
|
|
651
|
-
): Promise<StreamResponse<StartClosedCaptionsResponse>>
|
|
716
|
+
): Promise<StreamResponse<StartClosedCaptionsResponse>> {
|
|
652
717
|
const pathParams = {
|
|
653
718
|
type: request?.type,
|
|
654
719
|
id: request?.id,
|
|
@@ -659,7 +724,7 @@ export class VideoApi extends BaseApi {
|
|
|
659
724
|
language: request?.language,
|
|
660
725
|
};
|
|
661
726
|
|
|
662
|
-
const response = await this.sendRequest<
|
|
727
|
+
const response = await this.apiClient.sendRequest<
|
|
663
728
|
StreamResponse<StartClosedCaptionsResponse>
|
|
664
729
|
>(
|
|
665
730
|
'POST',
|
|
@@ -667,16 +732,17 @@ export class VideoApi extends BaseApi {
|
|
|
667
732
|
pathParams,
|
|
668
733
|
undefined,
|
|
669
734
|
body,
|
|
735
|
+
'application/json',
|
|
670
736
|
);
|
|
671
737
|
|
|
672
738
|
decoders.StartClosedCaptionsResponse?.(response.body);
|
|
673
739
|
|
|
674
740
|
return { ...response.body, metadata: response.metadata };
|
|
675
|
-
}
|
|
741
|
+
}
|
|
676
742
|
|
|
677
|
-
|
|
743
|
+
async startFrameRecording(
|
|
678
744
|
request: StartFrameRecordingRequest & { type: string; id: string },
|
|
679
|
-
): Promise<StreamResponse<StartFrameRecordingResponse>>
|
|
745
|
+
): Promise<StreamResponse<StartFrameRecordingResponse>> {
|
|
680
746
|
const pathParams = {
|
|
681
747
|
type: request?.type,
|
|
682
748
|
id: request?.id,
|
|
@@ -685,7 +751,7 @@ export class VideoApi extends BaseApi {
|
|
|
685
751
|
recording_external_storage: request?.recording_external_storage,
|
|
686
752
|
};
|
|
687
753
|
|
|
688
|
-
const response = await this.sendRequest<
|
|
754
|
+
const response = await this.apiClient.sendRequest<
|
|
689
755
|
StreamResponse<StartFrameRecordingResponse>
|
|
690
756
|
>(
|
|
691
757
|
'POST',
|
|
@@ -693,16 +759,17 @@ export class VideoApi extends BaseApi {
|
|
|
693
759
|
pathParams,
|
|
694
760
|
undefined,
|
|
695
761
|
body,
|
|
762
|
+
'application/json',
|
|
696
763
|
);
|
|
697
764
|
|
|
698
765
|
decoders.StartFrameRecordingResponse?.(response.body);
|
|
699
766
|
|
|
700
767
|
return { ...response.body, metadata: response.metadata };
|
|
701
|
-
}
|
|
768
|
+
}
|
|
702
769
|
|
|
703
|
-
|
|
770
|
+
async startRecording(
|
|
704
771
|
request: StartRecordingRequest & { type: string; id: string },
|
|
705
|
-
): Promise<StreamResponse<StartRecordingResponse>>
|
|
772
|
+
): Promise<StreamResponse<StartRecordingResponse>> {
|
|
706
773
|
const pathParams = {
|
|
707
774
|
type: request?.type,
|
|
708
775
|
id: request?.id,
|
|
@@ -711,7 +778,7 @@ export class VideoApi extends BaseApi {
|
|
|
711
778
|
recording_external_storage: request?.recording_external_storage,
|
|
712
779
|
};
|
|
713
780
|
|
|
714
|
-
const response = await this.sendRequest<
|
|
781
|
+
const response = await this.apiClient.sendRequest<
|
|
715
782
|
StreamResponse<StartRecordingResponse>
|
|
716
783
|
>(
|
|
717
784
|
'POST',
|
|
@@ -719,16 +786,17 @@ export class VideoApi extends BaseApi {
|
|
|
719
786
|
pathParams,
|
|
720
787
|
undefined,
|
|
721
788
|
body,
|
|
789
|
+
'application/json',
|
|
722
790
|
);
|
|
723
791
|
|
|
724
792
|
decoders.StartRecordingResponse?.(response.body);
|
|
725
793
|
|
|
726
794
|
return { ...response.body, metadata: response.metadata };
|
|
727
|
-
}
|
|
795
|
+
}
|
|
728
796
|
|
|
729
|
-
|
|
797
|
+
async startTranscription(
|
|
730
798
|
request: StartTranscriptionRequest & { type: string; id: string },
|
|
731
|
-
): Promise<StreamResponse<StartTranscriptionResponse>>
|
|
799
|
+
): Promise<StreamResponse<StartTranscriptionResponse>> {
|
|
732
800
|
const pathParams = {
|
|
733
801
|
type: request?.type,
|
|
734
802
|
id: request?.id,
|
|
@@ -739,7 +807,7 @@ export class VideoApi extends BaseApi {
|
|
|
739
807
|
transcription_external_storage: request?.transcription_external_storage,
|
|
740
808
|
};
|
|
741
809
|
|
|
742
|
-
const response = await this.sendRequest<
|
|
810
|
+
const response = await this.apiClient.sendRequest<
|
|
743
811
|
StreamResponse<StartTranscriptionResponse>
|
|
744
812
|
>(
|
|
745
813
|
'POST',
|
|
@@ -747,23 +815,24 @@ export class VideoApi extends BaseApi {
|
|
|
747
815
|
pathParams,
|
|
748
816
|
undefined,
|
|
749
817
|
body,
|
|
818
|
+
'application/json',
|
|
750
819
|
);
|
|
751
820
|
|
|
752
821
|
decoders.StartTranscriptionResponse?.(response.body);
|
|
753
822
|
|
|
754
823
|
return { ...response.body, metadata: response.metadata };
|
|
755
|
-
}
|
|
824
|
+
}
|
|
756
825
|
|
|
757
|
-
|
|
826
|
+
async stopHLSBroadcasting(request: {
|
|
758
827
|
type: string;
|
|
759
828
|
id: string;
|
|
760
|
-
}): Promise<StreamResponse<StopHLSBroadcastingResponse>>
|
|
829
|
+
}): Promise<StreamResponse<StopHLSBroadcastingResponse>> {
|
|
761
830
|
const pathParams = {
|
|
762
831
|
type: request?.type,
|
|
763
832
|
id: request?.id,
|
|
764
833
|
};
|
|
765
834
|
|
|
766
|
-
const response = await this.sendRequest<
|
|
835
|
+
const response = await this.apiClient.sendRequest<
|
|
767
836
|
StreamResponse<StopHLSBroadcastingResponse>
|
|
768
837
|
>(
|
|
769
838
|
'POST',
|
|
@@ -775,11 +844,11 @@ export class VideoApi extends BaseApi {
|
|
|
775
844
|
decoders.StopHLSBroadcastingResponse?.(response.body);
|
|
776
845
|
|
|
777
846
|
return { ...response.body, metadata: response.metadata };
|
|
778
|
-
}
|
|
847
|
+
}
|
|
779
848
|
|
|
780
|
-
|
|
849
|
+
async stopClosedCaptions(
|
|
781
850
|
request: StopClosedCaptionsRequest & { type: string; id: string },
|
|
782
|
-
): Promise<StreamResponse<StopClosedCaptionsResponse>>
|
|
851
|
+
): Promise<StreamResponse<StopClosedCaptionsResponse>> {
|
|
783
852
|
const pathParams = {
|
|
784
853
|
type: request?.type,
|
|
785
854
|
id: request?.id,
|
|
@@ -788,7 +857,7 @@ export class VideoApi extends BaseApi {
|
|
|
788
857
|
stop_transcription: request?.stop_transcription,
|
|
789
858
|
};
|
|
790
859
|
|
|
791
|
-
const response = await this.sendRequest<
|
|
860
|
+
const response = await this.apiClient.sendRequest<
|
|
792
861
|
StreamResponse<StopClosedCaptionsResponse>
|
|
793
862
|
>(
|
|
794
863
|
'POST',
|
|
@@ -796,23 +865,24 @@ export class VideoApi extends BaseApi {
|
|
|
796
865
|
pathParams,
|
|
797
866
|
undefined,
|
|
798
867
|
body,
|
|
868
|
+
'application/json',
|
|
799
869
|
);
|
|
800
870
|
|
|
801
871
|
decoders.StopClosedCaptionsResponse?.(response.body);
|
|
802
872
|
|
|
803
873
|
return { ...response.body, metadata: response.metadata };
|
|
804
|
-
}
|
|
874
|
+
}
|
|
805
875
|
|
|
806
|
-
|
|
876
|
+
async stopFrameRecording(request: {
|
|
807
877
|
type: string;
|
|
808
878
|
id: string;
|
|
809
|
-
}): Promise<StreamResponse<StopFrameRecordingResponse>>
|
|
879
|
+
}): Promise<StreamResponse<StopFrameRecordingResponse>> {
|
|
810
880
|
const pathParams = {
|
|
811
881
|
type: request?.type,
|
|
812
882
|
id: request?.id,
|
|
813
883
|
};
|
|
814
884
|
|
|
815
|
-
const response = await this.sendRequest<
|
|
885
|
+
const response = await this.apiClient.sendRequest<
|
|
816
886
|
StreamResponse<StopFrameRecordingResponse>
|
|
817
887
|
>(
|
|
818
888
|
'POST',
|
|
@@ -824,11 +894,11 @@ export class VideoApi extends BaseApi {
|
|
|
824
894
|
decoders.StopFrameRecordingResponse?.(response.body);
|
|
825
895
|
|
|
826
896
|
return { ...response.body, metadata: response.metadata };
|
|
827
|
-
}
|
|
897
|
+
}
|
|
828
898
|
|
|
829
|
-
|
|
899
|
+
async stopLive(
|
|
830
900
|
request: StopLiveRequest & { type: string; id: string },
|
|
831
|
-
): Promise<StreamResponse<StopLiveResponse>>
|
|
901
|
+
): Promise<StreamResponse<StopLiveResponse>> {
|
|
832
902
|
const pathParams = {
|
|
833
903
|
type: request?.type,
|
|
834
904
|
id: request?.id,
|
|
@@ -841,29 +911,32 @@ export class VideoApi extends BaseApi {
|
|
|
841
911
|
continue_transcription: request?.continue_transcription,
|
|
842
912
|
};
|
|
843
913
|
|
|
844
|
-
const response = await this.sendRequest<
|
|
914
|
+
const response = await this.apiClient.sendRequest<
|
|
915
|
+
StreamResponse<StopLiveResponse>
|
|
916
|
+
>(
|
|
845
917
|
'POST',
|
|
846
918
|
'/api/v2/video/call/{type}/{id}/stop_live',
|
|
847
919
|
pathParams,
|
|
848
920
|
undefined,
|
|
849
921
|
body,
|
|
922
|
+
'application/json',
|
|
850
923
|
);
|
|
851
924
|
|
|
852
925
|
decoders.StopLiveResponse?.(response.body);
|
|
853
926
|
|
|
854
927
|
return { ...response.body, metadata: response.metadata };
|
|
855
|
-
}
|
|
928
|
+
}
|
|
856
929
|
|
|
857
|
-
|
|
930
|
+
async stopRecording(request: {
|
|
858
931
|
type: string;
|
|
859
932
|
id: string;
|
|
860
|
-
}): Promise<StreamResponse<StopRecordingResponse>>
|
|
933
|
+
}): Promise<StreamResponse<StopRecordingResponse>> {
|
|
861
934
|
const pathParams = {
|
|
862
935
|
type: request?.type,
|
|
863
936
|
id: request?.id,
|
|
864
937
|
};
|
|
865
938
|
|
|
866
|
-
const response = await this.sendRequest<
|
|
939
|
+
const response = await this.apiClient.sendRequest<
|
|
867
940
|
StreamResponse<StopRecordingResponse>
|
|
868
941
|
>(
|
|
869
942
|
'POST',
|
|
@@ -875,11 +948,11 @@ export class VideoApi extends BaseApi {
|
|
|
875
948
|
decoders.StopRecordingResponse?.(response.body);
|
|
876
949
|
|
|
877
950
|
return { ...response.body, metadata: response.metadata };
|
|
878
|
-
}
|
|
951
|
+
}
|
|
879
952
|
|
|
880
|
-
|
|
953
|
+
async stopTranscription(
|
|
881
954
|
request: StopTranscriptionRequest & { type: string; id: string },
|
|
882
|
-
): Promise<StreamResponse<StopTranscriptionResponse>>
|
|
955
|
+
): Promise<StreamResponse<StopTranscriptionResponse>> {
|
|
883
956
|
const pathParams = {
|
|
884
957
|
type: request?.type,
|
|
885
958
|
id: request?.id,
|
|
@@ -888,7 +961,7 @@ export class VideoApi extends BaseApi {
|
|
|
888
961
|
stop_closed_captions: request?.stop_closed_captions,
|
|
889
962
|
};
|
|
890
963
|
|
|
891
|
-
const response = await this.sendRequest<
|
|
964
|
+
const response = await this.apiClient.sendRequest<
|
|
892
965
|
StreamResponse<StopTranscriptionResponse>
|
|
893
966
|
>(
|
|
894
967
|
'POST',
|
|
@@ -896,23 +969,24 @@ export class VideoApi extends BaseApi {
|
|
|
896
969
|
pathParams,
|
|
897
970
|
undefined,
|
|
898
971
|
body,
|
|
972
|
+
'application/json',
|
|
899
973
|
);
|
|
900
974
|
|
|
901
975
|
decoders.StopTranscriptionResponse?.(response.body);
|
|
902
976
|
|
|
903
977
|
return { ...response.body, metadata: response.metadata };
|
|
904
|
-
}
|
|
978
|
+
}
|
|
905
979
|
|
|
906
|
-
|
|
980
|
+
async listTranscriptions(request: {
|
|
907
981
|
type: string;
|
|
908
982
|
id: string;
|
|
909
|
-
}): Promise<StreamResponse<ListTranscriptionsResponse>>
|
|
983
|
+
}): Promise<StreamResponse<ListTranscriptionsResponse>> {
|
|
910
984
|
const pathParams = {
|
|
911
985
|
type: request?.type,
|
|
912
986
|
id: request?.id,
|
|
913
987
|
};
|
|
914
988
|
|
|
915
|
-
const response = await this.sendRequest<
|
|
989
|
+
const response = await this.apiClient.sendRequest<
|
|
916
990
|
StreamResponse<ListTranscriptionsResponse>
|
|
917
991
|
>(
|
|
918
992
|
'GET',
|
|
@@ -924,11 +998,11 @@ export class VideoApi extends BaseApi {
|
|
|
924
998
|
decoders.ListTranscriptionsResponse?.(response.body);
|
|
925
999
|
|
|
926
1000
|
return { ...response.body, metadata: response.metadata };
|
|
927
|
-
}
|
|
1001
|
+
}
|
|
928
1002
|
|
|
929
|
-
|
|
1003
|
+
async unblockUser(
|
|
930
1004
|
request: UnblockUserRequest & { type: string; id: string },
|
|
931
|
-
): Promise<StreamResponse<UnblockUserResponse>>
|
|
1005
|
+
): Promise<StreamResponse<UnblockUserResponse>> {
|
|
932
1006
|
const pathParams = {
|
|
933
1007
|
type: request?.type,
|
|
934
1008
|
id: request?.id,
|
|
@@ -937,7 +1011,7 @@ export class VideoApi extends BaseApi {
|
|
|
937
1011
|
user_id: request?.user_id,
|
|
938
1012
|
};
|
|
939
1013
|
|
|
940
|
-
const response = await this.sendRequest<
|
|
1014
|
+
const response = await this.apiClient.sendRequest<
|
|
941
1015
|
StreamResponse<UnblockUserResponse>
|
|
942
1016
|
>(
|
|
943
1017
|
'POST',
|
|
@@ -945,16 +1019,17 @@ export class VideoApi extends BaseApi {
|
|
|
945
1019
|
pathParams,
|
|
946
1020
|
undefined,
|
|
947
1021
|
body,
|
|
1022
|
+
'application/json',
|
|
948
1023
|
);
|
|
949
1024
|
|
|
950
1025
|
decoders.UnblockUserResponse?.(response.body);
|
|
951
1026
|
|
|
952
1027
|
return { ...response.body, metadata: response.metadata };
|
|
953
|
-
}
|
|
1028
|
+
}
|
|
954
1029
|
|
|
955
|
-
|
|
1030
|
+
async videoUnpin(
|
|
956
1031
|
request: UnpinRequest & { type: string; id: string },
|
|
957
|
-
): Promise<StreamResponse<UnpinResponse>>
|
|
1032
|
+
): Promise<StreamResponse<UnpinResponse>> {
|
|
958
1033
|
const pathParams = {
|
|
959
1034
|
type: request?.type,
|
|
960
1035
|
id: request?.id,
|
|
@@ -964,22 +1039,25 @@ export class VideoApi extends BaseApi {
|
|
|
964
1039
|
user_id: request?.user_id,
|
|
965
1040
|
};
|
|
966
1041
|
|
|
967
|
-
const response = await this.sendRequest<
|
|
1042
|
+
const response = await this.apiClient.sendRequest<
|
|
1043
|
+
StreamResponse<UnpinResponse>
|
|
1044
|
+
>(
|
|
968
1045
|
'POST',
|
|
969
1046
|
'/api/v2/video/call/{type}/{id}/unpin',
|
|
970
1047
|
pathParams,
|
|
971
1048
|
undefined,
|
|
972
1049
|
body,
|
|
1050
|
+
'application/json',
|
|
973
1051
|
);
|
|
974
1052
|
|
|
975
1053
|
decoders.UnpinResponse?.(response.body);
|
|
976
1054
|
|
|
977
1055
|
return { ...response.body, metadata: response.metadata };
|
|
978
|
-
}
|
|
1056
|
+
}
|
|
979
1057
|
|
|
980
|
-
|
|
1058
|
+
async updateUserPermissions(
|
|
981
1059
|
request: UpdateUserPermissionsRequest & { type: string; id: string },
|
|
982
|
-
): Promise<StreamResponse<UpdateUserPermissionsResponse>>
|
|
1060
|
+
): Promise<StreamResponse<UpdateUserPermissionsResponse>> {
|
|
983
1061
|
const pathParams = {
|
|
984
1062
|
type: request?.type,
|
|
985
1063
|
id: request?.id,
|
|
@@ -990,7 +1068,7 @@ export class VideoApi extends BaseApi {
|
|
|
990
1068
|
revoke_permissions: request?.revoke_permissions,
|
|
991
1069
|
};
|
|
992
1070
|
|
|
993
|
-
const response = await this.sendRequest<
|
|
1071
|
+
const response = await this.apiClient.sendRequest<
|
|
994
1072
|
StreamResponse<UpdateUserPermissionsResponse>
|
|
995
1073
|
>(
|
|
996
1074
|
'POST',
|
|
@@ -998,19 +1076,20 @@ export class VideoApi extends BaseApi {
|
|
|
998
1076
|
pathParams,
|
|
999
1077
|
undefined,
|
|
1000
1078
|
body,
|
|
1079
|
+
'application/json',
|
|
1001
1080
|
);
|
|
1002
1081
|
|
|
1003
1082
|
decoders.UpdateUserPermissionsResponse?.(response.body);
|
|
1004
1083
|
|
|
1005
1084
|
return { ...response.body, metadata: response.metadata };
|
|
1006
|
-
}
|
|
1085
|
+
}
|
|
1007
1086
|
|
|
1008
|
-
|
|
1087
|
+
async deleteRecording(request: {
|
|
1009
1088
|
type: string;
|
|
1010
1089
|
id: string;
|
|
1011
1090
|
session: string;
|
|
1012
1091
|
filename: string;
|
|
1013
|
-
}): Promise<StreamResponse<DeleteRecordingResponse>>
|
|
1092
|
+
}): Promise<StreamResponse<DeleteRecordingResponse>> {
|
|
1014
1093
|
const pathParams = {
|
|
1015
1094
|
type: request?.type,
|
|
1016
1095
|
id: request?.id,
|
|
@@ -1018,7 +1097,7 @@ export class VideoApi extends BaseApi {
|
|
|
1018
1097
|
filename: request?.filename,
|
|
1019
1098
|
};
|
|
1020
1099
|
|
|
1021
|
-
const response = await this.sendRequest<
|
|
1100
|
+
const response = await this.apiClient.sendRequest<
|
|
1022
1101
|
StreamResponse<DeleteRecordingResponse>
|
|
1023
1102
|
>(
|
|
1024
1103
|
'DELETE',
|
|
@@ -1030,14 +1109,14 @@ export class VideoApi extends BaseApi {
|
|
|
1030
1109
|
decoders.DeleteRecordingResponse?.(response.body);
|
|
1031
1110
|
|
|
1032
1111
|
return { ...response.body, metadata: response.metadata };
|
|
1033
|
-
}
|
|
1112
|
+
}
|
|
1034
1113
|
|
|
1035
|
-
|
|
1114
|
+
async deleteTranscription(request: {
|
|
1036
1115
|
type: string;
|
|
1037
1116
|
id: string;
|
|
1038
1117
|
session: string;
|
|
1039
1118
|
filename: string;
|
|
1040
|
-
}): Promise<StreamResponse<DeleteTranscriptionResponse>>
|
|
1119
|
+
}): Promise<StreamResponse<DeleteTranscriptionResponse>> {
|
|
1041
1120
|
const pathParams = {
|
|
1042
1121
|
type: request?.type,
|
|
1043
1122
|
id: request?.id,
|
|
@@ -1045,7 +1124,7 @@ export class VideoApi extends BaseApi {
|
|
|
1045
1124
|
filename: request?.filename,
|
|
1046
1125
|
};
|
|
1047
1126
|
|
|
1048
|
-
const response = await this.sendRequest<
|
|
1127
|
+
const response = await this.apiClient.sendRequest<
|
|
1049
1128
|
StreamResponse<DeleteTranscriptionResponse>
|
|
1050
1129
|
>(
|
|
1051
1130
|
'DELETE',
|
|
@@ -1057,11 +1136,11 @@ export class VideoApi extends BaseApi {
|
|
|
1057
1136
|
decoders.DeleteTranscriptionResponse?.(response.body);
|
|
1058
1137
|
|
|
1059
1138
|
return { ...response.body, metadata: response.metadata };
|
|
1060
|
-
}
|
|
1139
|
+
}
|
|
1061
1140
|
|
|
1062
|
-
|
|
1141
|
+
async queryCalls(
|
|
1063
1142
|
request?: QueryCallsRequest,
|
|
1064
|
-
): Promise<StreamResponse<QueryCallsResponse>>
|
|
1143
|
+
): Promise<StreamResponse<QueryCallsResponse>> {
|
|
1065
1144
|
const body = {
|
|
1066
1145
|
limit: request?.limit,
|
|
1067
1146
|
next: request?.next,
|
|
@@ -1070,32 +1149,35 @@ export class VideoApi extends BaseApi {
|
|
|
1070
1149
|
filter_conditions: request?.filter_conditions,
|
|
1071
1150
|
};
|
|
1072
1151
|
|
|
1073
|
-
const response = await this.sendRequest<
|
|
1152
|
+
const response = await this.apiClient.sendRequest<
|
|
1153
|
+
StreamResponse<QueryCallsResponse>
|
|
1154
|
+
>(
|
|
1074
1155
|
'POST',
|
|
1075
1156
|
'/api/v2/video/calls',
|
|
1076
1157
|
undefined,
|
|
1077
1158
|
undefined,
|
|
1078
1159
|
body,
|
|
1160
|
+
'application/json',
|
|
1079
1161
|
);
|
|
1080
1162
|
|
|
1081
1163
|
decoders.QueryCallsResponse?.(response.body);
|
|
1082
1164
|
|
|
1083
1165
|
return { ...response.body, metadata: response.metadata };
|
|
1084
|
-
}
|
|
1166
|
+
}
|
|
1085
1167
|
|
|
1086
|
-
|
|
1087
|
-
const response = await this.sendRequest<
|
|
1168
|
+
async listCallTypes(): Promise<StreamResponse<ListCallTypeResponse>> {
|
|
1169
|
+
const response = await this.apiClient.sendRequest<
|
|
1088
1170
|
StreamResponse<ListCallTypeResponse>
|
|
1089
1171
|
>('GET', '/api/v2/video/calltypes', undefined, undefined);
|
|
1090
1172
|
|
|
1091
1173
|
decoders.ListCallTypeResponse?.(response.body);
|
|
1092
1174
|
|
|
1093
1175
|
return { ...response.body, metadata: response.metadata };
|
|
1094
|
-
}
|
|
1176
|
+
}
|
|
1095
1177
|
|
|
1096
|
-
|
|
1178
|
+
async createCallType(
|
|
1097
1179
|
request: CreateCallTypeRequest,
|
|
1098
|
-
): Promise<StreamResponse<CreateCallTypeResponse>>
|
|
1180
|
+
): Promise<StreamResponse<CreateCallTypeResponse>> {
|
|
1099
1181
|
const body = {
|
|
1100
1182
|
name: request?.name,
|
|
1101
1183
|
external_storage: request?.external_storage,
|
|
@@ -1104,23 +1186,30 @@ export class VideoApi extends BaseApi {
|
|
|
1104
1186
|
settings: request?.settings,
|
|
1105
1187
|
};
|
|
1106
1188
|
|
|
1107
|
-
const response = await this.sendRequest<
|
|
1189
|
+
const response = await this.apiClient.sendRequest<
|
|
1108
1190
|
StreamResponse<CreateCallTypeResponse>
|
|
1109
|
-
>(
|
|
1191
|
+
>(
|
|
1192
|
+
'POST',
|
|
1193
|
+
'/api/v2/video/calltypes',
|
|
1194
|
+
undefined,
|
|
1195
|
+
undefined,
|
|
1196
|
+
body,
|
|
1197
|
+
'application/json',
|
|
1198
|
+
);
|
|
1110
1199
|
|
|
1111
1200
|
decoders.CreateCallTypeResponse?.(response.body);
|
|
1112
1201
|
|
|
1113
1202
|
return { ...response.body, metadata: response.metadata };
|
|
1114
|
-
}
|
|
1203
|
+
}
|
|
1115
1204
|
|
|
1116
|
-
|
|
1205
|
+
async deleteCallType(request: {
|
|
1117
1206
|
name: string;
|
|
1118
|
-
}): Promise<StreamResponse<Response>>
|
|
1207
|
+
}): Promise<StreamResponse<Response>> {
|
|
1119
1208
|
const pathParams = {
|
|
1120
1209
|
name: request?.name,
|
|
1121
1210
|
};
|
|
1122
1211
|
|
|
1123
|
-
const response = await this.sendRequest<StreamResponse<Response>>(
|
|
1212
|
+
const response = await this.apiClient.sendRequest<StreamResponse<Response>>(
|
|
1124
1213
|
'DELETE',
|
|
1125
1214
|
'/api/v2/video/calltypes/{name}',
|
|
1126
1215
|
pathParams,
|
|
@@ -1130,27 +1219,27 @@ export class VideoApi extends BaseApi {
|
|
|
1130
1219
|
decoders.Response?.(response.body);
|
|
1131
1220
|
|
|
1132
1221
|
return { ...response.body, metadata: response.metadata };
|
|
1133
|
-
}
|
|
1222
|
+
}
|
|
1134
1223
|
|
|
1135
|
-
|
|
1224
|
+
async getCallType(request: {
|
|
1136
1225
|
name: string;
|
|
1137
|
-
}): Promise<StreamResponse<GetCallTypeResponse>>
|
|
1226
|
+
}): Promise<StreamResponse<GetCallTypeResponse>> {
|
|
1138
1227
|
const pathParams = {
|
|
1139
1228
|
name: request?.name,
|
|
1140
1229
|
};
|
|
1141
1230
|
|
|
1142
|
-
const response = await this.sendRequest<
|
|
1231
|
+
const response = await this.apiClient.sendRequest<
|
|
1143
1232
|
StreamResponse<GetCallTypeResponse>
|
|
1144
1233
|
>('GET', '/api/v2/video/calltypes/{name}', pathParams, undefined);
|
|
1145
1234
|
|
|
1146
1235
|
decoders.GetCallTypeResponse?.(response.body);
|
|
1147
1236
|
|
|
1148
1237
|
return { ...response.body, metadata: response.metadata };
|
|
1149
|
-
}
|
|
1238
|
+
}
|
|
1150
1239
|
|
|
1151
|
-
|
|
1240
|
+
async updateCallType(
|
|
1152
1241
|
request: UpdateCallTypeRequest & { name: string },
|
|
1153
|
-
): Promise<StreamResponse<UpdateCallTypeResponse>>
|
|
1242
|
+
): Promise<StreamResponse<UpdateCallTypeResponse>> {
|
|
1154
1243
|
const pathParams = {
|
|
1155
1244
|
name: request?.name,
|
|
1156
1245
|
};
|
|
@@ -1161,43 +1250,54 @@ export class VideoApi extends BaseApi {
|
|
|
1161
1250
|
settings: request?.settings,
|
|
1162
1251
|
};
|
|
1163
1252
|
|
|
1164
|
-
const response = await this.sendRequest<
|
|
1253
|
+
const response = await this.apiClient.sendRequest<
|
|
1165
1254
|
StreamResponse<UpdateCallTypeResponse>
|
|
1166
|
-
>(
|
|
1255
|
+
>(
|
|
1256
|
+
'PUT',
|
|
1257
|
+
'/api/v2/video/calltypes/{name}',
|
|
1258
|
+
pathParams,
|
|
1259
|
+
undefined,
|
|
1260
|
+
body,
|
|
1261
|
+
'application/json',
|
|
1262
|
+
);
|
|
1167
1263
|
|
|
1168
1264
|
decoders.UpdateCallTypeResponse?.(response.body);
|
|
1169
1265
|
|
|
1170
1266
|
return { ...response.body, metadata: response.metadata };
|
|
1171
|
-
}
|
|
1267
|
+
}
|
|
1172
1268
|
|
|
1173
|
-
|
|
1174
|
-
const response = await this.sendRequest<
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
undefined,
|
|
1178
|
-
undefined,
|
|
1179
|
-
);
|
|
1269
|
+
async getEdges(): Promise<StreamResponse<GetEdgesResponse>> {
|
|
1270
|
+
const response = await this.apiClient.sendRequest<
|
|
1271
|
+
StreamResponse<GetEdgesResponse>
|
|
1272
|
+
>('GET', '/api/v2/video/edges', undefined, undefined);
|
|
1180
1273
|
|
|
1181
1274
|
decoders.GetEdgesResponse?.(response.body);
|
|
1182
1275
|
|
|
1183
1276
|
return { ...response.body, metadata: response.metadata };
|
|
1184
|
-
}
|
|
1277
|
+
}
|
|
1185
1278
|
|
|
1186
|
-
|
|
1279
|
+
async queryAggregateCallStats(
|
|
1187
1280
|
request?: QueryAggregateCallStatsRequest,
|
|
1188
|
-
): Promise<StreamResponse<QueryAggregateCallStatsResponse>>
|
|
1281
|
+
): Promise<StreamResponse<QueryAggregateCallStatsResponse>> {
|
|
1189
1282
|
const body = {
|
|
1190
1283
|
from: request?.from,
|
|
1191
1284
|
to: request?.to,
|
|
1192
1285
|
report_types: request?.report_types,
|
|
1193
1286
|
};
|
|
1194
1287
|
|
|
1195
|
-
const response = await this.sendRequest<
|
|
1288
|
+
const response = await this.apiClient.sendRequest<
|
|
1196
1289
|
StreamResponse<QueryAggregateCallStatsResponse>
|
|
1197
|
-
>(
|
|
1290
|
+
>(
|
|
1291
|
+
'POST',
|
|
1292
|
+
'/api/v2/video/stats',
|
|
1293
|
+
undefined,
|
|
1294
|
+
undefined,
|
|
1295
|
+
body,
|
|
1296
|
+
'application/json',
|
|
1297
|
+
);
|
|
1198
1298
|
|
|
1199
1299
|
decoders.QueryAggregateCallStatsResponse?.(response.body);
|
|
1200
1300
|
|
|
1201
1301
|
return { ...response.body, metadata: response.metadata };
|
|
1202
|
-
}
|
|
1302
|
+
}
|
|
1203
1303
|
}
|