UNPKG

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) 1.01 kB
import { type em as prototypeEm, FieldPrototype } from "../data/prototype"; import { Entity } from "../data/entities"; import type { EntityIndex, Field } from "../data/fields"; import type { ModuleBuildContext } from "./Module"; import type { EntityRelation } from "../data/relations"; export declare class ModuleHelper { protected ctx: Omit<ModuleBuildContext, "helper">; constructor(ctx: Omit<ModuleBuildContext, "helper">); get em(): import("..").EntityManager<import("..").DB>; get flags(): { sync_required: boolean; ctx_reload_required: boolean; }; ensureEntity(entity: Entity): void; ensureIndex(index: EntityIndex): void; ensureRelation(relation: EntityRelation): void; ensureSchema<Schema extends ReturnType<typeof prototypeEm>>(schema: Schema): Schema; setEntityFieldConfigs(parent: Field, child: Field, props?: string[]): number; replaceEntityField(_entity: string | Entity, field: Field | string, _newField: Field | FieldPrototype): void; }