diff --git a/packages/pieces/community/aws-bedrock/.eslintrc.json b/packages/pieces/community/aws-bedrock/.eslintrc.json new file mode 100644 index 00000000000..4a4e695c547 --- /dev/null +++ b/packages/pieces/community/aws-bedrock/.eslintrc.json @@ -0,0 +1,33 @@ +{ + "extends": [ + "../../../../.eslintrc.base.json" + ], + "ignorePatterns": [ + "!**/*" + ], + "overrides": [ + { + "files": [ + "*.ts", + "*.tsx", + "*.js", + "*.jsx" + ], + "rules": {} + }, + { + "files": [ + "*.ts", + "*.tsx" + ], + "rules": {} + }, + { + "files": [ + "*.js", + "*.jsx" + ], + "rules": {} + } + ] +} \ No newline at end of file diff --git a/packages/pieces/community/aws-bedrock/README.md b/packages/pieces/community/aws-bedrock/README.md new file mode 100644 index 00000000000..12f3b289619 --- /dev/null +++ b/packages/pieces/community/aws-bedrock/README.md @@ -0,0 +1,7 @@ +# pieces-aws-bedrock + +This library was generated with [Nx](https://nx.dev). + +## Building + +Run `nx build pieces-aws-bedrock` to build the library. diff --git a/packages/pieces/community/aws-bedrock/bun.lock b/packages/pieces/community/aws-bedrock/bun.lock new file mode 100644 index 00000000000..075907b16c2 --- /dev/null +++ b/packages/pieces/community/aws-bedrock/bun.lock @@ -0,0 +1,216 @@ +{ + "lockfileVersion": 1, + "workspaces": { + "": { + "name": "@activepieces/piece-aws-bedrock", + "dependencies": { + "@aws-sdk/client-bedrock": "^3.987.0", + "@aws-sdk/client-bedrock-runtime": "^3.987.0", + "tslib": "^2.3.0", + }, + }, + }, + "packages": { + "@aws-crypto/crc32": ["@aws-crypto/crc32@5.2.0", "", { "dependencies": { "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "tslib": "^2.6.2" } }, "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg=="], + + "@aws-crypto/sha256-browser": ["@aws-crypto/sha256-browser@5.2.0", "", { "dependencies": { "@aws-crypto/sha256-js": "^5.2.0", "@aws-crypto/supports-web-crypto": "^5.2.0", "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "@aws-sdk/util-locate-window": "^3.0.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.6.2" } }, "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw=="], + + "@aws-crypto/sha256-js": ["@aws-crypto/sha256-js@5.2.0", "", { "dependencies": { "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "tslib": "^2.6.2" } }, "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA=="], + + "@aws-crypto/supports-web-crypto": ["@aws-crypto/supports-web-crypto@5.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg=="], + + "@aws-crypto/util": ["@aws-crypto/util@5.2.0", "", { "dependencies": { "@aws-sdk/types": "^3.222.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.6.2" } }, "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ=="], + + "@aws-sdk/client-bedrock": ["@aws-sdk/client-bedrock@3.987.0", "", { "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "^3.973.7", "@aws-sdk/credential-provider-node": "^3.972.6", "@aws-sdk/middleware-host-header": "^3.972.3", "@aws-sdk/middleware-logger": "^3.972.3", "@aws-sdk/middleware-recursion-detection": "^3.972.3", "@aws-sdk/middleware-user-agent": "^3.972.7", "@aws-sdk/region-config-resolver": "^3.972.3", "@aws-sdk/token-providers": "3.987.0", "@aws-sdk/types": "^3.973.1", "@aws-sdk/util-endpoints": "3.987.0", "@aws-sdk/util-user-agent-browser": "^3.972.3", "@aws-sdk/util-user-agent-node": "^3.972.5", "@smithy/config-resolver": "^4.4.6", "@smithy/core": "^3.22.1", "@smithy/fetch-http-handler": "^5.3.9", "@smithy/hash-node": "^4.2.8", "@smithy/invalid-dependency": "^4.2.8", "@smithy/middleware-content-length": "^4.2.8", "@smithy/middleware-endpoint": "^4.4.13", "@smithy/middleware-retry": "^4.4.30", "@smithy/middleware-serde": "^4.2.9", "@smithy/middleware-stack": "^4.2.8", "@smithy/node-config-provider": "^4.3.8", "@smithy/node-http-handler": "^4.4.9", "@smithy/protocol-http": "^5.3.8", "@smithy/smithy-client": "^4.11.2", "@smithy/types": "^4.12.0", "@smithy/url-parser": "^4.2.8", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", "@smithy/util-defaults-mode-browser": "^4.3.29", "@smithy/util-defaults-mode-node": "^4.2.32", "@smithy/util-endpoints": "^3.2.8", "@smithy/util-middleware": "^4.2.8", "@smithy/util-retry": "^4.2.8", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-bNMP9eWxTCaV1ocGbpdy0hfPEvWascHSzEEHeJt28y85Pnad4sHET6fqFxCaZK0sgKQ6S0LfmQB8HcyGqEfvYA=="], + + "@aws-sdk/client-bedrock-runtime": ["@aws-sdk/client-bedrock-runtime@3.987.0", "", { "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "^3.973.7", "@aws-sdk/credential-provider-node": "^3.972.6", "@aws-sdk/eventstream-handler-node": "^3.972.5", "@aws-sdk/middleware-eventstream": "^3.972.3", "@aws-sdk/middleware-host-header": "^3.972.3", "@aws-sdk/middleware-logger": "^3.972.3", "@aws-sdk/middleware-recursion-detection": "^3.972.3", "@aws-sdk/middleware-user-agent": "^3.972.7", "@aws-sdk/middleware-websocket": "^3.972.6", "@aws-sdk/region-config-resolver": "^3.972.3", "@aws-sdk/token-providers": "3.987.0", "@aws-sdk/types": "^3.973.1", "@aws-sdk/util-endpoints": "3.987.0", "@aws-sdk/util-user-agent-browser": "^3.972.3", "@aws-sdk/util-user-agent-node": "^3.972.5", "@smithy/config-resolver": "^4.4.6", "@smithy/core": "^3.22.1", "@smithy/eventstream-serde-browser": "^4.2.8", "@smithy/eventstream-serde-config-resolver": "^4.3.8", "@smithy/eventstream-serde-node": "^4.2.8", "@smithy/fetch-http-handler": "^5.3.9", "@smithy/hash-node": "^4.2.8", "@smithy/invalid-dependency": "^4.2.8", "@smithy/middleware-content-length": "^4.2.8", "@smithy/middleware-endpoint": "^4.4.13", "@smithy/middleware-retry": "^4.4.30", "@smithy/middleware-serde": "^4.2.9", "@smithy/middleware-stack": "^4.2.8", "@smithy/node-config-provider": "^4.3.8", "@smithy/node-http-handler": "^4.4.9", "@smithy/protocol-http": "^5.3.8", "@smithy/smithy-client": "^4.11.2", "@smithy/types": "^4.12.0", "@smithy/url-parser": "^4.2.8", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", "@smithy/util-defaults-mode-browser": "^4.3.29", "@smithy/util-defaults-mode-node": "^4.2.32", "@smithy/util-endpoints": "^3.2.8", "@smithy/util-middleware": "^4.2.8", "@smithy/util-retry": "^4.2.8", "@smithy/util-stream": "^4.5.11", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-eUy4k+qnKRRWNlLxsJ7j0PvZvqcT+oiqP0zeKCW3Adorw+dONCd7jFX0uw7SLTx8LUUkZTOeMlW3qbIOUV4kiw=="], + + "@aws-sdk/client-sso": ["@aws-sdk/client-sso@3.985.0", "", { "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "^3.973.7", "@aws-sdk/middleware-host-header": "^3.972.3", "@aws-sdk/middleware-logger": "^3.972.3", "@aws-sdk/middleware-recursion-detection": "^3.972.3", "@aws-sdk/middleware-user-agent": "^3.972.7", "@aws-sdk/region-config-resolver": "^3.972.3", "@aws-sdk/types": "^3.973.1", "@aws-sdk/util-endpoints": "3.985.0", "@aws-sdk/util-user-agent-browser": "^3.972.3", "@aws-sdk/util-user-agent-node": "^3.972.5", "@smithy/config-resolver": "^4.4.6", "@smithy/core": "^3.22.1", "@smithy/fetch-http-handler": "^5.3.9", "@smithy/hash-node": "^4.2.8", "@smithy/invalid-dependency": "^4.2.8", "@smithy/middleware-content-length": "^4.2.8", "@smithy/middleware-endpoint": "^4.4.13", "@smithy/middleware-retry": "^4.4.30", "@smithy/middleware-serde": "^4.2.9", "@smithy/middleware-stack": "^4.2.8", "@smithy/node-config-provider": "^4.3.8", "@smithy/node-http-handler": "^4.4.9", "@smithy/protocol-http": "^5.3.8", "@smithy/smithy-client": "^4.11.2", "@smithy/types": "^4.12.0", "@smithy/url-parser": "^4.2.8", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", "@smithy/util-defaults-mode-browser": "^4.3.29", "@smithy/util-defaults-mode-node": "^4.2.32", "@smithy/util-endpoints": "^3.2.8", "@smithy/util-middleware": "^4.2.8", "@smithy/util-retry": "^4.2.8", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-81J8iE8MuXhdbMfIz4sWFj64Pe41bFi/uqqmqOC5SlGv+kwoyLsyKS/rH2tW2t5buih4vTUxskRjxlqikTD4oQ=="], + + "@aws-sdk/core": ["@aws-sdk/core@3.973.7", "", { "dependencies": { "@aws-sdk/types": "^3.973.1", "@aws-sdk/xml-builder": "^3.972.4", "@smithy/core": "^3.22.1", "@smithy/node-config-provider": "^4.3.8", "@smithy/property-provider": "^4.2.8", "@smithy/protocol-http": "^5.3.8", "@smithy/signature-v4": "^5.3.8", "@smithy/smithy-client": "^4.11.2", "@smithy/types": "^4.12.0", "@smithy/util-base64": "^4.3.0", "@smithy/util-middleware": "^4.2.8", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-wNZZQQNlJ+hzD49cKdo+PY6rsTDElO8yDImnrI69p2PLBa7QomeUKAJWYp9xnaR38nlHqWhMHZuYLCQ3oSX+xg=="], + + "@aws-sdk/credential-provider-env": ["@aws-sdk/credential-provider-env@3.972.5", "", { "dependencies": { "@aws-sdk/core": "^3.973.7", "@aws-sdk/types": "^3.973.1", "@smithy/property-provider": "^4.2.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-LxJ9PEO4gKPXzkufvIESUysykPIdrV7+Ocb9yAhbhJLE4TiAYqbCVUE+VuKP1leGR1bBfjWjYgSV5MxprlX3mQ=="], + + "@aws-sdk/credential-provider-http": ["@aws-sdk/credential-provider-http@3.972.7", "", { "dependencies": { "@aws-sdk/core": "^3.973.7", "@aws-sdk/types": "^3.973.1", "@smithy/fetch-http-handler": "^5.3.9", "@smithy/node-http-handler": "^4.4.9", "@smithy/property-provider": "^4.2.8", "@smithy/protocol-http": "^5.3.8", "@smithy/smithy-client": "^4.11.2", "@smithy/types": "^4.12.0", "@smithy/util-stream": "^4.5.11", "tslib": "^2.6.2" } }, "sha512-L2uOGtvp2x3bTcxFTpSM+GkwFIPd8pHfGWO1764icMbo7e5xJh0nfhx1UwkXLnwvocTNEf8A7jISZLYjUSNaTg=="], + + "@aws-sdk/credential-provider-ini": ["@aws-sdk/credential-provider-ini@3.972.5", "", { "dependencies": { "@aws-sdk/core": "^3.973.7", "@aws-sdk/credential-provider-env": "^3.972.5", "@aws-sdk/credential-provider-http": "^3.972.7", "@aws-sdk/credential-provider-login": "^3.972.5", "@aws-sdk/credential-provider-process": "^3.972.5", "@aws-sdk/credential-provider-sso": "^3.972.5", "@aws-sdk/credential-provider-web-identity": "^3.972.5", "@aws-sdk/nested-clients": "3.985.0", "@aws-sdk/types": "^3.973.1", "@smithy/credential-provider-imds": "^4.2.8", "@smithy/property-provider": "^4.2.8", "@smithy/shared-ini-file-loader": "^4.4.3", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-SdDTYE6jkARzOeL7+kudMIM4DaFnP5dZVeatzw849k4bSXDdErDS188bgeNzc/RA2WGrlEpsqHUKP6G7sVXhZg=="], + + "@aws-sdk/credential-provider-login": ["@aws-sdk/credential-provider-login@3.972.5", "", { "dependencies": { "@aws-sdk/core": "^3.973.7", "@aws-sdk/nested-clients": "3.985.0", "@aws-sdk/types": "^3.973.1", "@smithy/property-provider": "^4.2.8", "@smithy/protocol-http": "^5.3.8", "@smithy/shared-ini-file-loader": "^4.4.3", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-uYq1ILyTSI6ZDCMY5+vUsRM0SOCVI7kaW4wBrehVVkhAxC6y+e9rvGtnoZqCOWL1gKjTMouvsf4Ilhc5NCg1Aw=="], + + "@aws-sdk/credential-provider-node": ["@aws-sdk/credential-provider-node@3.972.6", "", { "dependencies": { "@aws-sdk/credential-provider-env": "^3.972.5", "@aws-sdk/credential-provider-http": "^3.972.7", "@aws-sdk/credential-provider-ini": "^3.972.5", "@aws-sdk/credential-provider-process": "^3.972.5", "@aws-sdk/credential-provider-sso": "^3.972.5", "@aws-sdk/credential-provider-web-identity": "^3.972.5", "@aws-sdk/types": "^3.973.1", "@smithy/credential-provider-imds": "^4.2.8", "@smithy/property-provider": "^4.2.8", "@smithy/shared-ini-file-loader": "^4.4.3", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-DZ3CnAAtSVtVz+G+ogqecaErMLgzph4JH5nYbHoBMgBkwTUV+SUcjsjOJwdBJTHu3Dm6l5LBYekZoU2nDqQk2A=="], + + "@aws-sdk/credential-provider-process": ["@aws-sdk/credential-provider-process@3.972.5", "", { "dependencies": { "@aws-sdk/core": "^3.973.7", "@aws-sdk/types": "^3.973.1", "@smithy/property-provider": "^4.2.8", "@smithy/shared-ini-file-loader": "^4.4.3", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-HDKF3mVbLnuqGg6dMnzBf1VUOywE12/N286msI9YaK9mEIzdsGCtLTvrDhe3Up0R9/hGFbB+9l21/TwF5L1C6g=="], + + "@aws-sdk/credential-provider-sso": ["@aws-sdk/credential-provider-sso@3.972.5", "", { "dependencies": { "@aws-sdk/client-sso": "3.985.0", "@aws-sdk/core": "^3.973.7", "@aws-sdk/token-providers": "3.985.0", "@aws-sdk/types": "^3.973.1", "@smithy/property-provider": "^4.2.8", "@smithy/shared-ini-file-loader": "^4.4.3", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-8urj3AoeNeQisjMmMBhFeiY2gxt6/7wQQbEGun0YV/OaOOiXrIudTIEYF8ZfD+NQI6X1FY5AkRsx6O/CaGiybA=="], + + "@aws-sdk/credential-provider-web-identity": ["@aws-sdk/credential-provider-web-identity@3.972.5", "", { "dependencies": { "@aws-sdk/core": "^3.973.7", "@aws-sdk/nested-clients": "3.985.0", "@aws-sdk/types": "^3.973.1", "@smithy/property-provider": "^4.2.8", "@smithy/shared-ini-file-loader": "^4.4.3", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-OK3cULuJl6c+RcDZfPpaK5o3deTOnKZbxm7pzhFNGA3fI2hF9yDih17fGRazJzGGWaDVlR9ejZrpDef4DJCEsw=="], + + "@aws-sdk/eventstream-handler-node": ["@aws-sdk/eventstream-handler-node@3.972.5", "", { "dependencies": { "@aws-sdk/types": "^3.973.1", "@smithy/eventstream-codec": "^4.2.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-xEmd3dnyn83K6t4AJxBJA63wpEoCD45ERFG0XMTViD2E/Ohls9TLxjOWPb1PAxR9/46cKy/TImez1GoqP6xVNQ=="], + + "@aws-sdk/middleware-eventstream": ["@aws-sdk/middleware-eventstream@3.972.3", "", { "dependencies": { "@aws-sdk/types": "^3.973.1", "@smithy/protocol-http": "^5.3.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-pbvZ6Ye/Ks6BAZPa3RhsNjHrvxU9li25PMhSdDpbX0jzdpKpAkIR65gXSNKmA/REnSdEMWSD4vKUW+5eMFzB6w=="], + + "@aws-sdk/middleware-host-header": ["@aws-sdk/middleware-host-header@3.972.3", "", { "dependencies": { "@aws-sdk/types": "^3.973.1", "@smithy/protocol-http": "^5.3.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-aknPTb2M+G3s+0qLCx4Li/qGZH8IIYjugHMv15JTYMe6mgZO8VBpYgeGYsNMGCqCZOcWzuf900jFBG5bopfzmA=="], + + "@aws-sdk/middleware-logger": ["@aws-sdk/middleware-logger@3.972.3", "", { "dependencies": { "@aws-sdk/types": "^3.973.1", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-Ftg09xNNRqaz9QNzlfdQWfpqMCJbsQdnZVJP55jfhbKi1+FTWxGuvfPoBhDHIovqWKjqbuiew3HuhxbJ0+OjgA=="], + + "@aws-sdk/middleware-recursion-detection": ["@aws-sdk/middleware-recursion-detection@3.972.3", "", { "dependencies": { "@aws-sdk/types": "^3.973.1", "@aws/lambda-invoke-store": "^0.2.2", "@smithy/protocol-http": "^5.3.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-PY57QhzNuXHnwbJgbWYTrqIDHYSeOlhfYERTAuc16LKZpTZRJUjzBFokp9hF7u1fuGeE3D70ERXzdbMBOqQz7Q=="], + + "@aws-sdk/middleware-user-agent": ["@aws-sdk/middleware-user-agent@3.972.7", "", { "dependencies": { "@aws-sdk/core": "^3.973.7", "@aws-sdk/types": "^3.973.1", "@aws-sdk/util-endpoints": "3.985.0", "@smithy/core": "^3.22.1", "@smithy/protocol-http": "^5.3.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-HUD+geASjXSCyL/DHPQc/Ua7JhldTcIglVAoCV8kiVm99IaFSlAbTvEnyhZwdE6bdFyTL+uIaWLaCFSRsglZBQ=="], + + "@aws-sdk/middleware-websocket": ["@aws-sdk/middleware-websocket@3.972.6", "", { "dependencies": { "@aws-sdk/types": "^3.973.1", "@aws-sdk/util-format-url": "^3.972.3", "@smithy/eventstream-codec": "^4.2.8", "@smithy/eventstream-serde-browser": "^4.2.8", "@smithy/fetch-http-handler": "^5.3.9", "@smithy/protocol-http": "^5.3.8", "@smithy/signature-v4": "^5.3.8", "@smithy/types": "^4.12.0", "@smithy/util-base64": "^4.3.0", "@smithy/util-hex-encoding": "^4.2.0", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-1DedO6N3m8zQ/vG6twNiHtsdwBgk773VdavLEbB3NXeKZDlzSK1BTviqWwvJdKx5UnIy4kGGP6WWpCEFEt/bhQ=="], + + "@aws-sdk/nested-clients": ["@aws-sdk/nested-clients@3.987.0", "", { "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "^3.973.7", "@aws-sdk/middleware-host-header": "^3.972.3", "@aws-sdk/middleware-logger": "^3.972.3", "@aws-sdk/middleware-recursion-detection": "^3.972.3", "@aws-sdk/middleware-user-agent": "^3.972.7", "@aws-sdk/region-config-resolver": "^3.972.3", "@aws-sdk/types": "^3.973.1", "@aws-sdk/util-endpoints": "3.987.0", "@aws-sdk/util-user-agent-browser": "^3.972.3", "@aws-sdk/util-user-agent-node": "^3.972.5", "@smithy/config-resolver": "^4.4.6", "@smithy/core": "^3.22.1", "@smithy/fetch-http-handler": "^5.3.9", "@smithy/hash-node": "^4.2.8", "@smithy/invalid-dependency": "^4.2.8", "@smithy/middleware-content-length": "^4.2.8", "@smithy/middleware-endpoint": "^4.4.13", "@smithy/middleware-retry": "^4.4.30", "@smithy/middleware-serde": "^4.2.9", "@smithy/middleware-stack": "^4.2.8", "@smithy/node-config-provider": "^4.3.8", "@smithy/node-http-handler": "^4.4.9", "@smithy/protocol-http": "^5.3.8", "@smithy/smithy-client": "^4.11.2", "@smithy/types": "^4.12.0", "@smithy/url-parser": "^4.2.8", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", "@smithy/util-defaults-mode-browser": "^4.3.29", "@smithy/util-defaults-mode-node": "^4.2.32", "@smithy/util-endpoints": "^3.2.8", "@smithy/util-middleware": "^4.2.8", "@smithy/util-retry": "^4.2.8", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-tfoAZyZfrxAL1Gd6xl6S1Nq7mysBgJPnJIIwT6o4J624UaFVtZ5/7XQa7aj87Yjrje1c1c8Ve2kheUG+GRwK4w=="], + + "@aws-sdk/region-config-resolver": ["@aws-sdk/region-config-resolver@3.972.3", "", { "dependencies": { "@aws-sdk/types": "^3.973.1", "@smithy/config-resolver": "^4.4.6", "@smithy/node-config-provider": "^4.3.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-v4J8qYAWfOMcZ4MJUyatntOicTzEMaU7j3OpkRCGGFSL2NgXQ5VbxauIyORA+pxdKZ0qQG2tCQjQjZDlXEC3Ow=="], + + "@aws-sdk/token-providers": ["@aws-sdk/token-providers@3.987.0", "", { "dependencies": { "@aws-sdk/core": "^3.973.7", "@aws-sdk/nested-clients": "3.987.0", "@aws-sdk/types": "^3.973.1", "@smithy/property-provider": "^4.2.8", "@smithy/shared-ini-file-loader": "^4.4.3", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-vXdEugarrMwgFnxbUskcWYPZH7Gp+bPsFsMPY9NBqbaecrOxVK/ccmGvmxrQFeW3BwUMIGeHQPTVIivQkFRgqQ=="], + + "@aws-sdk/types": ["@aws-sdk/types@3.973.1", "", { "dependencies": { "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-DwHBiMNOB468JiX6+i34c+THsKHErYUdNQ3HexeXZvVn4zouLjgaS4FejiGSi2HyBuzuyHg7SuOPmjSvoU9NRg=="], + + "@aws-sdk/util-endpoints": ["@aws-sdk/util-endpoints@3.987.0", "", { "dependencies": { "@aws-sdk/types": "^3.973.1", "@smithy/types": "^4.12.0", "@smithy/url-parser": "^4.2.8", "@smithy/util-endpoints": "^3.2.8", "tslib": "^2.6.2" } }, "sha512-rZnZwDq7Pn+TnL0nyS6ryAhpqTZtLtHbJaqfxuHlDX3v/bq0M7Ch/V3qF9dZWaGgsJ2H9xn7/vFOxlnL4fBMcQ=="], + + "@aws-sdk/util-format-url": ["@aws-sdk/util-format-url@3.972.3", "", { "dependencies": { "@aws-sdk/types": "^3.973.1", "@smithy/querystring-builder": "^4.2.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-n7F2ycckcKFXa01vAsT/SJdjFHfKH9s96QHcs5gn8AaaigASICeME8WdUL9uBp8XV/OVwEt8+6gzn6KFUgQa8g=="], + + "@aws-sdk/util-locate-window": ["@aws-sdk/util-locate-window@3.965.4", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-H1onv5SkgPBK2P6JR2MjGgbOnttoNzSPIRoeZTNPZYyaplwGg50zS3amXvXqF0/qfXpWEC9rLWU564QTB9bSog=="], + + "@aws-sdk/util-user-agent-browser": ["@aws-sdk/util-user-agent-browser@3.972.3", "", { "dependencies": { "@aws-sdk/types": "^3.973.1", "@smithy/types": "^4.12.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-JurOwkRUcXD/5MTDBcqdyQ9eVedtAsZgw5rBwktsPTN7QtPiS2Ld1jkJepNgYoCufz1Wcut9iup7GJDoIHp8Fw=="], + + "@aws-sdk/util-user-agent-node": ["@aws-sdk/util-user-agent-node@3.972.5", "", { "dependencies": { "@aws-sdk/middleware-user-agent": "^3.972.7", "@aws-sdk/types": "^3.973.1", "@smithy/node-config-provider": "^4.3.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "peerDependencies": { "aws-crt": ">=1.0.0" }, "optionalPeers": ["aws-crt"] }, "sha512-GsUDF+rXyxDZkkJxUsDxnA67FG+kc5W1dnloCFLl6fWzceevsCYzJpASBzT+BPjwUgREE6FngfJYYYMQUY5fZQ=="], + + "@aws-sdk/xml-builder": ["@aws-sdk/xml-builder@3.972.4", "", { "dependencies": { "@smithy/types": "^4.12.0", "fast-xml-parser": "5.3.4", "tslib": "^2.6.2" } }, "sha512-0zJ05ANfYqI6+rGqj8samZBFod0dPPousBjLEqg8WdxSgbMAkRgLyn81lP215Do0rFJ/17LIXwr7q0yK24mP6Q=="], + + "@aws/lambda-invoke-store": ["@aws/lambda-invoke-store@0.2.3", "", {}, "sha512-oLvsaPMTBejkkmHhjf09xTgk71mOqyr/409NKhRIL08If7AhVfUsJhVsx386uJaqNd42v9kWamQ9lFbkoC2dYw=="], + + "@smithy/abort-controller": ["@smithy/abort-controller@4.2.8", "", { "dependencies": { "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-peuVfkYHAmS5ybKxWcfraK7WBBP0J+rkfUcbHJJKQ4ir3UAUNQI+Y4Vt/PqSzGqgloJ5O1dk7+WzNL8wcCSXbw=="], + + "@smithy/config-resolver": ["@smithy/config-resolver@4.4.6", "", { "dependencies": { "@smithy/node-config-provider": "^4.3.8", "@smithy/types": "^4.12.0", "@smithy/util-config-provider": "^4.2.0", "@smithy/util-endpoints": "^3.2.8", "@smithy/util-middleware": "^4.2.8", "tslib": "^2.6.2" } }, "sha512-qJpzYC64kaj3S0fueiu3kXm8xPrR3PcXDPEgnaNMRn0EjNSZFoFjvbUp0YUDsRhN1CB90EnHJtbxWKevnH99UQ=="], + + "@smithy/core": ["@smithy/core@3.23.0", "", { "dependencies": { "@smithy/middleware-serde": "^4.2.9", "@smithy/protocol-http": "^5.3.8", "@smithy/types": "^4.12.0", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-middleware": "^4.2.8", "@smithy/util-stream": "^4.5.12", "@smithy/util-utf8": "^4.2.0", "@smithy/uuid": "^1.1.0", "tslib": "^2.6.2" } }, "sha512-Yq4UPVoQICM9zHnByLmG8632t2M0+yap4T7ANVw482J0W7HW0pOuxwVmeOwzJqX2Q89fkXz0Vybz55Wj2Xzrsg=="], + + "@smithy/credential-provider-imds": ["@smithy/credential-provider-imds@4.2.8", "", { "dependencies": { "@smithy/node-config-provider": "^4.3.8", "@smithy/property-provider": "^4.2.8", "@smithy/types": "^4.12.0", "@smithy/url-parser": "^4.2.8", "tslib": "^2.6.2" } }, "sha512-FNT0xHS1c/CPN8upqbMFP83+ul5YgdisfCfkZ86Jh2NSmnqw/AJ6x5pEogVCTVvSm7j9MopRU89bmDelxuDMYw=="], + + "@smithy/eventstream-codec": ["@smithy/eventstream-codec@4.2.8", "", { "dependencies": { "@aws-crypto/crc32": "5.2.0", "@smithy/types": "^4.12.0", "@smithy/util-hex-encoding": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-jS/O5Q14UsufqoGhov7dHLOPCzkYJl9QDzusI2Psh4wyYx/izhzvX9P4D69aTxcdfVhEPhjK+wYyn/PzLjKbbw=="], + + "@smithy/eventstream-serde-browser": ["@smithy/eventstream-serde-browser@4.2.8", "", { "dependencies": { "@smithy/eventstream-serde-universal": "^4.2.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-MTfQT/CRQz5g24ayXdjg53V0mhucZth4PESoA5IhvaWVDTOQLfo8qI9vzqHcPsdd2v6sqfTYqF5L/l+pea5Uyw=="], + + "@smithy/eventstream-serde-config-resolver": ["@smithy/eventstream-serde-config-resolver@4.3.8", "", { "dependencies": { "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-ah12+luBiDGzBruhu3efNy1IlbwSEdNiw8fOZksoKoWW1ZHvO/04MQsdnws/9Aj+5b0YXSSN2JXKy/ClIsW8MQ=="], + + "@smithy/eventstream-serde-node": ["@smithy/eventstream-serde-node@4.2.8", "", { "dependencies": { "@smithy/eventstream-serde-universal": "^4.2.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-cYpCpp29z6EJHa5T9WL0KAlq3SOKUQkcgSoeRfRVwjGgSFl7Uh32eYGt7IDYCX20skiEdRffyDpvF2efEZPC0A=="], + + "@smithy/eventstream-serde-universal": ["@smithy/eventstream-serde-universal@4.2.8", "", { "dependencies": { "@smithy/eventstream-codec": "^4.2.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-iJ6YNJd0bntJYnX6s52NC4WFYcZeKrPUr1Kmmr5AwZcwCSzVpS7oavAmxMR7pMq7V+D1G4s9F5NJK0xwOsKAlQ=="], + + "@smithy/fetch-http-handler": ["@smithy/fetch-http-handler@5.3.9", "", { "dependencies": { "@smithy/protocol-http": "^5.3.8", "@smithy/querystring-builder": "^4.2.8", "@smithy/types": "^4.12.0", "@smithy/util-base64": "^4.3.0", "tslib": "^2.6.2" } }, "sha512-I4UhmcTYXBrct03rwzQX1Y/iqQlzVQaPxWjCjula++5EmWq9YGBrx6bbGqluGc1f0XEfhSkiY4jhLgbsJUMKRA=="], + + "@smithy/hash-node": ["@smithy/hash-node@4.2.8", "", { "dependencies": { "@smithy/types": "^4.12.0", "@smithy/util-buffer-from": "^4.2.0", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-7ZIlPbmaDGxVoxErDZnuFG18WekhbA/g2/i97wGj+wUBeS6pcUeAym8u4BXh/75RXWhgIJhyC11hBzig6MljwA=="], + + "@smithy/invalid-dependency": ["@smithy/invalid-dependency@4.2.8", "", { "dependencies": { "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-N9iozRybwAQ2dn9Fot9kI6/w9vos2oTXLhtK7ovGqwZjlOcxu6XhPlpLpC+INsxktqHinn5gS2DXDjDF2kG5sQ=="], + + "@smithy/is-array-buffer": ["@smithy/is-array-buffer@4.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-DZZZBvC7sjcYh4MazJSGiWMI2L7E0oCiRHREDzIxi/M2LY79/21iXt6aPLHge82wi5LsuRF5A06Ds3+0mlh6CQ=="], + + "@smithy/middleware-content-length": ["@smithy/middleware-content-length@4.2.8", "", { "dependencies": { "@smithy/protocol-http": "^5.3.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-RO0jeoaYAB1qBRhfVyq0pMgBoUK34YEJxVxyjOWYZiOKOq2yMZ4MnVXMZCUDenpozHue207+9P5ilTV1zeda0A=="], + + "@smithy/middleware-endpoint": ["@smithy/middleware-endpoint@4.4.14", "", { "dependencies": { "@smithy/core": "^3.23.0", "@smithy/middleware-serde": "^4.2.9", "@smithy/node-config-provider": "^4.3.8", "@smithy/shared-ini-file-loader": "^4.4.3", "@smithy/types": "^4.12.0", "@smithy/url-parser": "^4.2.8", "@smithy/util-middleware": "^4.2.8", "tslib": "^2.6.2" } }, "sha512-FUFNE5KVeaY6U/GL0nzAAHkaCHzXLZcY1EhtQnsAqhD8Du13oPKtMB9/0WK4/LK6a/T5OZ24wPoSShff5iI6Ag=="], + + "@smithy/middleware-retry": ["@smithy/middleware-retry@4.4.31", "", { "dependencies": { "@smithy/node-config-provider": "^4.3.8", "@smithy/protocol-http": "^5.3.8", "@smithy/service-error-classification": "^4.2.8", "@smithy/smithy-client": "^4.11.3", "@smithy/types": "^4.12.0", "@smithy/util-middleware": "^4.2.8", "@smithy/util-retry": "^4.2.8", "@smithy/uuid": "^1.1.0", "tslib": "^2.6.2" } }, "sha512-RXBzLpMkIrxBPe4C8OmEOHvS8aH9RUuCOH++Acb5jZDEblxDjyg6un72X9IcbrGTJoiUwmI7hLypNfuDACypbg=="], + + "@smithy/middleware-serde": ["@smithy/middleware-serde@4.2.9", "", { "dependencies": { "@smithy/protocol-http": "^5.3.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-eMNiej0u/snzDvlqRGSN3Vl0ESn3838+nKyVfF2FKNXFbi4SERYT6PR392D39iczngbqqGG0Jl1DlCnp7tBbXQ=="], + + "@smithy/middleware-stack": ["@smithy/middleware-stack@4.2.8", "", { "dependencies": { "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-w6LCfOviTYQjBctOKSwy6A8FIkQy7ICvglrZFl6Bw4FmcQ1Z420fUtIhxaUZZshRe0VCq4kvDiPiXrPZAe8oRA=="], + + "@smithy/node-config-provider": ["@smithy/node-config-provider@4.3.8", "", { "dependencies": { "@smithy/property-provider": "^4.2.8", "@smithy/shared-ini-file-loader": "^4.4.3", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-aFP1ai4lrbVlWjfpAfRSL8KFcnJQYfTl5QxLJXY32vghJrDuFyPZ6LtUL+JEGYiFRG1PfPLHLoxj107ulncLIg=="], + + "@smithy/node-http-handler": ["@smithy/node-http-handler@4.4.10", "", { "dependencies": { "@smithy/abort-controller": "^4.2.8", "@smithy/protocol-http": "^5.3.8", "@smithy/querystring-builder": "^4.2.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-u4YeUwOWRZaHbWaebvrs3UhwQwj+2VNmcVCwXcYTvPIuVyM7Ex1ftAj+fdbG/P4AkBwLq/+SKn+ydOI4ZJE9PA=="], + + "@smithy/property-provider": ["@smithy/property-provider@4.2.8", "", { "dependencies": { "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-EtCTbyIveCKeOXDSWSdze3k612yCPq1YbXsbqX3UHhkOSW8zKsM9NOJG5gTIya0vbY2DIaieG8pKo1rITHYL0w=="], + + "@smithy/protocol-http": ["@smithy/protocol-http@5.3.8", "", { "dependencies": { "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-QNINVDhxpZ5QnP3aviNHQFlRogQZDfYlCkQT+7tJnErPQbDhysondEjhikuANxgMsZrkGeiAxXy4jguEGsDrWQ=="], + + "@smithy/querystring-builder": ["@smithy/querystring-builder@4.2.8", "", { "dependencies": { "@smithy/types": "^4.12.0", "@smithy/util-uri-escape": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-Xr83r31+DrE8CP3MqPgMJl+pQlLLmOfiEUnoyAlGzzJIrEsbKsPy1hqH0qySaQm4oWrCBlUqRt+idEgunKB+iw=="], + + "@smithy/querystring-parser": ["@smithy/querystring-parser@4.2.8", "", { "dependencies": { "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-vUurovluVy50CUlazOiXkPq40KGvGWSdmusa3130MwrR1UNnNgKAlj58wlOe61XSHRpUfIIh6cE0zZ8mzKaDPA=="], + + "@smithy/service-error-classification": ["@smithy/service-error-classification@4.2.8", "", { "dependencies": { "@smithy/types": "^4.12.0" } }, "sha512-mZ5xddodpJhEt3RkCjbmUQuXUOaPNTkbMGR0bcS8FE0bJDLMZlhmpgrvPNCYglVw5rsYTpSnv19womw9WWXKQQ=="], + + "@smithy/shared-ini-file-loader": ["@smithy/shared-ini-file-loader@4.4.3", "", { "dependencies": { "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-DfQjxXQnzC5UbCUPeC3Ie8u+rIWZTvuDPAGU/BxzrOGhRvgUanaP68kDZA+jaT3ZI+djOf+4dERGlm9mWfFDrg=="], + + "@smithy/signature-v4": ["@smithy/signature-v4@5.3.8", "", { "dependencies": { "@smithy/is-array-buffer": "^4.2.0", "@smithy/protocol-http": "^5.3.8", "@smithy/types": "^4.12.0", "@smithy/util-hex-encoding": "^4.2.0", "@smithy/util-middleware": "^4.2.8", "@smithy/util-uri-escape": "^4.2.0", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-6A4vdGj7qKNRF16UIcO8HhHjKW27thsxYci+5r/uVRkdcBEkOEiY8OMPuydLX4QHSrJqGHPJzPRwwVTqbLZJhg=="], + + "@smithy/smithy-client": ["@smithy/smithy-client@4.11.3", "", { "dependencies": { "@smithy/core": "^3.23.0", "@smithy/middleware-endpoint": "^4.4.14", "@smithy/middleware-stack": "^4.2.8", "@smithy/protocol-http": "^5.3.8", "@smithy/types": "^4.12.0", "@smithy/util-stream": "^4.5.12", "tslib": "^2.6.2" } }, "sha512-Q7kY5sDau8OoE6Y9zJoRGgje8P4/UY0WzH8R2ok0PDh+iJ+ZnEKowhjEqYafVcubkbYxQVaqwm3iufktzhprGg=="], + + "@smithy/types": ["@smithy/types@4.12.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-9YcuJVTOBDjg9LWo23Qp0lTQ3D7fQsQtwle0jVfpbUHy9qBwCEgKuVH4FqFB3VYu0nwdHKiEMA+oXz7oV8X1kw=="], + + "@smithy/url-parser": ["@smithy/url-parser@4.2.8", "", { "dependencies": { "@smithy/querystring-parser": "^4.2.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-NQho9U68TGMEU639YkXnVMV3GEFFULmmaWdlu1E9qzyIePOHsoSnagTGSDv1Zi8DCNN6btxOSdgmy5E/hsZwhA=="], + + "@smithy/util-base64": ["@smithy/util-base64@4.3.0", "", { "dependencies": { "@smithy/util-buffer-from": "^4.2.0", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-GkXZ59JfyxsIwNTWFnjmFEI8kZpRNIBfxKjv09+nkAWPt/4aGaEWMM04m4sxgNVWkbt2MdSvE3KF/PfX4nFedQ=="], + + "@smithy/util-body-length-browser": ["@smithy/util-body-length-browser@4.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-Fkoh/I76szMKJnBXWPdFkQJl2r9SjPt3cMzLdOB6eJ4Pnpas8hVoWPYemX/peO0yrrvldgCUVJqOAjUrOLjbxg=="], + + "@smithy/util-body-length-node": ["@smithy/util-body-length-node@4.2.1", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-h53dz/pISVrVrfxV1iqXlx5pRg3V2YWFcSQyPyXZRrZoZj4R4DeWRDo1a7dd3CPTcFi3kE+98tuNyD2axyZReA=="], + + "@smithy/util-buffer-from": ["@smithy/util-buffer-from@4.2.0", "", { "dependencies": { "@smithy/is-array-buffer": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-kAY9hTKulTNevM2nlRtxAG2FQ3B2OR6QIrPY3zE5LqJy1oxzmgBGsHLWTcNhWXKchgA0WHW+mZkQrng/pgcCew=="], + + "@smithy/util-config-provider": ["@smithy/util-config-provider@4.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-YEjpl6XJ36FTKmD+kRJJWYvrHeUvm5ykaUS5xK+6oXffQPHeEM4/nXlZPe+Wu0lsgRUcNZiliYNh/y7q9c2y6Q=="], + + "@smithy/util-defaults-mode-browser": ["@smithy/util-defaults-mode-browser@4.3.30", "", { "dependencies": { "@smithy/property-provider": "^4.2.8", "@smithy/smithy-client": "^4.11.3", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-cMni0uVU27zxOiU8TuC8pQLC1pYeZ/xEMxvchSK/ILwleRd1ugobOcIRr5vXtcRqKd4aBLWlpeBoDPJJ91LQng=="], + + "@smithy/util-defaults-mode-node": ["@smithy/util-defaults-mode-node@4.2.33", "", { "dependencies": { "@smithy/config-resolver": "^4.4.6", "@smithy/credential-provider-imds": "^4.2.8", "@smithy/node-config-provider": "^4.3.8", "@smithy/property-provider": "^4.2.8", "@smithy/smithy-client": "^4.11.3", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-LEb2aq5F4oZUSzWBG7S53d4UytZSkOEJPXcBq/xbG2/TmK9EW5naUZ8lKu1BEyWMzdHIzEVN16M3k8oxDq+DJA=="], + + "@smithy/util-endpoints": ["@smithy/util-endpoints@3.2.8", "", { "dependencies": { "@smithy/node-config-provider": "^4.3.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-8JaVTn3pBDkhZgHQ8R0epwWt+BqPSLCjdjXXusK1onwJlRuN69fbvSK66aIKKO7SwVFM6x2J2ox5X8pOaWcUEw=="], + + "@smithy/util-hex-encoding": ["@smithy/util-hex-encoding@4.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-CCQBwJIvXMLKxVbO88IukazJD9a4kQ9ZN7/UMGBjBcJYvatpWk+9g870El4cB8/EJxfe+k+y0GmR9CAzkF+Nbw=="], + + "@smithy/util-middleware": ["@smithy/util-middleware@4.2.8", "", { "dependencies": { "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-PMqfeJxLcNPMDgvPbbLl/2Vpin+luxqTGPpW3NAQVLbRrFRzTa4rNAASYeIGjRV9Ytuhzny39SpyU04EQreF+A=="], + + "@smithy/util-retry": ["@smithy/util-retry@4.2.8", "", { "dependencies": { "@smithy/service-error-classification": "^4.2.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-CfJqwvoRY0kTGe5AkQokpURNCT1u/MkRzMTASWMPPo2hNSnKtF1D45dQl3DE2LKLr4m+PW9mCeBMJr5mCAVThg=="], + + "@smithy/util-stream": ["@smithy/util-stream@4.5.12", "", { "dependencies": { "@smithy/fetch-http-handler": "^5.3.9", "@smithy/node-http-handler": "^4.4.10", "@smithy/types": "^4.12.0", "@smithy/util-base64": "^4.3.0", "@smithy/util-buffer-from": "^4.2.0", "@smithy/util-hex-encoding": "^4.2.0", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-D8tgkrmhAX/UNeCZbqbEO3uqyghUnEmmoO9YEvRuwxjlkKKUE7FOgCJnqpTlQPe9MApdWPky58mNQQHbnCzoNg=="], + + "@smithy/util-uri-escape": ["@smithy/util-uri-escape@4.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-igZpCKV9+E/Mzrpq6YacdTQ0qTiLm85gD6N/IrmyDvQFA4UnU3d5g3m8tMT/6zG/vVkWSU+VxeUyGonL62DuxA=="], + + "@smithy/util-utf8": ["@smithy/util-utf8@4.2.0", "", { "dependencies": { "@smithy/util-buffer-from": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-zBPfuzoI8xyBtR2P6WQj63Rz8i3AmfAaJLuNG8dWsfvPe8lO4aCPYLn879mEgHndZH1zQ2oXmG8O1GGzzaoZiw=="], + + "@smithy/uuid": ["@smithy/uuid@1.1.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-4aUIteuyxtBUhVdiQqcDhKFitwfd9hqoSDYY2KRXiWtgoWJ9Bmise+KfEPDiVHWeJepvF8xJO9/9+WDIciMFFw=="], + + "bowser": ["bowser@2.14.1", "", {}, "sha512-tzPjzCxygAKWFOJP011oxFHs57HzIhOEracIgAePE4pqB3LikALKnSzUyU4MGs9/iCEUuHlAJTjTc5M+u7YEGg=="], + + "fast-xml-parser": ["fast-xml-parser@5.3.4", "", { "dependencies": { "strnum": "^2.1.0" }, "bin": { "fxparser": "src/cli/cli.js" } }, "sha512-EFd6afGmXlCx8H8WTZHhAoDaWaGyuIBoZJ2mknrNxug+aZKjkp0a0dlars9Izl+jF+7Gu1/5f/2h68cQpe0IiA=="], + + "strnum": ["strnum@2.1.2", "", {}, "sha512-l63NF9y/cLROq/yqKXSLtcMeeyOfnSQlfMSlzFt/K73oIaD8DGaQWd7Z34X9GPiKqP5rbSh84Hl4bOlLcjiSrQ=="], + + "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "@aws-crypto/sha256-browser/@smithy/util-utf8": ["@smithy/util-utf8@2.3.0", "", { "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A=="], + + "@aws-crypto/util/@smithy/util-utf8": ["@smithy/util-utf8@2.3.0", "", { "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A=="], + + "@aws-sdk/client-sso/@aws-sdk/util-endpoints": ["@aws-sdk/util-endpoints@3.985.0", "", { "dependencies": { "@aws-sdk/types": "^3.973.1", "@smithy/types": "^4.12.0", "@smithy/url-parser": "^4.2.8", "@smithy/util-endpoints": "^3.2.8", "tslib": "^2.6.2" } }, "sha512-vth7UfGSUR3ljvaq8V4Rc62FsM7GUTH/myxPWkaEgOrprz1/Pc72EgTXxj+cPPPDAfHFIpjhkB7T7Td0RJx+BA=="], + + "@aws-sdk/credential-provider-ini/@aws-sdk/nested-clients": ["@aws-sdk/nested-clients@3.985.0", "", { "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "^3.973.7", "@aws-sdk/middleware-host-header": "^3.972.3", "@aws-sdk/middleware-logger": "^3.972.3", "@aws-sdk/middleware-recursion-detection": "^3.972.3", "@aws-sdk/middleware-user-agent": "^3.972.7", "@aws-sdk/region-config-resolver": "^3.972.3", "@aws-sdk/types": "^3.973.1", "@aws-sdk/util-endpoints": "3.985.0", "@aws-sdk/util-user-agent-browser": "^3.972.3", "@aws-sdk/util-user-agent-node": "^3.972.5", "@smithy/config-resolver": "^4.4.6", "@smithy/core": "^3.22.1", "@smithy/fetch-http-handler": "^5.3.9", "@smithy/hash-node": "^4.2.8", "@smithy/invalid-dependency": "^4.2.8", "@smithy/middleware-content-length": "^4.2.8", "@smithy/middleware-endpoint": "^4.4.13", "@smithy/middleware-retry": "^4.4.30", "@smithy/middleware-serde": "^4.2.9", "@smithy/middleware-stack": "^4.2.8", "@smithy/node-config-provider": "^4.3.8", "@smithy/node-http-handler": "^4.4.9", "@smithy/protocol-http": "^5.3.8", "@smithy/smithy-client": "^4.11.2", "@smithy/types": "^4.12.0", "@smithy/url-parser": "^4.2.8", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", "@smithy/util-defaults-mode-browser": "^4.3.29", "@smithy/util-defaults-mode-node": "^4.2.32", "@smithy/util-endpoints": "^3.2.8", "@smithy/util-middleware": "^4.2.8", "@smithy/util-retry": "^4.2.8", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-TsWwKzb/2WHafAY0CE7uXgLj0FmnkBTgfioG9HO+7z/zCPcl1+YU+i7dW4o0y+aFxFgxTMG+ExBQpqT/k2ao8g=="], + + "@aws-sdk/credential-provider-login/@aws-sdk/nested-clients": ["@aws-sdk/nested-clients@3.985.0", "", { "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "^3.973.7", "@aws-sdk/middleware-host-header": "^3.972.3", "@aws-sdk/middleware-logger": "^3.972.3", "@aws-sdk/middleware-recursion-detection": "^3.972.3", "@aws-sdk/middleware-user-agent": "^3.972.7", "@aws-sdk/region-config-resolver": "^3.972.3", "@aws-sdk/types": "^3.973.1", "@aws-sdk/util-endpoints": "3.985.0", "@aws-sdk/util-user-agent-browser": "^3.972.3", "@aws-sdk/util-user-agent-node": "^3.972.5", "@smithy/config-resolver": "^4.4.6", "@smithy/core": "^3.22.1", "@smithy/fetch-http-handler": "^5.3.9", "@smithy/hash-node": "^4.2.8", "@smithy/invalid-dependency": "^4.2.8", "@smithy/middleware-content-length": "^4.2.8", "@smithy/middleware-endpoint": "^4.4.13", "@smithy/middleware-retry": "^4.4.30", "@smithy/middleware-serde": "^4.2.9", "@smithy/middleware-stack": "^4.2.8", "@smithy/node-config-provider": "^4.3.8", "@smithy/node-http-handler": "^4.4.9", "@smithy/protocol-http": "^5.3.8", "@smithy/smithy-client": "^4.11.2", "@smithy/types": "^4.12.0", "@smithy/url-parser": "^4.2.8", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", "@smithy/util-defaults-mode-browser": "^4.3.29", "@smithy/util-defaults-mode-node": "^4.2.32", "@smithy/util-endpoints": "^3.2.8", "@smithy/util-middleware": "^4.2.8", "@smithy/util-retry": "^4.2.8", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-TsWwKzb/2WHafAY0CE7uXgLj0FmnkBTgfioG9HO+7z/zCPcl1+YU+i7dW4o0y+aFxFgxTMG+ExBQpqT/k2ao8g=="], + + "@aws-sdk/credential-provider-sso/@aws-sdk/token-providers": ["@aws-sdk/token-providers@3.985.0", "", { "dependencies": { "@aws-sdk/core": "^3.973.7", "@aws-sdk/nested-clients": "3.985.0", "@aws-sdk/types": "^3.973.1", "@smithy/property-provider": "^4.2.8", "@smithy/shared-ini-file-loader": "^4.4.3", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-+hwpHZyEq8k+9JL2PkE60V93v2kNhUIv7STFt+EAez1UJsJOQDhc5LpzEX66pNjclI5OTwBROs/DhJjC/BtMjQ=="], + + "@aws-sdk/credential-provider-web-identity/@aws-sdk/nested-clients": ["@aws-sdk/nested-clients@3.985.0", "", { "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "^3.973.7", "@aws-sdk/middleware-host-header": "^3.972.3", "@aws-sdk/middleware-logger": "^3.972.3", "@aws-sdk/middleware-recursion-detection": "^3.972.3", "@aws-sdk/middleware-user-agent": "^3.972.7", "@aws-sdk/region-config-resolver": "^3.972.3", "@aws-sdk/types": "^3.973.1", "@aws-sdk/util-endpoints": "3.985.0", "@aws-sdk/util-user-agent-browser": "^3.972.3", "@aws-sdk/util-user-agent-node": "^3.972.5", "@smithy/config-resolver": "^4.4.6", "@smithy/core": "^3.22.1", "@smithy/fetch-http-handler": "^5.3.9", "@smithy/hash-node": "^4.2.8", "@smithy/invalid-dependency": "^4.2.8", "@smithy/middleware-content-length": "^4.2.8", "@smithy/middleware-endpoint": "^4.4.13", "@smithy/middleware-retry": "^4.4.30", "@smithy/middleware-serde": "^4.2.9", "@smithy/middleware-stack": "^4.2.8", "@smithy/node-config-provider": "^4.3.8", "@smithy/node-http-handler": "^4.4.9", "@smithy/protocol-http": "^5.3.8", "@smithy/smithy-client": "^4.11.2", "@smithy/types": "^4.12.0", "@smithy/url-parser": "^4.2.8", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", "@smithy/util-defaults-mode-browser": "^4.3.29", "@smithy/util-defaults-mode-node": "^4.2.32", "@smithy/util-endpoints": "^3.2.8", "@smithy/util-middleware": "^4.2.8", "@smithy/util-retry": "^4.2.8", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-TsWwKzb/2WHafAY0CE7uXgLj0FmnkBTgfioG9HO+7z/zCPcl1+YU+i7dW4o0y+aFxFgxTMG+ExBQpqT/k2ao8g=="], + + "@aws-sdk/middleware-user-agent/@aws-sdk/util-endpoints": ["@aws-sdk/util-endpoints@3.985.0", "", { "dependencies": { "@aws-sdk/types": "^3.973.1", "@smithy/types": "^4.12.0", "@smithy/url-parser": "^4.2.8", "@smithy/util-endpoints": "^3.2.8", "tslib": "^2.6.2" } }, "sha512-vth7UfGSUR3ljvaq8V4Rc62FsM7GUTH/myxPWkaEgOrprz1/Pc72EgTXxj+cPPPDAfHFIpjhkB7T7Td0RJx+BA=="], + + "@aws-crypto/sha256-browser/@smithy/util-utf8/@smithy/util-buffer-from": ["@smithy/util-buffer-from@2.2.0", "", { "dependencies": { "@smithy/is-array-buffer": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA=="], + + "@aws-crypto/util/@smithy/util-utf8/@smithy/util-buffer-from": ["@smithy/util-buffer-from@2.2.0", "", { "dependencies": { "@smithy/is-array-buffer": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA=="], + + "@aws-sdk/credential-provider-ini/@aws-sdk/nested-clients/@aws-sdk/util-endpoints": ["@aws-sdk/util-endpoints@3.985.0", "", { "dependencies": { "@aws-sdk/types": "^3.973.1", "@smithy/types": "^4.12.0", "@smithy/url-parser": "^4.2.8", "@smithy/util-endpoints": "^3.2.8", "tslib": "^2.6.2" } }, "sha512-vth7UfGSUR3ljvaq8V4Rc62FsM7GUTH/myxPWkaEgOrprz1/Pc72EgTXxj+cPPPDAfHFIpjhkB7T7Td0RJx+BA=="], + + "@aws-sdk/credential-provider-login/@aws-sdk/nested-clients/@aws-sdk/util-endpoints": ["@aws-sdk/util-endpoints@3.985.0", "", { "dependencies": { "@aws-sdk/types": "^3.973.1", "@smithy/types": "^4.12.0", "@smithy/url-parser": "^4.2.8", "@smithy/util-endpoints": "^3.2.8", "tslib": "^2.6.2" } }, "sha512-vth7UfGSUR3ljvaq8V4Rc62FsM7GUTH/myxPWkaEgOrprz1/Pc72EgTXxj+cPPPDAfHFIpjhkB7T7Td0RJx+BA=="], + + "@aws-sdk/credential-provider-sso/@aws-sdk/token-providers/@aws-sdk/nested-clients": ["@aws-sdk/nested-clients@3.985.0", "", { "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "^3.973.7", "@aws-sdk/middleware-host-header": "^3.972.3", "@aws-sdk/middleware-logger": "^3.972.3", "@aws-sdk/middleware-recursion-detection": "^3.972.3", "@aws-sdk/middleware-user-agent": "^3.972.7", "@aws-sdk/region-config-resolver": "^3.972.3", "@aws-sdk/types": "^3.973.1", "@aws-sdk/util-endpoints": "3.985.0", "@aws-sdk/util-user-agent-browser": "^3.972.3", "@aws-sdk/util-user-agent-node": "^3.972.5", "@smithy/config-resolver": "^4.4.6", "@smithy/core": "^3.22.1", "@smithy/fetch-http-handler": "^5.3.9", "@smithy/hash-node": "^4.2.8", "@smithy/invalid-dependency": "^4.2.8", "@smithy/middleware-content-length": "^4.2.8", "@smithy/middleware-endpoint": "^4.4.13", "@smithy/middleware-retry": "^4.4.30", "@smithy/middleware-serde": "^4.2.9", "@smithy/middleware-stack": "^4.2.8", "@smithy/node-config-provider": "^4.3.8", "@smithy/node-http-handler": "^4.4.9", "@smithy/protocol-http": "^5.3.8", "@smithy/smithy-client": "^4.11.2", "@smithy/types": "^4.12.0", "@smithy/url-parser": "^4.2.8", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", "@smithy/util-defaults-mode-browser": "^4.3.29", "@smithy/util-defaults-mode-node": "^4.2.32", "@smithy/util-endpoints": "^3.2.8", "@smithy/util-middleware": "^4.2.8", "@smithy/util-retry": "^4.2.8", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-TsWwKzb/2WHafAY0CE7uXgLj0FmnkBTgfioG9HO+7z/zCPcl1+YU+i7dW4o0y+aFxFgxTMG+ExBQpqT/k2ao8g=="], + + "@aws-sdk/credential-provider-web-identity/@aws-sdk/nested-clients/@aws-sdk/util-endpoints": ["@aws-sdk/util-endpoints@3.985.0", "", { "dependencies": { "@aws-sdk/types": "^3.973.1", "@smithy/types": "^4.12.0", "@smithy/url-parser": "^4.2.8", "@smithy/util-endpoints": "^3.2.8", "tslib": "^2.6.2" } }, "sha512-vth7UfGSUR3ljvaq8V4Rc62FsM7GUTH/myxPWkaEgOrprz1/Pc72EgTXxj+cPPPDAfHFIpjhkB7T7Td0RJx+BA=="], + + "@aws-crypto/sha256-browser/@smithy/util-utf8/@smithy/util-buffer-from/@smithy/is-array-buffer": ["@smithy/is-array-buffer@2.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA=="], + + "@aws-crypto/util/@smithy/util-utf8/@smithy/util-buffer-from/@smithy/is-array-buffer": ["@smithy/is-array-buffer@2.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA=="], + + "@aws-sdk/credential-provider-sso/@aws-sdk/token-providers/@aws-sdk/nested-clients/@aws-sdk/util-endpoints": ["@aws-sdk/util-endpoints@3.985.0", "", { "dependencies": { "@aws-sdk/types": "^3.973.1", "@smithy/types": "^4.12.0", "@smithy/url-parser": "^4.2.8", "@smithy/util-endpoints": "^3.2.8", "tslib": "^2.6.2" } }, "sha512-vth7UfGSUR3ljvaq8V4Rc62FsM7GUTH/myxPWkaEgOrprz1/Pc72EgTXxj+cPPPDAfHFIpjhkB7T7Td0RJx+BA=="], + } +} diff --git a/packages/pieces/community/aws-bedrock/package.json b/packages/pieces/community/aws-bedrock/package.json new file mode 100644 index 00000000000..4f482327411 --- /dev/null +++ b/packages/pieces/community/aws-bedrock/package.json @@ -0,0 +1,12 @@ +{ + "name": "@activepieces/piece-aws-bedrock", + "version": "0.0.1", + "type": "commonjs", + "main": "./src/index.js", + "types": "./src/index.d.ts", + "dependencies": { + "@aws-sdk/client-bedrock": "^3.987.0", + "@aws-sdk/client-bedrock-runtime": "^3.987.0", + "tslib": "^2.3.0" + } +} diff --git a/packages/pieces/community/aws-bedrock/project.json b/packages/pieces/community/aws-bedrock/project.json new file mode 100644 index 00000000000..a0b85d92b6a --- /dev/null +++ b/packages/pieces/community/aws-bedrock/project.json @@ -0,0 +1,66 @@ +{ + "name": "pieces-aws-bedrock", + "$schema": "../../../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "packages/pieces/community/aws-bedrock/src", + "projectType": "library", + "release": { + "version": { + "manifestRootsToUpdate": [ + "dist/{projectRoot}" + ], + "currentVersionResolver": "git-tag", + "fallbackCurrentVersionResolver": "disk" + } + }, + "tags": [], + "targets": { + "build": { + "executor": "@nx/js:tsc", + "outputs": [ + "{options.outputPath}" + ], + "options": { + "outputPath": "dist/packages/pieces/community/aws-bedrock", + "tsConfig": "packages/pieces/community/aws-bedrock/tsconfig.lib.json", + "packageJson": "packages/pieces/community/aws-bedrock/package.json", + "main": "packages/pieces/community/aws-bedrock/src/index.ts", + "assets": [ + "packages/pieces/community/aws-bedrock/*.md", + { + "input": "packages/pieces/community/aws-bedrock/src/i18n", + "output": "./src/i18n", + "glob": "**/!(i18n.json)" + } + ], + "buildableProjectDepsInPackageJsonType": "dependencies", + "updateBuildableProjectDepsInPackageJson": true, + "clean": false + }, + "dependsOn": [ + "prebuild", + "^build" + ] + }, + "nx-release-publish": { + "options": { + "packageRoot": "dist/{projectRoot}" + } + }, + "prebuild": { + "dependsOn": [ + "^build" + ], + "executor": "nx:run-commands", + "options": { + "cwd": "packages/pieces/community/aws-bedrock", + "command": "bun install --no-save --silent" + } + }, + "lint": { + "executor": "@nx/eslint:lint", + "outputs": [ + "{options.outputFile}" + ] + } + } +} \ No newline at end of file diff --git a/packages/pieces/community/aws-bedrock/src/index.ts b/packages/pieces/community/aws-bedrock/src/index.ts new file mode 100644 index 00000000000..a4fd2d4269c --- /dev/null +++ b/packages/pieces/community/aws-bedrock/src/index.ts @@ -0,0 +1,115 @@ +import { + PieceAuth, + Property, + createPiece, +} from '@activepieces/pieces-framework'; +import { PieceCategory } from '@activepieces/shared'; +import { ListFoundationModelsCommand } from '@aws-sdk/client-bedrock'; +import { sendPrompt } from './lib/actions/send-prompt'; +import { generateContentFromImage } from './lib/actions/generate-content-from-image'; +import { generateImage } from './lib/actions/generate-image'; +import { generateEmbeddings } from './lib/actions/generate-embeddings'; +import { createBedrockClient } from './lib/common'; + +export const awsBedrockAuth = PieceAuth.CustomAuth({ + description: 'AWS Bedrock authentication using Access Key and Secret Key.', + props: { + accessKeyId: Property.ShortText({ + displayName: 'Access Key ID', + required: true, + }), + secretAccessKey: PieceAuth.SecretText({ + displayName: 'Secret Access Key', + required: true, + }), + region: Property.StaticDropdown({ + displayName: 'Region', + required: true, + options: { + options: [ + { label: 'US East (N. Virginia) [us-east-1]', value: 'us-east-1' }, + { label: 'US East (Ohio) [us-east-2]', value: 'us-east-2' }, + { label: 'US West (Oregon) [us-west-2]', value: 'us-west-2' }, + { + label: 'Asia Pacific (Hyderabad) [ap-south-2]', + value: 'ap-south-2', + }, + { + label: 'Asia Pacific (Mumbai) [ap-south-1]', + value: 'ap-south-1', + }, + { + label: 'Asia Pacific (Osaka) [ap-northeast-3]', + value: 'ap-northeast-3', + }, + { + label: 'Asia Pacific (Seoul) [ap-northeast-2]', + value: 'ap-northeast-2', + }, + { + label: 'Asia Pacific (Singapore) [ap-southeast-1]', + value: 'ap-southeast-1', + }, + { + label: 'Asia Pacific (Sydney) [ap-southeast-2]', + value: 'ap-southeast-2', + }, + { + label: 'Asia Pacific (Tokyo) [ap-northeast-1]', + value: 'ap-northeast-1', + }, + { + label: 'Canada (Central) [ca-central-1]', + value: 'ca-central-1', + }, + { + label: 'Europe (Frankfurt) [eu-central-1]', + value: 'eu-central-1', + }, + { label: 'Europe (Ireland) [eu-west-1]', value: 'eu-west-1' }, + { label: 'Europe (London) [eu-west-2]', value: 'eu-west-2' }, + { label: 'Europe (Milan) [eu-south-1]', value: 'eu-south-1' }, + { label: 'Europe (Paris) [eu-west-3]', value: 'eu-west-3' }, + { label: 'Europe (Spain) [eu-south-2]', value: 'eu-south-2' }, + { + label: 'Europe (Stockholm) [eu-north-1]', + value: 'eu-north-1', + }, + { + label: 'Europe (Zurich) [eu-central-2]', + value: 'eu-central-2', + }, + { + label: 'South America (São Paulo) [sa-east-1]', + value: 'sa-east-1', + }, + ], + }, + }), + }, + validate: async ({ auth }) => { + try { + const client = createBedrockClient(auth); + await client.send(new ListFoundationModelsCommand({})); + return { valid: true }; + } catch (e) { + return { + valid: false, + error: (e as Error)?.message, + }; + } + }, + required: true, +}); + +export const awsBedrock = createPiece({ + displayName: 'AWS Bedrock', + description: 'Build generative AI applications with foundation models', + auth: awsBedrockAuth, + minimumSupportedRelease: '0.36.1', + logoUrl: 'https://cdn.activepieces.com/pieces/aws-bedrock.png', + categories: [PieceCategory.ARTIFICIAL_INTELLIGENCE], + authors: ["onyedikachi-david"], + actions: [sendPrompt, generateContentFromImage, generateImage, generateEmbeddings], + triggers: [], +}); \ No newline at end of file diff --git a/packages/pieces/community/aws-bedrock/src/lib/actions/generate-content-from-image.ts b/packages/pieces/community/aws-bedrock/src/lib/actions/generate-content-from-image.ts new file mode 100644 index 00000000000..507d8fcf8aa --- /dev/null +++ b/packages/pieces/community/aws-bedrock/src/lib/actions/generate-content-from-image.ts @@ -0,0 +1,125 @@ +import { createAction, Property } from '@activepieces/pieces-framework'; +import { + ConverseCommand, + ConversationRole, + ImageFormat, +} from '@aws-sdk/client-bedrock-runtime'; +import { ModelModality } from '@aws-sdk/client-bedrock'; +import { awsBedrockAuth } from '../../index'; +import { + createBedrockRuntimeClient, + getBedrockModelOptions, + formatBedrockError, + extractConverseTextResponse, +} from '../common'; + +const EXTENSION_TO_FORMAT: Record = { + png: ImageFormat.PNG, + jpg: ImageFormat.JPEG, + jpeg: ImageFormat.JPEG, + gif: ImageFormat.GIF, + webp: ImageFormat.WEBP, +}; + +export const generateContentFromImage = createAction({ + auth: awsBedrockAuth, + name: 'generate_content_from_image', + displayName: 'Generate Content from Image', + description: 'Ask a Bedrock model a question about an image.', + props: { + model: Property.Dropdown({ + displayName: 'Model', + required: true, + auth: awsBedrockAuth, + description: 'The foundation model to use. Must support image input.', + refreshers: [], + options: async ({ auth }) => { + if (!auth) { + return { + disabled: true, + placeholder: 'Connect your AWS account first', + options: [], + }; + } + return getBedrockModelOptions(auth.props, { + useInferenceProfiles: true, + inputModality: ModelModality.IMAGE, + }); + }, + }), + image: Property.File({ + displayName: 'Image', + required: true, + description: 'The image to analyze (PNG, JPEG, GIF, or WebP).', + }), + prompt: Property.LongText({ + displayName: 'Prompt', + required: true, + description: 'What do you want the model to tell you about the image?', + }), + systemPrompt: Property.LongText({ + displayName: 'System Prompt', + required: false, + description: 'Instructions that guide the model behavior.', + }), + temperature: Property.Number({ + displayName: 'Temperature', + required: false, + description: + 'Controls randomness. Lower values produce more deterministic output.', + defaultValue: 0.7, + }), + maxTokens: Property.Number({ + displayName: 'Maximum Tokens', + required: false, + description: 'The maximum number of tokens to generate.', + defaultValue: 2048, + }), + }, + async run({ auth, propsValue }) { + const client = createBedrockRuntimeClient(auth.props); + const { model, image, prompt, systemPrompt, temperature, maxTokens } = + propsValue; + + const ext = (image.extension ?? 'png').toLowerCase(); + const format = EXTENSION_TO_FORMAT[ext]; + if (!format) { + throw new Error( + `Unsupported image format "${ext}". Supported: png, jpeg, gif, webp.` + ); + } + + const imageBytes = Buffer.from(image.base64, 'base64'); + + try { + const response = await client.send( + new ConverseCommand({ + modelId: model, + messages: [ + { + role: ConversationRole.USER, + content: [ + { + image: { + format, + source: { bytes: imageBytes }, + }, + }, + { text: prompt }, + ], + }, + ], + ...(systemPrompt ? { system: [{ text: systemPrompt }] } : {}), + inferenceConfig: { + temperature: temperature ?? undefined, + maxTokens: maxTokens ?? undefined, + }, + }) + ); + + return extractConverseTextResponse(response); + } catch (error) { + throw new Error(formatBedrockError(error)); + } + }, +}); diff --git a/packages/pieces/community/aws-bedrock/src/lib/actions/generate-embeddings.ts b/packages/pieces/community/aws-bedrock/src/lib/actions/generate-embeddings.ts new file mode 100644 index 00000000000..6270f11f85f --- /dev/null +++ b/packages/pieces/community/aws-bedrock/src/lib/actions/generate-embeddings.ts @@ -0,0 +1,171 @@ +import { createAction, Property } from '@activepieces/pieces-framework'; +import { InvokeModelCommand } from '@aws-sdk/client-bedrock-runtime'; +import { ModelModality } from '@aws-sdk/client-bedrock'; +import { awsBedrockAuth } from '../../index'; +import { + createBedrockRuntimeClient, + getBedrockModelOptions, + formatBedrockError, +} from '../common'; + +export const generateEmbeddings = createAction({ + auth: awsBedrockAuth, + name: 'generate_embeddings', + displayName: 'Generate Embeddings', + description: + 'Generate vector embeddings from text using Amazon Titan Embed, Cohere Embed, or Amazon Nova Multimodal Embeddings models.', + props: { + model: Property.Dropdown({ + displayName: 'Model', + required: true, + auth: awsBedrockAuth, + description: 'The embedding model to use.', + refreshers: [], + options: async ({ auth }) => { + if (!auth) { + return { + disabled: true, + placeholder: 'Connect your AWS account first', + options: [], + }; + } + return getBedrockModelOptions(auth.props, { + outputModality: ModelModality.EMBEDDING, + }); + }, + }), + inputText: Property.LongText({ + displayName: 'Input Text', + required: true, + description: 'The text to generate embeddings for.', + }), + embeddingPurpose: Property.StaticDropdown({ + displayName: 'Embedding Purpose', + required: false, + description: + 'Optimize embeddings for your use case. Only used by Nova Multimodal Embeddings.', + defaultValue: 'GENERIC_INDEX', + options: { + options: [ + { label: 'Generic Index', value: 'GENERIC_INDEX' }, + { label: 'Generic Retrieval', value: 'GENERIC_RETRIEVAL' }, + { label: 'Text Retrieval', value: 'TEXT_RETRIEVAL' }, + { label: 'Classification', value: 'CLASSIFICATION' }, + { label: 'Clustering', value: 'CLUSTERING' }, + ], + }, + }), + dimensions: Property.Number({ + displayName: 'Dimensions', + required: false, + description: + 'The number of dimensions for the output embedding vector. Titan Embed v2: 256, 512, 1024. Nova Multimodal: 256, 384, 1024, 3072.', + }), + normalize: Property.Checkbox({ + displayName: 'Normalize', + required: false, + description: + 'Whether to normalize the output embedding vector. Supported by Titan Embed v2.', + defaultValue: true, + }), + }, + async run({ auth, propsValue }) { + const client = createBedrockRuntimeClient(auth.props); + const { model, inputText, dimensions, normalize } = propsValue; + + const isTitan = model.startsWith('amazon.titan-embed'); + const isCohere = model.startsWith('cohere.embed'); + const isNova = model.includes('nova') && model.includes('embed'); + const isTwelveLabs = model.startsWith('twelvelabs.'); + + let requestBody: Record; + + if (isNova) { + requestBody = { + schemaVersion: 'nova-multimodal-embed-v1', + taskType: 'SINGLE_EMBEDDING', + singleEmbeddingParams: { + embeddingPurpose: propsValue.embeddingPurpose ?? 'GENERIC_INDEX', + ...(dimensions != null ? { embeddingDimension: dimensions } : {}), + text: { + truncationMode: 'END', + value: inputText, + }, + }, + }; + } else if (isTitan) { + requestBody = { + inputText, + ...(dimensions != null ? { dimensions } : {}), + ...(normalize != null ? { normalize } : {}), + }; + } else if (isCohere) { + requestBody = { + texts: [inputText], + input_type: 'search_document', + truncate: 'END', + }; + } else if (isTwelveLabs) { + requestBody = { + inputType: 'text', + inputText, + textTruncate: 'end', + }; + } else { + requestBody = { + inputText, + }; + } + + try { + const response = await client.send( + new InvokeModelCommand({ + modelId: model, + body: Buffer.from(JSON.stringify(requestBody)), + contentType: 'application/json', + accept: 'application/json', + }) + ); + + const responseBody = JSON.parse( + new TextDecoder().decode(response.body) + ); + + let embedding: number[] | undefined; + + if (responseBody.embedding) { + // Titan Embed / TwelveLabs format: { embedding: [floats] } + embedding = responseBody.embedding; + } else if ( + responseBody.embeddings && + responseBody.embeddings.length > 0 + ) { + const first = responseBody.embeddings[0]; + if (Array.isArray(first)) { + // Cohere v3 format: { embeddings: [[floats]] } + embedding = first; + } else if (first?.embedding) { + // Nova format: { embeddings: [{ embedding: [floats] }] } + embedding = first.embedding; + } + } + + if (!embedding) { + throw new Error( + 'No embedding was returned by the model. The response format may not be supported.' + ); + } + + return { + embedding, + dimensions: embedding.length, + model, + }; + } catch (error) { + if (error instanceof Error && error.message.includes('No embedding')) { + throw error; + } + throw new Error(formatBedrockError(error)); + } + }, +}); diff --git a/packages/pieces/community/aws-bedrock/src/lib/actions/generate-image.ts b/packages/pieces/community/aws-bedrock/src/lib/actions/generate-image.ts new file mode 100644 index 00000000000..b259a8570d6 --- /dev/null +++ b/packages/pieces/community/aws-bedrock/src/lib/actions/generate-image.ts @@ -0,0 +1,182 @@ +import { createAction, Property } from '@activepieces/pieces-framework'; +import { InvokeModelCommand } from '@aws-sdk/client-bedrock-runtime'; +import { ModelModality } from '@aws-sdk/client-bedrock'; +import { awsBedrockAuth } from '../../index'; +import { + createBedrockRuntimeClient, + getBedrockModelOptions, + formatBedrockError, +} from '../common'; + +export const generateImage = createAction({ + auth: awsBedrockAuth, + name: 'generate_image', + displayName: 'Generate Image', + description: + 'Generate an image from a text prompt using Amazon Titan Image Generator or Stability AI models.', + props: { + model: Property.Dropdown({ + displayName: 'Model', + required: true, + auth: awsBedrockAuth, + description: 'The image generation model to use.', + refreshers: [], + options: async ({ auth }) => { + if (!auth) { + return { + disabled: true, + placeholder: 'Connect your AWS account first', + options: [], + }; + } + return getBedrockModelOptions(auth.props, { + outputModality: ModelModality.IMAGE, + }); + }, + }), + prompt: Property.LongText({ + displayName: 'Prompt', + required: true, + description: 'A text description of the image you want to generate.', + }), + negativePrompt: Property.LongText({ + displayName: 'Negative Prompt', + required: false, + description: + 'Describe what you do NOT want in the image. Helps refine the output.', + }), + width: Property.Number({ + displayName: 'Width', + required: false, + description: 'Image width in pixels. Must be supported by the model.', + defaultValue: 1024, + }), + height: Property.Number({ + displayName: 'Height', + required: false, + description: 'Image height in pixels. Must be supported by the model.', + defaultValue: 1024, + }), + seed: Property.Number({ + displayName: 'Seed', + required: false, + description: + 'A seed for reproducible results. Use the same seed and prompt to get the same image.', + }), + }, + async run({ auth, propsValue, files }) { + const client = createBedrockRuntimeClient(auth.props); + const { model, prompt, negativePrompt, width, height, seed } = propsValue; + + const isTitan = model.startsWith('amazon.titan-image'); + const isStability = model.startsWith('stability.'); + const isNovaCanvas = model.startsWith('amazon.nova-canvas'); + + let requestBody: Record; + + if (isTitan) { + requestBody = { + taskType: 'TEXT_IMAGE', + textToImageParams: { + text: prompt, + ...(negativePrompt ? { negativeText: negativePrompt } : {}), + }, + imageGenerationConfig: { + numberOfImages: 1, + width: width ?? 1024, + height: height ?? 1024, + ...(seed != null ? { seed: seed } : {}), + }, + }; + } else if (isNovaCanvas) { + requestBody = { + taskType: 'TEXT_IMAGE', + textToImageParams: { + text: prompt, + ...(negativePrompt ? { negativeText: negativePrompt } : {}), + }, + imageGenerationConfig: { + numberOfImages: 1, + width: width ?? 1024, + height: height ?? 1024, + ...(seed != null ? { seed: seed } : {}), + }, + }; + } else if (isStability) { + requestBody = { + text_prompts: [ + { text: prompt, weight: 1 }, + ...(negativePrompt + ? [{ text: negativePrompt, weight: -1 }] + : []), + ], + cfg_scale: 7, + steps: 30, + width: width ?? 1024, + height: height ?? 1024, + ...(seed != null ? { seed: seed } : {}), + }; + } else { + requestBody = { + text_prompts: [ + { text: prompt, weight: 1 }, + ...(negativePrompt + ? [{ text: negativePrompt, weight: -1 }] + : []), + ], + width: width ?? 1024, + height: height ?? 1024, + ...(seed != null ? { seed: seed } : {}), + }; + } + + try { + const response = await client.send( + new InvokeModelCommand({ + modelId: model, + body: Buffer.from(JSON.stringify(requestBody)), + contentType: 'application/json', + accept: 'application/json', + }) + ); + + const responseBody = JSON.parse( + new TextDecoder().decode(response.body) + ); + + let base64Image: string | undefined; + + if (responseBody.images && responseBody.images.length > 0) { + base64Image = responseBody.images[0]; + } else if ( + responseBody.artifacts && + responseBody.artifacts.length > 0 + ) { + base64Image = responseBody.artifacts[0].base64; + } + + if (!base64Image) { + throw new Error( + 'No image was returned by the model. The response format may not be supported.' + ); + } + + const imageBuffer = Buffer.from(base64Image, 'base64'); + + const file = await files.write({ + fileName: 'generated-image.png', + data: imageBuffer, + }); + + return { + image: file, + model: model, + }; + } catch (error) { + if (error instanceof Error && error.message.includes('No image')) { + throw error; + } + throw new Error(formatBedrockError(error)); + } + }, +}); diff --git a/packages/pieces/community/aws-bedrock/src/lib/actions/send-prompt.ts b/packages/pieces/community/aws-bedrock/src/lib/actions/send-prompt.ts new file mode 100644 index 00000000000..d2450bc1ad5 --- /dev/null +++ b/packages/pieces/community/aws-bedrock/src/lib/actions/send-prompt.ts @@ -0,0 +1,140 @@ +import { + createAction, + Property, + StoreScope, +} from '@activepieces/pieces-framework'; +import { + ConverseCommand, + ConversationRole, + Message, +} from '@aws-sdk/client-bedrock-runtime'; +import { awsBedrockAuth } from '../../index'; +import { + createBedrockRuntimeClient, + getBedrockModelOptions, + formatBedrockError, + extractConverseTextResponse, +} from '../common'; + +export const sendPrompt = createAction({ + auth: awsBedrockAuth, + name: 'send_prompt', + displayName: 'Ask Bedrock', + description: 'Send a text prompt to an Amazon Bedrock model.', + props: { + model: Property.Dropdown({ + displayName: 'Model', + required: true, + auth: awsBedrockAuth, + description: 'The foundation model to use for generation.', + refreshers: [], + options: async ({ auth }) => { + if (!auth) { + return { + disabled: true, + placeholder: 'Connect your AWS account first', + options: [], + }; + } + return getBedrockModelOptions(auth.props, { useInferenceProfiles: true }); + }, + }), + prompt: Property.LongText({ + displayName: 'Prompt', + required: true, + }), + systemPrompt: Property.LongText({ + displayName: 'System Prompt', + required: false, + description: 'Instructions that guide the model behavior.', + }), + temperature: Property.Number({ + displayName: 'Temperature', + required: false, + description: + 'Controls randomness. Lower values produce more deterministic output.', + defaultValue: 0.7, + }), + maxTokens: Property.Number({ + displayName: 'Maximum Tokens', + required: false, + description: 'The maximum number of tokens to generate.', + defaultValue: 2048, + }), + topP: Property.Number({ + displayName: 'Top P', + required: false, + description: + 'Nucleus sampling: the model considers tokens with top_p probability mass.', + defaultValue: 1, + }), + stopSequences: Property.Array({ + displayName: 'Stop Sequences', + required: false, + description: + 'Sequences that will cause the model to stop generating. Up to 4 sequences.', + }), + memoryKey: Property.ShortText({ + displayName: 'Memory Key', + required: false, + description: + 'A memory key that will keep the chat history shared across runs and flows. Keep it empty to leave the model without memory of previous messages.', + }), + }, + async run({ auth, propsValue, store }) { + const client = createBedrockRuntimeClient(auth.props); + const { + model, + prompt, + systemPrompt, + temperature, + maxTokens, + topP, + stopSequences, + memoryKey, + } = propsValue; + + let messageHistory: Message[] = []; + if (memoryKey) { + messageHistory = + (await store.get(memoryKey, StoreScope.PROJECT)) ?? []; + } + + messageHistory.push({ + role: ConversationRole.USER, + content: [{ text: prompt }], + }); + + try { + const response = await client.send( + new ConverseCommand({ + modelId: model, + messages: messageHistory, + ...(systemPrompt ? { system: [{ text: systemPrompt }] } : {}), + inferenceConfig: { + temperature: temperature ?? undefined, + maxTokens: maxTokens ?? undefined, + topP: topP ?? undefined, + stopSequences: + stopSequences && stopSequences.length > 0 + ? (stopSequences as string[]) + : undefined, + }, + }) + ); + + const outputMessage = response.output?.message; + if (outputMessage) { + messageHistory.push(outputMessage); + } + + if (memoryKey) { + await store.put(memoryKey, messageHistory, StoreScope.PROJECT); + } + + return extractConverseTextResponse(response); + } catch (error) { + throw new Error(formatBedrockError(error)); + } + }, +}); diff --git a/packages/pieces/community/aws-bedrock/src/lib/common.ts b/packages/pieces/community/aws-bedrock/src/lib/common.ts new file mode 100644 index 00000000000..83a7c6f8013 --- /dev/null +++ b/packages/pieces/community/aws-bedrock/src/lib/common.ts @@ -0,0 +1,189 @@ +import { + BedrockClient, + ListFoundationModelsCommand, + ListInferenceProfilesCommand, + ModelModality, +} from '@aws-sdk/client-bedrock'; +import { + BedrockRuntimeClient, + ConverseResponse, +} from '@aws-sdk/client-bedrock-runtime'; + +export interface BedrockAuth { + accessKeyId: string; + secretAccessKey: string; + region: string; +} + +export function createBedrockClient(auth: BedrockAuth): BedrockClient { + return new BedrockClient({ + credentials: { + accessKeyId: auth.accessKeyId, + secretAccessKey: auth.secretAccessKey, + }, + region: auth.region, + }); +} + +export function createBedrockRuntimeClient( + auth: BedrockAuth +): BedrockRuntimeClient { + return new BedrockRuntimeClient({ + credentials: { + accessKeyId: auth.accessKeyId, + secretAccessKey: auth.secretAccessKey, + }, + region: auth.region, + }); +} + +export async function getBedrockModelOptions( + auth: BedrockAuth | undefined, + filters?: { + inputModality?: ModelModality; + outputModality?: ModelModality; + showAll?: boolean; + useInferenceProfiles?: boolean; + } +) { + if (!auth) { + return { + disabled: true, + placeholder: 'Connect your AWS account first', + options: [], + }; + } + + try { + const client = createBedrockClient(auth); + + if (filters?.useInferenceProfiles) { + const [profileResponse, modelsResponse] = await Promise.all([ + client.send( + new ListInferenceProfilesCommand({ + typeEquals: 'SYSTEM_DEFINED', + }) + ), + filters?.inputModality + ? client.send(new ListFoundationModelsCommand({})) + : Promise.resolve(undefined), + ]); + + const profiles = profileResponse.inferenceProfileSummaries ?? []; + + let allowedModelIds: Set | undefined; + if (filters?.inputModality && modelsResponse) { + const allModels = modelsResponse.modelSummaries ?? []; + allowedModelIds = new Set( + allModels + .filter((m) => + m.inputModalities?.includes(filters.inputModality!) + ) + .map((m) => m.modelId!) + .filter(Boolean) + ); + } + + const seen = new Set(); + const deduped = profiles.filter((p) => { + if (!p.inferenceProfileId || p.status !== 'ACTIVE') return false; + if (seen.has(p.inferenceProfileId)) return false; + if (allowedModelIds) { + const profileModelId = p.models?.[0]?.modelArn?.split('/').pop(); + if (!profileModelId || !allowedModelIds.has(profileModelId)) { + return false; + } + } + seen.add(p.inferenceProfileId); + return true; + }); + + return { + disabled: false, + options: deduped.map((p) => ({ + label: p.inferenceProfileName ?? p.inferenceProfileId!, + value: p.inferenceProfileId!, + })), + }; + } + + const response = await client.send( + new ListFoundationModelsCommand({ + byOutputModality: filters?.showAll + ? undefined + : (filters?.outputModality ?? ModelModality.TEXT), + }) + ); + const models = response.modelSummaries ?? []; + + const filtered = filters?.inputModality + ? models.filter((m) => + m.inputModalities?.includes(filters.inputModality!) + ) + : models; + + const seen = new Set(); + const deduped = filtered.filter((m) => { + if (!m.modelId) return false; + const baseId = m.modelId.replace(/:\d+:.*$/, ''); + if (seen.has(baseId)) return false; + seen.add(baseId); + return true; + }); + + return { + disabled: false, + options: deduped.map((m) => ({ + label: `${m.providerName} - ${m.modelName}`, + value: m.modelId!, + })), + }; + } catch (error) { + return { + disabled: true, + options: [], + placeholder: 'Failed to load models. Check your credentials.', + }; + } +} + +export function extractConverseTextResponse(response: ConverseResponse) { + const outputMessage = response.output?.message; + const textContent = outputMessage?.content + ?.filter((block) => 'text' in block) + .map((block) => block.text) + .join(''); + + return { + text: textContent ?? '', + stopReason: response.stopReason, + usage: response.usage, + latencyMs: response.metrics?.latencyMs, + }; +} + +export function formatBedrockError(error: unknown): string { + const err = error as { name?: string; message?: string }; + const name = err.name ?? 'UnknownError'; + + switch (name) { + case 'ThrottlingException': + return 'Request was throttled by AWS Bedrock. Please try again in a moment.'; + case 'ModelNotReadyException': + return 'The model is not ready. It may still be loading — please try again shortly.'; + case 'ModelTimeoutException': + return 'The model timed out while processing your request. Try a shorter prompt or a different model.'; + case 'ModelErrorException': + return 'The model encountered an internal error. Try again or use a different model.'; + case 'AccessDeniedException': + return 'Access denied. Ensure your AWS credentials have permission to invoke this model and that the model is enabled in your region.'; + case 'ValidationException': + return `Validation error: ${err.message ?? 'Check your input parameters.'}`; + case 'ServiceUnavailableException': + return 'AWS Bedrock is temporarily unavailable. Please try again later.'; + case 'ServiceQuotaExceededException': + return 'You have exceeded your AWS Bedrock service quota.'; + default: + return err.message ?? 'An unexpected error occurred.'; + } +} diff --git a/packages/pieces/community/aws-bedrock/tsconfig.json b/packages/pieces/community/aws-bedrock/tsconfig.json new file mode 100644 index 00000000000..eff240ac143 --- /dev/null +++ b/packages/pieces/community/aws-bedrock/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "module": "commonjs", + "forceConsistentCasingInFileNames": true, + "strict": true, + "importHelpers": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "noPropertyAccessFromIndexSignature": true + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + } + ] +} diff --git a/packages/pieces/community/aws-bedrock/tsconfig.lib.json b/packages/pieces/community/aws-bedrock/tsconfig.lib.json new file mode 100644 index 00000000000..5995d959bf0 --- /dev/null +++ b/packages/pieces/community/aws-bedrock/tsconfig.lib.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../../dist/out-tsc", + "declaration": true, + "types": ["node"] + }, + "include": ["src/**/*.ts"] +} diff --git a/packages/pieces/community/brave-search/.eslintrc.json b/packages/pieces/community/brave-search/.eslintrc.json new file mode 100644 index 00000000000..4a4e695c547 --- /dev/null +++ b/packages/pieces/community/brave-search/.eslintrc.json @@ -0,0 +1,33 @@ +{ + "extends": [ + "../../../../.eslintrc.base.json" + ], + "ignorePatterns": [ + "!**/*" + ], + "overrides": [ + { + "files": [ + "*.ts", + "*.tsx", + "*.js", + "*.jsx" + ], + "rules": {} + }, + { + "files": [ + "*.ts", + "*.tsx" + ], + "rules": {} + }, + { + "files": [ + "*.js", + "*.jsx" + ], + "rules": {} + } + ] +} \ No newline at end of file diff --git a/packages/pieces/community/brave-search/README.md b/packages/pieces/community/brave-search/README.md new file mode 100644 index 00000000000..56303486c1c --- /dev/null +++ b/packages/pieces/community/brave-search/README.md @@ -0,0 +1,28 @@ +# Activepieces Brave Search Piece (MCP) + +This project contains the source code for the **Brave Search** integration for Activepieces. +Activepieces automatically exposes this integration as an MCP (Model Context Protocol) server, allowing agents to use Brave Search. + +## Integration Details + +- **Name**: Brave Search +- **Description**: Privacy-focused web search engine. +- **Auth**: API Key (Brave Search API) +- **Actions**: + - `web_search`: Perform a web search query. + +## Development Status + +- [x] Scaffolding +- [ ] Implementation of `web_search` action +- [ ] Testing + +## How to use + +This code is designed to be dropped into the `packages/pieces/community/brave-search` directory of the Activepieces repository. + +1. Clone Activepieces: `git clone https://github.com/activepieces/activepieces.git` +2. Copy this folder to `packages/pieces/community/brave-search` +3. Run `npm install` in the root. +4. Build the piece: `nx build piece-brave-search` +5. Run Activepieces locally to test. diff --git a/packages/pieces/community/brave-search/package.json b/packages/pieces/community/brave-search/package.json new file mode 100644 index 00000000000..5b1cb19dae5 --- /dev/null +++ b/packages/pieces/community/brave-search/package.json @@ -0,0 +1,4 @@ +{ + "name": "@activepieces/piece-brave-search", + "version": "0.0.1" +} diff --git a/packages/pieces/community/brave-search/project.json b/packages/pieces/community/brave-search/project.json new file mode 100644 index 00000000000..b7a606a21e3 --- /dev/null +++ b/packages/pieces/community/brave-search/project.json @@ -0,0 +1,66 @@ +{ + "name": "pieces-brave-search", + "$schema": "../../../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "packages/pieces/community/brave-search/src", + "projectType": "library", + "release": { + "version": { + "manifestRootsToUpdate": [ + "dist/{projectRoot}" + ], + "currentVersionResolver": "git-tag", + "fallbackCurrentVersionResolver": "disk" + } + }, + "tags": [], + "targets": { + "build": { + "executor": "@nx/js:tsc", + "outputs": [ + "{options.outputPath}" + ], + "options": { + "outputPath": "dist/packages/pieces/community/brave-search", + "tsConfig": "packages/pieces/community/brave-search/tsconfig.lib.json", + "packageJson": "packages/pieces/community/brave-search/package.json", + "main": "packages/pieces/community/brave-search/src/index.ts", + "assets": [ + "packages/pieces/community/brave-search/*.md", + { + "input": "packages/pieces/community/brave-search/src/i18n", + "output": "./src/i18n", + "glob": "**/!(i18n.json)" + } + ], + "buildableProjectDepsInPackageJsonType": "dependencies", + "updateBuildableProjectDepsInPackageJson": true, + "clean": false + }, + "dependsOn": [ + "prebuild", + "^build" + ] + }, + "nx-release-publish": { + "options": { + "packageRoot": "dist/{projectRoot}" + } + }, + "prebuild": { + "dependsOn": [ + "^build" + ], + "executor": "nx:run-commands", + "options": { + "cwd": "packages/pieces/community/brave-search", + "command": "bun install --no-save --silent" + } + }, + "lint": { + "executor": "@nx/eslint:lint", + "outputs": [ + "{options.outputFile}" + ] + } + } +} diff --git a/packages/pieces/community/brave-search/src/index.ts b/packages/pieces/community/brave-search/src/index.ts new file mode 100644 index 00000000000..5227c2fd6ba --- /dev/null +++ b/packages/pieces/community/brave-search/src/index.ts @@ -0,0 +1,32 @@ +import { createPiece, PieceAuth } from '@activepieces/pieces-framework'; +import { braveWebSearchAction } from './lib/actions/web-search'; +import { createCustomApiCallAction } from '@activepieces/pieces-common'; + +export const braveSearchAuth = PieceAuth.SecretText({ + displayName: 'API Key', + required: true, + description: + 'Your Brave Search API Key (get it from https://brave.com/search/api/)', +}); + +export const braveSearch = createPiece({ + displayName: 'Brave Search', + description: 'Privacy-preserving search engine', + auth: braveSearchAuth, + minimumSupportedRelease: '0.30.0', + logoUrl: 'https://cdn.activepieces.com/pieces/brave-search.png', + authors: ['ErisMorn', 'sanket-a11y'], + actions: [ + braveWebSearchAction, + createCustomApiCallAction({ + auth: braveSearchAuth, + baseUrl: () => 'https://api.search.brave.com/res/v1', + authMapping: async (auth) => { + return { + 'X-Subscription-Token': auth.secret_text, + }; + }, + }), + ], + triggers: [], +}); diff --git a/packages/pieces/community/brave-search/src/lib/actions/web-search.ts b/packages/pieces/community/brave-search/src/lib/actions/web-search.ts new file mode 100644 index 00000000000..1cb469d0d87 --- /dev/null +++ b/packages/pieces/community/brave-search/src/lib/actions/web-search.ts @@ -0,0 +1,42 @@ +import { createAction, Property } from '@activepieces/pieces-framework'; +import { httpClient, HttpMethod } from '@activepieces/pieces-common'; +import { braveSearchAuth } from '../../index'; + +export const braveWebSearchAction = createAction({ + auth: braveSearchAuth, + name: 'web_search', + displayName: 'Web Search', + description: 'Search the web using Brave Search', + props: { + query: Property.ShortText({ + displayName: 'Query', + description: 'The search query', + required: true, + }), + count: Property.Number({ + displayName: 'Count', + description: 'Number of results (1-20)', + required: false, + defaultValue: 10, + }), + }, + async run(context) { + const query = context.propsValue.query; + const count = context.propsValue.count; + + const response = await httpClient.sendRequest({ + method: HttpMethod.GET, + url: 'https://api.search.brave.com/res/v1/web/search', + headers: { + 'X-Subscription-Token': context.auth.secret_text, + Accept: 'application/json', + }, + queryParams: { + q: query, + count: count as unknown as string, + }, + }); + + return response.body; + }, +}); diff --git a/packages/pieces/community/brave-search/tsconfig.json b/packages/pieces/community/brave-search/tsconfig.json new file mode 100644 index 00000000000..eff240ac143 --- /dev/null +++ b/packages/pieces/community/brave-search/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "module": "commonjs", + "forceConsistentCasingInFileNames": true, + "strict": true, + "importHelpers": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "noPropertyAccessFromIndexSignature": true + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + } + ] +} diff --git a/packages/pieces/community/brave-search/tsconfig.lib.json b/packages/pieces/community/brave-search/tsconfig.lib.json new file mode 100644 index 00000000000..28369ef7622 --- /dev/null +++ b/packages/pieces/community/brave-search/tsconfig.lib.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "../../../../dist/out-tsc", + "declaration": true, + "types": ["node"] + }, + "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"], + "include": ["src/**/*.ts"] +} diff --git a/packages/react-ui/src/app/routes/platform/setup/ai/universal-pieces/model-form-popover.tsx b/packages/react-ui/src/app/routes/platform/setup/ai/universal-pieces/model-form-popover.tsx index 96b8dfd7e28..68c1d99b0e6 100644 --- a/packages/react-ui/src/app/routes/platform/setup/ai/universal-pieces/model-form-popover.tsx +++ b/packages/react-ui/src/app/routes/platform/setup/ai/universal-pieces/model-form-popover.tsx @@ -42,6 +42,8 @@ const ModelFormPopover = ({ const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); + // so parent form doesn't submit + e.stopPropagation(); onSubmit(model); if (!initialData) { setModel(defaultModel); diff --git a/packages/server/api/src/app/ai/ai-provider-service.ts b/packages/server/api/src/app/ai/ai-provider-service.ts index 48b8535868a..bb1663f7ced 100644 --- a/packages/server/api/src/app/ai/ai-provider-service.ts +++ b/packages/server/api/src/app/ai/ai-provider-service.ts @@ -1,5 +1,5 @@ import { - ActivepiecesError, ActivePiecesProviderAuthConfig, AIProviderAuthConfig, AIProviderModel, AIProviderName, AIProviderWithoutSensitiveData, + ActivepiecesError, ActivePiecesProviderAuthConfig, AIProviderAuthConfig, AIProviderConfig, AIProviderModel, AIProviderName, AIProviderWithoutSensitiveData, apId, CreateAIProviderRequest, ErrorCode, @@ -84,6 +84,7 @@ export const aiProviderService = (log: FastifyBaseLogger) => ({ }, async create(platformId: PlatformId, request: CreateAIProviderRequest): Promise { + await this.validateProviderCredentials(request.provider, request.auth, request.config) await aiProviderRepo().save({ id: apId(), auth: await encryptUtils.encryptObject(request.auth), @@ -104,6 +105,14 @@ export const aiProviderService = (log: FastifyBaseLogger) => ({ params: { entityId: providerId, entityType: 'AIProvider' }, }) } + const config = request.config ?? aiProvider.config + if (!isNil(request.auth)) { + await this.validateProviderCredentials(aiProvider.provider, request.auth, config) + } + else { + const { auth } = await this.getConfigOrThrow({ platformId, provider: aiProvider.provider }) + await this.validateProviderCredentials(aiProvider.provider, auth, config) + } const encryptedAuth = !isNil(request.auth) ? await encryptUtils.encryptObject(request.auth) : undefined await aiProviderRepo().update(providerId, { @@ -119,6 +128,26 @@ export const aiProviderService = (log: FastifyBaseLogger) => ({ id: providerId, }) }, + async validateProviderCredentials(provider: AIProviderName, auth: AIProviderAuthConfig, config: AIProviderConfig): Promise { + const providerStrategy = aiProviders[provider] + try { + await providerStrategy.validateConnection(auth, config, log) + } + catch (error: unknown) { + const errorMessage = error instanceof Error ? error.message : 'Unknown error' + const includeHttpErrorInMessage = provider === AIProviderName.CLOUDFLARE_GATEWAY + throw new ActivepiecesError({ + code: ErrorCode.INVALID_AI_PROVIDER_CREDENTIALS, + params: { + provider, + message: includeHttpErrorInMessage + ? `Failed to validate credentials for ${providerStrategy.name}, ${errorMessage}` + : `Failed to validate credentials for ${providerStrategy.name}`, + httpErrorResponse: errorMessage, + }, + }) + } + }, async getConfigOrThrow({ platformId, provider }: GetOrCreateActivepiecesConfigResponse): Promise { const aiProvider = await aiProviderRepo().findOneBy({ platformId, diff --git a/packages/server/api/src/app/ai/providers/ai-provider.ts b/packages/server/api/src/app/ai/providers/ai-provider.ts index 8c1f80de5c9..39bb189b244 100644 --- a/packages/server/api/src/app/ai/providers/ai-provider.ts +++ b/packages/server/api/src/app/ai/providers/ai-provider.ts @@ -1,6 +1,8 @@ import { AIProviderAuthConfig, AIProviderConfig, AIProviderModel } from '@activepieces/shared' +import { FastifyBaseLogger } from 'fastify' export type AIProviderStrategy = { name: string listModels(authConfig: T, config: C): Promise + validateConnection(authConfig: T, config: C, log: FastifyBaseLogger): Promise } diff --git a/packages/server/api/src/app/ai/providers/anthropic-provider.ts b/packages/server/api/src/app/ai/providers/anthropic-provider.ts index 8bd3e02b591..6d4b1b4d03c 100644 --- a/packages/server/api/src/app/ai/providers/anthropic-provider.ts +++ b/packages/server/api/src/app/ai/providers/anthropic-provider.ts @@ -1,9 +1,13 @@ import { httpClient, HttpMethod } from '@activepieces/pieces-common' import { AIProviderModel, AIProviderModelType, AnthropicProviderAuthConfig, AnthropicProviderConfig } from '@activepieces/shared' +import { FastifyBaseLogger } from 'fastify' import { AIProviderStrategy } from './ai-provider' export const anthropicProvider: AIProviderStrategy = { name: 'Anthropic', + async validateConnection(authConfig: AnthropicProviderAuthConfig, config: AnthropicProviderConfig, _log: FastifyBaseLogger): Promise { + await anthropicProvider.listModels(authConfig, config) + }, async listModels(authConfig: AnthropicProviderAuthConfig, _config: AnthropicProviderConfig): Promise { const res = await httpClient.sendRequest<{ data: AnthropicModel[] }>({ url: 'https://api.anthropic.com/v1/models', diff --git a/packages/server/api/src/app/ai/providers/azure-provider.ts b/packages/server/api/src/app/ai/providers/azure-provider.ts index e164b1f3db3..2b8ddd6a20b 100644 --- a/packages/server/api/src/app/ai/providers/azure-provider.ts +++ b/packages/server/api/src/app/ai/providers/azure-provider.ts @@ -1,9 +1,13 @@ import { httpClient, HttpMethod } from '@activepieces/pieces-common' import { AIProviderModel, AIProviderModelType, AzureProviderAuthConfig, AzureProviderConfig } from '@activepieces/shared' +import { FastifyBaseLogger } from 'fastify' import { AIProviderStrategy } from './ai-provider' export const azureProvider: AIProviderStrategy = { name: 'Azure OpenAI', + async validateConnection(authConfig: AzureProviderAuthConfig, config: AzureProviderConfig, _log: FastifyBaseLogger): Promise { + await azureProvider.listModels(authConfig, config) + }, async listModels(authConfig: AzureProviderAuthConfig, config: AzureProviderConfig): Promise { const endpoint = `https://${config.resourceName}.openai.azure.com` const apiKey = authConfig.apiKey diff --git a/packages/server/api/src/app/ai/providers/cloudflare-gateway-provider.ts b/packages/server/api/src/app/ai/providers/cloudflare-gateway-provider.ts index 325d300b69c..2d4c5208ae3 100644 --- a/packages/server/api/src/app/ai/providers/cloudflare-gateway-provider.ts +++ b/packages/server/api/src/app/ai/providers/cloudflare-gateway-provider.ts @@ -1,9 +1,40 @@ -import { AIProviderModel, CloudflareGatewayProviderAuthConfig, CloudflareGatewayProviderConfig } from '@activepieces/shared' +import { httpClient, HttpMethod } from '@activepieces/pieces-common' +import { AIProviderModel, AIProviderModelType, CloudflareGatewayProviderAuthConfig, CloudflareGatewayProviderConfig } from '@activepieces/shared' +import { FastifyBaseLogger } from 'fastify' import { AIProviderStrategy } from './ai-provider' export const cloudflareGatewayProvider: AIProviderStrategy = { name: 'Cloudflare Gateway', - async listModels(authConfig: CloudflareGatewayProviderAuthConfig, config: CloudflareGatewayProviderConfig): Promise { + async validateConnection(authConfig: CloudflareGatewayProviderAuthConfig, config: CloudflareGatewayProviderConfig, _: FastifyBaseLogger): Promise { + + const textModels = config.models.filter(m => m.modelType === AIProviderModelType.TEXT) + const results = await Promise.allSettled( + textModels.map(model => + httpClient.sendRequest({ + url: `https://gateway.ai.cloudflare.com/v1/${config.accountId}/${config.gatewayId}/compat/chat/completions`, + method: HttpMethod.POST, + headers: { + 'cf-aig-authorization': `Bearer ${authConfig.apiKey}`, + 'Content-Type': 'application/json', + }, + body: { + model: model.modelId, + messages: [{ role: 'user', content: 'Hi, reply only with "ok"' }], + }, + }), + ), + ) + const invalidModels = textModels + .filter((_, index) => results[index].status === 'rejected') + .map(model => model.modelId) + + if (invalidModels.length > 0) { + throw new Error( + `The following models failed validation through the gateway: ${invalidModels.join(', ')}, make sure the model id is correct and in the{provider_name}/{model_name} format, also check that the other inputs are correct.`, + ) + } + }, + async listModels(_: CloudflareGatewayProviderAuthConfig, config: CloudflareGatewayProviderConfig): Promise { return config.models.map(m => ({ id: m.modelId, name: m.modelName, diff --git a/packages/server/api/src/app/ai/providers/google-provider.ts b/packages/server/api/src/app/ai/providers/google-provider.ts index 7e878e4e133..36b24a3fb8e 100644 --- a/packages/server/api/src/app/ai/providers/google-provider.ts +++ b/packages/server/api/src/app/ai/providers/google-provider.ts @@ -1,9 +1,13 @@ import { httpClient, HttpMethod } from '@activepieces/pieces-common' import { AIProviderModel, AIProviderModelType, GoogleProviderAuthConfig, GoogleProviderConfig } from '@activepieces/shared' +import { FastifyBaseLogger } from 'fastify' import { AIProviderStrategy } from './ai-provider' export const googleProvider: AIProviderStrategy = { name: 'Google', + async validateConnection(authConfig: GoogleProviderAuthConfig, config: GoogleProviderConfig, _log: FastifyBaseLogger): Promise { + await googleProvider.listModels(authConfig, config) + }, async listModels(authConfig: GoogleProviderAuthConfig, _config: GoogleProviderConfig): Promise { const res = await httpClient.sendRequest<{ models: GoogleModel[] }>({ url: 'https://generativelanguage.googleapis.com/v1beta/models?pageSize=1000', diff --git a/packages/server/api/src/app/ai/providers/index.ts b/packages/server/api/src/app/ai/providers/index.ts index 4c824006d29..698c6bdb840 100644 --- a/packages/server/api/src/app/ai/providers/index.ts +++ b/packages/server/api/src/app/ai/providers/index.ts @@ -19,6 +19,9 @@ export const aiProviders: Record { + // Activepieces provider is managed internally, no external validation needed + }, }, } diff --git a/packages/server/api/src/app/ai/providers/openai-compatible-gateway-provider.ts b/packages/server/api/src/app/ai/providers/openai-compatible-gateway-provider.ts index bd7509a7d4b..a458f264481 100644 --- a/packages/server/api/src/app/ai/providers/openai-compatible-gateway-provider.ts +++ b/packages/server/api/src/app/ai/providers/openai-compatible-gateway-provider.ts @@ -1,8 +1,12 @@ import { AIProviderModel, OpenAICompatibleProviderAuthConfig, OpenAICompatibleProviderConfig } from '@activepieces/shared' +import { FastifyBaseLogger } from 'fastify' import { AIProviderStrategy } from './ai-provider' export const openAICompatibleProvider: AIProviderStrategy = { name: 'OpenAI Compatible', + async validateConnection(_: OpenAICompatibleProviderAuthConfig, _providerConfig: OpenAICompatibleProviderConfig, _log: FastifyBaseLogger): Promise { + // No validation needed for OpenAI Compatible provider + }, async listModels(_authConfig: OpenAICompatibleProviderAuthConfig, config: OpenAICompatibleProviderConfig): Promise { return config.models.map(m => ({ id: m.modelId, diff --git a/packages/server/api/src/app/ai/providers/openai-provider.ts b/packages/server/api/src/app/ai/providers/openai-provider.ts index ece63f6d81f..239c7055efb 100644 --- a/packages/server/api/src/app/ai/providers/openai-provider.ts +++ b/packages/server/api/src/app/ai/providers/openai-provider.ts @@ -1,9 +1,13 @@ import { httpClient, HttpMethod } from '@activepieces/pieces-common' import { AIProviderModel, AIProviderModelType, OpenAIProviderAuthConfig, OpenAIProviderConfig } from '@activepieces/shared' +import { FastifyBaseLogger } from 'fastify' import { AIProviderStrategy } from './ai-provider' export const openaiProvider: AIProviderStrategy = { name: 'OpenAI', + async validateConnection(authConfig: OpenAIProviderAuthConfig, config: OpenAIProviderConfig, _log: FastifyBaseLogger): Promise { + await openaiProvider.listModels(authConfig, config) + }, async listModels(authConfig: OpenAIProviderAuthConfig, _config: OpenAIProviderConfig): Promise { const res = await httpClient.sendRequest<{ data: OpenAIModel[] }>({ url: 'https://api.openai.com/v1/models', diff --git a/packages/server/api/src/app/ai/providers/openrouter-provider.ts b/packages/server/api/src/app/ai/providers/openrouter-provider.ts index 1bbc68d314e..f7853ed4a5f 100644 --- a/packages/server/api/src/app/ai/providers/openrouter-provider.ts +++ b/packages/server/api/src/app/ai/providers/openrouter-provider.ts @@ -1,9 +1,20 @@ import { httpClient, HttpMethod } from '@activepieces/pieces-common' import { AIProviderModel, AIProviderModelType, OpenRouterProviderAuthConfig, OpenRouterProviderConfig } from '@activepieces/shared' +import { FastifyBaseLogger } from 'fastify' import { AIProviderStrategy } from './ai-provider' export const openRouterProvider: AIProviderStrategy = { name: 'OpenRouter', + async validateConnection(authConfig: OpenRouterProviderAuthConfig, _config: OpenRouterProviderConfig, _log: FastifyBaseLogger): Promise { + await httpClient.sendRequest({ + url: 'https://openrouter.ai/api/v1/auth/key', + method: HttpMethod.GET, + headers: { + 'Authorization': `Bearer ${authConfig.apiKey}`, + 'Content-Type': 'application/json', + }, + }) + }, async listModels(_authConfig: OpenRouterProviderAuthConfig, _config: OpenRouterProviderConfig): Promise { const res = await httpClient.sendRequest<{ data: OpenRouterModel[] }>({ url: 'https://openrouter.ai/api/v1/models', diff --git a/packages/server/shared/package.json b/packages/server/shared/package.json index 8adaae7a702..5333311c469 100644 --- a/packages/server/shared/package.json +++ b/packages/server/shared/package.json @@ -6,7 +6,7 @@ "typings": "./src/index.d.ts", "dependencies": { "@activepieces/pieces-framework": "0.25.3", - "@activepieces/shared": "0.35.0", + "@activepieces/shared": "0.36.0", "tslib": "2.6.2", "pino": "10.1.0", "@hyperdx/node-opentelemetry": "0.8.2", diff --git a/packages/server/worker/package.json b/packages/server/worker/package.json index 27913ae8ff1..aaca5f99ae0 100644 --- a/packages/server/worker/package.json +++ b/packages/server/worker/package.json @@ -7,7 +7,7 @@ "dependencies": { "@activepieces/pieces-framework": "0.25.3", "@activepieces/server-shared": "0.0.2", - "@activepieces/shared": "0.35.0", + "@activepieces/shared": "0.36.0", "write-file-atomic": "5.0.1", "tslib": "2.6.2", "@opentelemetry/api": "1.9.0", diff --git a/packages/shared/package.json b/packages/shared/package.json index a17de8020f3..79eb22179dc 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,5 +1,5 @@ { "name": "@activepieces/shared", - "version": "0.35.0", + "version": "0.36.0", "type": "commonjs" } diff --git a/packages/shared/src/lib/common/activepieces-error.ts b/packages/shared/src/lib/common/activepieces-error.ts index 5de28084ce3..20e84155f85 100755 --- a/packages/shared/src/lib/common/activepieces-error.ts +++ b/packages/shared/src/lib/common/activepieces-error.ts @@ -95,6 +95,7 @@ export type ApErrorParams = | MachineNotConnectedParams | DoesNotMeetBusinessRequirementsParams | PieceSyncNotSupportedErrorParams + | InvalidAIProviderCredentialsParams export type TriggerExecutionFailedParams = BaseErrorParams +export type InvalidAIProviderCredentialsParams = BaseErrorParams + export enum ErrorCode { MACHINE_NOT_CONNECTED = 'MACHINE_NOT_CONNECTED', MACHINE_NOT_AVAILABLE = 'MACHINE_NOT_AVAILABLE', @@ -581,5 +588,6 @@ export enum ErrorCode { SUBFLOW_FAILED = 'SUBFLOW_FAILED', DOES_NOT_MEET_BUSINESS_REQUIREMENTS = 'DOES_NOT_MEET_BUSINESS_REQUIREMENTS', PIECE_SYNC_NOT_SUPPORTED = 'PIECE_SYNC_NOT_SUPPORTED', + INVALID_AI_PROVIDER_CREDENTIALS = 'INVALID_AI_PROVIDER_CREDENTIALS', } diff --git a/tsconfig.base.json b/tsconfig.base.json index 30e815e1d6b..d66518f5c6d 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1795,6 +1795,12 @@ ], "@activepieces/piece-pdfcrowd": [ "packages/pieces/community/pdfcrowd/src/index.ts" + ], + "@activepieces/piece-aws-bedrock": [ + "packages/pieces/community/aws-bedrock/src/index.ts" + ], + "@activepieces/piece-brave-search": [ + "packages/pieces/community/brave-search/src/index.ts" ] }, "resolveJsonModule": true