diff --git a/.gitignore b/.gitignore index 1ab2d3e..89e82dc 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ dist cdk-outputs.json environment.json* slack-manifest-output.json -build \ No newline at end of file +build +awsrelease.sh \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4870fa1..37be420 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.1.2] - 2023-01-11 +### Fixed + - Prebuild CloudFormation template region parameter default now matches template region for us-west-2 + - Merged #21 - Remove SDK JSON model injection in favor of @aws-sdk/client-qbusiness + - Merged dependabot #22 - Bump follow-redirects from 1.15.3 to 1.15.4 + ## [0.1.1] - 2023-12-04 ### Added - New 'Easy Button' option for deployment and update using pre-built CloudFormation templates (with no dependency on dev shell, cdk, etc.) - see [README - Deploy the stack](./README.md#1-deploy-the-stack). @@ -24,6 +30,7 @@ Initial release - Process up to 5 attached files for document question answering, summaries, etc. - Reset and start new conversation in DM channel by using `/new_conversation` -[Unreleased]: https://github.com/aws-samples/qnabot-on-aws-plugin-samples/compare/v0.1.1...develop +[Unreleased]: https://github.com/aws-samples/qnabot-on-aws-plugin-samples/compare/v0.1.2...develop +[0.1.2]: https://github.com/aws-samples/qnabot-on-aws-plugin-samples/releases/tag/v0.1.2 [0.1.1]: https://github.com/aws-samples/qnabot-on-aws-plugin-samples/releases/tag/v0.1.1 [0.1.0]: https://github.com/aws-samples/qnabot-on-aws-plugin-samples/releases/tag/v0.1.0 diff --git a/bin/convert-cfn-template.js b/bin/convert-cfn-template.js index 78eaa86..222857e 100644 --- a/bin/convert-cfn-template.js +++ b/bin/convert-cfn-template.js @@ -186,6 +186,8 @@ function updateTemplateLambdaRolePermissions(template, lambdas) { } function parameterizeTemplate(template, lambdas) { + const allowedQRegions = ['us-east-1', 'us-west-2']; + const defaultQRegion = allowedQRegions.includes(awsRegion) ? awsRegion : allowedQRegions[0]; template.Parameters = { AmazonQUserId: { Type: 'String', @@ -201,8 +203,8 @@ function parameterizeTemplate(template, lambdas) { }, AmazonQRegion: { Type: 'String', - Default: 'us-east-1', - AllowedValues: ['us-east-1', 'us-west-2'], + Default: defaultQRegion, + AllowedValues: allowedQRegions, Description: 'Amazon Q Region' }, ContextDaysToLive: { diff --git a/bin/environment.sh b/bin/environment.sh index d1fa2e2..8c972df 100755 --- a/bin/environment.sh +++ b/bin/environment.sh @@ -55,7 +55,6 @@ stack_name=$(prompt_for_value "StackName" "Name for slack bot" "AmazonQBot" "^[A user_id=$(prompt_for_value "AmazonQUserId" "Amazon Q User ID (leave empty to use slack users' email as user Id)" "" "^[^[:space:]]{0,255}$") app_id=$(prompt_for_value "AmazonQAppId" "Amazon Q Application ID (copy from AWS console)" "none" "^[a-zA-Z0-9][a-zA-Z0-9-]{35}$") region=$(prompt_for_value "AmazonQRegion" "Amazon Q Region" $(aws configure get region) "^[a-z]{2}-[a-z]+-[0-9]+$") -endpoint=$(prompt_for_value "AmazonQEndpoint" "Amazon Q Endpoint (leave empty for default endpoint)" "" "https://[-[:alnum:]\+&@#/%?=~_|!:,.;]+") ttl_days=$(prompt_for_value "ContextDaysToLive" "Number of days to keep conversation context" "90" "^[1-9][0-9]{0,3}$") # Create or update the JSON file @@ -72,7 +71,6 @@ jq -n \ AmazonQAppId: $app_id, AmazonQUserId: $user_id, AmazonQRegion: $region, - AmazonQEndpoint: $endpoint, ContextDaysToLive: $ttl_days }' > "$json_file" diff --git a/bin/my-amazon-q-slack-bot.ts b/bin/my-amazon-q-slack-bot.ts index 630eed5..ba49a6a 100644 --- a/bin/my-amazon-q-slack-bot.ts +++ b/bin/my-amazon-q-slack-bot.ts @@ -9,7 +9,6 @@ export interface StackEnvironment { AmazonQAppId: string; AmazonQUserId: string; AmazonQRegion: string; - AmazonQEndpoint?: string; ContextDaysToLive: string; } diff --git a/lib/my-amazon-q-slack-bot-stack.ts b/lib/my-amazon-q-slack-bot-stack.ts index 090d2fc..f076b77 100644 --- a/lib/my-amazon-q-slack-bot-stack.ts +++ b/lib/my-amazon-q-slack-bot-stack.ts @@ -98,7 +98,6 @@ export class MyAmazonQSlackBotStack extends cdk.Stack { timeout: Duration.seconds(30), environment: { SLACK_SECRET_NAME: slackSecret.secretName, - AMAZON_Q_ENDPOINT: env.AmazonQEndpoint ?? '', AMAZON_Q_REGION: env.AmazonQRegion, AMAZON_Q_APP_ID: env.AmazonQAppId, AMAZON_Q_USER_ID: env.AmazonQUserId ?? '', diff --git a/package-lock.json b/package-lock.json index d04dbfb..d3aeb75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,15 @@ { "name": "my_amazon_q_slack_bot", - "version": "0.1.1", + "version": "0.1.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "my_amazon_q_slack_bot", - "version": "0.1.1", + "version": "0.1.2", "dependencies": { "@aws-sdk/client-cloudformation": "^3.465.0", + "@aws-sdk/client-qbusiness": "^3.470.0", "@aws-sdk/client-s3": "^3.465.0", "@aws-sdk/lib-dynamodb": "^3.465.0", "@slack/web-api": "^6.10.0", @@ -330,6 +331,480 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/@aws-sdk/client-qbusiness": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-qbusiness/-/client-qbusiness-3.470.0.tgz", + "integrity": "sha512-DPM/hwL2WqneeQlabMz2lG7VFZeG31A6mzEg/2LB7yzR3HM+iqC+tFXml/OIhcuyOWS62wBc8OH7bryQuhoAUg==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.470.0", + "@aws-sdk/core": "3.468.0", + "@aws-sdk/credential-provider-node": "3.470.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-signing": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/client-sso": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.470.0.tgz", + "integrity": "sha512-iMXqdXuypE3OK0rggbvSz7vBGlLDG418dNidHhdaeLluMTG/GfHbh1fLOlavhYxRwrsPrtYvFiVkxXFGzXva4w==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.468.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/client-sts": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.470.0.tgz", + "integrity": "sha512-TP3A4t8FoFEQinm6axxduTUnlMMLpmLi4Sf00JTI2CszxLUFh/JyUhYQ5gSOoXgPFmfwVXUNKCtmR3jdP0ZGPw==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.468.0", + "@aws-sdk/credential-provider-node": "3.470.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-sdk-sts": "3.468.0", + "@aws-sdk/middleware-signing": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", + "fast-xml-parser": "4.2.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/core": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.468.0.tgz", + "integrity": "sha512-ezUJR9VvknKoXzNZ4wvzGi1jdkmm+/1dUYQ9Sw4r8bzlJDTsUnWbyvaDlBQh81RuhLtVkaUfTnQKoec0cwlZKQ==", + "dependencies": { + "@smithy/smithy-client": "^2.1.18", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/credential-provider-env": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.468.0.tgz", + "integrity": "sha512-k/1WHd3KZn0EQYjadooj53FC0z24/e4dUZhbSKTULgmxyO62pwh9v3Brvw4WRa/8o2wTffU/jo54tf4vGuP/ZA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.470.0.tgz", + "integrity": "sha512-eF22iPO6J2jY+LbuTv5dW0hZBmi6ksRDFFd/zT6TLasrzH2Ex+gAfN3c7rFHF+XAubL0JXFUKFA3UAwoZpO9Zg==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.468.0", + "@aws-sdk/credential-provider-process": "3.468.0", + "@aws-sdk/credential-provider-sso": "3.470.0", + "@aws-sdk/credential-provider-web-identity": "3.468.0", + "@aws-sdk/types": "3.468.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/credential-provider-node": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.470.0.tgz", + "integrity": "sha512-paySXwzGxBVU+2cVUkRIXafKhYhtO2fJJ3MotR6euvRONK/dta+bhEc5Z4QnTo/gNLoELK/QUC0EGoF+oPfk8g==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.468.0", + "@aws-sdk/credential-provider-ini": "3.470.0", + "@aws-sdk/credential-provider-process": "3.468.0", + "@aws-sdk/credential-provider-sso": "3.470.0", + "@aws-sdk/credential-provider-web-identity": "3.468.0", + "@aws-sdk/types": "3.468.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/credential-provider-process": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.468.0.tgz", + "integrity": "sha512-OYSn1A/UsyPJ7Z8Q2cNhTf55O36shPmSsvOfND04nSfu1nPaR+VUvvsP7v+brhGpwC/GAKTIdGAo4blH31BS6A==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.470.0.tgz", + "integrity": "sha512-biGDSh9S9KDR9Tl/8cCPn9g5KPNkXg/CIJIOk3X+6valktbJ2UVYBzi0ZX4vZiudt5ry/Hsu6Pgo+KN1AmBWdg==", + "dependencies": { + "@aws-sdk/client-sso": "3.470.0", + "@aws-sdk/token-providers": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.468.0.tgz", + "integrity": "sha512-rexymPmXjtkwCPfhnUq3EjO1rSkf39R4Jz9CqiM7OsqK2qlT5Y/V3gnMKn0ZMXsYaQOMfM3cT5xly5R+OKDHlw==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/middleware-host-header": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.468.0.tgz", + "integrity": "sha512-gwQ+/QhX+lhof304r6zbZ/V5l5cjhGRxLL3CjH1uJPMcOAbw9wUlMdl+ibr8UwBZ5elfKFGiB1cdW/0uMchw0w==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/middleware-logger": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.468.0.tgz", + "integrity": "sha512-X5XHKV7DHRXI3f29SAhJPe/OxWRFgDWDMMCALfzhmJfCi6Jfh0M14cJKoC+nl+dk9lB+36+jKjhjETZaL2bPlA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.468.0.tgz", + "integrity": "sha512-vch9IQib2Ng9ucSyRW2eKNQXHUPb5jUPCLA5otTW/8nGjcOU37LxQG4WrxO7uaJ9Oe8hjHO+hViE3P0KISUhtA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/middleware-sdk-sts": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.468.0.tgz", + "integrity": "sha512-xRy8NKfHbmafHwdbotdWgHBvRs0YZgk20GrhFJKp43bkqVbJ5bNlh3nQXf1DeFY9fARR84Bfotya4fwCUHWgZg==", + "dependencies": { + "@aws-sdk/middleware-signing": "3.468.0", + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/middleware-signing": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.468.0.tgz", + "integrity": "sha512-s+7fSB1gdnnTj5O0aCCarX3z5Vppop8kazbNSZADdkfHIDWCN80IH4ZNjY3OWqaAz0HmR4LNNrovdR304ojb4Q==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.7.0", + "@smithy/util-middleware": "^2.0.8", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.470.0.tgz", + "integrity": "sha512-s0YRGgf4fT5KwwTefpoNUQfB5JghzXyvmPfY1QuFEMeVQNxv0OPuydzo3rY2oXPkZjkulKDtpm5jzIHwut75hA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/region-config-resolver": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.470.0.tgz", + "integrity": "sha512-C1o1J06iIw8cyAAOvHqT4Bbqf+PgQ/RDlSyjt2gFfP2OovDpc2o2S90dE8f8iZdSGpg70N5MikT1DBhW9NbhtQ==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.8", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/token-providers": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.470.0.tgz", + "integrity": "sha512-rzxnJxEUJiV69Cxsf0AHXTqJqTACITwcSH/PL4lWP4uvtzdrzSi3KA3u2aWHWpOcdE6+JFvdICscsbBSo3/TOg==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/types": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.468.0.tgz", + "integrity": "sha512-rx/9uHI4inRbp2tw3Y4Ih4PNZkVj32h7WneSg3MVgVjAoVD5Zti9KhS5hkvsBxfgmQmg0AQbE+b1sy5WGAgntA==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/util-endpoints": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.470.0.tgz", + "integrity": "sha512-6N6VvPCmu+89p5Ez/+gLf+X620iQ9JpIs8p8ECZiCodirzFOe8NC1O2S7eov7YiG9IHSuodqn/0qNq+v+oLe0A==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/util-endpoints": "^1.0.7", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.468.0.tgz", + "integrity": "sha512-OJyhWWsDEizR3L+dCgMXSUmaCywkiZ7HSbnQytbeKGwokIhD69HTiJcibF/sgcM5gk4k3Mq3puUhGnEZ46GIig==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", + "bowser": "^2.11.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.470.0.tgz", + "integrity": "sha512-QxsZ9iVHcBB/XRdYvwfM5AMvNp58HfqkIrH88mY0cmxuvtlIGDfWjczdDrZMJk9y0vIq+cuoCHsGXHu7PyiEAQ==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, + "node_modules/@aws-sdk/client-qbusiness/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@aws-sdk/client-s3": { "version": "3.465.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.465.0.tgz", @@ -2376,11 +2851,11 @@ } }, "node_modules/@smithy/abort-controller": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.14.tgz", - "integrity": "sha512-zXtteuYLWbSXnzI3O6xq3FYvigYZFW8mdytGibfarLL2lxHto9L3ILtGVnVGmFZa7SDh62l39EnU5hesLN87Fw==", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.15.tgz", + "integrity": "sha512-JkS36PIS3/UCbq/MaozzV7jECeL+BTt4R75bwY8i+4RASys4xOyUS1HsRyUNSqUXFP4QyCz5aNnh3ltuaxv+pw==", "dependencies": { - "@smithy/types": "^2.6.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -2405,14 +2880,14 @@ } }, "node_modules/@smithy/config-resolver": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.19.tgz", - "integrity": "sha512-JsghnQ5zjWmjEVY8TFOulLdEOCj09SjRLugrHlkPZTIBBm7PQitCFVLThbsKPZQOP7N3ME1DU1nKUc1UaVnBog==", + "version": "2.0.21", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.21.tgz", + "integrity": "sha512-rlLIGT+BeqjnA6C2FWumPRJS1UW07iU5ZxDHtFuyam4W65gIaOFMjkB90ofKCIh+0mLVQrQFrl/VLtQT/6FWTA==", "dependencies": { - "@smithy/node-config-provider": "^2.1.6", - "@smithy/types": "^2.6.0", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.7", + "@smithy/util-middleware": "^2.0.8", "tslib": "^2.5.0" }, "engines": { @@ -2420,14 +2895,14 @@ } }, "node_modules/@smithy/credential-provider-imds": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.1.2.tgz", - "integrity": "sha512-Y62jBWdoLPSYjr9fFvJf+KwTa1EunjVr6NryTEWCnwIY93OJxwV4t0qxjwdPl/XMsUkq79ppNJSEQN6Ohnhxjw==", - "dependencies": { - "@smithy/node-config-provider": "^2.1.6", - "@smithy/property-provider": "^2.0.15", - "@smithy/types": "^2.6.0", - "@smithy/url-parser": "^2.0.14", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.1.4.tgz", + "integrity": "sha512-cwPJN1fa1YOQzhBlTXRavABEYRRchci1X79QRwzaNLySnIMJfztyv1Zkst0iZPLMnpn8+CnHu3wOHS11J5Dr3A==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.8", + "@smithy/property-provider": "^2.0.16", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", "tslib": "^2.5.0" }, "engines": { @@ -2497,13 +2972,13 @@ } }, "node_modules/@smithy/fetch-http-handler": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.2.7.tgz", - "integrity": "sha512-iSDBjxuH9TgrtMYAr7j5evjvkvgwLY3y+9D547uep+JNkZ1ZT+BaeU20j6I/bO/i26ilCWFImrlXTPsfQtZdIQ==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.3.1.tgz", + "integrity": "sha512-6MNk16fqb8EwcYY8O8WxB3ArFkLZ2XppsSNo1h7SQcFdDDwIumiJeO6wRzm7iB68xvsOQzsdQKbdtTieS3hfSQ==", "dependencies": { - "@smithy/protocol-http": "^3.0.10", - "@smithy/querystring-builder": "^2.0.14", - "@smithy/types": "^2.6.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/querystring-builder": "^2.0.15", + "@smithy/types": "^2.7.0", "@smithy/util-base64": "^2.0.1", "tslib": "^2.5.0" } @@ -2520,11 +2995,11 @@ } }, "node_modules/@smithy/hash-node": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.16.tgz", - "integrity": "sha512-Wbi9A0PacMYUOwjAulQP90Wl3mQ6NDwnyrZQzFjDz+UzjXOSyQMgBrTkUBz+pVoYVlX3DUu24gWMZBcit+wOGg==", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.17.tgz", + "integrity": "sha512-Il6WuBcI1nD+e2DM7tTADMf01wEPGK8PAhz4D+YmDUVaoBqlA+CaH2uDJhiySifmuKBZj748IfygXty81znKhw==", "dependencies": { - "@smithy/types": "^2.6.0", + "@smithy/types": "^2.7.0", "@smithy/util-buffer-from": "^2.0.0", "@smithy/util-utf8": "^2.0.2", "tslib": "^2.5.0" @@ -2547,11 +3022,11 @@ } }, "node_modules/@smithy/invalid-dependency": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.14.tgz", - "integrity": "sha512-d8ohpwZo9RzTpGlAfsWtfm1SHBSU7+N4iuZ6MzR10xDTujJJWtmXYHK1uzcr7rggbpUTaWyHpPFgnf91q0EFqQ==", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.15.tgz", + "integrity": "sha512-dlEKBFFwVfzA5QroHlBS94NpgYjXhwN/bFfun+7w3rgxNvVy79SK0w05iGc7UAeC5t+D7gBxrzdnD6hreZnDVQ==", "dependencies": { - "@smithy/types": "^2.6.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" } }, @@ -2577,12 +3052,12 @@ } }, "node_modules/@smithy/middleware-content-length": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.16.tgz", - "integrity": "sha512-9ddDia3pp1d3XzLXKcm7QebGxLq9iwKf+J1LapvlSOhpF8EM9SjMeSrMOOFgG+2TfW5K3+qz4IAJYYm7INYCng==", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.17.tgz", + "integrity": "sha512-OyadvMcKC7lFXTNBa8/foEv7jOaqshQZkjWS9coEXPRZnNnihU/Ls+8ZuJwGNCOrN2WxXZFmDWhegbnM4vak8w==", "dependencies": { - "@smithy/protocol-http": "^3.0.10", - "@smithy/types": "^2.6.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -2590,16 +3065,16 @@ } }, "node_modules/@smithy/middleware-endpoint": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.2.1.tgz", - "integrity": "sha512-dVDS7HNJl/wb0lpByXor6whqDbb1YlLoaoWYoelyYzLHioXOE7y/0iDwJWtDcN36/tVCw9EPBFZ3aans84jLpg==", - "dependencies": { - "@smithy/middleware-serde": "^2.0.14", - "@smithy/node-config-provider": "^2.1.6", - "@smithy/shared-ini-file-loader": "^2.2.5", - "@smithy/types": "^2.6.0", - "@smithy/url-parser": "^2.0.14", - "@smithy/util-middleware": "^2.0.7", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.2.3.tgz", + "integrity": "sha512-nYfxuq0S/xoAjdLbyn1ixeVB6cyH9wYCMtbbOCpcCRYR5u2mMtqUtVjjPAZ/DIdlK3qe0tpB0Q76szFGNuz+kQ==", + "dependencies": { + "@smithy/middleware-serde": "^2.0.15", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/shared-ini-file-loader": "^2.2.7", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-middleware": "^2.0.8", "tslib": "^2.5.0" }, "engines": { @@ -2607,16 +3082,17 @@ } }, "node_modules/@smithy/middleware-retry": { - "version": "2.0.21", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.21.tgz", - "integrity": "sha512-EZS1EXv1k6IJX6hyu/0yNQuPcPaXwG8SWljQHYueyRbOxmqYgoWMWPtfZj0xRRQ4YtLawQSpBgAeiJltq8/MPw==", - "dependencies": { - "@smithy/node-config-provider": "^2.1.6", - "@smithy/protocol-http": "^3.0.10", - "@smithy/service-error-classification": "^2.0.7", - "@smithy/types": "^2.6.0", - "@smithy/util-middleware": "^2.0.7", - "@smithy/util-retry": "^2.0.7", + "version": "2.0.24", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.24.tgz", + "integrity": "sha512-q2SvHTYu96N7lYrn3VSuX3vRpxXHR/Cig6MJpGWxd0BWodUQUWlKvXpWQZA+lTaFJU7tUvpKhRd4p4MU3PbeJg==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.8", + "@smithy/protocol-http": "^3.0.11", + "@smithy/service-error-classification": "^2.0.8", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/util-middleware": "^2.0.8", + "@smithy/util-retry": "^2.0.8", "tslib": "^2.5.0", "uuid": "^8.3.2" }, @@ -2633,11 +3109,11 @@ } }, "node_modules/@smithy/middleware-serde": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.14.tgz", - "integrity": "sha512-hFi3FqoYWDntCYA2IGY6gJ6FKjq2gye+1tfxF2HnIJB5uW8y2DhpRNBSUMoqP+qvYzRqZ6ntv4kgbG+o3pX57g==", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.15.tgz", + "integrity": "sha512-FOZRFk/zN4AT4wzGuBY+39XWe+ZnCFd0gZtyw3f9Okn2CJPixl9GyWe98TIaljeZdqWkgrzGyPre20AcW2UMHQ==", "dependencies": { - "@smithy/types": "^2.6.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -2645,11 +3121,11 @@ } }, "node_modules/@smithy/middleware-stack": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.8.tgz", - "integrity": "sha512-7/N59j0zWqVEKExJcA14MrLDZ/IeN+d6nbkN8ucs+eURyaDUXWYlZrQmMOd/TyptcQv0+RDlgag/zSTTV62y/Q==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.9.tgz", + "integrity": "sha512-bCB5dUtGQ5wh7QNL2ELxmDc6g7ih7jWU3Kx6MYH1h4mZbv9xL3WyhKHojRltThCB1arLPyTUFDi+x6fB/oabtA==", "dependencies": { - "@smithy/types": "^2.6.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -2657,13 +3133,13 @@ } }, "node_modules/@smithy/node-config-provider": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.6.tgz", - "integrity": "sha512-HLqTs6O78m3M3z1cPLFxddxhEPv5MkVatfPuxoVO3A+cHZanNd/H5I6btcdHy6N2CB1MJ/lihJC92h30SESsBA==", + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.8.tgz", + "integrity": "sha512-+w26OKakaBUGp+UG+dxYZtFb5fs3tgHg3/QrRrmUZj+rl3cIuw840vFUXX35cVPTUCQIiTqmz7CpVF7+hdINdQ==", "dependencies": { - "@smithy/property-provider": "^2.0.15", - "@smithy/shared-ini-file-loader": "^2.2.5", - "@smithy/types": "^2.6.0", + "@smithy/property-provider": "^2.0.16", + "@smithy/shared-ini-file-loader": "^2.2.7", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -2671,14 +3147,14 @@ } }, "node_modules/@smithy/node-http-handler": { - "version": "2.1.10", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.1.10.tgz", - "integrity": "sha512-lkALAwtN6odygIM4nB8aHDahINM6WXXjNrZmWQAh0RSossySRT2qa31cFv0ZBuAYVWeprskRk13AFvvLmf1WLw==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.2.1.tgz", + "integrity": "sha512-8iAKQrC8+VFHPAT8pg4/j6hlsTQh+NKOWlctJBrYtQa4ExcxX7aSg3vdQ2XLoYwJotFUurg/NLqFCmZaPRrogw==", "dependencies": { - "@smithy/abort-controller": "^2.0.14", - "@smithy/protocol-http": "^3.0.10", - "@smithy/querystring-builder": "^2.0.14", - "@smithy/types": "^2.6.0", + "@smithy/abort-controller": "^2.0.15", + "@smithy/protocol-http": "^3.0.11", + "@smithy/querystring-builder": "^2.0.15", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -2686,11 +3162,11 @@ } }, "node_modules/@smithy/property-provider": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.15.tgz", - "integrity": "sha512-YbRFBn8oiiC3o1Kn3a4KjGa6k47rCM9++5W9cWqYn9WnkyH+hBWgfJAckuxpyA2Hq6Ys4eFrWzXq6fqHEw7iew==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.16.tgz", + "integrity": "sha512-28Ky0LlOqtEjwg5CdHmwwaDRHcTWfPRzkT6HrhwOSRS2RryAvuDfJrZpM+BMcrdeCyEg1mbcgIMoqTla+rdL8Q==", "dependencies": { - "@smithy/types": "^2.6.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -2698,11 +3174,11 @@ } }, "node_modules/@smithy/protocol-http": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.10.tgz", - "integrity": "sha512-6+tjNk7rXW7YTeGo9qwxXj/2BFpJTe37kTj3EnZCoX/nH+NP/WLA7O83fz8XhkGqsaAhLUPo/bB12vvd47nsmg==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.11.tgz", + "integrity": "sha512-3ziB8fHuXIRamV/akp/sqiWmNPR6X+9SB8Xxnozzj+Nq7hSpyKdFHd1FLpBkgfGFUTzzcBJQlDZPSyxzmdcx5A==", "dependencies": { - "@smithy/types": "^2.6.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -2710,11 +3186,11 @@ } }, "node_modules/@smithy/querystring-builder": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.14.tgz", - "integrity": "sha512-lQ4pm9vTv9nIhl5jt6uVMPludr6syE2FyJmHsIJJuOD7QPIJnrf9HhUGf1iHh9KJ4CUv21tpOU3X6s0rB6uJ0g==", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.15.tgz", + "integrity": "sha512-e1q85aT6HutvouOdN+dMsN0jcdshp50PSCvxDvo6aIM57LqeXimjfONUEgfqQ4IFpYWAtVixptyIRE5frMp/2A==", "dependencies": { - "@smithy/types": "^2.6.0", + "@smithy/types": "^2.7.0", "@smithy/util-uri-escape": "^2.0.0", "tslib": "^2.5.0" }, @@ -2723,11 +3199,11 @@ } }, "node_modules/@smithy/querystring-parser": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.14.tgz", - "integrity": "sha512-+cbtXWI9tNtQjlgQg3CA+pvL3zKTAxPnG3Pj6MP89CR3vi3QMmD0SOWoq84tqZDnJCxlsusbgIXk1ngMReXo+A==", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.15.tgz", + "integrity": "sha512-jbBvoK3cc81Cj1c1TH1qMYxNQKHrYQ2DoTntN9FBbtUWcGhc+T4FP6kCKYwRLXyU4AajwGIZstvNAmIEgUUNTQ==", "dependencies": { - "@smithy/types": "^2.6.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -2735,22 +3211,22 @@ } }, "node_modules/@smithy/service-error-classification": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.7.tgz", - "integrity": "sha512-LLxgW12qGz8doYto15kZ4x1rHjtXl0BnCG6T6Wb8z2DI4PT9cJfOSvzbuLzy7+5I24PAepKgFeWHRd9GYy3Z9w==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.8.tgz", + "integrity": "sha512-jCw9+005im8tsfYvwwSc4TTvd29kXRFkH9peQBg5R/4DD03ieGm6v6Hpv9nIAh98GwgYg1KrztcINC1s4o7/hg==", "dependencies": { - "@smithy/types": "^2.6.0" + "@smithy/types": "^2.7.0" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/shared-ini-file-loader": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.5.tgz", - "integrity": "sha512-LHA68Iu7SmNwfAVe8egmjDCy648/7iJR/fK1UnVw+iAOUJoEYhX2DLgVd5pWllqdDiRbQQzgaHLcRokM+UFR1w==", + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.7.tgz", + "integrity": "sha512-0Qt5CuiogIuvQIfK+be7oVHcPsayLgfLJGkPlbgdbl0lD28nUKu4p11L+UG3SAEsqc9UsazO+nErPXw7+IgDpQ==", "dependencies": { - "@smithy/types": "^2.6.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -2776,13 +3252,13 @@ } }, "node_modules/@smithy/smithy-client": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.1.16.tgz", - "integrity": "sha512-Lw67+yQSpLl4YkDLUzI2KgS8TXclXmbzSeOJUmRFS4ueT56B4pw3RZRF/SRzvgyxM/HxgkUan8oSHXCujPDafQ==", + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.1.18.tgz", + "integrity": "sha512-7FqdbaJiVaHJDD9IfDhmzhSDbpjyx+ZsfdYuOpDJF09rl8qlIAIlZNoSaflKrQ3cEXZN2YxGPaNWGhbYimyIRQ==", "dependencies": { - "@smithy/middleware-stack": "^2.0.8", - "@smithy/types": "^2.6.0", - "@smithy/util-stream": "^2.0.21", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/types": "^2.7.0", + "@smithy/util-stream": "^2.0.23", "tslib": "^2.5.0" }, "engines": { @@ -2790,9 +3266,9 @@ } }, "node_modules/@smithy/types": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.6.0.tgz", - "integrity": "sha512-PgqxJq2IcdMF9iAasxcqZqqoOXBHufEfmbEUdN1pmJrJltT42b0Sc8UiYSWWzKkciIp9/mZDpzYi4qYG1qqg6g==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.7.0.tgz", + "integrity": "sha512-1OIFyhK+vOkMbu4aN2HZz/MomREkrAC/HqY5mlJMUJfGrPRwijJDTeiN8Rnj9zUaB8ogXAfIOtZrrgqZ4w7Wnw==", "dependencies": { "tslib": "^2.5.0" }, @@ -2801,12 +3277,12 @@ } }, "node_modules/@smithy/url-parser": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.14.tgz", - "integrity": "sha512-kbu17Y1AFXi5lNlySdDj7ZzmvupyWKCX/0jNZ8ffquRyGdbDZb+eBh0QnWqsSmnZa/ctyWaTf7n4l/pXLExrnw==", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.15.tgz", + "integrity": "sha512-sADUncUj9rNbOTrdDGm4EXlUs0eQ9dyEo+V74PJoULY4jSQxS+9gwEgsPYyiu8PUOv16JC/MpHonOgqP/IEDZA==", "dependencies": { - "@smithy/querystring-parser": "^2.0.14", - "@smithy/types": "^2.6.0", + "@smithy/querystring-parser": "^2.0.15", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" } }, @@ -2823,9 +3299,9 @@ } }, "node_modules/@smithy/util-body-length-browser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.0.0.tgz", - "integrity": "sha512-JdDuS4ircJt+FDnaQj88TzZY3+njZ6O+D3uakS32f2VNnDo3vyEuNdBOh/oFd8Df1zSZOuH1HEChk2AOYDezZg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.0.1.tgz", + "integrity": "sha512-NXYp3ttgUlwkaug4bjBzJ5+yIbUbUx8VsSLuHZROQpoik+gRkIBeEG9MPVYfvPNpuXb/puqodeeUXcKFe7BLOQ==", "dependencies": { "tslib": "^2.5.0" } @@ -2865,13 +3341,13 @@ } }, "node_modules/@smithy/util-defaults-mode-browser": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.20.tgz", - "integrity": "sha512-QJtnbTIl0/BbEASkx1MUFf6EaoWqWW1/IM90N++8NNscePvPf77GheYfpoPis6CBQawUWq8QepTP2QUSAdrVkw==", + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.22.tgz", + "integrity": "sha512-qcF20IHHH96FlktvBRICDXDhLPtpVmtksHmqNGtotb9B0DYWXsC6jWXrkhrrwF7tH26nj+npVTqh9isiFV1gdA==", "dependencies": { - "@smithy/property-provider": "^2.0.15", - "@smithy/smithy-client": "^2.1.16", - "@smithy/types": "^2.6.0", + "@smithy/property-provider": "^2.0.16", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", "bowser": "^2.11.0", "tslib": "^2.5.0" }, @@ -2880,16 +3356,16 @@ } }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "2.0.26", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.26.tgz", - "integrity": "sha512-lGFPOFCHv1ql019oegYqa54BZH7HREw6EBqjDLbAr0wquMX0BDi2sg8TJ6Eq+JGLijkZbJB73m4+aK8OFAapMg==", - "dependencies": { - "@smithy/config-resolver": "^2.0.19", - "@smithy/credential-provider-imds": "^2.1.2", - "@smithy/node-config-provider": "^2.1.6", - "@smithy/property-provider": "^2.0.15", - "@smithy/smithy-client": "^2.1.16", - "@smithy/types": "^2.6.0", + "version": "2.0.29", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.29.tgz", + "integrity": "sha512-+uG/15VoUh6JV2fdY9CM++vnSuMQ1VKZ6BdnkUM7R++C/vLjnlg+ToiSR1FqKZbMmKBXmsr8c/TsDWMAYvxbxQ==", + "dependencies": { + "@smithy/config-resolver": "^2.0.21", + "@smithy/credential-provider-imds": "^2.1.4", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/property-provider": "^2.0.16", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -2897,12 +3373,12 @@ } }, "node_modules/@smithy/util-endpoints": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.0.5.tgz", - "integrity": "sha512-K7qNuCOD5K/90MjHvHm9kJldrfm40UxWYQxNEShMFxV/lCCCRIg8R4uu1PFAxRvPxNpIdcrh1uK6I1ISjDXZJw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.0.7.tgz", + "integrity": "sha512-Q2gEind3jxoLk6hdKWyESMU7LnXz8aamVwM+VeVjOYzYT1PalGlY/ETa48hv2YpV4+YV604y93YngyzzzQ4IIA==", "dependencies": { - "@smithy/node-config-provider": "^2.1.6", - "@smithy/types": "^2.6.0", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -2921,11 +3397,11 @@ } }, "node_modules/@smithy/util-middleware": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.7.tgz", - "integrity": "sha512-tRINOTlf1G9B0ECarFQAtTgMhpnrMPSa+5j4ZEwEawCLfTFTavk6757sxhE4RY5RMlD/I3x+DCS8ZUiR8ho9Pw==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.8.tgz", + "integrity": "sha512-qkvqQjM8fRGGA8P2ydWylMhenCDP8VlkPn8kiNuFEaFz9xnUKC2irfqsBSJrfrOB9Qt6pQsI58r3zvvumhFMkw==", "dependencies": { - "@smithy/types": "^2.6.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -2933,12 +3409,12 @@ } }, "node_modules/@smithy/util-retry": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.7.tgz", - "integrity": "sha512-fIe5yARaF0+xVT1XKcrdnHKTJ1Vc4+3e3tLDjCuIcE9b6fkBzzGFY7AFiX4M+vj6yM98DrwkuZeHf7/hmtVp0Q==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.8.tgz", + "integrity": "sha512-cQTPnVaVFMjjS6cb44WV2yXtHVyXDC5icKyIbejMarJEApYeJWpBU3LINTxHqp/tyLI+MZOUdosr2mZ3sdziNg==", "dependencies": { - "@smithy/service-error-classification": "^2.0.7", - "@smithy/types": "^2.6.0", + "@smithy/service-error-classification": "^2.0.8", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -2946,13 +3422,13 @@ } }, "node_modules/@smithy/util-stream": { - "version": "2.0.21", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.21.tgz", - "integrity": "sha512-0BUE16d7n1x7pi1YluXJdB33jOTyBChT0j/BlOkFa9uxfg6YqXieHxjHNuCdJRARa7AZEj32LLLEPJ1fSa4inA==", + "version": "2.0.23", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.23.tgz", + "integrity": "sha512-OJMWq99LAZJUzUwTk+00plyxX3ESktBaGPhqNIEVab+53gLULiWN9B/8bRABLg0K6R6Xg4t80uRdhk3B/LZqMQ==", "dependencies": { - "@smithy/fetch-http-handler": "^2.2.7", - "@smithy/node-http-handler": "^2.1.10", - "@smithy/types": "^2.6.0", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/types": "^2.7.0", "@smithy/util-base64": "^2.0.1", "@smithy/util-buffer-from": "^2.0.0", "@smithy/util-hex-encoding": "^2.0.0", @@ -3959,9 +4435,9 @@ } }, "node_modules/aws-sdk": { - "version": "2.1502.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1502.0.tgz", - "integrity": "sha512-mUXUaWmbIyqE6zyIcbUUQIUgw1evK7gV1vQP7ZZEE0qi6hO2Mw99Nc25Bh+187yvRxamMTsFXvvmBViR0Q75SA==", + "version": "2.1515.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1515.0.tgz", + "integrity": "sha512-v/GQOebvSLmtdaF5SUk9B84xtJWEv2jX9ZJf2xfz9uE+Gt7Ldb3LyKIvyw7RzTqh6x51bNPnRhpafpjM1TIwvA==", "dependencies": { "buffer": "4.9.2", "events": "1.1.1", @@ -5360,9 +5836,9 @@ "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" }, "node_modules/follow-redirects": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", - "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", + "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", "funding": [ { "type": "individual", diff --git a/package.json b/package.json index f55a911..807055f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my_amazon_q_slack_bot", - "version": "0.1.1", + "version": "0.1.2", "bin": { "my_enterprise_q_slack_bot": "bin/my_amazon_q_slack_bot.js" }, @@ -26,14 +26,15 @@ "eslint-config-prettier": "^9.0.0", "eslint-plugin-prettier": "^5.0.0", "jest": "^29.0.0", + "jszip": "^3.10.1", "prettier": "^3.0.3", "ts-jest": "^29.1.1", "ts-node": "^10.9.1", - "typescript": "~4.6.3", - "jszip": "^3.10.1" + "typescript": "~4.6.3" }, "dependencies": { "@aws-sdk/client-cloudformation": "^3.465.0", + "@aws-sdk/client-qbusiness": "^3.470.0", "@aws-sdk/client-s3": "^3.465.0", "@aws-sdk/lib-dynamodb": "^3.465.0", "@slack/web-api": "^6.10.0", diff --git a/src/functions/slack-command-handler.ts b/src/functions/slack-command-handler.ts index ca6f4ef..e7acacb 100644 --- a/src/functions/slack-command-handler.ts +++ b/src/functions/slack-command-handler.ts @@ -9,7 +9,6 @@ const logger = makeLogger('slack-command-handler'); const processSlackEventsEnv = (env: NodeJS.ProcessEnv) => ({ REGION: getOrThrowIfEmpty(env.AWS_REGION ?? env.AWS_DEFAULT_REGION), SLACK_SECRET_NAME: getOrThrowIfEmpty(env.SLACK_SECRET_NAME), - AMAZON_Q_ENDPOINT: env.AMAZON_Q_ENDPOINT, AMAZON_Q_APP_ID: getOrThrowIfEmpty(env.AMAZON_Q_APP_ID), AMAZON_Q_USER_ID: env.AMAZON_Q_USER_ID, AMAZON_Q_REGION: getOrThrowIfEmpty(env.AMAZON_Q_REGION), diff --git a/src/functions/slack-event-handler.ts b/src/functions/slack-event-handler.ts index ba8f424..094ef50 100644 --- a/src/functions/slack-event-handler.ts +++ b/src/functions/slack-event-handler.ts @@ -11,15 +11,14 @@ import { getOrThrowIfEmpty, isEmpty } from '@src/utils'; import { makeLogger } from '@src/logging'; import { chat } from '@helpers/amazon-q/amazon-q-helpers'; import { UsersInfoResponse } from '@slack/web-api'; -import { Attachment } from '@src/helpers/chat'; import { FileElement } from '@slack/web-api/dist/response/ConversationsRepliesResponse'; +import { AttachmentInput } from '@aws-sdk/client-qbusiness'; const logger = makeLogger('slack-event-handler'); const processSlackEventsEnv = (env: NodeJS.ProcessEnv) => ({ REGION: getOrThrowIfEmpty(env.AWS_REGION ?? env.AWS_DEFAULT_REGION), SLACK_SECRET_NAME: getOrThrowIfEmpty(env.SLACK_SECRET_NAME), - AMAZON_Q_ENDPOINT: env.AMAZON_Q_ENDPOINT, AMAZON_Q_APP_ID: getOrThrowIfEmpty(env.AMAZON_Q_APP_ID), AMAZON_Q_USER_ID: env.AMAZON_Q_USER_ID, AMAZON_Q_REGION: getOrThrowIfEmpty(env.AMAZON_Q_REGION), @@ -50,8 +49,8 @@ const SUPPORTED_FILE_TYPES = [ const attachFiles = async ( slackEventsEnv: SlackEventsEnv, files: FileElement[] -): Promise => { - const newAttachments: Attachment[] = []; +): Promise => { + const newAttachments: AttachmentInput[] = []; for (const f of files) { // Check if the file type is supported if ( @@ -175,7 +174,7 @@ export const handler = async ( parentMessageId: channelMetadata?.systemMessageId }; - let attachments: Attachment[] = []; + let attachments: AttachmentInput[] = []; const input = []; const userInformationCache: Record = {}; const stripMentions = (text?: string) => text?.replace(/<@[A-Z0-9]+>/g, '').trim(); @@ -292,8 +291,8 @@ export const handler = async ( const fileErrorMessages = []; for (const f of output.failedAttachments) { if (f.status === 'FAILED') { - logger.debug(`Failed attachment: File ${f.name} - ${f.error.errorMessage}`); - fileErrorMessages.push(` \u2022 ${f.name}: ${f.error.errorMessage}`); + logger.debug(`Failed attachment: File ${f.name} - ${f.error?.errorMessage}`); + fileErrorMessages.push(` \u2022 ${f.name}: ${f.error?.errorMessage}`); } } if (!isEmpty(fileErrorMessages)) { @@ -311,8 +310,8 @@ export const handler = async ( await Promise.all([ saveChannelMetadata( channelKey, - output.conversationId, - output.systemMessageId, + output.conversationId ?? '', + output.systemMessageId ?? '', dependencies, slackEventsEnv ), diff --git a/src/functions/slack-interaction-handler.ts b/src/functions/slack-interaction-handler.ts index 6e08cc2..2a139bd 100644 --- a/src/functions/slack-interaction-handler.ts +++ b/src/functions/slack-interaction-handler.ts @@ -9,14 +9,13 @@ import { import { getOrThrowIfEmpty, isEmpty } from '@src/utils'; import { makeLogger } from '@src/logging'; import { chatDependencies, getMessageMetadata } from '@helpers/chat'; -import { AmazonQResponse } from '@helpers/amazon-q/amazon-q-client'; +import { ChatSyncCommandOutput } from '@aws-sdk/client-qbusiness'; const logger = makeLogger('slack-interactions-handler'); const processSlackInteractionsEnv = (env: NodeJS.ProcessEnv) => ({ REGION: getOrThrowIfEmpty(env.AWS_REGION ?? env.AWS_DEFAULT_REGION), SLACK_SECRET_NAME: getOrThrowIfEmpty(env.SLACK_SECRET_NAME), - AMAZON_Q_ENDPOINT: env.AMAZON_Q_ENDPOINT, AMAZON_Q_APP_ID: getOrThrowIfEmpty(env.AMAZON_Q_APP_ID), AMAZON_Q_USER_ID: env.AMAZON_Q_USER_ID, AMAZON_Q_REGION: getOrThrowIfEmpty(env.AMAZON_Q_REGION), @@ -98,7 +97,7 @@ export const handler = async ( action.value, dependencies, slackInteractionsEnv - )) as AmazonQResponse; + )) as ChatSyncCommandOutput; if ( id === SLACK_ACTION[SLACK_ACTION.VIEW_SOURCES] && !isEmpty(messageMetadata?.sourceAttributions) @@ -128,8 +127,8 @@ export const handler = async ( await dependencies.submitFeedbackRequest( slackInteractionsEnv, { - conversationId: messageMetadata.conversationId, - messageId: messageMetadata.systemMessageId + conversationId: messageMetadata.conversationId ?? '', + messageId: messageMetadata.systemMessageId ?? '' }, id === SLACK_ACTION[SLACK_ACTION.FEEDBACK_UP] ? 'USEFUL' : 'NOT_USEFUL', id === SLACK_ACTION[SLACK_ACTION.FEEDBACK_UP] ? 'HELPFUL' : 'NOT_HELPFUL', diff --git a/src/helpers/amazon-q/amazon-q-client.ts b/src/helpers/amazon-q/amazon-q-client.ts index c16f7b9..75e76f8 100644 --- a/src/helpers/amazon-q/amazon-q-client.ts +++ b/src/helpers/amazon-q/amazon-q-client.ts @@ -1,76 +1,28 @@ import { SlackEventsEnv } from '@functions/slack-event-handler'; import { SlackInteractionsEnv } from '@functions/slack-interaction-handler'; -import { isEmpty } from '@src/utils'; -import { Attachment, ChatResponse } from '@helpers/chat'; import { makeLogger } from '@src/logging'; import { v4 as uuid } from 'uuid'; +import { + QBusinessClient, + ChatSyncCommand, + PutFeedbackCommand, + PutFeedbackCommandInput, + MessageUsefulnessReason, + MessageUsefulness, + PutFeedbackCommandOutput, + ChatSyncCommandOutput, + AttachmentInput +} from '@aws-sdk/client-qbusiness'; -// Required, as those types are not yet available in CDK -/* eslint @typescript-eslint/no-var-requires: "off" */ -/* eslint @typescript-eslint/no-explicit-any: "off" */ -const AWS = require('aws-sdk'); const logger = makeLogger('amazon-q-client'); -export interface AmazonQResponse extends ChatResponse { - conversationId: string; - systemMessageId: string; - userMessageId: string; - sourceAttributions?: SourceAttribution[]; - failedAttachments?: AttachmentOutput[]; -} +let amazonQClient: QBusinessClient | null = null; -export interface SourceAttribution { - title?: string; - snippet?: string; - url?: string; - citationNumber?: number; - updatedAt?: string; - textMessageSegments?: TextSegment[]; -} - -export interface TextSegment { - beginOffset?: number; - endOffset?: number; -} - -export interface AttachmentOutput { - name: string; - status: string; - error: AttachmentErrorDetail; -} - -export interface AttachmentErrorDetail { - errorMessage: string; - errorCode: string; -} - -export const initAmazonQSDK = () => { - AWS.apiLoader.services.expertq = {}; - AWS.ExpertQ = AWS.Service.defineService('expertq', ['2023-11-27']); - Object.defineProperty(AWS.apiLoader.services.expertq, '2023-11-27', { - get: function get() { - const model = require('./amazon-q.json'); - model.paginators = {}; - return model; - }, - enumerable: true, - configurable: true - }); -}; - -let amazonQClient: unknown = null; export const getClient = (env: SlackEventsEnv) => { if (amazonQClient === null) { - initAmazonQSDK(); - if (isEmpty(env.AMAZON_Q_ENDPOINT)) { - env.AMAZON_Q_ENDPOINT = `https://qbusiness.${env.AMAZON_Q_REGION}.api.aws`; - } - logger.debug( - `Initiating AmazonQ client with region ${env.AMAZON_Q_REGION} and endpoint ${env.AMAZON_Q_ENDPOINT}` - ); - amazonQClient = new AWS.ExpertQ({ - region: env.AMAZON_Q_REGION, - endpoint: env.AMAZON_Q_ENDPOINT + logger.debug(`Initiating AmazonQ client with region ${env.AMAZON_Q_REGION}`); + amazonQClient = new QBusinessClient({ + region: env.AMAZON_Q_REGION }); } @@ -79,13 +31,13 @@ export const getClient = (env: SlackEventsEnv) => { export const callClient = async ( message: string, - attachments: Attachment[], + attachments: AttachmentInput[], env: SlackEventsEnv, context?: { conversationId: string; parentMessageId: string; } -): Promise => { +): Promise => { const input = { applicationId: env.AMAZON_Q_APP_ID, userId: env.AMAZON_Q_USER_ID, @@ -96,7 +48,7 @@ export const callClient = async ( }; logger.debug(`callClient input ${JSON.stringify(input)}`); - return await (getClient(env) as any).chatSync(input).promise(); + return await getClient(env).send(new ChatSyncCommand(input)); }; export const submitFeedbackRequest = async ( @@ -105,23 +57,24 @@ export const submitFeedbackRequest = async ( conversationId: string; messageId: string; }, - usefulness: 'USEFUL' | 'NOT_USEFUL', - reason: 'HELPFUL' | 'NOT_HELPFUL', + usefulness: MessageUsefulness, + reason: MessageUsefulnessReason, submittedAt: string -): Promise => { - const input = { +): Promise => { + const input: PutFeedbackCommandInput = { applicationId: env.AMAZON_Q_APP_ID, userId: env.AMAZON_Q_USER_ID, ...context, messageUsefulness: { usefulness: usefulness, reason: reason, - submittedAt: Number(submittedAt) + // Slack ts format E.g. 1702282895.883219 + submittedAt: new Date(Number(submittedAt) * 1000) } }; logger.debug(`putFeedbackRequest input ${JSON.stringify(input)}`); - const response = await (getClient(env) as any).putFeedback(input).promise(); + const response = await getClient(env).send(new PutFeedbackCommand(input)); logger.debug(`putFeedbackRequest output ${JSON.stringify(response)}`); return response; diff --git a/src/helpers/amazon-q/amazon-q-helpers.ts b/src/helpers/amazon-q/amazon-q-helpers.ts index 3d067bf..67bb3a7 100644 --- a/src/helpers/amazon-q/amazon-q-helpers.ts +++ b/src/helpers/amazon-q/amazon-q-helpers.ts @@ -1,10 +1,10 @@ import { SlackEventsEnv } from '@functions/slack-event-handler'; import { createButton, getMarkdownBlocks, SLACK_ACTION } from '@helpers/slack/slack-helpers'; -import { AmazonQResponse } from '@helpers/amazon-q/amazon-q-client'; import { makeLogger } from '@src/logging'; import { isEmpty } from '@src/utils'; -import { ChatDependencies, Attachment } from '@src/helpers/chat'; +import { ChatDependencies } from '@src/helpers/chat'; import { Block } from '@slack/web-api'; +import { ChatSyncCommandOutput, AttachmentInput } from '@aws-sdk/client-qbusiness'; const logger = makeLogger('amazon-q-helpers'); @@ -14,14 +14,14 @@ const WARN_TRUNCATED = `| Please note that you do not have all the conversation export const chat = async ( incomingMessage: string, - attachments: Attachment[], + attachments: AttachmentInput[], dependencies: ChatDependencies, env: SlackEventsEnv, context?: { conversationId: string; parentMessageId: string; } -): Promise => { +): Promise => { try { // Enforce max input message limit - may cause undesired side effects // TODO consider 'smarter' truncating of number of chat history messages, etc. rather @@ -46,7 +46,7 @@ export const chat = async ( } }; -export const getResponseAsBlocks = (response: AmazonQResponse) => { +export const getResponseAsBlocks = (response: ChatSyncCommandOutput) => { if (isEmpty(response.systemMessage)) { return []; } @@ -60,12 +60,12 @@ export const getResponseAsBlocks = (response: AmazonQResponse) => { `${convertHN(getTablePrefix(content))}\n\n${parseTable(getTable(content))}` )), ...(!isEmpty(response.sourceAttributions) - ? [createButton('View source(s)', response.systemMessageId)] + ? [createButton('View source(s)', response.systemMessageId ?? '')] : []) ]; }; -export const getFeedbackBlocks = (response: AmazonQResponse): Block[] => [ +export const getFeedbackBlocks = (response: ChatSyncCommandOutput): Block[] => [ { type: 'actions', block_id: `feedback-${response.conversationId}-${response.systemMessageId}`, diff --git a/src/helpers/amazon-q/amazon-q.json b/src/helpers/amazon-q/amazon-q.json deleted file mode 100644 index 20eb3b1..0000000 --- a/src/helpers/amazon-q/amazon-q.json +++ /dev/null @@ -1,4442 +0,0 @@ -{ - "version":"2.0", - "metadata":{ - "apiVersion":"2023-11-27", - "endpointPrefix":"qbusiness", - "jsonVersion":"1.1", - "protocol":"rest-json", - "protocolSettings":{"h2":"eventstream"}, - "serviceFullName":"QBusiness", - "serviceId":"QBusiness", - "signatureVersion":"v4", - "signingName":"qbusiness", - "uid":"qbusiness-2023-11-27" - }, - "operations":{ - "BatchDeleteDocument":{ - "name":"BatchDeleteDocument", - "http":{ - "method":"POST", - "requestUri":"/applications/{applicationId}/indices/{indexId}/documents/delete", - "responseCode":200 - }, - "input":{"shape":"BatchDeleteDocumentRequest"}, - "output":{"shape":"BatchDeleteDocumentResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "BatchPutDocument":{ - "name":"BatchPutDocument", - "http":{ - "method":"POST", - "requestUri":"/applications/{applicationId}/indices/{indexId}/documents", - "responseCode":200 - }, - "input":{"shape":"BatchPutDocumentRequest"}, - "output":{"shape":"BatchPutDocumentResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"}, - {"shape":"ServiceQuotaExceededException"} - ] - }, - "ChatSync":{ - "name":"ChatSync", - "http":{ - "method":"POST", - "requestUri":"/applications/{applicationId}/conversations?sync", - "responseCode":200 - }, - "input":{"shape":"ChatSyncInput"}, - "output":{"shape":"ChatSyncOutput"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"LicenseNotFoundException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "CreateApplication":{ - "name":"CreateApplication", - "http":{ - "method":"POST", - "requestUri":"/applications", - "responseCode":200 - }, - "input":{"shape":"CreateApplicationRequest"}, - "output":{"shape":"CreateApplicationResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"}, - {"shape":"ServiceQuotaExceededException"} - ], - "idempotent":true - }, - "CreateDataSource":{ - "name":"CreateDataSource", - "http":{ - "method":"POST", - "requestUri":"/applications/{applicationId}/indices/{indexId}/datasources", - "responseCode":200 - }, - "input":{"shape":"CreateDataSourceRequest"}, - "output":{"shape":"CreateDataSourceResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"}, - {"shape":"ServiceQuotaExceededException"} - ], - "idempotent":true - }, - "CreateIndex":{ - "name":"CreateIndex", - "http":{ - "method":"POST", - "requestUri":"/applications/{applicationId}/indices", - "responseCode":200 - }, - "input":{"shape":"CreateIndexRequest"}, - "output":{"shape":"CreateIndexResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"}, - {"shape":"ServiceQuotaExceededException"} - ] - }, - "CreatePlugin":{ - "name":"CreatePlugin", - "http":{ - "method":"POST", - "requestUri":"/applications/{applicationId}/plugins", - "responseCode":200 - }, - "input":{"shape":"CreatePluginRequest"}, - "output":{"shape":"CreatePluginResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"}, - {"shape":"ServiceQuotaExceededException"} - ], - "idempotent":true - }, - "CreateRetriever":{ - "name":"CreateRetriever", - "http":{ - "method":"POST", - "requestUri":"/applications/{applicationId}/retrievers", - "responseCode":200 - }, - "input":{"shape":"CreateRetrieverRequest"}, - "output":{"shape":"CreateRetrieverResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"}, - {"shape":"ServiceQuotaExceededException"} - ] - }, - "CreateUser":{ - "name":"CreateUser", - "http":{ - "method":"POST", - "requestUri":"/applications/{applicationId}/users", - "responseCode":200 - }, - "input":{"shape":"CreateUserRequest"}, - "output":{"shape":"CreateUserResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"}, - {"shape":"ServiceQuotaExceededException"} - ], - "idempotent":true - }, - "CreateWebExperience":{ - "name":"CreateWebExperience", - "http":{ - "method":"POST", - "requestUri":"/applications/{applicationId}/experiences", - "responseCode":200 - }, - "input":{"shape":"CreateWebExperienceRequest"}, - "output":{"shape":"CreateWebExperienceResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"}, - {"shape":"ServiceQuotaExceededException"} - ] - }, - "DeleteApplication":{ - "name":"DeleteApplication", - "http":{ - "method":"DELETE", - "requestUri":"/applications/{applicationId}", - "responseCode":200 - }, - "input":{"shape":"DeleteApplicationRequest"}, - "output":{"shape":"DeleteApplicationResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ], - "idempotent":true - }, - "DeleteChatControlsConfiguration":{ - "name":"DeleteChatControlsConfiguration", - "http":{ - "method":"DELETE", - "requestUri":"/applications/{applicationId}/chatcontrols", - "responseCode":200 - }, - "input":{"shape":"DeleteChatControlsConfigurationRequest"}, - "output":{"shape":"DeleteChatControlsConfigurationResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ], - "idempotent":true - }, - "DeleteConversation":{ - "name":"DeleteConversation", - "http":{ - "method":"DELETE", - "requestUri":"/applications/{applicationId}/conversations/{conversationId}", - "responseCode":200 - }, - "input":{"shape":"DeleteConversationRequest"}, - "output":{"shape":"DeleteConversationResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"LicenseNotFoundException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ], - "idempotent":true - }, - "DeleteDataSource":{ - "name":"DeleteDataSource", - "http":{ - "method":"DELETE", - "requestUri":"/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}", - "responseCode":200 - }, - "input":{"shape":"DeleteDataSourceRequest"}, - "output":{"shape":"DeleteDataSourceResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ], - "idempotent":true - }, - "DeleteGroup":{ - "name":"DeleteGroup", - "http":{ - "method":"DELETE", - "requestUri":"/applications/{applicationId}/indices/{indexId}/groups/{groupName}", - "responseCode":200 - }, - "input":{"shape":"DeleteGroupRequest"}, - "output":{"shape":"DeleteGroupResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ], - "idempotent":true - }, - "DeleteIndex":{ - "name":"DeleteIndex", - "http":{ - "method":"DELETE", - "requestUri":"/applications/{applicationId}/indices/{indexId}", - "responseCode":200 - }, - "input":{"shape":"DeleteIndexRequest"}, - "output":{"shape":"DeleteIndexResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ], - "idempotent":true - }, - "DeletePlugin":{ - "name":"DeletePlugin", - "http":{ - "method":"DELETE", - "requestUri":"/applications/{applicationId}/plugins/{pluginId}", - "responseCode":200 - }, - "input":{"shape":"DeletePluginRequest"}, - "output":{"shape":"DeletePluginResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ], - "idempotent":true - }, - "DeleteRetriever":{ - "name":"DeleteRetriever", - "http":{ - "method":"DELETE", - "requestUri":"/applications/{applicationId}/retrievers/{retrieverId}", - "responseCode":200 - }, - "input":{"shape":"DeleteRetrieverRequest"}, - "output":{"shape":"DeleteRetrieverResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ], - "idempotent":true - }, - "DeleteUser":{ - "name":"DeleteUser", - "http":{ - "method":"DELETE", - "requestUri":"/applications/{applicationId}/users/{userId}", - "responseCode":200 - }, - "input":{"shape":"DeleteUserRequest"}, - "output":{"shape":"DeleteUserResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ], - "idempotent":true - }, - "DeleteWebExperience":{ - "name":"DeleteWebExperience", - "http":{ - "method":"DELETE", - "requestUri":"/applications/{applicationId}/experiences/{webExperienceId}", - "responseCode":200 - }, - "input":{"shape":"DeleteWebExperienceRequest"}, - "output":{"shape":"DeleteWebExperienceResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ], - "idempotent":true - }, - "GetApplication":{ - "name":"GetApplication", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}", - "responseCode":200 - }, - "input":{"shape":"GetApplicationRequest"}, - "output":{"shape":"GetApplicationResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "GetChatControlsConfiguration":{ - "name":"GetChatControlsConfiguration", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}/chatcontrols", - "responseCode":200 - }, - "input":{"shape":"GetChatControlsConfigurationRequest"}, - "output":{"shape":"GetChatControlsConfigurationResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "GetDataSource":{ - "name":"GetDataSource", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}", - "responseCode":200 - }, - "input":{"shape":"GetDataSourceRequest"}, - "output":{"shape":"GetDataSourceResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "GetGroup":{ - "name":"GetGroup", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}/indices/{indexId}/groups/{groupName}", - "responseCode":200 - }, - "input":{"shape":"GetGroupRequest"}, - "output":{"shape":"GetGroupResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "GetIndex":{ - "name":"GetIndex", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}/indices/{indexId}", - "responseCode":200 - }, - "input":{"shape":"GetIndexRequest"}, - "output":{"shape":"GetIndexResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "GetPlugin":{ - "name":"GetPlugin", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}/plugins/{pluginId}", - "responseCode":200 - }, - "input":{"shape":"GetPluginRequest"}, - "output":{"shape":"GetPluginResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "GetRetriever":{ - "name":"GetRetriever", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}/retrievers/{retrieverId}", - "responseCode":200 - }, - "input":{"shape":"GetRetrieverRequest"}, - "output":{"shape":"GetRetrieverResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "GetUser":{ - "name":"GetUser", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}/users/{userId}", - "responseCode":200 - }, - "input":{"shape":"GetUserRequest"}, - "output":{"shape":"GetUserResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "GetWebExperience":{ - "name":"GetWebExperience", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}/experiences/{webExperienceId}", - "responseCode":200 - }, - "input":{"shape":"GetWebExperienceRequest"}, - "output":{"shape":"GetWebExperienceResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "ListApplications":{ - "name":"ListApplications", - "http":{ - "method":"GET", - "requestUri":"/applications", - "responseCode":200 - }, - "input":{"shape":"ListApplicationsRequest"}, - "output":{"shape":"ListApplicationsResponse"}, - "errors":[ - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "ListConversations":{ - "name":"ListConversations", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}/conversations", - "responseCode":200 - }, - "input":{"shape":"ListConversationsRequest"}, - "output":{"shape":"ListConversationsResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"LicenseNotFoundException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "ListDataSourceSyncJobs":{ - "name":"ListDataSourceSyncJobs", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}/syncjobs", - "responseCode":200 - }, - "input":{"shape":"ListDataSourceSyncJobsRequest"}, - "output":{"shape":"ListDataSourceSyncJobsResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "ListDataSources":{ - "name":"ListDataSources", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}/indices/{indexId}/datasources", - "responseCode":200 - }, - "input":{"shape":"ListDataSourcesRequest"}, - "output":{"shape":"ListDataSourcesResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "ListDocuments":{ - "name":"ListDocuments", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}/index/{indexId}/documents", - "responseCode":200 - }, - "input":{"shape":"ListDocumentsRequest"}, - "output":{"shape":"ListDocumentsResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "ListGroups":{ - "name":"ListGroups", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}/indices/{indexId}/groups", - "responseCode":200 - }, - "input":{"shape":"ListGroupsRequest"}, - "output":{"shape":"ListGroupsResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "ListIndices":{ - "name":"ListIndices", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}/indices", - "responseCode":200 - }, - "input":{"shape":"ListIndicesRequest"}, - "output":{"shape":"ListIndicesResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "ListMessages":{ - "name":"ListMessages", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}/conversations/{conversationId}", - "responseCode":200 - }, - "input":{"shape":"ListMessagesRequest"}, - "output":{"shape":"ListMessagesResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"LicenseNotFoundException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "ListPlugins":{ - "name":"ListPlugins", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}/plugins", - "responseCode":200 - }, - "input":{"shape":"ListPluginsRequest"}, - "output":{"shape":"ListPluginsResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "ListRetrievers":{ - "name":"ListRetrievers", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}/retrievers", - "responseCode":200 - }, - "input":{"shape":"ListRetrieversRequest"}, - "output":{"shape":"ListRetrieversResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "ListTagsForResource":{ - "name":"ListTagsForResource", - "http":{ - "method":"GET", - "requestUri":"/v1/tags/{resourceARN}", - "responseCode":200 - }, - "input":{"shape":"ListTagsForResourceRequest"}, - "output":{"shape":"ListTagsForResourceResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "ListWebExperiences":{ - "name":"ListWebExperiences", - "http":{ - "method":"GET", - "requestUri":"/applications/{applicationId}/experiences", - "responseCode":200 - }, - "input":{"shape":"ListWebExperiencesRequest"}, - "output":{"shape":"ListWebExperiencesResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "PutFeedback":{ - "name":"PutFeedback", - "http":{ - "method":"POST", - "requestUri":"/applications/{applicationId}/conversations/{conversationId}/messages/{messageId}/feedback", - "responseCode":200 - }, - "input":{"shape":"PutFeedbackRequest"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "PutGroup":{ - "name":"PutGroup", - "http":{ - "method":"PUT", - "requestUri":"/applications/{applicationId}/indices/{indexId}/groups", - "responseCode":200 - }, - "input":{"shape":"PutGroupRequest"}, - "output":{"shape":"PutGroupResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"}, - {"shape":"ServiceQuotaExceededException"} - ], - "idempotent":true - }, - "StartDataSourceSyncJob":{ - "name":"StartDataSourceSyncJob", - "http":{ - "method":"POST", - "requestUri":"/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}/startsync", - "responseCode":200 - }, - "input":{"shape":"StartDataSourceSyncJobRequest"}, - "output":{"shape":"StartDataSourceSyncJobResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"}, - {"shape":"ServiceQuotaExceededException"} - ] - }, - "StopDataSourceSyncJob":{ - "name":"StopDataSourceSyncJob", - "http":{ - "method":"POST", - "requestUri":"/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}/stopsync", - "responseCode":200 - }, - "input":{"shape":"StopDataSourceSyncJobRequest"}, - "output":{"shape":"StopDataSourceSyncJobResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ] - }, - "TagResource":{ - "name":"TagResource", - "http":{ - "method":"POST", - "requestUri":"/v1/tags/{resourceARN}", - "responseCode":200 - }, - "input":{"shape":"TagResourceRequest"}, - "output":{"shape":"TagResourceResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ], - "idempotent":true - }, - "UntagResource":{ - "name":"UntagResource", - "http":{ - "method":"DELETE", - "requestUri":"/v1/tags/{resourceARN}", - "responseCode":200 - }, - "input":{"shape":"UntagResourceRequest"}, - "output":{"shape":"UntagResourceResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ], - "idempotent":true - }, - "UpdateApplication":{ - "name":"UpdateApplication", - "http":{ - "method":"PUT", - "requestUri":"/applications/{applicationId}", - "responseCode":200 - }, - "input":{"shape":"UpdateApplicationRequest"}, - "output":{"shape":"UpdateApplicationResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ], - "idempotent":true - }, - "UpdateChatControlsConfiguration":{ - "name":"UpdateChatControlsConfiguration", - "http":{ - "method":"PATCH", - "requestUri":"/applications/{applicationId}/chatcontrols", - "responseCode":200 - }, - "input":{"shape":"UpdateChatControlsConfigurationRequest"}, - "output":{"shape":"UpdateChatControlsConfigurationResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"}, - {"shape":"ServiceQuotaExceededException"} - ], - "idempotent":true - }, - "UpdateDataSource":{ - "name":"UpdateDataSource", - "http":{ - "method":"PUT", - "requestUri":"/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}", - "responseCode":200 - }, - "input":{"shape":"UpdateDataSourceRequest"}, - "output":{"shape":"UpdateDataSourceResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ], - "idempotent":true - }, - "UpdateIndex":{ - "name":"UpdateIndex", - "http":{ - "method":"PUT", - "requestUri":"/applications/{applicationId}/indices/{indexId}", - "responseCode":200 - }, - "input":{"shape":"UpdateIndexRequest"}, - "output":{"shape":"UpdateIndexResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"}, - {"shape":"ServiceQuotaExceededException"} - ], - "idempotent":true - }, - "UpdatePlugin":{ - "name":"UpdatePlugin", - "http":{ - "method":"PUT", - "requestUri":"/applications/{applicationId}/plugins/{pluginId}", - "responseCode":200 - }, - "input":{"shape":"UpdatePluginRequest"}, - "output":{"shape":"UpdatePluginResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"}, - {"shape":"ServiceQuotaExceededException"} - ], - "idempotent":true - }, - "UpdateRetriever":{ - "name":"UpdateRetriever", - "http":{ - "method":"PUT", - "requestUri":"/applications/{applicationId}/retrievers/{retrieverId}", - "responseCode":200 - }, - "input":{"shape":"UpdateRetrieverRequest"}, - "output":{"shape":"UpdateRetrieverResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"}, - {"shape":"ServiceQuotaExceededException"} - ], - "idempotent":true - }, - "UpdateUser":{ - "name":"UpdateUser", - "http":{ - "method":"PUT", - "requestUri":"/applications/{applicationId}/users/{userId}", - "responseCode":200 - }, - "input":{"shape":"UpdateUserRequest"}, - "output":{"shape":"UpdateUserResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"}, - {"shape":"ServiceQuotaExceededException"} - ], - "idempotent":true - }, - "UpdateWebExperience":{ - "name":"UpdateWebExperience", - "http":{ - "method":"PUT", - "requestUri":"/applications/{applicationId}/experiences/{webExperienceId}", - "responseCode":200 - }, - "input":{"shape":"UpdateWebExperienceRequest"}, - "output":{"shape":"UpdateWebExperienceResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"InternalServerException"}, - {"shape":"ConflictException"}, - {"shape":"ThrottlingException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"} - ], - "idempotent":true - } - }, - "shapes":{ - "AccessConfiguration":{ - "type":"structure", - "required":["accessControls"], - "members":{ - "accessControls":{"shape":"AccessControls"}, - "memberRelation":{"shape":"MemberRelation"} - } - }, - "AccessControl":{ - "type":"structure", - "required":["principals"], - "members":{ - "principals":{"shape":"Principals"}, - "memberRelation":{"shape":"MemberRelation"} - } - }, - "AccessControls":{ - "type":"list", - "member":{"shape":"AccessControl"} - }, - "AccessDeniedException":{ - "type":"structure", - "required":["message"], - "members":{ - "message":{"shape":"ErrorMessage"} - }, - "error":{ - "httpStatusCode":403, - "senderFault":true - }, - "exception":true - }, - "ActionExecution":{ - "type":"structure", - "required":[ - "pluginId", - "payload", - "payloadFieldNameSeparator" - ], - "members":{ - "pluginId":{"shape":"PluginId"}, - "payload":{"shape":"ActionExecutionPayload"}, - "payloadFieldNameSeparator":{"shape":"ActionPayloadFieldNameSeparator"} - } - }, - "ActionExecutionPayload":{ - "type":"map", - "key":{"shape":"ActionPayloadFieldKey"}, - "value":{"shape":"ActionExecutionPayloadField"} - }, - "ActionExecutionPayloadField":{ - "type":"structure", - "required":["value"], - "members":{ - "value":{"shape":"ActionPayloadFieldValue"} - } - }, - "ActionPayloadFieldKey":{ - "type":"string", - "min":1 - }, - "ActionPayloadFieldNameSeparator":{ - "type":"string", - "max":1, - "min":1 - }, - "ActionPayloadFieldType":{ - "type":"string", - "enum":[ - "STRING", - "NUMBER", - "ARRAY", - "BOOLEAN" - ] - }, - "ActionPayloadFieldValue":{ - "type":"structure", - "members":{ - }, - "document":true - }, - "ActionReview":{ - "type":"structure", - "members":{ - "pluginId":{"shape":"PluginId"}, - "pluginType":{"shape":"PluginType"}, - "payload":{"shape":"ActionReviewPayload"}, - "payloadFieldNameSeparator":{"shape":"ActionPayloadFieldNameSeparator"} - } - }, - "ActionReviewPayload":{ - "type":"map", - "key":{"shape":"ActionPayloadFieldKey"}, - "value":{"shape":"ActionReviewPayloadField"} - }, - "ActionReviewPayloadField":{ - "type":"structure", - "members":{ - "displayName":{"shape":"String"}, - "displayOrder":{"shape":"Integer"}, - "type":{"shape":"ActionPayloadFieldType"}, - "value":{"shape":"ActionPayloadFieldValue"}, - "allowedValues":{"shape":"ActionReviewPayloadFieldAllowedValues"}, - "required":{"shape":"Boolean"} - } - }, - "ActionReviewPayloadFieldAllowedValue":{ - "type":"structure", - "members":{ - "value":{"shape":"ActionPayloadFieldValue"}, - "displayValue":{"shape":"ActionPayloadFieldValue"} - } - }, - "ActionReviewPayloadFieldAllowedValues":{ - "type":"list", - "member":{"shape":"ActionReviewPayloadFieldAllowedValue"} - }, - "AmazonResourceName":{ - "type":"string", - "max":1011, - "min":1 - }, - "Application":{ - "type":"structure", - "members":{ - "displayName":{"shape":"ApplicationName"}, - "applicationId":{"shape":"ApplicationId"}, - "createdAt":{"shape":"Timestamp"}, - "updatedAt":{"shape":"Timestamp"}, - "status":{"shape":"ApplicationStatus"} - } - }, - "ApplicationArn":{ - "type":"string", - "max":1284, - "min":0, - "pattern":"arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}" - }, - "ApplicationId":{ - "type":"string", - "max":36, - "min":36, - "pattern":"[a-zA-Z0-9][a-zA-Z0-9-]{35}" - }, - "ApplicationName":{ - "type":"string", - "max":1000, - "min":1, - "pattern":"[a-zA-Z0-9][a-zA-Z0-9_-]*" - }, - "ApplicationStatus":{ - "type":"string", - "enum":[ - "CREATING", - "ACTIVE", - "DELETING", - "FAILED", - "UPDATING" - ] - }, - "Applications":{ - "type":"list", - "member":{"shape":"Application"} - }, - "AppliedAttachmentsConfiguration":{ - "type":"structure", - "members":{ - "attachmentsControlMode":{"shape":"AttachmentsControlMode"} - } - }, - "AttachmentInput":{ - "type":"structure", - "required":[ - "name", - "data" - ], - "members":{ - "name":{"shape":"AttachmentName"}, - "data":{"shape":"Blob"} - } - }, - "AttachmentName":{ - "type":"string", - "max":1000, - "min":1, - "pattern":"\\P{C}*" - }, - "AttachmentOutput":{ - "type":"structure", - "members":{ - "name":{"shape":"AttachmentName"}, - "status":{"shape":"AttachmentStatus"}, - "error":{"shape":"ErrorDetail"} - } - }, - "AttachmentStatus":{ - "type":"string", - "enum":[ - "FAILED", - "SUCCEEDED" - ] - }, - "AttachmentsConfiguration":{ - "type":"structure", - "required":["attachmentsControlMode"], - "members":{ - "attachmentsControlMode":{"shape":"AttachmentsControlMode"} - } - }, - "AttachmentsControlMode":{ - "type":"string", - "enum":[ - "ENABLED", - "DISABLED" - ] - }, - "AttachmentsInput":{ - "type":"list", - "member":{"shape":"AttachmentInput"}, - "min":1 - }, - "AttachmentsOutput":{ - "type":"list", - "member":{"shape":"AttachmentOutput"} - }, - "AttributeFilter":{ - "type":"structure", - "members":{ - "andAllFilters":{"shape":"AttributeFilters"}, - "orAllFilters":{"shape":"AttributeFilters"}, - "notFilter":{"shape":"AttributeFilter"}, - "equalsTo":{"shape":"DocumentAttribute"}, - "containsAll":{"shape":"DocumentAttribute"}, - "containsAny":{"shape":"DocumentAttribute"}, - "greaterThan":{"shape":"DocumentAttribute"}, - "greaterThanOrEquals":{"shape":"DocumentAttribute"}, - "lessThan":{"shape":"DocumentAttribute"}, - "lessThanOrEquals":{"shape":"DocumentAttribute"} - } - }, - "AttributeFilters":{ - "type":"list", - "member":{"shape":"AttributeFilter"} - }, - "AttributeType":{ - "type":"string", - "enum":[ - "STRING", - "STRING_LIST", - "NUMBER", - "DATE" - ] - }, - "AttributeValueOperator":{ - "type":"string", - "enum":["DELETE"] - }, - "BasicAuthConfiguration":{ - "type":"structure", - "required":[ - "secretArn", - "roleArn" - ], - "members":{ - "secretArn":{"shape":"SecretArn"}, - "roleArn":{"shape":"RoleArn"} - } - }, - "BatchDeleteDocumentRequest":{ - "type":"structure", - "required":[ - "applicationId", - "indexId", - "documents" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "indexId":{ - "shape":"IndexId", - "location":"uri", - "locationName":"indexId" - }, - "documents":{"shape":"DeleteDocuments"}, - "dataSourceSyncId":{"shape":"ExecutionId"} - } - }, - "BatchDeleteDocumentResponse":{ - "type":"structure", - "members":{ - "failedDocuments":{"shape":"FailedDocuments"} - } - }, - "BatchPutDocumentRequest":{ - "type":"structure", - "required":[ - "applicationId", - "indexId", - "documents" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "indexId":{ - "shape":"IndexId", - "location":"uri", - "locationName":"indexId" - }, - "documents":{"shape":"Documents"}, - "roleArn":{"shape":"RoleArn"}, - "dataSourceSyncId":{"shape":"ExecutionId"} - } - }, - "BatchPutDocumentResponse":{ - "type":"structure", - "members":{ - "failedDocuments":{"shape":"FailedDocuments"} - } - }, - "Blob":{"type":"blob"}, - "BlockedPhrase":{ - "type":"string", - "max":36, - "min":0, - "pattern":"\\P{C}*" - }, - "BlockedPhrases":{ - "type":"list", - "member":{"shape":"BlockedPhrase"}, - "max":5, - "min":0 - }, - "BlockedPhrasesConfiguration":{ - "type":"structure", - "members":{ - "blockedPhrases":{"shape":"BlockedPhrases"}, - "systemMessageOverride":{"shape":"SystemMessageOverride"} - } - }, - "BlockedPhrasesConfigurationUpdate":{ - "type":"structure", - "members":{ - "blockedPhrasesToCreateOrUpdate":{"shape":"BlockedPhrases"}, - "blockedPhrasesToDelete":{"shape":"BlockedPhrases"}, - "systemMessageOverride":{"shape":"SystemMessageOverride"} - } - }, - "Boolean":{ - "type":"boolean", - "box":true - }, - "ChatSyncInput":{ - "type":"structure", - "required":[ - "applicationId", - "userId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "userId":{ - "shape":"UserId", - "location":"querystring", - "locationName":"userId" - }, - "userGroups":{ - "shape":"UserGroups", - "location":"querystring", - "locationName":"userGroups" - }, - "userMessage":{"shape":"UserMessage"}, - "attachments":{"shape":"AttachmentsInput"}, - "actionExecution":{"shape":"ActionExecution"}, - "conversationId":{"shape":"ConversationId"}, - "parentMessageId":{"shape":"MessageId"}, - "attributeFilter":{"shape":"AttributeFilter"}, - "clientToken":{ - "shape":"ClientToken", - "idempotencyToken":true - } - } - }, - "ChatSyncOutput":{ - "type":"structure", - "members":{ - "conversationId":{"shape":"ConversationId"}, - "systemMessage":{"shape":"String"}, - "systemMessageId":{"shape":"MessageId"}, - "userMessageId":{"shape":"MessageId"}, - "actionReview":{"shape":"ActionReview"}, - "sourceAttributions":{"shape":"SourceAttributions"}, - "failedAttachments":{"shape":"AttachmentsOutput"} - } - }, - "ClientToken":{ - "type":"string", - "max":100, - "min":1 - }, - "ConflictException":{ - "type":"structure", - "required":[ - "message", - "resourceId", - "resourceType" - ], - "members":{ - "message":{"shape":"ErrorMessage"}, - "resourceId":{"shape":"String"}, - "resourceType":{"shape":"String"} - }, - "error":{ - "httpStatusCode":409, - "senderFault":true - }, - "exception":true - }, - "ContentBlockerRule":{ - "type":"structure", - "members":{ - "systemMessageOverride":{"shape":"SystemMessageOverride"} - } - }, - "ContentRetrievalRule":{ - "type":"structure", - "members":{ - "eligibleDataSources":{"shape":"EligibleDataSources"} - } - }, - "ContentType":{ - "type":"string", - "enum":[ - "PDF", - "HTML", - "MS_WORD", - "PLAIN_TEXT", - "PPT", - "RTF", - "XML", - "XSLT", - "MS_EXCEL", - "CSV", - "JSON", - "MD" - ] - }, - "Conversation":{ - "type":"structure", - "members":{ - "conversationId":{"shape":"ConversationId"}, - "title":{"shape":"ConversationTitle"}, - "startTime":{"shape":"Timestamp"} - } - }, - "ConversationId":{ - "type":"string", - "max":36, - "min":36, - "pattern":"[a-zA-Z0-9][a-zA-Z0-9-]{35}" - }, - "ConversationTitle":{"type":"string"}, - "Conversations":{ - "type":"list", - "member":{"shape":"Conversation"} - }, - "CreateApplicationRequest":{ - "type":"structure", - "required":[ - "displayName", - "roleArn" - ], - "members":{ - "displayName":{"shape":"ApplicationName"}, - "roleArn":{"shape":"RoleArn"}, - "description":{"shape":"Description"}, - "encryptionConfiguration":{"shape":"EncryptionConfiguration"}, - "tags":{"shape":"Tags"}, - "clientToken":{ - "shape":"ClientToken", - "idempotencyToken":true - }, - "attachmentsConfiguration":{"shape":"AttachmentsConfiguration"} - } - }, - "CreateApplicationResponse":{ - "type":"structure", - "members":{ - "applicationId":{"shape":"ApplicationId"}, - "applicationArn":{"shape":"ApplicationArn"} - } - }, - "CreateDataSourceRequest":{ - "type":"structure", - "required":[ - "applicationId", - "indexId", - "displayName", - "configuration" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "indexId":{ - "shape":"IndexId", - "location":"uri", - "locationName":"indexId" - }, - "displayName":{"shape":"DataSourceName"}, - "configuration":{"shape":"DataSourceConfiguration"}, - "vpcConfiguration":{"shape":"DataSourceVpcConfiguration"}, - "description":{"shape":"Description"}, - "tags":{"shape":"Tags"}, - "syncSchedule":{"shape":"SyncSchedule"}, - "roleArn":{"shape":"RoleArn"}, - "clientToken":{ - "shape":"ClientToken", - "idempotencyToken":true - }, - "documentEnrichmentConfiguration":{"shape":"DocumentEnrichmentConfiguration"} - } - }, - "CreateDataSourceResponse":{ - "type":"structure", - "members":{ - "dataSourceId":{"shape":"DataSourceId"}, - "dataSourceArn":{"shape":"DataSourceArn"} - } - }, - "CreateIndexRequest":{ - "type":"structure", - "required":[ - "applicationId", - "displayName" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "displayName":{"shape":"IndexName"}, - "description":{"shape":"Description"}, - "tags":{"shape":"Tags"}, - "capacityConfiguration":{"shape":"IndexCapacityConfiguration"}, - "clientToken":{ - "shape":"ClientToken", - "idempotencyToken":true - } - } - }, - "CreateIndexResponse":{ - "type":"structure", - "members":{ - "indexId":{"shape":"IndexId"}, - "indexArn":{"shape":"IndexArn"} - } - }, - "CreatePluginRequest":{ - "type":"structure", - "required":[ - "applicationId", - "displayName", - "type", - "serverUrl", - "authConfiguration" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "displayName":{"shape":"PluginName"}, - "type":{"shape":"PluginType"}, - "serverUrl":{"shape":"Url"}, - "authConfiguration":{"shape":"PluginAuthConfiguration"}, - "tags":{"shape":"Tags"}, - "clientToken":{ - "shape":"ClientToken", - "idempotencyToken":true - } - } - }, - "CreatePluginResponse":{ - "type":"structure", - "members":{ - "pluginId":{"shape":"PluginId"}, - "pluginArn":{"shape":"PluginArn"} - } - }, - "CreateRetrieverRequest":{ - "type":"structure", - "required":[ - "applicationId", - "type", - "displayName", - "configuration" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "type":{"shape":"RetrieverType"}, - "displayName":{"shape":"RetrieverName"}, - "configuration":{"shape":"RetrieverConfiguration"}, - "roleArn":{"shape":"RoleArn"}, - "clientToken":{ - "shape":"ClientToken", - "idempotencyToken":true - }, - "tags":{"shape":"Tags"} - } - }, - "CreateRetrieverResponse":{ - "type":"structure", - "members":{ - "retrieverId":{"shape":"RetrieverId"}, - "retrieverArn":{"shape":"RetrieverArn"} - } - }, - "CreateUserRequest":{ - "type":"structure", - "required":[ - "applicationId", - "userId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "userId":{"shape":"String"}, - "userAliases":{"shape":"CreateUserRequestUserAliasesList"}, - "clientToken":{ - "shape":"ClientToken", - "idempotencyToken":true - } - } - }, - "CreateUserRequestUserAliasesList":{ - "type":"list", - "member":{"shape":"UserAlias"}, - "max":100, - "min":0 - }, - "CreateUserResponse":{ - "type":"structure", - "members":{ - } - }, - "CreateWebExperienceRequest":{ - "type":"structure", - "required":["applicationId"], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "title":{"shape":"WebExperienceTitle"}, - "subtitle":{"shape":"WebExperienceSubtitle"}, - "welcomeMessage":{"shape":"WebExperienceWelcomeMessage"}, - "samplePromptsControlMode":{"shape":"WebExperienceSamplePromptsControlMode"}, - "tags":{"shape":"Tags"}, - "clientToken":{ - "shape":"ClientToken", - "idempotencyToken":true - } - } - }, - "CreateWebExperienceResponse":{ - "type":"structure", - "members":{ - "webExperienceId":{"shape":"WebExperienceId"}, - "webExperienceArn":{"shape":"WebExperienceArn"} - } - }, - "DataSource":{ - "type":"structure", - "members":{ - "displayName":{"shape":"DataSourceName"}, - "dataSourceId":{"shape":"DataSourceId"}, - "type":{"shape":"String"}, - "createdAt":{"shape":"Timestamp"}, - "updatedAt":{"shape":"Timestamp"}, - "status":{"shape":"DataSourceStatus"} - } - }, - "DataSourceArn":{ - "type":"string", - "max":1284, - "min":0, - "pattern":"arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}" - }, - "DataSourceConfiguration":{ - "type":"structure", - "members":{ - }, - "document":true - }, - "DataSourceId":{ - "type":"string", - "max":36, - "min":36, - "pattern":"[a-zA-Z0-9][a-zA-Z0-9-]{35}" - }, - "DataSourceIds":{ - "type":"list", - "member":{"shape":"DataSourceId"}, - "max":1, - "min":1 - }, - "DataSourceName":{ - "type":"string", - "max":1000, - "min":1, - "pattern":"[a-zA-Z0-9][a-zA-Z0-9_-]*" - }, - "DataSourceStatus":{ - "type":"string", - "enum":[ - "PENDING_CREATION", - "CREATING", - "ACTIVE", - "DELETING", - "FAILED", - "UPDATING" - ] - }, - "DataSourceSyncJob":{ - "type":"structure", - "members":{ - "executionId":{"shape":"ExecutionId"}, - "startTime":{"shape":"Timestamp"}, - "endTime":{"shape":"Timestamp"}, - "status":{"shape":"DataSourceSyncJobStatus"}, - "error":{"shape":"ErrorDetail"}, - "dataSourceErrorCode":{"shape":"String"}, - "metrics":{"shape":"DataSourceSyncJobMetrics"} - } - }, - "DataSourceSyncJobMetrics":{ - "type":"structure", - "members":{ - "documentsAdded":{"shape":"MetricValue"}, - "documentsModified":{"shape":"MetricValue"}, - "documentsDeleted":{"shape":"MetricValue"}, - "documentsFailed":{"shape":"MetricValue"}, - "documentsScanned":{"shape":"MetricValue"} - } - }, - "DataSourceSyncJobStatus":{ - "type":"string", - "enum":[ - "FAILED", - "SUCCEEDED", - "SYNCING", - "INCOMPLETE", - "STOPPING", - "ABORTED", - "SYNCING_INDEXING" - ] - }, - "DataSourceSyncJobs":{ - "type":"list", - "member":{"shape":"DataSourceSyncJob"} - }, - "DataSourceUserId":{ - "type":"string", - "max":1024, - "min":1, - "pattern":"\\P{C}*" - }, - "DataSourceVpcConfiguration":{ - "type":"structure", - "required":[ - "subnetIds", - "securityGroupIds" - ], - "members":{ - "subnetIds":{"shape":"SubnetIds"}, - "securityGroupIds":{"shape":"SecurityGroupIds"} - } - }, - "DataSources":{ - "type":"list", - "member":{"shape":"DataSource"} - }, - "DeleteApplicationRequest":{ - "type":"structure", - "required":["applicationId"], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - } - } - }, - "DeleteApplicationResponse":{ - "type":"structure", - "members":{ - } - }, - "DeleteChatControlsConfigurationRequest":{ - "type":"structure", - "required":["applicationId"], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - } - } - }, - "DeleteChatControlsConfigurationResponse":{ - "type":"structure", - "members":{ - } - }, - "DeleteConversationRequest":{ - "type":"structure", - "required":[ - "conversationId", - "applicationId", - "userId" - ], - "members":{ - "conversationId":{ - "shape":"ConversationId", - "location":"uri", - "locationName":"conversationId" - }, - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "userId":{ - "shape":"UserId", - "location":"querystring", - "locationName":"userId" - } - } - }, - "DeleteConversationResponse":{ - "type":"structure", - "members":{ - } - }, - "DeleteDataSourceRequest":{ - "type":"structure", - "required":[ - "applicationId", - "indexId", - "dataSourceId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "indexId":{ - "shape":"IndexId", - "location":"uri", - "locationName":"indexId" - }, - "dataSourceId":{ - "shape":"DataSourceId", - "location":"uri", - "locationName":"dataSourceId" - } - } - }, - "DeleteDataSourceResponse":{ - "type":"structure", - "members":{ - } - }, - "DeleteDocument":{ - "type":"structure", - "required":["documentId"], - "members":{ - "documentId":{"shape":"DocumentId"} - } - }, - "DeleteDocuments":{ - "type":"list", - "member":{"shape":"DeleteDocument"} - }, - "DeleteGroupRequest":{ - "type":"structure", - "required":[ - "applicationId", - "indexId", - "groupName" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "indexId":{ - "shape":"IndexId", - "location":"uri", - "locationName":"indexId" - }, - "groupName":{ - "shape":"GroupName", - "location":"uri", - "locationName":"groupName" - }, - "dataSourceId":{ - "shape":"DataSourceId", - "location":"querystring", - "locationName":"dataSourceId" - } - } - }, - "DeleteGroupResponse":{ - "type":"structure", - "members":{ - } - }, - "DeleteIndexRequest":{ - "type":"structure", - "required":[ - "applicationId", - "indexId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "indexId":{ - "shape":"IndexId", - "location":"uri", - "locationName":"indexId" - } - } - }, - "DeleteIndexResponse":{ - "type":"structure", - "members":{ - } - }, - "DeletePluginRequest":{ - "type":"structure", - "required":[ - "applicationId", - "pluginId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "pluginId":{ - "shape":"PluginId", - "location":"uri", - "locationName":"pluginId" - } - } - }, - "DeletePluginResponse":{ - "type":"structure", - "members":{ - } - }, - "DeleteRetrieverRequest":{ - "type":"structure", - "required":[ - "applicationId", - "retrieverId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "retrieverId":{ - "shape":"RetrieverId", - "location":"uri", - "locationName":"retrieverId" - } - } - }, - "DeleteRetrieverResponse":{ - "type":"structure", - "members":{ - } - }, - "DeleteUserRequest":{ - "type":"structure", - "required":[ - "applicationId", - "userId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "userId":{ - "shape":"String", - "location":"uri", - "locationName":"userId" - } - } - }, - "DeleteUserResponse":{ - "type":"structure", - "members":{ - } - }, - "DeleteWebExperienceRequest":{ - "type":"structure", - "required":[ - "applicationId", - "webExperienceId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "webExperienceId":{ - "shape":"WebExperienceId", - "location":"uri", - "locationName":"webExperienceId" - } - } - }, - "DeleteWebExperienceResponse":{ - "type":"structure", - "members":{ - } - }, - "Description":{ - "type":"string", - "max":1000, - "min":0, - "pattern":"\\P{C}*" - }, - "Document":{ - "type":"structure", - "required":["id"], - "members":{ - "id":{"shape":"DocumentId"}, - "attributes":{"shape":"DocumentAttributes"}, - "content":{"shape":"DocumentContent"}, - "contentType":{"shape":"ContentType"}, - "title":{"shape":"Title"}, - "accessConfiguration":{"shape":"AccessConfiguration"}, - "documentEnrichmentConfiguration":{"shape":"DocumentEnrichmentConfiguration"} - } - }, - "DocumentAttribute":{ - "type":"structure", - "required":[ - "name", - "value" - ], - "members":{ - "name":{"shape":"DocumentAttributeKey"}, - "value":{"shape":"DocumentAttributeValue"} - } - }, - "DocumentAttributeCondition":{ - "type":"structure", - "required":[ - "key", - "operator" - ], - "members":{ - "key":{"shape":"DocumentAttributeKey"}, - "operator":{"shape":"DocumentEnrichmentConditionOperator"}, - "value":{"shape":"DocumentAttributeValue"} - } - }, - "DocumentAttributeConfiguration":{ - "type":"structure", - "members":{ - "name":{"shape":"String"}, - "type":{"shape":"AttributeType"}, - "search":{"shape":"Status"} - } - }, - "DocumentAttributeConfigurations":{ - "type":"list", - "member":{"shape":"DocumentAttributeConfiguration"}, - "max":500, - "min":1 - }, - "DocumentAttributeKey":{ - "type":"string", - "max":200, - "min":1, - "pattern":"[a-zA-Z0-9_][a-zA-Z0-9_-]*" - }, - "DocumentAttributeStringListValue":{ - "type":"list", - "member":{"shape":"String"} - }, - "DocumentAttributeTarget":{ - "type":"structure", - "required":["key"], - "members":{ - "key":{"shape":"DocumentAttributeKey"}, - "value":{"shape":"DocumentAttributeValue"}, - "attributeValueOperator":{"shape":"AttributeValueOperator"} - } - }, - "DocumentAttributeValue":{ - "type":"structure", - "members":{ - "stringValue":{"shape":"DocumentAttributeValueStringValueString"}, - "stringListValue":{"shape":"DocumentAttributeStringListValue"}, - "longValue":{"shape":"Long"}, - "dateValue":{"shape":"Timestamp"} - }, - "union":true - }, - "DocumentAttributeValueStringValueString":{ - "type":"string", - "max":2048, - "min":0 - }, - "DocumentAttributes":{ - "type":"list", - "member":{"shape":"DocumentAttribute"}, - "max":500, - "min":1 - }, - "DocumentContent":{ - "type":"structure", - "members":{ - "blob":{"shape":"Blob"}, - "s3":{"shape":"S3"} - }, - "union":true - }, - "DocumentContentOperator":{ - "type":"string", - "enum":["DELETE"] - }, - "DocumentDetailList":{ - "type":"list", - "member":{"shape":"DocumentDetails"} - }, - "DocumentDetails":{ - "type":"structure", - "members":{ - "documentId":{"shape":"DocumentId"}, - "status":{"shape":"DocumentStatus"}, - "error":{"shape":"ErrorDetail"}, - "createdAt":{"shape":"Timestamp"}, - "updatedAt":{"shape":"Timestamp"} - } - }, - "DocumentEnrichmentConditionOperator":{ - "type":"string", - "enum":[ - "GREATER_THAN", - "GREATER_THAN_OR_EQUALS", - "LESS_THAN", - "LESS_THAN_OR_EQUALS", - "EQUALS", - "NOT_EQUALS", - "CONTAINS", - "NOT_CONTAINS", - "EXISTS", - "NOT_EXISTS", - "BEGINS_WITH" - ] - }, - "DocumentEnrichmentConfiguration":{ - "type":"structure", - "members":{ - "inlineConfigurations":{"shape":"InlineDocumentEnrichmentConfigurations"}, - "preExtractionHookConfiguration":{"shape":"HookConfiguration"}, - "postExtractionHookConfiguration":{"shape":"HookConfiguration"} - } - }, - "DocumentId":{ - "type":"string", - "max":1825, - "min":1, - "pattern":"\\P{C}*" - }, - "DocumentStatus":{ - "type":"string", - "enum":[ - "RECEIVED", - "PROCESSING", - "INDEXED", - "UPDATED", - "FAILED", - "DELETING", - "DELETED", - "DOCUMENT_FAILED_TO_INDEX" - ] - }, - "Documents":{ - "type":"list", - "member":{"shape":"Document"}, - "max":10, - "min":1 - }, - "EligibleDataSource":{ - "type":"structure", - "members":{ - "indexId":{"shape":"IndexId"}, - "dataSourceId":{"shape":"DataSourceId"} - } - }, - "EligibleDataSources":{ - "type":"list", - "member":{"shape":"EligibleDataSource"}, - "max":5, - "min":0 - }, - "EncryptionConfiguration":{ - "type":"structure", - "members":{ - "kmsKeyId":{"shape":"KmsKeyId"} - } - }, - "ErrorCode":{ - "type":"string", - "enum":[ - "InternalError", - "InvalidRequest", - "ResourceInactive", - "ResourceNotFound" - ] - }, - "ErrorDetail":{ - "type":"structure", - "members":{ - "errorMessage":{"shape":"ErrorMessage"}, - "errorCode":{"shape":"ErrorCode"} - } - }, - "ErrorMessage":{ - "type":"string", - "max":2048, - "min":1, - "pattern":"\\P{C}*" - }, - "ExampleChatMessage":{ - "type":"string", - "max":350, - "min":0, - "pattern":"\\P{C}*" - }, - "ExampleChatMessages":{ - "type":"list", - "member":{"shape":"ExampleChatMessage"}, - "max":5, - "min":0 - }, - "ExecutionId":{ - "type":"string", - "max":36, - "min":36, - "pattern":"[a-zA-Z0-9][a-zA-Z0-9-]{35}" - }, - "FailedDocument":{ - "type":"structure", - "members":{ - "id":{"shape":"DocumentId"}, - "error":{"shape":"ErrorDetail"}, - "dataSourceId":{"shape":"DataSourceId"} - } - }, - "FailedDocuments":{ - "type":"list", - "member":{"shape":"FailedDocument"} - }, - "GetApplicationRequest":{ - "type":"structure", - "required":["applicationId"], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - } - } - }, - "GetApplicationResponse":{ - "type":"structure", - "members":{ - "displayName":{"shape":"ApplicationName"}, - "applicationId":{"shape":"ApplicationId"}, - "applicationArn":{"shape":"ApplicationArn"}, - "roleArn":{"shape":"RoleArn"}, - "status":{"shape":"ApplicationStatus"}, - "description":{"shape":"Description"}, - "encryptionConfiguration":{"shape":"EncryptionConfiguration"}, - "createdAt":{"shape":"Timestamp"}, - "updatedAt":{"shape":"Timestamp"}, - "error":{"shape":"ErrorDetail"}, - "attachmentsConfiguration":{"shape":"AppliedAttachmentsConfiguration"} - } - }, - "GetChatControlsConfigurationRequest":{ - "type":"structure", - "required":["applicationId"], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "maxResults":{ - "shape":"MaxResultsIntegerForGetTopicConfigurations", - "location":"querystring", - "locationName":"maxResults" - }, - "nextToken":{ - "shape":"NextToken", - "location":"querystring", - "locationName":"nextToken" - } - } - }, - "GetChatControlsConfigurationResponse":{ - "type":"structure", - "members":{ - "responseScope":{"shape":"ResponseScope"}, - "blockedPhrases":{"shape":"BlockedPhrasesConfiguration"}, - "topicConfigurations":{"shape":"TopicConfigurations"}, - "nextToken":{"shape":"NextToken"} - } - }, - "GetDataSourceRequest":{ - "type":"structure", - "required":[ - "applicationId", - "indexId", - "dataSourceId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "indexId":{ - "shape":"IndexId", - "location":"uri", - "locationName":"indexId" - }, - "dataSourceId":{ - "shape":"DataSourceId", - "location":"uri", - "locationName":"dataSourceId" - } - } - }, - "GetDataSourceResponse":{ - "type":"structure", - "members":{ - "applicationId":{"shape":"ApplicationId"}, - "indexId":{"shape":"IndexId"}, - "dataSourceId":{"shape":"DataSourceId"}, - "dataSourceArn":{"shape":"DataSourceArn"}, - "displayName":{"shape":"DataSourceName"}, - "type":{"shape":"String"}, - "configuration":{"shape":"DataSourceConfiguration"}, - "vpcConfiguration":{"shape":"DataSourceVpcConfiguration"}, - "createdAt":{"shape":"Timestamp"}, - "updatedAt":{"shape":"Timestamp"}, - "description":{"shape":"Description"}, - "status":{"shape":"DataSourceStatus"}, - "syncSchedule":{"shape":"SyncSchedule"}, - "roleArn":{"shape":"RoleArn"}, - "error":{"shape":"ErrorDetail"}, - "documentEnrichmentConfiguration":{"shape":"DocumentEnrichmentConfiguration"} - } - }, - "GetGroupRequest":{ - "type":"structure", - "required":[ - "applicationId", - "indexId", - "groupName" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "indexId":{ - "shape":"IndexId", - "location":"uri", - "locationName":"indexId" - }, - "groupName":{ - "shape":"GroupName", - "location":"uri", - "locationName":"groupName" - }, - "dataSourceId":{ - "shape":"DataSourceId", - "location":"querystring", - "locationName":"dataSourceId" - } - } - }, - "GetGroupResponse":{ - "type":"structure", - "members":{ - "status":{"shape":"GroupStatusDetail"}, - "statusHistory":{"shape":"GroupStatusDetails"} - } - }, - "GetIndexRequest":{ - "type":"structure", - "required":[ - "applicationId", - "indexId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "indexId":{ - "shape":"IndexId", - "location":"uri", - "locationName":"indexId" - } - } - }, - "GetIndexResponse":{ - "type":"structure", - "members":{ - "applicationId":{"shape":"ApplicationId"}, - "indexId":{"shape":"IndexId"}, - "displayName":{"shape":"IndexName"}, - "indexArn":{"shape":"IndexArn"}, - "status":{"shape":"IndexStatus"}, - "description":{"shape":"Description"}, - "createdAt":{"shape":"Timestamp"}, - "updatedAt":{"shape":"Timestamp"}, - "capacityConfiguration":{"shape":"IndexCapacityConfiguration"}, - "documentAttributeConfigurations":{"shape":"DocumentAttributeConfigurations"}, - "error":{"shape":"ErrorDetail"}, - "indexStatistics":{"shape":"IndexStatistics"} - } - }, - "GetPluginRequest":{ - "type":"structure", - "required":[ - "applicationId", - "pluginId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "pluginId":{ - "shape":"PluginId", - "location":"uri", - "locationName":"pluginId" - } - } - }, - "GetPluginResponse":{ - "type":"structure", - "members":{ - "applicationId":{"shape":"ApplicationId"}, - "pluginId":{"shape":"PluginId"}, - "displayName":{"shape":"PluginName"}, - "type":{"shape":"PluginType"}, - "serverUrl":{"shape":"Url"}, - "authConfiguration":{"shape":"PluginAuthConfiguration"}, - "pluginArn":{"shape":"PluginArn"}, - "state":{"shape":"PluginState"}, - "createdAt":{"shape":"Timestamp"}, - "updatedAt":{"shape":"Timestamp"} - } - }, - "GetRetrieverRequest":{ - "type":"structure", - "required":[ - "applicationId", - "retrieverId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "retrieverId":{ - "shape":"RetrieverId", - "location":"uri", - "locationName":"retrieverId" - } - } - }, - "GetRetrieverResponse":{ - "type":"structure", - "members":{ - "applicationId":{"shape":"ApplicationId"}, - "retrieverId":{"shape":"RetrieverId"}, - "retrieverArn":{"shape":"RetrieverArn"}, - "type":{"shape":"RetrieverType"}, - "status":{"shape":"RetrieverStatus"}, - "displayName":{"shape":"RetrieverName"}, - "configuration":{"shape":"RetrieverConfiguration"}, - "roleArn":{"shape":"RoleArn"}, - "createdAt":{"shape":"Timestamp"}, - "updatedAt":{"shape":"Timestamp"} - } - }, - "GetUserRequest":{ - "type":"structure", - "required":[ - "applicationId", - "userId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "userId":{ - "shape":"String", - "location":"uri", - "locationName":"userId" - } - } - }, - "GetUserResponse":{ - "type":"structure", - "members":{ - "userAliases":{"shape":"UserAliases"} - } - }, - "GetWebExperienceRequest":{ - "type":"structure", - "required":[ - "applicationId", - "webExperienceId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "webExperienceId":{ - "shape":"WebExperienceId", - "location":"uri", - "locationName":"webExperienceId" - } - } - }, - "GetWebExperienceResponse":{ - "type":"structure", - "members":{ - "applicationId":{"shape":"ApplicationId"}, - "webExperienceId":{"shape":"WebExperienceId"}, - "webExperienceArn":{"shape":"WebExperienceArn"}, - "defaultEndpoint":{"shape":"Url"}, - "status":{"shape":"WebExperienceStatus"}, - "createdAt":{"shape":"Timestamp"}, - "updatedAt":{"shape":"Timestamp"}, - "title":{"shape":"WebExperienceTitle"}, - "subtitle":{"shape":"WebExperienceSubtitle"}, - "welcomeMessage":{"shape":"WebExperienceWelcomeMessage"}, - "samplePromptsControlMode":{"shape":"WebExperienceSamplePromptsControlMode"}, - "authenticationConfiguration":{"shape":"WebExperienceAuthConfiguration"}, - "error":{"shape":"ErrorDetail"} - } - }, - "GroupMembers":{ - "type":"structure", - "members":{ - "memberGroups":{"shape":"MemberGroups"}, - "memberUsers":{"shape":"MemberUsers"} - } - }, - "GroupName":{ - "type":"string", - "max":1024, - "min":1, - "pattern":"\\P{C}*" - }, - "GroupStatus":{ - "type":"string", - "enum":[ - "FAILED", - "SUCCEEDED", - "PROCESSING", - "DELETING", - "DELETED" - ] - }, - "GroupStatusDetail":{ - "type":"structure", - "members":{ - "status":{"shape":"GroupStatus"}, - "lastUpdatedAt":{"shape":"Timestamp"}, - "errorDetail":{"shape":"ErrorDetail"} - } - }, - "GroupStatusDetails":{ - "type":"list", - "member":{"shape":"GroupStatusDetail"} - }, - "GroupSummary":{ - "type":"structure", - "members":{ - "groupName":{"shape":"GroupName"} - } - }, - "GroupSummaryList":{ - "type":"list", - "member":{"shape":"GroupSummary"} - }, - "HookConfiguration":{ - "type":"structure", - "members":{ - "invocationCondition":{"shape":"DocumentAttributeCondition"}, - "lambdaArn":{"shape":"LambdaArn"}, - "s3BucketName":{"shape":"S3BucketName"}, - "roleArn":{"shape":"RoleArn"} - } - }, - "Index":{ - "type":"structure", - "members":{ - "displayName":{"shape":"IndexName"}, - "indexId":{"shape":"IndexId"}, - "createdAt":{"shape":"Timestamp"}, - "updatedAt":{"shape":"Timestamp"}, - "status":{"shape":"IndexStatus"} - } - }, - "IndexArn":{ - "type":"string", - "max":1284, - "min":0, - "pattern":"arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}" - }, - "IndexCapacityConfiguration":{ - "type":"structure", - "members":{ - "units":{"shape":"IndexCapacityInteger"} - } - }, - "IndexCapacityInteger":{ - "type":"integer", - "box":true, - "min":1 - }, - "IndexId":{ - "type":"string", - "max":36, - "min":36, - "pattern":"[a-zA-Z0-9][a-zA-Z0-9-]{35}" - }, - "IndexName":{ - "type":"string", - "max":1000, - "min":1, - "pattern":"[a-zA-Z0-9][a-zA-Z0-9_-]*" - }, - "IndexStatistics":{ - "type":"structure", - "members":{ - "textDocumentStatistics":{"shape":"TextDocumentStatistics"} - } - }, - "IndexStatus":{ - "type":"string", - "enum":[ - "CREATING", - "ACTIVE", - "DELETING", - "FAILED", - "UPDATING" - ] - }, - "IndexedTextBytes":{ - "type":"long", - "box":true, - "min":0 - }, - "IndexedTextDocument":{ - "type":"integer", - "box":true, - "min":0 - }, - "Indices":{ - "type":"list", - "member":{"shape":"Index"} - }, - "InlineDocumentEnrichmentConfiguration":{ - "type":"structure", - "members":{ - "condition":{"shape":"DocumentAttributeCondition"}, - "target":{"shape":"DocumentAttributeTarget"}, - "documentContentOperator":{"shape":"DocumentContentOperator"} - } - }, - "InlineDocumentEnrichmentConfigurations":{ - "type":"list", - "member":{"shape":"InlineDocumentEnrichmentConfiguration"}, - "max":100, - "min":1 - }, - "Integer":{ - "type":"integer", - "box":true - }, - "InternalServerException":{ - "type":"structure", - "required":["message"], - "members":{ - "message":{"shape":"ErrorMessage"} - }, - "error":{"httpStatusCode":500}, - "exception":true, - "fault":true - }, - "KendraIndexConfiguration":{ - "type":"structure", - "required":["indexId"], - "members":{ - "indexId":{"shape":"KendraIndexId"} - } - }, - "KendraIndexId":{ - "type":"string", - "max":36, - "min":36, - "pattern":"[a-zA-Z0-9][a-zA-Z0-9-]{35}" - }, - "KmsKeyId":{ - "type":"string", - "max":2048, - "min":1, - "sensitive":true - }, - "LambdaArn":{ - "type":"string", - "max":2048, - "min":1, - "pattern":"arn:aws[a-zA-Z-]*:lambda:[a-z-]*-[0-9]:[0-9]{12}:function:[a-zA-Z0-9-_]+(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?(:[a-zA-Z0-9-_]+)?" - }, - "LicenseNotFoundException":{ - "type":"structure", - "required":["message"], - "members":{ - "message":{"shape":"ErrorMessage"} - }, - "error":{ - "httpStatusCode":400, - "senderFault":true - }, - "exception":true - }, - "ListApplicationsRequest":{ - "type":"structure", - "members":{ - "nextToken":{ - "shape":"NextToken", - "location":"querystring", - "locationName":"nextToken" - }, - "maxResults":{ - "shape":"MaxResultsIntegerForListApplications", - "location":"querystring", - "locationName":"maxResults" - } - } - }, - "ListApplicationsResponse":{ - "type":"structure", - "members":{ - "nextToken":{"shape":"NextToken"}, - "applications":{"shape":"Applications"} - } - }, - "ListConversationsRequest":{ - "type":"structure", - "required":[ - "applicationId", - "userId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "userId":{ - "shape":"UserId", - "location":"querystring", - "locationName":"userId" - }, - "nextToken":{ - "shape":"NextToken", - "location":"querystring", - "locationName":"nextToken" - }, - "maxResults":{ - "shape":"MaxResultsIntegerForListConversations", - "location":"querystring", - "locationName":"maxResults" - } - } - }, - "ListConversationsResponse":{ - "type":"structure", - "members":{ - "nextToken":{"shape":"NextToken"}, - "conversations":{"shape":"Conversations"} - } - }, - "ListDataSourceSyncJobsRequest":{ - "type":"structure", - "required":[ - "dataSourceId", - "applicationId", - "indexId" - ], - "members":{ - "dataSourceId":{ - "shape":"DataSourceId", - "location":"uri", - "locationName":"dataSourceId" - }, - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "indexId":{ - "shape":"IndexId", - "location":"uri", - "locationName":"indexId" - }, - "nextToken":{ - "shape":"NextToken", - "location":"querystring", - "locationName":"nextToken" - }, - "maxResults":{ - "shape":"MaxResultsIntegerForListDataSourcesSyncJobs", - "location":"querystring", - "locationName":"maxResults" - }, - "startTime":{ - "shape":"Timestamp", - "location":"querystring", - "locationName":"startTime" - }, - "endTime":{ - "shape":"Timestamp", - "location":"querystring", - "locationName":"endTime" - }, - "statusFilter":{ - "shape":"DataSourceSyncJobStatus", - "location":"querystring", - "locationName":"syncStatus" - } - } - }, - "ListDataSourceSyncJobsResponse":{ - "type":"structure", - "members":{ - "history":{"shape":"DataSourceSyncJobs"}, - "nextToken":{"shape":"NextToken"} - } - }, - "ListDataSourcesRequest":{ - "type":"structure", - "required":[ - "applicationId", - "indexId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "indexId":{ - "shape":"IndexId", - "location":"uri", - "locationName":"indexId" - }, - "nextToken":{ - "shape":"NextToken", - "location":"querystring", - "locationName":"nextToken" - }, - "maxResults":{ - "shape":"MaxResultsIntegerForListDataSources", - "location":"querystring", - "locationName":"maxResults" - } - } - }, - "ListDataSourcesResponse":{ - "type":"structure", - "members":{ - "dataSources":{"shape":"DataSources"}, - "nextToken":{"shape":"NextToken"} - } - }, - "ListDocumentsRequest":{ - "type":"structure", - "required":[ - "applicationId", - "indexId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "indexId":{ - "shape":"IndexId", - "location":"uri", - "locationName":"indexId" - }, - "dataSourceIds":{ - "shape":"DataSourceIds", - "location":"querystring", - "locationName":"dataSourceIds" - }, - "nextToken":{ - "shape":"NextToken", - "location":"querystring", - "locationName":"nextToken" - }, - "maxResults":{ - "shape":"MaxResultsIntegerForListDocuments", - "location":"querystring", - "locationName":"maxResults" - } - } - }, - "ListDocumentsResponse":{ - "type":"structure", - "members":{ - "documentDetailList":{"shape":"DocumentDetailList"}, - "nextToken":{"shape":"NextToken"} - } - }, - "ListGroupsRequest":{ - "type":"structure", - "required":[ - "applicationId", - "indexId", - "updatedEarlierThan" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "indexId":{ - "shape":"IndexId", - "location":"uri", - "locationName":"indexId" - }, - "updatedEarlierThan":{ - "shape":"Timestamp", - "location":"querystring", - "locationName":"updatedEarlierThan" - }, - "dataSourceId":{ - "shape":"DataSourceId", - "location":"querystring", - "locationName":"dataSourceId" - }, - "nextToken":{ - "shape":"NextToken", - "location":"querystring", - "locationName":"nextToken" - }, - "maxResults":{ - "shape":"MaxResultsIntegerForListGroupsRequest", - "location":"querystring", - "locationName":"maxResults" - } - } - }, - "ListGroupsResponse":{ - "type":"structure", - "members":{ - "nextToken":{"shape":"NextToken"}, - "items":{"shape":"GroupSummaryList"} - } - }, - "ListIndicesRequest":{ - "type":"structure", - "required":["applicationId"], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "nextToken":{ - "shape":"NextToken", - "location":"querystring", - "locationName":"nextToken" - }, - "maxResults":{ - "shape":"MaxResultsIntegerForListIndices", - "location":"querystring", - "locationName":"maxResults" - } - } - }, - "ListIndicesResponse":{ - "type":"structure", - "members":{ - "nextToken":{"shape":"NextToken"}, - "indices":{"shape":"Indices"} - } - }, - "ListMessagesRequest":{ - "type":"structure", - "required":[ - "conversationId", - "applicationId", - "userId" - ], - "members":{ - "conversationId":{ - "shape":"ConversationId", - "location":"uri", - "locationName":"conversationId" - }, - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "userId":{ - "shape":"UserId", - "location":"querystring", - "locationName":"userId" - }, - "nextToken":{ - "shape":"NextToken", - "location":"querystring", - "locationName":"nextToken" - }, - "maxResults":{ - "shape":"MaxResultsIntegerForListMessages", - "location":"querystring", - "locationName":"maxResults" - } - } - }, - "ListMessagesResponse":{ - "type":"structure", - "members":{ - "messages":{"shape":"Messages"}, - "nextToken":{"shape":"NextToken"} - } - }, - "ListPluginsRequest":{ - "type":"structure", - "required":["applicationId"], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "nextToken":{ - "shape":"NextToken", - "location":"querystring", - "locationName":"nextToken" - }, - "maxResults":{ - "shape":"MaxResultsIntegerForListPlugins", - "location":"querystring", - "locationName":"maxResults" - } - } - }, - "ListPluginsResponse":{ - "type":"structure", - "members":{ - "nextToken":{"shape":"NextToken"}, - "plugins":{"shape":"Plugins"} - } - }, - "ListRetrieversRequest":{ - "type":"structure", - "required":["applicationId"], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "nextToken":{ - "shape":"NextToken", - "location":"querystring", - "locationName":"nextToken" - }, - "maxResults":{ - "shape":"MaxResultsIntegerForListRetrieversRequest", - "location":"querystring", - "locationName":"maxResults" - } - } - }, - "ListRetrieversResponse":{ - "type":"structure", - "members":{ - "retrievers":{"shape":"Retrievers"}, - "nextToken":{"shape":"NextToken"} - } - }, - "ListTagsForResourceRequest":{ - "type":"structure", - "required":["resourceARN"], - "members":{ - "resourceARN":{ - "shape":"AmazonResourceName", - "location":"uri", - "locationName":"resourceARN" - } - } - }, - "ListTagsForResourceResponse":{ - "type":"structure", - "members":{ - "tags":{"shape":"Tags"} - } - }, - "ListWebExperiencesRequest":{ - "type":"structure", - "required":["applicationId"], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "nextToken":{ - "shape":"NextToken", - "location":"querystring", - "locationName":"nextToken" - }, - "maxResults":{ - "shape":"MaxResultsIntegerForListWebExperiencesRequest", - "location":"querystring", - "locationName":"maxResults" - } - } - }, - "ListWebExperiencesResponse":{ - "type":"structure", - "members":{ - "webExperiences":{"shape":"WebExperiences"}, - "nextToken":{"shape":"NextToken"} - } - }, - "Long":{ - "type":"long", - "box":true - }, - "MaxResultsIntegerForGetTopicConfigurations":{ - "type":"integer", - "box":true, - "max":50, - "min":1 - }, - "MaxResultsIntegerForListApplications":{ - "type":"integer", - "box":true, - "max":100, - "min":1 - }, - "MaxResultsIntegerForListConversations":{ - "type":"integer", - "box":true, - "max":100, - "min":1 - }, - "MaxResultsIntegerForListDataSources":{ - "type":"integer", - "box":true, - "max":10, - "min":1 - }, - "MaxResultsIntegerForListDataSourcesSyncJobs":{ - "type":"integer", - "box":true, - "max":10, - "min":1 - }, - "MaxResultsIntegerForListDocuments":{ - "type":"integer", - "box":true, - "max":100, - "min":1 - }, - "MaxResultsIntegerForListGroupsRequest":{ - "type":"integer", - "box":true, - "max":10, - "min":1 - }, - "MaxResultsIntegerForListIndices":{ - "type":"integer", - "box":true, - "max":100, - "min":1 - }, - "MaxResultsIntegerForListMessages":{ - "type":"integer", - "box":true, - "max":100, - "min":1 - }, - "MaxResultsIntegerForListPlugins":{ - "type":"integer", - "box":true, - "max":50, - "min":1 - }, - "MaxResultsIntegerForListRetrieversRequest":{ - "type":"integer", - "box":true, - "max":50, - "min":1 - }, - "MaxResultsIntegerForListWebExperiencesRequest":{ - "type":"integer", - "box":true, - "max":100, - "min":1 - }, - "MemberGroup":{ - "type":"structure", - "required":["groupName"], - "members":{ - "groupName":{"shape":"GroupName"}, - "type":{"shape":"MembershipType"} - } - }, - "MemberGroups":{ - "type":"list", - "member":{"shape":"MemberGroup"}, - "max":1000, - "min":1 - }, - "MemberRelation":{ - "type":"string", - "enum":[ - "AND", - "OR" - ] - }, - "MemberUser":{ - "type":"structure", - "required":["userId"], - "members":{ - "userId":{"shape":"DataSourceUserId"}, - "type":{"shape":"MembershipType"} - } - }, - "MemberUsers":{ - "type":"list", - "member":{"shape":"MemberUser"}, - "max":1000, - "min":1 - }, - "MembershipType":{ - "type":"string", - "enum":[ - "INDEX", - "DATASOURCE" - ] - }, - "Message":{ - "type":"structure", - "members":{ - "messageId":{"shape":"String"}, - "body":{"shape":"MessageBody"}, - "time":{"shape":"Timestamp"}, - "type":{"shape":"MessageType"}, - "attachments":{"shape":"AttachmentsOutput"}, - "sourceAttribution":{"shape":"SourceAttributions"}, - "actionReview":{"shape":"ActionReview"}, - "actionExecution":{"shape":"ActionExecution"} - } - }, - "MessageBody":{ - "type":"string", - "max":1000, - "min":0, - "pattern":"\\P{C}*$}" - }, - "MessageId":{ - "type":"string", - "max":36, - "min":36, - "pattern":"[a-zA-Z0-9][a-zA-Z0-9-]{35}" - }, - "MessageType":{ - "type":"string", - "enum":[ - "USER", - "SYSTEM" - ] - }, - "MessageUsefulness":{ - "type":"string", - "enum":[ - "USEFUL", - "NOT_USEFUL" - ] - }, - "MessageUsefulnessComment":{ - "type":"string", - "max":1000, - "min":0, - "pattern":"\\P{C}*" - }, - "MessageUsefulnessFeedback":{ - "type":"structure", - "required":[ - "usefulness", - "submittedAt" - ], - "members":{ - "usefulness":{"shape":"MessageUsefulness"}, - "reason":{"shape":"MessageUsefulnessReason"}, - "comment":{"shape":"MessageUsefulnessComment"}, - "submittedAt":{"shape":"Timestamp"} - } - }, - "MessageUsefulnessReason":{ - "type":"string", - "enum":[ - "NOT_FACTUALLY_CORRECT", - "HARMFUL_OR_UNSAFE", - "INCORRECT_OR_MISSING_SOURCES", - "NOT_HELPFUL", - "FACTUALLY_CORRECT", - "COMPLETE", - "RELEVANT_SOURCES", - "HELPFUL" - ] - }, - "Messages":{ - "type":"list", - "member":{"shape":"Message"} - }, - "MetricValue":{ - "type":"string", - "pattern":"(([1-9][0-9]*)|0)" - }, - "NativeIndexConfiguration":{ - "type":"structure", - "required":["indexId"], - "members":{ - "indexId":{"shape":"IndexId"} - } - }, - "NextToken":{ - "type":"string", - "max":800, - "min":1 - }, - "OAuth2ClientCredentialConfiguration":{ - "type":"structure", - "required":[ - "secretArn", - "roleArn" - ], - "members":{ - "secretArn":{"shape":"SecretArn"}, - "roleArn":{"shape":"RoleArn"} - } - }, - "Plugin":{ - "type":"structure", - "members":{ - "pluginId":{"shape":"PluginId"}, - "displayName":{"shape":"PluginName"}, - "type":{"shape":"PluginType"}, - "serverUrl":{"shape":"Url"}, - "state":{"shape":"PluginState"}, - "createdAt":{"shape":"Timestamp"}, - "updatedAt":{"shape":"Timestamp"} - } - }, - "PluginArn":{ - "type":"string", - "max":1284, - "min":0, - "pattern":"arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}" - }, - "PluginAuthConfiguration":{ - "type":"structure", - "members":{ - "basicAuthConfiguration":{"shape":"BasicAuthConfiguration"}, - "oAuth2ClientCredentialConfiguration":{"shape":"OAuth2ClientCredentialConfiguration"} - }, - "union":true - }, - "PluginId":{ - "type":"string", - "max":36, - "min":36, - "pattern":"[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - }, - "PluginName":{ - "type":"string", - "max":100, - "min":1, - "pattern":"[a-zA-Z0-9][a-zA-Z0-9_-]*" - }, - "PluginState":{ - "type":"string", - "enum":[ - "ENABLED", - "DISABLED" - ] - }, - "PluginType":{ - "type":"string", - "enum":[ - "SERVICE_NOW", - "SALESFORCE", - "JIRA", - "ZENDESK" - ] - }, - "Plugins":{ - "type":"list", - "member":{"shape":"Plugin"} - }, - "Principal":{ - "type":"structure", - "members":{ - "user":{"shape":"PrincipalUser"}, - "group":{"shape":"PrincipalGroup"} - }, - "union":true - }, - "PrincipalGroup":{ - "type":"structure", - "required":["access"], - "members":{ - "name":{"shape":"GroupName"}, - "access":{"shape":"ReadAccessType"}, - "membershipType":{"shape":"MembershipType"} - } - }, - "PrincipalUser":{ - "type":"structure", - "required":["access"], - "members":{ - "id":{"shape":"UserId"}, - "access":{"shape":"ReadAccessType"}, - "membershipType":{"shape":"MembershipType"} - } - }, - "Principals":{ - "type":"list", - "member":{"shape":"Principal"} - }, - "PutFeedbackRequest":{ - "type":"structure", - "required":[ - "applicationId", - "userId", - "conversationId", - "messageId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "userId":{ - "shape":"UserId", - "location":"querystring", - "locationName":"userId" - }, - "conversationId":{ - "shape":"ConversationId", - "location":"uri", - "locationName":"conversationId" - }, - "messageId":{ - "shape":"SystemMessageId", - "location":"uri", - "locationName":"messageId" - }, - "messageCopiedAt":{"shape":"Timestamp"}, - "messageUsefulness":{"shape":"MessageUsefulnessFeedback"} - } - }, - "PutGroupRequest":{ - "type":"structure", - "required":[ - "applicationId", - "indexId", - "groupName", - "type", - "groupMembers" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "indexId":{ - "shape":"IndexId", - "location":"uri", - "locationName":"indexId" - }, - "groupName":{"shape":"GroupName"}, - "dataSourceId":{"shape":"DataSourceId"}, - "type":{"shape":"MembershipType"}, - "groupMembers":{"shape":"GroupMembers"} - } - }, - "PutGroupResponse":{ - "type":"structure", - "members":{ - } - }, - "ReadAccessType":{ - "type":"string", - "enum":[ - "ALLOW", - "DENY" - ] - }, - "ResourceNotFoundException":{ - "type":"structure", - "required":[ - "message", - "resourceId", - "resourceType" - ], - "members":{ - "message":{"shape":"ErrorMessage"}, - "resourceId":{"shape":"String"}, - "resourceType":{"shape":"String"} - }, - "error":{ - "httpStatusCode":404, - "senderFault":true - }, - "exception":true - }, - "ResponseScope":{ - "type":"string", - "enum":[ - "ENTERPRISE_CONTENT_ONLY", - "EXTENDED_KNOWLEDGE_ENABLED" - ] - }, - "Retriever":{ - "type":"structure", - "members":{ - "applicationId":{"shape":"ApplicationId"}, - "retrieverId":{"shape":"RetrieverId"}, - "type":{"shape":"RetrieverType"}, - "status":{"shape":"RetrieverStatus"}, - "displayName":{"shape":"RetrieverName"} - } - }, - "RetrieverArn":{ - "type":"string", - "max":1284, - "min":0, - "pattern":"arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}" - }, - "RetrieverConfiguration":{ - "type":"structure", - "members":{ - "nativeIndexConfiguration":{"shape":"NativeIndexConfiguration"}, - "kendraIndexConfiguration":{"shape":"KendraIndexConfiguration"} - }, - "union":true - }, - "RetrieverId":{ - "type":"string", - "max":36, - "min":36, - "pattern":"[a-zA-Z0-9][a-zA-Z0-9-]{35}" - }, - "RetrieverName":{ - "type":"string", - "max":1000, - "min":1, - "pattern":"[a-zA-Z0-9][a-zA-Z0-9_-]*" - }, - "RetrieverStatus":{ - "type":"string", - "enum":[ - "CREATING", - "ACTIVE", - "FAILED" - ] - }, - "RetrieverType":{ - "type":"string", - "enum":[ - "NATIVE_INDEX", - "KENDRA_INDEX" - ] - }, - "Retrievers":{ - "type":"list", - "member":{"shape":"Retriever"} - }, - "RoleArn":{ - "type":"string", - "max":1284, - "min":0, - "pattern":"arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}" - }, - "Rule":{ - "type":"structure", - "members":{ - "includedUsersAndGroups":{"shape":"UsersAndGroups"}, - "excludedUsersAndGroups":{"shape":"UsersAndGroups"}, - "ruleType":{"shape":"RuleType"}, - "ruleConfiguration":{"shape":"RuleConfiguration"} - } - }, - "RuleConfiguration":{ - "type":"structure", - "members":{ - "contentBlockerRule":{"shape":"ContentBlockerRule"}, - "contentRetrievalRule":{"shape":"ContentRetrievalRule"} - }, - "union":true - }, - "RuleType":{ - "type":"string", - "enum":[ - "CONTENT_BLOCKER_RULE", - "CONTENT_RETRIEVAL_RULE" - ] - }, - "Rules":{ - "type":"list", - "member":{"shape":"Rule"}, - "max":10, - "min":0 - }, - "S3":{ - "type":"structure", - "required":[ - "bucket", - "key" - ], - "members":{ - "bucket":{"shape":"S3BucketName"}, - "key":{"shape":"S3ObjectKey"} - } - }, - "S3BucketName":{ - "type":"string", - "max":63, - "min":1, - "pattern":"[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]" - }, - "S3ObjectKey":{ - "type":"string", - "max":1024, - "min":1 - }, - "SamlAttribute":{ - "type":"string", - "max":256, - "min":1 - }, - "SamlConfiguration":{ - "type":"structure", - "required":[ - "metadataXML", - "roleArn", - "userIdAttribute" - ], - "members":{ - "metadataXML":{"shape":"SamlMetadataXML"}, - "roleArn":{"shape":"RoleArn"}, - "userIdAttribute":{"shape":"SamlAttribute"}, - "userGroupAttribute":{"shape":"SamlAttribute"} - } - }, - "SamlMetadataXML":{ - "type":"string", - "max":10000000, - "min":1000, - "pattern":".*" - }, - "SecretArn":{ - "type":"string", - "max":1284, - "min":0, - "pattern":"arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}" - }, - "SecurityGroupId":{ - "type":"string", - "max":200, - "min":1, - "pattern":"[-0-9a-zA-Z]+" - }, - "SecurityGroupIds":{ - "type":"list", - "member":{"shape":"SecurityGroupId"}, - "max":10, - "min":1 - }, - "ServiceQuotaExceededException":{ - "type":"structure", - "required":[ - "message", - "resourceId", - "resourceType" - ], - "members":{ - "message":{"shape":"ErrorMessage"}, - "resourceId":{"shape":"String"}, - "resourceType":{"shape":"String"} - }, - "error":{ - "httpStatusCode":402, - "senderFault":true - }, - "exception":true - }, - "SourceAttribution":{ - "type":"structure", - "members":{ - "title":{"shape":"String"}, - "snippet":{"shape":"String"}, - "url":{"shape":"String"}, - "citationNumber":{"shape":"Integer"}, - "updatedAt":{"shape":"Timestamp"}, - "textMessageSegments":{"shape":"TextSegmentList"} - } - }, - "SourceAttributions":{ - "type":"list", - "member":{"shape":"SourceAttribution"} - }, - "StartDataSourceSyncJobRequest":{ - "type":"structure", - "required":[ - "dataSourceId", - "applicationId", - "indexId" - ], - "members":{ - "dataSourceId":{ - "shape":"DataSourceId", - "location":"uri", - "locationName":"dataSourceId" - }, - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "indexId":{ - "shape":"IndexId", - "location":"uri", - "locationName":"indexId" - } - } - }, - "StartDataSourceSyncJobResponse":{ - "type":"structure", - "members":{ - "executionId":{"shape":"ExecutionId"} - } - }, - "Status":{ - "type":"string", - "enum":[ - "ENABLED", - "DISABLED" - ] - }, - "StopDataSourceSyncJobRequest":{ - "type":"structure", - "required":[ - "dataSourceId", - "applicationId", - "indexId" - ], - "members":{ - "dataSourceId":{ - "shape":"DataSourceId", - "location":"uri", - "locationName":"dataSourceId" - }, - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "indexId":{ - "shape":"IndexId", - "location":"uri", - "locationName":"indexId" - } - } - }, - "StopDataSourceSyncJobResponse":{ - "type":"structure", - "members":{ - } - }, - "String":{ - "type":"string", - "max":2048, - "min":1 - }, - "SubnetId":{ - "type":"string", - "max":200, - "min":1, - "pattern":"[-0-9a-zA-Z]+" - }, - "SubnetIds":{ - "type":"list", - "member":{"shape":"SubnetId"} - }, - "SyncSchedule":{ - "type":"string", - "max":998, - "min":0, - "pattern":"\\P{C}*" - }, - "SystemMessageId":{ - "type":"string", - "max":36, - "min":36, - "pattern":"[a-zA-Z0-9][a-zA-Z0-9-]{35}" - }, - "SystemMessageOverride":{ - "type":"string", - "max":350, - "min":0, - "pattern":"\\P{C}*" - }, - "Tag":{ - "type":"structure", - "required":[ - "key", - "value" - ], - "members":{ - "key":{"shape":"TagKey"}, - "value":{"shape":"TagValue"} - } - }, - "TagKey":{ - "type":"string", - "max":128, - "min":1 - }, - "TagKeys":{ - "type":"list", - "member":{"shape":"TagKey"}, - "max":200, - "min":0 - }, - "TagResourceRequest":{ - "type":"structure", - "required":[ - "resourceARN", - "tags" - ], - "members":{ - "resourceARN":{ - "shape":"AmazonResourceName", - "location":"uri", - "locationName":"resourceARN" - }, - "tags":{"shape":"Tags"} - } - }, - "TagResourceResponse":{ - "type":"structure", - "members":{ - } - }, - "TagValue":{ - "type":"string", - "max":256, - "min":0 - }, - "Tags":{ - "type":"list", - "member":{"shape":"Tag"}, - "max":200, - "min":0 - }, - "TextDocumentStatistics":{ - "type":"structure", - "members":{ - "indexedTextBytes":{"shape":"IndexedTextBytes"}, - "indexedTextDocumentCount":{"shape":"IndexedTextDocument"} - } - }, - "TextSegment":{ - "type":"structure", - "members":{ - "beginOffset":{"shape":"Integer"}, - "endOffset":{"shape":"Integer"} - } - }, - "TextSegmentList":{ - "type":"list", - "member":{"shape":"TextSegment"} - }, - "ThrottlingException":{ - "type":"structure", - "required":["message"], - "members":{ - "message":{"shape":"ErrorMessage"} - }, - "error":{ - "httpStatusCode":429, - "senderFault":true - }, - "exception":true - }, - "Timestamp":{"type":"timestamp"}, - "Title":{ - "type":"string", - "max":1024, - "min":1 - }, - "TopicConfiguration":{ - "type":"structure", - "members":{ - "name":{"shape":"TopicConfigurationName"}, - "description":{"shape":"TopicDescription"}, - "exampleChatMessages":{"shape":"ExampleChatMessages"}, - "rules":{"shape":"Rules"} - } - }, - "TopicConfigurationName":{ - "type":"string", - "max":36, - "min":1, - "pattern":"[a-zA-Z0-9][a-zA-Z0-9-]{0,35}" - }, - "TopicConfigurations":{ - "type":"list", - "member":{"shape":"TopicConfiguration"}, - "max":10, - "min":0 - }, - "TopicDescription":{ - "type":"string", - "max":350, - "min":0, - "pattern":"\\P{C}*" - }, - "UntagResourceRequest":{ - "type":"structure", - "required":[ - "resourceARN", - "tagKeys" - ], - "members":{ - "resourceARN":{ - "shape":"AmazonResourceName", - "location":"uri", - "locationName":"resourceARN" - }, - "tagKeys":{ - "shape":"TagKeys", - "location":"querystring", - "locationName":"tagKeys" - } - } - }, - "UntagResourceResponse":{ - "type":"structure", - "members":{ - } - }, - "UpdateApplicationRequest":{ - "type":"structure", - "required":["applicationId"], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "displayName":{"shape":"ApplicationName"}, - "description":{"shape":"Description"}, - "roleArn":{"shape":"RoleArn"}, - "attachmentsConfiguration":{"shape":"AttachmentsConfiguration"} - } - }, - "UpdateApplicationResponse":{ - "type":"structure", - "members":{ - } - }, - "UpdateChatControlsConfigurationRequest":{ - "type":"structure", - "required":["applicationId"], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "clientToken":{ - "shape":"ClientToken", - "idempotencyToken":true - }, - "responseScope":{"shape":"ResponseScope"}, - "blockedPhrasesConfigurationUpdate":{"shape":"BlockedPhrasesConfigurationUpdate"}, - "topicConfigurationsToCreateOrUpdate":{"shape":"TopicConfigurations"}, - "topicConfigurationsToDelete":{"shape":"TopicConfigurations"} - } - }, - "UpdateChatControlsConfigurationResponse":{ - "type":"structure", - "members":{ - } - }, - "UpdateDataSourceRequest":{ - "type":"structure", - "required":[ - "applicationId", - "indexId", - "dataSourceId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "indexId":{ - "shape":"IndexId", - "location":"uri", - "locationName":"indexId" - }, - "dataSourceId":{ - "shape":"DataSourceId", - "location":"uri", - "locationName":"dataSourceId" - }, - "displayName":{"shape":"DataSourceName"}, - "configuration":{"shape":"DataSourceConfiguration"}, - "vpcConfiguration":{"shape":"DataSourceVpcConfiguration"}, - "description":{"shape":"Description"}, - "syncSchedule":{"shape":"SyncSchedule"}, - "roleArn":{"shape":"RoleArn"}, - "documentEnrichmentConfiguration":{"shape":"DocumentEnrichmentConfiguration"} - } - }, - "UpdateDataSourceResponse":{ - "type":"structure", - "members":{ - } - }, - "UpdateIndexRequest":{ - "type":"structure", - "required":[ - "applicationId", - "indexId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "indexId":{ - "shape":"IndexId", - "location":"uri", - "locationName":"indexId" - }, - "displayName":{"shape":"ApplicationName"}, - "description":{"shape":"Description"}, - "capacityConfiguration":{"shape":"IndexCapacityConfiguration"}, - "documentAttributeConfigurations":{"shape":"DocumentAttributeConfigurations"} - } - }, - "UpdateIndexResponse":{ - "type":"structure", - "members":{ - } - }, - "UpdatePluginRequest":{ - "type":"structure", - "required":[ - "applicationId", - "pluginId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "pluginId":{ - "shape":"PluginId", - "location":"uri", - "locationName":"pluginId" - }, - "displayName":{"shape":"PluginName"}, - "state":{"shape":"PluginState"}, - "serverUrl":{"shape":"Url"}, - "authConfiguration":{"shape":"PluginAuthConfiguration"} - } - }, - "UpdatePluginResponse":{ - "type":"structure", - "members":{ - } - }, - "UpdateRetrieverRequest":{ - "type":"structure", - "required":[ - "applicationId", - "retrieverId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "retrieverId":{ - "shape":"RetrieverId", - "location":"uri", - "locationName":"retrieverId" - }, - "configuration":{"shape":"RetrieverConfiguration"}, - "displayName":{"shape":"RetrieverName"}, - "roleArn":{"shape":"RoleArn"} - } - }, - "UpdateRetrieverResponse":{ - "type":"structure", - "members":{ - } - }, - "UpdateUserRequest":{ - "type":"structure", - "required":[ - "applicationId", - "userId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "userId":{ - "shape":"String", - "location":"uri", - "locationName":"userId" - }, - "userAliasesToUpdate":{"shape":"UserAliases"}, - "userAliasesToDelete":{"shape":"UserAliases"} - } - }, - "UpdateUserResponse":{ - "type":"structure", - "members":{ - "userAliasesAdded":{"shape":"UserAliases"}, - "userAliasesUpdated":{"shape":"UserAliases"}, - "userAliasesDeleted":{"shape":"UserAliases"} - } - }, - "UpdateWebExperienceRequest":{ - "type":"structure", - "required":[ - "applicationId", - "webExperienceId" - ], - "members":{ - "applicationId":{ - "shape":"ApplicationId", - "location":"uri", - "locationName":"applicationId" - }, - "webExperienceId":{ - "shape":"WebExperienceId", - "location":"uri", - "locationName":"webExperienceId" - }, - "authenticationConfiguration":{"shape":"WebExperienceAuthConfiguration"}, - "title":{"shape":"WebExperienceTitle"}, - "subtitle":{"shape":"WebExperienceSubtitle"}, - "welcomeMessage":{"shape":"WebExperienceWelcomeMessage"}, - "samplePromptsControlMode":{"shape":"WebExperienceSamplePromptsControlMode"} - } - }, - "UpdateWebExperienceResponse":{ - "type":"structure", - "members":{ - } - }, - "Url":{ - "type":"string", - "max":2048, - "min":1, - "pattern":"(https?|ftp|file)://([^\\s]*)" - }, - "UserAlias":{ - "type":"structure", - "required":["userId"], - "members":{ - "indexId":{"shape":"IndexId"}, - "dataSourceId":{"shape":"DataSourceId"}, - "userId":{"shape":"String"} - } - }, - "UserAliases":{ - "type":"list", - "member":{"shape":"UserAlias"} - }, - "UserGroups":{ - "type":"list", - "member":{"shape":"String"} - }, - "UserId":{ - "type":"string", - "max":1024, - "min":1, - "pattern":"\\P{C}*" - }, - "UserIds":{ - "type":"list", - "member":{"shape":"String"} - }, - "UserMessage":{ - "type":"string", - "max":7000, - "min":1 - }, - "UsersAndGroups":{ - "type":"structure", - "members":{ - "userIds":{"shape":"UserIds"}, - "userGroups":{"shape":"UserGroups"} - } - }, - "ValidationException":{ - "type":"structure", - "required":[ - "message", - "reason" - ], - "members":{ - "message":{"shape":"ErrorMessage"}, - "reason":{"shape":"ValidationExceptionReason"}, - "fields":{"shape":"ValidationExceptionFields"} - }, - "error":{ - "httpStatusCode":400, - "senderFault":true - }, - "exception":true - }, - "ValidationExceptionField":{ - "type":"structure", - "required":[ - "name", - "message" - ], - "members":{ - "name":{"shape":"String"}, - "message":{"shape":"String"} - } - }, - "ValidationExceptionFields":{ - "type":"list", - "member":{"shape":"ValidationExceptionField"} - }, - "ValidationExceptionReason":{ - "type":"string", - "enum":[ - "CANNOT_PARSE", - "FIELD_VALIDATION_FAILED", - "UNKNOWN_OPERATION" - ] - }, - "WebExperience":{ - "type":"structure", - "members":{ - "webExperienceId":{"shape":"WebExperienceId"}, - "createdAt":{"shape":"Timestamp"}, - "updatedAt":{"shape":"Timestamp"}, - "defaultEndpoint":{"shape":"Url"}, - "status":{"shape":"WebExperienceStatus"} - } - }, - "WebExperienceArn":{ - "type":"string", - "max":1284, - "min":0, - "pattern":"arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}" - }, - "WebExperienceAuthConfiguration":{ - "type":"structure", - "members":{ - "samlConfiguration":{"shape":"SamlConfiguration"} - }, - "union":true - }, - "WebExperienceId":{ - "type":"string", - "max":36, - "min":36, - "pattern":"[a-zA-Z0-9][a-zA-Z0-9-]*" - }, - "WebExperienceSamplePromptsControlMode":{ - "type":"string", - "enum":[ - "ENABLED", - "DISABLED" - ] - }, - "WebExperienceStatus":{ - "type":"string", - "enum":[ - "CREATING", - "ACTIVE", - "DELETING", - "FAILED", - "PENDING_AUTH_CONFIG" - ] - }, - "WebExperienceSubtitle":{ - "type":"string", - "max":500, - "min":0, - "pattern":"\\P{C}*" - }, - "WebExperienceTitle":{ - "type":"string", - "max":500, - "min":0, - "pattern":"\\P{C}*" - }, - "WebExperienceWelcomeMessage":{ - "type":"string", - "max":300, - "min":0 - }, - "WebExperiences":{ - "type":"list", - "member":{"shape":"WebExperience"} - } - } -} diff --git a/src/helpers/chat.ts b/src/helpers/chat.ts index c14c230..be76876 100644 --- a/src/helpers/chat.ts +++ b/src/helpers/chat.ts @@ -1,10 +1,6 @@ import { SlackEventsEnv } from '@functions/slack-event-handler'; import { Block } from '@slack/web-api'; -import { - AmazonQResponse, - callClient, - submitFeedbackRequest -} from '@helpers/amazon-q/amazon-q-client'; +import { callClient, submitFeedbackRequest } from '@helpers/amazon-q/amazon-q-client'; import { deleteItem, getItem, putItem } from '@helpers/dynamodb-client'; import { getUserInfo, @@ -14,6 +10,7 @@ import { updateSlackMessage } from '@helpers/slack/slack-helpers'; import { getFeedbackBlocks, getResponseAsBlocks } from '@helpers/amazon-q/amazon-q-helpers'; +import { ChatSyncCommandOutput } from '@aws-sdk/client-qbusiness'; export interface ChatResponse { systemMessage: string; @@ -36,18 +33,6 @@ export const chatDependencies = { export type ChatDependencies = typeof chatDependencies; -export type callClient = ( - message: string, - attachments: Attachment[], - env: SlackEventsEnv, - context?: { conversationId: string; parentMessageId: string } -) => ChatResponse; - -export interface Attachment { - name: string; - data: Buffer; -} - export type getResponseAsBlocks = (response: ChatResponse) => Block[] | undefined; export const getChannelKey = ( @@ -109,7 +94,7 @@ export const saveChannelMetadata = async ( }; export const saveMessageMetadata = async ( - amazonQResponse: AmazonQResponse, + amazonQResponse: ChatSyncCommandOutput, dependencies: ChatDependencies, env: SlackEventsEnv ) => { diff --git a/src/helpers/slack/slack-helpers.ts b/src/helpers/slack/slack-helpers.ts index 2bcd930..c8b8fcd 100644 --- a/src/helpers/slack/slack-helpers.ts +++ b/src/helpers/slack/slack-helpers.ts @@ -5,8 +5,8 @@ import { Block, ChatPostMessageResponse, ModalView, WebClient } from '@slack/web import { SlackEventsEnv } from '@functions/slack-event-handler'; import { SlackInteractionsEnv } from '@functions/slack-interaction-handler'; import { makeLogger } from '@src/logging'; -import { SourceAttribution } from '@helpers/amazon-q/amazon-q-client'; import { isEmpty } from '@src/utils'; +import { SourceAttributions } from 'aws-sdk/clients/qbusiness'; const logger = makeLogger('slack-helpers'); @@ -104,7 +104,7 @@ export const sendSlackMessage = async ( export const updateSlackMessage = async ( env: SlackInteractionsEnv | SlackEventsEnv, postMessageResponse: ChatPostMessageResponse, - text: string, + text: string | undefined, blocks?: Block[] ) => { if (isEmpty(postMessageResponse.channel) || isEmpty(postMessageResponse.ts)) { @@ -189,7 +189,7 @@ export const createButton = (text: string, systemMessageId: string) => ({ ] }); -export const createModal = (title: string, sources: SourceAttribution[]): ModalView => { +export const createModal = (title: string, sources: SourceAttributions): ModalView => { const blocks = []; for (let i = 0; i < sources.length; i++) { const source = sources[i]; diff --git a/tst/functions/slack-event-handler.test.ts b/tst/functions/slack-event-handler.test.ts index 5dcdc8f..bda6cad 100644 --- a/tst/functions/slack-event-handler.test.ts +++ b/tst/functions/slack-event-handler.test.ts @@ -2,6 +2,7 @@ import { handler } from '@functions/slack-event-handler'; import amazonQValidResponse2TextSimple from '@tst/mocks/amazon-q/valid-response-2.json'; import { MOCK_AWS_RESPONSE, MOCK_DEPENDENCIES, MOCK_ENV } from '@tst/mocks/mocks'; import { Callback, Context } from 'aws-lambda'; +import { ChatSyncCommandOutput } from '@aws-sdk/client-qbusiness'; /* eslint @typescript-eslint/no-explicit-any: "off" */ @@ -199,7 +200,7 @@ describe('Slack event handler test', () => { {} as Callback, { ...MOCK_DEPENDENCIES, - callClient: () => Promise.resolve(amazonQValidResponse2TextSimple), + callClient: () => Promise.resolve(amazonQValidResponse2TextSimple as ChatSyncCommandOutput), getItem: async () => Promise.resolve({ Item: { @@ -386,7 +387,8 @@ describe('Slack event handler test', () => { conversationId: '80a6642c-8b3d-433e-a9cb-233b42a0d63a', sourceAttributions: [], systemMessageId: 'e5a23752-3f31-4fee-83fe-56fbd7803540', - userMessageId: '616fefbc-48bc-442d-a618-497bbbde3d66' + userMessageId: '616fefbc-48bc-442d-a618-497bbbde3d66', + $metadata: {} }, blocks: [ { diff --git a/tst/helpers/amazon-q/amazon-q-helpers.test.ts b/tst/helpers/amazon-q/amazon-q-helpers.test.ts index 3ef12e5..8c092f2 100644 --- a/tst/helpers/amazon-q/amazon-q-helpers.test.ts +++ b/tst/helpers/amazon-q/amazon-q-helpers.test.ts @@ -10,6 +10,7 @@ import { hasTable, parseTable } from '@helpers/amazon-q/amazon-q-helpers'; +import { ChatSyncCommandOutput } from '@aws-sdk/client-qbusiness'; describe('AmazonQ helpers test', () => { test('Should get a response as block with context', async () => { @@ -18,7 +19,7 @@ describe('AmazonQ helpers test', () => { }); test('Test response markdown conversion', async () => { - const response = getResponseAsBlocks(amazonQValidResponse1); + const response = getResponseAsBlocks(amazonQValidResponse1 as ChatSyncCommandOutput); expect(response).toEqual([ { text: { diff --git a/tst/mocks/amazon-q/valid-response-2.json b/tst/mocks/amazon-q/valid-response-2.json index 46d21b7..2417564 100644 --- a/tst/mocks/amazon-q/valid-response-2.json +++ b/tst/mocks/amazon-q/valid-response-2.json @@ -3,5 +3,6 @@ "conversationId": "80a6642c-8b3d-433e-a9cb-233b42a0d63a", "sourceAttributions": [], "systemMessageId": "e5a23752-3f31-4fee-83fe-56fbd7803540", - "userMessageId": "616fefbc-48bc-442d-a618-497bbbde3d66" + "userMessageId": "616fefbc-48bc-442d-a618-497bbbde3d66", + "$metadata": {} } \ No newline at end of file diff --git a/tst/mocks/mocks.ts b/tst/mocks/mocks.ts index 5945cd5..0e3fb70 100644 --- a/tst/mocks/mocks.ts +++ b/tst/mocks/mocks.ts @@ -1,6 +1,7 @@ import { HttpResponse } from 'aws-sdk'; import amazonQValidResponse1TextTable from '@tst/mocks/amazon-q/valid-response-1.json'; import { getFeedbackBlocks, getResponseAsBlocks } from '@helpers/amazon-q/amazon-q-helpers'; +import { ChatSyncCommandOutput, PutFeedbackCommandOutput } from '@aws-sdk/client-qbusiness'; export const MOCK_ENV = { SLACK_SECRET_NAME: 'SLACK_SECRET_NAME', @@ -29,8 +30,8 @@ export const MOCK_AWS_RESPONSE = { }; export const MOCK_DEPENDENCIES = { - callClient: () => Promise.resolve(amazonQValidResponse1TextTable), - submitFeedbackRequest: () => Promise.resolve(), + callClient: () => Promise.resolve(amazonQValidResponse1TextTable as ChatSyncCommandOutput), + submitFeedbackRequest: () => Promise.resolve({} as PutFeedbackCommandOutput), deleteItem: async () => MOCK_AWS_RESPONSE, putItem: async () => MOCK_AWS_RESPONSE, validateSlackRequest: () => Promise.resolve(true),