@ethora/chat-component 25.2.14 → 25.3.1
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/context/xmppProvider.d.ts +2 -1
- package/dist/helpers/createRoomFromApi.d.ts +3 -0
- package/dist/helpers/initXmppRooms.d.ts +7 -0
- package/dist/main.js +4964 -4822
- package/dist/main.js.map +1 -1
- package/dist/networking/api-requests/rooms.api.d.ts +6 -0
- package/dist/roomStore/roomsSlice.d.ts +9 -1
- package/dist/types/types.d.ts +25 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
2
|
import { AddRoomMessageAction, EditAction, IMessage, IRoom, ReactionAction } from '../types/types';
|
|
3
|
+
import { default as XmppClient } from '../networking/xmppClient';
|
|
3
4
|
|
|
4
5
|
interface RoomMessagesState {
|
|
5
6
|
rooms: {
|
|
@@ -69,6 +70,10 @@ export declare const roomsStore: import('@reduxjs/toolkit').Slice<RoomMessagesSt
|
|
|
69
70
|
setCloseActiveMessage: (state: import('immer').WritableDraft<RoomMessagesState>, action: PayloadAction<{
|
|
70
71
|
chatJID: string;
|
|
71
72
|
}>) => void;
|
|
73
|
+
addRoomViaApi: (state: import('immer').WritableDraft<RoomMessagesState>, action: PayloadAction<{
|
|
74
|
+
room: IRoom;
|
|
75
|
+
xmpp: XmppClient;
|
|
76
|
+
}>) => void;
|
|
72
77
|
}, "roomMessages", "roomMessages", import('@reduxjs/toolkit').SliceSelectors<RoomMessagesState>>;
|
|
73
78
|
export declare const getLastMessageTimestamp: (state: RoomMessagesState, jid: string) => string | null;
|
|
74
79
|
export declare const addRoom: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
@@ -111,6 +116,9 @@ export declare const addRoom: import('@reduxjs/toolkit').ActionCreatorWithOption
|
|
|
111
116
|
}, "roomMessages/deleteRoom">, updateRoom: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
112
117
|
jid: string;
|
|
113
118
|
updates: Partial<IRoom>;
|
|
114
|
-
}, "roomMessages/updateRoom"
|
|
119
|
+
}, "roomMessages/updateRoom">, addRoomViaApi: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
120
|
+
room: IRoom;
|
|
121
|
+
xmpp: XmppClient;
|
|
122
|
+
}, "roomMessages/addRoomViaApi">;
|
|
115
123
|
declare const _default: import('redux').Reducer<RoomMessagesState>;
|
|
116
124
|
export default _default;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -72,6 +72,28 @@ export interface IRoom {
|
|
|
72
72
|
};
|
|
73
73
|
historyComplete?: boolean;
|
|
74
74
|
}
|
|
75
|
+
export interface ApiRoom {
|
|
76
|
+
name: string;
|
|
77
|
+
type: 'public' | 'group';
|
|
78
|
+
title?: string;
|
|
79
|
+
description?: string;
|
|
80
|
+
picture?: string;
|
|
81
|
+
members?: string[];
|
|
82
|
+
createdBy?: string;
|
|
83
|
+
appId?: any;
|
|
84
|
+
_id?: string;
|
|
85
|
+
isAppChat?: boolean;
|
|
86
|
+
createdAt?: string;
|
|
87
|
+
updatedAt?: string;
|
|
88
|
+
__v?: string;
|
|
89
|
+
}
|
|
90
|
+
export interface PostRoom {
|
|
91
|
+
title: string;
|
|
92
|
+
uuid?: string;
|
|
93
|
+
type: 'public' | 'group';
|
|
94
|
+
description?: string;
|
|
95
|
+
picture?: string;
|
|
96
|
+
}
|
|
75
97
|
export interface IRoomCompressed extends Pick<IRoom, 'jid'> {
|
|
76
98
|
}
|
|
77
99
|
export interface RoomMember {
|
|
@@ -107,7 +129,6 @@ export interface User {
|
|
|
107
129
|
firstName: string;
|
|
108
130
|
lastName: string;
|
|
109
131
|
email?: string;
|
|
110
|
-
username?: string;
|
|
111
132
|
profileImage?: string;
|
|
112
133
|
emails?: [
|
|
113
134
|
{
|
|
@@ -118,6 +139,7 @@ export interface User {
|
|
|
118
139
|
}
|
|
119
140
|
];
|
|
120
141
|
appId: string;
|
|
142
|
+
username: string;
|
|
121
143
|
xmppPassword: string;
|
|
122
144
|
langSource?: Iso639_1Codes;
|
|
123
145
|
homeScreen?: string;
|
|
@@ -211,6 +233,8 @@ export interface IConfig {
|
|
|
211
233
|
disableUserCount?: boolean;
|
|
212
234
|
clearStoreBeforeInit?: boolean;
|
|
213
235
|
disableSentLogic?: boolean;
|
|
236
|
+
initBeforeLoad?: boolean;
|
|
237
|
+
newArch?: boolean;
|
|
214
238
|
}
|
|
215
239
|
type PartialRoomWithMandatoryKeys = Partial<IRoom> & Pick<IRoom, 'jid' | 'title'>;
|
|
216
240
|
export interface xmppSettingsInterface {
|