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