import { Request, Response } from 'express'; import { DyFM_DataModel_Params } from '@futdevpro/fsm-dynamo'; import { DyNTS_AuthService } from '../../_services/core/auth.service'; import { DyNTS_EmailService } from '../../_services/core/email.service'; import { DyNTS_Service_Collection } from '../../_services/core/service-collection.service'; export interface DyNTS_GlobalService_Settings { /** * You need to setup your Own Auth Service extending the DyNTS_AuthService class */ authService?: DyNTS_AuthService, /** * You can setup your Own Email Service extending the DyNTS_EmailServiceCollection class */ emailServiceCollection?: DyNTS_Service_Collection, /** * you can setup data tables by passing a DyFM_DataModel_Params list at this point */ dbModels?: DyFM_DataModel_Params[], /** * you can setup other services by passing a DyNTS_SingletonService list at this point */ /* simpleServicesCollection?: DyNTS_SimpleServiceCollection, */ /** * you can setup socket services by passing a DyNTS_SocketServiceCollection list at this point */ /* socketServiceCollection?: DyNTS_SocketServiceCollection, */ /** * you can setup global error handler by passing a function at this point */ errorHandler?: DyNTS_GlobalErrorHandlerFn, } export type DyNTS_GlobalErrorHandlerFn = (err: any, req?: Request, res?: Response, issuer?: string) => Promise;