@friggframework/core 2.0.0--canary.726.131e2b3.0 → 2.0.0--canary.726.7cf570c.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.
@@ -557,17 +557,30 @@ class IntegrationBase {
557
557
  }
558
558
  }
559
559
  }
560
- const dynamicUserActions = await this.loadDynamicUserActions();
561
- const filteredDynamicActions = actionType
562
- ? Object.fromEntries(
563
- Object.entries(dynamicUserActions).filter(
564
- ([_, event]) => event.userActionType === actionType
565
- )
566
- )
567
- : dynamicUserActions;
560
+ const dynamicUserActions = await this._loadDynamicUserActionEvents();
561
+ const filteredDynamicActions = Object.fromEntries(
562
+ Object.entries(dynamicUserActions).filter(
563
+ ([_, event]) =>
564
+ event.type === constantsToBeMigrated.types.USER_ACTION &&
565
+ (!actionType || event.userActionType === actionType)
566
+ )
567
+ );
568
568
  return { ...userActions, ...filteredDynamicActions };
569
569
  }
570
570
 
571
+ async _loadDynamicUserActionEvents() {
572
+ const dynamicUserActions = await this.loadDynamicUserActions();
573
+ return Object.fromEntries(
574
+ Object.entries(dynamicUserActions).map(([key, event]) => [
575
+ key,
576
+ {
577
+ ...event,
578
+ type: event.type ?? constantsToBeMigrated.types.USER_ACTION,
579
+ },
580
+ ])
581
+ );
582
+ }
583
+
571
584
  async getActionOptions(actionId, data) {
572
585
  const options = {
573
586
  jsonSchema: {},
@@ -847,7 +860,8 @@ class IntegrationBase {
847
860
 
848
861
  async initialize() {
849
862
  try {
850
- const additionalUserActions = await this.loadDynamicUserActions();
863
+ const additionalUserActions =
864
+ await this._loadDynamicUserActionEvents();
851
865
  this.events = { ...this.events, ...additionalUserActions };
852
866
  } catch (e) {
853
867
  this.addError(e);
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.726.131e2b3.0",
4
+ "version": "2.0.0--canary.726.7cf570c.0",
5
5
  "dependencies": {
6
6
  "@aws-sdk/client-apigatewaymanagementapi": "^3.588.0",
7
7
  "@aws-sdk/client-kms": "^3.588.0",
@@ -11,7 +11,7 @@
11
11
  "@aws-sdk/client-sqs": "^3.588.0",
12
12
  "@aws-sdk/client-ssm": "^3.588.0",
13
13
  "@aws-sdk/s3-request-presigner": "^3.588.0",
14
- "@friggframework/schemas": "2.0.0--canary.726.131e2b3.0",
14
+ "@friggframework/schemas": "2.0.0--canary.726.7cf570c.0",
15
15
  "@hapi/boom": "^10.0.1",
16
16
  "@opentelemetry/api": "^1.9.1",
17
17
  "@opentelemetry/context-async-hooks": "^2.9.0",
@@ -49,9 +49,9 @@
49
49
  }
50
50
  },
51
51
  "devDependencies": {
52
- "@friggframework/eslint-config": "2.0.0--canary.726.131e2b3.0",
53
- "@friggframework/prettier-config": "2.0.0--canary.726.131e2b3.0",
54
- "@friggframework/test": "2.0.0--canary.726.131e2b3.0",
52
+ "@friggframework/eslint-config": "2.0.0--canary.726.7cf570c.0",
53
+ "@friggframework/prettier-config": "2.0.0--canary.726.7cf570c.0",
54
+ "@friggframework/test": "2.0.0--canary.726.7cf570c.0",
55
55
  "@prisma/client": "^6.19.3",
56
56
  "@types/lodash": "4.17.15",
57
57
  "@typescript-eslint/eslint-plugin": "^8.0.0",
@@ -92,5 +92,5 @@
92
92
  "publishConfig": {
93
93
  "access": "public"
94
94
  },
95
- "gitHead": "131e2b30f186de52170e32a5fa6948e568445593"
95
+ "gitHead": "7cf570c96f3f5d55fe75cea7df59f9ea8c489276"
96
96
  }