@ethora/chat-component 0.1.2 → 0.1.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.
@@ -10,6 +10,8 @@ export declare function refresh(): Promise<{
10
10
  export declare function uploadFile(formData: FormData, token: string): Promise<import('axios').AxiosResponse<any, any>>;
11
11
  export declare function loginEmail(email: string, password: string): Promise<import('axios').AxiosResponse<{
12
12
  user: User;
13
+ refreshToken: string;
14
+ token: string;
13
15
  }, any>>;
14
16
  export declare const signInWithGoogle: () => Promise<{
15
17
  user: FirebaseUser;
@@ -0,0 +1,52 @@
1
+ export interface MainFields {
2
+ id: string;
3
+ body: string;
4
+ roomJID: string;
5
+ date: Date;
6
+ key: string;
7
+ coinsInMessage: number;
8
+ numberOfReplies: number;
9
+ }
10
+ export interface DataFields {
11
+ photoURL: string;
12
+ roomJid: string;
13
+ senderFirstName: string;
14
+ senderLastName: string;
15
+ senderWalletAddress: string;
16
+ senderJID?: string;
17
+ xmlns?: string;
18
+ isEdited?: boolean;
19
+ mucName?: string;
20
+ push?: boolean;
21
+ quickReplies?: string[];
22
+ isReply?: boolean;
23
+ showInChannel?: boolean;
24
+ mainMessage?: string;
25
+ isSystemMessage?: boolean;
26
+ tokenAmount?: number;
27
+ receiverMessageId?: boolean;
28
+ }
29
+ export interface FileAttachmentParams {
30
+ createdAt: Date;
31
+ fileName: string;
32
+ imageLocation: string;
33
+ imagePreview: string;
34
+ mimeType: string;
35
+ originalName: string;
36
+ size: number;
37
+ duration: number;
38
+ waveForm: string;
39
+ attachmentId: string;
40
+ }
41
+ export interface NFTAttachmentParams {
42
+ wrappable: boolean;
43
+ nftId: string;
44
+ nftActionType: string;
45
+ contractAddress: string;
46
+ }
47
+ export interface MessageType extends MainFields, DataFields {
48
+ }
49
+ export interface FileAttachment extends MainFields, FileAttachmentParams {
50
+ }
51
+ export interface NFTAttachment extends MainFields, NFTAttachmentParams {
52
+ }
@@ -0,0 +1,123 @@
1
+ export interface IUser {
2
+ id: string;
3
+ name: string | null;
4
+ avatar?: string | null;
5
+ xmmpPass?: string | null;
6
+ userJID?: string | null;
7
+ token: string;
8
+ refreshToken: string;
9
+ }
10
+ export interface IMessage {
11
+ id: string;
12
+ user: IUser;
13
+ date: Date | string;
14
+ body: string;
15
+ roomJID: string;
16
+ key?: string;
17
+ coinsInMessage?: string | number;
18
+ numberOfReplies?: number[] | number;
19
+ isSystemMessage?: string;
20
+ isMediafile?: string;
21
+ locationPreview?: string;
22
+ mimetype?: string;
23
+ location?: string;
24
+ pending?: boolean;
25
+ timestamp?: number;
26
+ }
27
+ export interface IRoom {
28
+ id: string;
29
+ name: string;
30
+ jid: string;
31
+ title: string;
32
+ usersCnt: number;
33
+ messages: IMessage[];
34
+ isLoading: boolean;
35
+ lastMessage?: string;
36
+ icon?: string;
37
+ composing?: boolean;
38
+ composingList?: string[];
39
+ lastViewedTimestamp?: number;
40
+ unreadMessages?: number;
41
+ }
42
+ export interface UserType extends IMessage {
43
+ id: any;
44
+ user: any;
45
+ timestamp: any;
46
+ text: any;
47
+ }
48
+ export interface User {
49
+ walletAddress: string;
50
+ description?: string;
51
+ token: string;
52
+ refreshToken: string;
53
+ defaultWallet: {
54
+ walletAddress: string;
55
+ };
56
+ _id: string;
57
+ firstName: string;
58
+ lastName: string;
59
+ email: string;
60
+ username: string;
61
+ profileImage: string;
62
+ emails?: [
63
+ {
64
+ loginType: string;
65
+ email: string;
66
+ verified: boolean;
67
+ _id: string;
68
+ }
69
+ ];
70
+ appId: string;
71
+ xmppPassword: string;
72
+ homeScreen?: string;
73
+ registrationChannelType?: string;
74
+ updatedAt?: string;
75
+ authMethod?: string;
76
+ resetPasswordExpires?: string;
77
+ resetPasswordToken?: string;
78
+ xmppUsername?: string;
79
+ roles?: string[];
80
+ tags?: string[];
81
+ __v?: number;
82
+ isProfileOpen?: boolean;
83
+ isAssetsOpen?: boolean;
84
+ isAgreeWithTerms?: boolean;
85
+ }
86
+ export interface XmppState {
87
+ client: any;
88
+ loading: boolean;
89
+ }
90
+ export interface IConfig {
91
+ disableHeader?: boolean;
92
+ disableMedia?: boolean;
93
+ colors?: {
94
+ primary: string;
95
+ secondary: string;
96
+ };
97
+ googleLogin?: boolean;
98
+ firebaseConfig?: {
99
+ apiKey: string;
100
+ authDomain: string;
101
+ projectId: string;
102
+ storageBucket: string;
103
+ messagingSenderId: string;
104
+ appId: string;
105
+ };
106
+ }
107
+ export interface StorageUser {
108
+ appId: string;
109
+ company: any[];
110
+ firstName: string;
111
+ homeScreen: string;
112
+ lastName: string;
113
+ referrerId: string;
114
+ refreshToken: string;
115
+ token: string;
116
+ walletAddress: string;
117
+ xmppPassword: string;
118
+ _id: string;
119
+ isAgreeWithTerms?: boolean;
120
+ isAllowedNewAppCreate?: boolean;
121
+ isAssetsOpen?: boolean;
122
+ isProfileOpen?: boolean;
123
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethora/chat-component",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",