import express from "express"; import {Server as HttpServer} from "http"; import {Server as SocketServer} from "socket.io"; import OBACoreApi,{OBACoreConfig} from "@onebro/oba-core-api"; import {OBAExpressApiVars} from "./vars-types"; import {OBAExpressApiMiddlewareConfig} from "./middleware-types"; import {OBAExpressApiSocketsConfig} from "./sockets-main"; import { RouterEndpoint } from "./middleware-handler-types"; import { AnyBoolean } from "@onebro/oba-common"; export type OBAExpressApiConfigType = OBACoreConfig & Partial<{ vars:OBAExpressApiVars; middleware:OBAExpressApiMiddlewareConfig; sockets:OBAExpressApiSocketsConfig; }>; export type OBAExpressApiBaseTypeMethods = { monitor:() => Promise; createApp:() => Promise; startDB:() => Promise; startServer:() => Promise; initCore:(startDb?:AnyBoolean) => Promise; initServer:(startServer?:AnyBoolean) => Promise; init:(db?:AnyBoolean,server?:AnyBoolean) => Promise; }; export type OBAExpressApiBaseType = Omit,"config"> & OBAExpressApiBaseTypeMethods & { routes:RouterEndpoint[]; config:OBAExpressApiConfigType; vars:OBAExpressApiVars; app:express.Express; server:HttpServer; io:SocketServer; };