@memberjunction/communication-engine 1.5.3

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.
@@ -0,0 +1,12 @@
1
+ import { ProcessedMessage } from "@memberjunction/communication-types";
2
+ import { UserInfo } from "@memberjunction/core";
3
+ /**
4
+ * Server side implementation that calls the templating engine to process the message
5
+ */
6
+ export declare class ProcessedMessageServer extends ProcessedMessage {
7
+ Process(forceTemplateRefresh?: boolean, contextUser?: UserInfo): Promise<{
8
+ Success: boolean;
9
+ Message?: string;
10
+ }>;
11
+ }
12
+ //# sourceMappingURL=BaseProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseProvider.d.ts","sourceRoot":"","sources":["../src/BaseProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,gBAAgB;IAC3C,OAAO,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC;CAqG9H"}
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProcessedMessageServer = void 0;
4
+ const communication_types_1 = require("@memberjunction/communication-types");
5
+ const templates_1 = require("@memberjunction/templates");
6
+ /**
7
+ * Server side implementation that calls the templating engine to process the message
8
+ */
9
+ class ProcessedMessageServer extends communication_types_1.ProcessedMessage {
10
+ async Process(forceTemplateRefresh, contextUser) {
11
+ if (this.BodyTemplate || this.SubjectTemplate || this.HTMLBodyTemplate)
12
+ await templates_1.TemplateEngine.Instance.Config(forceTemplateRefresh, contextUser); // make sure the template engine is configured if we are using either template
13
+ if (this.BodyTemplate) {
14
+ // process the body template
15
+ const regularContent = this.BodyTemplate.GetHighestPriorityContent('Text');
16
+ if (!regularContent)
17
+ return {
18
+ Success: false,
19
+ Message: 'BodyTemplate does not have a Text option and this is required for processing the body of the message.'
20
+ };
21
+ const result = await templates_1.TemplateEngine.Instance.RenderTemplate(this.BodyTemplate, regularContent, this.ContextData);
22
+ if (result && result.Success) {
23
+ this.ProcessedBody = result.Output;
24
+ }
25
+ else {
26
+ return {
27
+ Success: false,
28
+ Message: result.Message
29
+ };
30
+ }
31
+ if (!this.HTMLBodyTemplate) { // if we have an HTMLBodyTemplate, we will process it separately below
32
+ const htmlContent = this.BodyTemplate.GetHighestPriorityContent('HTML');
33
+ if (htmlContent) {
34
+ const result = await templates_1.TemplateEngine.Instance.RenderTemplate(this.BodyTemplate, htmlContent, this.ContextData);
35
+ if (result && result.Success) {
36
+ this.ProcessedHTMLBody = result.Output;
37
+ }
38
+ else {
39
+ return {
40
+ Success: false,
41
+ Message: result.Message
42
+ };
43
+ }
44
+ }
45
+ else {
46
+ // our BodyTemplate does NOT have an HTML option, so we will use the regular content to render the HTML
47
+ this.ProcessedHTMLBody = this.ProcessedBody;
48
+ }
49
+ }
50
+ }
51
+ else {
52
+ this.ProcessedBody = this.Body;
53
+ }
54
+ if (this.HTMLBodyTemplate) {
55
+ // process the subject template
56
+ const htmlContent = this.HTMLBodyTemplate.GetHighestPriorityContent('HTML');
57
+ if (htmlContent) {
58
+ const result = await templates_1.TemplateEngine.Instance.RenderTemplate(this.HTMLBodyTemplate, htmlContent, this.ContextData);
59
+ if (result && result.Success) {
60
+ this.ProcessedHTMLBody = result.Output;
61
+ }
62
+ else {
63
+ return {
64
+ Success: false,
65
+ Message: result.Message
66
+ };
67
+ }
68
+ }
69
+ else {
70
+ return {
71
+ Success: false,
72
+ Message: 'HTMLBodyTemplate does not have an HTML option and this is required for processing the HTML body of the message.'
73
+ };
74
+ }
75
+ }
76
+ if (this.SubjectTemplate) {
77
+ // process the subject template
78
+ const subjectContent = this.SubjectTemplate.GetHighestPriorityContent('Text');
79
+ if (subjectContent) {
80
+ const result = await templates_1.TemplateEngine.Instance.RenderTemplate(this.SubjectTemplate, subjectContent, this.ContextData);
81
+ if (result && result.Success) {
82
+ this.ProcessedSubject = result.Output;
83
+ }
84
+ else {
85
+ return {
86
+ Success: false,
87
+ Message: result.Message
88
+ };
89
+ }
90
+ }
91
+ else {
92
+ return {
93
+ Success: false,
94
+ Message: 'SubjectTemplate does not have a Text option and this is required for processing the subject of the message.'
95
+ };
96
+ }
97
+ }
98
+ else {
99
+ this.ProcessedSubject = this.Subject;
100
+ }
101
+ return {
102
+ Success: true
103
+ };
104
+ }
105
+ }
106
+ exports.ProcessedMessageServer = ProcessedMessageServer;
107
+ //# sourceMappingURL=BaseProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseProvider.js","sourceRoot":"","sources":["../src/BaseProvider.ts"],"names":[],"mappings":";;;AAAA,6EAAuE;AAEvE,yDAA2D;AAE3D;;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,0BAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAC,CAAC,8EAA8E;QAE3J,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACpB,4BAA4B;YAC5B,MAAM,cAAc,GAAG,IAAI,CAAC,YAAY,CAAC,yBAAyB,CAAC,MAAM,CAAC,CAAC;YAC3E,IAAI,CAAC,cAAc;gBACf,OAAO;oBACH,OAAO,EAAE,KAAK;oBACd,OAAO,EAAE,uGAAuG;iBACnH,CAAC;YAEN,MAAM,MAAM,GAAG,MAAM,0BAAc,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,EAA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,OAAO,EAAE,IAAI;SAChB,CAAA;IACL,CAAC;CACJ;AAtGD,wDAsGC"}
@@ -0,0 +1,28 @@
1
+ import { BaseCommunicationProvider, CommunicationEngineBase, Message, MessageRecipient, MessageResult } from "@memberjunction/communication-types";
2
+ import { CommunicationRunEntity } from "@memberjunction/core-entities";
3
+ /**
4
+ * Base class for communications. This class can be sub-classed if desired if you would like to modify the logic across ALL actions. To do so, sub-class this class and use the
5
+ * @RegisterClass decorator from the @memberjunction/global package to register your sub-class with the ClassFactory. This will cause your sub-class to be used instead of this base class when the Metadata object insantiates the ActionEngine.
6
+ */
7
+ export declare class CommunicationEngine extends CommunicationEngineBase {
8
+ static get Instance(): CommunicationEngine;
9
+ /**
10
+ * Gets an instance of the class for the specified provider. The provider must be one of the providers that are configured in the system.
11
+ * @param providerName
12
+ * @returns
13
+ */
14
+ GetProvider(providerName: string): BaseCommunicationProvider;
15
+ /**
16
+ * Sends multiple messages using the specified provider. The provider must be one of the providers that are configured in the
17
+ * system.
18
+ * @param providerName
19
+ * @param providerMessageTypeName
20
+ * @param message this will be used as a starting point but the To will be replaced with the recipient in the recipients array
21
+ */
22
+ SendMessages(providerName: string, providerMessageTypeName: string, message: Message, recipients: MessageRecipient[]): Promise<MessageResult[]>;
23
+ /**
24
+ * Sends a single message using the specified provider. The provider must be one of the providers that are configured in the system.
25
+ */
26
+ SendSingleMessage(providerName: string, providerMessageTypeName: string, message: Message, run?: CommunicationRunEntity): Promise<MessageResult>;
27
+ }
28
+ //# sourceMappingURL=Engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Engine.d.ts","sourceRoot":"","sources":["../src/Engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACnJ,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAKvE;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,uBAAuB;IAC5D,WAAkB,QAAQ,IAAI,mBAAmB,CAEhD;IAEA;;;;OAIG;IACI,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,yBAAyB;IAkBnE;;;;;;OAMG;IACU,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAoB5J;;OAEG;IACU,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,aAAa,CAAC;CAwCjK"}
package/dist/Engine.js ADDED
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CommunicationEngine = void 0;
4
+ const communication_types_1 = require("@memberjunction/communication-types");
5
+ const global_1 = require("@memberjunction/global");
6
+ const BaseProvider_1 = require("./BaseProvider");
7
+ /**
8
+ * Base class for communications. This class can be sub-classed if desired if you would like to modify the logic across ALL actions. To do so, sub-class this class and use the
9
+ * @RegisterClass decorator from the @memberjunction/global package to register your sub-class with the ClassFactory. This will cause your sub-class to be used instead of this base class when the Metadata object insantiates the ActionEngine.
10
+ */
11
+ class CommunicationEngine extends communication_types_1.CommunicationEngineBase {
12
+ static get Instance() {
13
+ return super.getInstance();
14
+ }
15
+ /**
16
+ * Gets an instance of the class for the specified provider. The provider must be one of the providers that are configured in the system.
17
+ * @param providerName
18
+ * @returns
19
+ */
20
+ GetProvider(providerName) {
21
+ if (!this.Loaded)
22
+ throw new Error(`Metadata not loaded. Call Config() before accessing metadata.`);
23
+ const instance = global_1.MJGlobal.Instance.ClassFactory.CreateInstance(communication_types_1.BaseCommunicationProvider, providerName);
24
+ if (instance) {
25
+ // make sure the class we got back is NOT an instance of the base class, that is the default behavior of CreateInstance if we
26
+ // dont have a registration for the class we are looking for
27
+ if (instance.constructor.name === 'BaseCommunicationProvider')
28
+ throw new Error(`Provider ${providerName} not found.`);
29
+ else
30
+ return instance; // we got a valid instance of the sub-class we were looking for
31
+ }
32
+ else
33
+ throw new Error(`Provider ${providerName} not found.`);
34
+ }
35
+ /**
36
+ * Sends multiple messages using the specified provider. The provider must be one of the providers that are configured in the
37
+ * system.
38
+ * @param providerName
39
+ * @param providerMessageTypeName
40
+ * @param message this will be used as a starting point but the To will be replaced with the recipient in the recipients array
41
+ */
42
+ async SendMessages(providerName, providerMessageTypeName, message, recipients) {
43
+ const run = await this.StartRun();
44
+ if (!run)
45
+ throw new Error(`Failed to start communication run.`);
46
+ const results = [];
47
+ for (const r of recipients) {
48
+ const messageCopy = new communication_types_1.Message(message);
49
+ messageCopy.To = r.To;
50
+ messageCopy.ContextData = r.ContextData;
51
+ const result = await this.SendSingleMessage(providerName, providerMessageTypeName, messageCopy, run);
52
+ results.push(result);
53
+ }
54
+ if (!await this.EndRun(run))
55
+ throw new Error(`Failed to end communication run.`);
56
+ return results;
57
+ }
58
+ /**
59
+ * Sends a single message using the specified provider. The provider must be one of the providers that are configured in the system.
60
+ */
61
+ async SendSingleMessage(providerName, providerMessageTypeName, message, run) {
62
+ if (!this.Loaded)
63
+ throw new Error(`Metadata not loaded. Call Config() before accessing metadata.`);
64
+ const provider = this.GetProvider(providerName);
65
+ if (!provider)
66
+ throw new Error(`Provider ${providerName} not found.`);
67
+ const providerEntity = this.Providers.find((p) => p.Name === providerName);
68
+ if (!providerEntity)
69
+ throw new Error(`Provider ${providerName} not found.`);
70
+ if (!message.MessageType) {
71
+ // find the message type
72
+ const providerMessageType = providerEntity.MessageTypes.find((pmt) => pmt.Name.trim().toLowerCase() === providerMessageTypeName.trim().toLowerCase());
73
+ if (!providerMessageType)
74
+ throw new Error(`Provider message type ${providerMessageTypeName} not found.`);
75
+ message.MessageType = providerMessageType;
76
+ }
77
+ // now, process the message
78
+ const processedMessage = new BaseProvider_1.ProcessedMessageServer(message);
79
+ const processResult = await processedMessage.Process(false, this.ContextUser);
80
+ if (processResult.Success) {
81
+ const log = await this.StartLog(processedMessage, run);
82
+ if (log) {
83
+ const sendResult = await provider.SendSingleMessage(processedMessage);
84
+ log.Status = sendResult.Success ? 'Complete' : 'Failed';
85
+ log.ErrorMessage = sendResult.Error;
86
+ if (!await log.Save())
87
+ throw new Error(`Failed to complete log for message.`);
88
+ else
89
+ return sendResult;
90
+ }
91
+ else
92
+ throw new Error(`Failed to start log for message.`);
93
+ }
94
+ else
95
+ throw new Error(`Failed to process message.`);
96
+ }
97
+ }
98
+ exports.CommunicationEngine = CommunicationEngine;
99
+ //# sourceMappingURL=Engine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Engine.js","sourceRoot":"","sources":["../src/Engine.ts"],"names":[],"mappings":";;;AAAA,6EAAmJ;AAEnJ,mDAAkD;AAClD,iDAAwD;AAGxD;;;GAGG;AACH,MAAa,mBAAoB,SAAQ,6CAAuB;IACrD,MAAM,KAAK,QAAQ;QACtB,OAAO,KAAK,CAAC,WAAW,EAAuB,CAAC;IACpD,CAAC;IAEA;;;;OAIG;IACI,WAAW,CAAC,YAAoB;QACpC,IAAI,CAAC,IAAI,CAAC,MAAM;YACZ,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;QAErF,MAAM,QAAQ,GAAG,iBAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,cAAc,CAA4B,+CAAyB,EAAE,YAAY,CAAC,CAAC;QACnI,IAAI,QAAQ,EAAE,CAAC;YACX,8HAA8H;YAC9H,4DAA4D;YAC5D,IAAI,QAAQ,CAAC,WAAW,CAAC,IAAI,KAAK,2BAA2B;gBACzD,MAAM,IAAI,KAAK,CAAC,YAAY,YAAY,aAAa,CAAC,CAAC;;gBAEvD,OAAO,QAAQ,CAAC,CAAC,+DAA+D;QACxF,CAAC;;YAEG,MAAM,IAAI,KAAK,CAAC,YAAY,YAAY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,CAAC,qCAAqC,CAAC,CAAC;;oBAEvD,OAAO,UAAU,CAAC;YAC1B,CAAC;;gBAEG,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAC5D,CAAC;;YAEG,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IACrD,CAAC;CACL;AAlGD,kDAkGC"}
@@ -0,0 +1,3 @@
1
+ export * from './Engine';
2
+ export * from './BaseProvider';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // PUBLIC API SURFACE AREA
18
+ __exportStar(require("./Engine"), exports);
19
+ __exportStar(require("./BaseProvider"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0BAA0B;AAC1B,2CAAyB;AACzB,iDAA+B"}
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@memberjunction/communication-engine",
3
+ "version": "1.5.3",
4
+ "description": "MemberJunction: Core Communication Framework Library",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "/dist"
9
+ ],
10
+ "scripts": {
11
+ "start": "ts-node-dev src/index.ts",
12
+ "build": "tsc",
13
+ "test": "echo \"Error: no test specified\" && exit 1"
14
+ },
15
+ "author": "MemberJunction.com",
16
+ "license": "ISC",
17
+ "devDependencies": {
18
+ "ts-node-dev": "^2.0.0",
19
+ "typescript": "^5.4.5"
20
+ },
21
+ "dependencies": {
22
+ "@memberjunction/global": "1.5.3",
23
+ "@memberjunction/core": "1.5.3",
24
+ "@memberjunction/templates": "1.5.3",
25
+ "@memberjunction/core-entities": "1.5.3",
26
+ "@memberjunction/communication-types": "1.5.3",
27
+ "rxjs": "^7.8.1"
28
+ }
29
+ }
package/readme.md ADDED
@@ -0,0 +1,5 @@
1
+ # @memberjunction/communication-core
2
+
3
+ The `@memberjunction/communication-core` library provides the fundamental objects that are used for the MemberJunction Communications framework. Other packages within the @memberjunction/communication-* world use this package as a foundation.
4
+
5
+