feat: 更新 API 地址,添加新的类型定义,优化表单提交逻辑
This commit is contained in:
@@ -11,6 +11,10 @@ export type TreatyQuery<T> = T extends (...args: any[]) => any
|
||||
? NonNullable<NonNullable<Parameters<T>[0]>["query"]>
|
||||
: never;
|
||||
|
||||
export type TreatyBody<T> = T extends (...args: any[]) => any
|
||||
? NonNullable<Parameters<T>[0]>
|
||||
: never;
|
||||
|
||||
export type DepositFiatData = Treaty.Data<typeof client.api.deposit.fiat.post>;
|
||||
|
||||
export type BalancesData = Treaty.Data<typeof client.api.asset.balances.get>;
|
||||
@@ -22,17 +26,17 @@ export type WithdrawBody = Omit<Parameters<typeof client.api.withdraw.post>[0],
|
||||
|
||||
export type UserProfileData = Treaty.Data<typeof client.api.user.profile.get>["userProfile"];
|
||||
|
||||
export type UpdateUserProfileBody = TreatyQuery<typeof client.api.user.profile.put>;
|
||||
export type UpdateUserProfileBody = TreatyBody<typeof client.api.user.profile.put>;
|
||||
|
||||
export type RwaIssuanceProductsData = Treaty.Data<typeof client.api.rwa.issuance.products.bundle.post>;
|
||||
|
||||
export type RwaIssuanceProductBody = TreatyQuery<typeof client.api.rwa.issuance.products.bundle.post>;
|
||||
export type RwaIssuanceProductBody = TreatyBody<typeof client.api.rwa.issuance.products.bundle.post>;
|
||||
|
||||
export type RwaIssuanceCategoriesData = Treaty.Data<typeof client.api.rwa.issuance.categories.get>;
|
||||
|
||||
export type BankAccountsData = Treaty.Data<typeof client.api.bank_account.get>;
|
||||
|
||||
export type BankAccountBody = TreatyQuery<typeof client.api.bank_account.post>;
|
||||
export type BankAccountBody = TreatyBody<typeof client.api.bank_account.post>;
|
||||
|
||||
export type BankAccountData = Treaty.Data<typeof client.api.bank_account.post>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user