Skip to content

[_]: chore/email ports adapters#3

Merged
jzunigax2 merged 10 commits intomasterfrom
chore/email-ports-adapters
Mar 18, 2026
Merged

[_]: chore/email ports adapters#3
jzunigax2 merged 10 commits intomasterfrom
chore/email-ports-adapters

Conversation

@jzunigax2
Copy link
Contributor

  • Introduce MailProvider port interface and domain types (email.types.ts) so the email module has zero knowledge of JMAP
  • Add JmapMailProvider adapter + jmap-mail.mapper.ts to translate between JMAP and domain types (consider domain types rough placeholders)

@jzunigax2 jzunigax2 requested a review from apsantiso March 10, 2026 16:52
@jzunigax2 jzunigax2 self-assigned this Mar 10, 2026
@jzunigax2 jzunigax2 changed the base branch from master to chore/add-basic-actions March 10, 2026 16:53
@jzunigax2 jzunigax2 force-pushed the chore/add-basic-actions branch 5 times, most recently from e63be76 to cade28f Compare March 17, 2026 15:50
Base automatically changed from chore/add-basic-actions to master March 17, 2026 15:54
@jzunigax2 jzunigax2 force-pushed the chore/email-ports-adapters branch 2 times, most recently from 2eb3b33 to fec67e9 Compare March 17, 2026 16:06
…sion management

- Removed unused dependencies from package.json.
- Added new configuration options for master user and password.
- Enhanced EmailController to support email operations including listing, sending, and managing emails.
- Expanded EmailUsecase to handle email retrieval, sending, and management through JMAP.
- Introduced JmapService for session management and API requests.
- Added JMAP types for structured data handling.
- Updated tsconfig.json to set root directory.
- Introduced MailProvider interface for email operations including mailbox management and email handling.
- Implemented JMAP email mapping functions for converting between JMAP and domain email structures.
- Added comprehensive tests for JMAP email mapping functionalities to ensure correctness.
- Added JmapMailProvider class to handle email operations via JMAP, including fetching mailboxes, listing emails, retrieving email details, sending emails, saving drafts, moving, deleting, and marking emails.
- Integrated caching for mailboxes and identities to optimize performance.
- Updated JmapModule to include JmapMailProvider as a provider and export it for use in other modules.
- Updated email module to use EmailService instead of EmailUsecase for email operations.
- Introduced email service with methods for managing mailboxes, listing, retrieving, sending emails, and handling drafts.
- Added email types for better structure and type safety.
- Created unit tests for EmailService to ensure functionality and error handling.
- Removed the deprecated EmailUsecase file.
- Replaced EmailUsecase with EmailService for handling email operations.
- Updated methods for fetching mailboxes, listing emails, retrieving email details, sending emails, saving drafts, and deleting emails.
- Enhanced query parameters for listing emails and added support for updating email properties.
- Removed deprecated methods and streamlined the controller for better maintainability.
- Moved JmapModule and related classes to the infrastructure directory for better organization.
- Updated EmailModule to import JmapModule from the new location.
- Refactored EmailService to remove the MAIL_PROVIDER injection and streamline email handling.
- Added JMAP mapping utilities and provider for improved email operations.
- Introduced unit tests for JMAP email mapping functionalities to ensure correctness.
@jzunigax2 jzunigax2 force-pushed the chore/email-ports-adapters branch from fec67e9 to 575da06 Compare March 17, 2026 16:07
@jzunigax2 jzunigax2 marked this pull request as ready for review March 17, 2026 16:08
@jzunigax2 jzunigax2 force-pushed the chore/email-ports-adapters branch from 575da06 to 4dd23ea Compare March 17, 2026 16:15
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
77.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@jzunigax2 jzunigax2 merged commit 0a4742d into master Mar 18, 2026
4 of 5 checks passed
@jzunigax2 jzunigax2 deleted the chore/email-ports-adapters branch March 18, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants