✨ feat(accounts): Update third-party account binding and unbinding
This commit is contained in:
Vendored
+10
-20
@@ -70,16 +70,6 @@ declare namespace API {
|
||||
enabled: boolean;
|
||||
};
|
||||
|
||||
type BindEmailRequest = {
|
||||
email: string;
|
||||
};
|
||||
|
||||
type BindMobileRequest = {
|
||||
area_code: string;
|
||||
mobile: string;
|
||||
code: string;
|
||||
};
|
||||
|
||||
type BindOAuthCallbackRequest = {
|
||||
method: string;
|
||||
callback: Record<string, any>;
|
||||
@@ -99,16 +89,6 @@ declare namespace API {
|
||||
expired_at: number;
|
||||
};
|
||||
|
||||
type ChangebindEmailRequest = {
|
||||
email: string;
|
||||
};
|
||||
|
||||
type ChangebindMobileRequest = {
|
||||
area_code: string;
|
||||
mobile: string;
|
||||
code: string;
|
||||
};
|
||||
|
||||
type CheckoutOrderRequest = {
|
||||
orderNo: string;
|
||||
};
|
||||
@@ -748,6 +728,16 @@ declare namespace API {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type UpdateBindEmailRequest = {
|
||||
email: string;
|
||||
};
|
||||
|
||||
type UpdateBindMobileRequest = {
|
||||
area_code: string;
|
||||
mobile: string;
|
||||
code: string;
|
||||
};
|
||||
|
||||
type UpdateUserNotifyRequest = {
|
||||
enable_email_notify: boolean;
|
||||
enable_telegram_notify: boolean;
|
||||
|
||||
@@ -42,10 +42,13 @@ export async function queryUserBalanceLog(options?: { [key: string]: any }) {
|
||||
);
|
||||
}
|
||||
|
||||
/** Bind Email POST /v1/public/user/bind_email */
|
||||
export async function bindEmail(body: API.BindEmailRequest, options?: { [key: string]: any }) {
|
||||
/** Update Bind Email PUT /v1/public/user/bind_email */
|
||||
export async function updateBindEmail(
|
||||
body: API.UpdateBindEmailRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/public/user/bind_email', {
|
||||
method: 'POST',
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
@@ -54,10 +57,13 @@ export async function bindEmail(body: API.BindEmailRequest, options?: { [key: st
|
||||
});
|
||||
}
|
||||
|
||||
/** Bind Mobile POST /v1/public/user/bind_mobile */
|
||||
export async function bindMobile(body: API.BindMobileRequest, options?: { [key: string]: any }) {
|
||||
/** Update Bind Mobile PUT /v1/public/user/bind_mobile */
|
||||
export async function updateBindMobile(
|
||||
body: API.UpdateBindMobileRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/public/user/bind_mobile', {
|
||||
method: 'POST',
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
@@ -104,36 +110,6 @@ export async function bindTelegram(options?: { [key: string]: any }) {
|
||||
);
|
||||
}
|
||||
|
||||
/** Change Bind Email POST /v1/public/user/change_bind_email */
|
||||
export async function changebindEmail(
|
||||
body: API.ChangebindEmailRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/public/user/change_bind_email', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Change Bind Mobile POST /v1/public/user/change_bind_mobile */
|
||||
export async function changebindMobile(
|
||||
body: API.ChangebindMobileRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/public/user/change_bind_mobile', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Query User Commission Log GET /v1/public/user/commission_log */
|
||||
export async function queryUserCommissionLog(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
|
||||
Reference in New Issue
Block a user