fcr-core 3.7.8 → 3.7.9-alpha

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.
Files changed (50) hide show
  1. package/lib/chat-connection/index.js +26 -41
  2. package/lib/engine/index.js +74 -67
  3. package/lib/imports.js +0 -1
  4. package/lib/media-control/desktop.js +13 -18
  5. package/lib/media-control/mobile.js +13 -18
  6. package/lib/monitor-control/index.js +5 -10
  7. package/lib/peer-session/index.js +39 -48
  8. package/lib/plugins/chatroom.js +202 -218
  9. package/lib/room-control/ability-control/index.js +9 -14
  10. package/lib/room-control/group-control/index.js +16 -21
  11. package/lib/room-control/helpers/validation-helper.js +1 -1
  12. package/lib/room-control/index.js +36 -53
  13. package/lib/room-control/interpreter-control/index.js +34 -47
  14. package/lib/room-control/interpreter-control/room.js +4 -6
  15. package/lib/room-control/join-before-host-waitingroom-control/index.js +4 -6
  16. package/lib/room-control/mainroom-control/index.js +17 -25
  17. package/lib/room-control/privilege-control/helper.js +5 -8
  18. package/lib/room-control/privilege-control/index.js +19 -26
  19. package/lib/room-control/room-connector-control/index.js +19 -28
  20. package/lib/room-control/room-control-factory.js +1 -2
  21. package/lib/room-control/room-session/index.js +39 -48
  22. package/lib/room-control/shared-cache.js +29 -36
  23. package/lib/room-control/sharing-control/index.js +32 -40
  24. package/lib/room-control/stream-control/index.js +173 -181
  25. package/lib/room-control/user-control/index.js +136 -143
  26. package/lib/room-control/waitingroom-control/index.js +9 -14
  27. package/lib/room-control/whiteboard-control-v2/annotation-control/control.js +24 -32
  28. package/lib/room-control/whiteboard-control-v2/annotation-control/index.js +16 -27
  29. package/lib/room-control/whiteboard-control-v2/annotation-control/privilege-control.js +53 -63
  30. package/lib/room-control/whiteboard-control-v2/index.js +28 -40
  31. package/lib/room-control/whiteboard-control-v2/main-window.js +23 -28
  32. package/lib/room-control/whiteboard-control-v2/utils.js +6 -7
  33. package/lib/room-control/whiteboard-control-v2/whiteboard-control/control.js +27 -38
  34. package/lib/room-control/whiteboard-control-v2/whiteboard-control/index.js +3 -5
  35. package/lib/room-control/whiteboard-control-v2/whiteboard-control/privilege-control.js +42 -54
  36. package/lib/room-router/index.js +42 -52
  37. package/lib/service/api.js +207 -231
  38. package/lib/utilities/collection.js +2 -3
  39. package/lib/utilities/error-helpers.js +27 -34
  40. package/lib/utilities/error.js +8 -9
  41. package/lib/utilities/join-helper.js +25 -32
  42. package/lib/utilities/logger.js +3 -6
  43. package/lib/utilities/parameters.js +4 -8
  44. package/lib/utilities/retry-helpers.js +0 -1
  45. package/lib/utilities/shared-storage.js +0 -1
  46. package/lib/utilities/storage.js +0 -1
  47. package/lib/utilities/stream.js +11 -16
  48. package/lib/utilities/user.js +3 -4
  49. package/lib/utilities/validate-params.js +1 -2
  50. package/package.json +4 -4
@@ -1,30 +1,22 @@
1
1
  "use strict";
2
2
 
3
- require("core-js/modules/es.array.push.js");
4
- require("core-js/modules/esnext.iterator.filter.js");
5
- require("core-js/modules/esnext.iterator.for-each.js");
6
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
7
3
  Object.defineProperty(exports, "__esModule", {
8
4
  value: true
9
5
  });
10
6
  exports.FcrCoreServiceApi = void 0;
11
7
  require("core-js/modules/esnext.iterator.constructor.js");
12
8
  require("core-js/modules/esnext.iterator.map.js");
13
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
9
  var _imports = require("../imports");
15
10
  var _type = require("../room-control/privilege-control/type");
16
11
  var _type2 = require("../room-control/user-control/type");
17
12
  var _logger = require("../utilities/logger");
18
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
19
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
20
13
  class FcrCoreServiceApi {
21
- constructor(_client, appId, region) {
22
- let pathIncludeRegion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
23
- (0, _defineProperty2.default)(this, "logger", (0, _logger.getLogger)());
14
+ logger = (0, _logger.getLogger)();
15
+ constructor(_client, appId, region, pathIncludeRegion = true) {
24
16
  this._client = _client;
25
- let pathPrefix = "/conference/apps/".concat(appId);
17
+ let pathPrefix = `/conference/apps/${appId}`;
26
18
  if (pathIncludeRegion) {
27
- pathPrefix = "/".concat((0, _imports.toLower)(region)).concat(pathPrefix);
19
+ pathPrefix = `/${(0, _imports.toLower)(region)}${pathPrefix}`;
28
20
  }
29
21
  this.logger.info('[FcrCoreServiceApi] set path prefix for Core Service API:', pathPrefix);
30
22
  this._pathPrefix = pathPrefix;
@@ -38,7 +30,7 @@ class FcrCoreServiceApi {
38
30
  const {
39
31
  data
40
32
  } = await this._client.fetch({
41
- path: "/v2/rooms/".concat(opts.roomId, "/groups"),
33
+ path: `/v2/rooms/${opts.roomId}/groups`,
42
34
  method: 'PUT',
43
35
  data: {
44
36
  groups: params.map(group => {
@@ -61,7 +53,7 @@ class FcrCoreServiceApi {
61
53
  const {
62
54
  data
63
55
  } = await this._client.fetch({
64
- path: "/v2/rooms/".concat(opts.roomId, "/groups/info"),
56
+ path: `/v2/rooms/${opts.roomId}/groups/info`,
65
57
  method: 'PATCH',
66
58
  data: {
67
59
  groups: params.map(group => {
@@ -77,7 +69,7 @@ class FcrCoreServiceApi {
77
69
  const {
78
70
  data
79
71
  } = await this._client.fetch({
80
- path: "/v2/rooms/".concat(opts.roomId, "/groups/states/1"),
72
+ path: `/v2/rooms/${opts.roomId}/groups/states/1`,
81
73
  method: 'DELETE',
82
74
  data: {
83
75
  removeGroupUuids: groupIds
@@ -88,7 +80,7 @@ class FcrCoreServiceApi {
88
80
  const {
89
81
  data
90
82
  } = await this._client.fetch({
91
- path: "/v2/rooms/".concat(opts.roomId, "/groups/all"),
83
+ path: `/v2/rooms/${opts.roomId}/groups/all`,
92
84
  method: 'DELETE'
93
85
  });
94
86
  }
@@ -96,7 +88,7 @@ class FcrCoreServiceApi {
96
88
  const {
97
89
  data
98
90
  } = await this._client.fetch({
99
- path: "/v2/rooms/".concat(opts.roomId, "/groups/users"),
91
+ path: `/v2/rooms/${opts.roomId}/groups/users`,
100
92
  method: 'PATCH',
101
93
  data: {
102
94
  groups: [{
@@ -111,7 +103,7 @@ class FcrCoreServiceApi {
111
103
  const {
112
104
  data
113
105
  } = await this._client.fetch({
114
- path: "/v2/rooms/".concat(opts.roomId, "/groups/users"),
106
+ path: `/v2/rooms/${opts.roomId}/groups/users`,
115
107
  method: 'PATCH',
116
108
  data: {
117
109
  groups: [{
@@ -126,7 +118,7 @@ class FcrCoreServiceApi {
126
118
  const {
127
119
  data
128
120
  } = await this._client.fetch({
129
- path: "/v2/rooms/".concat(opts.roomId, "/groups/users"),
121
+ path: `/v2/rooms/${opts.roomId}/groups/users`,
130
122
  method: 'PATCH',
131
123
  data: {
132
124
  groups: [{
@@ -140,7 +132,7 @@ class FcrCoreServiceApi {
140
132
  /*** merge audio ****/
141
133
  async mergeAudioStream(userId, opts) {
142
134
  const res = await this._client.fetch({
143
- path: "/v1/rooms/".concat(opts.roomId, "/users/").concat(userId, "/call/merge"),
135
+ path: `/v1/rooms/${opts.roomId}/users/${userId}/call/merge`,
144
136
  method: 'PUT',
145
137
  data: {}
146
138
  });
@@ -149,7 +141,7 @@ class FcrCoreServiceApi {
149
141
  /*** split audio ****/
150
142
  async splitAudioStream(userId, opts) {
151
143
  const res = await this._client.fetch({
152
- path: "/v1/rooms/".concat(opts.roomId, "/users/").concat(userId, "/call/split"),
144
+ path: `/v1/rooms/${opts.roomId}/users/${userId}/call/split`,
153
145
  method: 'PUT',
154
146
  data: {}
155
147
  });
@@ -162,7 +154,7 @@ class FcrCoreServiceApi {
162
154
  body.duration = -1;
163
155
  }
164
156
  return this._client.fetch({
165
- path: "/v1/rooms/".concat(opts.roomId, "/users/").concat(userId, "/ban/").concat(type === _type2.FcrUserKickedOutType.Forever ? 1 : 0),
157
+ path: `/v1/rooms/${opts.roomId}/users/${userId}/ban/${type === _type2.FcrUserKickedOutType.Forever ? 1 : 0}`,
166
158
  method: 'PUT',
167
159
  data: body
168
160
  });
@@ -177,7 +169,7 @@ class FcrCoreServiceApi {
177
169
  const {
178
170
  data
179
171
  } = await this._client.fetch({
180
- path: "/v1/rooms/".concat(opts.roomId, "/users/ban/").concat(type === _type2.FcrUserKickedOutType.Forever ? 1 : 0),
172
+ path: `/v1/rooms/${opts.roomId}/users/ban/${type === _type2.FcrUserKickedOutType.Forever ? 1 : 0}`,
181
173
  method: 'PUT',
182
174
  data: body
183
175
  });
@@ -192,7 +184,7 @@ class FcrCoreServiceApi {
192
184
  const {
193
185
  data
194
186
  } = await this._client.fetch({
195
- path: "/v1/rooms/".concat(opts.roomId, "/users/ban/").concat(type === _type2.FcrUserKickedOutType.Forever ? 1 : 0),
187
+ path: `/v1/rooms/${opts.roomId}/users/ban/${type === _type2.FcrUserKickedOutType.Forever ? 1 : 0}`,
196
188
  method: 'PUT',
197
189
  data: body
198
190
  });
@@ -201,25 +193,25 @@ class FcrCoreServiceApi {
201
193
  /** room control **/
202
194
  async startRoom(roomId) {
203
195
  return this._client.fetch({
204
- path: "/v1/rooms/".concat(roomId, "/states/1"),
196
+ path: `/v1/rooms/${roomId}/states/1`,
205
197
  method: 'PUT'
206
198
  });
207
199
  }
208
200
  async endRoom(roomId) {
209
201
  return this._client.fetch({
210
- path: "/v1/rooms/".concat(roomId, "/states/2"),
202
+ path: `/v1/rooms/${roomId}/states/2`,
211
203
  method: 'PUT'
212
204
  });
213
205
  }
214
206
  async closeRoom(roomId) {
215
207
  return this._client.fetch({
216
- path: "/v1/rooms/".concat(roomId, "/states/3"),
208
+ path: `/v1/rooms/${roomId}/states/3`,
217
209
  method: 'PUT'
218
210
  });
219
211
  }
220
212
  async startCloudRecording(config, roomId) {
221
213
  return this._client.fetch({
222
- path: "/v1/rooms/".concat(roomId, "/records/states/1"),
214
+ path: `/v1/rooms/${roomId}/records/states/1`,
223
215
  method: 'PUT',
224
216
  data: {
225
217
  mode: 'web',
@@ -236,7 +228,7 @@ class FcrCoreServiceApi {
236
228
  }
237
229
  async pauseCloudRecording(roomId) {
238
230
  return this._client.fetch({
239
- path: "/v1/rooms/".concat(roomId, "/records/states/1"),
231
+ path: `/v1/rooms/${roomId}/records/states/1`,
240
232
  method: 'PATCH',
241
233
  data: {
242
234
  mode: 'web',
@@ -248,7 +240,7 @@ class FcrCoreServiceApi {
248
240
  }
249
241
  async resumeCloudRecording(roomId) {
250
242
  return this._client.fetch({
251
- path: "/v1/rooms/".concat(roomId, "/records/states/1"),
243
+ path: `/v1/rooms/${roomId}/records/states/1`,
252
244
  method: 'PATCH',
253
245
  data: {
254
246
  webRecordConfig: {
@@ -259,13 +251,13 @@ class FcrCoreServiceApi {
259
251
  }
260
252
  async stopCloudRecording(roomId) {
261
253
  return this._client.fetch({
262
- path: "/v1/rooms/".concat(roomId, "/records/states/0"),
254
+ path: `/v1/rooms/${roomId}/records/states/0`,
263
255
  method: 'PUT'
264
256
  });
265
257
  }
266
258
  async setCloudRecordingReady(roomId) {
267
259
  return this._client.fetch({
268
- path: "/v1/rooms/".concat(roomId, "/records/ready"),
260
+ path: `/v1/rooms/${roomId}/records/ready`,
269
261
  method: 'PUT'
270
262
  });
271
263
  }
@@ -288,7 +280,7 @@ class FcrCoreServiceApi {
288
280
  /** room session */
289
281
  async updateRoomSession(params) {
290
282
  return this._client.fetch({
291
- path: "/v1/users/".concat(params.userId, "/sessions/").concat(params.sessionKey, "/").concat(params.sessionId),
283
+ path: `/v1/users/${params.userId}/sessions/${params.sessionKey}/${params.sessionId}`,
292
284
  method: 'PUT',
293
285
  data: {
294
286
  target: 1,
@@ -300,7 +292,7 @@ class FcrCoreServiceApi {
300
292
  }
301
293
  async deleteRoomSession(params) {
302
294
  return this._client.fetch({
303
- path: "/v1/users/".concat(params.userId, "/sessions/").concat(params.sessionKey, "/").concat(params.sessionId),
295
+ path: `/v1/users/${params.userId}/sessions/${params.sessionKey}/${params.sessionId}`,
304
296
  method: 'DELETE',
305
297
  data: {
306
298
  target: 1,
@@ -313,7 +305,7 @@ class FcrCoreServiceApi {
313
305
  /** peer session */
314
306
  async updatePeerSession(params) {
315
307
  return this._client.fetch({
316
- path: "/v1/users/".concat(params.userId, "/sessions/").concat(params.sessionKey, "/").concat(params.sessionId),
308
+ path: `/v1/users/${params.userId}/sessions/${params.sessionKey}/${params.sessionId}`,
317
309
  method: 'PUT',
318
310
  data: {
319
311
  target: 2,
@@ -325,7 +317,7 @@ class FcrCoreServiceApi {
325
317
  }
326
318
  async deletePeerSession(params) {
327
319
  return this._client.fetch({
328
- path: "/v1/users/".concat(params.userId, "/sessions/").concat(params.sessionKey, "/").concat(params.sessionId),
320
+ path: `/v1/users/${params.userId}/sessions/${params.sessionKey}/${params.sessionId}`,
329
321
  method: 'DELETE',
330
322
  data: {
331
323
  target: 2,
@@ -340,7 +332,7 @@ class FcrCoreServiceApi {
340
332
  data,
341
333
  ts
342
334
  } = await this._client.fetch({
343
- path: "/v1/rooms/".concat(params.roomId, "/users/").concat(params.userId, "/entry"),
335
+ path: `/v1/rooms/${params.roomId}/users/${params.userId}/entry`,
344
336
  method: 'PUT',
345
337
  data: {
346
338
  password: params.password,
@@ -367,7 +359,7 @@ class FcrCoreServiceApi {
367
359
  data,
368
360
  ts
369
361
  } = await this._client.fetch({
370
- path: "/v1/rooms/".concat(params.roomId, "/users/").concat(params.userId, "/internal/entry"),
362
+ path: `/v1/rooms/${params.roomId}/users/${params.userId}/internal/entry`,
371
363
  method: 'PUT',
372
364
  data: {
373
365
  password: params.password,
@@ -396,7 +388,7 @@ class FcrCoreServiceApi {
396
388
  userId
397
389
  } = params;
398
390
  const res = await this._client.fetch({
399
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/info"),
391
+ path: `/v1/rooms/${roomId}/users/${userId}/info`,
400
392
  method: 'PATCH',
401
393
  data: {
402
394
  userName
@@ -404,39 +396,37 @@ class FcrCoreServiceApi {
404
396
  });
405
397
  return res.data;
406
398
  }
407
- async updateUserProperties(_ref) {
408
- let {
409
- roomId,
410
- userUuid,
411
- properties,
412
- increments,
413
- cause
414
- } = _ref;
399
+ async updateUserProperties({
400
+ roomId,
401
+ userUuid,
402
+ properties,
403
+ increments,
404
+ cause
405
+ }) {
415
406
  const data = {
416
407
  properties,
417
408
  cause,
418
409
  increments
419
410
  };
420
411
  const res = await this._client.fetch({
421
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userUuid, "/properties"),
412
+ path: `/v1/rooms/${roomId}/users/${userUuid}/properties`,
422
413
  method: 'PUT',
423
414
  data: data
424
415
  });
425
416
  return res.data;
426
417
  }
427
- async deleteUserProperties(_ref2) {
428
- let {
429
- roomId,
430
- userUuid,
431
- properties,
432
- cause
433
- } = _ref2;
418
+ async deleteUserProperties({
419
+ roomId,
420
+ userUuid,
421
+ properties,
422
+ cause
423
+ }) {
434
424
  const data = {
435
425
  properties,
436
426
  cause
437
427
  };
438
428
  const res = await this._client.fetch({
439
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userUuid, "/properties"),
429
+ path: `/v1/rooms/${roomId}/users/${userUuid}/properties`,
440
430
  method: 'DELETE',
441
431
  data: {
442
432
  users: data
@@ -444,37 +434,35 @@ class FcrCoreServiceApi {
444
434
  });
445
435
  return res.data;
446
436
  }
447
- async updateRoomProperties(_ref3) {
448
- let {
449
- roomId,
450
- properties,
451
- increments,
452
- cause
453
- } = _ref3;
437
+ async updateRoomProperties({
438
+ roomId,
439
+ properties,
440
+ increments,
441
+ cause
442
+ }) {
454
443
  const data = {
455
444
  properties,
456
445
  cause,
457
446
  increments
458
447
  };
459
448
  const res = await this._client.fetch({
460
- path: "/v1/rooms/".concat(roomId, "/properties"),
449
+ path: `/v1/rooms/${roomId}/properties`,
461
450
  method: 'PUT',
462
451
  data: data
463
452
  });
464
453
  return res.data;
465
454
  }
466
- async deleteRoomProperties(_ref4) {
467
- let {
468
- roomId,
469
- properties,
470
- cause
471
- } = _ref4;
455
+ async deleteRoomProperties({
456
+ roomId,
457
+ properties,
458
+ cause
459
+ }) {
472
460
  const data = {
473
461
  properties,
474
462
  cause
475
463
  };
476
464
  const res = await this._client.fetch({
477
- path: "/v1/rooms/".concat(roomId, "/properties"),
465
+ path: `/v1/rooms/${roomId}/properties`,
478
466
  method: 'DELETE',
479
467
  data: data
480
468
  });
@@ -482,26 +470,25 @@ class FcrCoreServiceApi {
482
470
  }
483
471
  async getChatRoomToken(roomId, userId) {
484
472
  const res = await this._client.fetch({
485
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/widgets/easemobIM/token"),
473
+ path: `/v1/rooms/${roomId}/users/${userId}/widgets/easemobIM/token`,
486
474
  method: 'GET'
487
475
  });
488
476
  return res.data;
489
477
  }
490
478
  async getUserToken(userId) {
491
479
  const res = await this._client.fetch({
492
- path: "/v1/users/".concat(userId, "/widgets/easemobIM/token"),
480
+ path: `/v1/users/${userId}/widgets/easemobIM/token`,
493
481
  method: 'GET'
494
482
  });
495
483
  return res.data;
496
484
  }
497
- async enableLockedRoom(_ref5) {
498
- let {
499
- roomId,
500
- enable,
501
- targetRoles
502
- } = _ref5;
485
+ async enableLockedRoom({
486
+ roomId,
487
+ enable,
488
+ targetRoles
489
+ }) {
503
490
  const res = await this._client.fetch({
504
- path: "/v1/rooms/".concat(roomId, "/lock/").concat(enable ? 1 : 0),
491
+ path: `/v1/rooms/${roomId}/lock/${enable ? 1 : 0}`,
505
492
  method: 'PUT',
506
493
  data: {
507
494
  targetRoles: targetRoles.map(role => _type.FcrPrivilegeUserRoleToStringMap[role])
@@ -509,14 +496,13 @@ class FcrCoreServiceApi {
509
496
  });
510
497
  return res.data;
511
498
  }
512
- async enablePassword(_ref6) {
513
- let {
514
- roomId,
515
- enable,
516
- password
517
- } = _ref6;
499
+ async enablePassword({
500
+ roomId,
501
+ enable,
502
+ password
503
+ }) {
518
504
  const res = await this._client.fetch({
519
- path: "/v1/rooms/".concat(roomId, "/password/").concat(enable ? 1 : 0),
505
+ path: `/v1/rooms/${roomId}/password/${enable ? 1 : 0}`,
520
506
  method: 'PUT',
521
507
  data: {
522
508
  password
@@ -524,20 +510,19 @@ class FcrCoreServiceApi {
524
510
  });
525
511
  return res.data;
526
512
  }
527
- async enableWaitingRoom(_ref7) {
528
- let {
529
- roomId,
530
- enable
531
- } = _ref7;
513
+ async enableWaitingRoom({
514
+ roomId,
515
+ enable
516
+ }) {
532
517
  const res = await this._client.fetch({
533
- path: "/v1/rooms/".concat(roomId, "/waiting/").concat(enable ? 1 : 0),
518
+ path: `/v1/rooms/${roomId}/waiting/${enable ? 1 : 0}`,
534
519
  method: 'PUT'
535
520
  });
536
521
  return res.data;
537
522
  }
538
523
  async moveToWaitingRoomByUserIds(userIds, roomId) {
539
524
  const res = await this._client.fetch({
540
- path: "/v1/rooms/".concat(roomId, "/waiting/users"),
525
+ path: `/v1/rooms/${roomId}/waiting/users`,
541
526
  method: 'PUT',
542
527
  data: {
543
528
  toUserUuids: userIds
@@ -547,7 +532,7 @@ class FcrCoreServiceApi {
547
532
  }
548
533
  async moveToWaitingRoomByUserRoles(toRoles, roomId) {
549
534
  const res = await this._client.fetch({
550
- path: "/v1/rooms/".concat(roomId, "/waiting/users"),
535
+ path: `/v1/rooms/${roomId}/waiting/users`,
551
536
  method: 'PUT',
552
537
  data: {
553
538
  toRoles
@@ -557,7 +542,7 @@ class FcrCoreServiceApi {
557
542
  }
558
543
  async moveToMainRoomByUserIds(userIds, roomId) {
559
544
  const res = await this._client.fetch({
560
- path: "/v1/rooms/".concat(roomId, "/waiting/users"),
545
+ path: `/v1/rooms/${roomId}/waiting/users`,
561
546
  method: 'DELETE',
562
547
  data: {
563
548
  toUserUuids: userIds
@@ -567,7 +552,7 @@ class FcrCoreServiceApi {
567
552
  }
568
553
  async moveToMainRoomByUserRoles(toRoles, roomId) {
569
554
  const res = await this._client.fetch({
570
- path: "/v1/rooms/".concat(roomId, "/waiting/users"),
555
+ path: `/v1/rooms/${roomId}/waiting/users`,
571
556
  method: 'DELETE',
572
557
  data: {
573
558
  toRoles
@@ -575,21 +560,20 @@ class FcrCoreServiceApi {
575
560
  });
576
561
  return res.data;
577
562
  }
578
- async allowSendChat(_ref8) {
579
- let {
580
- roomId,
581
- enable,
582
- targetRoles,
583
- payload
584
- } = _ref8;
563
+ async allowSendChat({
564
+ roomId,
565
+ enable,
566
+ targetRoles,
567
+ payload
568
+ }) {
585
569
  const res = await this._client.fetch({
586
- path: "/v1/rooms/".concat(roomId, "/security/chat/").concat(enable ? 1 : 0),
570
+ path: `/v1/rooms/${roomId}/security/chat/${enable ? 1 : 0}`,
587
571
  method: 'PUT',
588
572
  data: {
589
573
  targetRoles,
590
574
  payload: {
591
- public: (payload === null || payload === void 0 ? void 0 : payload.public) === undefined ? undefined : payload.public ? 1 : 0,
592
- private: (payload === null || payload === void 0 ? void 0 : payload.private) === undefined ? undefined : {
575
+ public: payload?.public === undefined ? undefined : payload.public ? 1 : 0,
576
+ private: payload?.private === undefined ? undefined : {
593
577
  host: payload.private.host ? 1 : 0,
594
578
  cohost: payload.private.cohost ? 1 : 0,
595
579
  participant: payload.private.participant ? 1 : 0
@@ -599,14 +583,13 @@ class FcrCoreServiceApi {
599
583
  });
600
584
  return res.data;
601
585
  }
602
- async allowChangeName(_ref9) {
603
- let {
604
- roomId,
605
- enable,
606
- targetRoles
607
- } = _ref9;
586
+ async allowChangeName({
587
+ roomId,
588
+ enable,
589
+ targetRoles
590
+ }) {
608
591
  const res = await this._client.fetch({
609
- path: "/v1/rooms/".concat(roomId, "/security/changeName/").concat(enable ? 1 : 0),
592
+ path: `/v1/rooms/${roomId}/security/changeName/${enable ? 1 : 0}`,
610
593
  method: 'PUT',
611
594
  data: {
612
595
  targetRoles
@@ -614,14 +597,13 @@ class FcrCoreServiceApi {
614
597
  });
615
598
  return res.data;
616
599
  }
617
- async allowStartAudio(_ref0) {
618
- let {
619
- roomId,
620
- enable,
621
- targetRoles
622
- } = _ref0;
600
+ async allowStartAudio({
601
+ roomId,
602
+ enable,
603
+ targetRoles
604
+ }) {
623
605
  const res = await this._client.fetch({
624
- path: "/v1/rooms/".concat(roomId, "/security/unmuteAudio/").concat(enable ? 1 : 0),
606
+ path: `/v1/rooms/${roomId}/security/unmuteAudio/${enable ? 1 : 0}`,
625
607
  method: 'PUT',
626
608
  data: {
627
609
  targetRoles
@@ -637,11 +619,13 @@ class FcrCoreServiceApi {
637
619
  payload
638
620
  } = params;
639
621
  const res = await this._client.fetch({
640
- path: "/v1/rooms/".concat(roomId, "/security/watermark/").concat(enable ? 1 : 0),
622
+ path: `/v1/rooms/${roomId}/security/watermark/${enable ? 1 : 0}`,
641
623
  method: 'PUT',
642
624
  data: {
643
625
  targetRoles,
644
- payload: _objectSpread({}, payload)
626
+ payload: {
627
+ ...payload
628
+ }
645
629
  }
646
630
  });
647
631
  return res.data;
@@ -653,7 +637,7 @@ class FcrCoreServiceApi {
653
637
  targetRoles
654
638
  } = params;
655
639
  const res = await this._client.fetch({
656
- path: "/v1/rooms/".concat(roomId, "/security/changeName/").concat(enable ? 1 : 0),
640
+ path: `/v1/rooms/${roomId}/security/changeName/${enable ? 1 : 0}`,
657
641
  method: 'PUT',
658
642
  data: {
659
643
  targetRoles
@@ -661,14 +645,13 @@ class FcrCoreServiceApi {
661
645
  });
662
646
  return res.data;
663
647
  }
664
- async allowStartVideo(_ref1) {
665
- let {
666
- roomId,
667
- enable,
668
- targetRoles
669
- } = _ref1;
648
+ async allowStartVideo({
649
+ roomId,
650
+ enable,
651
+ targetRoles
652
+ }) {
670
653
  const res = await this._client.fetch({
671
- path: "/v1/rooms/".concat(roomId, "/security/openVideo/").concat(enable ? 1 : 0),
654
+ path: `/v1/rooms/${roomId}/security/openVideo/${enable ? 1 : 0}`,
672
655
  method: 'PUT',
673
656
  data: {
674
657
  targetRoles
@@ -676,14 +659,13 @@ class FcrCoreServiceApi {
676
659
  });
677
660
  return res.data;
678
661
  }
679
- async allowJoinWithMuteAudio(_ref10) {
680
- let {
681
- roomId,
682
- enable,
683
- targetRoles
684
- } = _ref10;
662
+ async allowJoinWithMuteAudio({
663
+ roomId,
664
+ enable,
665
+ targetRoles
666
+ }) {
685
667
  const res = await this._client.fetch({
686
- path: "/v1/rooms/".concat(roomId, "/security/joinWithMuteAudio/").concat(enable ? 1 : 0),
668
+ path: `/v1/rooms/${roomId}/security/joinWithMuteAudio/${enable ? 1 : 0}`,
687
669
  method: 'PUT',
688
670
  data: {
689
671
  targetRoles
@@ -691,14 +673,13 @@ class FcrCoreServiceApi {
691
673
  });
692
674
  return res.data;
693
675
  }
694
- async allowJoinWithMutedVideo(_ref11) {
695
- let {
696
- roomId,
697
- enable,
698
- targetRoles
699
- } = _ref11;
676
+ async allowJoinWithMutedVideo({
677
+ roomId,
678
+ enable,
679
+ targetRoles
680
+ }) {
700
681
  const res = await this._client.fetch({
701
- path: "/v1/rooms/".concat(roomId, "/security/joinWithCloseVideo/").concat(enable ? 1 : 0),
682
+ path: `/v1/rooms/${roomId}/security/joinWithCloseVideo/${enable ? 1 : 0}`,
702
683
  method: 'PUT',
703
684
  data: {
704
685
  targetRoles
@@ -706,15 +687,14 @@ class FcrCoreServiceApi {
706
687
  });
707
688
  return res.data;
708
689
  }
709
- async updateUserRole(_ref12) {
710
- let {
711
- roomId,
712
- localRole,
713
- remoteRole,
714
- userId
715
- } = _ref12;
690
+ async updateUserRole({
691
+ roomId,
692
+ localRole,
693
+ remoteRole,
694
+ userId
695
+ }) {
716
696
  const res = await this._client.fetch({
717
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/role"),
697
+ path: `/v1/rooms/${roomId}/users/${userId}/role`,
718
698
  method: 'PUT',
719
699
  data: {
720
700
  remoteRole,
@@ -723,15 +703,14 @@ class FcrCoreServiceApi {
723
703
  });
724
704
  return res.data;
725
705
  }
726
- async revokeUserRole(_ref13) {
727
- let {
728
- roomId,
729
- remoteRole,
730
- localRole,
731
- userId
732
- } = _ref13;
706
+ async revokeUserRole({
707
+ roomId,
708
+ remoteRole,
709
+ localRole,
710
+ userId
711
+ }) {
733
712
  const res = await this._client.fetch({
734
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/role"),
713
+ path: `/v1/rooms/${roomId}/users/${userId}/role`,
735
714
  method: 'DELETE',
736
715
  data: {
737
716
  remoteRole,
@@ -740,14 +719,13 @@ class FcrCoreServiceApi {
740
719
  });
741
720
  return res.data;
742
721
  }
743
- async claimHost(_ref14) {
744
- let {
745
- roomId,
746
- userId,
747
- hostKey
748
- } = _ref14;
722
+ async claimHost({
723
+ roomId,
724
+ userId,
725
+ hostKey
726
+ }) {
749
727
  const res = await this._client.fetch({
750
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/claim/host"),
728
+ path: `/v1/rooms/${roomId}/users/${userId}/claim/host`,
751
729
  method: 'POST',
752
730
  data: {
753
731
  hostKey
@@ -757,14 +735,14 @@ class FcrCoreServiceApi {
757
735
  }
758
736
  async stopLiveStreaming(roomId) {
759
737
  const res = await this._client.fetch({
760
- path: "/v1/rooms/".concat(roomId, "/live/states/0"),
738
+ path: `/v1/rooms/${roomId}/live/states/0`,
761
739
  method: 'PUT'
762
740
  });
763
741
  return res;
764
742
  }
765
743
  async updateLiveStreamingLayout(roomId, layoutType) {
766
744
  const res = await this._client.fetch({
767
- path: "/v1/rooms/".concat(roomId, "/live/states/1"),
745
+ path: `/v1/rooms/${roomId}/live/states/1`,
768
746
  method: 'PATCH',
769
747
  data: {
770
748
  layoutType: layoutType
@@ -774,7 +752,7 @@ class FcrCoreServiceApi {
774
752
  }
775
753
  async startLiveStreaming(roomId, data) {
776
754
  const res = await this._client.fetch({
777
- path: "/v1/rooms/".concat(roomId, "/live/states/1"),
755
+ path: `/v1/rooms/${roomId}/live/states/1`,
778
756
  method: 'PUT',
779
757
  data: {
780
758
  streamUrl: data.pushStreamingUrl,
@@ -785,14 +763,13 @@ class FcrCoreServiceApi {
785
763
  });
786
764
  return res;
787
765
  }
788
- async callIp(_ref15) {
789
- let {
790
- roomId,
791
- callType,
792
- ipAddress
793
- } = _ref15;
766
+ async callIp({
767
+ roomId,
768
+ callType,
769
+ ipAddress
770
+ }) {
794
771
  const res = await this._client.fetch({
795
- path: "/v1/rooms/".concat(roomId, "/call/").concat(callType),
772
+ path: `/v1/rooms/${roomId}/call/${callType}`,
796
773
  method: 'POST',
797
774
  data: {
798
775
  ipAddress
@@ -800,15 +777,14 @@ class FcrCoreServiceApi {
800
777
  });
801
778
  return res;
802
779
  }
803
- async callPstn(_ref16) {
804
- let {
805
- roomId,
806
- userName,
807
- userId,
808
- callNumber
809
- } = _ref16;
780
+ async callPstn({
781
+ roomId,
782
+ userName,
783
+ userId,
784
+ callNumber
785
+ }) {
810
786
  const res = await this._client.fetch({
811
- path: "/v1/rooms/".concat(roomId, "/call/pstn"),
787
+ path: `/v1/rooms/${roomId}/call/pstn`,
812
788
  method: 'POST',
813
789
  data: {
814
790
  callNumber,
@@ -818,14 +794,13 @@ class FcrCoreServiceApi {
818
794
  });
819
795
  return res;
820
796
  }
821
- async hangup(_ref17) {
822
- let {
823
- roomId,
824
- userId,
825
- callId
826
- } = _ref17;
797
+ async hangup({
798
+ roomId,
799
+ userId,
800
+ callId
801
+ }) {
827
802
  const res = await this._client.fetch({
828
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/call/").concat(callId),
803
+ path: `/v1/rooms/${roomId}/users/${userId}/call/${callId}`,
829
804
  method: 'DELETE'
830
805
  });
831
806
  return res;
@@ -834,13 +809,12 @@ class FcrCoreServiceApi {
834
809
  /**
835
810
  * @description 获取白板信息
836
811
  */
837
- async getWhiteboardToken(_ref18) {
838
- let {
839
- roomId,
840
- userId
841
- } = _ref18;
812
+ async getWhiteboardToken({
813
+ roomId,
814
+ userId
815
+ }) {
842
816
  return this._client.fetch({
843
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/widgets/netlessBoard/token"),
817
+ path: `/v1/rooms/${roomId}/users/${userId}/widgets/netlessBoard/token`,
844
818
  method: 'GET'
845
819
  });
846
820
  }
@@ -848,13 +822,12 @@ class FcrCoreServiceApi {
848
822
  /**
849
823
  * @description 获取批注token
850
824
  */
851
- async getAnnotationToken(_ref19) {
852
- let {
853
- roomId,
854
- userId
855
- } = _ref19;
825
+ async getAnnotationToken({
826
+ roomId,
827
+ userId
828
+ }) {
856
829
  return this._client.fetch({
857
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/widgets/annotation/token"),
830
+ path: `/v1/rooms/${roomId}/users/${userId}/widgets/annotation/token`,
858
831
  method: 'GET'
859
832
  });
860
833
  }
@@ -864,7 +837,7 @@ class FcrCoreServiceApi {
864
837
  */
865
838
  async toggleAnnotationActivityState(roomId, state) {
866
839
  return this._client.fetch({
867
- path: "/v1/rooms/".concat(roomId, "/widgets/annotation/states/").concat(state),
840
+ path: `/v1/rooms/${roomId}/widgets/annotation/states/${state}`,
868
841
  method: 'PUT'
869
842
  });
870
843
  }
@@ -874,7 +847,7 @@ class FcrCoreServiceApi {
874
847
  */
875
848
  async syncScreenShareOwnerAnnotationOpenDone(roomId) {
876
849
  return this._client.fetch({
877
- path: "/v1/rooms/".concat(roomId, "/widgets/annotation/states/1"),
850
+ path: `/v1/rooms/${roomId}/widgets/annotation/states/1`,
878
851
  method: 'PUT',
879
852
  retryFallbackDomainsWhenFail: true
880
853
  });
@@ -891,11 +864,13 @@ class FcrCoreServiceApi {
891
864
  payload
892
865
  } = params;
893
866
  return this._client.fetch({
894
- path: "/v1/rooms/".concat(roomId, "/security/sharing/").concat(enable ? 1 : 0),
867
+ path: `/v1/rooms/${roomId}/security/sharing/${enable ? 1 : 0}`,
895
868
  method: 'PUT',
896
869
  data: {
897
870
  targetRoles,
898
- payload: _objectSpread({}, payload)
871
+ payload: {
872
+ ...payload
873
+ }
899
874
  }
900
875
  });
901
876
  }
@@ -911,7 +886,7 @@ class FcrCoreServiceApi {
911
886
  data
912
887
  } = params;
913
888
  return this._client.fetch({
914
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/streams/screen/states/").concat(enable ? 1 : 0),
889
+ path: `/v1/rooms/${roomId}/users/${userId}/streams/screen/states/${enable ? 1 : 0}`,
915
890
  method: 'PUT',
916
891
  data
917
892
  });
@@ -922,7 +897,7 @@ class FcrCoreServiceApi {
922
897
  */
923
898
  async toggleWhiteboardActivityState(roomId, state) {
924
899
  return this._client.fetch({
925
- path: "/v1/rooms/".concat(roomId, "/widgets/netlessBoard/states/").concat(state),
900
+ path: `/v1/rooms/${roomId}/widgets/netlessBoard/states/${state}`,
926
901
  method: 'PUT'
927
902
  });
928
903
  }
@@ -938,11 +913,13 @@ class FcrCoreServiceApi {
938
913
  targetRoles
939
914
  } = params;
940
915
  return this._client.fetch({
941
- path: "/v1/rooms/".concat(roomId, "/security/annotation/", 1),
916
+ path: `/v1/rooms/${roomId}/security/annotation/${1}`,
942
917
  method: 'PUT',
943
918
  data: {
944
919
  targetRoles,
945
- payload: _objectSpread({}, payload)
920
+ payload: {
921
+ ...payload
922
+ }
946
923
  }
947
924
  });
948
925
  }
@@ -956,7 +933,7 @@ class FcrCoreServiceApi {
956
933
  backgroundColor
957
934
  } = params;
958
935
  return this._client.fetch({
959
- path: "/v1/rooms/".concat(roomId, "/widgets/netlessBoard/info"),
936
+ path: `/v1/rooms/${roomId}/widgets/netlessBoard/info`,
960
937
  method: 'PUT',
961
938
  data: {
962
939
  backgroundColor
@@ -970,7 +947,7 @@ class FcrCoreServiceApi {
970
947
  config
971
948
  } = params;
972
949
  const res = this._client.fetch({
973
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/streams/screen/states/1"),
950
+ path: `/v1/rooms/${roomId}/users/${userId}/streams/screen/states/1`,
974
951
  method: 'PUT',
975
952
  data: config
976
953
  });
@@ -982,7 +959,7 @@ class FcrCoreServiceApi {
982
959
  userId
983
960
  } = params;
984
961
  const res = this._client.fetch({
985
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/streams/screen/states/0"),
962
+ path: `/v1/rooms/${roomId}/users/${userId}/streams/screen/states/0`,
986
963
  method: 'PUT'
987
964
  });
988
965
  return res;
@@ -993,7 +970,7 @@ class FcrCoreServiceApi {
993
970
  data
994
971
  } = params;
995
972
  const res = this._client.fetch({
996
- path: "/v1/rooms/".concat(roomId, "/interpreter/states/1"),
973
+ path: `/v1/rooms/${roomId}/interpreter/states/1`,
997
974
  method: 'PUT',
998
975
  data
999
976
  });
@@ -1007,7 +984,7 @@ class FcrCoreServiceApi {
1007
984
  roomId
1008
985
  } = params;
1009
986
  const res = this._client.fetch({
1010
- path: "/v1/rooms/".concat(roomId, "/interpreter/states/0"),
987
+ path: `/v1/rooms/${roomId}/interpreter/states/0`,
1011
988
  method: 'PUT',
1012
989
  data: {}
1013
990
  });
@@ -1015,7 +992,7 @@ class FcrCoreServiceApi {
1015
992
  }
1016
993
  async createStreamBatch(roomUuid, streams) {
1017
994
  return await this._client.fetch({
1018
- path: "/v1/rooms/".concat(roomUuid, "/streams"),
995
+ path: `/v1/rooms/${roomUuid}/streams`,
1019
996
  method: 'POST',
1020
997
  data: {
1021
998
  streams
@@ -1024,24 +1001,23 @@ class FcrCoreServiceApi {
1024
1001
  }
1025
1002
  async updateStreamBatch(roomUuid, streams) {
1026
1003
  return await this._client.fetch({
1027
- path: "/v1/rooms/".concat(roomUuid, "/streams"),
1004
+ path: `/v1/rooms/${roomUuid}/streams`,
1028
1005
  method: 'PUT',
1029
1006
  data: {
1030
1007
  streams
1031
1008
  }
1032
1009
  });
1033
1010
  }
1034
- async updateStreamBatchByCondition(_ref20) {
1035
- let {
1036
- roomUuid,
1037
- videoState,
1038
- audioState,
1039
- includeRoles,
1040
- excludeRoles,
1041
- condition
1042
- } = _ref20;
1011
+ async updateStreamBatchByCondition({
1012
+ roomUuid,
1013
+ videoState,
1014
+ audioState,
1015
+ includeRoles,
1016
+ excludeRoles,
1017
+ condition
1018
+ }) {
1043
1019
  return await this._client.fetch({
1044
- path: "/v1/rooms/".concat(roomUuid, "/conditions/streams"),
1020
+ path: `/v1/rooms/${roomUuid}/conditions/streams`,
1045
1021
  method: 'PUT',
1046
1022
  data: {
1047
1023
  includeRoles,
@@ -1056,7 +1032,7 @@ class FcrCoreServiceApi {
1056
1032
  }
1057
1033
  async deleteStreamBatch(roomUuid, streams) {
1058
1034
  return await this._client.fetch({
1059
- path: "/v1/rooms/".concat(roomUuid, "/streams"),
1035
+ path: `/v1/rooms/${roomUuid}/streams`,
1060
1036
  method: 'DELETE',
1061
1037
  data: {
1062
1038
  streams