ysyt-agent-sdk 1.1.38 → 1.1.40

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.
@@ -1,7 +1,9 @@
1
1
  import { AgentItemType, AgentLogoutBodyType, AgentStateDataType, CallCrmObject, DeviceType, ListenAgentCallType, RecordItemType, RequestBodyType, StateType } from '@/types';
2
2
  export declare class ApiClient {
3
+ static initRtcFn: () => Promise<void>;
3
4
  private roleData;
4
5
  formatDate(date: Date): string;
6
+ static setInitRtcFn(initRtcFn: () => Promise<void>): void;
5
7
  /**
6
8
  * 对外内
7
9
  */
@@ -16,9 +18,9 @@ export declare class ApiClient {
16
18
  /**
17
19
  * 对外
18
20
  */
19
- changeDevice(params: RequestBodyType<{
21
+ changeDevice: (params: RequestBodyType<{
20
22
  device: DeviceType;
21
- }>): Promise<void>;
23
+ }>) => Promise<void>;
22
24
  changeState(params: RequestBodyType<{
23
25
  state: StateType;
24
26
  state_name: string;
@@ -58,6 +58,7 @@ export declare class SIPClient {
58
58
  * userAgentString User-Agent 头部的值。
59
59
  * viaHost Via 头里的 host 值,默认随机生成。
60
60
  */
61
+ sleep: (ms: number) => Promise<unknown>;
61
62
  start(): Promise<void>;
62
63
  /**
63
64
  * 设置 SIP 事件监听(连接状态、来电等)
@@ -15,7 +15,7 @@ declare class YSYTAgentSdk {
15
15
  agentNo: string;
16
16
  }): YSYTAgentSdk;
17
17
  getInit(): boolean;
18
- initWebRtc(): Promise<void>;
18
+ initWebRtc: () => Promise<void>;
19
19
  /**
20
20
  * 初始化SDK
21
21
  * @param actionNodeParams