20 lines
No EOL
689 B
TypeScript
20 lines
No EOL
689 B
TypeScript
import { ModuleMetadata, Provider, Type } from '@nestjs/common';
|
|
import { AxiosRequestConfig } from 'axios';
|
|
import { IAxiosRetryConfig } from 'axios-retry'
|
|
|
|
export type HttpModuleOptions = (AxiosRequestConfig & IAxiosRetryConfig);
|
|
|
|
export interface HttpModuleOptionsFactory {
|
|
createHttpOptions(): Promise<HttpModuleOptions> | HttpModuleOptions;
|
|
}
|
|
|
|
export interface HttpModuleAsyncOptions
|
|
extends Pick<ModuleMetadata, 'imports'> {
|
|
useExisting?: Type<HttpModuleOptionsFactory>;
|
|
useClass?: Type<HttpModuleOptionsFactory>;
|
|
useFactory?: (
|
|
...args: any[]
|
|
) => Promise<HttpModuleOptions> | HttpModuleOptions;
|
|
inject?: any[];
|
|
extraProviders?: Provider[];
|
|
} |