UNPKG

@watco/config-lib

Version:

Shared multi-environment configuration helpers for SDC NestJS services

55 lines (54 loc) 1.6 kB
import { TypeOrmModuleOptions } from '@nestjs/typeorm'; import type { BaseConfigService } from './base-config.service'; import type { ProcessEnv } from './types'; export declare abstract class AbstractConfigService implements BaseConfigService { protected readonly env: ProcessEnv; constructor(); getDatabaseConfig(): TypeOrmModuleOptions; abstract getPort(): number; abstract getMode(): string; /** * Per-service hooks for DB config */ protected abstract getDatabaseEntities(): any[]; protected getDatabaseMigrations(): string[]; protected getDatabaseSynchronize(): boolean; protected getDatabaseLogging(): boolean; getConsulConfig(): { host: string; port: number; secure: boolean; serviceName: string; serviceHost: string; servicePort: number; }; getRedisConfig(): { host: string; port: number; password: string | undefined; username: string | undefined; db: number; }; getJWTConfig(): { accessTokenSecret: string; accessTokenExpIn: number; refreshTokenSecret: string; refreshTokenExpIn: number; }; getJUtilConfig(): { accessLogMaxAgeDays: number; accessLogMaxSizeMb: number; authServiceUrl: string; }; getMailConfig(): { mailPort: number; mailSecure: string; mailHost: string; mailUser: string; mailPass: string; mailFrom: string; mailDir: string; mailOrigin: string; }; getKAFKAConfig(): any; }