添加虎牙自动注册
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import api from './client';
|
||||
import type {
|
||||
HuyaAccountItem,
|
||||
HuyaAutoRegisterBatch,
|
||||
HuyaAutoRegisterRequest,
|
||||
HuyaConfig,
|
||||
HuyaCookieItem,
|
||||
HuyaCookieImportResult,
|
||||
@@ -39,6 +41,12 @@ export const huyaApi = {
|
||||
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 }),
|
||||
startAutoRegister: (data: HuyaAutoRegisterRequest) =>
|
||||
api.post<HuyaAutoRegisterBatch, HuyaAutoRegisterBatch>('/huya/register/batches', data),
|
||||
getAutoRegisterBatch: (batchId: string) =>
|
||||
api.get<HuyaAutoRegisterBatch, HuyaAutoRegisterBatch>(`/huya/register/batches/${batchId}`),
|
||||
stopAutoRegisterBatch: (batchId: string) =>
|
||||
api.post<MessageResponse, MessageResponse>(`/huya/register/batches/${batchId}/stop`),
|
||||
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) =>
|
||||
|
||||
@@ -173,6 +173,50 @@ export interface HuyaSmsLoginResult extends MessageResponse {
|
||||
sdid: string;
|
||||
}
|
||||
|
||||
export interface HuyaAutoRegisterRequest {
|
||||
text: string;
|
||||
tag?: string;
|
||||
concurrency?: number;
|
||||
wait_seconds?: number;
|
||||
poll_interval?: number;
|
||||
}
|
||||
|
||||
export interface HuyaAutoRegisterItem {
|
||||
line: number;
|
||||
phone: string;
|
||||
provider: string;
|
||||
status: string;
|
||||
message: string;
|
||||
code: string;
|
||||
attempts: number;
|
||||
account_id: number | null;
|
||||
uid: string;
|
||||
cookie: string;
|
||||
cookie_preview: string;
|
||||
started_at: string | null;
|
||||
finished_at: string | null;
|
||||
}
|
||||
|
||||
export interface HuyaAutoRegisterBatch {
|
||||
batch_id: string;
|
||||
status: string;
|
||||
message: string;
|
||||
tag: string;
|
||||
created_by: number;
|
||||
concurrency: number;
|
||||
wait_seconds: number;
|
||||
poll_interval: number;
|
||||
total: number;
|
||||
success_count: number;
|
||||
failed_count: number;
|
||||
stopped_count: number;
|
||||
running_count: number;
|
||||
created_at: string | null;
|
||||
started_at: string | null;
|
||||
finished_at: string | null;
|
||||
items: HuyaAutoRegisterItem[];
|
||||
}
|
||||
|
||||
export interface HuyaPasswordLoginBatchItem {
|
||||
line: number;
|
||||
username: string;
|
||||
|
||||
Reference in New Issue
Block a user