@ethora/chat-component 25.1.17 → 25.1.18
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/assets/icons.d.ts +5 -4
- package/dist/assets/images.d.ts +4 -0
- package/dist/components/styled/StyledInputComponents/MediaComponents.d.ts +6 -2
- package/dist/components/styled/UnsupportedType.d.ts +1 -0
- package/dist/helpers/getBooleanFromString.d.ts +1 -0
- package/dist/helpers/getNumberFromString.d.ts +1 -0
- package/dist/hooks/useMessageQueue.d.ts +5 -0
- package/dist/main.js +4258 -4121
- package/dist/main.js.map +1 -1
- package/dist/networking/stanzaHandlers.d.ts +1 -1
- package/dist/networking/xmpp/getRoomsPaged.xmpp.d.ts +3 -0
- package/dist/networking/xmppClient.d.ts +1 -0
- package/dist/types/types.d.ts +8 -0
- package/dist/utils/PriorityQueue.d.ts +11 -0
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ declare const onPresenceInRoom: (stanza: Element | any) => void;
|
|
|
11
11
|
declare const onChatInvite: (stanza: Element, client: any) => Promise<void>;
|
|
12
12
|
declare const onGetMembers: (stanza: Element) => void;
|
|
13
13
|
declare const onGetRoomInfo: (stanza: Element) => void;
|
|
14
|
-
declare const onGetLastMessageArchive: (stanza: Element
|
|
14
|
+
declare const onGetLastMessageArchive: (stanza: Element) => void;
|
|
15
15
|
declare const onNewRoomCreated: (stanza: Element, xmpp: any) => void;
|
|
16
16
|
declare const onGetChatRooms: (stanza: Element, xmpp: any) => void;
|
|
17
17
|
export { onRealtimeMessage, onMessageHistory, onPresenceInRoom, onReactionHistory, onGetLastMessageArchive, handleComposing, onGetChatRooms, onNewRoomCreated, onGetMembers, onGetRoomInfo, onDeleteMessage, onEditMessage, onReactionMessage, onChatInvite, };
|
|
@@ -21,6 +21,7 @@ export declare class XmppClient implements XmppClientInterface {
|
|
|
21
21
|
reconnect(): void;
|
|
22
22
|
close(): Promise<void>;
|
|
23
23
|
getRoomsStanza: () => Promise<void>;
|
|
24
|
+
getRoomsPagedStanza(maxResults?: number, after?: string | null): Promise<void>;
|
|
24
25
|
createRoomStanza(title: string, description: string): Promise<string>;
|
|
25
26
|
inviteRoomRequestStanza(to: string, roomJid: string): Promise<void>;
|
|
26
27
|
leaveTheRoomStanza: (roomJID: string) => void;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -34,6 +34,8 @@ export interface IMessage {
|
|
|
34
34
|
reaction?: Record<string, ReactionMessage>;
|
|
35
35
|
translations?: TranslationObject;
|
|
36
36
|
langSource?: string;
|
|
37
|
+
originalName?: string;
|
|
38
|
+
size?: string;
|
|
37
39
|
}
|
|
38
40
|
export interface ReactionMessage {
|
|
39
41
|
emoji: string[];
|
|
@@ -61,6 +63,11 @@ export interface IRoom {
|
|
|
61
63
|
noMessages?: boolean;
|
|
62
64
|
role?: string;
|
|
63
65
|
roomMembers?: RoomMember[];
|
|
66
|
+
messageStats?: {
|
|
67
|
+
lastMessageTimestamp?: number;
|
|
68
|
+
firstMessageTimestamp?: number;
|
|
69
|
+
};
|
|
70
|
+
historyComplete?: boolean;
|
|
64
71
|
}
|
|
65
72
|
export interface RoomMember {
|
|
66
73
|
ban_status: string;
|
|
@@ -267,6 +274,7 @@ export interface XmppClientInterface {
|
|
|
267
274
|
sendMediaMessageStanza(roomJID: string, data: any): void;
|
|
268
275
|
createPrivateRoomStanza(title: string, description: string, to: string): Promise<string>;
|
|
269
276
|
sendMessageReactionStanza(messageId: string, roomJid: string, reactionsList: string[], reactionSymbol?: any): void;
|
|
277
|
+
getRoomsPagedStanza(maxResults: number, after: string | null): void;
|
|
270
278
|
}
|
|
271
279
|
export type Iso639_1Codes = 'en' | 'es' | 'pt' | 'ht' | 'zh';
|
|
272
280
|
export interface Language {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class PriorityQueue<T> {
|
|
2
|
+
private items;
|
|
3
|
+
private compare;
|
|
4
|
+
constructor(compareFunction: (a: T, b: T) => number);
|
|
5
|
+
push(item: T): void;
|
|
6
|
+
pop(): T | undefined;
|
|
7
|
+
peek(): T | undefined;
|
|
8
|
+
clear(): void;
|
|
9
|
+
isEmpty(): boolean;
|
|
10
|
+
size(): number;
|
|
11
|
+
}
|