first commit

Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
HouYunFei
2026-05-19 19:50:36 +08:00
co-authored by Codex
commit 472bf8b732
133 changed files with 16869 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
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<AssetLibraryResponse>("/api/assets", compactApiParams(query));
}