@tencentcloud/sdk-mcp 1.3.1 → 1.3.2
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/index.js +5 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/resource/doc/chatuikit/faq/web_sdk/faq.md +117 -0
- package/resource/doc/chatuikit/flutter/client_api_Flutter.md +100 -179
- package/resource/doc/chatuikit/flutter/faq.md +17 -112
- package/resource/doc/chatuikit/flutter/integrate_tuikit_Flutter.md +272 -1281
- package/resource/doc/roomkit/vue/features/call-user-to-room.md +256 -0
- package/resource/doc/roomkit/vue/features/device-detection.md +388 -0
- package/resource/doc/roomkit/vue/features/device-state.md +480 -0
- package/resource/doc/roomkit/vue/features/free-beauty-panel.md +238 -0
- package/resource/doc/roomkit/vue/features/room-chat.md +427 -0
- package/resource/doc/roomkit/vue/features/room-participant-state.md +407 -0
- package/resource/doc/roomkit/vue/features/room-state.md +291 -0
- package/resource/doc/roomkit/vue/features/room-view.md +338 -0
- package/resource/doc/roomkit/vue/features/schedule-room.md +349 -0
- package/resource/doc/roomkit/vue/features/screen-share.md +333 -0
- package/resource/doc/roomkit/vue/features/virtual-background.md +281 -0
- package/resource/doc/roomkit/vue/features/workflow.md +553 -0
- package/resource/doc/roomkit/vue/integration.md +479 -0
- package/resource/doc/roomkit/vue/workflow.md +487 -0
- package/resource/doc/tuicallkit/react/api.md +16 -0
- package/resource/doc/tuicallkit/vue/api.md +16 -0
- package/tools/definitions/get_web_live_uikit_integration_def.js +1 -1
- package/tools/definitions/get_web_room_feature_detail_def.js +95 -0
- package/tools/definitions/get_web_room_feature_detail_def.js.map +1 -0
- package/tools/definitions/get_web_room_uikit_integration_def.js +44 -0
- package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -0
- package/tools/index.js +4 -2
- package/tools/index.js.map +1 -1
- package/tools/room/get-web-room-feature-detail.js +68 -0
- package/tools/room/get-web-room-feature-detail.js.map +1 -0
- package/tools/room/get-web-room-integration.js +43 -0
- package/tools/room/get-web-room-integration.js.map +1 -0
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
- package/resource/doc/roomkit/vue/states/device-state.md +0 -316
- package/resource/doc/roomkit/vue/states/login-state.md +0 -51
- package/resource/doc/roomkit/vue/states/room-list-state.md +0 -287
- package/resource/doc/roomkit/vue/states/room-participant-state.md +0 -307
- package/tools/definitions/get_web_room_state_detail_def.js +0 -19
- package/tools/definitions/get_web_room_state_detail_def.js.map +0 -1
- package/tools/room/get-web-room-state-detail.js +0 -31
- package/tools/room/get-web-room-state-detail.js.map +0 -1
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
# Room List State Documentation
|
|
2
|
-
|
|
3
|
-
Room 房间列表 State API 文档。
|
|
4
|
-
|
|
5
|
-
## 安装依赖
|
|
6
|
-
|
|
7
|
-
您可以选择以下任一方式安装依赖:
|
|
8
|
-
【npm】
|
|
9
|
-
``` bash
|
|
10
|
-
npm install tuikit-atomicx-vue3@latest --save
|
|
11
|
-
```
|
|
12
|
-
【pnpm】
|
|
13
|
-
``` bash
|
|
14
|
-
pnpm add tuikit-atomicx-vue3@latest
|
|
15
|
-
```
|
|
16
|
-
【yarn】
|
|
17
|
-
``` bash
|
|
18
|
-
yarn add tuikit-atomicx-vue3@latest
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Enums
|
|
22
|
-
|
|
23
|
-
### RoomStatus
|
|
24
|
-
房间状态枚举
|
|
25
|
-
|
|
26
|
-
```typescript
|
|
27
|
-
export enum RoomStatus {
|
|
28
|
-
Scheduled = 1, // 已预约
|
|
29
|
-
Running = 2, // 进行中
|
|
30
|
-
}
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
### RoomEndedReason
|
|
34
|
-
房间结束原因枚举
|
|
35
|
-
|
|
36
|
-
```typescript
|
|
37
|
-
export enum RoomEndedReason {
|
|
38
|
-
ByOwner = 1, // 由房主结束
|
|
39
|
-
ByServer = 2, // 由服务器结束
|
|
40
|
-
}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### RoomInvitationStatus
|
|
44
|
-
房间邀请状态枚举
|
|
45
|
-
|
|
46
|
-
```typescript
|
|
47
|
-
export enum RoomInvitationStatus {
|
|
48
|
-
None = 0, // 无状态
|
|
49
|
-
Pending = 1, // 等待中
|
|
50
|
-
Timeout = 2, // 超时
|
|
51
|
-
Rejected = 3, // 已拒绝
|
|
52
|
-
}
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### InvitationRejectedReason
|
|
56
|
-
邀请拒绝原因枚举
|
|
57
|
-
|
|
58
|
-
```typescript
|
|
59
|
-
export enum InvitationRejectedReason {
|
|
60
|
-
Rejected = "Rejected", // 拒绝
|
|
61
|
-
Busy = "Busy", // 忙碌
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
## Interfaces
|
|
66
|
-
|
|
67
|
-
### RoomUser
|
|
68
|
-
房间用户信息
|
|
69
|
-
|
|
70
|
-
```typescript
|
|
71
|
-
export interface RoomUser {
|
|
72
|
-
userId: string; // 用户ID
|
|
73
|
-
userName: string; // 用户名
|
|
74
|
-
avatarURL: string; // 头像URL
|
|
75
|
-
}
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### RoomInfo
|
|
79
|
-
房间信息
|
|
80
|
-
|
|
81
|
-
```typescript
|
|
82
|
-
export interface RoomInfo {
|
|
83
|
-
readonly roomId: string; // 房间ID(只读)
|
|
84
|
-
roomName: string; // 房间名称
|
|
85
|
-
roomOwner: RoomUser; // 房间所有者
|
|
86
|
-
readonly participantCount: number; // 参与者数量(只读)
|
|
87
|
-
readonly createTime: number; // 创建时间(只读)
|
|
88
|
-
readonly roomStatus: RoomStatus; // 房间状态(只读)
|
|
89
|
-
scheduledStartTime?: number; // 预约开始时间(可选)
|
|
90
|
-
scheduledEndTime?: number; // 预约结束时间(可选)
|
|
91
|
-
startReminderInSeconds?: number; // 开始前提醒时间(秒)(可选)
|
|
92
|
-
scheduleAttendees?: RoomUser[]; // 预约参与者列表(可选)
|
|
93
|
-
password?: string; // 房间密码(可选)
|
|
94
|
-
isAllMicrophoneDisabled: boolean; // 是否禁用所有麦克风
|
|
95
|
-
isAllCameraDisabled: boolean; // 是否禁用所有摄像头
|
|
96
|
-
isAllScreenShareDisabled: boolean; // 是否禁用所有屏幕共享
|
|
97
|
-
isAllMessageDisabled: boolean; // 是否禁用所有消息
|
|
98
|
-
}
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### RoomInvitation
|
|
102
|
-
房间邀请信息
|
|
103
|
-
|
|
104
|
-
```typescript
|
|
105
|
-
export interface RoomInvitation {
|
|
106
|
-
roomInfo: RoomInfo; // 房间信息
|
|
107
|
-
inviter: RoomUser; // 邀请者
|
|
108
|
-
invitee: RoomUser; // 被邀请者
|
|
109
|
-
status: RoomInvitationStatus; // 邀请状态
|
|
110
|
-
}
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## Type Definitions
|
|
114
|
-
|
|
115
|
-
### ScheduleRoomOptions
|
|
116
|
-
预约房间选项
|
|
117
|
-
|
|
118
|
-
```typescript
|
|
119
|
-
export type ScheduleRoomOptions = {
|
|
120
|
-
roomName?: string; // 房间名称(可选)
|
|
121
|
-
password?: string; // 房间密码(可选)
|
|
122
|
-
scheduleStartTime: number; // 预约开始时间(必需)
|
|
123
|
-
scheduleEndTime: number; // 预约结束时间(必需)
|
|
124
|
-
reminderSecondsBeforeStart?: number; // 开始前提醒时间(秒)(可选)
|
|
125
|
-
scheduleAttendees?: string[]; // 预约参与者ID列表(可选)
|
|
126
|
-
isAllMicrophoneDisabled?: boolean; // 是否禁用所有麦克风(可选)
|
|
127
|
-
isAllCameraDisabled?: boolean; // 是否禁用所有摄像头(可选)
|
|
128
|
-
isAllScreenShareDisabled?: boolean; // 是否禁用所有屏幕共享(可选)
|
|
129
|
-
isAllMessageDisabled?: boolean; // 是否禁用所有消息(可选)
|
|
130
|
-
};
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### ScheduleUpdateRoomOptions
|
|
134
|
-
更新预约房间选项
|
|
135
|
-
|
|
136
|
-
```typescript
|
|
137
|
-
export type ScheduleUpdateRoomOptions = {
|
|
138
|
-
roomName?: string; // 房间名称(可选)
|
|
139
|
-
scheduleStartTime?: number; // 预约开始时间(可选)
|
|
140
|
-
scheduleEndTime?: number; // 预约结束时间(可选)
|
|
141
|
-
}
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### CreateRoomOptions
|
|
145
|
-
创建房间选项
|
|
146
|
-
|
|
147
|
-
```typescript
|
|
148
|
-
export type CreateRoomOptions = {
|
|
149
|
-
roomName?: string; // 房间名称(可选)
|
|
150
|
-
password?: string; // 房间密码(可选)
|
|
151
|
-
isAllMicrophoneDisabled?: boolean; // 是否禁用所有麦克风(可选)
|
|
152
|
-
isAllCameraDisabled?: boolean; // 是否禁用所有摄像头(可选)
|
|
153
|
-
isAllScreenShareDisabled?: boolean; // 是否禁用所有屏幕共享(可选)
|
|
154
|
-
isAllMessageDisabled?: boolean; // 是否禁用所有消息(可选)
|
|
155
|
-
};
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### UpdateRoomOptions
|
|
159
|
-
更新房间选项
|
|
160
|
-
|
|
161
|
-
```typescript
|
|
162
|
-
export type UpdateRoomOptions = {
|
|
163
|
-
roomName?: string; // 房间名称(可选)
|
|
164
|
-
password?: string; // 房间密码(可选)
|
|
165
|
-
};
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
## IRoomListState Interface
|
|
169
|
-
|
|
170
|
-
房间列表状态管理接口
|
|
171
|
-
|
|
172
|
-
### Properties
|
|
173
|
-
|
|
174
|
-
```typescript
|
|
175
|
-
export interface IRoomListState {
|
|
176
|
-
scheduledRoomList: RoomInfo[]; // 预约房间列表
|
|
177
|
-
scheduledRoomListCursor: string; // 预约房间列表游标
|
|
178
|
-
currentRoom: RoomInfo | null; // 当前房间信息
|
|
179
|
-
}
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
### Methods
|
|
183
|
-
|
|
184
|
-
#### 房间列表管理
|
|
185
|
-
|
|
186
|
-
- **getScheduledRoomList(options: { cursor: string, count?: number }): Promise<void>**
|
|
187
|
-
- 获取预约房间列表
|
|
188
|
-
|
|
189
|
-
- **getScheduledAttendees(options: { roomId: string, cursor: string, count?: number }): Promise<{ attendees: RoomUser[], cursor: string }>**
|
|
190
|
-
- 获取预约参与者列表
|
|
191
|
-
|
|
192
|
-
#### 预约房间管理
|
|
193
|
-
|
|
194
|
-
- **scheduleRoom(options: { roomId: string, options: ScheduleRoomOptions }): Promise<void>**
|
|
195
|
-
- 预约房间
|
|
196
|
-
|
|
197
|
-
- **updateScheduledRoom(options: { roomId: string, options: ScheduleUpdateRoomOptions }): Promise<void>**
|
|
198
|
-
- 更新预约房间
|
|
199
|
-
|
|
200
|
-
- **addScheduledAttendees(options: { roomId: string, userIdList: string[] }): Promise<void>**
|
|
201
|
-
- 添加预约参与者
|
|
202
|
-
|
|
203
|
-
- **removeScheduledAttendees(options: { roomId: string, userIdList: string[] }): Promise<void>**
|
|
204
|
-
- 移除预约参与者
|
|
205
|
-
|
|
206
|
-
- **cancelScheduledRoom(options: { roomId: string }): Promise<void>**
|
|
207
|
-
- 取消预约房间
|
|
208
|
-
|
|
209
|
-
#### 房间操作
|
|
210
|
-
|
|
211
|
-
- **createAndJoinRoom(options: { roomId: string, options: CreateRoomOptions }): Promise<void>**
|
|
212
|
-
- 创建并加入房间
|
|
213
|
-
|
|
214
|
-
- **joinRoom(options: { roomId: string, password?: string }): Promise<void>**
|
|
215
|
-
- 加入房间
|
|
216
|
-
|
|
217
|
-
- **leaveRoom(): Promise<void>**
|
|
218
|
-
- 离开房间
|
|
219
|
-
|
|
220
|
-
- **endRoom(): Promise<void>**
|
|
221
|
-
- 结束房间
|
|
222
|
-
|
|
223
|
-
- **updateRoomInfo(options: { roomId: string, options: UpdateRoomOptions }): Promise<void>**
|
|
224
|
-
- 更新房间信息
|
|
225
|
-
|
|
226
|
-
#### 邀请管理
|
|
227
|
-
|
|
228
|
-
- **callUserToRoom(options: { roomId: string, userIdList: string[] }): Promise<RoomInvitation>**
|
|
229
|
-
- 邀请用户到房间
|
|
230
|
-
|
|
231
|
-
- **cancelCall(options: { roomId: string, userIdList: string[] }): Promise<void>**
|
|
232
|
-
- 取消邀请
|
|
233
|
-
|
|
234
|
-
- **getPendingInvitations(options: { roomId: string, cursor: string, count?: number }): Promise<{invitations: RoomInvitation[], cursor: string }>**
|
|
235
|
-
- 获取待处理的邀请
|
|
236
|
-
|
|
237
|
-
### Event Handlers
|
|
238
|
-
|
|
239
|
-
#### 预约房间事件
|
|
240
|
-
|
|
241
|
-
- **onAddedToScheduledRoom: (options: { roomInfo: RoomInfo; }) => void**
|
|
242
|
-
- 被添加到预约房间时触发
|
|
243
|
-
|
|
244
|
-
- **onRemovedFromScheduledRoom: (options: { roomInfo: RoomInfo; operateUser: RoomUser }) => void**
|
|
245
|
-
- 被从预约房间移除时触发
|
|
246
|
-
|
|
247
|
-
- **onScheduledRoomCancelled: (options: { roomInfo: RoomInfo; operateUser: RoomUser }) => void**
|
|
248
|
-
- 预约房间被取消时触发
|
|
249
|
-
|
|
250
|
-
- **onScheduledRoomStartingSoon: (options: { roomInfo: RoomInfo }) => void**
|
|
251
|
-
- 预约房间即将开始时触发
|
|
252
|
-
|
|
253
|
-
#### 房间状态事件
|
|
254
|
-
|
|
255
|
-
- **onRoomEnded: (options: { roomId: string; reason: RoomEndedReason }) => void**
|
|
256
|
-
- 房间结束时触发
|
|
257
|
-
|
|
258
|
-
#### 邀请相关事件
|
|
259
|
-
|
|
260
|
-
- **onRoomCallReceived: (options: { invitation: RoomInvitation }) => void**
|
|
261
|
-
- 收到房间邀请时触发
|
|
262
|
-
|
|
263
|
-
- **onRoomCallCancelled: (options: { invitation: RoomInvitation }) => void**
|
|
264
|
-
- 房间邀请被取消时触发
|
|
265
|
-
|
|
266
|
-
- **onRoomCallTimeout: (options: { invitation: RoomInvitation }) => void**
|
|
267
|
-
- 房间邀请超时时触发
|
|
268
|
-
|
|
269
|
-
- **onRoomCallAccepted: (options: { invitation: RoomInvitation }) => void**
|
|
270
|
-
- 房间邀请被接受时触发
|
|
271
|
-
|
|
272
|
-
- **onRoomCallRejected: (options: { invitation: RoomInvitation, reason: InvitationRejectedReason }) => void**
|
|
273
|
-
- 房间邀请被拒绝时触发
|
|
274
|
-
|
|
275
|
-
### Example
|
|
276
|
-
|
|
277
|
-
## API 和事件使用示例
|
|
278
|
-
```typescript
|
|
279
|
-
import { useRoomListState } from 'tuikit-atomicx-vue3';
|
|
280
|
-
const {
|
|
281
|
-
joinRoom,
|
|
282
|
-
leaveRoom,
|
|
283
|
-
endRoom,
|
|
284
|
-
subscribeEvent,
|
|
285
|
-
unsubscribeEvent
|
|
286
|
-
} = useRoomListState();
|
|
287
|
-
```
|
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
# Room Participant State Documentation
|
|
2
|
-
|
|
3
|
-
Room 房间列表 State API 文档。
|
|
4
|
-
|
|
5
|
-
## 安装依赖
|
|
6
|
-
|
|
7
|
-
您可以选择以下任一方式安装依赖:
|
|
8
|
-
【npm】
|
|
9
|
-
``` bash
|
|
10
|
-
npm install tuikit-atomicx-vue3@latest --save
|
|
11
|
-
```
|
|
12
|
-
【pnpm】
|
|
13
|
-
``` bash
|
|
14
|
-
pnpm add tuikit-atomicx-vue3@latest
|
|
15
|
-
```
|
|
16
|
-
【yarn】
|
|
17
|
-
``` bash
|
|
18
|
-
yarn add tuikit-atomicx-vue3@latest
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Enums
|
|
22
|
-
|
|
23
|
-
### DeviceType
|
|
24
|
-
设备类型枚举
|
|
25
|
-
|
|
26
|
-
```typescript
|
|
27
|
-
export enum DeviceType {
|
|
28
|
-
Microphone = "Microphone", // 麦克风
|
|
29
|
-
Camera = "Camera", // 摄像头
|
|
30
|
-
ScreenShare = "ScreenShare", // 屏幕共享
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### DeviceStatus
|
|
35
|
-
设备状态枚举
|
|
36
|
-
|
|
37
|
-
```typescript
|
|
38
|
-
export enum DeviceStatus {
|
|
39
|
-
On = "On", // 开启
|
|
40
|
-
Off = "Off", // 关闭
|
|
41
|
-
}
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### NetworkQuality
|
|
45
|
-
网络质量枚举
|
|
46
|
-
|
|
47
|
-
```typescript
|
|
48
|
-
export enum NetworkQuality {
|
|
49
|
-
Unknown = 0, // 未知
|
|
50
|
-
Excellent = 1, // 优秀
|
|
51
|
-
Good = 2, // 良好
|
|
52
|
-
Poor = 3, // 较差
|
|
53
|
-
Bad = 4, // 差
|
|
54
|
-
VeryBad = 5, // 很差
|
|
55
|
-
Down = 6, // 断开
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### ParticipantRole
|
|
60
|
-
参与者角色枚举
|
|
61
|
-
|
|
62
|
-
```typescript
|
|
63
|
-
export enum ParticipantRole {
|
|
64
|
-
Owner = 0, // 房主
|
|
65
|
-
Admin = 1, // 管理员
|
|
66
|
-
GeneralUser = 2, // 普通用户
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### KickedOutOfRoomReason
|
|
71
|
-
被踢出房间原因枚举
|
|
72
|
-
|
|
73
|
-
```typescript
|
|
74
|
-
export enum KickedOutOfRoomReason {
|
|
75
|
-
KickedByAdmin = "KickedByAdmin", // 被管理员踢出
|
|
76
|
-
ReplacedByAnotherDevice = "ReplacedByAnotherDevice", // 被其他设备替换
|
|
77
|
-
KickedByServer = "KickedByServer", // 被服务器踢出
|
|
78
|
-
ConnectionTimeout = "ConnectionTimeout", // 连接超时
|
|
79
|
-
InvalidStatusOnReconnect = "InvalidStatusOnReconnect", // 重连时状态无效
|
|
80
|
-
RoomLimitExceeded = "RoomLimitExceeded", // 房间人数超限
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Interfaces
|
|
85
|
-
|
|
86
|
-
### NetworkInfo
|
|
87
|
-
网络信息接口
|
|
88
|
-
|
|
89
|
-
```typescript
|
|
90
|
-
export interface NetworkInfo {
|
|
91
|
-
quality: NetworkQuality; // 网络质量
|
|
92
|
-
upLoss: number; // 上行丢包率
|
|
93
|
-
downLoss: number; // 下行丢包率
|
|
94
|
-
delay: number; // 延迟
|
|
95
|
-
}
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### RoomParticipant
|
|
99
|
-
房间参与者信息(继承自 RoomUser)
|
|
100
|
-
|
|
101
|
-
```typescript
|
|
102
|
-
export interface RoomParticipant extends RoomUser {
|
|
103
|
-
nameCard: string; // 名片/昵称
|
|
104
|
-
role: ParticipantRole; // 角色
|
|
105
|
-
microphoneStatus: DeviceStatus; // 麦克风状态
|
|
106
|
-
cameraStatus: DeviceStatus; // 摄像头状态
|
|
107
|
-
screenShareStatus: DeviceStatus; // 屏幕共享状态
|
|
108
|
-
isMessageDisabled: boolean; // 是否禁用消息
|
|
109
|
-
metaData: Record<string, string>; // 元数据
|
|
110
|
-
}
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### DeviceRequestInfo
|
|
114
|
-
设备请求信息
|
|
115
|
-
|
|
116
|
-
```typescript
|
|
117
|
-
export interface DeviceRequestInfo {
|
|
118
|
-
timestamp: number; // 时间戳
|
|
119
|
-
senderUserId: string; // 发送者用户ID
|
|
120
|
-
senderUserName: string; // 发送者用户名
|
|
121
|
-
senderNameCard: string; // 发送者名片
|
|
122
|
-
senderAvatarURL: string; // 发送者头像URL
|
|
123
|
-
content: string; // 请求内容
|
|
124
|
-
deviceType: DeviceType; // 设备类型
|
|
125
|
-
}
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## IRoomParticipantState Interface
|
|
129
|
-
|
|
130
|
-
房间参与者状态管理接口
|
|
131
|
-
|
|
132
|
-
### Properties
|
|
133
|
-
|
|
134
|
-
```typescript
|
|
135
|
-
export interface IRoomParticipantState {
|
|
136
|
-
participantList: RoomParticipant[]; // 参与者列表
|
|
137
|
-
participantListCursor: string; // 参与者列表游标
|
|
138
|
-
participantListWithVideo: RoomParticipant[]; // 开启视频的参与者列表
|
|
139
|
-
participantWithScreen: RoomParticipant | null; // 正在屏幕共享的参与者
|
|
140
|
-
pendingDeviceApplications: DeviceRequestInfo[]; // 待处理的设备申请
|
|
141
|
-
pendingDeviceInvitations: DeviceRequestInfo[]; // 待处理的设备邀请
|
|
142
|
-
speakingUsers: Map<string, number>; // 正在说话的用户(用户ID -> 音量)
|
|
143
|
-
networkQualities: Map<string, NetworkInfo>; // 网络质量信息(用户ID -> 网络信息)
|
|
144
|
-
|
|
145
|
-
readonly localParticipant: RoomParticipant | null; // 本地参与者信息(只读)
|
|
146
|
-
}
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### Methods
|
|
150
|
-
|
|
151
|
-
#### 参与者管理
|
|
152
|
-
|
|
153
|
-
- **getParticipantList(options: { cursor?: string, count?: number }): Promise<RoomParticipant[]>**
|
|
154
|
-
- 获取参与者列表
|
|
155
|
-
|
|
156
|
-
#### 角色管理
|
|
157
|
-
|
|
158
|
-
- **transferOwner(options: { userId: string }): Promise<void>**
|
|
159
|
-
- 转让房主权限
|
|
160
|
-
|
|
161
|
-
- **setAdmin(options: { userId: string }): Promise<void>**
|
|
162
|
-
- 设置管理员
|
|
163
|
-
|
|
164
|
-
- **revokeAdmin(options: { userId: string }): Promise<void>**
|
|
165
|
-
- 撤销管理员权限
|
|
166
|
-
|
|
167
|
-
- **kickParticipant(options: { userId: string }): Promise<void>**
|
|
168
|
-
- 踢出参与者
|
|
169
|
-
|
|
170
|
-
#### 参与者信息管理
|
|
171
|
-
|
|
172
|
-
- **updateParticipantNameCard(options: { userId: string, nameCard: string }): Promise<void>**
|
|
173
|
-
- 更新参与者名片
|
|
174
|
-
|
|
175
|
-
- **updateParticipantMetaData(options: { userId: string, metaData: Record<string, string> }): Promise<void>**
|
|
176
|
-
- 更新参与者元数据
|
|
177
|
-
|
|
178
|
-
#### 设备控制
|
|
179
|
-
|
|
180
|
-
- **closeParticipantDevice(options: { userId: string, deviceType: DeviceType }): Promise<void>**
|
|
181
|
-
- 关闭参与者设备
|
|
182
|
-
|
|
183
|
-
- **muteParticipantMessage(options: { userId: string, mute: boolean }): Promise<void>**
|
|
184
|
-
- 禁言/解禁参与者
|
|
185
|
-
|
|
186
|
-
- **disableAllDevices(options: { deviceType: DeviceType, disable: boolean }): Promise<void>**
|
|
187
|
-
- 禁用/启用所有设备
|
|
188
|
-
|
|
189
|
-
- **disableAllMessages(options: { disable: boolean }): Promise<void>**
|
|
190
|
-
- 禁用/启用所有消息
|
|
191
|
-
|
|
192
|
-
#### 设备请求管理
|
|
193
|
-
|
|
194
|
-
- **requestToOpenDevice(options: { device: DeviceType; timeout?: number }): Promise<void>**
|
|
195
|
-
- 请求开启设备
|
|
196
|
-
|
|
197
|
-
- **cancelOpenDeviceRequest(options: { device: DeviceType }): Promise<void>**
|
|
198
|
-
- 取消设备开启请求
|
|
199
|
-
|
|
200
|
-
- **approveOpenDeviceRequest(options: { device: DeviceType; userId: string }): Promise<void>**
|
|
201
|
-
- 批准设备开启请求
|
|
202
|
-
|
|
203
|
-
- **rejectOpenDeviceRequest(options: { device: DeviceType; userId: string; }): Promise<void>**
|
|
204
|
-
- 拒绝设备开启请求
|
|
205
|
-
|
|
206
|
-
#### 设备邀请管理
|
|
207
|
-
|
|
208
|
-
- **inviteToOpenDevice(options: { device: DeviceType; userId: string; timeout?: number }): Promise<void>**
|
|
209
|
-
- 邀请开启设备
|
|
210
|
-
|
|
211
|
-
- **cancelOpenDeviceInvitation(options: { device: DeviceType; userId: string }): Promise<void>**
|
|
212
|
-
- 取消设备开启邀请
|
|
213
|
-
|
|
214
|
-
- **acceptOpenDeviceInvitation(options: {device: DeviceType; userId: string; }): Promise<void>**
|
|
215
|
-
- 接受设备开启邀请
|
|
216
|
-
|
|
217
|
-
- **declineOpenDeviceInvitation(options: {device: DeviceType; userId: string; }): Promise<void>**
|
|
218
|
-
- 拒绝设备开启邀请
|
|
219
|
-
|
|
220
|
-
### Event Handlers
|
|
221
|
-
|
|
222
|
-
#### 参与者状态事件
|
|
223
|
-
|
|
224
|
-
- **onParticipantJoined: (options: { participant: RoomParticipant }) => void**
|
|
225
|
-
- 参与者加入时触发
|
|
226
|
-
|
|
227
|
-
- **onParticipantLeft: (options: { participant: RoomParticipant }) => void**
|
|
228
|
-
- 参与者离开时触发
|
|
229
|
-
|
|
230
|
-
#### 角色变更事件
|
|
231
|
-
|
|
232
|
-
- **onOwnerChanged: (options: { newOwner: RoomParticipant }) => void**
|
|
233
|
-
- 房主变更时触发
|
|
234
|
-
|
|
235
|
-
- **onAdminSet: (options: { userInfo: RoomParticipant }) => void**
|
|
236
|
-
- 设置管理员时触发
|
|
237
|
-
|
|
238
|
-
- **onAdminRevoked: (options: { userInfo: RoomParticipant }) => void**
|
|
239
|
-
- 撤销管理员时触发
|
|
240
|
-
|
|
241
|
-
#### 房间管理事件
|
|
242
|
-
|
|
243
|
-
- **onKickedFromRoom: (options: { reason: KickedOutOfRoomReason, message: string }) => void**
|
|
244
|
-
- 被踢出房间时触发
|
|
245
|
-
|
|
246
|
-
#### 设备控制事件
|
|
247
|
-
|
|
248
|
-
- **onParticipantDeviceClosed: (options: { userId: string, device: DeviceType, operator: RoomUser }) => void**
|
|
249
|
-
- 参与者设备被关闭时触发
|
|
250
|
-
|
|
251
|
-
- **onParticipantMessageMuted: (options: { userId: string, muted: boolean, operator: RoomUser }) => void**
|
|
252
|
-
- 参与者被禁言/解禁时触发
|
|
253
|
-
|
|
254
|
-
- **onAllDevicesDisabled: (options: { device: DeviceType, disable: boolean, operator: RoomUser }) => void**
|
|
255
|
-
- 所有设备被禁用/启用时触发
|
|
256
|
-
|
|
257
|
-
- **onAllMessagesDisabled: (options: { disable: boolean, operator: RoomUser }) => void**
|
|
258
|
-
- 所有消息被禁用/启用时触发
|
|
259
|
-
|
|
260
|
-
#### 设备请求事件
|
|
261
|
-
|
|
262
|
-
- **onDeviceRequestReceived: (options: { request: DeviceRequestInfo }) => void**
|
|
263
|
-
- 收到设备请求时触发
|
|
264
|
-
|
|
265
|
-
- **onDeviceRequestCancelled: (options: { request: DeviceRequestInfo }) => void**
|
|
266
|
-
- 设备请求被取消时触发
|
|
267
|
-
|
|
268
|
-
- **onDeviceRequestTimeout: (options: { request: DeviceRequestInfo }) => void**
|
|
269
|
-
- 设备请求超时时触发
|
|
270
|
-
|
|
271
|
-
- **onDeviceRequestApproved: (options: { request: DeviceRequestInfo, operator: RoomUser }) => void**
|
|
272
|
-
- 设备请求被批准时触发
|
|
273
|
-
|
|
274
|
-
- **onDeviceRequestRejected: (options: { request: DeviceRequestInfo, operator: RoomUser }) => void**
|
|
275
|
-
- 设备请求被拒绝时触发
|
|
276
|
-
|
|
277
|
-
- **onDeviceRequestProcessed: (options: { request: DeviceRequestInfo, operator: RoomUser }) => void**
|
|
278
|
-
- 设备请求被处理时触发
|
|
279
|
-
|
|
280
|
-
#### 设备邀请事件
|
|
281
|
-
|
|
282
|
-
- **onDeviceInvitationReceived: (options: { invitation: DeviceRequestInfo }) => void**
|
|
283
|
-
- 收到设备邀请时触发
|
|
284
|
-
|
|
285
|
-
- **onDeviceInvitationCancelled: (options: { invitation: DeviceRequestInfo }) => void**
|
|
286
|
-
- 设备邀请被取消时触发
|
|
287
|
-
|
|
288
|
-
- **onDeviceInvitationTimeout: (options: { invitation: DeviceRequestInfo }) => void**
|
|
289
|
-
- 设备邀请超时时触发
|
|
290
|
-
|
|
291
|
-
- **onDeviceInvitationAccepted: (options: { invitation: DeviceRequestInfo, operator: RoomUser }) => void**
|
|
292
|
-
- 设备邀请被接受时触发
|
|
293
|
-
|
|
294
|
-
- **onDeviceInvitationDeclined: (options: { invitation: DeviceRequestInfo, operator: RoomUser }) => void**
|
|
295
|
-
- 设备邀请被拒绝时触发
|
|
296
|
-
|
|
297
|
-
### Example
|
|
298
|
-
|
|
299
|
-
API 和事件使用示例
|
|
300
|
-
```typescript
|
|
301
|
-
import { useRoomParticipantState } from 'tuikit-atomicx-vue3';
|
|
302
|
-
const {
|
|
303
|
-
getParticipantList,
|
|
304
|
-
subscribeEvent,
|
|
305
|
-
unsubscribeEvent
|
|
306
|
-
} = useRoomParticipantState();
|
|
307
|
-
```
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const TOOL_DESCRIPTION = `
|
|
2
|
-
【核心用途】:专用于查询 Web Room TUIKit State API,用于提供 Web Room TUIKit 组件中 State API 的详细使用说明和示例代码。\n
|
|
3
|
-
|
|
4
|
-
【功能】:提供房间列表、房间成员、设备、登录等 State API 的用法和示例。\n
|
|
5
|
-
|
|
6
|
-
【关键词】:'Web', 'Room', '房间', 'TUIKit', 'State API', '状态管理', 'Vue', '房间列表', '房间成员', '设备', '登录'。\n
|
|
7
|
-
|
|
8
|
-
【支持框架】:目前仅支持 Vue 框架。
|
|
9
|
-
`;
|
|
10
|
-
const PARAMETER_DESCRIPTIONS = {
|
|
11
|
-
framework: 'Web Room TUIKit State API 支持的框架类型。目前仅支持 Vue。',
|
|
12
|
-
componentName: 'Web Room TUIKit 组件的具体 State 名称,例如:room-list-state。'
|
|
13
|
-
};
|
|
14
|
-
export const GET_WEB_ROOM_STATE_DETAIL_DEFINITION = {
|
|
15
|
-
name: 'get_web_room_state_detail',
|
|
16
|
-
description: TOOL_DESCRIPTION,
|
|
17
|
-
parameter_descriptions: PARAMETER_DESCRIPTIONS,
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=get_web_room_state_detail_def.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get_web_room_state_detail_def.js","sourceRoot":"","sources":["../../../src/tools/definitions/get_web_room_state_detail_def.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG;;;;;;;;CAQxB,CAAC;AAEF,MAAM,sBAAsB,GAAG;IAC7B,SAAS,EAAE,8CAA8C;IACzD,aAAa,EAAE,oDAAoD;CACpE,CAAC;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAAG;IAClD,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,gBAAgB;IAC7B,sBAAsB,EAAE,sBAAsB;CAC/C,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { GET_WEB_ROOM_STATE_DETAIL_DEFINITION } from '../definitions/get_web_room_state_detail_def.js';
|
|
3
|
-
import { getDocContent } from '../../utils/get-doc-content.js';
|
|
4
|
-
import { reportCLSClient } from '../../utils/report-cls-client.js';
|
|
5
|
-
import { handleFramework } from '../../utils/handle-framework.js';
|
|
6
|
-
import { handleStateName } from '../../utils/handle-state-name.js';
|
|
7
|
-
function getResultText(params) {
|
|
8
|
-
const { framework, componentName = '' } = params;
|
|
9
|
-
reportCLSClient({
|
|
10
|
-
method: 'get_web_room_state_detail',
|
|
11
|
-
info: componentName,
|
|
12
|
-
framework: framework,
|
|
13
|
-
});
|
|
14
|
-
return getDocContent(['roomkit', `${handleFramework(framework)}`, 'states', `${handleStateName(componentName)}.md`]);
|
|
15
|
-
}
|
|
16
|
-
const registryGetWebRoomStateDetailTool = (mcpServer) => {
|
|
17
|
-
const { name, description, parameter_descriptions } = GET_WEB_ROOM_STATE_DETAIL_DEFINITION;
|
|
18
|
-
mcpServer.tool(name, description, {
|
|
19
|
-
framework: z.enum(['vue']).describe(parameter_descriptions.framework),
|
|
20
|
-
componentName: z.string().describe(parameter_descriptions.componentName),
|
|
21
|
-
}, (params) => ({
|
|
22
|
-
content: [
|
|
23
|
-
{
|
|
24
|
-
type: 'text',
|
|
25
|
-
text: getResultText(params),
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
}));
|
|
29
|
-
};
|
|
30
|
-
export { registryGetWebRoomStateDetailTool };
|
|
31
|
-
//# sourceMappingURL=get-web-room-state-detail.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-web-room-state-detail.js","sourceRoot":"","sources":["../../../src/tools/room/get-web-room-state-detail.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oCAAoC,EAAE,MAAM,iDAAiD,CAAC;AACvG,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,SAAS,aAAa,CAAC,MAA2B;IAChD,MAAM,EAAE,SAAS,EAAE,aAAa,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IACjD,eAAe,CAAC;QACd,MAAM,EAAE,2BAA2B;QACnC,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,SAAS;KACrB,CAAC,CAAC;IACH,OAAO,aAAa,CAAC,CAAC,SAAS,EAAE,GAAG,eAAe,CAAC,SAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,eAAe,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AACvH,CAAC;AAED,MAAM,iCAAiC,GAAG,CAAC,SAAoB,EAAE,EAAE;IACjE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,sBAAsB,EAAE,GAAG,oCAAoC,CAAC;IAC3F,SAAS,CAAC,IAAI,CACZ,IAAI,EACJ,WAAW,EACX;QACE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC,SAAS,CAAC;QACrE,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC,aAAa,CAAC;KACzE,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACd,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC;aAC5B;SACF;KACF,CAAC,CAAC,CAAC;AACR,CAAC,CAAC;AACF,OAAO,EAAE,iCAAiC,EAAE,CAAC"}
|