integrationPackage manifestv3.0.5

integration.provider-email

Email provider implementations for ContractSpec.

@lssm-tech/integration.provider-email
Source, release and verification context

Source snapshot bcc79fcc · Declared package version 3.0.5. This page combines the checked-in package guide and manifest; commands and runtime behavior were not executed in this review.

Package source ↗ Manifest ↗
servernode
EXPLORE THE PACKAGE

See where this package fits.

Follow a declared connection, inspect an import, then open the source guide when you need the detail.

THIS PACKAGEintegration.provider-emailintegrations

Arrows point from a package to its direct dependency. Each count is derived from the captured manifests.

4 declaracionesSELECT TO INSPECT

@lssm-tech/integration.provider-email

Website: https://contractspec.io

Email provider implementations for ContractSpec.

Usage

Import the root entrypoint for the domain surface, or import a concrete implementation from the ./impls/* subpaths.

Included Providers

  • GmailInboundProvider for thread and message sync. listThreadsPage keeps the provider continuation; message metadata records timestampSource (provider_internal_date, date_header or observed_at_fetch) instead of presenting a fetch time as an observed provider time, and attachments are referenced by stable MIME part id (the Gmail attachment handle is volatile).
  • GmailMailboxReader (./impls/gmail-mailbox-reader) is the read port for durable synchronization: mailbox profile and history baseline, keyed message paging, history changes (added, deleted, label changes) with a typed history_expired failure, and verified send-as identities. A message payload that cannot be transformed raises non-retryable payload_invalid.
  • createDeferredGmailOAuth2Client (./impls/gmail-auth) loads the mailbox credential from custody on first use and on every refresh (a reconnect is picked up, no refresh token in configuration); a missing credential is reauthorization_required.
  • GmailAttachmentOriginalReader (./impls/gmail-attachments) acquires original attachment bytes by message + part identity with size bounds and a SHA-256 digest, producing a GmailAttachmentOriginalHandOff record (./impls/gmail-evidence) for the document-custody port. Equal bytes from two mailboxes share a digest but keep separate account-bound source keys.
  • GmailOutboundProvider for Gmail-based outbound delivery. Messages are built by ./impls/gmail-mime (RFC 2047 Unicode headers, Bcc, base64 parts); caller headers cannot set sender or envelope fields. Metadata gmailThreadId, gmailInReplyTo and gmailReferences produce a correctly threaded reply. A response without a message id raises response_unverified.
  • GmailMailboxOperations (./impls/gmail-mailbox) for native drafts (create/update/get/send), label changes, archive (removes INBOX only) and read state. These are provider drivers; agent-initiated calls must arrive through Runtime Node authority.
  • parseGmailPushNotification and GmailWatchOperations (./impls/gmail-push) treat Gmail push as a wake signal only; changes are fetched through history.
  • MicrosoftGraphOutboundProvider for delegated Microsoft user mail. Graph 202 Accepted is represented as queued acceptance without a provider message id; ambiguous responses retain only sanitized diagnostic correlations.
  • MicrosoftGraphInboundProvider for folder-scoped message delta sync. Complete opaque next/delta links are mailbox-bound, and deletion tombstones remain explicit reconciliation inputs.
  • MicrosoftGraphMessageSubscriptionManager for bounded create, renewal, and deletion of Outlook message subscriptions. Notification batches require exact subscription/client-state binding; missed lifecycle events require delta sync.
  • PostmarkEmailProvider for transactional email delivery
  • ResendEmailProvider for outbound delivery with provider-native retry idempotency through a bounded EmailOutboundMessage.idempotencyKey
  • MailerSendEmailProvider for outbound text, HTML, template, scheduled, bulk, personalized, tagged, header, CC/BCC/reply-to, and inline/regular attachment delivery through the official MailerSend REST API
  • MailerSendInboundProvider for official inbound-route list/get/create/update/ delete operations with email and webhook forwards
  • ingestMailerSendWebhook and authenticateMailerSendWebhook for raw-body HMAC-SHA256 verification, delivery receipts, inbound MIME projections, test callbacks, replay suppression, and non-regressing delivery status
  • ingestResendWebhook for raw-body signature verification and svix-id replay deduplication plus non-regressing provider-message status projection through a caller-owned atomic event store. Results expose only a deterministic provider-message:sha256:* reference; raw provider message ids remain transient.
  • SqlResendWebhookEventStore (./impls/resend-webhook-sql-store) is the durable SQL implementation of that store for a pg-compatible pool (no pg dependency): one transaction inserts into the host's replay ledger, rejects an event id reused for different content, advances the per-message status only for a higher RESEND_DELIVERY_STATUS_RANKS rank or a later equal-rank event, and runs an optional onStatusApplied host hook in the same transaction. Hosts own the two tables (validated plain identifiers) and their migrations; every failure surfaces as retryable ResendWebhookStoreUnavailableError.

MailerSend

Use the focused exports so browser bundles never pull server-only provider code:

ts
import { MailerSendEmailProvider } from
  "@lssm-tech/integration.provider-email/impls/mailersend-email";
import { MailerSendInboundProvider } from
  "@lssm-tech/integration.provider-email/impls/mailersend-inbound";
import { ingestMailerSendWebhook } from
  "@lssm-tech/integration.provider-email/impls/mailersend-webhook";

The caller supplies apiKey and may inject baseUrl and fetch. Credentials must remain in a server-side vault; provider errors expose only status and a normalized code. Webhooks must pass the exact raw request body and Signature header with the endpoint signing secret. A successful handler should respond within three seconds; durable stores must deduplicate event ids because MailerSend retries failed delivery.

Inbound webhook projections preserve text, HTML, raw MIME, recipients, headers, SPF/DKIM results, and inline/regular attachments. Application code remains responsible for retention, attachment storage, malware scanning, and workspace policy before content enters CommunicationOS projections or AI context.

Compatibility

This package owns the email implementation slice split out of @lssm-tech/integration.providers-impls. The legacy package continues to re-export these subpaths for existing consumers.

Declared capabilities.

Integration Provider Email

Email provider implementations for ContractSpec.

Use it to

  • Adopt email provider implementations for contractspec

Requires

  • TypeScript

Choose another boundary when

  • The @lssm-tech/integration.provider-email package constraints do not match the target runtime or platform.

@lssm-tech/integration.provider-email

@lssm-tech/integration.provider-email/email

@lssm-tech/integration.provider-email/impls

@lssm-tech/integration.provider-email/impls/gmail-auth

@lssm-tech/integration.provider-email/impls/gmail-inbound

@lssm-tech/integration.provider-email/impls/gmail-outbound

@lssm-tech/integration.provider-email/impls/gmail-attachments

@lssm-tech/integration.provider-email/impls/gmail-evidence

@lssm-tech/integration.provider-email/impls/gmail-mailbox

@lssm-tech/integration.provider-email/impls/gmail-mailbox-reader

@lssm-tech/integration.provider-email/impls/gmail-push

@lssm-tech/integration.provider-email/impls/mailersend-client

@lssm-tech/integration.provider-email/impls/mailersend-email

@lssm-tech/integration.provider-email/impls/mailersend-inbound

@lssm-tech/integration.provider-email/impls/mailersend-webhook

@lssm-tech/integration.provider-email/impls/mailersend-webhook-parser

@lssm-tech/integration.provider-email/impls/mailersend-webhook-store

@lssm-tech/integration.provider-email/impls/microsoft-graph-inbound

@lssm-tech/integration.provider-email/impls/microsoft-graph-outbound

@lssm-tech/integration.provider-email/impls/microsoft-graph-subscriptions

@lssm-tech/integration.provider-email/impls/resend-webhook-sql-store

Imports and export paths.

29 entries

These are package-manifest entry points. Named symbols listed above come from the capability catalogue; this is not an exhaustive TypeScript symbol reference.

29 importaciones

Dependencies and related packages.

Runtime dependencies 4
googleapis
catalog:integrations
resend
^6.28.1
Development dependencies 5
@types/bun
catalog:types
postmark
^5.1.0
typescript
catalog:

Package scripts.

Commands declared by this package. Review its setup requirements before running them; no command here was executed by this review.

buildcontractspec-bun-build build
build:bundlecontractspec-bun-build transpile
build:typescontractspec-bun-build types
devcontractspec-bun-build dev
cleanrimraf dist .turbo
lint:checknode ../../../scripts/biome.cjs check .
lint:fixnode ../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../scripts/biome.cjs check --write .
testbun test
prebuildcontractspec-bun-build prebuild
typechecktsgo --noEmit
Tu vista

Make room for your context.

Shape the presentation around this moment. You can change it whenever you need.

Tu contexto

The different parts of you

Choose a starting point

Una mezcla útil de contexto, imágenes y orientación discreta.

Tune each dimension
Each dimension can change independently. Product permissions and available actions stay unchanged.

Support the way you begin and return

Tune your support

Comodidad de lectura

Elige tu idioma

El idioma de la interfaz solo cambia el texto. Los mercados, precios y flujos de trabajo conservan sus propios ajustes.

Cobertura de traducción

Parte del contenido se muestra en inglés.

Navegación151
Grafo616
Categorías188
Portafolio332
Ejemplos2035
Vista previa de la fuente41

Se añadirán más traducciones a medida que se revise el contenido.

Esta preferencia se guarda en este navegador.

Buscar en el sitio web

Puntos de partida útiles

Sin resultados. Prueba una frase más corta, un nombre de operación u otro ámbito de búsqueda.

UN POCO DE ESPACIO PARA EXPLORAR

Encuentra algo que explorar.

Abre una vista detallada en esta página, prueba otra perspectiva o sigue el detalle a su propia página.

Cómo funcionan las vistas previas y los controles
01

Mirar antes de salir

Pasa el cursor por un enlace o enfócalo con Tab para ver una vista previa. Hacer clic en el enlace original o pulsar Intro siempre abre su destino.

02

Mantener el contexto

Entra en la vista previa para explorar sus secciones. Usa Alt + ↓ desde un enlace enfocado para entrar con el teclado. Escape la cierra.

03

Abrir las posibilidades

Las filas desplegables, las perspectivas y los controles destacados revelan más. Tu vista cambia la comodidad de lectura y el contexto que exploras.

Un botón separado para mirar más de cerca

Muestra pequeños botones de vista previa junto a los enlaces donde haya espacio. Toca el ojo para inspeccionar o el enlace para ir directamente. Esta elección permanece en esta pestaña.

No se recoge historial de navegación. El movimiento reducido sigue tu dispositivo y Tu vista.