2020-01-12 01:15:32 +03:00
|
|
|
import { ModuleMetadata, Type } from '@nestjs/common/interfaces'
|
|
|
|
|
|
|
|
export interface TelegrafModuleOptions {
|
|
|
|
token: string
|
|
|
|
sitePublicUrl?: string
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface TelegrafOptionsFactory {
|
2020-01-12 01:36:53 +03:00
|
|
|
createTelegrafOptions(): TelegrafModuleOptions
|
2020-01-12 01:15:32 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface TelegrafModuleAsyncOptions
|
|
|
|
extends Pick<ModuleMetadata, 'imports'> {
|
2020-01-12 01:36:53 +03:00
|
|
|
useExisting?: Type<TelegrafOptionsFactory>
|
2020-01-12 01:15:32 +03:00
|
|
|
useClass?: Type<TelegrafOptionsFactory>
|
2020-01-12 01:36:53 +03:00
|
|
|
useFactory?: (
|
|
|
|
...args: any[]
|
|
|
|
) => Promise<TelegrafModuleOptions> | TelegrafModuleOptions
|
2020-01-12 01:15:32 +03:00
|
|
|
inject?: any[]
|
|
|
|
}
|