* feat: set up UserAuditLog
* refactor: extract payment callbacks into their own files + handle subscription user_audit_log
* feat: handle account linking for user audit log
* chore: user_audit_log for mailboxes
* chore: user_audit_log for custom domains
* chore: user_audit_log for contacts
* chore: user_audit_log for directories
* fix: do not enforce cronjob being defined in choices + enable user deletion
* chore: user_audit_log for user deletion
* refactor: change emit_user_audit_log function to receive the full user object
* feat: add user_audit_log migration
* test: fix tests
* test: add some tests for user_audit_log
* fix: spf record verification user_audit_log
* chore: add missing index to user_audit_log.created_at
* chore: add missing index to alias_audit_log.created_at
* fix: improve MX and SPF domain handling
* fix: do not use get_instance function
* fix: legacy use of tuples instead of MxRecord
* refactor: rename partner custom domain variables
* fix: scripts/new-migration to use poetry again
* chore: add migration to add custom_domain.partner_id
* chore: refactor create_custom_domain
* chore: allow to specify partner_id to custom_domain
* refactor: can_use_domain return cause
* refactor: remove intermediate result class
* Do not close session since it leads to orphan user object
* Redirect instead of render to avoid having to have a mailbox object
* On inital partner link/login trigger sync
* Update github action upload/artifact to v4
* Remove sys.exit used to test script locally
* Simplified script to update alias flags and note
* Move set default alias to a separate method to reuse it
* Add tests
* Find domains by domain not by id
* Revert models and setting changes
* Remove non required function
* feat: add protocol buffers for events
* chore: add EventDispatcher
* chore: add WebhookEvent class
* chore: emit events
* feat: initial version of event listener
* chore: emit user plan change with new timestamp
* feat: emit metrics + add alias status to create event
* chore: add newrelic decorator to functions
* fix: event emitter fixes
* fix: take null end_time into account
* fix: avoid double-commits
* chore: move UserDeleted event to User.delete method
* db: add index to sync_event created_at and taken_time columns
* chore: add index to model
* add User.enable_data_breach_check column
* user can turn on/off the data breach check
* only run data breach check for user who enables it
* add tips to run tests using a local DB (without docker)
* refactor True check
* trim trailing space
* fix test
* Apply suggestions from code review
Co-authored-by: Adrià Casajús <acasajus@users.noreply.github.com>
* format
---------
Co-authored-by: Son NK <son@simplelogin.io>
Co-authored-by: Adrià Casajús <acasajus@users.noreply.github.com>