@friggframework/core 2.0.0--canary.517.06fe141.0 → 2.0.0--canary.517.b384239.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.
@@ -55,44 +55,43 @@ function createIntegrationCommands({ integrationClass } = {}) {
55
55
  // Always use Frigg's default repositories and use cases
56
56
  const integrationRepository = createIntegrationRepository();
57
57
 
58
- // Class-agnostic read commands. Available without an integrationClass so
59
- // callers that operate across integration types (e.g. admin scripts) can
58
+ // Class-agnostic read commands. Available with or without an integrationClass
59
+ // so callers that operate across integration types (e.g. admin scripts) can
60
60
  // look up integrations by id or list them by type/status.
61
- const readCommands = {
62
- /**
63
- * Find a single integration record by id.
64
- * @param {string} integrationId
65
- * @returns {Promise<Object>} Integration record, or an error object.
66
- */
67
- async findIntegrationById(integrationId) {
68
- try {
69
- return await integrationRepository.findIntegrationById(
70
- integrationId
71
- );
72
- } catch (error) {
73
- return mapErrorToResponse(error);
74
- }
75
- },
76
61
 
77
- /**
78
- * List integrations, optionally filtered by config type and/or status.
79
- * @param {Object} [filter={}]
80
- * @param {string} [filter.type] - Integration type (config.type)
81
- * @param {string} [filter.status] - Integration status
82
- * @returns {Promise<Array|Object>} Array of integrations, or an error object.
83
- */
84
- async listIntegrations(filter = {}) {
85
- try {
86
- return await integrationRepository.findIntegrations(filter);
87
- } catch (error) {
88
- return mapErrorToResponse(error);
89
- }
90
- },
91
- };
62
+ /**
63
+ * Find a single integration record by id.
64
+ * @param {string} integrationId
65
+ * @returns {Promise<Object>} Integration record, or an error object.
66
+ */
67
+ async function findIntegrationById(integrationId) {
68
+ try {
69
+ return await integrationRepository.findIntegrationById(
70
+ integrationId
71
+ );
72
+ } catch (error) {
73
+ return mapErrorToResponse(error);
74
+ }
75
+ }
76
+
77
+ /**
78
+ * List integrations, optionally filtered by config type and/or status.
79
+ * @param {Object} [filter={}]
80
+ * @param {string} [filter.type] - Integration type (config.type)
81
+ * @param {string} [filter.status] - Integration status
82
+ * @returns {Promise<Array|Object>} Array of integrations, or an error object.
83
+ */
84
+ async function listIntegrations(filter = {}) {
85
+ try {
86
+ return await integrationRepository.findIntegrations(filter);
87
+ } catch (error) {
88
+ return mapErrorToResponse(error);
89
+ }
90
+ }
92
91
 
93
92
  // The remaining commands hydrate/modify integrations for a specific class.
94
93
  if (!integrationClass) {
95
- return readCommands;
94
+ return { findIntegrationById, listIntegrations };
96
95
  }
97
96
 
98
97
  const moduleRepository = createModuleRepository();
@@ -153,7 +152,8 @@ function createIntegrationCommands({ integrationClass } = {}) {
153
152
  });
154
153
 
155
154
  return {
156
- ...readCommands,
155
+ findIntegrationById,
156
+ listIntegrations,
157
157
 
158
158
  /**
159
159
  * Find integration context by external entity ID and type
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.517.06fe141.0",
4
+ "version": "2.0.0--canary.517.b384239.0",
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--canary.517.06fe141.0",
42
- "@friggframework/prettier-config": "2.0.0--canary.517.06fe141.0",
43
- "@friggframework/test": "2.0.0--canary.517.06fe141.0",
41
+ "@friggframework/eslint-config": "2.0.0--canary.517.b384239.0",
42
+ "@friggframework/prettier-config": "2.0.0--canary.517.b384239.0",
43
+ "@friggframework/test": "2.0.0--canary.517.b384239.0",
44
44
  "@prisma/client": "^6.19.3",
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": "06fe14103a72028ce7bf622631580fb24a4abaaf"
83
+ "gitHead": "b384239f327baa975cb82c0f63888e67f40160c3"
84
84
  }