refactor(dto): group request and response models
Docker Image / Build and Push Docker Image (push) Successful in 2m50s
Docker Image / Build and Push Docker Image (push) Successful in 2m50s
This commit is contained in:
@@ -4,16 +4,7 @@
|
||||
|
||||
export * from "./auth_mode";
|
||||
export * from "./auth_panel_mode";
|
||||
export * from "./facebook_login_request";
|
||||
export * from "./facebook_user_data";
|
||||
export * from "./fb_id_login_request";
|
||||
export * from "./google_login_request";
|
||||
export * from "./guest_login_request";
|
||||
export * from "./guest_login_response";
|
||||
export * from "./login_request";
|
||||
export * from "./login_response";
|
||||
export * from "./login_status";
|
||||
export * from "./logout_response";
|
||||
export * from "./refresh_token_request";
|
||||
export * from "./refresh_token_response";
|
||||
export * from "./register_request";
|
||||
export * from "./request";
|
||||
export * from "./response";
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
export * from "./facebook_login_request";
|
||||
export * from "./fb_id_login_request";
|
||||
export * from "./google_login_request";
|
||||
export * from "./guest_login_request";
|
||||
export * from "./login_request";
|
||||
export * from "./refresh_token_request";
|
||||
export * from "./register_request";
|
||||
-3
@@ -10,10 +10,7 @@ import { User } from "@/data/dto/user/user";
|
||||
|
||||
export class GuestLoginResponse {
|
||||
declare readonly token: string;
|
||||
declare readonly deviceId: string;
|
||||
declare readonly userId: string;
|
||||
declare readonly isDeviceUser: boolean;
|
||||
declare readonly expiresIn: number;
|
||||
declare readonly user: User;
|
||||
|
||||
private constructor(input: GuestLoginResponseInput) {
|
||||
@@ -0,0 +1,4 @@
|
||||
export * from "./guest_login_response";
|
||||
export * from "./login_response";
|
||||
export * from "./logout_response";
|
||||
export * from "./refresh_token_response";
|
||||
-1
@@ -10,7 +10,6 @@ import {
|
||||
export class RefreshTokenResponse {
|
||||
declare readonly token: string;
|
||||
declare readonly refreshToken: string;
|
||||
declare readonly userId: string;
|
||||
|
||||
private constructor(input: RefreshTokenResponseInput) {
|
||||
const data = RefreshTokenResponseSchema.parse(input);
|
||||
@@ -2,13 +2,9 @@
|
||||
* @file Automatically generated by barrelsby.
|
||||
*/
|
||||
|
||||
export * from "./chat_history_response";
|
||||
export * from "./chat_list_item";
|
||||
export * from "./chat_media";
|
||||
export * from "./chat_message";
|
||||
export * from "./chat_send_response";
|
||||
export * from "./send_message_request";
|
||||
export * from "./request";
|
||||
export * from "./response";
|
||||
export * from "./ui_message";
|
||||
export * from "./unlock_history_response";
|
||||
export * from "./unlock_private_request";
|
||||
export * from "./unlock_private_response";
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./send_message_request";
|
||||
export * from "./unlock_private_request";
|
||||
+1
-8
@@ -6,17 +6,10 @@ import {
|
||||
type ChatHistoryResponseInput,
|
||||
type ChatHistoryResponseData,
|
||||
} from "@/data/schemas/chat/chat_history_response";
|
||||
import { ChatMessage } from "./chat_message";
|
||||
import { ChatMessage } from "../chat_message";
|
||||
|
||||
export class ChatHistoryResponse {
|
||||
declare readonly messages: ChatMessage[];
|
||||
declare readonly total: number;
|
||||
declare readonly limit: number;
|
||||
declare readonly offset: number;
|
||||
declare readonly isVip: boolean;
|
||||
declare readonly privateFreeLimit: number;
|
||||
declare readonly privateUsedToday: number;
|
||||
declare readonly privateCanViewFree: boolean;
|
||||
|
||||
private constructor(input: ChatHistoryResponseInput) {
|
||||
const data = ChatHistoryResponseSchema.parse(input);
|
||||
-1
@@ -13,7 +13,6 @@ export class ChatSendResponse {
|
||||
declare readonly reply: string;
|
||||
declare readonly audioUrl: string;
|
||||
declare readonly messageId: string;
|
||||
declare readonly isGuest: boolean;
|
||||
declare readonly timestamp: number;
|
||||
declare readonly image: ChatImageData;
|
||||
declare readonly lockDetail: ChatLockDetailData;
|
||||
@@ -0,0 +1,4 @@
|
||||
export * from "./chat_history_response";
|
||||
export * from "./chat_send_response";
|
||||
export * from "./unlock_history_response";
|
||||
export * from "./unlock_private_response";
|
||||
-10
@@ -11,17 +11,7 @@ import {
|
||||
export class UnlockHistoryResponse {
|
||||
declare readonly unlocked: boolean;
|
||||
declare readonly reason: UnlockHistoryReason;
|
||||
declare readonly totalLocked: number;
|
||||
declare readonly unlockedCount: number;
|
||||
declare readonly privateCount: number;
|
||||
declare readonly imageCount: number;
|
||||
declare readonly voiceCount: number;
|
||||
declare readonly requiredCredits: number;
|
||||
declare readonly currentCredits: number;
|
||||
declare readonly remainingCredits: number;
|
||||
declare readonly shortfallCredits: number;
|
||||
declare readonly costsByMessage: Record<string, number>;
|
||||
declare readonly messageIds: string[];
|
||||
|
||||
private constructor(input: UnlockHistoryResponseInput) {
|
||||
const data = UnlockHistoryResponseSchema.parse(input);
|
||||
@@ -2,5 +2,4 @@
|
||||
* @file Automatically generated by barrelsby.
|
||||
*/
|
||||
|
||||
export * from "./app_event";
|
||||
export * from "./pwa_event";
|
||||
export * from "./request";
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./app_event";
|
||||
export * from "./pwa_event";
|
||||
@@ -2,8 +2,6 @@
|
||||
* @file Payment DTO barrel.
|
||||
*/
|
||||
|
||||
export * from "./create_payment_order_request";
|
||||
export * from "./create_payment_order_response";
|
||||
export * from "./payment_order_status_response";
|
||||
export * from "./payment_plan";
|
||||
export * from "./payment_plans_response";
|
||||
export * from "./request";
|
||||
export * from "./response";
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./create_payment_order_request";
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from "./create_payment_order_response";
|
||||
export * from "./payment_order_status_response";
|
||||
export * from "./payment_plans_response";
|
||||
-3
@@ -11,10 +11,7 @@ import {
|
||||
export type { PaymentOrderStatus };
|
||||
|
||||
export class PaymentOrderStatusResponse {
|
||||
declare readonly orderId: string;
|
||||
declare readonly status: PaymentOrderStatus;
|
||||
declare readonly orderType: string;
|
||||
declare readonly planId: string;
|
||||
|
||||
private constructor(input: PaymentOrderStatusResponseInput) {
|
||||
const data = PaymentOrderStatusResponseSchema.parse(input);
|
||||
+1
-1
@@ -8,7 +8,7 @@ import {
|
||||
type PaymentPlansResponseInput,
|
||||
} from "@/data/schemas/payment/payment_plans_response";
|
||||
|
||||
import { PaymentPlan } from "./payment_plan";
|
||||
import { PaymentPlan } from "../payment_plan";
|
||||
|
||||
export class PaymentPlansResponse {
|
||||
declare readonly isFirstRecharge: boolean;
|
||||
+16
-16
@@ -16,24 +16,24 @@ 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/facebook_login_request";
|
||||
export * from "../dto/auth/facebook_user_data";
|
||||
export * from "../dto/auth/fb_id_login_request";
|
||||
export * from "../dto/auth/google_login_request";
|
||||
export * from "../dto/auth/guest_login_request";
|
||||
export * from "../dto/auth/guest_login_response";
|
||||
export * from "../dto/auth/login_request";
|
||||
export * from "../dto/auth/login_response";
|
||||
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/chat/chat_history_response";
|
||||
export * from "../dto/auth/request/facebook_login_request";
|
||||
export * from "../dto/auth/request/fb_id_login_request";
|
||||
export * from "../dto/auth/request/google_login_request";
|
||||
export * from "../dto/auth/request/guest_login_request";
|
||||
export * from "../dto/auth/request/login_request";
|
||||
export * from "../dto/auth/request/refresh_token_request";
|
||||
export * from "../dto/auth/request/register_request";
|
||||
export * from "../dto/auth/response/guest_login_response";
|
||||
export * from "../dto/auth/response/login_response";
|
||||
export * from "../dto/auth/response/logout_response";
|
||||
export * from "../dto/auth/response/refresh_token_response";
|
||||
export * from "../dto/chat/chat_message";
|
||||
export * from "../dto/chat/chat_send_response";
|
||||
export * from "../dto/chat/send_message_request";
|
||||
export * from "../dto/metrics/app_event";
|
||||
export * from "../dto/metrics/pwa_event";
|
||||
export * from "../dto/chat/request/send_message_request";
|
||||
export * from "../dto/chat/response/chat_history_response";
|
||||
export * from "../dto/chat/response/chat_send_response";
|
||||
export * from "../dto/metrics/request/app_event";
|
||||
export * from "../dto/metrics/request/pwa_event";
|
||||
export * from "../dto/user/avatar_data";
|
||||
export * from "../dto/user/personality_traits";
|
||||
export * from "../dto/user/recent_memory";
|
||||
|
||||
Reference in New Issue
Block a user