1 | import { ClientOptions, CustomClientOptions } from '../../interfaces';
|
2 | import { Type, Provider, ModuleMetadata } from '@nestjs/common/interfaces';
|
3 | export type ClientProvider = ClientOptions | CustomClientOptions;
|
4 | export type ClientProviderOptions = ClientProvider & {
|
5 | name: string | symbol;
|
6 | };
|
7 | export type ClientsModuleOptions = Array<ClientProviderOptions> | {
|
8 | clients: Array<ClientProviderOptions>;
|
9 | isGlobal?: boolean;
|
10 | };
|
11 | export interface ClientsModuleOptionsFactory {
|
12 | createClientOptions(): Promise<ClientProvider> | ClientProvider;
|
13 | }
|
14 | export interface ClientsProviderAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
|
15 | useExisting?: Type<ClientsModuleOptionsFactory>;
|
16 | useClass?: Type<ClientsModuleOptionsFactory>;
|
17 | useFactory?: (...args: any[]) => Promise<ClientProvider> | ClientProvider;
|
18 | inject?: any[];
|
19 | extraProviders?: Provider[];
|
20 | name: string | symbol;
|
21 | }
|
22 | export type ClientsModuleAsyncOptions = Array<ClientsProviderAsyncOptions> | {
|
23 | clients: Array<ClientsProviderAsyncOptions>;
|
24 | isGlobal?: boolean;
|
25 | };
|