Capability first · transport second

MailApi.mjs

Re-exports renderer Mail, durable outbox, and HTTP transport APIs through the public mail entrypoint.

SDK 0.97.1Runtime 0.8.12Protocol arcane/1
On this page

Overview

Re-exports renderer Mail, durable outbox, and HTTP transport APIs through the public mail entrypoint.

  • Artifact
    MailApi.mjs · esm
  • Classification
    public first party
  • Availability
    Browser/native renderer; each re-export retains its owning module's host requirements
  • Normalization
    Preserves the complete contracts of Mail.js, MailOutbox.mjs, and MailTransport.mjs without creating another transport or queue. Import retains Mail.js singleton installation in a browser window.

Import and lifecycle

JavaScript
import * as module from '/node_modules/arcane-os/runtime/arcane/modules/MailApi.mjs';

Re-exports the existing renderer mail, outbox, and HTTP transport owners. Import retains Mail.js singleton installation in a browser window; it creates no additional delivery or queue owner.

Application-facing behavior: Default and named Mail, resolveMailConfig, MailOutbox/createMailOutbox and its four constants, MailTransportError, normalizeMailEndpoint, serializeMailReport, and sendMailReport.

Protocol and host implementation

Mail configuration and Arcane.mail.send or HTTP(S); arcane-mail-outbox/1 This detail does not widen the application-facing API or grant authority.

Exports, signatures, parameters, and results

BindingFormDeclaration or signatureParameter syntax
defaultdefaultdefault default—
Mailre-exportdefault as Mail—
resolveMailConfigre-exportresolveMailConfig—
MAIL_OUTBOX_IDEMPOTENCY_WINDOW_MSre-exportMAIL_OUTBOX_IDEMPOTENCY_WINDOW_MS—
MAIL_OUTBOX_PROTOCOLre-exportMAIL_OUTBOX_PROTOCOL—
MAIL_OUTBOX_STATESre-exportMAIL_OUTBOX_STATES—
MAIL_OUTBOX_TABLEre-exportMAIL_OUTBOX_TABLE—
MailOutboxre-exportMailOutbox—
createMailOutboxre-exportcreateMailOutbox—
MailTransportErrorre-exportMailTransportError—
normalizeMailEndpointre-exportnormalizeMailEndpoint—
sendMailReportre-exportsendMailReport—
serializeMailReportre-exportserializeMailReport—

Parameter meanings and results

The managed-browser arcane-os/mail entrypoint exports default and named Mail, resolveMailConfig, the four MAIL_OUTBOX constants, MailOutbox, createMailOutbox, MailTransportError, normalizeMailEndpoint, serializeMailReport, and sendMailReport. Default and named Mail refer to the same class. Each re-export preserves its owning module inputs, complete results, errors, and lifecycle.

Events, side effects, and errors

Source-literal CustomEvent dispatches

No source-literal CustomEvent dispatch is part of this artifact.

Lifecycle and event flow

This artifact has no additional documented lifecycle event flow.

Direct coded failures

This artifact directly assigns no stable coded failure.

Exported Error subclasses

This artifact exports no Error subclass.

Documented failure behavior

  • The re-exported Mail, MailOutbox, and MailTransport contracts retain their original errors.

Availability and capabilities

Browser/native renderer; each re-export retains its owning module's host requirements. Preserves the complete contracts of Mail.js, MailOutbox.mjs, and MailTransport.mjs without creating another transport or queue. Import retains Mail.js singleton installation in a browser window.

Renderer entrypoint with the same optional Core mail.send and explicit HTTP delivery as Mail.js. Node resolves the public arcane-os/mail entrypoint to its separate Node implementation.

Contract example

JavaScript
import {resolveMailConfig} from 'arcane-os/mail';

const configuration=resolveMailConfig(
    {appName:'dragon-dispatch',endpoint:'https://mail.example.com/v1/mail'},
    {document:null,location:new URL('https://dispatch.example.com/')}
);
console.log(configuration.endpoint);

No direct Core call is claimed for this artifact. Any injected provider or consuming module retains its own documented authority.