import { NotFoundException } from '@nestjs/common'; export type PublicTenant = { name: string; slug: string; status: string; }; export function publicTenantView( tenant: { name: string; slug: string; status: string } | null, ): PublicTenant { if (!tenant) { throw new NotFoundException('Este cliente não existe.'); } return { name: tenant.name, slug: tenant.slug, status: tenant.status }; }