feat(weibo): 增加工作台批量充值与批量导入
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user