@memberjunction/entity-communications-base 3.4.0 → 4.0.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/base.js +17 -24
- package/dist/base.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -17
- package/dist/index.js.map +1 -1
- package/package.json +8 -7
package/dist/base.js
CHANGED
|
@@ -1,40 +1,34 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
6
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const communication_types_1 = require("@memberjunction/communication-types");
|
|
14
|
-
let EntityCommunicationMessageTypeExtended = class EntityCommunicationMessageTypeExtended extends core_entities_1.EntityCommunicationMessageTypeEntity {
|
|
7
|
+
import { BaseEngine, BaseEntity } from "@memberjunction/core";
|
|
8
|
+
import { EntityCommunicationMessageTypeEntity } from "@memberjunction/core-entities";
|
|
9
|
+
import { RegisterClass } from "@memberjunction/global";
|
|
10
|
+
import { CommunicationEngineBase } from '@memberjunction/communication-types';
|
|
11
|
+
let EntityCommunicationMessageTypeExtended = class EntityCommunicationMessageTypeExtended extends EntityCommunicationMessageTypeEntity {
|
|
15
12
|
constructor() {
|
|
16
13
|
super(...arguments);
|
|
17
14
|
this.CommunicationFields = [];
|
|
18
15
|
}
|
|
19
16
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
(0, global_1.RegisterClass)(core_1.BaseEntity, 'Entity Communication Message Types')
|
|
17
|
+
EntityCommunicationMessageTypeExtended = __decorate([
|
|
18
|
+
RegisterClass(BaseEntity, 'Entity Communication Message Types')
|
|
23
19
|
], EntityCommunicationMessageTypeExtended);
|
|
24
|
-
|
|
20
|
+
export { EntityCommunicationMessageTypeExtended };
|
|
21
|
+
export class EntityCommunicationParams {
|
|
25
22
|
constructor() {
|
|
26
23
|
this.PreviewOnly = false;
|
|
27
24
|
this.IncludeProcessedMessages = false;
|
|
28
25
|
}
|
|
29
26
|
}
|
|
30
|
-
|
|
31
|
-
class EntityCommunicationResultItem {
|
|
27
|
+
export class EntityCommunicationResultItem {
|
|
32
28
|
}
|
|
33
|
-
|
|
34
|
-
class EntityCommunicationResult {
|
|
29
|
+
export class EntityCommunicationResult {
|
|
35
30
|
}
|
|
36
|
-
|
|
37
|
-
class EntityCommunicationsEngineBase extends core_1.BaseEngine {
|
|
31
|
+
export class EntityCommunicationsEngineBase extends BaseEngine {
|
|
38
32
|
constructor() {
|
|
39
33
|
super(...arguments);
|
|
40
34
|
this._Metadata = { EntityCommunicationMessageTypes: [], EntityCommunicationFields: [] };
|
|
@@ -43,7 +37,7 @@ class EntityCommunicationsEngineBase extends core_1.BaseEngine {
|
|
|
43
37
|
// just rely on the metadata from the base engine, can do extra loading here down the road as needed
|
|
44
38
|
// it is faster to use the base engine's metadata than to load it again here even though the metadata
|
|
45
39
|
// is cached we still have to check to see if the dataset is up to date and that takes time
|
|
46
|
-
await
|
|
40
|
+
await CommunicationEngineBase.Instance.Config(forceRefresh, contextUser);
|
|
47
41
|
await this.Load([], provider, forceRefresh, contextUser); // even though we have NO configs, we need to call Load so that the lifecycle of this object is properly managed where the Loaded flag is set and AdditionalLoading is called
|
|
48
42
|
}
|
|
49
43
|
static get Instance() {
|
|
@@ -56,12 +50,12 @@ class EntityCommunicationsEngineBase extends core_1.BaseEngine {
|
|
|
56
50
|
return this._Metadata.EntityCommunicationFields;
|
|
57
51
|
}
|
|
58
52
|
async AdditionalLoading(contextUser) {
|
|
59
|
-
if (!
|
|
60
|
-
await
|
|
53
|
+
if (!CommunicationEngineBase.Instance.Metadata.EntityCommunicationFields) {
|
|
54
|
+
await CommunicationEngineBase.Instance.Config(false, contextUser);
|
|
61
55
|
}
|
|
62
56
|
// post-process the fields to be linked to the message types they're part of
|
|
63
|
-
this._Metadata.EntityCommunicationFields =
|
|
64
|
-
this._Metadata.EntityCommunicationMessageTypes =
|
|
57
|
+
this._Metadata.EntityCommunicationFields = CommunicationEngineBase.Instance.Metadata.EntityCommunicationFields || [];
|
|
58
|
+
this._Metadata.EntityCommunicationMessageTypes = CommunicationEngineBase.Instance.Metadata.EntityCommunicationMessageTypes || [];
|
|
65
59
|
this.EntityCommunicationMessageTypes.forEach(m => {
|
|
66
60
|
m.CommunicationFields = this.EntityCommunicationFields.filter(f => f.EntityCommunicationMessageTypeID === m.ID);
|
|
67
61
|
});
|
|
@@ -84,5 +78,4 @@ class EntityCommunicationsEngineBase extends core_1.BaseEngine {
|
|
|
84
78
|
return this.GetEntityCommunicationMessageTypes(entityID).length > 0;
|
|
85
79
|
}
|
|
86
80
|
}
|
|
87
|
-
exports.EntityCommunicationsEngineBase = EntityCommunicationsEngineBase;
|
|
88
81
|
//# sourceMappingURL=base.js.map
|
package/dist/base.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAA4B,UAAU,EAA8C,MAAM,sBAAsB,CAAC;AACpI,OAAO,EAAkC,oCAAoC,EAAE,MAAM,+BAA+B,CAAC;AACrH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAA6B,uBAAuB,EAAE,MAAM,q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MAAM,uBAAuB,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QACtE,CAAC;QAED,6EAA6E;QAC7E,IAAI,CAAC,SAAS,CAAC,yBAAyB,GAAG,uBAAuB,CAAC,QAAQ,CAAC,QAAQ,CAAC,yBAAyB,IAAI,EAAE,CAAC;QACrH,IAAI,CAAC,SAAS,CAAC,+BAA+B,GAA6C,uBAAuB,CAAC,QAAQ,CAAC,QAAQ,CAAC,+BAA+B,IAAI,EAAE,CAAC;QAC3K,IAAI,CAAC,+BAA+B,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YAC7C,CAAC,CAAC,mBAAmB,GAAG,IAAI,CAAC,yBAAyB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,gCAAgC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;QACpH,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACI,kCAAkC,CAAC,QAAgB;QACtD,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC,+BAA+B,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;IACrF,CAAC;IAED;;;OAGG;IACI,2BAA2B,CAAC,QAAgB;QAC/C,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC,kCAAkC,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IACxE,CAAC;CAgBJ"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './base';
|
|
1
|
+
export * from './base.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
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
1
|
// PUBLIC API SURFACE AREA
|
|
18
|
-
|
|
2
|
+
export * from './base.js';
|
|
19
3
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,cAAc,QAAQ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/entity-communications-base",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "4.0.0",
|
|
4
5
|
"description": "MemberJunction: Base Types for Client/Server use with Entity Communications Engine",
|
|
5
6
|
"main": "dist/index.js",
|
|
6
7
|
"types": "dist/index.d.ts",
|
|
@@ -9,20 +10,20 @@
|
|
|
9
10
|
],
|
|
10
11
|
"scripts": {
|
|
11
12
|
"start": "ts-node-dev src/index.ts",
|
|
12
|
-
"build": "tsc",
|
|
13
|
+
"build": "tsc && tsc-alias -f",
|
|
13
14
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
14
15
|
},
|
|
15
16
|
"author": "MemberJunction.com",
|
|
16
17
|
"license": "ISC",
|
|
17
18
|
"devDependencies": {
|
|
18
19
|
"ts-node-dev": "^2.0.0",
|
|
19
|
-
"typescript": "^5.
|
|
20
|
+
"typescript": "^5.9.3"
|
|
20
21
|
},
|
|
21
22
|
"dependencies": {
|
|
22
|
-
"@memberjunction/global": "
|
|
23
|
-
"@memberjunction/core": "
|
|
24
|
-
"@memberjunction/core-entities": "
|
|
25
|
-
"@memberjunction/communication-types": "
|
|
23
|
+
"@memberjunction/global": "4.0.0",
|
|
24
|
+
"@memberjunction/core": "4.0.0",
|
|
25
|
+
"@memberjunction/core-entities": "4.0.0",
|
|
26
|
+
"@memberjunction/communication-types": "4.0.0"
|
|
26
27
|
},
|
|
27
28
|
"repository": {
|
|
28
29
|
"type": "git",
|