@voicenter-team/events-sdk 0.0.119 → 0.0.121
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/README.md +337 -337
- package/dist/voicenter-events-sdk.cjs.js +11 -11
- package/dist/voicenter-events-sdk.cjs.js.map +1 -1
- package/dist/voicenter-events-sdk.d.ts +6 -77
- package/dist/voicenter-events-sdk.es.js +279 -279
- package/dist/voicenter-events-sdk.es.js.map +1 -1
- package/dist/voicenter-events-sdk.iife.js +6 -6
- package/dist/voicenter-events-sdk.iife.js.map +1 -1
- package/dist/voicenter-events-sdk.umd.js +6 -6
- package/dist/voicenter-events-sdk.umd.js.map +1 -1
- package/package.json +64 -64
|
@@ -137,7 +137,7 @@ declare interface CurrentCallEnded extends CurrentCallUTCExtended {
|
|
|
137
137
|
duration: number
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
declare interface CurrentCallUTCExtended extends ExtensionCall {
|
|
141
141
|
callStarted_UTC: number
|
|
142
142
|
callStarted_UTC_CLIENT: number
|
|
143
143
|
callAnswered_UTC: number
|
|
@@ -809,7 +809,6 @@ declare class LoggerClass {
|
|
|
809
809
|
keepAliveEmit(): void;
|
|
810
810
|
keepAliveResponse(data: KeepAliveResponseEvent): void;
|
|
811
811
|
eventLog<T extends EventTypeNames>(eventName: T, data: EventDataMap[T]): void;
|
|
812
|
-
private getStaticData;
|
|
813
812
|
}
|
|
814
813
|
|
|
815
814
|
export declare interface LoggerConfig {
|
|
@@ -1137,74 +1136,24 @@ export declare interface Socket {
|
|
|
1137
1136
|
Version: string
|
|
1138
1137
|
}
|
|
1139
1138
|
|
|
1140
|
-
/**
|
|
1141
|
-
* SocketIoClass handles WebSocket connections and real-time event management.
|
|
1142
|
-
* Prevents duplicate connections and events with robust state management.
|
|
1143
|
-
*/
|
|
1144
1139
|
declare class SocketIoClass {
|
|
1145
1140
|
private readonly eventsSdkClass;
|
|
1146
|
-
|
|
1141
|
+
constructor(eventsSdkClass: EventsSdkClass);
|
|
1147
1142
|
io: SocketTyped | undefined;
|
|
1148
|
-
/** The Socket.IO function used to create connections based on version */
|
|
1149
1143
|
ioFunction: TypedSocketIo | undefined;
|
|
1150
|
-
/** Timestamp of the last received event, used for keep-alive calculations */
|
|
1151
1144
|
lastEventTimestamp: number;
|
|
1152
|
-
/** Flag indicating whether automatic reconnection should be attempted */
|
|
1153
1145
|
doReconnect: boolean;
|
|
1154
|
-
/** Current connection state */
|
|
1155
|
-
private connectionState;
|
|
1156
|
-
/** Keep-alive interval handle */
|
|
1157
1146
|
private keepAliveInterval;
|
|
1158
|
-
|
|
1159
|
-
private
|
|
1160
|
-
|
|
1161
|
-
private networkReconnectTimeout;
|
|
1162
|
-
/** Current reconnection delay in seconds */
|
|
1147
|
+
private keepReconnectInterval;
|
|
1148
|
+
private keepReconnectTimeout;
|
|
1149
|
+
private connected;
|
|
1163
1150
|
private reconnectionTime;
|
|
1164
|
-
/** Maximum reconnection delay in seconds */
|
|
1165
|
-
private readonly maxReconnectionDelay;
|
|
1166
|
-
/** Network event cleanup functions */
|
|
1167
|
-
private networkCleanup;
|
|
1168
|
-
/**
|
|
1169
|
-
* Creates an instance of SocketIoClass and sets up network event listeners.
|
|
1170
|
-
*/
|
|
1171
|
-
constructor(eventsSdkClass: EventsSdkClass);
|
|
1172
|
-
/**
|
|
1173
|
-
* Sets up network event listeners
|
|
1174
|
-
*/
|
|
1175
|
-
private setupNetworkListeners;
|
|
1176
|
-
/**
|
|
1177
|
-
* Handles network online with debouncing to prevent rapid reconnects
|
|
1178
|
-
*/
|
|
1179
|
-
private handleNetworkOnline;
|
|
1180
|
-
/**
|
|
1181
|
-
* Determines and sets the appropriate Socket.IO function based on client version.
|
|
1182
|
-
*/
|
|
1183
1151
|
getSocketIoFunction(Client: string): void;
|
|
1184
|
-
/**
|
|
1185
|
-
* Initializes a new Socket.IO connection. Prevents multiple simultaneous connections.
|
|
1186
|
-
*/
|
|
1187
1152
|
initSocketConnection(): void;
|
|
1188
|
-
/**
|
|
1189
|
-
* Clears the keep-alive interval
|
|
1190
|
-
*/
|
|
1191
1153
|
clearKeepAliveInterval(): void;
|
|
1192
|
-
/**
|
|
1193
|
-
* Initializes the keep-alive mechanism
|
|
1194
|
-
*/
|
|
1195
1154
|
initKeepAlive(): void;
|
|
1196
|
-
|
|
1197
|
-
* Closes all active connections and cleans up resources properly
|
|
1198
|
-
*/
|
|
1199
|
-
closeAllConnections(): Promise<void>;
|
|
1200
|
-
/**
|
|
1201
|
-
* Sets up event listeners for all Socket.IO events
|
|
1202
|
-
*/
|
|
1155
|
+
closeAllConnections(): void;
|
|
1203
1156
|
initSocketEvents(): void;
|
|
1204
|
-
/**
|
|
1205
|
-
* Updates timestamp on every event to prevent unnecessary keep-alives
|
|
1206
|
-
*/
|
|
1207
|
-
private updateEventTimestamp;
|
|
1208
1157
|
private onLoginSuccessEvent;
|
|
1209
1158
|
private onQueueEvent;
|
|
1210
1159
|
private onExtensionEvent;
|
|
@@ -1212,31 +1161,11 @@ declare class SocketIoClass {
|
|
|
1212
1161
|
private onLoginStatusEvent;
|
|
1213
1162
|
private onAllExtensionStatus;
|
|
1214
1163
|
private onAllDialerStatus;
|
|
1215
|
-
/**
|
|
1216
|
-
* Handles keep-alive response - fixed to prevent multiple connections
|
|
1217
|
-
*/
|
|
1218
1164
|
private onKeepAliveResponse;
|
|
1219
1165
|
private onExtensionsUpdatedEvent;
|
|
1220
|
-
/**
|
|
1221
|
-
* Handles successful connection
|
|
1222
|
-
*/
|
|
1223
1166
|
private onConnect;
|
|
1224
|
-
/**
|
|
1225
|
-
* Schedules reconnection with exponential backoff
|
|
1226
|
-
*/
|
|
1227
|
-
private scheduleReconnect;
|
|
1228
|
-
/**
|
|
1229
|
-
* Handles disconnection
|
|
1230
|
-
*/
|
|
1231
1167
|
private onDisconnect;
|
|
1232
|
-
/**
|
|
1233
|
-
* Handles connection errors
|
|
1234
|
-
*/
|
|
1235
1168
|
private onConnectError;
|
|
1236
|
-
/**
|
|
1237
|
-
* Cleanup when shutting down
|
|
1238
|
-
*/
|
|
1239
|
-
destroy(): Promise<void>;
|
|
1240
1169
|
}
|
|
1241
1170
|
|
|
1242
1171
|
export declare type SocketTyped = Socket_2<EventCallbackRegistry, ServerEmitEventCallbackRegistry>
|