fcr-core 3.10.5 → 3.10.6

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 (127) hide show
  1. package/lib/engine/index.js +108 -102
  2. package/lib/imports.js +0 -1
  3. package/lib/index.d.ts +1 -1
  4. package/lib/media-control/desktop.js +13 -22
  5. package/lib/media-control/mobile.js +13 -22
  6. package/lib/monitor-control/index.js +7 -17
  7. package/lib/peer-session/index.js +121 -120
  8. package/lib/plugins/chat/chatroom.js +96 -119
  9. package/lib/plugins/chat/connector.js +48 -69
  10. package/lib/remote-control/index.js +216 -194
  11. package/lib/room-control/ability-control/index.js +10 -20
  12. package/lib/room-control/application-control/index.js +75 -82
  13. package/lib/room-control/group-control/index.js +30 -31
  14. package/lib/room-control/helpers/board-init-info-helper.js +10 -16
  15. package/lib/room-control/helpers/validation-helper.js +1 -1
  16. package/lib/room-control/index.js +51 -70
  17. package/lib/room-control/infinity-room-control/index.js +19 -27
  18. package/lib/room-control/interpreter-control/index.js +65 -77
  19. package/lib/room-control/interpreter-control/room.js +4 -6
  20. package/lib/room-control/join-before-host-waitingroom-control/index.js +4 -6
  21. package/lib/room-control/mainroom-control/index.js +25 -37
  22. package/lib/room-control/privilege-control/helper.js +13 -28
  23. package/lib/room-control/privilege-control/index.js +28 -36
  24. package/lib/room-control/room-connector-control/index.js +47 -52
  25. package/lib/room-control/room-control-factory.js +12 -10
  26. package/lib/room-control/room-session/index.js +74 -77
  27. package/lib/room-control/shared-cache.js +56 -63
  28. package/lib/room-control/sharing-control/index.js +57 -65
  29. package/lib/room-control/stream-control/index.js +238 -203
  30. package/lib/room-control/stream-control/type.d.ts +11 -1
  31. package/lib/room-control/stt-control/de-compress-gzip.js +0 -10
  32. package/lib/room-control/stt-control/index.js +86 -93
  33. package/lib/room-control/user-control/index.js +155 -162
  34. package/lib/room-control/waitingroom-control/index.js +9 -18
  35. package/lib/room-control/whiteboard-control/utils.js +2 -4
  36. package/lib/room-control/whiteboard-control-v1/board-subwindow.js +1 -2
  37. package/lib/room-control/whiteboard-control-v1/board-window.js +103 -120
  38. package/lib/room-control/whiteboard-control-v1/factory.js +4 -7
  39. package/lib/room-control/whiteboard-control-v1/index.js +67 -80
  40. package/lib/room-control/whiteboard-control-v1/mount-manager.js +2 -4
  41. package/lib/room-control/whiteboard-control-v1/utils.js +14 -17
  42. package/lib/room-control/whiteboard-control-v2/annotation-control/control.js +10 -14
  43. package/lib/room-control/whiteboard-control-v2/annotation-control/factory.js +8 -17
  44. package/lib/room-control/whiteboard-control-v2/base/index.js +53 -61
  45. package/lib/room-control/whiteboard-control-v2/base/main-window.js +30 -39
  46. package/lib/room-control/whiteboard-control-v2/utils.js +10 -10
  47. package/lib/room-control/whiteboard-control-v2/whiteboard-control/control.js +33 -45
  48. package/lib/room-control/whiteboard-control-v2/whiteboard-control/factory.js +11 -27
  49. package/lib/room-control/widget-control/index.js +33 -43
  50. package/lib/room-router/index.js +58 -66
  51. package/lib/service/api.js +548 -446
  52. package/lib/struct.js +2 -5
  53. package/lib/type.d.ts +1 -1
  54. package/lib/utilities/abortable-retry.js +0 -3
  55. package/lib/utilities/collection.js +11 -15
  56. package/lib/utilities/error-helpers.js +27 -34
  57. package/lib/utilities/error.js +3 -4
  58. package/lib/utilities/join-helper.js +31 -37
  59. package/lib/utilities/logger.js +5 -8
  60. package/lib/utilities/parameters.js +10 -21
  61. package/lib/utilities/retry-helpers.js +0 -1
  62. package/lib/utilities/stream.js +11 -16
  63. package/lib/utilities/user.js +3 -4
  64. package/lib/utilities/validate-params.js +1 -1
  65. package/lib/utilities/video-encoder-config.js +5 -10
  66. package/lib-es/engine/index.js +108 -102
  67. package/lib-es/media-control/desktop.js +13 -22
  68. package/lib-es/media-control/mobile.js +13 -22
  69. package/lib-es/monitor-control/index.js +7 -16
  70. package/lib-es/peer-session/index.js +121 -120
  71. package/lib-es/plugins/chat/chatroom.js +95 -118
  72. package/lib-es/plugins/chat/connector.js +47 -67
  73. package/lib-es/remote-control/index.js +216 -194
  74. package/lib-es/room-control/ability-control/index.js +10 -19
  75. package/lib-es/room-control/application-control/index.js +75 -81
  76. package/lib-es/room-control/group-control/index.js +30 -31
  77. package/lib-es/room-control/helpers/board-init-info-helper.js +10 -15
  78. package/lib-es/room-control/helpers/validation-helper.js +1 -1
  79. package/lib-es/room-control/index.js +51 -69
  80. package/lib-es/room-control/infinity-room-control/index.js +19 -26
  81. package/lib-es/room-control/interpreter-control/index.js +65 -77
  82. package/lib-es/room-control/interpreter-control/room.js +4 -5
  83. package/lib-es/room-control/join-before-host-waitingroom-control/index.js +4 -5
  84. package/lib-es/room-control/mainroom-control/index.js +25 -37
  85. package/lib-es/room-control/privilege-control/helper.js +13 -27
  86. package/lib-es/room-control/privilege-control/index.js +28 -36
  87. package/lib-es/room-control/room-connector-control/index.js +47 -52
  88. package/lib-es/room-control/room-control-factory.js +12 -10
  89. package/lib-es/room-control/room-session/index.js +74 -77
  90. package/lib-es/room-control/shared-cache.js +56 -62
  91. package/lib-es/room-control/sharing-control/index.js +57 -64
  92. package/lib-es/room-control/stream-control/index.js +240 -205
  93. package/lib-es/room-control/stt-control/de-compress-gzip.js +0 -10
  94. package/lib-es/room-control/stt-control/index.js +86 -93
  95. package/lib-es/room-control/user-control/index.js +155 -162
  96. package/lib-es/room-control/waitingroom-control/index.js +9 -18
  97. package/lib-es/room-control/whiteboard-control/utils.js +2 -4
  98. package/lib-es/room-control/whiteboard-control-v1/board-subwindow.js +1 -2
  99. package/lib-es/room-control/whiteboard-control-v1/board-window.js +103 -120
  100. package/lib-es/room-control/whiteboard-control-v1/factory.js +4 -6
  101. package/lib-es/room-control/whiteboard-control-v1/index.js +67 -80
  102. package/lib-es/room-control/whiteboard-control-v1/mount-manager.js +2 -3
  103. package/lib-es/room-control/whiteboard-control-v1/utils.js +14 -17
  104. package/lib-es/room-control/whiteboard-control-v2/annotation-control/control.js +10 -13
  105. package/lib-es/room-control/whiteboard-control-v2/annotation-control/factory.js +8 -16
  106. package/lib-es/room-control/whiteboard-control-v2/base/index.js +53 -60
  107. package/lib-es/room-control/whiteboard-control-v2/base/main-window.js +30 -39
  108. package/lib-es/room-control/whiteboard-control-v2/utils.js +10 -10
  109. package/lib-es/room-control/whiteboard-control-v2/whiteboard-control/control.js +33 -45
  110. package/lib-es/room-control/whiteboard-control-v2/whiteboard-control/factory.js +11 -26
  111. package/lib-es/room-control/widget-control/index.js +33 -42
  112. package/lib-es/room-router/index.js +58 -66
  113. package/lib-es/service/api.js +548 -445
  114. package/lib-es/struct.js +2 -4
  115. package/lib-es/utilities/abortable-retry.js +0 -3
  116. package/lib-es/utilities/collection.js +11 -14
  117. package/lib-es/utilities/error-helpers.js +26 -33
  118. package/lib-es/utilities/error.js +3 -4
  119. package/lib-es/utilities/join-helper.js +29 -36
  120. package/lib-es/utilities/logger.js +5 -7
  121. package/lib-es/utilities/parameters.js +10 -21
  122. package/lib-es/utilities/retry-helpers.js +0 -1
  123. package/lib-es/utilities/stream.js +11 -15
  124. package/lib-es/utilities/user.js +3 -4
  125. package/lib-es/utilities/validate-params.js +1 -1
  126. package/lib-es/utilities/video-encoder-config.js +5 -10
  127. package/package.json +4 -4
@@ -1,31 +1,23 @@
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("./type");
16
11
  var _type2 = require("../room-control/privilege-control/type");
17
12
  var _type3 = require("../room-control/user-control/type");
18
13
  var _logger = require("../utilities/logger");
19
- 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; }
20
- 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; }
21
14
  class FcrCoreServiceApi {
22
- constructor(_client, appId, region) {
23
- let pathIncludeRegion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
24
- (0, _defineProperty2.default)(this, "logger", (0, _logger.getLogger)());
15
+ logger = (0, _logger.getLogger)();
16
+ constructor(_client, appId, region, pathIncludeRegion = true) {
25
17
  this._client = _client;
26
- let pathPrefix = "/conference/apps/".concat(appId);
18
+ let pathPrefix = `/conference/apps/${appId}`;
27
19
  if (pathIncludeRegion) {
28
- pathPrefix = "/".concat((0, _imports.toLower)(region)).concat(pathPrefix);
20
+ pathPrefix = `/${(0, _imports.toLower)(region)}${pathPrefix}`;
29
21
  }
30
22
  this.logger.info('set path prefix for Core Service API:', pathPrefix);
31
23
  this._pathPrefix = pathPrefix;
@@ -36,105 +28,112 @@ class FcrCoreServiceApi {
36
28
  this._client.setPathPrefix(this._pathPrefix);
37
29
  }
38
30
  async addGroups(params, opts) {
39
- const _await$this$_client$f = await this._client.fetch({
40
- path: "/v2/rooms/".concat(opts.roomId, "/groups"),
41
- method: 'PUT',
42
- data: {
43
- groups: params.map(group => {
44
- return {
45
- groupName: group.groupName,
46
- users: group.userList,
47
- createGroupRequest: opts.startTime ? {
48
- roomProperties: {
49
- schedule: {
50
- startTime: opts.startTime
51
- }
31
+ const {
32
+ data
33
+ } = await this._client.fetch({
34
+ path: `/v2/rooms/${opts.roomId}/groups`,
35
+ method: 'PUT',
36
+ data: {
37
+ groups: params.map(group => {
38
+ return {
39
+ groupName: group.groupName,
40
+ users: group.userList,
41
+ createGroupRequest: opts.startTime ? {
42
+ roomProperties: {
43
+ schedule: {
44
+ startTime: opts.startTime
52
45
  }
53
- } : undefined
54
- };
55
- })
56
- }
57
- }),
58
- data = _await$this$_client$f.data;
46
+ }
47
+ } : undefined
48
+ };
49
+ })
50
+ }
51
+ });
59
52
  }
60
53
  async updateGroups(params, opts) {
61
- const _await$this$_client$f2 = await this._client.fetch({
62
- path: "/v2/rooms/".concat(opts.roomId, "/groups/info"),
63
- method: 'PATCH',
64
- data: {
65
- groups: params.map(group => {
66
- return {
67
- groupUuid: group.groupId,
68
- groupName: group.groupName
69
- };
70
- })
71
- }
72
- }),
73
- data = _await$this$_client$f2.data;
54
+ const {
55
+ data
56
+ } = await this._client.fetch({
57
+ path: `/v2/rooms/${opts.roomId}/groups/info`,
58
+ method: 'PATCH',
59
+ data: {
60
+ groups: params.map(group => {
61
+ return {
62
+ groupUuid: group.groupId,
63
+ groupName: group.groupName
64
+ };
65
+ })
66
+ }
67
+ });
74
68
  }
75
69
  async deleteGroups(groupIds, opts) {
76
- const _await$this$_client$f3 = await this._client.fetch({
77
- path: "/v2/rooms/".concat(opts.roomId, "/groups/states/1"),
78
- method: 'DELETE',
79
- data: {
80
- removeGroupUuids: groupIds
81
- }
82
- }),
83
- data = _await$this$_client$f3.data;
70
+ const {
71
+ data
72
+ } = await this._client.fetch({
73
+ path: `/v2/rooms/${opts.roomId}/groups/states/1`,
74
+ method: 'DELETE',
75
+ data: {
76
+ removeGroupUuids: groupIds
77
+ }
78
+ });
84
79
  }
85
80
  async deleteAllGroups(opts) {
86
- const _await$this$_client$f4 = await this._client.fetch({
87
- path: "/v2/rooms/".concat(opts.roomId, "/groups/all"),
88
- method: 'DELETE'
89
- }),
90
- data = _await$this$_client$f4.data;
81
+ const {
82
+ data
83
+ } = await this._client.fetch({
84
+ path: `/v2/rooms/${opts.roomId}/groups/all`,
85
+ method: 'DELETE'
86
+ });
91
87
  }
92
88
  async addUsers(userList, groupId, opts) {
93
- const _await$this$_client$f5 = await this._client.fetch({
94
- path: "/v2/rooms/".concat(opts.roomId, "/groups/users"),
95
- method: 'PATCH',
96
- data: {
97
- groups: [{
98
- groupUuid: groupId,
99
- addUsers: userList
100
- }],
101
- inProgress: opts.inProgress
102
- }
103
- }),
104
- data = _await$this$_client$f5.data;
89
+ const {
90
+ data
91
+ } = await this._client.fetch({
92
+ path: `/v2/rooms/${opts.roomId}/groups/users`,
93
+ method: 'PATCH',
94
+ data: {
95
+ groups: [{
96
+ groupUuid: groupId,
97
+ addUsers: userList
98
+ }],
99
+ inProgress: opts.inProgress
100
+ }
101
+ });
105
102
  }
106
103
  async removeUsers(userList, groupId, opts) {
107
- const _await$this$_client$f6 = await this._client.fetch({
108
- path: "/v2/rooms/".concat(opts.roomId, "/groups/users"),
109
- method: 'PATCH',
110
- data: {
111
- groups: [{
112
- groupUuid: groupId,
113
- removeUsers: userList
114
- }],
115
- inProgress: opts.inProgress
116
- }
117
- }),
118
- data = _await$this$_client$f6.data;
104
+ const {
105
+ data
106
+ } = await this._client.fetch({
107
+ path: `/v2/rooms/${opts.roomId}/groups/users`,
108
+ method: 'PATCH',
109
+ data: {
110
+ groups: [{
111
+ groupUuid: groupId,
112
+ removeUsers: userList
113
+ }],
114
+ inProgress: opts.inProgress
115
+ }
116
+ });
119
117
  }
120
118
  async moveUsers(userList, fromGroupId, toGroupId, opts) {
121
- const _await$this$_client$f7 = await this._client.fetch({
122
- path: "/v2/rooms/".concat(opts.roomId, "/groups/users"),
123
- method: 'PATCH',
124
- data: {
125
- groups: [{
126
- groupUuid: toGroupId,
127
- addUsers: userList
128
- }],
129
- inProgress: opts.inProgress
130
- }
131
- }),
132
- data = _await$this$_client$f7.data;
119
+ const {
120
+ data
121
+ } = await this._client.fetch({
122
+ path: `/v2/rooms/${opts.roomId}/groups/users`,
123
+ method: 'PATCH',
124
+ data: {
125
+ groups: [{
126
+ groupUuid: toGroupId,
127
+ addUsers: userList
128
+ }],
129
+ inProgress: opts.inProgress
130
+ }
131
+ });
133
132
  }
134
133
  /*** merge audio ****/
135
134
  async mergeAudioStream(userId, opts) {
136
135
  const res = await this._client.fetch({
137
- path: "/v1/rooms/".concat(opts.roomId, "/users/").concat(userId, "/call/merge"),
136
+ path: `/v1/rooms/${opts.roomId}/users/${userId}/call/merge`,
138
137
  method: 'PUT',
139
138
  data: {}
140
139
  });
@@ -143,7 +142,7 @@ class FcrCoreServiceApi {
143
142
  /*** split audio ****/
144
143
  async splitAudioStream(userId, opts) {
145
144
  const res = await this._client.fetch({
146
- path: "/v1/rooms/".concat(opts.roomId, "/users/").concat(userId, "/call/split"),
145
+ path: `/v1/rooms/${opts.roomId}/users/${userId}/call/split`,
147
146
  method: 'PUT',
148
147
  data: {}
149
148
  });
@@ -156,7 +155,7 @@ class FcrCoreServiceApi {
156
155
  body.duration = -1;
157
156
  }
158
157
  return this._client.fetch({
159
- path: "/v1/rooms/".concat(opts.roomId, "/users/").concat(userId, "/ban/").concat(type === _type3.FcrUserKickedOutType.Forever ? 1 : 0),
158
+ path: `/v1/rooms/${opts.roomId}/users/${userId}/ban/${type === _type3.FcrUserKickedOutType.Forever ? 1 : 0}`,
160
159
  method: 'PUT',
161
160
  data: body
162
161
  });
@@ -168,12 +167,13 @@ class FcrCoreServiceApi {
168
167
  if (type === _type3.FcrUserKickedOutType.Forever) {
169
168
  body.duration = -1;
170
169
  }
171
- const _await$this$_client$f8 = await this._client.fetch({
172
- path: "/v1/rooms/".concat(opts.roomId, "/users/ban/").concat(type === _type3.FcrUserKickedOutType.Forever ? 1 : 0),
173
- method: 'PUT',
174
- data: body
175
- }),
176
- data = _await$this$_client$f8.data;
170
+ const {
171
+ data
172
+ } = await this._client.fetch({
173
+ path: `/v1/rooms/${opts.roomId}/users/ban/${type === _type3.FcrUserKickedOutType.Forever ? 1 : 0}`,
174
+ method: 'PUT',
175
+ data: body
176
+ });
177
177
  }
178
178
  async kickOutByUserIds(userId, type, opts) {
179
179
  const body = {
@@ -182,36 +182,37 @@ class FcrCoreServiceApi {
182
182
  if (type === _type3.FcrUserKickedOutType.Forever) {
183
183
  body.duration = -1;
184
184
  }
185
- const _await$this$_client$f9 = await this._client.fetch({
186
- path: "/v1/rooms/".concat(opts.roomId, "/users/ban/").concat(type === _type3.FcrUserKickedOutType.Forever ? 1 : 0),
187
- method: 'PUT',
188
- data: body
189
- }),
190
- data = _await$this$_client$f9.data;
185
+ const {
186
+ data
187
+ } = await this._client.fetch({
188
+ path: `/v1/rooms/${opts.roomId}/users/ban/${type === _type3.FcrUserKickedOutType.Forever ? 1 : 0}`,
189
+ method: 'PUT',
190
+ data: body
191
+ });
191
192
  }
192
193
 
193
194
  /** room control **/
194
195
  async startRoom(roomId) {
195
196
  return this._client.fetch({
196
- path: "/v1/rooms/".concat(roomId, "/states/1"),
197
+ path: `/v1/rooms/${roomId}/states/1`,
197
198
  method: 'PUT'
198
199
  });
199
200
  }
200
201
  async endRoom(roomId) {
201
202
  return this._client.fetch({
202
- path: "/v1/rooms/".concat(roomId, "/states/2"),
203
+ path: `/v1/rooms/${roomId}/states/2`,
203
204
  method: 'PUT'
204
205
  });
205
206
  }
206
207
  async closeRoom(roomId) {
207
208
  return this._client.fetch({
208
- path: "/v1/rooms/".concat(roomId, "/states/3"),
209
+ path: `/v1/rooms/${roomId}/states/3`,
209
210
  method: 'PUT'
210
211
  });
211
212
  }
212
213
  async startCloudRecording(config, roomId) {
213
214
  return this._client.fetch({
214
- path: "/v1/rooms/".concat(roomId, "/records/states/1"),
215
+ path: `/v1/rooms/${roomId}/records/states/1`,
215
216
  method: 'PUT',
216
217
  data: {
217
218
  mode: 'web',
@@ -228,7 +229,7 @@ class FcrCoreServiceApi {
228
229
  }
229
230
  async pauseCloudRecording(roomId) {
230
231
  return this._client.fetch({
231
- path: "/v1/rooms/".concat(roomId, "/records/states/1"),
232
+ path: `/v1/rooms/${roomId}/records/states/1`,
232
233
  method: 'PATCH',
233
234
  data: {
234
235
  mode: 'web',
@@ -240,7 +241,7 @@ class FcrCoreServiceApi {
240
241
  }
241
242
  async resumeCloudRecording(roomId) {
242
243
  return this._client.fetch({
243
- path: "/v1/rooms/".concat(roomId, "/records/states/1"),
244
+ path: `/v1/rooms/${roomId}/records/states/1`,
244
245
  method: 'PATCH',
245
246
  data: {
246
247
  webRecordConfig: {
@@ -251,13 +252,13 @@ class FcrCoreServiceApi {
251
252
  }
252
253
  async stopCloudRecording(roomId) {
253
254
  return this._client.fetch({
254
- path: "/v1/rooms/".concat(roomId, "/records/states/0"),
255
+ path: `/v1/rooms/${roomId}/records/states/0`,
255
256
  method: 'PUT'
256
257
  });
257
258
  }
258
259
  async setCloudRecordingReady(roomId) {
259
260
  return this._client.fetch({
260
- path: "/v1/rooms/".concat(roomId, "/records/ready"),
261
+ path: `/v1/rooms/${roomId}/records/ready`,
261
262
  method: 'PUT'
262
263
  });
263
264
  }
@@ -280,7 +281,7 @@ class FcrCoreServiceApi {
280
281
  /** room session */
281
282
  async updateRoomSession(params) {
282
283
  return this._client.fetch({
283
- path: "/v1/users/".concat(params.userId, "/sessions/").concat(params.sessionKey, "/").concat(params.sessionId),
284
+ path: `/v1/users/${params.userId}/sessions/${params.sessionKey}/${params.sessionId}`,
284
285
  method: 'PUT',
285
286
  data: {
286
287
  target: params.target || 1,
@@ -295,7 +296,7 @@ class FcrCoreServiceApi {
295
296
  }
296
297
  async deleteRoomSession(params) {
297
298
  return this._client.fetch({
298
- path: "/v1/users/".concat(params.userId, "/sessions/").concat(params.sessionKey, "/").concat(params.sessionId),
299
+ path: `/v1/users/${params.userId}/sessions/${params.sessionKey}/${params.sessionId}`,
299
300
  method: 'DELETE',
300
301
  data: {
301
302
  target: params.target,
@@ -309,7 +310,7 @@ class FcrCoreServiceApi {
309
310
  /** peer session */
310
311
  async updatePeerSession(params) {
311
312
  return this._client.fetch({
312
- path: "/v1/users/".concat(params.userId, "/sessions/").concat(params.sessionKey, "/").concat(params.sessionId),
313
+ path: `/v1/users/${params.userId}/sessions/${params.sessionKey}/${params.sessionId}`,
313
314
  method: 'PUT',
314
315
  data: {
315
316
  target: 2,
@@ -323,7 +324,7 @@ class FcrCoreServiceApi {
323
324
  }
324
325
  async deletePeerSession(params) {
325
326
  return this._client.fetch({
326
- path: "/v1/users/".concat(params.userId, "/sessions/").concat(params.sessionKey, "/").concat(params.sessionId),
327
+ path: `/v1/users/${params.userId}/sessions/${params.sessionKey}/${params.sessionId}`,
327
328
  method: 'DELETE',
328
329
  data: {
329
330
  target: 2,
@@ -334,63 +335,67 @@ class FcrCoreServiceApi {
334
335
  });
335
336
  }
336
337
  async checkIn(params) {
337
- const _await$this$_client$f0 = await this._client.fetch({
338
- path: "/v1/rooms/".concat(params.roomId, "/users/").concat(params.userId, "/entry"),
339
- method: 'POST',
340
- data: {
341
- password: params.password,
342
- stream: params.stream,
343
- streams: params.streams,
344
- platform: params.platform,
345
- role: params.userRole,
346
- userName: params.userName,
347
- userProperties: params.userProperties,
348
- version: params.version,
349
- bypass: params.bypass,
350
- avatar: params.avatar
351
- },
352
- retryFallbackDomainsWhenFail: true,
353
- maxRetryTimes: 10
354
- }),
355
- data = _await$this$_client$f0.data,
356
- ts = _await$this$_client$f0.ts;
338
+ const {
339
+ data,
340
+ ts
341
+ } = await this._client.fetch({
342
+ path: `/v1/rooms/${params.roomId}/users/${params.userId}/entry`,
343
+ method: 'POST',
344
+ data: {
345
+ password: params.password,
346
+ stream: params.stream,
347
+ streams: params.streams,
348
+ platform: params.platform,
349
+ role: params.userRole,
350
+ userName: params.userName,
351
+ userProperties: params.userProperties,
352
+ version: params.version,
353
+ bypass: params.bypass,
354
+ avatar: params.avatar
355
+ },
356
+ retryFallbackDomainsWhenFail: true,
357
+ maxRetryTimes: 10
358
+ });
357
359
  return {
358
360
  data,
359
361
  ts
360
362
  };
361
363
  }
362
364
  async checkInInternal(params) {
363
- const _await$this$_client$f1 = await this._client.fetch({
364
- path: "/v1/rooms/".concat(params.roomId, "/users/").concat(params.userId, "/internal/entry"),
365
- method: 'POST',
366
- data: {
367
- password: params.password,
368
- stream: params.stream,
369
- streams: params.streams,
370
- platform: params.platform,
371
- role: params.userRole,
372
- userName: params.userName,
373
- userProperties: params.userProperties,
374
- version: params.version,
375
- ticket: params.ticket,
376
- bypass: params.bypass
377
- },
378
- retryFallbackDomainsWhenFail: true,
379
- maxRetryTimes: 10
380
- }),
381
- data = _await$this$_client$f1.data,
382
- ts = _await$this$_client$f1.ts;
365
+ const {
366
+ data,
367
+ ts
368
+ } = await this._client.fetch({
369
+ path: `/v1/rooms/${params.roomId}/users/${params.userId}/internal/entry`,
370
+ method: 'POST',
371
+ data: {
372
+ password: params.password,
373
+ stream: params.stream,
374
+ streams: params.streams,
375
+ platform: params.platform,
376
+ role: params.userRole,
377
+ userName: params.userName,
378
+ userProperties: params.userProperties,
379
+ version: params.version,
380
+ ticket: params.ticket,
381
+ bypass: params.bypass
382
+ },
383
+ retryFallbackDomainsWhenFail: true,
384
+ maxRetryTimes: 10
385
+ });
383
386
  return {
384
387
  data,
385
388
  ts
386
389
  };
387
390
  }
388
391
  async updateUserName(params) {
389
- const userName = params.userName,
390
- roomId = params.roomId,
391
- userId = params.userId;
392
+ const {
393
+ userName,
394
+ roomId,
395
+ userId
396
+ } = params;
392
397
  const res = await this._client.fetch({
393
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/info"),
398
+ path: `/v1/rooms/${roomId}/users/${userId}/info`,
394
399
  method: 'PATCH',
395
400
  data: {
396
401
  userName
@@ -398,67 +403,71 @@ class FcrCoreServiceApi {
398
403
  });
399
404
  return res.data;
400
405
  }
401
- async updateUserProperties(_ref) {
402
- let roomId = _ref.roomId,
403
- userUuid = _ref.userUuid,
404
- properties = _ref.properties,
405
- increments = _ref.increments,
406
- cause = _ref.cause;
406
+ async updateUserProperties({
407
+ roomId,
408
+ userUuid,
409
+ properties,
410
+ increments,
411
+ cause
412
+ }) {
407
413
  const data = {
408
414
  properties,
409
415
  cause,
410
416
  increments
411
417
  };
412
418
  const res = await this._client.fetch({
413
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userUuid, "/properties"),
419
+ path: `/v1/rooms/${roomId}/users/${userUuid}/properties`,
414
420
  method: 'PUT',
415
421
  data: data
416
422
  });
417
423
  return res.data;
418
424
  }
419
- async deleteUserProperties(_ref2) {
420
- let roomId = _ref2.roomId,
421
- userUuid = _ref2.userUuid,
422
- properties = _ref2.properties,
423
- cause = _ref2.cause;
425
+ async deleteUserProperties({
426
+ roomId,
427
+ userUuid,
428
+ properties,
429
+ cause
430
+ }) {
424
431
  const data = {
425
432
  properties,
426
433
  cause
427
434
  };
428
435
  const res = await this._client.fetch({
429
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userUuid, "/properties"),
436
+ path: `/v1/rooms/${roomId}/users/${userUuid}/properties`,
430
437
  method: 'DELETE',
431
438
  data: data
432
439
  });
433
440
  return res.data;
434
441
  }
435
- async updateRoomProperties(_ref3) {
436
- let roomId = _ref3.roomId,
437
- properties = _ref3.properties,
438
- increments = _ref3.increments,
439
- cause = _ref3.cause;
442
+ async updateRoomProperties({
443
+ roomId,
444
+ properties,
445
+ increments,
446
+ cause
447
+ }) {
440
448
  const data = {
441
449
  properties,
442
450
  cause,
443
451
  increments
444
452
  };
445
453
  const res = await this._client.fetch({
446
- path: "/v1/rooms/".concat(roomId, "/properties"),
454
+ path: `/v1/rooms/${roomId}/properties`,
447
455
  method: 'PUT',
448
456
  data: data
449
457
  });
450
458
  return res.data;
451
459
  }
452
- async deleteRoomProperties(_ref4) {
453
- let roomId = _ref4.roomId,
454
- properties = _ref4.properties,
455
- cause = _ref4.cause;
460
+ async deleteRoomProperties({
461
+ roomId,
462
+ properties,
463
+ cause
464
+ }) {
456
465
  const data = {
457
466
  properties,
458
467
  cause
459
468
  };
460
469
  const res = await this._client.fetch({
461
- path: "/v1/rooms/".concat(roomId, "/properties"),
470
+ path: `/v1/rooms/${roomId}/properties`,
462
471
  method: 'DELETE',
463
472
  data: data
464
473
  });
@@ -466,24 +475,25 @@ class FcrCoreServiceApi {
466
475
  }
467
476
  async getChatRoomToken(roomId, userId) {
468
477
  const res = await this._client.fetch({
469
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/widgets/easemobIM/token"),
478
+ path: `/v1/rooms/${roomId}/users/${userId}/widgets/easemobIM/token`,
470
479
  method: 'GET'
471
480
  });
472
481
  return res.data;
473
482
  }
474
483
  async getUserToken(userId) {
475
484
  const res = await this._client.fetch({
476
- path: "/v1/users/".concat(userId, "/widgets/easemobIM/token"),
485
+ path: `/v1/users/${userId}/widgets/easemobIM/token`,
477
486
  method: 'GET'
478
487
  });
479
488
  return res.data;
480
489
  }
481
- async enableLockedRoom(_ref5) {
482
- let roomId = _ref5.roomId,
483
- enable = _ref5.enable,
484
- targetRoles = _ref5.targetRoles;
490
+ async enableLockedRoom({
491
+ roomId,
492
+ enable,
493
+ targetRoles
494
+ }) {
485
495
  const res = await this._client.fetch({
486
- path: "/v1/rooms/".concat(roomId, "/lock/").concat(enable ? 1 : 0),
496
+ path: `/v1/rooms/${roomId}/lock/${enable ? 1 : 0}`,
487
497
  method: 'PUT',
488
498
  data: {
489
499
  targetRoles: targetRoles.map(role => _type2.FcrPrivilegeUserRoleToStringMap[role])
@@ -491,12 +501,13 @@ class FcrCoreServiceApi {
491
501
  });
492
502
  return res.data;
493
503
  }
494
- async enablePassword(_ref6) {
495
- let roomId = _ref6.roomId,
496
- enable = _ref6.enable,
497
- password = _ref6.password;
504
+ async enablePassword({
505
+ roomId,
506
+ enable,
507
+ password
508
+ }) {
498
509
  const res = await this._client.fetch({
499
- path: "/v1/rooms/".concat(roomId, "/password/").concat(enable ? 1 : 0),
510
+ path: `/v1/rooms/${roomId}/password/${enable ? 1 : 0}`,
500
511
  method: 'PUT',
501
512
  data: {
502
513
  password
@@ -504,18 +515,19 @@ class FcrCoreServiceApi {
504
515
  });
505
516
  return res.data;
506
517
  }
507
- async enableWaitingRoom(_ref7) {
508
- let roomId = _ref7.roomId,
509
- enable = _ref7.enable;
518
+ async enableWaitingRoom({
519
+ roomId,
520
+ enable
521
+ }) {
510
522
  const res = await this._client.fetch({
511
- path: "/v1/rooms/".concat(roomId, "/waiting/").concat(enable ? 1 : 0),
523
+ path: `/v1/rooms/${roomId}/waiting/${enable ? 1 : 0}`,
512
524
  method: 'PUT'
513
525
  });
514
526
  return res.data;
515
527
  }
516
528
  async moveToWaitingRoomByUserIds(userIds, roomId) {
517
529
  const res = await this._client.fetch({
518
- path: "/v1/rooms/".concat(roomId, "/waiting/users"),
530
+ path: `/v1/rooms/${roomId}/waiting/users`,
519
531
  method: 'PUT',
520
532
  data: {
521
533
  toUserUuids: userIds
@@ -525,7 +537,7 @@ class FcrCoreServiceApi {
525
537
  }
526
538
  async moveToWaitingRoomByUserRoles(toRoles, roomId) {
527
539
  const res = await this._client.fetch({
528
- path: "/v1/rooms/".concat(roomId, "/waiting/users"),
540
+ path: `/v1/rooms/${roomId}/waiting/users`,
529
541
  method: 'PUT',
530
542
  data: {
531
543
  toRoles
@@ -535,7 +547,7 @@ class FcrCoreServiceApi {
535
547
  }
536
548
  async moveToMainRoomByUserIds(userIds, roomId) {
537
549
  const res = await this._client.fetch({
538
- path: "/v1/rooms/".concat(roomId, "/waiting/users"),
550
+ path: `/v1/rooms/${roomId}/waiting/users`,
539
551
  method: 'DELETE',
540
552
  data: {
541
553
  toUserUuids: userIds
@@ -545,7 +557,7 @@ class FcrCoreServiceApi {
545
557
  }
546
558
  async moveToMainRoomByUserRoles(toRoles, roomId) {
547
559
  const res = await this._client.fetch({
548
- path: "/v1/rooms/".concat(roomId, "/waiting/users"),
560
+ path: `/v1/rooms/${roomId}/waiting/users`,
549
561
  method: 'DELETE',
550
562
  data: {
551
563
  toRoles
@@ -553,19 +565,20 @@ class FcrCoreServiceApi {
553
565
  });
554
566
  return res.data;
555
567
  }
556
- async allowSendChat(_ref8) {
557
- let roomId = _ref8.roomId,
558
- enable = _ref8.enable,
559
- targetRoles = _ref8.targetRoles,
560
- payload = _ref8.payload;
568
+ async allowSendChat({
569
+ roomId,
570
+ enable,
571
+ targetRoles,
572
+ payload
573
+ }) {
561
574
  const res = await this._client.fetch({
562
- path: "/v1/rooms/".concat(roomId, "/security/chat/").concat(enable ? 1 : 0),
575
+ path: `/v1/rooms/${roomId}/security/chat/${enable ? 1 : 0}`,
563
576
  method: 'PUT',
564
577
  data: {
565
578
  targetRoles,
566
579
  payload: {
567
- public: (payload === null || payload === void 0 ? void 0 : payload.public) === undefined ? undefined : payload.public ? 1 : 0,
568
- private: (payload === null || payload === void 0 ? void 0 : payload.private) === undefined ? undefined : {
580
+ public: payload?.public === undefined ? undefined : payload.public ? 1 : 0,
581
+ private: payload?.private === undefined ? undefined : {
569
582
  host: payload.private.host ? 1 : 0,
570
583
  cohost: payload.private.cohost ? 1 : 0,
571
584
  participant: payload.private.participant ? 1 : 0
@@ -575,12 +588,13 @@ class FcrCoreServiceApi {
575
588
  });
576
589
  return res.data;
577
590
  }
578
- async allowChangeName(_ref9) {
579
- let roomId = _ref9.roomId,
580
- enable = _ref9.enable,
581
- targetRoles = _ref9.targetRoles;
591
+ async allowChangeName({
592
+ roomId,
593
+ enable,
594
+ targetRoles
595
+ }) {
582
596
  const res = await this._client.fetch({
583
- path: "/v1/rooms/".concat(roomId, "/security/changeName/").concat(enable ? 1 : 0),
597
+ path: `/v1/rooms/${roomId}/security/changeName/${enable ? 1 : 0}`,
584
598
  method: 'PUT',
585
599
  data: {
586
600
  targetRoles
@@ -588,12 +602,13 @@ class FcrCoreServiceApi {
588
602
  });
589
603
  return res.data;
590
604
  }
591
- async allowStartAudio(_ref0) {
592
- let roomId = _ref0.roomId,
593
- enable = _ref0.enable,
594
- targetRoles = _ref0.targetRoles;
605
+ async allowStartAudio({
606
+ roomId,
607
+ enable,
608
+ targetRoles
609
+ }) {
595
610
  const res = await this._client.fetch({
596
- path: "/v1/rooms/".concat(roomId, "/security/unmuteAudio/").concat(enable ? 1 : 0),
611
+ path: `/v1/rooms/${roomId}/security/unmuteAudio/${enable ? 1 : 0}`,
597
612
  method: 'PUT',
598
613
  data: {
599
614
  targetRoles
@@ -602,26 +617,32 @@ class FcrCoreServiceApi {
602
617
  return res.data;
603
618
  }
604
619
  async allowWatermark(params) {
605
- const roomId = params.roomId,
606
- enable = params.enable,
607
- targetRoles = params.targetRoles,
608
- payload = params.payload;
620
+ const {
621
+ roomId,
622
+ enable,
623
+ targetRoles,
624
+ payload
625
+ } = params;
609
626
  const res = await this._client.fetch({
610
- path: "/v1/rooms/".concat(roomId, "/security/watermark/").concat(enable ? 1 : 0),
627
+ path: `/v1/rooms/${roomId}/security/watermark/${enable ? 1 : 0}`,
611
628
  method: 'PUT',
612
629
  data: {
613
630
  targetRoles,
614
- payload: _objectSpread({}, payload)
631
+ payload: {
632
+ ...payload
633
+ }
615
634
  }
616
635
  });
617
636
  return res.data;
618
637
  }
619
638
  async allowChangeUserName(params) {
620
- const roomId = params.roomId,
621
- enable = params.enable,
622
- targetRoles = params.targetRoles;
639
+ const {
640
+ roomId,
641
+ enable,
642
+ targetRoles
643
+ } = params;
623
644
  const res = await this._client.fetch({
624
- path: "/v1/rooms/".concat(roomId, "/security/changeName/").concat(enable ? 1 : 0),
645
+ path: `/v1/rooms/${roomId}/security/changeName/${enable ? 1 : 0}`,
625
646
  method: 'PUT',
626
647
  data: {
627
648
  targetRoles
@@ -629,12 +650,13 @@ class FcrCoreServiceApi {
629
650
  });
630
651
  return res.data;
631
652
  }
632
- async allowJoinWithPromptSound(_ref1) {
633
- let roomId = _ref1.roomId,
634
- enable = _ref1.enable,
635
- targetRoles = _ref1.targetRoles;
653
+ async allowJoinWithPromptSound({
654
+ roomId,
655
+ enable,
656
+ targetRoles
657
+ }) {
636
658
  const res = await this._client.fetch({
637
- path: "/v1/rooms/".concat(roomId, "/security/joinWithPromptSound/").concat(enable ? 1 : 0),
659
+ path: `/v1/rooms/${roomId}/security/joinWithPromptSound/${enable ? 1 : 0}`,
638
660
  method: 'PUT',
639
661
  data: {
640
662
  targetRoles
@@ -642,12 +664,13 @@ class FcrCoreServiceApi {
642
664
  });
643
665
  return res.data;
644
666
  }
645
- async allowStartVideo(_ref10) {
646
- let roomId = _ref10.roomId,
647
- enable = _ref10.enable,
648
- targetRoles = _ref10.targetRoles;
667
+ async allowStartVideo({
668
+ roomId,
669
+ enable,
670
+ targetRoles
671
+ }) {
649
672
  const res = await this._client.fetch({
650
- path: "/v1/rooms/".concat(roomId, "/security/openVideo/").concat(enable ? 1 : 0),
673
+ path: `/v1/rooms/${roomId}/security/openVideo/${enable ? 1 : 0}`,
651
674
  method: 'PUT',
652
675
  data: {
653
676
  targetRoles
@@ -655,12 +678,13 @@ class FcrCoreServiceApi {
655
678
  });
656
679
  return res.data;
657
680
  }
658
- async allowJoinWithMuteAudio(_ref11) {
659
- let roomId = _ref11.roomId,
660
- enable = _ref11.enable,
661
- targetRoles = _ref11.targetRoles;
681
+ async allowJoinWithMuteAudio({
682
+ roomId,
683
+ enable,
684
+ targetRoles
685
+ }) {
662
686
  const res = await this._client.fetch({
663
- path: "/v1/rooms/".concat(roomId, "/security/joinWithMuteAudio/").concat(enable ? 1 : 0),
687
+ path: `/v1/rooms/${roomId}/security/joinWithMuteAudio/${enable ? 1 : 0}`,
664
688
  method: 'PUT',
665
689
  data: {
666
690
  targetRoles
@@ -668,12 +692,13 @@ class FcrCoreServiceApi {
668
692
  });
669
693
  return res.data;
670
694
  }
671
- async allowJoinWithMutedVideo(_ref12) {
672
- let roomId = _ref12.roomId,
673
- enable = _ref12.enable,
674
- targetRoles = _ref12.targetRoles;
695
+ async allowJoinWithMutedVideo({
696
+ roomId,
697
+ enable,
698
+ targetRoles
699
+ }) {
675
700
  const res = await this._client.fetch({
676
- path: "/v1/rooms/".concat(roomId, "/security/joinWithCloseVideo/").concat(enable ? 1 : 0),
701
+ path: `/v1/rooms/${roomId}/security/joinWithCloseVideo/${enable ? 1 : 0}`,
677
702
  method: 'PUT',
678
703
  data: {
679
704
  targetRoles
@@ -681,13 +706,14 @@ class FcrCoreServiceApi {
681
706
  });
682
707
  return res.data;
683
708
  }
684
- async updateUserRole(_ref13) {
685
- let roomId = _ref13.roomId,
686
- localRole = _ref13.localRole,
687
- remoteRole = _ref13.remoteRole,
688
- userId = _ref13.userId;
709
+ async updateUserRole({
710
+ roomId,
711
+ localRole,
712
+ remoteRole,
713
+ userId
714
+ }) {
689
715
  const res = await this._client.fetch({
690
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/role"),
716
+ path: `/v1/rooms/${roomId}/users/${userId}/role`,
691
717
  method: 'PUT',
692
718
  data: {
693
719
  remoteRole,
@@ -696,11 +722,12 @@ class FcrCoreServiceApi {
696
722
  });
697
723
  return res.data;
698
724
  }
699
- async revokeUserRole(_ref14) {
700
- let roomId = _ref14.roomId,
701
- remoteRole = _ref14.remoteRole;
725
+ async revokeUserRole({
726
+ roomId,
727
+ remoteRole
728
+ }) {
702
729
  const res = await this._client.fetch({
703
- path: "/v1/rooms/".concat(roomId, "/claim/host"),
730
+ path: `/v1/rooms/${roomId}/claim/host`,
704
731
  method: 'POST',
705
732
  data: {
706
733
  remoteRole
@@ -708,12 +735,13 @@ class FcrCoreServiceApi {
708
735
  });
709
736
  return res.data;
710
737
  }
711
- async claimHost(_ref15) {
712
- let roomId = _ref15.roomId,
713
- userId = _ref15.userId,
714
- hostKey = _ref15.hostKey;
738
+ async claimHost({
739
+ roomId,
740
+ userId,
741
+ hostKey
742
+ }) {
715
743
  const res = await this._client.fetch({
716
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/claim/host"),
744
+ path: `/v1/rooms/${roomId}/users/${userId}/claim/host`,
717
745
  method: 'POST',
718
746
  data: {
719
747
  hostKey
@@ -723,14 +751,14 @@ class FcrCoreServiceApi {
723
751
  }
724
752
  async stopLiveStreaming(roomId) {
725
753
  const res = await this._client.fetch({
726
- path: "/v1/rooms/".concat(roomId, "/live/states/0"),
754
+ path: `/v1/rooms/${roomId}/live/states/0`,
727
755
  method: 'PUT'
728
756
  });
729
757
  return res;
730
758
  }
731
759
  async updateLiveStreamingLayout(roomId, layoutType) {
732
760
  const res = await this._client.fetch({
733
- path: "/v1/rooms/".concat(roomId, "/live/states/1"),
761
+ path: `/v1/rooms/${roomId}/live/states/1`,
734
762
  method: 'PATCH',
735
763
  data: {
736
764
  layoutType: layoutType
@@ -740,7 +768,7 @@ class FcrCoreServiceApi {
740
768
  }
741
769
  async startLiveStreaming(roomId, data) {
742
770
  const res = await this._client.fetch({
743
- path: "/v1/rooms/".concat(roomId, "/live/states/1"),
771
+ path: `/v1/rooms/${roomId}/live/states/1`,
744
772
  method: 'PUT',
745
773
  data: {
746
774
  streamUrl: data.pushStreamingUrl,
@@ -751,12 +779,13 @@ class FcrCoreServiceApi {
751
779
  });
752
780
  return res;
753
781
  }
754
- async callIp(_ref16) {
755
- let roomId = _ref16.roomId,
756
- callType = _ref16.callType,
757
- ipAddress = _ref16.ipAddress;
782
+ async callIp({
783
+ roomId,
784
+ callType,
785
+ ipAddress
786
+ }) {
758
787
  const res = await this._client.fetch({
759
- path: "/v1/rooms/".concat(roomId, "/call/").concat(callType),
788
+ path: `/v1/rooms/${roomId}/call/${callType}`,
760
789
  method: 'POST',
761
790
  data: {
762
791
  ipAddress
@@ -764,14 +793,15 @@ class FcrCoreServiceApi {
764
793
  });
765
794
  return res;
766
795
  }
767
- async callPstn(_ref17) {
768
- let roomId = _ref17.roomId,
769
- userName = _ref17.userName,
770
- userId = _ref17.userId,
771
- callNumber = _ref17.callNumber,
772
- callType = _ref17.callType;
796
+ async callPstn({
797
+ roomId,
798
+ userName,
799
+ userId,
800
+ callNumber,
801
+ callType
802
+ }) {
773
803
  const res = await this._client.fetch({
774
- path: "/v1/rooms/".concat(roomId, "/call/").concat(callType),
804
+ path: `/v1/rooms/${roomId}/call/${callType}`,
775
805
  method: 'POST',
776
806
  data: {
777
807
  callNumber,
@@ -781,12 +811,13 @@ class FcrCoreServiceApi {
781
811
  });
782
812
  return res;
783
813
  }
784
- async hangup(_ref18) {
785
- let roomId = _ref18.roomId,
786
- userId = _ref18.userId,
787
- callId = _ref18.callId;
814
+ async hangup({
815
+ roomId,
816
+ userId,
817
+ callId
818
+ }) {
788
819
  const res = await this._client.fetch({
789
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/call/").concat(callId),
820
+ path: `/v1/rooms/${roomId}/users/${userId}/call/${callId}`,
790
821
  method: 'DELETE'
791
822
  });
792
823
  return res;
@@ -795,11 +826,12 @@ class FcrCoreServiceApi {
795
826
  /**
796
827
  * @description 获取白板信息
797
828
  */
798
- async getWhiteboardToken(_ref19) {
799
- let roomId = _ref19.roomId,
800
- userId = _ref19.userId;
829
+ async getWhiteboardToken({
830
+ roomId,
831
+ userId
832
+ }) {
801
833
  return this._client.fetch({
802
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/widgets/netlessBoard/token"),
834
+ path: `/v1/rooms/${roomId}/users/${userId}/widgets/netlessBoard/token`,
803
835
  method: 'GET'
804
836
  });
805
837
  }
@@ -807,11 +839,12 @@ class FcrCoreServiceApi {
807
839
  /**
808
840
  * @description 获取批注token
809
841
  */
810
- async getAnnotationToken(_ref20) {
811
- let roomId = _ref20.roomId,
812
- userId = _ref20.userId;
842
+ async getAnnotationToken({
843
+ roomId,
844
+ userId
845
+ }) {
813
846
  return this._client.fetch({
814
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/widgets/annotation/token"),
847
+ path: `/v1/rooms/${roomId}/users/${userId}/widgets/annotation/token`,
815
848
  method: 'GET'
816
849
  });
817
850
  }
@@ -821,7 +854,7 @@ class FcrCoreServiceApi {
821
854
  */
822
855
  async toggleAnnotationActivityState(roomId, state) {
823
856
  return this._client.fetch({
824
- path: "/v1/rooms/".concat(roomId, "/widgets/annotation/states/").concat(state),
857
+ path: `/v1/rooms/${roomId}/widgets/annotation/states/${state}`,
825
858
  method: 'PUT'
826
859
  });
827
860
  }
@@ -831,7 +864,7 @@ class FcrCoreServiceApi {
831
864
  */
832
865
  async syncScreenShareOwnerAnnotationOpenDone(roomId) {
833
866
  return this._client.fetch({
834
- path: "/v1/rooms/".concat(roomId, "/widgets/annotation/states/1"),
867
+ path: `/v1/rooms/${roomId}/widgets/annotation/states/1`,
835
868
  method: 'PUT',
836
869
  retryFallbackDomainsWhenFail: true
837
870
  });
@@ -841,16 +874,20 @@ class FcrCoreServiceApi {
841
874
  * @description 启用/禁用屏幕共享&白板
842
875
  */
843
876
  async toggleShareEnable(params) {
844
- const roomId = params.roomId,
845
- enable = params.enable,
846
- targetRoles = params.targetRoles,
847
- payload = params.payload;
877
+ const {
878
+ roomId,
879
+ enable,
880
+ targetRoles,
881
+ payload
882
+ } = params;
848
883
  return this._client.fetch({
849
- path: "/v1/rooms/".concat(roomId, "/security/sharing/").concat(enable ? 1 : 0),
884
+ path: `/v1/rooms/${roomId}/security/sharing/${enable ? 1 : 0}`,
850
885
  method: 'PUT',
851
886
  data: {
852
887
  targetRoles,
853
- payload: _objectSpread({}, payload)
888
+ payload: {
889
+ ...payload
890
+ }
854
891
  }
855
892
  });
856
893
  }
@@ -859,16 +896,20 @@ class FcrCoreServiceApi {
859
896
  * @description 设置'启用/禁用屏幕共享&白板'的用户列表
860
897
  */
861
898
  async toggleShareEnableByUserIds(params) {
862
- const roomId = params.roomId,
863
- enable = params.enable,
864
- toUserUuids = params.toUserUuids,
865
- payload = params.payload;
899
+ const {
900
+ roomId,
901
+ enable,
902
+ toUserUuids,
903
+ payload
904
+ } = params;
866
905
  return this._client.fetch({
867
- path: "/v1/rooms/".concat(roomId, "/security/sharing/users/").concat(enable ? 1 : 0),
906
+ path: `/v1/rooms/${roomId}/security/sharing/users/${enable ? 1 : 0}`,
868
907
  method: 'PUT',
869
908
  data: {
870
909
  toUserUuids,
871
- payload: _objectSpread({}, payload)
910
+ payload: {
911
+ ...payload
912
+ }
872
913
  }
873
914
  });
874
915
  }
@@ -877,12 +918,14 @@ class FcrCoreServiceApi {
877
918
  * @description 开启 / 关闭屏幕共享
878
919
  */
879
920
  async toggleScreenShare(params) {
880
- const roomId = params.roomId,
881
- userId = params.userId,
882
- enable = params.enable,
883
- data = params.data;
921
+ const {
922
+ roomId,
923
+ userId,
924
+ enable,
925
+ data
926
+ } = params;
884
927
  return this._client.fetch({
885
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/streams/screen/states/").concat(enable ? 1 : 0),
928
+ path: `/v1/rooms/${roomId}/users/${userId}/streams/screen/states/${enable ? 1 : 0}`,
886
929
  method: 'PUT',
887
930
  data
888
931
  });
@@ -893,7 +936,7 @@ class FcrCoreServiceApi {
893
936
  */
894
937
  async toggleWhiteboardPreloadState(roomId, state) {
895
938
  return this._client.fetch({
896
- path: "/v1/rooms/".concat(roomId, "/widgets/netlessBoard/preload/").concat(state),
939
+ path: `/v1/rooms/${roomId}/widgets/netlessBoard/preload/${state}`,
897
940
  method: 'PUT'
898
941
  });
899
942
  }
@@ -903,7 +946,7 @@ class FcrCoreServiceApi {
903
946
  */
904
947
  async toggleWhiteboardActivityState(roomId, state) {
905
948
  return this._client.fetch({
906
- path: "/v2/rooms/".concat(roomId, "/widgets/netlessBoard/states/").concat(state),
949
+ path: `/v2/rooms/${roomId}/widgets/netlessBoard/states/${state}`,
907
950
  method: 'PUT'
908
951
  });
909
952
  }
@@ -912,16 +955,20 @@ class FcrCoreServiceApi {
912
955
  * @description 启用/禁用屏幕共享&白板
913
956
  */
914
957
  async toggleAnnotation(params) {
915
- const roomId = params.roomId,
916
- enable = params.enable,
917
- payload = params.payload,
918
- targetRoles = params.targetRoles;
958
+ const {
959
+ roomId,
960
+ enable,
961
+ payload,
962
+ targetRoles
963
+ } = params;
919
964
  return this._client.fetch({
920
- path: "/v1/rooms/".concat(roomId, "/security/annotation/", 1),
965
+ path: `/v1/rooms/${roomId}/security/annotation/${1}`,
921
966
  method: 'PUT',
922
967
  data: {
923
968
  targetRoles,
924
- payload: _objectSpread({}, payload)
969
+ payload: {
970
+ ...payload
971
+ }
925
972
  }
926
973
  });
927
974
  }
@@ -930,10 +977,12 @@ class FcrCoreServiceApi {
930
977
  * @description 修改白板背景
931
978
  */
932
979
  async setBackgroundColor(params) {
933
- const roomId = params.roomId,
934
- backgroundColor = params.backgroundColor;
980
+ const {
981
+ roomId,
982
+ backgroundColor
983
+ } = params;
935
984
  return this._client.fetch({
936
- path: "/v1/rooms/".concat(roomId, "/widgets/netlessBoard/info"),
985
+ path: `/v1/rooms/${roomId}/widgets/netlessBoard/info`,
937
986
  method: 'PUT',
938
987
  data: {
939
988
  backgroundColor
@@ -945,39 +994,47 @@ class FcrCoreServiceApi {
945
994
  * @description 设置白板写权限
946
995
  */
947
996
  async setWhiteboardWriteCount(params) {
948
- const roomId = params.roomId,
949
- userId = params.userId,
950
- state = params.state;
997
+ const {
998
+ roomId,
999
+ userId,
1000
+ state
1001
+ } = params;
951
1002
  return this._client.fetch({
952
- path: "/v1/rooms/".concat(roomId, "/widgets/netlessBoard/write/").concat(state),
1003
+ path: `/v1/rooms/${roomId}/widgets/netlessBoard/write/${state}`,
953
1004
  method: 'PUT'
954
1005
  });
955
1006
  }
956
1007
  async startShareScreen(params) {
957
- const roomId = params.roomId,
958
- userId = params.userId,
959
- config = params.config;
1008
+ const {
1009
+ roomId,
1010
+ userId,
1011
+ config
1012
+ } = params;
960
1013
  const res = this._client.fetch({
961
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/streams/screen/states/1"),
1014
+ path: `/v1/rooms/${roomId}/users/${userId}/streams/screen/states/1`,
962
1015
  method: 'PUT',
963
1016
  data: config
964
1017
  });
965
1018
  return res;
966
1019
  }
967
1020
  async stopShareScreen(params) {
968
- const roomId = params.roomId,
969
- userId = params.userId;
1021
+ const {
1022
+ roomId,
1023
+ userId
1024
+ } = params;
970
1025
  const res = this._client.fetch({
971
- path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/streams/screen/states/0"),
1026
+ path: `/v1/rooms/${roomId}/users/${userId}/streams/screen/states/0`,
972
1027
  method: 'PUT'
973
1028
  });
974
1029
  return res;
975
1030
  }
976
1031
  async openInterpreter(params) {
977
- const roomId = params.roomId,
978
- data = params.data;
1032
+ const {
1033
+ roomId,
1034
+ data
1035
+ } = params;
979
1036
  const res = this._client.fetch({
980
- path: "/v1/rooms/".concat(roomId, "/interpreter/states/1"),
1037
+ path: `/v1/rooms/${roomId}/interpreter/states/1`,
981
1038
  method: 'PUT',
982
1039
  data
983
1040
  });
@@ -987,9 +1044,11 @@ class FcrCoreServiceApi {
987
1044
  return this.openInterpreter(params);
988
1045
  }
989
1046
  async closeInterpreter(params) {
990
- const roomId = params.roomId;
1047
+ const {
1048
+ roomId
1049
+ } = params;
991
1050
  const res = this._client.fetch({
992
- path: "/v1/rooms/".concat(roomId, "/interpreter/states/0"),
1051
+ path: `/v1/rooms/${roomId}/interpreter/states/0`,
993
1052
  method: 'PUT',
994
1053
  data: {}
995
1054
  });
@@ -997,7 +1056,7 @@ class FcrCoreServiceApi {
997
1056
  }
998
1057
  async createStreamBatch(roomUuid, streams) {
999
1058
  return await this._client.fetch({
1000
- path: "/v1/rooms/".concat(roomUuid, "/streams"),
1059
+ path: `/v1/rooms/${roomUuid}/streams`,
1001
1060
  method: 'POST',
1002
1061
  data: {
1003
1062
  streams
@@ -1006,22 +1065,23 @@ class FcrCoreServiceApi {
1006
1065
  }
1007
1066
  async updateStreamBatch(roomUuid, streams) {
1008
1067
  return await this._client.fetch({
1009
- path: "/v1/rooms/".concat(roomUuid, "/streams"),
1068
+ path: `/v1/rooms/${roomUuid}/streams`,
1010
1069
  method: 'PUT',
1011
1070
  data: {
1012
1071
  streams
1013
1072
  }
1014
1073
  });
1015
1074
  }
1016
- async updateStreamBatchByCondition(_ref21) {
1017
- let roomUuid = _ref21.roomUuid,
1018
- videoState = _ref21.videoState,
1019
- audioState = _ref21.audioState,
1020
- includeRoles = _ref21.includeRoles,
1021
- excludeRoles = _ref21.excludeRoles,
1022
- condition = _ref21.condition;
1075
+ async updateStreamBatchByCondition({
1076
+ roomUuid,
1077
+ videoState,
1078
+ audioState,
1079
+ includeRoles,
1080
+ excludeRoles,
1081
+ condition
1082
+ }) {
1023
1083
  return await this._client.fetch({
1024
- path: "/v1/rooms/".concat(roomUuid, "/conditions/streams"),
1084
+ path: `/v1/rooms/${roomUuid}/conditions/streams`,
1025
1085
  method: 'PUT',
1026
1086
  data: {
1027
1087
  includeRoles,
@@ -1036,7 +1096,7 @@ class FcrCoreServiceApi {
1036
1096
  }
1037
1097
  async deleteStreamBatch(roomUuid, streams) {
1038
1098
  return await this._client.fetch({
1039
- path: "/v1/rooms/".concat(roomUuid, "/streams"),
1099
+ path: `/v1/rooms/${roomUuid}/streams`,
1040
1100
  method: 'DELETE',
1041
1101
  data: {
1042
1102
  streams
@@ -1044,11 +1104,13 @@ class FcrCoreServiceApi {
1044
1104
  });
1045
1105
  }
1046
1106
  async startCaption(params) {
1047
- const roomUuid = params.roomUuid,
1048
- userUuid = params.userUuid,
1049
- config = params.config;
1107
+ const {
1108
+ roomUuid,
1109
+ userUuid,
1110
+ config
1111
+ } = params;
1050
1112
  return await this._client.fetch({
1051
- path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/widgets/stt/caption/states/1"),
1113
+ path: `/v1/rooms/${roomUuid}/users/${userUuid}/widgets/stt/caption/states/1`,
1052
1114
  method: 'PUT',
1053
1115
  data: {
1054
1116
  source: config.sourceLanguage,
@@ -1057,19 +1119,23 @@ class FcrCoreServiceApi {
1057
1119
  });
1058
1120
  }
1059
1121
  async stopCaption(params) {
1060
- const roomUuid = params.roomUuid,
1061
- userUuid = params.userUuid;
1122
+ const {
1123
+ roomUuid,
1124
+ userUuid
1125
+ } = params;
1062
1126
  return await this._client.fetch({
1063
- path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/widgets/stt/caption/states/0"),
1127
+ path: `/v1/rooms/${roomUuid}/users/${userUuid}/widgets/stt/caption/states/0`,
1064
1128
  method: 'PUT'
1065
1129
  });
1066
1130
  }
1067
1131
  async updateWidgetState(params) {
1068
- const roomUuid = params.roomUuid,
1069
- widgetId = params.widgetId,
1070
- state = params.state;
1132
+ const {
1133
+ roomUuid,
1134
+ widgetId,
1135
+ state
1136
+ } = params;
1071
1137
  return await this._client.fetch({
1072
- path: "/v1/rooms/".concat(roomUuid, "/widgets/").concat(widgetId),
1138
+ path: `/v1/rooms/${roomUuid}/widgets/${widgetId}`,
1073
1139
  method: 'PUT',
1074
1140
  data: {
1075
1141
  state
@@ -1077,11 +1143,13 @@ class FcrCoreServiceApi {
1077
1143
  });
1078
1144
  }
1079
1145
  async startTranscribing(params) {
1080
- const roomUuid = params.roomUuid,
1081
- userUuid = params.userUuid,
1082
- config = params.config;
1146
+ const {
1147
+ roomUuid,
1148
+ userUuid,
1149
+ config
1150
+ } = params;
1083
1151
  return await this._client.fetch({
1084
- path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/widgets/stt/transcribe/states/1"),
1152
+ path: `/v1/rooms/${roomUuid}/users/${userUuid}/widgets/stt/transcribe/states/1`,
1085
1153
  method: 'PUT',
1086
1154
  data: {
1087
1155
  source: config.sourceLanguage,
@@ -1090,19 +1158,23 @@ class FcrCoreServiceApi {
1090
1158
  });
1091
1159
  }
1092
1160
  async stopTranscribing(params) {
1093
- const roomUuid = params.roomUuid,
1094
- userUuid = params.userUuid;
1161
+ const {
1162
+ roomUuid,
1163
+ userUuid
1164
+ } = params;
1095
1165
  return await this._client.fetch({
1096
- path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/widgets/stt/transcribe/states/0"),
1166
+ path: `/v1/rooms/${roomUuid}/users/${userUuid}/widgets/stt/transcribe/states/0`,
1097
1167
  method: 'PUT'
1098
1168
  });
1099
1169
  }
1100
1170
  async updateSourceLanguage(params) {
1101
- const roomUuid = params.roomUuid,
1102
- userUuid = params.userUuid,
1103
- language = params.language;
1171
+ const {
1172
+ roomUuid,
1173
+ userUuid,
1174
+ language
1175
+ } = params;
1104
1176
  return await this._client.fetch({
1105
- path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/widgets/stt/language/speech"),
1177
+ path: `/v1/rooms/${roomUuid}/users/${userUuid}/widgets/stt/language/speech`,
1106
1178
  method: 'PATCH',
1107
1179
  data: {
1108
1180
  source: language
@@ -1110,11 +1182,13 @@ class FcrCoreServiceApi {
1110
1182
  });
1111
1183
  }
1112
1184
  async subscribeTranscribingLanguage(params) {
1113
- const roomUuid = params.roomUuid,
1114
- userUuid = params.userUuid,
1115
- language = params.language;
1185
+ const {
1186
+ roomUuid,
1187
+ userUuid,
1188
+ language
1189
+ } = params;
1116
1190
  return await this._client.fetch({
1117
- path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/widgets/stt/language/subscribe/1"),
1191
+ path: `/v1/rooms/${roomUuid}/users/${userUuid}/widgets/stt/language/subscribe/1`,
1118
1192
  method: 'PATCH',
1119
1193
  data: {
1120
1194
  target: [language]
@@ -1122,19 +1196,23 @@ class FcrCoreServiceApi {
1122
1196
  });
1123
1197
  }
1124
1198
  async unsubscribeTranscribingLanguage(params) {
1125
- const roomUuid = params.roomUuid,
1126
- userUuid = params.userUuid;
1199
+ const {
1200
+ roomUuid,
1201
+ userUuid
1202
+ } = params;
1127
1203
  return await this._client.fetch({
1128
- path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/widgets/stt/language/subscribe/0"),
1204
+ path: `/v1/rooms/${roomUuid}/users/${userUuid}/widgets/stt/language/subscribe/0`,
1129
1205
  method: 'PATCH'
1130
1206
  });
1131
1207
  }
1132
1208
  async allowStartCaption(params) {
1133
- const roomUuid = params.roomUuid,
1134
- enable = params.enable,
1135
- targetRoles = params.targetRoles;
1209
+ const {
1210
+ roomUuid,
1211
+ enable,
1212
+ targetRoles
1213
+ } = params;
1136
1214
  return await this._client.fetch({
1137
- path: "/v1/rooms/".concat(roomUuid, "/security/caption/").concat(enable ? 1 : 0),
1215
+ path: `/v1/rooms/${roomUuid}/security/caption/${enable ? 1 : 0}`,
1138
1216
  method: 'PUT',
1139
1217
  data: {
1140
1218
  targetRoles
@@ -1142,11 +1220,13 @@ class FcrCoreServiceApi {
1142
1220
  });
1143
1221
  }
1144
1222
  async allowStartTranscribing(params) {
1145
- const roomUuid = params.roomUuid,
1146
- enable = params.enable,
1147
- targetRoles = params.targetRoles;
1223
+ const {
1224
+ roomUuid,
1225
+ enable,
1226
+ targetRoles
1227
+ } = params;
1148
1228
  return await this._client.fetch({
1149
- path: "/v1/rooms/".concat(roomUuid, "/security/transcribe/").concat(enable ? 1 : 0),
1229
+ path: `/v1/rooms/${roomUuid}/security/transcribe/${enable ? 1 : 0}`,
1150
1230
  method: 'PUT',
1151
1231
  data: {
1152
1232
  targetRoles
@@ -1154,11 +1234,13 @@ class FcrCoreServiceApi {
1154
1234
  });
1155
1235
  }
1156
1236
  async allowUpdateSttSourceLanguage(params) {
1157
- const roomUuid = params.roomUuid,
1158
- enable = params.enable,
1159
- targetRoles = params.targetRoles;
1237
+ const {
1238
+ roomUuid,
1239
+ enable,
1240
+ targetRoles
1241
+ } = params;
1160
1242
  return await this._client.fetch({
1161
- path: "/v1/rooms/".concat(roomUuid, "/security/stt/").concat(enable ? 1 : 0),
1243
+ path: `/v1/rooms/${roomUuid}/security/stt/${enable ? 1 : 0}`,
1162
1244
  method: 'PUT',
1163
1245
  data: {
1164
1246
  targetRoles,
@@ -1169,13 +1251,15 @@ class FcrCoreServiceApi {
1169
1251
  });
1170
1252
  }
1171
1253
  async startApplicatioByRole(params) {
1172
- const userUuid = params.userUuid,
1173
- applicationKey = params.applicationKey,
1174
- cause = params.cause,
1175
- targetRoles = params.targetRoles,
1176
- roomUuid = params.roomUuid;
1254
+ const {
1255
+ userUuid,
1256
+ applicationKey,
1257
+ cause,
1258
+ targetRoles,
1259
+ roomUuid
1260
+ } = params;
1177
1261
  return await this._client.fetch({
1178
- path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/applications/").concat(applicationKey),
1262
+ path: `/v1/rooms/${roomUuid}/users/${userUuid}/applications/${applicationKey}`,
1179
1263
  method: 'PUT',
1180
1264
  data: {
1181
1265
  target: 3,
@@ -1185,12 +1269,14 @@ class FcrCoreServiceApi {
1185
1269
  });
1186
1270
  }
1187
1271
  async cancelApplication(params) {
1188
- const userUuid = params.userUuid,
1189
- applicationKey = params.applicationKey,
1190
- cause = params.cause,
1191
- roomUuid = params.roomUuid;
1272
+ const {
1273
+ userUuid,
1274
+ applicationKey,
1275
+ cause,
1276
+ roomUuid
1277
+ } = params;
1192
1278
  return await this._client.fetch({
1193
- path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/applications/").concat(applicationKey),
1279
+ path: `/v1/rooms/${roomUuid}/users/${userUuid}/applications/${applicationKey}`,
1194
1280
  method: 'DELETE',
1195
1281
  data: {
1196
1282
  target: 2,
@@ -1201,13 +1287,15 @@ class FcrCoreServiceApi {
1201
1287
  });
1202
1288
  }
1203
1289
  async acceptApplicationByUserId(params) {
1204
- const userUuid = params.userUuid,
1205
- applicationKey = params.applicationKey,
1206
- cause = params.cause,
1207
- targetUserIds = params.targetUserIds,
1208
- roomUuid = params.roomUuid;
1290
+ const {
1291
+ userUuid,
1292
+ applicationKey,
1293
+ cause,
1294
+ targetUserIds,
1295
+ roomUuid
1296
+ } = params;
1209
1297
  return await this._client.fetch({
1210
- path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/applications/").concat(applicationKey),
1298
+ path: `/v1/rooms/${roomUuid}/users/${userUuid}/applications/${applicationKey}`,
1211
1299
  method: 'PATCH',
1212
1300
  data: {
1213
1301
  target: 2,
@@ -1217,12 +1305,14 @@ class FcrCoreServiceApi {
1217
1305
  });
1218
1306
  }
1219
1307
  async acceptAllApplication(params) {
1220
- const userUuid = params.userUuid,
1221
- applicationKey = params.applicationKey,
1222
- cause = params.cause,
1223
- roomUuid = params.roomUuid;
1308
+ const {
1309
+ userUuid,
1310
+ applicationKey,
1311
+ cause,
1312
+ roomUuid
1313
+ } = params;
1224
1314
  return await this._client.fetch({
1225
- path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/applications/").concat(applicationKey),
1315
+ path: `/v1/rooms/${roomUuid}/users/${userUuid}/applications/${applicationKey}`,
1226
1316
  method: 'PATCH',
1227
1317
  data: {
1228
1318
  target: 1,
@@ -1231,13 +1321,15 @@ class FcrCoreServiceApi {
1231
1321
  });
1232
1322
  }
1233
1323
  async rejectApplicationByUserId(params) {
1234
- const userUuid = params.userUuid,
1235
- applicationKey = params.applicationKey,
1236
- cause = params.cause,
1237
- targetUserIds = params.targetUserIds,
1238
- roomUuid = params.roomUuid;
1324
+ const {
1325
+ userUuid,
1326
+ applicationKey,
1327
+ cause,
1328
+ targetUserIds,
1329
+ roomUuid
1330
+ } = params;
1239
1331
  return await this._client.fetch({
1240
- path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/applications/").concat(applicationKey),
1332
+ path: `/v1/rooms/${roomUuid}/users/${userUuid}/applications/${applicationKey}`,
1241
1333
  method: 'DELETE',
1242
1334
  data: {
1243
1335
  target: 2,
@@ -1248,12 +1340,14 @@ class FcrCoreServiceApi {
1248
1340
  });
1249
1341
  }
1250
1342
  async rejectAllApplication(params) {
1251
- const userUuid = params.userUuid,
1252
- applicationKey = params.applicationKey,
1253
- cause = params.cause,
1254
- roomUuid = params.roomUuid;
1343
+ const {
1344
+ userUuid,
1345
+ applicationKey,
1346
+ cause,
1347
+ roomUuid
1348
+ } = params;
1255
1349
  return await this._client.fetch({
1256
- path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/applications/").concat(applicationKey),
1350
+ path: `/v1/rooms/${roomUuid}/users/${userUuid}/applications/${applicationKey}`,
1257
1351
  method: 'DELETE',
1258
1352
  data: {
1259
1353
  target: 1,
@@ -1263,11 +1357,13 @@ class FcrCoreServiceApi {
1263
1357
  });
1264
1358
  }
1265
1359
  async allowSendChatByUserId(params) {
1266
- const roomUuid = params.roomUuid,
1267
- targetUserIds = params.targetUserIds,
1268
- config = params.config;
1360
+ const {
1361
+ roomUuid,
1362
+ targetUserIds,
1363
+ config
1364
+ } = params;
1269
1365
  return await this._client.fetch({
1270
- path: "/v1/rooms/".concat(roomUuid, "/security/chat/users/1"),
1366
+ path: `/v1/rooms/${roomUuid}/security/chat/users/1`,
1271
1367
  method: 'PUT',
1272
1368
  data: {
1273
1369
  toUserUuids: targetUserIds,
@@ -1283,11 +1379,13 @@ class FcrCoreServiceApi {
1283
1379
  });
1284
1380
  }
1285
1381
  async allowViewUserCount(params) {
1286
- const roomUuid = params.roomUuid,
1287
- enable = params.enable,
1288
- targetRoles = params.targetRoles;
1382
+ const {
1383
+ roomUuid,
1384
+ enable,
1385
+ targetRoles
1386
+ } = params;
1289
1387
  return await this._client.fetch({
1290
- path: "/v1/rooms/".concat(roomUuid, "/security/viewUserCount/").concat(enable ? 1 : 0),
1388
+ path: `/v1/rooms/${roomUuid}/security/viewUserCount/${enable ? 1 : 0}`,
1291
1389
  method: 'PUT',
1292
1390
  data: {
1293
1391
  targetRoles
@@ -1295,11 +1393,13 @@ class FcrCoreServiceApi {
1295
1393
  });
1296
1394
  }
1297
1395
  async allowHandsUp(params) {
1298
- const roomUuid = params.roomUuid,
1299
- targetRoles = params.targetRoles,
1300
- enable = params.enable;
1396
+ const {
1397
+ roomUuid,
1398
+ targetRoles,
1399
+ enable
1400
+ } = params;
1301
1401
  return await this._client.fetch({
1302
- path: "/v1/rooms/".concat(roomUuid, "/security/handsUp/").concat(enable ? 1 : 0),
1402
+ path: `/v1/rooms/${roomUuid}/security/handsUp/${enable ? 1 : 0}`,
1303
1403
  method: 'PUT',
1304
1404
  data: {
1305
1405
  targetRoles
@@ -1307,11 +1407,13 @@ class FcrCoreServiceApi {
1307
1407
  });
1308
1408
  }
1309
1409
  async allowSendChatByUserRole(params) {
1310
- const roomUuid = params.roomUuid,
1311
- targetRoles = params.targetRoles,
1312
- config = params.config;
1410
+ const {
1411
+ roomUuid,
1412
+ targetRoles,
1413
+ config
1414
+ } = params;
1313
1415
  return await this._client.fetch({
1314
- path: "/v1/rooms/".concat(roomUuid, "/security/chat/1"),
1416
+ path: `/v1/rooms/${roomUuid}/security/chat/1`,
1315
1417
  method: 'PUT',
1316
1418
  data: {
1317
1419
  targetRoles,