Interface IEmailMetadataRepository
- Namespace
- MailFathom.Application.Synchronization
- Assembly
- MailFathom.Application.dll
Persists email metadata independently from raw MIME content.
public interface IEmailMetadataRepository
Remarks
The port narrows persistence to the single idempotent operation synchronization needs, which is the use-case-shaped
contract
ADR 0001
chose over a generic repository or an exposed IQueryable. It also has no published
contract to restate: EF Core's query surface is a concrete DbContext, and MailFathom allows no fake provider to
stand in for PostgreSQL semantics, so the upsert is expressed in domain terms and asserted through this port.
Methods
- TryCarryToOccurrenceAsync(IPersistenceSession, StoredEmailId, EmailOccurrenceId, CancellationToken)
Moves one stored email onto the occurrence a relocation put it at, instead of storing a second email there.
- UpsertMetadataAsync(IPersistenceSession, RemoteEmailMetadata, ExtractedEmailMetadata?, StoredEmailContentAvailability, CancellationToken)
Inserts or updates metadata for one remote occurrence idempotently and returns its stable local identity.