mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
feat(server): remove phone number from authentication process
This commit is contained in:
@@ -1,29 +1,77 @@
|
||||
import { ISystemUser } from './User';
|
||||
import { ITenant } from './Tenancy';
|
||||
import { SystemUser } from '@/system/models';
|
||||
|
||||
export interface IRegisterDTO {
|
||||
firstName: string,
|
||||
lastName: string,
|
||||
email: string,
|
||||
password: string,
|
||||
organizationName: string,
|
||||
};
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
email: string;
|
||||
password: string;
|
||||
organizationName: string;
|
||||
}
|
||||
|
||||
export interface ILoginDTO {
|
||||
crediential: string,
|
||||
password: string,
|
||||
};
|
||||
crediential: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface IPasswordReset {
|
||||
id: number,
|
||||
email: string,
|
||||
token: string,
|
||||
createdAt: Date,
|
||||
};
|
||||
id: number;
|
||||
email: string;
|
||||
token: string;
|
||||
createdAt: Date;
|
||||
}
|
||||
|
||||
export interface IAuthenticationService {
|
||||
signIn(emailOrPhone: string, password: string): Promise<{ user: ISystemUser, token: string, tenant: ITenant }>;
|
||||
signIn(
|
||||
email: string,
|
||||
password: string
|
||||
): Promise<{ user: ISystemUser; token: string; tenant: ITenant }>;
|
||||
register(registerDTO: IRegisterDTO): Promise<ISystemUser>;
|
||||
sendResetPassword(email: string): Promise<IPasswordReset>;
|
||||
resetPassword(token: string, password: string): Promise<void>;
|
||||
}
|
||||
|
||||
export interface IAuthSigningInEventPayload {
|
||||
email: string;
|
||||
password: string;
|
||||
user: ISystemUser;
|
||||
}
|
||||
|
||||
export interface IAuthSignedInEventPayload {
|
||||
email: string;
|
||||
password: string;
|
||||
user: ISystemUser;
|
||||
}
|
||||
|
||||
export interface IAuthSigningUpEventPayload {
|
||||
signupDTO: IRegisterDTO;
|
||||
}
|
||||
|
||||
export interface IAuthSignedUpEventPayload {
|
||||
signupDTO: IRegisterDTO;
|
||||
tenant: ITenant;
|
||||
user: ISystemUser;
|
||||
}
|
||||
|
||||
export interface IAuthSignInPOJO {
|
||||
user: ISystemUser;
|
||||
token: string;
|
||||
tenant: ITenant;
|
||||
}
|
||||
|
||||
export interface IAuthResetedPasswordEventPayload {
|
||||
user: SystemUser;
|
||||
token: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
|
||||
export interface IAuthSendingResetPassword {
|
||||
user: ISystemUser,
|
||||
token: string;
|
||||
}
|
||||
export interface IAuthSendedResetPassword {
|
||||
user: ISystemUser,
|
||||
token: string;
|
||||
}
|
||||
Reference in New Issue
Block a user