feat(weibo): 增加强制分配权限与账号详情
This commit is contained in:
@@ -865,6 +865,15 @@ export interface WeiboBatchTagResult {
|
||||
success: boolean;
|
||||
}
|
||||
|
||||
export interface WeiboForceAssignResult {
|
||||
updated: number;
|
||||
assigned_to: number;
|
||||
assigned_username: string;
|
||||
source: 'selection' | 'tag';
|
||||
tag: string;
|
||||
success: boolean;
|
||||
}
|
||||
|
||||
export interface WeiboGoodsItem {
|
||||
id: number;
|
||||
goods_name: string;
|
||||
|
||||
@@ -9,6 +9,7 @@ import type {
|
||||
WeiboBindQrResult,
|
||||
WeiboExchangeRecordsResult,
|
||||
WeiboExchangeResult,
|
||||
WeiboForceAssignResult,
|
||||
WeiboMallListResult,
|
||||
WeiboPaymentStatusResult,
|
||||
WeiboPointHistoryResult,
|
||||
@@ -91,6 +92,21 @@ export const weiboApi = {
|
||||
account_ids: accountIds,
|
||||
assigned_to: assignedTo,
|
||||
}),
|
||||
forceAssign: (
|
||||
assignedTo: number,
|
||||
expectedCount: number,
|
||||
scope: { accountIds: number[] } | { tag: string },
|
||||
) =>
|
||||
api.post<WeiboForceAssignResult, WeiboForceAssignResult>(
|
||||
'/weibo/assignments/force',
|
||||
{
|
||||
assigned_to: assignedTo,
|
||||
expected_count: expectedCount,
|
||||
...('accountIds' in scope
|
||||
? { account_ids: scope.accountIds }
|
||||
: { tag: scope.tag }),
|
||||
},
|
||||
),
|
||||
assignmentsSummary: () =>
|
||||
api.get<AssignmentsSummary, AssignmentsSummary>('/weibo/assignments/summary'),
|
||||
accountTags: () =>
|
||||
|
||||
Reference in New Issue
Block a user