bknd
Version:
Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.
34 lines (33 loc) • 1.49 kB
TypeScript
import type { ModuleConfigs, ModuleSchemas } from "../../modules";
import { type TSchemaActions, getSchemaActions } from "./schema/actions";
import { AppReduced } from "./utils/AppReduced";
import type { AppTheme } from "../../ui/client/use-theme";
export type BkndAdminOptions = {
logo_return_path?: string;
basepath?: string;
theme?: AppTheme;
};
type BkndContext = {
version: number;
schema: ModuleSchemas;
config: ModuleConfigs;
permissions: string[];
hasSecrets: boolean;
requireSecrets: () => Promise<void>;
actions: ReturnType<typeof getSchemaActions>;
app: AppReduced;
options: BkndAdminOptions;
fallback: boolean;
};
declare const BkndContext: import("react").Context<BkndContext>;
export type { TSchemaActions };
export declare function BkndProvider({ includeSecrets, options, children, fallback, }: {
includeSecrets?: boolean;
children: any;
fallback?: React.ReactNode;
options?: BkndAdminOptions;
}): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null;
export declare function useBknd({ withSecrets }?: {
withSecrets?: boolean;
}): BkndContext;
export declare function useBkndOptions(): BkndAdminOptions;