...
This commit is contained in:
@@ -1,50 +1,39 @@
|
||||
// Service layer DTOs for auth module
|
||||
// Service layer DTOs for auth module - User profile operations
|
||||
|
||||
// Sign up input/output
|
||||
export type ServiceInputSignUp = {
|
||||
email: string;
|
||||
username: string;
|
||||
password: string; // plain text, will be hashed by better-auth
|
||||
password: string;
|
||||
name: string;
|
||||
};
|
||||
|
||||
export type ServiceOutputSignUp = {
|
||||
export type ServiceOutputAuth = {
|
||||
success: boolean;
|
||||
userId?: string;
|
||||
email?: string;
|
||||
username?: string;
|
||||
};
|
||||
|
||||
// Sign in input/output
|
||||
export type ServiceInputSignIn = {
|
||||
identifier: string; // email or username
|
||||
identifier: string;
|
||||
password: string;
|
||||
};
|
||||
|
||||
export type ServiceOutputSignIn = {
|
||||
success: boolean;
|
||||
userId?: string;
|
||||
email?: string;
|
||||
username?: string;
|
||||
sessionToken?: string;
|
||||
// Get user profile input/output
|
||||
export type ServiceInputGetUserProfileByUsername = {
|
||||
username: string;
|
||||
};
|
||||
|
||||
// Sign out input/output
|
||||
export type ServiceInputSignOut = {
|
||||
sessionId?: string;
|
||||
export type ServiceInputGetUserProfileById = {
|
||||
id: string;
|
||||
};
|
||||
|
||||
export type ServiceOutputSignOut = {
|
||||
success: boolean;
|
||||
};
|
||||
|
||||
// User existence check
|
||||
export type ServiceInputCheckUserExists = {
|
||||
email?: string;
|
||||
username?: string;
|
||||
};
|
||||
|
||||
export type ServiceOutputCheckUserExists = {
|
||||
emailExists: boolean;
|
||||
usernameExists: boolean;
|
||||
};
|
||||
export type ServiceOutputUserProfile = {
|
||||
id: string;
|
||||
email: string;
|
||||
emailVerified: boolean;
|
||||
username: string | null;
|
||||
displayUsername: string | null;
|
||||
image: string | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
} | null;
|
||||
|
||||
Reference in New Issue
Block a user