import type Express from 'express'; import type { AbstractSqlModel, Definition } from '@balena/abstract-sql-compiler'; import type { Database } from '../database-layer/db.js'; import type { Dictionary, Resolvable } from '../sbvr-api/common-types.js'; import { type Migrations } from '../migrator/utils.js'; import * as sbvrUtils from '../sbvr-api/sbvr-utils.js'; import { type WebResourceHandler } from '../webresource-handler/index.js'; import type { AliasValidNodeType } from '../sbvr-api/translations.js'; export type SetupFunction = (app: Express.Application, sbvrUtilsInstance: typeof sbvrUtils, db: Database) => Resolvable; export interface Model { apiRoot?: string; modelName?: string; modelFile?: string; modelText?: string; abstractSql?: AbstractSqlModel; migrationsPath?: string; migrations?: Migrations; initSqlPath?: string; initSql?: string; customServerCode?: string | { setup: SetupFunction; }; logging?: { [key in keyof Console | 'default']?: boolean; }; translateTo?: Model['apiRoot']; translations?: Dictionary>; } export interface User { username: string; password: string; permissions?: string[]; } export interface Config { models: Model[]; users?: User[]; webResourceHandler?: WebResourceHandler; } export declare const setup: (app: Express.Application) => { loadConfig: (data: Config) => Promise; loadApplicationConfig: (config: string | Config | undefined) => Promise; };