effaced-resend
effaced-resend — the first-party Resend resolver for effaced.
ResendResolver
Section titled “ResendResolver”class ResendResolver: def __init__(api_key: str, *, base_url: str = _DEFAULT_BASE_URL, transport: httpx.BaseTransport | None = None, timeout: float = _DEFAULT_TIMEOUT) -> NoneExports and erases a subject’s Resend contact record.
Expects refs of kind "resend" (refs are routed to the resolver
whose name equals their kind — ADR 0008) whose value is the
contact’s email address as stored in Resend. Resend’s
global-contacts API addresses contacts by email directly, so one
call reaches the contact across every segment — no enumeration, no
audience configuration.
Idempotency: a contact Resend no longer knows yields
already_absent=True — success, never an error.
Deleting the contact does not touch Resend’s send history (which has
no deletion API) and removes the contact’s unsubscribed
preference with it — both are the controller’s data-map concern, not
this resolver’s.
Error taxonomy (see effaced_resend.errors): 4xx responses
other than 404 and 429 raise
ResolverError; rate limits, 5xx, and
connection faults propagate so the saga runner retries. A fresh
httpx client is built per call — nothing loop- or
connection-bound is cached on the instance (ADR 0006).
Fields:
- covered_surface (
CoveredSurface): The Resend contact PII this resolver claims to reach (AttestingResolver). Returns:RESEND_COVERED_SURFACE, built from the exporter’s field tuple so it cannot drift. - name (
str): Stable resolver name recorded in manifests and audits.
ResendResolver.erase_subject
Section titled “ResendResolver.erase_subject”async def erase_subject(ref: SubjectRef) -> ResolverErasureHard-delete the contact in Resend (Art. 17).
Args:
- ref (
SubjectRef):kind="resend",value=<contact email>.
Returns:
ResolverErasure— The outcome;already_absent=Trueif Resend already hadResolverErasure— no such contact.
Raises:
ResolverError— The key is invalid or restricted, or the request was malformed — retrying cannot succeed.
ResendResolver.export_subject
Section titled “ResendResolver.export_subject”async def export_subject(ref: SubjectRef) -> ResolverExportCollect the contact’s Resend-held fields (Art. 15).
Args:
- ref (
SubjectRef):kind="resend",value=<contact email>.
Returns:
ResolverExport— The contact’semail, name fields, andunsubscribedResolverExport— flag when populated (the field set lives inResolverExport— mod:effaced_resend.export_records); empty when ResendResolverExport— holds no such contact.
Raises:
ResolverError— The key is invalid or restricted, or the request was malformed — retrying cannot succeed.