UNPKG

bknd

Version:

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

100 lines (99 loc) 3.62 kB
import type { App } from "../../../App"; import { type Entity } from "../../../data"; import { RelationAccessor } from "../../../data/relations/RelationAccessor"; import { Flow } from "../../../flows"; import type { BkndAdminOptions } from "../../../ui/client/BkndProvider"; 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: BkndAdminOptions; private _entities; private _relations; private _flows; constructor(appJson: AppType, _options?: BkndAdminOptions); get entities(): Entity[]; entity(_entity: Entity | string): Entity; get relations(): RelationAccessor; get flows(): Flow[]; get config(): { version: number; } & import("../../..").ModuleConfigs; get options(): { logo_return_path: string; basepath: string; theme?: import("../use-theme").AppTheme; }; getSettingsPath(path?: string[]): string; getAbsolutePath(path?: string): string; getAuthConfig(): { allow_register?: boolean | undefined; strategies?: { [x: string]: { enabled?: boolean | undefined; type: "password" | "oauth" | "custom_oauth"; config: { type: "oidc" | "oauth2"; name: "google" | "github"; client: { client_id: string; client_secret: string; }; } | { type: "oidc" | "oauth2"; name: string; client: { 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; }; } | { rounds?: number | undefined; hashing: "plain" | "sha256" | "bcrypt"; }; }; } | undefined; guard?: { enabled?: boolean | undefined; } | undefined; roles?: { [x: string]: { permissions?: string[] | undefined; is_default?: boolean | undefined; implicit_allow?: boolean | undefined; }; } | undefined; cookie: { path?: string | undefined; expires?: number | undefined; sameSite?: "strict" | "lax" | "none" | undefined; secure?: boolean | undefined; httpOnly?: boolean | undefined; renew?: boolean | undefined; pathSuccess?: string | undefined; pathLoggedOut?: string | undefined; }; enabled: boolean; basepath: string; entity_name: string; jwt: { alg?: "HS256" | "HS384" | "HS512" | undefined; expires?: number | undefined; issuer?: string | undefined; secret: string; fields: string[]; }; }; }