@memberjunction/communication-engine 1.5.3 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BaseProvider.js +5 -5
- package/dist/BaseProvider.js.map +1 -1
- package/package.json +6 -6
package/dist/BaseProvider.js
CHANGED
|
@@ -9,7 +9,7 @@ const templates_1 = require("@memberjunction/templates");
|
|
|
9
9
|
class ProcessedMessageServer extends communication_types_1.ProcessedMessage {
|
|
10
10
|
async Process(forceTemplateRefresh, contextUser) {
|
|
11
11
|
if (this.BodyTemplate || this.SubjectTemplate || this.HTMLBodyTemplate)
|
|
12
|
-
await templates_1.
|
|
12
|
+
await templates_1.TemplateEngineServer.Instance.Config(forceTemplateRefresh, contextUser); // make sure the template engine is configured if we are using either template
|
|
13
13
|
if (this.BodyTemplate) {
|
|
14
14
|
// process the body template
|
|
15
15
|
const regularContent = this.BodyTemplate.GetHighestPriorityContent('Text');
|
|
@@ -18,7 +18,7 @@ class ProcessedMessageServer extends communication_types_1.ProcessedMessage {
|
|
|
18
18
|
Success: false,
|
|
19
19
|
Message: 'BodyTemplate does not have a Text option and this is required for processing the body of the message.'
|
|
20
20
|
};
|
|
21
|
-
const result = await templates_1.
|
|
21
|
+
const result = await templates_1.TemplateEngineServer.Instance.RenderTemplate(this.BodyTemplate, regularContent, this.ContextData);
|
|
22
22
|
if (result && result.Success) {
|
|
23
23
|
this.ProcessedBody = result.Output;
|
|
24
24
|
}
|
|
@@ -31,7 +31,7 @@ class ProcessedMessageServer extends communication_types_1.ProcessedMessage {
|
|
|
31
31
|
if (!this.HTMLBodyTemplate) { // if we have an HTMLBodyTemplate, we will process it separately below
|
|
32
32
|
const htmlContent = this.BodyTemplate.GetHighestPriorityContent('HTML');
|
|
33
33
|
if (htmlContent) {
|
|
34
|
-
const result = await templates_1.
|
|
34
|
+
const result = await templates_1.TemplateEngineServer.Instance.RenderTemplate(this.BodyTemplate, htmlContent, this.ContextData);
|
|
35
35
|
if (result && result.Success) {
|
|
36
36
|
this.ProcessedHTMLBody = result.Output;
|
|
37
37
|
}
|
|
@@ -55,7 +55,7 @@ class ProcessedMessageServer extends communication_types_1.ProcessedMessage {
|
|
|
55
55
|
// process the subject template
|
|
56
56
|
const htmlContent = this.HTMLBodyTemplate.GetHighestPriorityContent('HTML');
|
|
57
57
|
if (htmlContent) {
|
|
58
|
-
const result = await templates_1.
|
|
58
|
+
const result = await templates_1.TemplateEngineServer.Instance.RenderTemplate(this.HTMLBodyTemplate, htmlContent, this.ContextData);
|
|
59
59
|
if (result && result.Success) {
|
|
60
60
|
this.ProcessedHTMLBody = result.Output;
|
|
61
61
|
}
|
|
@@ -77,7 +77,7 @@ class ProcessedMessageServer extends communication_types_1.ProcessedMessage {
|
|
|
77
77
|
// process the subject template
|
|
78
78
|
const subjectContent = this.SubjectTemplate.GetHighestPriorityContent('Text');
|
|
79
79
|
if (subjectContent) {
|
|
80
|
-
const result = await templates_1.
|
|
80
|
+
const result = await templates_1.TemplateEngineServer.Instance.RenderTemplate(this.SubjectTemplate, subjectContent, this.ContextData);
|
|
81
81
|
if (result && result.Success) {
|
|
82
82
|
this.ProcessedSubject = result.Output;
|
|
83
83
|
}
|
package/dist/BaseProvider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseProvider.js","sourceRoot":"","sources":["../src/BaseProvider.ts"],"names":[],"mappings":";;;AAAA,6EAAuE;AAEvE,
|
|
1
|
+
{"version":3,"file":"BaseProvider.js","sourceRoot":"","sources":["../src/BaseProvider.ts"],"names":[],"mappings":";;;AAAA,6EAAuE;AAEvE,yDAAiE;AAEjE;;GAEG;AACH,MAAa,sBAAuB,SAAQ,sCAAgB;IACjD,KAAK,CAAC,OAAO,CAAC,oBAA8B,EAAE,WAAsB;QACvE,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,gBAAgB;YAClE,MAAM,gCAAoB,CAAC,QAAQ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AAC;oBAC3B,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;gBAC1C,CAAC;qBACI,CAAC;oBACF,OAAO;wBACH,OAAO,EAAE,KAAK;wBACd,OAAO,EAAE,MAAM,CAAC,OAAO;qBAC1B,CAAA;gBACL,CAAC;YACL,CAAC;iBACI,CAAC;gBACF,OAAO;oBACH,OAAO,EAAE,KAAK;oBACd,OAAO,EAAE,6GAA6G;iBACzH,CAAA;YACL,CAAC;QACL,CAAC;aACI,CAAC;YACF,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC;QACzC,CAAC;QAED,OAAO;YACH,OAAO,EAAE,IAAI;SAChB,CAAA;IACL,CAAC;CACJ;AAtGD,wDAsGC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/communication-engine",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "MemberJunction: Core Communication Framework Library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"typescript": "^5.4.5"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@memberjunction/global": "1.
|
|
23
|
-
"@memberjunction/core": "1.
|
|
24
|
-
"@memberjunction/templates": "1.
|
|
25
|
-
"@memberjunction/core-entities": "1.
|
|
26
|
-
"@memberjunction/communication-types": "1.
|
|
22
|
+
"@memberjunction/global": "1.6.0",
|
|
23
|
+
"@memberjunction/core": "1.6.0",
|
|
24
|
+
"@memberjunction/templates": "1.6.0",
|
|
25
|
+
"@memberjunction/core-entities": "1.6.0",
|
|
26
|
+
"@memberjunction/communication-types": "1.6.0",
|
|
27
27
|
"rxjs": "^7.8.1"
|
|
28
28
|
}
|
|
29
29
|
}
|