@voicenter-team/events-sdk 0.0.19 → 0.0.20

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.
@@ -209,31 +209,33 @@ export declare enum EventsEnum {
209
209
  export declare type EventSpecificCallback<T extends EventTypeNames> = (data: WrappedSocketEvent<T>) => void
210
210
 
211
211
  declare class EventsSdkClass {
212
- constructor(options: EventsSdkOptions);
213
212
  private argumentOptions;
214
213
  readonly options: EventsSdkOptions;
215
214
  servers: Server[];
215
+ URLList: string[];
216
216
  server: Server;
217
+ URL: string | undefined;
217
218
  socket: SocketTyped | undefined;
219
+ private mainServer;
220
+ private alreadyAttemptedOtherServers;
218
221
  authClass: AuthClass;
219
222
  socketIoClass: SocketIoClass;
220
223
  loggerClass: LoggerClass;
221
224
  reconnectOptions: ReconnectOptions;
222
- retryConnection: DebouncedFuncLeading<(server?: ServerParameter) => void>;
225
+ retryConnection: DebouncedFuncLeading<(serverParameter: ServerParameter) => void>;
223
226
  private listeners;
224
227
  private allListeners;
228
+ constructor(options: EventsSdkOptions);
225
229
  on<T extends EventTypeNames>(event: T, callback: EventSpecificCallback<T>): void;
226
230
  on(event: '*', callback: (data: GenericEventWrapper) => void): void;
227
231
  off<T extends EventTypeNames>(event: T, callback: EventSpecificCallback<T>): void;
228
232
  off(event: '*', callback: (data: GenericEventWrapper) => void): void;
229
233
  emit<T extends EventTypeNames>(event: T, data: EventTypeData<T>): void;
230
- connect(server?: ServerParameter): void;
234
+ connect(serverParameter: ServerParameter): void;
231
235
  disconnect(): void;
232
236
  clearKeepAliveInterval(): void;
233
- private findCurrentServer;
234
- private findNextAvailableServer;
235
- private findMaxPriorityServer;
236
- private findMinPriorityServer;
237
+ private findMainServer;
238
+ private findNextServer;
237
239
  getServerWithHighestPriority(servers: Server[]): Server;
238
240
  init(): Promise<boolean>;
239
241
  private getServers;
@@ -242,7 +244,7 @@ export default EventsSdkClass;
242
244
 
243
245
  export declare interface EventsSdkOptions {
244
246
  isNewStack?: boolean;
245
- servers: Server[];
247
+ servers?: Server[];
246
248
  loginUrl: string;
247
249
  getSettingsUrl?: string;
248
250
  fallbackServer: Server;
@@ -600,9 +602,8 @@ export declare interface Server {
600
602
  }
601
603
 
602
604
  export declare enum ServerParameter {
603
- DEFAULT = "default",
604
- NEXT = "next",
605
- PREVIOUS = "previous"
605
+ MAIN = "main",
606
+ NEXT = "next"
606
607
  }
607
608
 
608
609
  export declare enum ServerTypesEnum {