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