export declare const TARGET_URL_HEADER = "x-fal-target-url"; export declare const DEFAULT_PROXY_ROUTE = "/api/fal/proxy"; export type HeaderValue = string | string[] | undefined | null; /** * The proxy behavior that is passed to the proxy handler. This is a subset of * request objects that are used by different frameworks, like Express and NextJS. */ export interface ProxyBehavior { id: string; method: string; respondWith(status: number, data: string | any): ResponseType; sendResponse(response: Response): Promise; getHeaders(): Record; getHeader(name: string): HeaderValue; sendHeader(name: string, value: string): void; getRequestBody(): Promise; resolveApiKey?: () => Promise; } /** * A request handler that proxies the request to the fal-serverless * endpoint. This is useful so client-side calls to the fal-serverless endpoint * can be made without CORS issues and the correct credentials can be added * effortlessly. * * @param behavior the request proxy behavior. * @returns Promise the promise that will be resolved once the request is done. */ export declare function handleRequest(behavior: ProxyBehavior): Promise; export declare function fromHeaders(headers: Headers): Record; export declare const responsePassthrough: (res: Response) => Promise; export declare const resolveApiKeyFromEnv: () => Promise;