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
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
| Binding | Form | Declaration or signature | Parameter syntax |
|---|---|---|---|
default | default | default default | — |
Mail | re-export | default as Mail | — |
resolveMailConfig | re-export | resolveMailConfig | — |
MAIL_OUTBOX_IDEMPOTENCY_WINDOW_MS | re-export | MAIL_OUTBOX_IDEMPOTENCY_WINDOW_MS | — |
MAIL_OUTBOX_PROTOCOL | re-export | MAIL_OUTBOX_PROTOCOL | — |
MAIL_OUTBOX_STATES | re-export | MAIL_OUTBOX_STATES | — |
MAIL_OUTBOX_TABLE | re-export | MAIL_OUTBOX_TABLE | — |
MailOutbox | re-export | MailOutbox | — |
createMailOutbox | re-export | createMailOutbox | — |
MailTransportError | re-export | MailTransportError | — |
normalizeMailEndpoint | re-export | normalizeMailEndpoint | — |
sendMailReport | re-export | sendMailReport | — |
serializeMailReport | re-export | serializeMailReport | — |
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
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);
Related reference
No direct Core call is claimed for this artifact. Any injected provider or consuming module retains its own documented authority.