import type { Treaty } from "@elysiajs/eden"; import type { client } from "."; import type { AssetCodeEnum, WithdrawMethodEnum } from "./enum"; import type { authClient } from "@/auth"; export type TreatyQuery = T extends (...args: any[]) => any ? NonNullable[0]>["query"]> : never; export type TreatyBody = T extends (...args: any[]) => any ? NonNullable[0]> : never; export type DepositFiatData = Treaty.Data; export type BalancesData = Treaty.Data; export type TotalAssetValue = Treaty.Data; export type WithdrawBody = Omit[0], "assetCode" | "withdrawMethod"> & { assetCode: AssetCodeEnum; withdrawMethod: WithdrawMethodEnum; }; export type DepositFiatBody = TreatyBody; export type UserProfileData = Treaty.Data; export type UpdateUserProfileBody = TreatyBody; export type RwaIssuanceProductsData = Treaty.Data; export type RwaIssuanceProductBody = TreatyBody; export type RwaIssuanceCategoriesData = Treaty.Data; export type BankAccountsData = Treaty.Data; export type BankAccountBody = TreatyBody; export type BankAccountData = Treaty.Data; export type SupportBanksData = Treaty.Data; export type AvailableSubscriptionBody = TreatyQuery; export type RwaData = Treaty.Data["data"][number]; export type MyIssueRwaData = Treaty.Data["data"][number]; export type MySubscribeRwaData = Treaty.Data["data"][number]; export type MySubscribeRwaBody = TreatyQuery; export type PhoneNumberVerifyClient = TreatyBody; export type UsernameClient = TreatyBody; export type EmailVerifyClient = TreatyBody; export type UserDepositOrderData = Treaty.Data["data"][number]; export type UserDepositOrderBody = TreatyQuery; export type UserWithdrawOrderData = Treaty.Data["data"][number]; export type UserWithdrawOrderBody = TreatyQuery; export type MarketDataStreaming = ReturnType; export type AssetRecordBody = TreatyQuery; export type AssetRecordData = Treaty.Data["data"][number]; export type TradableData = Treaty.Data["data"][number]; export type TradableBody = TreatyQuery; export type HoldingsData = Treaty.Data; export type HoldingItem = HoldingsData extends { data: Array } ? T : HoldingsData extends Array ? T : never; export type NotificationData = Treaty.Data["data"][number]; export type NotificationBody = TreatyQuery; export type NewBody = TreatyQuery; export type NewData = Treaty.Data["data"][number]; /** * 应用版本信息 */ export interface VersionInfo { /** 最新版本号,如 "1.2.3" */ version: string; /** 构建号 */ buildNumber?: number; /** 是否强制更新 */ forceUpdate: boolean; /** 更新提示信息 */ updateMessage?: string; /** 更新下载链接(App Store / Google Play) */ updateUrl?: string; /** 最低支持版本,低于此版本必须更新 */ minSupportVersion?: string; /** 发布时间 */ releaseDate?: string; /** 更新内容 */ releaseNotes?: string[]; }