bknd
Version:
Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.
35 lines (34 loc) • 1.21 kB
TypeScript
import type { App } from "../..";
import { type RuntimeBkndConfig, type RuntimeOptions } from "bknd/adapter";
type AwsLambdaEnv = object;
export type AwsLambdaBkndConfig<Env extends AwsLambdaEnv = AwsLambdaEnv> = RuntimeBkndConfig<Env> & {
assets?: {
mode: "local";
root: string;
} | {
mode: "url";
url: string;
};
};
export declare function createApp<Env extends AwsLambdaEnv = AwsLambdaEnv>({ adminOptions, assets, ...config }?: AwsLambdaBkndConfig<Env>, args?: Env, opts?: RuntimeOptions): Promise<App>;
export declare function serve<Env extends AwsLambdaEnv = AwsLambdaEnv>(config?: AwsLambdaBkndConfig<Env>, args?: Env, opts?: RuntimeOptions): (event: any) => Promise<({
statusCode: number;
statusDescription?: string;
body: string;
cookies?: string[];
isBase64Encoded: boolean;
} & {
headers: Record<string, string>;
multiValueHeaders?: undefined;
}) | ({
statusCode: number;
statusDescription?: string;
body: string;
cookies?: string[];
isBase64Encoded: boolean;
} & {
headers?: undefined;
multiValueHeaders: Record<string, string[]>;
})>;
export declare const serveLambda: typeof serve;
export {};