import type { IKAApiOptions, TTablesDefinition, TTableDefinition, TTablesDefinitionNormalized, TKAAPISchemas, TKAVerbs, JSONSchemaProps, TColumnsInfo, TKACrudOptions, TTableDefinitionNormalized } from '../types.js'; import type { Knex } from 'knex'; import { SchemaInspector } from 'knex-schema-inspector-mk'; declare class API { private _fastify; private _knex; private _tables; private _schemas; private _columnSchema; private _schemaDirPath; private _checkAuth; private _prefix; private _verbs; schemaInspector: ReturnType; isInizialized: Promise; constructor(params: IKAApiOptions); initialize(tables: TTablesDefinition): Promise; /** * Builds the options to register crud routes for a given table. * @param {Object} table - The table object. * @returns {Object} - The options for registration routes. */ _buildOptReg(table: TTableDefinitionNormalized): Promise; _buildSchema(table: TTableDefinitionNormalized, columnsInfo: TColumnsInfo): Promise; _getTableSchema(tableName: string, columnsInfo: TColumnsInfo): Record; _buildPropsFromColumnsInfo(tableName: string, columnsInfo: TColumnsInfo): Record; _appendResponseToSchemas(schemas: TKAAPISchemas, ref_id: string): TKAAPISchemas; _initProps(name: string, columnInfo: Knex.ColumnInfo): JSONSchemaProps; _loadSchemaDirPath(table: TTableDefinition, schema: TKAAPISchemas): Promise; _normalizeTables(tables: IKAApiOptions['tables']): Promise; _getVerbs(tableName: string): Promise; _getDBTables(): Promise; _getPks(table: TTableDefinition): Promise; } export default API;