@ethora/chat-component 25.6.8 → 25.6.10
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/dist/main.js +6663 -6248
- package/dist/main.js.map +1 -1
- package/dist/networking/stanzaHandlers.d.ts +10 -0
- package/dist/networking/xmpp/allRoomPresences.xmpp.d.ts +1 -1
- package/dist/networking/xmpp/createTimeoutPromise.xmpp.d.ts +1 -1
- package/dist/networking/xmpp/presenceInRoom.xmpp.d.ts +2 -1
- package/dist/networking/xmppClient.d.ts +3 -1
- package/package.json +1 -1
|
@@ -17,4 +17,14 @@ declare const onNewRoomCreated: (stanza: Element, xmpp: any) => void;
|
|
|
17
17
|
declare const onGetChatRooms: (stanza: Element, xmpp: any) => void;
|
|
18
18
|
declare const onRoomKicked: (stanza: Element) => Promise<void>;
|
|
19
19
|
declare const onMessageError: (stanza: Element, client: XmppClient) => Promise<void>;
|
|
20
|
+
export type XMPPErrorInfo = {
|
|
21
|
+
type: string;
|
|
22
|
+
id: string;
|
|
23
|
+
from: string;
|
|
24
|
+
to: string;
|
|
25
|
+
body: string | null;
|
|
26
|
+
condition: string;
|
|
27
|
+
message: string;
|
|
28
|
+
};
|
|
29
|
+
export declare const handleErrorMessageStanza: (stanza: Element) => XMPPErrorInfo | null;
|
|
20
30
|
export { onRealtimeMessage, onMessageHistory, onPresenceInRoom, onReactionHistory, onGetLastMessageArchive, handleComposing, onGetChatRooms, onNewRoomCreated, onGetMembers, onGetRoomInfo, onDeleteMessage, onEditMessage, onReactionMessage, onChatInvite, onRoomKicked, onMessageError, };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Client } from '@xmpp/client';
|
|
2
|
-
export declare function allRoomPresences(client: Client): void
|
|
2
|
+
export declare function allRoomPresences(client: Client): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function createTimeoutPromise(ms: number | undefined,
|
|
1
|
+
export declare function createTimeoutPromise(ms: number | undefined, unsubscribe?: () => void): Promise<unknown>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { Client } from '@xmpp/client';
|
|
2
|
-
|
|
2
|
+
import { Element } from '@xmpp/xml';
|
|
3
|
+
export declare const presenceInRoom: (client: Client, roomJID: string, delay?: number) => Promise<Element>;
|
|
@@ -15,6 +15,7 @@ export declare class XmppClient implements XmppClientInterface {
|
|
|
15
15
|
reconnectDelay: number;
|
|
16
16
|
private reconnecting;
|
|
17
17
|
private reconnectPromise;
|
|
18
|
+
presencesReady: boolean;
|
|
18
19
|
checkOnline(): boolean;
|
|
19
20
|
pingInterval: any;
|
|
20
21
|
pingTimeout: any;
|
|
@@ -26,8 +27,9 @@ export declare class XmppClient implements XmppClientInterface {
|
|
|
26
27
|
initializeClient(): Promise<void>;
|
|
27
28
|
disconnect(): Promise<void>;
|
|
28
29
|
attachEventListeners(): void;
|
|
30
|
+
sendAllPresencesAndMarkReady(): Promise<void>;
|
|
29
31
|
reconnect(): Promise<void>;
|
|
30
|
-
allRoomPresencesStanza(): void
|
|
32
|
+
allRoomPresencesStanza(): Promise<void>;
|
|
31
33
|
ensureConnected(timeout?: number): Promise<void>;
|
|
32
34
|
close(): Promise<void>;
|
|
33
35
|
wrapWithConnectionCheck<T>(operation: () => Promise<T>): Promise<T>;
|