🐛 fix: Fix bugs

This commit is contained in:
web
2025-10-21 04:10:34 -07:00
parent c2bfee1f31
commit a46657d5ef
15 changed files with 276 additions and 19 deletions
+12
View File
@@ -47,6 +47,18 @@ export async function userLogin(body: API.UserLoginRequest, options?: { [key: st
});
}
/** Device Login POST /v1/auth/login/device */
export async function deviceLogin(body: API.DeviceLoginRequest, options?: { [key: string]: any }) {
return request<API.Response & { data?: API.LoginResponse }>('/v1/auth/login/device', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** User Telephone login POST /v1/auth/login/telephone */
export async function telephoneLogin(
body: API.TelephoneLoginRequest,
+21 -1
View File
@@ -114,6 +114,7 @@ declare namespace API {
type AuthConfig = {
mobile: MobileAuthenticateConfig;
email: EmailAuthticateConfig;
device: DeviceAuthticateConfig;
register: PubilcRegisterConfig;
};
@@ -211,6 +212,19 @@ declare namespace API {
currency_symbol: string;
};
type DeviceAuthticateConfig = {
enable: boolean;
show_ads: boolean;
enable_security: boolean;
only_real_device: boolean;
};
type DeviceLoginRequest = {
identifier: string;
user_agent: string;
cf_token?: string;
};
type Document = {
id: number;
title: string;
@@ -324,7 +338,7 @@ declare namespace API {
state: string;
};
type Hysteria = {
type Hysteria2 = {
port: number;
hop_ports: string;
hop_interval: number;
@@ -706,6 +720,7 @@ declare namespace API {
};
type ResetPasswordRequest = {
identifier: string;
email: string;
password: string;
code?: string;
@@ -898,6 +913,7 @@ declare namespace API {
};
type TelephoneLoginRequest = {
identifier: string;
telephone: string;
telephone_code: string;
telephone_area_code: string;
@@ -906,6 +922,7 @@ declare namespace API {
};
type TelephoneRegisterRequest = {
identifier: string;
telephone: string;
telephone_area_code: string;
password: string;
@@ -915,6 +932,7 @@ declare namespace API {
};
type TelephoneResetPasswordRequest = {
identifier: string;
telephone: string;
telephone_area_code: string;
password: string;
@@ -1035,12 +1053,14 @@ declare namespace API {
};
type UserLoginRequest = {
identifier: string;
email: string;
password: string;
cf_token?: string;
};
type UserRegisterRequest = {
identifier: string;
email: string;
password: string;
invite?: string;