- auth: actionDeleteAccount 改用 service+repo,forgot-password 完整三层实现 - card: serviceCheckCardOwnership 替代直接调用 repository - deck: 移除 service 层的 use server 指令 - dictionary: 数据转换逻辑从 repository 移到 service - ocr: 认证移到 action 层,跨模块调用改用 service - translator: genIPA/genLanguage 改用 service 层
27 lines
641 B
TypeScript
27 lines
641 B
TypeScript
import { TSharedTranslationResult } from "@/shared/translator-type";
|
|
|
|
export type ServiceInputTranslateText = {
|
|
sourceText: string;
|
|
targetLanguage: string;
|
|
forceRetranslate: boolean;
|
|
needIpa: boolean;
|
|
userId?: string;
|
|
sourceLanguage?: string;
|
|
};
|
|
|
|
export type ServiceOutputTranslateText = TSharedTranslationResult;
|
|
|
|
// DTO types for deprecated genIPA function
|
|
export type ServiceInputGenIPA = {
|
|
text: string;
|
|
};
|
|
|
|
export type ServiceOutputGenIPA = string;
|
|
|
|
// DTO types for deprecated genLanguage function
|
|
export type ServiceInputGenLanguage = {
|
|
text: string;
|
|
};
|
|
|
|
export type ServiceOutputGenLanguage = string;
|