@ethora/chat-component 25.3.2 → 25.3.4
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/components/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/components/MainComponents/MessageList.d.ts +1 -1
- package/dist/components/Modals/ChatProfileModal/DeleteChatModal.d.ts +4 -0
- package/dist/components/Modals/SelectUsersModal/SelectUsersModal.d.ts +4 -0
- package/dist/components/UsersList/StyledComponents.d.ts +4 -0
- package/dist/components/UsersList/UsersList.d.ts +11 -0
- package/dist/helpers/createRoomFromApi.d.ts +1 -1
- package/dist/main.js +14380 -14004
- package/dist/main.js.map +1 -1
- package/dist/networking/api-requests/rooms.api.d.ts +6 -1
- package/dist/networking/stanzaHandlers.d.ts +2 -1
- package/dist/types/types.d.ts +11 -2
- package/package.json +1 -1
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { ApiRoom, PostReportRoom, PostRoom } from '../../types/types';
|
|
1
|
+
import { ApiRoom, DeleteRoomMember, PostAddRoomMember, PostReportRoom, PostRoom } from '../../types/types';
|
|
2
2
|
|
|
3
3
|
export declare function getRooms(): Promise<{
|
|
4
4
|
items: ApiRoom[];
|
|
5
5
|
}>;
|
|
6
|
+
export declare function getRoomByName(chatName: string): Promise<ApiRoom>;
|
|
6
7
|
export declare function postRoom(data: PostRoom): Promise<any>;
|
|
8
|
+
export declare function postPrivateRoom(username: string): Promise<any>;
|
|
7
9
|
export declare function postReportRoom(data: PostReportRoom): Promise<any>;
|
|
10
|
+
export declare function postAddRoomMember(data: PostAddRoomMember): Promise<any>;
|
|
11
|
+
export declare function deleteRoomMember(data: DeleteRoomMember): Promise<any>;
|
|
12
|
+
export declare function deleteRoom(name: string): Promise<any>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Element } from 'ltx';
|
|
2
|
+
import { default as XmppClient } from './xmppClient';
|
|
2
3
|
|
|
3
4
|
declare const onRealtimeMessage: (stanza: Element) => Promise<import('../types/types').IMessage>;
|
|
4
5
|
declare const onReactionMessage: (stanza: Element) => Promise<void>;
|
|
@@ -8,7 +9,7 @@ declare const onReactionHistory: (stanza: any) => Promise<void>;
|
|
|
8
9
|
declare const onMessageHistory: (stanza: any) => Promise<void>;
|
|
9
10
|
declare const handleComposing: (stanza: Element, currentUser: string) => Promise<void>;
|
|
10
11
|
declare const onPresenceInRoom: (stanza: Element | any) => void;
|
|
11
|
-
declare const onChatInvite: (stanza: Element, client:
|
|
12
|
+
declare const onChatInvite: (stanza: Element, client: XmppClient) => Promise<void>;
|
|
12
13
|
declare const onGetMembers: (stanza: Element) => void;
|
|
13
14
|
declare const onGetRoomInfo: (stanza: Element) => void;
|
|
14
15
|
declare const onGetLastMessageArchive: (stanza: Element) => void;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export interface IRoom {
|
|
|
55
55
|
isLoading: boolean;
|
|
56
56
|
roomBg: string;
|
|
57
57
|
members?: RoomMember[];
|
|
58
|
-
type?: 'public' | 'group';
|
|
58
|
+
type?: 'public' | 'group' | 'private';
|
|
59
59
|
creteadAt?: string;
|
|
60
60
|
appId?: string;
|
|
61
61
|
createdAt?: string;
|
|
@@ -85,7 +85,7 @@ export interface IRoom {
|
|
|
85
85
|
}
|
|
86
86
|
export interface ApiRoom {
|
|
87
87
|
name: string;
|
|
88
|
-
type: 'public' | 'group';
|
|
88
|
+
type: 'public' | 'group' | 'private';
|
|
89
89
|
title?: string;
|
|
90
90
|
description?: string;
|
|
91
91
|
picture?: string;
|
|
@@ -104,12 +104,21 @@ export interface PostRoom {
|
|
|
104
104
|
type: 'public' | 'group';
|
|
105
105
|
description?: string;
|
|
106
106
|
picture?: string;
|
|
107
|
+
members?: string[];
|
|
107
108
|
}
|
|
108
109
|
export interface PostReportRoom {
|
|
109
110
|
chatName: string;
|
|
110
111
|
category: string;
|
|
111
112
|
text?: string;
|
|
112
113
|
}
|
|
114
|
+
export interface PostAddRoomMember {
|
|
115
|
+
chatName: string;
|
|
116
|
+
username: string;
|
|
117
|
+
}
|
|
118
|
+
export interface DeleteRoomMember {
|
|
119
|
+
roomId: string;
|
|
120
|
+
userId: string;
|
|
121
|
+
}
|
|
113
122
|
export interface IRoomCompressed extends Pick<IRoom, 'jid'> {
|
|
114
123
|
}
|
|
115
124
|
export interface RoomMember {
|