import { apiGet, compactApiParams } from "@/services/api/request"; export type AssetLibraryItem = { id: string; title: string; type: "text" | "image" | "video"; coverUrl: string; tags: string[]; category: string; description: string; content: string; url: string; createdAt: string; updatedAt: string; }; export type AssetLibraryResponse = { items: AssetLibraryItem[]; tags: string[]; total: number; }; export type AssetLibraryQuery = { keyword?: string; type?: string; tag?: string[]; page?: number; pageSize?: number; }; export async function fetchAssetLibrary(query: AssetLibraryQuery = {}) { return apiGet("/api/assets", compactApiParams(query)); }