refactor(api): remove unused network endpoints

This commit is contained in:
2026-07-07 16:29:21 +08:00
parent ab9b227969
commit b5bf81de59
47 changed files with 1 additions and 971 deletions
@@ -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<typeof AppleLoginRequestSchema>;
export type AppleLoginRequestData = z.output<typeof AppleLoginRequestSchema>;
-2
View File
@@ -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";
@@ -1,12 +0,0 @@
/**
* 发送验证码请求
*
*/
import { z } from "zod";
export const SendCodeRequestSchema = z.object({
email: z.string(),
});
export type SendCodeRequestInput = z.input<typeof SendCodeRequestSchema>;
export type SendCodeRequestData = z.output<typeof SendCodeRequestSchema>;
-15
View File
@@ -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<typeof ChatSyncDataSchema>;
export type ChatSyncDataData = z.output<typeof ChatSyncDataSchema>;
@@ -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<typeof ChatSyncRequestSchema>;
export type ChatSyncRequestData = z.output<typeof ChatSyncRequestSchema>;
@@ -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<typeof ImageUploadResponseSchema>;
export type ImageUploadResponseData = z.output<typeof ImageUploadResponseSchema>;
-5
View File
@@ -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";
-14
View File
@@ -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<typeof SttDataSchema>;
export type SttDataData = z.output<typeof SttDataSchema>;
-16
View File
@@ -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<typeof SyncMessageSchema>;
export type SyncMessageData = z.output<typeof SyncMessageSchema>;
-1
View File
@@ -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";
@@ -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
>;
-15
View File
@@ -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<typeof CreditsDataSchema>;
export type CreditsDataData = z.output<typeof CreditsDataSchema>;
@@ -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<typeof CreditsHistoryDataSchema>;
export type CreditsHistoryDataData = z.output<typeof CreditsHistoryDataSchema>;
-4
View File
@@ -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";
@@ -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<typeof UpdateProfileRequestSchema>;
export type UpdateProfileRequestData = z.output<typeof UpdateProfileRequestSchema>;
@@ -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<typeof UserStatsResponseSchema>;
export type UserStatsResponseData = z.output<typeof UserStatsResponseSchema>;