import type { Context } from "../context.js"; import { Resource } from "../resource.js"; /** * Properties for creating or updating Assets */ export interface AssetsProps { /** * Path to a directory containing static assets to be uploaded * These files will be served by Cloudflare's Workers runtime */ path: string; } /** * Output returned after Assets creation/update */ export interface Assets extends Resource<"cloudflare::Asset">, AssetsProps { /** * The type of binding */ type: "assets"; /** * The ID of the assets bundle */ id: string; /** * Asset files that were found */ files: AssetFile[]; /** * Time at which the assets were created */ createdAt: number; /** * Time at which the assets were last updated */ updatedAt: number; } /** * Represents a single asset file */ export interface AssetFile { /** * Path relative to the assets directory */ path: string; /** * Full filesystem path to the file */ filePath: string; /** * Content type of the file */ contentType: string; } /** * Cloudflare Assets represent a collection of static files that can be uploaded and served * by Cloudflare Workers. * * @example * // Create a basic assets bundle from a local directory * const staticAssets = await Assets("static", { * path: "./src/assets" * }); * * // Use these assets with a worker * const worker = await Worker("frontend", { * name: "frontend-worker", * entrypoint: "./src/worker.ts", * bindings: { * ASSETS: staticAssets * } * }); */ export declare const Assets: (((this: any, id: string, props?: {}) => never) & (new (_: never) => never)) | ((this: Context, id: string, props: AssetsProps) => Promise); //# sourceMappingURL=assets.d.ts.map