import type { MoteurClient } from '../client.js'; /** Where an asset is used. `title` is as stored: text, or text per language. */ export type AssetUsage = { kind: 'entry' | 'page'; modelId?: string; entryId?: string; pageId?: string; status?: string; title?: unknown; field: string; path: string; }; /** One page of the library (see `assets.page`). */ export type AssetPage = { assets: Record[]; /** Files matching the filters, on every page. */ total: number; offset: number; limit: number; /** With `facets`: files of each kind (and `unused`), and the folders in use. */ facets?: { total: number; kinds: Record; folders: string[]; }; }; export declare function projectAssetsApi(client: MoteurClient): { /** List assets; API returns an array directly (not { assets: [] }). */ list(projectId: string, params?: { type?: string; folder?: string; search?: string; hash?: string; }): Promise[]>; /** * One page of the library, newest first, without files in the bin: by `type` (or * `unused`), `folder` (`''` for none) and `search` (accents ignored). `limit` is 1–500. */ page(projectId: string, params: { limit: number; offset?: number; type?: string; folder?: string; search?: string; facets?: boolean; }): Promise; get(projectId: string, id: string): Promise>; upload(projectId: string, formData: FormData): Promise>; update(projectId: string, id: string, body: Record): Promise>; /** A new file for the asset, keeping its id (same kind of file only). */ replace(projectId: string, id: string, formData: FormData): Promise>; /** Asks a video's host now where it stands (the server also asks on its own). */ checkVideo(projectId: string, id: string): Promise>; /** Sends a video its host refused once more, from the copy kept on the server. */ retryVideo(projectId: string, id: string): Promise>; /** Moves the asset to the bin; `restore` brings it back. */ delete(projectId: string, id: string): Promise; /** Assets in the bin, most recently deleted first. */ bin(projectId: string): Promise[]>; /** Takes an asset out of the bin. */ restore(projectId: string, id: string): Promise>; /** Deletes an asset in the bin for good, files included (admins). */ deleteForever(projectId: string, id: string): Promise; /** Deletes everything in the bin for good (admins). */ emptyBin(projectId: string): Promise<{ deleted: number; }>; /** * Remakes images' sizes (all of them without `assetIds`; admins). Answers when done with * `{ processed, errors }`, or at once with `{ queued }` when `background` is set. */ regenerate(projectId: string, assetIds?: string[], options?: { background?: boolean; }): Promise<{ processed?: number; errors?: number; queued?: number; }>; /** How many entry and page fields use each asset; unused assets are left out. */ usageCounts(projectId: string): Promise<{ counts: Record; }>; /** Every entry and page field using the asset. */ usage(projectId: string, id: string): Promise<{ usages: AssetUsage[]; }>; move(projectId: string, id: string, folder: string): Promise>; /** * Several assets at once, in one save (all or nothing, at most 500): to the bin, out of * it, to a folder (`''` for none), or each its own changes (title, alt, caption, credit, * folder…). Answers with the assets as they are now. */ batch(projectId: string, batch: { action: "bin" | "restore"; ids: string[]; } | { action: "move"; ids: string[]; folder: string; } | { action: "update"; changes: { id: string; patch: Record; }[]; }): Promise<{ assets: Record[]; }>; }; //# sourceMappingURL=assets.d.ts.map