@xylink/xy-rtc-sdk 4.0.1 → 4.0.2-beta.3
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/{README.MD → README.md} +1 -1
- package/action/ability.d.ts +151 -0
- package/action/api.d.ts +252 -0
- package/action/auth.d.ts +134 -0
- package/action/base.d.ts +13 -0
- package/action/config.d.ts +63 -0
- package/action/control.d.ts +101 -0
- package/action/enterprise.d.ts +66 -0
- package/{lib/tools/httpClient.d.ts → action/http.d.ts} +19 -11
- package/action/index.d.ts +92 -0
- package/action/index.type.d.ts +30 -0
- package/action/log.d.ts +17 -0
- package/action/meeting.d.ts +107 -0
- package/{lib/enum → enum}/client.d.ts +1 -6
- package/{lib/enum → enum}/constraints.d.ts +1 -6
- package/{lib/enum → enum}/device.d.ts +6 -0
- package/{lib/enum/errorCode.d.ts → enum/errorCode/common.d.ts} +1 -22
- package/enum/errorCode/index.d.ts +6 -0
- package/enum/errorCode/server.d.ts +10 -0
- package/enum/errorCode/signal.d.ts +15 -0
- package/{lib/enum → enum}/index.d.ts +11 -8
- package/enum/meeting.d.ts +15 -0
- package/{lib/enum → enum}/polling.d.ts +1 -0
- package/feature/artboard/index.d.ts +139 -0
- package/feature/artboard/index.type.d.ts +264 -0
- package/{lib/feature → feature}/customMessage/index.d.ts +3 -8
- package/{lib/feature → feature}/edu/index.d.ts +2 -1
- package/{lib/feature → feature}/edu/index.type.d.ts +1 -0
- package/feature/im/index.d.ts +89 -0
- package/feature/im/index.type.d.ts +30 -0
- package/feature/index.d.ts +29 -0
- package/feature/query/index.d.ts +36 -0
- package/feature/query/index.type.d.ts +61 -0
- package/{lib/feature → feature}/speaker/index.d.ts +5 -10
- package/{lib/feature → feature}/speaker/index.type.d.ts +1 -0
- package/{lib/index.d.ts → index.d.ts} +19 -21
- package/{lib/interface → interface}/clientInterface.type.d.ts +24 -11
- package/{lib/interface → interface}/contentTrackInterface.type.d.ts +1 -6
- package/{lib/interface → interface}/event.type.d.ts +60 -1
- package/{lib/interface → interface}/videoAudioTrackInterface.type.d.ts +2 -7
- package/{lib/main → main}/ability/const.d.ts +1 -0
- package/{lib/main → main}/ability/index.d.ts +5 -10
- package/main/auth/index.d.ts +160 -0
- package/main/auth/index.type.d.ts +63 -0
- package/main/client/clientBase.d.ts +60 -0
- package/main/client/clientState.d.ts +36 -0
- package/{lib/main/client.d.ts → main/client/index.d.ts} +253 -79
- package/main/client/index.type.d.ts +42 -0
- package/{lib/main → main}/device/index.d.ts +5 -15
- package/{lib/tools → main/helper}/i18n.d.ts +2 -1
- package/{lib/main → main}/helper/index.d.ts +9 -7
- package/{lib/main → main}/layout/index.d.ts +7 -16
- package/{lib/main → main}/layout/index.type.d.ts +10 -9
- package/{lib/main → main}/layout/polling.d.ts +3 -11
- package/{lib/main → main}/layout/state.d.ts +4 -10
- package/{lib/tools → main/layout}/template/index.d.ts +25 -7
- package/{lib/main/layout/template.d.ts → main/layout/template/manager.d.ts} +2 -1
- package/main/layout/template/mobile.d.ts +4 -0
- package/main/layout/template/polling.d.ts +3 -0
- package/{lib/main → main}/media/index.d.ts +13 -11
- package/{lib/main → main}/media/index.type.d.ts +1 -0
- package/{lib/main → main}/meeting/control.d.ts +20 -1
- package/{lib/main → main}/meeting/control.type.d.ts +1 -0
- package/{lib/main → main}/meeting/index.d.ts +39 -32
- package/main/meeting/index.type.d.ts +43 -0
- package/{lib/main → main}/meeting/verify.d.ts +2 -7
- package/{lib/main/peer.d.ts → main/peer/index.d.ts} +30 -25
- package/main/peer/index.type.d.ts +10 -0
- package/{lib/main → main}/plugin/index.d.ts +2 -7
- package/{lib/main → main}/quality/index.d.ts +1 -6
- package/{lib/main → main}/quality/quality.worker.d.ts +1 -4
- package/{lib/main → main}/quality/report.d.ts +2 -1
- package/{lib/main → main}/render/index.d.ts +4 -9
- package/{lib/main → main}/render/index.type.d.ts +2 -7
- package/{lib/main → main}/render/videoManager.d.ts +2 -7
- package/{lib/main → main}/roster/index.d.ts +9 -9
- package/{lib/main → main}/server/index.d.ts +73 -4
- package/main/server/index.type.d.ts +53 -0
- package/{lib/main → main}/signal/index.d.ts +2 -1
- package/{lib/main → main}/socket/index.d.ts +6 -12
- package/{lib/main → main}/stream/index.d.ts +17 -21
- package/{lib/main → main}/track/baseTrack.d.ts +6 -14
- package/{lib/main → main}/track/contentTrack.d.ts +4 -12
- package/main/track/customContentTrack.d.ts +10 -0
- package/main/track/customVideoAudioTrack.d.ts +10 -0
- package/{lib/main → main}/track/helper.d.ts +1 -1
- package/{lib/main → main}/track/videoAudioCapture.d.ts +2 -10
- package/{lib/main → main}/track/videoAudioTrack.d.ts +13 -15
- package/{lib/main → main}/vom/index.d.ts +2 -7
- package/package.json +26 -111
- package/{lib/tools/analyser.d.ts → tools/analyser/index.d.ts} +2 -9
- package/{lib/tools/analyserManager.d.ts → tools/analyser/manager.d.ts} +4 -13
- package/{lib/tools → tools}/config.d.ts +3 -10
- package/tools/data/list.d.ts +87 -0
- package/tools/data/map.d.ts +17 -0
- package/{lib/tools/detectBrowser/index.d.ts → tools/detector/browser.d.ts} +3 -3
- package/{lib/tools/detectTool → tools/detector}/index.d.ts +3 -7
- package/{lib/tools/detectStream/index.d.ts → tools/detector/stream.d.ts} +2 -9
- package/{lib/tools → tools}/emitter.d.ts +9 -3
- package/tools/frame/index.d.ts +36 -0
- package/tools/frame/index.type.d.ts +1 -0
- package/tools/index.d.ts +72 -0
- package/{lib/tools/dbManager.d.ts → tools/log/db.d.ts} +8 -14
- package/{lib/tools → tools}/log/logger.d.ts +6 -9
- package/tools/log/logger.worker.d.ts +10 -0
- package/{lib/tools → tools}/log/loggerManager.d.ts +3 -3
- package/tools/log/utils.d.ts +6 -0
- package/{lib/tools → tools}/pressure/index.d.ts +2 -9
- package/{lib/tools/promiseQueue.d.ts → tools/queue/async.d.ts} +3 -9
- package/tools/queue/queue.type.d.ts +10 -0
- package/{lib/tools/queue.d.ts → tools/queue/sync.d.ts} +3 -9
- package/{lib/tools → tools}/resize.d.ts +3 -4
- package/{lib/tools/snapshot.d.ts → tools/snapshot/index.d.ts} +3 -11
- package/tools/snapshot/index.type.d.ts +38 -0
- package/{lib/tools → tools/socket}/socket.d.ts +6 -10
- package/tools/socket/socketManager.d.ts +32 -0
- package/tools/store.d.ts +47 -0
- package/tools/utils.d.ts +162 -0
- package/{lib/tools → tools}/verify.d.ts +1 -1
- package/tools/window.d.ts +31 -0
- package/{lib/type → type}/ability.d.ts +3 -1
- package/{lib/type → type}/analyser.d.ts +1 -8
- package/{lib/type → type}/auth.d.ts +34 -0
- package/{lib/type → type}/base.d.ts +43 -11
- package/{lib/type → type}/capture.d.ts +1 -0
- package/{lib/type → type}/client.d.ts +65 -70
- package/{lib/type → type}/index.d.ts +5 -3
- package/{lib/type → type}/layout.d.ts +15 -1
- package/{lib/type → type}/logger.d.ts +1 -6
- package/{lib/type → type}/meeting.d.ts +105 -15
- package/{lib/type → type}/quality.d.ts +2 -7
- package/{lib/type → type}/stream.d.ts +4 -5
- package/{lib/type → type}/track.d.ts +1 -9
- package/xyrtc.js +23212 -0
- package/lib/action/index.d.ts +0 -415
- package/lib/enum/meeting.d.ts +0 -4
- package/lib/feature/index.d.ts +0 -3
- package/lib/main/auth/index.d.ts +0 -101
- package/lib/main/clientBase.d.ts +0 -40
- package/lib/main/clientState.d.ts +0 -56
- package/lib/main/server/index.type.d.ts +0 -21
- package/lib/main/track/customContentTrack.d.ts +0 -18
- package/lib/main/track/customVideoAudioTrack.d.ts +0 -18
- package/lib/tools/enum.d.ts +0 -6
- package/lib/tools/index.d.ts +0 -8
- package/lib/tools/log/logger.worker.d.ts +0 -13
- package/lib/tools/regex.d.ts +0 -4
- package/lib/tools/store.d.ts +0 -15
- package/lib/tools/template/mobile.d.ts +0 -9
- package/lib/tools/template/polling.d.ts +0 -8
- package/lib/tools/utils.d.ts +0 -97
- package/lib/xyrtc.cjs.js +0 -1
- package/lib/xyrtc.umd.js +0 -1
- /package/{lib/enum → enum}/analyser.d.ts +0 -0
- /package/{lib/enum → enum}/i18n.d.ts +0 -0
- /package/{lib/interface → interface}/baseModule.type.d.ts +0 -0
- /package/{lib/main → main}/device/index.type.d.ts +0 -0
- /package/{lib/main → main}/helper/index.type.d.ts +0 -0
- /package/{lib/main → main}/meeting/verify.type.d.ts +0 -0
- /package/{lib/main → main}/render/videoManager.type.d.ts +0 -0
- /package/{lib/main → main}/vom/index.type.d.ts +0 -0
- /package/{lib/tools/detectTool → tools/detector}/index.type.d.ts +0 -0
- /package/{lib/tools/detectStream/index.type.d.ts → tools/detector/stream.type.d.ts} +0 -0
- /package/{lib/tools → tools}/pressure/index.type.d.ts +0 -0
- /package/{lib/type → type}/action.d.ts +0 -0
- /package/{lib/type → type}/peer.d.ts +0 -0
- /package/{lib/type → type}/polling.d.ts +0 -0
- /package/{lib/type → type}/socket.d.ts +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { FocusViewAction } from '../type/client';
|
|
2
|
+
import { default as BaseAction } from './base';
|
|
3
|
+
import { default as Action } from '.';
|
|
4
|
+
import { SignInTextParams } from '../type/meeting';
|
|
5
|
+
|
|
6
|
+
declare class MeetingControlAction extends BaseAction {
|
|
7
|
+
constructor(action: Action);
|
|
8
|
+
/**
|
|
9
|
+
* 校验会控主持密码
|
|
10
|
+
*
|
|
11
|
+
* @param { string } pwd - 参数
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
verifyControlPassword(pwd: string): Promise<any>;
|
|
15
|
+
/**
|
|
16
|
+
* 举手发言
|
|
17
|
+
*
|
|
18
|
+
* @param { 'handup' | 'handdown' | 'mute' } type 操作类型
|
|
19
|
+
* @param { string } meetingId 会议ID
|
|
20
|
+
* @param { string } di callerUri
|
|
21
|
+
* @param { string } conferenceNo 会议号
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
hand(type: 'handup' | 'handdown' | 'mute'): Promise<any>;
|
|
25
|
+
/**
|
|
26
|
+
* 会控设置焦点画面
|
|
27
|
+
*
|
|
28
|
+
* @param { string } deviceUri - 焦点画面终端callUri
|
|
29
|
+
* @param { FocusViewAction} action - 设置焦点画面/取消焦点画面
|
|
30
|
+
* @returns
|
|
31
|
+
*/
|
|
32
|
+
setMeetingFocusView(deviceUri: string, action: FocusViewAction): Promise<any>;
|
|
33
|
+
/**
|
|
34
|
+
* 签到
|
|
35
|
+
*
|
|
36
|
+
* @param { Object } params - 参数
|
|
37
|
+
* @param { string } params.deviceId - 用户ID
|
|
38
|
+
* @param { string } params.questionnaireId - 签到ID
|
|
39
|
+
* @returns
|
|
40
|
+
*/
|
|
41
|
+
signIn({ deviceId, questionnaireId, api }: {
|
|
42
|
+
deviceId: string;
|
|
43
|
+
questionnaireId: string;
|
|
44
|
+
api?: string;
|
|
45
|
+
}): Promise<any>;
|
|
46
|
+
/**
|
|
47
|
+
* 终端获取签到答题等文案
|
|
48
|
+
*
|
|
49
|
+
* @param { Object } params - 参数
|
|
50
|
+
* @param { EVENT_TYPE } type - 业务状态
|
|
51
|
+
* @param { number } businessType - 业务类型
|
|
52
|
+
* @param { string } environment - 语言,中文:zh-cn 、英文:en、台湾:zh-tw、香港:zh-hk
|
|
53
|
+
* @returns
|
|
54
|
+
*/
|
|
55
|
+
getSignInText({ type, environment, businessType }: SignInTextParams): Promise<any>;
|
|
56
|
+
/**
|
|
57
|
+
* 通过会控修改名称
|
|
58
|
+
*
|
|
59
|
+
* @param { string } newName - 新名称
|
|
60
|
+
* @returns
|
|
61
|
+
*/
|
|
62
|
+
rename(newName: string): Promise<any>;
|
|
63
|
+
/**
|
|
64
|
+
* 获取会控侧边栏会议信息,包含是否是主持人、是否需要会控密码等
|
|
65
|
+
*/
|
|
66
|
+
fetchMeetingControlInfo(): Promise<any>;
|
|
67
|
+
endAllMeeting(): Promise<any>;
|
|
68
|
+
/**
|
|
69
|
+
* 监会操作
|
|
70
|
+
*
|
|
71
|
+
* @param params meetingId: 会议号;action: 操作类型;operations: 操作信息
|
|
72
|
+
* @returns [hasError, dada]
|
|
73
|
+
*/
|
|
74
|
+
monitorOperation(params: {
|
|
75
|
+
meetingId: string;
|
|
76
|
+
action: string;
|
|
77
|
+
operations: Array<{
|
|
78
|
+
callUri: string;
|
|
79
|
+
params: string;
|
|
80
|
+
}>;
|
|
81
|
+
}): Promise<[boolean, any]>;
|
|
82
|
+
/**
|
|
83
|
+
* 监会 updateWebViewProp 操作
|
|
84
|
+
*
|
|
85
|
+
* @param meetingId 会议号
|
|
86
|
+
* @param operations 操作信息
|
|
87
|
+
*/
|
|
88
|
+
updateWebViewProp(meetingId: string, operations?: Array<{
|
|
89
|
+
callUri: string;
|
|
90
|
+
params: string;
|
|
91
|
+
}>): Promise<[boolean, any]>;
|
|
92
|
+
/**
|
|
93
|
+
* 通知会控打开/关闭摄像头结果
|
|
94
|
+
*
|
|
95
|
+
* @param { 'muteVideo' | 'unMuteVideo' } type 操作类型
|
|
96
|
+
* @param { string } value 操作详细数据
|
|
97
|
+
* @returns
|
|
98
|
+
*/
|
|
99
|
+
sendVideoControlResult(type: 'muteVideo' | 'unMuteVideo', value: string): Promise<any>;
|
|
100
|
+
}
|
|
101
|
+
export default MeetingControlAction;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { XYSensitiveWords } from '../main/meeting/index.type';
|
|
2
|
+
import { XYDepAndTitleParams } from '../type/index';
|
|
3
|
+
import { default as BaseAction } from './base';
|
|
4
|
+
import { default as Action } from '.';
|
|
5
|
+
import { IMediaConfigParam } from '../type/meeting';
|
|
6
|
+
|
|
7
|
+
declare class EnterpriseAction extends BaseAction {
|
|
8
|
+
constructor(action: Action);
|
|
9
|
+
/**
|
|
10
|
+
* 根据外部企业ID获取内部企业ID
|
|
11
|
+
*
|
|
12
|
+
* @param { Object } params
|
|
13
|
+
* @param { string } params.extId 企业ID
|
|
14
|
+
* @param { string } params.clientId
|
|
15
|
+
* @param { string } params.clientSecret
|
|
16
|
+
* @param { string } params.httpServer 服务器地址
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
getEnterpriseId(extId: string): Promise<any>;
|
|
20
|
+
/**
|
|
21
|
+
* 获取企业的相关配置(private),包含带宽配置、请流能力等
|
|
22
|
+
*
|
|
23
|
+
* @param { number } userId 用户ID
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
getEnterpriseMediaConfig(userId: number, config: IMediaConfigParam[]): Promise<any>;
|
|
27
|
+
/**
|
|
28
|
+
* 获取企业相关配置(buffet), 包含头像配置、禁用语音转写英文翻译
|
|
29
|
+
*
|
|
30
|
+
* 内部企业ID的话,uaa-api会在转发请求时,放在请求头带给后端服务。
|
|
31
|
+
* 服务端需要兼容下取参数的位置,如果他们之前的位置取不到内部企业ID,就从header头上的特定字段去取。
|
|
32
|
+
*
|
|
33
|
+
* @param { number } userId - 用户ID
|
|
34
|
+
* @param { string } enterpriseId - 企业ID
|
|
35
|
+
* @returns
|
|
36
|
+
*/
|
|
37
|
+
getEnterpriseConfig(userId: number, enterpriseId: string): Promise<any>;
|
|
38
|
+
/**
|
|
39
|
+
* 获取管理平台角色相关权限,包含录制权限
|
|
40
|
+
*/
|
|
41
|
+
getUicustomization(userId: number, enterpriseId: string): Promise<any>;
|
|
42
|
+
/**
|
|
43
|
+
* 获取参会者组织架构和职务信息
|
|
44
|
+
*
|
|
45
|
+
* @param { XYDepAndTitleParams } params - 查询参数
|
|
46
|
+
* @property { string[] } params.endpointIds - 需要查询的endpointId列表数据
|
|
47
|
+
* @property { string } params.meetingId - 会议室ID
|
|
48
|
+
* @property { string } params.callNumber - 云会议室号
|
|
49
|
+
*/
|
|
50
|
+
getDepAndTitle(params: XYDepAndTitleParams): Promise<any>;
|
|
51
|
+
/**
|
|
52
|
+
* 校验入会敏感词
|
|
53
|
+
*
|
|
54
|
+
* @param { string } displayName - 入会名称
|
|
55
|
+
* @returns
|
|
56
|
+
*/
|
|
57
|
+
checkSensitiveWord(displayName: string, enterpriseId: string): Promise<XYSensitiveWords | null>;
|
|
58
|
+
/**
|
|
59
|
+
* 获取企业信息,包含企业信息配置title/icon、企业名称
|
|
60
|
+
*
|
|
61
|
+
* @param { number } userId - 用户ID
|
|
62
|
+
* @param { string } enterpriseId - 企业ID
|
|
63
|
+
*/
|
|
64
|
+
fetchEnterpriseInfo(userId: number, enterpriseId: string): Promise<any>;
|
|
65
|
+
}
|
|
66
|
+
export default EnterpriseAction;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* webrtc axios request lib
|
|
3
|
-
*
|
|
4
|
-
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
|
-
* @date 2019-11-01 14:14:45
|
|
6
|
-
*/
|
|
7
|
-
import { AxiosRequestConfig, AxiosInstance, AxiosError } from 'axios';
|
|
8
|
-
import Logger from './log/logger';
|
|
9
1
|
import { IToken } from '../type/index';
|
|
2
|
+
import { default as Logger } from '../tools/log/logger';
|
|
3
|
+
import { AxiosRequestConfig, AxiosInstance, AxiosError } from 'axios';
|
|
4
|
+
|
|
10
5
|
export interface IResponseSuccess {
|
|
11
6
|
code: number;
|
|
12
7
|
data: any;
|
|
@@ -19,6 +14,8 @@ export interface IAxiosRequestConfig extends AxiosRequestConfig {
|
|
|
19
14
|
sign?: 0 | 1;
|
|
20
15
|
clientSecret?: string;
|
|
21
16
|
clientId?: string;
|
|
17
|
+
baseUrl?: string;
|
|
18
|
+
callback?: (data: any) => void;
|
|
22
19
|
}
|
|
23
20
|
export declare const invalidError: {
|
|
24
21
|
token_expired: number;
|
|
@@ -43,6 +40,12 @@ declare class HttpClient {
|
|
|
43
40
|
*/
|
|
44
41
|
private getNuaInfo;
|
|
45
42
|
getTokenInfo(): any;
|
|
43
|
+
getClientInfo(): {
|
|
44
|
+
clientType: string;
|
|
45
|
+
clientId: string;
|
|
46
|
+
clientSecret: string;
|
|
47
|
+
'n-ua': string;
|
|
48
|
+
};
|
|
46
49
|
setTokenInfo(tokenInfo: IToken | null): void;
|
|
47
50
|
setLogger(logger: Logger): void;
|
|
48
51
|
setBaseUrl(url: string): void;
|
|
@@ -52,6 +55,10 @@ declare class HttpClient {
|
|
|
52
55
|
}): void;
|
|
53
56
|
private initXyApiGatewaySDK;
|
|
54
57
|
private setSignHeader;
|
|
58
|
+
/**
|
|
59
|
+
* 处理需要退出登录的情况
|
|
60
|
+
*/
|
|
61
|
+
private handleAuthError;
|
|
55
62
|
refreshToken({ baseURL, refresh_token }: {
|
|
56
63
|
baseURL?: string | undefined;
|
|
57
64
|
refresh_token?: string | undefined;
|
|
@@ -62,17 +69,18 @@ declare class HttpClient {
|
|
|
62
69
|
* @param { AxiosError } error - response
|
|
63
70
|
* @returns { AxiosRequestConfig | null }
|
|
64
71
|
*/
|
|
65
|
-
handleGatewayTimestampExpired(error: AxiosError): Promise<
|
|
72
|
+
handleGatewayTimestampExpired(error: AxiosError): Promise<any>;
|
|
66
73
|
/**
|
|
67
74
|
* token失效,刷新token
|
|
68
75
|
*
|
|
69
76
|
* @param { AxiosError } error - response
|
|
70
77
|
* @returns
|
|
71
78
|
*/
|
|
72
|
-
handleTokenExpired(error: AxiosError): Promise<
|
|
73
|
-
assignOptions: (option?: AxiosRequestConfig) => IAxiosRequestConfig & AxiosRequestConfig & {
|
|
79
|
+
handleTokenExpired(error: AxiosError): Promise<import('axios').InternalAxiosRequestConfig<any> | undefined>;
|
|
80
|
+
assignOptions: (option?: AxiosRequestConfig) => IAxiosRequestConfig & AxiosRequestConfig<any> & {
|
|
74
81
|
params: any;
|
|
75
82
|
};
|
|
83
|
+
request: (url: string, option?: IAxiosRequestConfig) => any;
|
|
76
84
|
get: (url: string, option?: IAxiosRequestConfig) => any;
|
|
77
85
|
put: (url: string, data?: any, option?: AxiosRequestConfig) => any;
|
|
78
86
|
post: (url: string, data?: any, option?: AxiosRequestConfig) => any;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { XYEmitter } from '../tools/emitter';
|
|
2
|
+
import { default as LogAction } from './log';
|
|
3
|
+
import { default as MeetingControlAction } from './control';
|
|
4
|
+
import { default as EnterpriseAction } from './enterprise';
|
|
5
|
+
import { default as MeetingAction } from './meeting';
|
|
6
|
+
import { default as ConfigAction } from './config';
|
|
7
|
+
import { default as AuthAction } from './auth';
|
|
8
|
+
import { default as Logger } from '../tools/log/logger';
|
|
9
|
+
import { IMeetingInfo, IToken, XYActionKey } from '../type/index';
|
|
10
|
+
import { default as HttpClient } from './http';
|
|
11
|
+
|
|
12
|
+
export interface ICommonParams {
|
|
13
|
+
securityKey: string;
|
|
14
|
+
callUri?: string;
|
|
15
|
+
}
|
|
16
|
+
declare class Action extends XYEmitter<XYActionKey> {
|
|
17
|
+
logger: Logger | null;
|
|
18
|
+
private commonParams;
|
|
19
|
+
private randomDeviceSN;
|
|
20
|
+
private http;
|
|
21
|
+
private logHttp;
|
|
22
|
+
private meetingInfo;
|
|
23
|
+
private httpDefaultBaseUrl;
|
|
24
|
+
private logHttpDefaultBaseUrl;
|
|
25
|
+
private authAction;
|
|
26
|
+
private configAction;
|
|
27
|
+
private meetingAction;
|
|
28
|
+
private enterpriseAction;
|
|
29
|
+
private meetingControlAction;
|
|
30
|
+
private logAction;
|
|
31
|
+
constructor(logger?: Logger);
|
|
32
|
+
handleRefreshToken(data: any): void;
|
|
33
|
+
getClientInfo(): {
|
|
34
|
+
clientType: string;
|
|
35
|
+
clientId: string;
|
|
36
|
+
clientSecret: string;
|
|
37
|
+
'n-ua': string;
|
|
38
|
+
};
|
|
39
|
+
getAuthAction(): AuthAction;
|
|
40
|
+
getConfigAction(): ConfigAction;
|
|
41
|
+
getMeetingAction(): MeetingAction;
|
|
42
|
+
getMeetingControlAction(): MeetingControlAction;
|
|
43
|
+
getEnterpriseAction(): EnterpriseAction;
|
|
44
|
+
getLogAction(): LogAction;
|
|
45
|
+
getHttpClient(): HttpClient;
|
|
46
|
+
getLogHttpClient(): HttpClient;
|
|
47
|
+
getRandomDeviceSN(): string;
|
|
48
|
+
getCommonParams(): ICommonParams;
|
|
49
|
+
getTokenInfo(): IToken;
|
|
50
|
+
getMeetingInfo(): IMeetingInfo;
|
|
51
|
+
/**
|
|
52
|
+
* 设置服务器地址
|
|
53
|
+
*
|
|
54
|
+
* @param { object } options - 包含基本URL和日志URL的对象。
|
|
55
|
+
* @property { string } options.baseUrl - 服务器的基本URL。
|
|
56
|
+
* @property { string } options.logUrl - 日志服务器的URL。
|
|
57
|
+
*/
|
|
58
|
+
setBaseUrl({ baseUrl, logUrl }: {
|
|
59
|
+
baseUrl?: string;
|
|
60
|
+
logUrl?: string;
|
|
61
|
+
}): void;
|
|
62
|
+
/**
|
|
63
|
+
* 设置API网关校验信息
|
|
64
|
+
*
|
|
65
|
+
* @param { object } options - API网关校验信息
|
|
66
|
+
* @property { string } options.clientId - 网关校验
|
|
67
|
+
* @property { string } options.clientSecret - 网关密钥
|
|
68
|
+
*/
|
|
69
|
+
setClientInfo({ clientId, clientSecret }: {
|
|
70
|
+
clientId: string;
|
|
71
|
+
clientSecret: string;
|
|
72
|
+
}): void;
|
|
73
|
+
/**
|
|
74
|
+
* 设置会议相关会议,用于后续请求
|
|
75
|
+
*
|
|
76
|
+
* @param { IMeetingInfo } info - 会议相关信息
|
|
77
|
+
*/
|
|
78
|
+
setMeetingInfo(info: IMeetingInfo): void;
|
|
79
|
+
/**
|
|
80
|
+
* 设置token相关信息
|
|
81
|
+
*
|
|
82
|
+
* @param { IToken | null } tokenInfo - token信息
|
|
83
|
+
*/
|
|
84
|
+
setTokenInfo(tokenInfo: IToken | null): void;
|
|
85
|
+
/**
|
|
86
|
+
* 设置默认参数,如securityKey
|
|
87
|
+
*
|
|
88
|
+
* @param { Record<string, any> } data - 参数
|
|
89
|
+
*/
|
|
90
|
+
setCommonParams(data: Record<string, any>): void;
|
|
91
|
+
}
|
|
92
|
+
export default Action;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Method } from 'axios';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 支持能力集的接口key
|
|
5
|
+
*/
|
|
6
|
+
export type AbilityAPIKey = 'callUri' | 'verifyPassword' | 'watermarkContent' | 'meetingInviteInfo' | 'cloudMeetingRooms' | 'inComingCallUrlInfo' | 'recordStorage';
|
|
7
|
+
/**
|
|
8
|
+
* 接口信息
|
|
9
|
+
*
|
|
10
|
+
* @param { string } url - URL地址
|
|
11
|
+
* @param { Method } method - 请求方法
|
|
12
|
+
*/
|
|
13
|
+
export interface APIUrlInfo {
|
|
14
|
+
url: string;
|
|
15
|
+
method: Method;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* 支持能力集的接口信息,包括URL、请求方法、参数处理函数、数据处理函数和响应处理函数。
|
|
19
|
+
*
|
|
20
|
+
* @param { string } url - URL地址
|
|
21
|
+
* @param { Method } method - 请求方法
|
|
22
|
+
* @param { (params: any) => any } useParams - 参数处理函数,用于处理请求参数
|
|
23
|
+
* @param { (data: unknown) => any } useData - 数据处理函数,用于处理请求数据
|
|
24
|
+
* @param { (data: unknown) => any } useResponse - 响应处理函数,用于处理响应数据
|
|
25
|
+
*/
|
|
26
|
+
export interface AbilityUrlInfo extends APIUrlInfo {
|
|
27
|
+
useParams: (params: any) => any;
|
|
28
|
+
useData: (data: unknown) => any;
|
|
29
|
+
useResponse: (data: unknown) => any;
|
|
30
|
+
}
|
package/action/log.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as BaseAction } from './base';
|
|
2
|
+
import { default as Action } from '.';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 日志模块
|
|
6
|
+
*/
|
|
7
|
+
declare class LogAction extends BaseAction {
|
|
8
|
+
constructor(action: Action);
|
|
9
|
+
/**
|
|
10
|
+
* 日志上传
|
|
11
|
+
*
|
|
12
|
+
* @param data
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
uploadLog(data: any): Promise<any>;
|
|
16
|
+
}
|
|
17
|
+
export default LogAction;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { AutoMute } from '../type/index';
|
|
2
|
+
import { IMeetingInviteParams } from '../type/action';
|
|
3
|
+
import { default as BaseAction } from './base';
|
|
4
|
+
import { default as Action } from '.';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 会议室管理模块
|
|
8
|
+
*/
|
|
9
|
+
declare class MeetingAction extends BaseAction {
|
|
10
|
+
constructor(action: Action);
|
|
11
|
+
/**
|
|
12
|
+
* 获取云会议室信息
|
|
13
|
+
*
|
|
14
|
+
* 3.10_20240214 根据能力集更换成新的接口, 原接口:/api/rest/uss/v4/callUrlInfoV2,
|
|
15
|
+
*
|
|
16
|
+
* @param { Object } params
|
|
17
|
+
* @param { string } number 会议号
|
|
18
|
+
* @param { string } country 国际化
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
getCallUri(params: {
|
|
22
|
+
number: string;
|
|
23
|
+
country?: string;
|
|
24
|
+
}): Promise<any>;
|
|
25
|
+
/**
|
|
26
|
+
* 校验会议室密码
|
|
27
|
+
*
|
|
28
|
+
* 3.10_20240214 更换成新的接口, 原接口:/api/rest/uss/v4/en/cloudmeeting/validation
|
|
29
|
+
*
|
|
30
|
+
* @param { string } confNumber 会议号
|
|
31
|
+
* @param { string } password 密码
|
|
32
|
+
* @returns
|
|
33
|
+
*/
|
|
34
|
+
verifyPassword(confNumber: string, password: string): Promise<any>;
|
|
35
|
+
/**
|
|
36
|
+
* 监课模式不需要入会密码
|
|
37
|
+
*
|
|
38
|
+
* @param { string } confNumber
|
|
39
|
+
* @returns
|
|
40
|
+
*/
|
|
41
|
+
ignoreMeetingMonitor(confNumber: string): Promise<any>;
|
|
42
|
+
/**
|
|
43
|
+
* 获取会议室水印
|
|
44
|
+
*
|
|
45
|
+
* 3.10_20240214 根据能力集更换成新的接口, 原接口:/api/rest/v1/meetingroom/conferenceNumber/watermarkContent/{conferenceNumber}
|
|
46
|
+
*
|
|
47
|
+
* @param { string } conferenceNumber 会议号
|
|
48
|
+
* @returns
|
|
49
|
+
*/
|
|
50
|
+
getWatermarkContent(conferenceNumber: string): Promise<any>;
|
|
51
|
+
/**
|
|
52
|
+
* 获取随机云会议室号(目前仅用户巡课)
|
|
53
|
+
*
|
|
54
|
+
* @param { number } userProfileId 用户ID
|
|
55
|
+
* @param { string } securityKey
|
|
56
|
+
* @param { IGetConferenceParams } params
|
|
57
|
+
* @returns
|
|
58
|
+
*/
|
|
59
|
+
getConference(userProfileId: number, securityKey: string, params: {
|
|
60
|
+
autoMute: AutoMute;
|
|
61
|
+
}): Promise<any>;
|
|
62
|
+
/**
|
|
63
|
+
* 获取会议邀请链接信息
|
|
64
|
+
*
|
|
65
|
+
* 3.10_20240214 更换接口, 原接口:/page/client/shareConference/infomation
|
|
66
|
+
*
|
|
67
|
+
* @param { IMeetingInviteParams } params 邀请链接请求参数
|
|
68
|
+
* @returns
|
|
69
|
+
*/
|
|
70
|
+
getMeetingInviteInfo(params: IMeetingInviteParams): Promise<any>;
|
|
71
|
+
/**
|
|
72
|
+
* 获取个人云会议室信息,包含入会密码和个人云会议室号
|
|
73
|
+
*
|
|
74
|
+
* 3.10_20240214 更换接口, 原接口:/api/rest/v3/en/user/${userId}/cloudMeetingRooms
|
|
75
|
+
*
|
|
76
|
+
* @param { string } userId 用户ID
|
|
77
|
+
* @returns
|
|
78
|
+
*/
|
|
79
|
+
getCloudMeetingRooms(userId: string): Promise<any>;
|
|
80
|
+
/**
|
|
81
|
+
* 获取参会者头像
|
|
82
|
+
*
|
|
83
|
+
* 3.10_20240214 更换接口, 原接口:/api/rest/v4/en/incomingcallUrlInfo
|
|
84
|
+
*
|
|
85
|
+
* @param { string } callUrl 待获取头像的参会者callUri
|
|
86
|
+
* @returns
|
|
87
|
+
*/
|
|
88
|
+
getInComingCallUrlInfo(callUrl: string): Promise<{
|
|
89
|
+
avatar: string;
|
|
90
|
+
}>;
|
|
91
|
+
/**
|
|
92
|
+
* 检查会议室录制权限
|
|
93
|
+
*
|
|
94
|
+
* @param { string } confNumber 云会议室号
|
|
95
|
+
* @param { string } meetingId 会议室ID
|
|
96
|
+
* @returns
|
|
97
|
+
*/
|
|
98
|
+
checkPermissionWithMeetingNumber(confNumber: string, meetingId: string): Promise<any>;
|
|
99
|
+
/**
|
|
100
|
+
* 录制存储空间检查
|
|
101
|
+
*
|
|
102
|
+
* @param { string } recordingUrl
|
|
103
|
+
* @returns
|
|
104
|
+
*/
|
|
105
|
+
checkStorageSpaceWithRecordingUrl(recordingUrl: string): Promise<any>;
|
|
106
|
+
}
|
|
107
|
+
export default MeetingAction;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* XYLink 入口配置
|
|
3
|
-
*
|
|
4
|
-
* Created at : 2023-04-26 15:28:46
|
|
5
|
-
* Last modified : 2024-04-23 19:16:27
|
|
6
|
-
*/
|
|
7
1
|
import { IClientConfig } from '../type/index';
|
|
2
|
+
|
|
8
3
|
export declare const DEFAULT_LOG_STYLE = "color: #3876ff;";
|
|
9
4
|
export declare const DEFAULT_LINE = "*********************************************************";
|
|
10
5
|
/**
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WebRTC SDK视频流采集约束配置
|
|
3
|
-
*
|
|
4
|
-
* Created at : 2023-10-11 11:19:12
|
|
5
|
-
* Last modified : 2024-05-14 11:14:07
|
|
6
|
-
*/
|
|
7
1
|
import { XYContentConfig, XYPeopleConfig, StreamResolution, ConstraintMode, StreamFrameRate } from '../type/index';
|
|
2
|
+
|
|
8
3
|
/**
|
|
9
4
|
* people基础约束配置
|
|
10
5
|
*/
|
|
@@ -1,26 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* Created at : 2023-10-11 11:18:07
|
|
5
|
-
* Last modified : 2024-05-31 14:05:56
|
|
6
|
-
*/
|
|
7
|
-
import { TLocale } from '../type/index';
|
|
8
|
-
export declare const SERVER_ERROR_CODE_MAP: {
|
|
9
|
-
[key: number | string]: string;
|
|
10
|
-
};
|
|
11
|
-
export declare const UPDATE_NAME_ERROR_CODE: {
|
|
12
|
-
[key: number]: string;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* 代码错误提示
|
|
16
|
-
*/
|
|
17
|
-
export declare const ERROR_CODE: {
|
|
18
|
-
[key in TLocale]: {
|
|
19
|
-
[key: string]: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* 各个服务错误码备份
|
|
2
|
+
* 统一错误码,各个服务错误码备份
|
|
24
3
|
*/
|
|
25
4
|
export declare const DEFAULT_ERROR_CODE: {
|
|
26
5
|
version: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TLocale } from '../../type/index';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* disconnected:此类详情返回的code都是state:200,无法从code区分,只能从此detail值区分
|
|
5
|
+
*/
|
|
6
|
+
export declare const NO_EXCEPTION_MAP: string[];
|
|
7
|
+
/**
|
|
8
|
+
* disconnected:登录过期detail值
|
|
9
|
+
*/
|
|
10
|
+
export declare const LOGIN_EXPIRED_MAP: string[];
|
|
11
|
+
export declare const FAIL_ENUM_MAP: {
|
|
12
|
+
[key in TLocale]: {
|
|
13
|
+
[key: string]: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WEBRTC SDK ENUM TYPE
|
|
3
|
-
*
|
|
4
|
-
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
|
-
* @date 2019-10-30 14:12:52
|
|
6
|
-
*/
|
|
7
1
|
import { IDefault, IOPERATE_MAP, IRoster, IFeatureConfig, StreamStatus, StreamType, ILoggerConfig, FacingMode, StreamResolution, TemplateMode, ContentTemplateMode, LayoutConfig, IMediaConfig, IMakeCall, ContentTrackConfig, PeopleTrackConfig, SwitchDeviceConfig, DEVICE_KIND } from '../type/index';
|
|
2
|
+
|
|
8
3
|
export * from './constraints';
|
|
9
4
|
export * from './analyser';
|
|
10
5
|
export declare const LOG_CACHE_COUNT = 10;
|
|
@@ -215,9 +210,9 @@ export declare const MEETING_CONTROL_PLATFORM: {
|
|
|
215
210
|
};
|
|
216
211
|
export declare const LOCAL_SHARED_MAX_VIEW_COUNT = 4;
|
|
217
212
|
/**
|
|
218
|
-
*
|
|
213
|
+
* 布局相关默认配置
|
|
219
214
|
*/
|
|
220
|
-
export declare const DEFAULT_LAYOUT_CONFIG: LayoutConfig
|
|
215
|
+
export declare const DEFAULT_LAYOUT_CONFIG: Required<LayoutConfig>;
|
|
221
216
|
/**
|
|
222
217
|
* Web支持的轮询画面
|
|
223
218
|
*/
|
|
@@ -290,4 +285,12 @@ export declare const DEFAULT_DEVICE_CONFIG: SwitchDeviceConfig;
|
|
|
290
285
|
export declare const DEFAULT_KIND_MAP: {
|
|
291
286
|
[key in DEVICE_KIND]: string;
|
|
292
287
|
};
|
|
288
|
+
/**
|
|
289
|
+
* SDK内部上报退会消息时,标记内部的消息type,用来区分和服务端的退会消息
|
|
290
|
+
*/
|
|
291
|
+
export declare const DEFAULT_CUSTOM_MSG_TYPE = "XYSDK_CUSTOM_MSG";
|
|
293
292
|
export declare const INIT_CONTENT_STREAMS: {};
|
|
293
|
+
/**
|
|
294
|
+
* 匹配除了大小写字母、数字、汉字以及空格、特定的标点符号((-_--.))和特殊字符之外的任何字符
|
|
295
|
+
*/
|
|
296
|
+
export declare const SPECIAL_CHARACTERS_REGEX: RegExp;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { XYNotificationType } from '../type/meeting';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 签到文案匹配
|
|
5
|
+
*/
|
|
6
|
+
export declare const COPY_WRITING: Record<number, string>;
|
|
7
|
+
/**
|
|
8
|
+
* 会控消息
|
|
9
|
+
*
|
|
10
|
+
* @property { 44 } IM - 聊天权限
|
|
11
|
+
* @property { 52 } HOST - 主持人
|
|
12
|
+
* @property { 53 } CO_CHAIR - 联席主持人
|
|
13
|
+
* @property { 54 } RENAME - 改名权限
|
|
14
|
+
*/
|
|
15
|
+
export declare const NotificationTypeMap: Record<number, XYNotificationType>;
|