@friggframework/core 2.0.0-next.42 → 2.0.0-next.43
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/handlers/routers/user.js +3 -1
- package/modules/module.js +1 -1
- package/modules/use-cases/process-authorization-callback.js +2 -1
- package/package.json +5 -5
- package/prisma-mongodb/schema.prisma +0 -3
- package/prisma-postgresql/migrations/20251010000000_remove_unused_entity_reference_map/migration.sql +3 -0
- package/prisma-postgresql/schema.prisma +0 -3
package/handlers/routers/user.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
const express = require('express');
|
|
2
2
|
const { createAppHandler } = require('../app-handler-helpers');
|
|
3
3
|
const { checkRequiredParams } = require('@friggframework/core');
|
|
4
|
-
const {
|
|
4
|
+
const {
|
|
5
|
+
createUserRepository,
|
|
6
|
+
} = require('../../user/repositories/user-repository-factory');
|
|
5
7
|
const {
|
|
6
8
|
CreateIndividualUser,
|
|
7
9
|
} = require('../../user/use-cases/create-individual-user');
|
package/modules/module.js
CHANGED
|
@@ -42,7 +42,7 @@ class Module extends Delegate {
|
|
|
42
42
|
const apiParams = {
|
|
43
43
|
...this.definition.env,
|
|
44
44
|
delegate: this,
|
|
45
|
-
...this.apiParamsFromCredential(this.credential.data)
|
|
45
|
+
...(this.credential?.data ? this.apiParamsFromCredential(this.credential.data) : {}), // Handle case when credential is undefined
|
|
46
46
|
...this.apiParamsFromEntity(this.entity),
|
|
47
47
|
};
|
|
48
48
|
this.api = new this.apiClass(apiParams);
|
|
@@ -93,7 +93,8 @@ class ProcessAuthorizationCallback {
|
|
|
93
93
|
);
|
|
94
94
|
credentialDetails.details.authIsValid = true;
|
|
95
95
|
|
|
96
|
-
await this.credentialRepository.upsertCredential(credentialDetails);
|
|
96
|
+
const persisted = await this.credentialRepository.upsertCredential(credentialDetails);
|
|
97
|
+
module.credential = persisted;
|
|
97
98
|
}
|
|
98
99
|
|
|
99
100
|
async findOrCreateEntity(entityDetails, moduleName, credentialId) {
|
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.43",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@hapi/boom": "^10.0.1",
|
|
7
7
|
"@prisma/client": "^6.16.3",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"uuid": "^9.0.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@friggframework/eslint-config": "2.0.0-next.
|
|
27
|
-
"@friggframework/prettier-config": "2.0.0-next.
|
|
28
|
-
"@friggframework/test": "2.0.0-next.
|
|
26
|
+
"@friggframework/eslint-config": "2.0.0-next.43",
|
|
27
|
+
"@friggframework/prettier-config": "2.0.0-next.43",
|
|
28
|
+
"@friggframework/test": "2.0.0-next.43",
|
|
29
29
|
"@types/lodash": "4.17.15",
|
|
30
30
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
31
31
|
"chai": "^4.3.6",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "2619db8a4e885887ad9071fe166cf0e8dee12d91"
|
|
68
68
|
}
|
|
@@ -159,9 +159,6 @@ model Integration {
|
|
|
159
159
|
entities Entity[] @relation("IntegrationEntities", fields: [entityIds], references: [id])
|
|
160
160
|
entityIds String[] @db.ObjectId
|
|
161
161
|
|
|
162
|
-
// Entity reference map (Map<String, String> stored as JSON)
|
|
163
|
-
entityReferenceMap Json? @default("{}")
|
|
164
|
-
|
|
165
162
|
// Message arrays (stored as JSON)
|
|
166
163
|
errors Json @default("[]")
|
|
167
164
|
warnings Json @default("[]")
|
|
@@ -151,9 +151,6 @@ model Integration {
|
|
|
151
151
|
// Entity references (many-to-many via implicit join table)
|
|
152
152
|
entities Entity[]
|
|
153
153
|
|
|
154
|
-
// Entity reference map (Map<String, String> stored as JSON)
|
|
155
|
-
entityReferenceMap Json? @default("{}")
|
|
156
|
-
|
|
157
154
|
// Message arrays (stored as JSON)
|
|
158
155
|
errors Json @default("[]")
|
|
159
156
|
warnings Json @default("[]")
|