ysyt-agent-sdk 1.0.119 → 1.0.121
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.
- package/dist/src/core/sip-client.d.ts +0 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/internal/_internalStore.d.ts +1 -0
- package/dist/src/types/index.d.ts +2 -0
- package/dist/src/utils/ReconnectingWebSocket.d.ts +7 -1
- package/dist/ysyt-agent-sdk.cjs.js +3 -3
- package/dist/ysyt-agent-sdk.esm.js +3 -3
- package/dist/ysyt-agent-sdk.umd.js +3 -3
- package/package.json +1 -1
package/dist/src/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ declare class YSYTAgentSdk {
|
|
|
22
22
|
* @param enableBrowserAlert 是否开启浏览器通知
|
|
23
23
|
* @param logBuiltinEnabled 是否开启日志
|
|
24
24
|
*/
|
|
25
|
-
init({ actionNodeParams, enableBrowserAlert, logBuiltinEnabled, browserAlertTime }: InitInfoType): Promise<void>;
|
|
25
|
+
init({ actionNodeParams, enableBrowserAlert, logBuiltinEnabled, browserAlertTime, initialState, initDevice, }: InitInfoType): Promise<void>;
|
|
26
26
|
on<K extends keyof Events>(event: K, handler: (data: Events[K]) => void): this;
|
|
27
27
|
off<K extends keyof Events>(event: K, listener: (msg: Events[K]) => void): void;
|
|
28
28
|
offAll(): void;
|
|
@@ -46,6 +46,8 @@ export interface InitInfoType {
|
|
|
46
46
|
enableBrowserAlert?: boolean;
|
|
47
47
|
browserAlertTime?: number;
|
|
48
48
|
logBuiltinEnabled?: boolean;
|
|
49
|
+
initialState?: AgentStatus.IDLE | AgentStatus.BUSY;
|
|
50
|
+
initDevice?: 1 | 3;
|
|
49
51
|
actionNodeParams?: {
|
|
50
52
|
viewHtmlElement?: HTMLElement;
|
|
51
53
|
rttHTML?: HTMLElement;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SIPClient } from '@/core/sip-client';
|
|
1
2
|
type WsResType = {
|
|
2
3
|
type: number;
|
|
3
4
|
data: any;
|
|
@@ -10,11 +11,16 @@ export declare class ReconnectingWebSocket {
|
|
|
10
11
|
private reconnectDelay;
|
|
11
12
|
private manualClose;
|
|
12
13
|
private apiClient;
|
|
14
|
+
sipClient: SIPClient | null;
|
|
13
15
|
private outNumber;
|
|
14
16
|
private pendingMessages;
|
|
15
17
|
private constructor();
|
|
16
|
-
static getInstance(url
|
|
18
|
+
static getInstance({ url, sipClient }: {
|
|
19
|
+
url?: string;
|
|
20
|
+
sipClient: SIPClient;
|
|
21
|
+
}): ReconnectingWebSocket;
|
|
17
22
|
private stateIdleChange;
|
|
23
|
+
inCallAutoAnswer(): void;
|
|
18
24
|
private getCustomerInfo;
|
|
19
25
|
private putAgentState;
|
|
20
26
|
private initWebSocket;
|