import { KVO, QueryOptions, V } from '@luics/x-server-orm'; import { Express } from 'express'; import { DataSourceOptions } from 'typeorm'; import * as TJS from 'typescript-json-schema'; export declare const appName = "typeorm-server"; export declare const singularTn = "singulars"; export declare type TypeormServerConfig = { typeorm: Omit & { entities: string[]; }; schema?: string | any; force?: boolean; staticDir?: string; tokens?: string[]; logLevel?: string; port?: number; isProduction?: boolean; quiet?: boolean; sqlRouter?: boolean; }; export declare type Result = { result: T; }; export declare function getAbsPath(p: string): string; export declare const setLogQuiet: (quiet: boolean) => void; export declare const log: (...args: any[]) => void; export declare const error: (...args: any[]) => void; /** * Called by cli & app */ export declare const generateSchema: (entitiesPath: string[]) => TJS.Definition; export declare function getTypeormServerConfig(_config: string | TypeormServerConfig): TypeormServerConfig; export declare function str(v: V | V[]): string; export declare function stri(v: V | V[]): number; export declare function parseQueryOptions(query: string | KVO): QueryOptions; /** * mysql query escape */ export declare function esc(text: string): string; /** * JS https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects * Mysql https://dev.mysql.com/doc/refman/5.7/en/data-types.html */ export declare const useTypeormServerRoutersAsync: (app: Express, _config: string | TypeormServerConfig, pathPrefix?: string) => Promise;