@ethora/chat-component
Version:
1. npm create vite@latest 2. select name of project, select type (react/js) 3. cd project-name 4. npm i 5. npm i @ethora/chat-component 6. go to file src/App.tsx and replace it with this code
77 lines (76 loc) • 1.77 kB
TypeScript
import { Iso639_1Codes } from './language.model';
import { IMessage } from './message.model';
export interface IUser extends Partial<User> {
id: string;
name?: string;
userJID?: string | null;
token?: string;
refreshToken?: string;
}
export interface User {
walletAddress: string;
description?: string;
token: string;
refreshToken: string;
defaultWallet: {
walletAddress: string;
};
_id: string;
firstName: string;
lastName: string;
email?: string;
profileImage?: string;
emails?: [
{
loginType: string;
email: string;
verified: boolean;
_id: string;
}
];
appId: string;
username: string;
xmppPassword: string;
langSource?: Iso639_1Codes;
homeScreen?: string;
registrationChannelType?: string;
updatedAt?: string;
authMethod?: string;
resetPasswordExpires?: string;
resetPasswordToken?: string;
xmppUsername?: string;
roles?: string[];
tags?: string[];
__v?: number;
isProfileOpen?: boolean;
isAssetsOpen?: boolean;
isAgreeWithTerms?: boolean;
isSuperAdmin?: boolean;
}
export interface ConfigUser {
email: string;
password: string;
}
export interface StorageUser {
appId: string;
company: any[];
firstName: string;
homeScreen: string;
lastName: string;
referrerId: string;
refreshToken: string;
token: string;
walletAddress: string;
xmppPassword: string;
_id: string;
isAgreeWithTerms?: boolean;
isAllowedNewAppCreate?: boolean;
isAssetsOpen?: boolean;
isProfileOpen?: boolean;
}
export interface UserType extends IMessage {
id: any;
user: any;
timestamp: any;
text: any;
}