bknd
Version:
Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.
17 lines (16 loc) • 1.02 kB
TypeScript
import type { Api } from "../../../Api";
import type { ModuleConfigs } from "../../../modules";
export type SchemaActionsProps = {
api: Api;
setSchema: React.Dispatch<React.SetStateAction<any>>;
reloadSchema: () => Promise<void>;
};
export type TSchemaActions = ReturnType<typeof getSchemaActions>;
export declare function getSchemaActions({ api, setSchema, reloadSchema }: SchemaActionsProps): {
reload: () => Promise<void>;
set: <Module extends keyof ModuleConfigs>(module: keyof ModuleConfigs, value: ModuleConfigs[Module], force?: boolean) => Promise<boolean>;
patch: <Module extends keyof ModuleConfigs>(module: Module, path: string, value: any) => Promise<boolean>;
overwrite: <Module extends keyof ModuleConfigs>(module: Module, path: string, value: any) => Promise<boolean>;
add: <Module extends keyof ModuleConfigs>(module: Module, path: string, value: any) => Promise<boolean>;
remove: <Module extends keyof ModuleConfigs>(module: Module, path: string) => Promise<boolean>;
};