ysyt-agent-sdk 1.0.134 → 1.0.136

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.
@@ -104,7 +104,7 @@ export declare class SIPClient {
104
104
  * 销毁 SIP 客户端(释放资源、注销、挂断)
105
105
  */
106
106
  destroy(): Promise<void>;
107
- private reconnect;
107
+ reconnect(): Promise<void>;
108
108
  /**
109
109
  * 获取当前通话的网络统计信息
110
110
  * 返回如:RTT、抖动、丢包、码率、编码器等
@@ -15,6 +15,7 @@ declare class CallInfoStore extends ReactiveStore<CallInfoType> {
15
15
  updateTransferIsAnswer(transferIsAnswer: boolean): void;
16
16
  updateSelectOutNumber(selectOutNumber: string): void;
17
17
  updateCustomerInfo(customerObject: CallCrmObject): void;
18
+ updateIsNextState(isNextState: boolean): void;
18
19
  reset(): void;
19
20
  getCallInfo(): CallInfoType;
20
21
  get<K extends keyof CallInfoType>(key: K): CallInfoType[K];
@@ -114,7 +114,9 @@ export declare enum EventName {
114
114
  SELECT_EXTERNAL_NUMBER = "select_external_number",
115
115
  FAIL_NOTIFICATION = "fail_notification",
116
116
  KICK_OFF = "kick_off",
117
- DESTROY = "destroy"
117
+ DESTROY = "destroy",
118
+ NETWORK_OFFLINE = "network_offline",
119
+ NETWORK_ONLINE = "network_online"
118
120
  }
119
121
  export declare enum DisplayTextEnum {
120
122
  RINGING = "\u5BA2\u6237\u632F\u94C3",
@@ -41,6 +41,7 @@ export interface CallInfoType {
41
41
  answerDevice: DeviceType;
42
42
  selectOutNumber: string;
43
43
  customerObject?: CallCrmObject;
44
+ isNextState: boolean;
44
45
  }
45
46
  export interface InitInfoType {
46
47
  enableBrowserAlert?: boolean;
@@ -1,9 +1,4 @@
1
1
  import { SIPClient } from '@/core/sip-client';
2
- type WsResType = {
3
- type: number;
4
- data: any;
5
- };
6
- export declare const handleMessage: (raw: WsResType) => any;
7
2
  export declare class ReconnectingWebSocket {
8
3
  private url;
9
4
  private ws;
@@ -30,9 +25,10 @@ export declare class ReconnectingWebSocket {
30
25
  private sendMessage;
31
26
  /** ✅ 私有 close,只允许内部调用 */
32
27
  private close;
28
+ /** ✅ 主动重连 */
29
+ reconnect(): void;
33
30
  /** ✅ SDK 内部可调用的关闭方法 */
34
31
  static __internalClose(): void;
35
32
  /** ✅ SDK 内部发送消息 */
36
33
  static __internalSend(data: any): void;
37
34
  }
38
- export {};
@@ -33,3 +33,4 @@ export declare const queryAllRecordList: (params: {
33
33
  agent_no: string;
34
34
  }) => Promise<any>;
35
35
  export declare const logout: (params: AgentLogoutBodyType) => Promise<any>;
36
+ export declare const ping: () => Promise<any>;
@@ -19,3 +19,9 @@ export declare function SET_AGENT_NO(newAgentNo: string): void;
19
19
  * @param params 请求体参数对象
20
20
  */
21
21
  export declare function $POST<T extends object = any, R = any>(url: string, params: T): Promise<R>;
22
+ /**
23
+ * POST 请求封装
24
+ * @param url 相对接口路径,如 /user/login
25
+ * @param params 请求体参数对象
26
+ */
27
+ export declare function $POST_PING<T extends object = any, R = any>(url: string, params: T): Promise<R>;