import type { EngineDriver, ExtensionsDirectory } from 'dbgate-types'; export declare function isValidJsIdentifier(name: string): boolean; export declare function assertValidJsIdentifier(name: string, label: string): void; /** * Tests whether a value is a canonical DbGate plugin package name (dbgate-plugin-). * By construction this rejects absolute paths, path traversal (..), path separators * and scoped/@-names, none of which may ever be passed to require()/require.resolve(). */ export declare function isValidPluginPackageName(packageName: any): boolean; /** * Asserts that packageName is a canonical DbGate plugin package name. * Must be called before any code path that resolves or require()s a plugin by name, * so that caller-supplied paths cannot be loaded as modules. */ export declare function assertValidPluginPackageName(packageName: any): string; /** * Validates a shell API function name. * Allowed forms: * - "someFunctionName" (plain identifier, resolved as dbgateApi.someFunctionName) * - "funcName@dbgate-plugin-xxx" (namespaced, resolved as plugin.shellApi.funcName) */ export declare function assertValidShellApiFunctionName(functionName: string): void; export declare function extractShellApiPlugins(functionName: any, props: any): string[]; export declare function extractPackageName(name: any): string; export declare function compileShellApiFunctionName(functionName: any): string; export declare function evalShellApiFunctionName(functionName: any, dbgateApi: any, requirePlugin: any): any; export declare function findEngineDriver(connection: any, extensions: ExtensionsDirectory): EngineDriver;