ysyt-agent-sdk 1.1.4 → 1.1.6
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 +3 -1
- package/dist/src/index.d.ts +4 -2
- package/dist/src/internal/_internalStore.d.ts +2 -0
- package/dist/src/types/Enum.d.ts +8 -2
- package/dist/src/types/index.d.ts +9 -2
- package/dist/src/utils/http.d.ts +2 -0
- package/dist/src/utils/phone-style-config.d.ts +2 -0
- package/dist/ysyt-agent-sdk.cjs.js +28 -28
- package/dist/ysyt-agent-sdk.esm.js +26 -26
- package/dist/ysyt-agent-sdk.umd.js +25 -25
- package/package.json +1 -1
|
@@ -35,5 +35,7 @@ export declare class ApiClient {
|
|
|
35
35
|
}>): Promise<void>;
|
|
36
36
|
getCallRecord(params: RequestBodyType<any, RecordItemType[]>): Promise<void>;
|
|
37
37
|
logout(params: RequestBodyType<Omit<AgentLogoutBodyType, 'agent_no'>, any>): Promise<void>;
|
|
38
|
-
listenCall(params: RequestBodyType<Omit<ListenAgentCallType, '
|
|
38
|
+
listenCall(params: RequestBodyType<Omit<ListenAgentCallType, 'monitor_agent_no'>, any>): Promise<void>;
|
|
39
|
+
earCall(params: RequestBodyType<Omit<ListenAgentCallType, 'monitor_agent_no'>, any>): Promise<void>;
|
|
40
|
+
stopEarCall(params: RequestBodyType<any, any>): Promise<void>;
|
|
39
41
|
}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentDataType, AgentItemType, AgentStateDataType, DeviceType, InitInfoType, RequestBodyType, StateType, Events, CallCrmObject, RecordItemType, AgentLogoutBodyType } from './types';
|
|
1
|
+
import { AgentDataType, AgentItemType, AgentStateDataType, DeviceType, InitInfoType, RequestBodyType, StateType, Events, CallCrmObject, RecordItemType, AgentLogoutBodyType, ListenAgentCallType } from './types';
|
|
2
2
|
export type * from './types';
|
|
3
3
|
export * from './types/Enum';
|
|
4
4
|
declare class YSYTAgentSdk {
|
|
@@ -47,6 +47,8 @@ declare class YSYTAgentSdk {
|
|
|
47
47
|
startConference: () => void;
|
|
48
48
|
transferAgent: (agent_no: string) => Promise<void>;
|
|
49
49
|
transferOutline: (number: string) => Promise<void>;
|
|
50
|
+
earSpeakStart: (params: RequestBodyType<Omit<ListenAgentCallType, "monitor_agent_no">, any>) => Promise<void>;
|
|
51
|
+
earSpeakStop: (params: RequestBodyType<any, any>) => Promise<void>;
|
|
50
52
|
};
|
|
51
53
|
get agent_api(): {
|
|
52
54
|
changeDevice: (params: RequestBodyType<{
|
|
@@ -71,7 +73,7 @@ declare class YSYTAgentSdk {
|
|
|
71
73
|
code: number;
|
|
72
74
|
msg: string;
|
|
73
75
|
}) => void) => Promise<void>;
|
|
74
|
-
listenAgentCall: (params: RequestBodyType<
|
|
76
|
+
listenAgentCall: (params: RequestBodyType<Omit<ListenAgentCallType, "monitor_agent_no">, any>) => Promise<void>;
|
|
75
77
|
};
|
|
76
78
|
getAgentData(): AgentDataType;
|
|
77
79
|
getRealTimeCustomerInfo(): Promise<CallCrmObject>;
|
package/dist/src/types/Enum.d.ts
CHANGED
|
@@ -53,7 +53,9 @@ export declare enum WebsocketTypeEnum {
|
|
|
53
53
|
SIGN_IN_SWITCH_DEVICE = 136,
|
|
54
54
|
LISTEN_CALL_FAILED = 137,
|
|
55
55
|
LISTEN_INCOMING_CALL = 138,
|
|
56
|
-
LISTEN_INCOMING_CALL_OFF_HOOK = 139
|
|
56
|
+
LISTEN_INCOMING_CALL_OFF_HOOK = 139,
|
|
57
|
+
EAR_SPEECH = 140,
|
|
58
|
+
STOP_EAR_SPEECH = 141
|
|
57
59
|
}
|
|
58
60
|
export declare enum WebRtcCallSipEventEnum {
|
|
59
61
|
WEB_RTC_CONNECTING = "connecting",
|
|
@@ -115,7 +117,11 @@ export declare enum CallSipCallEventEnum {
|
|
|
115
117
|
LISTEN_CALL_FAILED = "listen_call_failed",
|
|
116
118
|
LISTEN_INCOMING_CALL = "listen_incoming_call",
|
|
117
119
|
LISTEN_INCOMING_CALL_OFF_HOOK = "listen_incoming_call_off_hook",
|
|
118
|
-
LISTEN_HANGUP = "listen_hangup"
|
|
120
|
+
LISTEN_HANGUP = "listen_hangup",
|
|
121
|
+
EAR_SPEECH_SUCCESS = "ear_speech_success",
|
|
122
|
+
EAR_SPEECH_FAILED = "ear_speech_failed",
|
|
123
|
+
STOP_EAR_SPEECH_SUCCESS = "stop_ear_speech_success",
|
|
124
|
+
STOP_EAR_SPEECH_FAILED = "stop_ear_speech_failed"
|
|
119
125
|
}
|
|
120
126
|
export declare enum EventName {
|
|
121
127
|
EVENT_ALL = "event_all",
|
|
@@ -68,7 +68,7 @@ export interface StatusType {
|
|
|
68
68
|
state: StateType;
|
|
69
69
|
statusName: string;
|
|
70
70
|
}
|
|
71
|
-
export type ActionType = 'call_number' | 'answer' | 'reject' | 'hangup' | 'dtmf' | 'unhold' | 'hold' | 'mute' | 'unmute' | 'satisfaction' | 'consult' | 'consult_transfer' | 'consult_retrieve' | 'conference' | 'transfer';
|
|
71
|
+
export type ActionType = 'call_number' | 'answer' | 'reject' | 'hangup' | 'dtmf' | 'unhold' | 'hold' | 'mute' | 'unmute' | 'satisfaction' | 'consult' | 'consult_transfer' | 'consult_retrieve' | 'conference' | 'whisper' | 'cancel_whisper' | 'transfer';
|
|
72
72
|
export type ActionConfigsType = Array<ActionType>;
|
|
73
73
|
export interface AgentObjectType {
|
|
74
74
|
agent_id: number;
|
|
@@ -191,8 +191,8 @@ export interface AgentLogoutBodyType {
|
|
|
191
191
|
offline_answer?: boolean;
|
|
192
192
|
}
|
|
193
193
|
export interface ListenAgentCallType {
|
|
194
|
-
agent_no: string;
|
|
195
194
|
monitor_agent_no: string;
|
|
195
|
+
monitored_agent_no: string;
|
|
196
196
|
}
|
|
197
197
|
type EventObject<T> = {
|
|
198
198
|
event: keyof Events;
|
|
@@ -326,7 +326,14 @@ export interface Events {
|
|
|
326
326
|
};
|
|
327
327
|
[CallSipCallEventEnum.LISTEN_INCOMING_CALL_OFF_HOOK]: {
|
|
328
328
|
session_id: string;
|
|
329
|
+
monitored_agent_no: string;
|
|
330
|
+
};
|
|
331
|
+
[CallSipCallEventEnum.EAR_SPEECH_SUCCESS]: {
|
|
332
|
+
monitored_agent_no: string;
|
|
329
333
|
};
|
|
334
|
+
[CallSipCallEventEnum.EAR_SPEECH_FAILED]: unknown;
|
|
335
|
+
[CallSipCallEventEnum.STOP_EAR_SPEECH_SUCCESS]: unknown;
|
|
336
|
+
[CallSipCallEventEnum.STOP_EAR_SPEECH_FAILED]: unknown;
|
|
330
337
|
[key: string]: unknown;
|
|
331
338
|
[key: symbol]: unknown;
|
|
332
339
|
}
|
package/dist/src/utils/http.d.ts
CHANGED
|
@@ -36,3 +36,5 @@ export declare const queryAllRecordList: (params: {
|
|
|
36
36
|
export declare const logout: (params: AgentLogoutBodyType) => Promise<any>;
|
|
37
37
|
export declare const ping: () => Promise<any>;
|
|
38
38
|
export declare const listenAgentCall: (params: ListenAgentCallType) => Promise<any>;
|
|
39
|
+
export declare const earSpeak: (params: ListenAgentCallType) => Promise<any>;
|
|
40
|
+
export declare const stopEarSpeak: (params: ListenAgentCallType) => Promise<any>;
|
|
@@ -12,3 +12,5 @@ export declare const conferenceConfig: ActionConfigsType;
|
|
|
12
12
|
export declare const incomingCallConfig: ActionConfigsType;
|
|
13
13
|
export declare const incomingCallAnswerConfig: ActionConfigsType;
|
|
14
14
|
export declare const listenSuccessConfig: ActionConfigsType;
|
|
15
|
+
export declare const earSpeakConfig: ActionConfigsType;
|
|
16
|
+
export declare const earSpeakAgentConfig: ActionConfigsType;
|