@voicenter-team/events-sdk 0.0.90 → 0.0.92
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/voicenter-events-sdk.cjs.js +1 -1
- package/dist/voicenter-events-sdk.cjs.js.map +1 -1
- package/dist/voicenter-events-sdk.d.ts +23 -21
- package/dist/voicenter-events-sdk.es.js +16 -13
- package/dist/voicenter-events-sdk.es.js.map +1 -1
- package/dist/voicenter-events-sdk.iife.js +1 -1
- package/dist/voicenter-events-sdk.iife.js.map +1 -1
- package/dist/voicenter-events-sdk.umd.js +1 -1
- package/dist/voicenter-events-sdk.umd.js.map +1 -1
- package/package.json +2 -2
|
@@ -8,7 +8,7 @@ export declare type ActiveRoomListener = (event: number | undefined) => void
|
|
|
8
8
|
|
|
9
9
|
export declare type addRoomListener = (value: string) => void
|
|
10
10
|
|
|
11
|
-
declare type AllDialersStatusEvent = {
|
|
11
|
+
export declare type AllDialersStatusEvent = {
|
|
12
12
|
dialers: Array<Dialer>;
|
|
13
13
|
/**
|
|
14
14
|
* 0 - Connection was establishing successfully.
|
|
@@ -30,7 +30,7 @@ declare type AllDialersStatusEvent = {
|
|
|
30
30
|
|
|
31
31
|
export declare type AllDialersStatusEventSDK = EventTypeData<EventsEnum.ALL_DIALER_STATUS>
|
|
32
32
|
|
|
33
|
-
declare type AllExtensionStatusEvent = {
|
|
33
|
+
export declare type AllExtensionStatusEvent = {
|
|
34
34
|
/**
|
|
35
35
|
* 0 - Connection was establishing successfully.
|
|
36
36
|
*/
|
|
@@ -56,7 +56,7 @@ declare interface AllExtensionStatusEventExtended extends Omit<AllExtensionStatu
|
|
|
56
56
|
|
|
57
57
|
export declare type AllExtensionStatusEventSDK = EventTypeData<EventsEnum.ALL_EXTENSION_STATUS>
|
|
58
58
|
|
|
59
|
-
declare type AllUsersStatusEvent = {
|
|
59
|
+
export declare type AllUsersStatusEvent = {
|
|
60
60
|
users: Array<User>;
|
|
61
61
|
/**
|
|
62
62
|
* 0 - Connection was establishing successfully.
|
|
@@ -144,7 +144,7 @@ declare interface CurrentCallUTCExtended extends ExtensionCall {
|
|
|
144
144
|
callAnswered_UTC_CLIENT: number
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
declare type CustomData = {
|
|
147
|
+
export declare type CustomData = {
|
|
148
148
|
/**
|
|
149
149
|
* Is do not call me
|
|
150
150
|
*/
|
|
@@ -174,7 +174,7 @@ export declare enum DebugOption {
|
|
|
174
174
|
FULL = "full"
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
declare type Dialer = {
|
|
177
|
+
export declare type Dialer = {
|
|
178
178
|
/**
|
|
179
179
|
* Code
|
|
180
180
|
*/
|
|
@@ -202,7 +202,7 @@ declare type Dialer = {
|
|
|
202
202
|
statistics: string;
|
|
203
203
|
};
|
|
204
204
|
|
|
205
|
-
declare type DialerEvent = {
|
|
205
|
+
export declare type DialerEvent = {
|
|
206
206
|
data: Dialer;
|
|
207
207
|
/**
|
|
208
208
|
* callerID
|
|
@@ -249,6 +249,7 @@ export declare enum DoNotCallMeStatusCodeEnum {
|
|
|
249
249
|
|
|
250
250
|
declare type Error_2 = {
|
|
251
251
|
};
|
|
252
|
+
export { Error_2 as Error }
|
|
252
253
|
|
|
253
254
|
export declare type ErrorSDK = Error_2
|
|
254
255
|
|
|
@@ -472,7 +473,7 @@ export declare type EventWrappedSocketDataMap = {
|
|
|
472
473
|
[K in EventTypeNames]: WrappedSocketEvent<K>
|
|
473
474
|
}
|
|
474
475
|
|
|
475
|
-
declare type Extension = {
|
|
476
|
+
export declare type Extension = {
|
|
476
477
|
calls: Array<ExtensionCall>;
|
|
477
478
|
/**
|
|
478
479
|
* Number
|
|
@@ -534,7 +535,7 @@ declare type Extension = {
|
|
|
534
535
|
lastAnsweredCallEventEpoch: number;
|
|
535
536
|
};
|
|
536
537
|
|
|
537
|
-
declare type ExtensionCall = {
|
|
538
|
+
export declare type ExtensionCall = {
|
|
538
539
|
/**
|
|
539
540
|
* Ip
|
|
540
541
|
*/
|
|
@@ -646,7 +647,7 @@ declare interface ExtensionCallsUTCExtended extends ExtensionUTCExtended {
|
|
|
646
647
|
calls?: Array<CurrentCallUTCExtended>
|
|
647
648
|
}
|
|
648
649
|
|
|
649
|
-
declare type ExtensionEvent = {
|
|
650
|
+
export declare type ExtensionEvent = {
|
|
650
651
|
data: Extension;
|
|
651
652
|
cause?: ExtensionHangupCauseEnum;
|
|
652
653
|
reason: ExtensionEventReasonEnum;
|
|
@@ -716,7 +717,7 @@ export declare enum ExtensionHangupCauseEnum {
|
|
|
716
717
|
|
|
717
718
|
export declare type ExtensionSDK = ExtensionCallsUTCExtended | ExtensionCallsEnded
|
|
718
719
|
|
|
719
|
-
declare type ExtensionsUpdated = string;
|
|
720
|
+
export declare type ExtensionsUpdated = string;
|
|
720
721
|
|
|
721
722
|
export declare type ExtensionsUpdatedSDK = EventTypeData<EventsEnum.EXTENSIONS_UPDATED>
|
|
722
723
|
|
|
@@ -759,7 +760,7 @@ export declare interface ExternalLoginResponse<T> {
|
|
|
759
760
|
*/
|
|
760
761
|
export declare type GenericEventWrapper = EventWrappedSocketDataMap[EventTypeNames]
|
|
761
762
|
|
|
762
|
-
declare type KeepAliveResponseEvent = {
|
|
763
|
+
export declare type KeepAliveResponseEvent = {
|
|
763
764
|
/**
|
|
764
765
|
* Is ok
|
|
765
766
|
*/
|
|
@@ -837,7 +838,7 @@ export declare interface LoginSessionPayload {
|
|
|
837
838
|
password?: string
|
|
838
839
|
}
|
|
839
840
|
|
|
840
|
-
declare type LoginStatusEvent = {
|
|
841
|
+
export declare type LoginStatusEvent = {
|
|
841
842
|
queues: Array<Queue>;
|
|
842
843
|
/**
|
|
843
844
|
* 0 - Connection was establishing successfully.
|
|
@@ -863,7 +864,7 @@ declare interface LoginStatusEventUTCExtended extends Omit<LoginStatusEvent, 'qu
|
|
|
863
864
|
queues: Array<QueueSDK>
|
|
864
865
|
}
|
|
865
866
|
|
|
866
|
-
declare type LoginSuccessEvent = {
|
|
867
|
+
export declare type LoginSuccessEvent = {
|
|
867
868
|
/**
|
|
868
869
|
* 0 - Connection was establishing successfully.
|
|
869
870
|
*/
|
|
@@ -889,7 +890,7 @@ export declare enum LoginType {
|
|
|
889
890
|
TOKEN = "Token"
|
|
890
891
|
}
|
|
891
892
|
|
|
892
|
-
declare type OnlineStatusEvent = {
|
|
893
|
+
export declare type OnlineStatusEvent = {
|
|
893
894
|
/**
|
|
894
895
|
* which server sdk trying to connect
|
|
895
896
|
*/
|
|
@@ -917,7 +918,7 @@ export declare interface OpenSIPSEventMap {
|
|
|
917
918
|
changeCallStatus: changeCallStatusListener
|
|
918
919
|
}
|
|
919
920
|
|
|
920
|
-
declare type Queue = {
|
|
921
|
+
export declare type Queue = {
|
|
921
922
|
Calls: Array<QueueCall>;
|
|
922
923
|
/**
|
|
923
924
|
* User id
|
|
@@ -945,7 +946,7 @@ declare type Queue = {
|
|
|
945
946
|
IsDistributedQueue?: boolean;
|
|
946
947
|
};
|
|
947
948
|
|
|
948
|
-
declare type QueueCall = {
|
|
949
|
+
export declare type QueueCall = {
|
|
949
950
|
/**
|
|
950
951
|
* Ivr id
|
|
951
952
|
*/
|
|
@@ -991,7 +992,7 @@ export declare interface QueueCallSDK extends QueueCall {
|
|
|
991
992
|
VHJoinTimeStamp_UTC_CLIENT: number
|
|
992
993
|
}
|
|
993
994
|
|
|
994
|
-
declare type QueueEvent = {
|
|
995
|
+
export declare type QueueEvent = {
|
|
995
996
|
data: Queue;
|
|
996
997
|
type?: QueueEventVHTypeEnum;
|
|
997
998
|
reason: QueueEventReasonEnum;
|
|
@@ -1030,7 +1031,7 @@ declare interface QueueEventUTCExtended extends Omit<QueueEvent, 'data'> {
|
|
|
1030
1031
|
data: QueueSDK
|
|
1031
1032
|
}
|
|
1032
1033
|
|
|
1033
|
-
declare enum QueueEventVHTypeEnum {
|
|
1034
|
+
export declare enum QueueEventVHTypeEnum {
|
|
1034
1035
|
VH_WAIT = 'VH.WAIT',
|
|
1035
1036
|
VH_JOIN = 'VH.JOIN',
|
|
1036
1037
|
VH_LEFT = 'VH.LEFT',
|
|
@@ -1042,7 +1043,7 @@ export declare interface QueueSDK extends Omit<Queue, 'Calls'> {
|
|
|
1042
1043
|
|
|
1043
1044
|
export declare type readyListener = (value: boolean) => void
|
|
1044
1045
|
|
|
1045
|
-
declare type Recording = {
|
|
1046
|
+
export declare type Recording = {
|
|
1046
1047
|
/**
|
|
1047
1048
|
* Is muted
|
|
1048
1049
|
*/
|
|
@@ -1067,6 +1068,7 @@ export declare type removeRoomListener = (value: string) => void
|
|
|
1067
1068
|
|
|
1068
1069
|
declare type Response_2 = {
|
|
1069
1070
|
};
|
|
1071
|
+
export { Response_2 as Response }
|
|
1070
1072
|
|
|
1071
1073
|
export declare type ResponseSDK = Response_2
|
|
1072
1074
|
|
|
@@ -1168,7 +1170,7 @@ declare class SocketIoClass {
|
|
|
1168
1170
|
|
|
1169
1171
|
export declare type SocketTyped = Socket_2<EventCallbackRegistry, ServerEmitEventCallbackRegistry>
|
|
1170
1172
|
|
|
1171
|
-
declare type Summery = {
|
|
1173
|
+
export declare type Summery = {
|
|
1172
1174
|
/**
|
|
1173
1175
|
* Representative
|
|
1174
1176
|
*/
|
|
@@ -1187,7 +1189,7 @@ export declare interface UpdateMonitoredExtensionsPayload {
|
|
|
1187
1189
|
|
|
1188
1190
|
export declare type updateRoomListener = (value: string) => void
|
|
1189
1191
|
|
|
1190
|
-
declare type User = {
|
|
1192
|
+
export declare type User = {
|
|
1191
1193
|
/**
|
|
1192
1194
|
* User id
|
|
1193
1195
|
*/
|
|
@@ -5273,8 +5273,8 @@ class ds {
|
|
|
5273
5273
|
}
|
|
5274
5274
|
/**
|
|
5275
5275
|
* Used to send http log request.
|
|
5276
|
-
* @param
|
|
5277
|
-
* @return {Promise<
|
|
5276
|
+
* @param logs logs array which is sent in request body.
|
|
5277
|
+
* @return {Promise<Response>}
|
|
5278
5278
|
*/
|
|
5279
5279
|
sendHttpRequest(e) {
|
|
5280
5280
|
if (!this.requestUrl)
|
|
@@ -5317,12 +5317,14 @@ class ds {
|
|
|
5317
5317
|
* @param options The options used for the socket connection.
|
|
5318
5318
|
* @return void
|
|
5319
5319
|
*/
|
|
5320
|
-
createConnection(e, t
|
|
5321
|
-
|
|
5322
|
-
...ps
|
|
5323
|
-
...t
|
|
5320
|
+
createConnection(e, t) {
|
|
5321
|
+
let n = {
|
|
5322
|
+
...ps
|
|
5324
5323
|
};
|
|
5325
|
-
return
|
|
5324
|
+
return t && (n = {
|
|
5325
|
+
...n,
|
|
5326
|
+
...t
|
|
5327
|
+
}), Lt(e, n);
|
|
5326
5328
|
}
|
|
5327
5329
|
/**
|
|
5328
5330
|
* Emits stored logs to the server and clears the log storage in case the emit operation was successful
|
|
@@ -5350,7 +5352,7 @@ class ds {
|
|
|
5350
5352
|
...this.staticObject,
|
|
5351
5353
|
...p
|
|
5352
5354
|
}, i = this.populateSendingLog(l);
|
|
5353
|
-
i.Body && typeof i.Body == "string" && (i.Body = JSON.parse(i.Body)), this.socket ?
|
|
5355
|
+
i.Body && typeof i.Body == "string" && (i.Body = JSON.parse(i.Body)), this.socket ? this.socket.emit("Log", i) : this.requestUrl && u.push(i), r.push(c);
|
|
5354
5356
|
}
|
|
5355
5357
|
u.length && await this.sendHttpRequest(u);
|
|
5356
5358
|
const h = await this.getItem(this.storageId);
|
|
@@ -5375,9 +5377,9 @@ class ds {
|
|
|
5375
5377
|
return n && (t.ActionID = fs[n]), t;
|
|
5376
5378
|
}
|
|
5377
5379
|
/**
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5380
|
+
* Used to set a static object which will be send in every message
|
|
5381
|
+
* @return void
|
|
5382
|
+
*/
|
|
5381
5383
|
setupStaticFields(e) {
|
|
5382
5384
|
this.staticObject = { ...e };
|
|
5383
5385
|
}
|
|
@@ -5409,7 +5411,8 @@ class ds {
|
|
|
5409
5411
|
* @return void
|
|
5410
5412
|
*/
|
|
5411
5413
|
async start() {
|
|
5412
|
-
|
|
5414
|
+
var e;
|
|
5415
|
+
this.socket && this.socket.connected || ((e = this.socket) == null || e.connect(), this.interval = setInterval(async () => {
|
|
5413
5416
|
await this.emitLogs();
|
|
5414
5417
|
}, this.socketEmitInterval));
|
|
5415
5418
|
}
|
|
@@ -5500,7 +5503,7 @@ class ds {
|
|
|
5500
5503
|
}
|
|
5501
5504
|
/**
|
|
5502
5505
|
* Logs info data into the storage
|
|
5503
|
-
* @param
|
|
5506
|
+
* @param logData The arguments to be logged.
|
|
5504
5507
|
* @return void
|
|
5505
5508
|
*/
|
|
5506
5509
|
log(e) {
|