fcr-core 3.7.9-alpha → 3.8.0-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/chat-connection/index.d.ts +1 -1
- package/lib/chat-connection/index.js +41 -26
- package/lib/engine/index.js +72 -78
- package/lib/imports.d.ts +7 -2
- package/lib/imports.js +26 -4
- package/lib/index.d.ts +2 -2
- package/lib/index.js +12 -0
- package/lib/media-control/desktop.js +22 -17
- package/lib/media-control/mobile.js +38 -33
- package/lib/media-control/type.d.ts +8 -0
- package/lib/monitor-control/index.js +10 -5
- package/lib/peer-session/index.js +48 -39
- package/lib/plugins/chatroom.js +237 -205
- package/lib/room-control/ability-control/index.js +14 -9
- package/lib/room-control/ability-control/type.d.ts +4 -1
- package/lib/room-control/ability-control/type.js +3 -0
- package/lib/room-control/group-control/index.js +21 -16
- package/lib/room-control/helpers/constants.d.ts +4 -0
- package/lib/room-control/helpers/constants.js +5 -1
- package/lib/room-control/helpers/validation-helper.js +1 -1
- package/lib/room-control/index.js +66 -38
- package/lib/room-control/interpreter-control/index.js +49 -38
- package/lib/room-control/interpreter-control/room.js +6 -4
- package/lib/room-control/join-before-host-waitingroom-control/index.js +6 -4
- package/lib/room-control/mainroom-control/index.js +90 -17
- package/lib/room-control/privilege-control/helper.js +8 -5
- package/lib/room-control/privilege-control/index.js +66 -19
- package/lib/room-control/privilege-control/type.d.ts +57 -10
- package/lib/room-control/privilege-control/type.js +17 -0
- package/lib/room-control/room-connector-control/index.js +28 -19
- package/lib/room-control/room-control-factory.js +3 -2
- package/lib/room-control/room-session/index.js +68 -49
- package/lib/room-control/room-session/type.d.ts +2 -2
- package/lib/room-control/shared-cache.js +36 -29
- package/lib/room-control/sharing-control/index.d.ts +5 -5
- package/lib/room-control/sharing-control/index.js +81 -43
- package/lib/room-control/sharing-control/type.d.ts +9 -5
- package/lib/room-control/sharing-control/type.js +6 -1
- package/lib/room-control/stream-control/index.d.ts +8 -1
- package/lib/room-control/stream-control/index.js +310 -199
- package/lib/room-control/stream-control/type.d.ts +6 -0
- package/lib/room-control/stt-control/de-compress-gzip.d.ts +1 -0
- package/lib/room-control/stt-control/de-compress-gzip.js +49 -0
- package/lib/room-control/stt-control/index.d.ts +1 -0
- package/lib/room-control/stt-control/index.js +353 -0
- package/lib/room-control/stt-control/type.d.ts +142 -0
- package/lib/room-control/stt-control/type.js +16 -0
- package/lib/room-control/type.d.ts +15 -0
- package/lib/room-control/type.js +13 -1
- package/lib/room-control/user-control/index.js +143 -136
- package/lib/room-control/waitingroom-control/index.js +14 -9
- package/lib/room-control/whiteboard-control/enum.d.ts +15 -0
- package/lib/room-control/whiteboard-control/{types.js → enum.js} +12 -1
- package/lib/room-control/whiteboard-control/type.d.ts +38 -0
- package/lib/room-control/whiteboard-control/type.js +15 -0
- package/lib/room-control/whiteboard-control/utils.d.ts +3 -0
- package/lib/room-control/whiteboard-control/utils.js +23 -0
- package/lib/room-control/whiteboard-control-v1/board-subwindow.d.ts +6 -0
- package/lib/room-control/whiteboard-control-v1/board-subwindow.js +26 -0
- package/lib/room-control/whiteboard-control-v1/board-window.d.ts +58 -0
- package/lib/room-control/whiteboard-control-v1/board-window.js +571 -0
- package/lib/room-control/{whiteboard-control/enums.d.ts → whiteboard-control-v1/enum.d.ts} +3 -17
- package/lib/room-control/{whiteboard-control/enums.js → whiteboard-control-v1/enum.js} +3 -20
- package/lib/room-control/whiteboard-control-v1/factory.d.ts +9 -0
- package/lib/room-control/whiteboard-control-v1/factory.js +22 -0
- package/lib/room-control/whiteboard-control-v1/index.d.ts +1 -0
- package/lib/room-control/whiteboard-control-v1/index.js +440 -0
- package/lib/room-control/whiteboard-control-v1/mount-manager.d.ts +4 -0
- package/lib/room-control/whiteboard-control-v1/mount-manager.js +15 -0
- package/lib/room-control/whiteboard-control-v1/type.d.ts +300 -0
- package/lib/room-control/whiteboard-control-v1/type.js +13 -0
- package/lib/room-control/whiteboard-control-v1/utils.d.ts +53 -0
- package/lib/room-control/whiteboard-control-v1/utils.js +290 -0
- package/lib/room-control/whiteboard-control-v2/annotation-control/control.d.ts +17 -31
- package/lib/room-control/whiteboard-control-v2/annotation-control/control.js +42 -228
- package/lib/room-control/whiteboard-control-v2/annotation-control/factory.d.ts +10 -0
- package/lib/room-control/whiteboard-control-v2/annotation-control/factory.js +48 -0
- package/lib/room-control/whiteboard-control-v2/annotation-control/type.d.ts +11 -19
- package/lib/room-control/whiteboard-control-v2/annotation-control/type.js +1 -3
- package/lib/room-control/whiteboard-control-v2/base/index.d.ts +42 -0
- package/lib/room-control/whiteboard-control-v2/base/index.js +317 -0
- package/lib/room-control/whiteboard-control-v2/{main-window.d.ts → base/main-window.d.ts} +6 -4
- package/lib/room-control/whiteboard-control-v2/{main-window.js → base/main-window.js} +54 -36
- package/lib/room-control/whiteboard-control-v2/constant.d.ts +6 -0
- package/lib/room-control/whiteboard-control-v2/constant.js +15 -0
- package/lib/room-control/whiteboard-control-v2/enum.d.ts +26 -0
- package/lib/room-control/whiteboard-control-v2/enum.js +34 -0
- package/lib/room-control/{whiteboard-control/types.d.ts → whiteboard-control-v2/type.d.ts} +51 -165
- package/lib/room-control/whiteboard-control-v2/type.js +5 -0
- package/lib/room-control/whiteboard-control-v2/utils.d.ts +5 -4
- package/lib/room-control/whiteboard-control-v2/utils.js +29 -27
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/control.d.ts +34 -33
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/control.js +131 -187
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/factory.d.ts +11 -0
- package/lib/room-control/whiteboard-control-v2/{annotation-control/index.js → whiteboard-control/factory.js} +40 -38
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/type.d.ts +18 -30
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/type.js +1 -9
- package/lib/room-router/index.js +56 -42
- package/lib/schema.d.ts +23 -9
- package/lib/schema.js +10 -4
- package/lib/service/api.d.ts +75 -19
- package/lib/service/api.js +401 -208
- package/lib/type.d.ts +15 -2
- package/lib/type.js +13 -0
- package/lib/utilities/collection.js +3 -2
- package/lib/utilities/error-helpers.d.ts +2 -1
- package/lib/utilities/error-helpers.js +35 -27
- package/lib/utilities/error.d.ts +1 -0
- package/lib/utilities/error.js +10 -8
- package/lib/utilities/join-helper.js +32 -25
- package/lib/utilities/logger.d.ts +2 -2
- package/lib/utilities/logger.js +6 -3
- package/lib/utilities/parameters.js +8 -4
- package/lib/utilities/retry-helpers.js +1 -0
- package/lib/utilities/shared-storage.d.ts +3 -1
- package/lib/utilities/shared-storage.js +10 -1
- package/lib/utilities/storage.js +1 -0
- package/lib/utilities/stream.js +16 -11
- package/lib/utilities/user.js +4 -3
- package/lib/utilities/validate-params.js +2 -1
- package/package.json +11 -5
- package/lib/room-control/whiteboard-control-v2/annotation-control/index.d.ts +0 -19
- package/lib/room-control/whiteboard-control-v2/annotation-control/privilege-control.d.ts +0 -36
- package/lib/room-control/whiteboard-control-v2/annotation-control/privilege-control.js +0 -252
- package/lib/room-control/whiteboard-control-v2/index.d.ts +0 -38
- package/lib/room-control/whiteboard-control-v2/index.js +0 -274
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/index.d.ts +0 -17
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/index.js +0 -30
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/privilege-control.d.ts +0 -36
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/privilege-control.js +0 -240
package/lib/service/api.js
CHANGED
|
@@ -1,22 +1,30 @@
|
|
|
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");
|
|
3
7
|
Object.defineProperty(exports, "__esModule", {
|
|
4
8
|
value: true
|
|
5
9
|
});
|
|
6
10
|
exports.FcrCoreServiceApi = void 0;
|
|
7
11
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
8
12
|
require("core-js/modules/esnext.iterator.map.js");
|
|
13
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
14
|
var _imports = require("../imports");
|
|
10
15
|
var _type = require("../room-control/privilege-control/type");
|
|
11
16
|
var _type2 = require("../room-control/user-control/type");
|
|
12
17
|
var _logger = require("../utilities/logger");
|
|
18
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
20
|
class FcrCoreServiceApi {
|
|
14
|
-
|
|
15
|
-
|
|
21
|
+
constructor(_client, appId, region) {
|
|
22
|
+
let pathIncludeRegion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
23
|
+
(0, _defineProperty2.default)(this, "logger", (0, _logger.getLogger)());
|
|
16
24
|
this._client = _client;
|
|
17
|
-
let pathPrefix =
|
|
25
|
+
let pathPrefix = "/conference/apps/".concat(appId);
|
|
18
26
|
if (pathIncludeRegion) {
|
|
19
|
-
pathPrefix =
|
|
27
|
+
pathPrefix = "/".concat((0, _imports.toLower)(region)).concat(pathPrefix);
|
|
20
28
|
}
|
|
21
29
|
this.logger.info('[FcrCoreServiceApi] set path prefix for Core Service API:', pathPrefix);
|
|
22
30
|
this._pathPrefix = pathPrefix;
|
|
@@ -30,7 +38,7 @@ class FcrCoreServiceApi {
|
|
|
30
38
|
const {
|
|
31
39
|
data
|
|
32
40
|
} = await this._client.fetch({
|
|
33
|
-
path:
|
|
41
|
+
path: "/v2/rooms/".concat(opts.roomId, "/groups"),
|
|
34
42
|
method: 'PUT',
|
|
35
43
|
data: {
|
|
36
44
|
groups: params.map(group => {
|
|
@@ -53,7 +61,7 @@ class FcrCoreServiceApi {
|
|
|
53
61
|
const {
|
|
54
62
|
data
|
|
55
63
|
} = await this._client.fetch({
|
|
56
|
-
path:
|
|
64
|
+
path: "/v2/rooms/".concat(opts.roomId, "/groups/info"),
|
|
57
65
|
method: 'PATCH',
|
|
58
66
|
data: {
|
|
59
67
|
groups: params.map(group => {
|
|
@@ -69,7 +77,7 @@ class FcrCoreServiceApi {
|
|
|
69
77
|
const {
|
|
70
78
|
data
|
|
71
79
|
} = await this._client.fetch({
|
|
72
|
-
path:
|
|
80
|
+
path: "/v2/rooms/".concat(opts.roomId, "/groups/states/1"),
|
|
73
81
|
method: 'DELETE',
|
|
74
82
|
data: {
|
|
75
83
|
removeGroupUuids: groupIds
|
|
@@ -80,7 +88,7 @@ class FcrCoreServiceApi {
|
|
|
80
88
|
const {
|
|
81
89
|
data
|
|
82
90
|
} = await this._client.fetch({
|
|
83
|
-
path:
|
|
91
|
+
path: "/v2/rooms/".concat(opts.roomId, "/groups/all"),
|
|
84
92
|
method: 'DELETE'
|
|
85
93
|
});
|
|
86
94
|
}
|
|
@@ -88,7 +96,7 @@ class FcrCoreServiceApi {
|
|
|
88
96
|
const {
|
|
89
97
|
data
|
|
90
98
|
} = await this._client.fetch({
|
|
91
|
-
path:
|
|
99
|
+
path: "/v2/rooms/".concat(opts.roomId, "/groups/users"),
|
|
92
100
|
method: 'PATCH',
|
|
93
101
|
data: {
|
|
94
102
|
groups: [{
|
|
@@ -103,7 +111,7 @@ class FcrCoreServiceApi {
|
|
|
103
111
|
const {
|
|
104
112
|
data
|
|
105
113
|
} = await this._client.fetch({
|
|
106
|
-
path:
|
|
114
|
+
path: "/v2/rooms/".concat(opts.roomId, "/groups/users"),
|
|
107
115
|
method: 'PATCH',
|
|
108
116
|
data: {
|
|
109
117
|
groups: [{
|
|
@@ -118,7 +126,7 @@ class FcrCoreServiceApi {
|
|
|
118
126
|
const {
|
|
119
127
|
data
|
|
120
128
|
} = await this._client.fetch({
|
|
121
|
-
path:
|
|
129
|
+
path: "/v2/rooms/".concat(opts.roomId, "/groups/users"),
|
|
122
130
|
method: 'PATCH',
|
|
123
131
|
data: {
|
|
124
132
|
groups: [{
|
|
@@ -132,7 +140,7 @@ class FcrCoreServiceApi {
|
|
|
132
140
|
/*** merge audio ****/
|
|
133
141
|
async mergeAudioStream(userId, opts) {
|
|
134
142
|
const res = await this._client.fetch({
|
|
135
|
-
path:
|
|
143
|
+
path: "/v1/rooms/".concat(opts.roomId, "/users/").concat(userId, "/call/merge"),
|
|
136
144
|
method: 'PUT',
|
|
137
145
|
data: {}
|
|
138
146
|
});
|
|
@@ -141,7 +149,7 @@ class FcrCoreServiceApi {
|
|
|
141
149
|
/*** split audio ****/
|
|
142
150
|
async splitAudioStream(userId, opts) {
|
|
143
151
|
const res = await this._client.fetch({
|
|
144
|
-
path:
|
|
152
|
+
path: "/v1/rooms/".concat(opts.roomId, "/users/").concat(userId, "/call/split"),
|
|
145
153
|
method: 'PUT',
|
|
146
154
|
data: {}
|
|
147
155
|
});
|
|
@@ -154,7 +162,7 @@ class FcrCoreServiceApi {
|
|
|
154
162
|
body.duration = -1;
|
|
155
163
|
}
|
|
156
164
|
return this._client.fetch({
|
|
157
|
-
path:
|
|
165
|
+
path: "/v1/rooms/".concat(opts.roomId, "/users/").concat(userId, "/ban/").concat(type === _type2.FcrUserKickedOutType.Forever ? 1 : 0),
|
|
158
166
|
method: 'PUT',
|
|
159
167
|
data: body
|
|
160
168
|
});
|
|
@@ -169,7 +177,7 @@ class FcrCoreServiceApi {
|
|
|
169
177
|
const {
|
|
170
178
|
data
|
|
171
179
|
} = await this._client.fetch({
|
|
172
|
-
path:
|
|
180
|
+
path: "/v1/rooms/".concat(opts.roomId, "/users/ban/").concat(type === _type2.FcrUserKickedOutType.Forever ? 1 : 0),
|
|
173
181
|
method: 'PUT',
|
|
174
182
|
data: body
|
|
175
183
|
});
|
|
@@ -184,7 +192,7 @@ class FcrCoreServiceApi {
|
|
|
184
192
|
const {
|
|
185
193
|
data
|
|
186
194
|
} = await this._client.fetch({
|
|
187
|
-
path:
|
|
195
|
+
path: "/v1/rooms/".concat(opts.roomId, "/users/ban/").concat(type === _type2.FcrUserKickedOutType.Forever ? 1 : 0),
|
|
188
196
|
method: 'PUT',
|
|
189
197
|
data: body
|
|
190
198
|
});
|
|
@@ -193,25 +201,25 @@ class FcrCoreServiceApi {
|
|
|
193
201
|
/** room control **/
|
|
194
202
|
async startRoom(roomId) {
|
|
195
203
|
return this._client.fetch({
|
|
196
|
-
path:
|
|
204
|
+
path: "/v1/rooms/".concat(roomId, "/states/1"),
|
|
197
205
|
method: 'PUT'
|
|
198
206
|
});
|
|
199
207
|
}
|
|
200
208
|
async endRoom(roomId) {
|
|
201
209
|
return this._client.fetch({
|
|
202
|
-
path:
|
|
210
|
+
path: "/v1/rooms/".concat(roomId, "/states/2"),
|
|
203
211
|
method: 'PUT'
|
|
204
212
|
});
|
|
205
213
|
}
|
|
206
214
|
async closeRoom(roomId) {
|
|
207
215
|
return this._client.fetch({
|
|
208
|
-
path:
|
|
216
|
+
path: "/v1/rooms/".concat(roomId, "/states/3"),
|
|
209
217
|
method: 'PUT'
|
|
210
218
|
});
|
|
211
219
|
}
|
|
212
220
|
async startCloudRecording(config, roomId) {
|
|
213
221
|
return this._client.fetch({
|
|
214
|
-
path:
|
|
222
|
+
path: "/v1/rooms/".concat(roomId, "/records/states/1"),
|
|
215
223
|
method: 'PUT',
|
|
216
224
|
data: {
|
|
217
225
|
mode: 'web',
|
|
@@ -228,7 +236,7 @@ class FcrCoreServiceApi {
|
|
|
228
236
|
}
|
|
229
237
|
async pauseCloudRecording(roomId) {
|
|
230
238
|
return this._client.fetch({
|
|
231
|
-
path:
|
|
239
|
+
path: "/v1/rooms/".concat(roomId, "/records/states/1"),
|
|
232
240
|
method: 'PATCH',
|
|
233
241
|
data: {
|
|
234
242
|
mode: 'web',
|
|
@@ -240,7 +248,7 @@ class FcrCoreServiceApi {
|
|
|
240
248
|
}
|
|
241
249
|
async resumeCloudRecording(roomId) {
|
|
242
250
|
return this._client.fetch({
|
|
243
|
-
path:
|
|
251
|
+
path: "/v1/rooms/".concat(roomId, "/records/states/1"),
|
|
244
252
|
method: 'PATCH',
|
|
245
253
|
data: {
|
|
246
254
|
webRecordConfig: {
|
|
@@ -251,13 +259,13 @@ class FcrCoreServiceApi {
|
|
|
251
259
|
}
|
|
252
260
|
async stopCloudRecording(roomId) {
|
|
253
261
|
return this._client.fetch({
|
|
254
|
-
path:
|
|
262
|
+
path: "/v1/rooms/".concat(roomId, "/records/states/0"),
|
|
255
263
|
method: 'PUT'
|
|
256
264
|
});
|
|
257
265
|
}
|
|
258
266
|
async setCloudRecordingReady(roomId) {
|
|
259
267
|
return this._client.fetch({
|
|
260
|
-
path:
|
|
268
|
+
path: "/v1/rooms/".concat(roomId, "/records/ready"),
|
|
261
269
|
method: 'PUT'
|
|
262
270
|
});
|
|
263
271
|
}
|
|
@@ -280,11 +288,12 @@ class FcrCoreServiceApi {
|
|
|
280
288
|
/** room session */
|
|
281
289
|
async updateRoomSession(params) {
|
|
282
290
|
return this._client.fetch({
|
|
283
|
-
path:
|
|
291
|
+
path: "/v1/users/".concat(params.userId, "/sessions/").concat(params.sessionKey, "/").concat(params.sessionId),
|
|
284
292
|
method: 'PUT',
|
|
285
293
|
data: {
|
|
286
294
|
target: 1,
|
|
287
295
|
targetUuids: [params.targetId],
|
|
296
|
+
targetRoles: params.targetRoles,
|
|
288
297
|
payload: params.payload,
|
|
289
298
|
duration: params.duration
|
|
290
299
|
}
|
|
@@ -292,10 +301,10 @@ class FcrCoreServiceApi {
|
|
|
292
301
|
}
|
|
293
302
|
async deleteRoomSession(params) {
|
|
294
303
|
return this._client.fetch({
|
|
295
|
-
path:
|
|
304
|
+
path: "/v1/users/".concat(params.userId, "/sessions/").concat(params.sessionKey, "/").concat(params.sessionId),
|
|
296
305
|
method: 'DELETE',
|
|
297
306
|
data: {
|
|
298
|
-
target:
|
|
307
|
+
target: params.target,
|
|
299
308
|
targetUuids: params.receiverIds,
|
|
300
309
|
action: params.action,
|
|
301
310
|
payload: params.payload
|
|
@@ -305,7 +314,7 @@ class FcrCoreServiceApi {
|
|
|
305
314
|
/** peer session */
|
|
306
315
|
async updatePeerSession(params) {
|
|
307
316
|
return this._client.fetch({
|
|
308
|
-
path:
|
|
317
|
+
path: "/v1/users/".concat(params.userId, "/sessions/").concat(params.sessionKey, "/").concat(params.sessionId),
|
|
309
318
|
method: 'PUT',
|
|
310
319
|
data: {
|
|
311
320
|
target: 2,
|
|
@@ -317,7 +326,7 @@ class FcrCoreServiceApi {
|
|
|
317
326
|
}
|
|
318
327
|
async deletePeerSession(params) {
|
|
319
328
|
return this._client.fetch({
|
|
320
|
-
path:
|
|
329
|
+
path: "/v1/users/".concat(params.userId, "/sessions/").concat(params.sessionKey, "/").concat(params.sessionId),
|
|
321
330
|
method: 'DELETE',
|
|
322
331
|
data: {
|
|
323
332
|
target: 2,
|
|
@@ -332,7 +341,7 @@ class FcrCoreServiceApi {
|
|
|
332
341
|
data,
|
|
333
342
|
ts
|
|
334
343
|
} = await this._client.fetch({
|
|
335
|
-
path:
|
|
344
|
+
path: "/v1/rooms/".concat(params.roomId, "/users/").concat(params.userId, "/entry"),
|
|
336
345
|
method: 'PUT',
|
|
337
346
|
data: {
|
|
338
347
|
password: params.password,
|
|
@@ -359,7 +368,7 @@ class FcrCoreServiceApi {
|
|
|
359
368
|
data,
|
|
360
369
|
ts
|
|
361
370
|
} = await this._client.fetch({
|
|
362
|
-
path:
|
|
371
|
+
path: "/v1/rooms/".concat(params.roomId, "/users/").concat(params.userId, "/internal/entry"),
|
|
363
372
|
method: 'PUT',
|
|
364
373
|
data: {
|
|
365
374
|
password: params.password,
|
|
@@ -388,7 +397,7 @@ class FcrCoreServiceApi {
|
|
|
388
397
|
userId
|
|
389
398
|
} = params;
|
|
390
399
|
const res = await this._client.fetch({
|
|
391
|
-
path:
|
|
400
|
+
path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/info"),
|
|
392
401
|
method: 'PATCH',
|
|
393
402
|
data: {
|
|
394
403
|
userName
|
|
@@ -396,37 +405,39 @@ class FcrCoreServiceApi {
|
|
|
396
405
|
});
|
|
397
406
|
return res.data;
|
|
398
407
|
}
|
|
399
|
-
async updateUserProperties({
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
408
|
+
async updateUserProperties(_ref) {
|
|
409
|
+
let {
|
|
410
|
+
roomId,
|
|
411
|
+
userUuid,
|
|
412
|
+
properties,
|
|
413
|
+
increments,
|
|
414
|
+
cause
|
|
415
|
+
} = _ref;
|
|
406
416
|
const data = {
|
|
407
417
|
properties,
|
|
408
418
|
cause,
|
|
409
419
|
increments
|
|
410
420
|
};
|
|
411
421
|
const res = await this._client.fetch({
|
|
412
|
-
path:
|
|
422
|
+
path: "/v1/rooms/".concat(roomId, "/users/").concat(userUuid, "/properties"),
|
|
413
423
|
method: 'PUT',
|
|
414
424
|
data: data
|
|
415
425
|
});
|
|
416
426
|
return res.data;
|
|
417
427
|
}
|
|
418
|
-
async deleteUserProperties({
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
428
|
+
async deleteUserProperties(_ref2) {
|
|
429
|
+
let {
|
|
430
|
+
roomId,
|
|
431
|
+
userUuid,
|
|
432
|
+
properties,
|
|
433
|
+
cause
|
|
434
|
+
} = _ref2;
|
|
424
435
|
const data = {
|
|
425
436
|
properties,
|
|
426
437
|
cause
|
|
427
438
|
};
|
|
428
439
|
const res = await this._client.fetch({
|
|
429
|
-
path:
|
|
440
|
+
path: "/v1/rooms/".concat(roomId, "/users/").concat(userUuid, "/properties"),
|
|
430
441
|
method: 'DELETE',
|
|
431
442
|
data: {
|
|
432
443
|
users: data
|
|
@@ -434,35 +445,37 @@ class FcrCoreServiceApi {
|
|
|
434
445
|
});
|
|
435
446
|
return res.data;
|
|
436
447
|
}
|
|
437
|
-
async updateRoomProperties({
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
448
|
+
async updateRoomProperties(_ref3) {
|
|
449
|
+
let {
|
|
450
|
+
roomId,
|
|
451
|
+
properties,
|
|
452
|
+
increments,
|
|
453
|
+
cause
|
|
454
|
+
} = _ref3;
|
|
443
455
|
const data = {
|
|
444
456
|
properties,
|
|
445
457
|
cause,
|
|
446
458
|
increments
|
|
447
459
|
};
|
|
448
460
|
const res = await this._client.fetch({
|
|
449
|
-
path:
|
|
461
|
+
path: "/v1/rooms/".concat(roomId, "/properties"),
|
|
450
462
|
method: 'PUT',
|
|
451
463
|
data: data
|
|
452
464
|
});
|
|
453
465
|
return res.data;
|
|
454
466
|
}
|
|
455
|
-
async deleteRoomProperties({
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
467
|
+
async deleteRoomProperties(_ref4) {
|
|
468
|
+
let {
|
|
469
|
+
roomId,
|
|
470
|
+
properties,
|
|
471
|
+
cause
|
|
472
|
+
} = _ref4;
|
|
460
473
|
const data = {
|
|
461
474
|
properties,
|
|
462
475
|
cause
|
|
463
476
|
};
|
|
464
477
|
const res = await this._client.fetch({
|
|
465
|
-
path:
|
|
478
|
+
path: "/v1/rooms/".concat(roomId, "/properties"),
|
|
466
479
|
method: 'DELETE',
|
|
467
480
|
data: data
|
|
468
481
|
});
|
|
@@ -470,25 +483,26 @@ class FcrCoreServiceApi {
|
|
|
470
483
|
}
|
|
471
484
|
async getChatRoomToken(roomId, userId) {
|
|
472
485
|
const res = await this._client.fetch({
|
|
473
|
-
path:
|
|
486
|
+
path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/widgets/easemobIM/token"),
|
|
474
487
|
method: 'GET'
|
|
475
488
|
});
|
|
476
489
|
return res.data;
|
|
477
490
|
}
|
|
478
491
|
async getUserToken(userId) {
|
|
479
492
|
const res = await this._client.fetch({
|
|
480
|
-
path:
|
|
493
|
+
path: "/v1/users/".concat(userId, "/widgets/easemobIM/token"),
|
|
481
494
|
method: 'GET'
|
|
482
495
|
});
|
|
483
496
|
return res.data;
|
|
484
497
|
}
|
|
485
|
-
async enableLockedRoom({
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
498
|
+
async enableLockedRoom(_ref5) {
|
|
499
|
+
let {
|
|
500
|
+
roomId,
|
|
501
|
+
enable,
|
|
502
|
+
targetRoles
|
|
503
|
+
} = _ref5;
|
|
490
504
|
const res = await this._client.fetch({
|
|
491
|
-
path:
|
|
505
|
+
path: "/v1/rooms/".concat(roomId, "/lock/").concat(enable ? 1 : 0),
|
|
492
506
|
method: 'PUT',
|
|
493
507
|
data: {
|
|
494
508
|
targetRoles: targetRoles.map(role => _type.FcrPrivilegeUserRoleToStringMap[role])
|
|
@@ -496,13 +510,14 @@ class FcrCoreServiceApi {
|
|
|
496
510
|
});
|
|
497
511
|
return res.data;
|
|
498
512
|
}
|
|
499
|
-
async enablePassword({
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
513
|
+
async enablePassword(_ref6) {
|
|
514
|
+
let {
|
|
515
|
+
roomId,
|
|
516
|
+
enable,
|
|
517
|
+
password
|
|
518
|
+
} = _ref6;
|
|
504
519
|
const res = await this._client.fetch({
|
|
505
|
-
path:
|
|
520
|
+
path: "/v1/rooms/".concat(roomId, "/password/").concat(enable ? 1 : 0),
|
|
506
521
|
method: 'PUT',
|
|
507
522
|
data: {
|
|
508
523
|
password
|
|
@@ -510,19 +525,20 @@ class FcrCoreServiceApi {
|
|
|
510
525
|
});
|
|
511
526
|
return res.data;
|
|
512
527
|
}
|
|
513
|
-
async enableWaitingRoom({
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
528
|
+
async enableWaitingRoom(_ref7) {
|
|
529
|
+
let {
|
|
530
|
+
roomId,
|
|
531
|
+
enable
|
|
532
|
+
} = _ref7;
|
|
517
533
|
const res = await this._client.fetch({
|
|
518
|
-
path:
|
|
534
|
+
path: "/v1/rooms/".concat(roomId, "/waiting/").concat(enable ? 1 : 0),
|
|
519
535
|
method: 'PUT'
|
|
520
536
|
});
|
|
521
537
|
return res.data;
|
|
522
538
|
}
|
|
523
539
|
async moveToWaitingRoomByUserIds(userIds, roomId) {
|
|
524
540
|
const res = await this._client.fetch({
|
|
525
|
-
path:
|
|
541
|
+
path: "/v1/rooms/".concat(roomId, "/waiting/users"),
|
|
526
542
|
method: 'PUT',
|
|
527
543
|
data: {
|
|
528
544
|
toUserUuids: userIds
|
|
@@ -532,7 +548,7 @@ class FcrCoreServiceApi {
|
|
|
532
548
|
}
|
|
533
549
|
async moveToWaitingRoomByUserRoles(toRoles, roomId) {
|
|
534
550
|
const res = await this._client.fetch({
|
|
535
|
-
path:
|
|
551
|
+
path: "/v1/rooms/".concat(roomId, "/waiting/users"),
|
|
536
552
|
method: 'PUT',
|
|
537
553
|
data: {
|
|
538
554
|
toRoles
|
|
@@ -542,7 +558,7 @@ class FcrCoreServiceApi {
|
|
|
542
558
|
}
|
|
543
559
|
async moveToMainRoomByUserIds(userIds, roomId) {
|
|
544
560
|
const res = await this._client.fetch({
|
|
545
|
-
path:
|
|
561
|
+
path: "/v1/rooms/".concat(roomId, "/waiting/users"),
|
|
546
562
|
method: 'DELETE',
|
|
547
563
|
data: {
|
|
548
564
|
toUserUuids: userIds
|
|
@@ -552,7 +568,7 @@ class FcrCoreServiceApi {
|
|
|
552
568
|
}
|
|
553
569
|
async moveToMainRoomByUserRoles(toRoles, roomId) {
|
|
554
570
|
const res = await this._client.fetch({
|
|
555
|
-
path:
|
|
571
|
+
path: "/v1/rooms/".concat(roomId, "/waiting/users"),
|
|
556
572
|
method: 'DELETE',
|
|
557
573
|
data: {
|
|
558
574
|
toRoles
|
|
@@ -560,20 +576,21 @@ class FcrCoreServiceApi {
|
|
|
560
576
|
});
|
|
561
577
|
return res.data;
|
|
562
578
|
}
|
|
563
|
-
async allowSendChat({
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
579
|
+
async allowSendChat(_ref8) {
|
|
580
|
+
let {
|
|
581
|
+
roomId,
|
|
582
|
+
enable,
|
|
583
|
+
targetRoles,
|
|
584
|
+
payload
|
|
585
|
+
} = _ref8;
|
|
569
586
|
const res = await this._client.fetch({
|
|
570
|
-
path:
|
|
587
|
+
path: "/v1/rooms/".concat(roomId, "/security/chat/").concat(enable ? 1 : 0),
|
|
571
588
|
method: 'PUT',
|
|
572
589
|
data: {
|
|
573
590
|
targetRoles,
|
|
574
591
|
payload: {
|
|
575
|
-
public: payload
|
|
576
|
-
private: payload
|
|
592
|
+
public: (payload === null || payload === void 0 ? void 0 : payload.public) === undefined ? undefined : payload.public ? 1 : 0,
|
|
593
|
+
private: (payload === null || payload === void 0 ? void 0 : payload.private) === undefined ? undefined : {
|
|
577
594
|
host: payload.private.host ? 1 : 0,
|
|
578
595
|
cohost: payload.private.cohost ? 1 : 0,
|
|
579
596
|
participant: payload.private.participant ? 1 : 0
|
|
@@ -583,13 +600,14 @@ class FcrCoreServiceApi {
|
|
|
583
600
|
});
|
|
584
601
|
return res.data;
|
|
585
602
|
}
|
|
586
|
-
async allowChangeName({
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
603
|
+
async allowChangeName(_ref9) {
|
|
604
|
+
let {
|
|
605
|
+
roomId,
|
|
606
|
+
enable,
|
|
607
|
+
targetRoles
|
|
608
|
+
} = _ref9;
|
|
591
609
|
const res = await this._client.fetch({
|
|
592
|
-
path:
|
|
610
|
+
path: "/v1/rooms/".concat(roomId, "/security/changeName/").concat(enable ? 1 : 0),
|
|
593
611
|
method: 'PUT',
|
|
594
612
|
data: {
|
|
595
613
|
targetRoles
|
|
@@ -597,13 +615,14 @@ class FcrCoreServiceApi {
|
|
|
597
615
|
});
|
|
598
616
|
return res.data;
|
|
599
617
|
}
|
|
600
|
-
async allowStartAudio({
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
618
|
+
async allowStartAudio(_ref0) {
|
|
619
|
+
let {
|
|
620
|
+
roomId,
|
|
621
|
+
enable,
|
|
622
|
+
targetRoles
|
|
623
|
+
} = _ref0;
|
|
605
624
|
const res = await this._client.fetch({
|
|
606
|
-
path:
|
|
625
|
+
path: "/v1/rooms/".concat(roomId, "/security/unmuteAudio/").concat(enable ? 1 : 0),
|
|
607
626
|
method: 'PUT',
|
|
608
627
|
data: {
|
|
609
628
|
targetRoles
|
|
@@ -619,13 +638,11 @@ class FcrCoreServiceApi {
|
|
|
619
638
|
payload
|
|
620
639
|
} = params;
|
|
621
640
|
const res = await this._client.fetch({
|
|
622
|
-
path:
|
|
641
|
+
path: "/v1/rooms/".concat(roomId, "/security/watermark/").concat(enable ? 1 : 0),
|
|
623
642
|
method: 'PUT',
|
|
624
643
|
data: {
|
|
625
644
|
targetRoles,
|
|
626
|
-
payload: {
|
|
627
|
-
...payload
|
|
628
|
-
}
|
|
645
|
+
payload: _objectSpread({}, payload)
|
|
629
646
|
}
|
|
630
647
|
});
|
|
631
648
|
return res.data;
|
|
@@ -637,7 +654,7 @@ class FcrCoreServiceApi {
|
|
|
637
654
|
targetRoles
|
|
638
655
|
} = params;
|
|
639
656
|
const res = await this._client.fetch({
|
|
640
|
-
path:
|
|
657
|
+
path: "/v1/rooms/".concat(roomId, "/security/changeName/").concat(enable ? 1 : 0),
|
|
641
658
|
method: 'PUT',
|
|
642
659
|
data: {
|
|
643
660
|
targetRoles
|
|
@@ -645,13 +662,29 @@ class FcrCoreServiceApi {
|
|
|
645
662
|
});
|
|
646
663
|
return res.data;
|
|
647
664
|
}
|
|
648
|
-
async
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
665
|
+
async allowJoinWithPromptSound(_ref1) {
|
|
666
|
+
let {
|
|
667
|
+
roomId,
|
|
668
|
+
enable,
|
|
669
|
+
targetRoles
|
|
670
|
+
} = _ref1;
|
|
671
|
+
const res = await this._client.fetch({
|
|
672
|
+
path: "/v1/rooms/".concat(roomId, "/security/joinWithPromptSound/").concat(enable ? 1 : 0),
|
|
673
|
+
method: 'PUT',
|
|
674
|
+
data: {
|
|
675
|
+
targetRoles
|
|
676
|
+
}
|
|
677
|
+
});
|
|
678
|
+
return res.data;
|
|
679
|
+
}
|
|
680
|
+
async allowStartVideo(_ref10) {
|
|
681
|
+
let {
|
|
682
|
+
roomId,
|
|
683
|
+
enable,
|
|
684
|
+
targetRoles
|
|
685
|
+
} = _ref10;
|
|
653
686
|
const res = await this._client.fetch({
|
|
654
|
-
path:
|
|
687
|
+
path: "/v1/rooms/".concat(roomId, "/security/openVideo/").concat(enable ? 1 : 0),
|
|
655
688
|
method: 'PUT',
|
|
656
689
|
data: {
|
|
657
690
|
targetRoles
|
|
@@ -659,13 +692,14 @@ class FcrCoreServiceApi {
|
|
|
659
692
|
});
|
|
660
693
|
return res.data;
|
|
661
694
|
}
|
|
662
|
-
async allowJoinWithMuteAudio({
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
695
|
+
async allowJoinWithMuteAudio(_ref11) {
|
|
696
|
+
let {
|
|
697
|
+
roomId,
|
|
698
|
+
enable,
|
|
699
|
+
targetRoles
|
|
700
|
+
} = _ref11;
|
|
667
701
|
const res = await this._client.fetch({
|
|
668
|
-
path:
|
|
702
|
+
path: "/v1/rooms/".concat(roomId, "/security/joinWithMuteAudio/").concat(enable ? 1 : 0),
|
|
669
703
|
method: 'PUT',
|
|
670
704
|
data: {
|
|
671
705
|
targetRoles
|
|
@@ -673,13 +707,14 @@ class FcrCoreServiceApi {
|
|
|
673
707
|
});
|
|
674
708
|
return res.data;
|
|
675
709
|
}
|
|
676
|
-
async allowJoinWithMutedVideo({
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
710
|
+
async allowJoinWithMutedVideo(_ref12) {
|
|
711
|
+
let {
|
|
712
|
+
roomId,
|
|
713
|
+
enable,
|
|
714
|
+
targetRoles
|
|
715
|
+
} = _ref12;
|
|
681
716
|
const res = await this._client.fetch({
|
|
682
|
-
path:
|
|
717
|
+
path: "/v1/rooms/".concat(roomId, "/security/joinWithCloseVideo/").concat(enable ? 1 : 0),
|
|
683
718
|
method: 'PUT',
|
|
684
719
|
data: {
|
|
685
720
|
targetRoles
|
|
@@ -687,14 +722,15 @@ class FcrCoreServiceApi {
|
|
|
687
722
|
});
|
|
688
723
|
return res.data;
|
|
689
724
|
}
|
|
690
|
-
async updateUserRole({
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
725
|
+
async updateUserRole(_ref13) {
|
|
726
|
+
let {
|
|
727
|
+
roomId,
|
|
728
|
+
localRole,
|
|
729
|
+
remoteRole,
|
|
730
|
+
userId
|
|
731
|
+
} = _ref13;
|
|
696
732
|
const res = await this._client.fetch({
|
|
697
|
-
path:
|
|
733
|
+
path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/role"),
|
|
698
734
|
method: 'PUT',
|
|
699
735
|
data: {
|
|
700
736
|
remoteRole,
|
|
@@ -703,14 +739,15 @@ class FcrCoreServiceApi {
|
|
|
703
739
|
});
|
|
704
740
|
return res.data;
|
|
705
741
|
}
|
|
706
|
-
async revokeUserRole({
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
742
|
+
async revokeUserRole(_ref14) {
|
|
743
|
+
let {
|
|
744
|
+
roomId,
|
|
745
|
+
remoteRole,
|
|
746
|
+
localRole,
|
|
747
|
+
userId
|
|
748
|
+
} = _ref14;
|
|
712
749
|
const res = await this._client.fetch({
|
|
713
|
-
path:
|
|
750
|
+
path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/role"),
|
|
714
751
|
method: 'DELETE',
|
|
715
752
|
data: {
|
|
716
753
|
remoteRole,
|
|
@@ -719,13 +756,14 @@ class FcrCoreServiceApi {
|
|
|
719
756
|
});
|
|
720
757
|
return res.data;
|
|
721
758
|
}
|
|
722
|
-
async claimHost({
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
759
|
+
async claimHost(_ref15) {
|
|
760
|
+
let {
|
|
761
|
+
roomId,
|
|
762
|
+
userId,
|
|
763
|
+
hostKey
|
|
764
|
+
} = _ref15;
|
|
727
765
|
const res = await this._client.fetch({
|
|
728
|
-
path:
|
|
766
|
+
path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/claim/host"),
|
|
729
767
|
method: 'POST',
|
|
730
768
|
data: {
|
|
731
769
|
hostKey
|
|
@@ -735,14 +773,14 @@ class FcrCoreServiceApi {
|
|
|
735
773
|
}
|
|
736
774
|
async stopLiveStreaming(roomId) {
|
|
737
775
|
const res = await this._client.fetch({
|
|
738
|
-
path:
|
|
776
|
+
path: "/v1/rooms/".concat(roomId, "/live/states/0"),
|
|
739
777
|
method: 'PUT'
|
|
740
778
|
});
|
|
741
779
|
return res;
|
|
742
780
|
}
|
|
743
781
|
async updateLiveStreamingLayout(roomId, layoutType) {
|
|
744
782
|
const res = await this._client.fetch({
|
|
745
|
-
path:
|
|
783
|
+
path: "/v1/rooms/".concat(roomId, "/live/states/1"),
|
|
746
784
|
method: 'PATCH',
|
|
747
785
|
data: {
|
|
748
786
|
layoutType: layoutType
|
|
@@ -752,7 +790,7 @@ class FcrCoreServiceApi {
|
|
|
752
790
|
}
|
|
753
791
|
async startLiveStreaming(roomId, data) {
|
|
754
792
|
const res = await this._client.fetch({
|
|
755
|
-
path:
|
|
793
|
+
path: "/v1/rooms/".concat(roomId, "/live/states/1"),
|
|
756
794
|
method: 'PUT',
|
|
757
795
|
data: {
|
|
758
796
|
streamUrl: data.pushStreamingUrl,
|
|
@@ -763,13 +801,14 @@ class FcrCoreServiceApi {
|
|
|
763
801
|
});
|
|
764
802
|
return res;
|
|
765
803
|
}
|
|
766
|
-
async callIp({
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
804
|
+
async callIp(_ref16) {
|
|
805
|
+
let {
|
|
806
|
+
roomId,
|
|
807
|
+
callType,
|
|
808
|
+
ipAddress
|
|
809
|
+
} = _ref16;
|
|
771
810
|
const res = await this._client.fetch({
|
|
772
|
-
path:
|
|
811
|
+
path: "/v1/rooms/".concat(roomId, "/call/").concat(callType),
|
|
773
812
|
method: 'POST',
|
|
774
813
|
data: {
|
|
775
814
|
ipAddress
|
|
@@ -777,14 +816,15 @@ class FcrCoreServiceApi {
|
|
|
777
816
|
});
|
|
778
817
|
return res;
|
|
779
818
|
}
|
|
780
|
-
async callPstn({
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
819
|
+
async callPstn(_ref17) {
|
|
820
|
+
let {
|
|
821
|
+
roomId,
|
|
822
|
+
userName,
|
|
823
|
+
userId,
|
|
824
|
+
callNumber
|
|
825
|
+
} = _ref17;
|
|
786
826
|
const res = await this._client.fetch({
|
|
787
|
-
path:
|
|
827
|
+
path: "/v1/rooms/".concat(roomId, "/call/pstn"),
|
|
788
828
|
method: 'POST',
|
|
789
829
|
data: {
|
|
790
830
|
callNumber,
|
|
@@ -794,13 +834,14 @@ class FcrCoreServiceApi {
|
|
|
794
834
|
});
|
|
795
835
|
return res;
|
|
796
836
|
}
|
|
797
|
-
async hangup({
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
837
|
+
async hangup(_ref18) {
|
|
838
|
+
let {
|
|
839
|
+
roomId,
|
|
840
|
+
userId,
|
|
841
|
+
callId
|
|
842
|
+
} = _ref18;
|
|
802
843
|
const res = await this._client.fetch({
|
|
803
|
-
path:
|
|
844
|
+
path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/call/").concat(callId),
|
|
804
845
|
method: 'DELETE'
|
|
805
846
|
});
|
|
806
847
|
return res;
|
|
@@ -809,12 +850,13 @@ class FcrCoreServiceApi {
|
|
|
809
850
|
/**
|
|
810
851
|
* @description 获取白板信息
|
|
811
852
|
*/
|
|
812
|
-
async getWhiteboardToken({
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
853
|
+
async getWhiteboardToken(_ref19) {
|
|
854
|
+
let {
|
|
855
|
+
roomId,
|
|
856
|
+
userId
|
|
857
|
+
} = _ref19;
|
|
816
858
|
return this._client.fetch({
|
|
817
|
-
path:
|
|
859
|
+
path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/widgets/netlessBoard/token"),
|
|
818
860
|
method: 'GET'
|
|
819
861
|
});
|
|
820
862
|
}
|
|
@@ -822,12 +864,13 @@ class FcrCoreServiceApi {
|
|
|
822
864
|
/**
|
|
823
865
|
* @description 获取批注token
|
|
824
866
|
*/
|
|
825
|
-
async getAnnotationToken({
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
867
|
+
async getAnnotationToken(_ref20) {
|
|
868
|
+
let {
|
|
869
|
+
roomId,
|
|
870
|
+
userId
|
|
871
|
+
} = _ref20;
|
|
829
872
|
return this._client.fetch({
|
|
830
|
-
path:
|
|
873
|
+
path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/widgets/annotation/token"),
|
|
831
874
|
method: 'GET'
|
|
832
875
|
});
|
|
833
876
|
}
|
|
@@ -837,7 +880,7 @@ class FcrCoreServiceApi {
|
|
|
837
880
|
*/
|
|
838
881
|
async toggleAnnotationActivityState(roomId, state) {
|
|
839
882
|
return this._client.fetch({
|
|
840
|
-
path:
|
|
883
|
+
path: "/v1/rooms/".concat(roomId, "/widgets/annotation/states/").concat(state),
|
|
841
884
|
method: 'PUT'
|
|
842
885
|
});
|
|
843
886
|
}
|
|
@@ -847,7 +890,7 @@ class FcrCoreServiceApi {
|
|
|
847
890
|
*/
|
|
848
891
|
async syncScreenShareOwnerAnnotationOpenDone(roomId) {
|
|
849
892
|
return this._client.fetch({
|
|
850
|
-
path:
|
|
893
|
+
path: "/v1/rooms/".concat(roomId, "/widgets/annotation/states/1"),
|
|
851
894
|
method: 'PUT',
|
|
852
895
|
retryFallbackDomainsWhenFail: true
|
|
853
896
|
});
|
|
@@ -864,13 +907,31 @@ class FcrCoreServiceApi {
|
|
|
864
907
|
payload
|
|
865
908
|
} = params;
|
|
866
909
|
return this._client.fetch({
|
|
867
|
-
path:
|
|
910
|
+
path: "/v1/rooms/".concat(roomId, "/security/sharing/").concat(enable ? 1 : 0),
|
|
868
911
|
method: 'PUT',
|
|
869
912
|
data: {
|
|
870
913
|
targetRoles,
|
|
871
|
-
payload: {
|
|
872
|
-
|
|
873
|
-
|
|
914
|
+
payload: _objectSpread({}, payload)
|
|
915
|
+
}
|
|
916
|
+
});
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* @description 设置'启用/禁用屏幕共享&白板'的用户列表
|
|
921
|
+
*/
|
|
922
|
+
async toggleShareEnableByUserIds(params) {
|
|
923
|
+
const {
|
|
924
|
+
roomId,
|
|
925
|
+
enable,
|
|
926
|
+
toUserUuids,
|
|
927
|
+
payload
|
|
928
|
+
} = params;
|
|
929
|
+
return this._client.fetch({
|
|
930
|
+
path: "/v1/rooms/".concat(roomId, "/security/sharing/users/").concat(enable ? 1 : 0),
|
|
931
|
+
method: 'PUT',
|
|
932
|
+
data: {
|
|
933
|
+
toUserUuids,
|
|
934
|
+
payload: _objectSpread({}, payload)
|
|
874
935
|
}
|
|
875
936
|
});
|
|
876
937
|
}
|
|
@@ -886,7 +947,7 @@ class FcrCoreServiceApi {
|
|
|
886
947
|
data
|
|
887
948
|
} = params;
|
|
888
949
|
return this._client.fetch({
|
|
889
|
-
path:
|
|
950
|
+
path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/streams/screen/states/").concat(enable ? 1 : 0),
|
|
890
951
|
method: 'PUT',
|
|
891
952
|
data
|
|
892
953
|
});
|
|
@@ -897,7 +958,7 @@ class FcrCoreServiceApi {
|
|
|
897
958
|
*/
|
|
898
959
|
async toggleWhiteboardActivityState(roomId, state) {
|
|
899
960
|
return this._client.fetch({
|
|
900
|
-
path:
|
|
961
|
+
path: "/v1/rooms/".concat(roomId, "/widgets/netlessBoard/states/").concat(state),
|
|
901
962
|
method: 'PUT'
|
|
902
963
|
});
|
|
903
964
|
}
|
|
@@ -913,13 +974,11 @@ class FcrCoreServiceApi {
|
|
|
913
974
|
targetRoles
|
|
914
975
|
} = params;
|
|
915
976
|
return this._client.fetch({
|
|
916
|
-
path:
|
|
977
|
+
path: "/v1/rooms/".concat(roomId, "/security/annotation/", 1),
|
|
917
978
|
method: 'PUT',
|
|
918
979
|
data: {
|
|
919
980
|
targetRoles,
|
|
920
|
-
payload: {
|
|
921
|
-
...payload
|
|
922
|
-
}
|
|
981
|
+
payload: _objectSpread({}, payload)
|
|
923
982
|
}
|
|
924
983
|
});
|
|
925
984
|
}
|
|
@@ -933,7 +992,7 @@ class FcrCoreServiceApi {
|
|
|
933
992
|
backgroundColor
|
|
934
993
|
} = params;
|
|
935
994
|
return this._client.fetch({
|
|
936
|
-
path:
|
|
995
|
+
path: "/v1/rooms/".concat(roomId, "/widgets/netlessBoard/info"),
|
|
937
996
|
method: 'PUT',
|
|
938
997
|
data: {
|
|
939
998
|
backgroundColor
|
|
@@ -947,7 +1006,7 @@ class FcrCoreServiceApi {
|
|
|
947
1006
|
config
|
|
948
1007
|
} = params;
|
|
949
1008
|
const res = this._client.fetch({
|
|
950
|
-
path:
|
|
1009
|
+
path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/streams/screen/states/1"),
|
|
951
1010
|
method: 'PUT',
|
|
952
1011
|
data: config
|
|
953
1012
|
});
|
|
@@ -959,7 +1018,7 @@ class FcrCoreServiceApi {
|
|
|
959
1018
|
userId
|
|
960
1019
|
} = params;
|
|
961
1020
|
const res = this._client.fetch({
|
|
962
|
-
path:
|
|
1021
|
+
path: "/v1/rooms/".concat(roomId, "/users/").concat(userId, "/streams/screen/states/0"),
|
|
963
1022
|
method: 'PUT'
|
|
964
1023
|
});
|
|
965
1024
|
return res;
|
|
@@ -970,7 +1029,7 @@ class FcrCoreServiceApi {
|
|
|
970
1029
|
data
|
|
971
1030
|
} = params;
|
|
972
1031
|
const res = this._client.fetch({
|
|
973
|
-
path:
|
|
1032
|
+
path: "/v1/rooms/".concat(roomId, "/interpreter/states/1"),
|
|
974
1033
|
method: 'PUT',
|
|
975
1034
|
data
|
|
976
1035
|
});
|
|
@@ -984,7 +1043,7 @@ class FcrCoreServiceApi {
|
|
|
984
1043
|
roomId
|
|
985
1044
|
} = params;
|
|
986
1045
|
const res = this._client.fetch({
|
|
987
|
-
path:
|
|
1046
|
+
path: "/v1/rooms/".concat(roomId, "/interpreter/states/0"),
|
|
988
1047
|
method: 'PUT',
|
|
989
1048
|
data: {}
|
|
990
1049
|
});
|
|
@@ -992,7 +1051,7 @@ class FcrCoreServiceApi {
|
|
|
992
1051
|
}
|
|
993
1052
|
async createStreamBatch(roomUuid, streams) {
|
|
994
1053
|
return await this._client.fetch({
|
|
995
|
-
path:
|
|
1054
|
+
path: "/v1/rooms/".concat(roomUuid, "/streams"),
|
|
996
1055
|
method: 'POST',
|
|
997
1056
|
data: {
|
|
998
1057
|
streams
|
|
@@ -1001,23 +1060,24 @@ class FcrCoreServiceApi {
|
|
|
1001
1060
|
}
|
|
1002
1061
|
async updateStreamBatch(roomUuid, streams) {
|
|
1003
1062
|
return await this._client.fetch({
|
|
1004
|
-
path:
|
|
1063
|
+
path: "/v1/rooms/".concat(roomUuid, "/streams"),
|
|
1005
1064
|
method: 'PUT',
|
|
1006
1065
|
data: {
|
|
1007
1066
|
streams
|
|
1008
1067
|
}
|
|
1009
1068
|
});
|
|
1010
1069
|
}
|
|
1011
|
-
async updateStreamBatchByCondition({
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1070
|
+
async updateStreamBatchByCondition(_ref21) {
|
|
1071
|
+
let {
|
|
1072
|
+
roomUuid,
|
|
1073
|
+
videoState,
|
|
1074
|
+
audioState,
|
|
1075
|
+
includeRoles,
|
|
1076
|
+
excludeRoles,
|
|
1077
|
+
condition
|
|
1078
|
+
} = _ref21;
|
|
1019
1079
|
return await this._client.fetch({
|
|
1020
|
-
path:
|
|
1080
|
+
path: "/v1/rooms/".concat(roomUuid, "/conditions/streams"),
|
|
1021
1081
|
method: 'PUT',
|
|
1022
1082
|
data: {
|
|
1023
1083
|
includeRoles,
|
|
@@ -1032,12 +1092,145 @@ class FcrCoreServiceApi {
|
|
|
1032
1092
|
}
|
|
1033
1093
|
async deleteStreamBatch(roomUuid, streams) {
|
|
1034
1094
|
return await this._client.fetch({
|
|
1035
|
-
path:
|
|
1095
|
+
path: "/v1/rooms/".concat(roomUuid, "/streams"),
|
|
1036
1096
|
method: 'DELETE',
|
|
1037
1097
|
data: {
|
|
1038
1098
|
streams
|
|
1039
1099
|
}
|
|
1040
1100
|
});
|
|
1041
1101
|
}
|
|
1102
|
+
async startCaption(params) {
|
|
1103
|
+
const {
|
|
1104
|
+
roomUuid,
|
|
1105
|
+
userUuid,
|
|
1106
|
+
config
|
|
1107
|
+
} = params;
|
|
1108
|
+
return await this._client.fetch({
|
|
1109
|
+
path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/widgets/stt/caption/states/1"),
|
|
1110
|
+
method: 'PUT',
|
|
1111
|
+
data: {
|
|
1112
|
+
source: config.sourceLanguage,
|
|
1113
|
+
target: config.targetLanguage ? [config.targetLanguage] : undefined
|
|
1114
|
+
}
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
async stopCaption(params) {
|
|
1118
|
+
const {
|
|
1119
|
+
roomUuid,
|
|
1120
|
+
userUuid
|
|
1121
|
+
} = params;
|
|
1122
|
+
return await this._client.fetch({
|
|
1123
|
+
path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/widgets/stt/caption/states/0"),
|
|
1124
|
+
method: 'PUT'
|
|
1125
|
+
});
|
|
1126
|
+
}
|
|
1127
|
+
async startTranscribing(params) {
|
|
1128
|
+
const {
|
|
1129
|
+
roomUuid,
|
|
1130
|
+
userUuid,
|
|
1131
|
+
config
|
|
1132
|
+
} = params;
|
|
1133
|
+
return await this._client.fetch({
|
|
1134
|
+
path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/widgets/stt/transcribe/states/1"),
|
|
1135
|
+
method: 'PUT',
|
|
1136
|
+
data: {
|
|
1137
|
+
source: config.sourceLanguage,
|
|
1138
|
+
target: config.targetLanguage ? [config.targetLanguage] : undefined
|
|
1139
|
+
}
|
|
1140
|
+
});
|
|
1141
|
+
}
|
|
1142
|
+
async stopTranscribing(params) {
|
|
1143
|
+
const {
|
|
1144
|
+
roomUuid,
|
|
1145
|
+
userUuid
|
|
1146
|
+
} = params;
|
|
1147
|
+
return await this._client.fetch({
|
|
1148
|
+
path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/widgets/stt/transcribe/states/0"),
|
|
1149
|
+
method: 'PUT'
|
|
1150
|
+
});
|
|
1151
|
+
}
|
|
1152
|
+
async updateSourceLanguage(params) {
|
|
1153
|
+
const {
|
|
1154
|
+
roomUuid,
|
|
1155
|
+
userUuid,
|
|
1156
|
+
language
|
|
1157
|
+
} = params;
|
|
1158
|
+
return await this._client.fetch({
|
|
1159
|
+
path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/widgets/stt/language/speech"),
|
|
1160
|
+
method: 'PATCH',
|
|
1161
|
+
data: {
|
|
1162
|
+
source: language
|
|
1163
|
+
}
|
|
1164
|
+
});
|
|
1165
|
+
}
|
|
1166
|
+
async subscribeTranscribingLanguage(params) {
|
|
1167
|
+
const {
|
|
1168
|
+
roomUuid,
|
|
1169
|
+
userUuid,
|
|
1170
|
+
language
|
|
1171
|
+
} = params;
|
|
1172
|
+
return await this._client.fetch({
|
|
1173
|
+
path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/widgets/stt/language/subscribe/1"),
|
|
1174
|
+
method: 'PATCH',
|
|
1175
|
+
data: {
|
|
1176
|
+
target: [language]
|
|
1177
|
+
}
|
|
1178
|
+
});
|
|
1179
|
+
}
|
|
1180
|
+
async unsubscribeTranscribingLanguage(params) {
|
|
1181
|
+
const {
|
|
1182
|
+
roomUuid,
|
|
1183
|
+
userUuid
|
|
1184
|
+
} = params;
|
|
1185
|
+
return await this._client.fetch({
|
|
1186
|
+
path: "/v1/rooms/".concat(roomUuid, "/users/").concat(userUuid, "/widgets/stt/language/subscribe/0"),
|
|
1187
|
+
method: 'PATCH'
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
async allowStartCaption(params) {
|
|
1191
|
+
const {
|
|
1192
|
+
roomUuid,
|
|
1193
|
+
enable,
|
|
1194
|
+
targetRoles
|
|
1195
|
+
} = params;
|
|
1196
|
+
return await this._client.fetch({
|
|
1197
|
+
path: "/v1/rooms/".concat(roomUuid, "/security/caption/").concat(enable ? 1 : 0),
|
|
1198
|
+
method: 'PUT',
|
|
1199
|
+
data: {
|
|
1200
|
+
targetRoles
|
|
1201
|
+
}
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
1204
|
+
async allowStartTranscribing(params) {
|
|
1205
|
+
const {
|
|
1206
|
+
roomUuid,
|
|
1207
|
+
enable,
|
|
1208
|
+
targetRoles
|
|
1209
|
+
} = params;
|
|
1210
|
+
return await this._client.fetch({
|
|
1211
|
+
path: "/v1/rooms/".concat(roomUuid, "/security/transcribe/").concat(enable ? 1 : 0),
|
|
1212
|
+
method: 'PUT',
|
|
1213
|
+
data: {
|
|
1214
|
+
targetRoles
|
|
1215
|
+
}
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
1218
|
+
async allowUpdateSttSourceLanguage(params) {
|
|
1219
|
+
const {
|
|
1220
|
+
roomUuid,
|
|
1221
|
+
enable,
|
|
1222
|
+
targetRoles
|
|
1223
|
+
} = params;
|
|
1224
|
+
return await this._client.fetch({
|
|
1225
|
+
path: "/v1/rooms/".concat(roomUuid, "/security/stt/").concat(enable ? 1 : 0),
|
|
1226
|
+
method: 'PUT',
|
|
1227
|
+
data: {
|
|
1228
|
+
targetRoles,
|
|
1229
|
+
payload: {
|
|
1230
|
+
modify: enable ? 1 : 0
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
});
|
|
1234
|
+
}
|
|
1042
1235
|
}
|
|
1043
1236
|
exports.FcrCoreServiceApi = FcrCoreServiceApi;
|