UNPKG

bknd

Version:

Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.

85 lines (84 loc) 3.53 kB
import { s } from "bknd/utils"; import { Module } from "../../modules/Module"; export declare const serverConfigSchema: s.ObjectSchema<{ readonly cors: s.ObjectSchema<{ readonly origin: s.StringSchema<{ readonly default: "*"; }> & { readonly default: "*"; }; readonly allow_methods: s.ArraySchema<s.StringSchema<{ readonly enum: readonly ["GET", "POST", "PATCH", "PUT", "DELETE"]; }> & { readonly enum: readonly ["GET", "POST", "PATCH", "PUT", "DELETE"]; }, { readonly default: readonly ["GET", "POST", "PATCH", "PUT", "DELETE"]; readonly uniqueItems: true; }> & { readonly default: readonly ["GET", "POST", "PATCH", "PUT", "DELETE"]; readonly uniqueItems: true; }; readonly allow_headers: s.ArraySchema<s.StringSchema<s.IStringOptions> & s.IStringOptions, { readonly default: readonly ["Content-Type", "Content-Length", "Authorization", "Accept"]; }> & { readonly default: readonly ["Content-Type", "Content-Length", "Authorization", "Accept"]; }; readonly allow_credentials: s.Schema<{ readonly default: true; }, boolean, boolean> & { readonly default: true; }; }, s.Merge<s.IObjectOptions & { additionalProperties: false; }>>; }, s.Merge<s.IObjectOptions & { additionalProperties: false; }>>; export type AppServerConfig = s.Static<typeof serverConfigSchema>; export declare class AppServer extends Module<AppServerConfig> { getRestrictedPaths(): never[]; get client(): import("hono").Hono<import("../..").ServerEnv, import("hono/types").BlankSchema, "/">; getSchema(): s.ObjectSchema<{ readonly cors: s.ObjectSchema<{ readonly origin: s.StringSchema<{ readonly default: "*"; }> & { readonly default: "*"; }; readonly allow_methods: s.ArraySchema<s.StringSchema<{ readonly enum: readonly ["GET", "POST", "PATCH", "PUT", "DELETE"]; }> & { readonly enum: readonly ["GET", "POST", "PATCH", "PUT", "DELETE"]; }, { readonly default: readonly ["GET", "POST", "PATCH", "PUT", "DELETE"]; readonly uniqueItems: true; }> & { readonly default: readonly ["GET", "POST", "PATCH", "PUT", "DELETE"]; readonly uniqueItems: true; }; readonly allow_headers: s.ArraySchema<s.StringSchema<s.IStringOptions> & s.IStringOptions, { readonly default: readonly ["Content-Type", "Content-Length", "Authorization", "Accept"]; }> & { readonly default: readonly ["Content-Type", "Content-Length", "Authorization", "Accept"]; }; readonly allow_credentials: s.Schema<{ readonly default: true; }, boolean, boolean> & { readonly default: true; }; }, s.Merge<s.IObjectOptions & { additionalProperties: false; }>>; }, s.Merge<s.IObjectOptions & { additionalProperties: false; }>>; build(): Promise<void>; toJSON(secrets?: boolean): { cors: { origin: string; allow_methods: ("GET" | "POST" | "PATCH" | "PUT" | "DELETE")[]; allow_headers: string[]; allow_credentials: boolean; }; }; }