using CvMatcher.Models.Responses; using Models.Requests; namespace Api.Services.Contracts { /// /// Abstraction for sending transactional emails from the public API. /// public interface IEmailSender { /// /// Sends a contact-form message to the configured operator address. /// /// Contact request containing name, email, subject, and message. /// Cancellation token. Task SendContactAsync(ContactRequest req, CancellationToken ct); /// /// Notifies the configured operator address that a new email subscription was received. /// /// Subscription request containing the subscriber's email address. /// Cancellation token. Task SendSubscribeAsync(SubscribeRequest req, CancellationToken ct); /// /// Sends a background notification when a file download is initiated. /// Does nothing when no notification address is configured. /// /// Name of the downloaded file. /// Remote IP address of the downloader, or null if unavailable. /// Cancellation token. Task SendFileDownloadNotificationAsync(string fileName, string? userIp, CancellationToken ct); /// /// Sends a CV match results email to the user and the operator copy address. /// /// Primary recipient email address, or null to send only the operator copy. /// Email subject line. /// Pre-built HTML body fragment. /// Full path to a CV PDF to attach, or null for no attachment. /// Cancellation token. Task SendMatchAsync(string? explicitTo, string subject, string body, string? attachmentPath, CancellationToken ct); /// /// Builds the localised subject line for a CV match email. /// /// Match score percentage (0–100). /// Human-readable job title or label. /// Two-letter language code (e.g. "en", "ro"). /// Rendered subject string. string BuildMatchEmailSubject(int score, string? jobLabel, string language); /// /// Builds the full HTML body for a CV match email, including an optional job-search footer link. /// /// Identifier of the indexed CV document. /// Structured match response from the CV matcher engine. /// Human-readable job title or label. /// Two-letter language code. /// Optional one-click job-search URL to append as a footer CTA. /// Number of days until the job-search link expires (shown in the footer copy). /// Rendered HTML body string. string BuildMatchEmailBody(string cvDocumentId, JobMatchResponse result, string? jobLabel, string language, string? jobSearchLink = null, int expiryDays = 7); /// /// Returns the localised label for a manually-entered job description (no URL provided). /// /// Two-letter language code. string GetManualJobLabel(string language); } }