@friggframework/core 2.0.0-next.47 → 2.0.0-next.49
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/generated/prisma-mongodb/edge.js +6 -6
- package/generated/prisma-mongodb/index-browser.js +4 -4
- package/generated/prisma-mongodb/index.d.ts +3 -2
- package/generated/prisma-mongodb/index.js +6 -6
- package/generated/prisma-mongodb/package.json +1 -1
- package/generated/prisma-mongodb/query-engine-debian-openssl-3.0.x +0 -0
- package/generated/prisma-mongodb/query-engine-rhel-openssl-3.0.x +0 -0
- package/generated/prisma-mongodb/runtime/binary.js +2 -2
- package/generated/prisma-mongodb/runtime/edge-esm.js +3 -3
- package/generated/prisma-mongodb/runtime/edge.js +3 -3
- package/generated/prisma-mongodb/runtime/library.d.ts +5 -0
- package/generated/prisma-mongodb/runtime/react-native.js +14 -14
- package/generated/prisma-mongodb/runtime/wasm-compiler-edge.js +18 -18
- package/generated/prisma-mongodb/runtime/wasm-engine-edge.js +11 -11
- package/generated/prisma-mongodb/wasm.js +6 -6
- package/generated/prisma-postgresql/edge.js +6 -6
- package/generated/prisma-postgresql/index-browser.js +4 -4
- package/generated/prisma-postgresql/index.d.ts +3 -2
- package/generated/prisma-postgresql/index.js +6 -6
- package/generated/prisma-postgresql/package.json +1 -1
- package/generated/prisma-postgresql/query-engine-debian-openssl-3.0.x +0 -0
- package/generated/prisma-postgresql/query-engine-rhel-openssl-3.0.x +0 -0
- package/generated/prisma-postgresql/query_engine_bg.js +2 -2
- package/generated/prisma-postgresql/query_engine_bg.wasm +0 -0
- package/generated/prisma-postgresql/runtime/binary.js +2 -2
- package/generated/prisma-postgresql/runtime/edge-esm.js +3 -3
- package/generated/prisma-postgresql/runtime/edge.js +3 -3
- package/generated/prisma-postgresql/runtime/library.d.ts +5 -0
- package/generated/prisma-postgresql/runtime/react-native.js +14 -14
- package/generated/prisma-postgresql/runtime/wasm-compiler-edge.js +18 -18
- package/generated/prisma-postgresql/runtime/wasm-engine-edge.js +11 -11
- package/generated/prisma-postgresql/wasm.js +6 -6
- package/integrations/integration-router.js +1 -0
- package/integrations/use-cases/delete-integration-for-user.js +31 -3
- package/package.json +5 -5
|
@@ -35,12 +35,12 @@ exports.Prisma = Prisma
|
|
|
35
35
|
exports.$Enums = {}
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
* Prisma Client JS version: 6.
|
|
39
|
-
* Query Engine version:
|
|
38
|
+
* Prisma Client JS version: 6.18.0
|
|
39
|
+
* Query Engine version: 34b5a692b7bd79939a9a2c3ef97d816e749cda2f
|
|
40
40
|
*/
|
|
41
41
|
Prisma.prismaVersion = {
|
|
42
|
-
client: "6.
|
|
43
|
-
engine: "
|
|
42
|
+
client: "6.18.0",
|
|
43
|
+
engine: "34b5a692b7bd79939a9a2c3ef97d816e749cda2f"
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError;
|
|
@@ -313,8 +313,8 @@ const config = {
|
|
|
313
313
|
"rootEnvPath": null
|
|
314
314
|
},
|
|
315
315
|
"relativePath": "../../prisma-postgresql",
|
|
316
|
-
"clientVersion": "6.
|
|
317
|
-
"engineVersion": "
|
|
316
|
+
"clientVersion": "6.18.0",
|
|
317
|
+
"engineVersion": "34b5a692b7bd79939a9a2c3ef97d816e749cda2f",
|
|
318
318
|
"datasourceNames": [
|
|
319
319
|
"db"
|
|
320
320
|
],
|
|
@@ -11,13 +11,15 @@ class DeleteIntegrationForUser {
|
|
|
11
11
|
* @param {Object} params - Configuration parameters.
|
|
12
12
|
* @param {import('../repositories/integration-repository-interface').IntegrationRepositoryInterface} params.integrationRepository - Repository for integration data operations.
|
|
13
13
|
* @param {Array<import('../integration').Integration>} params.integrationClasses - Array of available integration classes.
|
|
14
|
+
* @param {import('../../modules/module-factory').ModuleFactory} params.moduleFactory - Service for module instantiation and management.
|
|
14
15
|
*/
|
|
15
|
-
constructor({ integrationRepository, integrationClasses }) {
|
|
16
|
+
constructor({ integrationRepository, integrationClasses, moduleFactory }) {
|
|
16
17
|
/**
|
|
17
18
|
* @type {import('../repositories/integration-repository-interface').IntegrationRepositoryInterface}
|
|
18
19
|
*/
|
|
19
20
|
this.integrationRepository = integrationRepository;
|
|
20
21
|
this.integrationClasses = integrationClasses;
|
|
22
|
+
this.moduleFactory = moduleFactory;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
/**
|
|
@@ -51,6 +53,32 @@ class DeleteIntegrationForUser {
|
|
|
51
53
|
);
|
|
52
54
|
}
|
|
53
55
|
|
|
56
|
+
// Load modules with API clients for webhook deletion
|
|
57
|
+
const modules = [];
|
|
58
|
+
const failedModuleLoads = [];
|
|
59
|
+
|
|
60
|
+
for (const entityId of integrationRecord.entitiesIds) {
|
|
61
|
+
try {
|
|
62
|
+
const moduleInstance = await this.moduleFactory.getModuleInstance(
|
|
63
|
+
entityId,
|
|
64
|
+
integrationRecord.userId
|
|
65
|
+
);
|
|
66
|
+
modules.push(moduleInstance);
|
|
67
|
+
} catch (error) {
|
|
68
|
+
console.error(
|
|
69
|
+
`[Integration Deletion] Failed to load module for entity ${entityId}:`,
|
|
70
|
+
error.message
|
|
71
|
+
);
|
|
72
|
+
failedModuleLoads.push({ entityId, error: error.message });
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (failedModuleLoads.length > 0) {
|
|
77
|
+
console.warn(
|
|
78
|
+
`[Integration Deletion] ${failedModuleLoads.length}/${integrationRecord.entitiesIds.length} module(s) failed to load. Webhooks for these modules may require manual cleanup.`
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
54
82
|
const integrationInstance = new integrationClass({
|
|
55
83
|
id: integrationRecord.id,
|
|
56
84
|
userId: integrationRecord.userId,
|
|
@@ -59,10 +87,10 @@ class DeleteIntegrationForUser {
|
|
|
59
87
|
status: integrationRecord.status,
|
|
60
88
|
version: integrationRecord.version,
|
|
61
89
|
messages: integrationRecord.messages,
|
|
62
|
-
modules
|
|
90
|
+
modules,
|
|
63
91
|
});
|
|
64
92
|
|
|
65
|
-
//
|
|
93
|
+
// Complete async initialization (load dynamic actions, register handlers)
|
|
66
94
|
await integrationInstance.initialize();
|
|
67
95
|
await integrationInstance.send('ON_DELETE');
|
|
68
96
|
|
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.49",
|
|
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.49",
|
|
42
|
+
"@friggframework/prettier-config": "2.0.0-next.49",
|
|
43
|
+
"@friggframework/test": "2.0.0-next.49",
|
|
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": "ab5b2d2e5f0a24bc4af6b3dc0ac592c358638bfa"
|
|
84
84
|
}
|