import { Repository } from 'typeorm'; import { ConfigService } from '@nestjs/config'; import { TenantIntegrationCredential, IntegrationType, IntegrationProvider } from '../entities/tenant-integration-credential.entity'; import { TenantWhatsAppNumber } from '../entities/tenant-whatsapp-number.entity'; import { Tenant } from '../../auth/entities/tenant.entity'; export interface ResolvedWhatsAppCredentials { accessToken: string; phoneNumberId: string; businessAccountId?: string; verifyToken?: string; isFromPlatform: boolean; tenantId?: string; } export interface ResolvedLLMConfig { apiKey: string; provider: string; model: string; maxTokens: number; temperature: number; baseUrl: string; systemPrompt?: string; isFromPlatform: boolean; tenantId?: string; } export declare class TenantIntegrationsService { private readonly credentialRepo; private readonly whatsappNumberRepo; private readonly tenantRepo; private readonly configService; constructor(credentialRepo: Repository, whatsappNumberRepo: Repository, tenantRepo: Repository, configService: ConfigService); getWhatsAppCredentials(tenantId: string): Promise; getPlatformWhatsAppCredentials(): ResolvedWhatsAppCredentials; resolveTenantFromPhoneNumberId(phoneNumberId: string): Promise; getLLMConfig(tenantId: string): Promise; getPlatformLLMConfig(): ResolvedLLMConfig; private getDefaultModel; private getDefaultBaseUrl; upsertCredential(tenantId: string, integrationType: IntegrationType, provider: IntegrationProvider, credentials: Record, config?: Record, userId?: string): Promise; getCredentials(tenantId: string): Promise; getCredential(tenantId: string, integrationType: IntegrationType, provider: IntegrationProvider): Promise; deleteCredential(tenantId: string, integrationType: IntegrationType, provider: IntegrationProvider): Promise; toggleCredential(tenantId: string, integrationType: IntegrationType, provider: IntegrationProvider, isActive: boolean): Promise; getIntegrationStatus(tenantId: string): Promise<{ whatsapp: { configured: boolean; usesPlatformNumber: boolean; provider: string; isVerified: boolean; }; llm: { configured: boolean; usesPlatformDefault: boolean; provider: string; model: string; isVerified: boolean; }; payments: { stripe: { configured: boolean; isVerified: boolean; }; mercadopago: { configured: boolean; isVerified: boolean; }; clip: { configured: boolean; isVerified: boolean; }; }; }>; registerWhatsAppNumber(tenantId: string, phoneNumberId: string, phoneNumber?: string, displayName?: string, isPlatformNumber?: boolean): Promise; }