feat(weibo): 拆分账号管理与个人工作台
This commit is contained in:
@@ -4,6 +4,7 @@ import type {
|
||||
PaginatedResponse,
|
||||
WeiboAccountItem,
|
||||
WeiboAccountCkResult,
|
||||
WeiboBatchTagResult,
|
||||
WeiboBindQrResult,
|
||||
WeiboExchangeRecordsResult,
|
||||
WeiboExchangeResult,
|
||||
@@ -12,6 +13,7 @@ import type {
|
||||
WeiboPointHistoryResult,
|
||||
WeiboRechargeOrderResult,
|
||||
WeiboImportResult,
|
||||
WeiboWorkbenchMutationResult,
|
||||
} from './types';
|
||||
|
||||
export const weiboApi = {
|
||||
@@ -60,6 +62,41 @@ export const weiboApi = {
|
||||
api.post<WeiboAccountCkResult, WeiboAccountCkResult>(
|
||||
`/weibo/accounts/${accountId}/ck/copy`,
|
||||
),
|
||||
batchTagAccounts: (ids: number[], tag: string) =>
|
||||
api.post<WeiboBatchTagResult, WeiboBatchTagResult>(
|
||||
'/weibo/accounts/batch-tag',
|
||||
{ ids, tag },
|
||||
),
|
||||
listWorkbenchAccounts: (params: {
|
||||
search?: string;
|
||||
bind_status?: string;
|
||||
enabled?: boolean;
|
||||
page: number;
|
||||
page_size: number;
|
||||
}) =>
|
||||
api.get<PaginatedResponse<WeiboAccountItem>, PaginatedResponse<WeiboAccountItem>>(
|
||||
'/weibo/workbench/accounts',
|
||||
{ params },
|
||||
),
|
||||
listWorkbenchPool: (params: {
|
||||
search?: string;
|
||||
page: number;
|
||||
page_size: number;
|
||||
}) =>
|
||||
api.get<PaginatedResponse<WeiboAccountItem>, PaginatedResponse<WeiboAccountItem>>(
|
||||
'/weibo/workbench/pool',
|
||||
{ params },
|
||||
),
|
||||
addWorkbenchAccounts: (accountIds: number[]) =>
|
||||
api.post<WeiboWorkbenchMutationResult, WeiboWorkbenchMutationResult>(
|
||||
'/weibo/workbench/accounts',
|
||||
{ account_ids: accountIds },
|
||||
),
|
||||
removeWorkbenchAccounts: (accountIds: number[]) =>
|
||||
api.post<WeiboWorkbenchMutationResult, WeiboWorkbenchMutationResult>(
|
||||
'/weibo/workbench/accounts/remove',
|
||||
{ account_ids: accountIds },
|
||||
),
|
||||
bindQrcodes: (accountId: number, channel: 'wx' | 'qq') =>
|
||||
api.post<WeiboBindQrResult, WeiboBindQrResult>(
|
||||
`/weibo/accounts/${accountId}/bind-qrcodes`,
|
||||
|
||||
Reference in New Issue
Block a user