ysyt-agent-sdk 1.0.133 → 1.0.135
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/api-client.d.ts +1 -1
- package/dist/src/core/sip-client.d.ts +1 -1
- package/dist/src/internal/_internalStore.d.ts +3 -4
- package/dist/src/store/call-info-store.d.ts +1 -0
- package/dist/src/types/Enum.d.ts +3 -1
- package/dist/src/types/index.d.ts +1 -0
- package/dist/src/utils/ReconnectingWebSocket.d.ts +2 -6
- package/dist/src/utils/http.d.ts +1 -0
- package/dist/src/utils/request.d.ts +6 -0
- package/dist/ysyt-agent-sdk.cjs.js +10 -10
- package/dist/ysyt-agent-sdk.esm.js +13 -13
- package/dist/ysyt-agent-sdk.umd.js +10 -10
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentItemType,
|
|
1
|
+
import { AgentItemType, AgentLogoutBodyType, AgentStateDataType, CallCrmObject, DeviceType, RecordItemType, RequestBodyType, StateType } from '@/types';
|
|
2
2
|
export declare class ApiClient {
|
|
3
3
|
private roleData;
|
|
4
4
|
formatDate(date: Date): string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { AgentObjectType } from '@/types';
|
|
2
|
-
import { AgentStatus } from '@/types/Enum';
|
|
1
|
+
import { AgentObjectType, StateType } from '@/types';
|
|
3
2
|
type InternalState = {
|
|
4
3
|
agentInfo: AgentObjectType;
|
|
5
4
|
isRtcReconnecting: boolean;
|
|
@@ -10,11 +9,11 @@ type InternalState = {
|
|
|
10
9
|
logBuiltinEnabled: boolean;
|
|
11
10
|
browserAlertTime: number;
|
|
12
11
|
stateObject?: {
|
|
13
|
-
state:
|
|
12
|
+
state: StateType;
|
|
14
13
|
state_name: string;
|
|
15
14
|
};
|
|
16
15
|
stateBeforeChange?: {
|
|
17
|
-
state:
|
|
16
|
+
state: StateType;
|
|
18
17
|
state_name: string;
|
|
19
18
|
};
|
|
20
19
|
latency: number;
|
|
@@ -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];
|
package/dist/src/types/Enum.d.ts
CHANGED
|
@@ -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",
|
|
@@ -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
|
+
static __reconnect(): void;
|
|
33
30
|
/** ✅ SDK 内部可调用的关闭方法 */
|
|
34
31
|
static __internalClose(): void;
|
|
35
32
|
/** ✅ SDK 内部发送消息 */
|
|
36
33
|
static __internalSend(data: any): void;
|
|
37
34
|
}
|
|
38
|
-
export {};
|
package/dist/src/utils/http.d.ts
CHANGED
|
@@ -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>;
|