@minimaltech/node-infra
Version:
Minimal Technology NodeJS Infrastructure - Loopback 4 Framework
309 lines (308 loc) • 29.4 kB
TypeScript
import { ClassType, IApplication, IEnvironmentValidationResult, IRepository, IService } from '../../common/types';
import { ApplicationLogger } from '../../helpers';
import { ApplicationConfig, Binding, BindingFromClassOptions, BindingScope, Constructor, ControllerClass } from '@loopback/core';
import { Repository } from '@loopback/repository';
import { RestApplication, SequenceHandler } from '@loopback/rest';
import { BaseEntity } from '../base.model';
declare const BaseApplication_base: (new (...args: any[]) => {
projectRoot: string;
bootOptions?: import("@loopback/boot").BootOptions | undefined;
booted: boolean;
start(): Promise<void>;
boot(): Promise<void>;
booters(...booterCls: Constructor<import("@loopback/boot").Booter>[]): Binding[];
applicationBooter(subApp: import("@loopback/core").Application & import("@loopback/boot").Bootable, filter?: import("@loopback/core").BindingFilter): Binding<import("@loopback/boot").Booter>;
component<C extends import("@loopback/core").Component = import("@loopback/core").Component>(componentCtor: Constructor<C>, nameOrOptions?: string | BindingFromClassOptions): Binding<C>;
mountComponentBooters(componentInstanceOrClass: Constructor<unknown> | import("@loopback/boot").InstanceWithBooters): void;
readonly options: import("@loopback/core").ApplicationConfig;
readonly state: string;
controller: <T>(controllerCtor: import("@loopback/core").ControllerClass<T>, nameOrOptions?: string | BindingFromClassOptions | undefined) => Binding<T>;
server: <T_1 extends import("@loopback/core").Server>(ctor: Constructor<T_1>, nameOrOptions?: string | BindingFromClassOptions | undefined) => Binding<T_1>;
servers: <T_2 extends import("@loopback/core").Server>(ctors: Constructor<T_2>[]) => Binding<any>[];
getServer: <T_3 extends import("@loopback/core").Server>(target: string | Constructor<T_3>) => Promise<T_3>;
init: () => Promise<void>;
onInit: (fn: () => import("@loopback/core").ValueOrPromise<void>) => Binding<import("@loopback/core").LifeCycleObserver>;
onStart: (fn: () => import("@loopback/core").ValueOrPromise<void>) => Binding<import("@loopback/core").LifeCycleObserver>;
stop: () => Promise<void>;
onStop: (fn: () => import("@loopback/core").ValueOrPromise<void>) => Binding<import("@loopback/core").LifeCycleObserver>;
setMetadata: (metadata: import("@loopback/core").ApplicationMetadata) => void;
lifeCycleObserver: <T_4 extends import("@loopback/core").LifeCycleObserver>(ctor: Constructor<T_4>, nameOrOptions?: string | BindingFromClassOptions | undefined) => Binding<T_4>;
service: <S>(cls: import("@loopback/core").ServiceOrProviderClass<S>, nameOrOptions?: string | import("@loopback/core").ServiceOptions | undefined) => Binding<S>;
interceptor: (interceptor: import("@loopback/core").Interceptor | Constructor<import("@loopback/core").Provider<import("@loopback/core").Interceptor>>, nameOrOptions?: string | import("@loopback/core").InterceptorBindingOptions | undefined) => Binding<import("@loopback/core").Interceptor>;
readonly name: string;
readonly subscriptionManager: import("@loopback/core").ContextSubscriptionManager;
scope: BindingScope;
readonly parent: import("@loopback/core").Context | undefined;
emitEvent: <T_5 extends import("@loopback/core").ContextEvent>(type: string, event: T_5) => void;
emitError: (err: unknown) => void;
bind: <ValueType = any>(key: import("@loopback/core").BindingAddress<ValueType>) => Binding<ValueType>;
add: (binding: Binding<unknown>) => import("@loopback/core").Application;
configure: <ConfigValueType = any>(key?: import("@loopback/core").BindingAddress | undefined) => Binding<ConfigValueType>;
getConfigAsValueOrPromise: <ConfigValueType_1>(key: import("@loopback/core").BindingAddress, propertyPath?: string | undefined, resolutionOptions?: import("@loopback/core").ResolutionOptions | undefined) => import("@loopback/core").ValueOrPromise<ConfigValueType_1 | undefined>;
getConfig: <ConfigValueType_2>(key: import("@loopback/core").BindingAddress, propertyPath?: string | undefined, resolutionOptions?: import("@loopback/core").ResolutionOptions | undefined) => Promise<ConfigValueType_2 | undefined>;
getConfigSync: <ConfigValueType_3>(key: import("@loopback/core").BindingAddress, propertyPath?: string | undefined, resolutionOptions?: import("@loopback/core").ResolutionOptions | undefined) => ConfigValueType_3 | undefined;
unbind: (key: import("@loopback/core").BindingAddress) => boolean;
subscribe: (observer: import("@loopback/core").ContextEventObserver) => import("@loopback/core").Subscription;
unsubscribe: (observer: import("@loopback/core").ContextEventObserver) => boolean;
close: () => void;
isSubscribed: (observer: import("@loopback/core").ContextObserver) => boolean;
createView: <T_6 = unknown>(filter: import("@loopback/core").BindingFilter, comparator?: import("@loopback/core").BindingComparator | undefined, options?: Omit<import("@loopback/core").ResolutionOptions, "session"> | undefined) => import("@loopback/core").ContextView<T_6>;
contains: (key: import("@loopback/core").BindingAddress) => boolean;
isBound: (key: import("@loopback/core").BindingAddress) => boolean;
getOwnerContext: (keyOrBinding: Readonly<Binding<unknown>> | import("@loopback/core").BindingAddress) => import("@loopback/core").Context | undefined;
getScopedContext: (scope: BindingScope.APPLICATION | BindingScope.SERVER | BindingScope.REQUEST) => import("@loopback/core").Context | undefined;
getResolutionContext: (binding: Readonly<Binding<unknown>>) => import("@loopback/core").Context | undefined;
isVisibleTo: (ctx: import("@loopback/core").Context) => boolean;
find: <ValueType_1 = any>(pattern?: string | RegExp | import("@loopback/core").BindingFilter | undefined) => Readonly<Binding<ValueType_1>>[];
findByTag: <ValueType_2 = any>(tagFilter: RegExp | import("@loopback/core").BindingTag) => Readonly<Binding<ValueType_2>>[];
get: {
<ValueType_3>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_3>, session?: import("@loopback/core").ResolutionSession | undefined): Promise<ValueType_3>;
<ValueType_4>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_4>, options: import("@loopback/core").ResolutionOptions): Promise<ValueType_4 | undefined>;
};
getSync: {
<ValueType_5>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_5>, session?: import("@loopback/core").ResolutionSession | undefined): ValueType_5;
<ValueType_6>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_6>, options?: import("@loopback/core").ResolutionOptions | undefined): ValueType_6 | undefined;
};
getBinding: {
<ValueType_7 = any>(key: import("@loopback/core").BindingAddress<ValueType_7>): Binding<ValueType_7>;
<ValueType_8>(key: import("@loopback/core").BindingAddress<ValueType_8>, options?: {
optional?: boolean | undefined;
} | undefined): Binding<ValueType_8> | undefined;
};
findOrCreateBinding: <T_7>(key: import("@loopback/core").BindingAddress<T_7>, policy?: import("@loopback/core").BindingCreationPolicy | undefined) => Binding<T_7>;
getValueOrPromise: <ValueType_9>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_9>, optionsOrSession?: import("@loopback/core").ResolutionOptionsOrSession | undefined) => import("@loopback/core").ValueOrPromise<ValueType_9 | undefined>;
toJSON: () => import("@loopback/core").JSONObject;
inspect: (options?: import("@loopback/core").ContextInspectOptions | undefined) => import("@loopback/core").JSONObject;
on: {
(eventName: "bind" | "unbind", listener: import("@loopback/core").ContextEventListener): import("@loopback/core").Application;
(event: string | symbol, listener: (...args: any[]) => void): import("@loopback/core").Application;
};
once: {
(eventName: "bind" | "unbind", listener: import("@loopback/core").ContextEventListener): import("@loopback/core").Application;
(event: string | symbol, listener: (...args: any[]) => void): import("@loopback/core").Application;
};
[EventEmitter.captureRejectionSymbol]?: (<K>(error: Error, event: string | symbol, ...args: any[]) => void) | undefined;
addListener: <K_1>(eventName: string | symbol, listener: (...args: any[]) => void) => import("@loopback/core").Application;
removeListener: <K_2>(eventName: string | symbol, listener: (...args: any[]) => void) => import("@loopback/core").Application;
off: <K_3>(eventName: string | symbol, listener: (...args: any[]) => void) => import("@loopback/core").Application;
removeAllListeners: (event?: string | symbol | undefined) => import("@loopback/core").Application;
setMaxListeners: (n: number) => import("@loopback/core").Application;
getMaxListeners: () => number;
listeners: <K_4>(eventName: string | symbol) => Function[];
rawListeners: <K_5>(eventName: string | symbol) => Function[];
emit: <K_6>(eventName: string | symbol, ...args: any[]) => boolean;
listenerCount: <K_7>(eventName: string | symbol, listener?: Function | undefined) => number;
prependListener: <K_8>(eventName: string | symbol, listener: (...args: any[]) => void) => import("@loopback/core").Application;
prependOnceListener: <K_9>(eventName: string | symbol, listener: (...args: any[]) => void) => import("@loopback/core").Application;
eventNames: () => (string | symbol)[];
}) & (new (...args: any[]) => {
serviceProvider<S>(provider: Constructor<import("@loopback/core").Provider<S>>, nameOrOptions?: string | import("@loopback/core").ServiceOptions): Binding<S>;
component<C extends import("@loopback/core").Component = import("@loopback/core").Component>(componentCtor: Constructor<C>, nameOrOptions?: string | BindingFromClassOptions): Binding<C>;
mountComponentServices<C_1 extends import("@loopback/core").Component = import("@loopback/core").Component>(component: Constructor<C_1>, componentBindingKey?: import("@loopback/core").BindingAddress<C_1> | undefined): void;
readonly options: import("@loopback/core").ApplicationConfig;
readonly state: string;
controller: <T>(controllerCtor: import("@loopback/core").ControllerClass<T>, nameOrOptions?: string | BindingFromClassOptions | undefined) => Binding<T>;
server: <T_1 extends import("@loopback/core").Server>(ctor: Constructor<T_1>, nameOrOptions?: string | BindingFromClassOptions | undefined) => Binding<T_1>;
servers: <T_2 extends import("@loopback/core").Server>(ctors: Constructor<T_2>[]) => Binding<any>[];
getServer: <T_3 extends import("@loopback/core").Server>(target: string | Constructor<T_3>) => Promise<T_3>;
init: () => Promise<void>;
onInit: (fn: () => import("@loopback/core").ValueOrPromise<void>) => Binding<import("@loopback/core").LifeCycleObserver>;
start: () => Promise<void>;
onStart: (fn: () => import("@loopback/core").ValueOrPromise<void>) => Binding<import("@loopback/core").LifeCycleObserver>;
stop: () => Promise<void>;
onStop: (fn: () => import("@loopback/core").ValueOrPromise<void>) => Binding<import("@loopback/core").LifeCycleObserver>;
setMetadata: (metadata: import("@loopback/core").ApplicationMetadata) => void;
lifeCycleObserver: <T_4 extends import("@loopback/core").LifeCycleObserver>(ctor: Constructor<T_4>, nameOrOptions?: string | BindingFromClassOptions | undefined) => Binding<T_4>;
service: <S_1>(cls: import("@loopback/core").ServiceOrProviderClass<S_1>, nameOrOptions?: string | import("@loopback/core").ServiceOptions | undefined) => Binding<S_1>;
interceptor: (interceptor: import("@loopback/core").Interceptor | Constructor<import("@loopback/core").Provider<import("@loopback/core").Interceptor>>, nameOrOptions?: string | import("@loopback/core").InterceptorBindingOptions | undefined) => Binding<import("@loopback/core").Interceptor>;
readonly name: string;
readonly subscriptionManager: import("@loopback/core").ContextSubscriptionManager;
scope: import("@loopback/core").BindingScope;
readonly parent: import("@loopback/core").Context | undefined;
emitEvent: <T_5 extends import("@loopback/core").ContextEvent>(type: string, event: T_5) => void;
emitError: (err: unknown) => void;
bind: <ValueType = any>(key: import("@loopback/core").BindingAddress<ValueType>) => Binding<ValueType>;
add: (binding: Binding<unknown>) => import("@loopback/core").Application;
configure: <ConfigValueType = any>(key?: import("@loopback/core").BindingAddress | undefined) => Binding<ConfigValueType>;
getConfigAsValueOrPromise: <ConfigValueType_1>(key: import("@loopback/core").BindingAddress, propertyPath?: string | undefined, resolutionOptions?: import("@loopback/core").ResolutionOptions | undefined) => import("@loopback/core").ValueOrPromise<ConfigValueType_1 | undefined>;
getConfig: <ConfigValueType_2>(key: import("@loopback/core").BindingAddress, propertyPath?: string | undefined, resolutionOptions?: import("@loopback/core").ResolutionOptions | undefined) => Promise<ConfigValueType_2 | undefined>;
getConfigSync: <ConfigValueType_3>(key: import("@loopback/core").BindingAddress, propertyPath?: string | undefined, resolutionOptions?: import("@loopback/core").ResolutionOptions | undefined) => ConfigValueType_3 | undefined;
unbind: (key: import("@loopback/core").BindingAddress) => boolean;
subscribe: (observer: import("@loopback/core").ContextEventObserver) => import("@loopback/core").Subscription;
unsubscribe: (observer: import("@loopback/core").ContextEventObserver) => boolean;
close: () => void;
isSubscribed: (observer: import("@loopback/core").ContextObserver) => boolean;
createView: <T_6 = unknown>(filter: import("@loopback/core").BindingFilter, comparator?: import("@loopback/core").BindingComparator | undefined, options?: Omit<import("@loopback/core").ResolutionOptions, "session"> | undefined) => import("@loopback/core").ContextView<T_6>;
contains: (key: import("@loopback/core").BindingAddress) => boolean;
isBound: (key: import("@loopback/core").BindingAddress) => boolean;
getOwnerContext: (keyOrBinding: import("@loopback/core").BindingAddress | Readonly<Binding<unknown>>) => import("@loopback/core").Context | undefined;
getScopedContext: (scope: import("@loopback/core").BindingScope.APPLICATION | import("@loopback/core").BindingScope.SERVER | import("@loopback/core").BindingScope.REQUEST) => import("@loopback/core").Context | undefined;
getResolutionContext: (binding: Readonly<Binding<unknown>>) => import("@loopback/core").Context | undefined;
isVisibleTo: (ctx: import("@loopback/core").Context) => boolean;
find: <ValueType_1 = any>(pattern?: string | RegExp | import("@loopback/core").BindingFilter | undefined) => Readonly<Binding<ValueType_1>>[];
findByTag: <ValueType_2 = any>(tagFilter: RegExp | import("@loopback/core").BindingTag) => Readonly<Binding<ValueType_2>>[];
get: {
<ValueType_3>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_3>, session?: import("@loopback/core").ResolutionSession | undefined): Promise<ValueType_3>;
<ValueType_4>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_4>, options: import("@loopback/core").ResolutionOptions): Promise<ValueType_4 | undefined>;
};
getSync: {
<ValueType_5>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_5>, session?: import("@loopback/core").ResolutionSession | undefined): ValueType_5;
<ValueType_6>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_6>, options?: import("@loopback/core").ResolutionOptions | undefined): ValueType_6 | undefined;
};
getBinding: {
<ValueType_7 = any>(key: import("@loopback/core").BindingAddress<ValueType_7>): Binding<ValueType_7>;
<ValueType_8>(key: import("@loopback/core").BindingAddress<ValueType_8>, options?: {
optional?: boolean | undefined;
} | undefined): Binding<ValueType_8> | undefined;
};
findOrCreateBinding: <T_7>(key: import("@loopback/core").BindingAddress<T_7>, policy?: import("@loopback/core").BindingCreationPolicy | undefined) => Binding<T_7>;
getValueOrPromise: <ValueType_9>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_9>, optionsOrSession?: import("@loopback/core").ResolutionOptionsOrSession | undefined) => import("@loopback/core").ValueOrPromise<ValueType_9 | undefined>;
toJSON: () => import("@loopback/core").JSONObject;
inspect: (options?: import("@loopback/core").ContextInspectOptions | undefined) => import("@loopback/core").JSONObject;
on: {
(eventName: "bind" | "unbind", listener: import("@loopback/core").ContextEventListener): import("@loopback/core").Application;
(event: string | symbol, listener: (...args: any[]) => void): import("@loopback/core").Application;
};
once: {
(eventName: "bind" | "unbind", listener: import("@loopback/core").ContextEventListener): import("@loopback/core").Application;
(event: string | symbol, listener: (...args: any[]) => void): import("@loopback/core").Application;
};
[EventEmitter.captureRejectionSymbol]?: (<K>(error: Error, event: string | symbol, ...args: any[]) => void) | undefined;
addListener: <K_1>(eventName: string | symbol, listener: (...args: any[]) => void) => import("@loopback/core").Application;
removeListener: <K_2>(eventName: string | symbol, listener: (...args: any[]) => void) => import("@loopback/core").Application;
off: <K_3>(eventName: string | symbol, listener: (...args: any[]) => void) => import("@loopback/core").Application;
removeAllListeners: (event?: string | symbol | undefined) => import("@loopback/core").Application;
setMaxListeners: (n: number) => import("@loopback/core").Application;
getMaxListeners: () => number;
listeners: <K_4>(eventName: string | symbol) => Function[];
rawListeners: <K_5>(eventName: string | symbol) => Function[];
emit: <K_6>(eventName: string | symbol, ...args: any[]) => boolean;
listenerCount: <K_7>(eventName: string | symbol, listener?: Function | undefined) => number;
prependListener: <K_8>(eventName: string | symbol, listener: (...args: any[]) => void) => import("@loopback/core").Application;
prependOnceListener: <K_9>(eventName: string | symbol, listener: (...args: any[]) => void) => import("@loopback/core").Application;
eventNames: () => (string | symbol)[];
}) & (new (...args: any[]) => {
repository<R extends Repository<any>>(repoClass: import("@loopback/repository").Class<R>, nameOrOptions?: string | BindingFromClassOptions): Binding<R>;
getRepository<R_1 extends Repository<any>>(repo: import("@loopback/repository").Class<R_1>): Promise<R_1>;
dataSource<D extends import("@loopback/repository").JugglerDataSource>(dataSource: D | import("@loopback/repository").Class<D>, nameOrOptions?: string | BindingFromClassOptions): Binding<D>;
model<M extends import("@loopback/repository").Class<unknown>>(modelClass: M): Binding<M>;
component<C extends import("@loopback/core").Component = import("@loopback/core").Component>(componentCtor: Constructor<C>, nameOrOptions?: string | BindingFromClassOptions): Binding<C>;
mountComponentRepositories(componentInstanceOrClass: import("@loopback/repository").Class<unknown> | import("@loopback/repository").RepositoryComponent): void;
mountComponentModels(component: import("@loopback/repository").RepositoryComponent): void;
migrateSchema(options?: import("@loopback/repository").SchemaMigrationOptions): Promise<void>;
readonly options: import("@loopback/core").ApplicationConfig;
readonly state: string;
controller: <T>(controllerCtor: import("@loopback/core").ControllerClass<T>, nameOrOptions?: string | BindingFromClassOptions | undefined) => Binding<T>;
server: <T_1 extends import("@loopback/core").Server>(ctor: Constructor<T_1>, nameOrOptions?: string | BindingFromClassOptions | undefined) => Binding<T_1>;
servers: <T_2 extends import("@loopback/core").Server>(ctors: Constructor<T_2>[]) => Binding<any>[];
getServer: <T_3 extends import("@loopback/core").Server>(target: string | Constructor<T_3>) => Promise<T_3>;
init: () => Promise<void>;
onInit: (fn: () => import("@loopback/core").ValueOrPromise<void>) => Binding<import("@loopback/core").LifeCycleObserver>;
start: () => Promise<void>;
onStart: (fn: () => import("@loopback/core").ValueOrPromise<void>) => Binding<import("@loopback/core").LifeCycleObserver>;
stop: () => Promise<void>;
onStop: (fn: () => import("@loopback/core").ValueOrPromise<void>) => Binding<import("@loopback/core").LifeCycleObserver>;
setMetadata: (metadata: import("@loopback/core").ApplicationMetadata) => void;
lifeCycleObserver: <T_4 extends import("@loopback/core").LifeCycleObserver>(ctor: Constructor<T_4>, nameOrOptions?: string | BindingFromClassOptions | undefined) => Binding<T_4>;
service: <S>(cls: import("@loopback/core").ServiceOrProviderClass<S>, nameOrOptions?: string | import("@loopback/core").ServiceOptions | undefined) => Binding<S>;
interceptor: (interceptor: import("@loopback/core").Interceptor | Constructor<import("@loopback/core").Provider<import("@loopback/core").Interceptor>>, nameOrOptions?: string | import("@loopback/core").InterceptorBindingOptions | undefined) => Binding<import("@loopback/core").Interceptor>;
readonly name: string;
readonly subscriptionManager: import("@loopback/core").ContextSubscriptionManager;
scope: BindingScope;
readonly parent: import("@loopback/core").Context | undefined;
emitEvent: <T_5 extends import("@loopback/core").ContextEvent>(type: string, event: T_5) => void;
emitError: (err: unknown) => void;
bind: <ValueType = any>(key: import("@loopback/core").BindingAddress<ValueType>) => Binding<ValueType>;
add: (binding: Binding<unknown>) => import("@loopback/core").Application;
configure: <ConfigValueType = any>(key?: import("@loopback/core").BindingAddress | undefined) => Binding<ConfigValueType>;
getConfigAsValueOrPromise: <ConfigValueType_1>(key: import("@loopback/core").BindingAddress, propertyPath?: string | undefined, resolutionOptions?: import("@loopback/core").ResolutionOptions | undefined) => import("@loopback/core").ValueOrPromise<ConfigValueType_1 | undefined>;
getConfig: <ConfigValueType_2>(key: import("@loopback/core").BindingAddress, propertyPath?: string | undefined, resolutionOptions?: import("@loopback/core").ResolutionOptions | undefined) => Promise<ConfigValueType_2 | undefined>;
getConfigSync: <ConfigValueType_3>(key: import("@loopback/core").BindingAddress, propertyPath?: string | undefined, resolutionOptions?: import("@loopback/core").ResolutionOptions | undefined) => ConfigValueType_3 | undefined;
unbind: (key: import("@loopback/core").BindingAddress) => boolean;
subscribe: (observer: import("@loopback/core").ContextEventObserver) => import("@loopback/core").Subscription;
unsubscribe: (observer: import("@loopback/core").ContextEventObserver) => boolean;
close: () => void;
isSubscribed: (observer: import("@loopback/core").ContextObserver) => boolean;
createView: <T_6 = unknown>(filter: import("@loopback/core").BindingFilter, comparator?: import("@loopback/core").BindingComparator | undefined, options?: Omit<import("@loopback/core").ResolutionOptions, "session"> | undefined) => import("@loopback/core").ContextView<T_6>;
contains: (key: import("@loopback/core").BindingAddress) => boolean;
isBound: (key: import("@loopback/core").BindingAddress) => boolean;
getOwnerContext: (keyOrBinding: import("@loopback/core").BindingAddress | Readonly<Binding<unknown>>) => import("@loopback/core").Context | undefined;
getScopedContext: (scope: BindingScope.APPLICATION | BindingScope.SERVER | BindingScope.REQUEST) => import("@loopback/core").Context | undefined;
getResolutionContext: (binding: Readonly<Binding<unknown>>) => import("@loopback/core").Context | undefined;
isVisibleTo: (ctx: import("@loopback/core").Context) => boolean;
find: <ValueType_1 = any>(pattern?: string | RegExp | import("@loopback/core").BindingFilter | undefined) => Readonly<Binding<ValueType_1>>[];
findByTag: <ValueType_2 = any>(tagFilter: RegExp | import("@loopback/core").BindingTag) => Readonly<Binding<ValueType_2>>[];
get: {
<ValueType_3>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_3>, session?: import("@loopback/core").ResolutionSession | undefined): Promise<ValueType_3>;
<ValueType_4>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_4>, options: import("@loopback/core").ResolutionOptions): Promise<ValueType_4 | undefined>;
};
getSync: {
<ValueType_5>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_5>, session?: import("@loopback/core").ResolutionSession | undefined): ValueType_5;
<ValueType_6>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_6>, options?: import("@loopback/core").ResolutionOptions | undefined): ValueType_6 | undefined;
};
getBinding: {
<ValueType_7 = any>(key: import("@loopback/core").BindingAddress<ValueType_7>): Binding<ValueType_7>;
<ValueType_8>(key: import("@loopback/core").BindingAddress<ValueType_8>, options?: {
optional?: boolean | undefined;
} | undefined): Binding<ValueType_8> | undefined;
};
findOrCreateBinding: <T_7>(key: import("@loopback/core").BindingAddress<T_7>, policy?: import("@loopback/core").BindingCreationPolicy | undefined) => Binding<T_7>;
getValueOrPromise: <ValueType_9>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_9>, optionsOrSession?: import("@loopback/core").ResolutionOptionsOrSession | undefined) => import("@loopback/core").ValueOrPromise<ValueType_9 | undefined>;
toJSON: () => import("@loopback/core").JSONObject;
inspect: (options?: import("@loopback/core").ContextInspectOptions | undefined) => import("@loopback/core").JSONObject;
on: {
(eventName: "bind" | "unbind", listener: import("@loopback/core").ContextEventListener): import("@loopback/core").Application;
(event: string | symbol, listener: (...args: any[]) => void): import("@loopback/core").Application;
};
once: {
(eventName: "bind" | "unbind", listener: import("@loopback/core").ContextEventListener): import("@loopback/core").Application;
(event: string | symbol, listener: (...args: any[]) => void): import("@loopback/core").Application;
};
[EventEmitter.captureRejectionSymbol]?: (<K>(error: Error, event: string | symbol, ...args: any[]) => void) | undefined;
addListener: <K_1>(eventName: string | symbol, listener: (...args: any[]) => void) => import("@loopback/core").Application;
removeListener: <K_2>(eventName: string | symbol, listener: (...args: any[]) => void) => import("@loopback/core").Application;
off: <K_3>(eventName: string | symbol, listener: (...args: any[]) => void) => import("@loopback/core").Application;
removeAllListeners: (event?: string | symbol | undefined) => import("@loopback/core").Application;
setMaxListeners: (n: number) => import("@loopback/core").Application;
getMaxListeners: () => number;
listeners: <K_4>(eventName: string | symbol) => Function[];
rawListeners: <K_5>(eventName: string | symbol) => Function[];
emit: <K_6>(eventName: string | symbol, ...args: any[]) => boolean;
listenerCount: <K_7>(eventName: string | symbol, listener?: Function | undefined) => number;
prependListener: <K_8>(eventName: string | symbol, listener: (...args: any[]) => void) => import("@loopback/core").Application;
prependOnceListener: <K_9>(eventName: string | symbol, listener: (...args: any[]) => void) => import("@loopback/core").Application;
eventNames: () => (string | symbol)[];
}) & typeof RestApplication;
export declare abstract class BaseApplication extends BaseApplication_base implements IApplication {
protected logger: ApplicationLogger;
models: Set<string>;
constructor(opts: {
serverOptions: ApplicationConfig;
sequence?: Constructor<SequenceHandler>;
});
abstract staticConfigure(): void;
abstract getProjectRoot(): string;
abstract validateEnv(): IEnvironmentValidationResult;
abstract declareModels(): Set<string>;
abstract preConfigure(): void;
abstract postConfigure(): void;
getServerHost(): string;
getServerPort(): number;
getServerAddress(): string;
getRepositorySync<R extends IRepository>(c: ClassType<R>): R;
getServiceSync<S extends IService>(c: ClassType<S>): S;
getMigrateModels(opts: {
ignoreModels?: string[];
migrateModels?: string[];
}): Promise<Repository<BaseEntity>[]>;
classifyModelsByDs(opts: {
reps: Array<Repository<BaseEntity>>;
}): Record<string, string[]>;
migrateModels(opts: {
existingSchema: string;
ignoreModels?: string[];
migrateModels?: string[];
}): Promise<void>;
grpcController<T>(ctor: ControllerClass<T>, nameOrOptions?: string | BindingFromClassOptions): Binding<T>;
}
export {};