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