feat(weibo): 增加工作台批量充值与批量导入

This commit is contained in:
yml
2026-11-11 20:11:35 +08:00
parent c9814ab4d2
commit 50bb829101
9 changed files with 1353 additions and 60 deletions
+25
View File
@@ -814,6 +814,31 @@ export interface WeiboWorkbenchMutationResult {
success: boolean;
}
export interface WeiboWorkbenchBatchImportItem {
identifier: string;
status:
| 'added'
| 'already_added'
| 'not_found'
| 'ambiguous'
| 'unavailable'
| 'disabled'
| 'duplicate';
message: string;
account_id: number | null;
uid: string;
nickname: string;
}
export interface WeiboWorkbenchBatchImportResult {
requested: number;
added: number;
already_added: number;
failed: number;
account_ids: number[];
items: WeiboWorkbenchBatchImportItem[];
}
export interface WeiboBatchTagResult {
updated: number;
tag: string;
+6
View File
@@ -15,6 +15,7 @@ import type {
WeiboRechargeOrderResult,
WeiboImportResult,
WeiboWorkbenchMutationResult,
WeiboWorkbenchBatchImportResult,
} from './types';
export const weiboApi = {
@@ -122,6 +123,11 @@ export const weiboApi = {
'/weibo/workbench/accounts',
{ account_ids: accountIds },
),
batchImportWorkbenchAccounts: (text: string) =>
api.post<WeiboWorkbenchBatchImportResult, WeiboWorkbenchBatchImportResult>(
'/weibo/workbench/accounts/batch-import',
{ text },
),
removeWorkbenchAccounts: (accountIds: number[]) =>
api.post<WeiboWorkbenchMutationResult, WeiboWorkbenchMutationResult>(
'/weibo/workbench/accounts/remove',