ysyt-agent-sdk 1.0.63 → 1.0.65
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/css/ysyt-agent-sdk.css +1 -1
- package/dist/src/core/api-client.d.ts +4 -1
- package/dist/src/core/phone-view.d.ts +2 -1
- package/dist/src/core/sip-client.d.ts +0 -5
- package/dist/src/internal/_internalStore.d.ts +4 -0
- package/dist/src/types/Enum.d.ts +3 -1
- package/dist/src/types/index.d.ts +23 -0
- package/dist/src/utils/ReconnectingWebSocket.d.ts +1 -0
- package/dist/src/utils/http.d.ts +3 -0
- package/dist/ysyt-agent-sdk.cjs.js +22 -12
- package/dist/ysyt-agent-sdk.esm.js +27 -17
- package/dist/ysyt-agent-sdk.umd.js +32 -22
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
@font-face{font-family:ysyt;src:url(../fonts/iconfont.woff2?t=1750839875482) format("woff2"),url(../fonts/iconfont.woff?t=1750839875482) format("woff"),url(../fonts/iconfont.ttf?t=1750839875482) format("truetype")}.ysyt{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:ysyt,serif!important;font-size:18px;font-style:normal}.icon-fanhui:before{content:"\e63b"}.icon-huiyi:before{content:"\e6eb"}.icon-ic_liebiao_bohaopan:before{content:"\e602"}.icon-shouji:before{content:"\e692"}.icon-20gl-phoneSip:before{content:"\e924"}.icon-dianhua:before{content:"\e842"}.icon-quxiao:before{content:"\e676"}.icon-jieting:before{content:"\e60a"}.icon-boda:before{content:"\e679"}.icon-kaishi:before{content:"\e800"}.icon-guaji:before{content:"\e732"}.icon-manyidu:before{content:"\e600"}.icon-zixun:before{content:"\e71f"}.icon-zanting:before{content:"\ea81"}.icon-zhuanjie1:before{content:"\e601"}.icon-microphone:before{content:"\e661"}.icon-guanbimaikefeng:before{content:"\e603"}.icon-manglu:before{content:"\e65d"}.icon-shang:before{content:"\e60f"}.icon-xia:before{content:"\e64c"}.icon-kongxian:before{content:"\ed94"}#ysyt-body,.ysyt-phone-body{align-items:center;display:flex;height:30px}.ysyt-phone-body{border-radius:30px 10px 0 30px;padding:0 10px;user-select:none}.ysyt-phone-body .ysyt-title{color:#fff;cursor:pointer;font-size:14px;padding-right:10px;position:relative;width:100px}.ysyt-phone-body .select-icon{color:#fff;display:none;font-size:10px;left:calc(50% - 4px);position:absolute;top:100%;z-index:9999999}.ysyt-select{background:#fff;border-radius:4px;box-shadow:0 4px 8px rgba(0,0,0,.1);height:0;overflow:hidden;position:absolute;top:calc(100% + 8px);transition:height .1s ease-in;width:100%;z-index:9999999}.ysyt-select-body{position:relative}.ysyt-select-body>div{color:rgba(0,0,0,.6);padding:5px 4px;text-align:center}.ysyt-select-body>div:hover{background:#ecf5ff;color:#2b96ea}.ysyt-action-body{align-items:center;color:#3356ec;display:flex;font-size:25px;gap:0 10px;height:30px;padding:0 10px}.ysyt-action-body>*{cursor:pointer}.content-call-key{color:rgba(0,0,0,.6);font-size:16px;padding:10px 5px;width:250px}.content-call-key>my-input::part(wrapper){--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);border:none;border-radius:30px;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);height:25px;width:100%}.content-call-key>my-input::part(wrapper-input){text-align:center}#wifi-body>img{width:18px}.network-body{color:rgba(0,0,0,.7);font-size:12px;padding:5px 10px}.network-body>div{align-items:center;display:flex;margin-bottom:5px}.network-body>div>div{color:#000;width:50px}.my-icon{font-size:22px}.agent-list-item{align-items:center;display:flex;justify-content:space-between;padding:10px}#ysyt-devices-body{align-items:center;display:flex;justify-content:center;margin-right:15px;position:relative;width:130px}
|
|
1
|
+
@font-face{font-family:ysyt;src:url(../fonts/iconfont.woff2?t=1750839875482) format("woff2"),url(../fonts/iconfont.woff?t=1750839875482) format("woff"),url(../fonts/iconfont.ttf?t=1750839875482) format("truetype")}.ysyt{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:ysyt,serif!important;font-size:18px;font-style:normal}.icon-fanhui:before{content:"\e63b"}.icon-huiyi:before{content:"\e6eb"}.icon-ic_liebiao_bohaopan:before{content:"\e602"}.icon-shouji:before{content:"\e692"}.icon-20gl-phoneSip:before{content:"\e924"}.icon-dianhua:before{content:"\e842"}.icon-quxiao:before{content:"\e676"}.icon-jieting:before{content:"\e60a"}.icon-boda:before{content:"\e679"}.icon-kaishi:before{content:"\e800"}.icon-guaji:before{content:"\e732"}.icon-manyidu:before{content:"\e600"}.icon-zixun:before{content:"\e71f"}.icon-zanting:before{content:"\ea81"}.icon-zhuanjie1:before{content:"\e601"}.icon-microphone:before{content:"\e661"}.icon-guanbimaikefeng:before{content:"\e603"}.icon-manglu:before{content:"\e65d"}.icon-shang:before{content:"\e60f"}.icon-xia:before{content:"\e64c"}.icon-kongxian:before{content:"\ed94"}#ysyt-body{position:relative}#ysyt-body,.ysyt-phone-body{align-items:center;display:flex;height:30px}.ysyt-phone-body{border-radius:30px 10px 0 30px;padding:0 10px;user-select:none}.ysyt-phone-body .ysyt-title{color:#fff;cursor:pointer;font-size:14px;padding-right:10px;position:relative;width:100px}.ysyt-phone-body .select-icon{color:#fff;display:none;font-size:10px;left:calc(50% - 4px);position:absolute;top:100%;z-index:9999999}.ysyt-select{background:#fff;border-radius:4px;box-shadow:0 4px 8px rgba(0,0,0,.1);height:0;overflow:hidden;position:absolute;top:calc(100% + 8px);transition:height .1s ease-in;width:100%;z-index:9999999}.ysyt-select-body{position:relative}.ysyt-select-body>div{color:rgba(0,0,0,.6);padding:5px 4px;text-align:center}.ysyt-select-body>div:hover{background:#ecf5ff;color:#2b96ea}.ysyt-action-body{align-items:center;color:#3356ec;display:flex;font-size:25px;gap:0 10px;height:30px;padding:0 10px}.ysyt-action-body>*{cursor:pointer}.content-call-key{color:rgba(0,0,0,.6);font-size:16px;padding:10px 5px;width:250px}.content-call-key>my-input::part(wrapper){--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);border:none;border-radius:30px;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);height:25px;width:100%}.content-call-key>my-input::part(wrapper-input){text-align:center}#wifi-body>img{width:18px}.network-body{color:rgba(0,0,0,.7);font-size:12px;padding:5px 10px}.network-body>div{align-items:center;display:flex;margin-bottom:5px}.network-body>div>div{color:#000;width:50px}.my-icon{font-size:22px}.agent-list-item{align-items:center;display:flex;justify-content:space-between;padding:10px}#ysyt-devices-body{align-items:center;display:flex;justify-content:center;margin-right:15px;position:relative;width:130px}.ysyt-customer-card{background:#fff;border-radius:5px;box-shadow:0 4px 8px rgba(0,0,0,.1);color:#797979;font-size:14px;left:140px;padding:10px;position:absolute;top:32px;width:250px;z-index:9999}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentItemType, AgentStateDataType, DeviceType, RequestBodyType, StateType } from '@/types';
|
|
1
|
+
import { AgentItemType, AgentStateDataType, DeviceType, CallCrmObject, RequestBodyType, StateType } from '@/types';
|
|
2
2
|
export declare class ApiClient {
|
|
3
3
|
private roleData;
|
|
4
4
|
/**
|
|
@@ -9,6 +9,9 @@ export declare class ApiClient {
|
|
|
9
9
|
state: StateType;
|
|
10
10
|
state_name: string;
|
|
11
11
|
}>): Promise<void>;
|
|
12
|
+
_getInCallCrmDetail(params: RequestBodyType<{
|
|
13
|
+
phone: string;
|
|
14
|
+
}, CallCrmObject>): Promise<void>;
|
|
12
15
|
/**
|
|
13
16
|
* 对外
|
|
14
17
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StatusType } from '@/types';
|
|
1
|
+
import { CallCrmObject, StatusType } from '@/types';
|
|
2
2
|
import YSYTAgentSdk from '@/index';
|
|
3
3
|
import '@/assets/css/iconfont.css';
|
|
4
4
|
import '@/assets/css/index.css';
|
|
@@ -30,6 +30,7 @@ export declare class PhoneView {
|
|
|
30
30
|
private default_device;
|
|
31
31
|
private readonly inCallAudio;
|
|
32
32
|
private readonly waitAudio;
|
|
33
|
+
customerInfo: CallCrmObject;
|
|
33
34
|
transferType: string;
|
|
34
35
|
constructor({ container, rttHTML, statusParams }: Props, VoiceSDKInstance: YSYTAgentSdk, callApi: CallApi);
|
|
35
36
|
private play;
|
|
@@ -23,7 +23,6 @@ export declare class SIPClient {
|
|
|
23
23
|
password: string;
|
|
24
24
|
callTimeout?: number;
|
|
25
25
|
}, eventCallback: (event: RtcEventDataType<RtcEventDataTypes>) => void);
|
|
26
|
-
private handleMessage;
|
|
27
26
|
private handleNetworkInfoChange;
|
|
28
27
|
private handleOffline;
|
|
29
28
|
private handleOnline;
|
|
@@ -54,10 +53,6 @@ export declare class SIPClient {
|
|
|
54
53
|
* 来电处理逻辑(监听状态即可,不需要主动作出回应)
|
|
55
54
|
*/
|
|
56
55
|
private handleIncomingCall;
|
|
57
|
-
/**
|
|
58
|
-
* 发起呼叫
|
|
59
|
-
*/
|
|
60
|
-
makeCall(target: string): Promise<void>;
|
|
61
56
|
/**
|
|
62
57
|
* 接听来电
|
|
63
58
|
*/
|
package/dist/src/types/Enum.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare enum WebRtcCallSipEventEnum {
|
|
|
29
29
|
WEB_RTC_SEND_DTMF = "send_dtmf"
|
|
30
30
|
}
|
|
31
31
|
export declare enum CallSipCallEvent {
|
|
32
|
+
CUSTOMER_INFO = "customer_info",
|
|
32
33
|
CALL_PROGRESS = "call_progress",
|
|
33
34
|
OUT_INCOMING_CALL = "out_call_incoming_call",
|
|
34
35
|
OUT_SUCCESS = "out_call_success",
|
|
@@ -101,7 +102,8 @@ export declare enum WebsocketTypeEnum {
|
|
|
101
102
|
TRANSFER = 127,
|
|
102
103
|
TRANSFER_FAILED = 128,
|
|
103
104
|
TRANSFER_INCOMING_CALL = 129,
|
|
104
|
-
TRANSFER_OFF_HOOK = 130
|
|
105
|
+
TRANSFER_OFF_HOOK = 130,
|
|
106
|
+
AGENT_HANGUP = 131
|
|
105
107
|
}
|
|
106
108
|
export declare enum EventName {
|
|
107
109
|
EVENT_ALL = "event_all",
|
|
@@ -115,6 +115,28 @@ export interface SeatStatusItemType {
|
|
|
115
115
|
state_name: string;
|
|
116
116
|
}
|
|
117
117
|
export type AgentStateDataType = Pick<SeatStatusItemType, 'state_name' | 'state'>[];
|
|
118
|
+
export interface CallCrmObject {
|
|
119
|
+
/**
|
|
120
|
+
* 号码归属地城市
|
|
121
|
+
*/
|
|
122
|
+
city: string;
|
|
123
|
+
/**
|
|
124
|
+
* 联系次数
|
|
125
|
+
*/
|
|
126
|
+
contact_count: number;
|
|
127
|
+
/**
|
|
128
|
+
* 客户名称
|
|
129
|
+
*/
|
|
130
|
+
customer_name: string;
|
|
131
|
+
/**
|
|
132
|
+
* 手机号码
|
|
133
|
+
*/
|
|
134
|
+
phone: string;
|
|
135
|
+
/**
|
|
136
|
+
* 号码归属地省份
|
|
137
|
+
*/
|
|
138
|
+
province: string;
|
|
139
|
+
}
|
|
118
140
|
export interface AgentDataType {
|
|
119
141
|
agent_no: string;
|
|
120
142
|
agent_name: string;
|
|
@@ -180,6 +202,7 @@ export interface Events {
|
|
|
180
202
|
[CallSipCallEvent.CONSULT_THREE_WAY_FAILED]: {
|
|
181
203
|
conf_name: string;
|
|
182
204
|
};
|
|
205
|
+
[CallSipCallEvent.CUSTOMER_INFO]: CallCrmObject;
|
|
183
206
|
[EventName.WEBSITE_DELAY]: RttObjectType;
|
|
184
207
|
[key: string]: unknown;
|
|
185
208
|
[key: symbol]: unknown;
|
|
@@ -13,6 +13,7 @@ export declare class ReconnectingWebSocket {
|
|
|
13
13
|
private constructor();
|
|
14
14
|
static getInstance(url?: string): ReconnectingWebSocket;
|
|
15
15
|
private stateIdleChange;
|
|
16
|
+
private getCustomerInfo;
|
|
16
17
|
private putAgentState;
|
|
17
18
|
private initWebSocket;
|
|
18
19
|
private startHeartbeat;
|
package/dist/src/utils/http.d.ts
CHANGED