export interface UploadedTexture { /** Content-addressed name in `data/textures/`: `{sha256}.{png|jpg|webp|gif}` (see `isTextureFile`). */ file: string; width: number; height: number; bytes: number; } export interface StoredTexture { file: string; bytes: number; updatedAt: string; } /** * An upload is raw bytes rather than a multipart form: name, size and format are derived from the * image itself on the server, so there is nothing else to send. */ export interface TextureStore { /** * `type` only fills the Content-Type header – the server trusts the bytes, not the label – and * uploading the same picture twice yields the same file, the hash of its content. */ upload(bytes: Blob | ArrayBuffer, type: string): Promise; list(): Promise; delete(file: string): Promise; }