import type { CommonHttpClientFetchRequest, CommonHttpClientFetchResponse } from "api-typescript-generator/openapi-client"; import type { AnyResponse } from "./common"; /** * A fetch-like function compatible with `@forge/api`'s `fetch`. */ type ForgeApiFetchFunction = (url: string, init?: { method?: string; headers?: Record; body?: unknown; redirect?: string; }) => Promise; /** * Options for creating a Forge API fetch function. * * @category API Client Constructor Options */ export interface ApiClientForgeApiExternalOptions { /** * Fetch function from the browser or `@forge/api` package. */ fetch: ForgeApiFetchFunction; /** * Base URL for the cloud website. */ baseUrl: string; /** * Optional system token for authentication. */ systemToken?: string; } export declare function createForgeApiExternalFetch({ fetch, systemToken, }: ApiClientForgeApiExternalOptions): (url: URL, request: CommonHttpClientFetchRequest) => Promise; export {};