62 lines
1.2 KiB
TypeScript
62 lines
1.2 KiB
TypeScript
/**
|
|
* Auth DTOs - Data Transfer Objects para autenticación
|
|
*
|
|
* @module Auth
|
|
*/
|
|
export interface LoginDto {
|
|
email: string;
|
|
password: string;
|
|
tenantId?: string;
|
|
}
|
|
export interface RegisterDto {
|
|
email: string;
|
|
password: string;
|
|
firstName: string;
|
|
lastName: string;
|
|
tenantId: string;
|
|
}
|
|
export interface RefreshTokenDto {
|
|
refreshToken: string;
|
|
}
|
|
export interface ChangePasswordDto {
|
|
currentPassword: string;
|
|
newPassword: string;
|
|
}
|
|
export interface ResetPasswordRequestDto {
|
|
email: string;
|
|
}
|
|
export interface ResetPasswordDto {
|
|
token: string;
|
|
newPassword: string;
|
|
}
|
|
export interface TokenPayload {
|
|
sub: string;
|
|
email: string;
|
|
tenantId: string;
|
|
roles: string[];
|
|
type: 'access' | 'refresh';
|
|
iat?: number;
|
|
exp?: number;
|
|
}
|
|
export interface AuthResponse {
|
|
accessToken: string;
|
|
refreshToken: string;
|
|
expiresIn: number;
|
|
user: {
|
|
id: string;
|
|
email: string;
|
|
firstName: string;
|
|
lastName: string;
|
|
roles: string[];
|
|
};
|
|
tenant: {
|
|
id: string;
|
|
name: string;
|
|
};
|
|
}
|
|
export interface TokenValidationResult {
|
|
valid: boolean;
|
|
payload?: TokenPayload;
|
|
error?: string;
|
|
}
|
|
//# sourceMappingURL=auth.dto.d.ts.map
|