call-live-sdk 1.0.7 → 1.0.9

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.
@@ -40,6 +40,11 @@ export declare class GlobalErrorBoundary extends Component<Props, State> {
40
40
  * @param event 自定义事件对象
41
41
  */
42
42
  private handleApiError;
43
+ /**
44
+ * 处理参数验证错误事件
45
+ * @param event 自定义事件对象
46
+ */
47
+ private handleParamValidationError;
43
48
  /**
44
49
  * 处理Token过期事件
45
50
  * @param event 自定义事件对象
@@ -1,4 +1,10 @@
1
1
  import { CallSDKConfig, GuestSDKConfig } from '../types/sdk';
2
+ export declare enum ErrorSeverity {
3
+ /** 严重错误,需要显示错误页面 */
4
+ SEVERE = "severe",
5
+ /** 非严重错误,只需要弹出窗口提示 */
6
+ WARNING = "warning"
7
+ }
2
8
  export declare enum GlobalErrorType {
3
9
  /** 接口报错 */
4
10
  API_ERROR = "api_error",
@@ -14,6 +20,8 @@ export interface GlobalError {
14
20
  code: number;
15
21
  message: string;
16
22
  details?: any;
23
+ /** 错误严重程度 */
24
+ severity: ErrorSeverity;
17
25
  }
18
26
  interface SdkStore {
19
27
  callConfig: CallSDKConfig | null;
@@ -6,15 +6,15 @@ export interface LiveConfig {
6
6
  }
7
7
  export interface ComponentsConfig {
8
8
  /** 是否启用聊天功能 */
9
- chat: {
9
+ chat?: {
10
10
  enabled: boolean;
11
11
  };
12
12
  /** 是否启用团队功能 */
13
- team: {
13
+ team?: {
14
14
  enabled: boolean;
15
15
  };
16
16
  /** 是否启用连麦功能 */
17
- call: {
17
+ call?: {
18
18
  enabled: boolean;
19
19
  inviteLink: string;
20
20
  };
@@ -25,13 +25,13 @@ export interface CallSDKConfig {
25
25
  /** 直播配置 */
26
26
  liveId: number;
27
27
  /** 直播标题 */
28
- title: string;
28
+ title?: string;
29
29
  /** 商户ID */
30
30
  agentId: number;
31
31
  /** 签名信息 */
32
32
  sign: string;
33
33
  /** 组件配置 */
34
- components: ComponentsConfig;
34
+ components?: ComponentsConfig;
35
35
  }
36
36
  export interface GuestSDKConfig {
37
37
  /** 挂载元素 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "call-live-sdk",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "type": "module",
5
5
  "main": "./dist/call-live-sdk.umd.js",
6
6
  "module": "./dist/call-live-sdk.es.js",