@friggframework/core 2.0.0--canary.396.8e54b1f.0 → 2.0.0--canary.396.6afd30a.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.
|
@@ -44,7 +44,7 @@ class GetIntegrationForUser {
|
|
|
44
44
|
const integrationInstance = new Integration({
|
|
45
45
|
id: integrationRecord._id.toString(),
|
|
46
46
|
userId: integrationRecord.user,
|
|
47
|
-
entities: integrationRecord.entities,
|
|
47
|
+
entities: integrationRecord.entities.map(e => ({ ...e, id: e._id.toString() })),
|
|
48
48
|
config: integrationRecord.config,
|
|
49
49
|
status: integrationRecord.status,
|
|
50
50
|
version: integrationRecord.version,
|
|
@@ -27,7 +27,7 @@ class ModuleService {
|
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
const entityType = entity.
|
|
30
|
+
const entityType = entity.__t;
|
|
31
31
|
const moduleDefinition = this.moduleDefinitions.find((def) => {
|
|
32
32
|
const modelName = Module.getEntityModelFromDefinition(def).modelName;
|
|
33
33
|
return entityType === modelName;
|
package/module-plugin/module.js
CHANGED
|
@@ -324,23 +324,6 @@ class Module extends Delegate {
|
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* Custom JSON serializer for Module instances.
|
|
330
|
-
* Omits heavy or circular properties such as `api`, `delegate`, `CredentialModel`, etc.
|
|
331
|
-
* Returns only lightweight, non-sensitive data that might be useful in API responses.
|
|
332
|
-
*/
|
|
333
|
-
toJSON() {
|
|
334
|
-
return {
|
|
335
|
-
name: this.name,
|
|
336
|
-
userId: this.userId,
|
|
337
|
-
entity: this.entity && typeof this.entity.toJSON === 'function'
|
|
338
|
-
? this.entity.toJSON()
|
|
339
|
-
: this.entity,
|
|
340
|
-
// Expose credential ID only (not full encrypted values)
|
|
341
|
-
credentialId: this.credential?._id?.toString(),
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
327
|
}
|
|
345
328
|
|
|
346
329
|
module.exports = { Module };
|
|
@@ -6,7 +6,7 @@ function mapModuleClassToModuleDTO(moduleInstance) {
|
|
|
6
6
|
if (!moduleInstance) return null;
|
|
7
7
|
|
|
8
8
|
return {
|
|
9
|
-
id: moduleInstance._id.toString(),
|
|
9
|
+
id: moduleInstance.entity._id.toString(),
|
|
10
10
|
name: moduleInstance.name,
|
|
11
11
|
userId: moduleInstance.userId,
|
|
12
12
|
entity: moduleInstance.entity,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/core",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "2.0.0--canary.396.
|
|
4
|
+
"version": "2.0.0--canary.396.6afd30a.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@hapi/boom": "^10.0.1",
|
|
7
7
|
"aws-sdk": "^2.1200.0",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"uuid": "^9.0.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@friggframework/eslint-config": "2.0.0--canary.396.
|
|
26
|
-
"@friggframework/prettier-config": "2.0.0--canary.396.
|
|
27
|
-
"@friggframework/test": "2.0.0--canary.396.
|
|
25
|
+
"@friggframework/eslint-config": "2.0.0--canary.396.6afd30a.0",
|
|
26
|
+
"@friggframework/prettier-config": "2.0.0--canary.396.6afd30a.0",
|
|
27
|
+
"@friggframework/test": "2.0.0--canary.396.6afd30a.0",
|
|
28
28
|
"@types/lodash": "4.17.15",
|
|
29
29
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
30
30
|
"chai": "^4.3.6",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
},
|
|
54
54
|
"homepage": "https://github.com/friggframework/frigg#readme",
|
|
55
55
|
"description": "",
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "6afd30ab7178ec917c10c2539da48b005cbecb37"
|
|
57
57
|
}
|