import type { ControlTransport } from './types.js'; export interface UploadFileInfo { fileName: string; contentType: string; size: number; } export interface PresignedUpload { uploadUrl: string; fileUrl: string; objectKey: string; method: 'PUT'; headers: Record; expiresAt: string | null; } export interface UploadOptions { signal?: AbortSignal; timeoutMs?: number; } export interface UploadResult { url: string; objectKey: string; contentType: string; size: number; } export interface GameUploadsOptions { /** Override the presigner for an existing upload backend. Never return COS credentials. */ presign?: (file: UploadFileInfo) => Promise; fetch?: typeof fetch; } /** Image uploads use Runtime auth for the presign request, then PUT directly to COS. */ export declare class GameUploads { private readonly transport; readonly gameId: string; private readonly options; constructor(transport: ControlTransport, gameId: string, options?: GameUploadsOptions); getDownloadUrl(objectKey: string, options?: UploadOptions): Promise<{ url: string; objectKey: string; expiresAt: string | null; }>; createPresignedUpload(file: UploadFileInfo, options?: UploadOptions): Promise; uploadToPresignedUrl(file: Blob, target: PresignedUpload, options?: UploadOptions): Promise; uploadImage(file: Blob, options?: UploadOptions & { fileName?: string; }): Promise; }