import type { Environment } from '../config/environments.js'; import type { ProjectContext } from '../project/context.js'; import { type VoxelizeFlags, type VoxelizeGlb } from './voxelize-glb.js'; export interface AddAssetOptions { context: ProjectContext; environment: Environment; token: string; filePath: string; name?: string; assetId?: string; keepGlb: boolean; /** Replace a still-referenced asset even when the type changes. See the gate in addAssetFile. */ force: boolean; voxel: VoxelizeFlags; fetchImpl?: typeof globalThis.fetch; voxelize?: VoxelizeGlb; now?: () => Date; log: (message: string) => void; } export interface AddAssetResult { assetId: string; name: string; type: string; url: string; size: number; sourceGlbUrl?: string; voxelCount?: number; /** True when an asset with this id already existed and was replaced. */ replaced: boolean; /** Anything the creator should know that is not an error — e.g. that audio went up untranscoded. */ notes: string[]; } /** * Biggest file this lane will upload. Not a server limit — api-server caps nothing — but a local * one: every byte is held in memory, gzipped in memory for the compressible types, and the object * is immutable once written with no delete endpoint anywhere, so an accidental multi-gigabyte * upload cannot be taken back. */ export declare const MAX_ASSET_BYTES: number; export declare function addAssetFile(options: AddAssetOptions): Promise;