@breadstone/archipel-mcp 0.0.34 → 0.0.36
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/data/guides/email-delivery.md +42 -22
- package/data/guides/email-templates.md +29 -19
- package/data/packages/platform-feature-flags/api/Class.AzureFeatureFlagReader.md +9 -9
- package/data/packages/platform-feature-flags/api/Class.AzureFeatureFlagWriter.md +9 -9
- package/data/packages/platform-feature-flags/api/Class.FeatureFlagError.md +4 -4
- package/data/packages/platform-feature-flags/api/Class.FeatureFlagGuard.md +3 -3
- package/data/packages/platform-feature-flags/api/Class.FeatureFlagModule.md +2 -2
- package/data/packages/platform-feature-flags/api/Class.FeatureFlagReaderPort.md +6 -6
- package/data/packages/platform-feature-flags/api/Class.FeatureFlagWriterPort.md +7 -7
- package/data/packages/platform-feature-flags/api/Class.VercelFeatureFlagReader.md +8 -8
- package/data/packages/platform-feature-flags/api/Class.VercelFeatureFlagWriter.md +9 -9
- package/data/packages/platform-feature-flags/api/Function.FeatureFlag.md +1 -1
- package/data/packages/platform-feature-flags/api/Interface.IFeatureFlagContext.md +4 -4
- package/data/packages/platform-feature-flags/api/Interface.IFeatureFlagDefinition.md +6 -6
- package/data/packages/platform-feature-flags/api/Interface.IFeatureFlagEvaluation.md +4 -4
- package/data/packages/platform-feature-flags/api/Interface.IFeatureFlagModuleOptions.md +5 -5
- package/data/packages/platform-feature-flags/api/Variable.AZURE_APPCONFIG_CONNECTION_STRING.md +1 -1
- package/data/packages/platform-feature-flags/api/Variable.AZURE_APPCONFIG_ENDPOINT.md +1 -1
- package/data/packages/platform-feature-flags/api/Variable.AZURE_FEATURE_FLAG_CONFIG_ENTRIES.md +1 -1
- package/data/packages/platform-feature-flags/api/Variable.AZURE_FEATURE_FLAG_KEY_FILTER.md +1 -1
- package/data/packages/platform-feature-flags/api/Variable.AZURE_FEATURE_FLAG_REFRESH_INTERVAL.md +1 -1
- package/data/packages/platform-feature-flags/api/Variable.FEATURE_FLAG_KEY_METADATA.md +1 -1
- package/data/packages/platform-feature-flags/api/Variable.PLATFORM_FEATURE_FLAGS_CONFIG_ENTRIES.md +1 -1
- package/data/packages/platform-feature-flags/api/Variable.VERCEL_API_TOKEN.md +1 -1
- package/data/packages/platform-feature-flags/api/Variable.VERCEL_EDGE_CONFIG.md +1 -1
- package/data/packages/platform-feature-flags/api/Variable.VERCEL_EDGE_CONFIG_ID.md +1 -1
- package/data/packages/platform-feature-flags/api/Variable.VERCEL_EDGE_CONFIG_TOKEN.md +1 -1
- package/data/packages/platform-feature-flags/api/Variable.VERCEL_FEATURE_FLAG_CONFIG_ENTRIES.md +1 -1
- package/data/packages/platform-feature-flags/api/Variable.VERCEL_FEATURE_FLAG_PREFIX.md +1 -1
- package/data/packages/platform-feature-flags/api/Variable.VERCEL_FEATURE_FLAG_WRITER_CONFIG_ENTRIES.md +1 -1
- package/data/packages/platform-feature-flags/api/Variable.VERCEL_TEAM_ID.md +1 -1
- package/data/packages/platform-mailing/api/Class.BlobTemplateFetchStrategy.md +3 -3
- package/data/packages/platform-mailing/api/Class.FileTemplateFetchStrategy.md +8 -4
- package/data/packages/platform-mailing/api/Class.LogDeliveryStrategy.md +3 -3
- package/data/packages/platform-mailing/api/Class.MailModule.md +7 -7
- package/data/packages/platform-mailing/api/Class.MailService.md +11 -7
- package/data/packages/platform-mailing/api/Class.MailTemplateEngine.md +29 -4
- package/data/packages/platform-mailing/api/Class.MailgunDeliveryStrategy.md +3 -3
- package/data/packages/platform-mailing/api/Class.PostmarkDeliveryStrategy.md +3 -3
- package/data/packages/platform-mailing/api/Class.ResendDeliveryStrategy.md +3 -3
- package/data/packages/platform-mailing/api/Class.SendGridDeliveryStrategy.md +3 -3
- package/data/packages/platform-mailing/api/Class.SmtpDeliveryStrategy.md +3 -3
- package/data/packages/platform-mailing/api/Class.TemplateFetchStrategyBase.md +5 -11
- package/data/packages/platform-mailing/api/Interface.IMailEvents.md +28 -5
- package/data/packages/platform-mailing/api/Interface.IMailModuleOptions.md +50 -7
- package/data/packages/platform-mailing/api/Interface.IMailTemplateVariants.md +13 -3
- package/data/packages/platform-mailing/api/TypeAlias.MailTemplateFormat.md +1 -1
- package/data/packages/platform-mailing/api/Variable.MAIL_HOST.md +1 -1
- package/data/packages/platform-mailing/api/Variable.MAIL_MAILGUN_API_KEY.md +1 -1
- package/data/packages/platform-mailing/api/Variable.MAIL_MAILGUN_DOMAIN.md +1 -1
- package/data/packages/platform-mailing/api/Variable.MAIL_PORT.md +1 -1
- package/data/packages/platform-mailing/api/Variable.MAIL_POSTMARK_API_KEY.md +1 -1
- package/data/packages/platform-mailing/api/Variable.MAIL_RESEND_API_KEY.md +1 -1
- package/data/packages/platform-mailing/api/Variable.MAIL_SENDER_EMAIL.md +1 -1
- package/data/packages/platform-mailing/api/Variable.MAIL_SENDGRID_API_KEY.md +1 -1
- package/data/packages/platform-mailing/api/Variable.MAIL_SMTP_HOST.md +1 -1
- package/data/packages/platform-mailing/api/Variable.MAIL_SMTP_PASSWORD.md +1 -1
- package/data/packages/platform-mailing/api/Variable.MAIL_SMTP_PORT.md +1 -1
- package/data/packages/platform-mailing/api/Variable.MAIL_SMTP_SECURE.md +1 -1
- package/data/packages/platform-mailing/api/Variable.MAIL_SMTP_USER.md +1 -1
- package/data/packages/platform-mailing/api/Variable.MAIL_TEMPLATE_ENGINE_FORMAT.md +1 -1
- package/data/packages/platform-mailing/api/Variable.MAIL_TEMPLATE_NAMES_TOKEN.md +12 -0
- package/data/packages/platform-mailing/api/Variable.MAIL_USER.md +1 -1
- package/data/packages/platform-mailing/api/Variable.PLATFORM_MAILING_CONFIG_ENTRIES.md +1 -1
- package/data/packages/platform-mailing/api/index.md +1 -2
- package/package.json +1 -1
- package/data/packages/platform-mailing/api/Variable.MAIL_DELIVERY_STRATEGY.md +0 -14
- package/data/packages/platform-mailing/api/Variable.MAIL_TEMPLATE_STRATEGY.md +0 -14
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: MailTemplateEngine
|
|
7
7
|
|
|
8
|
-
Defined in: [platform-mailing/src/templating/MailTemplateEngine.ts:
|
|
8
|
+
Defined in: [platform-mailing/src/templating/MailTemplateEngine.ts:18](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/templating/MailTemplateEngine.ts#L18)
|
|
9
9
|
|
|
10
10
|
The `MailTemplateEngine` class.
|
|
11
11
|
|
|
@@ -21,7 +21,7 @@ The `MailTemplateEngine` class.
|
|
|
21
21
|
new MailTemplateEngine(templateFetchStrategy, contentTemplateEngine): MailTemplateEngine;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Defined in: [platform-mailing/src/templating/MailTemplateEngine.ts:
|
|
24
|
+
Defined in: [platform-mailing/src/templating/MailTemplateEngine.ts:34](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/templating/MailTemplateEngine.ts#L34)
|
|
25
25
|
|
|
26
26
|
Constructs a new instance of the `MailTemplateEngine` class.
|
|
27
27
|
|
|
@@ -47,7 +47,7 @@ compileTemplate(
|
|
|
47
47
|
format): string;
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
Defined in: [platform-mailing/src/templating/MailTemplateEngine.ts:
|
|
50
|
+
Defined in: [platform-mailing/src/templating/MailTemplateEngine.ts:67](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/templating/MailTemplateEngine.ts#L67)
|
|
51
51
|
|
|
52
52
|
Compiles a template by replacing placeholders with the provided parameters.
|
|
53
53
|
|
|
@@ -77,7 +77,7 @@ Error if the template or format is not found.
|
|
|
77
77
|
onModuleInit(): Promise<void>;
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
Defined in: [platform-mailing/src/templating/MailTemplateEngine.ts:
|
|
80
|
+
Defined in: [platform-mailing/src/templating/MailTemplateEngine.ts:53](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/templating/MailTemplateEngine.ts#L53)
|
|
81
81
|
|
|
82
82
|
Lifecycle hook that runs after the module initialization.
|
|
83
83
|
Loads all templates from the disk and caches them in memory.
|
|
@@ -91,3 +91,28 @@ Loads all templates from the disk and caches them in memory.
|
|
|
91
91
|
```ts
|
|
92
92
|
OnModuleInit.onModuleInit
|
|
93
93
|
```
|
|
94
|
+
|
|
95
|
+
***
|
|
96
|
+
|
|
97
|
+
### resolveSubject()
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
resolveSubject(templateKey, params): string | undefined;
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Defined in: [platform-mailing/src/templating/MailTemplateEngine.ts:97](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/templating/MailTemplateEngine.ts#L97)
|
|
104
|
+
|
|
105
|
+
Resolves and interpolates the subject line from a stored template.
|
|
106
|
+
|
|
107
|
+
#### Parameters
|
|
108
|
+
|
|
109
|
+
| Parameter | Type | Description |
|
|
110
|
+
| ------ | ------ | ------ |
|
|
111
|
+
| `templateKey` | `string` | The key of the template. |
|
|
112
|
+
| `params` | `Record`\<`string`, `unknown`\> | The parameters to insert into the subject. |
|
|
113
|
+
|
|
114
|
+
#### Returns
|
|
115
|
+
|
|
116
|
+
`string` \| `undefined`
|
|
117
|
+
|
|
118
|
+
The compiled subject string, or `undefined` if no subject is stored.
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: MailgunDeliveryStrategy
|
|
7
7
|
|
|
8
|
-
Defined in: [platform-mailing/src/delivering/strategies/mailgun/MailgunDeliveryStrategy.ts:
|
|
8
|
+
Defined in: [platform-mailing/src/delivering/strategies/mailgun/MailgunDeliveryStrategy.ts:20](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/delivering/strategies/mailgun/MailgunDeliveryStrategy.ts#L20)
|
|
9
9
|
|
|
10
10
|
Delivers emails via the Mailgun API.
|
|
11
11
|
|
|
@@ -21,7 +21,7 @@ Delivers emails via the Mailgun API.
|
|
|
21
21
|
new MailgunDeliveryStrategy(configService): MailgunDeliveryStrategy;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Defined in: [platform-mailing/src/delivering/strategies/mailgun/MailgunDeliveryStrategy.ts:
|
|
24
|
+
Defined in: [platform-mailing/src/delivering/strategies/mailgun/MailgunDeliveryStrategy.ts:36](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/delivering/strategies/mailgun/MailgunDeliveryStrategy.ts#L36)
|
|
25
25
|
|
|
26
26
|
Constructs a new instance of the `MailgunDeliveryStrategy` class.
|
|
27
27
|
|
|
@@ -53,7 +53,7 @@ send(
|
|
|
53
53
|
_attachments?): Promise<void>;
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Defined in: [platform-mailing/src/delivering/strategies/mailgun/MailgunDeliveryStrategy.ts:
|
|
56
|
+
Defined in: [platform-mailing/src/delivering/strategies/mailgun/MailgunDeliveryStrategy.ts:61](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/delivering/strategies/mailgun/MailgunDeliveryStrategy.ts#L61)
|
|
57
57
|
|
|
58
58
|
Sends an email using the Mailgun transport.
|
|
59
59
|
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: PostmarkDeliveryStrategy
|
|
7
7
|
|
|
8
|
-
Defined in: [platform-mailing/src/delivering/strategies/postmark/PostmarkDeliveryStrategy.ts:
|
|
8
|
+
Defined in: [platform-mailing/src/delivering/strategies/postmark/PostmarkDeliveryStrategy.ts:18](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/delivering/strategies/postmark/PostmarkDeliveryStrategy.ts#L18)
|
|
9
9
|
|
|
10
10
|
The `PostmarkDeliveryStrategy` class.
|
|
11
11
|
|
|
@@ -21,7 +21,7 @@ The `PostmarkDeliveryStrategy` class.
|
|
|
21
21
|
new PostmarkDeliveryStrategy(configService): PostmarkDeliveryStrategy;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Defined in: [platform-mailing/src/delivering/strategies/postmark/PostmarkDeliveryStrategy.ts:
|
|
24
|
+
Defined in: [platform-mailing/src/delivering/strategies/postmark/PostmarkDeliveryStrategy.ts:33](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/delivering/strategies/postmark/PostmarkDeliveryStrategy.ts#L33)
|
|
25
25
|
|
|
26
26
|
Constructs a new instance of the `PostmarkDeliveryStrategy` class.
|
|
27
27
|
|
|
@@ -53,7 +53,7 @@ send(
|
|
|
53
53
|
_attachments?): Promise<void>;
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Defined in: [platform-mailing/src/delivering/strategies/postmark/PostmarkDeliveryStrategy.ts:
|
|
56
|
+
Defined in: [platform-mailing/src/delivering/strategies/postmark/PostmarkDeliveryStrategy.ts:53](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/delivering/strategies/postmark/PostmarkDeliveryStrategy.ts#L53)
|
|
57
57
|
|
|
58
58
|
Sends an email using the Postmark transport.
|
|
59
59
|
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: ResendDeliveryStrategy
|
|
7
7
|
|
|
8
|
-
Defined in: [platform-mailing/src/delivering/strategies/resend/ResendDeliveryStrategy.ts:
|
|
8
|
+
Defined in: [platform-mailing/src/delivering/strategies/resend/ResendDeliveryStrategy.ts:18](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/delivering/strategies/resend/ResendDeliveryStrategy.ts#L18)
|
|
9
9
|
|
|
10
10
|
Delivers emails via the Resend API.
|
|
11
11
|
|
|
@@ -21,7 +21,7 @@ Delivers emails via the Resend API.
|
|
|
21
21
|
new ResendDeliveryStrategy(configService): ResendDeliveryStrategy;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Defined in: [platform-mailing/src/delivering/strategies/resend/ResendDeliveryStrategy.ts:
|
|
24
|
+
Defined in: [platform-mailing/src/delivering/strategies/resend/ResendDeliveryStrategy.ts:33](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/delivering/strategies/resend/ResendDeliveryStrategy.ts#L33)
|
|
25
25
|
|
|
26
26
|
Constructs a new instance of the `ResendDeliveryStrategy` class.
|
|
27
27
|
|
|
@@ -53,7 +53,7 @@ send(
|
|
|
53
53
|
_attachments?): Promise<void>;
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Defined in: [platform-mailing/src/delivering/strategies/resend/ResendDeliveryStrategy.ts:
|
|
56
|
+
Defined in: [platform-mailing/src/delivering/strategies/resend/ResendDeliveryStrategy.ts:53](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/delivering/strategies/resend/ResendDeliveryStrategy.ts#L53)
|
|
57
57
|
|
|
58
58
|
Sends an email using the Resend transport.
|
|
59
59
|
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: SendGridDeliveryStrategy
|
|
7
7
|
|
|
8
|
-
Defined in: [platform-mailing/src/delivering/strategies/sendgrid/SendGridDeliveryStrategy.ts:
|
|
8
|
+
Defined in: [platform-mailing/src/delivering/strategies/sendgrid/SendGridDeliveryStrategy.ts:18](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/delivering/strategies/sendgrid/SendGridDeliveryStrategy.ts#L18)
|
|
9
9
|
|
|
10
10
|
Delivers emails via the SendGrid API.
|
|
11
11
|
|
|
@@ -21,7 +21,7 @@ Delivers emails via the SendGrid API.
|
|
|
21
21
|
new SendGridDeliveryStrategy(configService): SendGridDeliveryStrategy;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Defined in: [platform-mailing/src/delivering/strategies/sendgrid/SendGridDeliveryStrategy.ts:
|
|
24
|
+
Defined in: [platform-mailing/src/delivering/strategies/sendgrid/SendGridDeliveryStrategy.ts:32](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/delivering/strategies/sendgrid/SendGridDeliveryStrategy.ts#L32)
|
|
25
25
|
|
|
26
26
|
Constructs a new instance of the `SendGridDeliveryStrategy` class.
|
|
27
27
|
|
|
@@ -53,7 +53,7 @@ send(
|
|
|
53
53
|
_attachments?): Promise<void>;
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Defined in: [platform-mailing/src/delivering/strategies/sendgrid/SendGridDeliveryStrategy.ts:
|
|
56
|
+
Defined in: [platform-mailing/src/delivering/strategies/sendgrid/SendGridDeliveryStrategy.ts:52](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/delivering/strategies/sendgrid/SendGridDeliveryStrategy.ts#L52)
|
|
57
57
|
|
|
58
58
|
Sends an email using the SendGrid transport.
|
|
59
59
|
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: SmtpDeliveryStrategy
|
|
7
7
|
|
|
8
|
-
Defined in: [platform-mailing/src/delivering/strategies/smtp/SmtpDeliveryStrategy.ts:
|
|
8
|
+
Defined in: [platform-mailing/src/delivering/strategies/smtp/SmtpDeliveryStrategy.ts:18](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/delivering/strategies/smtp/SmtpDeliveryStrategy.ts#L18)
|
|
9
9
|
|
|
10
10
|
The `SmtpDeliveryStrategy` class.
|
|
11
11
|
|
|
@@ -21,7 +21,7 @@ The `SmtpDeliveryStrategy` class.
|
|
|
21
21
|
new SmtpDeliveryStrategy(configService): SmtpDeliveryStrategy;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Defined in: [platform-mailing/src/delivering/strategies/smtp/SmtpDeliveryStrategy.ts:
|
|
24
|
+
Defined in: [platform-mailing/src/delivering/strategies/smtp/SmtpDeliveryStrategy.ts:33](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/delivering/strategies/smtp/SmtpDeliveryStrategy.ts#L33)
|
|
25
25
|
|
|
26
26
|
Constructs a new instance of the `LogDelivery` class.
|
|
27
27
|
|
|
@@ -53,7 +53,7 @@ send(
|
|
|
53
53
|
_attachments?): Promise<void>;
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Defined in: [platform-mailing/src/delivering/strategies/smtp/SmtpDeliveryStrategy.ts:
|
|
56
|
+
Defined in: [platform-mailing/src/delivering/strategies/smtp/SmtpDeliveryStrategy.ts:63](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/delivering/strategies/smtp/SmtpDeliveryStrategy.ts#L63)
|
|
57
57
|
|
|
58
58
|
Sends an email using the SMTP transport.
|
|
59
59
|
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Abstract Class: TemplateFetchStrategyBase
|
|
7
7
|
|
|
8
|
-
Defined in: [platform-mailing/src/templating/strategies/abstracts/TemplateFetchStrategyBase.ts:
|
|
8
|
+
Defined in: [platform-mailing/src/templating/strategies/abstracts/TemplateFetchStrategyBase.ts:9](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/templating/strategies/abstracts/TemplateFetchStrategyBase.ts#L9)
|
|
9
9
|
|
|
10
10
|
Represents the base class for template fetch strategies.
|
|
11
11
|
|
|
@@ -23,7 +23,7 @@ Represents the base class for template fetch strategies.
|
|
|
23
23
|
protected new TemplateFetchStrategyBase(): TemplateFetchStrategyBase;
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
Defined in: [platform-mailing/src/templating/strategies/abstracts/TemplateFetchStrategyBase.ts:
|
|
26
|
+
Defined in: [platform-mailing/src/templating/strategies/abstracts/TemplateFetchStrategyBase.ts:17](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/templating/strategies/abstracts/TemplateFetchStrategyBase.ts#L17)
|
|
27
27
|
|
|
28
28
|
Initializes a new instance of the `TemplateFetchStrategyBase` class.
|
|
29
29
|
|
|
@@ -36,19 +36,13 @@ Initializes a new instance of the `TemplateFetchStrategyBase` class.
|
|
|
36
36
|
### load()
|
|
37
37
|
|
|
38
38
|
```ts
|
|
39
|
-
abstract load(): Promise<Record<string,
|
|
40
|
-
html?: string;
|
|
41
|
-
txt?: string;
|
|
42
|
-
}>>;
|
|
39
|
+
abstract load(): Promise<Record<string, IMailTemplateVariants>>;
|
|
43
40
|
```
|
|
44
41
|
|
|
45
|
-
Defined in: [platform-mailing/src/templating/strategies/abstracts/TemplateFetchStrategyBase.ts:
|
|
42
|
+
Defined in: [platform-mailing/src/templating/strategies/abstracts/TemplateFetchStrategyBase.ts:31](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/templating/strategies/abstracts/TemplateFetchStrategyBase.ts#L31)
|
|
46
43
|
|
|
47
44
|
Loads the templates.
|
|
48
45
|
|
|
49
46
|
#### Returns
|
|
50
47
|
|
|
51
|
-
`Promise`\<`Record`\<`string`,
|
|
52
|
-
`html?`: `string`;
|
|
53
|
-
`txt?`: `string`;
|
|
54
|
-
\}\>\>
|
|
48
|
+
`Promise`\<`Record`\<`string`, [`IMailTemplateVariants`](Interface.IMailTemplateVariants)\>\>
|
|
@@ -5,10 +5,14 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Interface: IMailEvents
|
|
7
7
|
|
|
8
|
-
Defined in: [platform-mailing/src/events/IMailEvents.ts:
|
|
8
|
+
Defined in: [platform-mailing/src/events/IMailEvents.ts:16](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/events/IMailEvents.ts#L16)
|
|
9
9
|
|
|
10
10
|
Represents the contract of events emitted by the mail domain.
|
|
11
11
|
|
|
12
|
+
Publishers only need to specify `recipientEmail`, `templateName`, and `templateParams`.
|
|
13
|
+
The subject is resolved from the stored template (industry-standard behavior).
|
|
14
|
+
An explicit `subject` can be provided as an override.
|
|
15
|
+
|
|
12
16
|
## Extends
|
|
13
17
|
|
|
14
18
|
- `IEventMap`
|
|
@@ -25,15 +29,24 @@ Represents the contract of events emitted by the mail domain.
|
|
|
25
29
|
|
|
26
30
|
```ts
|
|
27
31
|
sendMail: {
|
|
32
|
+
locale?: string;
|
|
28
33
|
recipientEmail: string;
|
|
29
34
|
senderEmail?: string;
|
|
30
|
-
subject
|
|
35
|
+
subject?: string;
|
|
31
36
|
templateName: string;
|
|
32
37
|
templateParams: Record<string, string | number | boolean | Date | undefined | null>;
|
|
33
38
|
};
|
|
34
39
|
```
|
|
35
40
|
|
|
36
|
-
Defined in: [platform-mailing/src/events/IMailEvents.ts:
|
|
41
|
+
Defined in: [platform-mailing/src/events/IMailEvents.ts:17](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/events/IMailEvents.ts#L17)
|
|
42
|
+
|
|
43
|
+
#### locale?
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
optional locale?: string;
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Optional locale for template resolution (e.g. `'de'`, `'en'`).
|
|
37
50
|
|
|
38
51
|
#### recipientEmail
|
|
39
52
|
|
|
@@ -41,26 +54,36 @@ Defined in: [platform-mailing/src/events/IMailEvents.ts:13](https://github.com/R
|
|
|
41
54
|
recipientEmail: string;
|
|
42
55
|
```
|
|
43
56
|
|
|
57
|
+
Recipient email address.
|
|
58
|
+
|
|
44
59
|
#### senderEmail?
|
|
45
60
|
|
|
46
61
|
```ts
|
|
47
62
|
optional senderEmail?: string;
|
|
48
63
|
```
|
|
49
64
|
|
|
50
|
-
|
|
65
|
+
Optional sender email override. When omitted, uses the configured default.
|
|
66
|
+
|
|
67
|
+
#### subject?
|
|
51
68
|
|
|
52
69
|
```ts
|
|
53
|
-
subject
|
|
70
|
+
optional subject?: string;
|
|
54
71
|
```
|
|
55
72
|
|
|
73
|
+
Optional subject override. When omitted, resolved from the template.
|
|
74
|
+
|
|
56
75
|
#### templateName
|
|
57
76
|
|
|
58
77
|
```ts
|
|
59
78
|
templateName: string;
|
|
60
79
|
```
|
|
61
80
|
|
|
81
|
+
Template key to resolve (e.g. `'AuthRegister'`).
|
|
82
|
+
|
|
62
83
|
#### templateParams
|
|
63
84
|
|
|
64
85
|
```ts
|
|
65
86
|
templateParams: Record<string, string | number | boolean | Date | undefined | null>;
|
|
66
87
|
```
|
|
88
|
+
|
|
89
|
+
Placeholder values to interpolate into subject and body.
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Interface: IMailModuleOptions
|
|
7
7
|
|
|
8
|
-
Defined in: [platform-mailing/src/MailModule.ts:
|
|
8
|
+
Defined in: [platform-mailing/src/MailModule.ts:30](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/MailModule.ts#L30)
|
|
9
9
|
|
|
10
10
|
Options for configuring the [MailModule](Class.MailModule).
|
|
11
11
|
|
|
@@ -17,10 +17,22 @@ Options for configuring the [MailModule](Class.MailModule).
|
|
|
17
17
|
readonly optional configEntries?: readonly Omit<IConfigRegistryEntry<unknown>, "module">[];
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
Defined in: [platform-mailing/src/MailModule.ts:
|
|
20
|
+
Defined in: [platform-mailing/src/MailModule.ts:52](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/MailModule.ts#L52)
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
Provider-specific configuration entries to register with the config module.
|
|
23
|
+
|
|
24
|
+
***
|
|
25
|
+
|
|
26
|
+
### deliveryStrategy
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
readonly deliveryStrategy: Type<DeliveryStrategyBase>;
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Defined in: [platform-mailing/src/MailModule.ts:35](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/MailModule.ts#L35)
|
|
33
|
+
|
|
34
|
+
Concrete implementation of the [DeliveryStrategyBase](Class.DeliveryStrategyBase) port.
|
|
35
|
+
For example, `SmtpDeliveryStrategy`, `PostmarkDeliveryStrategy`, or `LogDeliveryStrategy`.
|
|
24
36
|
|
|
25
37
|
***
|
|
26
38
|
|
|
@@ -30,27 +42,58 @@ Merged with the platform default entries.
|
|
|
30
42
|
readonly optional isGlobal?: boolean;
|
|
31
43
|
```
|
|
32
44
|
|
|
33
|
-
Defined in: [platform-mailing/src/MailModule.ts:
|
|
45
|
+
Defined in: [platform-mailing/src/MailModule.ts:47](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/MailModule.ts#L47)
|
|
34
46
|
|
|
35
47
|
Whether to register the module globally.
|
|
36
48
|
Defaults to `true`.
|
|
37
49
|
|
|
38
50
|
***
|
|
39
51
|
|
|
52
|
+
### templateFetchStrategy
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
readonly templateFetchStrategy: Type<TemplateFetchStrategyBase>;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Defined in: [platform-mailing/src/MailModule.ts:41](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/MailModule.ts#L41)
|
|
59
|
+
|
|
60
|
+
Concrete implementation of the [TemplateFetchStrategyBase](Class.TemplateFetchStrategyBase) port.
|
|
61
|
+
For example, `FileTemplateFetchStrategy`, `BlobTemplateFetchStrategy`, or `DatabaseTemplateFetchStrategy`.
|
|
62
|
+
|
|
63
|
+
***
|
|
64
|
+
|
|
65
|
+
### templateNames?
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
readonly optional templateNames?: readonly string[];
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Defined in: [platform-mailing/src/MailModule.ts:61](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/MailModule.ts#L61)
|
|
72
|
+
|
|
73
|
+
Template names to load when using the `FileTemplateFetchStrategy`.
|
|
74
|
+
Each name corresponds to a resource file (e.g. `'AuthRegister'` loads
|
|
75
|
+
`AuthRegister.html` and `AuthRegister.txt`).
|
|
76
|
+
|
|
77
|
+
Defaults to an empty array (no templates loaded).
|
|
78
|
+
|
|
79
|
+
***
|
|
80
|
+
|
|
40
81
|
### templateRepositoryProvider?
|
|
41
82
|
|
|
42
83
|
```ts
|
|
43
84
|
readonly optional templateRepositoryProvider?: Provider<IMailTemplateRepository>;
|
|
44
85
|
```
|
|
45
86
|
|
|
46
|
-
Defined in: [platform-mailing/src/MailModule.ts:
|
|
87
|
+
Defined in: [platform-mailing/src/MailModule.ts:79](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/MailModule.ts#L79)
|
|
47
88
|
|
|
48
89
|
Provider for the `IMailTemplateRepository` port.
|
|
49
|
-
Required when
|
|
90
|
+
Required when using `DatabaseTemplateFetchStrategy`.
|
|
50
91
|
|
|
51
92
|
Example:
|
|
52
93
|
```typescript
|
|
53
94
|
MailModule.register({
|
|
95
|
+
deliveryStrategy: SmtpDeliveryStrategy,
|
|
96
|
+
templateFetchStrategy: DatabaseTemplateFetchStrategy,
|
|
54
97
|
templateRepositoryProvider: {
|
|
55
98
|
provide: MAIL_TEMPLATE_REPOSITORY_TOKEN,
|
|
56
99
|
useClass: PrismaMailTemplateRepository,
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Interface: IMailTemplateVariants
|
|
7
7
|
|
|
8
|
-
Defined in: [platform-mailing/src/
|
|
8
|
+
Defined in: [platform-mailing/src/models/IMailTemplateVariants.ts:6](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/models/IMailTemplateVariants.ts#L6)
|
|
9
9
|
|
|
10
10
|
Represents the in-memory structure for a single template (multiple formats).
|
|
11
11
|
|
|
@@ -17,7 +17,17 @@ Represents the in-memory structure for a single template (multiple formats).
|
|
|
17
17
|
optional html?: string;
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
Defined in: [platform-mailing/src/
|
|
20
|
+
Defined in: [platform-mailing/src/models/IMailTemplateVariants.ts:8](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/models/IMailTemplateVariants.ts#L8)
|
|
21
|
+
|
|
22
|
+
***
|
|
23
|
+
|
|
24
|
+
### subject?
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
optional subject?: string;
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Defined in: [platform-mailing/src/models/IMailTemplateVariants.ts:7](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/models/IMailTemplateVariants.ts#L7)
|
|
21
31
|
|
|
22
32
|
***
|
|
23
33
|
|
|
@@ -27,4 +37,4 @@ Defined in: [platform-mailing/src/tokens/MailTokens.ts:24](https://github.com/Ru
|
|
|
27
37
|
optional txt?: string;
|
|
28
38
|
```
|
|
29
39
|
|
|
30
|
-
Defined in: [platform-mailing/src/
|
|
40
|
+
Defined in: [platform-mailing/src/models/IMailTemplateVariants.ts:9](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/models/IMailTemplateVariants.ts#L9)
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
type MailTemplateFormat = "html" | "txt";
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [platform-mailing/src/
|
|
12
|
+
Defined in: [platform-mailing/src/models/MailTemplateFormat.ts:6](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/models/MailTemplateFormat.ts#L6)
|
|
13
13
|
|
|
14
14
|
Union type of all supported template formats.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const MAIL_HOST: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [platform-mailing/src/env.ts:
|
|
12
|
+
Defined in: [platform-mailing/src/env.ts:72](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/env.ts#L72)
|
|
13
13
|
|
|
14
14
|
Mail host checked by the health indicator.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const MAIL_MAILGUN_API_KEY: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [platform-mailing/src/env.ts:
|
|
12
|
+
Defined in: [platform-mailing/src/env.ts:43](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/env.ts#L43)
|
|
13
13
|
|
|
14
14
|
API key for the Mailgun delivery service.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const MAIL_MAILGUN_DOMAIN: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [platform-mailing/src/env.ts:
|
|
12
|
+
Defined in: [platform-mailing/src/env.ts:46](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/env.ts#L46)
|
|
13
13
|
|
|
14
14
|
Mailgun domain (e.g. `mg.example.com`).
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const MAIL_PORT: IConfigKey<number>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [platform-mailing/src/env.ts:
|
|
12
|
+
Defined in: [platform-mailing/src/env.ts:78](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/env.ts#L78)
|
|
13
13
|
|
|
14
14
|
Mail port checked by the health indicator.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const MAIL_POSTMARK_API_KEY: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [platform-mailing/src/env.ts:
|
|
12
|
+
Defined in: [platform-mailing/src/env.ts:22](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/env.ts#L22)
|
|
13
13
|
|
|
14
14
|
API key for the Postmark delivery service.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const MAIL_RESEND_API_KEY: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [platform-mailing/src/env.ts:
|
|
12
|
+
Defined in: [platform-mailing/src/env.ts:29](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/env.ts#L29)
|
|
13
13
|
|
|
14
14
|
API key for the Resend delivery service.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const MAIL_SENDER_EMAIL: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [platform-mailing/src/env.ts:
|
|
12
|
+
Defined in: [platform-mailing/src/env.ts:12](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/env.ts#L12)
|
|
13
13
|
|
|
14
14
|
Sender e-mail address shown in the `From` header.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const MAIL_SENDGRID_API_KEY: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [platform-mailing/src/env.ts:
|
|
12
|
+
Defined in: [platform-mailing/src/env.ts:36](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/env.ts#L36)
|
|
13
13
|
|
|
14
14
|
API key for the SendGrid delivery service.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const MAIL_SMTP_HOST: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [platform-mailing/src/env.ts:
|
|
12
|
+
Defined in: [platform-mailing/src/env.ts:53](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/env.ts#L53)
|
|
13
13
|
|
|
14
14
|
SMTP server host.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const MAIL_SMTP_PASSWORD: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [platform-mailing/src/env.ts:
|
|
12
|
+
Defined in: [platform-mailing/src/env.ts:65](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/env.ts#L65)
|
|
13
13
|
|
|
14
14
|
SMTP authentication password.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const MAIL_SMTP_PORT: IConfigKey<number>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [platform-mailing/src/env.ts:
|
|
12
|
+
Defined in: [platform-mailing/src/env.ts:56](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/env.ts#L56)
|
|
13
13
|
|
|
14
14
|
SMTP server port.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const MAIL_SMTP_SECURE: IConfigKey<boolean>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [platform-mailing/src/env.ts:
|
|
12
|
+
Defined in: [platform-mailing/src/env.ts:59](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/env.ts#L59)
|
|
13
13
|
|
|
14
14
|
Whether the SMTP connection uses TLS.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const MAIL_SMTP_USER: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [platform-mailing/src/env.ts:
|
|
12
|
+
Defined in: [platform-mailing/src/env.ts:62](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/env.ts#L62)
|
|
13
13
|
|
|
14
14
|
SMTP authentication username.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const MAIL_TEMPLATE_ENGINE_FORMAT: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [platform-mailing/src/env.ts:
|
|
12
|
+
Defined in: [platform-mailing/src/env.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/env.ts#L15)
|
|
13
13
|
|
|
14
14
|
Template engine format identifier (e.g. `handlebars`).
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: MAIL\_TEMPLATE\_NAMES\_TOKEN'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: MAIL\_TEMPLATE\_NAMES\_TOKEN
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const MAIL_TEMPLATE_NAMES_TOKEN: typeof MAIL_TEMPLATE_NAMES_TOKEN;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [platform-mailing/src/tokens/MailTokens.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/tokens/MailTokens.ts#L15)
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const MAIL_USER: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [platform-mailing/src/env.ts:
|
|
12
|
+
Defined in: [platform-mailing/src/env.ts:75](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/env.ts#L75)
|
|
13
13
|
|
|
14
14
|
Mail user checked by the health indicator.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const PLATFORM_MAILING_CONFIG_ENTRIES: ReadonlyArray<Omit<IConfigRegistryEntry, "module">>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [platform-mailing/src/env.ts:
|
|
12
|
+
Defined in: [platform-mailing/src/env.ts:85](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/env.ts#L85)
|
|
13
13
|
|
|
14
14
|
All configuration entries required by `platform-mailing`.
|