ue-softphone-sdk 3.0.4 → 3.0.5

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.
@@ -0,0 +1,11 @@
1
+ export declare const NOT_OPEN_AUDIO: {
2
+ notOpenAudioMsg: string;
3
+ notOpenAudioCode: number;
4
+ notOpenAudioMsgEn: string;
5
+ };
6
+ export declare const AUDIO_FORBIDDEN: {
7
+ forbiddenAudioMsg: string;
8
+ forbiddenAudioCode: number;
9
+ forbiddenAudioMsgEn: string;
10
+ };
11
+ export declare const DENIED = "denied";
@@ -0,0 +1,198 @@
1
+ type DebugType = "trace" | "debug" | "log" | "warn" | "error" | "all";
2
+ type ExtenType = "PSTN" | "SIP" | "WEBRTC";
3
+ interface AudioInfo {
4
+ notOpenAudioMsg: string;
5
+ notOpenAudioCode: number;
6
+ notOpenAudioMsgEn: string;
7
+ forbiddenAudioMsg: string;
8
+ forbiddenAudioCode: number;
9
+ forbiddenAudioMsgEn: string;
10
+ }
11
+ interface InitOptions {
12
+ accountId?: string;
13
+ agentNumber?: string;
14
+ password?: string;
15
+ loginType?: ExtenType;
16
+ debug?: DebugType | DebugType[] | boolean;
17
+ success?: Function;
18
+ error?: Function;
19
+ server?: string;
20
+ audioInfo?: AudioInfo;
21
+ }
22
+ interface OnCallEventParams {
23
+ success?: Function;
24
+ message?: Function;
25
+ error?: Function;
26
+ }
27
+ interface DialoutParams {
28
+ agentNumber?: String;
29
+ accountId: String;
30
+ agentId: String;
31
+ loginType?: String;
32
+ customerNumber: String;
33
+ agentTimeout?: String;
34
+ customerTimeout?: String;
35
+ agentDisNumber?: String;
36
+ customerDisNumber?: String;
37
+ extras?: any;
38
+ success?: Function;
39
+ fail?: Function;
40
+ numberGroupId?: String;
41
+ numberGroupName?: String;
42
+ }
43
+ interface HangupParams {
44
+ success?: Function;
45
+ fail?: Function;
46
+ }
47
+ interface HoldOrUnHoldParams {
48
+ type: String;
49
+ success?: Function;
50
+ fail?: Function;
51
+ }
52
+ interface MuteOrUnMuteParams {
53
+ type: String;
54
+ direction: String;
55
+ success?: Function;
56
+ fail?: Function;
57
+ }
58
+ interface TransferParams {
59
+ type: String;
60
+ number: String;
61
+ agentNumber?: String;
62
+ success?: Function;
63
+ fail?: Function;
64
+ }
65
+ interface UpdateLoginTypeParams {
66
+ loginType: ExtenType;
67
+ loginNumber?: String;
68
+ success?: Function;
69
+ fail?: Function;
70
+ }
71
+ interface GetAgentPhoneBarParams {
72
+ success?: Function;
73
+ fail?: Function;
74
+ }
75
+ interface GetQueueOnlineAgentsParams {
76
+ success?: Function;
77
+ fail?: Function;
78
+ }
79
+ interface AgentOfflineParams {
80
+ success?: Function;
81
+ fail?: Function;
82
+ toAnswerOffline?: String;
83
+ }
84
+ interface UpdateAgentStatusParams {
85
+ stateNumber: String;
86
+ success?: Function;
87
+ fail?: Function;
88
+ }
89
+ interface consultParams {
90
+ mode: String;
91
+ number: String;
92
+ agentNumber: String;
93
+ success?: Function;
94
+ fail?: Function;
95
+ }
96
+ interface cancleConsultParams {
97
+ success?: Function;
98
+ fail?: Function;
99
+ }
100
+ interface stopConsultParams {
101
+ success?: Function;
102
+ fail?: Function;
103
+ }
104
+ interface resumeConsultParams {
105
+ success?: Function;
106
+ fail?: Function;
107
+ }
108
+ interface consultTransferParams {
109
+ success?: Function;
110
+ fail?: Function;
111
+ }
112
+ interface threeWayCallParams {
113
+ success?: Function;
114
+ fail?: Function;
115
+ }
116
+ interface satisfactionParams {
117
+ type: String;
118
+ success?: Function;
119
+ fail?: Function;
120
+ }
121
+ interface meetingParams {
122
+ number: String;
123
+ success?: Function;
124
+ fail?: Function;
125
+ }
126
+ export default class ueSoftphone {
127
+ static ueTimer: any;
128
+ static loginToken: String | undefined;
129
+ static agentInfo: any;
130
+ static initOptions: InitOptions;
131
+ static webPhone: any;
132
+ static callApiUrl: String;
133
+ static agentextras: any;
134
+ static Socketinstance: any;
135
+ static AudioTask: any;
136
+ static noop(): void;
137
+ static debug: (msg: any) => void;
138
+ static log: (msg: any) => void;
139
+ static warn: (msg: any) => void;
140
+ static error: (msg: any) => void;
141
+ static trace: (msg: any) => void;
142
+ static newWebSocket: (server: string, proto: any) => any;
143
+ static request: (server: string, proto: any) => any;
144
+ private attachEventCallbacks;
145
+ constructor(options?: InitOptions);
146
+ private init;
147
+ private login;
148
+ static createEventHandle(callbacks?: any): void;
149
+ private getWebrtcInfo;
150
+ private initAttachEvent;
151
+ static useDefaultDependencies(deps: any): {
152
+ newWebSocket(server: string, proto: any): any;
153
+ request(url: string, options: any): any;
154
+ };
155
+ private static initWebrtcEvent;
156
+ private openMediaAudio;
157
+ listenCallEvent: (callbacks: OnCallEventParams) => void;
158
+ get agent(): {
159
+ switchLoginType(params: UpdateLoginTypeParams): Promise<void>;
160
+ findPhoneBarList(params: GetAgentPhoneBarParams): void;
161
+ switchPhoneBar(params: UpdateAgentStatusParams): void;
162
+ logout(params: AgentOfflineParams): void;
163
+ findIdleAgentsForQueue(params: GetQueueOnlineAgentsParams): void;
164
+ getAvailableSipNumberList(params: any): void;
165
+ };
166
+ get webrtc(): {
167
+ accept(): void;
168
+ connect(): void;
169
+ disconnect(): void;
170
+ isConnected(): any;
171
+ sendDTMF(tone: string): void;
172
+ };
173
+ get call(): {
174
+ callout(params: DialoutParams): Promise<void>;
175
+ hangup(params: HangupParams): void;
176
+ holdOrUnHold(params: HoldOrUnHoldParams): void;
177
+ muteOrUnMute(params: MuteOrUnMuteParams): void;
178
+ transfer(params: TransferParams): void;
179
+ consult(params: consultParams): void;
180
+ cancelconsult(params: cancleConsultParams): void;
181
+ endConsult(params: stopConsultParams): void;
182
+ callbackConsult(params: resumeConsultParams): void;
183
+ consultTransfer(params: consultTransferParams): void;
184
+ threeWayCall(params: threeWayCallParams): void;
185
+ evaluate(params: satisfactionParams): void;
186
+ meeting(params: meetingParams): void;
187
+ };
188
+ private _callApi;
189
+ private _agentApi;
190
+ _webPhoneApi: () => {
191
+ accept(): void;
192
+ connect(): void;
193
+ disconnect(): void;
194
+ isConnected(): any;
195
+ sendDTMF(tone: string): void;
196
+ };
197
+ }
198
+ export {};