feat: sync upstream keys and reorder priorities
This commit is contained in:
@@ -291,6 +291,16 @@ export interface ImportAccountItem {
|
||||
raw: Record<string, any>
|
||||
}
|
||||
|
||||
export interface ReorderPriorityItem {
|
||||
account_id: string | null
|
||||
group_id: string
|
||||
upstream_id: number
|
||||
old_priority: number | null
|
||||
new_priority: number | null
|
||||
status: string
|
||||
message: string
|
||||
}
|
||||
|
||||
export interface WebsiteBatchSyncResponse {
|
||||
total: number
|
||||
success: number
|
||||
@@ -311,6 +321,8 @@ export const websitesApi = {
|
||||
api.post<{ success: boolean; message: string; items: ImportGroupItem[] }>(`/api/websites/${id}/groups/import-from-upstream/${upstreamId}`, data),
|
||||
syncImportedUpstreamKeys: (id: number, data: { upstream_id: number }) =>
|
||||
api.post<{ success: boolean; message: string; items: ImportAccountItem[] }>(`/api/websites/${id}/accounts/sync-imported-upstream-keys`, data),
|
||||
reorderAccountPriorities: (id: number, data: { upstream_id: number }) =>
|
||||
api.post<{ success: boolean; message: string; items: ReorderPriorityItem[] }>(`/api/websites/${id}/accounts/reorder-priority`, data),
|
||||
importAccountsFromUpstreamKeys: (id: number, data: {
|
||||
upstream_key_ids: number[]
|
||||
target_group_map: Record<string, string>
|
||||
|
||||
Reference in New Issue
Block a user