@friggframework/core 2.0.0-next.47 → 2.0.0-next.48

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.
Files changed (35) hide show
  1. package/generated/prisma-mongodb/edge.js +6 -6
  2. package/generated/prisma-mongodb/index-browser.js +4 -4
  3. package/generated/prisma-mongodb/index.d.ts +3 -2
  4. package/generated/prisma-mongodb/index.js +6 -6
  5. package/generated/prisma-mongodb/package.json +1 -1
  6. package/generated/prisma-mongodb/query-engine-debian-openssl-3.0.x +0 -0
  7. package/generated/prisma-mongodb/query-engine-rhel-openssl-3.0.x +0 -0
  8. package/generated/prisma-mongodb/runtime/binary.js +2 -2
  9. package/generated/prisma-mongodb/runtime/edge-esm.js +3 -3
  10. package/generated/prisma-mongodb/runtime/edge.js +3 -3
  11. package/generated/prisma-mongodb/runtime/library.d.ts +5 -0
  12. package/generated/prisma-mongodb/runtime/react-native.js +14 -14
  13. package/generated/prisma-mongodb/runtime/wasm-compiler-edge.js +18 -18
  14. package/generated/prisma-mongodb/runtime/wasm-engine-edge.js +11 -11
  15. package/generated/prisma-mongodb/wasm.js +6 -6
  16. package/generated/prisma-postgresql/edge.js +6 -6
  17. package/generated/prisma-postgresql/index-browser.js +4 -4
  18. package/generated/prisma-postgresql/index.d.ts +3 -2
  19. package/generated/prisma-postgresql/index.js +6 -6
  20. package/generated/prisma-postgresql/package.json +1 -1
  21. package/generated/prisma-postgresql/query-engine-debian-openssl-3.0.x +0 -0
  22. package/generated/prisma-postgresql/query-engine-rhel-openssl-3.0.x +0 -0
  23. package/generated/prisma-postgresql/query_engine_bg.js +2 -2
  24. package/generated/prisma-postgresql/query_engine_bg.wasm +0 -0
  25. package/generated/prisma-postgresql/runtime/binary.js +2 -2
  26. package/generated/prisma-postgresql/runtime/edge-esm.js +3 -3
  27. package/generated/prisma-postgresql/runtime/edge.js +3 -3
  28. package/generated/prisma-postgresql/runtime/library.d.ts +5 -0
  29. package/generated/prisma-postgresql/runtime/react-native.js +14 -14
  30. package/generated/prisma-postgresql/runtime/wasm-compiler-edge.js +18 -18
  31. package/generated/prisma-postgresql/runtime/wasm-engine-edge.js +11 -11
  32. package/generated/prisma-postgresql/wasm.js +6 -6
  33. package/integrations/integration-router.js +1 -0
  34. package/integrations/use-cases/delete-integration-for-user.js +31 -3
  35. 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.17.0
39
- * Query Engine version: c0aafc03b8ef6cdced8654b9a817999e02457d6a
38
+ * Prisma Client JS version: 6.18.0
39
+ * Query Engine version: 34b5a692b7bd79939a9a2c3ef97d816e749cda2f
40
40
  */
41
41
  Prisma.prismaVersion = {
42
- client: "6.17.0",
43
- engine: "c0aafc03b8ef6cdced8654b9a817999e02457d6a"
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.17.0",
317
- "engineVersion": "c0aafc03b8ef6cdced8654b9a817999e02457d6a",
316
+ "clientVersion": "6.18.0",
317
+ "engineVersion": "34b5a692b7bd79939a9a2c3ef97d816e749cda2f",
318
318
  "datasourceNames": [
319
319
  "db"
320
320
  ],
@@ -113,6 +113,7 @@ function createIntegrationRouter() {
113
113
  const deleteIntegrationForUser = new DeleteIntegrationForUser({
114
114
  integrationRepository,
115
115
  integrationClasses,
116
+ moduleFactory,
116
117
  });
117
118
 
118
119
  const getIntegrationsForUser = new GetIntegrationsForUser({
@@ -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
- // 6. Complete async initialization (load dynamic actions, register handlers)
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.47",
4
+ "version": "2.0.0-next.48",
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.47",
42
- "@friggframework/prettier-config": "2.0.0-next.47",
43
- "@friggframework/test": "2.0.0-next.47",
41
+ "@friggframework/eslint-config": "2.0.0-next.48",
42
+ "@friggframework/prettier-config": "2.0.0-next.48",
43
+ "@friggframework/test": "2.0.0-next.48",
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": "7a7b05dc023f05a6b1c18075064e88f29156fee1"
83
+ "gitHead": "5167dd83884504bd0a4a91298208b102ebced687"
84
84
  }