refactor(14-01): extract DKV inbox providers into shared inbox/ module

- Move ImapProvider, ExchangeInboxProvider, InboxProvider into apps/api/src/inbox/
- Move InboxConfig/InboxAttachment/InboxEmail into new inbox.types.ts
- dkv.types.ts re-exports the moved types so existing DKV imports keep compiling
- DKV switches import paths to ../inbox/... and imports InboxModule
- Pure move + import-path swap: fetchPdfAttachments and all DKV logic unchanged (D-01/D-02)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-23 13:02:15 +02:00
parent 9dd5038575
commit eb668fd5c8
8 changed files with 106 additions and 51 deletions
+19
View File
@@ -0,0 +1,19 @@
import { Module } from '@nestjs/common';
import { ExchangeInboxProvider } from './exchange-inbox.provider';
import { ImapProvider } from './imap.provider';
/**
* Shared inbox-connection module (IMAP/Exchange).
*
* Extracted out of DKV (D-01, 14-CONTEXT.md) so any module that needs to
* poll a mailbox — e.g. the Phase-14 EmailAlertAdapter (Plan 14-03) — can
* import InboxModule and inject ImapProvider / ExchangeInboxProvider without
* depending on DKV. DKV imports this module unchanged in behavior; each
* module keeps its own, independent mailbox configuration (D-03) — only the
* connection code is shared.
*/
@Module({
providers: [ImapProvider, ExchangeInboxProvider],
exports: [ImapProvider, ExchangeInboxProvider],
})
export class InboxModule {}