bknd
Version:
Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.
21 lines (20 loc) • 850 B
TypeScript
import { Api, type ApiOptions, type AuthState } from "../../Api";
import { type ReactNode } from "react";
import type { AdminBkndWindowContext } from "../../modules/server/AdminController";
export type BkndClientContext = {
baseUrl: string;
api: Api;
authState?: Partial<AuthState>;
};
export type ClientProviderProps = {
children?: ReactNode;
baseUrl?: string;
} & ApiOptions;
export declare const ClientProvider: ({ children, host, baseUrl: _baseUrl, ...props }: ClientProviderProps) => import("react/jsx-runtime").JSX.Element;
export declare const useApi: (host?: ApiOptions["host"]) => Api;
export declare const useClientContext: () => BkndClientContext;
/**
* @deprecated use useApi().baseUrl instead
*/
export declare const useBaseUrl: () => string;
export declare function useBkndWindowContext(): AdminBkndWindowContext;