refactor: authentication module to nestjs

This commit is contained in:
Ahmed Bouhuolia
2025-03-29 22:29:12 +02:00
parent 173610d0fa
commit 85946d3161
27 changed files with 604 additions and 35 deletions

View File

@@ -1,5 +1,72 @@
import { ModelObject } from 'objection';
import { SystemUser } from '../System/models/SystemUser';
import { TenantModel } from '../System/models/TenantModel';
import { AuthSignupDto } from './dtos/AuthSignup.dto';
export interface IAuthSignedInEventPayload {}
export interface IAuthSigningInEventPayload {}
export interface IAuthSignInPOJO {}
export interface IAuthSigningInEventPayload {
email: string;
password: string;
user: ModelObject<SystemUser>;
}
export interface IAuthSignedInEventPayload {
email: string;
password: string;
user: ModelObject<SystemUser>;
}
export interface IAuthSigningUpEventPayload {
signupDTO: AuthSignupDto;
}
export interface IAuthSignedUpEventPayload {
signupDTO: AuthSignupDto;
tenant: TenantModel;
user: SystemUser;
}
export interface IAuthSignInPOJO {
user: ModelObject<SystemUser>;
token: string;
tenant: ModelObject<TenantModel>;
}
export interface IAuthResetedPasswordEventPayload {
user: SystemUser;
token: string;
password: string;
}
export interface IAuthSendingResetPassword {
user: SystemUser;
token: string;
}
export interface IAuthSendedResetPassword {
user: SystemUser;
token: string;
}
export interface IAuthGetMetaPOJO {
signupDisabled: boolean;
oneClickDemo: {
enable: boolean;
demoUrl: string;
};
}
export interface IAuthSignUpVerifingEventPayload {
email: string;
verifyToken: string;
userId: number;
}
export interface IAuthSignUpVerifiedEventPayload {
email: string;
verifyToken: string;
userId: number;
}