import { Repository } from 'typeorm'; import { Tenant } from '../tenants/entities/tenant.entity'; import { User } from '../auth/entities/user.entity'; import { Subscription } from '../billing/entities/subscription.entity'; import { CreateTenantDto, UpdateTenantDto, UpdateTenantStatusDto, ListTenantsQueryDto } from './dto'; export interface TenantWithStats extends Tenant { userCount?: number; subscription?: Subscription | null; } export interface PaginatedResult { data: T[]; total: number; page: number; limit: number; totalPages: number; } export declare class SuperadminService { private readonly tenantRepository; private readonly userRepository; private readonly subscriptionRepository; constructor(tenantRepository: Repository, userRepository: Repository, subscriptionRepository: Repository); listTenants(query: ListTenantsQueryDto): Promise>; getTenant(id: string): Promise; createTenant(dto: CreateTenantDto): Promise; updateTenant(id: string, dto: UpdateTenantDto): Promise; updateTenantStatus(id: string, dto: UpdateTenantStatusDto): Promise; deleteTenant(id: string): Promise; getTenantUsers(tenantId: string, page?: number, limit?: number): Promise>; getDashboardStats(): Promise<{ totalTenants: number; activeTenants: number; trialTenants: number; suspendedTenants: number; totalUsers: number; newTenantsThisMonth: number; }>; getTenantGrowth(months?: number): Promise<{ month: string; count: number; }[]>; getUserGrowth(months?: number): Promise<{ month: string; count: number; }[]>; getPlanDistribution(): Promise<{ plan: string; count: number; percentage: number; }[]>; getStatusDistribution(): Promise<{ status: string; count: number; percentage: number; }[]>; getTopTenants(limit?: number): Promise<{ id: string; name: string; slug: string; userCount: number; status: string; planName: string; }[]>; getMetricsSummary(): Promise<{ tenantGrowth: { month: string; count: number; }[]; userGrowth: { month: string; count: number; }[]; planDistribution: { plan: string; count: number; percentage: number; }[]; statusDistribution: { status: string; count: number; percentage: number; }[]; topTenants: { id: string; name: string; slug: string; userCount: number; status: string; planName: string; }[]; }>; }