ysyt-agent-sdk 1.0.30 → 1.0.32
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/fonts/iconfont.ttf +0 -0
- package/dist/fonts/iconfont.woff +0 -0
- package/dist/fonts/iconfont.woff2 +0 -0
- package/dist/src/core/phone-view.d.ts +1 -0
- package/dist/src/index.d.ts +15 -0
- package/dist/src/store/call-info-store.d.ts +1 -0
- package/dist/src/store/event-center.d.ts +4 -0
- package/dist/src/types/Enum.d.ts +8 -3
- package/dist/src/types/index.d.ts +2 -1
- package/dist/src/utils/phone-style-config.d.ts +1 -0
- package/dist/ysyt-agent-sdk.cjs.js +32 -24
- package/dist/ysyt-agent-sdk.esm.js +32 -24
- package/dist/ysyt-agent-sdk.umd.js +32 -24
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
@font-face{font-family:ysyt;src:url(../fonts/iconfont.woff2?t=1750839875481) format("woff2"),url(../fonts/iconfont.woff?t=1750839875481) format("woff"),url(../fonts/iconfont.ttf?t=1750839875481) format("truetype")}.ysyt{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:ysyt,serif!important;font-size:18px;font-style:normal}.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=1750839875481) format("woff2"),url(../fonts/iconfont.woff?t=1750839875481) format("woff"),url(../fonts/iconfont.ttf?t=1750839875481) format("truetype")}.ysyt{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:ysyt,serif!important;font-size:18px;font-style:normal}.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}
|
package/dist/fonts/iconfont.ttf
CHANGED
|
Binary file
|
package/dist/fonts/iconfont.woff
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AgentItemType, AgentStateDataType, InitInfoType, RequestBodyType } from '@/types';
|
|
2
|
+
import { AgentStatus } from '@/types/Enum';
|
|
2
3
|
import { Events } from '@/store/event-center';
|
|
3
4
|
export type * from './types';
|
|
4
5
|
declare class YSYTAgentSdk {
|
|
@@ -33,6 +34,7 @@ declare class YSYTAgentSdk {
|
|
|
33
34
|
mute?: undefined;
|
|
34
35
|
unmute?: undefined;
|
|
35
36
|
satisfactionEvaluation?: undefined;
|
|
37
|
+
startConference?: undefined;
|
|
36
38
|
} | {
|
|
37
39
|
answerCall: any;
|
|
38
40
|
makeCall: any;
|
|
@@ -46,6 +48,7 @@ declare class YSYTAgentSdk {
|
|
|
46
48
|
mute: any;
|
|
47
49
|
unmute: any;
|
|
48
50
|
satisfactionEvaluation: any;
|
|
51
|
+
startConference: any;
|
|
49
52
|
};
|
|
50
53
|
get agent_api(): {
|
|
51
54
|
changeDevice?: undefined;
|
|
@@ -58,5 +61,17 @@ declare class YSYTAgentSdk {
|
|
|
58
61
|
getIdleAgentList: (params: RequestBodyType<unknown, AgentItemType[]>) => Promise<void>;
|
|
59
62
|
getAgentState: (params: RequestBodyType<unknown, AgentStateDataType>) => Promise<void>;
|
|
60
63
|
};
|
|
64
|
+
getAgentData(): {
|
|
65
|
+
agent_no: string;
|
|
66
|
+
agent_name: string;
|
|
67
|
+
answer_devices: {
|
|
68
|
+
value: number;
|
|
69
|
+
label: any;
|
|
70
|
+
}[];
|
|
71
|
+
stateObject: {
|
|
72
|
+
state: AgentStatus;
|
|
73
|
+
state_name: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
61
76
|
}
|
|
62
77
|
export default YSYTAgentSdk;
|
|
@@ -11,6 +11,7 @@ declare class CallInfoStore extends ReactiveStore<CallInfoType> {
|
|
|
11
11
|
updateIsMuted(isMuted: boolean): void;
|
|
12
12
|
updateIncomingIsAnswer(incomingIsAnswer: boolean): void;
|
|
13
13
|
updateAnswerDevice(answerDevice: CallInfoType['answerDevice']): void;
|
|
14
|
+
updateIsMeeting(isMeeting: boolean): void;
|
|
14
15
|
reset(): void;
|
|
15
16
|
getCallInfo(): CallInfoType;
|
|
16
17
|
get<K extends keyof CallInfoType>(key: K): CallInfoType[K];
|
|
@@ -40,6 +40,10 @@ export interface Events {
|
|
|
40
40
|
[CallSipCallEvent.INCOMING_CALL_END]: unknown;
|
|
41
41
|
[CallSipCallEvent.SATISFACTION_EVALUATION_SUCCESS]: unknown;
|
|
42
42
|
[CallSipCallEvent.SATISFACTION_EVALUATION_FAILED]: string;
|
|
43
|
+
[CallSipCallEvent.CONSULT_THREE_WAY_SUCCESS]: unknown;
|
|
44
|
+
[CallSipCallEvent.CONSULT_THREE_WAY_FAILED]: {
|
|
45
|
+
conf_name: string;
|
|
46
|
+
};
|
|
43
47
|
[key: string]: unknown;
|
|
44
48
|
[key: symbol]: unknown;
|
|
45
49
|
}
|
package/dist/src/types/Enum.d.ts
CHANGED
|
@@ -52,7 +52,9 @@ export declare enum CallSipCallEvent {
|
|
|
52
52
|
INCOMING_CALL_OFF_HOOK = "incoming_call_off_hook",
|
|
53
53
|
INCOMING_CALL_END = "incoming_call_end",
|
|
54
54
|
SATISFACTION_EVALUATION_SUCCESS = "satisfaction_evaluation_success",
|
|
55
|
-
SATISFACTION_EVALUATION_FAILED = "satisfaction_evaluation_failed"
|
|
55
|
+
SATISFACTION_EVALUATION_FAILED = "satisfaction_evaluation_failed",
|
|
56
|
+
CONSULT_THREE_WAY_SUCCESS = "consult_three_way_success",
|
|
57
|
+
CONSULT_THREE_WAY_FAILED = "consult_three_way_failed"
|
|
56
58
|
}
|
|
57
59
|
export declare enum WebsocketTypeEnum {
|
|
58
60
|
OUT_CALL = 100,
|
|
@@ -77,7 +79,9 @@ export declare enum WebsocketTypeEnum {
|
|
|
77
79
|
INCOMING_CALL = 119,
|
|
78
80
|
INCOMING_CALL_OFF_HOOK = 120,
|
|
79
81
|
INCOMING_CALL_END = 121,
|
|
80
|
-
SATISFACTION_EVALUATION = 122
|
|
82
|
+
SATISFACTION_EVALUATION = 122,
|
|
83
|
+
CONSULT_THREE_WAY = 123,
|
|
84
|
+
CONSULT_THREE_WAY_RESULT = 124
|
|
81
85
|
}
|
|
82
86
|
export declare enum EventName {
|
|
83
87
|
EVENT_ALL = "event_all",
|
|
@@ -92,5 +96,6 @@ export declare enum DisplayTextEnum {
|
|
|
92
96
|
CALLING = "\u901A\u8BDD\u4E2D",
|
|
93
97
|
CONSULTING = "\u6B63\u5728\u54A8\u8BE2",
|
|
94
98
|
CONSULT_CALL_IN = "\u54A8\u8BE2\u6765\u7535",
|
|
95
|
-
INCOMING_CALL = "\u5BA2\u6237\u6765\u7535"
|
|
99
|
+
INCOMING_CALL = "\u5BA2\u6237\u6765\u7535",
|
|
100
|
+
MEETING = "\u4F1A\u8BAE\u4E2D"
|
|
96
101
|
}
|
|
@@ -26,6 +26,7 @@ export interface CallInfoType {
|
|
|
26
26
|
outCallIsAnswer: boolean;
|
|
27
27
|
consultIsAnswer: boolean;
|
|
28
28
|
incomingIsAnswer: boolean;
|
|
29
|
+
isMeeting: boolean;
|
|
29
30
|
isHold: boolean;
|
|
30
31
|
displayText: string;
|
|
31
32
|
isMuted: boolean;
|
|
@@ -57,7 +58,7 @@ export interface StatusType {
|
|
|
57
58
|
}
|
|
58
59
|
export type DeviceType = 1 | 2 | 3;
|
|
59
60
|
export type StateType = AgentStatus.OFFLINE | AgentStatus.IDLE | AgentStatus.BUSY | AgentStatus.RINGING;
|
|
60
|
-
export type ActionType = 'call_number' | 'answer' | 'reject' | 'hangup' | 'dtmf' | 'unhold' | 'hold' | 'mute' | 'unmute' | 'satisfaction' | 'consult' | 'consult_transfer' | 'transfer';
|
|
61
|
+
export type ActionType = 'call_number' | 'answer' | 'reject' | 'hangup' | 'dtmf' | 'unhold' | 'hold' | 'mute' | 'unmute' | 'satisfaction' | 'consult' | 'consult_transfer' | 'conference' | 'transfer';
|
|
61
62
|
export type ActionConfigsType = Array<ActionType>;
|
|
62
63
|
export interface AgentObjectType {
|
|
63
64
|
app_id: string;
|
|
@@ -7,5 +7,6 @@ export declare const incomingConfig: ActionConfigsType;
|
|
|
7
7
|
export declare const outgoingConfig: ActionConfigsType;
|
|
8
8
|
export declare const consultConfig: ActionConfigsType;
|
|
9
9
|
export declare const transferConfig: ActionConfigsType;
|
|
10
|
+
export declare const conferenceConfig: ActionConfigsType;
|
|
10
11
|
export declare const incomingCallConfig: ActionConfigsType;
|
|
11
12
|
export declare const incomingCallAnswerConfig: ActionConfigsType;
|