@vendure/email-plugin 2.0.0-next.5 → 2.0.0-next.9
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/lib/src/dev-mailbox.js.map +1 -1
- package/lib/src/event-handler.d.ts +73 -1
- package/lib/src/event-handler.js +73 -1
- package/lib/src/event-handler.js.map +1 -1
- package/lib/src/plugin.d.ts +16 -3
- package/lib/src/plugin.js +16 -3
- package/lib/src/plugin.js.map +1 -1
- package/lib/src/types.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-mailbox.js","sourceRoot":"","sources":["../../src/dev-mailbox.ts"],"names":[],"mappings":";;;;;;AACA,wCAAwD;AACxD,sDAA0C;AAC1C,wDAA0B;AAE1B,gDAAwB;AAKxB;;GAEG;AACH,MAAa,UAAU;IAMnB,KAAK,CAAC,OAAkC;QACpC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;QACzC,MAAM,MAAM,GAAG,iBAAO,CAAC,MAAM,EAAE,CAAC;QAChC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YACzB,GAAG,CAAC,QAAQ,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACjE,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;YACnC,MAAM,IAAI,GAAG,MAAM,kBAAE,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAC1C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;YACrD,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,KA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M,kBAAE,CAAC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACtD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACjC,OAAO,OAAO,CAAC;IACnB,CAAC;IAEO,oBAAoB,CAAC,YAA0B;QACnD,OAAO,IAAI,qBAAc,CAAC;YACtB,YAAY;YACZ,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,EAAS;YAClB,YAAY,EAAE,KAAK;YACnB,qBAAqB,EAAE,IAAI;YAC3B,OAAO,EAAE,IAAI,cAAO,EAAE;SACzB,CAAC,CAAC;IACP,CAAC;CACJ;AA/GD,gCA+GC"}
|
|
@@ -22,11 +22,17 @@ import { EmailTemplateConfig, EventWithAsyncData, EventWithContext, Intermediate
|
|
|
22
22
|
* This example creates a handler which listens for the `OrderStateTransitionEvent` and if the Order has
|
|
23
23
|
* transitioned to the `'PaymentSettled'` state, it will generate and send an email.
|
|
24
24
|
*
|
|
25
|
+
* The string argument passed into the `EmailEventListener` constructor is used to identify the handler, and
|
|
26
|
+
* also to locate the directory of the email template files. So in the example above, there should be a directory
|
|
27
|
+
* `<app root>/static/email/templates/order-confirmation` which contains a Handlebars template named `body.hbs`.
|
|
28
|
+
*
|
|
25
29
|
* ## Handling other languages
|
|
26
30
|
*
|
|
27
31
|
* By default, the handler will respond to all events on all channels and use the same subject ("Order confirmation for #12345" above)
|
|
28
32
|
* and body template. Where the server is intended to support multiple languages, the `.addTemplate()` method may be used
|
|
29
|
-
* to
|
|
33
|
+
* to define the subject and body template for specific language and channel combinations.
|
|
34
|
+
*
|
|
35
|
+
* The language is determined by looking at the `languageCode` property of the event's `ctx` ({@link RequestContext}) object.
|
|
30
36
|
*
|
|
31
37
|
* @example
|
|
32
38
|
* ```ts
|
|
@@ -39,6 +45,72 @@ import { EmailTemplateConfig, EventWithAsyncData, EventWithContext, Intermediate
|
|
|
39
45
|
* })
|
|
40
46
|
* ```
|
|
41
47
|
*
|
|
48
|
+
* ## Defining a custom handler
|
|
49
|
+
*
|
|
50
|
+
* Let's say you have a plugin which defines a new event type, `QuoteRequestedEvent`. In your plugin you have defined a mutation
|
|
51
|
+
* which is executed when the customer requests a quote in your storefront, and in your resolver, you use the {@link EventBus} to publish a
|
|
52
|
+
* new `QuoteRequestedEvent`.
|
|
53
|
+
*
|
|
54
|
+
* You now want to email the customer with their quote. Here are the steps you would take to set this up:
|
|
55
|
+
*
|
|
56
|
+
* ### 1. Create a new handler
|
|
57
|
+
*
|
|
58
|
+
* ```TypeScript
|
|
59
|
+
* import { EmailEventListener } from `\@vendure/email-plugin`;
|
|
60
|
+
* import { QuoteRequestedEvent } from `./events`;
|
|
61
|
+
*
|
|
62
|
+
* const quoteRequestedHandler = new EmailEventListener('quote-requested')
|
|
63
|
+
* .on(QuoteRequestedEvent)
|
|
64
|
+
* .setRecipient(event => event.customer.emailAddress)
|
|
65
|
+
* .setSubject(`Here's the quote you requested`)
|
|
66
|
+
* .setTemplateVars(event => ({ details: event.details }));
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* ### 2. Create the email template
|
|
70
|
+
*
|
|
71
|
+
* Next you need to make sure there is a template defined at `<app root>/static/email/templates/quote-requested/body.hbs`. The template
|
|
72
|
+
* would look something like this:
|
|
73
|
+
*
|
|
74
|
+
* ```handlebars
|
|
75
|
+
* {{> header title="Here's the quote you requested" }}
|
|
76
|
+
*
|
|
77
|
+
* <mj-section background-color="#fafafa">
|
|
78
|
+
* <mj-column>
|
|
79
|
+
* <mj-text color="#525252">
|
|
80
|
+
* Thank you for your interest in our products! Here's the details
|
|
81
|
+
* of the quote you recently requested:
|
|
82
|
+
* </mj-text>
|
|
83
|
+
*
|
|
84
|
+
* <--! your custom email layout goes here -->
|
|
85
|
+
* </mj-column>
|
|
86
|
+
* </mj-section>
|
|
87
|
+
*
|
|
88
|
+
*
|
|
89
|
+
* {{> footer }}
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* You can find pre-made templates on the [MJML website](https://mjml.io/templates/).
|
|
93
|
+
*
|
|
94
|
+
* ### 3. Register the handler
|
|
95
|
+
*
|
|
96
|
+
* Finally, you need to register the handler with the EmailPlugin:
|
|
97
|
+
*
|
|
98
|
+
* ```TypeScript {hl_lines=[8]}
|
|
99
|
+
* import { defaultEmailHandlers, EmailPlugin } from '\@vendure/email-plugin';
|
|
100
|
+
* import { quoteRequestedHandler } from './plugins/quote-plugin';
|
|
101
|
+
*
|
|
102
|
+
* const config: VendureConfig = {
|
|
103
|
+
* // Add an instance of the plugin to the plugins array
|
|
104
|
+
* plugins: [
|
|
105
|
+
* EmailPlugin.init({
|
|
106
|
+
* handlers: [...defaultEmailHandlers, quoteRequestedHandler],
|
|
107
|
+
* templatePath: path.join(__dirname, 'vendure/email/templates'),
|
|
108
|
+
* // ... etc
|
|
109
|
+
* }),
|
|
110
|
+
* ],
|
|
111
|
+
* };
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
42
114
|
* @docsCategory EmailPlugin
|
|
43
115
|
*/
|
|
44
116
|
export declare class EmailEventHandler<T extends string = string, Event extends EventWithContext = EventWithContext> {
|
package/lib/src/event-handler.js
CHANGED
|
@@ -24,11 +24,17 @@ const constants_1 = require("./constants");
|
|
|
24
24
|
* This example creates a handler which listens for the `OrderStateTransitionEvent` and if the Order has
|
|
25
25
|
* transitioned to the `'PaymentSettled'` state, it will generate and send an email.
|
|
26
26
|
*
|
|
27
|
+
* The string argument passed into the `EmailEventListener` constructor is used to identify the handler, and
|
|
28
|
+
* also to locate the directory of the email template files. So in the example above, there should be a directory
|
|
29
|
+
* `<app root>/static/email/templates/order-confirmation` which contains a Handlebars template named `body.hbs`.
|
|
30
|
+
*
|
|
27
31
|
* ## Handling other languages
|
|
28
32
|
*
|
|
29
33
|
* By default, the handler will respond to all events on all channels and use the same subject ("Order confirmation for #12345" above)
|
|
30
34
|
* and body template. Where the server is intended to support multiple languages, the `.addTemplate()` method may be used
|
|
31
|
-
* to
|
|
35
|
+
* to define the subject and body template for specific language and channel combinations.
|
|
36
|
+
*
|
|
37
|
+
* The language is determined by looking at the `languageCode` property of the event's `ctx` ({@link RequestContext}) object.
|
|
32
38
|
*
|
|
33
39
|
* @example
|
|
34
40
|
* ```ts
|
|
@@ -41,6 +47,72 @@ const constants_1 = require("./constants");
|
|
|
41
47
|
* })
|
|
42
48
|
* ```
|
|
43
49
|
*
|
|
50
|
+
* ## Defining a custom handler
|
|
51
|
+
*
|
|
52
|
+
* Let's say you have a plugin which defines a new event type, `QuoteRequestedEvent`. In your plugin you have defined a mutation
|
|
53
|
+
* which is executed when the customer requests a quote in your storefront, and in your resolver, you use the {@link EventBus} to publish a
|
|
54
|
+
* new `QuoteRequestedEvent`.
|
|
55
|
+
*
|
|
56
|
+
* You now want to email the customer with their quote. Here are the steps you would take to set this up:
|
|
57
|
+
*
|
|
58
|
+
* ### 1. Create a new handler
|
|
59
|
+
*
|
|
60
|
+
* ```TypeScript
|
|
61
|
+
* import { EmailEventListener } from `\@vendure/email-plugin`;
|
|
62
|
+
* import { QuoteRequestedEvent } from `./events`;
|
|
63
|
+
*
|
|
64
|
+
* const quoteRequestedHandler = new EmailEventListener('quote-requested')
|
|
65
|
+
* .on(QuoteRequestedEvent)
|
|
66
|
+
* .setRecipient(event => event.customer.emailAddress)
|
|
67
|
+
* .setSubject(`Here's the quote you requested`)
|
|
68
|
+
* .setTemplateVars(event => ({ details: event.details }));
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* ### 2. Create the email template
|
|
72
|
+
*
|
|
73
|
+
* Next you need to make sure there is a template defined at `<app root>/static/email/templates/quote-requested/body.hbs`. The template
|
|
74
|
+
* would look something like this:
|
|
75
|
+
*
|
|
76
|
+
* ```handlebars
|
|
77
|
+
* {{> header title="Here's the quote you requested" }}
|
|
78
|
+
*
|
|
79
|
+
* <mj-section background-color="#fafafa">
|
|
80
|
+
* <mj-column>
|
|
81
|
+
* <mj-text color="#525252">
|
|
82
|
+
* Thank you for your interest in our products! Here's the details
|
|
83
|
+
* of the quote you recently requested:
|
|
84
|
+
* </mj-text>
|
|
85
|
+
*
|
|
86
|
+
* <--! your custom email layout goes here -->
|
|
87
|
+
* </mj-column>
|
|
88
|
+
* </mj-section>
|
|
89
|
+
*
|
|
90
|
+
*
|
|
91
|
+
* {{> footer }}
|
|
92
|
+
* ```
|
|
93
|
+
*
|
|
94
|
+
* You can find pre-made templates on the [MJML website](https://mjml.io/templates/).
|
|
95
|
+
*
|
|
96
|
+
* ### 3. Register the handler
|
|
97
|
+
*
|
|
98
|
+
* Finally, you need to register the handler with the EmailPlugin:
|
|
99
|
+
*
|
|
100
|
+
* ```TypeScript {hl_lines=[8]}
|
|
101
|
+
* import { defaultEmailHandlers, EmailPlugin } from '\@vendure/email-plugin';
|
|
102
|
+
* import { quoteRequestedHandler } from './plugins/quote-plugin';
|
|
103
|
+
*
|
|
104
|
+
* const config: VendureConfig = {
|
|
105
|
+
* // Add an instance of the plugin to the plugins array
|
|
106
|
+
* plugins: [
|
|
107
|
+
* EmailPlugin.init({
|
|
108
|
+
* handlers: [...defaultEmailHandlers, quoteRequestedHandler],
|
|
109
|
+
* templatePath: path.join(__dirname, 'vendure/email/templates'),
|
|
110
|
+
* // ... etc
|
|
111
|
+
* }),
|
|
112
|
+
* ],
|
|
113
|
+
* };
|
|
114
|
+
* ```
|
|
115
|
+
*
|
|
44
116
|
* @docsCategory EmailPlugin
|
|
45
117
|
*/
|
|
46
118
|
class EmailEventHandler {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-handler.js","sourceRoot":"","sources":["../../src/event-handler.ts"],"names":[],"mappings":";;;AAEA,wCAAiD;AAEjD,yDAA0D;AAC1D,2CAAwC;AAcxC
|
|
1
|
+
{"version":3,"file":"event-handler.js","sourceRoot":"","sources":["../../src/event-handler.ts"],"names":[],"mappings":";;;AAEA,wCAAiD;AAEjD,yDAA0D;AAC1D,2CAAwC;AAcxC;;;;;;;;;;;;;;;;;;;;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AAI,CAAC,CAAC,WAAW,KAAK,SAAS,CAAC;gBAC9D,CAAC,CAAC,YAAY,KAAK,YAAY,CAClC,CAAC;QACN,CAAC,CAAC,CAAC;QACH,IAAI,UAAU,EAAE;YACZ,OAAO,UAAU,CAAC;SACrB;QACD,MAAM,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CACzC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,KAAK,WAAW,IAAI,CAAC,CAAC,YAAY,KAAK,SAAS,CACrE,CAAC;QACF,IAAI,YAAY,EAAE;YACd,OAAO,YAAY,CAAC;SACvB;QACD,OAAO;IACX,CAAC;CACJ;AAvRD,8CAuRC;AAED;;;;;;GAMG;AACH,MAAa,8BAKX,SAAQ,iBAA2B;IACjC,YACW,WAAyC,EAChD,QAA+B,EAC/B,KAAuB;QAEvB,KAAK,CAAC,QAAQ,EAAE,KAAY,CAAC,CAAC;QAJvB,gBAAW,GAAX,WAAW,CAA8B;IAKpD,CAAC;CACJ;AAbD,wEAaC"}
|
package/lib/src/plugin.d.ts
CHANGED
|
@@ -5,9 +5,22 @@ import { EmailProcessor } from './email-processor';
|
|
|
5
5
|
import { EmailPluginDevModeOptions, EmailPluginOptions } from './types';
|
|
6
6
|
/**
|
|
7
7
|
* @description
|
|
8
|
-
* The EmailPlugin creates and sends transactional emails based on Vendure events. By default it uses an [MJML](https://mjml.io/)-based
|
|
8
|
+
* The EmailPlugin creates and sends transactional emails based on Vendure events. By default, it uses an [MJML](https://mjml.io/)-based
|
|
9
9
|
* email generator to generate the email body and [Nodemailer](https://nodemailer.com/about/) to send the emails.
|
|
10
10
|
*
|
|
11
|
+
* ## High-level description
|
|
12
|
+
* Vendure has an internal events system (see {@link EventBus}) that allows plugins to subscribe to events. The EmailPlugin is configured with
|
|
13
|
+
* {@link EmailEventHandler}s that listen for a specific event and when it is published, the handler defines which template to use to generate
|
|
14
|
+
* the resulting email.
|
|
15
|
+
*
|
|
16
|
+
* The plugin comes with a set of default handlers for the following events:
|
|
17
|
+
* - Order confirmation
|
|
18
|
+
* - New customer email address verification
|
|
19
|
+
* - Password reset request
|
|
20
|
+
* - Email address change request
|
|
21
|
+
*
|
|
22
|
+
* You can also create your own handlers and register them with the plugin - see the {@link EmailEventHandler} docs for more details.
|
|
23
|
+
*
|
|
11
24
|
* ## Installation
|
|
12
25
|
*
|
|
13
26
|
* `yarn add \@vendure/email-plugin`
|
|
@@ -25,7 +38,7 @@ import { EmailPluginDevModeOptions, EmailPluginOptions } from './types';
|
|
|
25
38
|
* plugins: [
|
|
26
39
|
* EmailPlugin.init({
|
|
27
40
|
* handlers: defaultEmailHandlers,
|
|
28
|
-
* templatePath: path.join(__dirname, '
|
|
41
|
+
* templatePath: path.join(__dirname, 'static/email/templates'),
|
|
29
42
|
* transport: {
|
|
30
43
|
* type: 'smtp',
|
|
31
44
|
* host: 'smtp.example.com',
|
|
@@ -42,7 +55,7 @@ import { EmailPluginDevModeOptions, EmailPluginOptions } from './types';
|
|
|
42
55
|
*
|
|
43
56
|
* ## Email templates
|
|
44
57
|
*
|
|
45
|
-
* In the example above, the plugin has been configured to look in `<app-root>/
|
|
58
|
+
* In the example above, the plugin has been configured to look in `<app-root>/static/email/templates`
|
|
46
59
|
* for the email template files. If you used `\@vendure/create` to create your application, the templates will have
|
|
47
60
|
* been copied to that location during setup.
|
|
48
61
|
*
|
package/lib/src/plugin.js
CHANGED
|
@@ -19,9 +19,22 @@ const dev_mailbox_1 = require("./dev-mailbox");
|
|
|
19
19
|
const email_processor_1 = require("./email-processor");
|
|
20
20
|
/**
|
|
21
21
|
* @description
|
|
22
|
-
* The EmailPlugin creates and sends transactional emails based on Vendure events. By default it uses an [MJML](https://mjml.io/)-based
|
|
22
|
+
* The EmailPlugin creates and sends transactional emails based on Vendure events. By default, it uses an [MJML](https://mjml.io/)-based
|
|
23
23
|
* email generator to generate the email body and [Nodemailer](https://nodemailer.com/about/) to send the emails.
|
|
24
24
|
*
|
|
25
|
+
* ## High-level description
|
|
26
|
+
* Vendure has an internal events system (see {@link EventBus}) that allows plugins to subscribe to events. The EmailPlugin is configured with
|
|
27
|
+
* {@link EmailEventHandler}s that listen for a specific event and when it is published, the handler defines which template to use to generate
|
|
28
|
+
* the resulting email.
|
|
29
|
+
*
|
|
30
|
+
* The plugin comes with a set of default handlers for the following events:
|
|
31
|
+
* - Order confirmation
|
|
32
|
+
* - New customer email address verification
|
|
33
|
+
* - Password reset request
|
|
34
|
+
* - Email address change request
|
|
35
|
+
*
|
|
36
|
+
* You can also create your own handlers and register them with the plugin - see the {@link EmailEventHandler} docs for more details.
|
|
37
|
+
*
|
|
25
38
|
* ## Installation
|
|
26
39
|
*
|
|
27
40
|
* `yarn add \@vendure/email-plugin`
|
|
@@ -39,7 +52,7 @@ const email_processor_1 = require("./email-processor");
|
|
|
39
52
|
* plugins: [
|
|
40
53
|
* EmailPlugin.init({
|
|
41
54
|
* handlers: defaultEmailHandlers,
|
|
42
|
-
* templatePath: path.join(__dirname, '
|
|
55
|
+
* templatePath: path.join(__dirname, 'static/email/templates'),
|
|
43
56
|
* transport: {
|
|
44
57
|
* type: 'smtp',
|
|
45
58
|
* host: 'smtp.example.com',
|
|
@@ -56,7 +69,7 @@ const email_processor_1 = require("./email-processor");
|
|
|
56
69
|
*
|
|
57
70
|
* ## Email templates
|
|
58
71
|
*
|
|
59
|
-
* In the example above, the plugin has been configured to look in `<app-root>/
|
|
72
|
+
* In the example above, the plugin has been configured to look in `<app-root>/static/email/templates`
|
|
60
73
|
* for the email template files. If you used `\@vendure/create` to create your application, the templates will have
|
|
61
74
|
* been copied to that location during setup.
|
|
62
75
|
*
|
package/lib/src/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,uCAAyC;AACzC,wCAWuB;AAEvB,qCAA4C;AAC5C,2CAA8D;AAC9D,+CAA2C;AAC3C,uDAA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ANGED
|
@@ -50,7 +50,7 @@ export interface EmailPluginOptions {
|
|
|
50
50
|
* An array of {@link EmailEventHandler}s which define which Vendure events will trigger
|
|
51
51
|
* emails, and how those emails are generated.
|
|
52
52
|
*/
|
|
53
|
-
handlers: EmailEventHandler
|
|
53
|
+
handlers: Array<EmailEventHandler<string, any>>;
|
|
54
54
|
/**
|
|
55
55
|
* @description
|
|
56
56
|
* An object containing variables which are made available to all templates. For example,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vendure/email-plugin",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"@types/fs-extra": "^9.0.1",
|
|
36
36
|
"@types/handlebars": "^4.1.0",
|
|
37
37
|
"@types/mjml": "^4.0.4",
|
|
38
|
-
"@vendure/common": "^2.0.0-next.
|
|
39
|
-
"@vendure/core": "^2.0.0-next.
|
|
38
|
+
"@vendure/common": "^2.0.0-next.9",
|
|
39
|
+
"@vendure/core": "^2.0.0-next.9",
|
|
40
40
|
"rimraf": "^3.0.2",
|
|
41
41
|
"typescript": "4.5.5"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "a47a8bbf4c0933b6a7a9cb3a518f8761d1b6e022"
|
|
44
44
|
}
|