UNPKG

@fal-ai/server-proxy

Version:

The fal.ai server proxy adapter for JavaScript and TypeScript Web frameworks

19 lines (18 loc) 685 B
import type { ActionFunction, LoaderFunction, json as jsonFunction } from "@remix-run/node"; export type FalRemixProxy = { action: ActionFunction; loader: LoaderFunction; }; export type FalRemixProxyOptions = { /** * The reference to the `json` function from the Remix runtime. * e.g. `import { json } from "@remix-run/node";` */ json: typeof jsonFunction; /** * A function to resolve the API key used by the proxy. * By default, it uses the `FAL_KEY` environment variable. */ resolveApiKey?: () => Promise<string | undefined>; }; export declare function createProxy({ json, resolveApiKey, }: FalRemixProxyOptions): FalRemixProxy;