取消背景图
This commit is contained in:
@@ -856,3 +856,250 @@ export interface AdminCreditRecordQueryParams {
|
||||
startDate?: string;
|
||||
endDate?: string;
|
||||
}
|
||||
|
||||
// ── 首页素材行业装修 ──────────────────────────────────────
|
||||
|
||||
export type HomeMaterialMediaType = 'image' | 'video';
|
||||
export type HomeMaterialAssetStatus = 'draft' | 'processing' | 'success' | 'failed';
|
||||
export type HomeMaterialWatermarkType = 'image' | 'repeated_text';
|
||||
export type HomeMaterialWatermarkPosition =
|
||||
| 'top_left'
|
||||
| 'top_center'
|
||||
| 'top_right'
|
||||
| 'middle_left'
|
||||
| 'center'
|
||||
| 'middle_right'
|
||||
| 'bottom_left'
|
||||
| 'bottom_center'
|
||||
| 'bottom_right'
|
||||
| 'custom';
|
||||
export type HomeMaterialWatermarkSizeMode = 'ratio' | 'px';
|
||||
export type HomeMaterialPublicResponseMode = 'grouped' | 'flat';
|
||||
|
||||
export interface HomeMaterialConfig {
|
||||
enabled: boolean;
|
||||
title: string;
|
||||
subtitle: string;
|
||||
showOriginalInAdmin: boolean;
|
||||
}
|
||||
|
||||
export interface HomeMaterialCategory {
|
||||
id: string;
|
||||
name: string;
|
||||
key: string;
|
||||
description?: string | null;
|
||||
icon?: string | null;
|
||||
isActive: boolean;
|
||||
sortOrder: number;
|
||||
assetCount: number;
|
||||
imageCount: number;
|
||||
videoCount: number;
|
||||
createdAt?: string | null;
|
||||
updatedAt?: string | null;
|
||||
}
|
||||
|
||||
export interface HomeMaterialCategoryPayload {
|
||||
name: string;
|
||||
key: string;
|
||||
description?: string | null;
|
||||
icon?: string | null;
|
||||
is_active: boolean;
|
||||
sort_order: number;
|
||||
}
|
||||
|
||||
export interface HomeMaterialWatermark {
|
||||
id: string;
|
||||
name: string;
|
||||
fileUrl: string;
|
||||
fileName?: string | null;
|
||||
fileSizeBytes: number;
|
||||
width?: number | null;
|
||||
height?: number | null;
|
||||
isDefault: boolean;
|
||||
isActive: boolean;
|
||||
createdAt?: string | null;
|
||||
updatedAt?: string | null;
|
||||
}
|
||||
|
||||
export interface HomeMaterialWatermarkPayload {
|
||||
name: string;
|
||||
is_default: boolean;
|
||||
is_active: boolean;
|
||||
}
|
||||
|
||||
export interface HomeMaterialTextWatermarkConfig {
|
||||
text: string;
|
||||
opacityLevel: number;
|
||||
opacity?: number;
|
||||
fontSizePx: number;
|
||||
color: string;
|
||||
rotateDeg: number;
|
||||
gapX: number;
|
||||
gapY: number;
|
||||
staggered: boolean;
|
||||
}
|
||||
|
||||
export interface HomeMaterialTextWatermarkPayload {
|
||||
text: string;
|
||||
opacity_level: number;
|
||||
font_size_px: number;
|
||||
color: string;
|
||||
rotate_deg: number;
|
||||
gap_x: number;
|
||||
gap_y: number;
|
||||
staggered: boolean;
|
||||
}
|
||||
|
||||
export interface HomeMaterialWatermarkConfig {
|
||||
watermarkType: HomeMaterialWatermarkType;
|
||||
watermarkId?: string | null;
|
||||
opacityLevel: number;
|
||||
opacity?: number;
|
||||
position: HomeMaterialWatermarkPosition;
|
||||
customXRatio?: number | null;
|
||||
customYRatio?: number | null;
|
||||
sizeMode: HomeMaterialWatermarkSizeMode;
|
||||
widthRatio?: number | null;
|
||||
widthPx?: number | null;
|
||||
marginX: number;
|
||||
marginY: number;
|
||||
textWatermark?: HomeMaterialTextWatermarkConfig | null;
|
||||
}
|
||||
|
||||
export interface HomeMaterialAsset {
|
||||
id: string;
|
||||
categoryId: string;
|
||||
categoryName?: string | null;
|
||||
categoryKey?: string | null;
|
||||
title?: string | null;
|
||||
mediaType: HomeMaterialMediaType;
|
||||
status: HomeMaterialAssetStatus;
|
||||
originalUrl?: string | null;
|
||||
watermarkedUrl?: string | null;
|
||||
coverUrl?: string | null;
|
||||
watermarkId?: string | null;
|
||||
watermarkName?: string | null;
|
||||
watermarkConfig?: HomeMaterialWatermarkConfig | Record<string, unknown> | null;
|
||||
width?: number | null;
|
||||
height?: number | null;
|
||||
durationSeconds?: number | string | null;
|
||||
fileSizeBytes: number;
|
||||
watermarkedFileSizeBytes?: number | null;
|
||||
isActive: boolean;
|
||||
sortOrder: number;
|
||||
errorMessage?: string | null;
|
||||
processedAt?: string | null;
|
||||
createdAt?: string | null;
|
||||
updatedAt?: string | null;
|
||||
}
|
||||
|
||||
export interface HomeMaterialAssetUpdatePayload {
|
||||
category_id: string;
|
||||
title?: string | null;
|
||||
is_active: boolean;
|
||||
sort_order: number;
|
||||
}
|
||||
|
||||
export interface HomeMaterialAssetStatusOut {
|
||||
id: string;
|
||||
status: HomeMaterialAssetStatus;
|
||||
errorMessage?: string | null;
|
||||
originalUrl?: string | null;
|
||||
watermarkedUrl?: string | null;
|
||||
coverUrl?: string | null;
|
||||
processedAt?: string | null;
|
||||
}
|
||||
|
||||
export interface HomeMaterialUploadResult {
|
||||
id: string;
|
||||
categoryId: string;
|
||||
title?: string | null;
|
||||
mediaType: HomeMaterialMediaType;
|
||||
status: HomeMaterialAssetStatus;
|
||||
originalUrl?: string | null;
|
||||
watermarkedUrl?: string | null;
|
||||
coverUrl?: string | null;
|
||||
watermarkConfig?: HomeMaterialWatermarkConfig | Record<string, unknown> | null;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface HomeMaterialListResponse<T> {
|
||||
items: T[];
|
||||
total: number;
|
||||
}
|
||||
|
||||
export interface HomeMaterialCategoryQueryParams {
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
keyword?: string;
|
||||
isActive?: boolean;
|
||||
}
|
||||
|
||||
export interface HomeMaterialWatermarkQueryParams {
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
isActive?: boolean;
|
||||
}
|
||||
|
||||
export interface HomeMaterialAssetQueryParams {
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
categoryId?: string;
|
||||
mediaType?: HomeMaterialMediaType;
|
||||
status?: HomeMaterialAssetStatus;
|
||||
isActive?: boolean;
|
||||
keyword?: string;
|
||||
}
|
||||
|
||||
export interface HomeMaterialUploadAssetParams {
|
||||
categoryId: string;
|
||||
file: File;
|
||||
mediaType: HomeMaterialMediaType;
|
||||
title?: string | null;
|
||||
watermarkType: HomeMaterialWatermarkType;
|
||||
watermarkId?: string | null;
|
||||
watermarkFile?: File | null;
|
||||
opacityLevel: number;
|
||||
position: HomeMaterialWatermarkPosition;
|
||||
customXRatio?: number | null;
|
||||
customYRatio?: number | null;
|
||||
sizeMode: HomeMaterialWatermarkSizeMode;
|
||||
widthRatio?: number | null;
|
||||
widthPx?: number | null;
|
||||
marginX: number;
|
||||
marginY: number;
|
||||
textWatermark?: HomeMaterialTextWatermarkConfig | null;
|
||||
isActive: boolean;
|
||||
sortOrder: number;
|
||||
wait?: boolean;
|
||||
waitTimeoutSeconds?: number;
|
||||
}
|
||||
|
||||
export interface HomeMaterialRegeneratePayload {
|
||||
watermark_type: HomeMaterialWatermarkType;
|
||||
watermark_id?: string | null;
|
||||
opacity_level: number;
|
||||
position: HomeMaterialWatermarkPosition;
|
||||
custom_x_ratio?: number | null;
|
||||
custom_y_ratio?: number | null;
|
||||
size_mode: HomeMaterialWatermarkSizeMode;
|
||||
width_ratio?: number | null;
|
||||
width_px?: number | null;
|
||||
margin_x: number;
|
||||
margin_y: number;
|
||||
text_watermark?: HomeMaterialTextWatermarkPayload | null;
|
||||
wait?: boolean;
|
||||
wait_timeout_seconds?: number;
|
||||
}
|
||||
|
||||
export interface HomeMaterialTextWatermarkPreviewRequest {
|
||||
width: number;
|
||||
height: number;
|
||||
text_watermark: HomeMaterialTextWatermarkPayload;
|
||||
}
|
||||
|
||||
export interface HomeMaterialTextWatermarkPreviewResponse {
|
||||
width: number;
|
||||
height: number;
|
||||
previewLayerDataUrl: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user