@ethora/chat-component 25.6.18 → 25.7.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.
@@ -12,4 +12,4 @@ export declare const sendTextMessageWithTranslateTag: (client: Client, stanzaMes
12
12
  showInChannel?: boolean;
13
13
  mainMessage?: string;
14
14
  devServer?: string;
15
- }, source: Iso639_1Codes) => void;
15
+ }, source: Iso639_1Codes, customId?: string) => void;
@@ -1,5 +1,5 @@
1
1
  import { Client } from '@xmpp/client';
2
- import { Iso639_1Codes, XmppClientInterface, xmppSettingsInterface } from '../types/types';
2
+ import { Iso639_1Codes, XmppClientInterface, xmppSettingsInterface, IMessage } from '../types/types';
3
3
  export declare class XmppClient implements XmppClientInterface {
4
4
  client: Client;
5
5
  devServer: string | undefined;
@@ -16,6 +16,10 @@ export declare class XmppClient implements XmppClientInterface {
16
16
  private reconnecting;
17
17
  private reconnectPromise;
18
18
  presencesReady: boolean;
19
+ private connectionSteps;
20
+ private messageQueue;
21
+ private inFlightIds;
22
+ private processingQueue;
19
23
  checkOnline(): boolean;
20
24
  pingInterval: any;
21
25
  pingTimeout: any;
@@ -33,13 +37,24 @@ export declare class XmppClient implements XmppClientInterface {
33
37
  ensureConnected(timeout?: number): Promise<void>;
34
38
  close(): Promise<void>;
35
39
  wrapWithConnectionCheck<T>(operation: () => Promise<T>): Promise<T>;
40
+ private enqueue;
41
+ private processQueue;
42
+ private withIdLock;
43
+ private startKeepAlive;
44
+ private onBrowserOnline;
45
+ private onBrowserOffline;
46
+ getConnectionSteps(): Array<{
47
+ ts: number;
48
+ step: string;
49
+ }>;
50
+ private logStep;
36
51
  getRoomsStanza: (disableGetRooms?: boolean) => Promise<void>;
37
52
  getRoomsPagedStanza(maxResults?: number, after?: string | null): Promise<void>;
38
53
  createRoomStanza(title: string, description: string): Promise<string>;
39
54
  inviteRoomRequestStanza(to: string, roomJid: string): Promise<void>;
40
55
  leaveTheRoomStanza: (roomJID: string) => void;
41
56
  presenceInRoomStanza: (roomJID: string, settleDelay?: number) => Promise<void>;
42
- getHistoryStanza: (chatJID: string, max: number, before?: number, otherStanzaId?: string) => Promise<import('../types/types').IMessage[]>;
57
+ getHistoryStanza: (chatJID: string, max: number, before?: number, otherStanzaId?: string) => Promise<IMessage[]>;
43
58
  getLastMessageArchiveStanza(roomJID: string): void;
44
59
  setRoomImageStanza: (roomJid: string, roomThumbnail: string, type: string, roomBackground?: string) => void;
45
60
  getRoomInfoStanza: (roomJID: string) => void;
@@ -47,7 +62,7 @@ export declare class XmppClient implements XmppClientInterface {
47
62
  setVCardStanza(xmppUsername: string): void;
48
63
  sendMessageWithPingCheck(sendFn: () => Promise<void>, retry?: boolean): Promise<boolean>;
49
64
  sendMessage: (roomJID: string, firstName: string, lastName: string, photo: string, walletAddress: string, userMessage: string, notDisplayedValue?: string, isReply?: boolean, showInChannel?: boolean, mainMessage?: string, customId?: string) => Promise<boolean>;
50
- 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;
65
+ sendTextMessageWithTranslateTagStanza: (roomJID: string, firstName: string, lastName: string, photo: string, walletAddress: string, userMessage: string, notDisplayedValue?: string, isReply?: boolean, showInChannel?: boolean, mainMessage?: string, langSource?: Iso639_1Codes, customId?: string) => Promise<boolean>;
51
66
  deleteMessageStanza(room: string, msgId: string): void;
52
67
  editMessageStanza(room: string, msgId: string, text: string): void;
53
68
  sendMessageReactionStanza(messageId: string, roomJid: string, reactionsList: string[], reactionSymbol?: any): void;
@@ -59,5 +74,6 @@ export declare class XmppClient implements XmppClientInterface {
59
74
  sendPing(): void;
60
75
  handlePong(): void;
61
76
  handlePingTimeout(): void;
77
+ private drainHeap;
62
78
  }
63
79
  export default XmppClient;
@@ -0,0 +1 @@
1
+ export declare const ETHORA_CHAT_COMPONENT_VERSION = "25.7.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethora/chat-component",
3
- "version": "25.6.18",
3
+ "version": "25.7.2",
4
4
  "type": "module",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",