@friggframework/core 2.0.0-next.50 → 2.0.0-next.51
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.
|
@@ -64,19 +64,20 @@ class GetIntegrationsForUser {
|
|
|
64
64
|
modules.push(moduleInstance);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
const
|
|
67
|
+
const integrationData = {
|
|
68
68
|
id: integrationRecord.id,
|
|
69
69
|
userId: integrationRecord.userId,
|
|
70
70
|
entities: entities,
|
|
71
71
|
config: integrationRecord.config,
|
|
72
72
|
status: integrationRecord.status,
|
|
73
73
|
version: integrationRecord.version,
|
|
74
|
-
messages: integrationRecord.messages,
|
|
74
|
+
messages: integrationRecord.messages || { errors: [], warnings: [] },
|
|
75
75
|
modules,
|
|
76
|
-
|
|
76
|
+
options: integrationClass.getOptionDetails(),
|
|
77
|
+
};
|
|
77
78
|
|
|
78
79
|
integrations.push(
|
|
79
|
-
mapIntegrationClassToIntegrationDTO(
|
|
80
|
+
mapIntegrationClassToIntegrationDTO(integrationData)
|
|
80
81
|
);
|
|
81
82
|
}
|
|
82
83
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {import('../integration').Integration} integration
|
|
3
3
|
* Convert an Integration domain instance to a plain DTO suitable for JSON responses.
|
|
4
|
+
* Can also accept a plain object with an 'options' property to avoid unnecessary instantiation.
|
|
4
5
|
*/
|
|
5
6
|
function mapIntegrationClassToIntegrationDTO(integration) {
|
|
6
7
|
if (!integration) return null;
|
|
@@ -14,7 +15,7 @@ function mapIntegrationClassToIntegrationDTO(integration) {
|
|
|
14
15
|
version: integration.version,
|
|
15
16
|
messages: integration.messages,
|
|
16
17
|
userActions: integration.userActions,
|
|
17
|
-
options: integration.getOptionDetails(),
|
|
18
|
+
options: integration.options || (typeof integration.getOptionDetails === 'function' ? integration.getOptionDetails() : null),
|
|
18
19
|
};
|
|
19
20
|
}
|
|
20
21
|
|
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-next.
|
|
4
|
+
"version": "2.0.0-next.51",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@aws-sdk/client-apigatewaymanagementapi": "^3.588.0",
|
|
7
7
|
"@aws-sdk/client-kms": "^3.588.0",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@friggframework/eslint-config": "2.0.0-next.
|
|
42
|
-
"@friggframework/prettier-config": "2.0.0-next.
|
|
43
|
-
"@friggframework/test": "2.0.0-next.
|
|
41
|
+
"@friggframework/eslint-config": "2.0.0-next.51",
|
|
42
|
+
"@friggframework/prettier-config": "2.0.0-next.51",
|
|
43
|
+
"@friggframework/test": "2.0.0-next.51",
|
|
44
44
|
"@prisma/client": "^6.17.0",
|
|
45
45
|
"@types/lodash": "4.17.15",
|
|
46
46
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "b34db2cd6e18d9c6cb500560105612a094f4a4d6"
|
|
84
84
|
}
|