增加斗鱼账号检测功能
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import api from './client';
|
||||
import type { AccountCheckBatch, AccountCheckBatchRequest, MessageResponse } from './types';
|
||||
|
||||
export const accountCheckApi = {
|
||||
start: (data: AccountCheckBatchRequest) =>
|
||||
api.post<AccountCheckBatch, AccountCheckBatch>('/account-check/batches', data),
|
||||
getBatch: (batchId: string) =>
|
||||
api.get<AccountCheckBatch, AccountCheckBatch>(`/account-check/batches/${batchId}`),
|
||||
stop: (batchId: string) =>
|
||||
api.post<MessageResponse, MessageResponse>(`/account-check/batches/${batchId}/stop`),
|
||||
download: (batchId: string) =>
|
||||
api.get<Blob, Blob>(`/account-check/batches/${batchId}/download`, { responseType: 'blob' }),
|
||||
};
|
||||
@@ -7,6 +7,7 @@ interface CreateBatchParams {
|
||||
max_login_retries?: number;
|
||||
max_total_time?: number;
|
||||
api_strategy?: string;
|
||||
mode?: 'login' | 'check';
|
||||
}
|
||||
|
||||
export const loginApi = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export * from './types';
|
||||
export { accountCheckApi } from './accountCheck';
|
||||
export { accountApi } from './accounts';
|
||||
export { appApi } from './app';
|
||||
export { authApi } from './auth';
|
||||
|
||||
@@ -94,6 +94,43 @@ export interface BatchLoginResult {
|
||||
success: boolean;
|
||||
}
|
||||
|
||||
// ==================== Account Check ====================
|
||||
|
||||
export interface AccountCheckBatchRequest {
|
||||
text: string;
|
||||
concurrency?: number;
|
||||
max_login_retries?: number;
|
||||
max_total_time?: number;
|
||||
}
|
||||
|
||||
export interface AccountCheckItem {
|
||||
line: number;
|
||||
username: string;
|
||||
email: string;
|
||||
status: string;
|
||||
message: string;
|
||||
started_at: string | null;
|
||||
finished_at: string | null;
|
||||
}
|
||||
|
||||
export interface AccountCheckBatch {
|
||||
batch_id: string;
|
||||
status: string;
|
||||
message: string;
|
||||
created_by: number;
|
||||
concurrency: number;
|
||||
max_login_retries: number;
|
||||
max_total_time: number;
|
||||
total: number;
|
||||
finished_count: number;
|
||||
running_count: number;
|
||||
status_counts: Record<string, number>;
|
||||
created_at: string | null;
|
||||
started_at: string | null;
|
||||
finished_at: string | null;
|
||||
items: AccountCheckItem[];
|
||||
}
|
||||
|
||||
// ==================== Cookie ====================
|
||||
|
||||
export interface CookieItem {
|
||||
|
||||
Reference in New Issue
Block a user