import type { IUnifiedEmailServerOptions } from '@push.rocks/smartmta';
import type * as interfaces from '../../dist_ts_interfaces/index.js';
type TSyncRequest = interfaces.requests.IReq_SyncWorkAppMailIdentity['request'];
interface IStoredWorkAppMailIdentity extends interfaces.data.IWorkAppMailIdentity {
    smtpPassword: string;
}
export declare class WorkAppMailManager {
    private dcRouterRef;
    private readonly storageKey;
    constructor(dcRouterRef: any);
    listMailIdentities(ownership?: Partial<interfaces.data.IWorkAppMailOwnership>): Promise<interfaces.data.IWorkAppMailIdentity[]>;
    syncMailIdentity(request: TSyncRequest, createdBy: string): Promise<interfaces.data.IWorkAppMailIdentitySyncResult>;
    applyStoredIdentitiesToEmailConfig<TConfig extends IUnifiedEmailServerOptions>(emailConfig: TConfig): Promise<TConfig>;
    applyStoredIdentitiesToRuntime(identities?: IStoredWorkAppMailIdentity[] | undefined): Promise<void>;
    private readStoredIdentities;
    private writeStoredIdentities;
    private mergeIdentitiesIntoEmailConfig;
    private buildInboundRoute;
    private ensureEmailDomainConfigured;
    private normalizeOwnership;
    private normalizeDomain;
    private normalizeLocalPart;
    private normalizeInboundRoute;
    private matchesOwnership;
    private buildExternalKey;
    private buildSmtpUsername;
    private buildRouteName;
    private hashExternalKey;
    private generateSmtpPassword;
    private isManagedMailRouteName;
    private isManagedSmtpUsername;
    private buildSmtpCredentials;
    private toPublicIdentity;
}
export {};
