import { SmrtClassOptions } from '@happyvertical/smrt-core'; import { PersonaMessageRoute } from '../models/PersonaMessageRoute.js'; import { MessagingPrincipal } from '../permissions.js'; import { MessagingProviderDefinition, MessagingProviderField, MessagingProviderFunctionKey } from '../providers.js'; import { MessagingChannel } from '../types.js'; export interface MessagingAccountInput { id?: string; name: string; providerId: string; configuration: Record; /** Omit on update to leave the stored secret unchanged. */ credentials?: Record; active?: boolean; } export interface MessagingEndpointInput { id?: string; label: string; providerId: string; profileId?: string | null; address: Record; active?: boolean; } export interface PersonaMessageRouteInput { id?: string; personaId: string; accountId: string; endpointId: string; purpose?: string; priority?: number; enabled?: boolean; } export interface MessagingAccountView { id: string; name: string; providerId: string; channel: MessagingChannel; configuration: Record; hasCredentials: boolean; active: boolean; } export interface MessagingEndpointView { id: string; label: string; channel: MessagingChannel; profileId: string | null; maskedAddress: string; active: boolean; verified: boolean; } /** Permission-gated server API for a schema-driven messaging settings page. */ export declare class MessagingSettingsService { private readonly options; constructor(options: { db: SmrtClassOptions['db']; tenantId: string; principal: MessagingPrincipal; /** Cross-package ownership check supplied by the host/personas layer. */ resolvePersonaTenantId: (personaId: string) => Promise; }); getProviderDefinitions(options?: { includeUnavailable?: boolean; }): { id: string; label: string; channel: MessagingChannel; available: boolean; configurationFields: MessagingProviderField[]; credentialFields: MessagingProviderField[]; endpointFields: MessagingProviderField[]; }[]; list(personaId: string): Promise<{ providers: Array>; accounts: MessagingAccountView[]; endpoints: MessagingEndpointView[]; routes: PersonaMessageRoute[]; }>; saveAccount(input: MessagingAccountInput): Promise; saveEndpoint(input: MessagingEndpointInput): Promise; saveRoute(input: PersonaMessageRouteInput): Promise; private assert; private requireProvider; private validateFields; private newAccount; private normalizeCredentials; private normalizeConfiguration; private accountView; private endpointView; } //# sourceMappingURL=MessagingSettingsService.d.ts.map