feat(douyu): 增加协作单礼包字典与权限控制
This commit is contained in:
@@ -175,6 +175,15 @@ export interface DouyuCollabShop {
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface DouyuCollabGift {
|
||||
id: number;
|
||||
name: string;
|
||||
points: number;
|
||||
sort_order: number;
|
||||
is_active: boolean;
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface DouyuCollabAccountLookup {
|
||||
found: boolean;
|
||||
ok: boolean;
|
||||
@@ -300,6 +309,24 @@ export const douyuCollabApi = {
|
||||
api.delete<{ success: boolean; name: string; id: number }, { success: boolean; name: string; id: number }>(
|
||||
`/douyu/collab-shops/${id}`,
|
||||
),
|
||||
giftRecords: () =>
|
||||
api.get<DouyuCollabGift[], DouyuCollabGift[]>('/douyu/collab-gifts'),
|
||||
createGift: (data: { name: string; points: number; remark?: string }) =>
|
||||
api.post<DouyuCollabGift, DouyuCollabGift>('/douyu/collab-gifts', data),
|
||||
updateGift: (
|
||||
id: number,
|
||||
data: {
|
||||
name?: string;
|
||||
points?: number;
|
||||
sort_order?: number;
|
||||
is_active?: boolean;
|
||||
remark?: string;
|
||||
},
|
||||
) => api.put<DouyuCollabGift, DouyuCollabGift>(`/douyu/collab-gifts/${id}`, data),
|
||||
deleteGift: (id: number) =>
|
||||
api.delete<{ success: boolean; name: string; id: number }, { success: boolean; name: string; id: number }>(
|
||||
`/douyu/collab-gifts/${id}`,
|
||||
),
|
||||
gifts: () => api.get<string[], string[]>('/douyu/external-orders/gifts'),
|
||||
goods: () => api.get<DouyuCollabGoods[], DouyuCollabGoods[]>('/douyu/external-orders/goods'),
|
||||
refreshGoods: (accountId?: number) =>
|
||||
|
||||
Reference in New Issue
Block a user