@fluojs/email 1.0.0-beta.1
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/LICENSE +21 -0
- package/README.ko.md +325 -0
- package/README.md +325 -0
- package/dist/channel.d.ts +24 -0
- package/dist/channel.d.ts.map +1 -0
- package/dist/channel.js +64 -0
- package/dist/constants.d.ts +6 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +17 -0
- package/dist/errors.d.ts +13 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +19 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/module.d.ts +45 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +151 -0
- package/dist/node/node.d.ts +2 -0
- package/dist/node/node.d.ts.map +1 -0
- package/dist/node/node.js +1 -0
- package/dist/node/nodemailer.d.ts +104 -0
- package/dist/node/nodemailer.d.ts.map +1 -0
- package/dist/node/nodemailer.js +166 -0
- package/dist/node.d.ts +2 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +1 -0
- package/dist/queue-entry.d.ts +4 -0
- package/dist/queue-entry.d.ts.map +1 -0
- package/dist/queue-entry.js +2 -0
- package/dist/queue.d.ts +38 -0
- package/dist/queue.d.ts.map +1 -0
- package/dist/queue.js +66 -0
- package/dist/service.d.ts +81 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/service.js +275 -0
- package/dist/status.d.ts +28 -0
- package/dist/status.d.ts.map +1 -0
- package/dist/status.js +83 -0
- package/dist/tokens.d.ts +10 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +6 -0
- package/dist/types.d.ts +242 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/package.json +84 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import type { AsyncModuleOptions, MaybePromise } from '@fluojs/core';
|
|
2
|
+
import type { NotificationDispatchRequest } from '@fluojs/notifications';
|
|
3
|
+
import type { QueueBackoffOptions, QueueRateLimiterOptions } from '@fluojs/queue';
|
|
4
|
+
/** RFC 5322-style email address with an optional display name. */
|
|
5
|
+
export interface EmailAddress {
|
|
6
|
+
address: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Address input accepted by the public API before normalization. */
|
|
10
|
+
export type EmailAddressLike = string | EmailAddress;
|
|
11
|
+
/** One file attachment forwarded to the configured transport implementation. */
|
|
12
|
+
export interface EmailAttachment {
|
|
13
|
+
content: string | Uint8Array;
|
|
14
|
+
contentType?: string;
|
|
15
|
+
filename: string;
|
|
16
|
+
}
|
|
17
|
+
/** Caller-supplied email message shape used for standalone delivery. */
|
|
18
|
+
export interface EmailMessage {
|
|
19
|
+
attachments?: readonly EmailAttachment[];
|
|
20
|
+
bcc?: EmailAddressLike | readonly EmailAddressLike[];
|
|
21
|
+
cc?: EmailAddressLike | readonly EmailAddressLike[];
|
|
22
|
+
from?: EmailAddressLike;
|
|
23
|
+
headers?: Readonly<Record<string, string>>;
|
|
24
|
+
html?: string;
|
|
25
|
+
metadata?: Record<string, unknown>;
|
|
26
|
+
replyTo?: EmailAddressLike | readonly EmailAddressLike[];
|
|
27
|
+
subject?: string;
|
|
28
|
+
text?: string;
|
|
29
|
+
to: EmailAddressLike | readonly EmailAddressLike[];
|
|
30
|
+
}
|
|
31
|
+
/** Normalized address list used internally after option/default resolution. */
|
|
32
|
+
export type NormalizedEmailAddressList = readonly EmailAddress[];
|
|
33
|
+
/** Normalized email message passed to one transport implementation. */
|
|
34
|
+
export interface NormalizedEmailMessage {
|
|
35
|
+
attachments?: readonly EmailAttachment[];
|
|
36
|
+
bcc: NormalizedEmailAddressList;
|
|
37
|
+
cc: NormalizedEmailAddressList;
|
|
38
|
+
from: EmailAddress;
|
|
39
|
+
headers?: Readonly<Record<string, string>>;
|
|
40
|
+
html?: string;
|
|
41
|
+
metadata?: Record<string, unknown>;
|
|
42
|
+
replyTo: NormalizedEmailAddressList;
|
|
43
|
+
subject?: string;
|
|
44
|
+
text?: string;
|
|
45
|
+
to: NormalizedEmailAddressList;
|
|
46
|
+
}
|
|
47
|
+
/** Context object forwarded to transport implementations per delivery attempt. */
|
|
48
|
+
export interface EmailTransportContext {
|
|
49
|
+
signal?: AbortSignal;
|
|
50
|
+
}
|
|
51
|
+
/** Provider-specific receipt returned by one email transport. */
|
|
52
|
+
export interface EmailTransportReceipt {
|
|
53
|
+
accepted?: readonly string[];
|
|
54
|
+
messageId?: string;
|
|
55
|
+
metadata?: Record<string, unknown>;
|
|
56
|
+
pending?: readonly string[];
|
|
57
|
+
rejected?: readonly string[];
|
|
58
|
+
response?: string;
|
|
59
|
+
}
|
|
60
|
+
/** Transport contract implemented by runtime-specific or provider-specific email adapters. */
|
|
61
|
+
export interface EmailTransport {
|
|
62
|
+
/**
|
|
63
|
+
* Sends one normalized email message.
|
|
64
|
+
*
|
|
65
|
+
* @param message Normalized message with resolved addresses and defaults.
|
|
66
|
+
* @param context Optional abort context propagated from the caller.
|
|
67
|
+
* @returns Provider-specific receipt details normalized for the Fluo email contract.
|
|
68
|
+
*/
|
|
69
|
+
send(message: NormalizedEmailMessage, context: EmailTransportContext): Promise<EmailTransportReceipt>;
|
|
70
|
+
/**
|
|
71
|
+
* Verifies transport readiness during bootstrap when configured.
|
|
72
|
+
*
|
|
73
|
+
* @returns A promise that resolves when the transport is ready for delivery.
|
|
74
|
+
*/
|
|
75
|
+
verify?(): MaybePromise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Closes underlying transport resources during application shutdown.
|
|
78
|
+
*
|
|
79
|
+
* @returns A promise that resolves when resource cleanup completes.
|
|
80
|
+
*/
|
|
81
|
+
close?(): MaybePromise<void>;
|
|
82
|
+
}
|
|
83
|
+
/** Factory used to construct a transport lazily during module bootstrap. */
|
|
84
|
+
export interface EmailTransportFactory {
|
|
85
|
+
/**
|
|
86
|
+
* Creates the transport instance used by {@link EmailService}.
|
|
87
|
+
*
|
|
88
|
+
* @returns The transport implementation that will own email delivery.
|
|
89
|
+
*/
|
|
90
|
+
create(): MaybePromise<EmailTransport>;
|
|
91
|
+
/**
|
|
92
|
+
* Stable diagnostic label describing the injected transport kind.
|
|
93
|
+
*
|
|
94
|
+
* @remarks
|
|
95
|
+
* This value is surfaced through platform status snapshots so applications can
|
|
96
|
+
* tell which adapter is currently wired without the core package hard-coding a
|
|
97
|
+
* provider-specific implementation.
|
|
98
|
+
*/
|
|
99
|
+
kind?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Declares whether the factory-created transport owns resources that the core package should close.
|
|
102
|
+
*
|
|
103
|
+
* @remarks
|
|
104
|
+
* Factories default to `true` because they typically allocate the transport instance.
|
|
105
|
+
* Directly injected transport instances default to `false` because the caller owns them.
|
|
106
|
+
*/
|
|
107
|
+
ownsResources?: boolean;
|
|
108
|
+
}
|
|
109
|
+
/** Template render input used for `NotificationDispatchRequest.template` integration. */
|
|
110
|
+
export interface EmailTemplateRenderInput<TPayload extends EmailNotificationPayload = EmailNotificationPayload> {
|
|
111
|
+
locale?: string;
|
|
112
|
+
metadata?: Record<string, unknown>;
|
|
113
|
+
payload: TPayload;
|
|
114
|
+
subject?: string;
|
|
115
|
+
template: string;
|
|
116
|
+
}
|
|
117
|
+
/** Render result returned by an optional email template renderer. */
|
|
118
|
+
export interface EmailTemplateRenderResult {
|
|
119
|
+
html?: string;
|
|
120
|
+
subject?: string;
|
|
121
|
+
text?: string;
|
|
122
|
+
}
|
|
123
|
+
/** Optional renderer used to turn notification templates into concrete email bodies. */
|
|
124
|
+
export interface EmailTemplateRenderer {
|
|
125
|
+
/**
|
|
126
|
+
* Renders one notification template into email subject/body content.
|
|
127
|
+
*
|
|
128
|
+
* @typeParam TPayload Payload shape carried by the notification request.
|
|
129
|
+
* @param input Template render input including the template key and opaque payload.
|
|
130
|
+
* @returns Rendered subject/body fragments that are merged with explicit payload overrides.
|
|
131
|
+
*/
|
|
132
|
+
render<TPayload extends EmailNotificationPayload = EmailNotificationPayload>(input: EmailTemplateRenderInput<TPayload>): MaybePromise<EmailTemplateRenderResult>;
|
|
133
|
+
}
|
|
134
|
+
/** Notification payload understood by {@link EmailChannel} and {@link EmailService.sendNotification}. */
|
|
135
|
+
export interface EmailNotificationPayload extends Record<string, unknown> {
|
|
136
|
+
attachments?: readonly EmailAttachment[];
|
|
137
|
+
bcc?: EmailAddressLike | readonly EmailAddressLike[];
|
|
138
|
+
cc?: EmailAddressLike | readonly EmailAddressLike[];
|
|
139
|
+
from?: EmailAddressLike;
|
|
140
|
+
headers?: Readonly<Record<string, string>>;
|
|
141
|
+
html?: string;
|
|
142
|
+
metadata?: Record<string, unknown>;
|
|
143
|
+
replyTo?: EmailAddressLike | readonly EmailAddressLike[];
|
|
144
|
+
templateData?: Record<string, unknown>;
|
|
145
|
+
text?: string;
|
|
146
|
+
to?: EmailAddressLike | readonly EmailAddressLike[];
|
|
147
|
+
}
|
|
148
|
+
/** Shared notification request subtype consumed by the email channel implementation. */
|
|
149
|
+
export interface EmailNotificationDispatchRequest extends NotificationDispatchRequest<EmailNotificationPayload> {
|
|
150
|
+
channel: string;
|
|
151
|
+
}
|
|
152
|
+
/** Caller-visible result returned by standalone and notification-backed email delivery. */
|
|
153
|
+
export interface EmailSendResult extends EmailTransportReceipt {
|
|
154
|
+
accepted: readonly string[];
|
|
155
|
+
messageId: string;
|
|
156
|
+
pending: readonly string[];
|
|
157
|
+
rejected: readonly string[];
|
|
158
|
+
}
|
|
159
|
+
/** Failure entry returned by tolerant batch delivery. */
|
|
160
|
+
export interface EmailSendFailure {
|
|
161
|
+
error: Error;
|
|
162
|
+
message: EmailMessage;
|
|
163
|
+
}
|
|
164
|
+
/** Summary returned by {@link EmailService.sendMany}. */
|
|
165
|
+
export interface EmailSendBatchResult {
|
|
166
|
+
failed: number;
|
|
167
|
+
failures: readonly EmailSendFailure[];
|
|
168
|
+
results: readonly EmailSendResult[];
|
|
169
|
+
succeeded: number;
|
|
170
|
+
}
|
|
171
|
+
/** Additional send controls applied to one email delivery attempt. */
|
|
172
|
+
export interface EmailSendOptions {
|
|
173
|
+
signal?: AbortSignal;
|
|
174
|
+
}
|
|
175
|
+
/** Additional controls applied to one batch send operation. */
|
|
176
|
+
export interface EmailSendManyOptions extends EmailSendOptions {
|
|
177
|
+
continueOnError?: boolean;
|
|
178
|
+
}
|
|
179
|
+
/** Queue worker execution defaults used by the built-in notifications queue integration. */
|
|
180
|
+
export interface EmailQueueWorkerOptions {
|
|
181
|
+
attempts?: number;
|
|
182
|
+
backoff?: QueueBackoffOptions;
|
|
183
|
+
concurrency?: number;
|
|
184
|
+
jobName?: string;
|
|
185
|
+
rateLimiter?: QueueRateLimiterOptions;
|
|
186
|
+
}
|
|
187
|
+
/** Module options accepted by {@link EmailModule.forRoot} and `forRootAsync`. */
|
|
188
|
+
export interface EmailModuleOptions {
|
|
189
|
+
defaultFrom?: EmailAddressLike;
|
|
190
|
+
defaultReplyTo?: EmailAddressLike | readonly EmailAddressLike[];
|
|
191
|
+
notifications?: {
|
|
192
|
+
channel?: string;
|
|
193
|
+
};
|
|
194
|
+
renderer?: EmailTemplateRenderer;
|
|
195
|
+
transport: EmailTransport | EmailTransportFactory;
|
|
196
|
+
verifyOnModuleInit?: boolean;
|
|
197
|
+
}
|
|
198
|
+
/** Async registration options for email modules that derive config through DI. */
|
|
199
|
+
export type EmailAsyncModuleOptions = AsyncModuleOptions<EmailModuleOptions>;
|
|
200
|
+
/** Normalized module options resolved once during module registration. */
|
|
201
|
+
export interface NormalizedEmailModuleOptions {
|
|
202
|
+
defaultFrom?: EmailAddress;
|
|
203
|
+
defaultReplyTo: NormalizedEmailAddressList;
|
|
204
|
+
notifications: {
|
|
205
|
+
channel: string;
|
|
206
|
+
};
|
|
207
|
+
renderer?: EmailTemplateRenderer;
|
|
208
|
+
transport: {
|
|
209
|
+
create: () => Promise<EmailTransport>;
|
|
210
|
+
kind: string;
|
|
211
|
+
ownsResources: boolean;
|
|
212
|
+
};
|
|
213
|
+
verifyOnModuleInit: boolean;
|
|
214
|
+
}
|
|
215
|
+
/** Email facade exposed to application code and the compatibility token. */
|
|
216
|
+
export interface Email {
|
|
217
|
+
/**
|
|
218
|
+
* Sends one email message directly through the configured transport.
|
|
219
|
+
*
|
|
220
|
+
* @param message Caller-supplied email message with addresses, subject, and body content.
|
|
221
|
+
* @param options Optional abort signal propagated to the transport.
|
|
222
|
+
* @returns A normalized delivery receipt describing accepted/rejected recipients and the message id.
|
|
223
|
+
*/
|
|
224
|
+
send(message: EmailMessage, options?: EmailSendOptions): Promise<EmailSendResult>;
|
|
225
|
+
/**
|
|
226
|
+
* Sends multiple email messages in input order with optional tolerant failure handling.
|
|
227
|
+
*
|
|
228
|
+
* @param messages Ordered message list to deliver through the configured transport.
|
|
229
|
+
* @param options Optional tolerant batch controls such as `continueOnError`.
|
|
230
|
+
* @returns A batch summary containing successes and any captured failures.
|
|
231
|
+
*/
|
|
232
|
+
sendMany(messages: readonly EmailMessage[], options?: EmailSendManyOptions): Promise<EmailSendBatchResult>;
|
|
233
|
+
/**
|
|
234
|
+
* Converts one notifications foundation request into a concrete email delivery.
|
|
235
|
+
*
|
|
236
|
+
* @param notification Shared notification envelope interpreted by the email package.
|
|
237
|
+
* @param options Optional abort signal propagated to rendering and transport work.
|
|
238
|
+
* @returns A normalized delivery receipt for the resulting email message.
|
|
239
|
+
*/
|
|
240
|
+
sendNotification(notification: EmailNotificationDispatchRequest, options?: EmailSendOptions): Promise<EmailSendResult>;
|
|
241
|
+
}
|
|
242
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,KAA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gCAAgC,EAC9C,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,eAAe,CAAC,CAAC;CAC7B"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fluojs/email",
|
|
3
|
+
"description": "Transport-agnostic email delivery core for Fluo with notifications and queue integration seams.",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"fluo",
|
|
6
|
+
"email",
|
|
7
|
+
"transport",
|
|
8
|
+
"portable",
|
|
9
|
+
"notifications",
|
|
10
|
+
"queue",
|
|
11
|
+
"mailer"
|
|
12
|
+
],
|
|
13
|
+
"version": "1.0.0-beta.1",
|
|
14
|
+
"private": false,
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/fluojs/fluo.git",
|
|
19
|
+
"directory": "packages/email"
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"type": "module",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./queue": {
|
|
31
|
+
"types": "./dist/queue-entry.d.ts",
|
|
32
|
+
"import": "./dist/queue-entry.js"
|
|
33
|
+
},
|
|
34
|
+
"./node": {
|
|
35
|
+
"types": "./dist/node.d.ts",
|
|
36
|
+
"import": "./dist/node.js"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"main": "./dist/index.js",
|
|
40
|
+
"types": "./dist/index.d.ts",
|
|
41
|
+
"typesVersions": {
|
|
42
|
+
"*": {
|
|
43
|
+
"queue": [
|
|
44
|
+
"./dist/queue-entry.d.ts"
|
|
45
|
+
],
|
|
46
|
+
"node": [
|
|
47
|
+
"./dist/node.d.ts"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"files": [
|
|
52
|
+
"dist"
|
|
53
|
+
],
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@fluojs/core": "^1.0.0-beta.1",
|
|
56
|
+
"@fluojs/runtime": "^1.0.0-beta.1",
|
|
57
|
+
"@fluojs/notifications": "^1.0.0-beta.1",
|
|
58
|
+
"@fluojs/di": "^1.0.0-beta.1"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"nodemailer": "^6.10.1",
|
|
62
|
+
"@fluojs/queue": "^1.0.0-beta.1"
|
|
63
|
+
},
|
|
64
|
+
"peerDependenciesMeta": {
|
|
65
|
+
"@fluojs/queue": {
|
|
66
|
+
"optional": true
|
|
67
|
+
},
|
|
68
|
+
"nodemailer": {
|
|
69
|
+
"optional": true
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"@types/nodemailer": "^8.0.0",
|
|
74
|
+
"vitest": "^3.2.4",
|
|
75
|
+
"@fluojs/queue": "^1.0.0-beta.1"
|
|
76
|
+
},
|
|
77
|
+
"scripts": {
|
|
78
|
+
"prebuild": "node ../../tooling/scripts/clean-dist.mjs",
|
|
79
|
+
"build": "pnpm exec babel src --extensions .ts --ignore 'src/**/*.test.ts' --out-dir dist --config-file ../../tooling/babel/babel.config.cjs && pnpm exec tsc -p tsconfig.build.json",
|
|
80
|
+
"typecheck": "pnpm exec tsc -p tsconfig.json --noEmit",
|
|
81
|
+
"test": "pnpm exec vitest run -c vitest.config.ts",
|
|
82
|
+
"test:watch": "pnpm exec vitest -c vitest.config.ts"
|
|
83
|
+
}
|
|
84
|
+
}
|