From 759481b6218583c8736917414d35abb4dbcb4e56 Mon Sep 17 00:00:00 2001 From: chenhang Date: Tue, 14 Jul 2026 15:12:19 +0800 Subject: [PATCH] refactor(schemas): group network schemas by direction Move request and response schemas into matching subdirectories, extract the shared chat lock type, and update barrels and imports without changing wire formats. --- barrelsby.json | 12 +++++- .../auth/request/facebook_identity_request.ts | 2 +- .../auth/request/facebook_login_request.ts | 2 +- .../request/facebook_psid_login_request.ts | 2 +- .../dto/auth/request/fb_id_login_request.ts | 2 +- .../dto/auth/request/google_login_request.ts | 2 +- .../dto/auth/request/guest_login_request.ts | 2 +- src/data/dto/auth/request/login_request.ts | 2 +- .../dto/auth/request/refresh_token_request.ts | 2 +- src/data/dto/auth/request/register_request.ts | 2 +- .../response/facebook_identity_response.ts | 2 +- .../response/facebook_psid_login_response.ts | 2 +- .../dto/auth/response/guest_login_response.ts | 2 +- src/data/dto/auth/response/login_response.ts | 2 +- src/data/dto/auth/response/logout_response.ts | 2 +- .../auth/response/refresh_token_response.ts | 2 +- .../dto/chat/request/send_message_request.ts | 2 +- .../chat/request/unlock_private_request.ts | 2 +- .../chat/response/chat_history_response.ts | 2 +- .../chat/response/unlock_history_response.ts | 2 +- .../chat/response/unlock_private_response.ts | 2 +- src/data/dto/metrics/request/app_event.ts | 2 +- src/data/dto/metrics/request/pwa_event.ts | 2 +- .../request/create_payment_order_request.ts | 2 +- .../response/create_payment_order_response.ts | 2 +- .../response/payment_order_status_response.ts | 2 +- .../response/payment_plans_response.ts | 2 +- .../response/tip_payment_plans_response.ts | 2 +- src/data/schemas/auth/index.ts | 30 +++++++------- .../facebook_identity_request.ts | 2 +- .../{ => request}/facebook_login_request.ts | 2 +- .../facebook_psid_login_request.ts | 2 +- .../auth/{ => request}/fb_id_login_request.ts | 2 +- .../{ => request}/google_login_request.ts | 2 +- .../auth/{ => request}/guest_login_request.ts | 2 +- src/data/schemas/auth/request/index.ts | 13 ++++++ .../auth/{ => request}/login_request.ts | 2 +- .../{ => request}/refresh_token_request.ts | 0 .../auth/{ => request}/register_request.ts | 2 +- .../facebook_identity_response.ts | 2 +- .../facebook_psid_login_response.ts | 4 +- .../{ => response}/guest_login_response.ts | 4 +- src/data/schemas/auth/response/index.ts | 10 +++++ .../auth/{ => response}/login_response.ts | 4 +- .../auth/{ => response}/logout_response.ts | 2 +- .../{ => response}/refresh_token_response.ts | 0 src/data/schemas/chat/chat_lock_type.ts | 9 +++++ src/data/schemas/chat/index.ts | 13 +++--- src/data/schemas/chat/request/index.ts | 6 +++ .../{ => request}/send_message_request.ts | 6 ++- .../{ => request}/unlock_private_request.ts | 8 +--- .../{ => response}/chat_history_response.ts | 8 +++- .../chat/{ => response}/chat_send_response.ts | 4 +- src/data/schemas/chat/response/index.ts | 8 ++++ .../{ => response}/unlock_history_response.ts | 7 +++- .../{ => response}/unlock_private_response.ts | 6 +-- src/data/schemas/metrics/index.ts | 4 +- .../metrics/{ => request}/app_event.ts | 2 +- src/data/schemas/metrics/request/index.ts | 6 +++ .../metrics/{ => request}/pwa_event.ts | 2 +- src/data/schemas/payment/index.ts | 12 +++--- .../create_payment_order_request.ts | 0 src/data/schemas/payment/request/index.ts | 5 +++ .../create_payment_order_response.ts | 2 +- src/data/schemas/payment/response/index.ts | 8 ++++ .../payment_order_status_response.ts | 0 .../{ => response}/payment_plans_response.ts | 4 +- .../tip_payment_plans_response.ts | 4 +- src/data/schemas/private-room/index.ts | 10 +++-- .../schemas/private-room/request/index.ts | 5 +++ .../unlock_private_album_request.ts | 2 +- .../schemas/private-room/response/index.ts | 6 +++ .../private_album_unlock_response.ts | 4 +- .../{ => response}/private_albums_response.ts | 4 +- src/data/services/index.ts | 40 +++++++++---------- 75 files changed, 222 insertions(+), 124 deletions(-) rename src/data/schemas/auth/{ => request}/facebook_identity_request.ts (86%) rename src/data/schemas/auth/{ => request}/facebook_login_request.ts (85%) rename src/data/schemas/auth/{ => request}/facebook_psid_login_request.ts (84%) rename src/data/schemas/auth/{ => request}/fb_id_login_request.ts (83%) rename src/data/schemas/auth/{ => request}/google_login_request.ts (84%) rename src/data/schemas/auth/{ => request}/guest_login_request.ts (85%) create mode 100644 src/data/schemas/auth/request/index.ts rename src/data/schemas/auth/{ => request}/login_request.ts (85%) rename src/data/schemas/auth/{ => request}/refresh_token_request.ts (100%) rename src/data/schemas/auth/{ => request}/register_request.ts (84%) rename src/data/schemas/auth/{ => response}/facebook_identity_response.ts (89%) rename src/data/schemas/auth/{ => response}/facebook_psid_login_response.ts (88%) rename src/data/schemas/auth/{ => response}/guest_login_response.ts (77%) create mode 100644 src/data/schemas/auth/response/index.ts rename src/data/schemas/auth/{ => response}/login_response.ts (75%) rename src/data/schemas/auth/{ => response}/logout_response.ts (83%) rename src/data/schemas/auth/{ => response}/refresh_token_response.ts (100%) create mode 100644 src/data/schemas/chat/chat_lock_type.ts create mode 100644 src/data/schemas/chat/request/index.ts rename src/data/schemas/chat/{ => request}/send_message_request.ts (85%) rename src/data/schemas/chat/{ => request}/unlock_private_request.ts (76%) rename src/data/schemas/chat/{ => response}/chat_history_response.ts (78%) rename src/data/schemas/chat/{ => response}/chat_send_response.ts (88%) create mode 100644 src/data/schemas/chat/response/index.ts rename src/data/schemas/chat/{ => response}/unlock_history_response.ts (90%) rename src/data/schemas/chat/{ => response}/unlock_private_response.ts (88%) rename src/data/schemas/metrics/{ => request}/app_event.ts (84%) create mode 100644 src/data/schemas/metrics/request/index.ts rename src/data/schemas/metrics/{ => request}/pwa_event.ts (92%) rename src/data/schemas/payment/{ => request}/create_payment_order_request.ts (100%) create mode 100644 src/data/schemas/payment/request/index.ts rename src/data/schemas/payment/{ => response}/create_payment_order_response.ts (95%) create mode 100644 src/data/schemas/payment/response/index.ts rename src/data/schemas/payment/{ => response}/payment_order_status_response.ts (100%) rename src/data/schemas/payment/{ => response}/payment_plans_response.ts (89%) rename src/data/schemas/payment/{ => response}/tip_payment_plans_response.ts (73%) create mode 100644 src/data/schemas/private-room/request/index.ts rename src/data/schemas/private-room/{ => request}/unlock_private_album_request.ts (84%) create mode 100644 src/data/schemas/private-room/response/index.ts rename src/data/schemas/private-room/{ => response}/private_album_unlock_response.ts (91%) rename src/data/schemas/private-room/{ => response}/private_albums_response.ts (73%) diff --git a/barrelsby.json b/barrelsby.json index dafb56c3..35ca8871 100644 --- a/barrelsby.json +++ b/barrelsby.json @@ -17,8 +17,19 @@ "./src/data/dto/metrics", "./src/data/dto/user", "./src/data/schemas/auth", + "./src/data/schemas/auth/request", + "./src/data/schemas/auth/response", "./src/data/schemas/chat", + "./src/data/schemas/chat/request", + "./src/data/schemas/chat/response", "./src/data/schemas/metrics", + "./src/data/schemas/metrics/request", + "./src/data/schemas/payment", + "./src/data/schemas/payment/request", + "./src/data/schemas/payment/response", + "./src/data/schemas/private-room", + "./src/data/schemas/private-room/request", + "./src/data/schemas/private-room/response", "./src/data/schemas/user", "./src/data/storage/app", "./src/data/storage/auth", @@ -35,7 +46,6 @@ "./src/utils", "./src/stores/auth", "./src/stores/chat", - "./src/stores/sidebar", "./src/stores/user" ] } diff --git a/src/data/dto/auth/request/facebook_identity_request.ts b/src/data/dto/auth/request/facebook_identity_request.ts index 7395ffbd..7fcb397c 100644 --- a/src/data/dto/auth/request/facebook_identity_request.ts +++ b/src/data/dto/auth/request/facebook_identity_request.ts @@ -5,7 +5,7 @@ import { FacebookIdentityRequestSchema, type FacebookIdentityRequestInput, type FacebookIdentityRequestData, -} from "@/data/schemas/auth/facebook_identity_request"; +} from "@/data/schemas/auth/request/facebook_identity_request"; export class FacebookIdentityRequest { private constructor(input: FacebookIdentityRequestInput) { diff --git a/src/data/dto/auth/request/facebook_login_request.ts b/src/data/dto/auth/request/facebook_login_request.ts index fdff17ad..4c36afde 100644 --- a/src/data/dto/auth/request/facebook_login_request.ts +++ b/src/data/dto/auth/request/facebook_login_request.ts @@ -5,7 +5,7 @@ import { FacebookLoginRequestSchema, type FacebookLoginRequestInput, type FacebookLoginRequestData, -} from "@/data/schemas/auth/facebook_login_request"; +} from "@/data/schemas/auth/request/facebook_login_request"; export class FacebookLoginRequest { declare readonly accessToken: string; diff --git a/src/data/dto/auth/request/facebook_psid_login_request.ts b/src/data/dto/auth/request/facebook_psid_login_request.ts index ac6a2dc0..a988a57f 100644 --- a/src/data/dto/auth/request/facebook_psid_login_request.ts +++ b/src/data/dto/auth/request/facebook_psid_login_request.ts @@ -5,7 +5,7 @@ import { FacebookPsidLoginRequestSchema, type FacebookPsidLoginRequestInput, type FacebookPsidLoginRequestData, -} from "@/data/schemas/auth/facebook_psid_login_request"; +} from "@/data/schemas/auth/request/facebook_psid_login_request"; export class FacebookPsidLoginRequest { private constructor(input: FacebookPsidLoginRequestInput) { diff --git a/src/data/dto/auth/request/fb_id_login_request.ts b/src/data/dto/auth/request/fb_id_login_request.ts index 82642114..296a4156 100644 --- a/src/data/dto/auth/request/fb_id_login_request.ts +++ b/src/data/dto/auth/request/fb_id_login_request.ts @@ -5,7 +5,7 @@ import { FbIdLoginRequestSchema, type FbIdLoginRequestInput, type FbIdLoginRequestData, -} from "@/data/schemas/auth/fb_id_login_request"; +} from "@/data/schemas/auth/request/fb_id_login_request"; export class FbIdLoginRequest { declare readonly fbId: string; diff --git a/src/data/dto/auth/request/google_login_request.ts b/src/data/dto/auth/request/google_login_request.ts index 964f72a3..8b3ff87a 100644 --- a/src/data/dto/auth/request/google_login_request.ts +++ b/src/data/dto/auth/request/google_login_request.ts @@ -5,7 +5,7 @@ import { GoogleLoginRequestSchema, type GoogleLoginRequestInput, type GoogleLoginRequestData, -} from "@/data/schemas/auth/google_login_request"; +} from "@/data/schemas/auth/request/google_login_request"; export class GoogleLoginRequest { declare readonly idToken: string; diff --git a/src/data/dto/auth/request/guest_login_request.ts b/src/data/dto/auth/request/guest_login_request.ts index 28d98341..f42b45a8 100644 --- a/src/data/dto/auth/request/guest_login_request.ts +++ b/src/data/dto/auth/request/guest_login_request.ts @@ -5,7 +5,7 @@ import { GuestLoginRequestSchema, type GuestLoginRequestInput, type GuestLoginRequestData, -} from "@/data/schemas/auth/guest_login_request"; +} from "@/data/schemas/auth/request/guest_login_request"; export class GuestLoginRequest { declare readonly deviceId: string; diff --git a/src/data/dto/auth/request/login_request.ts b/src/data/dto/auth/request/login_request.ts index a5f84a74..734097c0 100644 --- a/src/data/dto/auth/request/login_request.ts +++ b/src/data/dto/auth/request/login_request.ts @@ -5,7 +5,7 @@ import { LoginRequestSchema, type LoginRequestInput, type LoginRequestData, -} from "@/data/schemas/auth/login_request"; +} from "@/data/schemas/auth/request/login_request"; export class LoginRequest { declare readonly email: string; diff --git a/src/data/dto/auth/request/refresh_token_request.ts b/src/data/dto/auth/request/refresh_token_request.ts index 96cd1d47..7aa417cd 100644 --- a/src/data/dto/auth/request/refresh_token_request.ts +++ b/src/data/dto/auth/request/refresh_token_request.ts @@ -5,7 +5,7 @@ import { RefreshTokenRequestSchema, type RefreshTokenRequestInput, type RefreshTokenRequestData, -} from "@/data/schemas/auth/refresh_token_request"; +} from "@/data/schemas/auth/request/refresh_token_request"; export class RefreshTokenRequest { declare readonly refreshToken: string; diff --git a/src/data/dto/auth/request/register_request.ts b/src/data/dto/auth/request/register_request.ts index dc8c4236..5c9e2d34 100644 --- a/src/data/dto/auth/request/register_request.ts +++ b/src/data/dto/auth/request/register_request.ts @@ -5,7 +5,7 @@ import { RegisterRequestSchema, type RegisterRequestInput, type RegisterRequestData, -} from "@/data/schemas/auth/register_request"; +} from "@/data/schemas/auth/request/register_request"; export class RegisterRequest { declare readonly username: string; diff --git a/src/data/dto/auth/response/facebook_identity_response.ts b/src/data/dto/auth/response/facebook_identity_response.ts index 55f7456e..5c15e3ee 100644 --- a/src/data/dto/auth/response/facebook_identity_response.ts +++ b/src/data/dto/auth/response/facebook_identity_response.ts @@ -5,7 +5,7 @@ import { FacebookIdentityResponseSchema, type FacebookIdentityResponseInput, type FacebookIdentityResponseData, -} from "@/data/schemas/auth/facebook_identity_response"; +} from "@/data/schemas/auth/response/facebook_identity_response"; export class FacebookIdentityResponse { private constructor(input: FacebookIdentityResponseInput) { diff --git a/src/data/dto/auth/response/facebook_psid_login_response.ts b/src/data/dto/auth/response/facebook_psid_login_response.ts index 422d1860..437115a0 100644 --- a/src/data/dto/auth/response/facebook_psid_login_response.ts +++ b/src/data/dto/auth/response/facebook_psid_login_response.ts @@ -5,7 +5,7 @@ import { FacebookPsidLoginResponseSchema, type FacebookPsidLoginResponseInput, type FacebookPsidLoginResponseData, -} from "@/data/schemas/auth/facebook_psid_login_response"; +} from "@/data/schemas/auth/response/facebook_psid_login_response"; export class FacebookPsidLoginResponse { private constructor(input: FacebookPsidLoginResponseInput) { diff --git a/src/data/dto/auth/response/guest_login_response.ts b/src/data/dto/auth/response/guest_login_response.ts index 37e2f3ec..c636d810 100644 --- a/src/data/dto/auth/response/guest_login_response.ts +++ b/src/data/dto/auth/response/guest_login_response.ts @@ -5,7 +5,7 @@ import { GuestLoginResponseSchema, type GuestLoginResponseInput, type GuestLoginResponseData, -} from "@/data/schemas/auth/guest_login_response"; +} from "@/data/schemas/auth/response/guest_login_response"; import { User } from "@/data/dto/user/user"; export class GuestLoginResponse { diff --git a/src/data/dto/auth/response/login_response.ts b/src/data/dto/auth/response/login_response.ts index 1cbe9fea..6fef62aa 100644 --- a/src/data/dto/auth/response/login_response.ts +++ b/src/data/dto/auth/response/login_response.ts @@ -5,7 +5,7 @@ import { LoginResponseSchema, type LoginResponseInput, type LoginResponseData, -} from "@/data/schemas/auth/login_response"; +} from "@/data/schemas/auth/response/login_response"; import { User } from "@/data/dto/user/user"; export class LoginResponse { diff --git a/src/data/dto/auth/response/logout_response.ts b/src/data/dto/auth/response/logout_response.ts index 53a922de..bea4d12a 100644 --- a/src/data/dto/auth/response/logout_response.ts +++ b/src/data/dto/auth/response/logout_response.ts @@ -5,7 +5,7 @@ import { LogoutResponseSchema, type LogoutResponseInput, type LogoutResponseData, -} from "@/data/schemas/auth/logout_response"; +} from "@/data/schemas/auth/response/logout_response"; export class LogoutResponse { declare readonly success: boolean; diff --git a/src/data/dto/auth/response/refresh_token_response.ts b/src/data/dto/auth/response/refresh_token_response.ts index 12e46607..31f42fc6 100644 --- a/src/data/dto/auth/response/refresh_token_response.ts +++ b/src/data/dto/auth/response/refresh_token_response.ts @@ -5,7 +5,7 @@ import { RefreshTokenResponseSchema, type RefreshTokenResponseInput, type RefreshTokenResponseData, -} from "@/data/schemas/auth/refresh_token_response"; +} from "@/data/schemas/auth/response/refresh_token_response"; export class RefreshTokenResponse { declare readonly token: string; diff --git a/src/data/dto/chat/request/send_message_request.ts b/src/data/dto/chat/request/send_message_request.ts index b93b9197..01815787 100644 --- a/src/data/dto/chat/request/send_message_request.ts +++ b/src/data/dto/chat/request/send_message_request.ts @@ -5,7 +5,7 @@ import { SendMessageRequestSchema, type SendMessageRequestInput, type SendMessageRequestData, -} from "@/data/schemas/chat/send_message_request"; +} from "@/data/schemas/chat/request/send_message_request"; export class SendMessageRequest { declare readonly message: string; diff --git a/src/data/dto/chat/request/unlock_private_request.ts b/src/data/dto/chat/request/unlock_private_request.ts index 64740ef8..c343961f 100644 --- a/src/data/dto/chat/request/unlock_private_request.ts +++ b/src/data/dto/chat/request/unlock_private_request.ts @@ -5,7 +5,7 @@ import { UnlockPrivateRequestSchema, type UnlockPrivateRequestData, type UnlockPrivateRequestInput, -} from "@/data/schemas/chat/unlock_private_request"; +} from "@/data/schemas/chat/request/unlock_private_request"; export class UnlockPrivateRequest { declare readonly messageId?: string; diff --git a/src/data/dto/chat/response/chat_history_response.ts b/src/data/dto/chat/response/chat_history_response.ts index 80f932d2..b06fba9d 100644 --- a/src/data/dto/chat/response/chat_history_response.ts +++ b/src/data/dto/chat/response/chat_history_response.ts @@ -5,7 +5,7 @@ import { ChatHistoryResponseSchema, type ChatHistoryResponseInput, type ChatHistoryResponseData, -} from "@/data/schemas/chat/chat_history_response"; +} from "@/data/schemas/chat/response/chat_history_response"; import { ChatMessage } from "../chat_message"; export class ChatHistoryResponse { diff --git a/src/data/dto/chat/response/unlock_history_response.ts b/src/data/dto/chat/response/unlock_history_response.ts index 96befb68..804e0183 100644 --- a/src/data/dto/chat/response/unlock_history_response.ts +++ b/src/data/dto/chat/response/unlock_history_response.ts @@ -6,7 +6,7 @@ import { type UnlockHistoryReason, type UnlockHistoryResponseData, type UnlockHistoryResponseInput, -} from "@/data/schemas/chat/unlock_history_response"; +} from "@/data/schemas/chat/response/unlock_history_response"; export class UnlockHistoryResponse { declare readonly unlocked: boolean; diff --git a/src/data/dto/chat/response/unlock_private_response.ts b/src/data/dto/chat/response/unlock_private_response.ts index 4eafcd92..d3c9a509 100644 --- a/src/data/dto/chat/response/unlock_private_response.ts +++ b/src/data/dto/chat/response/unlock_private_response.ts @@ -3,7 +3,7 @@ import { type UnlockPrivateReason, type UnlockPrivateResponseData, type UnlockPrivateResponseInput, -} from "@/data/schemas/chat/unlock_private_response"; +} from "@/data/schemas/chat/response/unlock_private_response"; import type { ChatLockDetailData } from "@/data/schemas/chat"; import type { ChatImageData, ChatLockType } from "@/data/schemas/chat"; diff --git a/src/data/dto/metrics/request/app_event.ts b/src/data/dto/metrics/request/app_event.ts index daacdd83..72e0d13c 100644 --- a/src/data/dto/metrics/request/app_event.ts +++ b/src/data/dto/metrics/request/app_event.ts @@ -5,7 +5,7 @@ import { AppEventSchema, type AppEventInput, type AppEventData, -} from "@/data/schemas/metrics/app_event"; +} from "@/data/schemas/metrics/request/app_event"; export class AppEvent { declare readonly userId: string; diff --git a/src/data/dto/metrics/request/pwa_event.ts b/src/data/dto/metrics/request/pwa_event.ts index 95e33720..ee0b7ea6 100644 --- a/src/data/dto/metrics/request/pwa_event.ts +++ b/src/data/dto/metrics/request/pwa_event.ts @@ -5,7 +5,7 @@ import { PwaEventSchema, type PwaEventInput, type PwaEventData, -} from "@/data/schemas/metrics/pwa_event"; +} from "@/data/schemas/metrics/request/pwa_event"; export class PwaEvent { declare readonly deviceId: string; diff --git a/src/data/dto/payment/request/create_payment_order_request.ts b/src/data/dto/payment/request/create_payment_order_request.ts index 064241c9..1ceef2c0 100644 --- a/src/data/dto/payment/request/create_payment_order_request.ts +++ b/src/data/dto/payment/request/create_payment_order_request.ts @@ -6,7 +6,7 @@ import { type CreatePaymentOrderRequestData, type CreatePaymentOrderRequestInput, type PayChannel, -} from "@/data/schemas/payment/create_payment_order_request"; +} from "@/data/schemas/payment/request/create_payment_order_request"; export type { PayChannel }; diff --git a/src/data/dto/payment/response/create_payment_order_response.ts b/src/data/dto/payment/response/create_payment_order_response.ts index 15e57b24..790ccec5 100644 --- a/src/data/dto/payment/response/create_payment_order_response.ts +++ b/src/data/dto/payment/response/create_payment_order_response.ts @@ -5,7 +5,7 @@ import { CreatePaymentOrderResponseSchema, type CreatePaymentOrderResponseData, type CreatePaymentOrderResponseInput, -} from "@/data/schemas/payment/create_payment_order_response"; +} from "@/data/schemas/payment/response/create_payment_order_response"; export class CreatePaymentOrderResponse { declare readonly orderId: string; diff --git a/src/data/dto/payment/response/payment_order_status_response.ts b/src/data/dto/payment/response/payment_order_status_response.ts index 600a3344..9211ad3c 100644 --- a/src/data/dto/payment/response/payment_order_status_response.ts +++ b/src/data/dto/payment/response/payment_order_status_response.ts @@ -6,7 +6,7 @@ import { type PaymentOrderStatus, type PaymentOrderStatusResponseData, type PaymentOrderStatusResponseInput, -} from "@/data/schemas/payment/payment_order_status_response"; +} from "@/data/schemas/payment/response/payment_order_status_response"; export type { PaymentOrderStatus }; diff --git a/src/data/dto/payment/response/payment_plans_response.ts b/src/data/dto/payment/response/payment_plans_response.ts index 356f148e..dfe88910 100644 --- a/src/data/dto/payment/response/payment_plans_response.ts +++ b/src/data/dto/payment/response/payment_plans_response.ts @@ -6,7 +6,7 @@ import { type FirstRechargeOfferData, type PaymentPlansResponseData, type PaymentPlansResponseInput, -} from "@/data/schemas/payment/payment_plans_response"; +} from "@/data/schemas/payment/response/payment_plans_response"; import { PaymentPlan } from "../payment_plan"; diff --git a/src/data/dto/payment/response/tip_payment_plans_response.ts b/src/data/dto/payment/response/tip_payment_plans_response.ts index d10cdd42..5f8289f3 100644 --- a/src/data/dto/payment/response/tip_payment_plans_response.ts +++ b/src/data/dto/payment/response/tip_payment_plans_response.ts @@ -2,7 +2,7 @@ import { TipPaymentPlansResponseSchema, type TipPaymentPlansResponseData, type TipPaymentPlansResponseInput, -} from "@/data/schemas/payment/tip_payment_plans_response"; +} from "@/data/schemas/payment/response/tip_payment_plans_response"; import { TipPaymentPlan } from "../tip_payment_plan"; diff --git a/src/data/schemas/auth/index.ts b/src/data/schemas/auth/index.ts index 342c7558..4d862a88 100644 --- a/src/data/schemas/auth/index.ts +++ b/src/data/schemas/auth/index.ts @@ -2,19 +2,19 @@ * @file Automatically generated by barrelsby. */ -export * from "./facebook_identity_request"; -export * from "./facebook_identity_response"; -export * from "./facebook_login_request"; -export * from "./facebook_psid_login_request"; -export * from "./facebook_psid_login_response"; 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 "./logout_response"; -export * from "./refresh_token_request"; -export * from "./refresh_token_response"; -export * from "./register_request"; +export * from "./request/facebook_identity_request"; +export * from "./request/facebook_login_request"; +export * from "./request/facebook_psid_login_request"; +export * from "./request/fb_id_login_request"; +export * from "./request/google_login_request"; +export * from "./request/guest_login_request"; +export * from "./request/login_request"; +export * from "./request/refresh_token_request"; +export * from "./request/register_request"; +export * from "./response/facebook_identity_response"; +export * from "./response/facebook_psid_login_response"; +export * from "./response/guest_login_response"; +export * from "./response/login_response"; +export * from "./response/logout_response"; +export * from "./response/refresh_token_response"; diff --git a/src/data/schemas/auth/facebook_identity_request.ts b/src/data/schemas/auth/request/facebook_identity_request.ts similarity index 86% rename from src/data/schemas/auth/facebook_identity_request.ts rename to src/data/schemas/auth/request/facebook_identity_request.ts index 2c54df60..661a3992 100644 --- a/src/data/schemas/auth/facebook_identity_request.ts +++ b/src/data/schemas/auth/request/facebook_identity_request.ts @@ -3,7 +3,7 @@ */ import { z } from "zod"; -import { stringOrEmpty } from "../nullable-defaults"; +import { stringOrEmpty } from "../../nullable-defaults"; export const FacebookIdentityRequestSchema = z.object({ asid: stringOrEmpty, diff --git a/src/data/schemas/auth/facebook_login_request.ts b/src/data/schemas/auth/request/facebook_login_request.ts similarity index 85% rename from src/data/schemas/auth/facebook_login_request.ts rename to src/data/schemas/auth/request/facebook_login_request.ts index ab257dfa..3afa6aab 100644 --- a/src/data/schemas/auth/facebook_login_request.ts +++ b/src/data/schemas/auth/request/facebook_login_request.ts @@ -4,7 +4,7 @@ */ import { z } from "zod"; -import { booleanOrFalse, stringOrEmpty } from "../nullable-defaults"; +import { booleanOrFalse, stringOrEmpty } from "../../nullable-defaults"; export const FacebookLoginRequestSchema = z.object({ accessToken: z.string(), diff --git a/src/data/schemas/auth/facebook_psid_login_request.ts b/src/data/schemas/auth/request/facebook_psid_login_request.ts similarity index 84% rename from src/data/schemas/auth/facebook_psid_login_request.ts rename to src/data/schemas/auth/request/facebook_psid_login_request.ts index 7b3260b6..005bf912 100644 --- a/src/data/schemas/auth/facebook_psid_login_request.ts +++ b/src/data/schemas/auth/request/facebook_psid_login_request.ts @@ -3,7 +3,7 @@ */ import { z } from "zod"; -import { booleanOrTrue, stringOrEmpty } from "../nullable-defaults"; +import { booleanOrTrue, stringOrEmpty } from "../../nullable-defaults"; export const FacebookPsidLoginRequestSchema = z.object({ psid: z.string(), diff --git a/src/data/schemas/auth/fb_id_login_request.ts b/src/data/schemas/auth/request/fb_id_login_request.ts similarity index 83% rename from src/data/schemas/auth/fb_id_login_request.ts rename to src/data/schemas/auth/request/fb_id_login_request.ts index 5ebf9e97..2975097b 100644 --- a/src/data/schemas/auth/fb_id_login_request.ts +++ b/src/data/schemas/auth/request/fb_id_login_request.ts @@ -4,7 +4,7 @@ */ import { z } from "zod"; -import { booleanOrFalse, stringOrEmpty } from "../nullable-defaults"; +import { booleanOrFalse, stringOrEmpty } from "../../nullable-defaults"; export const FbIdLoginRequestSchema = z.object({ fbId: z.string(), diff --git a/src/data/schemas/auth/google_login_request.ts b/src/data/schemas/auth/request/google_login_request.ts similarity index 84% rename from src/data/schemas/auth/google_login_request.ts rename to src/data/schemas/auth/request/google_login_request.ts index 789ea7c7..03653fcd 100644 --- a/src/data/schemas/auth/google_login_request.ts +++ b/src/data/schemas/auth/request/google_login_request.ts @@ -4,7 +4,7 @@ */ import { z } from "zod"; -import { booleanOrFalse, stringOrEmpty } from "../nullable-defaults"; +import { booleanOrFalse, stringOrEmpty } from "../../nullable-defaults"; export const GoogleLoginRequestSchema = z.object({ idToken: z.string(), diff --git a/src/data/schemas/auth/guest_login_request.ts b/src/data/schemas/auth/request/guest_login_request.ts similarity index 85% rename from src/data/schemas/auth/guest_login_request.ts rename to src/data/schemas/auth/request/guest_login_request.ts index 53e43e4c..c2fd5367 100644 --- a/src/data/schemas/auth/guest_login_request.ts +++ b/src/data/schemas/auth/request/guest_login_request.ts @@ -4,7 +4,7 @@ */ import { z } from "zod"; -import { booleanOrFalse } from "../nullable-defaults"; +import { booleanOrFalse } from "../../nullable-defaults"; export const GuestLoginRequestSchema = z.object({ deviceId: z.string(), diff --git a/src/data/schemas/auth/request/index.ts b/src/data/schemas/auth/request/index.ts new file mode 100644 index 00000000..a603be8b --- /dev/null +++ b/src/data/schemas/auth/request/index.ts @@ -0,0 +1,13 @@ +/** + * @file Automatically generated by barrelsby. + */ + +export * from "./facebook_identity_request"; +export * from "./facebook_login_request"; +export * from "./facebook_psid_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"; diff --git a/src/data/schemas/auth/login_request.ts b/src/data/schemas/auth/request/login_request.ts similarity index 85% rename from src/data/schemas/auth/login_request.ts rename to src/data/schemas/auth/request/login_request.ts index f59a04d9..a43a640a 100644 --- a/src/data/schemas/auth/login_request.ts +++ b/src/data/schemas/auth/request/login_request.ts @@ -4,7 +4,7 @@ */ import { z } from "zod"; -import { booleanOrFalse, stringOrEmpty } from "../nullable-defaults"; +import { booleanOrFalse, stringOrEmpty } from "../../nullable-defaults"; export const LoginRequestSchema = z.object({ email: stringOrEmpty, diff --git a/src/data/schemas/auth/refresh_token_request.ts b/src/data/schemas/auth/request/refresh_token_request.ts similarity index 100% rename from src/data/schemas/auth/refresh_token_request.ts rename to src/data/schemas/auth/request/refresh_token_request.ts diff --git a/src/data/schemas/auth/register_request.ts b/src/data/schemas/auth/request/register_request.ts similarity index 84% rename from src/data/schemas/auth/register_request.ts rename to src/data/schemas/auth/request/register_request.ts index fb1d4841..1c30728d 100644 --- a/src/data/schemas/auth/register_request.ts +++ b/src/data/schemas/auth/request/register_request.ts @@ -4,7 +4,7 @@ */ import { z } from "zod"; -import { booleanOrFalse, stringOrEmpty } from "../nullable-defaults"; +import { booleanOrFalse, stringOrEmpty } from "../../nullable-defaults"; export const RegisterRequestSchema = z.object({ username: z.string(), diff --git a/src/data/schemas/auth/facebook_identity_response.ts b/src/data/schemas/auth/response/facebook_identity_response.ts similarity index 89% rename from src/data/schemas/auth/facebook_identity_response.ts rename to src/data/schemas/auth/response/facebook_identity_response.ts index da3b1592..3f2345bb 100644 --- a/src/data/schemas/auth/facebook_identity_response.ts +++ b/src/data/schemas/auth/response/facebook_identity_response.ts @@ -3,7 +3,7 @@ */ import { z } from "zod"; -import { arrayOrEmpty, stringOrEmpty } from "../nullable-defaults"; +import { arrayOrEmpty, stringOrEmpty } from "../../nullable-defaults"; export const FacebookIdentityBindingSchema = z.object({ conflicts: arrayOrEmpty(z.unknown()), diff --git a/src/data/schemas/auth/facebook_psid_login_response.ts b/src/data/schemas/auth/response/facebook_psid_login_response.ts similarity index 88% rename from src/data/schemas/auth/facebook_psid_login_response.ts rename to src/data/schemas/auth/response/facebook_psid_login_response.ts index 58d5fcb7..ea49e81b 100644 --- a/src/data/schemas/auth/facebook_psid_login_response.ts +++ b/src/data/schemas/auth/response/facebook_psid_login_response.ts @@ -7,8 +7,8 @@ import { booleanOrFalse, schemaOrNull, stringOrEmpty, -} from "../nullable-defaults"; -import { UserSchema } from "../user/user"; +} from "../../nullable-defaults"; +import { UserSchema } from "../../user/user"; export const FacebookPsidLoginResponseSchema = z.object({ token: z.string(), diff --git a/src/data/schemas/auth/guest_login_response.ts b/src/data/schemas/auth/response/guest_login_response.ts similarity index 77% rename from src/data/schemas/auth/guest_login_response.ts rename to src/data/schemas/auth/response/guest_login_response.ts index 9cd28c23..81da27eb 100644 --- a/src/data/schemas/auth/guest_login_response.ts +++ b/src/data/schemas/auth/response/guest_login_response.ts @@ -4,8 +4,8 @@ */ import { z } from "zod"; -import { booleanOrTrue, numberOr, schemaOrNull } from "../nullable-defaults"; -import { UserSchema } from "../user/user"; +import { booleanOrTrue, numberOr, schemaOrNull } from "../../nullable-defaults"; +import { UserSchema } from "../../user/user"; export const GuestLoginResponseSchema = z.object({ token: z.string(), diff --git a/src/data/schemas/auth/response/index.ts b/src/data/schemas/auth/response/index.ts new file mode 100644 index 00000000..3d1742fe --- /dev/null +++ b/src/data/schemas/auth/response/index.ts @@ -0,0 +1,10 @@ +/** + * @file Automatically generated by barrelsby. + */ + +export * from "./facebook_identity_response"; +export * from "./facebook_psid_login_response"; +export * from "./guest_login_response"; +export * from "./login_response"; +export * from "./logout_response"; +export * from "./refresh_token_response"; diff --git a/src/data/schemas/auth/login_response.ts b/src/data/schemas/auth/response/login_response.ts similarity index 75% rename from src/data/schemas/auth/login_response.ts rename to src/data/schemas/auth/response/login_response.ts index cb04a96f..dec0c3c6 100644 --- a/src/data/schemas/auth/login_response.ts +++ b/src/data/schemas/auth/response/login_response.ts @@ -4,8 +4,8 @@ */ import { z } from "zod"; -import { stringOrEmpty } from "../nullable-defaults"; -import { UserSchema } from "../user/user"; +import { stringOrEmpty } from "../../nullable-defaults"; +import { UserSchema } from "../../user/user"; export const LoginResponseSchema = z.object({ user: UserSchema, diff --git a/src/data/schemas/auth/logout_response.ts b/src/data/schemas/auth/response/logout_response.ts similarity index 83% rename from src/data/schemas/auth/logout_response.ts rename to src/data/schemas/auth/response/logout_response.ts index 66711122..50c9526f 100644 --- a/src/data/schemas/auth/logout_response.ts +++ b/src/data/schemas/auth/response/logout_response.ts @@ -4,7 +4,7 @@ */ import { z } from "zod"; -import { booleanOrTrue } from "../nullable-defaults"; +import { booleanOrTrue } from "../../nullable-defaults"; export const LogoutResponseSchema = z.object({ success: booleanOrTrue, diff --git a/src/data/schemas/auth/refresh_token_response.ts b/src/data/schemas/auth/response/refresh_token_response.ts similarity index 100% rename from src/data/schemas/auth/refresh_token_response.ts rename to src/data/schemas/auth/response/refresh_token_response.ts diff --git a/src/data/schemas/chat/chat_lock_type.ts b/src/data/schemas/chat/chat_lock_type.ts new file mode 100644 index 00000000..bd67aaf2 --- /dev/null +++ b/src/data/schemas/chat/chat_lock_type.ts @@ -0,0 +1,9 @@ +import { z } from "zod"; + +export const ChatLockTypeSchema = z.enum([ + "voice_message", + "image_paywall", + "private_message", +]); + +export type ChatLockType = z.output; diff --git a/src/data/schemas/chat/index.ts b/src/data/schemas/chat/index.ts index 01a25152..042d450f 100644 --- a/src/data/schemas/chat/index.ts +++ b/src/data/schemas/chat/index.ts @@ -2,11 +2,12 @@ * @file Automatically generated by barrelsby. */ -export * from "./chat_history_response"; +export * from "./chat_lock_type"; export * from "./chat_message"; export * from "./chat_payloads"; -export * from "./chat_send_response"; -export * from "./send_message_request"; -export * from "./unlock_history_response"; -export * from "./unlock_private_request"; -export * from "./unlock_private_response"; +export * from "./request/send_message_request"; +export * from "./request/unlock_private_request"; +export * from "./response/chat_history_response"; +export * from "./response/chat_send_response"; +export * from "./response/unlock_history_response"; +export * from "./response/unlock_private_response"; diff --git a/src/data/schemas/chat/request/index.ts b/src/data/schemas/chat/request/index.ts new file mode 100644 index 00000000..2499c2d9 --- /dev/null +++ b/src/data/schemas/chat/request/index.ts @@ -0,0 +1,6 @@ +/** + * @file Automatically generated by barrelsby. + */ + +export * from "./send_message_request"; +export * from "./unlock_private_request"; diff --git a/src/data/schemas/chat/send_message_request.ts b/src/data/schemas/chat/request/send_message_request.ts similarity index 85% rename from src/data/schemas/chat/send_message_request.ts rename to src/data/schemas/chat/request/send_message_request.ts index bfa41464..0bd309bf 100644 --- a/src/data/schemas/chat/send_message_request.ts +++ b/src/data/schemas/chat/request/send_message_request.ts @@ -4,7 +4,11 @@ */ import { z } from "zod"; -import { booleanOrFalse, numberOrZero, stringOrEmpty } from "../nullable-defaults"; +import { + booleanOrFalse, + numberOrZero, + stringOrEmpty, +} from "../../nullable-defaults"; export const SendMessageRequestSchema = z.object({ message: stringOrEmpty, diff --git a/src/data/schemas/chat/unlock_private_request.ts b/src/data/schemas/chat/request/unlock_private_request.ts similarity index 76% rename from src/data/schemas/chat/unlock_private_request.ts rename to src/data/schemas/chat/request/unlock_private_request.ts index 0baa2586..db2fbc74 100644 --- a/src/data/schemas/chat/unlock_private_request.ts +++ b/src/data/schemas/chat/request/unlock_private_request.ts @@ -3,11 +3,7 @@ */ import { z } from "zod"; -export const ChatLockTypeSchema = z.enum([ - "voice_message", - "image_paywall", - "private_message", -]); +import { ChatLockTypeSchema } from "../chat_lock_type"; export const UnlockPrivateRequestSchema = z .object({ @@ -19,8 +15,6 @@ export const UnlockPrivateRequestSchema = z message: "messageId or lockType is required", }); -export type ChatLockType = z.output; - export type UnlockPrivateRequestInput = z.input< typeof UnlockPrivateRequestSchema >; diff --git a/src/data/schemas/chat/chat_history_response.ts b/src/data/schemas/chat/response/chat_history_response.ts similarity index 78% rename from src/data/schemas/chat/chat_history_response.ts rename to src/data/schemas/chat/response/chat_history_response.ts index 749b9b53..39c03fa0 100644 --- a/src/data/schemas/chat/chat_history_response.ts +++ b/src/data/schemas/chat/response/chat_history_response.ts @@ -4,8 +4,12 @@ */ import { z } from "zod"; -import { arrayOrEmpty, booleanOrFalse, numberOrZero } from "../nullable-defaults"; -import { ChatMessageSchema } from "./chat_message"; +import { + arrayOrEmpty, + booleanOrFalse, + numberOrZero, +} from "../../nullable-defaults"; +import { ChatMessageSchema } from "../chat_message"; export const ChatHistoryResponseSchema = z.object({ messages: arrayOrEmpty(ChatMessageSchema), diff --git a/src/data/schemas/chat/chat_send_response.ts b/src/data/schemas/chat/response/chat_send_response.ts similarity index 88% rename from src/data/schemas/chat/chat_send_response.ts rename to src/data/schemas/chat/response/chat_send_response.ts index ffb1dc2f..22c9539d 100644 --- a/src/data/schemas/chat/chat_send_response.ts +++ b/src/data/schemas/chat/response/chat_send_response.ts @@ -9,8 +9,8 @@ import { numberOrLazy, numberOrZero, stringOrEmpty, -} from "../nullable-defaults"; -import { ChatImageSchema, ChatLockDetailSchema } from "./chat_payloads"; +} from "../../nullable-defaults"; +import { ChatImageSchema, ChatLockDetailSchema } from "../chat_payloads"; export const ChatSendResponseSchema = z.object({ reply: stringOrEmpty, diff --git a/src/data/schemas/chat/response/index.ts b/src/data/schemas/chat/response/index.ts new file mode 100644 index 00000000..52c0c0bf --- /dev/null +++ b/src/data/schemas/chat/response/index.ts @@ -0,0 +1,8 @@ +/** + * @file Automatically generated by barrelsby. + */ + +export * from "./chat_history_response"; +export * from "./chat_send_response"; +export * from "./unlock_history_response"; +export * from "./unlock_private_response"; diff --git a/src/data/schemas/chat/unlock_history_response.ts b/src/data/schemas/chat/response/unlock_history_response.ts similarity index 90% rename from src/data/schemas/chat/unlock_history_response.ts rename to src/data/schemas/chat/response/unlock_history_response.ts index 13291d27..5aafe7cd 100644 --- a/src/data/schemas/chat/unlock_history_response.ts +++ b/src/data/schemas/chat/response/unlock_history_response.ts @@ -3,7 +3,12 @@ */ import { z } from "zod"; -import { arrayOrEmpty, booleanOrFalse, numberOrZero, recordOrEmpty } from "../nullable-defaults"; +import { + arrayOrEmpty, + booleanOrFalse, + numberOrZero, + recordOrEmpty, +} from "../../nullable-defaults"; export const UnlockHistoryCostsByMessageSchema = recordOrEmpty(z.number()); diff --git a/src/data/schemas/chat/unlock_private_response.ts b/src/data/schemas/chat/response/unlock_private_response.ts similarity index 88% rename from src/data/schemas/chat/unlock_private_response.ts rename to src/data/schemas/chat/response/unlock_private_response.ts index b6c17f80..24dedc9f 100644 --- a/src/data/schemas/chat/unlock_private_response.ts +++ b/src/data/schemas/chat/response/unlock_private_response.ts @@ -5,9 +5,9 @@ import { numberOrZero, stringOrEmpty, stringOrNull, -} from "../nullable-defaults"; -import { ChatImageSchema, ChatLockDetailSchema } from "./chat_payloads"; -import { ChatLockTypeSchema } from "./unlock_private_request"; +} from "../../nullable-defaults"; +import { ChatImageSchema, ChatLockDetailSchema } from "../chat_payloads"; +import { ChatLockTypeSchema } from "../chat_lock_type"; /** * 单条历史付费 / 私密消息解锁响应。 diff --git a/src/data/schemas/metrics/index.ts b/src/data/schemas/metrics/index.ts index 5213df40..2547491a 100644 --- a/src/data/schemas/metrics/index.ts +++ b/src/data/schemas/metrics/index.ts @@ -2,5 +2,5 @@ * @file Automatically generated by barrelsby. */ -export * from "./app_event"; -export * from "./pwa_event"; +export * from "./request/app_event"; +export * from "./request/pwa_event"; diff --git a/src/data/schemas/metrics/app_event.ts b/src/data/schemas/metrics/request/app_event.ts similarity index 84% rename from src/data/schemas/metrics/app_event.ts rename to src/data/schemas/metrics/request/app_event.ts index 76290e35..293e149d 100644 --- a/src/data/schemas/metrics/app_event.ts +++ b/src/data/schemas/metrics/request/app_event.ts @@ -4,7 +4,7 @@ */ import { z } from "zod"; -import { stringOrEmpty } from "../nullable-defaults"; +import { stringOrEmpty } from "../../nullable-defaults"; export const AppEventSchema = z.object({ userId: stringOrEmpty, diff --git a/src/data/schemas/metrics/request/index.ts b/src/data/schemas/metrics/request/index.ts new file mode 100644 index 00000000..5213df40 --- /dev/null +++ b/src/data/schemas/metrics/request/index.ts @@ -0,0 +1,6 @@ +/** + * @file Automatically generated by barrelsby. + */ + +export * from "./app_event"; +export * from "./pwa_event"; diff --git a/src/data/schemas/metrics/pwa_event.ts b/src/data/schemas/metrics/request/pwa_event.ts similarity index 92% rename from src/data/schemas/metrics/pwa_event.ts rename to src/data/schemas/metrics/request/pwa_event.ts index a050ebad..c67eb714 100644 --- a/src/data/schemas/metrics/pwa_event.ts +++ b/src/data/schemas/metrics/request/pwa_event.ts @@ -8,7 +8,7 @@ import { booleanOrFalse, numberOrZero, stringOrEmpty, -} from "../nullable-defaults"; +} from "../../nullable-defaults"; export const PwaEventSchema = z.object({ deviceId: stringOrEmpty, diff --git a/src/data/schemas/payment/index.ts b/src/data/schemas/payment/index.ts index 7558398c..fe00c83f 100644 --- a/src/data/schemas/payment/index.ts +++ b/src/data/schemas/payment/index.ts @@ -1,11 +1,11 @@ /** - * @file Payment schema barrel. + * @file Automatically generated by barrelsby. */ -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 "./tip_payment_plan"; -export * from "./tip_payment_plans_response"; +export * from "./request/create_payment_order_request"; +export * from "./response/create_payment_order_response"; +export * from "./response/payment_order_status_response"; +export * from "./response/payment_plans_response"; +export * from "./response/tip_payment_plans_response"; diff --git a/src/data/schemas/payment/create_payment_order_request.ts b/src/data/schemas/payment/request/create_payment_order_request.ts similarity index 100% rename from src/data/schemas/payment/create_payment_order_request.ts rename to src/data/schemas/payment/request/create_payment_order_request.ts diff --git a/src/data/schemas/payment/request/index.ts b/src/data/schemas/payment/request/index.ts new file mode 100644 index 00000000..7e746cc4 --- /dev/null +++ b/src/data/schemas/payment/request/index.ts @@ -0,0 +1,5 @@ +/** + * @file Automatically generated by barrelsby. + */ + +export * from "./create_payment_order_request"; diff --git a/src/data/schemas/payment/create_payment_order_response.ts b/src/data/schemas/payment/response/create_payment_order_response.ts similarity index 95% rename from src/data/schemas/payment/create_payment_order_response.ts rename to src/data/schemas/payment/response/create_payment_order_response.ts index 63ce8572..2c31aa7a 100644 --- a/src/data/schemas/payment/create_payment_order_response.ts +++ b/src/data/schemas/payment/response/create_payment_order_response.ts @@ -3,7 +3,7 @@ */ import { z } from "zod"; -import { stringOrNull } from "../nullable-defaults"; +import { stringOrNull } from "../../nullable-defaults"; const paymentUrlKeys = [ "cashierUrl", diff --git a/src/data/schemas/payment/response/index.ts b/src/data/schemas/payment/response/index.ts new file mode 100644 index 00000000..789faa41 --- /dev/null +++ b/src/data/schemas/payment/response/index.ts @@ -0,0 +1,8 @@ +/** + * @file Automatically generated by barrelsby. + */ + +export * from "./create_payment_order_response"; +export * from "./payment_order_status_response"; +export * from "./payment_plans_response"; +export * from "./tip_payment_plans_response"; diff --git a/src/data/schemas/payment/payment_order_status_response.ts b/src/data/schemas/payment/response/payment_order_status_response.ts similarity index 100% rename from src/data/schemas/payment/payment_order_status_response.ts rename to src/data/schemas/payment/response/payment_order_status_response.ts diff --git a/src/data/schemas/payment/payment_plans_response.ts b/src/data/schemas/payment/response/payment_plans_response.ts similarity index 89% rename from src/data/schemas/payment/payment_plans_response.ts rename to src/data/schemas/payment/response/payment_plans_response.ts index 7145739d..269ff4e5 100644 --- a/src/data/schemas/payment/payment_plans_response.ts +++ b/src/data/schemas/payment/response/payment_plans_response.ts @@ -9,8 +9,8 @@ import { numberOrZero, schemaOrNull, stringOrEmpty, -} from "../nullable-defaults"; -import { PaymentPlanSchema } from "./payment_plan"; +} from "../../nullable-defaults"; +import { PaymentPlanSchema } from "../payment_plan"; export const FirstRechargeOfferSchema = z.object({ enabled: booleanOrFalse, diff --git a/src/data/schemas/payment/tip_payment_plans_response.ts b/src/data/schemas/payment/response/tip_payment_plans_response.ts similarity index 73% rename from src/data/schemas/payment/tip_payment_plans_response.ts rename to src/data/schemas/payment/response/tip_payment_plans_response.ts index 366b2001..0eeeef19 100644 --- a/src/data/schemas/payment/tip_payment_plans_response.ts +++ b/src/data/schemas/payment/response/tip_payment_plans_response.ts @@ -1,7 +1,7 @@ import { z } from "zod"; -import { arrayOrEmpty } from "../nullable-defaults"; -import { TipPaymentPlanSchema } from "./tip_payment_plan"; +import { arrayOrEmpty } from "../../nullable-defaults"; +import { TipPaymentPlanSchema } from "../tip_payment_plan"; export const TipPaymentPlansResponseSchema = z.object({ plans: arrayOrEmpty(TipPaymentPlanSchema), diff --git a/src/data/schemas/private-room/index.ts b/src/data/schemas/private-room/index.ts index ed5d3256..e52eed85 100644 --- a/src/data/schemas/private-room/index.ts +++ b/src/data/schemas/private-room/index.ts @@ -1,4 +1,8 @@ +/** + * @file Automatically generated by barrelsby. + */ + export * from "./private_album"; -export * from "./private_albums_response"; -export * from "./private_album_unlock_response"; -export * from "./unlock_private_album_request"; +export * from "./request/unlock_private_album_request"; +export * from "./response/private_album_unlock_response"; +export * from "./response/private_albums_response"; diff --git a/src/data/schemas/private-room/request/index.ts b/src/data/schemas/private-room/request/index.ts new file mode 100644 index 00000000..fac44513 --- /dev/null +++ b/src/data/schemas/private-room/request/index.ts @@ -0,0 +1,5 @@ +/** + * @file Automatically generated by barrelsby. + */ + +export * from "./unlock_private_album_request"; diff --git a/src/data/schemas/private-room/unlock_private_album_request.ts b/src/data/schemas/private-room/request/unlock_private_album_request.ts similarity index 84% rename from src/data/schemas/private-room/unlock_private_album_request.ts rename to src/data/schemas/private-room/request/unlock_private_album_request.ts index 3874f2b3..0c74e7ec 100644 --- a/src/data/schemas/private-room/unlock_private_album_request.ts +++ b/src/data/schemas/private-room/request/unlock_private_album_request.ts @@ -1,6 +1,6 @@ import { z } from "zod"; -import { numberOrZero } from "../nullable-defaults"; +import { numberOrZero } from "../../nullable-defaults"; export const UnlockPrivateAlbumRequestSchema = z.object({ expectedCost: numberOrZero, diff --git a/src/data/schemas/private-room/response/index.ts b/src/data/schemas/private-room/response/index.ts new file mode 100644 index 00000000..e5054289 --- /dev/null +++ b/src/data/schemas/private-room/response/index.ts @@ -0,0 +1,6 @@ +/** + * @file Automatically generated by barrelsby. + */ + +export * from "./private_album_unlock_response"; +export * from "./private_albums_response"; diff --git a/src/data/schemas/private-room/private_album_unlock_response.ts b/src/data/schemas/private-room/response/private_album_unlock_response.ts similarity index 91% rename from src/data/schemas/private-room/private_album_unlock_response.ts rename to src/data/schemas/private-room/response/private_album_unlock_response.ts index 883f434f..b7ad94fb 100644 --- a/src/data/schemas/private-room/private_album_unlock_response.ts +++ b/src/data/schemas/private-room/response/private_album_unlock_response.ts @@ -5,8 +5,8 @@ import { booleanOrFalse, numberOrZero, stringOrEmpty, -} from "../nullable-defaults"; -import { PrivateAlbumImageSchema } from "./private_album"; +} from "../../nullable-defaults"; +import { PrivateAlbumImageSchema } from "../private_album"; export const PrivateAlbumUnlockReasonSchema = z.enum([ "ok", diff --git a/src/data/schemas/private-room/private_albums_response.ts b/src/data/schemas/private-room/response/private_albums_response.ts similarity index 73% rename from src/data/schemas/private-room/private_albums_response.ts rename to src/data/schemas/private-room/response/private_albums_response.ts index 31891a80..633171bd 100644 --- a/src/data/schemas/private-room/private_albums_response.ts +++ b/src/data/schemas/private-room/response/private_albums_response.ts @@ -1,7 +1,7 @@ import { z } from "zod"; -import { arrayOrEmpty, numberOrZero } from "../nullable-defaults"; -import { PrivateAlbumSchema } from "./private_album"; +import { arrayOrEmpty, numberOrZero } from "../../nullable-defaults"; +import { PrivateAlbumSchema } from "../private_album"; export const PrivateAlbumsResponseSchema = z.object({ items: arrayOrEmpty(PrivateAlbumSchema), diff --git a/src/data/services/index.ts b/src/data/services/index.ts index fbfa595b..5aa4c3e9 100644 --- a/src/data/services/index.ts +++ b/src/data/services/index.ts @@ -42,28 +42,28 @@ export * from "../dto/user/avatar_data"; export * from "../dto/user/personality_traits"; export * from "../dto/user/recent_memory"; export * from "../dto/user/user"; -export * from "../schemas/auth/facebook_login_request"; -export * from "../schemas/auth/facebook_identity_request"; -export * from "../schemas/auth/facebook_identity_response"; -export * from "../schemas/auth/facebook_psid_login_request"; -export * from "../schemas/auth/facebook_psid_login_response"; +export * from "../schemas/auth/request/facebook_login_request"; +export * from "../schemas/auth/request/facebook_identity_request"; +export * from "../schemas/auth/response/facebook_identity_response"; +export * from "../schemas/auth/request/facebook_psid_login_request"; +export * from "../schemas/auth/response/facebook_psid_login_response"; export * from "../schemas/auth/facebook_user_data"; -export * from "../schemas/auth/fb_id_login_request"; -export * from "../schemas/auth/google_login_request"; -export * from "../schemas/auth/guest_login_request"; -export * from "../schemas/auth/guest_login_response"; -export * from "../schemas/auth/login_request"; -export * from "../schemas/auth/login_response"; -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/chat/chat_history_response"; +export * from "../schemas/auth/request/fb_id_login_request"; +export * from "../schemas/auth/request/google_login_request"; +export * from "../schemas/auth/request/guest_login_request"; +export * from "../schemas/auth/response/guest_login_response"; +export * from "../schemas/auth/request/login_request"; +export * from "../schemas/auth/response/login_response"; +export * from "../schemas/auth/response/logout_response"; +export * from "../schemas/auth/request/refresh_token_request"; +export * from "../schemas/auth/response/refresh_token_response"; +export * from "../schemas/auth/request/register_request"; +export * from "../schemas/chat/response/chat_history_response"; export * from "../schemas/chat/chat_message"; -export * from "../schemas/chat/chat_send_response"; -export * from "../schemas/chat/send_message_request"; -export * from "../schemas/metrics/app_event"; -export * from "../schemas/metrics/pwa_event"; +export * from "../schemas/chat/response/chat_send_response"; +export * from "../schemas/chat/request/send_message_request"; +export * from "../schemas/metrics/request/app_event"; +export * from "../schemas/metrics/request/pwa_event"; export * from "../schemas/user/avatar_data"; export * from "../schemas/user/personality_traits"; export * from "../schemas/user/recent_memory";