@tencentcloud/tuiroom-engine-js 3.2.1 → 3.2.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/dist/index.cjs.js +3 -0
- package/{index.d.ts → dist/index.d.ts} +2 -1
- package/dist/index.esm.js +3 -0
- package/dist/index.js +3 -0
- package/dist/src/error/error-info.d.ts +51 -0
- package/dist/src/error/tui-error.d.ts +10 -0
- package/dist/src/index.d.ts +1502 -0
- package/dist/src/modules/conferenceInvitationManager.d.ts +163 -0
- package/dist/src/modules/conferenceListManager.d.ts +244 -0
- package/dist/src/modules/deviceManager.d.ts +162 -0
- package/dist/src/modules/liveConnectionManager.d.ts +109 -0
- package/dist/src/modules/liveLayoutManager.d.ts +98 -0
- package/dist/src/modules/liveListManager.d.ts +120 -0
- package/dist/src/types.d.ts +1356 -0
- package/dist/src/utils/apiCallQueue.d.ts +18 -0
- package/dist/src/utils/common.d.ts +10 -0
- package/dist/src/utils/constant.d.ts +13 -0
- package/dist/src/utils/environment.d.ts +2 -0
- package/dist/src/utils/logger.d.ts +21 -0
- package/dist/src/utils/utils.d.ts +35 -0
- package/dist/src/utils/validate-config.d.ts +722 -0
- package/dist/src/utils/validate.d.ts +69 -0
- package/package.json +55 -17
- package/index.cjs.js +0 -1
- package/index.esm.js +0 -1
- package/index.js +0 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 装饰器:参数校验(用于校验同步方法)
|
|
3
|
+
* 可传入多个 Rule,位置与 arguments 一一对应,用于校验 arguments
|
|
4
|
+
* @param {...Rule} configs
|
|
5
|
+
* @export
|
|
6
|
+
* @return {Function}
|
|
7
|
+
* @example
|
|
8
|
+
* @validate({
|
|
9
|
+
* name: 'clientConfig',
|
|
10
|
+
* required: true,
|
|
11
|
+
* type: BASIC_TYPE.Object,
|
|
12
|
+
* properties: {
|
|
13
|
+
* sdkAppId: {
|
|
14
|
+
* required: true,
|
|
15
|
+
* type: BASIC_TYPE.Number,
|
|
16
|
+
* allowEmpty: false
|
|
17
|
+
* },
|
|
18
|
+
* userId: {
|
|
19
|
+
* required: true,
|
|
20
|
+
* type: BASIC_TYPE.String,
|
|
21
|
+
* allowEmpty: false
|
|
22
|
+
* },
|
|
23
|
+
* ...
|
|
24
|
+
* }
|
|
25
|
+
* })
|
|
26
|
+
* createClient(clientConfig) {
|
|
27
|
+
*/
|
|
28
|
+
export declare function validate(...configs: any[]): (target: any, fnName: string, descriptor: any) => any;
|
|
29
|
+
/**
|
|
30
|
+
* 装饰器:参数校验(用于校验异步方法)
|
|
31
|
+
* 可传入多个 Rule,位置与 arguments 一一对应,用于校验 arguments
|
|
32
|
+
* @param {...Rule} configs
|
|
33
|
+
* @returns {Function}
|
|
34
|
+
* @example
|
|
35
|
+
* @validateAsync({
|
|
36
|
+
* name: 'stream',
|
|
37
|
+
* required: true,
|
|
38
|
+
* instanceOf: LocalStream,
|
|
39
|
+
* validate: function(stream) {
|
|
40
|
+
* if (stream !== this.localStream_) {
|
|
41
|
+
* throw new TUIError({
|
|
42
|
+
* code: TUIErrorCode.ERR_INVALID_PARAMETER,
|
|
43
|
+
* message: 'stream has not been published yet'
|
|
44
|
+
* });
|
|
45
|
+
* }
|
|
46
|
+
* }
|
|
47
|
+
* })
|
|
48
|
+
* async unpublish() {...}
|
|
49
|
+
*/
|
|
50
|
+
export declare function validateAsync(...configs: any[]): (target: any, fnName: string, descriptor: any) => any;
|
|
51
|
+
/**
|
|
52
|
+
* 若传入非箭头函数,则函数内的 this 指向对应的实例。
|
|
53
|
+
* @callback ValidateFunction
|
|
54
|
+
* @param {*} paramValue 用户传入的参数值
|
|
55
|
+
* @param {Object} instace 装饰器所在类的实例
|
|
56
|
+
*/
|
|
57
|
+
/**
|
|
58
|
+
* 参数校验规则
|
|
59
|
+
* @typedef {Object} Rule
|
|
60
|
+
* @property {Boolean} [required=false] 参数是否必填
|
|
61
|
+
* @property {BASIC_TYPE|BASIC_TYPE[]} [type=] 参数类型
|
|
62
|
+
* @property {Array} [values=] 参数取值
|
|
63
|
+
* @property {Function} [instanceOf=] 参数是某个类的实例
|
|
64
|
+
* @property {Boolean} [allowEmpty=true] 是否允许传空值: 0, NaN, '', ' '
|
|
65
|
+
* @property {Boolean} [notLessThanZero=] 数值是否可以小于0
|
|
66
|
+
* @property {ValidateFunction} [validate=] 自定义参数校验。回调函数的第一个参数是待校验的参数值、第二个参数是类的实例
|
|
67
|
+
* @property {Object.<string, Rule>} [properties=] 非必填,Object 类型的参数的属性校验规则
|
|
68
|
+
* @property {Object.<string, Rule>} [arrayItem=] 非必填,Array 类型的参数的 item 的属性校验规则
|
|
69
|
+
*/
|
package/package.json
CHANGED
|
@@ -1,27 +1,65 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tencentcloud/tuiroom-engine-js",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"description": "TUIRoomEngine Web SDK",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"module": "index.esm.js",
|
|
7
|
-
"types": "index.d.ts",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"im",
|
|
12
|
-
"javascript"
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.esm.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md"
|
|
13
11
|
],
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
"
|
|
12
|
+
"scripts": {
|
|
13
|
+
"dev": "rollup -w -c rollup.config.dev.js",
|
|
14
|
+
"build": "rimraf -rf dist && rollup -c rollup.config.prod.js && node build/publish-package.js",
|
|
15
|
+
"build:jsdoc": "tsc && jsdoc -c ./build/jsdoc.json && node ./build/fix-doc.js",
|
|
16
|
+
"build:typedoc": "typedoc --options ./build/typedoc.json",
|
|
17
|
+
"test": "karma start karma.config.js"
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"keywords": [],
|
|
20
|
+
"author": "xinlxinli",
|
|
20
21
|
"license": "ISC",
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@babel/core": "^7.12.16",
|
|
24
|
+
"@babel/preset-env": "^7.19.4",
|
|
25
|
+
"@rollup/plugin-commonjs": "^23.0.4",
|
|
26
|
+
"@rollup/plugin-json": "^5.0.2",
|
|
27
|
+
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
28
|
+
"@typescript-eslint/eslint-plugin": "^5.33.1",
|
|
29
|
+
"@typescript-eslint/parser": "^5.33.1",
|
|
30
|
+
"docdash-blue": "^1.1.9",
|
|
31
|
+
"eslint": "^8.22.0",
|
|
32
|
+
"eslint-config-tencent": "^1.0.4",
|
|
33
|
+
"fs-extra": "^11.0.0",
|
|
34
|
+
"jasmine-core": "^4.4.0",
|
|
35
|
+
"jsdoc": "^3.6.11",
|
|
36
|
+
"karma": "^6.4.1",
|
|
37
|
+
"karma-chrome-launcher": "^3.1.1",
|
|
38
|
+
"karma-jasmine": "^5.1.0",
|
|
39
|
+
"pretty": "^2.0.0",
|
|
40
|
+
"replace": "^1.2.1",
|
|
41
|
+
"rollup": "^2.78.0",
|
|
42
|
+
"rollup-plugin-babel": "^4.4.0",
|
|
43
|
+
"rollup-plugin-dts": "^6.1.0",
|
|
44
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
45
|
+
"rollup-plugin-typescript2": "^0.34.1",
|
|
46
|
+
"tslib": "^2.4.0",
|
|
47
|
+
"typedoc": "^0.23.15",
|
|
48
|
+
"typescript": "^4.7.4",
|
|
49
|
+
"rimraf": "^6.0.1"
|
|
50
|
+
},
|
|
21
51
|
"dependencies": {
|
|
22
|
-
"rtc-detect": "^0.0.5",
|
|
23
52
|
"@tencentcloud/chat": "^3.5.5",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
53
|
+
"core-js": "^3.8.3",
|
|
54
|
+
"eventemitter3": "^4.0.7",
|
|
55
|
+
"rtc-detect": "^0.0.5",
|
|
56
|
+
"tcplayer.js": "5.3.4",
|
|
57
|
+
"trtc-cloud-js-sdk": "2.9.3"
|
|
58
|
+
},
|
|
59
|
+
"browser": {
|
|
60
|
+
"fs": false,
|
|
61
|
+
"path": false,
|
|
62
|
+
"os": false,
|
|
63
|
+
"url": false
|
|
26
64
|
}
|
|
27
65
|
}
|