@ethora/chat-component 25.6.4 → 25.6.6
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/README.md +99 -392
- package/dist/components/RoomComponents/styled/LastAudioMessage.d.ts +6 -0
- package/dist/hooks/useSendMessage.d.ts +1 -1
- package/dist/main.js +5460 -5291
- package/dist/main.js.map +1 -1
- package/dist/networking/xmpp/createTimeoutPromise.xmpp.d.ts +1 -1
- package/dist/networking/xmpp/listenerManager.d.ts +17 -0
- package/dist/networking/xmpp/sendMediaMessage.xmpp.d.ts +1 -1
- package/dist/networking/xmppClient.d.ts +3 -3
- package/dist/roomStore/Middleware/testMiddleware.d.ts +2 -0
- package/dist/types/models/xmpp.model.d.ts +1 -1
- package/dist/utils/actionHelpers.d.ts +4 -0
- package/dist/utils/actionLogger.d.ts +17 -0
- package/dist/utils/xmppMemoryMonitor.d.ts +16 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function createTimeoutPromise(ms: number | undefined,
|
|
1
|
+
export declare function createTimeoutPromise(ms: number | undefined, onTimeout?: () => void): Promise<unknown>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Client } from '@xmpp/client';
|
|
2
|
+
import { Element } from '@xmpp/xml';
|
|
3
|
+
export declare class XmppListenerManager {
|
|
4
|
+
static addListener(client: Client, eventType: string, listenerKey: string, handler: (stanza: Element) => void): void;
|
|
5
|
+
static removeListener(listenerKey: string): boolean;
|
|
6
|
+
static removeAllListenersForClient(client: Client): void;
|
|
7
|
+
static getListenerKey(operation: string, identifier: string): string;
|
|
8
|
+
static clearAllListeners(): void;
|
|
9
|
+
static getActiveListenerCount(): number;
|
|
10
|
+
static getActiveListenersInfo(): Array<{
|
|
11
|
+
key: string;
|
|
12
|
+
eventType: string;
|
|
13
|
+
timestamp: number;
|
|
14
|
+
age: number;
|
|
15
|
+
}>;
|
|
16
|
+
static logActiveListeners(): void;
|
|
17
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Client } from '@xmpp/client';
|
|
2
|
-
export declare function sendMediaMessage(client: Client, roomJID: string, data: any): void;
|
|
2
|
+
export declare function sendMediaMessage(client: Client, roomJID: string, data: any, id: string): void;
|
|
@@ -53,9 +53,9 @@ export declare class XmppClient implements XmppClientInterface {
|
|
|
53
53
|
getChatsPrivateStoreRequestStanza: () => Promise<unknown>;
|
|
54
54
|
actionSetTimestampToPrivateStoreStanza(chatId: string, timestamp: number, chats?: string[]): Promise<void>;
|
|
55
55
|
createPrivateRoomStanza(title: string, description: string, to: string): Promise<string>;
|
|
56
|
-
sendMediaMessageStanza(roomJID: string, data: any): void;
|
|
56
|
+
sendMediaMessageStanza(roomJID: string, data: any, id: string): void;
|
|
57
57
|
sendPing(): void;
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
getListenerCount(): Promise<number>;
|
|
59
|
+
logListenerInfo(): Promise<void>;
|
|
60
60
|
}
|
|
61
61
|
export default XmppClient;
|
|
@@ -53,7 +53,7 @@ export interface XmppClientInterface {
|
|
|
53
53
|
sendTypingRequestStanza(chatId: string, fullName: string, start: boolean): void;
|
|
54
54
|
getChatsPrivateStoreRequestStanza(): Promise<any>;
|
|
55
55
|
actionSetTimestampToPrivateStoreStanza(chatId: string, timestamp: number, chats?: string[]): Promise<void>;
|
|
56
|
-
sendMediaMessageStanza(roomJID: string, data: MediaUploadData): void;
|
|
56
|
+
sendMediaMessageStanza(roomJID: string, data: MediaUploadData, id: string): void;
|
|
57
57
|
createPrivateRoomStanza(title: string, description: string, to: string): Promise<string>;
|
|
58
58
|
sendMessageReactionStanza(messageId: string, roomJid: string, reactionsList: string[], reactionSymbol?: string): void;
|
|
59
59
|
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;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AnyAction } from '@reduxjs/toolkit';
|
|
2
|
+
export declare const isValidAction: (action: any) => action is AnyAction;
|
|
3
|
+
export declare const createSafeDispatch: (dispatch: any) => (action: any) => any;
|
|
4
|
+
export declare const createAsyncAction: (asyncFunction: (...args: any[]) => Promise<any>) => (...args: any[]) => (dispatch: any, getState: any) => Promise<any>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface ActionLogEntry {
|
|
2
|
+
timestamp: number;
|
|
3
|
+
action: any;
|
|
4
|
+
state: any;
|
|
5
|
+
stackTrace: string;
|
|
6
|
+
}
|
|
7
|
+
declare class ActionLogger {
|
|
8
|
+
private logs;
|
|
9
|
+
private maxLogs;
|
|
10
|
+
logAction(action: any, state: any): void;
|
|
11
|
+
getLogs(): ActionLogEntry[];
|
|
12
|
+
clearLogs(): void;
|
|
13
|
+
getRecentLogs(count?: number): ActionLogEntry[];
|
|
14
|
+
}
|
|
15
|
+
export declare const actionLogger: ActionLogger;
|
|
16
|
+
export declare const actionLoggerMiddleware: (storeAPI: any) => (next: any) => (action: any) => any;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare class XmppMemoryMonitor {
|
|
2
|
+
private static monitoringInterval;
|
|
3
|
+
private static warningThreshold;
|
|
4
|
+
private static criticalThreshold;
|
|
5
|
+
static startMonitoring(intervalMs?: number): void;
|
|
6
|
+
static stopMonitoring(): void;
|
|
7
|
+
static setThresholds(warning: number, critical: number): void;
|
|
8
|
+
static getCurrentCount(): number;
|
|
9
|
+
static forceCleanup(): void;
|
|
10
|
+
static getListenerInfo(): Array<{
|
|
11
|
+
key: string;
|
|
12
|
+
eventType: string;
|
|
13
|
+
timestamp: number;
|
|
14
|
+
age: number;
|
|
15
|
+
}>;
|
|
16
|
+
}
|