@ethora/chat-component 26.2.28 → 26.3.2

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.
@@ -10,13 +10,13 @@ export declare function registerSocial(idToken: string, accessToken: string, aut
10
10
  export declare function checkEmailExist(email: string): Promise<import('axios').AxiosResponse<any, any, {}>>;
11
11
  export declare function loginViaJwt(clientToken: string): Promise<User>;
12
12
  export declare const signInWithGoogle: () => Promise<{
13
- user: FirebaseUser;
14
- idToken: string;
15
- credential: import('firebase/auth').OAuthCredential;
16
- } | {
17
13
  user?: undefined;
18
14
  idToken?: undefined;
19
15
  credential?: undefined;
16
+ } | {
17
+ user: FirebaseUser;
18
+ idToken: string;
19
+ credential: import('firebase/auth').OAuthCredential;
20
20
  }>;
21
21
  export declare function uploadFile(formData: FormData): Promise<import('axios').AxiosResponse<any, any, {}>>;
22
22
  export declare function ensureUserFromMy(user: User | null | undefined): Promise<User | null>;
@@ -80,7 +80,9 @@ export declare class XmppClient implements XmppClientInterface {
80
80
  private isTerminalAuthFailure;
81
81
  constructor(username: string, password: string, xmppSettings?: xmppSettingsInterface);
82
82
  initializeClient(): Promise<void>;
83
- disconnect(): Promise<void>;
83
+ disconnect(options?: {
84
+ suppressReconnect?: boolean;
85
+ }): Promise<void>;
84
86
  markIntentionalLogout: () => void;
85
87
  attachEventListeners(): void;
86
88
  private scheduleAdaptivePing;
@@ -3,23 +3,23 @@ import { IRoom } from '../types/types';
3
3
  declare const rootReducer: Reducer<{
4
4
  chatSettingStore: any;
5
5
  rooms: any;
6
- roomHeapSlice: any;
6
+ roomHeapSlice: import('./roomHeapSlice').roomHeapSliceState;
7
7
  }, import('redux').UnknownAction, Partial<{
8
8
  chatSettingStore: any;
9
9
  rooms: any;
10
- roomHeapSlice: any;
10
+ roomHeapSlice: import('./roomHeapSlice').roomHeapSliceState;
11
11
  }>>;
12
12
  export type RootState = ReturnType<typeof rootReducer>;
13
13
  export declare const getActiveRoom: (state: RootState) => IRoom | null;
14
14
  export declare const store: import('@reduxjs/toolkit').EnhancedStore<{
15
15
  chatSettingStore: any;
16
16
  rooms: any;
17
- roomHeapSlice: any;
17
+ roomHeapSlice: import('./roomHeapSlice').roomHeapSliceState;
18
18
  }, AnyAction, import('@reduxjs/toolkit').Tuple<[import('redux').StoreEnhancer<{
19
19
  dispatch: import('redux-thunk').ThunkDispatch<{
20
20
  chatSettingStore: any;
21
21
  rooms: any;
22
- roomHeapSlice: any;
22
+ roomHeapSlice: import('./roomHeapSlice').roomHeapSliceState;
23
23
  }, undefined, import('redux').UnknownAction>;
24
24
  }>, import('redux').StoreEnhancer]>>;
25
25
  export type AppDispatch = typeof store.dispatch;
@@ -91,5 +91,7 @@ export interface XmppClientInterface {
91
91
  createPrivateRoomStanza(title: string, description: string, to: string): Promise<string>;
92
92
  sendMessageReactionStanza(messageId: string, roomJid: string, reactionsList: string[], reactionSymbol?: string): void;
93
93
  sendTextMessageWithTranslateTagStanza(roomJID: string, firstName: string, lastName: string, photo: string, walletAddress: string, userMessage: string, notDisplayedValue?: string, isReply?: boolean, showInChannel?: boolean, mainMessage?: string, langSource?: Iso639_1Codes): void;
94
- disconnect?(): Promise<void>;
94
+ disconnect?(options?: {
95
+ suppressReconnect?: boolean;
96
+ }): Promise<void>;
95
97
  }
@@ -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.2.28",
3
+ "version": "26.3.2",
4
4
  "type": "module",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",
@@ -1,4 +1,4 @@
1
- /* eslint-disable no-empty, no-restricted-globals */
1
+ /* eslint-disable no-empty */
2
2
  /* eslint-env worker */
3
3
  /* global clients */
4
4