import { InductModelOpts, InductModelFactory, GenericModelFactory, HandlerFunction } from "./types/model-schema"; import { InductModel } from "./gen-model"; import { RequestHandler, Router } from "express"; import { AzureFunction } from "@azure/functions"; import knex from "knex"; export interface InductConstructorOpts { /** KnexJS database connection object */ connection: knex; /** Schema class for typesafety and validation */ schema: new (val: T) => T; /** Name of ID field to use for lookups */ idField: keyof T; /** Name of the table to query */ tableName: string; /** url parameter for resource ID's. Default = "id" */ idParam?: string; /** Set to true for bulk operations accross the whole table, skipping individual validation */ all?: boolean; /** Set to true to validate input data on instantiation */ validate?: boolean; /** Array of field names that are returned in lookup controllers */ fieldsList?: Array; /** [NOT IMPLEMENTED] Array of field names that can be used as a lookup field */ additionalLookupFields?: Array; /** [NOT IMPLEMENTED] Custom model factory function */ modelFactory?: InductModelFactory | GenericModelFactory; } export declare class Induct { private connection; private schema; private idField; private idParam; private fieldsList; private tableName; private all; private validate; private modelFactory; private lookupFields; constructor(args: InductConstructorOpts); private _getModelOptions; model(data: T, opts?: InductModelOpts): Promise>; handler(modelFn: HandlerFunction, opts?: Partial>): RequestHandler; private lookupHandler; private modifyHandler; azureFunctionsRouter(opts?: Partial>): AzureFunction; router(): Router; }