添加虎牙短信登录
This commit is contained in:
@@ -11,6 +11,10 @@ import type {
|
||||
HuyaPasswordLoginResult,
|
||||
HuyaPasswordLoginSelectedRequest,
|
||||
HuyaRechargeGoodsItem,
|
||||
HuyaSmsCodeRequest,
|
||||
HuyaSmsCodeResult,
|
||||
HuyaSmsLoginRequest,
|
||||
HuyaSmsLoginResult,
|
||||
HuyaTaskBatchRequest,
|
||||
HuyaTaskBatchResult,
|
||||
HuyaTaskItem,
|
||||
@@ -31,6 +35,10 @@ export const huyaApi = {
|
||||
api.post<HuyaPasswordLoginResult, HuyaPasswordLoginResult>('/huya/accounts/password-login', data),
|
||||
passwordLoginSelected: (data: HuyaPasswordLoginSelectedRequest) =>
|
||||
api.post<HuyaPasswordLoginBatchResult, HuyaPasswordLoginBatchResult>('/huya/accounts/password-login/selected', data),
|
||||
smsCode: (data: HuyaSmsCodeRequest) =>
|
||||
api.post<HuyaSmsCodeResult, HuyaSmsCodeResult>('/huya/accounts/sms-code', data, { timeout: 120000 }),
|
||||
smsLogin: (data: HuyaSmsLoginRequest) =>
|
||||
api.post<HuyaSmsLoginResult, HuyaSmsLoginResult>('/huya/accounts/sms-login', data, { timeout: 120000 }),
|
||||
assign: (id: number, assigned_to: number | null) =>
|
||||
api.put<MessageResponse, MessageResponse>(`/huya/accounts/${id}/assign`, { assigned_to }),
|
||||
batchAssign: (account_ids: number[], assigned_to: number | null) =>
|
||||
|
||||
@@ -149,6 +149,30 @@ export interface HuyaPasswordLoginResult extends MessageResponse {
|
||||
sdid: string;
|
||||
}
|
||||
|
||||
export interface HuyaSmsCodeRequest {
|
||||
phone: string;
|
||||
cookie?: string;
|
||||
}
|
||||
|
||||
export interface HuyaSmsCodeResult extends MessageResponse {
|
||||
state: string;
|
||||
sdid: string;
|
||||
context: string;
|
||||
request_id: string;
|
||||
}
|
||||
|
||||
export interface HuyaSmsLoginRequest {
|
||||
authcode: string;
|
||||
state: string;
|
||||
phone?: string;
|
||||
tag?: string;
|
||||
}
|
||||
|
||||
export interface HuyaSmsLoginResult extends MessageResponse {
|
||||
account: HuyaAccountItem;
|
||||
sdid: string;
|
||||
}
|
||||
|
||||
export interface HuyaPasswordLoginBatchItem {
|
||||
line: number;
|
||||
username: string;
|
||||
|
||||
Reference in New Issue
Block a user