import { apiGet, apiPost, apiDelete } from "@/api/client"; export interface TrashItem { type: string; id: number; title: string; } export interface TrashBatch { batch_id: string; deleted_at: string | null; summary: string; count: number; items: TrashItem[]; } export async function listTrash(): Promise { const data = await apiGet<{ batches: TrashBatch[] }>("/api/trash"); return data.batches; } export async function restoreBatch(batchId: string): Promise { await apiPost(`/api/trash/${batchId}/restore`, {}); } export async function purgeBatch(batchId: string): Promise { return apiDelete(`/api/trash/${batchId}`); }