@fishjam-cloud/js-server-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.
@@ -0,0 +1,1386 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Fishjam Media Server
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 0.6.1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.SipApi = exports.SipApiFactory = exports.SipApiFp = exports.SipApiAxiosParamCreator = exports.RoomApi = exports.RoomApiFactory = exports.RoomApiFp = exports.RoomApiAxiosParamCreator = exports.RecordingApi = exports.RecordingApiFactory = exports.RecordingApiFp = exports.RecordingApiAxiosParamCreator = exports.HlsApi = exports.HlsApiFactory = exports.HlsApiFp = exports.HlsApiAxiosParamCreator = exports.HealthApi = exports.HealthApiFactory = exports.HealthApiFp = exports.HealthApiAxiosParamCreator = exports.TrackTypeEnum = exports.RoomConfigVideoCodecEnum = exports.PeerStatus = exports.HealthReportStatus = exports.ComponentPropertiesRecordingSubscribeModeEnum = exports.ComponentPropertiesHLSSubscribeModeEnum = exports.ComponentOptionsRecordingSubscribeModeEnum = exports.ComponentOptionsHLSSubscribeModeEnum = void 0;
20
+ const axios_1 = __importDefault(require("axios"));
21
+ // Some imports not used depending on template conditions
22
+ // @ts-ignore
23
+ const common_1 = require("./common");
24
+ // @ts-ignore
25
+ const base_1 = require("./base");
26
+ exports.ComponentOptionsHLSSubscribeModeEnum = {
27
+ Auto: 'auto',
28
+ Manual: 'manual'
29
+ };
30
+ exports.ComponentOptionsRecordingSubscribeModeEnum = {
31
+ Auto: 'auto',
32
+ Manual: 'manual'
33
+ };
34
+ exports.ComponentPropertiesHLSSubscribeModeEnum = {
35
+ Auto: 'auto',
36
+ Manual: 'manual'
37
+ };
38
+ exports.ComponentPropertiesRecordingSubscribeModeEnum = {
39
+ Auto: 'auto',
40
+ Manual: 'manual'
41
+ };
42
+ /**
43
+ * Informs about the status of Fishjam or a specific service
44
+ * @export
45
+ * @enum {string}
46
+ */
47
+ exports.HealthReportStatus = {
48
+ Up: 'UP',
49
+ Down: 'DOWN'
50
+ };
51
+ /**
52
+ * Informs about the peer status
53
+ * @export
54
+ * @enum {string}
55
+ */
56
+ exports.PeerStatus = {
57
+ Connected: 'connected',
58
+ Disconnected: 'disconnected'
59
+ };
60
+ exports.RoomConfigVideoCodecEnum = {
61
+ H264: 'h264',
62
+ Vp8: 'vp8'
63
+ };
64
+ exports.TrackTypeEnum = {
65
+ Audio: 'audio',
66
+ Video: 'video'
67
+ };
68
+ /**
69
+ * HealthApi - axios parameter creator
70
+ * @export
71
+ */
72
+ const HealthApiAxiosParamCreator = function (configuration) {
73
+ return {
74
+ /**
75
+ *
76
+ * @summary Describes the health of Fishjam
77
+ * @param {*} [options] Override http request option.
78
+ * @throws {RequiredError}
79
+ */
80
+ healthcheck: async (options = {}) => {
81
+ const localVarPath = `/health`;
82
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
83
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
84
+ let baseOptions;
85
+ if (configuration) {
86
+ baseOptions = configuration.baseOptions;
87
+ }
88
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
89
+ const localVarHeaderParameter = {};
90
+ const localVarQueryParameter = {};
91
+ // authentication authorization required
92
+ // http bearer authentication required
93
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
94
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
95
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
96
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
97
+ return {
98
+ url: (0, common_1.toPathString)(localVarUrlObj),
99
+ options: localVarRequestOptions,
100
+ };
101
+ },
102
+ };
103
+ };
104
+ exports.HealthApiAxiosParamCreator = HealthApiAxiosParamCreator;
105
+ /**
106
+ * HealthApi - functional programming interface
107
+ * @export
108
+ */
109
+ const HealthApiFp = function (configuration) {
110
+ const localVarAxiosParamCreator = (0, exports.HealthApiAxiosParamCreator)(configuration);
111
+ return {
112
+ /**
113
+ *
114
+ * @summary Describes the health of Fishjam
115
+ * @param {*} [options] Override http request option.
116
+ * @throws {RequiredError}
117
+ */
118
+ async healthcheck(options) {
119
+ const localVarAxiosArgs = await localVarAxiosParamCreator.healthcheck(options);
120
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
121
+ const localVarOperationServerBasePath = base_1.operationServerMap['HealthApi.healthcheck']?.[localVarOperationServerIndex]?.url;
122
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
123
+ },
124
+ };
125
+ };
126
+ exports.HealthApiFp = HealthApiFp;
127
+ /**
128
+ * HealthApi - factory interface
129
+ * @export
130
+ */
131
+ const HealthApiFactory = function (configuration, basePath, axios) {
132
+ const localVarFp = (0, exports.HealthApiFp)(configuration);
133
+ return {
134
+ /**
135
+ *
136
+ * @summary Describes the health of Fishjam
137
+ * @param {*} [options] Override http request option.
138
+ * @throws {RequiredError}
139
+ */
140
+ healthcheck(options) {
141
+ return localVarFp.healthcheck(options).then((request) => request(axios, basePath));
142
+ },
143
+ };
144
+ };
145
+ exports.HealthApiFactory = HealthApiFactory;
146
+ /**
147
+ * HealthApi - object-oriented interface
148
+ * @export
149
+ * @class HealthApi
150
+ * @extends {BaseAPI}
151
+ */
152
+ class HealthApi extends base_1.BaseAPI {
153
+ /**
154
+ *
155
+ * @summary Describes the health of Fishjam
156
+ * @param {*} [options] Override http request option.
157
+ * @throws {RequiredError}
158
+ * @memberof HealthApi
159
+ */
160
+ healthcheck(options) {
161
+ return (0, exports.HealthApiFp)(this.configuration).healthcheck(options).then((request) => request(this.axios, this.basePath));
162
+ }
163
+ }
164
+ exports.HealthApi = HealthApi;
165
+ /**
166
+ * HlsApi - axios parameter creator
167
+ * @export
168
+ */
169
+ const HlsApiAxiosParamCreator = function (configuration) {
170
+ return {
171
+ /**
172
+ *
173
+ * @summary Retrieve HLS Content
174
+ * @param {string} roomId Room id
175
+ * @param {string} filename Name of the file
176
+ * @param {string} [range] Byte range of partial segment
177
+ * @param {number | null} [hLSMsn] Segment sequence number
178
+ * @param {number | null} [hLSPart] Partial segment sequence number
179
+ * @param {string | null} [hLSSkip] Is delta manifest requested
180
+ * @param {*} [options] Override http request option.
181
+ * @throws {RequiredError}
182
+ */
183
+ getHlsContent: async (roomId, filename, range, hLSMsn, hLSPart, hLSSkip, options = {}) => {
184
+ // verify required parameter 'roomId' is not null or undefined
185
+ (0, common_1.assertParamExists)('getHlsContent', 'roomId', roomId);
186
+ // verify required parameter 'filename' is not null or undefined
187
+ (0, common_1.assertParamExists)('getHlsContent', 'filename', filename);
188
+ const localVarPath = `/hls/{room_id}/{filename}`
189
+ .replace(`{${"room_id"}}`, encodeURIComponent(String(roomId)))
190
+ .replace(`{${"filename"}}`, encodeURIComponent(String(filename)));
191
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
192
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
193
+ let baseOptions;
194
+ if (configuration) {
195
+ baseOptions = configuration.baseOptions;
196
+ }
197
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
198
+ const localVarHeaderParameter = {};
199
+ const localVarQueryParameter = {};
200
+ if (hLSMsn !== undefined) {
201
+ localVarQueryParameter['_HLS_msn'] = hLSMsn;
202
+ }
203
+ if (hLSPart !== undefined) {
204
+ localVarQueryParameter['_HLS_part'] = hLSPart;
205
+ }
206
+ if (hLSSkip !== undefined) {
207
+ localVarQueryParameter['_HLS_skip'] = hLSSkip;
208
+ }
209
+ if (range != null) {
210
+ localVarHeaderParameter['range'] = String(range);
211
+ }
212
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
213
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
214
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
215
+ return {
216
+ url: (0, common_1.toPathString)(localVarUrlObj),
217
+ options: localVarRequestOptions,
218
+ };
219
+ },
220
+ };
221
+ };
222
+ exports.HlsApiAxiosParamCreator = HlsApiAxiosParamCreator;
223
+ /**
224
+ * HlsApi - functional programming interface
225
+ * @export
226
+ */
227
+ const HlsApiFp = function (configuration) {
228
+ const localVarAxiosParamCreator = (0, exports.HlsApiAxiosParamCreator)(configuration);
229
+ return {
230
+ /**
231
+ *
232
+ * @summary Retrieve HLS Content
233
+ * @param {string} roomId Room id
234
+ * @param {string} filename Name of the file
235
+ * @param {string} [range] Byte range of partial segment
236
+ * @param {number | null} [hLSMsn] Segment sequence number
237
+ * @param {number | null} [hLSPart] Partial segment sequence number
238
+ * @param {string | null} [hLSSkip] Is delta manifest requested
239
+ * @param {*} [options] Override http request option.
240
+ * @throws {RequiredError}
241
+ */
242
+ async getHlsContent(roomId, filename, range, hLSMsn, hLSPart, hLSSkip, options) {
243
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getHlsContent(roomId, filename, range, hLSMsn, hLSPart, hLSSkip, options);
244
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
245
+ const localVarOperationServerBasePath = base_1.operationServerMap['HlsApi.getHlsContent']?.[localVarOperationServerIndex]?.url;
246
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
247
+ },
248
+ };
249
+ };
250
+ exports.HlsApiFp = HlsApiFp;
251
+ /**
252
+ * HlsApi - factory interface
253
+ * @export
254
+ */
255
+ const HlsApiFactory = function (configuration, basePath, axios) {
256
+ const localVarFp = (0, exports.HlsApiFp)(configuration);
257
+ return {
258
+ /**
259
+ *
260
+ * @summary Retrieve HLS Content
261
+ * @param {string} roomId Room id
262
+ * @param {string} filename Name of the file
263
+ * @param {string} [range] Byte range of partial segment
264
+ * @param {number | null} [hLSMsn] Segment sequence number
265
+ * @param {number | null} [hLSPart] Partial segment sequence number
266
+ * @param {string | null} [hLSSkip] Is delta manifest requested
267
+ * @param {*} [options] Override http request option.
268
+ * @throws {RequiredError}
269
+ */
270
+ getHlsContent(roomId, filename, range, hLSMsn, hLSPart, hLSSkip, options) {
271
+ return localVarFp.getHlsContent(roomId, filename, range, hLSMsn, hLSPart, hLSSkip, options).then((request) => request(axios, basePath));
272
+ },
273
+ };
274
+ };
275
+ exports.HlsApiFactory = HlsApiFactory;
276
+ /**
277
+ * HlsApi - object-oriented interface
278
+ * @export
279
+ * @class HlsApi
280
+ * @extends {BaseAPI}
281
+ */
282
+ class HlsApi extends base_1.BaseAPI {
283
+ /**
284
+ *
285
+ * @summary Retrieve HLS Content
286
+ * @param {string} roomId Room id
287
+ * @param {string} filename Name of the file
288
+ * @param {string} [range] Byte range of partial segment
289
+ * @param {number | null} [hLSMsn] Segment sequence number
290
+ * @param {number | null} [hLSPart] Partial segment sequence number
291
+ * @param {string | null} [hLSSkip] Is delta manifest requested
292
+ * @param {*} [options] Override http request option.
293
+ * @throws {RequiredError}
294
+ * @memberof HlsApi
295
+ */
296
+ getHlsContent(roomId, filename, range, hLSMsn, hLSPart, hLSSkip, options) {
297
+ return (0, exports.HlsApiFp)(this.configuration).getHlsContent(roomId, filename, range, hLSMsn, hLSPart, hLSSkip, options).then((request) => request(this.axios, this.basePath));
298
+ }
299
+ }
300
+ exports.HlsApi = HlsApi;
301
+ /**
302
+ * RecordingApi - axios parameter creator
303
+ * @export
304
+ */
305
+ const RecordingApiAxiosParamCreator = function (configuration) {
306
+ return {
307
+ /**
308
+ *
309
+ * @summary Deletes the recording
310
+ * @param {string} recordingId Recording id
311
+ * @param {*} [options] Override http request option.
312
+ * @throws {RequiredError}
313
+ */
314
+ deleteRecording: async (recordingId, options = {}) => {
315
+ // verify required parameter 'recordingId' is not null or undefined
316
+ (0, common_1.assertParamExists)('deleteRecording', 'recordingId', recordingId);
317
+ const localVarPath = `/recording/{recording_id}`
318
+ .replace(`{${"recording_id"}}`, encodeURIComponent(String(recordingId)));
319
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
320
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
321
+ let baseOptions;
322
+ if (configuration) {
323
+ baseOptions = configuration.baseOptions;
324
+ }
325
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
326
+ const localVarHeaderParameter = {};
327
+ const localVarQueryParameter = {};
328
+ // authentication authorization required
329
+ // http bearer authentication required
330
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
331
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
332
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
333
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
334
+ return {
335
+ url: (0, common_1.toPathString)(localVarUrlObj),
336
+ options: localVarRequestOptions,
337
+ };
338
+ },
339
+ /**
340
+ *
341
+ * @summary Retrieve Recording (HLS) Content
342
+ * @param {string} recordingId Recording id
343
+ * @param {string} filename Name of the file
344
+ * @param {*} [options] Override http request option.
345
+ * @throws {RequiredError}
346
+ */
347
+ getRecordingContent: async (recordingId, filename, options = {}) => {
348
+ // verify required parameter 'recordingId' is not null or undefined
349
+ (0, common_1.assertParamExists)('getRecordingContent', 'recordingId', recordingId);
350
+ // verify required parameter 'filename' is not null or undefined
351
+ (0, common_1.assertParamExists)('getRecordingContent', 'filename', filename);
352
+ const localVarPath = `/recording/{recording_id}/{filename}`
353
+ .replace(`{${"recording_id"}}`, encodeURIComponent(String(recordingId)))
354
+ .replace(`{${"filename"}}`, encodeURIComponent(String(filename)));
355
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
356
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
357
+ let baseOptions;
358
+ if (configuration) {
359
+ baseOptions = configuration.baseOptions;
360
+ }
361
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
362
+ const localVarHeaderParameter = {};
363
+ const localVarQueryParameter = {};
364
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
365
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
366
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
367
+ return {
368
+ url: (0, common_1.toPathString)(localVarUrlObj),
369
+ options: localVarRequestOptions,
370
+ };
371
+ },
372
+ /**
373
+ *
374
+ * @summary Lists all available recordings
375
+ * @param {*} [options] Override http request option.
376
+ * @throws {RequiredError}
377
+ */
378
+ getRecordings: async (options = {}) => {
379
+ const localVarPath = `/recording`;
380
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
381
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
382
+ let baseOptions;
383
+ if (configuration) {
384
+ baseOptions = configuration.baseOptions;
385
+ }
386
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
387
+ const localVarHeaderParameter = {};
388
+ const localVarQueryParameter = {};
389
+ // authentication authorization required
390
+ // http bearer authentication required
391
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
392
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
393
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
394
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
395
+ return {
396
+ url: (0, common_1.toPathString)(localVarUrlObj),
397
+ options: localVarRequestOptions,
398
+ };
399
+ },
400
+ };
401
+ };
402
+ exports.RecordingApiAxiosParamCreator = RecordingApiAxiosParamCreator;
403
+ /**
404
+ * RecordingApi - functional programming interface
405
+ * @export
406
+ */
407
+ const RecordingApiFp = function (configuration) {
408
+ const localVarAxiosParamCreator = (0, exports.RecordingApiAxiosParamCreator)(configuration);
409
+ return {
410
+ /**
411
+ *
412
+ * @summary Deletes the recording
413
+ * @param {string} recordingId Recording id
414
+ * @param {*} [options] Override http request option.
415
+ * @throws {RequiredError}
416
+ */
417
+ async deleteRecording(recordingId, options) {
418
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRecording(recordingId, options);
419
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
420
+ const localVarOperationServerBasePath = base_1.operationServerMap['RecordingApi.deleteRecording']?.[localVarOperationServerIndex]?.url;
421
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
422
+ },
423
+ /**
424
+ *
425
+ * @summary Retrieve Recording (HLS) Content
426
+ * @param {string} recordingId Recording id
427
+ * @param {string} filename Name of the file
428
+ * @param {*} [options] Override http request option.
429
+ * @throws {RequiredError}
430
+ */
431
+ async getRecordingContent(recordingId, filename, options) {
432
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getRecordingContent(recordingId, filename, options);
433
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
434
+ const localVarOperationServerBasePath = base_1.operationServerMap['RecordingApi.getRecordingContent']?.[localVarOperationServerIndex]?.url;
435
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
436
+ },
437
+ /**
438
+ *
439
+ * @summary Lists all available recordings
440
+ * @param {*} [options] Override http request option.
441
+ * @throws {RequiredError}
442
+ */
443
+ async getRecordings(options) {
444
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getRecordings(options);
445
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
446
+ const localVarOperationServerBasePath = base_1.operationServerMap['RecordingApi.getRecordings']?.[localVarOperationServerIndex]?.url;
447
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
448
+ },
449
+ };
450
+ };
451
+ exports.RecordingApiFp = RecordingApiFp;
452
+ /**
453
+ * RecordingApi - factory interface
454
+ * @export
455
+ */
456
+ const RecordingApiFactory = function (configuration, basePath, axios) {
457
+ const localVarFp = (0, exports.RecordingApiFp)(configuration);
458
+ return {
459
+ /**
460
+ *
461
+ * @summary Deletes the recording
462
+ * @param {string} recordingId Recording id
463
+ * @param {*} [options] Override http request option.
464
+ * @throws {RequiredError}
465
+ */
466
+ deleteRecording(recordingId, options) {
467
+ return localVarFp.deleteRecording(recordingId, options).then((request) => request(axios, basePath));
468
+ },
469
+ /**
470
+ *
471
+ * @summary Retrieve Recording (HLS) Content
472
+ * @param {string} recordingId Recording id
473
+ * @param {string} filename Name of the file
474
+ * @param {*} [options] Override http request option.
475
+ * @throws {RequiredError}
476
+ */
477
+ getRecordingContent(recordingId, filename, options) {
478
+ return localVarFp.getRecordingContent(recordingId, filename, options).then((request) => request(axios, basePath));
479
+ },
480
+ /**
481
+ *
482
+ * @summary Lists all available recordings
483
+ * @param {*} [options] Override http request option.
484
+ * @throws {RequiredError}
485
+ */
486
+ getRecordings(options) {
487
+ return localVarFp.getRecordings(options).then((request) => request(axios, basePath));
488
+ },
489
+ };
490
+ };
491
+ exports.RecordingApiFactory = RecordingApiFactory;
492
+ /**
493
+ * RecordingApi - object-oriented interface
494
+ * @export
495
+ * @class RecordingApi
496
+ * @extends {BaseAPI}
497
+ */
498
+ class RecordingApi extends base_1.BaseAPI {
499
+ /**
500
+ *
501
+ * @summary Deletes the recording
502
+ * @param {string} recordingId Recording id
503
+ * @param {*} [options] Override http request option.
504
+ * @throws {RequiredError}
505
+ * @memberof RecordingApi
506
+ */
507
+ deleteRecording(recordingId, options) {
508
+ return (0, exports.RecordingApiFp)(this.configuration).deleteRecording(recordingId, options).then((request) => request(this.axios, this.basePath));
509
+ }
510
+ /**
511
+ *
512
+ * @summary Retrieve Recording (HLS) Content
513
+ * @param {string} recordingId Recording id
514
+ * @param {string} filename Name of the file
515
+ * @param {*} [options] Override http request option.
516
+ * @throws {RequiredError}
517
+ * @memberof RecordingApi
518
+ */
519
+ getRecordingContent(recordingId, filename, options) {
520
+ return (0, exports.RecordingApiFp)(this.configuration).getRecordingContent(recordingId, filename, options).then((request) => request(this.axios, this.basePath));
521
+ }
522
+ /**
523
+ *
524
+ * @summary Lists all available recordings
525
+ * @param {*} [options] Override http request option.
526
+ * @throws {RequiredError}
527
+ * @memberof RecordingApi
528
+ */
529
+ getRecordings(options) {
530
+ return (0, exports.RecordingApiFp)(this.configuration).getRecordings(options).then((request) => request(this.axios, this.basePath));
531
+ }
532
+ }
533
+ exports.RecordingApi = RecordingApi;
534
+ /**
535
+ * RoomApi - axios parameter creator
536
+ * @export
537
+ */
538
+ const RoomApiAxiosParamCreator = function (configuration) {
539
+ return {
540
+ /**
541
+ *
542
+ * @summary Creates the component and adds it to the room
543
+ * @param {string} roomId Room ID
544
+ * @param {AddComponentRequest} [addComponentRequest] Component config
545
+ * @param {*} [options] Override http request option.
546
+ * @throws {RequiredError}
547
+ */
548
+ addComponent: async (roomId, addComponentRequest, options = {}) => {
549
+ // verify required parameter 'roomId' is not null or undefined
550
+ (0, common_1.assertParamExists)('addComponent', 'roomId', roomId);
551
+ const localVarPath = `/room/{room_id}/component`
552
+ .replace(`{${"room_id"}}`, encodeURIComponent(String(roomId)));
553
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
554
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
555
+ let baseOptions;
556
+ if (configuration) {
557
+ baseOptions = configuration.baseOptions;
558
+ }
559
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
560
+ const localVarHeaderParameter = {};
561
+ const localVarQueryParameter = {};
562
+ // authentication authorization required
563
+ // http bearer authentication required
564
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
565
+ localVarHeaderParameter['Content-Type'] = 'application/json';
566
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
567
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
568
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
569
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(addComponentRequest, localVarRequestOptions, configuration);
570
+ return {
571
+ url: (0, common_1.toPathString)(localVarUrlObj),
572
+ options: localVarRequestOptions,
573
+ };
574
+ },
575
+ /**
576
+ *
577
+ * @summary Create peer
578
+ * @param {string} roomId Room id
579
+ * @param {AddPeerRequest} [addPeerRequest] Peer specification
580
+ * @param {*} [options] Override http request option.
581
+ * @throws {RequiredError}
582
+ */
583
+ addPeer: async (roomId, addPeerRequest, options = {}) => {
584
+ // verify required parameter 'roomId' is not null or undefined
585
+ (0, common_1.assertParamExists)('addPeer', 'roomId', roomId);
586
+ const localVarPath = `/room/{room_id}/peer`
587
+ .replace(`{${"room_id"}}`, encodeURIComponent(String(roomId)));
588
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
589
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
590
+ let baseOptions;
591
+ if (configuration) {
592
+ baseOptions = configuration.baseOptions;
593
+ }
594
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
595
+ const localVarHeaderParameter = {};
596
+ const localVarQueryParameter = {};
597
+ // authentication authorization required
598
+ // http bearer authentication required
599
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
600
+ localVarHeaderParameter['Content-Type'] = 'application/json';
601
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
602
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
603
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
604
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(addPeerRequest, localVarRequestOptions, configuration);
605
+ return {
606
+ url: (0, common_1.toPathString)(localVarUrlObj),
607
+ options: localVarRequestOptions,
608
+ };
609
+ },
610
+ /**
611
+ *
612
+ * @summary Creates a room
613
+ * @param {RoomConfig} [roomConfig] Room configuration
614
+ * @param {*} [options] Override http request option.
615
+ * @throws {RequiredError}
616
+ */
617
+ createRoom: async (roomConfig, options = {}) => {
618
+ const localVarPath = `/room`;
619
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
620
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
621
+ let baseOptions;
622
+ if (configuration) {
623
+ baseOptions = configuration.baseOptions;
624
+ }
625
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
626
+ const localVarHeaderParameter = {};
627
+ const localVarQueryParameter = {};
628
+ // authentication authorization required
629
+ // http bearer authentication required
630
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
631
+ localVarHeaderParameter['Content-Type'] = 'application/json';
632
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
633
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
634
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
635
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(roomConfig, localVarRequestOptions, configuration);
636
+ return {
637
+ url: (0, common_1.toPathString)(localVarUrlObj),
638
+ options: localVarRequestOptions,
639
+ };
640
+ },
641
+ /**
642
+ *
643
+ * @summary Delete the component from the room
644
+ * @param {string} roomId Room ID
645
+ * @param {string} id Component ID
646
+ * @param {*} [options] Override http request option.
647
+ * @throws {RequiredError}
648
+ */
649
+ deleteComponent: async (roomId, id, options = {}) => {
650
+ // verify required parameter 'roomId' is not null or undefined
651
+ (0, common_1.assertParamExists)('deleteComponent', 'roomId', roomId);
652
+ // verify required parameter 'id' is not null or undefined
653
+ (0, common_1.assertParamExists)('deleteComponent', 'id', id);
654
+ const localVarPath = `/room/{room_id}/component/{id}`
655
+ .replace(`{${"room_id"}}`, encodeURIComponent(String(roomId)))
656
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
657
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
658
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
659
+ let baseOptions;
660
+ if (configuration) {
661
+ baseOptions = configuration.baseOptions;
662
+ }
663
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
664
+ const localVarHeaderParameter = {};
665
+ const localVarQueryParameter = {};
666
+ // authentication authorization required
667
+ // http bearer authentication required
668
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
669
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
670
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
671
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
672
+ return {
673
+ url: (0, common_1.toPathString)(localVarUrlObj),
674
+ options: localVarRequestOptions,
675
+ };
676
+ },
677
+ /**
678
+ *
679
+ * @summary Delete peer
680
+ * @param {string} roomId Room ID
681
+ * @param {string} id Peer id
682
+ * @param {*} [options] Override http request option.
683
+ * @throws {RequiredError}
684
+ */
685
+ deletePeer: async (roomId, id, options = {}) => {
686
+ // verify required parameter 'roomId' is not null or undefined
687
+ (0, common_1.assertParamExists)('deletePeer', 'roomId', roomId);
688
+ // verify required parameter 'id' is not null or undefined
689
+ (0, common_1.assertParamExists)('deletePeer', 'id', id);
690
+ const localVarPath = `/room/{room_id}/peer/{id}`
691
+ .replace(`{${"room_id"}}`, encodeURIComponent(String(roomId)))
692
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
693
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
694
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
695
+ let baseOptions;
696
+ if (configuration) {
697
+ baseOptions = configuration.baseOptions;
698
+ }
699
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
700
+ const localVarHeaderParameter = {};
701
+ const localVarQueryParameter = {};
702
+ // authentication authorization required
703
+ // http bearer authentication required
704
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
705
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
706
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
707
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
708
+ return {
709
+ url: (0, common_1.toPathString)(localVarUrlObj),
710
+ options: localVarRequestOptions,
711
+ };
712
+ },
713
+ /**
714
+ *
715
+ * @summary Delete the room
716
+ * @param {string} roomId Room id
717
+ * @param {*} [options] Override http request option.
718
+ * @throws {RequiredError}
719
+ */
720
+ deleteRoom: async (roomId, options = {}) => {
721
+ // verify required parameter 'roomId' is not null or undefined
722
+ (0, common_1.assertParamExists)('deleteRoom', 'roomId', roomId);
723
+ const localVarPath = `/room/{room_id}`
724
+ .replace(`{${"room_id"}}`, encodeURIComponent(String(roomId)));
725
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
726
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
727
+ let baseOptions;
728
+ if (configuration) {
729
+ baseOptions = configuration.baseOptions;
730
+ }
731
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
732
+ const localVarHeaderParameter = {};
733
+ const localVarQueryParameter = {};
734
+ // authentication authorization required
735
+ // http bearer authentication required
736
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
737
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
738
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
739
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
740
+ return {
741
+ url: (0, common_1.toPathString)(localVarUrlObj),
742
+ options: localVarRequestOptions,
743
+ };
744
+ },
745
+ /**
746
+ *
747
+ * @summary Show information about all rooms
748
+ * @param {*} [options] Override http request option.
749
+ * @throws {RequiredError}
750
+ */
751
+ getAllRooms: async (options = {}) => {
752
+ const localVarPath = `/room`;
753
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
754
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
755
+ let baseOptions;
756
+ if (configuration) {
757
+ baseOptions = configuration.baseOptions;
758
+ }
759
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
760
+ const localVarHeaderParameter = {};
761
+ const localVarQueryParameter = {};
762
+ // authentication authorization required
763
+ // http bearer authentication required
764
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
765
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
766
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
767
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
768
+ return {
769
+ url: (0, common_1.toPathString)(localVarUrlObj),
770
+ options: localVarRequestOptions,
771
+ };
772
+ },
773
+ /**
774
+ *
775
+ * @summary Shows information about the room
776
+ * @param {string} roomId Room ID
777
+ * @param {*} [options] Override http request option.
778
+ * @throws {RequiredError}
779
+ */
780
+ getRoom: async (roomId, options = {}) => {
781
+ // verify required parameter 'roomId' is not null or undefined
782
+ (0, common_1.assertParamExists)('getRoom', 'roomId', roomId);
783
+ const localVarPath = `/room/{room_id}`
784
+ .replace(`{${"room_id"}}`, encodeURIComponent(String(roomId)));
785
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
786
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
787
+ let baseOptions;
788
+ if (configuration) {
789
+ baseOptions = configuration.baseOptions;
790
+ }
791
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
792
+ const localVarHeaderParameter = {};
793
+ const localVarQueryParameter = {};
794
+ // authentication authorization required
795
+ // http bearer authentication required
796
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
797
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
798
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
799
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
800
+ return {
801
+ url: (0, common_1.toPathString)(localVarUrlObj),
802
+ options: localVarRequestOptions,
803
+ };
804
+ },
805
+ /**
806
+ *
807
+ * @summary Subscribe component to the tracks of peers or components
808
+ * @param {string} roomId Room ID
809
+ * @param {string} componentId Component ID
810
+ * @param {SubscriptionConfig} [subscriptionConfig] Subscribe configuration
811
+ * @param {*} [options] Override http request option.
812
+ * @throws {RequiredError}
813
+ */
814
+ subscribeTo: async (roomId, componentId, subscriptionConfig, options = {}) => {
815
+ // verify required parameter 'roomId' is not null or undefined
816
+ (0, common_1.assertParamExists)('subscribeTo', 'roomId', roomId);
817
+ // verify required parameter 'componentId' is not null or undefined
818
+ (0, common_1.assertParamExists)('subscribeTo', 'componentId', componentId);
819
+ const localVarPath = `/room/{room_id}/component/{component_id}/subscribe`
820
+ .replace(`{${"room_id"}}`, encodeURIComponent(String(roomId)))
821
+ .replace(`{${"component_id"}}`, encodeURIComponent(String(componentId)));
822
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
823
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
824
+ let baseOptions;
825
+ if (configuration) {
826
+ baseOptions = configuration.baseOptions;
827
+ }
828
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
829
+ const localVarHeaderParameter = {};
830
+ const localVarQueryParameter = {};
831
+ // authentication authorization required
832
+ // http bearer authentication required
833
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
834
+ localVarHeaderParameter['Content-Type'] = 'application/json';
835
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
836
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
837
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
838
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(subscriptionConfig, localVarRequestOptions, configuration);
839
+ return {
840
+ url: (0, common_1.toPathString)(localVarUrlObj),
841
+ options: localVarRequestOptions,
842
+ };
843
+ },
844
+ };
845
+ };
846
+ exports.RoomApiAxiosParamCreator = RoomApiAxiosParamCreator;
847
+ /**
848
+ * RoomApi - functional programming interface
849
+ * @export
850
+ */
851
+ const RoomApiFp = function (configuration) {
852
+ const localVarAxiosParamCreator = (0, exports.RoomApiAxiosParamCreator)(configuration);
853
+ return {
854
+ /**
855
+ *
856
+ * @summary Creates the component and adds it to the room
857
+ * @param {string} roomId Room ID
858
+ * @param {AddComponentRequest} [addComponentRequest] Component config
859
+ * @param {*} [options] Override http request option.
860
+ * @throws {RequiredError}
861
+ */
862
+ async addComponent(roomId, addComponentRequest, options) {
863
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addComponent(roomId, addComponentRequest, options);
864
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
865
+ const localVarOperationServerBasePath = base_1.operationServerMap['RoomApi.addComponent']?.[localVarOperationServerIndex]?.url;
866
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
867
+ },
868
+ /**
869
+ *
870
+ * @summary Create peer
871
+ * @param {string} roomId Room id
872
+ * @param {AddPeerRequest} [addPeerRequest] Peer specification
873
+ * @param {*} [options] Override http request option.
874
+ * @throws {RequiredError}
875
+ */
876
+ async addPeer(roomId, addPeerRequest, options) {
877
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addPeer(roomId, addPeerRequest, options);
878
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
879
+ const localVarOperationServerBasePath = base_1.operationServerMap['RoomApi.addPeer']?.[localVarOperationServerIndex]?.url;
880
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
881
+ },
882
+ /**
883
+ *
884
+ * @summary Creates a room
885
+ * @param {RoomConfig} [roomConfig] Room configuration
886
+ * @param {*} [options] Override http request option.
887
+ * @throws {RequiredError}
888
+ */
889
+ async createRoom(roomConfig, options) {
890
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createRoom(roomConfig, options);
891
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
892
+ const localVarOperationServerBasePath = base_1.operationServerMap['RoomApi.createRoom']?.[localVarOperationServerIndex]?.url;
893
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
894
+ },
895
+ /**
896
+ *
897
+ * @summary Delete the component from the room
898
+ * @param {string} roomId Room ID
899
+ * @param {string} id Component ID
900
+ * @param {*} [options] Override http request option.
901
+ * @throws {RequiredError}
902
+ */
903
+ async deleteComponent(roomId, id, options) {
904
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteComponent(roomId, id, options);
905
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
906
+ const localVarOperationServerBasePath = base_1.operationServerMap['RoomApi.deleteComponent']?.[localVarOperationServerIndex]?.url;
907
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
908
+ },
909
+ /**
910
+ *
911
+ * @summary Delete peer
912
+ * @param {string} roomId Room ID
913
+ * @param {string} id Peer id
914
+ * @param {*} [options] Override http request option.
915
+ * @throws {RequiredError}
916
+ */
917
+ async deletePeer(roomId, id, options) {
918
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deletePeer(roomId, id, options);
919
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
920
+ const localVarOperationServerBasePath = base_1.operationServerMap['RoomApi.deletePeer']?.[localVarOperationServerIndex]?.url;
921
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
922
+ },
923
+ /**
924
+ *
925
+ * @summary Delete the room
926
+ * @param {string} roomId Room id
927
+ * @param {*} [options] Override http request option.
928
+ * @throws {RequiredError}
929
+ */
930
+ async deleteRoom(roomId, options) {
931
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRoom(roomId, options);
932
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
933
+ const localVarOperationServerBasePath = base_1.operationServerMap['RoomApi.deleteRoom']?.[localVarOperationServerIndex]?.url;
934
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
935
+ },
936
+ /**
937
+ *
938
+ * @summary Show information about all rooms
939
+ * @param {*} [options] Override http request option.
940
+ * @throws {RequiredError}
941
+ */
942
+ async getAllRooms(options) {
943
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAllRooms(options);
944
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
945
+ const localVarOperationServerBasePath = base_1.operationServerMap['RoomApi.getAllRooms']?.[localVarOperationServerIndex]?.url;
946
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
947
+ },
948
+ /**
949
+ *
950
+ * @summary Shows information about the room
951
+ * @param {string} roomId Room ID
952
+ * @param {*} [options] Override http request option.
953
+ * @throws {RequiredError}
954
+ */
955
+ async getRoom(roomId, options) {
956
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getRoom(roomId, options);
957
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
958
+ const localVarOperationServerBasePath = base_1.operationServerMap['RoomApi.getRoom']?.[localVarOperationServerIndex]?.url;
959
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
960
+ },
961
+ /**
962
+ *
963
+ * @summary Subscribe component to the tracks of peers or components
964
+ * @param {string} roomId Room ID
965
+ * @param {string} componentId Component ID
966
+ * @param {SubscriptionConfig} [subscriptionConfig] Subscribe configuration
967
+ * @param {*} [options] Override http request option.
968
+ * @throws {RequiredError}
969
+ */
970
+ async subscribeTo(roomId, componentId, subscriptionConfig, options) {
971
+ const localVarAxiosArgs = await localVarAxiosParamCreator.subscribeTo(roomId, componentId, subscriptionConfig, options);
972
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
973
+ const localVarOperationServerBasePath = base_1.operationServerMap['RoomApi.subscribeTo']?.[localVarOperationServerIndex]?.url;
974
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
975
+ },
976
+ };
977
+ };
978
+ exports.RoomApiFp = RoomApiFp;
979
+ /**
980
+ * RoomApi - factory interface
981
+ * @export
982
+ */
983
+ const RoomApiFactory = function (configuration, basePath, axios) {
984
+ const localVarFp = (0, exports.RoomApiFp)(configuration);
985
+ return {
986
+ /**
987
+ *
988
+ * @summary Creates the component and adds it to the room
989
+ * @param {string} roomId Room ID
990
+ * @param {AddComponentRequest} [addComponentRequest] Component config
991
+ * @param {*} [options] Override http request option.
992
+ * @throws {RequiredError}
993
+ */
994
+ addComponent(roomId, addComponentRequest, options) {
995
+ return localVarFp.addComponent(roomId, addComponentRequest, options).then((request) => request(axios, basePath));
996
+ },
997
+ /**
998
+ *
999
+ * @summary Create peer
1000
+ * @param {string} roomId Room id
1001
+ * @param {AddPeerRequest} [addPeerRequest] Peer specification
1002
+ * @param {*} [options] Override http request option.
1003
+ * @throws {RequiredError}
1004
+ */
1005
+ addPeer(roomId, addPeerRequest, options) {
1006
+ return localVarFp.addPeer(roomId, addPeerRequest, options).then((request) => request(axios, basePath));
1007
+ },
1008
+ /**
1009
+ *
1010
+ * @summary Creates a room
1011
+ * @param {RoomConfig} [roomConfig] Room configuration
1012
+ * @param {*} [options] Override http request option.
1013
+ * @throws {RequiredError}
1014
+ */
1015
+ createRoom(roomConfig, options) {
1016
+ return localVarFp.createRoom(roomConfig, options).then((request) => request(axios, basePath));
1017
+ },
1018
+ /**
1019
+ *
1020
+ * @summary Delete the component from the room
1021
+ * @param {string} roomId Room ID
1022
+ * @param {string} id Component ID
1023
+ * @param {*} [options] Override http request option.
1024
+ * @throws {RequiredError}
1025
+ */
1026
+ deleteComponent(roomId, id, options) {
1027
+ return localVarFp.deleteComponent(roomId, id, options).then((request) => request(axios, basePath));
1028
+ },
1029
+ /**
1030
+ *
1031
+ * @summary Delete peer
1032
+ * @param {string} roomId Room ID
1033
+ * @param {string} id Peer id
1034
+ * @param {*} [options] Override http request option.
1035
+ * @throws {RequiredError}
1036
+ */
1037
+ deletePeer(roomId, id, options) {
1038
+ return localVarFp.deletePeer(roomId, id, options).then((request) => request(axios, basePath));
1039
+ },
1040
+ /**
1041
+ *
1042
+ * @summary Delete the room
1043
+ * @param {string} roomId Room id
1044
+ * @param {*} [options] Override http request option.
1045
+ * @throws {RequiredError}
1046
+ */
1047
+ deleteRoom(roomId, options) {
1048
+ return localVarFp.deleteRoom(roomId, options).then((request) => request(axios, basePath));
1049
+ },
1050
+ /**
1051
+ *
1052
+ * @summary Show information about all rooms
1053
+ * @param {*} [options] Override http request option.
1054
+ * @throws {RequiredError}
1055
+ */
1056
+ getAllRooms(options) {
1057
+ return localVarFp.getAllRooms(options).then((request) => request(axios, basePath));
1058
+ },
1059
+ /**
1060
+ *
1061
+ * @summary Shows information about the room
1062
+ * @param {string} roomId Room ID
1063
+ * @param {*} [options] Override http request option.
1064
+ * @throws {RequiredError}
1065
+ */
1066
+ getRoom(roomId, options) {
1067
+ return localVarFp.getRoom(roomId, options).then((request) => request(axios, basePath));
1068
+ },
1069
+ /**
1070
+ *
1071
+ * @summary Subscribe component to the tracks of peers or components
1072
+ * @param {string} roomId Room ID
1073
+ * @param {string} componentId Component ID
1074
+ * @param {SubscriptionConfig} [subscriptionConfig] Subscribe configuration
1075
+ * @param {*} [options] Override http request option.
1076
+ * @throws {RequiredError}
1077
+ */
1078
+ subscribeTo(roomId, componentId, subscriptionConfig, options) {
1079
+ return localVarFp.subscribeTo(roomId, componentId, subscriptionConfig, options).then((request) => request(axios, basePath));
1080
+ },
1081
+ };
1082
+ };
1083
+ exports.RoomApiFactory = RoomApiFactory;
1084
+ /**
1085
+ * RoomApi - object-oriented interface
1086
+ * @export
1087
+ * @class RoomApi
1088
+ * @extends {BaseAPI}
1089
+ */
1090
+ class RoomApi extends base_1.BaseAPI {
1091
+ /**
1092
+ *
1093
+ * @summary Creates the component and adds it to the room
1094
+ * @param {string} roomId Room ID
1095
+ * @param {AddComponentRequest} [addComponentRequest] Component config
1096
+ * @param {*} [options] Override http request option.
1097
+ * @throws {RequiredError}
1098
+ * @memberof RoomApi
1099
+ */
1100
+ addComponent(roomId, addComponentRequest, options) {
1101
+ return (0, exports.RoomApiFp)(this.configuration).addComponent(roomId, addComponentRequest, options).then((request) => request(this.axios, this.basePath));
1102
+ }
1103
+ /**
1104
+ *
1105
+ * @summary Create peer
1106
+ * @param {string} roomId Room id
1107
+ * @param {AddPeerRequest} [addPeerRequest] Peer specification
1108
+ * @param {*} [options] Override http request option.
1109
+ * @throws {RequiredError}
1110
+ * @memberof RoomApi
1111
+ */
1112
+ addPeer(roomId, addPeerRequest, options) {
1113
+ return (0, exports.RoomApiFp)(this.configuration).addPeer(roomId, addPeerRequest, options).then((request) => request(this.axios, this.basePath));
1114
+ }
1115
+ /**
1116
+ *
1117
+ * @summary Creates a room
1118
+ * @param {RoomConfig} [roomConfig] Room configuration
1119
+ * @param {*} [options] Override http request option.
1120
+ * @throws {RequiredError}
1121
+ * @memberof RoomApi
1122
+ */
1123
+ createRoom(roomConfig, options) {
1124
+ return (0, exports.RoomApiFp)(this.configuration).createRoom(roomConfig, options).then((request) => request(this.axios, this.basePath));
1125
+ }
1126
+ /**
1127
+ *
1128
+ * @summary Delete the component from the room
1129
+ * @param {string} roomId Room ID
1130
+ * @param {string} id Component ID
1131
+ * @param {*} [options] Override http request option.
1132
+ * @throws {RequiredError}
1133
+ * @memberof RoomApi
1134
+ */
1135
+ deleteComponent(roomId, id, options) {
1136
+ return (0, exports.RoomApiFp)(this.configuration).deleteComponent(roomId, id, options).then((request) => request(this.axios, this.basePath));
1137
+ }
1138
+ /**
1139
+ *
1140
+ * @summary Delete peer
1141
+ * @param {string} roomId Room ID
1142
+ * @param {string} id Peer id
1143
+ * @param {*} [options] Override http request option.
1144
+ * @throws {RequiredError}
1145
+ * @memberof RoomApi
1146
+ */
1147
+ deletePeer(roomId, id, options) {
1148
+ return (0, exports.RoomApiFp)(this.configuration).deletePeer(roomId, id, options).then((request) => request(this.axios, this.basePath));
1149
+ }
1150
+ /**
1151
+ *
1152
+ * @summary Delete the room
1153
+ * @param {string} roomId Room id
1154
+ * @param {*} [options] Override http request option.
1155
+ * @throws {RequiredError}
1156
+ * @memberof RoomApi
1157
+ */
1158
+ deleteRoom(roomId, options) {
1159
+ return (0, exports.RoomApiFp)(this.configuration).deleteRoom(roomId, options).then((request) => request(this.axios, this.basePath));
1160
+ }
1161
+ /**
1162
+ *
1163
+ * @summary Show information about all rooms
1164
+ * @param {*} [options] Override http request option.
1165
+ * @throws {RequiredError}
1166
+ * @memberof RoomApi
1167
+ */
1168
+ getAllRooms(options) {
1169
+ return (0, exports.RoomApiFp)(this.configuration).getAllRooms(options).then((request) => request(this.axios, this.basePath));
1170
+ }
1171
+ /**
1172
+ *
1173
+ * @summary Shows information about the room
1174
+ * @param {string} roomId Room ID
1175
+ * @param {*} [options] Override http request option.
1176
+ * @throws {RequiredError}
1177
+ * @memberof RoomApi
1178
+ */
1179
+ getRoom(roomId, options) {
1180
+ return (0, exports.RoomApiFp)(this.configuration).getRoom(roomId, options).then((request) => request(this.axios, this.basePath));
1181
+ }
1182
+ /**
1183
+ *
1184
+ * @summary Subscribe component to the tracks of peers or components
1185
+ * @param {string} roomId Room ID
1186
+ * @param {string} componentId Component ID
1187
+ * @param {SubscriptionConfig} [subscriptionConfig] Subscribe configuration
1188
+ * @param {*} [options] Override http request option.
1189
+ * @throws {RequiredError}
1190
+ * @memberof RoomApi
1191
+ */
1192
+ subscribeTo(roomId, componentId, subscriptionConfig, options) {
1193
+ return (0, exports.RoomApiFp)(this.configuration).subscribeTo(roomId, componentId, subscriptionConfig, options).then((request) => request(this.axios, this.basePath));
1194
+ }
1195
+ }
1196
+ exports.RoomApi = RoomApi;
1197
+ /**
1198
+ * SipApi - axios parameter creator
1199
+ * @export
1200
+ */
1201
+ const SipApiAxiosParamCreator = function (configuration) {
1202
+ return {
1203
+ /**
1204
+ *
1205
+ * @summary Make a call from the SIP component to the provided phone number
1206
+ * @param {string} roomId Room ID
1207
+ * @param {string} componentId SIP Component ID
1208
+ * @param {DialConfig} [dialConfig] Phone Number configuration
1209
+ * @param {*} [options] Override http request option.
1210
+ * @throws {RequiredError}
1211
+ */
1212
+ dial: async (roomId, componentId, dialConfig, options = {}) => {
1213
+ // verify required parameter 'roomId' is not null or undefined
1214
+ (0, common_1.assertParamExists)('dial', 'roomId', roomId);
1215
+ // verify required parameter 'componentId' is not null or undefined
1216
+ (0, common_1.assertParamExists)('dial', 'componentId', componentId);
1217
+ const localVarPath = `/sip/{room_id}/{component_id}/call`
1218
+ .replace(`{${"room_id"}}`, encodeURIComponent(String(roomId)))
1219
+ .replace(`{${"component_id"}}`, encodeURIComponent(String(componentId)));
1220
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1221
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1222
+ let baseOptions;
1223
+ if (configuration) {
1224
+ baseOptions = configuration.baseOptions;
1225
+ }
1226
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1227
+ const localVarHeaderParameter = {};
1228
+ const localVarQueryParameter = {};
1229
+ // authentication authorization required
1230
+ // http bearer authentication required
1231
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1232
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1233
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1234
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1235
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1236
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dialConfig, localVarRequestOptions, configuration);
1237
+ return {
1238
+ url: (0, common_1.toPathString)(localVarUrlObj),
1239
+ options: localVarRequestOptions,
1240
+ };
1241
+ },
1242
+ /**
1243
+ *
1244
+ * @summary Finish call made by SIP component
1245
+ * @param {string} roomId Room ID
1246
+ * @param {string} componentId SIP Component ID
1247
+ * @param {*} [options] Override http request option.
1248
+ * @throws {RequiredError}
1249
+ */
1250
+ endCall: async (roomId, componentId, options = {}) => {
1251
+ // verify required parameter 'roomId' is not null or undefined
1252
+ (0, common_1.assertParamExists)('endCall', 'roomId', roomId);
1253
+ // verify required parameter 'componentId' is not null or undefined
1254
+ (0, common_1.assertParamExists)('endCall', 'componentId', componentId);
1255
+ const localVarPath = `/sip/{room_id}/{component_id}/call`
1256
+ .replace(`{${"room_id"}}`, encodeURIComponent(String(roomId)))
1257
+ .replace(`{${"component_id"}}`, encodeURIComponent(String(componentId)));
1258
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1259
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1260
+ let baseOptions;
1261
+ if (configuration) {
1262
+ baseOptions = configuration.baseOptions;
1263
+ }
1264
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
1265
+ const localVarHeaderParameter = {};
1266
+ const localVarQueryParameter = {};
1267
+ // authentication authorization required
1268
+ // http bearer authentication required
1269
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1270
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1271
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1272
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1273
+ return {
1274
+ url: (0, common_1.toPathString)(localVarUrlObj),
1275
+ options: localVarRequestOptions,
1276
+ };
1277
+ },
1278
+ };
1279
+ };
1280
+ exports.SipApiAxiosParamCreator = SipApiAxiosParamCreator;
1281
+ /**
1282
+ * SipApi - functional programming interface
1283
+ * @export
1284
+ */
1285
+ const SipApiFp = function (configuration) {
1286
+ const localVarAxiosParamCreator = (0, exports.SipApiAxiosParamCreator)(configuration);
1287
+ return {
1288
+ /**
1289
+ *
1290
+ * @summary Make a call from the SIP component to the provided phone number
1291
+ * @param {string} roomId Room ID
1292
+ * @param {string} componentId SIP Component ID
1293
+ * @param {DialConfig} [dialConfig] Phone Number configuration
1294
+ * @param {*} [options] Override http request option.
1295
+ * @throws {RequiredError}
1296
+ */
1297
+ async dial(roomId, componentId, dialConfig, options) {
1298
+ const localVarAxiosArgs = await localVarAxiosParamCreator.dial(roomId, componentId, dialConfig, options);
1299
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1300
+ const localVarOperationServerBasePath = base_1.operationServerMap['SipApi.dial']?.[localVarOperationServerIndex]?.url;
1301
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1302
+ },
1303
+ /**
1304
+ *
1305
+ * @summary Finish call made by SIP component
1306
+ * @param {string} roomId Room ID
1307
+ * @param {string} componentId SIP Component ID
1308
+ * @param {*} [options] Override http request option.
1309
+ * @throws {RequiredError}
1310
+ */
1311
+ async endCall(roomId, componentId, options) {
1312
+ const localVarAxiosArgs = await localVarAxiosParamCreator.endCall(roomId, componentId, options);
1313
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1314
+ const localVarOperationServerBasePath = base_1.operationServerMap['SipApi.endCall']?.[localVarOperationServerIndex]?.url;
1315
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1316
+ },
1317
+ };
1318
+ };
1319
+ exports.SipApiFp = SipApiFp;
1320
+ /**
1321
+ * SipApi - factory interface
1322
+ * @export
1323
+ */
1324
+ const SipApiFactory = function (configuration, basePath, axios) {
1325
+ const localVarFp = (0, exports.SipApiFp)(configuration);
1326
+ return {
1327
+ /**
1328
+ *
1329
+ * @summary Make a call from the SIP component to the provided phone number
1330
+ * @param {string} roomId Room ID
1331
+ * @param {string} componentId SIP Component ID
1332
+ * @param {DialConfig} [dialConfig] Phone Number configuration
1333
+ * @param {*} [options] Override http request option.
1334
+ * @throws {RequiredError}
1335
+ */
1336
+ dial(roomId, componentId, dialConfig, options) {
1337
+ return localVarFp.dial(roomId, componentId, dialConfig, options).then((request) => request(axios, basePath));
1338
+ },
1339
+ /**
1340
+ *
1341
+ * @summary Finish call made by SIP component
1342
+ * @param {string} roomId Room ID
1343
+ * @param {string} componentId SIP Component ID
1344
+ * @param {*} [options] Override http request option.
1345
+ * @throws {RequiredError}
1346
+ */
1347
+ endCall(roomId, componentId, options) {
1348
+ return localVarFp.endCall(roomId, componentId, options).then((request) => request(axios, basePath));
1349
+ },
1350
+ };
1351
+ };
1352
+ exports.SipApiFactory = SipApiFactory;
1353
+ /**
1354
+ * SipApi - object-oriented interface
1355
+ * @export
1356
+ * @class SipApi
1357
+ * @extends {BaseAPI}
1358
+ */
1359
+ class SipApi extends base_1.BaseAPI {
1360
+ /**
1361
+ *
1362
+ * @summary Make a call from the SIP component to the provided phone number
1363
+ * @param {string} roomId Room ID
1364
+ * @param {string} componentId SIP Component ID
1365
+ * @param {DialConfig} [dialConfig] Phone Number configuration
1366
+ * @param {*} [options] Override http request option.
1367
+ * @throws {RequiredError}
1368
+ * @memberof SipApi
1369
+ */
1370
+ dial(roomId, componentId, dialConfig, options) {
1371
+ return (0, exports.SipApiFp)(this.configuration).dial(roomId, componentId, dialConfig, options).then((request) => request(this.axios, this.basePath));
1372
+ }
1373
+ /**
1374
+ *
1375
+ * @summary Finish call made by SIP component
1376
+ * @param {string} roomId Room ID
1377
+ * @param {string} componentId SIP Component ID
1378
+ * @param {*} [options] Override http request option.
1379
+ * @throws {RequiredError}
1380
+ * @memberof SipApi
1381
+ */
1382
+ endCall(roomId, componentId, options) {
1383
+ return (0, exports.SipApiFp)(this.configuration).endCall(roomId, componentId, options).then((request) => request(this.axios, this.basePath));
1384
+ }
1385
+ }
1386
+ exports.SipApi = SipApi;