feat(web-water): 水印设置页面开发
This commit is contained in:
@@ -33,3 +33,35 @@ export type CreateMediaUploadIntentRequest = z.infer<
|
||||
export type CompleteMediaUploadIntentRequest = z.infer<
|
||||
typeof completeMediaUploadIntentRequestSchema
|
||||
>;
|
||||
|
||||
// ── 只读响应类型(由前端 AI 按 docs/api/watermarks-and-assets.md §1 补充,后端请复核) ──
|
||||
|
||||
/** 预签名直传端点:前端必须按返回的 method/url/headers 原样上传 */
|
||||
export type MediaUploadEndpoint = {
|
||||
method: string;
|
||||
url: string;
|
||||
headers: Record<string, string>;
|
||||
};
|
||||
|
||||
/** POST /api/media/upload-intents 响应 */
|
||||
export type MediaUploadIntent = {
|
||||
upload_id: string;
|
||||
expires_at: string;
|
||||
upload: MediaUploadEndpoint;
|
||||
};
|
||||
|
||||
/** 校验通过后创建/复用的素材 */
|
||||
export type MediaAsset = {
|
||||
id: string;
|
||||
content_type: string;
|
||||
byte_size: number;
|
||||
width_px: number | null;
|
||||
height_px: number | null;
|
||||
created_at: string;
|
||||
};
|
||||
|
||||
/** POST /api/media-assets/{asset_id}/access-urls 响应(短时预览 URL) */
|
||||
export type MediaAccessUrl = {
|
||||
url: string;
|
||||
expires_at: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user