UNPKG

bknd

Version:

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

119 lines (118 loc) 4.63 kB
import type { App } from "../../../App"; import type { Entity } from "../../../data/entities"; import { RelationAccessor } from "../../../data/relations/RelationAccessor"; import { Flow } from "../../../flows"; import type { BkndAdminProps } from "../../../ui/Admin"; export type AppType = ReturnType<App["toJSON"]>; /** * Reduced version of the App class for frontend use * @todo: remove this class */ export declare class AppReduced { protected appJson: AppType; protected _options: BkndAdminProps["config"]; private _entities; private _relations; private _flows; constructor(appJson: AppType, _options?: BkndAdminProps["config"]); get entities(): Entity[]; entity(_entity: Entity | string): Entity; get relations(): RelationAccessor; get flows(): Flow[]; get config(): { version: number; } & import("../../..").ModuleConfigs; get options(): { basepath: string; logo_return_path: string; theme?: import("../use-theme").AppTheme; entities?: import("../..").BkndAdminEntitiesOptions; appShell?: import("../..").BkndAdminAppShellOptions; }; getSettingsPath(path?: string[]): string; getAbsolutePath(path?: string): string; getAuthConfig(): { [x: string]: unknown; allow_register?: boolean | undefined; default_role_register?: string | undefined; guard?: { [x: string]: unknown; enabled?: boolean | undefined; } | undefined; roles?: { [x: string]: { permissions?: string[] | { effect?: "allow" | "deny" | undefined; policies?: { description?: string | undefined; filter?: import("../../../core/object/query/object-query").ObjectQuery | undefined; effect?: "filter" | "allow" | "deny" | undefined; condition?: import("../../../core/object/query/object-query").ObjectQuery | undefined; }[] | undefined; permission: string; }[] | undefined; is_default?: boolean | undefined; implicit_allow?: boolean | undefined; }; } | undefined; enabled: boolean; basepath: string; entity_name: string; strategies: { [x: string]: { enabled?: boolean | undefined; type: "password" | "oauth" | "custom_oauth"; config: { minLength?: number | undefined; rounds?: number | undefined; hashing: "plain" | "sha256" | "bcrypt"; } | { [x: string]: unknown; name: "google" | "github"; type: "oidc" | "oauth2"; client: { client_id: string; client_secret: string; }; } | { name: string; type: "oidc" | "oauth2"; client: { [x: string]: unknown; client_id: string; client_secret: string; token_endpoint_auth_method: "client_secret_basic"; }; as: { code_challenge_methods_supported?: "S256" | undefined; scopes_supported?: string[] | undefined; scope_separator?: string | undefined; authorization_endpoint?: string | undefined; token_endpoint?: string | undefined; userinfo_endpoint?: string | undefined; issuer: string; }; }; }; }; jwt: { alg?: "HS256" | "HS384" | "HS512" | undefined; expires?: number | undefined; issuer?: string | undefined; secret: string; fields: string[]; }; cookie: { path?: string | undefined; expires?: number | undefined; domain?: string | undefined; sameSite?: "strict" | "lax" | "none" | undefined; secure?: boolean | undefined; httpOnly?: boolean | undefined; partitioned?: boolean | undefined; renew?: boolean | undefined; pathSuccess?: string | undefined; pathLoggedOut?: string | undefined; }; }; }