- auth: actionDeleteAccount 改用 service+repo,forgot-password 完整三层实现 - card: serviceCheckCardOwnership 替代直接调用 repository - deck: 移除 service 层的 use server 指令 - dictionary: 数据转换逻辑从 repository 移到 service - ocr: 认证移到 action 层,跨模块调用改用 service - translator: genIPA/genLanguage 改用 service 层
49 lines
963 B
TypeScript
49 lines
963 B
TypeScript
// Service layer DTOs for auth module - User profile operations
|
|
|
|
// Sign up input/output
|
|
export type ServiceInputSignUp = {
|
|
email: string;
|
|
username: string;
|
|
password: string;
|
|
name: string;
|
|
};
|
|
|
|
export type ServiceOutputAuth = {
|
|
success: boolean;
|
|
};
|
|
|
|
// Sign in input/output
|
|
export type ServiceInputSignIn = {
|
|
identifier: string;
|
|
password: string;
|
|
};
|
|
|
|
// Get user profile input/output
|
|
export type ServiceInputGetUserProfileByUsername = {
|
|
username: string;
|
|
};
|
|
|
|
export type ServiceInputGetUserProfileById = {
|
|
id: string;
|
|
};
|
|
|
|
export type ServiceOutputUserProfile = {
|
|
id: string;
|
|
email: string;
|
|
emailVerified: boolean;
|
|
username: string | null;
|
|
displayUsername: string | null;
|
|
image: string | null;
|
|
bio: string | null;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
} | null;
|
|
|
|
export type ServiceInputDeleteAccount = {
|
|
userId: string;
|
|
};
|
|
|
|
export type ServiceOutputDeleteAccount = {
|
|
success: boolean;
|
|
};
|