@holo-js/mail 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-UB6ANQ2F.mjs +552 -0
- package/dist/contracts.d.ts +320 -0
- package/dist/contracts.mjs +36 -0
- package/dist/index.d.ts +379 -0
- package/dist/index.mjs +1321 -0
- package/package.json +52 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
import * as _holo_js_config from '@holo-js/config';
|
|
2
|
+
import { NormalizedHoloMailConfig, HoloAppEnv } from '@holo-js/config';
|
|
3
|
+
export { HoloMailConfig, NormalizedHoloMailConfig, defineMailConfig } from '@holo-js/config';
|
|
4
|
+
import { ResolvedMail, MailDriverExecutionContext, MailSendResult, MailPreviewPolicy, MailPreviewFormat, MailRuntimeBindings, MailDefinition, MailDefinitionInput, MailOverrideInput, MailPreviewResult, PendingMailSend, MailDelayValue, MailDriver, ResolvedMailAttachment, MailAddress, MailJsonObject, MailRenderSource, MailViewRenderInput, RegisteredMailDriver, RegisterMailDriverOptions } from './contracts.js';
|
|
5
|
+
export { BuiltInMailDriverRegistry, HoloMailDriverRegistry, MailAddressInput, MailAttachmentBase, MailAttachmentContent, MailAttachmentDisposition, MailAttachmentHelperOptions, MailAttachmentInput, MailAttachmentMetadata, MailAttachmentResolutionContext, MailAttachmentResolutionPlan, MailContentAttachment, MailContentAttachmentHelperOptions, MailContentSourceKind, MailDriverName, MailJsonValue, MailPathAttachment, MailPreviewInput, MailPriority, MailQueueOptions, MailRecipientsInput, MailRenderPreviewInput, MailResolvableAttachment, MailResolvedAttachmentPayload, MailSendInput, MailSendOptions, MailStorageAttachment, MailStorageAttachmentHelperOptions, MailViewRenderer, attachContent, attachFromPath, attachFromStorage, createAttachmentMetadata, createAttachmentResolutionPlan, createAttachmentResolutionPlans, defineMail, inferMimeTypeFromName, isAttachmentQueueSafe, isMailDefinition, mailInternals, mergeMailDefinitionInputs, normalizeMailDefinition, resolveAttachmentDefinition, resolveNormalizedAttachment } from './contracts.js';
|
|
6
|
+
|
|
7
|
+
type RuntimeState = {
|
|
8
|
+
bindings?: MailRuntimeBindings;
|
|
9
|
+
fakeSent?: FakeSentMail[];
|
|
10
|
+
previewArtifacts?: MailPreviewArtifact[];
|
|
11
|
+
loadQueueModule?: () => Promise<QueueModule>;
|
|
12
|
+
loadDbModule?: () => Promise<DbModule | null>;
|
|
13
|
+
loadNodemailerModule?: () => Promise<NodemailerModule>;
|
|
14
|
+
loadStorageModule?: () => Promise<StorageModule>;
|
|
15
|
+
};
|
|
16
|
+
type MutableSendOptions = {
|
|
17
|
+
mailer?: string;
|
|
18
|
+
connection?: string;
|
|
19
|
+
queue?: string;
|
|
20
|
+
delay?: MailDelayValue;
|
|
21
|
+
afterCommit?: boolean;
|
|
22
|
+
};
|
|
23
|
+
type ResolvedEnvelope = {
|
|
24
|
+
readonly config: NormalizedHoloMailConfig;
|
|
25
|
+
readonly mailer: string;
|
|
26
|
+
readonly from: MailAddress;
|
|
27
|
+
readonly replyTo: MailAddress;
|
|
28
|
+
readonly to: readonly MailAddress[];
|
|
29
|
+
readonly cc: readonly MailAddress[];
|
|
30
|
+
readonly bcc: readonly MailAddress[];
|
|
31
|
+
};
|
|
32
|
+
type RenderedContent = {
|
|
33
|
+
readonly kind: 'text' | 'html' | 'markdown' | 'render';
|
|
34
|
+
readonly html?: string;
|
|
35
|
+
readonly text?: string;
|
|
36
|
+
readonly source: Readonly<{
|
|
37
|
+
readonly kind: 'text' | 'html' | 'markdown' | 'render';
|
|
38
|
+
readonly markdown?: string;
|
|
39
|
+
readonly rawHtml?: string;
|
|
40
|
+
readonly render?: Readonly<MailRenderSource>;
|
|
41
|
+
}>;
|
|
42
|
+
};
|
|
43
|
+
type PreviewComputation = ResolvedEnvelope & {
|
|
44
|
+
readonly preview: MailPreviewResult;
|
|
45
|
+
};
|
|
46
|
+
type SendPreparation = {
|
|
47
|
+
readonly attachments: readonly ResolvedMailAttachment[];
|
|
48
|
+
};
|
|
49
|
+
type ResolvedDriver = {
|
|
50
|
+
readonly mailer: string;
|
|
51
|
+
readonly driver: string;
|
|
52
|
+
readonly implementation: MailDriver;
|
|
53
|
+
};
|
|
54
|
+
type ResolvedQueuePlan = {
|
|
55
|
+
readonly queued: boolean;
|
|
56
|
+
readonly connection?: string;
|
|
57
|
+
readonly queue?: string;
|
|
58
|
+
readonly delay?: MailDelayValue;
|
|
59
|
+
readonly afterCommit: boolean;
|
|
60
|
+
};
|
|
61
|
+
type QueueDispatchChain = {
|
|
62
|
+
onConnection(name: string): QueueDispatchChain;
|
|
63
|
+
onQueue(name: string): QueueDispatchChain;
|
|
64
|
+
delay(value: number | Date): QueueDispatchChain;
|
|
65
|
+
dispatch(): Promise<unknown>;
|
|
66
|
+
};
|
|
67
|
+
type QueueModule = {
|
|
68
|
+
defineJob(definition: {
|
|
69
|
+
handle(payload: QueuedMailDeliveryPayload): Promise<unknown> | unknown;
|
|
70
|
+
}): unknown;
|
|
71
|
+
dispatch(jobName: string, payload: QueuedMailDeliveryPayload): QueueDispatchChain;
|
|
72
|
+
getRegisteredQueueJob(name: string): unknown;
|
|
73
|
+
registerQueueJob(definition: unknown, options: {
|
|
74
|
+
name: string;
|
|
75
|
+
}): void;
|
|
76
|
+
};
|
|
77
|
+
type DbModule = {
|
|
78
|
+
connectionAsyncContext: {
|
|
79
|
+
getActive(): {
|
|
80
|
+
connection: {
|
|
81
|
+
getScope(): {
|
|
82
|
+
kind: string;
|
|
83
|
+
};
|
|
84
|
+
afterCommit(callback: () => Promise<void>): void;
|
|
85
|
+
};
|
|
86
|
+
} | undefined;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
type NodemailerAddress = {
|
|
90
|
+
readonly address: string;
|
|
91
|
+
readonly name?: string;
|
|
92
|
+
};
|
|
93
|
+
type NodemailerAttachment = {
|
|
94
|
+
readonly filename: string;
|
|
95
|
+
readonly contentType?: string;
|
|
96
|
+
readonly contentDisposition?: string;
|
|
97
|
+
readonly cid?: string;
|
|
98
|
+
readonly path?: string;
|
|
99
|
+
readonly content?: string | Uint8Array;
|
|
100
|
+
};
|
|
101
|
+
type NodemailerMailMessage = {
|
|
102
|
+
readonly messageId: string;
|
|
103
|
+
readonly from: NodemailerAddress;
|
|
104
|
+
readonly replyTo: NodemailerAddress;
|
|
105
|
+
readonly to: readonly NodemailerAddress[];
|
|
106
|
+
readonly cc?: readonly NodemailerAddress[];
|
|
107
|
+
readonly bcc?: readonly NodemailerAddress[];
|
|
108
|
+
readonly subject: string;
|
|
109
|
+
readonly html?: string;
|
|
110
|
+
readonly text?: string;
|
|
111
|
+
readonly attachments?: readonly NodemailerAttachment[];
|
|
112
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
113
|
+
};
|
|
114
|
+
type NodemailerSendResult = {
|
|
115
|
+
readonly messageId?: string;
|
|
116
|
+
readonly response?: string;
|
|
117
|
+
};
|
|
118
|
+
type NodemailerTransport = {
|
|
119
|
+
sendMail(message: NodemailerMailMessage): Promise<NodemailerSendResult>;
|
|
120
|
+
};
|
|
121
|
+
type NodemailerModule = {
|
|
122
|
+
createTransport(options: Record<string, unknown>): NodemailerTransport;
|
|
123
|
+
};
|
|
124
|
+
type StorageDisk = {
|
|
125
|
+
readonly driver: string;
|
|
126
|
+
path(path: string): string;
|
|
127
|
+
getBytes(path: string): Promise<Uint8Array | null>;
|
|
128
|
+
};
|
|
129
|
+
type StorageModule = {
|
|
130
|
+
Storage: {
|
|
131
|
+
disk(diskName?: string): StorageDisk;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
type SerializedQueuedAttachment = Readonly<{
|
|
135
|
+
readonly source: ResolvedMailAttachment['source'];
|
|
136
|
+
readonly name: string;
|
|
137
|
+
readonly contentType?: string;
|
|
138
|
+
readonly disposition: ResolvedMailAttachment['disposition'];
|
|
139
|
+
readonly contentId?: string;
|
|
140
|
+
readonly path?: string;
|
|
141
|
+
readonly storage?: {
|
|
142
|
+
readonly path: string;
|
|
143
|
+
readonly disk?: string;
|
|
144
|
+
};
|
|
145
|
+
readonly content?: string | Readonly<{
|
|
146
|
+
readonly encoding: 'base64';
|
|
147
|
+
readonly value: string;
|
|
148
|
+
}>;
|
|
149
|
+
}>;
|
|
150
|
+
type QueuedResolvedMailPayload = Readonly<Omit<ResolvedMail, 'attachments'> & {
|
|
151
|
+
readonly attachments: readonly SerializedQueuedAttachment[];
|
|
152
|
+
}>;
|
|
153
|
+
type QueuedMailDeliveryPayload = Readonly<{
|
|
154
|
+
readonly messageId: string;
|
|
155
|
+
readonly mailer: string;
|
|
156
|
+
readonly driver: string;
|
|
157
|
+
readonly queued: true;
|
|
158
|
+
readonly deferred?: boolean;
|
|
159
|
+
readonly mail: QueuedResolvedMailPayload;
|
|
160
|
+
}>;
|
|
161
|
+
interface FakeSentMail {
|
|
162
|
+
readonly messageId: string;
|
|
163
|
+
readonly createdAt: Date;
|
|
164
|
+
readonly mail: Readonly<ResolvedMail>;
|
|
165
|
+
readonly context: Readonly<MailDriverExecutionContext>;
|
|
166
|
+
readonly result: Readonly<MailSendResult>;
|
|
167
|
+
}
|
|
168
|
+
interface MailPreviewArtifact {
|
|
169
|
+
readonly messageId: string;
|
|
170
|
+
readonly createdAt: Date;
|
|
171
|
+
readonly mail: Readonly<ResolvedMail>;
|
|
172
|
+
readonly context: Readonly<MailDriverExecutionContext>;
|
|
173
|
+
readonly result: Readonly<MailSendResult>;
|
|
174
|
+
}
|
|
175
|
+
declare class MailError extends Error {
|
|
176
|
+
readonly code: string;
|
|
177
|
+
constructor(message: string, code?: string, options?: ErrorOptions);
|
|
178
|
+
}
|
|
179
|
+
declare class MailPreviewDisabledError extends MailError {
|
|
180
|
+
readonly policy: MailPreviewPolicy;
|
|
181
|
+
constructor(policy: MailPreviewPolicy);
|
|
182
|
+
}
|
|
183
|
+
declare class MailPreviewFormatUnavailableError extends MailError {
|
|
184
|
+
readonly format: MailPreviewFormat;
|
|
185
|
+
constructor(format: MailPreviewFormat);
|
|
186
|
+
}
|
|
187
|
+
declare class MailSendError extends MailError {
|
|
188
|
+
readonly messageId: string;
|
|
189
|
+
readonly mailer: string;
|
|
190
|
+
readonly driver: string;
|
|
191
|
+
constructor(details: {
|
|
192
|
+
readonly messageId: string;
|
|
193
|
+
readonly mailer: string;
|
|
194
|
+
readonly driver: string;
|
|
195
|
+
readonly message?: string;
|
|
196
|
+
}, options?: ErrorOptions);
|
|
197
|
+
}
|
|
198
|
+
declare function getRuntimeState(): RuntimeState;
|
|
199
|
+
declare function getRuntimeBindings(): MailRuntimeBindings;
|
|
200
|
+
declare function dynamicImport<TModule>(specifier: string): Promise<TModule>;
|
|
201
|
+
declare function loadQueueModule(): Promise<QueueModule>;
|
|
202
|
+
declare function loadDbModule(): Promise<DbModule | null>;
|
|
203
|
+
declare function resolveNodemailerModule(module: unknown): NodemailerModule;
|
|
204
|
+
declare function loadNodemailerModule(): Promise<NodemailerModule>;
|
|
205
|
+
declare function resolveStorageModule(module: unknown): StorageModule;
|
|
206
|
+
declare function loadStorageModule(): Promise<StorageModule>;
|
|
207
|
+
declare function getFakeSentState(): FakeSentMail[];
|
|
208
|
+
declare function getPreviewArtifactState(): MailPreviewArtifact[];
|
|
209
|
+
declare function normalizeExecutionString(value: string, label: string): string;
|
|
210
|
+
declare function normalizeExecutionDelay(value: MailDelayValue): MailDelayValue;
|
|
211
|
+
declare function getResolvedConfig(): NormalizedHoloMailConfig;
|
|
212
|
+
declare function resolveCurrentEnvironment(): HoloAppEnv;
|
|
213
|
+
declare function createPreviewPolicy(config?: NormalizedHoloMailConfig): MailPreviewPolicy;
|
|
214
|
+
declare function assertPreviewEnabled(config?: NormalizedHoloMailConfig): void;
|
|
215
|
+
declare function createPreviewHtml(preview: MailPreviewResult): string;
|
|
216
|
+
declare function escapeHtml(value: string): string;
|
|
217
|
+
declare function formatAddress(address: {
|
|
218
|
+
readonly email: string;
|
|
219
|
+
readonly name?: string;
|
|
220
|
+
}): string;
|
|
221
|
+
declare function renderPreviewResponse(preview: MailPreviewResult, format: MailPreviewFormat): Response;
|
|
222
|
+
declare function getMailerConfig(mailer: string, config?: NormalizedHoloMailConfig): _holo_js_config.NormalizedHoloMailMailerConfig;
|
|
223
|
+
declare function isQueueRequested(mail: MailDefinition, mailer: string, options: MutableSendOptions | Readonly<MutableSendOptions>, config?: NormalizedHoloMailConfig): boolean;
|
|
224
|
+
declare function resolveQueuePlan(mail: MailDefinition, options: MutableSendOptions | Readonly<MutableSendOptions>, mailer: string, config?: NormalizedHoloMailConfig): ResolvedQueuePlan;
|
|
225
|
+
declare function prepareMailSend(mail: MailDefinition, queued: boolean): Promise<SendPreparation>;
|
|
226
|
+
declare function createResolvedMail(preview: MailPreviewResult, attachments: readonly ResolvedMailAttachment[]): ResolvedMail;
|
|
227
|
+
declare function createSendContext(messageId: string, resolvedDriver: ResolvedDriver, queued: boolean, deferred?: boolean): MailDriverExecutionContext;
|
|
228
|
+
declare function freezeSendResult(result: MailSendResult): Readonly<MailSendResult>;
|
|
229
|
+
declare function createBaseSendResult(context: MailDriverExecutionContext, overrides?: Partial<MailSendResult>): Readonly<MailSendResult>;
|
|
230
|
+
declare function normalizeDriverResult(result: MailSendResult | undefined, context: MailDriverExecutionContext): Readonly<MailSendResult>;
|
|
231
|
+
declare function createMailRecord<TRecord extends FakeSentMail | MailPreviewArtifact>(context: MailDriverExecutionContext, mail: Readonly<ResolvedMail>, result: Readonly<MailSendResult>): TRecord;
|
|
232
|
+
declare function persistPreviewArtifact(artifact: MailPreviewArtifact): Promise<void>;
|
|
233
|
+
declare function createSmtpAddress(address: MailAddress): NodemailerAddress;
|
|
234
|
+
declare function createSmtpHeaders(mail: Readonly<ResolvedMail>): Readonly<Record<string, string>> | undefined;
|
|
235
|
+
declare function createSmtpAttachment(attachment: ResolvedMailAttachment): Promise<NodemailerAttachment>;
|
|
236
|
+
declare function createSmtpMessage(mail: Readonly<ResolvedMail>, context: Readonly<MailDriverExecutionContext>): Promise<NodemailerMailMessage>;
|
|
237
|
+
declare function sendViaSmtp(mail: Readonly<ResolvedMail>, context: Readonly<MailDriverExecutionContext>): Promise<Readonly<MailSendResult>>;
|
|
238
|
+
declare function resolveDriver(mail: MailDefinition, options: MutableSendOptions | Readonly<MutableSendOptions>, config: NormalizedHoloMailConfig): ResolvedDriver;
|
|
239
|
+
declare function resolveDriverByName(mailer: string, driver: string): ResolvedDriver;
|
|
240
|
+
declare function serializeQueuedAttachment(attachment: ResolvedMailAttachment): SerializedQueuedAttachment;
|
|
241
|
+
declare function deserializeQueuedAttachment(attachment: SerializedQueuedAttachment): ResolvedMailAttachment;
|
|
242
|
+
declare function createQueuedMailPayload(mail: ResolvedMail, context: MailDriverExecutionContext): QueuedMailDeliveryPayload;
|
|
243
|
+
declare function createResolvedMailFromQueuedPayload(payload: QueuedMailDeliveryPayload): ResolvedMail;
|
|
244
|
+
declare function deliverResolvedMail(mail: ResolvedMail, resolvedDriver: ResolvedDriver, context: MailDriverExecutionContext): Promise<Readonly<MailSendResult>>;
|
|
245
|
+
declare function runQueuedMailDelivery(payload: QueuedMailDeliveryPayload): Promise<Readonly<MailSendResult>>;
|
|
246
|
+
declare function ensureMailQueueJobRegistered(queueModule?: QueueModule): Promise<QueueModule>;
|
|
247
|
+
declare function dispatchQueuedMail(mail: ResolvedMail, context: MailDriverExecutionContext, plan: ResolvedQueuePlan): Promise<Readonly<MailSendResult>>;
|
|
248
|
+
declare function deferSendUntilCommit(context: MailDriverExecutionContext, callback: () => Promise<Readonly<MailSendResult>>): Promise<Readonly<MailSendResult> | null>;
|
|
249
|
+
declare function renderView(input: MailViewRenderInput): Promise<string>;
|
|
250
|
+
declare function stripMarkdownSyntax(markdown: string): string;
|
|
251
|
+
declare function renderMarkdownInline(markdown: string): string;
|
|
252
|
+
declare function renderMarkdown(markdown: string): string;
|
|
253
|
+
declare function resolveSourceKind(mail: MailDefinition): RenderedContent['kind'];
|
|
254
|
+
declare function resolveMailerName(mail: MailDefinition, config: NormalizedHoloMailConfig): string;
|
|
255
|
+
declare function resolveEnvelope(mail: MailDefinition): ResolvedEnvelope;
|
|
256
|
+
declare function createMarkdownWrapperProps(mail: MailDefinition, envelope: ResolvedEnvelope, html: string, text: string): MailJsonObject;
|
|
257
|
+
declare function renderContent(mail: MailDefinition, envelope: ResolvedEnvelope): Promise<RenderedContent>;
|
|
258
|
+
declare function computePreview(mail: MailDefinition): Promise<PreviewComputation>;
|
|
259
|
+
declare class PendingSend implements PendingMailSend<MailSendResult> {
|
|
260
|
+
#private;
|
|
261
|
+
constructor(mail: MailDefinition, options?: MutableSendOptions);
|
|
262
|
+
using(name: string): PendingSend;
|
|
263
|
+
onConnection(name: string): PendingSend;
|
|
264
|
+
onQueue(name: string): PendingSend;
|
|
265
|
+
delay(value: MailDelayValue): PendingSend;
|
|
266
|
+
afterCommit(): PendingSend;
|
|
267
|
+
then<TResult1 = MailSendResult, TResult2 = never>(onfulfilled?: ((value: MailSendResult) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
|
|
268
|
+
catch<TResult1 = never>(onrejected?: ((reason: unknown) => TResult1 | PromiseLike<TResult1>) | null): Promise<MailSendResult | TResult1>;
|
|
269
|
+
finally(onfinally?: (() => void) | null): Promise<MailSendResult>;
|
|
270
|
+
private execute;
|
|
271
|
+
}
|
|
272
|
+
interface MailRuntimeFacade {
|
|
273
|
+
sendMail(mail: MailDefinition | MailDefinitionInput, overrides?: MailOverrideInput): PendingMailSend<MailSendResult>;
|
|
274
|
+
previewMail(mail: MailDefinition | MailDefinitionInput, overrides?: MailOverrideInput): Promise<MailPreviewResult>;
|
|
275
|
+
renderMailPreview(mail: MailDefinition | MailDefinitionInput, overrides?: MailOverrideInput, format?: MailPreviewFormat): Promise<Response>;
|
|
276
|
+
}
|
|
277
|
+
declare function listFakeSentMails(): readonly FakeSentMail[];
|
|
278
|
+
declare function resetFakeSentMails(): void;
|
|
279
|
+
declare function listPreviewMailArtifacts(): readonly MailPreviewArtifact[];
|
|
280
|
+
declare function resetPreviewMailArtifacts(): void;
|
|
281
|
+
declare function resolveMailInput(mail: MailDefinition | MailDefinitionInput, overrides?: MailOverrideInput): MailDefinition;
|
|
282
|
+
declare function configureMailRuntime(bindings?: MailRuntimeBindings): void;
|
|
283
|
+
declare function getMailRuntimeBindings(): MailRuntimeBindings;
|
|
284
|
+
declare function resetMailRuntime(): void;
|
|
285
|
+
declare function sendMail(mail: MailDefinition | MailDefinitionInput, overrides?: MailOverrideInput): PendingMailSend<MailSendResult>;
|
|
286
|
+
declare function previewMail(mail: MailDefinition | MailDefinitionInput, overrides?: MailOverrideInput): Promise<MailPreviewResult>;
|
|
287
|
+
declare function renderMailPreview(mail: MailDefinition | MailDefinitionInput, overrides?: MailOverrideInput, format?: MailPreviewFormat): Promise<Response>;
|
|
288
|
+
declare function getMailRuntime(): MailRuntimeFacade;
|
|
289
|
+
declare const mailRuntimeInternals: {
|
|
290
|
+
HOLO_MAIL_DELIVER_JOB: string;
|
|
291
|
+
MailSendError: typeof MailSendError;
|
|
292
|
+
MailError: typeof MailError;
|
|
293
|
+
MailPreviewDisabledError: typeof MailPreviewDisabledError;
|
|
294
|
+
MailPreviewFormatUnavailableError: typeof MailPreviewFormatUnavailableError;
|
|
295
|
+
PendingSend: typeof PendingSend;
|
|
296
|
+
assertPreviewEnabled: typeof assertPreviewEnabled;
|
|
297
|
+
builtInDrivers: Readonly<Record<string, MailDriver<MailSendResult>>>;
|
|
298
|
+
createBaseSendResult: typeof createBaseSendResult;
|
|
299
|
+
createMailRecord: typeof createMailRecord;
|
|
300
|
+
createQueuedMailPayload: typeof createQueuedMailPayload;
|
|
301
|
+
createResolvedMail: typeof createResolvedMail;
|
|
302
|
+
createSmtpAddress: typeof createSmtpAddress;
|
|
303
|
+
createSmtpAttachment: typeof createSmtpAttachment;
|
|
304
|
+
createSmtpHeaders: typeof createSmtpHeaders;
|
|
305
|
+
createSmtpMessage: typeof createSmtpMessage;
|
|
306
|
+
createSendContext: typeof createSendContext;
|
|
307
|
+
createResolvedMailFromQueuedPayload: typeof createResolvedMailFromQueuedPayload;
|
|
308
|
+
computePreview: typeof computePreview;
|
|
309
|
+
createMarkdownWrapperProps: typeof createMarkdownWrapperProps;
|
|
310
|
+
createPreviewHtml: typeof createPreviewHtml;
|
|
311
|
+
createPreviewPolicy: typeof createPreviewPolicy;
|
|
312
|
+
deferSendUntilCommit: typeof deferSendUntilCommit;
|
|
313
|
+
deliverResolvedMail: typeof deliverResolvedMail;
|
|
314
|
+
deserializeQueuedAttachment: typeof deserializeQueuedAttachment;
|
|
315
|
+
dispatchQueuedMail: typeof dispatchQueuedMail;
|
|
316
|
+
dynamicImport: typeof dynamicImport;
|
|
317
|
+
ensureMailQueueJobRegistered: typeof ensureMailQueueJobRegistered;
|
|
318
|
+
escapeHtml: typeof escapeHtml;
|
|
319
|
+
formatAddress: typeof formatAddress;
|
|
320
|
+
freezeSendResult: typeof freezeSendResult;
|
|
321
|
+
getFakeSentState: typeof getFakeSentState;
|
|
322
|
+
getMailerConfig: typeof getMailerConfig;
|
|
323
|
+
getPreviewArtifactState: typeof getPreviewArtifactState;
|
|
324
|
+
getResolvedConfig: typeof getResolvedConfig;
|
|
325
|
+
getRuntimeBindings: typeof getRuntimeBindings;
|
|
326
|
+
getRuntimeState: typeof getRuntimeState;
|
|
327
|
+
loadDbModule: typeof loadDbModule;
|
|
328
|
+
loadNodemailerModule: typeof loadNodemailerModule;
|
|
329
|
+
loadQueueModule: typeof loadQueueModule;
|
|
330
|
+
loadStorageModule: typeof loadStorageModule;
|
|
331
|
+
isQueueRequested: typeof isQueueRequested;
|
|
332
|
+
normalizeExecutionDelay: typeof normalizeExecutionDelay;
|
|
333
|
+
normalizeExecutionString: typeof normalizeExecutionString;
|
|
334
|
+
normalizeDriverResult: typeof normalizeDriverResult;
|
|
335
|
+
persistPreviewArtifact: typeof persistPreviewArtifact;
|
|
336
|
+
prepareMailSend: typeof prepareMailSend;
|
|
337
|
+
renderContent: typeof renderContent;
|
|
338
|
+
renderMarkdown: typeof renderMarkdown;
|
|
339
|
+
renderMarkdownInline: typeof renderMarkdownInline;
|
|
340
|
+
renderPreviewResponse: typeof renderPreviewResponse;
|
|
341
|
+
renderView: typeof renderView;
|
|
342
|
+
resolveDriver: typeof resolveDriver;
|
|
343
|
+
resolveDriverByName: typeof resolveDriverByName;
|
|
344
|
+
resolveCurrentEnvironment: typeof resolveCurrentEnvironment;
|
|
345
|
+
resolveEnvelope: typeof resolveEnvelope;
|
|
346
|
+
resolveQueuePlan: typeof resolveQueuePlan;
|
|
347
|
+
resolveMailInput: typeof resolveMailInput;
|
|
348
|
+
resolveMailerName: typeof resolveMailerName;
|
|
349
|
+
resolveNodemailerModule: typeof resolveNodemailerModule;
|
|
350
|
+
resolveSourceKind: typeof resolveSourceKind;
|
|
351
|
+
resolveStorageModule: typeof resolveStorageModule;
|
|
352
|
+
runQueuedMailDelivery: typeof runQueuedMailDelivery;
|
|
353
|
+
sendViaSmtp: typeof sendViaSmtp;
|
|
354
|
+
serializeQueuedAttachment: typeof serializeQueuedAttachment;
|
|
355
|
+
setDbModuleLoader(loader: (() => Promise<DbModule | null>) | undefined): void;
|
|
356
|
+
setNodemailerModuleLoader(loader: (() => Promise<NodemailerModule>) | undefined): void;
|
|
357
|
+
setQueueModuleLoader(loader: (() => Promise<QueueModule>) | undefined): void;
|
|
358
|
+
setStorageModuleLoader(loader: (() => Promise<StorageModule>) | undefined): void;
|
|
359
|
+
stripMarkdownSyntax: typeof stripMarkdownSyntax;
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
declare function normalizeDriverName(value: string): string;
|
|
363
|
+
declare function getRegistry(): Map<string, RegisteredMailDriver>;
|
|
364
|
+
declare function registerMailDriver<TDriver extends string>(name: TDriver, driver: MailDriver, options?: RegisterMailDriverOptions): void;
|
|
365
|
+
declare function getRegisteredMailDriver<TDriver extends string>(name: TDriver): RegisteredMailDriver<TDriver> | undefined;
|
|
366
|
+
declare function listRegisteredMailDrivers(): readonly RegisteredMailDriver[];
|
|
367
|
+
declare function resetMailDriverRegistry(): void;
|
|
368
|
+
declare const mailRegistryInternals: {
|
|
369
|
+
getRegistry: typeof getRegistry;
|
|
370
|
+
normalizeDriverName: typeof normalizeDriverName;
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
declare const mail: Readonly<{
|
|
374
|
+
previewMail: typeof previewMail;
|
|
375
|
+
renderMailPreview: typeof renderMailPreview;
|
|
376
|
+
sendMail: typeof sendMail;
|
|
377
|
+
}>;
|
|
378
|
+
|
|
379
|
+
export { type FakeSentMail, MailAddress, MailDefinition, MailDefinitionInput, MailDelayValue, MailDriver, MailDriverExecutionContext, MailError, MailJsonObject, MailOverrideInput, type MailPreviewArtifact, MailPreviewDisabledError, MailPreviewFormat, MailPreviewFormatUnavailableError, MailPreviewPolicy, MailPreviewResult, MailRenderSource, MailRuntimeBindings, MailSendError, MailSendResult, MailViewRenderInput, PendingMailSend, RegisterMailDriverOptions, RegisteredMailDriver, ResolvedMail, ResolvedMailAttachment, configureMailRuntime, mail as default, getMailRuntime, getMailRuntimeBindings, getRegisteredMailDriver, listFakeSentMails, listPreviewMailArtifacts, listRegisteredMailDrivers, mailRegistryInternals, mailRuntimeInternals, previewMail, registerMailDriver, renderMailPreview, resetFakeSentMails, resetMailDriverRegistry, resetMailRuntime, resetPreviewMailArtifacts, sendMail };
|