Skip to content

[PB-5978]: feat/add suspended state for accounts#41

Merged
jzunigax2 merged 4 commits into
masterfrom
feat/add-suspended-state-for-accounts
May 12, 2026
Merged

[PB-5978]: feat/add suspended state for accounts#41
jzunigax2 merged 4 commits into
masterfrom
feat/add-suspended-state-for-accounts

Conversation

@jzunigax2
Copy link
Copy Markdown
Contributor

  • Add status (active | suspended) and suspendedAt columns to mail accounts, with migration and domain/model updates.
  • New GET /users/me/mail-account endpoint returning account status, suspendedAt, and a computed deletionAt based on SUSPENDED_ACCOUNT_RETENTION_DAYS (default 30).

…updates

- Introduced 'state' and 'suspended_at' columns in the mail_accounts table.
- Updated MailAccount domain and model to include state management.
- Enhanced AccountRepository to handle new state attributes.
- Modified test fixtures to initialize mail accounts with state.
@jzunigax2 jzunigax2 requested review from apsantiso and xabg2 May 11, 2026 23:14
@jzunigax2 jzunigax2 self-assigned this May 11, 2026
@jzunigax2 jzunigax2 added the enhancement New feature or request label May 11, 2026
@jzunigax2 jzunigax2 force-pushed the feat/add-suspended-state-for-accounts branch from aff4d08 to d150b24 Compare May 11, 2026 23:34
jzunigax2 added 2 commits May 11, 2026 17:51
- Added 'suspendedRetentionDays' configuration for account suspension management.
- Enhanced AccountService to compute account deletion date based on suspension status and retention days.
- Introduced MailAccountStatus interface and updated related services to return account status.
- Updated UserController to expose account status retrieval endpoint.
- Added corresponding tests to ensure correct behavior of account status logic.
…unt status handling

- Updated UserController tests to verify behavior for active and suspended accounts in getMailAccount method.
- Introduced new AccountRepository tests to validate account retrieval, creation, and deletion logic, including handling of addresses and account states.
@jzunigax2 jzunigax2 force-pushed the feat/add-suspended-state-for-accounts branch from d150b24 to 7ea20c1 Compare May 11, 2026 23:52
Comment thread src/modules/account/account.service.ts Outdated
@jzunigax2 jzunigax2 force-pushed the feat/add-suspended-state-for-accounts branch from 9601acd to de1dfd7 Compare May 12, 2026 13:32
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

@jzunigax2 jzunigax2 merged commit e1a6f7e into master May 12, 2026
4 of 5 checks passed
@jzunigax2 jzunigax2 deleted the feat/add-suspended-state-for-accounts branch May 12, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants