@visulima/email 1.0.0-alpha.16 → 1.0.0-alpha.18
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/CHANGELOG.md +14 -0
- package/LICENSE.md +303 -483
- package/dist/crypto/index.d.ts +147 -4
- package/dist/index.d.ts +785 -9
- package/dist/packem_shared/provider.d-DcfYeGJJ.d.ts +28 -0
- package/dist/packem_shared/types.d-CNnnk-Ya.d.ts +102 -0
- package/dist/packem_shared/types.d-nyR1ty1Q.d.ts +9 -0
- package/dist/packem_shared/types.d-wwpgA3to.d.ts +204 -0
- package/dist/providers/ahasend/index.d.ts +36 -3
- package/dist/providers/aws-ses/index.d.ts +47 -3
- package/dist/providers/azure/index.d.ts +52 -3
- package/dist/providers/brevo/index.d.ts +65 -3
- package/dist/providers/failover/index.d.ts +27 -3
- package/dist/providers/http/index.d.ts +35 -3
- package/dist/providers/infobip/index.d.ts +56 -3
- package/dist/providers/mailcrab/index.d.ts +32 -3
- package/dist/providers/mailersend/index.d.ts +51 -3
- package/dist/providers/mailgun/index.d.ts +73 -3
- package/dist/providers/mailjet/index.d.ts +72 -3
- package/dist/providers/mailomat/index.d.ts +40 -3
- package/dist/providers/mailpace/index.d.ts +52 -3
- package/dist/providers/mailtrap/index.d.ts +44 -3
- package/dist/providers/mandrill/index.d.ts +87 -3
- package/dist/providers/mock/index.d.ts +59 -3
- package/dist/providers/nodemailer/index.d.ts +38 -3
- package/dist/providers/opentelemetry/index.d.ts +529 -3
- package/dist/providers/plunk/index.d.ts +38 -3
- package/dist/providers/postal/index.d.ts +48 -3
- package/dist/providers/postmark/index.d.ts +60 -3
- package/dist/providers/resend/index.d.ts +51 -3
- package/dist/providers/roundrobin/index.d.ts +27 -3
- package/dist/providers/scaleway/index.d.ts +44 -3
- package/dist/providers/sendgrid/index.d.ts +84 -3
- package/dist/providers/smtp/index.d.ts +71 -3
- package/dist/providers/sweego/index.d.ts +40 -3
- package/dist/providers/zeptomail/index.d.ts +37 -3
- package/dist/template-engines/handlebars.d.ts +23 -22
- package/dist/template-engines/html-to-text.d.ts +24 -24
- package/dist/template-engines/mjml.d.ts +10 -10
- package/dist/template-engines/react-email.d.ts +9 -9
- package/dist/template-engines/vue-email.d.ts +9 -9
- package/dist/utils/cache.d.ts +49 -48
- package/dist/utils/format-email-address.d.ts +8 -7
- package/dist/utils/normalize-email-aliases.d.ts +20 -20
- package/dist/utils/parse-address.d.ts +18 -17
- package/dist/utils/validation/check-mx-records.d.ts +36 -35
- package/dist/utils/validation/disposable-email-domains.d.ts +1 -13
- package/dist/utils/validation/role-accounts.d.ts +18 -18
- package/dist/utils/validation/validate-email.d.ts +5 -5
- package/dist/utils/validation/verify-email.d.ts +45 -42
- package/dist/utils/validation/verify-smtp.d.ts +35 -34
- package/package.json +37 -37
- package/dist/attachment-helpers.d.ts +0 -64
- package/dist/crypto/dkim-signer.d.ts +0 -48
- package/dist/crypto/smime-encrypter.d.ts +0 -53
- package/dist/crypto/smime-signer.d.ts +0 -48
- package/dist/crypto/types.d.ts +0 -101
- package/dist/draft-mail-message.d.ts +0 -13
- package/dist/errors/email-error.d.ts +0 -17
- package/dist/errors/required-option-error.d.ts +0 -10
- package/dist/mail-message.d.ts +0 -425
- package/dist/mail.d.ts +0 -206
- package/dist/providers/ahasend/provider.d.ts +0 -7
- package/dist/providers/ahasend/types.d.ts +0 -28
- package/dist/providers/aws-ses/provider.d.ts +0 -8
- package/dist/providers/aws-ses/types.d.ts +0 -38
- package/dist/providers/azure/provider.d.ts +0 -7
- package/dist/providers/azure/types.d.ts +0 -44
- package/dist/providers/brevo/provider.d.ts +0 -7
- package/dist/providers/brevo/types.d.ts +0 -57
- package/dist/providers/failover/provider.d.ts +0 -7
- package/dist/providers/failover/types.d.ts +0 -19
- package/dist/providers/http/provider.d.ts +0 -7
- package/dist/providers/http/types.d.ts +0 -27
- package/dist/providers/infobip/provider.d.ts +0 -7
- package/dist/providers/infobip/types.d.ts +0 -48
- package/dist/providers/mailcrab/provider.d.ts +0 -9
- package/dist/providers/mailcrab/types.d.ts +0 -22
- package/dist/providers/mailersend/provider.d.ts +0 -7
- package/dist/providers/mailersend/types.d.ts +0 -43
- package/dist/providers/mailgun/provider.d.ts +0 -7
- package/dist/providers/mailgun/types.d.ts +0 -65
- package/dist/providers/mailjet/provider.d.ts +0 -7
- package/dist/providers/mailjet/types.d.ts +0 -64
- package/dist/providers/mailomat/provider.d.ts +0 -7
- package/dist/providers/mailomat/types.d.ts +0 -32
- package/dist/providers/mailpace/provider.d.ts +0 -7
- package/dist/providers/mailpace/types.d.ts +0 -44
- package/dist/providers/mailtrap/provider.d.ts +0 -7
- package/dist/providers/mailtrap/types.d.ts +0 -36
- package/dist/providers/mandrill/provider.d.ts +0 -7
- package/dist/providers/mandrill/types.d.ts +0 -79
- package/dist/providers/mock/provider.d.ts +0 -8
- package/dist/providers/mock/types.d.ts +0 -50
- package/dist/providers/nodemailer/provider.d.ts +0 -7
- package/dist/providers/nodemailer/types.d.ts +0 -30
- package/dist/providers/opentelemetry/provider.d.ts +0 -7
- package/dist/providers/opentelemetry/types.d.ts +0 -31
- package/dist/providers/plunk/provider.d.ts +0 -7
- package/dist/providers/plunk/types.d.ts +0 -30
- package/dist/providers/postal/provider.d.ts +0 -7
- package/dist/providers/postal/types.d.ts +0 -40
- package/dist/providers/postmark/provider.d.ts +0 -7
- package/dist/providers/postmark/types.d.ts +0 -52
- package/dist/providers/provider.d.ts +0 -27
- package/dist/providers/resend/provider.d.ts +0 -7
- package/dist/providers/resend/types.d.ts +0 -43
- package/dist/providers/roundrobin/provider.d.ts +0 -7
- package/dist/providers/roundrobin/types.d.ts +0 -19
- package/dist/providers/scaleway/provider.d.ts +0 -7
- package/dist/providers/scaleway/types.d.ts +0 -36
- package/dist/providers/sendgrid/provider.d.ts +0 -7
- package/dist/providers/sendgrid/types.d.ts +0 -76
- package/dist/providers/smtp/provider.d.ts +0 -7
- package/dist/providers/smtp/types.d.ts +0 -63
- package/dist/providers/sweego/provider.d.ts +0 -7
- package/dist/providers/sweego/types.d.ts +0 -32
- package/dist/providers/utils/address-formatter.d.ts +0 -139
- package/dist/providers/utils/attachment-processor.d.ts +0 -58
- package/dist/providers/utils/index.d.ts +0 -4
- package/dist/providers/utils/payload-builder.d.ts +0 -78
- package/dist/providers/utils/provider-base.d.ts +0 -69
- package/dist/providers/zeptomail/provider.d.ts +0 -7
- package/dist/providers/zeptomail/types.d.ts +0 -29
- package/dist/template-engines/types.d.ts +0 -8
- package/dist/types.d.ts +0 -203
- package/dist/utils/build-mime-message.d.ts +0 -8
- package/dist/utils/create-logger.d.ts +0 -16
- package/dist/utils/format-email-addresses.d.ts +0 -8
- package/dist/utils/generate-boundary.d.ts +0 -7
- package/dist/utils/generate-message-id.d.ts +0 -6
- package/dist/utils/headers-to-record.d.ts +0 -9
- package/dist/utils/is-port-available.d.ts +0 -9
- package/dist/utils/make-request.d.ts +0 -18
- package/dist/utils/retry.d.ts +0 -10
- package/dist/utils/sanitize-header.d.ts +0 -14
- package/dist/utils/to-base64.d.ts +0 -8
- package/dist/utils/validation/validate-email-options.d.ts +0 -8
|
@@ -1,3 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
1
|
+
import { P as ProviderFactory } from "../../packem_shared/provider.d-DcfYeGJJ.js";
|
|
2
|
+
export { type a as Provider } from "../../packem_shared/provider.d-DcfYeGJJ.js";
|
|
3
|
+
import { B as BaseConfig, E as EmailOptions, c as EmailTag } from "../../packem_shared/types.d-wwpgA3to.js";
|
|
4
|
+
import 'node:buffer';
|
|
5
|
+
/**
|
|
6
|
+
* Resend configuration
|
|
7
|
+
*/
|
|
8
|
+
interface ResendConfig extends BaseConfig {
|
|
9
|
+
apiKey: string;
|
|
10
|
+
endpoint?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Resend-specific email tag type with additional constraints
|
|
14
|
+
*/
|
|
15
|
+
interface ResendEmailTag extends EmailTag {
|
|
16
|
+
/**
|
|
17
|
+
* Tag name - must only contain ASCII letters, numbers, underscores, or dashes
|
|
18
|
+
* Max length: 256 characters
|
|
19
|
+
*/
|
|
20
|
+
name: string;
|
|
21
|
+
/**
|
|
22
|
+
* Tag value - must only contain ASCII letters, numbers, underscores, or dashes
|
|
23
|
+
*/
|
|
24
|
+
value: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Resend-specific email options
|
|
28
|
+
*/
|
|
29
|
+
interface ResendEmailOptions extends Omit<EmailOptions, "tags"> {
|
|
30
|
+
/**
|
|
31
|
+
* Schedule email for delivery at a specific time
|
|
32
|
+
*/
|
|
33
|
+
scheduledAt?: Date | string;
|
|
34
|
+
/**
|
|
35
|
+
* Tags for categorizing emails
|
|
36
|
+
*/
|
|
37
|
+
tags?: ResendEmailTag[];
|
|
38
|
+
/**
|
|
39
|
+
* Template data for template-based emails
|
|
40
|
+
*/
|
|
41
|
+
templateData?: Record<string, unknown>;
|
|
42
|
+
/**
|
|
43
|
+
* Template ID for template-based emails
|
|
44
|
+
*/
|
|
45
|
+
templateId?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Resend Provider for sending emails through Resend API.
|
|
49
|
+
*/
|
|
50
|
+
declare const resendProvider: ProviderFactory<ResendConfig, unknown, ResendEmailOptions>;
|
|
51
|
+
export { type ProviderFactory, type ResendConfig, type ResendEmailOptions, type ResendEmailTag, resendProvider };
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
1
|
+
import { P as ProviderFactory } from "../../packem_shared/provider.d-DcfYeGJJ.js";
|
|
2
|
+
export { type a as Provider } from "../../packem_shared/provider.d-DcfYeGJJ.js";
|
|
3
|
+
import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-wwpgA3to.js";
|
|
4
|
+
import 'node:buffer';
|
|
5
|
+
/**
|
|
6
|
+
* Round Robin configuration
|
|
7
|
+
*/
|
|
8
|
+
interface RoundRobinConfig extends BaseConfig {
|
|
9
|
+
/**
|
|
10
|
+
* Array of provider instances or provider factories to use for round-robin distribution
|
|
11
|
+
* Can be Provider instances or ProviderFactory functions
|
|
12
|
+
*/
|
|
13
|
+
mailers: unknown[];
|
|
14
|
+
/**
|
|
15
|
+
* Time in milliseconds to wait before retrying with next provider if current is unavailable (default: 60)
|
|
16
|
+
*/
|
|
17
|
+
retryAfter?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Round Robin-specific email options
|
|
21
|
+
*/
|
|
22
|
+
type RoundRobinEmailOptions = EmailOptions;
|
|
23
|
+
/**
|
|
24
|
+
* Round Robin Provider for distributing email sending across multiple providers
|
|
25
|
+
*/
|
|
26
|
+
declare const roundRobinProvider: ProviderFactory<RoundRobinConfig>;
|
|
27
|
+
export { type ProviderFactory, type RoundRobinConfig, type RoundRobinEmailOptions, roundRobinProvider };
|
|
@@ -1,3 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
1
|
+
import { P as ProviderFactory } from "../../packem_shared/provider.d-DcfYeGJJ.js";
|
|
2
|
+
export { type a as Provider } from "../../packem_shared/provider.d-DcfYeGJJ.js";
|
|
3
|
+
import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-wwpgA3to.js";
|
|
4
|
+
import 'node:buffer';
|
|
5
|
+
/**
|
|
6
|
+
* Scaleway configuration
|
|
7
|
+
*/
|
|
8
|
+
interface ScalewayConfig extends BaseConfig {
|
|
9
|
+
/**
|
|
10
|
+
* Scaleway API key
|
|
11
|
+
*/
|
|
12
|
+
apiKey: string;
|
|
13
|
+
/**
|
|
14
|
+
* Scaleway API endpoint
|
|
15
|
+
* Defaults to: https://api.scaleway.com/transactional-email/v1alpha1
|
|
16
|
+
*/
|
|
17
|
+
endpoint?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Scaleway region (e.g., "fr-par", "nl-ams")
|
|
20
|
+
*/
|
|
21
|
+
region: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Scaleway-specific email options
|
|
25
|
+
*/
|
|
26
|
+
interface ScalewayEmailOptions extends EmailOptions {
|
|
27
|
+
/**
|
|
28
|
+
* Project ID (optional)
|
|
29
|
+
*/
|
|
30
|
+
projectId?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Scaleway template ID for template-based emails
|
|
33
|
+
*/
|
|
34
|
+
templateId?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Template variables for Scaleway templates
|
|
37
|
+
*/
|
|
38
|
+
templateVariables?: Record<string, unknown>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Scaleway Provider for sending emails through Scaleway API
|
|
42
|
+
*/
|
|
43
|
+
declare const scalewayProvider: ProviderFactory<ScalewayConfig>;
|
|
44
|
+
export { type ProviderFactory, type ScalewayConfig, type ScalewayEmailOptions, scalewayProvider };
|
|
@@ -1,3 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
1
|
+
import { P as ProviderFactory } from "../../packem_shared/provider.d-DcfYeGJJ.js";
|
|
2
|
+
export { type a as Provider } from "../../packem_shared/provider.d-DcfYeGJJ.js";
|
|
3
|
+
import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-wwpgA3to.js";
|
|
4
|
+
import 'node:buffer';
|
|
5
|
+
/**
|
|
6
|
+
* SendGrid configuration
|
|
7
|
+
*/
|
|
8
|
+
interface SendGridConfig extends BaseConfig {
|
|
9
|
+
apiKey: string;
|
|
10
|
+
endpoint?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* SendGrid-specific email options
|
|
14
|
+
*/
|
|
15
|
+
interface SendGridEmailOptions extends EmailOptions {
|
|
16
|
+
/**
|
|
17
|
+
* ASM (Advanced Suppression Management) group ID for unsubscribe
|
|
18
|
+
*/
|
|
19
|
+
asmGroupId?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Batch ID for batch sending
|
|
22
|
+
*/
|
|
23
|
+
batchId?: string;
|
|
24
|
+
/**
|
|
25
|
+
* IP pool name
|
|
26
|
+
*/
|
|
27
|
+
ipPoolName?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Mail settings (click tracking, open tracking, etc.)
|
|
30
|
+
*/
|
|
31
|
+
mailSettings?: {
|
|
32
|
+
bypassListManagement?: boolean;
|
|
33
|
+
footer?: {
|
|
34
|
+
enable?: boolean;
|
|
35
|
+
html?: string;
|
|
36
|
+
text?: string;
|
|
37
|
+
};
|
|
38
|
+
sandboxMode?: boolean;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Send at timestamp (Unix timestamp)
|
|
42
|
+
*/
|
|
43
|
+
sendAt?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Dynamic template data for SendGrid dynamic templates
|
|
46
|
+
*/
|
|
47
|
+
templateData?: Record<string, unknown>;
|
|
48
|
+
/**
|
|
49
|
+
* SendGrid template ID for template-based emails
|
|
50
|
+
*/
|
|
51
|
+
templateId?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Tracking settings
|
|
54
|
+
*/
|
|
55
|
+
trackingSettings?: {
|
|
56
|
+
clickTracking?: {
|
|
57
|
+
enable?: boolean;
|
|
58
|
+
enableText?: boolean;
|
|
59
|
+
};
|
|
60
|
+
ganalytics?: {
|
|
61
|
+
enable?: boolean;
|
|
62
|
+
utmCampaign?: string;
|
|
63
|
+
utmContent?: string;
|
|
64
|
+
utmMedium?: string;
|
|
65
|
+
utmSource?: string;
|
|
66
|
+
utmTerm?: string;
|
|
67
|
+
};
|
|
68
|
+
openTracking?: {
|
|
69
|
+
enable?: boolean;
|
|
70
|
+
substitutionTag?: string;
|
|
71
|
+
};
|
|
72
|
+
subscriptionTracking?: {
|
|
73
|
+
enable?: boolean;
|
|
74
|
+
html?: string;
|
|
75
|
+
substitutionTag?: string;
|
|
76
|
+
text?: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* SendGrid Provider for sending emails through SendGrid API
|
|
82
|
+
*/
|
|
83
|
+
declare const sendGridProvider: ProviderFactory<SendGridConfig>;
|
|
84
|
+
export { type ProviderFactory, type SendGridConfig, type SendGridEmailOptions, sendGridProvider };
|
|
@@ -1,3 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
1
|
+
import { P as ProviderFactory } from "../../packem_shared/provider.d-DcfYeGJJ.js";
|
|
2
|
+
export { type a as Provider } from "../../packem_shared/provider.d-DcfYeGJJ.js";
|
|
3
|
+
import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-wwpgA3to.js";
|
|
4
|
+
import 'node:buffer';
|
|
5
|
+
/**
|
|
6
|
+
* SMTP configuration
|
|
7
|
+
*/
|
|
8
|
+
interface SmtpConfig extends BaseConfig {
|
|
9
|
+
authMethod?: "LOGIN" | "PLAIN" | "CRAM-MD5" | "OAUTH2";
|
|
10
|
+
dkim?: {
|
|
11
|
+
domainName: string;
|
|
12
|
+
keySelector: string;
|
|
13
|
+
privateKey: string;
|
|
14
|
+
};
|
|
15
|
+
host: string;
|
|
16
|
+
maxConnections?: number;
|
|
17
|
+
oauth2?: {
|
|
18
|
+
accessToken?: string;
|
|
19
|
+
clientId: string;
|
|
20
|
+
clientSecret: string;
|
|
21
|
+
expires?: number;
|
|
22
|
+
refreshToken: string;
|
|
23
|
+
user: string;
|
|
24
|
+
};
|
|
25
|
+
password?: string;
|
|
26
|
+
pool?: boolean;
|
|
27
|
+
port: number;
|
|
28
|
+
rejectUnauthorized?: boolean;
|
|
29
|
+
secure?: boolean;
|
|
30
|
+
user?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* SMTP-specific email options
|
|
34
|
+
*/
|
|
35
|
+
interface SmtpEmailOptions extends EmailOptions {
|
|
36
|
+
/**
|
|
37
|
+
* Delivery Status Notification options
|
|
38
|
+
*/
|
|
39
|
+
dsn?: {
|
|
40
|
+
/** Request notification on delay */
|
|
41
|
+
delay?: boolean;
|
|
42
|
+
/** Request notification on failure */
|
|
43
|
+
failure?: boolean;
|
|
44
|
+
/** Request successful delivery notification */
|
|
45
|
+
success?: boolean;
|
|
46
|
+
};
|
|
47
|
+
/** Special Google Mail headers */
|
|
48
|
+
googleMailHeaders?: {
|
|
49
|
+
/** Category for email organization */
|
|
50
|
+
category?: "primary" | "social" | "promotions" | "updates" | "forums";
|
|
51
|
+
/** Feedback ID for engagement tracking */
|
|
52
|
+
feedbackId?: string;
|
|
53
|
+
/** Mark as promotional content */
|
|
54
|
+
promotionalContent?: boolean;
|
|
55
|
+
};
|
|
56
|
+
/** Reference to a previous message ID (for threading) */
|
|
57
|
+
inReplyTo?: string;
|
|
58
|
+
/** List-Unsubscribe header for easy unsubscribe functionality */
|
|
59
|
+
listUnsubscribe?: string | string[];
|
|
60
|
+
/** Message priority: 'high', 'normal', or 'low' */
|
|
61
|
+
priority?: "high" | "normal" | "low";
|
|
62
|
+
/** References to related message IDs */
|
|
63
|
+
references?: string | string[];
|
|
64
|
+
/** Whether to sign the email with DKIM */
|
|
65
|
+
useDkim?: boolean;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* SMTP provider for sending emails via SMTP protocol
|
|
69
|
+
*/
|
|
70
|
+
declare const smtpProvider: ProviderFactory<SmtpConfig>;
|
|
71
|
+
export { type ProviderFactory, type SmtpConfig, type SmtpEmailOptions, smtpProvider };
|
|
@@ -1,3 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
1
|
+
import { P as ProviderFactory } from "../../packem_shared/provider.d-DcfYeGJJ.js";
|
|
2
|
+
export { type a as Provider } from "../../packem_shared/provider.d-DcfYeGJJ.js";
|
|
3
|
+
import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-wwpgA3to.js";
|
|
4
|
+
import 'node:buffer';
|
|
5
|
+
/**
|
|
6
|
+
* Sweego configuration
|
|
7
|
+
*/
|
|
8
|
+
interface SweegoConfig extends BaseConfig {
|
|
9
|
+
/**
|
|
10
|
+
* Sweego API key
|
|
11
|
+
*/
|
|
12
|
+
apiKey: string;
|
|
13
|
+
/**
|
|
14
|
+
* Sweego API endpoint
|
|
15
|
+
* Defaults to: https://api.sweego.com
|
|
16
|
+
*/
|
|
17
|
+
endpoint?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Sweego-specific email options
|
|
21
|
+
*/
|
|
22
|
+
interface SweegoEmailOptions extends EmailOptions {
|
|
23
|
+
/**
|
|
24
|
+
* Tags for categorization
|
|
25
|
+
*/
|
|
26
|
+
tags?: string[];
|
|
27
|
+
/**
|
|
28
|
+
* Sweego template ID for template-based emails
|
|
29
|
+
*/
|
|
30
|
+
templateId?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Template variables for Sweego templates
|
|
33
|
+
*/
|
|
34
|
+
templateVariables?: Record<string, unknown>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Sweego Provider for sending emails through Sweego API
|
|
38
|
+
*/
|
|
39
|
+
declare const sweegoProvider: ProviderFactory<SweegoConfig>;
|
|
40
|
+
export { type ProviderFactory, type SweegoConfig, type SweegoEmailOptions, sweegoProvider };
|
|
@@ -1,3 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
1
|
+
import { P as ProviderFactory } from "../../packem_shared/provider.d-DcfYeGJJ.js";
|
|
2
|
+
export { type a as Provider } from "../../packem_shared/provider.d-DcfYeGJJ.js";
|
|
3
|
+
import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-wwpgA3to.js";
|
|
4
|
+
import 'node:buffer';
|
|
5
|
+
/**
|
|
6
|
+
* Zeptomail configuration
|
|
7
|
+
*/
|
|
8
|
+
interface ZeptomailConfig extends BaseConfig {
|
|
9
|
+
endpoint?: string;
|
|
10
|
+
token: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Zeptomail-specific email options
|
|
14
|
+
*/
|
|
15
|
+
interface ZeptomailEmailOptions extends EmailOptions {
|
|
16
|
+
/**
|
|
17
|
+
* Client reference - identifier set by the user to track a particular transaction
|
|
18
|
+
*/
|
|
19
|
+
clientReference?: string;
|
|
20
|
+
/**
|
|
21
|
+
* MIME headers - additional headers sent in the email for reference
|
|
22
|
+
*/
|
|
23
|
+
mimeHeaders?: Record<string, string>;
|
|
24
|
+
/**
|
|
25
|
+
* Track email clicks - enables tracking for click events
|
|
26
|
+
*/
|
|
27
|
+
trackClicks?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Track email opens - enables tracking for open events
|
|
30
|
+
*/
|
|
31
|
+
trackOpens?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Zeptomail Provider for sending emails through Zeptomail API
|
|
35
|
+
*/
|
|
36
|
+
declare const zeptomailProvider: ProviderFactory<ZeptomailConfig>;
|
|
37
|
+
export { type ProviderFactory, type ZeptomailConfig, type ZeptomailEmailOptions, zeptomailProvider };
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { T as TemplateRenderer } from "../packem_shared/types.d-nyR1ty1Q.js";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
* Renders Handlebars template.
|
|
4
|
+
* @param template Handlebars template string.
|
|
5
|
+
* @param data Data to pass to the template.
|
|
6
|
+
* @param options Handlebars compile options.
|
|
7
|
+
* @returns Rendered HTML string.
|
|
8
|
+
* @throws {TypeError} When template is not a string.
|
|
9
|
+
* @throws {EmailError} When Handlebars is not installed or rendering fails.
|
|
10
|
+
*/
|
|
11
|
+
declare const renderHandlebars: TemplateRenderer;
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
* Registers a Handlebars helper function for use in templates.
|
|
14
|
+
* @param name The name of the helper to register.
|
|
15
|
+
* @param helper The helper function to register.
|
|
16
|
+
* @throws {EmailError} When Handlebars is not installed.
|
|
17
|
+
*/
|
|
18
|
+
declare const registerHandlebarsHelper: (name: string, helper: unknown) => void;
|
|
19
19
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
* Registers a Handlebars partial template for reuse in other templates.
|
|
21
|
+
* @param name The name of the partial to register.
|
|
22
|
+
* @param partial The partial template string to register.
|
|
23
|
+
* @throws {EmailError} When Handlebars is not installed.
|
|
24
|
+
*/
|
|
25
|
+
declare const registerHandlebarsPartial: (name: string, partial: string) => void;
|
|
26
|
+
export { registerHandlebarsHelper, registerHandlebarsPartial, renderHandlebars };
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
* Converts HTML content to plain text format.
|
|
3
|
+
* @param html The HTML string to convert.
|
|
4
|
+
* @param options Configuration options for the html-to-text conversion.
|
|
5
|
+
* @param options.longWordSplit Options for handling long words that exceed the word wrap limit.
|
|
6
|
+
* @param options.longWordSplit.forceWrapOnLimit Whether to force wrap on the limit.
|
|
7
|
+
* @param options.longWordSplit.wrapCharacters Characters to use for wrapping.
|
|
8
|
+
* @param options.preserveNewlines Whether to preserve newlines in the output.
|
|
9
|
+
* @param options.selectors Custom selectors for formatting specific HTML elements.
|
|
10
|
+
* @param options.wordwrap The word wrap limit (number of characters) or false to disable.
|
|
11
|
+
* @returns The converted plain text string.
|
|
12
|
+
* @throws {EmailError} When html-to-text is not installed or conversion fails.
|
|
13
|
+
*/
|
|
14
14
|
declare const htmlToText: (html: string, options?: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
longWordSplit?: {
|
|
16
|
+
forceWrapOnLimit?: boolean;
|
|
17
|
+
wrapCharacters?: string[];
|
|
18
|
+
};
|
|
19
|
+
preserveNewlines?: boolean;
|
|
20
|
+
selectors?: {
|
|
21
|
+
format?: string;
|
|
22
|
+
options?: Record<string, unknown>;
|
|
23
|
+
selector: string;
|
|
24
|
+
}[];
|
|
25
|
+
wordwrap?: number | false;
|
|
26
26
|
}) => string;
|
|
27
|
-
export default
|
|
27
|
+
export { htmlToText as default };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { T as TemplateRenderer } from "../packem_shared/types.d-nyR1ty1Q.js";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
* Renders MJML to HTML.
|
|
4
|
+
* @param template MJML template string.
|
|
5
|
+
* @param _data Data (not used for MJML).
|
|
6
|
+
* @param options MJML options (beautify, fonts, keepComments, minify, validationLevel).
|
|
7
|
+
* @returns Rendered HTML string.
|
|
8
|
+
* @throws {TypeError} When template is not a string.
|
|
9
|
+
* @throws {EmailError} When MJML is not installed, validation fails, or rendering fails.
|
|
10
|
+
*/
|
|
11
11
|
declare const mjml: TemplateRenderer;
|
|
12
|
-
export default
|
|
12
|
+
export { mjml as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { T as TemplateRenderer } from "../packem_shared/types.d-nyR1ty1Q.js";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
* Renders a React Email component to HTML.
|
|
4
|
+
* @param template The React component from \@react-email/components to render.
|
|
5
|
+
* @param _data Data object (not used for React Email, but kept for API compatibility).
|
|
6
|
+
* @param options Render options including plainText and pretty formatting.
|
|
7
|
+
* @returns The rendered HTML string.
|
|
8
|
+
* @throws {EmailError} When \@react-email/render is not installed or rendering fails.
|
|
9
|
+
*/
|
|
10
10
|
declare const reactEmail: TemplateRenderer;
|
|
11
|
-
export default
|
|
11
|
+
export { reactEmail as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { T as TemplateRenderer } from "../packem_shared/types.d-nyR1ty1Q.js";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
* Renders a Vue Email component to HTML.
|
|
4
|
+
* @param template The Vue component from \@vue-email/components to render.
|
|
5
|
+
* @param data Data and variables to pass to the template.
|
|
6
|
+
* @param options Render options including pretty formatting, plainText output, and htmlToTextOptions.
|
|
7
|
+
* @returns The rendered HTML or plain text string.
|
|
8
|
+
* @throws {EmailError} When \@vue-email/render is not installed or rendering fails.
|
|
9
|
+
*/
|
|
10
10
|
declare const vueEmail: TemplateRenderer;
|
|
11
|
-
export default
|
|
11
|
+
export { vueEmail as default };
|
package/dist/utils/cache.d.ts
CHANGED
|
@@ -1,54 +1,55 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
* Generic cache interface for caching any type of data.
|
|
3
|
+
* Implementations can use in-memory cache, LRU cache, Redis, etc.
|
|
4
|
+
*/
|
|
5
|
+
interface Cache<T = unknown> {
|
|
6
|
+
/**
|
|
7
|
+
* Clears all cached entries.
|
|
8
|
+
*/
|
|
9
|
+
clear: () => Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Deletes a cached entry.
|
|
12
|
+
* @param key The cache key.
|
|
13
|
+
*/
|
|
14
|
+
delete: (key: string) => Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Gets a cached value.
|
|
17
|
+
* @param key The cache key.
|
|
18
|
+
* @returns The cached value or undefined if not found or expired.
|
|
19
|
+
*/
|
|
20
|
+
get: (key: string) => Promise<T | undefined>;
|
|
21
|
+
/**
|
|
22
|
+
* Sets a cached value.
|
|
23
|
+
* @param key The cache key.
|
|
24
|
+
* @param value The value to cache.
|
|
25
|
+
* @param ttl Time-to-live in milliseconds.
|
|
26
|
+
*/
|
|
27
|
+
set: (key: string, value: T, ttl: number) => Promise<void>;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
* Options for creating an in-memory cache.
|
|
31
|
+
*/
|
|
32
|
+
interface InMemoryCacheOptions {
|
|
33
|
+
/**
|
|
34
|
+
* Maximum number of entries in the cache.
|
|
35
|
+
* @default 500
|
|
36
|
+
*/
|
|
37
|
+
max?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Default TTL in milliseconds for entries.
|
|
40
|
+
* @default 3600000 (1 hour)
|
|
41
|
+
*/
|
|
42
|
+
ttl?: number;
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
* Default in-memory cache implementation using LRU cache.
|
|
46
|
+
*/
|
|
47
|
+
declare class InMemoryCache<T extends object = Record<string, unknown>> implements Cache<T> {
|
|
48
|
+
private readonly cache;
|
|
49
|
+
constructor(options?: InMemoryCacheOptions);
|
|
50
|
+
clear: () => Promise<void>;
|
|
51
|
+
delete: (key: string) => Promise<void>;
|
|
52
|
+
get: (key: string) => Promise<T | undefined>;
|
|
53
|
+
set: (key: string, value: T, ttl: number) => Promise<void>;
|
|
54
54
|
}
|
|
55
|
+
export { Cache, InMemoryCache, InMemoryCacheOptions };
|