diff --git a/src/core/net/interceptor/auth_refresh_interceptor.ts b/src/core/net/interceptor/auth_refresh_interceptor.ts index 9c40512e..aa9cb290 100644 --- a/src/core/net/interceptor/auth_refresh_interceptor.ts +++ b/src/core/net/interceptor/auth_refresh_interceptor.ts @@ -15,7 +15,6 @@ import { AppEnvUtil, deviceIdentifier, Result } from "@/utils"; * (这些路径返回 401 时不触发刷新) */ const NO_AUTH_REFRESH_PATHS: readonly string[] = [ - ApiPath.sendCode, ApiPath.emailLogin, ApiPath.register, ApiPath.guestLogin, diff --git a/src/core/net/interceptor/token_interceptor.ts b/src/core/net/interceptor/token_interceptor.ts index b414f44a..5aa75b59 100644 --- a/src/core/net/interceptor/token_interceptor.ts +++ b/src/core/net/interceptor/token_interceptor.ts @@ -16,7 +16,6 @@ const log = new Logger("TokenInterceptor"); * 不需要 token 的路径 */ const NO_TOKEN_PATHS: readonly string[] = [ - ApiPath.sendCode, ApiPath.emailLogin, ApiPath.register, ApiPath.guestLogin, diff --git a/src/data/dto/auth/apple_login_request.ts b/src/data/dto/auth/apple_login_request.ts deleted file mode 100644 index 7416506e..00000000 --- a/src/data/dto/auth/apple_login_request.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Apple 登录请求 DTO - */ -import { - AppleLoginRequestSchema, - type AppleLoginRequestInput, - type AppleLoginRequestData, -} from "@/data/schemas/auth/apple_login_request"; - -export class AppleLoginRequest { - declare readonly identityToken: string; - declare readonly platform: string; - declare readonly isTestAccount: boolean; - - private constructor(input: AppleLoginRequestInput) { - const data = AppleLoginRequestSchema.parse(input); - Object.assign(this, data); - Object.freeze(this); - } - - static from(input: AppleLoginRequestInput): AppleLoginRequest { - return new AppleLoginRequest(input); - } - - static fromJson(json: unknown): AppleLoginRequest { - return AppleLoginRequest.from(json as AppleLoginRequestInput); - } - - toJson(): AppleLoginRequestData { - return AppleLoginRequestSchema.parse(this); - } -} diff --git a/src/data/dto/auth/index.ts b/src/data/dto/auth/index.ts index 09a9e406..d0820a15 100644 --- a/src/data/dto/auth/index.ts +++ b/src/data/dto/auth/index.ts @@ -2,7 +2,6 @@ * @file Automatically generated by barrelsby. */ -export * from "./apple_login_request"; export * from "./auth_mode"; export * from "./auth_panel_mode"; export * from "./facebook_login_request"; @@ -18,4 +17,3 @@ export * from "./logout_response"; export * from "./refresh_token_request"; export * from "./refresh_token_response"; export * from "./register_request"; -export * from "./send_code_request"; diff --git a/src/data/dto/auth/send_code_request.ts b/src/data/dto/auth/send_code_request.ts deleted file mode 100644 index cbd0e54a..00000000 --- a/src/data/dto/auth/send_code_request.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * 发送验证码请求 DTO - */ -import { - SendCodeRequestSchema, - type SendCodeRequestInput, - type SendCodeRequestData, -} from "@/data/schemas/auth/send_code_request"; - -export class SendCodeRequest { - declare readonly email: string; - - private constructor(input: SendCodeRequestInput) { - const data = SendCodeRequestSchema.parse(input); - Object.assign(this, data); - Object.freeze(this); - } - - static from(input: SendCodeRequestInput): SendCodeRequest { - return new SendCodeRequest(input); - } - - static fromJson(json: unknown): SendCodeRequest { - return SendCodeRequest.from(json as SendCodeRequestInput); - } - - toJson(): SendCodeRequestData { - return SendCodeRequestSchema.parse(this); - } -} diff --git a/src/data/dto/chat/chat_sync_data.ts b/src/data/dto/chat/chat_sync_data.ts deleted file mode 100644 index 24b3effc..00000000 --- a/src/data/dto/chat/chat_sync_data.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * 消息同步响应 DTO - */ -import { - ChatSyncDataSchema, - type ChatSyncDataInput, - type ChatSyncDataData, -} from "@/data/schemas/chat/chat_sync_data"; - -export class ChatSyncData { - declare readonly syncedCount: number; - declare readonly totalHistory: number; - - private constructor(input: ChatSyncDataInput) { - const data = ChatSyncDataSchema.parse(input); - Object.assign(this, data); - Object.freeze(this); - } - - static from(input: ChatSyncDataInput): ChatSyncData { - return new ChatSyncData(input); - } - - static fromJson(json: unknown): ChatSyncData { - return ChatSyncData.from(json as ChatSyncDataInput); - } - - toJson(): ChatSyncDataData { - return ChatSyncDataSchema.parse(this); - } -} diff --git a/src/data/dto/chat/chat_sync_request.ts b/src/data/dto/chat/chat_sync_request.ts deleted file mode 100644 index 9427170f..00000000 --- a/src/data/dto/chat/chat_sync_request.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * 消息同步请求 DTO - */ -import { - ChatSyncRequestSchema, - type ChatSyncRequestInput, - type ChatSyncRequestData, -} from "@/data/schemas/chat/chat_sync_request"; -import { SyncMessage } from "./sync_message"; - -export class ChatSyncRequest { - declare readonly messages: SyncMessage[]; - - private constructor(input: ChatSyncRequestInput) { - const data = ChatSyncRequestSchema.parse(input); - Object.assign(this, { - ...data, - messages: data.messages.map((m) => SyncMessage.from(m)), - }); - Object.freeze(this); - } - - static from(input: ChatSyncRequestInput): ChatSyncRequest { - return new ChatSyncRequest(input); - } - - static fromJson(json: unknown): ChatSyncRequest { - return ChatSyncRequest.from(json as ChatSyncRequestInput); - } - - toJson(): ChatSyncRequestData { - return ChatSyncRequestSchema.parse(this); - } -} diff --git a/src/data/dto/chat/image_upload_response.ts b/src/data/dto/chat/image_upload_response.ts deleted file mode 100644 index edbebbef..00000000 --- a/src/data/dto/chat/image_upload_response.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 图片上传响应 DTO - */ -import { - ImageUploadResponseSchema, - type ImageUploadResponseInput, - type ImageUploadResponseData, -} from "@/data/schemas/chat/image_upload_response"; - -export class ImageUploadResponse { - declare readonly success: boolean; - declare readonly imageId: string; - declare readonly thumbUrl: string; - declare readonly mediumUrl: string; - declare readonly originalUrl: string; - declare readonly width: number; - declare readonly height: number; - declare readonly bytes: number; - - private constructor(input: ImageUploadResponseInput) { - const data = ImageUploadResponseSchema.parse(input); - Object.assign(this, data); - Object.freeze(this); - } - - static from(input: ImageUploadResponseInput): ImageUploadResponse { - return new ImageUploadResponse(input); - } - - static fromJson(json: unknown): ImageUploadResponse { - return ImageUploadResponse.from(json as ImageUploadResponseInput); - } - - toJson(): ImageUploadResponseData { - return ImageUploadResponseSchema.parse(this); - } -} diff --git a/src/data/dto/chat/index.ts b/src/data/dto/chat/index.ts index ba840084..8946ca16 100644 --- a/src/data/dto/chat/index.ts +++ b/src/data/dto/chat/index.ts @@ -7,12 +7,7 @@ export * from "./chat_list_item"; export * from "./chat_media"; export * from "./chat_message"; export * from "./chat_send_response"; -export * from "./chat_sync_data"; -export * from "./chat_sync_request"; -export * from "./image_upload_response"; export * from "./send_message_request"; -export * from "./stt_data"; -export * from "./sync_message"; export * from "./ui_message"; export * from "./unlock_history_response"; export * from "./unlock_private_request"; diff --git a/src/data/dto/chat/stt_data.ts b/src/data/dto/chat/stt_data.ts deleted file mode 100644 index a54d47e5..00000000 --- a/src/data/dto/chat/stt_data.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * STT(语音转文字)响应 DTO - */ -import { - SttDataSchema, - type SttDataInput, - type SttDataData, -} from "@/data/schemas/chat/stt_data"; - -export class SttData { - declare readonly text: string; - - private constructor(input: SttDataInput) { - const data = SttDataSchema.parse(input); - Object.assign(this, data); - Object.freeze(this); - } - - static from(input: SttDataInput): SttData { - return new SttData(input); - } - - static fromJson(json: unknown): SttData { - return SttData.from(json as SttDataInput); - } - - toJson(): SttDataData { - return SttDataSchema.parse(this); - } -} diff --git a/src/data/dto/chat/sync_message.ts b/src/data/dto/chat/sync_message.ts deleted file mode 100644 index e037a5a8..00000000 --- a/src/data/dto/chat/sync_message.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 待同步的单条消息 DTO - */ -import { - SyncMessageSchema, - type SyncMessageInput, - type SyncMessageData, -} from "@/data/schemas/chat/sync_message"; - -export class SyncMessage { - declare readonly role: string; - declare readonly content: string; - declare readonly timestamp: string; - - private constructor(input: SyncMessageInput) { - const data = SyncMessageSchema.parse(input); - Object.assign(this, data); - Object.freeze(this); - } - - static from(input: SyncMessageInput): SyncMessage { - return new SyncMessage(input); - } - - static fromJson(json: unknown): SyncMessage { - return SyncMessage.from(json as SyncMessageInput); - } - - toJson(): SyncMessageData { - return SyncMessageSchema.parse(this); - } -} diff --git a/src/data/dto/payment/index.ts b/src/data/dto/payment/index.ts index 670dfeab..d619320e 100644 --- a/src/data/dto/payment/index.ts +++ b/src/data/dto/payment/index.ts @@ -7,4 +7,3 @@ export * from "./create_payment_order_response"; export * from "./payment_order_status_response"; export * from "./payment_plan"; export * from "./payment_plans_response"; -export * from "./payment_vip_status_response"; diff --git a/src/data/dto/payment/payment_vip_status_response.ts b/src/data/dto/payment/payment_vip_status_response.ts deleted file mode 100644 index b90bd917..00000000 --- a/src/data/dto/payment/payment_vip_status_response.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * VIP 状态响应 DTO - */ -import { - PaymentVipStatusResponseSchema, - type PaymentVipStatusResponseData, - type PaymentVipStatusResponseInput, -} from "@/data/schemas/payment/payment_vip_status_response"; - -export class PaymentVipStatusResponse { - declare readonly isVip: boolean; - declare readonly vipExpiresAt: string | null; - - private constructor(input: PaymentVipStatusResponseInput) { - const data = PaymentVipStatusResponseSchema.parse(input); - Object.assign(this, data); - Object.freeze(this); - } - - static from(input: PaymentVipStatusResponseInput): PaymentVipStatusResponse { - return new PaymentVipStatusResponse(input); - } - - static fromJson(json: unknown): PaymentVipStatusResponse { - return PaymentVipStatusResponse.from( - json as PaymentVipStatusResponseInput, - ); - } - - toJson(): PaymentVipStatusResponseData { - return PaymentVipStatusResponseSchema.parse(this); - } -} diff --git a/src/data/dto/user/credits_data.ts b/src/data/dto/user/credits_data.ts deleted file mode 100644 index 095c3dfd..00000000 --- a/src/data/dto/user/credits_data.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * 积分数据 DTO - */ -import { - CreditsDataSchema, - type CreditsDataInput, - type CreditsDataData, -} from "@/data/schemas/user/credits_data"; - -export class CreditsData { - declare readonly userId: string; - declare readonly dolBalance: number; - - private constructor(input: CreditsDataInput) { - const data = CreditsDataSchema.parse(input); - Object.assign(this, data); - Object.freeze(this); - } - - static from(input: CreditsDataInput): CreditsData { - return new CreditsData(input); - } - - static fromJson(json: unknown): CreditsData { - return CreditsData.from(json as CreditsDataInput); - } - - toJson(): CreditsDataData { - return CreditsDataSchema.parse(this); - } -} diff --git a/src/data/dto/user/credits_history_data.ts b/src/data/dto/user/credits_history_data.ts deleted file mode 100644 index 6fcec0bb..00000000 --- a/src/data/dto/user/credits_history_data.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * 积分历史记录 DTO - */ -import { - CreditsHistoryDataSchema, - type CreditsHistoryDataInput, - type CreditsHistoryDataData, -} from "@/data/schemas/user/credits_history_data"; - -export class CreditsHistoryData { - declare readonly records: Record[]; - declare readonly total: number; - declare readonly limit: number; - declare readonly offset: number; - - private constructor(input: CreditsHistoryDataInput) { - const data = CreditsHistoryDataSchema.parse(input); - Object.assign(this, data); - Object.freeze(this); - } - - static from(input: CreditsHistoryDataInput): CreditsHistoryData { - return new CreditsHistoryData(input); - } - - static fromJson(json: unknown): CreditsHistoryData { - return CreditsHistoryData.from(json as CreditsHistoryDataInput); - } - - toJson(): CreditsHistoryDataData { - return CreditsHistoryDataSchema.parse(this); - } -} diff --git a/src/data/dto/user/index.ts b/src/data/dto/user/index.ts index c48ea1ab..7aecee25 100644 --- a/src/data/dto/user/index.ts +++ b/src/data/dto/user/index.ts @@ -3,12 +3,8 @@ */ export * from "./avatar_data"; -export * from "./credits_data"; -export * from "./credits_history_data"; export * from "./personality_traits"; export * from "./recent_memory"; -export * from "./update_profile_request"; export * from "./user"; export * from "./user_entitlements"; -export * from "./user_stats_response"; export * from "./user_view"; diff --git a/src/data/dto/user/update_profile_request.ts b/src/data/dto/user/update_profile_request.ts deleted file mode 100644 index deb3f0df..00000000 --- a/src/data/dto/user/update_profile_request.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * 更新个人资料请求 DTO - */ -import { - UpdateProfileRequestSchema, - type UpdateProfileRequestInput, - type UpdateProfileRequestData, -} from "@/data/schemas/user/update_profile_request"; - -export class UpdateProfileRequest { - declare readonly username: string; - declare readonly nickname: string; - declare readonly preferredLanguage: string; - declare readonly currentMood: string; - - private constructor(input: UpdateProfileRequestInput) { - const data = UpdateProfileRequestSchema.parse(input); - Object.assign(this, data); - Object.freeze(this); - } - - static from(input: UpdateProfileRequestInput): UpdateProfileRequest { - return new UpdateProfileRequest(input); - } - - static fromJson(json: unknown): UpdateProfileRequest { - return UpdateProfileRequest.from(json as UpdateProfileRequestInput); - } - - toJson(): UpdateProfileRequestData { - return UpdateProfileRequestSchema.parse(this); - } -} diff --git a/src/data/dto/user/user_stats_response.ts b/src/data/dto/user/user_stats_response.ts deleted file mode 100644 index fa25ebe4..00000000 --- a/src/data/dto/user/user_stats_response.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * 用户统计响应 DTO - */ -import { - UserStatsResponseSchema, - type UserStatsResponseInput, - type UserStatsResponseData, -} from "@/data/schemas/user/user_stats_response"; -import { PersonalityTraits } from "./personality_traits"; -import { RecentMemory } from "./recent_memory"; - -export class UserStatsResponse { - declare readonly userId: string; - declare readonly username: string; - declare readonly platform: string; - declare readonly intimacy: number; - declare readonly relationshipStage: string; - declare readonly dolBalance: number; - declare readonly totalMessages: number; - declare readonly lastMessageAt: string; - declare readonly accountCreatedAt: string; - declare readonly currentMood: string; - declare readonly personalityTraits: PersonalityTraits; - declare readonly recentMemories: RecentMemory[]; - declare readonly promptTokensTotal: number; - declare readonly completionTokensTotal: number; - declare readonly cacheHitTokensTotal: number; - declare readonly tokensTotal: number; - - private constructor(input: UserStatsResponseInput) { - const data = UserStatsResponseSchema.parse(input); - Object.assign(this, { - ...data, - personalityTraits: PersonalityTraits.from(data.personalityTraits), - recentMemories: data.recentMemories.map((m) => RecentMemory.from(m)), - }); - Object.freeze(this); - } - - static from(input: UserStatsResponseInput): UserStatsResponse { - return new UserStatsResponse(input); - } - - static fromJson(json: unknown): UserStatsResponse { - return UserStatsResponse.from(json as UserStatsResponseInput); - } - - toJson(): UserStatsResponseData { - return UserStatsResponseSchema.parse(this); - } -} diff --git a/src/data/repositories/auth_repository.ts b/src/data/repositories/auth_repository.ts index a1e34d85..a82b4bd8 100644 --- a/src/data/repositories/auth_repository.ts +++ b/src/data/repositories/auth_repository.ts @@ -3,7 +3,6 @@ import { ExceptionHandler } from "@/core/errors"; import { ApiError, AuthApi, authApi, ErrorCode } from "@/data/services/api"; import { - AppleLoginRequest, FacebookLoginRequest, FbIdLoginRequest, GoogleLoginRequest, @@ -16,7 +15,6 @@ import { RefreshTokenRequest, RefreshTokenResponse, RegisterRequest, - SendCodeRequest, } from "@/data/dto/auth"; import { User } from "@/data/dto/user"; import { @@ -94,13 +92,6 @@ export class AuthRepository implements IAuthRepository { }); } - /** 发送邮箱验证码。 */ - async sendCode(email: string): Promise> { - return Result.wrap(async () => { - await this.api.sendCode(SendCodeRequest.from({ email })); - }); - } - /** * 退出真实用户登录并恢复游客态。 * @@ -231,24 +222,6 @@ export class AuthRepository implements IAuthRepository { ); } - /** - * Apple 登录。 - * 注:Dart 端另有一个 `uploadFacebookAvatar` 方法,但当前 TS 端 `AuthApi` - * 尚未实现该端点,故仓库暂不暴露。等 `AuthApi` 补齐后再加。 - */ - async appleLogin(identityToken: string): Promise> { - return this._socialLogin(LoginStatus.Apple, () => - this.api.appleLogin( - AppleLoginRequest.from( - withTestAccountFlag({ - identityToken, - platform: getAuthPlatform(), - }), - ), - ), - ); - } - /** * 刷新 token:先读本地的 refresh token,空则直接返回错误; * 调用 API 成功后写回新的 login token + refresh token。 diff --git a/src/data/repositories/interfaces/iauth_repository.ts b/src/data/repositories/interfaces/iauth_repository.ts index e89838b2..886cfdcb 100644 --- a/src/data/repositories/interfaces/iauth_repository.ts +++ b/src/data/repositories/interfaces/iauth_repository.ts @@ -38,9 +38,6 @@ export interface IAuthRepository { guestId?: string; }): Promise>; - /** 发送邮箱验证码。 */ - sendCode(email: string): Promise>; - /** 退出真实用户登录并恢复游客态。 */ logout(): Promise>; @@ -65,9 +62,6 @@ export interface IAuthRepository { avatarUrl?: string; }): Promise>; - /** Apple 登录。 */ - appleLogin(identityToken: string): Promise>; - /** 刷新 token:先读本地的 refresh token,空则返回错误。 */ refreshToken(): Promise>; diff --git a/src/data/repositories/interfaces/ipayment_repository.ts b/src/data/repositories/interfaces/ipayment_repository.ts index 8262e5d5..9e6eb6a0 100644 --- a/src/data/repositories/interfaces/ipayment_repository.ts +++ b/src/data/repositories/interfaces/ipayment_repository.ts @@ -7,9 +7,7 @@ import type { CreatePaymentOrderResponse, PayChannel, PaymentOrderStatusResponse, - PaymentPlan, PaymentPlansResponse, - PaymentVipStatusResponse, } from "@/data/dto/payment"; import type { Result } from "@/utils/result"; @@ -23,12 +21,6 @@ export interface IPaymentRepository { /** 清除本地缓存套餐列表。 */ clearCachedPlans(): Promise>; - /** 获取会员套餐列表。 */ - getVipPlans(): Promise>; - - /** 获取积分套餐列表。 */ - getCreditPlans(): Promise>; - /** 创建支付订单。 */ createOrder( planId: string, @@ -38,7 +30,4 @@ export interface IPaymentRepository { /** 查询支付订单状态。 */ getOrderStatus(orderId: string): Promise>; - - /** 查询当前用户 VIP 状态。 */ - getVipStatus(): Promise>; } diff --git a/src/data/repositories/interfaces/iuser_repository.ts b/src/data/repositories/interfaces/iuser_repository.ts index d8ade758..292ba6e5 100644 --- a/src/data/repositories/interfaces/iuser_repository.ts +++ b/src/data/repositories/interfaces/iuser_repository.ts @@ -6,33 +6,14 @@ import type { Result } from "@/utils"; import type { - CreditsData, - CreditsHistoryData, - UpdateProfileRequest, User, UserEntitlements, - UserStatsResponse, } from "@/data/dto/user"; export interface IUserRepository { - /** 获取用户统计信息。 */ - getUserStats(): Promise>; - /** 获取当前登录用户信息。 */ getCurrentUser(): Promise>; - /** 更新个人资料。 */ - updateProfile(request: UpdateProfileRequest): Promise>; - - /** 查询积分余额。 */ - getCredits(): Promise>; - - /** 查询积分操作历史,分页参数默认 limit=50, offset=0。 */ - getCreditsHistory( - limit?: number, - offset?: number, - ): Promise>; - /** 获取当前用户权益快照。 */ getEntitlements(): Promise>; } diff --git a/src/data/repositories/payment_repository.ts b/src/data/repositories/payment_repository.ts index 70e376ca..89d7e531 100644 --- a/src/data/repositories/payment_repository.ts +++ b/src/data/repositories/payment_repository.ts @@ -10,9 +10,7 @@ import { CreatePaymentOrderResponse, PayChannel, PaymentOrderStatusResponse, - PaymentPlan, PaymentPlansResponse, - PaymentVipStatusResponse, } from "@/data/dto/payment"; import { PaymentApi, paymentApi } from "@/data/services/api"; import { PaymentPlansStorage } from "@/data/storage/payment"; @@ -49,22 +47,6 @@ export class PaymentRepository implements IPaymentRepository { }); } - /** 获取会员套餐列表。 */ - async getVipPlans(): Promise> { - return Result.wrap(async () => { - const response = await this.api.getPlans(); - return response.plans.filter(isVipPaymentPlan); - }); - } - - /** 获取积分套餐列表。 */ - async getCreditPlans(): Promise> { - return Result.wrap(async () => { - const response = await this.api.getPlans(); - return response.plans.filter(isCreditPaymentPlan); - }); - } - /** 创建支付订单。 */ async createOrder( planId: string, @@ -86,21 +68,9 @@ export class PaymentRepository implements IPaymentRepository { return Result.wrap(() => this.api.getOrderStatus(orderId)); } - /** 查询当前用户 VIP 状态。 */ - async getVipStatus(): Promise> { - return Result.wrap(() => this.api.getVipStatus()); - } } /** 全局懒单例。 */ export const getPaymentRepository = createLazySingleton( () => new PaymentRepository(paymentApi), ); - -export function isVipPaymentPlan(plan: PaymentPlan): boolean { - return plan.vipDays !== null; -} - -export function isCreditPaymentPlan(plan: PaymentPlan): boolean { - return plan.dolAmount !== null; -} diff --git a/src/data/repositories/user_repository.ts b/src/data/repositories/user_repository.ts index 6590f214..f6232210 100644 --- a/src/data/repositories/user_repository.ts +++ b/src/data/repositories/user_repository.ts @@ -1,12 +1,8 @@ "use client"; import { UserApi, userApi } from "@/data/services/api"; import { - CreditsData, - CreditsHistoryData, - UpdateProfileRequest, User, UserEntitlements, - UserStatsResponse, } from "@/data/dto/user"; import { Result } from "@/utils"; import type { IUserRepository } from "@/data/repositories/interfaces"; @@ -15,34 +11,11 @@ import { createLazySingleton } from "./lazy_singleton"; export class UserRepository implements IUserRepository { constructor(private readonly api: UserApi) {} - /** 获取用户统计信息。 */ - async getUserStats(): Promise> { - return Result.wrap(() => this.api.getUserStats()); - } - /** 获取当前登录用户信息。 */ async getCurrentUser(): Promise> { return Result.wrap(() => this.api.getCurrentUser()); } - /** 更新个人资料。 */ - async updateProfile(request: UpdateProfileRequest): Promise> { - return Result.wrap(() => this.api.updateProfile(request)); - } - - /** 查询积分余额。 */ - async getCredits(): Promise> { - return Result.wrap(() => this.api.getCredits()); - } - - /** 查询积分操作历史,分页参数默认 limit=50, offset=0。 */ - async getCreditsHistory( - limit = 50, - offset = 0, - ): Promise> { - return Result.wrap(() => this.api.getCreditsHistory(limit, offset)); - } - /** 获取当前用户权益快照。 */ async getEntitlements(): Promise> { return Result.wrap(() => this.api.getEntitlements()); diff --git a/src/data/schemas/auth/apple_login_request.ts b/src/data/schemas/auth/apple_login_request.ts deleted file mode 100644 index 21360bd3..00000000 --- a/src/data/schemas/auth/apple_login_request.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Apple 登录请求 - * - */ -import { z } from "zod"; - -import { booleanOrFalse } from "../nullable-defaults"; - -export const AppleLoginRequestSchema = z.object({ - identityToken: z.string(), - platform: z.string(), - isTestAccount: booleanOrFalse, -}); - -export type AppleLoginRequestInput = z.input; -export type AppleLoginRequestData = z.output; diff --git a/src/data/schemas/auth/index.ts b/src/data/schemas/auth/index.ts index 5fc5ae40..4ee1fe1f 100644 --- a/src/data/schemas/auth/index.ts +++ b/src/data/schemas/auth/index.ts @@ -2,7 +2,6 @@ * @file Automatically generated by barrelsby. */ -export * from "./apple_login_request"; export * from "./facebook_login_request"; export * from "./facebook_user_data"; export * from "./fb_id_login_request"; @@ -15,4 +14,3 @@ export * from "./logout_response"; export * from "./refresh_token_request"; export * from "./refresh_token_response"; export * from "./register_request"; -export * from "./send_code_request"; diff --git a/src/data/schemas/auth/send_code_request.ts b/src/data/schemas/auth/send_code_request.ts deleted file mode 100644 index 4c7d64ca..00000000 --- a/src/data/schemas/auth/send_code_request.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * 发送验证码请求 - * - */ -import { z } from "zod"; - -export const SendCodeRequestSchema = z.object({ - email: z.string(), -}); - -export type SendCodeRequestInput = z.input; -export type SendCodeRequestData = z.output; diff --git a/src/data/schemas/chat/chat_sync_data.ts b/src/data/schemas/chat/chat_sync_data.ts deleted file mode 100644 index ce985140..00000000 --- a/src/data/schemas/chat/chat_sync_data.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * 消息同步响应 - * - */ -import { z } from "zod"; - -import { numberOrZero } from "../nullable-defaults"; - -export const ChatSyncDataSchema = z.object({ - syncedCount: numberOrZero, - totalHistory: numberOrZero, -}); - -export type ChatSyncDataInput = z.input; -export type ChatSyncDataData = z.output; diff --git a/src/data/schemas/chat/chat_sync_request.ts b/src/data/schemas/chat/chat_sync_request.ts deleted file mode 100644 index 2c2ce48d..00000000 --- a/src/data/schemas/chat/chat_sync_request.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * 消息同步请求 - * - */ -import { z } from "zod"; -import { SyncMessageSchema } from "./sync_message"; - -export const ChatSyncRequestSchema = z.object({ - messages: z.array(SyncMessageSchema), -}); - -export type ChatSyncRequestInput = z.input; -export type ChatSyncRequestData = z.output; diff --git a/src/data/schemas/chat/image_upload_response.ts b/src/data/schemas/chat/image_upload_response.ts deleted file mode 100644 index dcaf3760..00000000 --- a/src/data/schemas/chat/image_upload_response.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * 图片上传响应 - * - */ -import { z } from "zod"; - -import { booleanOrTrue, numberOrZero, stringOrEmpty } from "../nullable-defaults"; - -export const ImageUploadResponseSchema = z.object({ - success: booleanOrTrue, - imageId: stringOrEmpty, - thumbUrl: stringOrEmpty, - mediumUrl: stringOrEmpty, - originalUrl: stringOrEmpty, - width: numberOrZero, - height: numberOrZero, - bytes: numberOrZero, -}); - -export type ImageUploadResponseInput = z.input; -export type ImageUploadResponseData = z.output; diff --git a/src/data/schemas/chat/index.ts b/src/data/schemas/chat/index.ts index a6021785..01a25152 100644 --- a/src/data/schemas/chat/index.ts +++ b/src/data/schemas/chat/index.ts @@ -6,12 +6,7 @@ export * from "./chat_history_response"; export * from "./chat_message"; export * from "./chat_payloads"; export * from "./chat_send_response"; -export * from "./chat_sync_data"; -export * from "./chat_sync_request"; -export * from "./image_upload_response"; export * from "./send_message_request"; -export * from "./stt_data"; -export * from "./sync_message"; export * from "./unlock_history_response"; export * from "./unlock_private_request"; export * from "./unlock_private_response"; diff --git a/src/data/schemas/chat/stt_data.ts b/src/data/schemas/chat/stt_data.ts deleted file mode 100644 index 365cc83c..00000000 --- a/src/data/schemas/chat/stt_data.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * STT(语音转文字)响应 - * - */ -import { z } from "zod"; - -import { stringOrEmpty } from "../nullable-defaults"; - -export const SttDataSchema = z.object({ - text: stringOrEmpty, -}); - -export type SttDataInput = z.input; -export type SttDataData = z.output; diff --git a/src/data/schemas/chat/sync_message.ts b/src/data/schemas/chat/sync_message.ts deleted file mode 100644 index 6343dfe5..00000000 --- a/src/data/schemas/chat/sync_message.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * 待同步的单条消息 - * - */ -import { z } from "zod"; - -import { stringOrEmpty } from "../nullable-defaults"; - -export const SyncMessageSchema = z.object({ - role: stringOrEmpty, - content: stringOrEmpty, - timestamp: stringOrEmpty, -}); - -export type SyncMessageInput = z.input; -export type SyncMessageData = z.output; diff --git a/src/data/schemas/payment/index.ts b/src/data/schemas/payment/index.ts index b113cc1a..705b23ed 100644 --- a/src/data/schemas/payment/index.ts +++ b/src/data/schemas/payment/index.ts @@ -7,4 +7,3 @@ export * from "./create_payment_order_response"; export * from "./payment_order_status_response"; export * from "./payment_plan"; export * from "./payment_plans_response"; -export * from "./payment_vip_status_response"; diff --git a/src/data/schemas/payment/payment_vip_status_response.ts b/src/data/schemas/payment/payment_vip_status_response.ts deleted file mode 100644 index 9232837d..00000000 --- a/src/data/schemas/payment/payment_vip_status_response.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * VIP 状态响应 - */ -import { z } from "zod"; - -import { booleanOrFalse, stringOrNull } from "../nullable-defaults"; - -export const PaymentVipStatusResponseSchema = z.object({ - isVip: booleanOrFalse, - vipExpiresAt: stringOrNull, -}); - -export type PaymentVipStatusResponseInput = z.input< - typeof PaymentVipStatusResponseSchema ->; -export type PaymentVipStatusResponseData = z.output< - typeof PaymentVipStatusResponseSchema ->; diff --git a/src/data/schemas/user/credits_data.ts b/src/data/schemas/user/credits_data.ts deleted file mode 100644 index dc672733..00000000 --- a/src/data/schemas/user/credits_data.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * 积分数据模型 - * - */ -import { z } from "zod"; - -import { numberOrZero, stringOrEmpty } from "../nullable-defaults"; - -export const CreditsDataSchema = z.object({ - userId: stringOrEmpty, - dolBalance: numberOrZero, -}); - -export type CreditsDataInput = z.input; -export type CreditsDataData = z.output; diff --git a/src/data/schemas/user/credits_history_data.ts b/src/data/schemas/user/credits_history_data.ts deleted file mode 100644 index 4ce3c98f..00000000 --- a/src/data/schemas/user/credits_history_data.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * 积分历史记录模型 - * - */ -import { z } from "zod"; - -import { arrayOrEmpty, numberOrZero } from "../nullable-defaults"; - -export const CreditsHistoryDataSchema = z.object({ - records: arrayOrEmpty(z.record(z.string(), z.unknown())), - total: numberOrZero, - limit: numberOrZero, - offset: numberOrZero, -}); - -export type CreditsHistoryDataInput = z.input; -export type CreditsHistoryDataData = z.output; diff --git a/src/data/schemas/user/index.ts b/src/data/schemas/user/index.ts index efeca61f..edbba5ab 100644 --- a/src/data/schemas/user/index.ts +++ b/src/data/schemas/user/index.ts @@ -3,13 +3,9 @@ */ export * from "./avatar_data"; -export * from "./credits_data"; -export * from "./credits_history_data"; export * from "./persisted_user"; export * from "./personality_traits"; export * from "./recent_memory"; -export * from "./update_profile_request"; export * from "./user"; export * from "./user_entitlement_snapshot"; export * from "./user_entitlements"; -export * from "./user_stats_response"; diff --git a/src/data/schemas/user/update_profile_request.ts b/src/data/schemas/user/update_profile_request.ts deleted file mode 100644 index 5d0566a4..00000000 --- a/src/data/schemas/user/update_profile_request.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * 更新个人资料请求 - * - */ -import { z } from "zod"; - -import { stringOrEmpty } from "../nullable-defaults"; - -export const UpdateProfileRequestSchema = z.object({ - username: stringOrEmpty, - nickname: stringOrEmpty, - preferredLanguage: stringOrEmpty, - currentMood: stringOrEmpty, -}); - -export type UpdateProfileRequestInput = z.input; -export type UpdateProfileRequestData = z.output; diff --git a/src/data/schemas/user/user_stats_response.ts b/src/data/schemas/user/user_stats_response.ts deleted file mode 100644 index e42bb2cc..00000000 --- a/src/data/schemas/user/user_stats_response.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * 用户统计响应 - * - */ -import { z } from "zod"; - -import { - arrayOrEmpty, - numberOrZero, - schemaOr, - stringOrEmpty, -} from "../nullable-defaults"; -import { PersonalityTraitsSchema, PERSONALITY_TRAITS_DEFAULTS } from "./personality_traits"; -import { RecentMemorySchema } from "./recent_memory"; - -export const UserStatsResponseSchema = z.object({ - userId: stringOrEmpty, - username: stringOrEmpty, - platform: stringOrEmpty, - intimacy: numberOrZero, - relationshipStage: stringOrEmpty, - dolBalance: numberOrZero, - totalMessages: numberOrZero, - lastMessageAt: stringOrEmpty, - accountCreatedAt: stringOrEmpty, - currentMood: stringOrEmpty, - personalityTraits: schemaOr(PersonalityTraitsSchema, PERSONALITY_TRAITS_DEFAULTS), - recentMemories: arrayOrEmpty(RecentMemorySchema), - promptTokensTotal: numberOrZero, - completionTokensTotal: numberOrZero, - cacheHitTokensTotal: numberOrZero, - tokensTotal: numberOrZero, -}); - -export type UserStatsResponseInput = z.input; -export type UserStatsResponseData = z.output; diff --git a/src/data/services/api/api_path.ts b/src/data/services/api/api_path.ts index 73357f06..6e2502d4 100644 --- a/src/data/services/api/api_path.ts +++ b/src/data/services/api/api_path.ts @@ -11,15 +11,11 @@ export class ApiPath { // ============ 功能模块分组 ============ private static readonly _auth = `${ApiPath._baseUrl}/auth`; - private static readonly _verify = `${ApiPath._baseUrl}/verify`; private static readonly _user = `${ApiPath._baseUrl}/user`; private static readonly _payment = `${ApiPath._baseUrl}/payment`; private static readonly _chat = `${ApiPath._baseUrl}/chat`; // ============ 认证相关 ============ - /** 发送验证码 */ - static readonly sendCode = `${ApiPath._verify}/send`; - /** 邮箱密码登录 */ static readonly emailLogin = `${ApiPath._auth}/login`; @@ -29,9 +25,6 @@ export class ApiPath { /** 设备自动登录 */ static readonly guestLogin = `${ApiPath._auth}/guest`; - /** Apple 登录 */ - static readonly appleLogin = `${ApiPath._auth}/login/apple`; - /** Google 登录 */ static readonly googleLogin = `${ApiPath._auth}/login/google`; @@ -51,24 +44,9 @@ export class ApiPath { static readonly getCurrentUser = `${ApiPath._auth}/me`; // ============ 用户相关 ============ - /** 获取用户统计信息 */ - static readonly userStats = `${ApiPath._user}/stats`; - /** 获取个人信息(与 /auth/me 等价) */ static readonly userProfile = `${ApiPath._user}/profile`; - /** 更新个人信息 */ - static readonly updateProfile = `${ApiPath._user}/profile`; - - /** 上传头像 */ - static readonly userAvatar = `${ApiPath._user}/avatar`; - - /** 查询积分余额 */ - static readonly userCredits = `${ApiPath._user}/credits`; - - /** 查询积分操作历史 */ - static readonly userCreditsHistory = `${ApiPath._user}/credits/history`; - /** 获取当前用户权益快照 */ static readonly userEntitlements = `${ApiPath._user}/entitlements`; @@ -82,20 +60,6 @@ export class ApiPath { /** 获取商品套餐列表 */ static readonly paymentPlans = `${ApiPath._payment}/plans`; - /** 查询当前用户 VIP 状态 */ - static readonly paymentVipStatus = `${ApiPath._payment}/vip-status`; - - /** @deprecated PAYWALL_API 使用 paymentPlans。 */ - static readonly paymentProducts = ApiPath.paymentPlans; - - /** 申请退款 */ - static readonly paymentRefund = `${ApiPath._payment}/refund`; - - /** 获取商品详情路径 */ - static getPaymentProductDetail(productId: string): string { - return `${ApiPath.paymentProducts}/${productId}`; - } - // ============ 聊天相关 ============ /** 发送消息 */ static readonly chatSend = `${ApiPath._chat}/send`; @@ -103,15 +67,6 @@ export class ApiPath { /** 获取聊天历史 */ static readonly chatHistory = `${ApiPath._chat}/history`; - /** 语音转文字(STT) */ - static readonly chatStt = `${ApiPath._chat}/stt`; - - /** 同步游客消息 */ - static readonly chatSync = `${ApiPath._chat}/sync`; - - /** 上传图片 */ - static readonly chatUploadImage = `${ApiPath._chat}/upload-image`; - /** 解锁私密消息 */ static readonly chatUnlockPrivate = `${ApiPath._chat}/unlock-private`; diff --git a/src/data/services/api/auth_api.ts b/src/data/services/api/auth_api.ts index c292552b..d7732231 100644 --- a/src/data/services/api/auth_api.ts +++ b/src/data/services/api/auth_api.ts @@ -10,7 +10,6 @@ import { httpClient } from "./http_client"; import { ApiPath } from "./api_path"; import { ApiEnvelope, unwrap } from "./response_helper"; import { - AppleLoginRequest, FacebookLoginRequest, FbIdLoginRequest, GoogleLoginRequest, @@ -21,7 +20,6 @@ import { RefreshTokenRequest, RefreshTokenResponse, RegisterRequest, - SendCodeRequest, } from "@/data/dto/auth"; import { User } from "@/data/dto/user"; import type { UserData } from "@/data/schemas/user/user"; @@ -30,16 +28,6 @@ import { Logger } from "@/utils"; const log = new Logger("DataServicesApiAuthApi"); export class AuthApi { - /** - * 发送验证码 - */ - async sendCode(body: SendCodeRequest): Promise { - await httpClient>(ApiPath.sendCode, { - method: "POST", - body: body.toJson(), - }); - } - /** * 邮箱密码登录 */ @@ -61,17 +49,6 @@ export class AuthApi { }); } - /** - * Apple 登录 - */ - async appleLogin(body: AppleLoginRequest): Promise { - const env = await httpClient>(ApiPath.appleLogin, { - method: "POST", - body: body.toJson(), - }); - return LoginResponse.fromJson(unwrap(env) as Record); - } - /** * Google 登录 */ @@ -112,7 +89,7 @@ export class AuthApi { * 不要再用 `unwrap` + `LogoutResponse.fromJson` 解析 —— Zod schema 是 z.object, * 对 null 会抛 ZodError "Invalid input: expected object, received null"。 * - * 对齐 `register` / `sendCode` 的写法:调通就完事,不解析响应体。 + * 对齐 `register` 的写法:调通就完事,不解析响应体。 */ async logout(): Promise { await httpClient>(ApiPath.logout, { diff --git a/src/data/services/api/chat_api.ts b/src/data/services/api/chat_api.ts index e9532131..3e3ee670 100644 --- a/src/data/services/api/chat_api.ts +++ b/src/data/services/api/chat_api.ts @@ -10,12 +10,7 @@ import { ApiEnvelope, unwrap } from "./response_helper"; import { ChatHistoryResponse, ChatSendResponse, - ChatSyncData, - ChatSyncRequest, - ImageUploadResponse, SendMessageRequest, - SttData, - SyncMessage, UnlockHistoryResponse, UnlockPrivateRequest, UnlockPrivateResponse, @@ -45,46 +40,6 @@ export class ChatApi { ); } - /** - * 语音转文字(multipart 上传) - */ - async speechToText(audio: Blob | File): Promise { - const formData = new FormData(); - formData.append("audio", audio); - const env = await httpClient>(ApiPath.chatStt, { - method: "POST", - body: formData, - }); - return SttData.fromJson(unwrap(env) as Record); - } - - /** - * 同步游客消息 - */ - async syncMessages(messages: SyncMessage[]): Promise { - const body = ChatSyncRequest.from({ messages }); - const env = await httpClient>(ApiPath.chatSync, { - method: "POST", - body: body.toJson(), - }); - return ChatSyncData.fromJson(unwrap(env) as Record); - } - - /** - * 上传图片 - */ - async uploadImage(image: Blob | File): Promise { - const formData = new FormData(); - formData.append("image", image); - const env = await httpClient>( - ApiPath.chatUploadImage, - { method: "POST", body: formData } - ); - return ImageUploadResponse.fromJson( - unwrap(env) as Record - ); - } - /** * 解锁单条历史付费 / 私密消息 */ diff --git a/src/data/services/api/payment_api.ts b/src/data/services/api/payment_api.ts index 41153cc7..cf713425 100644 --- a/src/data/services/api/payment_api.ts +++ b/src/data/services/api/payment_api.ts @@ -8,7 +8,6 @@ import { CreatePaymentOrderResponse, PaymentOrderStatusResponse, PaymentPlansResponse, - PaymentVipStatusResponse, } from "@/data/dto/payment"; import { ApiPath } from "./api_path"; @@ -61,17 +60,6 @@ export class PaymentApi { ); } - /** - * 查询当前用户 VIP 状态 - */ - async getVipStatus(): Promise { - const env = await httpClient>( - ApiPath.paymentVipStatus, - ); - return PaymentVipStatusResponse.fromJson( - unwrap(env) as Record, - ); - } } /** diff --git a/src/data/services/api/user_api.ts b/src/data/services/api/user_api.ts index 2118da2b..8b68d008 100644 --- a/src/data/services/api/user_api.ts +++ b/src/data/services/api/user_api.ts @@ -8,26 +8,12 @@ import { httpClient } from "./http_client"; import { ApiPath } from "./api_path"; import { ApiEnvelope, unwrap } from "./response_helper"; import { - CreditsData, - CreditsHistoryData, - UpdateProfileRequest, User, UserEntitlements, - UserStatsResponse, } from "@/data/dto/user"; import type { UserData } from "@/data/schemas/user/user"; export class UserApi { - /** - * 获取用户统计信息 - */ - async getUserStats(): Promise { - const env = await httpClient>(ApiPath.userStats); - return UserStatsResponse.fromJson( - unwrap(env) as Record - ); - } - /** * 获取个人信息 */ @@ -36,41 +22,6 @@ export class UserApi { return User.fromJson(unwrap(env) as UserData); } - /** - * 更新个人资料 - */ - async updateProfile(body: UpdateProfileRequest): Promise { - const env = await httpClient>(ApiPath.updateProfile, { - method: "PUT", - body: body.toJson(), - }); - return User.fromJson(unwrap(env) as UserData); - } - - /** - * 查询积分余额 - */ - async getCredits(): Promise { - const env = await httpClient>(ApiPath.userCredits); - return CreditsData.fromJson(unwrap(env) as Record); - } - - /** - * 查询积分操作历史 - */ - async getCreditsHistory( - limit = 50, - offset = 0 - ): Promise { - const env = await httpClient>( - ApiPath.userCreditsHistory, - { query: { limit, offset } } - ); - return CreditsHistoryData.fromJson( - unwrap(env) as Record - ); - } - /** * 获取当前用户权益快照 */ diff --git a/src/data/services/index.ts b/src/data/services/index.ts index f085a552..daee86df 100644 --- a/src/data/services/index.ts +++ b/src/data/services/index.ts @@ -16,7 +16,6 @@ export * from "../../core/net/interceptor/auth_refresh_interceptor"; export * from "../../core/net/interceptor/logging_interceptor"; export * from "../../core/net/interceptor/token_interceptor"; // 注:原 ./auth/* 平台适配层已删除(社交登录改由 NextAuth 处理) -export * from "../dto/auth/apple_login_request"; export * from "../dto/auth/facebook_login_request"; export * from "../dto/auth/facebook_user_data"; export * from "../dto/auth/fb_id_login_request"; @@ -29,27 +28,16 @@ export * from "../dto/auth/logout_response"; export * from "../dto/auth/refresh_token_request"; export * from "../dto/auth/refresh_token_response"; export * from "../dto/auth/register_request"; -export * from "../dto/auth/send_code_request"; export * from "../dto/chat/chat_history_response"; export * from "../dto/chat/chat_message"; export * from "../dto/chat/chat_send_response"; -export * from "../dto/chat/chat_sync_data"; -export * from "../dto/chat/chat_sync_request"; -export * from "../dto/chat/image_upload_response"; export * from "../dto/chat/send_message_request"; -export * from "../dto/chat/stt_data"; -export * from "../dto/chat/sync_message"; export * from "../dto/metrics/app_event"; export * from "../dto/metrics/pwa_event"; export * from "../dto/user/avatar_data"; -export * from "../dto/user/credits_data"; -export * from "../dto/user/credits_history_data"; export * from "../dto/user/personality_traits"; export * from "../dto/user/recent_memory"; -export * from "../dto/user/update_profile_request"; export * from "../dto/user/user"; -export * from "../dto/user/user_stats_response"; -export * from "../schemas/auth/apple_login_request"; export * from "../schemas/auth/facebook_login_request"; export * from "../schemas/auth/facebook_user_data"; export * from "../schemas/auth/fb_id_login_request"; @@ -62,23 +50,13 @@ export * from "../schemas/auth/logout_response"; export * from "../schemas/auth/refresh_token_request"; export * from "../schemas/auth/refresh_token_response"; export * from "../schemas/auth/register_request"; -export * from "../schemas/auth/send_code_request"; export * from "../schemas/chat/chat_history_response"; export * from "../schemas/chat/chat_message"; export * from "../schemas/chat/chat_send_response"; -export * from "../schemas/chat/chat_sync_data"; -export * from "../schemas/chat/chat_sync_request"; -export * from "../schemas/chat/image_upload_response"; export * from "../schemas/chat/send_message_request"; -export * from "../schemas/chat/stt_data"; -export * from "../schemas/chat/sync_message"; export * from "../schemas/metrics/app_event"; export * from "../schemas/metrics/pwa_event"; export * from "../schemas/user/avatar_data"; -export * from "../schemas/user/credits_data"; -export * from "../schemas/user/credits_history_data"; export * from "../schemas/user/personality_traits"; export * from "../schemas/user/recent_memory"; -export * from "../schemas/user/update_profile_request"; export * from "../schemas/user/user"; -export * from "../schemas/user/user_stats_response"; diff --git a/src/lib/payment/payment_status.ts b/src/lib/payment/payment_status.ts deleted file mode 100644 index 09501349..00000000 --- a/src/lib/payment/payment_status.ts +++ /dev/null @@ -1,11 +0,0 @@ -"use client"; - -import type { PaymentVipStatusResponse } from "@/data/dto/payment"; -import { getPaymentRepository } from "@/data/repositories/payment_repository"; -import type { Result } from "@/utils"; - -export function getCurrentVipPaymentStatus(): Promise< - Result -> { - return getPaymentRepository().getVipStatus(); -}