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 déclarationsSELECT 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 imports

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
Votre vue

Make room for your context.

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

Votre contexte

The different parts of you

Choose a starting point

Un mélange utile de contexte, de visuels et de guidage discret.

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

Confort de lecture

Choisir votre langue

La langue de l’interface change uniquement le texte. Les marchés, les prix et les parcours conservent leurs propres paramètres.

Couverture des traductions

Une partie du contenu est affichée en anglais.

Navigation151
Graphe616
Catégories378
Portfolio833
Exemples2 035
Aperçu de la source1 542

D’autres traductions seront ajoutées à mesure que le contenu sera relu.

Cette préférence est enregistrée dans ce navigateur.

Rechercher sur le site

Des points de départ utiles

Aucun résultat. Essayez une expression plus courte, un nom d’opération ou un autre périmètre de recherche.

UN PEU DE PLACE POUR EXPLORER

Trouvez quelque chose à explorer.

Ouvrez un aperçu détaillé sur cette page, essayez une autre perspective ou suivez le détail vers sa propre page.

Fonctionnement des aperçus et des commandes
01

Regarder avant de partir

Survolez un lien ou sélectionnez-le avec Tab pour voir un aperçu. Cliquer sur le lien d’origine ou appuyer sur Entrée ouvre toujours sa destination.

02

Rester dans le contexte

Entrez dans l’aperçu pour explorer ses sections. Depuis un lien sélectionné, utilisez Alt + ↓ pour y entrer au clavier. Échap le ferme.

03

Ouvrir les possibilités

Les lignes dépliables, les choix de perspective et les commandes mises en évidence révèlent davantage. Votre vue adapte le confort de lecture et le contexte exploré.

Un bouton séparé pour voir de plus près

Affichez de petits boutons d’aperçu à côté des liens quand l’espace le permet. Touchez l’œil pour examiner ou le lien pour y aller directement. Ce choix reste dans cet onglet.

Aucun historique de navigation n’est collecté. La réduction des animations suit votre appareil et Votre vue.