UNPKG

bknd

Version:

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

74 lines (73 loc) 1.95 kB
import type { PrimaryFieldType } from "../.."; export declare const routes: { data: { root: () => string; entity: { list: (entity: string) => string; create: (entity: string) => string; edit: (entity: string, id: PrimaryFieldType) => string; }; schema: { root: () => string; entity: (entity: string) => string; }; }; auth: { root: () => string; users: { list: () => string; edit: (id: PrimaryFieldType) => string; }; roles: { list: () => string; edit: (role: string) => string; }; settings: () => string; strategies: () => string; }; flows: { root: () => string; flows: { list: () => string; edit: (id: PrimaryFieldType) => string; }; }; settings: { root: () => string; path: (path: string[]) => string; }; }; export declare function withQuery(url: string, query: object): string; export declare function withAbsolute(url: string): string; export declare function useRouteNavigate(): (fn: (r: typeof routes) => string, options?: Parameters<(url: string, options?: { query?: object; absolute?: boolean; replace?: boolean; state?: any; transition?: boolean; } | { reload: true; } | { target: string; }) => void>[1]) => void; export declare function useNavigate(): readonly [(url: string, options?: { query?: object; absolute?: boolean; replace?: boolean; state?: any; transition?: boolean; } | { reload: true; } | { target: string; }) => void, string, (opts?: { fallback?: string; }) => void]; export declare function useGoBack(fallback?: string | (() => void), options?: { native?: boolean; absolute?: boolean; }): { same: boolean; canGoBack: boolean; goBack: () => void; };