ysyt-agent-sdk 1.1.29 → 1.1.31

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.
@@ -21,7 +21,7 @@ declare class YSYTAgentSdk {
21
21
  * @param actionNodeParams
22
22
  * @param url
23
23
  * @param enableBrowserAlert 是否开启浏览器通知
24
- * @param logBuiltinEnabled 是否开启日志
24
+ * @param logBuiltinEnabled 是否开启日志 建立长连接晚
25
25
  */
26
26
  init({ actionNodeParams, enableBrowserAlert, logBuiltinEnabled, browserAlertTime, initialState, initDevice, }: InitInfoType): Promise<void>;
27
27
  on<K extends keyof Events>(event: K, handler: (data: Events[K]) => void): this;
@@ -16,6 +16,7 @@ declare class CallInfoStore extends ReactiveStore<CallInfoType> {
16
16
  updateSelectOutNumber(selectOutNumber: string): void;
17
17
  updateCustomerInfo(customerObject: CallCrmObject): void;
18
18
  updateIsNextState(isNextState: boolean): void;
19
+ updateIsSipConnected(isSipConnected: boolean): void;
19
20
  reset(): void;
20
21
  getCallInfo(): CallInfoType;
21
22
  get<K extends keyof CallInfoType>(key: K): CallInfoType[K];
@@ -156,5 +156,6 @@ export declare enum DisplayTextEnum {
156
156
  TRANSFER_INCOMING_CALL = "\u8F6C\u63A5\u6765\u7535",
157
157
  HOLDING = "\u4FDD\u6301\u4E2D",
158
158
  MUTING = "\u9759\u97F3\u4E2D",
159
- LISTENING = "\u76D1\u542C\u6765\u7535"
159
+ LISTENING = "\u76D1\u542C\u6765\u7535",
160
+ LINKING = "\u6B63\u5728\u94FE\u63A5"
160
161
  }
@@ -42,6 +42,7 @@ export interface CallInfoType {
42
42
  selectOutNumber: string;
43
43
  customerObject?: CallCrmObject;
44
44
  isNextState: boolean;
45
+ isSipConnected: boolean;
45
46
  }
46
47
  export interface InitInfoType {
47
48
  enableBrowserAlert?: boolean;
@@ -84,7 +85,7 @@ export interface AgentObjectType {
84
85
  is_inquire: number;
85
86
  soft_device_auto_answer: 0 | 1;
86
87
  auto_answer_time: number;
87
- init_state: 1 | 2;
88
+ init_state: 1 | 2 | 4;
88
89
  state_is_inquire: 0 | 1;
89
90
  post_call_process_time: number;
90
91
  auto_jump: number;
@@ -92,7 +93,7 @@ export interface AgentObjectType {
92
93
  browser_alert: 0 | 1;
93
94
  browser_alert_time: number;
94
95
  call_noise_reduction: 0 | 1;
95
- current_state: 1 | 2;
96
+ current_state: 1 | 2 | 4;
96
97
  current_state_name: string;
97
98
  current_answer_device: DeviceType;
98
99
  out_display_select_switch: 0 | 1;
@@ -1,6 +1,7 @@
1
1
  import { SIPClient } from '@/core/sip-client';
2
2
  export declare class ReconnectingWebSocket {
3
3
  private url;
4
+ private onOpenCallback?;
4
5
  private ws;
5
6
  private heartbeatWorker;
6
7
  private reconnectDelay;
@@ -9,10 +10,12 @@ export declare class ReconnectingWebSocket {
9
10
  sipClient: SIPClient | null;
10
11
  private pendingMessages;
11
12
  private constructor();
12
- static getInstance({ url, sipClient }: {
13
+ static getInstance({ url, sipClient, onOpen, }: {
13
14
  url?: string;
14
- sipClient: SIPClient;
15
+ sipClient: SIPClient | null;
16
+ onOpen?: () => void;
15
17
  }): ReconnectingWebSocket;
18
+ setSipClient(sipClient: SIPClient): void;
16
19
  private stateIdleChange;
17
20
  inCallAutoAnswer(): void;
18
21
  private getCustomerInfo;