feat(admin): batch ops, transfer, watermark, usage and qr share pages
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -121,3 +121,34 @@ export function fetchUpdatePhotoVisibility(photoId: string, visibility: 'hidden'
|
||||
export function fetchDeletePhoto(photoId: string) {
|
||||
return request.del<void>({ url: `/v1/photos/${photoId}` })
|
||||
}
|
||||
|
||||
/** 批量隐藏(P4a A16:逐项结果部分成功;单批上限 200) */
|
||||
export function fetchHidePhotosBatch(albumId: string, photoIds: string[]) {
|
||||
return request.post<Api.Album.BatchHideResult>({
|
||||
url: `/v1/albums/${albumId}/photos/hide-batch`,
|
||||
data: { photoIds }
|
||||
})
|
||||
}
|
||||
|
||||
/** 相册负责人交接(P4a A17:仅 admin;历史上传人不变) */
|
||||
export function fetchTransferAlbum(albumId: string, data: Api.Album.TransferPayload) {
|
||||
return request.post<Api.Album.Detail>({
|
||||
url: `/v1/admin/albums/${albumId}/transfer`,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/** 水印配置与任务状态(current 从未配置为 null) */
|
||||
export function fetchWatermarkJobs(albumId: string) {
|
||||
return request.get<Api.Album.WatermarkJobsStatus>({
|
||||
url: `/v1/albums/${albumId}/watermark-jobs`
|
||||
})
|
||||
}
|
||||
|
||||
/** 保存水印配置并发起历史重生成(202 受理;进度经 GET 轮询) */
|
||||
export function fetchCreateWatermarkJob(albumId: string, config: Api.Album.WatermarkConfig) {
|
||||
return request.post<Api.Album.WatermarkJobCreated>({
|
||||
url: `/v1/albums/${albumId}/watermark-jobs`,
|
||||
data: config
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* 用量统计接口(对齐 @photo/contracts tags [admin]:getUsageSummary /
|
||||
* updateUsageThresholds,P4a Task 5 / A23 后台侧)
|
||||
*
|
||||
* - summary 为实时聚合(相册按 totalBytes 降序)+ 阈值 + 告警列表
|
||||
* (未解决在前,含近期已解除)
|
||||
* - PUT thresholds:字段缺省=保持不变,显式 null=清除该维度(告警停用);
|
||||
* 服务端保存后即刻重新评估(超阈产生新告警/阈值上调解除旧告警)
|
||||
*/
|
||||
import request from '@/utils/http'
|
||||
|
||||
/** 用量汇总(相册聚合 + 合计 + 阈值 + 告警) */
|
||||
export function fetchUsageSummary() {
|
||||
return request.get<Api.Usage.SummaryResponse>({ url: '/v1/admin/usage/summary' })
|
||||
}
|
||||
|
||||
/** 更新用量阈值(修改后服务端即刻重新评估告警) */
|
||||
export function fetchUpdateUsageThresholds(data: Api.Usage.ThresholdsUpdatePayload) {
|
||||
return request.put<Api.Usage.Thresholds>({
|
||||
url: '/v1/admin/usage/thresholds',
|
||||
data
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user