@ethora/chat-component 26.2.15 → 26.2.17

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.
@@ -3,6 +3,7 @@ import { Iso639_1Codes, XmppClientInterface, xmppSettingsInterface, IMessage } f
3
3
  import { AllRoomPresenceSummary } from './xmpp/allRoomPresences.xmpp';
4
4
  type HistorySource = 'active' | 'send_ack' | 'background' | 'default';
5
5
  export declare class XmppClient implements XmppClientInterface {
6
+ private static activeByEndpoint;
6
7
  client: Client;
7
8
  devServer: string | undefined;
8
9
  host: string;
@@ -60,6 +61,7 @@ export declare class XmppClient implements XmppClientInterface {
60
61
  private pausedDueToOfflineCap;
61
62
  private authFailureDetected;
62
63
  private reconnectSuppressed;
64
+ private endpointKey;
63
65
  private isTerminalAuthFailure;
64
66
  constructor(username: string, password: string, xmppSettings?: xmppSettingsInterface);
65
67
  initializeClient(): Promise<void>;
@@ -1,10 +1,21 @@
1
1
  import { default as XmppClient } from '../networking/xmppClient';
2
- export declare function setGlobalXmppClient(client: XmppClient | null): void;
2
+ import { xmppSettingsInterface } from '../types/types';
3
+ export declare function buildXmppClientKey(username: string, xmppSettings?: xmppSettingsInterface): string;
4
+ export declare function isXmppClientReusable(client: XmppClient | null): boolean;
5
+ export declare function setGlobalXmppClient(client: XmppClient | null, key?: string): void;
3
6
  export declare function getGlobalXmppClient(): XmppClient | null;
7
+ export declare function getGlobalXmppClientKey(): string;
8
+ export declare function getReusableXmppClientByKey(key: string): XmppClient | null;
9
+ export declare function withXmppClientInitLock(key: string, init: () => Promise<XmppClient>): Promise<XmppClient>;
4
10
  export declare function requireXmppClient(): XmppClient;
5
11
  declare const _default: {
12
+ buildXmppClientKey: typeof buildXmppClientKey;
13
+ isXmppClientReusable: typeof isXmppClientReusable;
6
14
  setGlobalXmppClient: typeof setGlobalXmppClient;
7
15
  getGlobalXmppClient: typeof getGlobalXmppClient;
16
+ getGlobalXmppClientKey: typeof getGlobalXmppClientKey;
17
+ getReusableXmppClientByKey: typeof getReusableXmppClientByKey;
18
+ withXmppClientInitLock: typeof withXmppClientInitLock;
8
19
  requireXmppClient: typeof requireXmppClient;
9
20
  };
10
21
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethora/chat-component",
3
- "version": "26.02.15",
3
+ "version": "26.02.17",
4
4
  "type": "module",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",