import 'dotenv/config';
import { OnApplicationShutdown } from '@nestjs/common';
import { Repository, DataSource } from 'typeorm';
import { Tenant } from './entities/tenant.entity';
import { CreateTenantDto } from './dto/create-tenant.dto';
import { GlobalUsersService } from './global-users.service';
export declare class TenantService implements OnApplicationShutdown {
    private tenantRepository;
    private readonly globalUsersService;
    private tenantConnections;
    private masterDataSource?;
    private readonly logger;
    constructor(tenantRepository: Repository<Tenant>, globalUsersService: GlobalUsersService);
    createTenant(createTenantDto: CreateTenantDto): Promise<Tenant>;
    private getMasterDataSource;
    private createTenantDatabase;
    private dropTenantDatabase;
    private runTenantMigrations;
    getTenantConnection(databaseName: string): Promise<DataSource>;
    findTenantBySubdomain(subdomain: string): Promise<Tenant | null>;
    findAll(): Promise<Tenant[]>;
    closeTenantConnection(databaseName: string): Promise<void>;
    closeAllTenantConnections(): Promise<void>;
    onApplicationShutdown(signal?: string): Promise<void>;
    findBySubdomain(subdomain: string): Promise<Tenant | null>;
    findById(id: number): Promise<Tenant | null>;
}
