/** The path the ENGINE calls. Not api-server's — that is what this proxy translates. */ export declare const ENGINE_UPLOAD_PATH = "/api/generate-upload-url"; /** The api-server route it forwards to. */ export declare const API_SERVER_UPLOAD_PATH = "/api/cli/v1/uploads/signed-url"; /** * The engine's OPTIONAL brotli shortcut, which this proxy does not offer. * * `StorageUploadUtil.uploadTranscoded` tries this before the signed-URL path and is written to * cope with not finding it — game-play-agent implements it, this proxy does not, and the engine * documents "an older agent with no such route" as one of the cases it falls back from. So every * asset a bake uploads probes here first and the fallback then does the real work. * * That is correct and always was; what it also did was print two lines per upload — an * `[upload-proxy] ignoring …` in the forge log and a red `Failed to load resource: 404` in the * forwarded browser console — for a probe whose negative answer is the designed path. Answering it * deliberately is what makes the log describe what happened. */ export declare const ENGINE_TRANSCODE_PATH = "/api/upload-transcoded"; export interface UploadProxyOptions { /** api-server base URL, e.g. `https://beta.portal.bitmagic.cloud`. */ apiUrl: string; /** The creator's access token. Never leaves this process. */ token: string; /** The game the CLI project owns. Overrides whatever the page asks for. */ gameId: string; log?: (message: string) => void; /** Injected in tests. Defaults to global fetch. */ fetchImpl?: typeof fetch; } export interface UploadProxy { /** What `agentUrl` should be set to, e.g. `http://127.0.0.1:51234`. */ readonly url: string; close(): Promise; } export declare function startUploadProxy(options: UploadProxyOptions): Promise;