import { StringAnyType } from '../../types'; import { ProviderClass, ProviderNativeClient, ProviderOptions } from '../../types/provider'; import { ILogger } from '../logger'; /** * Abstract class for creating connections to different backend providers. * All implementations should extend this class and implement * the following steps: * * 1) Add the provider to ./providers/.ts * 2) Update ./factory.ts to reference the provider * 3) Register the tag with the `Provider` type in ./types/provider.ts. * 4) Create the specific provider type file at ./types/.ts * 5) Update ./modules/utils.ts (identifyProvider) with logic to resolve the provider by inspecting the class/import */ declare abstract class AbstractConnection { static logger: ILogger; static disconnecting: boolean; protected connection: any | null; protected static instances: Map>; protected id: string | null; protected abstract defaultOptions: any; protected abstract createConnection(client: PClass, options: POptions, config?: StringAnyType): Promise; abstract getClient(): ProviderNativeClient; disconnect(): Promise; protected abstract closeConnection(connection: any): Promise; static connect>(this: new () => T, id: string, client: ProviderClass, options?: ProviderOptions, //user config?: StringAnyType): Promise; static disconnectAll(): Promise; } export { AbstractConnection };