import * as plugins from '../plugins.js';
import * as authInterfaces from '../data/auth.js';
export type TEmailStatus = 'delivered' | 'bounced' | 'rejected' | 'deferred' | 'pending';
export type TEmailDirection = 'inbound' | 'outbound';
export interface IEmail {
    id: string;
    direction: TEmailDirection;
    status: TEmailStatus;
    from: string;
    to: string;
    subject: string;
    timestamp: string;
    messageId: string;
    size: string;
}
export interface ISmtpLogEntry {
    timestamp: string;
    direction: 'client' | 'server';
    command: string;
    responseCode?: number;
}
export interface IConnectionInfo {
    sourceIp: string;
    sourceHostname: string;
    destinationIp: string;
    destinationPort: number;
    tlsVersion: string;
    tlsCipher: string;
    authenticated: boolean;
    authMethod: string;
    authUser: string;
}
export interface IAuthenticationResults {
    spf: 'pass' | 'fail' | 'softfail' | 'neutral' | 'none';
    spfDomain: string;
    dkim: 'pass' | 'fail' | 'none';
    dkimDomain: string;
    dmarc: 'pass' | 'fail' | 'none';
    dmarcPolicy: string;
}
export interface IEmailDetail extends IEmail {
    toList: string[];
    cc?: string[];
    smtpLog: ISmtpLogEntry[];
    connectionInfo: IConnectionInfo;
    authenticationResults: IAuthenticationResults;
    rejectionReason?: string;
    bounceMessage?: string;
    headers: Record<string, string>;
    body: string;
}
export interface IReq_GetAllEmails extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetAllEmails> {
    method: 'getAllEmails';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
    };
    response: {
        emails: IEmail[];
    };
}
export interface IReq_GetEmailDetail extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetEmailDetail> {
    method: 'getEmailDetail';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        emailId: string;
    };
    response: {
        email: IEmailDetail | null;
    };
}
export interface IReq_ResendEmail extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ResendEmail> {
    method: 'resendEmail';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        emailId: string;
    };
    response: {
        success: boolean;
        newQueueId?: string;
        error?: string;
    };
}
