@xylink/xy-rtc-sdk 4.0.1 → 4.0.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.
Files changed (168) hide show
  1. package/{README.MD → README.md} +1 -1
  2. package/action/ability.d.ts +151 -0
  3. package/action/api.d.ts +252 -0
  4. package/action/auth.d.ts +134 -0
  5. package/action/base.d.ts +13 -0
  6. package/action/config.d.ts +63 -0
  7. package/action/control.d.ts +101 -0
  8. package/action/enterprise.d.ts +66 -0
  9. package/{lib/tools/httpClient.d.ts → action/http.d.ts} +19 -11
  10. package/action/index.d.ts +92 -0
  11. package/action/index.type.d.ts +30 -0
  12. package/action/log.d.ts +17 -0
  13. package/action/meeting.d.ts +107 -0
  14. package/{lib/enum → enum}/client.d.ts +1 -6
  15. package/{lib/enum → enum}/constraints.d.ts +1 -6
  16. package/{lib/enum → enum}/device.d.ts +6 -0
  17. package/{lib/enum/errorCode.d.ts → enum/errorCode/common.d.ts} +1 -22
  18. package/enum/errorCode/index.d.ts +6 -0
  19. package/enum/errorCode/server.d.ts +10 -0
  20. package/enum/errorCode/signal.d.ts +15 -0
  21. package/{lib/enum → enum}/index.d.ts +11 -8
  22. package/enum/meeting.d.ts +15 -0
  23. package/{lib/enum → enum}/polling.d.ts +1 -0
  24. package/feature/artboard/index.d.ts +139 -0
  25. package/feature/artboard/index.type.d.ts +264 -0
  26. package/{lib/feature → feature}/customMessage/index.d.ts +3 -8
  27. package/{lib/feature → feature}/edu/index.d.ts +2 -1
  28. package/{lib/feature → feature}/edu/index.type.d.ts +1 -0
  29. package/feature/im/index.d.ts +89 -0
  30. package/feature/im/index.type.d.ts +30 -0
  31. package/feature/index.d.ts +29 -0
  32. package/feature/query/index.d.ts +36 -0
  33. package/feature/query/index.type.d.ts +61 -0
  34. package/{lib/feature → feature}/speaker/index.d.ts +5 -10
  35. package/{lib/feature → feature}/speaker/index.type.d.ts +1 -0
  36. package/{lib/index.d.ts → index.d.ts} +19 -21
  37. package/{lib/interface → interface}/clientInterface.type.d.ts +24 -11
  38. package/{lib/interface → interface}/contentTrackInterface.type.d.ts +1 -6
  39. package/{lib/interface → interface}/event.type.d.ts +60 -1
  40. package/{lib/interface → interface}/videoAudioTrackInterface.type.d.ts +2 -7
  41. package/{lib/main → main}/ability/const.d.ts +1 -0
  42. package/{lib/main → main}/ability/index.d.ts +5 -10
  43. package/main/auth/index.d.ts +160 -0
  44. package/main/auth/index.type.d.ts +63 -0
  45. package/main/client/clientBase.d.ts +60 -0
  46. package/main/client/clientState.d.ts +36 -0
  47. package/{lib/main/client.d.ts → main/client/index.d.ts} +253 -79
  48. package/main/client/index.type.d.ts +42 -0
  49. package/{lib/main → main}/device/index.d.ts +5 -15
  50. package/{lib/tools → main/helper}/i18n.d.ts +2 -1
  51. package/{lib/main → main}/helper/index.d.ts +9 -7
  52. package/{lib/main → main}/layout/index.d.ts +7 -16
  53. package/{lib/main → main}/layout/index.type.d.ts +10 -9
  54. package/{lib/main → main}/layout/polling.d.ts +3 -11
  55. package/{lib/main → main}/layout/state.d.ts +4 -10
  56. package/{lib/tools → main/layout}/template/index.d.ts +25 -7
  57. package/{lib/main/layout/template.d.ts → main/layout/template/manager.d.ts} +2 -1
  58. package/main/layout/template/mobile.d.ts +4 -0
  59. package/main/layout/template/polling.d.ts +3 -0
  60. package/{lib/main → main}/media/index.d.ts +13 -11
  61. package/{lib/main → main}/media/index.type.d.ts +1 -0
  62. package/{lib/main → main}/meeting/control.d.ts +20 -1
  63. package/{lib/main → main}/meeting/control.type.d.ts +1 -0
  64. package/{lib/main → main}/meeting/index.d.ts +39 -32
  65. package/main/meeting/index.type.d.ts +43 -0
  66. package/{lib/main → main}/meeting/verify.d.ts +2 -7
  67. package/{lib/main/peer.d.ts → main/peer/index.d.ts} +30 -25
  68. package/main/peer/index.type.d.ts +10 -0
  69. package/{lib/main → main}/plugin/index.d.ts +2 -7
  70. package/{lib/main → main}/quality/index.d.ts +1 -6
  71. package/{lib/main → main}/quality/quality.worker.d.ts +1 -4
  72. package/{lib/main → main}/quality/report.d.ts +2 -1
  73. package/{lib/main → main}/render/index.d.ts +4 -9
  74. package/{lib/main → main}/render/index.type.d.ts +2 -7
  75. package/{lib/main → main}/render/videoManager.d.ts +2 -7
  76. package/{lib/main → main}/roster/index.d.ts +9 -9
  77. package/{lib/main → main}/server/index.d.ts +73 -4
  78. package/main/server/index.type.d.ts +53 -0
  79. package/{lib/main → main}/signal/index.d.ts +2 -1
  80. package/{lib/main → main}/socket/index.d.ts +6 -12
  81. package/{lib/main → main}/stream/index.d.ts +17 -21
  82. package/{lib/main → main}/track/baseTrack.d.ts +6 -14
  83. package/{lib/main → main}/track/contentTrack.d.ts +4 -12
  84. package/main/track/customContentTrack.d.ts +10 -0
  85. package/main/track/customVideoAudioTrack.d.ts +10 -0
  86. package/{lib/main → main}/track/helper.d.ts +1 -1
  87. package/{lib/main → main}/track/videoAudioCapture.d.ts +2 -10
  88. package/{lib/main → main}/track/videoAudioTrack.d.ts +13 -15
  89. package/{lib/main → main}/vom/index.d.ts +2 -7
  90. package/package.json +27 -112
  91. package/{lib/tools/analyser.d.ts → tools/analyser/index.d.ts} +2 -9
  92. package/{lib/tools/analyserManager.d.ts → tools/analyser/manager.d.ts} +4 -13
  93. package/{lib/tools → tools}/config.d.ts +3 -10
  94. package/tools/data/list.d.ts +87 -0
  95. package/tools/data/map.d.ts +17 -0
  96. package/{lib/tools/detectBrowser/index.d.ts → tools/detector/browser.d.ts} +3 -3
  97. package/{lib/tools/detectTool → tools/detector}/index.d.ts +3 -7
  98. package/{lib/tools/detectStream/index.d.ts → tools/detector/stream.d.ts} +2 -9
  99. package/{lib/tools → tools}/emitter.d.ts +9 -3
  100. package/tools/frame/index.d.ts +36 -0
  101. package/tools/frame/index.type.d.ts +1 -0
  102. package/tools/index.d.ts +72 -0
  103. package/{lib/tools/dbManager.d.ts → tools/log/db.d.ts} +8 -14
  104. package/{lib/tools → tools}/log/logger.d.ts +6 -9
  105. package/tools/log/logger.worker.d.ts +10 -0
  106. package/{lib/tools → tools}/log/loggerManager.d.ts +3 -3
  107. package/tools/log/utils.d.ts +6 -0
  108. package/{lib/tools → tools}/pressure/index.d.ts +2 -9
  109. package/{lib/tools/promiseQueue.d.ts → tools/queue/async.d.ts} +3 -9
  110. package/tools/queue/queue.type.d.ts +10 -0
  111. package/{lib/tools/queue.d.ts → tools/queue/sync.d.ts} +3 -9
  112. package/{lib/tools → tools}/resize.d.ts +3 -4
  113. package/{lib/tools/snapshot.d.ts → tools/snapshot/index.d.ts} +3 -11
  114. package/tools/snapshot/index.type.d.ts +38 -0
  115. package/{lib/tools → tools/socket}/socket.d.ts +6 -10
  116. package/tools/socket/socketManager.d.ts +32 -0
  117. package/tools/store.d.ts +47 -0
  118. package/tools/utils.d.ts +162 -0
  119. package/{lib/tools → tools}/verify.d.ts +1 -1
  120. package/tools/window.d.ts +31 -0
  121. package/{lib/type → type}/ability.d.ts +3 -1
  122. package/{lib/type → type}/analyser.d.ts +1 -8
  123. package/{lib/type → type}/auth.d.ts +34 -0
  124. package/{lib/type → type}/base.d.ts +43 -11
  125. package/{lib/type → type}/capture.d.ts +1 -0
  126. package/{lib/type → type}/client.d.ts +65 -70
  127. package/{lib/type → type}/index.d.ts +5 -3
  128. package/{lib/type → type}/layout.d.ts +15 -1
  129. package/{lib/type → type}/logger.d.ts +1 -6
  130. package/{lib/type → type}/meeting.d.ts +105 -15
  131. package/{lib/type → type}/quality.d.ts +2 -7
  132. package/{lib/type → type}/stream.d.ts +4 -5
  133. package/{lib/type → type}/track.d.ts +1 -9
  134. package/xyrtc.js +23212 -0
  135. package/lib/action/index.d.ts +0 -415
  136. package/lib/enum/meeting.d.ts +0 -4
  137. package/lib/feature/index.d.ts +0 -3
  138. package/lib/main/auth/index.d.ts +0 -101
  139. package/lib/main/clientBase.d.ts +0 -40
  140. package/lib/main/clientState.d.ts +0 -56
  141. package/lib/main/server/index.type.d.ts +0 -21
  142. package/lib/main/track/customContentTrack.d.ts +0 -18
  143. package/lib/main/track/customVideoAudioTrack.d.ts +0 -18
  144. package/lib/tools/enum.d.ts +0 -6
  145. package/lib/tools/index.d.ts +0 -8
  146. package/lib/tools/log/logger.worker.d.ts +0 -13
  147. package/lib/tools/regex.d.ts +0 -4
  148. package/lib/tools/store.d.ts +0 -15
  149. package/lib/tools/template/mobile.d.ts +0 -9
  150. package/lib/tools/template/polling.d.ts +0 -8
  151. package/lib/tools/utils.d.ts +0 -97
  152. package/lib/xyrtc.cjs.js +0 -1
  153. package/lib/xyrtc.umd.js +0 -1
  154. /package/{lib/enum → enum}/analyser.d.ts +0 -0
  155. /package/{lib/enum → enum}/i18n.d.ts +0 -0
  156. /package/{lib/interface → interface}/baseModule.type.d.ts +0 -0
  157. /package/{lib/main → main}/device/index.type.d.ts +0 -0
  158. /package/{lib/main → main}/helper/index.type.d.ts +0 -0
  159. /package/{lib/main → main}/meeting/verify.type.d.ts +0 -0
  160. /package/{lib/main → main}/render/videoManager.type.d.ts +0 -0
  161. /package/{lib/main → main}/vom/index.type.d.ts +0 -0
  162. /package/{lib/tools/detectTool → tools/detector}/index.type.d.ts +0 -0
  163. /package/{lib/tools/detectStream/index.type.d.ts → tools/detector/stream.type.d.ts} +0 -0
  164. /package/{lib/tools → tools}/pressure/index.type.d.ts +0 -0
  165. /package/{lib/type → type}/action.d.ts +0 -0
  166. /package/{lib/type → type}/peer.d.ts +0 -0
  167. /package/{lib/type → type}/polling.d.ts +0 -0
  168. /package/{lib/type → type}/socket.d.ts +0 -0
@@ -1,5 +1,6 @@
1
- import Logger from './logger';
2
1
  import { ILoggerConfig, UploadLogParams } from '../../type/index';
2
+ import { default as Logger } from './logger';
3
+
3
4
  declare class LogManager {
4
5
  private logMap;
5
6
  private static instance;
@@ -66,5 +67,4 @@ declare class LogManager {
66
67
  private exportAllBlob;
67
68
  }
68
69
  declare const logManager: LogManager;
69
- export default LogManager;
70
- export { logManager };
70
+ export { logManager, LogManager };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 控制台输出日志
3
+ *
4
+ * @param { any } message - 日志消息
5
+ */
6
+ export declare const consoleLog: (message: any) => void;
@@ -1,13 +1,6 @@
1
- /**
2
- * WebRTC SDK Pressure Manager
3
- *
4
- * Note: https://w3c.github.io/compute-pressure/#dfn-valid-source-types
5
- *
6
- * Created at : 2024-06-28 16:55:47
7
- * Last modified : 2024-06-28 18:24:13
8
- */
1
+ import { default as Logger } from '../log/logger';
9
2
  import { XYBaseModule } from '../../interface/baseModule.type';
10
- import Logger from '../log/logger';
3
+
11
4
  /**
12
5
  * @class
13
6
  * @description: Device pressure
@@ -1,11 +1,6 @@
1
- /**
2
- * XYLink WebRTC SDK Queue Task Lib
3
- *
4
- * Created at : 2023-04-19 09:46:28
5
- * Last modified : 2023-04-25 16:54:44
6
- */
7
- type AsyncFn<T> = (...args: any[]) => Promise<T>;
8
- declare class PromiseQueue<T> {
1
+ import { AsyncFn } from './queue.type';
2
+
3
+ export declare class XYAsyncQueue<T> {
9
4
  private isRunning;
10
5
  private taskCompletedCB;
11
6
  private waitingQueue;
@@ -48,4 +43,3 @@ declare class PromiseQueue<T> {
48
43
  */
49
44
  clear(): void;
50
45
  }
51
- export default PromiseQueue;
@@ -0,0 +1,10 @@
1
+ export type SyncItem = {
2
+ task: Fn;
3
+ };
4
+ export type AsyncItem<T> = {
5
+ task: AsyncFn<T>;
6
+ resolve: Fn;
7
+ reject: Fn;
8
+ };
9
+ export type Fn = (...args: any) => void;
10
+ export type AsyncFn<T> = (...args: any[]) => Promise<T>;
@@ -1,11 +1,6 @@
1
- /**
2
- * XYLink WebRTC SDK Queue Task Lib
3
- *
4
- * Created at : 2023-04-19 09:46:28
5
- * Last modified : 2023-04-25 16:54:44
6
- */
7
- type Fn = (...args: any[]) => any;
8
- declare class Queue {
1
+ import { Fn } from './queue.type';
2
+
3
+ export declare class XYSyncQueue {
9
4
  private isLock;
10
5
  private taskCompletedCB;
11
6
  private waitingQueue;
@@ -39,4 +34,3 @@ declare class Queue {
39
34
  */
40
35
  clear(): void;
41
36
  }
42
- export default Queue;
@@ -4,7 +4,7 @@
4
4
  * @author jinghuiLuo - luojinghui424@gmail
5
5
  *
6
6
  * Created at : 2022-10-31 17:18:32
7
- * Last modified : 2022-10-31 17:56:04
7
+ * Last modified : 2024-12-23 11:16:43
8
8
  */
9
9
  /**
10
10
  * 元素尺寸数据
@@ -14,11 +14,10 @@ export interface ResizeData {
14
14
  height: number;
15
15
  element: HTMLElement | null;
16
16
  }
17
- export default class Resize {
17
+ export declare class XYResize {
18
18
  private eleId;
19
19
  private element;
20
20
  private resizeObserver;
21
- private resizeMode;
22
21
  private detectCount;
23
22
  private maxDetectCount;
24
23
  private detectTimer;
@@ -61,5 +60,5 @@ export default class Resize {
61
60
  */
62
61
  removeResizeListener(): void;
63
62
  }
64
- declare const resize: Resize;
63
+ declare const resize: XYResize;
65
64
  export { resize };
@@ -1,13 +1,6 @@
1
- /**
2
- * snapshot implements lib
3
- *
4
- * @summary Implement drawing of video onto canvas and obtain screenshots
5
- *
6
- * Created at : 2023-08-30 15:24:24
7
- * Last modified : 2023-09-12 18:03:44
8
- */
9
- import { SnapshotOptions, SnapshotResult } from '../type/index';
10
- declare class Snapshot {
1
+ import { SnapshotOptions, SnapshotResult } from './index.type';
2
+
3
+ export declare class XYSnapshot {
11
4
  private canvas;
12
5
  private ctx;
13
6
  constructor(canvas?: HTMLCanvasElement);
@@ -28,4 +21,3 @@ declare class Snapshot {
28
21
  */
29
22
  private drawFrame;
30
23
  }
31
- export default Snapshot;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * 截图参数
3
+ *
4
+ * @property { string } id - 参会者Layout Id,通过layout事件列表获取
5
+ * @property { string } imageType - 图片格式, 默认'image/png'
6
+ * @property { number } compressLevel - 图片质量,0-1
7
+ */
8
+ export interface SnapshotParams {
9
+ id: string;
10
+ imageType?: string;
11
+ compressLevel?: number;
12
+ }
13
+ /**
14
+ * canvas绘制video参数
15
+ *
16
+ * @property { boolean } isMirror - 是否镜像显示
17
+ * @property { number } rotate - 是否旋转
18
+ * @property { string } imageType - 图片格式, 默认'image/png'
19
+ * @property { number } compressLevel - 图片质量,0-1
20
+ */
21
+ export interface SnapshotOptions {
22
+ isMirror?: boolean;
23
+ rotate?: number;
24
+ imageType?: string;
25
+ compressLevel?: number;
26
+ }
27
+ /**
28
+ * 截图结果
29
+ *
30
+ * @property { string } dataURL - 图片数据,Base64字符串
31
+ * @property { number } width - 图片的宽度
32
+ * @property { number } height - 图片的高度
33
+ */
34
+ export interface SnapshotResult {
35
+ dataURL: string;
36
+ width: number;
37
+ height: number;
38
+ }
@@ -1,12 +1,8 @@
1
- /**
2
- * Websocket connect
3
- * @authors Luo-jinghui (luojinghui424@gmail.com)
4
- * @date 2019-10-24 12:01:27
5
- */
6
- import Logger from './log/logger';
7
- import { SocketOptions, XYSocketEventKey } from '../type/index';
8
- import Emitter from './emitter';
9
- declare class Socket extends Emitter<XYSocketEventKey> {
1
+ import { XYEmitter } from '../emitter';
2
+ import { SocketOptions, XYSocketEventKey } from '../../type/index';
3
+ import { default as Logger } from '../log/logger';
4
+
5
+ export declare class Socket extends XYEmitter<XYSocketEventKey> {
10
6
  socket: WebSocket;
11
7
  private options;
12
8
  private heatBeatFrequency;
@@ -22,6 +18,7 @@ declare class Socket extends Emitter<XYSocketEventKey> {
22
18
  private pangTimer;
23
19
  private reconnectTimer;
24
20
  private taskQueue;
21
+ id: string;
25
22
  constructor(options: SocketOptions, logger: Logger);
26
23
  /**
27
24
  * 设置参数
@@ -127,4 +124,3 @@ declare class Socket extends Emitter<XYSocketEventKey> {
127
124
  */
128
125
  private reset;
129
126
  }
130
- export default Socket;
@@ -0,0 +1,32 @@
1
+ import { default as Logger } from '../log/logger';
2
+ import { Socket } from './socket';
3
+ import { SocketOptions } from '../../type/socket';
4
+
5
+ export declare class SocketManager {
6
+ private sockets;
7
+ constructor();
8
+ /**
9
+ * 创建Socket实例并添加到SocketManager。
10
+ *
11
+ * @param { SocketOptions } options - Socket实例的选项。
12
+ * @param { Logger } logger - 用于记录日志的对象。
13
+ * @returns { Socket } - 创建的Socket实例。
14
+ */
15
+ createSocket(options: SocketOptions, logger: Logger): Socket;
16
+ /**
17
+ * 添加Socket实例
18
+ *
19
+ * @param { Socket } socket - Socket实例
20
+ */
21
+ addSocket(socket: Socket): void;
22
+ /**
23
+ * 关闭所有Socket连接
24
+ */
25
+ closeAll(): void;
26
+ /**
27
+ * 移除Socket实例
28
+ *
29
+ * @param { Socket } socket - Socket实例
30
+ */
31
+ private removeSocket;
32
+ }
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Store LocalStorage
3
+ * 该类提供与浏览器 localStorage 交互的方法
4
+ *
5
+ * @authors Luo-jinghui (luojinghui424@gmail.com)
6
+ * @date 2019-11-01 14:36:12
7
+ */
8
+ export declare class XYStore {
9
+ static storage: Storage;
10
+ /**
11
+ * 设置 localStorage 中的项目
12
+ *
13
+ * @param { string } key - 存储值的键
14
+ * @param { unknown } value - 要存储的值,可以是任意类型
15
+ */
16
+ static set(key: string, value: unknown): void;
17
+ /**
18
+ * 从 localStorage 中获取项目
19
+ *
20
+ * @param { string } key - 要检索的项目的键
21
+ * @returns { * } - 与键关联的值,如果未找到则返回空字符串
22
+ */
23
+ static get(key: string): any;
24
+ /**
25
+ * 从 localStorage 中删除项目
26
+ *
27
+ * @param { string } key - 要删除的项目的键
28
+ */
29
+ static remove(key: string): void;
30
+ /**
31
+ * 清除 localStorage 中的所有项目
32
+ */
33
+ static clear(): void;
34
+ /**
35
+ * 从 localStorage 中批量删除项目
36
+ *
37
+ * @param { string[] } array - 要删除的键的数组
38
+ */
39
+ static removeList(array: string[]): void;
40
+ /**
41
+ * 序列化要存储的值
42
+ *
43
+ * @param { unknown } value - 要序列化的值,可以是任意类型
44
+ * @returns { string } - 序列化后的值
45
+ */
46
+ static serialize(value: unknown): string;
47
+ }
@@ -0,0 +1,162 @@
1
+ import { IReturnResult, XYError } from '../type/index';
2
+
3
+ /**
4
+ * 防抖函数
5
+ *
6
+ * 在事件被触发N秒后再执行回调,如果在这N秒内又被触发,则重新计时
7
+ * 适用于输入框实时搜索、窗口Resize等场景
8
+ *
9
+ * @param { Function } fn - 需要防抖的函数
10
+ * @param { number } delay - 延迟执行的时间(ms)
11
+ * @returns { Function } 返回新的防抖函数
12
+ */
13
+ export declare const XYDebounce: (fn: Function, delay: number) => () => void;
14
+ /**
15
+ * 节流函数
16
+ *
17
+ * 规定一个单位时间,在这个单位时间内,只能有一次触发事件的回调函数执行
18
+ * 如果在同一个单位时间内某事件被触发多次,只有一次能生效
19
+ * 适用于拖拽场景、计算鼠标移动距离等场景
20
+ *
21
+ * @param { Function } fn - 需要节流的函数
22
+ * @param { number } delay - 最后一次延迟触发时间(ms)
23
+ * @param { number } atleast - 触发最短间隔时间(ms)
24
+ * @returns { Function } 返回新的节流函数
25
+ */
26
+ export declare const XYThrottle: (fn: Function, delay: number, atleast: number) => () => void;
27
+ /**
28
+ * 获取当前时间
29
+ *
30
+ * 格式:xxxx-xx-xx xx:xx
31
+ */
32
+ export declare const XYCurrentTime: () => string;
33
+ /**
34
+ * 获取当前时间
35
+ *
36
+ * Format:xxxx-xx-xx xx:xx:xx xx
37
+ */
38
+ export declare const getTime: () => string;
39
+ /**
40
+ * 获取当前时间
41
+ *
42
+ * Format:xx:xx:xx xx
43
+ */
44
+ export declare const getMillTime: () => string;
45
+ /**
46
+ * 计算两个时间戳相差的天数, 四舍五入保留一位小数
47
+ *
48
+ * @param { number } time1 - 时间戳1
49
+ * @param { number } time2 - 时间戳2
50
+ * @returns { number } day - 天数
51
+ */
52
+ export declare const diffTime: (time1: number, time2: number) => number;
53
+ export declare function mapToObj<T>(data: Map<string, T>): {
54
+ [key: string]: T;
55
+ };
56
+ /**
57
+ * 将对象转换为Map
58
+ *
59
+ * @param { object } obj - 需要转换的对象
60
+ * @returns { Map<string, any> } - 转换后的Map对象
61
+ */
62
+ export declare function objToMap(obj: {
63
+ [key: string]: any;
64
+ }): Map<string, any>;
65
+ /**
66
+ * 获取上报数据状态
67
+ *
68
+ * @param { string } code - 状态码,用于从错误码映射表中获取对应的错误信息
69
+ * @param { unknown } detail - 可选,状态详情信息,默认为空对象
70
+ * @param { string } message - 可选,自定义状态消息,如果提供则优先使用,否则使用错误码映射表中的消息
71
+ * @returns { IReturnResult } - 返回包含状态码、消息和详情的对象
72
+ */
73
+ export declare const getStatus: (code: string, detail?: unknown, message?: string) => IReturnResult;
74
+ /**
75
+ * 获取错误信息
76
+ *
77
+ * @param { any } error - 错误对象,包含错误的基本信息
78
+ * @returns { XYError } - 返回一个包含错误名称、消息、堆栈信息和代码的对象
79
+ */
80
+ export declare const getError: (error?: any) => XYError;
81
+ /**
82
+ * 隐藏关键信息
83
+ *
84
+ * @param { any } data - 需要隐藏的信息
85
+ * @param { string | string[] } key - 需要隐藏的 key
86
+ * @param { number } maxDepth - 最大递归深度,默认为 5
87
+ *
88
+ * @returns { any } - 隐藏后的信息
89
+ */
90
+ export declare const hideKeyInfo: (data: any, key: string | string[], maxDepth?: number) => any;
91
+ /**
92
+ * 判断值类型
93
+ */
94
+ export declare const TYPEOF: {
95
+ isNumber(num: any): num is number;
96
+ isObject(obj: any): boolean;
97
+ isArray(arr: any): arr is any[];
98
+ isString(str: any): str is string;
99
+ isBoolean(str: any): str is boolean;
100
+ isUndefined(str: any): str is undefined;
101
+ isFunction(val: any): val is Function;
102
+ isLetter(val: any): boolean;
103
+ isChinese(val: any): boolean;
104
+ isNumberText(val: any): boolean;
105
+ isSpecialChar(val: any): boolean;
106
+ isWhiteSpace(val: any): boolean;
107
+ };
108
+ /**
109
+ * JSON字符串转对象
110
+ *
111
+ * @param { any } jsonString
112
+ * @returns { object}
113
+ */
114
+ export declare const jsonParse: (jsonString: any) => any;
115
+ /**
116
+ * 字符串转 JSON 字符串
117
+ *
118
+ * @param {string|object} value
119
+ * @returns {string}
120
+ */
121
+ export declare const jsonStringify: (value: string | object) => string;
122
+ /**
123
+ * 清空中文/英文括号和括号内部的内容,返回一个新的字符串
124
+ *
125
+ * @param { string } str - 元数据字符串
126
+ * @returns { string }
127
+ */
128
+ export declare const clearBrackets: (str: string) => string;
129
+ /**
130
+ * 构造查询字符串
131
+ *
132
+ * @param { Object } params - 需要转换的参数
133
+ * @returns { string }
134
+ */
135
+ export declare const buildQueryString: (params: Record<string, any>) => string;
136
+ /**
137
+ * 替换字符串中的占位符
138
+ *
139
+ * @param { string } str - 原始字符串
140
+ * @param { object } replacements - 替换的键值对
141
+ * @returns { string } 替换后的字符串
142
+ */
143
+ export declare const replacePlaceholders: (str: string, replacements: {
144
+ [key: string]: string;
145
+ }) => string;
146
+ /**
147
+ * 拆分url
148
+ *
149
+ * @param { string } url - 需要拆分的url
150
+ * @returns
151
+ */
152
+ export declare const splitUrl: (url: string) => {
153
+ baseUrl: string;
154
+ pathname: string;
155
+ } | {
156
+ baseUrl?: undefined;
157
+ pathname?: undefined;
158
+ };
159
+ /**
160
+ * 取值小数三位
161
+ */
162
+ export declare const getDecimal: (num: number, digits?: number) => number;
@@ -11,4 +11,4 @@ export declare const verifyReqListParams: (reqList: any) => boolean;
11
11
  * @param { Record<string, any> | any } requiredField 校验参数
12
12
  * @returns
13
13
  */
14
- export declare const verifyRequiredField: (requiredField: Record<string, any> | any) => import("..").IReturnResult | null;
14
+ export declare const verifyRequiredField: (requiredField: Record<string, any> | any) => import('..').IReturnResult | null;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * 获取浏览器和系统信息
3
+ */
4
+ export declare class XYWindow {
5
+ /**
6
+ * 浏览器window对象
7
+ */
8
+ static window: Window;
9
+ /**
10
+ * 获取系统信息
11
+ * 包含浏览器UA、location、屏幕信息等
12
+ */
13
+ static getSystemInfo(): {
14
+ userAgent?: undefined;
15
+ location?: undefined;
16
+ devicePixelRatio?: undefined;
17
+ screen?: undefined;
18
+ } | {
19
+ userAgent: string;
20
+ location: Location;
21
+ devicePixelRatio: number;
22
+ screen: {
23
+ width: number;
24
+ height: number;
25
+ availWidth: number;
26
+ availHeight: number;
27
+ colorDepth: number;
28
+ pixelDepth: number;
29
+ };
30
+ };
31
+ }
@@ -3,10 +3,12 @@
3
3
  *
4
4
  * @param { string } USE_SEC_API - 终端是否要使用uss新接口
5
5
  * @param { string } MEETING_SHARE_NEW_PAGE_API - 会议邀请漏洞修复使用新page API
6
+ * @param { string } CHANGE_SEC_API - 终端录制接口整改为安全接口
6
7
  */
7
8
  export declare enum AbilityKey {
8
9
  USE_SEC_API = "use_sec_api",
9
- MEETING_SHARE_NEW_PAGE_API = "meeting_share_new_page_api"
10
+ MEETING_SHARE_NEW_PAGE_API = "meeting_share_new_page_api",
11
+ CHANGE_SEC_API = "hvv_240329"
10
12
  }
11
13
  /**
12
14
  * 能力集
@@ -1,12 +1,5 @@
1
- /**
2
- * Audio Analyser Lib
3
- *
4
- * @summary short description for the file
5
- *
6
- * Created at : 2023-09-05 17:17:12
7
- * Last modified : 2024-04-23 19:08:08
8
- */
9
1
  import { AudioAnalyser } from '../tools/analyser';
2
+
10
3
  /**
11
4
  * 分析器配置
12
5
  *
@@ -102,4 +102,38 @@ export interface ILoginWidthAuthCode {
102
102
  channelId: string;
103
103
  isTempUser?: boolean;
104
104
  }
105
+ /**
106
+ * 三方账号统一认证登录-单点登录
107
+ *
108
+ * @property { string } token - 单点登录Token信息
109
+ * @property { string } thirdPlatform - 三方平台名
110
+ * @property { string } path - 单点登录接口地址,可选参数
111
+ */
112
+ export interface LoginThirdAuthTokenParams {
113
+ token: string;
114
+ thirdPlatform: string;
115
+ path?: string;
116
+ }
117
+ /**
118
+ * 手机验证码登录
119
+ *
120
+ * @property { string } account - 必填,用户账号
121
+ * @property { string } verificationCode - 必填,验证码
122
+ */
123
+ export interface LoginVerifyCodeParams {
124
+ account: string;
125
+ verificationCode: string;
126
+ }
127
+ /**
128
+ * 新用户注册并登录
129
+ *
130
+ * @property { string } loginIdentifier - 必填,手机号
131
+ * @property { string } verificationCode - 必填,验证码
132
+ * @property { string } deviceDisplayName - 必填,用户名
133
+ */
134
+ export interface RegisterAndLoginParams {
135
+ loginIdentifier: string;
136
+ verificationCode: string;
137
+ deviceDisplayName?: string;
138
+ }
105
139
  export {};
@@ -64,18 +64,18 @@ export type Key = string | number;
64
64
  /**
65
65
  * localStorage Key
66
66
  *
67
- * @param { XY_ABILITY } - 能力结果
68
- * @param { XY_LOG_SERVER } - 日志服务
69
- * @param { XY_ERROR_CODE } - 错误码
70
- * @param { XY_I18N_CODE } - 国际化
71
- * @param { XY_TIMESTAMP } - 时间戳
67
+ * @param { ABILITY } - 能力结果
68
+ * @param { LOG_SERVER } - 日志服务
69
+ * @param { ERROR_CODE } - 错误码
70
+ * @param { I18N_CODE } - 国际化
71
+ * @param { TIMESTAMP } - 时间戳
72
72
  */
73
- export declare enum STORAGE {
74
- XY_ABILITY = "XY-ABILITY",
75
- XY_LOG_SERVER = "xy-log-server",
76
- XY_ERROR_CODE = "xy-error-code",
77
- XY_I18N_CODE = "xy-i18n-code",
78
- XY_TIMESTAMP = "xy-timestamp"
73
+ export declare enum XY_STORAGE_KEY {
74
+ ABILITY = "XY-ABILITY",
75
+ LOG_SERVER = "xy-log-server",
76
+ ERROR_CODE = "xy-error-code",
77
+ I18N_CODE = "xy-i18n-code",
78
+ TIMESTAMP = "xy-timestamp"
79
79
  }
80
80
  /**
81
81
  * 可支持的编解码
@@ -101,3 +101,35 @@ export interface XYLocatorServerInfo {
101
101
  node: string;
102
102
  serverName: string;
103
103
  }
104
+ /**
105
+ * XYError 接口定义
106
+ * 此接口用于描述错误对象的结构,包含错误的基本信息。
107
+ *
108
+ * @interface XYError
109
+ * @property { string } name - 可选,错误名称
110
+ * @property { string } message - 可选,错误消息
111
+ * @property { string } stack - 可选,错误堆栈信息
112
+ * @property { string | number } code - 可选,错误代码
113
+ * @property { string | number } errorCode - 可选,错误代码
114
+ * @property { any } detail - 可选,自定义详情
115
+ * @property { string } msg - 错误信息
116
+ */
117
+ export interface XYError {
118
+ name?: string;
119
+ message?: string;
120
+ stack?: string;
121
+ code?: string | number;
122
+ errorCode?: string | number;
123
+ detail?: any;
124
+ msg?: string;
125
+ }
126
+ /**
127
+ * SDK版本信息
128
+ *
129
+ * @property { string } version - 版本号
130
+ * @property { string } createTime - 发版时间
131
+ */
132
+ export interface XYVersion {
133
+ version: string;
134
+ createTime: string;
135
+ }
@@ -1,4 +1,5 @@
1
1
  import { IStreamConfig } from './stream';
2
+
2
3
  export interface IEnableStreamConfig {
3
4
  videoConfig: IStreamConfig | undefined;
4
5
  audioConfig: IStreamConfig | undefined;