/** * 批量水印 API(文件夹级) */ import { api } from '../client'; /** 启动批量任务,返回 { taskId, total } */ export async function start(payload) { // payload: { libraryId, folder, type: 'add'|'remove', output?, options } return api.post('/batch/start', payload); } /** 查询任务进度 */ export async function status(taskId) { return api.get(`/batch/status/${taskId}`); } /** 取消任务 */ export async function cancel(taskId) { return api.post(`/batch/cancel/${taskId}`); } /** 批量重命名预览(不执行),返回 { count, total, samples: [{from,to}], skipped } */ export async function renamePreview(payload) { // payload: { libraryId, folder, options: { mode, text, includeSubdirs } } return api.post('/batch/rename-preview', payload); }