import type { Express } from "express"; import type { ExpressReq, ExpressRes } from "./Auth/AuthTypes"; import type { Prostgles } from "./Prostgles"; import type { VoidFunction } from "./SchemaWatch/SchemaWatch"; type ExpressInternalRouter = { stack?: { name: string; handle: VoidFunction; path: undefined; keys?: any[]; route?: { path?: string; methods?: { get?: boolean; post?: boolean; put?: boolean; delete?: boolean; }; }; }[]; }; export type ExpressApp = { _router?: ExpressInternalRouter; router?: ExpressInternalRouter; } & Omit; export type RestApiConfig = { /** * Express server instance */ expressApp: Express; /** * Defaults to "/api" */ path?: string; }; export declare class RestApi { prostgles: Prostgles; routes: { db: string; sql: string; methods: string; schema: string; }; expressApp: ExpressApp; path: string; constructor({ expressApp, path, prostgles }: RestApiConfig & { prostgles: Prostgles; }); destroy: () => void; onPostMethod: (req: ExpressReq, res: ExpressRes) => Promise; onPostSchema: (req: ExpressReq, res: ExpressRes) => Promise; onPostSql: (req: ExpressReq, res: ExpressRes) => Promise; onPostTableCommand: (req: ExpressReq, res: ExpressRes) => Promise; } export {}; //# sourceMappingURL=RestApi.d.ts.map