feat(account-check): 增加履约账号 CK 保护目标
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import api from './client';
|
||||
import type {
|
||||
DouyuAccountProtectionTarget,
|
||||
DouyuAccountProtectionTargetUpdate,
|
||||
DouyuAccountPlatformStatus,
|
||||
DouyuConfig,
|
||||
DouyuExchangeResultImage,
|
||||
@@ -22,6 +24,14 @@ export const douyuApi = {
|
||||
taskTypes: () => api.get<Record<string, string>, Record<string, string>>('/douyu/task-types'),
|
||||
getAccountPlatformStatus: () =>
|
||||
api.get<DouyuAccountPlatformStatus, DouyuAccountPlatformStatus>('/douyu/account-platform-status'),
|
||||
updateAccountProtectionTarget: (
|
||||
groupKey: DouyuAccountProtectionTarget['group_key'],
|
||||
data: DouyuAccountProtectionTargetUpdate,
|
||||
) =>
|
||||
api.put<DouyuAccountProtectionTarget, DouyuAccountProtectionTarget>(
|
||||
`/douyu/account-protection-targets/${groupKey}`,
|
||||
data,
|
||||
),
|
||||
listSupplyTargets: () =>
|
||||
api.get<DouyuSupplyTarget[], DouyuSupplyTarget[]>('/douyu/supply-targets'),
|
||||
createSupplyTarget: (data: DouyuSupplyTargetUpsert) =>
|
||||
|
||||
@@ -772,6 +772,32 @@ export interface DouyuSupplyTargetUpdate {
|
||||
enabled: boolean;
|
||||
}
|
||||
|
||||
export interface DouyuAccountProtectionTarget {
|
||||
group_key: 'presale_bound' | 'collab_bound';
|
||||
label: string;
|
||||
description: string;
|
||||
enabled: boolean;
|
||||
target_count: number;
|
||||
probe_interval_minutes: number;
|
||||
auto_relogin: boolean;
|
||||
bound_count: number;
|
||||
ck_valid: number;
|
||||
ck_invalid: number;
|
||||
ck_error: number;
|
||||
ck_unchecked: number;
|
||||
without_cookie: number;
|
||||
target_shortage: number;
|
||||
probe_due_count: number;
|
||||
needs_attention: boolean;
|
||||
}
|
||||
|
||||
export interface DouyuAccountProtectionTargetUpdate {
|
||||
enabled: boolean;
|
||||
target_count: number;
|
||||
probe_interval_minutes: number;
|
||||
auto_relogin: boolean;
|
||||
}
|
||||
|
||||
export interface DouyuPlatformAlert {
|
||||
code: string;
|
||||
severity: 'critical' | 'warning' | 'info';
|
||||
@@ -781,6 +807,7 @@ export interface DouyuPlatformAlert {
|
||||
value_class?: string;
|
||||
shortage?: number;
|
||||
count?: number;
|
||||
group_key?: string;
|
||||
}
|
||||
|
||||
export interface DouyuQueryTrendDay {
|
||||
@@ -852,6 +879,7 @@ export interface DouyuAccountPlatformStatus {
|
||||
fresh_available: number;
|
||||
fresh_limited: number;
|
||||
};
|
||||
protection_targets: DouyuAccountProtectionTarget[];
|
||||
supply_targets: DouyuSupplyTargetStatus[];
|
||||
alerts: DouyuPlatformAlert[];
|
||||
trends: DouyuPlatformTrends;
|
||||
|
||||
Reference in New Issue
Block a user