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 declarationsSELECT 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
Your view

Make room for your context.

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

Your context

The different parts of you

Choose a starting point

A useful mix of context, visuals and gentle guidance.

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

Reading comfort

Choose your language

Interface language changes text only. Markets, prices and workflows keep their own settings.

Translation coverage

Original source

Navigation151
Graph616
Categories378
Portfolio833
Examples2,035
Source preview1,542

More translations will be added as content is reviewed.

This preference is saved on this browser.

Search the website

Useful starting points

No results. Try a shorter phrase, an operation name or another search area.

A LITTLE ROOM TO EXPLORE

Find something to explore.

Open a closer look on this page, try a different perspective, or follow the detail into its own page.

How previews and controls work
01

Look before you leave

Hover a link or focus it with Tab to see a preview. Clicking the original link or pressing Enter always opens its destination.

02

Stay with the context

Move into the preview to explore its sections. Use Alt + ↓ from a focused link to enter it with the keyboard. Escape closes it.

03

Open the possibilities

Disclosure rows, perspective choices and highlighted controls reveal more. Your view changes reading comfort and the context you explore.

A separate button for a closer look

Show small preview buttons beside links where there is room. Tap the eye to inspect, or tap the link to go straight there. This choice stays in this tab.

No browsing history is collected. Reduced motion follows your device and Your view.