games_app/backend/dist/services/emailService.d.ts
2026-07-02 12:14:21 +02:00

40 lines
1.5 KiB
TypeScript

/**
* Outbound email delivery for verification and transactional messages.
* Supports SMTP (production) and console logging (development).
*/
/** Gmail app passwords are often copied with spaces — strip them. */
export declare function normalizeSmtpPass(pass: string): string;
/**
* Returns true when emails are logged to stdout instead of SMTP (local Docker default).
*/
export declare function usesConsoleEmailTransport(): boolean;
/**
* Returns true when SMTP is fully configured for real email delivery.
*/
export declare function isSmtpConfigured(): boolean;
/** Verifies SMTP credentials (call on deploy or via CLI). */
export declare function verifySmtpConnection(): Promise<void>;
/**
* @param to - Recipient email address
* @param verifyUrl - Full URL opened by the user to confirm ownership
*/
export declare function sendVerificationEmail(to: string, verifyUrl: string): Promise<void>;
/**
* Sends a password reset message with a clickable link.
*/
export declare function sendPasswordResetEmail(to: string, resetUrl: string): Promise<void>;
type SecurityAlertPayload = {
alertId: string;
severity: string;
type: string;
title: string;
details: string;
userId: string | null;
createdAt: Date;
};
/**
* Sends a security alert notification to an administrator email address.
*/
export declare function sendSecurityAlertEmail(to: string, alert: SecurityAlertPayload): Promise<void>;
export {};
//# sourceMappingURL=emailService.d.ts.map