fcr-core 3.6.2 → 3.6.4

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