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