fcr-core 3.4.2 → 3.4.3

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 (39) hide show
  1. package/lib/chat-connection/index.js +20 -38
  2. package/lib/engine/index.js +39 -41
  3. package/lib/imports.js +0 -1
  4. package/lib/media-control/desktop.js +3 -11
  5. package/lib/media-control/mobile.js +6 -13
  6. package/lib/peer-session/index.js +34 -47
  7. package/lib/plugins/chatroom.js +99 -113
  8. package/lib/room-control/group-control/index.js +11 -22
  9. package/lib/room-control/index.js +56 -82
  10. package/lib/room-control/interpreter-control/index.js +9 -17
  11. package/lib/room-control/interpreter-control/room.js +4 -6
  12. package/lib/room-control/mainroom-control/index.js +21 -41
  13. package/lib/room-control/privilege-control/helper.js +5 -10
  14. package/lib/room-control/privilege-control/index.js +12 -21
  15. package/lib/room-control/privilege-control/type.js +1 -0
  16. package/lib/room-control/room-connector-control/index.js +13 -24
  17. package/lib/room-control/room-session/index.js +36 -49
  18. package/lib/room-control/stream-control/index.js +140 -151
  19. package/lib/room-control/user-control/index.js +119 -135
  20. package/lib/room-control/waitingroom-control/index.js +8 -16
  21. package/lib/room-control/whiteboard-control/board-subwindow.js +1 -2
  22. package/lib/room-control/whiteboard-control/board-window.js +49 -57
  23. package/lib/room-control/whiteboard-control/enums.js +84 -0
  24. package/lib/room-control/whiteboard-control/index.js +22 -35
  25. package/lib/room-control/whiteboard-control/mount-manager.js +2 -4
  26. package/lib/room-control/whiteboard-control/utils.js +14 -17
  27. package/lib/room-control/whiteboard-control-v2/index.js +19 -33
  28. package/lib/room-control/whiteboard-control-v2/main-window.js +12 -23
  29. package/lib/service/api.js +76 -82
  30. package/lib/type.js +4 -2
  31. package/lib/utilities/collection.js +2 -3
  32. package/lib/utilities/error.js +3 -5
  33. package/lib/utilities/logger.js +1 -2
  34. package/lib/utilities/parameters.js +4 -8
  35. package/lib/utilities/stream.js +12 -20
  36. package/lib/utilities/user.js +1 -1
  37. package/package.json +4 -4
  38. package/lib/room-control/chatroom-control/index.d.ts +0 -1
  39. package/lib/room-control/chatroom-control/index.js +0 -385
@@ -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._client.setPathPrefix(pathPrefix);
@@ -36,7 +26,7 @@ class FcrCoreServiceApi {
36
26
  const {
37
27
  data
38
28
  } = await this._client.fetch({
39
- path: "/v2/rooms/".concat(opts.roomId, "/groups"),
29
+ path: `/v2/rooms/${opts.roomId}/groups`,
40
30
  method: 'PUT',
41
31
  data: {
42
32
  groups: params.map(group => {
@@ -59,7 +49,7 @@ class FcrCoreServiceApi {
59
49
  const {
60
50
  data
61
51
  } = await this._client.fetch({
62
- path: "/v2/rooms/".concat(opts.roomId, "/groups/info"),
52
+ path: `/v2/rooms/${opts.roomId}/groups/info`,
63
53
  method: 'PATCH',
64
54
  data: {
65
55
  groups: params.map(group => {
@@ -75,7 +65,7 @@ class FcrCoreServiceApi {
75
65
  const {
76
66
  data
77
67
  } = await this._client.fetch({
78
- path: "/v2/rooms/".concat(opts.roomId, "/groups/states/1"),
68
+ path: `/v2/rooms/${opts.roomId}/groups/states/1`,
79
69
  method: 'DELETE',
80
70
  data: {
81
71
  removeGroupUuids: groupIds
@@ -86,7 +76,7 @@ class FcrCoreServiceApi {
86
76
  const {
87
77
  data
88
78
  } = await this._client.fetch({
89
- path: "/v2/rooms/".concat(opts.roomId, "/groups/all"),
79
+ path: `/v2/rooms/${opts.roomId}/groups/all`,
90
80
  method: 'DELETE'
91
81
  });
92
82
  }
@@ -94,7 +84,7 @@ class FcrCoreServiceApi {
94
84
  const {
95
85
  data
96
86
  } = await this._client.fetch({
97
- path: "/v2/rooms/".concat(opts.roomId, "/groups/users"),
87
+ path: `/v2/rooms/${opts.roomId}/groups/users`,
98
88
  method: 'PATCH',
99
89
  data: {
100
90
  groups: [{
@@ -109,7 +99,7 @@ class FcrCoreServiceApi {
109
99
  const {
110
100
  data
111
101
  } = await this._client.fetch({
112
- path: "/v2/rooms/".concat(opts.roomId, "/groups/users"),
102
+ path: `/v2/rooms/${opts.roomId}/groups/users`,
113
103
  method: 'PATCH',
114
104
  data: {
115
105
  groups: [{
@@ -124,7 +114,7 @@ class FcrCoreServiceApi {
124
114
  const {
125
115
  data
126
116
  } = await this._client.fetch({
127
- path: "/v2/rooms/".concat(opts.roomId, "/groups/users"),
117
+ path: `/v2/rooms/${opts.roomId}/groups/users`,
128
118
  method: 'PATCH',
129
119
  data: {
130
120
  groups: [{
@@ -138,7 +128,7 @@ class FcrCoreServiceApi {
138
128
  /*** merge audio ****/
139
129
  async mergeAudioStream(userId, opts) {
140
130
  const res = await this._client.fetch({
141
- path: "/v1/rooms/".concat(opts.roomId, "/users/").concat(userId, "/call/merge"),
131
+ path: `/v1/rooms/${opts.roomId}/users/${userId}/call/merge`,
142
132
  method: 'PUT',
143
133
  data: {}
144
134
  });
@@ -147,7 +137,7 @@ class FcrCoreServiceApi {
147
137
  /*** split audio ****/
148
138
  async splitAudioStream(userId, opts) {
149
139
  const res = await this._client.fetch({
150
- path: "/v1/rooms/".concat(opts.roomId, "/users/").concat(userId, "/call/split"),
140
+ path: `/v1/rooms/${opts.roomId}/users/${userId}/call/split`,
151
141
  method: 'PUT',
152
142
  data: {}
153
143
  });
@@ -160,7 +150,7 @@ class FcrCoreServiceApi {
160
150
  body.duration = -1;
161
151
  }
162
152
  return this._client.fetch({
163
- path: "/v1/rooms/".concat(opts.roomId, "/users/").concat(userId, "/ban/").concat(type === _type2.FcrUserKickedOutType.Forever ? 1 : 0),
153
+ path: `/v1/rooms/${opts.roomId}/users/${userId}/ban/${type === _type2.FcrUserKickedOutType.Forever ? 1 : 0}`,
164
154
  method: 'PUT',
165
155
  data: body
166
156
  });
@@ -175,7 +165,7 @@ class FcrCoreServiceApi {
175
165
  const {
176
166
  data
177
167
  } = await this._client.fetch({
178
- path: "/v1/rooms/".concat(opts.roomId, "/users/ban/").concat(type === _type2.FcrUserKickedOutType.Forever ? 1 : 0),
168
+ path: `/v1/rooms/${opts.roomId}/users/ban/${type === _type2.FcrUserKickedOutType.Forever ? 1 : 0}`,
179
169
  method: 'PUT',
180
170
  data: body
181
171
  });
@@ -190,7 +180,7 @@ class FcrCoreServiceApi {
190
180
  const {
191
181
  data
192
182
  } = await this._client.fetch({
193
- path: "/v1/rooms/".concat(opts.roomId, "/users/ban/").concat(type === _type2.FcrUserKickedOutType.Forever ? 1 : 0),
183
+ path: `/v1/rooms/${opts.roomId}/users/ban/${type === _type2.FcrUserKickedOutType.Forever ? 1 : 0}`,
194
184
  method: 'PUT',
195
185
  data: body
196
186
  });
@@ -199,25 +189,25 @@ class FcrCoreServiceApi {
199
189
  /** room control **/
200
190
  async startRoom(roomId) {
201
191
  return this._client.fetch({
202
- path: "/v1/rooms/".concat(roomId, "/states/1"),
192
+ path: `/v1/rooms/${roomId}/states/1`,
203
193
  method: 'PUT'
204
194
  });
205
195
  }
206
196
  async endRoom(roomId) {
207
197
  return this._client.fetch({
208
- path: "/v1/rooms/".concat(roomId, "/states/2"),
198
+ path: `/v1/rooms/${roomId}/states/2`,
209
199
  method: 'PUT'
210
200
  });
211
201
  }
212
202
  async closeRoom(roomId) {
213
203
  return this._client.fetch({
214
- path: "/v1/rooms/".concat(roomId, "/states/3"),
204
+ path: `/v1/rooms/${roomId}/states/3`,
215
205
  method: 'PUT'
216
206
  });
217
207
  }
218
208
  async startCloudRecording(config, roomId) {
219
209
  return this._client.fetch({
220
- path: "/v1/rooms/".concat(roomId, "/records/states/1"),
210
+ path: `/v1/rooms/${roomId}/records/states/1`,
221
211
  method: 'PUT',
222
212
  data: {
223
213
  mode: 'web',
@@ -234,7 +224,7 @@ class FcrCoreServiceApi {
234
224
  }
235
225
  async pauseCloudRecording(roomId) {
236
226
  return this._client.fetch({
237
- path: "/v1/rooms/".concat(roomId, "/records/states/1"),
227
+ path: `/v1/rooms/${roomId}/records/states/1`,
238
228
  method: 'PATCH',
239
229
  data: {
240
230
  mode: 'web',
@@ -246,7 +236,7 @@ class FcrCoreServiceApi {
246
236
  }
247
237
  async resumeCloudRecording(roomId) {
248
238
  return this._client.fetch({
249
- path: "/v1/rooms/".concat(roomId, "/records/states/1"),
239
+ path: `/v1/rooms/${roomId}/records/states/1`,
250
240
  method: 'PATCH',
251
241
  data: {
252
242
  webRecordConfig: {
@@ -257,13 +247,13 @@ class FcrCoreServiceApi {
257
247
  }
258
248
  async stopCloudRecording(roomId) {
259
249
  return this._client.fetch({
260
- path: "/v1/rooms/".concat(roomId, "/records/states/0"),
250
+ path: `/v1/rooms/${roomId}/records/states/0`,
261
251
  method: 'PUT'
262
252
  });
263
253
  }
264
254
  async setCloudRecordingReady(roomId) {
265
255
  return this._client.fetch({
266
- path: "/v1/rooms/".concat(roomId, "/records/ready"),
256
+ path: `/v1/rooms/${roomId}/records/ready`,
267
257
  method: 'PUT'
268
258
  });
269
259
  }
@@ -286,7 +276,7 @@ class FcrCoreServiceApi {
286
276
  /** room session */
287
277
  async updateRoomSession(params) {
288
278
  return this._client.fetch({
289
- path: "/v1/users/".concat(params.userId, "/sessions/").concat(params.sessionKey, "/").concat(params.sessionId),
279
+ path: `/v1/users/${params.userId}/sessions/${params.sessionKey}/${params.sessionId}`,
290
280
  method: 'PUT',
291
281
  data: {
292
282
  target: 1,
@@ -298,7 +288,7 @@ class FcrCoreServiceApi {
298
288
  }
299
289
  async deleteRoomSession(params) {
300
290
  return this._client.fetch({
301
- path: "/v1/users/".concat(params.userId, "/sessions/").concat(params.sessionKey, "/").concat(params.sessionId),
291
+ path: `/v1/users/${params.userId}/sessions/${params.sessionKey}/${params.sessionId}`,
302
292
  method: 'DELETE',
303
293
  data: {
304
294
  target: 1,
@@ -311,7 +301,7 @@ class FcrCoreServiceApi {
311
301
  /** peer session */
312
302
  async updatePeerSession(params) {
313
303
  return this._client.fetch({
314
- path: "/v1/users/".concat(params.userId, "/sessions/").concat(params.sessionKey, "/").concat(params.sessionId),
304
+ path: `/v1/users/${params.userId}/sessions/${params.sessionKey}/${params.sessionId}`,
315
305
  method: 'PUT',
316
306
  data: {
317
307
  target: 2,
@@ -323,7 +313,7 @@ class FcrCoreServiceApi {
323
313
  }
324
314
  async deletePeerSession(params) {
325
315
  return this._client.fetch({
326
- path: "/v1/users/".concat(params.userId, "/sessions/").concat(params.sessionKey, "/").concat(params.sessionId),
316
+ path: `/v1/users/${params.userId}/sessions/${params.sessionKey}/${params.sessionId}`,
327
317
  method: 'DELETE',
328
318
  data: {
329
319
  target: 2,
@@ -338,7 +328,7 @@ class FcrCoreServiceApi {
338
328
  data,
339
329
  ts
340
330
  } = await this._client.fetch({
341
- path: "/v1/rooms/".concat(params.roomId, "/users/").concat(params.userId, "/entry"),
331
+ path: `/v1/rooms/${params.roomId}/users/${params.userId}/entry`,
342
332
  method: 'PUT',
343
333
  data: {
344
334
  password: params.password,
@@ -363,7 +353,7 @@ class FcrCoreServiceApi {
363
353
  data,
364
354
  ts
365
355
  } = await this._client.fetch({
366
- path: "/v1/rooms/".concat(params.roomId, "/users/").concat(params.userId, "/internal/entry"),
356
+ path: `/v1/rooms/${params.roomId}/users/${params.userId}/internal/entry`,
367
357
  method: 'PUT',
368
358
  data: {
369
359
  password: params.password,
@@ -391,7 +381,7 @@ class FcrCoreServiceApi {
391
381
  userId
392
382
  } = params;
393
383
  const res = await this._client.fetch({
394
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/info"),
384
+ path: `/v1/rooms/${roomId}/users/${userId}/info`,
395
385
  method: 'PATCH',
396
386
  data: {
397
387
  userName
@@ -413,7 +403,7 @@ class FcrCoreServiceApi {
413
403
  increments
414
404
  };
415
405
  const res = await this._client.fetch({
416
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userUuid, "/properties"),
406
+ path: `/v1/rooms/${roomId}/users/${userUuid}/properties`,
417
407
  method: 'PUT',
418
408
  data: data
419
409
  });
@@ -431,7 +421,7 @@ class FcrCoreServiceApi {
431
421
  cause
432
422
  };
433
423
  const res = await this._client.fetch({
434
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userUuid, "/properties"),
424
+ path: `/v1/rooms/${roomId}/users/${userUuid}/properties`,
435
425
  method: 'DELETE',
436
426
  data: {
437
427
  users: data
@@ -452,7 +442,7 @@ class FcrCoreServiceApi {
452
442
  increments
453
443
  };
454
444
  const res = await this._client.fetch({
455
- path: "/v1/rooms/".concat(roomId, "/properties"),
445
+ path: `/v1/rooms/${roomId}/properties`,
456
446
  method: 'PUT',
457
447
  data: data
458
448
  });
@@ -469,7 +459,7 @@ class FcrCoreServiceApi {
469
459
  cause
470
460
  };
471
461
  const res = await this._client.fetch({
472
- path: "/v1/rooms/".concat(roomId, "/properties"),
462
+ path: `/v1/rooms/${roomId}/properties`,
473
463
  method: 'DELETE',
474
464
  data: data
475
465
  });
@@ -477,14 +467,14 @@ class FcrCoreServiceApi {
477
467
  }
478
468
  async getChatRoomToken(roomId, userId) {
479
469
  const res = await this._client.fetch({
480
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/widgets/easemobIM/token"),
470
+ path: `/v1/rooms/${roomId}/users/${userId}/widgets/easemobIM/token`,
481
471
  method: 'GET'
482
472
  });
483
473
  return res.data;
484
474
  }
485
475
  async getUserToken(userId) {
486
476
  const res = await this._client.fetch({
487
- path: "/v1/users/".concat(userId, "/widgets/easemobIM/token"),
477
+ path: `/v1/users/${userId}/widgets/easemobIM/token`,
488
478
  method: 'GET'
489
479
  });
490
480
  return res.data;
@@ -496,7 +486,7 @@ class FcrCoreServiceApi {
496
486
  targetRoles
497
487
  } = _ref5;
498
488
  const res = await this._client.fetch({
499
- path: "/v1/rooms/".concat(roomId, "/lock/").concat(enable ? 1 : 0),
489
+ path: `/v1/rooms/${roomId}/lock/${enable ? 1 : 0}`,
500
490
  method: 'PUT',
501
491
  data: {
502
492
  targetRoles: targetRoles.map(role => _type.FcrPrivilegeUserRoleToStringMap[role])
@@ -511,7 +501,7 @@ class FcrCoreServiceApi {
511
501
  password
512
502
  } = _ref6;
513
503
  const res = await this._client.fetch({
514
- path: "/v1/rooms/".concat(roomId, "/password/").concat(enable ? 1 : 0),
504
+ path: `/v1/rooms/${roomId}/password/${enable ? 1 : 0}`,
515
505
  method: 'PUT',
516
506
  data: {
517
507
  password
@@ -525,14 +515,14 @@ class FcrCoreServiceApi {
525
515
  enable
526
516
  } = _ref7;
527
517
  const res = await this._client.fetch({
528
- path: "/v1/rooms/".concat(roomId, "/waiting/").concat(enable ? 1 : 0),
518
+ path: `/v1/rooms/${roomId}/waiting/${enable ? 1 : 0}`,
529
519
  method: 'PUT'
530
520
  });
531
521
  return res.data;
532
522
  }
533
523
  async moveToWaitingRoomByUserIds(userIds, roomId) {
534
524
  const res = await this._client.fetch({
535
- path: "/v1/rooms/".concat(roomId, "/waiting/users"),
525
+ path: `/v1/rooms/${roomId}/waiting/users`,
536
526
  method: 'PUT',
537
527
  data: {
538
528
  toUserUuids: userIds
@@ -542,7 +532,7 @@ class FcrCoreServiceApi {
542
532
  }
543
533
  async moveToWaitingRoomByUserRoles(toRoles, roomId) {
544
534
  const res = await this._client.fetch({
545
- path: "/v1/rooms/".concat(roomId, "/waiting/users"),
535
+ path: `/v1/rooms/${roomId}/waiting/users`,
546
536
  method: 'PUT',
547
537
  data: {
548
538
  toRoles
@@ -552,7 +542,7 @@ class FcrCoreServiceApi {
552
542
  }
553
543
  async moveToMainRoomByUserIds(userIds, roomId) {
554
544
  const res = await this._client.fetch({
555
- path: "/v1/rooms/".concat(roomId, "/waiting/users"),
545
+ path: `/v1/rooms/${roomId}/waiting/users`,
556
546
  method: 'DELETE',
557
547
  data: {
558
548
  toUserUuids: userIds
@@ -562,7 +552,7 @@ class FcrCoreServiceApi {
562
552
  }
563
553
  async moveToMainRoomByUserRoles(toRoles, roomId) {
564
554
  const res = await this._client.fetch({
565
- path: "/v1/rooms/".concat(roomId, "/waiting/users"),
555
+ path: `/v1/rooms/${roomId}/waiting/users`,
566
556
  method: 'DELETE',
567
557
  data: {
568
558
  toRoles
@@ -578,13 +568,13 @@ class FcrCoreServiceApi {
578
568
  payload
579
569
  } = _ref8;
580
570
  const res = await this._client.fetch({
581
- path: "/v1/rooms/".concat(roomId, "/security/chat/").concat(enable ? 1 : 0),
571
+ path: `/v1/rooms/${roomId}/security/chat/${enable ? 1 : 0}`,
582
572
  method: 'PUT',
583
573
  data: {
584
574
  targetRoles,
585
575
  payload: {
586
- public: (payload === null || payload === void 0 ? void 0 : payload.public) === undefined ? undefined : payload.public ? 1 : 0,
587
- private: (payload === null || payload === void 0 ? void 0 : payload.private) === undefined ? undefined : {
576
+ public: payload?.public === undefined ? undefined : payload.public ? 1 : 0,
577
+ private: payload?.private === undefined ? undefined : {
588
578
  host: payload.private.host ? 1 : 0,
589
579
  cohost: payload.private.cohost ? 1 : 0,
590
580
  participant: payload.private.participant ? 1 : 0
@@ -601,7 +591,7 @@ class FcrCoreServiceApi {
601
591
  targetRoles
602
592
  } = _ref9;
603
593
  const res = await this._client.fetch({
604
- path: "/v1/rooms/".concat(roomId, "/security/changeName/").concat(enable ? 1 : 0),
594
+ path: `/v1/rooms/${roomId}/security/changeName/${enable ? 1 : 0}`,
605
595
  method: 'PUT',
606
596
  data: {
607
597
  targetRoles
@@ -616,7 +606,7 @@ class FcrCoreServiceApi {
616
606
  targetRoles
617
607
  } = _ref10;
618
608
  const res = await this._client.fetch({
619
- path: "/v1/rooms/".concat(roomId, "/security/unmuteAudio/").concat(enable ? 1 : 0),
609
+ path: `/v1/rooms/${roomId}/security/unmuteAudio/${enable ? 1 : 0}`,
620
610
  method: 'PUT',
621
611
  data: {
622
612
  targetRoles
@@ -632,11 +622,13 @@ class FcrCoreServiceApi {
632
622
  payload
633
623
  } = params;
634
624
  const res = await this._client.fetch({
635
- path: "/v1/rooms/".concat(roomId, "/security/watermark/").concat(enable ? 1 : 0),
625
+ path: `/v1/rooms/${roomId}/security/watermark/${enable ? 1 : 0}`,
636
626
  method: 'PUT',
637
627
  data: {
638
628
  targetRoles,
639
- payload: _objectSpread({}, payload)
629
+ payload: {
630
+ ...payload
631
+ }
640
632
  }
641
633
  });
642
634
  return res.data;
@@ -648,7 +640,7 @@ class FcrCoreServiceApi {
648
640
  targetRoles
649
641
  } = params;
650
642
  const res = await this._client.fetch({
651
- path: "/v1/rooms/".concat(roomId, "/security/changeName/").concat(enable ? 1 : 0),
643
+ path: `/v1/rooms/${roomId}/security/changeName/${enable ? 1 : 0}`,
652
644
  method: 'PUT',
653
645
  data: {
654
646
  targetRoles
@@ -663,7 +655,7 @@ class FcrCoreServiceApi {
663
655
  targetRoles
664
656
  } = _ref11;
665
657
  const res = await this._client.fetch({
666
- path: "/v1/rooms/".concat(roomId, "/security/openVideo/").concat(enable ? 1 : 0),
658
+ path: `/v1/rooms/${roomId}/security/openVideo/${enable ? 1 : 0}`,
667
659
  method: 'PUT',
668
660
  data: {
669
661
  targetRoles
@@ -678,7 +670,7 @@ class FcrCoreServiceApi {
678
670
  targetRoles
679
671
  } = _ref12;
680
672
  const res = await this._client.fetch({
681
- path: "/v1/rooms/".concat(roomId, "/security/joinWithMuteAudio/").concat(enable ? 1 : 0),
673
+ path: `/v1/rooms/${roomId}/security/joinWithMuteAudio/${enable ? 1 : 0}`,
682
674
  method: 'PUT',
683
675
  data: {
684
676
  targetRoles
@@ -694,7 +686,7 @@ class FcrCoreServiceApi {
694
686
  userId
695
687
  } = _ref13;
696
688
  const res = await this._client.fetch({
697
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/role"),
689
+ path: `/v1/rooms/${roomId}/users/${userId}/role`,
698
690
  method: 'PUT',
699
691
  data: {
700
692
  remoteRole,
@@ -711,7 +703,7 @@ class FcrCoreServiceApi {
711
703
  userId
712
704
  } = _ref14;
713
705
  const res = await this._client.fetch({
714
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/role"),
706
+ path: `/v1/rooms/${roomId}/users/${userId}/role`,
715
707
  method: 'DELETE',
716
708
  data: {
717
709
  remoteRole,
@@ -722,14 +714,14 @@ class FcrCoreServiceApi {
722
714
  }
723
715
  async stopLiveStreaming(roomId) {
724
716
  const res = await this._client.fetch({
725
- path: "/v1/rooms/".concat(roomId, "/live/states/0"),
717
+ path: `/v1/rooms/${roomId}/live/states/0`,
726
718
  method: 'PUT'
727
719
  });
728
720
  return res;
729
721
  }
730
722
  async updateLiveStreamingLayout(roomId, layoutType) {
731
723
  const res = await this._client.fetch({
732
- path: "/v1/rooms/".concat(roomId, "/live/states/1"),
724
+ path: `/v1/rooms/${roomId}/live/states/1`,
733
725
  method: 'PATCH',
734
726
  data: {
735
727
  layoutType: layoutType
@@ -739,7 +731,7 @@ class FcrCoreServiceApi {
739
731
  }
740
732
  async startLiveStreaming(roomId, data) {
741
733
  const res = await this._client.fetch({
742
- path: "/v1/rooms/".concat(roomId, "/live/states/1"),
734
+ path: `/v1/rooms/${roomId}/live/states/1`,
743
735
  method: 'PUT',
744
736
  data: {
745
737
  streamUrl: data.pushStreamingUrl,
@@ -757,7 +749,7 @@ class FcrCoreServiceApi {
757
749
  ipAddress
758
750
  } = _ref15;
759
751
  const res = await this._client.fetch({
760
- path: "/v1/rooms/".concat(roomId, "/call/").concat(callType),
752
+ path: `/v1/rooms/${roomId}/call/${callType}`,
761
753
  method: 'POST',
762
754
  data: {
763
755
  ipAddress
@@ -773,7 +765,7 @@ class FcrCoreServiceApi {
773
765
  callNumber
774
766
  } = _ref16;
775
767
  const res = await this._client.fetch({
776
- path: "/v1/rooms/".concat(roomId, "/call/pstn"),
768
+ path: `/v1/rooms/${roomId}/call/pstn`,
777
769
  method: 'POST',
778
770
  data: {
779
771
  callNumber,
@@ -790,7 +782,7 @@ class FcrCoreServiceApi {
790
782
  callId
791
783
  } = _ref17;
792
784
  const res = await this._client.fetch({
793
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/call/").concat(callId),
785
+ path: `/v1/rooms/${roomId}/users/${userId}/call/${callId}`,
794
786
  method: 'DELETE'
795
787
  });
796
788
  return res;
@@ -805,7 +797,7 @@ class FcrCoreServiceApi {
805
797
  userId
806
798
  } = _ref18;
807
799
  return this._client.fetch({
808
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/widgets/netlessBoard/token"),
800
+ path: `/v1/rooms/${roomId}/users/${userId}/widgets/netlessBoard/token`,
809
801
  method: 'GET'
810
802
  });
811
803
  }
@@ -815,7 +807,7 @@ class FcrCoreServiceApi {
815
807
  */
816
808
  async toggleWhiteboardActivityState(roomId, state) {
817
809
  return this._client.fetch({
818
- path: "/v1/rooms/".concat(roomId, "/widgets/netlessBoard/states/").concat(state),
810
+ path: `/v1/rooms/${roomId}/widgets/netlessBoard/states/${state}`,
819
811
  method: 'PUT'
820
812
  });
821
813
  }
@@ -831,11 +823,13 @@ class FcrCoreServiceApi {
831
823
  payload
832
824
  } = params;
833
825
  return this._client.fetch({
834
- path: "/v1/rooms/".concat(roomId, "/security/sharing/").concat(enable ? 1 : 0),
826
+ path: `/v1/rooms/${roomId}/security/sharing/${enable ? 1 : 0}`,
835
827
  method: 'PUT',
836
828
  data: {
837
829
  targetRoles,
838
- payload: _objectSpread({}, payload)
830
+ payload: {
831
+ ...payload
832
+ }
839
833
  }
840
834
  });
841
835
  }
@@ -851,7 +845,7 @@ class FcrCoreServiceApi {
851
845
  data
852
846
  } = params;
853
847
  return this._client.fetch({
854
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/streams/screen/states/").concat(enable ? 1 : 0),
848
+ path: `/v1/rooms/${roomId}/users/${userId}/streams/screen/states/${enable ? 1 : 0}`,
855
849
  method: 'PUT',
856
850
  data
857
851
  });
@@ -866,7 +860,7 @@ class FcrCoreServiceApi {
866
860
  backgroundColor
867
861
  } = params;
868
862
  return this._client.fetch({
869
- path: "/v1/rooms/".concat(roomId, "/widgets/netlessBoard/info"),
863
+ path: `/v1/rooms/${roomId}/widgets/netlessBoard/info`,
870
864
  method: 'PUT',
871
865
  data: {
872
866
  backgroundColor
@@ -880,7 +874,7 @@ class FcrCoreServiceApi {
880
874
  config
881
875
  } = params;
882
876
  const res = this._client.fetch({
883
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/streams/screen/states/1"),
877
+ path: `/v1/rooms/${roomId}/users/${userId}/streams/screen/states/1`,
884
878
  method: 'PUT',
885
879
  data: config
886
880
  });
@@ -892,7 +886,7 @@ class FcrCoreServiceApi {
892
886
  userId
893
887
  } = params;
894
888
  const res = this._client.fetch({
895
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/streams/screen/states/0"),
889
+ path: `/v1/rooms/${roomId}/users/${userId}/streams/screen/states/0`,
896
890
  method: 'PUT'
897
891
  });
898
892
  return res;
@@ -903,7 +897,7 @@ class FcrCoreServiceApi {
903
897
  data
904
898
  } = params;
905
899
  const res = this._client.fetch({
906
- path: "/v1/rooms/".concat(roomId, "/interpreter/states/1"),
900
+ path: `/v1/rooms/${roomId}/interpreter/states/1`,
907
901
  method: 'PUT',
908
902
  data
909
903
  });
@@ -917,7 +911,7 @@ class FcrCoreServiceApi {
917
911
  roomId
918
912
  } = params;
919
913
  const res = this._client.fetch({
920
- path: "/v1/rooms/".concat(roomId, "/interpreter/states/0"),
914
+ path: `/v1/rooms/${roomId}/interpreter/states/0`,
921
915
  method: 'PUT',
922
916
  data: {}
923
917
  });
package/lib/type.js CHANGED
@@ -36,10 +36,12 @@ let FcrStreamState = exports.FcrStreamState = /*#__PURE__*/function (FcrStreamSt
36
36
  }({});
37
37
  let FcrCloudRecordingAudioProfile = exports.FcrCloudRecordingAudioProfile = /*#__PURE__*/function (FcrCloudRecordingAudioProfile) {
38
38
  FcrCloudRecordingAudioProfile[FcrCloudRecordingAudioProfile["DEFAULT"] = 0] = "DEFAULT";
39
+ // mono 48khz 48kbps
39
40
  FcrCloudRecordingAudioProfile[FcrCloudRecordingAudioProfile["MONO_48KHZ_128KBPS"] = 1] = "MONO_48KHZ_128KBPS";
40
- FcrCloudRecordingAudioProfile[FcrCloudRecordingAudioProfile["STEREO_48KHZ_192KBPS"] = 2] = "STEREO_48KHZ_192KBPS";
41
+ // mono 48khz 128kbps
42
+ FcrCloudRecordingAudioProfile[FcrCloudRecordingAudioProfile["STEREO_48KHZ_192KBPS"] = 2] = "STEREO_48KHZ_192KBPS"; // stereo 48khz 192kbps
41
43
  return FcrCloudRecordingAudioProfile;
42
- }({}); // stereo 48khz 192kbps
44
+ }({});
43
45
  let FcrUserRole = exports.FcrUserRole = /*#__PURE__*/function (FcrUserRole) {
44
46
  FcrUserRole[FcrUserRole["HOST"] = 1] = "HOST";
45
47
  FcrUserRole[FcrUserRole["COHOST"] = 2] = "COHOST";
@@ -5,9 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.iterateSet = exports.iterateMap = exports.convertToStructure = void 0;
7
7
  require("core-js/modules/es.array.push.js");
8
- require("core-js/modules/web.dom-collections.iterator.js");
9
8
  const iterateMap = (map, processors) => {
10
- const onFilter = (processors === null || processors === void 0 ? void 0 : processors.onFilter) || (() => true);
9
+ const onFilter = processors?.onFilter || (() => true);
11
10
  const {
12
11
  onMap,
13
12
  onReduce
@@ -27,7 +26,7 @@ const iterateMap = (map, processors) => {
27
26
  };
28
27
  exports.iterateMap = iterateMap;
29
28
  const iterateSet = (map, processors) => {
30
- const onFilter = (processors === null || processors === void 0 ? void 0 : processors.onFilter) || (() => true);
29
+ const onFilter = processors?.onFilter || (() => true);
31
30
  const {
32
31
  onMap,
33
32
  onReduce