From 75831cb9f60bbb603a6b6e2eaed2119fc2f61d8e Mon Sep 17 00:00:00 2001 From: awstools Date: Tue, 28 Nov 2023 19:07:18 +0000 Subject: [PATCH] feat(client-qconnect): Amazon Q in Connect, an LLM-enhanced evolution of Amazon Connect Wisdom. This release adds generative AI support to Amazon Q Connect QueryAssistant and GetRecommendations APIs. --- clients/client-qconnect/.gitignore | 9 + clients/client-qconnect/LICENSE | 201 + clients/client-qconnect/README.md | 545 ++ clients/client-qconnect/api-extractor.json | 4 + clients/client-qconnect/package.json | 104 + clients/client-qconnect/src/QConnect.ts | 864 ++ clients/client-qconnect/src/QConnectClient.ts | 465 ++ .../CreateAssistantAssociationCommand.ts | 186 + .../src/commands/CreateAssistantCommand.ts | 183 + .../src/commands/CreateContentCommand.ts | 191 + .../commands/CreateKnowledgeBaseCommand.ts | 223 + .../commands/CreateQuickResponseCommand.ts | 220 + .../src/commands/CreateSessionCommand.ts | 168 + .../DeleteAssistantAssociationCommand.ts | 150 + .../src/commands/DeleteAssistantCommand.ts | 146 + .../src/commands/DeleteContentCommand.ts | 145 + .../src/commands/DeleteImportJobCommand.ts | 153 + .../commands/DeleteKnowledgeBaseCommand.ts | 160 + .../commands/DeleteQuickResponseCommand.ts | 147 + .../GetAssistantAssociationCommand.ts | 164 + .../src/commands/GetAssistantCommand.ts | 165 + .../src/commands/GetContentCommand.ts | 166 + .../src/commands/GetContentSummaryCommand.ts | 165 + .../src/commands/GetImportJobCommand.ts | 170 + .../src/commands/GetKnowledgeBaseCommand.ts | 173 + .../src/commands/GetQuickResponseCommand.ts | 188 + .../src/commands/GetRecommendationsCommand.ts | 309 + .../src/commands/GetSessionCommand.ts | 158 + .../ListAssistantAssociationsCommand.ts | 171 + .../src/commands/ListAssistantsCommand.ts | 168 + .../src/commands/ListContentsCommand.ts | 167 + .../src/commands/ListImportJobsCommand.ts | 170 + .../src/commands/ListKnowledgeBasesCommand.ts | 173 + .../src/commands/ListQuickResponsesCommand.ts | 176 + .../commands/ListTagsForResourceCommand.ts | 144 + .../NotifyRecommendationsReceivedCommand.ts | 170 + .../src/commands/QueryAssistantCommand.ts | 309 + .../RemoveKnowledgeBaseTemplateUriCommand.ts | 157 + .../src/commands/SearchContentCommand.ts | 177 + .../commands/SearchQuickResponsesCommand.ts | 234 + .../src/commands/SearchSessionsCommand.ts | 167 + .../src/commands/StartContentUploadCommand.ts | 162 + .../src/commands/StartImportJobCommand.ts | 205 + .../src/commands/TagResourceCommand.ts | 144 + .../src/commands/UntagResourceCommand.ts | 141 + .../src/commands/UpdateContentCommand.ts | 182 + .../UpdateKnowledgeBaseTemplateUriCommand.ts | 190 + .../commands/UpdateQuickResponseCommand.ts | 220 + clients/client-qconnect/src/commands/index.ts | 42 + .../src/endpoint/EndpointParameters.ts | 34 + .../src/endpoint/endpointResolver.ts | 16 + .../client-qconnect/src/endpoint/ruleset.ts | 32 + .../src/extensionConfiguration.ts | 12 + clients/client-qconnect/src/index.ts | 31 + .../src/models/QConnectServiceException.ts | 22 + clients/client-qconnect/src/models/index.ts | 2 + .../client-qconnect/src/models/models_0.ts | 5114 ++++++++++++ .../src/pagination/Interfaces.ts | 11 + .../ListAssistantAssociationsPaginator.ts | 50 + .../src/pagination/ListAssistantsPaginator.ts | 50 + .../src/pagination/ListContentsPaginator.ts | 50 + .../src/pagination/ListImportJobsPaginator.ts | 50 + .../pagination/ListKnowledgeBasesPaginator.ts | 50 + .../pagination/ListQuickResponsesPaginator.ts | 50 + .../src/pagination/QueryAssistantPaginator.ts | 50 + .../src/pagination/SearchContentPaginator.ts | 50 + .../SearchQuickResponsesPaginator.ts | 50 + .../src/pagination/SearchSessionsPaginator.ts | 50 + .../client-qconnect/src/pagination/index.ts | 12 + .../src/protocols/Aws_restJson1.ts | 4487 ++++++++++ .../src/runtimeConfig.browser.ts | 44 + .../src/runtimeConfig.native.ts | 18 + .../src/runtimeConfig.shared.ts | 27 + clients/client-qconnect/src/runtimeConfig.ts | 61 + .../client-qconnect/src/runtimeExtensions.ts | 45 + clients/client-qconnect/tsconfig.cjs.json | 6 + clients/client-qconnect/tsconfig.es.json | 8 + clients/client-qconnect/tsconfig.json | 13 + clients/client-qconnect/tsconfig.types.json | 10 + clients/client-qconnect/typedoc.json | 6 + codegen/sdk-codegen/aws-models/qconnect.json | 7383 +++++++++++++++++ 81 files changed, 27485 insertions(+) create mode 100644 clients/client-qconnect/.gitignore create mode 100644 clients/client-qconnect/LICENSE create mode 100644 clients/client-qconnect/README.md create mode 100644 clients/client-qconnect/api-extractor.json create mode 100644 clients/client-qconnect/package.json create mode 100644 clients/client-qconnect/src/QConnect.ts create mode 100644 clients/client-qconnect/src/QConnectClient.ts create mode 100644 clients/client-qconnect/src/commands/CreateAssistantAssociationCommand.ts create mode 100644 clients/client-qconnect/src/commands/CreateAssistantCommand.ts create mode 100644 clients/client-qconnect/src/commands/CreateContentCommand.ts create mode 100644 clients/client-qconnect/src/commands/CreateKnowledgeBaseCommand.ts create mode 100644 clients/client-qconnect/src/commands/CreateQuickResponseCommand.ts create mode 100644 clients/client-qconnect/src/commands/CreateSessionCommand.ts create mode 100644 clients/client-qconnect/src/commands/DeleteAssistantAssociationCommand.ts create mode 100644 clients/client-qconnect/src/commands/DeleteAssistantCommand.ts create mode 100644 clients/client-qconnect/src/commands/DeleteContentCommand.ts create mode 100644 clients/client-qconnect/src/commands/DeleteImportJobCommand.ts create mode 100644 clients/client-qconnect/src/commands/DeleteKnowledgeBaseCommand.ts create mode 100644 clients/client-qconnect/src/commands/DeleteQuickResponseCommand.ts create mode 100644 clients/client-qconnect/src/commands/GetAssistantAssociationCommand.ts create mode 100644 clients/client-qconnect/src/commands/GetAssistantCommand.ts create mode 100644 clients/client-qconnect/src/commands/GetContentCommand.ts create mode 100644 clients/client-qconnect/src/commands/GetContentSummaryCommand.ts create mode 100644 clients/client-qconnect/src/commands/GetImportJobCommand.ts create mode 100644 clients/client-qconnect/src/commands/GetKnowledgeBaseCommand.ts create mode 100644 clients/client-qconnect/src/commands/GetQuickResponseCommand.ts create mode 100644 clients/client-qconnect/src/commands/GetRecommendationsCommand.ts create mode 100644 clients/client-qconnect/src/commands/GetSessionCommand.ts create mode 100644 clients/client-qconnect/src/commands/ListAssistantAssociationsCommand.ts create mode 100644 clients/client-qconnect/src/commands/ListAssistantsCommand.ts create mode 100644 clients/client-qconnect/src/commands/ListContentsCommand.ts create mode 100644 clients/client-qconnect/src/commands/ListImportJobsCommand.ts create mode 100644 clients/client-qconnect/src/commands/ListKnowledgeBasesCommand.ts create mode 100644 clients/client-qconnect/src/commands/ListQuickResponsesCommand.ts create mode 100644 clients/client-qconnect/src/commands/ListTagsForResourceCommand.ts create mode 100644 clients/client-qconnect/src/commands/NotifyRecommendationsReceivedCommand.ts create mode 100644 clients/client-qconnect/src/commands/QueryAssistantCommand.ts create mode 100644 clients/client-qconnect/src/commands/RemoveKnowledgeBaseTemplateUriCommand.ts create mode 100644 clients/client-qconnect/src/commands/SearchContentCommand.ts create mode 100644 clients/client-qconnect/src/commands/SearchQuickResponsesCommand.ts create mode 100644 clients/client-qconnect/src/commands/SearchSessionsCommand.ts create mode 100644 clients/client-qconnect/src/commands/StartContentUploadCommand.ts create mode 100644 clients/client-qconnect/src/commands/StartImportJobCommand.ts create mode 100644 clients/client-qconnect/src/commands/TagResourceCommand.ts create mode 100644 clients/client-qconnect/src/commands/UntagResourceCommand.ts create mode 100644 clients/client-qconnect/src/commands/UpdateContentCommand.ts create mode 100644 clients/client-qconnect/src/commands/UpdateKnowledgeBaseTemplateUriCommand.ts create mode 100644 clients/client-qconnect/src/commands/UpdateQuickResponseCommand.ts create mode 100644 clients/client-qconnect/src/commands/index.ts create mode 100644 clients/client-qconnect/src/endpoint/EndpointParameters.ts create mode 100644 clients/client-qconnect/src/endpoint/endpointResolver.ts create mode 100644 clients/client-qconnect/src/endpoint/ruleset.ts create mode 100644 clients/client-qconnect/src/extensionConfiguration.ts create mode 100644 clients/client-qconnect/src/index.ts create mode 100644 clients/client-qconnect/src/models/QConnectServiceException.ts create mode 100644 clients/client-qconnect/src/models/index.ts create mode 100644 clients/client-qconnect/src/models/models_0.ts create mode 100644 clients/client-qconnect/src/pagination/Interfaces.ts create mode 100644 clients/client-qconnect/src/pagination/ListAssistantAssociationsPaginator.ts create mode 100644 clients/client-qconnect/src/pagination/ListAssistantsPaginator.ts create mode 100644 clients/client-qconnect/src/pagination/ListContentsPaginator.ts create mode 100644 clients/client-qconnect/src/pagination/ListImportJobsPaginator.ts create mode 100644 clients/client-qconnect/src/pagination/ListKnowledgeBasesPaginator.ts create mode 100644 clients/client-qconnect/src/pagination/ListQuickResponsesPaginator.ts create mode 100644 clients/client-qconnect/src/pagination/QueryAssistantPaginator.ts create mode 100644 clients/client-qconnect/src/pagination/SearchContentPaginator.ts create mode 100644 clients/client-qconnect/src/pagination/SearchQuickResponsesPaginator.ts create mode 100644 clients/client-qconnect/src/pagination/SearchSessionsPaginator.ts create mode 100644 clients/client-qconnect/src/pagination/index.ts create mode 100644 clients/client-qconnect/src/protocols/Aws_restJson1.ts create mode 100644 clients/client-qconnect/src/runtimeConfig.browser.ts create mode 100644 clients/client-qconnect/src/runtimeConfig.native.ts create mode 100644 clients/client-qconnect/src/runtimeConfig.shared.ts create mode 100644 clients/client-qconnect/src/runtimeConfig.ts create mode 100644 clients/client-qconnect/src/runtimeExtensions.ts create mode 100644 clients/client-qconnect/tsconfig.cjs.json create mode 100644 clients/client-qconnect/tsconfig.es.json create mode 100644 clients/client-qconnect/tsconfig.json create mode 100644 clients/client-qconnect/tsconfig.types.json create mode 100644 clients/client-qconnect/typedoc.json create mode 100644 codegen/sdk-codegen/aws-models/qconnect.json diff --git a/clients/client-qconnect/.gitignore b/clients/client-qconnect/.gitignore new file mode 100644 index 0000000000000..54f14c9aef253 --- /dev/null +++ b/clients/client-qconnect/.gitignore @@ -0,0 +1,9 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/dist-* +*.tsbuildinfo +*.tgz +*.log +package-lock.json diff --git a/clients/client-qconnect/LICENSE b/clients/client-qconnect/LICENSE new file mode 100644 index 0000000000000..5001cd317c44a --- /dev/null +++ b/clients/client-qconnect/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/clients/client-qconnect/README.md b/clients/client-qconnect/README.md new file mode 100644 index 0000000000000..d67cee47b0aef --- /dev/null +++ b/clients/client-qconnect/README.md @@ -0,0 +1,545 @@ + + +# @aws-sdk/client-qconnect + +## Description + +AWS SDK for JavaScript QConnect Client for Node.js, Browser and React Native. + +

Amazon Q in Connect is a generative AI customer service assistant. It is an LLM-enhanced evolution +of Amazon Connect Wisdom that delivers real-time recommendations to help contact center +agents resolve customer issues quickly and accurately.

+

Amazon Q automatically detects customer intent during calls and chats using +conversational analytics and natural language understanding (NLU). It then provides agents +with immediate, real-time generative responses and suggested actions, and links to relevant +documents and articles. Agents can also query Amazon Q directly using natural language or +keywords to answer customer requests.

+

Use the Amazon Q in Connect APIs to create an assistant and a knowledge base, for example, or +manage content by uploading custom files.

+

For more information, see Use Amazon Q in Connect for generative AI +powered agent assistance in real-time in the Amazon Connect +Administrator Guide.

+ +## Installing + +To install the this package, simply type add or install @aws-sdk/client-qconnect +using your favorite package manager: + +- `npm install @aws-sdk/client-qconnect` +- `yarn add @aws-sdk/client-qconnect` +- `pnpm add @aws-sdk/client-qconnect` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `QConnectClient` and +the commands you need, for example `ListAssistantsCommand`: + +```js +// ES5 example +const { QConnectClient, ListAssistantsCommand } = require("@aws-sdk/client-qconnect"); +``` + +```ts +// ES6+ example +import { QConnectClient, ListAssistantsCommand } from "@aws-sdk/client-qconnect"; +``` + +### Usage + +To send a request, you: + +- Initiate client with configuration (e.g. credentials, region). +- Initiate command with input parameters. +- Call `send` operation on client with command object as input. +- If you are using a custom http handler, you may call `destroy()` to close open connections. + +```js +// a client can be shared by different commands. +const client = new QConnectClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new ListAssistantsCommand(params); +``` + +#### Async/await + +We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) +operator to wait for the promise returned by send operation as follows: + +```js +// async/await. +try { + const data = await client.send(command); + // process data. +} catch (error) { + // error handling. +} finally { + // finally. +} +``` + +Async-await is clean, concise, intuitive, easy to debug and has better error handling +as compared to using Promise chains or callbacks. + +#### Promises + +You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining) +to execute send operation. + +```js +client.send(command).then( + (data) => { + // process data. + }, + (error) => { + // error handling. + } +); +``` + +Promises can also be called using `.catch()` and `.finally()` as follows: + +```js +client + .send(command) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }) + .finally(() => { + // finally. + }); +``` + +#### Callbacks + +We do not recommend using callbacks because of [callback hell](http://callbackhell.com/), +but they are supported by the send operation. + +```js +// callbacks. +client.send(command, (err, data) => { + // process err and data. +}); +``` + +#### v2 compatible style + +The client can also send requests using v2 compatible style. +However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post +on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/) + +```ts +import * as AWS from "@aws-sdk/client-qconnect"; +const client = new AWS.QConnect({ region: "REGION" }); + +// async/await. +try { + const data = await client.listAssistants(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .listAssistants(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.listAssistants(params, (err, data) => { + // process err and data. +}); +``` + +### Troubleshooting + +When the service returns an exception, the error will include the exception information, +as well as response metadata (e.g. request id). + +```js +try { + const data = await client.send(command); + // process data. +} catch (error) { + const { requestId, cfId, extendedRequestId } = error.$metadata; + console.log({ requestId, cfId, extendedRequestId }); + /** + * The keys within exceptions are also parsed. + * You can access them by specifying exception names: + * if (error.name === 'SomeServiceException') { + * const value = error.specialKeyInException; + * } + */ +} +``` + +## Getting Help + +Please use these community resources for getting help. +We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them. + +- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html) + or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html). +- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/) + on AWS Developer Blog. +- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`. +- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3). +- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose). + +To test your universal JavaScript code in Node.js, browser and react-native environments, +visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests). + +## Contributing + +This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-qconnect` package is updated. +To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients). + +## License + +This SDK is distributed under the +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), +see LICENSE for more information. + +## Client Commands (Operations List) + +
+ +CreateAssistant + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/CreateAssistantCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/CreateAssistantCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/CreateAssistantCommandOutput/) + +
+
+ +CreateAssistantAssociation + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/CreateAssistantAssociationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/CreateAssistantAssociationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/CreateAssistantAssociationCommandOutput/) + +
+
+ +CreateContent + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/CreateContentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/CreateContentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/CreateContentCommandOutput/) + +
+
+ +CreateKnowledgeBase + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/CreateKnowledgeBaseCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/CreateKnowledgeBaseCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/CreateKnowledgeBaseCommandOutput/) + +
+
+ +CreateQuickResponse + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/CreateQuickResponseCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/CreateQuickResponseCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/CreateQuickResponseCommandOutput/) + +
+
+ +CreateSession + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/CreateSessionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/CreateSessionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/CreateSessionCommandOutput/) + +
+
+ +DeleteAssistant + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/DeleteAssistantCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/DeleteAssistantCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/DeleteAssistantCommandOutput/) + +
+
+ +DeleteAssistantAssociation + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/DeleteAssistantAssociationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/DeleteAssistantAssociationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/DeleteAssistantAssociationCommandOutput/) + +
+
+ +DeleteContent + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/DeleteContentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/DeleteContentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/DeleteContentCommandOutput/) + +
+
+ +DeleteImportJob + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/DeleteImportJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/DeleteImportJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/DeleteImportJobCommandOutput/) + +
+
+ +DeleteKnowledgeBase + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/DeleteKnowledgeBaseCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/DeleteKnowledgeBaseCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/DeleteKnowledgeBaseCommandOutput/) + +
+
+ +DeleteQuickResponse + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/DeleteQuickResponseCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/DeleteQuickResponseCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/DeleteQuickResponseCommandOutput/) + +
+
+ +GetAssistant + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/GetAssistantCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetAssistantCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetAssistantCommandOutput/) + +
+
+ +GetAssistantAssociation + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/GetAssistantAssociationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetAssistantAssociationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetAssistantAssociationCommandOutput/) + +
+
+ +GetContent + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/GetContentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetContentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetContentCommandOutput/) + +
+
+ +GetContentSummary + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/GetContentSummaryCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetContentSummaryCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetContentSummaryCommandOutput/) + +
+
+ +GetImportJob + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/GetImportJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetImportJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetImportJobCommandOutput/) + +
+
+ +GetKnowledgeBase + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/GetKnowledgeBaseCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetKnowledgeBaseCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetKnowledgeBaseCommandOutput/) + +
+
+ +GetQuickResponse + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/GetQuickResponseCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetQuickResponseCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetQuickResponseCommandOutput/) + +
+
+ +GetRecommendations + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/GetRecommendationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetRecommendationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetRecommendationsCommandOutput/) + +
+
+ +GetSession + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/GetSessionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetSessionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetSessionCommandOutput/) + +
+
+ +ListAssistantAssociations + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/ListAssistantAssociationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/ListAssistantAssociationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/ListAssistantAssociationsCommandOutput/) + +
+
+ +ListAssistants + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/ListAssistantsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/ListAssistantsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/ListAssistantsCommandOutput/) + +
+
+ +ListContents + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/ListContentsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/ListContentsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/ListContentsCommandOutput/) + +
+
+ +ListImportJobs + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/ListImportJobsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/ListImportJobsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/ListImportJobsCommandOutput/) + +
+
+ +ListKnowledgeBases + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/ListKnowledgeBasesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/ListKnowledgeBasesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/ListKnowledgeBasesCommandOutput/) + +
+
+ +ListQuickResponses + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/ListQuickResponsesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/ListQuickResponsesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/ListQuickResponsesCommandOutput/) + +
+
+ +ListTagsForResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/ListTagsForResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/ListTagsForResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/ListTagsForResourceCommandOutput/) + +
+
+ +NotifyRecommendationsReceived + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/NotifyRecommendationsReceivedCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/NotifyRecommendationsReceivedCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/NotifyRecommendationsReceivedCommandOutput/) + +
+
+ +QueryAssistant + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/QueryAssistantCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/QueryAssistantCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/QueryAssistantCommandOutput/) + +
+
+ +RemoveKnowledgeBaseTemplateUri + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/RemoveKnowledgeBaseTemplateUriCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/RemoveKnowledgeBaseTemplateUriCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/RemoveKnowledgeBaseTemplateUriCommandOutput/) + +
+
+ +SearchContent + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/SearchContentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/SearchContentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/SearchContentCommandOutput/) + +
+
+ +SearchQuickResponses + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/SearchQuickResponsesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/SearchQuickResponsesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/SearchQuickResponsesCommandOutput/) + +
+
+ +SearchSessions + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/SearchSessionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/SearchSessionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/SearchSessionsCommandOutput/) + +
+
+ +StartContentUpload + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/StartContentUploadCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/StartContentUploadCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/StartContentUploadCommandOutput/) + +
+
+ +StartImportJob + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/StartImportJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/StartImportJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/StartImportJobCommandOutput/) + +
+
+ +TagResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/TagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/TagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/TagResourceCommandOutput/) + +
+
+ +UntagResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/UntagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/UntagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/UntagResourceCommandOutput/) + +
+
+ +UpdateContent + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/UpdateContentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/UpdateContentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/UpdateContentCommandOutput/) + +
+
+ +UpdateKnowledgeBaseTemplateUri + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/UpdateKnowledgeBaseTemplateUriCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/UpdateKnowledgeBaseTemplateUriCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/UpdateKnowledgeBaseTemplateUriCommandOutput/) + +
+
+ +UpdateQuickResponse + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/UpdateQuickResponseCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/UpdateQuickResponseCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/UpdateQuickResponseCommandOutput/) + +
diff --git a/clients/client-qconnect/api-extractor.json b/clients/client-qconnect/api-extractor.json new file mode 100644 index 0000000000000..d5bf5ffeee851 --- /dev/null +++ b/clients/client-qconnect/api-extractor.json @@ -0,0 +1,4 @@ +{ + "extends": "../../api-extractor.json", + "mainEntryPointFilePath": "/dist-types/index.d.ts" +} diff --git a/clients/client-qconnect/package.json b/clients/client-qconnect/package.json new file mode 100644 index 0000000000000..1ce71d61e4f55 --- /dev/null +++ b/clients/client-qconnect/package.json @@ -0,0 +1,104 @@ +{ + "name": "@aws-sdk/client-qconnect", + "description": "AWS SDK for JavaScript Qconnect Client for Node.js, Browser and React Native", + "version": "3.0.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:docs": "typedoc", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo qconnect" + }, + "main": "./dist-cjs/index.js", + "types": "./dist-types/index.d.ts", + "module": "./dist-es/index.js", + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "*", + "@aws-sdk/core": "*", + "@aws-sdk/credential-provider-node": "*", + "@aws-sdk/middleware-host-header": "*", + "@aws-sdk/middleware-logger": "*", + "@aws-sdk/middleware-recursion-detection": "*", + "@aws-sdk/middleware-signing": "*", + "@aws-sdk/middleware-user-agent": "*", + "@aws-sdk/region-config-resolver": "*", + "@aws-sdk/types": "*", + "@aws-sdk/util-endpoints": "*", + "@aws-sdk/util-user-agent-browser": "*", + "@aws-sdk/util-user-agent-node": "*", + "@smithy/config-resolver": "^2.0.18", + "@smithy/fetch-http-handler": "^2.2.6", + "@smithy/hash-node": "^2.0.15", + "@smithy/invalid-dependency": "^2.0.13", + "@smithy/middleware-content-length": "^2.0.15", + "@smithy/middleware-endpoint": "^2.2.0", + "@smithy/middleware-retry": "^2.0.20", + "@smithy/middleware-serde": "^2.0.13", + "@smithy/middleware-stack": "^2.0.7", + "@smithy/node-config-provider": "^2.1.5", + "@smithy/node-http-handler": "^2.1.9", + "@smithy/protocol-http": "^3.0.9", + "@smithy/smithy-client": "^2.1.15", + "@smithy/types": "^2.5.0", + "@smithy/url-parser": "^2.0.13", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.19", + "@smithy/util-defaults-mode-node": "^2.0.25", + "@smithy/util-endpoints": "^1.0.4", + "@smithy/util-retry": "^2.0.6", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0", + "uuid": "^8.3.2" + }, + "devDependencies": { + "@smithy/service-client-documentation-generator": "^2.0.0", + "@tsconfig/node14": "1.0.3", + "@types/node": "^14.14.31", + "@types/uuid": "^8.3.0", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23", + "typescript": "~4.9.5" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "browser": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-qconnect", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-qconnect" + } +} diff --git a/clients/client-qconnect/src/QConnect.ts b/clients/client-qconnect/src/QConnect.ts new file mode 100644 index 0000000000000..c6fbe7c2f4207 --- /dev/null +++ b/clients/client-qconnect/src/QConnect.ts @@ -0,0 +1,864 @@ +// smithy-typescript generated code +import { createAggregatedClient } from "@smithy/smithy-client"; +import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; + +import { + CreateAssistantAssociationCommand, + CreateAssistantAssociationCommandInput, + CreateAssistantAssociationCommandOutput, +} from "./commands/CreateAssistantAssociationCommand"; +import { + CreateAssistantCommand, + CreateAssistantCommandInput, + CreateAssistantCommandOutput, +} from "./commands/CreateAssistantCommand"; +import { + CreateContentCommand, + CreateContentCommandInput, + CreateContentCommandOutput, +} from "./commands/CreateContentCommand"; +import { + CreateKnowledgeBaseCommand, + CreateKnowledgeBaseCommandInput, + CreateKnowledgeBaseCommandOutput, +} from "./commands/CreateKnowledgeBaseCommand"; +import { + CreateQuickResponseCommand, + CreateQuickResponseCommandInput, + CreateQuickResponseCommandOutput, +} from "./commands/CreateQuickResponseCommand"; +import { + CreateSessionCommand, + CreateSessionCommandInput, + CreateSessionCommandOutput, +} from "./commands/CreateSessionCommand"; +import { + DeleteAssistantAssociationCommand, + DeleteAssistantAssociationCommandInput, + DeleteAssistantAssociationCommandOutput, +} from "./commands/DeleteAssistantAssociationCommand"; +import { + DeleteAssistantCommand, + DeleteAssistantCommandInput, + DeleteAssistantCommandOutput, +} from "./commands/DeleteAssistantCommand"; +import { + DeleteContentCommand, + DeleteContentCommandInput, + DeleteContentCommandOutput, +} from "./commands/DeleteContentCommand"; +import { + DeleteImportJobCommand, + DeleteImportJobCommandInput, + DeleteImportJobCommandOutput, +} from "./commands/DeleteImportJobCommand"; +import { + DeleteKnowledgeBaseCommand, + DeleteKnowledgeBaseCommandInput, + DeleteKnowledgeBaseCommandOutput, +} from "./commands/DeleteKnowledgeBaseCommand"; +import { + DeleteQuickResponseCommand, + DeleteQuickResponseCommandInput, + DeleteQuickResponseCommandOutput, +} from "./commands/DeleteQuickResponseCommand"; +import { + GetAssistantAssociationCommand, + GetAssistantAssociationCommandInput, + GetAssistantAssociationCommandOutput, +} from "./commands/GetAssistantAssociationCommand"; +import { + GetAssistantCommand, + GetAssistantCommandInput, + GetAssistantCommandOutput, +} from "./commands/GetAssistantCommand"; +import { GetContentCommand, GetContentCommandInput, GetContentCommandOutput } from "./commands/GetContentCommand"; +import { + GetContentSummaryCommand, + GetContentSummaryCommandInput, + GetContentSummaryCommandOutput, +} from "./commands/GetContentSummaryCommand"; +import { + GetImportJobCommand, + GetImportJobCommandInput, + GetImportJobCommandOutput, +} from "./commands/GetImportJobCommand"; +import { + GetKnowledgeBaseCommand, + GetKnowledgeBaseCommandInput, + GetKnowledgeBaseCommandOutput, +} from "./commands/GetKnowledgeBaseCommand"; +import { + GetQuickResponseCommand, + GetQuickResponseCommandInput, + GetQuickResponseCommandOutput, +} from "./commands/GetQuickResponseCommand"; +import { + GetRecommendationsCommand, + GetRecommendationsCommandInput, + GetRecommendationsCommandOutput, +} from "./commands/GetRecommendationsCommand"; +import { GetSessionCommand, GetSessionCommandInput, GetSessionCommandOutput } from "./commands/GetSessionCommand"; +import { + ListAssistantAssociationsCommand, + ListAssistantAssociationsCommandInput, + ListAssistantAssociationsCommandOutput, +} from "./commands/ListAssistantAssociationsCommand"; +import { + ListAssistantsCommand, + ListAssistantsCommandInput, + ListAssistantsCommandOutput, +} from "./commands/ListAssistantsCommand"; +import { + ListContentsCommand, + ListContentsCommandInput, + ListContentsCommandOutput, +} from "./commands/ListContentsCommand"; +import { + ListImportJobsCommand, + ListImportJobsCommandInput, + ListImportJobsCommandOutput, +} from "./commands/ListImportJobsCommand"; +import { + ListKnowledgeBasesCommand, + ListKnowledgeBasesCommandInput, + ListKnowledgeBasesCommandOutput, +} from "./commands/ListKnowledgeBasesCommand"; +import { + ListQuickResponsesCommand, + ListQuickResponsesCommandInput, + ListQuickResponsesCommandOutput, +} from "./commands/ListQuickResponsesCommand"; +import { + ListTagsForResourceCommand, + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { + NotifyRecommendationsReceivedCommand, + NotifyRecommendationsReceivedCommandInput, + NotifyRecommendationsReceivedCommandOutput, +} from "./commands/NotifyRecommendationsReceivedCommand"; +import { + QueryAssistantCommand, + QueryAssistantCommandInput, + QueryAssistantCommandOutput, +} from "./commands/QueryAssistantCommand"; +import { + RemoveKnowledgeBaseTemplateUriCommand, + RemoveKnowledgeBaseTemplateUriCommandInput, + RemoveKnowledgeBaseTemplateUriCommandOutput, +} from "./commands/RemoveKnowledgeBaseTemplateUriCommand"; +import { + SearchContentCommand, + SearchContentCommandInput, + SearchContentCommandOutput, +} from "./commands/SearchContentCommand"; +import { + SearchQuickResponsesCommand, + SearchQuickResponsesCommandInput, + SearchQuickResponsesCommandOutput, +} from "./commands/SearchQuickResponsesCommand"; +import { + SearchSessionsCommand, + SearchSessionsCommandInput, + SearchSessionsCommandOutput, +} from "./commands/SearchSessionsCommand"; +import { + StartContentUploadCommand, + StartContentUploadCommandInput, + StartContentUploadCommandOutput, +} from "./commands/StartContentUploadCommand"; +import { + StartImportJobCommand, + StartImportJobCommandInput, + StartImportJobCommandOutput, +} from "./commands/StartImportJobCommand"; +import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { + UntagResourceCommand, + UntagResourceCommandInput, + UntagResourceCommandOutput, +} from "./commands/UntagResourceCommand"; +import { + UpdateContentCommand, + UpdateContentCommandInput, + UpdateContentCommandOutput, +} from "./commands/UpdateContentCommand"; +import { + UpdateKnowledgeBaseTemplateUriCommand, + UpdateKnowledgeBaseTemplateUriCommandInput, + UpdateKnowledgeBaseTemplateUriCommandOutput, +} from "./commands/UpdateKnowledgeBaseTemplateUriCommand"; +import { + UpdateQuickResponseCommand, + UpdateQuickResponseCommandInput, + UpdateQuickResponseCommandOutput, +} from "./commands/UpdateQuickResponseCommand"; +import { QConnectClient, QConnectClientConfig } from "./QConnectClient"; + +const commands = { + CreateAssistantCommand, + CreateAssistantAssociationCommand, + CreateContentCommand, + CreateKnowledgeBaseCommand, + CreateQuickResponseCommand, + CreateSessionCommand, + DeleteAssistantCommand, + DeleteAssistantAssociationCommand, + DeleteContentCommand, + DeleteImportJobCommand, + DeleteKnowledgeBaseCommand, + DeleteQuickResponseCommand, + GetAssistantCommand, + GetAssistantAssociationCommand, + GetContentCommand, + GetContentSummaryCommand, + GetImportJobCommand, + GetKnowledgeBaseCommand, + GetQuickResponseCommand, + GetRecommendationsCommand, + GetSessionCommand, + ListAssistantAssociationsCommand, + ListAssistantsCommand, + ListContentsCommand, + ListImportJobsCommand, + ListKnowledgeBasesCommand, + ListQuickResponsesCommand, + ListTagsForResourceCommand, + NotifyRecommendationsReceivedCommand, + QueryAssistantCommand, + RemoveKnowledgeBaseTemplateUriCommand, + SearchContentCommand, + SearchQuickResponsesCommand, + SearchSessionsCommand, + StartContentUploadCommand, + StartImportJobCommand, + TagResourceCommand, + UntagResourceCommand, + UpdateContentCommand, + UpdateKnowledgeBaseTemplateUriCommand, + UpdateQuickResponseCommand, +}; + +export interface QConnect { + /** + * @see {@link CreateAssistantCommand} + */ + createAssistant( + args: CreateAssistantCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createAssistant(args: CreateAssistantCommandInput, cb: (err: any, data?: CreateAssistantCommandOutput) => void): void; + createAssistant( + args: CreateAssistantCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateAssistantCommandOutput) => void + ): void; + + /** + * @see {@link CreateAssistantAssociationCommand} + */ + createAssistantAssociation( + args: CreateAssistantAssociationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createAssistantAssociation( + args: CreateAssistantAssociationCommandInput, + cb: (err: any, data?: CreateAssistantAssociationCommandOutput) => void + ): void; + createAssistantAssociation( + args: CreateAssistantAssociationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateAssistantAssociationCommandOutput) => void + ): void; + + /** + * @see {@link CreateContentCommand} + */ + createContent(args: CreateContentCommandInput, options?: __HttpHandlerOptions): Promise; + createContent(args: CreateContentCommandInput, cb: (err: any, data?: CreateContentCommandOutput) => void): void; + createContent( + args: CreateContentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateContentCommandOutput) => void + ): void; + + /** + * @see {@link CreateKnowledgeBaseCommand} + */ + createKnowledgeBase( + args: CreateKnowledgeBaseCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createKnowledgeBase( + args: CreateKnowledgeBaseCommandInput, + cb: (err: any, data?: CreateKnowledgeBaseCommandOutput) => void + ): void; + createKnowledgeBase( + args: CreateKnowledgeBaseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateKnowledgeBaseCommandOutput) => void + ): void; + + /** + * @see {@link CreateQuickResponseCommand} + */ + createQuickResponse( + args: CreateQuickResponseCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createQuickResponse( + args: CreateQuickResponseCommandInput, + cb: (err: any, data?: CreateQuickResponseCommandOutput) => void + ): void; + createQuickResponse( + args: CreateQuickResponseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateQuickResponseCommandOutput) => void + ): void; + + /** + * @see {@link CreateSessionCommand} + */ + createSession(args: CreateSessionCommandInput, options?: __HttpHandlerOptions): Promise; + createSession(args: CreateSessionCommandInput, cb: (err: any, data?: CreateSessionCommandOutput) => void): void; + createSession( + args: CreateSessionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateSessionCommandOutput) => void + ): void; + + /** + * @see {@link DeleteAssistantCommand} + */ + deleteAssistant( + args: DeleteAssistantCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteAssistant(args: DeleteAssistantCommandInput, cb: (err: any, data?: DeleteAssistantCommandOutput) => void): void; + deleteAssistant( + args: DeleteAssistantCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteAssistantCommandOutput) => void + ): void; + + /** + * @see {@link DeleteAssistantAssociationCommand} + */ + deleteAssistantAssociation( + args: DeleteAssistantAssociationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteAssistantAssociation( + args: DeleteAssistantAssociationCommandInput, + cb: (err: any, data?: DeleteAssistantAssociationCommandOutput) => void + ): void; + deleteAssistantAssociation( + args: DeleteAssistantAssociationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteAssistantAssociationCommandOutput) => void + ): void; + + /** + * @see {@link DeleteContentCommand} + */ + deleteContent(args: DeleteContentCommandInput, options?: __HttpHandlerOptions): Promise; + deleteContent(args: DeleteContentCommandInput, cb: (err: any, data?: DeleteContentCommandOutput) => void): void; + deleteContent( + args: DeleteContentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteContentCommandOutput) => void + ): void; + + /** + * @see {@link DeleteImportJobCommand} + */ + deleteImportJob( + args: DeleteImportJobCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteImportJob(args: DeleteImportJobCommandInput, cb: (err: any, data?: DeleteImportJobCommandOutput) => void): void; + deleteImportJob( + args: DeleteImportJobCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteImportJobCommandOutput) => void + ): void; + + /** + * @see {@link DeleteKnowledgeBaseCommand} + */ + deleteKnowledgeBase( + args: DeleteKnowledgeBaseCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteKnowledgeBase( + args: DeleteKnowledgeBaseCommandInput, + cb: (err: any, data?: DeleteKnowledgeBaseCommandOutput) => void + ): void; + deleteKnowledgeBase( + args: DeleteKnowledgeBaseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteKnowledgeBaseCommandOutput) => void + ): void; + + /** + * @see {@link DeleteQuickResponseCommand} + */ + deleteQuickResponse( + args: DeleteQuickResponseCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteQuickResponse( + args: DeleteQuickResponseCommandInput, + cb: (err: any, data?: DeleteQuickResponseCommandOutput) => void + ): void; + deleteQuickResponse( + args: DeleteQuickResponseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteQuickResponseCommandOutput) => void + ): void; + + /** + * @see {@link GetAssistantCommand} + */ + getAssistant(args: GetAssistantCommandInput, options?: __HttpHandlerOptions): Promise; + getAssistant(args: GetAssistantCommandInput, cb: (err: any, data?: GetAssistantCommandOutput) => void): void; + getAssistant( + args: GetAssistantCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetAssistantCommandOutput) => void + ): void; + + /** + * @see {@link GetAssistantAssociationCommand} + */ + getAssistantAssociation( + args: GetAssistantAssociationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getAssistantAssociation( + args: GetAssistantAssociationCommandInput, + cb: (err: any, data?: GetAssistantAssociationCommandOutput) => void + ): void; + getAssistantAssociation( + args: GetAssistantAssociationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetAssistantAssociationCommandOutput) => void + ): void; + + /** + * @see {@link GetContentCommand} + */ + getContent(args: GetContentCommandInput, options?: __HttpHandlerOptions): Promise; + getContent(args: GetContentCommandInput, cb: (err: any, data?: GetContentCommandOutput) => void): void; + getContent( + args: GetContentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetContentCommandOutput) => void + ): void; + + /** + * @see {@link GetContentSummaryCommand} + */ + getContentSummary( + args: GetContentSummaryCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getContentSummary( + args: GetContentSummaryCommandInput, + cb: (err: any, data?: GetContentSummaryCommandOutput) => void + ): void; + getContentSummary( + args: GetContentSummaryCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetContentSummaryCommandOutput) => void + ): void; + + /** + * @see {@link GetImportJobCommand} + */ + getImportJob(args: GetImportJobCommandInput, options?: __HttpHandlerOptions): Promise; + getImportJob(args: GetImportJobCommandInput, cb: (err: any, data?: GetImportJobCommandOutput) => void): void; + getImportJob( + args: GetImportJobCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetImportJobCommandOutput) => void + ): void; + + /** + * @see {@link GetKnowledgeBaseCommand} + */ + getKnowledgeBase( + args: GetKnowledgeBaseCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getKnowledgeBase( + args: GetKnowledgeBaseCommandInput, + cb: (err: any, data?: GetKnowledgeBaseCommandOutput) => void + ): void; + getKnowledgeBase( + args: GetKnowledgeBaseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetKnowledgeBaseCommandOutput) => void + ): void; + + /** + * @see {@link GetQuickResponseCommand} + */ + getQuickResponse( + args: GetQuickResponseCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getQuickResponse( + args: GetQuickResponseCommandInput, + cb: (err: any, data?: GetQuickResponseCommandOutput) => void + ): void; + getQuickResponse( + args: GetQuickResponseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetQuickResponseCommandOutput) => void + ): void; + + /** + * @see {@link GetRecommendationsCommand} + */ + getRecommendations( + args: GetRecommendationsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getRecommendations( + args: GetRecommendationsCommandInput, + cb: (err: any, data?: GetRecommendationsCommandOutput) => void + ): void; + getRecommendations( + args: GetRecommendationsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetRecommendationsCommandOutput) => void + ): void; + + /** + * @see {@link GetSessionCommand} + */ + getSession(args: GetSessionCommandInput, options?: __HttpHandlerOptions): Promise; + getSession(args: GetSessionCommandInput, cb: (err: any, data?: GetSessionCommandOutput) => void): void; + getSession( + args: GetSessionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetSessionCommandOutput) => void + ): void; + + /** + * @see {@link ListAssistantAssociationsCommand} + */ + listAssistantAssociations( + args: ListAssistantAssociationsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listAssistantAssociations( + args: ListAssistantAssociationsCommandInput, + cb: (err: any, data?: ListAssistantAssociationsCommandOutput) => void + ): void; + listAssistantAssociations( + args: ListAssistantAssociationsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListAssistantAssociationsCommandOutput) => void + ): void; + + /** + * @see {@link ListAssistantsCommand} + */ + listAssistants( + args: ListAssistantsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listAssistants(args: ListAssistantsCommandInput, cb: (err: any, data?: ListAssistantsCommandOutput) => void): void; + listAssistants( + args: ListAssistantsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListAssistantsCommandOutput) => void + ): void; + + /** + * @see {@link ListContentsCommand} + */ + listContents(args: ListContentsCommandInput, options?: __HttpHandlerOptions): Promise; + listContents(args: ListContentsCommandInput, cb: (err: any, data?: ListContentsCommandOutput) => void): void; + listContents( + args: ListContentsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListContentsCommandOutput) => void + ): void; + + /** + * @see {@link ListImportJobsCommand} + */ + listImportJobs( + args: ListImportJobsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listImportJobs(args: ListImportJobsCommandInput, cb: (err: any, data?: ListImportJobsCommandOutput) => void): void; + listImportJobs( + args: ListImportJobsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListImportJobsCommandOutput) => void + ): void; + + /** + * @see {@link ListKnowledgeBasesCommand} + */ + listKnowledgeBases( + args: ListKnowledgeBasesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listKnowledgeBases( + args: ListKnowledgeBasesCommandInput, + cb: (err: any, data?: ListKnowledgeBasesCommandOutput) => void + ): void; + listKnowledgeBases( + args: ListKnowledgeBasesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListKnowledgeBasesCommandOutput) => void + ): void; + + /** + * @see {@link ListQuickResponsesCommand} + */ + listQuickResponses( + args: ListQuickResponsesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listQuickResponses( + args: ListQuickResponsesCommandInput, + cb: (err: any, data?: ListQuickResponsesCommandOutput) => void + ): void; + listQuickResponses( + args: ListQuickResponsesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListQuickResponsesCommandOutput) => void + ): void; + + /** + * @see {@link ListTagsForResourceCommand} + */ + listTagsForResource( + args: ListTagsForResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listTagsForResource( + args: ListTagsForResourceCommandInput, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + listTagsForResource( + args: ListTagsForResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + + /** + * @see {@link NotifyRecommendationsReceivedCommand} + */ + notifyRecommendationsReceived( + args: NotifyRecommendationsReceivedCommandInput, + options?: __HttpHandlerOptions + ): Promise; + notifyRecommendationsReceived( + args: NotifyRecommendationsReceivedCommandInput, + cb: (err: any, data?: NotifyRecommendationsReceivedCommandOutput) => void + ): void; + notifyRecommendationsReceived( + args: NotifyRecommendationsReceivedCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: NotifyRecommendationsReceivedCommandOutput) => void + ): void; + + /** + * @see {@link QueryAssistantCommand} + */ + queryAssistant( + args: QueryAssistantCommandInput, + options?: __HttpHandlerOptions + ): Promise; + queryAssistant(args: QueryAssistantCommandInput, cb: (err: any, data?: QueryAssistantCommandOutput) => void): void; + queryAssistant( + args: QueryAssistantCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: QueryAssistantCommandOutput) => void + ): void; + + /** + * @see {@link RemoveKnowledgeBaseTemplateUriCommand} + */ + removeKnowledgeBaseTemplateUri( + args: RemoveKnowledgeBaseTemplateUriCommandInput, + options?: __HttpHandlerOptions + ): Promise; + removeKnowledgeBaseTemplateUri( + args: RemoveKnowledgeBaseTemplateUriCommandInput, + cb: (err: any, data?: RemoveKnowledgeBaseTemplateUriCommandOutput) => void + ): void; + removeKnowledgeBaseTemplateUri( + args: RemoveKnowledgeBaseTemplateUriCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: RemoveKnowledgeBaseTemplateUriCommandOutput) => void + ): void; + + /** + * @see {@link SearchContentCommand} + */ + searchContent(args: SearchContentCommandInput, options?: __HttpHandlerOptions): Promise; + searchContent(args: SearchContentCommandInput, cb: (err: any, data?: SearchContentCommandOutput) => void): void; + searchContent( + args: SearchContentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: SearchContentCommandOutput) => void + ): void; + + /** + * @see {@link SearchQuickResponsesCommand} + */ + searchQuickResponses( + args: SearchQuickResponsesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + searchQuickResponses( + args: SearchQuickResponsesCommandInput, + cb: (err: any, data?: SearchQuickResponsesCommandOutput) => void + ): void; + searchQuickResponses( + args: SearchQuickResponsesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: SearchQuickResponsesCommandOutput) => void + ): void; + + /** + * @see {@link SearchSessionsCommand} + */ + searchSessions( + args: SearchSessionsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + searchSessions(args: SearchSessionsCommandInput, cb: (err: any, data?: SearchSessionsCommandOutput) => void): void; + searchSessions( + args: SearchSessionsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: SearchSessionsCommandOutput) => void + ): void; + + /** + * @see {@link StartContentUploadCommand} + */ + startContentUpload( + args: StartContentUploadCommandInput, + options?: __HttpHandlerOptions + ): Promise; + startContentUpload( + args: StartContentUploadCommandInput, + cb: (err: any, data?: StartContentUploadCommandOutput) => void + ): void; + startContentUpload( + args: StartContentUploadCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartContentUploadCommandOutput) => void + ): void; + + /** + * @see {@link StartImportJobCommand} + */ + startImportJob( + args: StartImportJobCommandInput, + options?: __HttpHandlerOptions + ): Promise; + startImportJob(args: StartImportJobCommandInput, cb: (err: any, data?: StartImportJobCommandOutput) => void): void; + startImportJob( + args: StartImportJobCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartImportJobCommandOutput) => void + ): void; + + /** + * @see {@link TagResourceCommand} + */ + tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void; + tagResource( + args: TagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + + /** + * @see {@link UntagResourceCommand} + */ + untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void; + untagResource( + args: UntagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + + /** + * @see {@link UpdateContentCommand} + */ + updateContent(args: UpdateContentCommandInput, options?: __HttpHandlerOptions): Promise; + updateContent(args: UpdateContentCommandInput, cb: (err: any, data?: UpdateContentCommandOutput) => void): void; + updateContent( + args: UpdateContentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateContentCommandOutput) => void + ): void; + + /** + * @see {@link UpdateKnowledgeBaseTemplateUriCommand} + */ + updateKnowledgeBaseTemplateUri( + args: UpdateKnowledgeBaseTemplateUriCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateKnowledgeBaseTemplateUri( + args: UpdateKnowledgeBaseTemplateUriCommandInput, + cb: (err: any, data?: UpdateKnowledgeBaseTemplateUriCommandOutput) => void + ): void; + updateKnowledgeBaseTemplateUri( + args: UpdateKnowledgeBaseTemplateUriCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateKnowledgeBaseTemplateUriCommandOutput) => void + ): void; + + /** + * @see {@link UpdateQuickResponseCommand} + */ + updateQuickResponse( + args: UpdateQuickResponseCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateQuickResponse( + args: UpdateQuickResponseCommandInput, + cb: (err: any, data?: UpdateQuickResponseCommandOutput) => void + ): void; + updateQuickResponse( + args: UpdateQuickResponseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateQuickResponseCommandOutput) => void + ): void; +} + +/** + * @public + *

Amazon Q in Connect is a generative AI customer service assistant. It is an LLM-enhanced evolution + * of Amazon Connect Wisdom that delivers real-time recommendations to help contact center + * agents resolve customer issues quickly and accurately.

+ *

Amazon Q automatically detects customer intent during calls and chats using + * conversational analytics and natural language understanding (NLU). It then provides agents + * with immediate, real-time generative responses and suggested actions, and links to relevant + * documents and articles. Agents can also query Amazon Q directly using natural language or + * keywords to answer customer requests.

+ *

Use the Amazon Q in Connect APIs to create an assistant and a knowledge base, for example, or + * manage content by uploading custom files.

+ *

For more information, see Use Amazon Q in Connect for generative AI + * powered agent assistance in real-time in the Amazon Connect + * Administrator Guide.

+ */ +export class QConnect extends QConnectClient implements QConnect {} +createAggregatedClient(commands, QConnect); diff --git a/clients/client-qconnect/src/QConnectClient.ts b/clients/client-qconnect/src/QConnectClient.ts new file mode 100644 index 0000000000000..80d63b71560ea --- /dev/null +++ b/clients/client-qconnect/src/QConnectClient.ts @@ -0,0 +1,465 @@ +// smithy-typescript generated code +import { + getHostHeaderPlugin, + HostHeaderInputConfig, + HostHeaderResolvedConfig, + resolveHostHeaderConfig, +} from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection"; +import { + AwsAuthInputConfig, + AwsAuthResolvedConfig, + getAwsAuthPlugin, + resolveAwsAuthConfig, +} from "@aws-sdk/middleware-signing"; +import { + getUserAgentPlugin, + resolveUserAgentConfig, + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { Credentials as __Credentials } from "@aws-sdk/types"; +import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@smithy/config-resolver"; +import { getContentLengthPlugin } from "@smithy/middleware-content-length"; +import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; +import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; +import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { + Client as __Client, + DefaultsMode as __DefaultsMode, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@smithy/smithy-client"; +import { + BodyLengthCalculator as __BodyLengthCalculator, + CheckOptionalClientConfig as __CheckOptionalClientConfig, + Checksum as __Checksum, + ChecksumConstructor as __ChecksumConstructor, + Decoder as __Decoder, + Encoder as __Encoder, + EndpointV2 as __EndpointV2, + Hash as __Hash, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@smithy/types"; + +import { + CreateAssistantAssociationCommandInput, + CreateAssistantAssociationCommandOutput, +} from "./commands/CreateAssistantAssociationCommand"; +import { CreateAssistantCommandInput, CreateAssistantCommandOutput } from "./commands/CreateAssistantCommand"; +import { CreateContentCommandInput, CreateContentCommandOutput } from "./commands/CreateContentCommand"; +import { + CreateKnowledgeBaseCommandInput, + CreateKnowledgeBaseCommandOutput, +} from "./commands/CreateKnowledgeBaseCommand"; +import { + CreateQuickResponseCommandInput, + CreateQuickResponseCommandOutput, +} from "./commands/CreateQuickResponseCommand"; +import { CreateSessionCommandInput, CreateSessionCommandOutput } from "./commands/CreateSessionCommand"; +import { + DeleteAssistantAssociationCommandInput, + DeleteAssistantAssociationCommandOutput, +} from "./commands/DeleteAssistantAssociationCommand"; +import { DeleteAssistantCommandInput, DeleteAssistantCommandOutput } from "./commands/DeleteAssistantCommand"; +import { DeleteContentCommandInput, DeleteContentCommandOutput } from "./commands/DeleteContentCommand"; +import { DeleteImportJobCommandInput, DeleteImportJobCommandOutput } from "./commands/DeleteImportJobCommand"; +import { + DeleteKnowledgeBaseCommandInput, + DeleteKnowledgeBaseCommandOutput, +} from "./commands/DeleteKnowledgeBaseCommand"; +import { + DeleteQuickResponseCommandInput, + DeleteQuickResponseCommandOutput, +} from "./commands/DeleteQuickResponseCommand"; +import { + GetAssistantAssociationCommandInput, + GetAssistantAssociationCommandOutput, +} from "./commands/GetAssistantAssociationCommand"; +import { GetAssistantCommandInput, GetAssistantCommandOutput } from "./commands/GetAssistantCommand"; +import { GetContentCommandInput, GetContentCommandOutput } from "./commands/GetContentCommand"; +import { GetContentSummaryCommandInput, GetContentSummaryCommandOutput } from "./commands/GetContentSummaryCommand"; +import { GetImportJobCommandInput, GetImportJobCommandOutput } from "./commands/GetImportJobCommand"; +import { GetKnowledgeBaseCommandInput, GetKnowledgeBaseCommandOutput } from "./commands/GetKnowledgeBaseCommand"; +import { GetQuickResponseCommandInput, GetQuickResponseCommandOutput } from "./commands/GetQuickResponseCommand"; +import { GetRecommendationsCommandInput, GetRecommendationsCommandOutput } from "./commands/GetRecommendationsCommand"; +import { GetSessionCommandInput, GetSessionCommandOutput } from "./commands/GetSessionCommand"; +import { + ListAssistantAssociationsCommandInput, + ListAssistantAssociationsCommandOutput, +} from "./commands/ListAssistantAssociationsCommand"; +import { ListAssistantsCommandInput, ListAssistantsCommandOutput } from "./commands/ListAssistantsCommand"; +import { ListContentsCommandInput, ListContentsCommandOutput } from "./commands/ListContentsCommand"; +import { ListImportJobsCommandInput, ListImportJobsCommandOutput } from "./commands/ListImportJobsCommand"; +import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "./commands/ListKnowledgeBasesCommand"; +import { ListQuickResponsesCommandInput, ListQuickResponsesCommandOutput } from "./commands/ListQuickResponsesCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { + NotifyRecommendationsReceivedCommandInput, + NotifyRecommendationsReceivedCommandOutput, +} from "./commands/NotifyRecommendationsReceivedCommand"; +import { QueryAssistantCommandInput, QueryAssistantCommandOutput } from "./commands/QueryAssistantCommand"; +import { + RemoveKnowledgeBaseTemplateUriCommandInput, + RemoveKnowledgeBaseTemplateUriCommandOutput, +} from "./commands/RemoveKnowledgeBaseTemplateUriCommand"; +import { SearchContentCommandInput, SearchContentCommandOutput } from "./commands/SearchContentCommand"; +import { + SearchQuickResponsesCommandInput, + SearchQuickResponsesCommandOutput, +} from "./commands/SearchQuickResponsesCommand"; +import { SearchSessionsCommandInput, SearchSessionsCommandOutput } from "./commands/SearchSessionsCommand"; +import { StartContentUploadCommandInput, StartContentUploadCommandOutput } from "./commands/StartContentUploadCommand"; +import { StartImportJobCommandInput, StartImportJobCommandOutput } from "./commands/StartImportJobCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; +import { UpdateContentCommandInput, UpdateContentCommandOutput } from "./commands/UpdateContentCommand"; +import { + UpdateKnowledgeBaseTemplateUriCommandInput, + UpdateKnowledgeBaseTemplateUriCommandOutput, +} from "./commands/UpdateKnowledgeBaseTemplateUriCommand"; +import { + UpdateQuickResponseCommandInput, + UpdateQuickResponseCommandOutput, +} from "./commands/UpdateQuickResponseCommand"; +import { + ClientInputEndpointParameters, + ClientResolvedEndpointParameters, + EndpointParameters, + resolveClientEndpointParameters, +} from "./endpoint/EndpointParameters"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; +import { resolveRuntimeExtensions, RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions"; + +export { __Client }; + +/** + * @public + */ +export type ServiceInputTypes = + | CreateAssistantAssociationCommandInput + | CreateAssistantCommandInput + | CreateContentCommandInput + | CreateKnowledgeBaseCommandInput + | CreateQuickResponseCommandInput + | CreateSessionCommandInput + | DeleteAssistantAssociationCommandInput + | DeleteAssistantCommandInput + | DeleteContentCommandInput + | DeleteImportJobCommandInput + | DeleteKnowledgeBaseCommandInput + | DeleteQuickResponseCommandInput + | GetAssistantAssociationCommandInput + | GetAssistantCommandInput + | GetContentCommandInput + | GetContentSummaryCommandInput + | GetImportJobCommandInput + | GetKnowledgeBaseCommandInput + | GetQuickResponseCommandInput + | GetRecommendationsCommandInput + | GetSessionCommandInput + | ListAssistantAssociationsCommandInput + | ListAssistantsCommandInput + | ListContentsCommandInput + | ListImportJobsCommandInput + | ListKnowledgeBasesCommandInput + | ListQuickResponsesCommandInput + | ListTagsForResourceCommandInput + | NotifyRecommendationsReceivedCommandInput + | QueryAssistantCommandInput + | RemoveKnowledgeBaseTemplateUriCommandInput + | SearchContentCommandInput + | SearchQuickResponsesCommandInput + | SearchSessionsCommandInput + | StartContentUploadCommandInput + | StartImportJobCommandInput + | TagResourceCommandInput + | UntagResourceCommandInput + | UpdateContentCommandInput + | UpdateKnowledgeBaseTemplateUriCommandInput + | UpdateQuickResponseCommandInput; + +/** + * @public + */ +export type ServiceOutputTypes = + | CreateAssistantAssociationCommandOutput + | CreateAssistantCommandOutput + | CreateContentCommandOutput + | CreateKnowledgeBaseCommandOutput + | CreateQuickResponseCommandOutput + | CreateSessionCommandOutput + | DeleteAssistantAssociationCommandOutput + | DeleteAssistantCommandOutput + | DeleteContentCommandOutput + | DeleteImportJobCommandOutput + | DeleteKnowledgeBaseCommandOutput + | DeleteQuickResponseCommandOutput + | GetAssistantAssociationCommandOutput + | GetAssistantCommandOutput + | GetContentCommandOutput + | GetContentSummaryCommandOutput + | GetImportJobCommandOutput + | GetKnowledgeBaseCommandOutput + | GetQuickResponseCommandOutput + | GetRecommendationsCommandOutput + | GetSessionCommandOutput + | ListAssistantAssociationsCommandOutput + | ListAssistantsCommandOutput + | ListContentsCommandOutput + | ListImportJobsCommandOutput + | ListKnowledgeBasesCommandOutput + | ListQuickResponsesCommandOutput + | ListTagsForResourceCommandOutput + | NotifyRecommendationsReceivedCommandOutput + | QueryAssistantCommandOutput + | RemoveKnowledgeBaseTemplateUriCommandOutput + | SearchContentCommandOutput + | SearchQuickResponsesCommandOutput + | SearchSessionsCommandOutput + | StartContentUploadCommandOutput + | StartImportJobCommandOutput + | TagResourceCommandOutput + | UntagResourceCommandOutput + | UpdateContentCommandOutput + | UpdateKnowledgeBaseTemplateUriCommandOutput + | UpdateQuickResponseCommandOutput; + +/** + * @public + */ +export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandler; + + /** + * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __ChecksumConstructor | __HashConstructor; + + /** + * The function that will be used to convert strings into HTTP endpoints. + * @internal + */ + urlParser?: __UrlParser; + + /** + * A function that can calculate the length of a request body. + * @internal + */ + bodyLengthChecker?: __BodyLengthCalculator; + + /** + * A function that converts a stream into an array of bytes. + * @internal + */ + streamCollector?: __StreamCollector; + + /** + * The function that will be used to convert a base64-encoded string to a byte array. + * @internal + */ + base64Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a base64-encoded string. + * @internal + */ + base64Encoder?: __Encoder; + + /** + * The function that will be used to convert a UTF8-encoded string to a byte array. + * @internal + */ + utf8Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a UTF-8 encoded string. + * @internal + */ + utf8Encoder?: __Encoder; + + /** + * The runtime environment. + * @internal + */ + runtime?: string; + + /** + * Disable dynamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + + /** + * The AWS region to which this client will send requests + */ + region?: string | __Provider; + + /** + * Default credentials provider; Not available in browser runtime. + * @internal + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header + * @internal + */ + defaultUserAgentProvider?: Provider<__UserAgent>; + + /** + * Value for how many times a request will be made at most in case of retry. + */ + maxAttempts?: number | __Provider; + + /** + * Specifies which retry algorithm to use. + * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/ + * + */ + retryMode?: string | __Provider; + + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + + /** + * Optional extensions + */ + extensions?: RuntimeExtension[]; + + /** + * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK. + */ + defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>; +} + +/** + * @public + */ +export type QConnectClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & + ClientDefaults & + RegionInputConfig & + EndpointInputConfig & + RetryInputConfig & + HostHeaderInputConfig & + AwsAuthInputConfig & + UserAgentInputConfig & + ClientInputEndpointParameters; +/** + * @public + * + * The configuration interface of QConnectClient class constructor that set the region, credentials and other options. + */ +export interface QConnectClientConfig extends QConnectClientConfigType {} + +/** + * @public + */ +export type QConnectClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RuntimeExtensionsConfig & + RegionResolvedConfig & + EndpointResolvedConfig & + RetryResolvedConfig & + HostHeaderResolvedConfig & + AwsAuthResolvedConfig & + UserAgentResolvedConfig & + ClientResolvedEndpointParameters; +/** + * @public + * + * The resolved configuration interface of QConnectClient class. This is resolved and normalized from the {@link QConnectClientConfig | constructor configuration interface}. + */ +export interface QConnectClientResolvedConfig extends QConnectClientResolvedConfigType {} + +/** + * @public + *

Amazon Q in Connect is a generative AI customer service assistant. It is an LLM-enhanced evolution + * of Amazon Connect Wisdom that delivers real-time recommendations to help contact center + * agents resolve customer issues quickly and accurately.

+ *

Amazon Q automatically detects customer intent during calls and chats using + * conversational analytics and natural language understanding (NLU). It then provides agents + * with immediate, real-time generative responses and suggested actions, and links to relevant + * documents and articles. Agents can also query Amazon Q directly using natural language or + * keywords to answer customer requests.

+ *

Use the Amazon Q in Connect APIs to create an assistant and a knowledge base, for example, or + * manage content by uploading custom files.

+ *

For more information, see Use Amazon Q in Connect for generative AI + * powered agent assistance in real-time in the Amazon Connect + * Administrator Guide.

+ */ +export class QConnectClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + QConnectClientResolvedConfig +> { + /** + * The resolved configuration of QConnectClient class. This is resolved and normalized from the {@link QConnectClientConfig | constructor configuration interface}. + */ + readonly config: QConnectClientResolvedConfig; + + constructor(...[configuration]: __CheckOptionalClientConfig) { + const _config_0 = __getRuntimeConfig(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveRegionConfig(_config_1); + const _config_3 = resolveEndpointConfig(_config_2); + const _config_4 = resolveRetryConfig(_config_3); + const _config_5 = resolveHostHeaderConfig(_config_4); + const _config_6 = resolveAwsAuthConfig(_config_5); + const _config_7 = resolveUserAgentConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + super(_config_8); + this.config = _config_8; + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(getAwsAuthPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + } + + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy(): void { + super.destroy(); + } +} diff --git a/clients/client-qconnect/src/commands/CreateAssistantAssociationCommand.ts b/clients/client-qconnect/src/commands/CreateAssistantAssociationCommand.ts new file mode 100644 index 0000000000000..493d53fa7b002 --- /dev/null +++ b/clients/client-qconnect/src/commands/CreateAssistantAssociationCommand.ts @@ -0,0 +1,186 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { CreateAssistantAssociationRequest, CreateAssistantAssociationResponse } from "../models/models_0"; +import { de_CreateAssistantAssociationCommand, se_CreateAssistantAssociationCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateAssistantAssociationCommand}. + */ +export interface CreateAssistantAssociationCommandInput extends CreateAssistantAssociationRequest {} +/** + * @public + * + * The output of {@link CreateAssistantAssociationCommand}. + */ +export interface CreateAssistantAssociationCommandOutput extends CreateAssistantAssociationResponse, __MetadataBearer {} + +/** + * @public + *

Creates an association between an Amazon Q in Connect assistant and another resource. Currently, the + * only supported association is with a knowledge base. An assistant can have only a single + * association.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, CreateAssistantAssociationCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, CreateAssistantAssociationCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // CreateAssistantAssociationRequest + * assistantId: "STRING_VALUE", // required + * associationType: "STRING_VALUE", // required + * association: { // AssistantAssociationInputData Union: only one key present + * knowledgeBaseId: "STRING_VALUE", + * }, + * clientToken: "STRING_VALUE", + * tags: { // Tags + * "": "STRING_VALUE", + * }, + * }; + * const command = new CreateAssistantAssociationCommand(input); + * const response = await client.send(command); + * // { // CreateAssistantAssociationResponse + * // assistantAssociation: { // AssistantAssociationData + * // assistantAssociationId: "STRING_VALUE", // required + * // assistantAssociationArn: "STRING_VALUE", // required + * // assistantId: "STRING_VALUE", // required + * // assistantArn: "STRING_VALUE", // required + * // associationType: "STRING_VALUE", // required + * // associationData: { // AssistantAssociationOutputData Union: only one key present + * // knowledgeBaseAssociation: { // KnowledgeBaseAssociationData + * // knowledgeBaseId: "STRING_VALUE", + * // knowledgeBaseArn: "STRING_VALUE", + * // }, + * // }, + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param CreateAssistantAssociationCommandInput - {@link CreateAssistantAssociationCommandInput} + * @returns {@link CreateAssistantAssociationCommandOutput} + * @see {@link CreateAssistantAssociationCommandInput} for command's `input` shape. + * @see {@link CreateAssistantAssociationCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

The request could not be processed because of conflict in the current state of the + * resource. For example, if you're using a Create API (such as + * CreateAssistant) that accepts name, a conflicting resource (usually with the + * same name) is being created or mutated.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You've exceeded your service quota. To perform the requested action, remove some of the + * relevant resources, or use service quotas to request a service quota increase.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class CreateAssistantAssociationCommand extends $Command< + CreateAssistantAssociationCommandInput, + CreateAssistantAssociationCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateAssistantAssociationCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, CreateAssistantAssociationCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "CreateAssistantAssociationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "CreateAssistantAssociation", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateAssistantAssociationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateAssistantAssociationCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_CreateAssistantAssociationCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/CreateAssistantCommand.ts b/clients/client-qconnect/src/commands/CreateAssistantCommand.ts new file mode 100644 index 0000000000000..183414c9d42b3 --- /dev/null +++ b/clients/client-qconnect/src/commands/CreateAssistantCommand.ts @@ -0,0 +1,183 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { CreateAssistantRequest, CreateAssistantResponse } from "../models/models_0"; +import { de_CreateAssistantCommand, se_CreateAssistantCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateAssistantCommand}. + */ +export interface CreateAssistantCommandInput extends CreateAssistantRequest {} +/** + * @public + * + * The output of {@link CreateAssistantCommand}. + */ +export interface CreateAssistantCommandOutput extends CreateAssistantResponse, __MetadataBearer {} + +/** + * @public + *

Creates an Amazon Q in Connect assistant.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, CreateAssistantCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, CreateAssistantCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // CreateAssistantRequest + * clientToken: "STRING_VALUE", + * name: "STRING_VALUE", // required + * type: "STRING_VALUE", // required + * description: "STRING_VALUE", + * tags: { // Tags + * "": "STRING_VALUE", + * }, + * serverSideEncryptionConfiguration: { // ServerSideEncryptionConfiguration + * kmsKeyId: "STRING_VALUE", + * }, + * }; + * const command = new CreateAssistantCommand(input); + * const response = await client.send(command); + * // { // CreateAssistantResponse + * // assistant: { // AssistantData + * // assistantId: "STRING_VALUE", // required + * // assistantArn: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // type: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // description: "STRING_VALUE", + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // serverSideEncryptionConfiguration: { // ServerSideEncryptionConfiguration + * // kmsKeyId: "STRING_VALUE", + * // }, + * // integrationConfiguration: { // AssistantIntegrationConfiguration + * // topicIntegrationArn: "STRING_VALUE", + * // }, + * // capabilityConfiguration: { // AssistantCapabilityConfiguration + * // type: "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param CreateAssistantCommandInput - {@link CreateAssistantCommandInput} + * @returns {@link CreateAssistantCommandOutput} + * @see {@link CreateAssistantCommandInput} for command's `input` shape. + * @see {@link CreateAssistantCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

The request could not be processed because of conflict in the current state of the + * resource. For example, if you're using a Create API (such as + * CreateAssistant) that accepts name, a conflicting resource (usually with the + * same name) is being created or mutated.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You've exceeded your service quota. To perform the requested action, remove some of the + * relevant resources, or use service quotas to request a service quota increase.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class CreateAssistantCommand extends $Command< + CreateAssistantCommandInput, + CreateAssistantCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateAssistantCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, CreateAssistantCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "CreateAssistantCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "CreateAssistant", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateAssistantCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateAssistantCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateAssistantCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/CreateContentCommand.ts b/clients/client-qconnect/src/commands/CreateContentCommand.ts new file mode 100644 index 0000000000000..9f3edeecc5f86 --- /dev/null +++ b/clients/client-qconnect/src/commands/CreateContentCommand.ts @@ -0,0 +1,191 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + CreateContentRequest, + CreateContentResponse, + CreateContentResponseFilterSensitiveLog, +} from "../models/models_0"; +import { de_CreateContentCommand, se_CreateContentCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateContentCommand}. + */ +export interface CreateContentCommandInput extends CreateContentRequest {} +/** + * @public + * + * The output of {@link CreateContentCommand}. + */ +export interface CreateContentCommandOutput extends CreateContentResponse, __MetadataBearer {} + +/** + * @public + *

Creates Amazon Q content. Before to calling this API, use StartContentUpload to + * upload an asset.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, CreateContentCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, CreateContentCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // CreateContentRequest + * knowledgeBaseId: "STRING_VALUE", // required + * name: "STRING_VALUE", // required + * title: "STRING_VALUE", + * overrideLinkOutUri: "STRING_VALUE", + * metadata: { // ContentMetadata + * "": "STRING_VALUE", + * }, + * uploadId: "STRING_VALUE", // required + * clientToken: "STRING_VALUE", + * tags: { // Tags + * "": "STRING_VALUE", + * }, + * }; + * const command = new CreateContentCommand(input); + * const response = await client.send(command); + * // { // CreateContentResponse + * // content: { // ContentData + * // contentArn: "STRING_VALUE", // required + * // contentId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // knowledgeBaseId: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // revisionId: "STRING_VALUE", // required + * // title: "STRING_VALUE", // required + * // contentType: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // metadata: { // ContentMetadata // required + * // "": "STRING_VALUE", + * // }, + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // linkOutUri: "STRING_VALUE", + * // url: "STRING_VALUE", // required + * // urlExpiry: new Date("TIMESTAMP"), // required + * // }, + * // }; + * + * ``` + * + * @param CreateContentCommandInput - {@link CreateContentCommandInput} + * @returns {@link CreateContentCommandOutput} + * @see {@link CreateContentCommandInput} for command's `input` shape. + * @see {@link CreateContentCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

The request could not be processed because of conflict in the current state of the + * resource. For example, if you're using a Create API (such as + * CreateAssistant) that accepts name, a conflicting resource (usually with the + * same name) is being created or mutated.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You've exceeded your service quota. To perform the requested action, remove some of the + * relevant resources, or use service quotas to request a service quota increase.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class CreateContentCommand extends $Command< + CreateContentCommandInput, + CreateContentCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateContentCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, CreateContentCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "CreateContentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: CreateContentResponseFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "CreateContent", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateContentCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateContentCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateContentCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/CreateKnowledgeBaseCommand.ts b/clients/client-qconnect/src/commands/CreateKnowledgeBaseCommand.ts new file mode 100644 index 0000000000000..88a3824d36c51 --- /dev/null +++ b/clients/client-qconnect/src/commands/CreateKnowledgeBaseCommand.ts @@ -0,0 +1,223 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { CreateKnowledgeBaseRequest, CreateKnowledgeBaseResponse } from "../models/models_0"; +import { de_CreateKnowledgeBaseCommand, se_CreateKnowledgeBaseCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateKnowledgeBaseCommand}. + */ +export interface CreateKnowledgeBaseCommandInput extends CreateKnowledgeBaseRequest {} +/** + * @public + * + * The output of {@link CreateKnowledgeBaseCommand}. + */ +export interface CreateKnowledgeBaseCommandOutput extends CreateKnowledgeBaseResponse, __MetadataBearer {} + +/** + * @public + *

Creates a knowledge base.

+ * + *

When using this API, you cannot reuse Amazon AppIntegrations + * DataIntegrations with external knowledge bases such as Salesforce and ServiceNow. If you do, + * you'll get an InvalidRequestException error.

+ *

For example, you're programmatically managing your external knowledge base, and you want + * to add or remove one of the fields that is being ingested from Salesforce. Do the + * following:

+ *
    + *
  1. + *

    Call DeleteKnowledgeBase.

    + *
  2. + *
  3. + *

    Call DeleteDataIntegration.

    + *
  4. + *
  5. + *

    Call CreateDataIntegration to recreate the DataIntegration or a create different + * one.

    + *
  6. + *
  7. + *

    Call CreateKnowledgeBase.

    + *
  8. + *
+ *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, CreateKnowledgeBaseCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, CreateKnowledgeBaseCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // CreateKnowledgeBaseRequest + * clientToken: "STRING_VALUE", + * name: "STRING_VALUE", // required + * knowledgeBaseType: "STRING_VALUE", // required + * sourceConfiguration: { // SourceConfiguration Union: only one key present + * appIntegrations: { // AppIntegrationsConfiguration + * appIntegrationArn: "STRING_VALUE", // required + * objectFields: [ // ObjectFieldsList + * "STRING_VALUE", + * ], + * }, + * }, + * renderingConfiguration: { // RenderingConfiguration + * templateUri: "STRING_VALUE", + * }, + * serverSideEncryptionConfiguration: { // ServerSideEncryptionConfiguration + * kmsKeyId: "STRING_VALUE", + * }, + * description: "STRING_VALUE", + * tags: { // Tags + * "": "STRING_VALUE", + * }, + * }; + * const command = new CreateKnowledgeBaseCommand(input); + * const response = await client.send(command); + * // { // CreateKnowledgeBaseResponse + * // knowledgeBase: { // KnowledgeBaseData + * // knowledgeBaseId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // knowledgeBaseType: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // lastContentModificationTime: new Date("TIMESTAMP"), + * // sourceConfiguration: { // SourceConfiguration Union: only one key present + * // appIntegrations: { // AppIntegrationsConfiguration + * // appIntegrationArn: "STRING_VALUE", // required + * // objectFields: [ // ObjectFieldsList + * // "STRING_VALUE", + * // ], + * // }, + * // }, + * // renderingConfiguration: { // RenderingConfiguration + * // templateUri: "STRING_VALUE", + * // }, + * // serverSideEncryptionConfiguration: { // ServerSideEncryptionConfiguration + * // kmsKeyId: "STRING_VALUE", + * // }, + * // description: "STRING_VALUE", + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param CreateKnowledgeBaseCommandInput - {@link CreateKnowledgeBaseCommandInput} + * @returns {@link CreateKnowledgeBaseCommandOutput} + * @see {@link CreateKnowledgeBaseCommandInput} for command's `input` shape. + * @see {@link CreateKnowledgeBaseCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

The request could not be processed because of conflict in the current state of the + * resource. For example, if you're using a Create API (such as + * CreateAssistant) that accepts name, a conflicting resource (usually with the + * same name) is being created or mutated.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You've exceeded your service quota. To perform the requested action, remove some of the + * relevant resources, or use service quotas to request a service quota increase.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class CreateKnowledgeBaseCommand extends $Command< + CreateKnowledgeBaseCommandInput, + CreateKnowledgeBaseCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateKnowledgeBaseCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, CreateKnowledgeBaseCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "CreateKnowledgeBaseCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "CreateKnowledgeBase", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateKnowledgeBaseCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateKnowledgeBaseCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateKnowledgeBaseCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/CreateQuickResponseCommand.ts b/clients/client-qconnect/src/commands/CreateQuickResponseCommand.ts new file mode 100644 index 0000000000000..8ec95de301dea --- /dev/null +++ b/clients/client-qconnect/src/commands/CreateQuickResponseCommand.ts @@ -0,0 +1,220 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + CreateQuickResponseRequest, + CreateQuickResponseRequestFilterSensitiveLog, + CreateQuickResponseResponse, + CreateQuickResponseResponseFilterSensitiveLog, +} from "../models/models_0"; +import { de_CreateQuickResponseCommand, se_CreateQuickResponseCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateQuickResponseCommand}. + */ +export interface CreateQuickResponseCommandInput extends CreateQuickResponseRequest {} +/** + * @public + * + * The output of {@link CreateQuickResponseCommand}. + */ +export interface CreateQuickResponseCommandOutput extends CreateQuickResponseResponse, __MetadataBearer {} + +/** + * @public + *

Creates a Amazon Q quick response.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, CreateQuickResponseCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, CreateQuickResponseCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // CreateQuickResponseRequest + * knowledgeBaseId: "STRING_VALUE", // required + * name: "STRING_VALUE", // required + * content: { // QuickResponseDataProvider Union: only one key present + * content: "STRING_VALUE", + * }, + * contentType: "STRING_VALUE", + * groupingConfiguration: { // GroupingConfiguration + * criteria: "STRING_VALUE", + * values: [ // GroupingValues + * "STRING_VALUE", + * ], + * }, + * description: "STRING_VALUE", + * shortcutKey: "STRING_VALUE", + * isActive: true || false, + * channels: [ // Channels + * "STRING_VALUE", + * ], + * language: "STRING_VALUE", + * clientToken: "STRING_VALUE", + * tags: { // Tags + * "": "STRING_VALUE", + * }, + * }; + * const command = new CreateQuickResponseCommand(input); + * const response = await client.send(command); + * // { // CreateQuickResponseResponse + * // quickResponse: { // QuickResponseData + * // quickResponseArn: "STRING_VALUE", // required + * // quickResponseId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // knowledgeBaseId: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // contentType: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // createdTime: new Date("TIMESTAMP"), // required + * // lastModifiedTime: new Date("TIMESTAMP"), // required + * // contents: { // QuickResponseContents + * // plainText: { // QuickResponseContentProvider Union: only one key present + * // content: "STRING_VALUE", + * // }, + * // markdown: {// Union: only one key present + * // content: "STRING_VALUE", + * // }, + * // }, + * // description: "STRING_VALUE", + * // groupingConfiguration: { // GroupingConfiguration + * // criteria: "STRING_VALUE", + * // values: [ // GroupingValues + * // "STRING_VALUE", + * // ], + * // }, + * // shortcutKey: "STRING_VALUE", + * // lastModifiedBy: "STRING_VALUE", + * // isActive: true || false, + * // channels: [ // Channels + * // "STRING_VALUE", + * // ], + * // language: "STRING_VALUE", + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param CreateQuickResponseCommandInput - {@link CreateQuickResponseCommandInput} + * @returns {@link CreateQuickResponseCommandOutput} + * @see {@link CreateQuickResponseCommandInput} for command's `input` shape. + * @see {@link CreateQuickResponseCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

The request could not be processed because of conflict in the current state of the + * resource. For example, if you're using a Create API (such as + * CreateAssistant) that accepts name, a conflicting resource (usually with the + * same name) is being created or mutated.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You've exceeded your service quota. To perform the requested action, remove some of the + * relevant resources, or use service quotas to request a service quota increase.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class CreateQuickResponseCommand extends $Command< + CreateQuickResponseCommandInput, + CreateQuickResponseCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateQuickResponseCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, CreateQuickResponseCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "CreateQuickResponseCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateQuickResponseRequestFilterSensitiveLog, + outputFilterSensitiveLog: CreateQuickResponseResponseFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "CreateQuickResponse", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateQuickResponseCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateQuickResponseCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateQuickResponseCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/CreateSessionCommand.ts b/clients/client-qconnect/src/commands/CreateSessionCommand.ts new file mode 100644 index 0000000000000..cda886eae6de6 --- /dev/null +++ b/clients/client-qconnect/src/commands/CreateSessionCommand.ts @@ -0,0 +1,168 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { CreateSessionRequest, CreateSessionResponse } from "../models/models_0"; +import { de_CreateSessionCommand, se_CreateSessionCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateSessionCommand}. + */ +export interface CreateSessionCommandInput extends CreateSessionRequest {} +/** + * @public + * + * The output of {@link CreateSessionCommand}. + */ +export interface CreateSessionCommandOutput extends CreateSessionResponse, __MetadataBearer {} + +/** + * @public + *

Creates a session. A session is a contextual container used for generating + * recommendations. Amazon Connect creates a new Amazon Q session for each contact on which + * Amazon Q is enabled.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, CreateSessionCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, CreateSessionCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // CreateSessionRequest + * clientToken: "STRING_VALUE", + * assistantId: "STRING_VALUE", // required + * name: "STRING_VALUE", // required + * description: "STRING_VALUE", + * tags: { // Tags + * "": "STRING_VALUE", + * }, + * }; + * const command = new CreateSessionCommand(input); + * const response = await client.send(command); + * // { // CreateSessionResponse + * // session: { // SessionData + * // sessionArn: "STRING_VALUE", // required + * // sessionId: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // description: "STRING_VALUE", + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // integrationConfiguration: { // SessionIntegrationConfiguration + * // topicIntegrationArn: "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param CreateSessionCommandInput - {@link CreateSessionCommandInput} + * @returns {@link CreateSessionCommandOutput} + * @see {@link CreateSessionCommandInput} for command's `input` shape. + * @see {@link CreateSessionCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link ConflictException} (client fault) + *

The request could not be processed because of conflict in the current state of the + * resource. For example, if you're using a Create API (such as + * CreateAssistant) that accepts name, a conflicting resource (usually with the + * same name) is being created or mutated.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class CreateSessionCommand extends $Command< + CreateSessionCommandInput, + CreateSessionCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateSessionCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, CreateSessionCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "CreateSessionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "CreateSession", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateSessionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateSessionCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateSessionCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/DeleteAssistantAssociationCommand.ts b/clients/client-qconnect/src/commands/DeleteAssistantAssociationCommand.ts new file mode 100644 index 0000000000000..adbde07d4da54 --- /dev/null +++ b/clients/client-qconnect/src/commands/DeleteAssistantAssociationCommand.ts @@ -0,0 +1,150 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { DeleteAssistantAssociationRequest, DeleteAssistantAssociationResponse } from "../models/models_0"; +import { de_DeleteAssistantAssociationCommand, se_DeleteAssistantAssociationCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteAssistantAssociationCommand}. + */ +export interface DeleteAssistantAssociationCommandInput extends DeleteAssistantAssociationRequest {} +/** + * @public + * + * The output of {@link DeleteAssistantAssociationCommand}. + */ +export interface DeleteAssistantAssociationCommandOutput extends DeleteAssistantAssociationResponse, __MetadataBearer {} + +/** + * @public + *

Deletes an assistant association.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, DeleteAssistantAssociationCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, DeleteAssistantAssociationCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // DeleteAssistantAssociationRequest + * assistantAssociationId: "STRING_VALUE", // required + * assistantId: "STRING_VALUE", // required + * }; + * const command = new DeleteAssistantAssociationCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteAssistantAssociationCommandInput - {@link DeleteAssistantAssociationCommandInput} + * @returns {@link DeleteAssistantAssociationCommandOutput} + * @see {@link DeleteAssistantAssociationCommandInput} for command's `input` shape. + * @see {@link DeleteAssistantAssociationCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class DeleteAssistantAssociationCommand extends $Command< + DeleteAssistantAssociationCommandInput, + DeleteAssistantAssociationCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteAssistantAssociationCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DeleteAssistantAssociationCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "DeleteAssistantAssociationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "DeleteAssistantAssociation", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteAssistantAssociationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteAssistantAssociationCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_DeleteAssistantAssociationCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/DeleteAssistantCommand.ts b/clients/client-qconnect/src/commands/DeleteAssistantCommand.ts new file mode 100644 index 0000000000000..c2152e764f159 --- /dev/null +++ b/clients/client-qconnect/src/commands/DeleteAssistantCommand.ts @@ -0,0 +1,146 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { DeleteAssistantRequest, DeleteAssistantResponse } from "../models/models_0"; +import { de_DeleteAssistantCommand, se_DeleteAssistantCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteAssistantCommand}. + */ +export interface DeleteAssistantCommandInput extends DeleteAssistantRequest {} +/** + * @public + * + * The output of {@link DeleteAssistantCommand}. + */ +export interface DeleteAssistantCommandOutput extends DeleteAssistantResponse, __MetadataBearer {} + +/** + * @public + *

Deletes an assistant.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, DeleteAssistantCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, DeleteAssistantCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // DeleteAssistantRequest + * assistantId: "STRING_VALUE", // required + * }; + * const command = new DeleteAssistantCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteAssistantCommandInput - {@link DeleteAssistantCommandInput} + * @returns {@link DeleteAssistantCommandOutput} + * @see {@link DeleteAssistantCommandInput} for command's `input` shape. + * @see {@link DeleteAssistantCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class DeleteAssistantCommand extends $Command< + DeleteAssistantCommandInput, + DeleteAssistantCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteAssistantCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DeleteAssistantCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "DeleteAssistantCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "DeleteAssistant", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteAssistantCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteAssistantCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteAssistantCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/DeleteContentCommand.ts b/clients/client-qconnect/src/commands/DeleteContentCommand.ts new file mode 100644 index 0000000000000..443ef0786b3f2 --- /dev/null +++ b/clients/client-qconnect/src/commands/DeleteContentCommand.ts @@ -0,0 +1,145 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { DeleteContentRequest, DeleteContentResponse } from "../models/models_0"; +import { de_DeleteContentCommand, se_DeleteContentCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteContentCommand}. + */ +export interface DeleteContentCommandInput extends DeleteContentRequest {} +/** + * @public + * + * The output of {@link DeleteContentCommand}. + */ +export interface DeleteContentCommandOutput extends DeleteContentResponse, __MetadataBearer {} + +/** + * @public + *

Deletes the content.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, DeleteContentCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, DeleteContentCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // DeleteContentRequest + * knowledgeBaseId: "STRING_VALUE", // required + * contentId: "STRING_VALUE", // required + * }; + * const command = new DeleteContentCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteContentCommandInput - {@link DeleteContentCommandInput} + * @returns {@link DeleteContentCommandOutput} + * @see {@link DeleteContentCommandInput} for command's `input` shape. + * @see {@link DeleteContentCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class DeleteContentCommand extends $Command< + DeleteContentCommandInput, + DeleteContentCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteContentCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, DeleteContentCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "DeleteContentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "DeleteContent", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteContentCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteContentCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteContentCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/DeleteImportJobCommand.ts b/clients/client-qconnect/src/commands/DeleteImportJobCommand.ts new file mode 100644 index 0000000000000..8aea89ec65522 --- /dev/null +++ b/clients/client-qconnect/src/commands/DeleteImportJobCommand.ts @@ -0,0 +1,153 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { DeleteImportJobRequest, DeleteImportJobResponse } from "../models/models_0"; +import { de_DeleteImportJobCommand, se_DeleteImportJobCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteImportJobCommand}. + */ +export interface DeleteImportJobCommandInput extends DeleteImportJobRequest {} +/** + * @public + * + * The output of {@link DeleteImportJobCommand}. + */ +export interface DeleteImportJobCommandOutput extends DeleteImportJobResponse, __MetadataBearer {} + +/** + * @public + *

Deletes the quick response import job.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, DeleteImportJobCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, DeleteImportJobCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // DeleteImportJobRequest + * knowledgeBaseId: "STRING_VALUE", // required + * importJobId: "STRING_VALUE", // required + * }; + * const command = new DeleteImportJobCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteImportJobCommandInput - {@link DeleteImportJobCommandInput} + * @returns {@link DeleteImportJobCommandOutput} + * @see {@link DeleteImportJobCommandInput} for command's `input` shape. + * @see {@link DeleteImportJobCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

The request could not be processed because of conflict in the current state of the + * resource. For example, if you're using a Create API (such as + * CreateAssistant) that accepts name, a conflicting resource (usually with the + * same name) is being created or mutated.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class DeleteImportJobCommand extends $Command< + DeleteImportJobCommandInput, + DeleteImportJobCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteImportJobCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DeleteImportJobCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "DeleteImportJobCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "DeleteImportJob", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteImportJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteImportJobCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteImportJobCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/DeleteKnowledgeBaseCommand.ts b/clients/client-qconnect/src/commands/DeleteKnowledgeBaseCommand.ts new file mode 100644 index 0000000000000..e30c4e2241f5b --- /dev/null +++ b/clients/client-qconnect/src/commands/DeleteKnowledgeBaseCommand.ts @@ -0,0 +1,160 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { DeleteKnowledgeBaseRequest, DeleteKnowledgeBaseResponse } from "../models/models_0"; +import { de_DeleteKnowledgeBaseCommand, se_DeleteKnowledgeBaseCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteKnowledgeBaseCommand}. + */ +export interface DeleteKnowledgeBaseCommandInput extends DeleteKnowledgeBaseRequest {} +/** + * @public + * + * The output of {@link DeleteKnowledgeBaseCommand}. + */ +export interface DeleteKnowledgeBaseCommandOutput extends DeleteKnowledgeBaseResponse, __MetadataBearer {} + +/** + * @public + *

Deletes the knowledge base.

+ * + *

When you use this API to delete an external knowledge base such as Salesforce or + * ServiceNow, you must also delete the Amazon AppIntegrations + * DataIntegration. This is because you can't reuse the DataIntegration after it's been + * associated with an external knowledge base. However, you can delete and recreate it. See + * DeleteDataIntegration and CreateDataIntegration in the Amazon AppIntegrations API + * Reference.

+ *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, DeleteKnowledgeBaseCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, DeleteKnowledgeBaseCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // DeleteKnowledgeBaseRequest + * knowledgeBaseId: "STRING_VALUE", // required + * }; + * const command = new DeleteKnowledgeBaseCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteKnowledgeBaseCommandInput - {@link DeleteKnowledgeBaseCommandInput} + * @returns {@link DeleteKnowledgeBaseCommandOutput} + * @see {@link DeleteKnowledgeBaseCommandInput} for command's `input` shape. + * @see {@link DeleteKnowledgeBaseCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

The request could not be processed because of conflict in the current state of the + * resource. For example, if you're using a Create API (such as + * CreateAssistant) that accepts name, a conflicting resource (usually with the + * same name) is being created or mutated.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class DeleteKnowledgeBaseCommand extends $Command< + DeleteKnowledgeBaseCommandInput, + DeleteKnowledgeBaseCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteKnowledgeBaseCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DeleteKnowledgeBaseCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "DeleteKnowledgeBaseCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "DeleteKnowledgeBase", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteKnowledgeBaseCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteKnowledgeBaseCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteKnowledgeBaseCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/DeleteQuickResponseCommand.ts b/clients/client-qconnect/src/commands/DeleteQuickResponseCommand.ts new file mode 100644 index 0000000000000..411d3dd896714 --- /dev/null +++ b/clients/client-qconnect/src/commands/DeleteQuickResponseCommand.ts @@ -0,0 +1,147 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { DeleteQuickResponseRequest, DeleteQuickResponseResponse } from "../models/models_0"; +import { de_DeleteQuickResponseCommand, se_DeleteQuickResponseCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteQuickResponseCommand}. + */ +export interface DeleteQuickResponseCommandInput extends DeleteQuickResponseRequest {} +/** + * @public + * + * The output of {@link DeleteQuickResponseCommand}. + */ +export interface DeleteQuickResponseCommandOutput extends DeleteQuickResponseResponse, __MetadataBearer {} + +/** + * @public + *

Deletes a quick response.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, DeleteQuickResponseCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, DeleteQuickResponseCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // DeleteQuickResponseRequest + * knowledgeBaseId: "STRING_VALUE", // required + * quickResponseId: "STRING_VALUE", // required + * }; + * const command = new DeleteQuickResponseCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteQuickResponseCommandInput - {@link DeleteQuickResponseCommandInput} + * @returns {@link DeleteQuickResponseCommandOutput} + * @see {@link DeleteQuickResponseCommandInput} for command's `input` shape. + * @see {@link DeleteQuickResponseCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class DeleteQuickResponseCommand extends $Command< + DeleteQuickResponseCommandInput, + DeleteQuickResponseCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteQuickResponseCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DeleteQuickResponseCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "DeleteQuickResponseCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "DeleteQuickResponse", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteQuickResponseCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteQuickResponseCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteQuickResponseCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/GetAssistantAssociationCommand.ts b/clients/client-qconnect/src/commands/GetAssistantAssociationCommand.ts new file mode 100644 index 0000000000000..5d14ad46e0b46 --- /dev/null +++ b/clients/client-qconnect/src/commands/GetAssistantAssociationCommand.ts @@ -0,0 +1,164 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GetAssistantAssociationRequest, GetAssistantAssociationResponse } from "../models/models_0"; +import { de_GetAssistantAssociationCommand, se_GetAssistantAssociationCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetAssistantAssociationCommand}. + */ +export interface GetAssistantAssociationCommandInput extends GetAssistantAssociationRequest {} +/** + * @public + * + * The output of {@link GetAssistantAssociationCommand}. + */ +export interface GetAssistantAssociationCommandOutput extends GetAssistantAssociationResponse, __MetadataBearer {} + +/** + * @public + *

Retrieves information about an assistant association.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, GetAssistantAssociationCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, GetAssistantAssociationCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // GetAssistantAssociationRequest + * assistantAssociationId: "STRING_VALUE", // required + * assistantId: "STRING_VALUE", // required + * }; + * const command = new GetAssistantAssociationCommand(input); + * const response = await client.send(command); + * // { // GetAssistantAssociationResponse + * // assistantAssociation: { // AssistantAssociationData + * // assistantAssociationId: "STRING_VALUE", // required + * // assistantAssociationArn: "STRING_VALUE", // required + * // assistantId: "STRING_VALUE", // required + * // assistantArn: "STRING_VALUE", // required + * // associationType: "STRING_VALUE", // required + * // associationData: { // AssistantAssociationOutputData Union: only one key present + * // knowledgeBaseAssociation: { // KnowledgeBaseAssociationData + * // knowledgeBaseId: "STRING_VALUE", + * // knowledgeBaseArn: "STRING_VALUE", + * // }, + * // }, + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param GetAssistantAssociationCommandInput - {@link GetAssistantAssociationCommandInput} + * @returns {@link GetAssistantAssociationCommandOutput} + * @see {@link GetAssistantAssociationCommandInput} for command's `input` shape. + * @see {@link GetAssistantAssociationCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class GetAssistantAssociationCommand extends $Command< + GetAssistantAssociationCommandInput, + GetAssistantAssociationCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetAssistantAssociationCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetAssistantAssociationCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "GetAssistantAssociationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "GetAssistantAssociation", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetAssistantAssociationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetAssistantAssociationCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetAssistantAssociationCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/GetAssistantCommand.ts b/clients/client-qconnect/src/commands/GetAssistantCommand.ts new file mode 100644 index 0000000000000..8cc0e11ea539b --- /dev/null +++ b/clients/client-qconnect/src/commands/GetAssistantCommand.ts @@ -0,0 +1,165 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GetAssistantRequest, GetAssistantResponse } from "../models/models_0"; +import { de_GetAssistantCommand, se_GetAssistantCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetAssistantCommand}. + */ +export interface GetAssistantCommandInput extends GetAssistantRequest {} +/** + * @public + * + * The output of {@link GetAssistantCommand}. + */ +export interface GetAssistantCommandOutput extends GetAssistantResponse, __MetadataBearer {} + +/** + * @public + *

Retrieves information about an assistant.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, GetAssistantCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, GetAssistantCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // GetAssistantRequest + * assistantId: "STRING_VALUE", // required + * }; + * const command = new GetAssistantCommand(input); + * const response = await client.send(command); + * // { // GetAssistantResponse + * // assistant: { // AssistantData + * // assistantId: "STRING_VALUE", // required + * // assistantArn: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // type: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // description: "STRING_VALUE", + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // serverSideEncryptionConfiguration: { // ServerSideEncryptionConfiguration + * // kmsKeyId: "STRING_VALUE", + * // }, + * // integrationConfiguration: { // AssistantIntegrationConfiguration + * // topicIntegrationArn: "STRING_VALUE", + * // }, + * // capabilityConfiguration: { // AssistantCapabilityConfiguration + * // type: "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param GetAssistantCommandInput - {@link GetAssistantCommandInput} + * @returns {@link GetAssistantCommandOutput} + * @see {@link GetAssistantCommandInput} for command's `input` shape. + * @see {@link GetAssistantCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class GetAssistantCommand extends $Command< + GetAssistantCommandInput, + GetAssistantCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetAssistantCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, GetAssistantCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "GetAssistantCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "GetAssistant", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetAssistantCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetAssistantCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetAssistantCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/GetContentCommand.ts b/clients/client-qconnect/src/commands/GetContentCommand.ts new file mode 100644 index 0000000000000..f66423670f2cb --- /dev/null +++ b/clients/client-qconnect/src/commands/GetContentCommand.ts @@ -0,0 +1,166 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GetContentRequest, GetContentResponse, GetContentResponseFilterSensitiveLog } from "../models/models_0"; +import { de_GetContentCommand, se_GetContentCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetContentCommand}. + */ +export interface GetContentCommandInput extends GetContentRequest {} +/** + * @public + * + * The output of {@link GetContentCommand}. + */ +export interface GetContentCommandOutput extends GetContentResponse, __MetadataBearer {} + +/** + * @public + *

Retrieves content, including a pre-signed URL to download the content.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, GetContentCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, GetContentCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // GetContentRequest + * contentId: "STRING_VALUE", // required + * knowledgeBaseId: "STRING_VALUE", // required + * }; + * const command = new GetContentCommand(input); + * const response = await client.send(command); + * // { // GetContentResponse + * // content: { // ContentData + * // contentArn: "STRING_VALUE", // required + * // contentId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // knowledgeBaseId: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // revisionId: "STRING_VALUE", // required + * // title: "STRING_VALUE", // required + * // contentType: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // metadata: { // ContentMetadata // required + * // "": "STRING_VALUE", + * // }, + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // linkOutUri: "STRING_VALUE", + * // url: "STRING_VALUE", // required + * // urlExpiry: new Date("TIMESTAMP"), // required + * // }, + * // }; + * + * ``` + * + * @param GetContentCommandInput - {@link GetContentCommandInput} + * @returns {@link GetContentCommandOutput} + * @see {@link GetContentCommandInput} for command's `input` shape. + * @see {@link GetContentCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class GetContentCommand extends $Command< + GetContentCommandInput, + GetContentCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetContentCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, GetContentCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "GetContentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: GetContentResponseFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "GetContent", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetContentCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetContentCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetContentCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/GetContentSummaryCommand.ts b/clients/client-qconnect/src/commands/GetContentSummaryCommand.ts new file mode 100644 index 0000000000000..ab66639a807b7 --- /dev/null +++ b/clients/client-qconnect/src/commands/GetContentSummaryCommand.ts @@ -0,0 +1,165 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GetContentSummaryRequest, GetContentSummaryResponse } from "../models/models_0"; +import { de_GetContentSummaryCommand, se_GetContentSummaryCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetContentSummaryCommand}. + */ +export interface GetContentSummaryCommandInput extends GetContentSummaryRequest {} +/** + * @public + * + * The output of {@link GetContentSummaryCommand}. + */ +export interface GetContentSummaryCommandOutput extends GetContentSummaryResponse, __MetadataBearer {} + +/** + * @public + *

Retrieves summary information about the content.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, GetContentSummaryCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, GetContentSummaryCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // GetContentSummaryRequest + * contentId: "STRING_VALUE", // required + * knowledgeBaseId: "STRING_VALUE", // required + * }; + * const command = new GetContentSummaryCommand(input); + * const response = await client.send(command); + * // { // GetContentSummaryResponse + * // contentSummary: { // ContentSummary + * // contentArn: "STRING_VALUE", // required + * // contentId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // knowledgeBaseId: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // revisionId: "STRING_VALUE", // required + * // title: "STRING_VALUE", // required + * // contentType: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // metadata: { // ContentMetadata // required + * // "": "STRING_VALUE", + * // }, + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param GetContentSummaryCommandInput - {@link GetContentSummaryCommandInput} + * @returns {@link GetContentSummaryCommandOutput} + * @see {@link GetContentSummaryCommandInput} for command's `input` shape. + * @see {@link GetContentSummaryCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class GetContentSummaryCommand extends $Command< + GetContentSummaryCommandInput, + GetContentSummaryCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetContentSummaryCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetContentSummaryCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "GetContentSummaryCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "GetContentSummary", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetContentSummaryCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetContentSummaryCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetContentSummaryCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/GetImportJobCommand.ts b/clients/client-qconnect/src/commands/GetImportJobCommand.ts new file mode 100644 index 0000000000000..404edc1bd8f4a --- /dev/null +++ b/clients/client-qconnect/src/commands/GetImportJobCommand.ts @@ -0,0 +1,170 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GetImportJobRequest, GetImportJobResponse, GetImportJobResponseFilterSensitiveLog } from "../models/models_0"; +import { de_GetImportJobCommand, se_GetImportJobCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetImportJobCommand}. + */ +export interface GetImportJobCommandInput extends GetImportJobRequest {} +/** + * @public + * + * The output of {@link GetImportJobCommand}. + */ +export interface GetImportJobCommandOutput extends GetImportJobResponse, __MetadataBearer {} + +/** + * @public + *

Retrieves the started import job.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, GetImportJobCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, GetImportJobCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // GetImportJobRequest + * importJobId: "STRING_VALUE", // required + * knowledgeBaseId: "STRING_VALUE", // required + * }; + * const command = new GetImportJobCommand(input); + * const response = await client.send(command); + * // { // GetImportJobResponse + * // importJob: { // ImportJobData + * // importJobId: "STRING_VALUE", // required + * // knowledgeBaseId: "STRING_VALUE", // required + * // uploadId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // importJobType: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // url: "STRING_VALUE", // required + * // failedRecordReport: "STRING_VALUE", + * // urlExpiry: new Date("TIMESTAMP"), // required + * // createdTime: new Date("TIMESTAMP"), // required + * // lastModifiedTime: new Date("TIMESTAMP"), // required + * // metadata: { // ContentMetadata + * // "": "STRING_VALUE", + * // }, + * // externalSourceConfiguration: { // ExternalSourceConfiguration + * // source: "STRING_VALUE", // required + * // configuration: { // Configuration Union: only one key present + * // connectConfiguration: { // ConnectConfiguration + * // instanceId: "STRING_VALUE", + * // }, + * // }, + * // }, + * // }, + * // }; + * + * ``` + * + * @param GetImportJobCommandInput - {@link GetImportJobCommandInput} + * @returns {@link GetImportJobCommandOutput} + * @see {@link GetImportJobCommandInput} for command's `input` shape. + * @see {@link GetImportJobCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class GetImportJobCommand extends $Command< + GetImportJobCommandInput, + GetImportJobCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetImportJobCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, GetImportJobCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "GetImportJobCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: GetImportJobResponseFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "GetImportJob", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetImportJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetImportJobCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetImportJobCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/GetKnowledgeBaseCommand.ts b/clients/client-qconnect/src/commands/GetKnowledgeBaseCommand.ts new file mode 100644 index 0000000000000..7e98964b443db --- /dev/null +++ b/clients/client-qconnect/src/commands/GetKnowledgeBaseCommand.ts @@ -0,0 +1,173 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GetKnowledgeBaseRequest, GetKnowledgeBaseResponse } from "../models/models_0"; +import { de_GetKnowledgeBaseCommand, se_GetKnowledgeBaseCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetKnowledgeBaseCommand}. + */ +export interface GetKnowledgeBaseCommandInput extends GetKnowledgeBaseRequest {} +/** + * @public + * + * The output of {@link GetKnowledgeBaseCommand}. + */ +export interface GetKnowledgeBaseCommandOutput extends GetKnowledgeBaseResponse, __MetadataBearer {} + +/** + * @public + *

Retrieves information about the knowledge base.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, GetKnowledgeBaseCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, GetKnowledgeBaseCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // GetKnowledgeBaseRequest + * knowledgeBaseId: "STRING_VALUE", // required + * }; + * const command = new GetKnowledgeBaseCommand(input); + * const response = await client.send(command); + * // { // GetKnowledgeBaseResponse + * // knowledgeBase: { // KnowledgeBaseData + * // knowledgeBaseId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // knowledgeBaseType: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // lastContentModificationTime: new Date("TIMESTAMP"), + * // sourceConfiguration: { // SourceConfiguration Union: only one key present + * // appIntegrations: { // AppIntegrationsConfiguration + * // appIntegrationArn: "STRING_VALUE", // required + * // objectFields: [ // ObjectFieldsList + * // "STRING_VALUE", + * // ], + * // }, + * // }, + * // renderingConfiguration: { // RenderingConfiguration + * // templateUri: "STRING_VALUE", + * // }, + * // serverSideEncryptionConfiguration: { // ServerSideEncryptionConfiguration + * // kmsKeyId: "STRING_VALUE", + * // }, + * // description: "STRING_VALUE", + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param GetKnowledgeBaseCommandInput - {@link GetKnowledgeBaseCommandInput} + * @returns {@link GetKnowledgeBaseCommandOutput} + * @see {@link GetKnowledgeBaseCommandInput} for command's `input` shape. + * @see {@link GetKnowledgeBaseCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class GetKnowledgeBaseCommand extends $Command< + GetKnowledgeBaseCommandInput, + GetKnowledgeBaseCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetKnowledgeBaseCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetKnowledgeBaseCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "GetKnowledgeBaseCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "GetKnowledgeBase", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetKnowledgeBaseCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetKnowledgeBaseCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetKnowledgeBaseCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/GetQuickResponseCommand.ts b/clients/client-qconnect/src/commands/GetQuickResponseCommand.ts new file mode 100644 index 0000000000000..9666683bf7979 --- /dev/null +++ b/clients/client-qconnect/src/commands/GetQuickResponseCommand.ts @@ -0,0 +1,188 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + GetQuickResponseRequest, + GetQuickResponseResponse, + GetQuickResponseResponseFilterSensitiveLog, +} from "../models/models_0"; +import { de_GetQuickResponseCommand, se_GetQuickResponseCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetQuickResponseCommand}. + */ +export interface GetQuickResponseCommandInput extends GetQuickResponseRequest {} +/** + * @public + * + * The output of {@link GetQuickResponseCommand}. + */ +export interface GetQuickResponseCommandOutput extends GetQuickResponseResponse, __MetadataBearer {} + +/** + * @public + *

Retrieves the quick response.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, GetQuickResponseCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, GetQuickResponseCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // GetQuickResponseRequest + * quickResponseId: "STRING_VALUE", // required + * knowledgeBaseId: "STRING_VALUE", // required + * }; + * const command = new GetQuickResponseCommand(input); + * const response = await client.send(command); + * // { // GetQuickResponseResponse + * // quickResponse: { // QuickResponseData + * // quickResponseArn: "STRING_VALUE", // required + * // quickResponseId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // knowledgeBaseId: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // contentType: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // createdTime: new Date("TIMESTAMP"), // required + * // lastModifiedTime: new Date("TIMESTAMP"), // required + * // contents: { // QuickResponseContents + * // plainText: { // QuickResponseContentProvider Union: only one key present + * // content: "STRING_VALUE", + * // }, + * // markdown: {// Union: only one key present + * // content: "STRING_VALUE", + * // }, + * // }, + * // description: "STRING_VALUE", + * // groupingConfiguration: { // GroupingConfiguration + * // criteria: "STRING_VALUE", + * // values: [ // GroupingValues + * // "STRING_VALUE", + * // ], + * // }, + * // shortcutKey: "STRING_VALUE", + * // lastModifiedBy: "STRING_VALUE", + * // isActive: true || false, + * // channels: [ // Channels + * // "STRING_VALUE", + * // ], + * // language: "STRING_VALUE", + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param GetQuickResponseCommandInput - {@link GetQuickResponseCommandInput} + * @returns {@link GetQuickResponseCommandOutput} + * @see {@link GetQuickResponseCommandInput} for command's `input` shape. + * @see {@link GetQuickResponseCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class GetQuickResponseCommand extends $Command< + GetQuickResponseCommandInput, + GetQuickResponseCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetQuickResponseCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetQuickResponseCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "GetQuickResponseCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: GetQuickResponseResponseFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "GetQuickResponse", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetQuickResponseCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetQuickResponseCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetQuickResponseCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/GetRecommendationsCommand.ts b/clients/client-qconnect/src/commands/GetRecommendationsCommand.ts new file mode 100644 index 0000000000000..692926d76faf1 --- /dev/null +++ b/clients/client-qconnect/src/commands/GetRecommendationsCommand.ts @@ -0,0 +1,309 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + GetRecommendationsRequest, + GetRecommendationsResponse, + GetRecommendationsResponseFilterSensitiveLog, +} from "../models/models_0"; +import { de_GetRecommendationsCommand, se_GetRecommendationsCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetRecommendationsCommand}. + */ +export interface GetRecommendationsCommandInput extends GetRecommendationsRequest {} +/** + * @public + * + * The output of {@link GetRecommendationsCommand}. + */ +export interface GetRecommendationsCommandOutput extends GetRecommendationsResponse, __MetadataBearer {} + +/** + * @public + *

Retrieves recommendations for the specified session. To avoid retrieving the same + * recommendations in subsequent calls, use NotifyRecommendationsReceived. This API supports long-polling behavior with the + * waitTimeSeconds parameter. Short poll is the default behavior and only returns + * recommendations already available. To perform a manual query against an assistant, use QueryAssistant.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, GetRecommendationsCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, GetRecommendationsCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // GetRecommendationsRequest + * assistantId: "STRING_VALUE", // required + * sessionId: "STRING_VALUE", // required + * maxResults: Number("int"), + * waitTimeSeconds: Number("int"), + * }; + * const command = new GetRecommendationsCommand(input); + * const response = await client.send(command); + * // { // GetRecommendationsResponse + * // recommendations: [ // RecommendationList // required + * // { // RecommendationData + * // recommendationId: "STRING_VALUE", // required + * // document: { // Document + * // contentReference: { // ContentReference + * // knowledgeBaseArn: "STRING_VALUE", + * // knowledgeBaseId: "STRING_VALUE", + * // contentArn: "STRING_VALUE", + * // contentId: "STRING_VALUE", + * // }, + * // title: { // DocumentText + * // text: "STRING_VALUE", + * // highlights: [ // Highlights + * // { // Highlight + * // beginOffsetInclusive: Number("int"), + * // endOffsetExclusive: Number("int"), + * // }, + * // ], + * // }, + * // excerpt: { + * // text: "STRING_VALUE", + * // highlights: [ + * // { + * // beginOffsetInclusive: Number("int"), + * // endOffsetExclusive: Number("int"), + * // }, + * // ], + * // }, + * // }, + * // relevanceScore: Number("double"), + * // relevanceLevel: "STRING_VALUE", + * // type: "STRING_VALUE", + * // data: { // DataSummary + * // reference: { // DataReference Union: only one key present + * // contentReference: { + * // knowledgeBaseArn: "STRING_VALUE", + * // knowledgeBaseId: "STRING_VALUE", + * // contentArn: "STRING_VALUE", + * // contentId: "STRING_VALUE", + * // }, + * // generativeReference: { // GenerativeReference + * // modelId: "STRING_VALUE", + * // generationId: "STRING_VALUE", + * // }, + * // }, + * // details: { // DataDetails Union: only one key present + * // contentData: { // ContentDataDetails + * // textData: { // TextData + * // title: { + * // text: "STRING_VALUE", + * // highlights: [ + * // { + * // beginOffsetInclusive: Number("int"), + * // endOffsetExclusive: Number("int"), + * // }, + * // ], + * // }, + * // excerpt: { + * // text: "STRING_VALUE", + * // highlights: [ + * // { + * // beginOffsetInclusive: Number("int"), + * // endOffsetExclusive: Number("int"), + * // }, + * // ], + * // }, + * // }, + * // rankingData: { // RankingData + * // relevanceScore: Number("double"), + * // relevanceLevel: "STRING_VALUE", + * // }, + * // }, + * // generativeData: { // GenerativeDataDetails + * // completion: "STRING_VALUE", // required + * // references: [ // DataSummaryList // required + * // { + * // reference: {// Union: only one key present + * // contentReference: "", + * // generativeReference: { + * // modelId: "STRING_VALUE", + * // generationId: "STRING_VALUE", + * // }, + * // }, + * // details: {// Union: only one key present + * // contentData: { + * // textData: { + * // title: "", + * // excerpt: "", + * // }, + * // rankingData: { + * // relevanceScore: Number("double"), + * // relevanceLevel: "STRING_VALUE", + * // }, + * // }, + * // generativeData: { + * // completion: "STRING_VALUE", // required + * // references: [ // required + * // "", + * // ], + * // rankingData: { + * // relevanceScore: Number("double"), + * // relevanceLevel: "STRING_VALUE", + * // }, + * // }, + * // sourceContentData: { // SourceContentDataDetails + * // id: "STRING_VALUE", // required + * // type: "STRING_VALUE", // required + * // textData: { + * // title: "", + * // excerpt: "", + * // }, + * // rankingData: { + * // relevanceScore: Number("double"), + * // relevanceLevel: "STRING_VALUE", + * // }, + * // }, + * // }, + * // }, + * // ], + * // rankingData: { + * // relevanceScore: Number("double"), + * // relevanceLevel: "STRING_VALUE", + * // }, + * // }, + * // sourceContentData: { + * // id: "STRING_VALUE", // required + * // type: "STRING_VALUE", // required + * // textData: { + * // title: "", + * // excerpt: "", + * // }, + * // rankingData: "", // required + * // }, + * // }, + * // }, + * // }, + * // ], + * // triggers: [ // RecommendationTriggerList + * // { // RecommendationTrigger + * // id: "STRING_VALUE", // required + * // type: "STRING_VALUE", // required + * // source: "STRING_VALUE", // required + * // data: { // RecommendationTriggerData Union: only one key present + * // query: { // QueryRecommendationTriggerData + * // text: "STRING_VALUE", + * // }, + * // }, + * // recommendationIds: [ // RecommendationIdList // required + * // "STRING_VALUE", + * // ], + * // }, + * // ], + * // }; + * + * ``` + * + * @param GetRecommendationsCommandInput - {@link GetRecommendationsCommandInput} + * @returns {@link GetRecommendationsCommandOutput} + * @see {@link GetRecommendationsCommandInput} for command's `input` shape. + * @see {@link GetRecommendationsCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class GetRecommendationsCommand extends $Command< + GetRecommendationsCommandInput, + GetRecommendationsCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetRecommendationsCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetRecommendationsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "GetRecommendationsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: GetRecommendationsResponseFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "GetRecommendations", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetRecommendationsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetRecommendationsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetRecommendationsCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/GetSessionCommand.ts b/clients/client-qconnect/src/commands/GetSessionCommand.ts new file mode 100644 index 0000000000000..19ceeb5d735c7 --- /dev/null +++ b/clients/client-qconnect/src/commands/GetSessionCommand.ts @@ -0,0 +1,158 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GetSessionRequest, GetSessionResponse } from "../models/models_0"; +import { de_GetSessionCommand, se_GetSessionCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetSessionCommand}. + */ +export interface GetSessionCommandInput extends GetSessionRequest {} +/** + * @public + * + * The output of {@link GetSessionCommand}. + */ +export interface GetSessionCommandOutput extends GetSessionResponse, __MetadataBearer {} + +/** + * @public + *

Retrieves information for a specified session.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, GetSessionCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, GetSessionCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // GetSessionRequest + * assistantId: "STRING_VALUE", // required + * sessionId: "STRING_VALUE", // required + * }; + * const command = new GetSessionCommand(input); + * const response = await client.send(command); + * // { // GetSessionResponse + * // session: { // SessionData + * // sessionArn: "STRING_VALUE", // required + * // sessionId: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // description: "STRING_VALUE", + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // integrationConfiguration: { // SessionIntegrationConfiguration + * // topicIntegrationArn: "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param GetSessionCommandInput - {@link GetSessionCommandInput} + * @returns {@link GetSessionCommandOutput} + * @see {@link GetSessionCommandInput} for command's `input` shape. + * @see {@link GetSessionCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class GetSessionCommand extends $Command< + GetSessionCommandInput, + GetSessionCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetSessionCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, GetSessionCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "GetSessionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "GetSession", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetSessionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetSessionCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetSessionCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/ListAssistantAssociationsCommand.ts b/clients/client-qconnect/src/commands/ListAssistantAssociationsCommand.ts new file mode 100644 index 0000000000000..9e22db6232882 --- /dev/null +++ b/clients/client-qconnect/src/commands/ListAssistantAssociationsCommand.ts @@ -0,0 +1,171 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ListAssistantAssociationsRequest, ListAssistantAssociationsResponse } from "../models/models_0"; +import { de_ListAssistantAssociationsCommand, se_ListAssistantAssociationsCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListAssistantAssociationsCommand}. + */ +export interface ListAssistantAssociationsCommandInput extends ListAssistantAssociationsRequest {} +/** + * @public + * + * The output of {@link ListAssistantAssociationsCommand}. + */ +export interface ListAssistantAssociationsCommandOutput extends ListAssistantAssociationsResponse, __MetadataBearer {} + +/** + * @public + *

Lists information about assistant associations.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, ListAssistantAssociationsCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, ListAssistantAssociationsCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // ListAssistantAssociationsRequest + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * assistantId: "STRING_VALUE", // required + * }; + * const command = new ListAssistantAssociationsCommand(input); + * const response = await client.send(command); + * // { // ListAssistantAssociationsResponse + * // assistantAssociationSummaries: [ // AssistantAssociationSummaryList // required + * // { // AssistantAssociationSummary + * // assistantAssociationId: "STRING_VALUE", // required + * // assistantAssociationArn: "STRING_VALUE", // required + * // assistantId: "STRING_VALUE", // required + * // assistantArn: "STRING_VALUE", // required + * // associationType: "STRING_VALUE", // required + * // associationData: { // AssistantAssociationOutputData Union: only one key present + * // knowledgeBaseAssociation: { // KnowledgeBaseAssociationData + * // knowledgeBaseId: "STRING_VALUE", + * // knowledgeBaseArn: "STRING_VALUE", + * // }, + * // }, + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListAssistantAssociationsCommandInput - {@link ListAssistantAssociationsCommandInput} + * @returns {@link ListAssistantAssociationsCommandOutput} + * @see {@link ListAssistantAssociationsCommandInput} for command's `input` shape. + * @see {@link ListAssistantAssociationsCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class ListAssistantAssociationsCommand extends $Command< + ListAssistantAssociationsCommandInput, + ListAssistantAssociationsCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListAssistantAssociationsCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListAssistantAssociationsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "ListAssistantAssociationsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "ListAssistantAssociations", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListAssistantAssociationsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListAssistantAssociationsCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_ListAssistantAssociationsCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/ListAssistantsCommand.ts b/clients/client-qconnect/src/commands/ListAssistantsCommand.ts new file mode 100644 index 0000000000000..6fecfa8d9c865 --- /dev/null +++ b/clients/client-qconnect/src/commands/ListAssistantsCommand.ts @@ -0,0 +1,168 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ListAssistantsRequest, ListAssistantsResponse } from "../models/models_0"; +import { de_ListAssistantsCommand, se_ListAssistantsCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListAssistantsCommand}. + */ +export interface ListAssistantsCommandInput extends ListAssistantsRequest {} +/** + * @public + * + * The output of {@link ListAssistantsCommand}. + */ +export interface ListAssistantsCommandOutput extends ListAssistantsResponse, __MetadataBearer {} + +/** + * @public + *

Lists information about assistants.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, ListAssistantsCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, ListAssistantsCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // ListAssistantsRequest + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListAssistantsCommand(input); + * const response = await client.send(command); + * // { // ListAssistantsResponse + * // assistantSummaries: [ // AssistantList // required + * // { // AssistantSummary + * // assistantId: "STRING_VALUE", // required + * // assistantArn: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // type: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // description: "STRING_VALUE", + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // serverSideEncryptionConfiguration: { // ServerSideEncryptionConfiguration + * // kmsKeyId: "STRING_VALUE", + * // }, + * // integrationConfiguration: { // AssistantIntegrationConfiguration + * // topicIntegrationArn: "STRING_VALUE", + * // }, + * // capabilityConfiguration: { // AssistantCapabilityConfiguration + * // type: "STRING_VALUE", + * // }, + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListAssistantsCommandInput - {@link ListAssistantsCommandInput} + * @returns {@link ListAssistantsCommandOutput} + * @see {@link ListAssistantsCommandInput} for command's `input` shape. + * @see {@link ListAssistantsCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class ListAssistantsCommand extends $Command< + ListAssistantsCommandInput, + ListAssistantsCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListAssistantsCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListAssistantsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "ListAssistantsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "ListAssistants", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListAssistantsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListAssistantsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListAssistantsCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/ListContentsCommand.ts b/clients/client-qconnect/src/commands/ListContentsCommand.ts new file mode 100644 index 0000000000000..23a95dfd964d7 --- /dev/null +++ b/clients/client-qconnect/src/commands/ListContentsCommand.ts @@ -0,0 +1,167 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ListContentsRequest, ListContentsResponse } from "../models/models_0"; +import { de_ListContentsCommand, se_ListContentsCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListContentsCommand}. + */ +export interface ListContentsCommandInput extends ListContentsRequest {} +/** + * @public + * + * The output of {@link ListContentsCommand}. + */ +export interface ListContentsCommandOutput extends ListContentsResponse, __MetadataBearer {} + +/** + * @public + *

Lists the content.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, ListContentsCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, ListContentsCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // ListContentsRequest + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * knowledgeBaseId: "STRING_VALUE", // required + * }; + * const command = new ListContentsCommand(input); + * const response = await client.send(command); + * // { // ListContentsResponse + * // contentSummaries: [ // ContentSummaryList // required + * // { // ContentSummary + * // contentArn: "STRING_VALUE", // required + * // contentId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // knowledgeBaseId: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // revisionId: "STRING_VALUE", // required + * // title: "STRING_VALUE", // required + * // contentType: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // metadata: { // ContentMetadata // required + * // "": "STRING_VALUE", + * // }, + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListContentsCommandInput - {@link ListContentsCommandInput} + * @returns {@link ListContentsCommandOutput} + * @see {@link ListContentsCommandInput} for command's `input` shape. + * @see {@link ListContentsCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class ListContentsCommand extends $Command< + ListContentsCommandInput, + ListContentsCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListContentsCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, ListContentsCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "ListContentsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "ListContents", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListContentsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListContentsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListContentsCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/ListImportJobsCommand.ts b/clients/client-qconnect/src/commands/ListImportJobsCommand.ts new file mode 100644 index 0000000000000..ab2e797762d92 --- /dev/null +++ b/clients/client-qconnect/src/commands/ListImportJobsCommand.ts @@ -0,0 +1,170 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ListImportJobsRequest, ListImportJobsResponse } from "../models/models_0"; +import { de_ListImportJobsCommand, se_ListImportJobsCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListImportJobsCommand}. + */ +export interface ListImportJobsCommandInput extends ListImportJobsRequest {} +/** + * @public + * + * The output of {@link ListImportJobsCommand}. + */ +export interface ListImportJobsCommandOutput extends ListImportJobsResponse, __MetadataBearer {} + +/** + * @public + *

Lists information about import jobs.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, ListImportJobsCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, ListImportJobsCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // ListImportJobsRequest + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * knowledgeBaseId: "STRING_VALUE", // required + * }; + * const command = new ListImportJobsCommand(input); + * const response = await client.send(command); + * // { // ListImportJobsResponse + * // importJobSummaries: [ // ImportJobList // required + * // { // ImportJobSummary + * // importJobId: "STRING_VALUE", // required + * // knowledgeBaseId: "STRING_VALUE", // required + * // uploadId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // importJobType: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // createdTime: new Date("TIMESTAMP"), // required + * // lastModifiedTime: new Date("TIMESTAMP"), // required + * // metadata: { // ContentMetadata + * // "": "STRING_VALUE", + * // }, + * // externalSourceConfiguration: { // ExternalSourceConfiguration + * // source: "STRING_VALUE", // required + * // configuration: { // Configuration Union: only one key present + * // connectConfiguration: { // ConnectConfiguration + * // instanceId: "STRING_VALUE", + * // }, + * // }, + * // }, + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListImportJobsCommandInput - {@link ListImportJobsCommandInput} + * @returns {@link ListImportJobsCommandOutput} + * @see {@link ListImportJobsCommandInput} for command's `input` shape. + * @see {@link ListImportJobsCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class ListImportJobsCommand extends $Command< + ListImportJobsCommandInput, + ListImportJobsCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListImportJobsCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListImportJobsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "ListImportJobsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "ListImportJobs", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListImportJobsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListImportJobsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListImportJobsCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/ListKnowledgeBasesCommand.ts b/clients/client-qconnect/src/commands/ListKnowledgeBasesCommand.ts new file mode 100644 index 0000000000000..dbdbe50362082 --- /dev/null +++ b/clients/client-qconnect/src/commands/ListKnowledgeBasesCommand.ts @@ -0,0 +1,173 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ListKnowledgeBasesRequest, ListKnowledgeBasesResponse } from "../models/models_0"; +import { de_ListKnowledgeBasesCommand, se_ListKnowledgeBasesCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListKnowledgeBasesCommand}. + */ +export interface ListKnowledgeBasesCommandInput extends ListKnowledgeBasesRequest {} +/** + * @public + * + * The output of {@link ListKnowledgeBasesCommand}. + */ +export interface ListKnowledgeBasesCommandOutput extends ListKnowledgeBasesResponse, __MetadataBearer {} + +/** + * @public + *

Lists the knowledge bases.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, ListKnowledgeBasesCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, ListKnowledgeBasesCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // ListKnowledgeBasesRequest + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListKnowledgeBasesCommand(input); + * const response = await client.send(command); + * // { // ListKnowledgeBasesResponse + * // knowledgeBaseSummaries: [ // KnowledgeBaseList // required + * // { // KnowledgeBaseSummary + * // knowledgeBaseId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // knowledgeBaseType: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // sourceConfiguration: { // SourceConfiguration Union: only one key present + * // appIntegrations: { // AppIntegrationsConfiguration + * // appIntegrationArn: "STRING_VALUE", // required + * // objectFields: [ // ObjectFieldsList + * // "STRING_VALUE", + * // ], + * // }, + * // }, + * // renderingConfiguration: { // RenderingConfiguration + * // templateUri: "STRING_VALUE", + * // }, + * // serverSideEncryptionConfiguration: { // ServerSideEncryptionConfiguration + * // kmsKeyId: "STRING_VALUE", + * // }, + * // description: "STRING_VALUE", + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListKnowledgeBasesCommandInput - {@link ListKnowledgeBasesCommandInput} + * @returns {@link ListKnowledgeBasesCommandOutput} + * @see {@link ListKnowledgeBasesCommandInput} for command's `input` shape. + * @see {@link ListKnowledgeBasesCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class ListKnowledgeBasesCommand extends $Command< + ListKnowledgeBasesCommandInput, + ListKnowledgeBasesCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListKnowledgeBasesCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListKnowledgeBasesCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "ListKnowledgeBasesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "ListKnowledgeBases", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListKnowledgeBasesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListKnowledgeBasesCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListKnowledgeBasesCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/ListQuickResponsesCommand.ts b/clients/client-qconnect/src/commands/ListQuickResponsesCommand.ts new file mode 100644 index 0000000000000..6359c5a36ecad --- /dev/null +++ b/clients/client-qconnect/src/commands/ListQuickResponsesCommand.ts @@ -0,0 +1,176 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + ListQuickResponsesRequest, + ListQuickResponsesResponse, + ListQuickResponsesResponseFilterSensitiveLog, +} from "../models/models_0"; +import { de_ListQuickResponsesCommand, se_ListQuickResponsesCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListQuickResponsesCommand}. + */ +export interface ListQuickResponsesCommandInput extends ListQuickResponsesRequest {} +/** + * @public + * + * The output of {@link ListQuickResponsesCommand}. + */ +export interface ListQuickResponsesCommandOutput extends ListQuickResponsesResponse, __MetadataBearer {} + +/** + * @public + *

Lists information about quick response.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, ListQuickResponsesCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, ListQuickResponsesCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // ListQuickResponsesRequest + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * knowledgeBaseId: "STRING_VALUE", // required + * }; + * const command = new ListQuickResponsesCommand(input); + * const response = await client.send(command); + * // { // ListQuickResponsesResponse + * // quickResponseSummaries: [ // QuickResponseSummaryList // required + * // { // QuickResponseSummary + * // quickResponseArn: "STRING_VALUE", // required + * // quickResponseId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // knowledgeBaseId: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // contentType: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // createdTime: new Date("TIMESTAMP"), // required + * // lastModifiedTime: new Date("TIMESTAMP"), // required + * // description: "STRING_VALUE", + * // lastModifiedBy: "STRING_VALUE", + * // isActive: true || false, + * // channels: [ // Channels + * // "STRING_VALUE", + * // ], + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListQuickResponsesCommandInput - {@link ListQuickResponsesCommandInput} + * @returns {@link ListQuickResponsesCommandOutput} + * @see {@link ListQuickResponsesCommandInput} for command's `input` shape. + * @see {@link ListQuickResponsesCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class ListQuickResponsesCommand extends $Command< + ListQuickResponsesCommandInput, + ListQuickResponsesCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListQuickResponsesCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListQuickResponsesCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "ListQuickResponsesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: ListQuickResponsesResponseFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "ListQuickResponses", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListQuickResponsesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListQuickResponsesCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListQuickResponsesCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/ListTagsForResourceCommand.ts b/clients/client-qconnect/src/commands/ListTagsForResourceCommand.ts new file mode 100644 index 0000000000000..3a24af72d6a4d --- /dev/null +++ b/clients/client-qconnect/src/commands/ListTagsForResourceCommand.ts @@ -0,0 +1,144 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ListTagsForResourceRequest, ListTagsForResourceResponse } from "../models/models_0"; +import { de_ListTagsForResourceCommand, se_ListTagsForResourceCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandInput extends ListTagsForResourceRequest {} +/** + * @public + * + * The output of {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandOutput extends ListTagsForResourceResponse, __MetadataBearer {} + +/** + * @public + *

Lists the tags for the specified resource.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, ListTagsForResourceCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, ListTagsForResourceCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // ListTagsForResourceRequest + * resourceArn: "STRING_VALUE", // required + * }; + * const command = new ListTagsForResourceCommand(input); + * const response = await client.send(command); + * // { // ListTagsForResourceResponse + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param ListTagsForResourceCommandInput - {@link ListTagsForResourceCommandInput} + * @returns {@link ListTagsForResourceCommandOutput} + * @see {@link ListTagsForResourceCommandInput} for command's `input` shape. + * @see {@link ListTagsForResourceCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class ListTagsForResourceCommand extends $Command< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListTagsForResourceCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListTagsForResourceCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "ListTagsForResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "ListTagsForResource", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListTagsForResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListTagsForResourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListTagsForResourceCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/NotifyRecommendationsReceivedCommand.ts b/clients/client-qconnect/src/commands/NotifyRecommendationsReceivedCommand.ts new file mode 100644 index 0000000000000..f9181e1cce6f1 --- /dev/null +++ b/clients/client-qconnect/src/commands/NotifyRecommendationsReceivedCommand.ts @@ -0,0 +1,170 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { NotifyRecommendationsReceivedRequest, NotifyRecommendationsReceivedResponse } from "../models/models_0"; +import { + de_NotifyRecommendationsReceivedCommand, + se_NotifyRecommendationsReceivedCommand, +} from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link NotifyRecommendationsReceivedCommand}. + */ +export interface NotifyRecommendationsReceivedCommandInput extends NotifyRecommendationsReceivedRequest {} +/** + * @public + * + * The output of {@link NotifyRecommendationsReceivedCommand}. + */ +export interface NotifyRecommendationsReceivedCommandOutput + extends NotifyRecommendationsReceivedResponse, + __MetadataBearer {} + +/** + * @public + *

Removes the specified recommendations from the specified assistant's queue of newly + * available recommendations. You can use this API in conjunction with GetRecommendations and a waitTimeSeconds input for long-polling + * behavior and avoiding duplicate recommendations.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, NotifyRecommendationsReceivedCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, NotifyRecommendationsReceivedCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // NotifyRecommendationsReceivedRequest + * assistantId: "STRING_VALUE", // required + * sessionId: "STRING_VALUE", // required + * recommendationIds: [ // RecommendationIdList // required + * "STRING_VALUE", + * ], + * }; + * const command = new NotifyRecommendationsReceivedCommand(input); + * const response = await client.send(command); + * // { // NotifyRecommendationsReceivedResponse + * // recommendationIds: [ // RecommendationIdList + * // "STRING_VALUE", + * // ], + * // errors: [ // NotifyRecommendationsReceivedErrorList + * // { // NotifyRecommendationsReceivedError + * // recommendationId: "STRING_VALUE", + * // message: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param NotifyRecommendationsReceivedCommandInput - {@link NotifyRecommendationsReceivedCommandInput} + * @returns {@link NotifyRecommendationsReceivedCommandOutput} + * @see {@link NotifyRecommendationsReceivedCommandInput} for command's `input` shape. + * @see {@link NotifyRecommendationsReceivedCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class NotifyRecommendationsReceivedCommand extends $Command< + NotifyRecommendationsReceivedCommandInput, + NotifyRecommendationsReceivedCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: NotifyRecommendationsReceivedCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, NotifyRecommendationsReceivedCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "NotifyRecommendationsReceivedCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "NotifyRecommendationsReceived", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: NotifyRecommendationsReceivedCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_NotifyRecommendationsReceivedCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_NotifyRecommendationsReceivedCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/QueryAssistantCommand.ts b/clients/client-qconnect/src/commands/QueryAssistantCommand.ts new file mode 100644 index 0000000000000..eb510bca860b4 --- /dev/null +++ b/clients/client-qconnect/src/commands/QueryAssistantCommand.ts @@ -0,0 +1,309 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + QueryAssistantRequest, + QueryAssistantRequestFilterSensitiveLog, + QueryAssistantResponse, + QueryAssistantResponseFilterSensitiveLog, +} from "../models/models_0"; +import { de_QueryAssistantCommand, se_QueryAssistantCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link QueryAssistantCommand}. + */ +export interface QueryAssistantCommandInput extends QueryAssistantRequest {} +/** + * @public + * + * The output of {@link QueryAssistantCommand}. + */ +export interface QueryAssistantCommandOutput extends QueryAssistantResponse, __MetadataBearer {} + +/** + * @public + *

Performs a manual search against the specified assistant. To retrieve recommendations for + * an assistant, use GetRecommendations. + *

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, QueryAssistantCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, QueryAssistantCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // QueryAssistantRequest + * assistantId: "STRING_VALUE", // required + * queryText: "STRING_VALUE", // required + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * sessionId: "STRING_VALUE", + * queryCondition: [ // QueryConditionExpression + * { // QueryCondition Union: only one key present + * single: { // QueryConditionItem + * field: "STRING_VALUE", // required + * comparator: "STRING_VALUE", // required + * value: "STRING_VALUE", // required + * }, + * }, + * ], + * }; + * const command = new QueryAssistantCommand(input); + * const response = await client.send(command); + * // { // QueryAssistantResponse + * // results: [ // QueryResultsList // required + * // { // ResultData + * // resultId: "STRING_VALUE", // required + * // document: { // Document + * // contentReference: { // ContentReference + * // knowledgeBaseArn: "STRING_VALUE", + * // knowledgeBaseId: "STRING_VALUE", + * // contentArn: "STRING_VALUE", + * // contentId: "STRING_VALUE", + * // }, + * // title: { // DocumentText + * // text: "STRING_VALUE", + * // highlights: [ // Highlights + * // { // Highlight + * // beginOffsetInclusive: Number("int"), + * // endOffsetExclusive: Number("int"), + * // }, + * // ], + * // }, + * // excerpt: { + * // text: "STRING_VALUE", + * // highlights: [ + * // { + * // beginOffsetInclusive: Number("int"), + * // endOffsetExclusive: Number("int"), + * // }, + * // ], + * // }, + * // }, + * // relevanceScore: Number("double"), + * // data: { // DataSummary + * // reference: { // DataReference Union: only one key present + * // contentReference: { + * // knowledgeBaseArn: "STRING_VALUE", + * // knowledgeBaseId: "STRING_VALUE", + * // contentArn: "STRING_VALUE", + * // contentId: "STRING_VALUE", + * // }, + * // generativeReference: { // GenerativeReference + * // modelId: "STRING_VALUE", + * // generationId: "STRING_VALUE", + * // }, + * // }, + * // details: { // DataDetails Union: only one key present + * // contentData: { // ContentDataDetails + * // textData: { // TextData + * // title: { + * // text: "STRING_VALUE", + * // highlights: [ + * // { + * // beginOffsetInclusive: Number("int"), + * // endOffsetExclusive: Number("int"), + * // }, + * // ], + * // }, + * // excerpt: { + * // text: "STRING_VALUE", + * // highlights: [ + * // { + * // beginOffsetInclusive: Number("int"), + * // endOffsetExclusive: Number("int"), + * // }, + * // ], + * // }, + * // }, + * // rankingData: { // RankingData + * // relevanceScore: Number("double"), + * // relevanceLevel: "STRING_VALUE", + * // }, + * // }, + * // generativeData: { // GenerativeDataDetails + * // completion: "STRING_VALUE", // required + * // references: [ // DataSummaryList // required + * // { + * // reference: {// Union: only one key present + * // contentReference: "", + * // generativeReference: { + * // modelId: "STRING_VALUE", + * // generationId: "STRING_VALUE", + * // }, + * // }, + * // details: {// Union: only one key present + * // contentData: { + * // textData: { + * // title: "", + * // excerpt: "", + * // }, + * // rankingData: { + * // relevanceScore: Number("double"), + * // relevanceLevel: "STRING_VALUE", + * // }, + * // }, + * // generativeData: { + * // completion: "STRING_VALUE", // required + * // references: [ // required + * // "", + * // ], + * // rankingData: { + * // relevanceScore: Number("double"), + * // relevanceLevel: "STRING_VALUE", + * // }, + * // }, + * // sourceContentData: { // SourceContentDataDetails + * // id: "STRING_VALUE", // required + * // type: "STRING_VALUE", // required + * // textData: { + * // title: "", + * // excerpt: "", + * // }, + * // rankingData: { + * // relevanceScore: Number("double"), + * // relevanceLevel: "STRING_VALUE", + * // }, + * // }, + * // }, + * // }, + * // ], + * // rankingData: { + * // relevanceScore: Number("double"), + * // relevanceLevel: "STRING_VALUE", + * // }, + * // }, + * // sourceContentData: { + * // id: "STRING_VALUE", // required + * // type: "STRING_VALUE", // required + * // textData: { + * // title: "", + * // excerpt: "", + * // }, + * // rankingData: "", // required + * // }, + * // }, + * // }, + * // type: "STRING_VALUE", + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param QueryAssistantCommandInput - {@link QueryAssistantCommandInput} + * @returns {@link QueryAssistantCommandOutput} + * @see {@link QueryAssistantCommandInput} for command's `input` shape. + * @see {@link QueryAssistantCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link RequestTimeoutException} (client fault) + *

The request reached the service more than 15 minutes after the date stamp on the request + * or more than 15 minutes after the request expiration date (such as for pre-signed URLs), or + * the date stamp on the request is more than 15 minutes in the future.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class QueryAssistantCommand extends $Command< + QueryAssistantCommandInput, + QueryAssistantCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: QueryAssistantCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, QueryAssistantCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "QueryAssistantCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: QueryAssistantRequestFilterSensitiveLog, + outputFilterSensitiveLog: QueryAssistantResponseFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "QueryAssistant", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: QueryAssistantCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_QueryAssistantCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_QueryAssistantCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/RemoveKnowledgeBaseTemplateUriCommand.ts b/clients/client-qconnect/src/commands/RemoveKnowledgeBaseTemplateUriCommand.ts new file mode 100644 index 0000000000000..22bc5e1e82541 --- /dev/null +++ b/clients/client-qconnect/src/commands/RemoveKnowledgeBaseTemplateUriCommand.ts @@ -0,0 +1,157 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { RemoveKnowledgeBaseTemplateUriRequest, RemoveKnowledgeBaseTemplateUriResponse } from "../models/models_0"; +import { + de_RemoveKnowledgeBaseTemplateUriCommand, + se_RemoveKnowledgeBaseTemplateUriCommand, +} from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link RemoveKnowledgeBaseTemplateUriCommand}. + */ +export interface RemoveKnowledgeBaseTemplateUriCommandInput extends RemoveKnowledgeBaseTemplateUriRequest {} +/** + * @public + * + * The output of {@link RemoveKnowledgeBaseTemplateUriCommand}. + */ +export interface RemoveKnowledgeBaseTemplateUriCommandOutput + extends RemoveKnowledgeBaseTemplateUriResponse, + __MetadataBearer {} + +/** + * @public + *

Removes a URI template from a knowledge base.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, RemoveKnowledgeBaseTemplateUriCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, RemoveKnowledgeBaseTemplateUriCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // RemoveKnowledgeBaseTemplateUriRequest + * knowledgeBaseId: "STRING_VALUE", // required + * }; + * const command = new RemoveKnowledgeBaseTemplateUriCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param RemoveKnowledgeBaseTemplateUriCommandInput - {@link RemoveKnowledgeBaseTemplateUriCommandInput} + * @returns {@link RemoveKnowledgeBaseTemplateUriCommandOutput} + * @see {@link RemoveKnowledgeBaseTemplateUriCommandInput} for command's `input` shape. + * @see {@link RemoveKnowledgeBaseTemplateUriCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class RemoveKnowledgeBaseTemplateUriCommand extends $Command< + RemoveKnowledgeBaseTemplateUriCommandInput, + RemoveKnowledgeBaseTemplateUriCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: RemoveKnowledgeBaseTemplateUriCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, RemoveKnowledgeBaseTemplateUriCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "RemoveKnowledgeBaseTemplateUriCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "RemoveKnowledgeBaseTemplateUri", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize( + input: RemoveKnowledgeBaseTemplateUriCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return se_RemoveKnowledgeBaseTemplateUriCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_RemoveKnowledgeBaseTemplateUriCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/SearchContentCommand.ts b/clients/client-qconnect/src/commands/SearchContentCommand.ts new file mode 100644 index 0000000000000..867a28078760f --- /dev/null +++ b/clients/client-qconnect/src/commands/SearchContentCommand.ts @@ -0,0 +1,177 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { SearchContentRequest, SearchContentResponse } from "../models/models_0"; +import { de_SearchContentCommand, se_SearchContentCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link SearchContentCommand}. + */ +export interface SearchContentCommandInput extends SearchContentRequest {} +/** + * @public + * + * The output of {@link SearchContentCommand}. + */ +export interface SearchContentCommandOutput extends SearchContentResponse, __MetadataBearer {} + +/** + * @public + *

Searches for content in a specified knowledge base. Can be used to get a specific content + * resource by its name.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, SearchContentCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, SearchContentCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // SearchContentRequest + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * knowledgeBaseId: "STRING_VALUE", // required + * searchExpression: { // SearchExpression + * filters: [ // FilterList // required + * { // Filter + * field: "STRING_VALUE", // required + * operator: "STRING_VALUE", // required + * value: "STRING_VALUE", // required + * }, + * ], + * }, + * }; + * const command = new SearchContentCommand(input); + * const response = await client.send(command); + * // { // SearchContentResponse + * // contentSummaries: [ // ContentSummaryList // required + * // { // ContentSummary + * // contentArn: "STRING_VALUE", // required + * // contentId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // knowledgeBaseId: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // revisionId: "STRING_VALUE", // required + * // title: "STRING_VALUE", // required + * // contentType: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // metadata: { // ContentMetadata // required + * // "": "STRING_VALUE", + * // }, + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param SearchContentCommandInput - {@link SearchContentCommandInput} + * @returns {@link SearchContentCommandOutput} + * @see {@link SearchContentCommandInput} for command's `input` shape. + * @see {@link SearchContentCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class SearchContentCommand extends $Command< + SearchContentCommandInput, + SearchContentCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: SearchContentCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, SearchContentCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "SearchContentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "SearchContent", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: SearchContentCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_SearchContentCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_SearchContentCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/SearchQuickResponsesCommand.ts b/clients/client-qconnect/src/commands/SearchQuickResponsesCommand.ts new file mode 100644 index 0000000000000..6486530c8d0c8 --- /dev/null +++ b/clients/client-qconnect/src/commands/SearchQuickResponsesCommand.ts @@ -0,0 +1,234 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + SearchQuickResponsesRequest, + SearchQuickResponsesRequestFilterSensitiveLog, + SearchQuickResponsesResponse, + SearchQuickResponsesResponseFilterSensitiveLog, +} from "../models/models_0"; +import { de_SearchQuickResponsesCommand, se_SearchQuickResponsesCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link SearchQuickResponsesCommand}. + */ +export interface SearchQuickResponsesCommandInput extends SearchQuickResponsesRequest {} +/** + * @public + * + * The output of {@link SearchQuickResponsesCommand}. + */ +export interface SearchQuickResponsesCommandOutput extends SearchQuickResponsesResponse, __MetadataBearer {} + +/** + * @public + *

Searches existing Amazon Q quick responses in a Amazon Q knowledge base.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, SearchQuickResponsesCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, SearchQuickResponsesCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // SearchQuickResponsesRequest + * knowledgeBaseId: "STRING_VALUE", // required + * searchExpression: { // QuickResponseSearchExpression + * queries: [ // QuickResponseQueryFieldList + * { // QuickResponseQueryField + * name: "STRING_VALUE", // required + * values: [ // QuickResponseQueryValueList // required + * "STRING_VALUE", + * ], + * operator: "STRING_VALUE", // required + * allowFuzziness: true || false, + * priority: "STRING_VALUE", + * }, + * ], + * filters: [ // QuickResponseFilterFieldList + * { // QuickResponseFilterField + * name: "STRING_VALUE", // required + * values: [ // QuickResponseFilterValueList + * "STRING_VALUE", + * ], + * operator: "STRING_VALUE", // required + * includeNoExistence: true || false, + * }, + * ], + * orderOnField: { // QuickResponseOrderField + * name: "STRING_VALUE", // required + * order: "STRING_VALUE", + * }, + * }, + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * attributes: { // ContactAttributes + * "": "STRING_VALUE", + * }, + * }; + * const command = new SearchQuickResponsesCommand(input); + * const response = await client.send(command); + * // { // SearchQuickResponsesResponse + * // results: [ // QuickResponseSearchResultsList // required + * // { // QuickResponseSearchResultData + * // quickResponseArn: "STRING_VALUE", // required + * // quickResponseId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // knowledgeBaseId: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // contentType: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // contents: { // QuickResponseContents + * // plainText: { // QuickResponseContentProvider Union: only one key present + * // content: "STRING_VALUE", + * // }, + * // markdown: {// Union: only one key present + * // content: "STRING_VALUE", + * // }, + * // }, + * // createdTime: new Date("TIMESTAMP"), // required + * // lastModifiedTime: new Date("TIMESTAMP"), // required + * // isActive: true || false, // required + * // description: "STRING_VALUE", + * // groupingConfiguration: { // GroupingConfiguration + * // criteria: "STRING_VALUE", + * // values: [ // GroupingValues + * // "STRING_VALUE", + * // ], + * // }, + * // shortcutKey: "STRING_VALUE", + * // lastModifiedBy: "STRING_VALUE", + * // channels: [ // Channels + * // "STRING_VALUE", + * // ], + * // language: "STRING_VALUE", + * // attributesNotInterpolated: [ // ContactAttributeKeys + * // "STRING_VALUE", + * // ], + * // attributesInterpolated: [ + * // "STRING_VALUE", + * // ], + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param SearchQuickResponsesCommandInput - {@link SearchQuickResponsesCommandInput} + * @returns {@link SearchQuickResponsesCommandOutput} + * @see {@link SearchQuickResponsesCommandInput} for command's `input` shape. + * @see {@link SearchQuickResponsesCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link RequestTimeoutException} (client fault) + *

The request reached the service more than 15 minutes after the date stamp on the request + * or more than 15 minutes after the request expiration date (such as for pre-signed URLs), or + * the date stamp on the request is more than 15 minutes in the future.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class SearchQuickResponsesCommand extends $Command< + SearchQuickResponsesCommandInput, + SearchQuickResponsesCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: SearchQuickResponsesCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, SearchQuickResponsesCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "SearchQuickResponsesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: SearchQuickResponsesRequestFilterSensitiveLog, + outputFilterSensitiveLog: SearchQuickResponsesResponseFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "SearchQuickResponses", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: SearchQuickResponsesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_SearchQuickResponsesCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_SearchQuickResponsesCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/SearchSessionsCommand.ts b/clients/client-qconnect/src/commands/SearchSessionsCommand.ts new file mode 100644 index 0000000000000..e44ab54ab854f --- /dev/null +++ b/clients/client-qconnect/src/commands/SearchSessionsCommand.ts @@ -0,0 +1,167 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { SearchSessionsRequest, SearchSessionsResponse } from "../models/models_0"; +import { de_SearchSessionsCommand, se_SearchSessionsCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link SearchSessionsCommand}. + */ +export interface SearchSessionsCommandInput extends SearchSessionsRequest {} +/** + * @public + * + * The output of {@link SearchSessionsCommand}. + */ +export interface SearchSessionsCommandOutput extends SearchSessionsResponse, __MetadataBearer {} + +/** + * @public + *

Searches for sessions.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, SearchSessionsCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, SearchSessionsCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // SearchSessionsRequest + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * assistantId: "STRING_VALUE", // required + * searchExpression: { // SearchExpression + * filters: [ // FilterList // required + * { // Filter + * field: "STRING_VALUE", // required + * operator: "STRING_VALUE", // required + * value: "STRING_VALUE", // required + * }, + * ], + * }, + * }; + * const command = new SearchSessionsCommand(input); + * const response = await client.send(command); + * // { // SearchSessionsResponse + * // sessionSummaries: [ // SessionSummaries // required + * // { // SessionSummary + * // sessionId: "STRING_VALUE", // required + * // sessionArn: "STRING_VALUE", // required + * // assistantId: "STRING_VALUE", // required + * // assistantArn: "STRING_VALUE", // required + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param SearchSessionsCommandInput - {@link SearchSessionsCommandInput} + * @returns {@link SearchSessionsCommandOutput} + * @see {@link SearchSessionsCommandInput} for command's `input` shape. + * @see {@link SearchSessionsCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class SearchSessionsCommand extends $Command< + SearchSessionsCommandInput, + SearchSessionsCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: SearchSessionsCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, SearchSessionsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "SearchSessionsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "SearchSessions", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: SearchSessionsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_SearchSessionsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_SearchSessionsCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/StartContentUploadCommand.ts b/clients/client-qconnect/src/commands/StartContentUploadCommand.ts new file mode 100644 index 0000000000000..37580c4ea6541 --- /dev/null +++ b/clients/client-qconnect/src/commands/StartContentUploadCommand.ts @@ -0,0 +1,162 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + StartContentUploadRequest, + StartContentUploadResponse, + StartContentUploadResponseFilterSensitiveLog, +} from "../models/models_0"; +import { de_StartContentUploadCommand, se_StartContentUploadCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link StartContentUploadCommand}. + */ +export interface StartContentUploadCommandInput extends StartContentUploadRequest {} +/** + * @public + * + * The output of {@link StartContentUploadCommand}. + */ +export interface StartContentUploadCommandOutput extends StartContentUploadResponse, __MetadataBearer {} + +/** + * @public + *

Get a URL to upload content to a knowledge base. To upload content, first make a PUT + * request to the returned URL with your file, making sure to include the required headers. Then + * use CreateContent to finalize the content creation process or UpdateContent to modify an existing resource. You can only upload content to a + * knowledge base of type CUSTOM.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, StartContentUploadCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, StartContentUploadCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // StartContentUploadRequest + * knowledgeBaseId: "STRING_VALUE", // required + * contentType: "STRING_VALUE", // required + * presignedUrlTimeToLive: Number("int"), + * }; + * const command = new StartContentUploadCommand(input); + * const response = await client.send(command); + * // { // StartContentUploadResponse + * // uploadId: "STRING_VALUE", // required + * // url: "STRING_VALUE", // required + * // urlExpiry: new Date("TIMESTAMP"), // required + * // headersToInclude: { // Headers // required + * // "": "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param StartContentUploadCommandInput - {@link StartContentUploadCommandInput} + * @returns {@link StartContentUploadCommandOutput} + * @see {@link StartContentUploadCommandInput} for command's `input` shape. + * @see {@link StartContentUploadCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class StartContentUploadCommand extends $Command< + StartContentUploadCommandInput, + StartContentUploadCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: StartContentUploadCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, StartContentUploadCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "StartContentUploadCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: StartContentUploadResponseFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "StartContentUpload", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: StartContentUploadCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_StartContentUploadCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_StartContentUploadCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/StartImportJobCommand.ts b/clients/client-qconnect/src/commands/StartImportJobCommand.ts new file mode 100644 index 0000000000000..ac15247e3bbf6 --- /dev/null +++ b/clients/client-qconnect/src/commands/StartImportJobCommand.ts @@ -0,0 +1,205 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + StartImportJobRequest, + StartImportJobResponse, + StartImportJobResponseFilterSensitiveLog, +} from "../models/models_0"; +import { de_StartImportJobCommand, se_StartImportJobCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link StartImportJobCommand}. + */ +export interface StartImportJobCommandInput extends StartImportJobRequest {} +/** + * @public + * + * The output of {@link StartImportJobCommand}. + */ +export interface StartImportJobCommandOutput extends StartImportJobResponse, __MetadataBearer {} + +/** + * @public + *

Start an asynchronous job to import Amazon Q resources from an uploaded source file. Before calling this API, use StartContentUpload to + * upload an asset that contains the resource data.

+ *
    + *
  • + *

    For importing Amazon Q quick responses, you need to upload a csv file including the quick responses. For information about how to format the csv file for importing quick responses, see Import quick responses.

    + *
  • + *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, StartImportJobCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, StartImportJobCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // StartImportJobRequest + * knowledgeBaseId: "STRING_VALUE", // required + * importJobType: "STRING_VALUE", // required + * uploadId: "STRING_VALUE", // required + * clientToken: "STRING_VALUE", + * metadata: { // ContentMetadata + * "": "STRING_VALUE", + * }, + * externalSourceConfiguration: { // ExternalSourceConfiguration + * source: "STRING_VALUE", // required + * configuration: { // Configuration Union: only one key present + * connectConfiguration: { // ConnectConfiguration + * instanceId: "STRING_VALUE", + * }, + * }, + * }, + * }; + * const command = new StartImportJobCommand(input); + * const response = await client.send(command); + * // { // StartImportJobResponse + * // importJob: { // ImportJobData + * // importJobId: "STRING_VALUE", // required + * // knowledgeBaseId: "STRING_VALUE", // required + * // uploadId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // importJobType: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // url: "STRING_VALUE", // required + * // failedRecordReport: "STRING_VALUE", + * // urlExpiry: new Date("TIMESTAMP"), // required + * // createdTime: new Date("TIMESTAMP"), // required + * // lastModifiedTime: new Date("TIMESTAMP"), // required + * // metadata: { // ContentMetadata + * // "": "STRING_VALUE", + * // }, + * // externalSourceConfiguration: { // ExternalSourceConfiguration + * // source: "STRING_VALUE", // required + * // configuration: { // Configuration Union: only one key present + * // connectConfiguration: { // ConnectConfiguration + * // instanceId: "STRING_VALUE", + * // }, + * // }, + * // }, + * // }, + * // }; + * + * ``` + * + * @param StartImportJobCommandInput - {@link StartImportJobCommandInput} + * @returns {@link StartImportJobCommandOutput} + * @see {@link StartImportJobCommandInput} for command's `input` shape. + * @see {@link StartImportJobCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

The request could not be processed because of conflict in the current state of the + * resource. For example, if you're using a Create API (such as + * CreateAssistant) that accepts name, a conflicting resource (usually with the + * same name) is being created or mutated.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You've exceeded your service quota. To perform the requested action, remove some of the + * relevant resources, or use service quotas to request a service quota increase.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class StartImportJobCommand extends $Command< + StartImportJobCommandInput, + StartImportJobCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: StartImportJobCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, StartImportJobCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "StartImportJobCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: StartImportJobResponseFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "StartImportJob", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: StartImportJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_StartImportJobCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_StartImportJobCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/TagResourceCommand.ts b/clients/client-qconnect/src/commands/TagResourceCommand.ts new file mode 100644 index 0000000000000..729453a235ce2 --- /dev/null +++ b/clients/client-qconnect/src/commands/TagResourceCommand.ts @@ -0,0 +1,144 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { TagResourceRequest, TagResourceResponse } from "../models/models_0"; +import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link TagResourceCommand}. + */ +export interface TagResourceCommandInput extends TagResourceRequest {} +/** + * @public + * + * The output of {@link TagResourceCommand}. + */ +export interface TagResourceCommandOutput extends TagResourceResponse, __MetadataBearer {} + +/** + * @public + *

Adds the specified tags to the specified resource.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, TagResourceCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, TagResourceCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // TagResourceRequest + * resourceArn: "STRING_VALUE", // required + * tags: { // Tags // required + * "": "STRING_VALUE", + * }, + * }; + * const command = new TagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param TagResourceCommandInput - {@link TagResourceCommandInput} + * @returns {@link TagResourceCommandOutput} + * @see {@link TagResourceCommandInput} for command's `input` shape. + * @see {@link TagResourceCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link TooManyTagsException} (client fault) + *

Amazon Q in Connect throws this exception if you have too many tags in your tag set.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class TagResourceCommand extends $Command< + TagResourceCommandInput, + TagResourceCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: TagResourceCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, TagResourceCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "TagResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "TagResource", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: TagResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_TagResourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_TagResourceCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/UntagResourceCommand.ts b/clients/client-qconnect/src/commands/UntagResourceCommand.ts new file mode 100644 index 0000000000000..9e9ba2e7c6b48 --- /dev/null +++ b/clients/client-qconnect/src/commands/UntagResourceCommand.ts @@ -0,0 +1,141 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { UntagResourceRequest, UntagResourceResponse } from "../models/models_0"; +import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandInput extends UntagResourceRequest {} +/** + * @public + * + * The output of {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandOutput extends UntagResourceResponse, __MetadataBearer {} + +/** + * @public + *

Removes the specified tags from the specified resource.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, UntagResourceCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, UntagResourceCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // UntagResourceRequest + * resourceArn: "STRING_VALUE", // required + * tagKeys: [ // TagKeyList // required + * "STRING_VALUE", + * ], + * }; + * const command = new UntagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UntagResourceCommandInput - {@link UntagResourceCommandInput} + * @returns {@link UntagResourceCommandOutput} + * @see {@link UntagResourceCommandInput} for command's `input` shape. + * @see {@link UntagResourceCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class UntagResourceCommand extends $Command< + UntagResourceCommandInput, + UntagResourceCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UntagResourceCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, UntagResourceCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "UntagResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "UntagResource", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UntagResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UntagResourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_UntagResourceCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/UpdateContentCommand.ts b/clients/client-qconnect/src/commands/UpdateContentCommand.ts new file mode 100644 index 0000000000000..414115e213fc7 --- /dev/null +++ b/clients/client-qconnect/src/commands/UpdateContentCommand.ts @@ -0,0 +1,182 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + UpdateContentRequest, + UpdateContentResponse, + UpdateContentResponseFilterSensitiveLog, +} from "../models/models_0"; +import { de_UpdateContentCommand, se_UpdateContentCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateContentCommand}. + */ +export interface UpdateContentCommandInput extends UpdateContentRequest {} +/** + * @public + * + * The output of {@link UpdateContentCommand}. + */ +export interface UpdateContentCommandOutput extends UpdateContentResponse, __MetadataBearer {} + +/** + * @public + *

Updates information about the content.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, UpdateContentCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, UpdateContentCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // UpdateContentRequest + * knowledgeBaseId: "STRING_VALUE", // required + * contentId: "STRING_VALUE", // required + * revisionId: "STRING_VALUE", + * title: "STRING_VALUE", + * overrideLinkOutUri: "STRING_VALUE", + * removeOverrideLinkOutUri: true || false, + * metadata: { // ContentMetadata + * "": "STRING_VALUE", + * }, + * uploadId: "STRING_VALUE", + * }; + * const command = new UpdateContentCommand(input); + * const response = await client.send(command); + * // { // UpdateContentResponse + * // content: { // ContentData + * // contentArn: "STRING_VALUE", // required + * // contentId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // knowledgeBaseId: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // revisionId: "STRING_VALUE", // required + * // title: "STRING_VALUE", // required + * // contentType: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // metadata: { // ContentMetadata // required + * // "": "STRING_VALUE", + * // }, + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // linkOutUri: "STRING_VALUE", + * // url: "STRING_VALUE", // required + * // urlExpiry: new Date("TIMESTAMP"), // required + * // }, + * // }; + * + * ``` + * + * @param UpdateContentCommandInput - {@link UpdateContentCommandInput} + * @returns {@link UpdateContentCommandOutput} + * @see {@link UpdateContentCommandInput} for command's `input` shape. + * @see {@link UpdateContentCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link PreconditionFailedException} (client fault) + *

The provided revisionId does not match, indicating the content has been + * modified since it was last read.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class UpdateContentCommand extends $Command< + UpdateContentCommandInput, + UpdateContentCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UpdateContentCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, UpdateContentCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "UpdateContentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: UpdateContentResponseFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "UpdateContent", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UpdateContentCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UpdateContentCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_UpdateContentCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/UpdateKnowledgeBaseTemplateUriCommand.ts b/clients/client-qconnect/src/commands/UpdateKnowledgeBaseTemplateUriCommand.ts new file mode 100644 index 0000000000000..a9ebd5918e7ca --- /dev/null +++ b/clients/client-qconnect/src/commands/UpdateKnowledgeBaseTemplateUriCommand.ts @@ -0,0 +1,190 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { UpdateKnowledgeBaseTemplateUriRequest, UpdateKnowledgeBaseTemplateUriResponse } from "../models/models_0"; +import { + de_UpdateKnowledgeBaseTemplateUriCommand, + se_UpdateKnowledgeBaseTemplateUriCommand, +} from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateKnowledgeBaseTemplateUriCommand}. + */ +export interface UpdateKnowledgeBaseTemplateUriCommandInput extends UpdateKnowledgeBaseTemplateUriRequest {} +/** + * @public + * + * The output of {@link UpdateKnowledgeBaseTemplateUriCommand}. + */ +export interface UpdateKnowledgeBaseTemplateUriCommandOutput + extends UpdateKnowledgeBaseTemplateUriResponse, + __MetadataBearer {} + +/** + * @public + *

Updates the template URI of a knowledge base. This is only supported for knowledge bases + * of type EXTERNAL. Include a single variable in $\{variable\} format; this + * interpolated by Amazon Q using ingested content. For example, if you ingest a Salesforce + * article, it has an Id value, and you can set the template URI to + * https://myInstanceName.lightning.force.com/lightning/r/Knowledge__kav/*$\{Id\}*\/view. + *

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, UpdateKnowledgeBaseTemplateUriCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, UpdateKnowledgeBaseTemplateUriCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // UpdateKnowledgeBaseTemplateUriRequest + * knowledgeBaseId: "STRING_VALUE", // required + * templateUri: "STRING_VALUE", // required + * }; + * const command = new UpdateKnowledgeBaseTemplateUriCommand(input); + * const response = await client.send(command); + * // { // UpdateKnowledgeBaseTemplateUriResponse + * // knowledgeBase: { // KnowledgeBaseData + * // knowledgeBaseId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // knowledgeBaseType: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // lastContentModificationTime: new Date("TIMESTAMP"), + * // sourceConfiguration: { // SourceConfiguration Union: only one key present + * // appIntegrations: { // AppIntegrationsConfiguration + * // appIntegrationArn: "STRING_VALUE", // required + * // objectFields: [ // ObjectFieldsList + * // "STRING_VALUE", + * // ], + * // }, + * // }, + * // renderingConfiguration: { // RenderingConfiguration + * // templateUri: "STRING_VALUE", + * // }, + * // serverSideEncryptionConfiguration: { // ServerSideEncryptionConfiguration + * // kmsKeyId: "STRING_VALUE", + * // }, + * // description: "STRING_VALUE", + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param UpdateKnowledgeBaseTemplateUriCommandInput - {@link UpdateKnowledgeBaseTemplateUriCommandInput} + * @returns {@link UpdateKnowledgeBaseTemplateUriCommandOutput} + * @see {@link UpdateKnowledgeBaseTemplateUriCommandInput} for command's `input` shape. + * @see {@link UpdateKnowledgeBaseTemplateUriCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class UpdateKnowledgeBaseTemplateUriCommand extends $Command< + UpdateKnowledgeBaseTemplateUriCommandInput, + UpdateKnowledgeBaseTemplateUriCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UpdateKnowledgeBaseTemplateUriCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, UpdateKnowledgeBaseTemplateUriCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "UpdateKnowledgeBaseTemplateUriCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "UpdateKnowledgeBaseTemplateUri", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize( + input: UpdateKnowledgeBaseTemplateUriCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return se_UpdateKnowledgeBaseTemplateUriCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_UpdateKnowledgeBaseTemplateUriCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/UpdateQuickResponseCommand.ts b/clients/client-qconnect/src/commands/UpdateQuickResponseCommand.ts new file mode 100644 index 0000000000000..ef9b4a81de40e --- /dev/null +++ b/clients/client-qconnect/src/commands/UpdateQuickResponseCommand.ts @@ -0,0 +1,220 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + UpdateQuickResponseRequest, + UpdateQuickResponseRequestFilterSensitiveLog, + UpdateQuickResponseResponse, + UpdateQuickResponseResponseFilterSensitiveLog, +} from "../models/models_0"; +import { de_UpdateQuickResponseCommand, se_UpdateQuickResponseCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateQuickResponseCommand}. + */ +export interface UpdateQuickResponseCommandInput extends UpdateQuickResponseRequest {} +/** + * @public + * + * The output of {@link UpdateQuickResponseCommand}. + */ +export interface UpdateQuickResponseCommandOutput extends UpdateQuickResponseResponse, __MetadataBearer {} + +/** + * @public + *

Updates an existing Amazon Q quick response.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, UpdateQuickResponseCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, UpdateQuickResponseCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // UpdateQuickResponseRequest + * knowledgeBaseId: "STRING_VALUE", // required + * quickResponseId: "STRING_VALUE", // required + * name: "STRING_VALUE", + * content: { // QuickResponseDataProvider Union: only one key present + * content: "STRING_VALUE", + * }, + * contentType: "STRING_VALUE", + * groupingConfiguration: { // GroupingConfiguration + * criteria: "STRING_VALUE", + * values: [ // GroupingValues + * "STRING_VALUE", + * ], + * }, + * removeGroupingConfiguration: true || false, + * description: "STRING_VALUE", + * removeDescription: true || false, + * shortcutKey: "STRING_VALUE", + * removeShortcutKey: true || false, + * isActive: true || false, + * channels: [ // Channels + * "STRING_VALUE", + * ], + * language: "STRING_VALUE", + * }; + * const command = new UpdateQuickResponseCommand(input); + * const response = await client.send(command); + * // { // UpdateQuickResponseResponse + * // quickResponse: { // QuickResponseData + * // quickResponseArn: "STRING_VALUE", // required + * // quickResponseId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // knowledgeBaseId: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // contentType: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // createdTime: new Date("TIMESTAMP"), // required + * // lastModifiedTime: new Date("TIMESTAMP"), // required + * // contents: { // QuickResponseContents + * // plainText: { // QuickResponseContentProvider Union: only one key present + * // content: "STRING_VALUE", + * // }, + * // markdown: {// Union: only one key present + * // content: "STRING_VALUE", + * // }, + * // }, + * // description: "STRING_VALUE", + * // groupingConfiguration: { // GroupingConfiguration + * // criteria: "STRING_VALUE", + * // values: [ // GroupingValues + * // "STRING_VALUE", + * // ], + * // }, + * // shortcutKey: "STRING_VALUE", + * // lastModifiedBy: "STRING_VALUE", + * // isActive: true || false, + * // channels: [ // Channels + * // "STRING_VALUE", + * // ], + * // language: "STRING_VALUE", + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param UpdateQuickResponseCommandInput - {@link UpdateQuickResponseCommandInput} + * @returns {@link UpdateQuickResponseCommandOutput} + * @see {@link UpdateQuickResponseCommandInput} for command's `input` shape. + * @see {@link UpdateQuickResponseCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

The request could not be processed because of conflict in the current state of the + * resource. For example, if you're using a Create API (such as + * CreateAssistant) that accepts name, a conflicting resource (usually with the + * same name) is being created or mutated.

+ * + * @throws {@link PreconditionFailedException} (client fault) + *

The provided revisionId does not match, indicating the content has been + * modified since it was last read.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + */ +export class UpdateQuickResponseCommand extends $Command< + UpdateQuickResponseCommandInput, + UpdateQuickResponseCommandOutput, + QConnectClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UpdateQuickResponseCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, UpdateQuickResponseCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QConnectClient"; + const commandName = "UpdateQuickResponseCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateQuickResponseRequestFilterSensitiveLog, + outputFilterSensitiveLog: UpdateQuickResponseResponseFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + service: "WisdomService", + operation: "UpdateQuickResponse", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UpdateQuickResponseCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UpdateQuickResponseCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_UpdateQuickResponseCommand(output, context); + } +} diff --git a/clients/client-qconnect/src/commands/index.ts b/clients/client-qconnect/src/commands/index.ts new file mode 100644 index 0000000000000..37d76f0ba599a --- /dev/null +++ b/clients/client-qconnect/src/commands/index.ts @@ -0,0 +1,42 @@ +export * from "./CreateAssistantAssociationCommand"; +// smithy-typescript generated code +export * from "./CreateAssistantCommand"; +export * from "./CreateContentCommand"; +export * from "./CreateKnowledgeBaseCommand"; +export * from "./CreateQuickResponseCommand"; +export * from "./CreateSessionCommand"; +export * from "./DeleteAssistantAssociationCommand"; +export * from "./DeleteAssistantCommand"; +export * from "./DeleteContentCommand"; +export * from "./DeleteImportJobCommand"; +export * from "./DeleteKnowledgeBaseCommand"; +export * from "./DeleteQuickResponseCommand"; +export * from "./GetAssistantAssociationCommand"; +export * from "./GetAssistantCommand"; +export * from "./GetContentCommand"; +export * from "./GetContentSummaryCommand"; +export * from "./GetImportJobCommand"; +export * from "./GetKnowledgeBaseCommand"; +export * from "./GetQuickResponseCommand"; +export * from "./GetRecommendationsCommand"; +export * from "./GetSessionCommand"; +export * from "./ListAssistantAssociationsCommand"; +export * from "./ListAssistantsCommand"; +export * from "./ListContentsCommand"; +export * from "./ListImportJobsCommand"; +export * from "./ListKnowledgeBasesCommand"; +export * from "./ListQuickResponsesCommand"; +export * from "./ListTagsForResourceCommand"; +export * from "./NotifyRecommendationsReceivedCommand"; +export * from "./QueryAssistantCommand"; +export * from "./RemoveKnowledgeBaseTemplateUriCommand"; +export * from "./SearchContentCommand"; +export * from "./SearchQuickResponsesCommand"; +export * from "./SearchSessionsCommand"; +export * from "./StartContentUploadCommand"; +export * from "./StartImportJobCommand"; +export * from "./TagResourceCommand"; +export * from "./UntagResourceCommand"; +export * from "./UpdateContentCommand"; +export * from "./UpdateKnowledgeBaseTemplateUriCommand"; +export * from "./UpdateQuickResponseCommand"; diff --git a/clients/client-qconnect/src/endpoint/EndpointParameters.ts b/clients/client-qconnect/src/endpoint/EndpointParameters.ts new file mode 100644 index 0000000000000..087bf22c0cae6 --- /dev/null +++ b/clients/client-qconnect/src/endpoint/EndpointParameters.ts @@ -0,0 +1,34 @@ +// smithy-typescript generated code +import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provider } from "@smithy/types"; + +/** + * @public + */ +export interface ClientInputEndpointParameters { + region?: string | Provider; + useDualstackEndpoint?: boolean | Provider; + useFipsEndpoint?: boolean | Provider; + endpoint?: string | Provider | Endpoint | Provider | EndpointV2 | Provider; +} + +export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & { + defaultSigningName: string; +}; + +export const resolveClientEndpointParameters = ( + options: T & ClientInputEndpointParameters +): T & ClientResolvedEndpointParameters => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "wisdom", + }; +}; + +export interface EndpointParameters extends __EndpointParameters { + Region?: string; + UseDualStack?: boolean; + UseFIPS?: boolean; + Endpoint?: string; +} diff --git a/clients/client-qconnect/src/endpoint/endpointResolver.ts b/clients/client-qconnect/src/endpoint/endpointResolver.ts new file mode 100644 index 0000000000000..5a2f959731872 --- /dev/null +++ b/clients/client-qconnect/src/endpoint/endpointResolver.ts @@ -0,0 +1,16 @@ +// smithy-typescript generated code +import { EndpointV2, Logger } from "@smithy/types"; +import { EndpointParams, resolveEndpoint } from "@smithy/util-endpoints"; + +import { EndpointParameters } from "./EndpointParameters"; +import { ruleSet } from "./ruleset"; + +export const defaultEndpointResolver = ( + endpointParams: EndpointParameters, + context: { logger?: Logger } = {} +): EndpointV2 => { + return resolveEndpoint(ruleSet, { + endpointParams: endpointParams as EndpointParams, + logger: context.logger, + }); +}; diff --git a/clients/client-qconnect/src/endpoint/ruleset.ts b/clients/client-qconnect/src/endpoint/ruleset.ts new file mode 100644 index 0000000000000..baef445eed568 --- /dev/null +++ b/clients/client-qconnect/src/endpoint/ruleset.ts @@ -0,0 +1,32 @@ +// @ts-nocheck +// generated code, do not edit +import { RuleSetObject } from "@smithy/types"; + +/* This file is compressed. Log this object + or see "smithy.rules#endpointRuleSet" + in codegen/sdk-codegen/aws-models/qconnect.json */ + +const s="required", +t="fn", +u="argv", +v="ref"; +const a=true, +b="isSet", +c="booleanEquals", +d="error", +e="endpoint", +f="tree", +g="PartitionResult", +h={[s]:false,"type":"String"}, +i={[s]:true,"default":false,"type":"Boolean"}, +j={[v]:"Endpoint"}, +k={[t]:c,[u]:[{[v]:"UseFIPS"},true]}, +l={[t]:c,[u]:[{[v]:"UseDualStack"},true]}, +m={}, +n={[t]:"getAttr",[u]:[{[v]:g},"supportsFIPS"]}, +o={[t]:c,[u]:[true,{[t]:"getAttr",[u]:[{[v]:g},"supportsDualStack"]}]}, +p=[k], +q=[l], +r=[{[v]:"Region"}]; +const _data={version:"1.0",parameters:{Region:h,UseDualStack:i,UseFIPS:i,Endpoint:h},rules:[{conditions:[{[t]:b,[u]:[j]}],rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{rules:[{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:j,properties:m,headers:m},type:e}],type:f}],type:f},{rules:[{conditions:[{[t]:b,[u]:r}],rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:g}],rules:[{conditions:[k,l],rules:[{conditions:[{[t]:c,[u]:[a,n]},o],rules:[{rules:[{endpoint:{url:"https://wisdom-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:p,rules:[{conditions:[{[t]:c,[u]:[n,a]}],rules:[{rules:[{endpoint:{url:"https://wisdom-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:q,rules:[{conditions:[o],rules:[{rules:[{endpoint:{url:"https://wisdom.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{rules:[{endpoint:{url:"https://wisdom.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}],type:f}]}; +export const ruleSet: RuleSetObject = _data; diff --git a/clients/client-qconnect/src/extensionConfiguration.ts b/clients/client-qconnect/src/extensionConfiguration.ts new file mode 100644 index 0000000000000..cb9cf8a647f69 --- /dev/null +++ b/clients/client-qconnect/src/extensionConfiguration.ts @@ -0,0 +1,12 @@ +// smithy-typescript generated code +import { AwsRegionExtensionConfiguration } from "@aws-sdk/types"; +import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http"; +import { DefaultExtensionConfiguration } from "@smithy/types"; + +/** + * @internal + */ +export interface QConnectExtensionConfiguration + extends HttpHandlerExtensionConfiguration, + DefaultExtensionConfiguration, + AwsRegionExtensionConfiguration {} diff --git a/clients/client-qconnect/src/index.ts b/clients/client-qconnect/src/index.ts new file mode 100644 index 0000000000000..07bcfc7eb4a7f --- /dev/null +++ b/clients/client-qconnect/src/index.ts @@ -0,0 +1,31 @@ +// smithy-typescript generated code +/* eslint-disable */ +/** + *

Amazon Q in Connect is a generative AI customer service assistant. It is an LLM-enhanced evolution + * of Amazon Connect Wisdom that delivers real-time recommendations to help contact center + * agents resolve customer issues quickly and accurately.

+ *

Amazon Q automatically detects customer intent during calls and chats using + * conversational analytics and natural language understanding (NLU). It then provides agents + * with immediate, real-time generative responses and suggested actions, and links to relevant + * documents and articles. Agents can also query Amazon Q directly using natural language or + * keywords to answer customer requests.

+ *

Use the Amazon Q in Connect APIs to create an assistant and a knowledge base, for example, or + * manage content by uploading custom files.

+ *

For more information, see Use Amazon Q in Connect for generative AI + * powered agent assistance in real-time in the Amazon Connect + * Administrator Guide.

+ * + * @packageDocumentation + */ +export * from "./QConnectClient"; +export * from "./QConnect"; +export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters"; +export { RuntimeExtension } from "./runtimeExtensions"; +export { QConnectExtensionConfiguration } from "./extensionConfiguration"; +export * from "./commands"; +export * from "./pagination"; +export * from "./models"; + +import "@aws-sdk/util-endpoints"; + +export { QConnectServiceException } from "./models/QConnectServiceException"; diff --git a/clients/client-qconnect/src/models/QConnectServiceException.ts b/clients/client-qconnect/src/models/QConnectServiceException.ts new file mode 100644 index 0000000000000..6128807ec7559 --- /dev/null +++ b/clients/client-qconnect/src/models/QConnectServiceException.ts @@ -0,0 +1,22 @@ +// smithy-typescript generated code +import { + ServiceException as __ServiceException, + ServiceExceptionOptions as __ServiceExceptionOptions, +} from "@smithy/smithy-client"; + +export { __ServiceException, __ServiceExceptionOptions }; + +/** + * @public + * + * Base exception class for all service exceptions from QConnect service. + */ +export class QConnectServiceException extends __ServiceException { + /** + * @internal + */ + constructor(options: __ServiceExceptionOptions) { + super(options); + Object.setPrototypeOf(this, QConnectServiceException.prototype); + } +} diff --git a/clients/client-qconnect/src/models/index.ts b/clients/client-qconnect/src/models/index.ts new file mode 100644 index 0000000000000..9eaceb12865f8 --- /dev/null +++ b/clients/client-qconnect/src/models/index.ts @@ -0,0 +1,2 @@ +// smithy-typescript generated code +export * from "./models_0"; diff --git a/clients/client-qconnect/src/models/models_0.ts b/clients/client-qconnect/src/models/models_0.ts new file mode 100644 index 0000000000000..b6347d97f290d --- /dev/null +++ b/clients/client-qconnect/src/models/models_0.ts @@ -0,0 +1,5114 @@ +// smithy-typescript generated code +import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from "@smithy/smithy-client"; + +import { QConnectServiceException as __BaseException } from "./QConnectServiceException"; + +/** + * @public + *

You do not have sufficient access to perform this action.

+ */ +export class AccessDeniedException extends __BaseException { + readonly name: "AccessDeniedException" = "AccessDeniedException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, AccessDeniedException.prototype); + } +} + +/** + * @public + *

Configuration information for Amazon AppIntegrations to automatically ingest content.

+ */ +export interface AppIntegrationsConfiguration { + /** + * @public + *

The Amazon Resource Name (ARN) of the AppIntegrations DataIntegration to use for ingesting content.

+ *
    + *
  • + *

    For Salesforce, your AppIntegrations DataIntegration must have an ObjectConfiguration if + * objectFields is not provided, including at least Id, + * ArticleNumber, VersionNumber, Title, + * PublishStatus, and IsDeleted as source fields.

    + *
  • + *
  • + *

    For ServiceNow, your AppIntegrations DataIntegration must have an ObjectConfiguration if + * objectFields is not provided, including at least number, + * short_description, sys_mod_count, workflow_state, + * and active as source fields.

    + *
  • + *
  • + *

    For + * Zendesk, your AppIntegrations DataIntegration must have an ObjectConfiguration if + * objectFields is not provided, including at least id, + * title, updated_at, and draft as source fields. + *

    + *
  • + *
  • + *

    For SharePoint, your AppIntegrations DataIntegration must have a FileConfiguration, + * including only file extensions that are among docx, pdf, + * html, htm, and txt.

    + *
  • + *
  • + *

    For Amazon S3, the + * ObjectConfiguration and FileConfiguration of your AppIntegrations DataIntegration must be null. + * The SourceURI of your DataIntegration must use the following format: + * s3://your_s3_bucket_name.

    + * + *

    The bucket policy of the corresponding S3 bucket must allow the Amazon Web Services + * principal app-integrations.amazonaws.com to perform + * s3:ListBucket, s3:GetObject, and + * s3:GetBucketLocation against the bucket.

    + *
    + *
  • + *
+ */ + appIntegrationArn: string | undefined; + + /** + * @public + *

The fields from the source that are made available to your agents in Amazon Q. Optional if + * ObjectConfiguration is included in the provided DataIntegration.

+ *
    + *
  • + *

    For Salesforce, you must include at least Id, + * ArticleNumber, VersionNumber, Title, + * PublishStatus, and IsDeleted.

    + *
  • + *
  • + *

    For ServiceNow, you must include at least number, + * short_description, sys_mod_count, workflow_state, + * and active.

    + *
  • + *
  • + *

    For + * Zendesk, you must include at least id, title, + * updated_at, and draft.

    + *
  • + *
+ *

Make sure to include additional fields. These fields are indexed and used to source + * recommendations.

+ */ + objectFields?: string[]; +} + +/** + * @public + *

The request could not be processed because of conflict in the current state of the + * resource. For example, if you're using a Create API (such as + * CreateAssistant) that accepts name, a conflicting resource (usually with the + * same name) is being created or mutated.

+ */ +export class ConflictException extends __BaseException { + readonly name: "ConflictException" = "ConflictException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ConflictException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ConflictException.prototype); + } +} + +/** + * @public + *

The data that is input into Amazon Q as a result of the assistant association.

+ */ +export type AssistantAssociationInputData = + | AssistantAssociationInputData.KnowledgeBaseIdMember + | AssistantAssociationInputData.$UnknownMember; + +/** + * @public + */ +export namespace AssistantAssociationInputData { + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it.

+ */ + export interface KnowledgeBaseIdMember { + knowledgeBaseId: string; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + knowledgeBaseId?: never; + $unknown: [string, any]; + } + + export interface Visitor { + knowledgeBaseId: (value: string) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: AssistantAssociationInputData, visitor: Visitor): T => { + if (value.knowledgeBaseId !== undefined) return visitor.knowledgeBaseId(value.knowledgeBaseId); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + * @enum + */ +export const AssociationType = { + KNOWLEDGE_BASE: "KNOWLEDGE_BASE", +} as const; + +/** + * @public + */ +export type AssociationType = (typeof AssociationType)[keyof typeof AssociationType]; + +/** + * @public + */ +export interface CreateAssistantAssociationRequest { + /** + * @public + *

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + assistantId: string | undefined; + + /** + * @public + *

The type of association.

+ */ + associationType: AssociationType | undefined; + + /** + * @public + *

The identifier of the associated resource.

+ */ + association: AssistantAssociationInputData | undefined; + + /** + * @public + *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request. If not provided, the Amazon Web Services + * SDK populates this field. For more information about idempotency, see + * Making retries safe with idempotent APIs.

+ */ + clientToken?: string; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; +} + +/** + * @public + *

Association information about the knowledge base.

+ */ +export interface KnowledgeBaseAssociationData { + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it.

+ */ + knowledgeBaseId?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of the knowledge base.

+ */ + knowledgeBaseArn?: string; +} + +/** + * @public + *

The data that is output as a result of the assistant association.

+ */ +export type AssistantAssociationOutputData = + | AssistantAssociationOutputData.KnowledgeBaseAssociationMember + | AssistantAssociationOutputData.$UnknownMember; + +/** + * @public + */ +export namespace AssistantAssociationOutputData { + /** + * @public + *

The knowledge base where output data is sent.

+ */ + export interface KnowledgeBaseAssociationMember { + knowledgeBaseAssociation: KnowledgeBaseAssociationData; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + knowledgeBaseAssociation?: never; + $unknown: [string, any]; + } + + export interface Visitor { + knowledgeBaseAssociation: (value: KnowledgeBaseAssociationData) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: AssistantAssociationOutputData, visitor: Visitor): T => { + if (value.knowledgeBaseAssociation !== undefined) + return visitor.knowledgeBaseAssociation(value.knowledgeBaseAssociation); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + *

Information about the assistant association.

+ */ +export interface AssistantAssociationData { + /** + * @public + *

The identifier of the assistant association.

+ */ + assistantAssociationId: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of the assistant association.

+ */ + assistantAssociationArn: string | undefined; + + /** + * @public + *

The identifier of the Amazon Q assistant.

+ */ + assistantId: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of the Amazon Q assistant.

+ */ + assistantArn: string | undefined; + + /** + * @public + *

The type of association.

+ */ + associationType: AssociationType | undefined; + + /** + * @public + *

A union type that currently has a single argument, the knowledge base ID.

+ */ + associationData: AssistantAssociationOutputData | undefined; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; +} + +/** + * @public + */ +export interface CreateAssistantAssociationResponse { + /** + * @public + *

The assistant association.

+ */ + assistantAssociation?: AssistantAssociationData; +} + +/** + * @public + *

The specified resource does not exist.

+ */ +export class ResourceNotFoundException extends __BaseException { + readonly name: "ResourceNotFoundException" = "ResourceNotFoundException"; + readonly $fault: "client" = "client"; + /** + * @public + *

The specified resource name.

+ */ + resourceName?: string; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceNotFoundException.prototype); + this.resourceName = opts.resourceName; + } +} + +/** + * @public + *

You've exceeded your service quota. To perform the requested action, remove some of the + * relevant resources, or use service quotas to request a service quota increase.

+ */ +export class ServiceQuotaExceededException extends __BaseException { + readonly name: "ServiceQuotaExceededException" = "ServiceQuotaExceededException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ServiceQuotaExceededException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype); + } +} + +/** + * @public + *

The input fails to satisfy the constraints specified by a service.

+ */ +export class ValidationException extends __BaseException { + readonly name: "ValidationException" = "ValidationException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ValidationException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ValidationException.prototype); + } +} + +/** + * @public + */ +export interface DeleteAssistantAssociationRequest { + /** + * @public + *

The identifier of the assistant association. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + assistantAssociationId: string | undefined; + + /** + * @public + *

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + assistantId: string | undefined; +} + +/** + * @public + */ +export interface DeleteAssistantAssociationResponse {} + +/** + * @public + */ +export interface GetAssistantAssociationRequest { + /** + * @public + *

The identifier of the assistant association. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + assistantAssociationId: string | undefined; + + /** + * @public + *

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + assistantId: string | undefined; +} + +/** + * @public + */ +export interface GetAssistantAssociationResponse { + /** + * @public + *

The assistant association.

+ */ + assistantAssociation?: AssistantAssociationData; +} + +/** + * @public + */ +export interface ListAssistantAssociationsRequest { + /** + * @public + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of results to return per page.

+ */ + maxResults?: number; + + /** + * @public + *

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + assistantId: string | undefined; +} + +/** + * @public + *

Summary information about the assistant association.

+ */ +export interface AssistantAssociationSummary { + /** + * @public + *

The identifier of the assistant association.

+ */ + assistantAssociationId: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of the assistant association.

+ */ + assistantAssociationArn: string | undefined; + + /** + * @public + *

The identifier of the Amazon Q assistant.

+ */ + assistantId: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of the Amazon Q assistant.

+ */ + assistantArn: string | undefined; + + /** + * @public + *

The type of association.

+ */ + associationType: AssociationType | undefined; + + /** + * @public + *

The association data.

+ */ + associationData: AssistantAssociationOutputData | undefined; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; +} + +/** + * @public + */ +export interface ListAssistantAssociationsResponse { + /** + * @public + *

Summary information about assistant associations.

+ */ + assistantAssociationSummaries: AssistantAssociationSummary[] | undefined; + + /** + * @public + *

If there are additional results, this is the token for the next set of results.

+ */ + nextToken?: string; +} + +/** + * @public + *

The configuration information for the customer managed key used for encryption.

+ */ +export interface ServerSideEncryptionConfiguration { + /** + * @public + *

The customer managed key used for encryption. For more information about setting up a + * customer managed key for Amazon Q, see Enable Amazon Q in Connect for your instance. + * For information about valid ID values, see Key identifiers (KeyId).

+ */ + kmsKeyId?: string; +} + +/** + * @public + * @enum + */ +export const AssistantType = { + AGENT: "AGENT", +} as const; + +/** + * @public + */ +export type AssistantType = (typeof AssistantType)[keyof typeof AssistantType]; + +/** + * @public + */ +export interface CreateAssistantRequest { + /** + * @public + *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request. If not provided, the Amazon Web Services + * SDK populates this field. For more information about idempotency, see + * Making retries safe with idempotent APIs.

+ */ + clientToken?: string; + + /** + * @public + *

The name of the assistant.

+ */ + name: string | undefined; + + /** + * @public + *

The type of assistant.

+ */ + type: AssistantType | undefined; + + /** + * @public + *

The description of the assistant.

+ */ + description?: string; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; + + /** + * @public + *

The configuration information for the customer managed key used for encryption.

+ *

The customer managed key must have a policy that allows kms:CreateGrant, + * kms:DescribeKey, kms:Decrypt, and + * kms:GenerateDataKey* permissions to the IAM identity using the + * key to invoke Amazon Q. To use Amazon Q with chat, the key policy must also allow + * kms:Decrypt, kms:GenerateDataKey*, and + * kms:DescribeKey permissions to the connect.amazonaws.com service + * principal.

+ *

For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for + * your instance.

+ */ + serverSideEncryptionConfiguration?: ServerSideEncryptionConfiguration; +} + +/** + * @public + * @enum + */ +export const AssistantCapabilityType = { + V1: "V1", + V2: "V2", +} as const; + +/** + * @public + */ +export type AssistantCapabilityType = (typeof AssistantCapabilityType)[keyof typeof AssistantCapabilityType]; + +/** + * @public + *

The capability configuration for a Amazon Q assistant.

+ */ +export interface AssistantCapabilityConfiguration { + /** + * @public + *

The type of Amazon Q assistant capability.

+ */ + type?: AssistantCapabilityType; +} + +/** + * @public + *

The configuration information for the Amazon Q assistant integration.

+ */ +export interface AssistantIntegrationConfiguration { + /** + * @public + *

The Amazon Resource Name (ARN) of the integrated Amazon SNS topic used for streaming chat messages.

+ */ + topicIntegrationArn?: string; +} + +/** + * @public + * @enum + */ +export const AssistantStatus = { + ACTIVE: "ACTIVE", + CREATE_FAILED: "CREATE_FAILED", + CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS", + DELETED: "DELETED", + DELETE_FAILED: "DELETE_FAILED", + DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS", +} as const; + +/** + * @public + */ +export type AssistantStatus = (typeof AssistantStatus)[keyof typeof AssistantStatus]; + +/** + * @public + *

The assistant data.

+ */ +export interface AssistantData { + /** + * @public + *

The identifier of the Amazon Q assistant.

+ */ + assistantId: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of the Amazon Q assistant.

+ */ + assistantArn: string | undefined; + + /** + * @public + *

The name.

+ */ + name: string | undefined; + + /** + * @public + *

The type of assistant.

+ */ + type: AssistantType | undefined; + + /** + * @public + *

The status of the assistant.

+ */ + status: AssistantStatus | undefined; + + /** + * @public + *

The description.

+ */ + description?: string; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; + + /** + * @public + *

The configuration information for the customer managed key used for encryption.

+ *

This KMS key must have a policy that allows kms:CreateGrant, + * kms:DescribeKey, kms:Decrypt, and + * kms:GenerateDataKey* permissions to the IAM identity using the + * key to invoke Amazon Q. To use Amazon Q with chat, the key policy must also allow + * kms:Decrypt, kms:GenerateDataKey*, and + * kms:DescribeKey permissions to the connect.amazonaws.com service + * principal.

+ *

For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for + * your instance.

+ */ + serverSideEncryptionConfiguration?: ServerSideEncryptionConfiguration; + + /** + * @public + *

The configuration information for the Amazon Q assistant integration.

+ */ + integrationConfiguration?: AssistantIntegrationConfiguration; + + /** + * @public + *

The configuration information for the Amazon Q assistant capability.

+ */ + capabilityConfiguration?: AssistantCapabilityConfiguration; +} + +/** + * @public + */ +export interface CreateAssistantResponse { + /** + * @public + *

Information about the assistant.

+ */ + assistant?: AssistantData; +} + +/** + * @public + */ +export interface DeleteAssistantRequest { + /** + * @public + *

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + assistantId: string | undefined; +} + +/** + * @public + */ +export interface DeleteAssistantResponse {} + +/** + * @public + */ +export interface GetAssistantRequest { + /** + * @public + *

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + assistantId: string | undefined; +} + +/** + * @public + */ +export interface GetAssistantResponse { + /** + * @public + *

Information about the assistant.

+ */ + assistant?: AssistantData; +} + +/** + * @public + */ +export interface GetRecommendationsRequest { + /** + * @public + *

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + assistantId: string | undefined; + + /** + * @public + *

The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + sessionId: string | undefined; + + /** + * @public + *

The maximum number of results to return per page.

+ */ + maxResults?: number; + + /** + * @public + *

The duration (in seconds) for which the call waits for a recommendation to be made + * available before returning. If a recommendation is available, the call returns sooner than + * WaitTimeSeconds. If no messages are available and the wait time expires, the + * call returns successfully with an empty list.

+ */ + waitTimeSeconds?: number; +} + +/** + * @public + * @enum + */ +export const RelevanceLevel = { + HIGH: "HIGH", + LOW: "LOW", + MEDIUM: "MEDIUM", +} as const; + +/** + * @public + */ +export type RelevanceLevel = (typeof RelevanceLevel)[keyof typeof RelevanceLevel]; + +/** + * @public + *

Details about the source content ranking data.

+ */ +export interface RankingData { + /** + * @public + *

The relevance level of the recommendation.

+ */ + relevanceScore?: number; + + /** + * @public + *

The relevance score of the content.

+ */ + relevanceLevel?: RelevanceLevel; +} + +/** + * @public + *

Offset specification to describe highlighting of document excerpts for rendering search + * results and recommendations.

+ */ +export interface Highlight { + /** + * @public + *

The offset for the start of the highlight.

+ */ + beginOffsetInclusive?: number; + + /** + * @public + *

The offset for the end of the highlight.

+ */ + endOffsetExclusive?: number; +} + +/** + * @public + *

The text of the document.

+ */ +export interface DocumentText { + /** + * @public + *

Text in the document.

+ */ + text?: string; + + /** + * @public + *

Highlights in the document text.

+ */ + highlights?: Highlight[]; +} + +/** + * @public + *

Details about the source content text data.

+ */ +export interface TextData { + /** + * @public + *

The text of the document.

+ */ + title?: DocumentText; + + /** + * @public + *

The text of the document.

+ */ + excerpt?: DocumentText; +} + +/** + * @public + *

Details about the content data.

+ */ +export interface ContentDataDetails { + /** + * @public + *

Details about the content text data.

+ */ + textData: TextData | undefined; + + /** + * @public + *

Details about the content ranking data.

+ */ + rankingData: RankingData | undefined; +} + +/** + * @public + * @enum + */ +export const SourceContentType = { + KNOWLEDGE_CONTENT: "KNOWLEDGE_CONTENT", +} as const; + +/** + * @public + */ +export type SourceContentType = (typeof SourceContentType)[keyof typeof SourceContentType]; + +/** + * @public + *

Details about the source content data.

+ */ +export interface SourceContentDataDetails { + /** + * @public + *

The identifier of the source content.

+ */ + id: string | undefined; + + /** + * @public + *

The type of the source content.

+ */ + type: SourceContentType | undefined; + + /** + * @public + *

Details about the source content text data.

+ */ + textData: TextData | undefined; + + /** + * @public + *

Details about the source content ranking data.

+ */ + rankingData: RankingData | undefined; +} + +/** + * @public + *

Reference information about the content.

+ */ +export interface ContentReference { + /** + * @public + *

The Amazon Resource Name (ARN) of the knowledge base.

+ */ + knowledgeBaseArn?: string; + + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it.

+ */ + knowledgeBaseId?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of the content.

+ */ + contentArn?: string; + + /** + * @public + *

The identifier of the content.

+ */ + contentId?: string; +} + +/** + * @public + *

Reference information about generative content.

+ */ +export interface GenerativeReference { + /** + * @public + *

The identifier of the LLM model.

+ */ + modelId?: string; + + /** + * @public + *

The identifier of the LLM model.

+ */ + generationId?: string; +} + +/** + * @public + *

Reference data.

+ */ +export type DataReference = + | DataReference.ContentReferenceMember + | DataReference.GenerativeReferenceMember + | DataReference.$UnknownMember; + +/** + * @public + */ +export namespace DataReference { + /** + * @public + *

Reference information about the content.

+ */ + export interface ContentReferenceMember { + contentReference: ContentReference; + generativeReference?: never; + $unknown?: never; + } + + /** + * @public + *

Reference information about the generative content.

+ */ + export interface GenerativeReferenceMember { + contentReference?: never; + generativeReference: GenerativeReference; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + contentReference?: never; + generativeReference?: never; + $unknown: [string, any]; + } + + export interface Visitor { + contentReference: (value: ContentReference) => T; + generativeReference: (value: GenerativeReference) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: DataReference, visitor: Visitor): T => { + if (value.contentReference !== undefined) return visitor.contentReference(value.contentReference); + if (value.generativeReference !== undefined) return visitor.generativeReference(value.generativeReference); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + *

The document.

+ */ +export interface Document { + /** + * @public + *

A reference to the content resource.

+ */ + contentReference: ContentReference | undefined; + + /** + * @public + *

The title of the document.

+ */ + title?: DocumentText; + + /** + * @public + *

The excerpt from the document.

+ */ + excerpt?: DocumentText; +} + +/** + * @public + * @enum + */ +export const RecommendationType = { + GENERATIVE_ANSWER: "GENERATIVE_ANSWER", + GENERATIVE_RESPONSE: "GENERATIVE_RESPONSE", + KNOWLEDGE_CONTENT: "KNOWLEDGE_CONTENT", +} as const; + +/** + * @public + */ +export type RecommendationType = (typeof RecommendationType)[keyof typeof RecommendationType]; + +/** + * @public + *

Data associated with the QUERY RecommendationTriggerType.

+ */ +export interface QueryRecommendationTriggerData { + /** + * @public + *

The text associated with the recommendation trigger.

+ */ + text?: string; +} + +/** + * @public + *

A union type containing information related to the trigger.

+ */ +export type RecommendationTriggerData = + | RecommendationTriggerData.QueryMember + | RecommendationTriggerData.$UnknownMember; + +/** + * @public + */ +export namespace RecommendationTriggerData { + /** + * @public + *

Data associated with the QUERY RecommendationTriggerType.

+ */ + export interface QueryMember { + query: QueryRecommendationTriggerData; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + query?: never; + $unknown: [string, any]; + } + + export interface Visitor { + query: (value: QueryRecommendationTriggerData) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: RecommendationTriggerData, visitor: Visitor): T => { + if (value.query !== undefined) return visitor.query(value.query); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + * @enum + */ +export const RecommendationSourceType = { + ISSUE_DETECTION: "ISSUE_DETECTION", + OTHER: "OTHER", + RULE_EVALUATION: "RULE_EVALUATION", +} as const; + +/** + * @public + */ +export type RecommendationSourceType = (typeof RecommendationSourceType)[keyof typeof RecommendationSourceType]; + +/** + * @public + * @enum + */ +export const RecommendationTriggerType = { + GENERATIVE: "GENERATIVE", + QUERY: "QUERY", +} as const; + +/** + * @public + */ +export type RecommendationTriggerType = (typeof RecommendationTriggerType)[keyof typeof RecommendationTriggerType]; + +/** + * @public + *

A recommendation trigger provides context on the event that produced the referenced + * recommendations. Recommendations are only referenced in recommendationIds by a + * single RecommendationTrigger.

+ */ +export interface RecommendationTrigger { + /** + * @public + *

The identifier of the recommendation trigger.

+ */ + id: string | undefined; + + /** + * @public + *

The type of recommendation trigger.

+ */ + type: RecommendationTriggerType | undefined; + + /** + * @public + *

The source of the recommendation trigger.

+ *
    + *
  • + *

    ISSUE_DETECTION: The corresponding recommendations were triggered by a Contact Lens + * issue.

    + *
  • + *
  • + *

    RULE_EVALUATION: The corresponding recommendations were triggered by a Contact Lens + * rule.

    + *
  • + *
+ */ + source: RecommendationSourceType | undefined; + + /** + * @public + *

A union type containing information related to the trigger.

+ */ + data: RecommendationTriggerData | undefined; + + /** + * @public + *

The identifiers of the recommendations.

+ */ + recommendationIds: string[] | undefined; +} + +/** + * @public + */ +export interface ListAssistantsRequest { + /** + * @public + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of results to return per page.

+ */ + maxResults?: number; +} + +/** + * @public + *

Summary information about the assistant.

+ */ +export interface AssistantSummary { + /** + * @public + *

The identifier of the Amazon Q assistant.

+ */ + assistantId: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of the Amazon Q assistant.

+ */ + assistantArn: string | undefined; + + /** + * @public + *

The name of the assistant.

+ */ + name: string | undefined; + + /** + * @public + *

The type of the assistant.

+ */ + type: AssistantType | undefined; + + /** + * @public + *

The status of the assistant.

+ */ + status: AssistantStatus | undefined; + + /** + * @public + *

The description of the assistant.

+ */ + description?: string; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; + + /** + * @public + *

The configuration information for the customer managed key used for encryption.

+ *

This KMS key must have a policy that allows kms:CreateGrant, + * kms:DescribeKey, kms:Decrypt, and + * kms:GenerateDataKey* permissions to the IAM identity using the + * key to invoke Amazon Q. To use Amazon Q with chat, the key policy must also allow + * kms:Decrypt, kms:GenerateDataKey*, and + * kms:DescribeKey permissions to the connect.amazonaws.com service + * principal.

+ *

For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for + * your instance.

+ */ + serverSideEncryptionConfiguration?: ServerSideEncryptionConfiguration; + + /** + * @public + *

The configuration information for the Amazon Q assistant integration.

+ */ + integrationConfiguration?: AssistantIntegrationConfiguration; + + /** + * @public + *

The configuration information for the Amazon Q assistant capability.

+ */ + capabilityConfiguration?: AssistantCapabilityConfiguration; +} + +/** + * @public + */ +export interface ListAssistantsResponse { + /** + * @public + *

Information about the assistants.

+ */ + assistantSummaries: AssistantSummary[] | undefined; + + /** + * @public + *

If there are additional results, this is the token for the next set of results.

+ */ + nextToken?: string; +} + +/** + * @public + */ +export interface NotifyRecommendationsReceivedRequest { + /** + * @public + *

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + assistantId: string | undefined; + + /** + * @public + *

The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + sessionId: string | undefined; + + /** + * @public + *

The identifiers of the recommendations.

+ */ + recommendationIds: string[] | undefined; +} + +/** + * @public + *

An error occurred when creating a recommendation.

+ */ +export interface NotifyRecommendationsReceivedError { + /** + * @public + *

The identifier of the recommendation that is in error.

+ */ + recommendationId?: string; + + /** + * @public + *

A recommendation is causing an error.

+ */ + message?: string; +} + +/** + * @public + */ +export interface NotifyRecommendationsReceivedResponse { + /** + * @public + *

The identifiers of the recommendations.

+ */ + recommendationIds?: string[]; + + /** + * @public + *

The identifiers of recommendations that are causing errors.

+ */ + errors?: NotifyRecommendationsReceivedError[]; +} + +/** + * @public + * @enum + */ +export const QueryConditionComparisonOperator = { + EQUALS: "EQUALS", +} as const; + +/** + * @public + */ +export type QueryConditionComparisonOperator = + (typeof QueryConditionComparisonOperator)[keyof typeof QueryConditionComparisonOperator]; + +/** + * @public + * @enum + */ +export const QueryConditionFieldName = { + RESULT_TYPE: "RESULT_TYPE", +} as const; + +/** + * @public + */ +export type QueryConditionFieldName = (typeof QueryConditionFieldName)[keyof typeof QueryConditionFieldName]; + +/** + * @public + *

The condition for the query.

+ */ +export interface QueryConditionItem { + /** + * @public + *

The name of the field for query condition to query on.

+ */ + field: QueryConditionFieldName | undefined; + + /** + * @public + *

The comparison operator for query condition to query on.

+ */ + comparator: QueryConditionComparisonOperator | undefined; + + /** + * @public + *

The value for the query condition to query on.

+ */ + value: string | undefined; +} + +/** + * @public + *

Information about how to query content.

+ */ +export type QueryCondition = QueryCondition.SingleMember | QueryCondition.$UnknownMember; + +/** + * @public + */ +export namespace QueryCondition { + /** + * @public + *

The condition for the query.

+ */ + export interface SingleMember { + single: QueryConditionItem; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + single?: never; + $unknown: [string, any]; + } + + export interface Visitor { + single: (value: QueryConditionItem) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: QueryCondition, visitor: Visitor): T => { + if (value.single !== undefined) return visitor.single(value.single); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + */ +export interface QueryAssistantRequest { + /** + * @public + *

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + assistantId: string | undefined; + + /** + * @public + *

The text to search for.

+ */ + queryText: string | undefined; + + /** + * @public + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of results to return per page.

+ */ + maxResults?: number; + + /** + * @public + *

The identifier of the Amazon Q session. Can be either the ID or the ARN. URLs cannot + * contain the ARN.

+ */ + sessionId?: string; + + /** + * @public + *

Information about how to query content.

+ */ + queryCondition?: QueryCondition[]; +} + +/** + * @public + * @enum + */ +export const QueryResultType = { + GENERATIVE_ANSWER: "GENERATIVE_ANSWER", + KNOWLEDGE_CONTENT: "KNOWLEDGE_CONTENT", +} as const; + +/** + * @public + */ +export type QueryResultType = (typeof QueryResultType)[keyof typeof QueryResultType]; + +/** + * @public + *

The request reached the service more than 15 minutes after the date stamp on the request + * or more than 15 minutes after the request expiration date (such as for pre-signed URLs), or + * the date stamp on the request is more than 15 minutes in the future.

+ */ +export class RequestTimeoutException extends __BaseException { + readonly name: "RequestTimeoutException" = "RequestTimeoutException"; + readonly $fault: "client" = "client"; + $retryable = {}; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "RequestTimeoutException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, RequestTimeoutException.prototype); + } +} + +/** + * @public + * @enum + */ +export const FilterField = { + NAME: "NAME", +} as const; + +/** + * @public + */ +export type FilterField = (typeof FilterField)[keyof typeof FilterField]; + +/** + * @public + * @enum + */ +export const FilterOperator = { + EQUALS: "EQUALS", +} as const; + +/** + * @public + */ +export type FilterOperator = (typeof FilterOperator)[keyof typeof FilterOperator]; + +/** + * @public + *

A search filter.

+ */ +export interface Filter { + /** + * @public + *

The field on which to filter.

+ */ + field: FilterField | undefined; + + /** + * @public + *

The operator to use for comparing the field’s value with the provided value.

+ */ + operator: FilterOperator | undefined; + + /** + * @public + *

The desired field value on which to filter.

+ */ + value: string | undefined; +} + +/** + * @public + *

The search expression.

+ */ +export interface SearchExpression { + /** + * @public + *

The search expression filters.

+ */ + filters: Filter[] | undefined; +} + +/** + * @public + */ +export interface SearchSessionsRequest { + /** + * @public + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of results to return per page.

+ */ + maxResults?: number; + + /** + * @public + *

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + assistantId: string | undefined; + + /** + * @public + *

The search expression to filter results.

+ */ + searchExpression: SearchExpression | undefined; +} + +/** + * @public + *

Summary information about the session.

+ */ +export interface SessionSummary { + /** + * @public + *

The identifier of the session.

+ */ + sessionId: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of the session.

+ */ + sessionArn: string | undefined; + + /** + * @public + *

The identifier of the Amazon Q assistant.

+ */ + assistantId: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of the Amazon Q assistant.

+ */ + assistantArn: string | undefined; +} + +/** + * @public + */ +export interface SearchSessionsResponse { + /** + * @public + *

Summary information about the sessions.

+ */ + sessionSummaries: SessionSummary[] | undefined; + + /** + * @public + *

If there are additional results, this is the token for the next set of results.

+ */ + nextToken?: string; +} + +/** + * @public + */ +export interface CreateSessionRequest { + /** + * @public + *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request. If not provided, the Amazon Web Services + * SDK populates this field. For more information about idempotency, see + * Making retries safe with idempotent APIs.

+ */ + clientToken?: string; + + /** + * @public + *

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + assistantId: string | undefined; + + /** + * @public + *

The name of the session.

+ */ + name: string | undefined; + + /** + * @public + *

The description.

+ */ + description?: string; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; +} + +/** + * @public + *

The configuration information for the session integration.

+ */ +export interface SessionIntegrationConfiguration { + /** + * @public + *

The Amazon Resource Name (ARN) of the integrated Amazon SNS topic used for streaming chat messages.

+ */ + topicIntegrationArn?: string; +} + +/** + * @public + *

Information about the session.

+ */ +export interface SessionData { + /** + * @public + *

The Amazon Resource Name (ARN) of the session.

+ */ + sessionArn: string | undefined; + + /** + * @public + *

The identifier of the session.

+ */ + sessionId: string | undefined; + + /** + * @public + *

The name of the session.

+ */ + name: string | undefined; + + /** + * @public + *

The description of the session.

+ */ + description?: string; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; + + /** + * @public + *

The configuration information for the session integration.

+ */ + integrationConfiguration?: SessionIntegrationConfiguration; +} + +/** + * @public + */ +export interface CreateSessionResponse { + /** + * @public + *

The session.

+ */ + session?: SessionData; +} + +/** + * @public + */ +export interface GetSessionRequest { + /** + * @public + *

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + assistantId: string | undefined; + + /** + * @public + *

The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + sessionId: string | undefined; +} + +/** + * @public + */ +export interface GetSessionResponse { + /** + * @public + *

The session.

+ */ + session?: SessionData; +} + +/** + * @public + *

The configuration information of the Amazon Connect data source.

+ */ +export interface ConnectConfiguration { + /** + * @public + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + instanceId?: string; +} + +/** + * @public + *

The configuration information of the external data source.

+ */ +export type Configuration = Configuration.ConnectConfigurationMember | Configuration.$UnknownMember; + +/** + * @public + */ +export namespace Configuration { + /** + * @public + *

The configuration information of the Amazon Connect data source.

+ */ + export interface ConnectConfigurationMember { + connectConfiguration: ConnectConfiguration; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + connectConfiguration?: never; + $unknown: [string, any]; + } + + export interface Visitor { + connectConfiguration: (value: ConnectConfiguration) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: Configuration, visitor: Visitor): T => { + if (value.connectConfiguration !== undefined) return visitor.connectConfiguration(value.connectConfiguration); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + */ +export interface CreateContentRequest { + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The name of the content. Each piece of content in a knowledge base must have a unique + * name. You can retrieve a piece of content using only its knowledge base and its name with the + * SearchContent API.

+ */ + name: string | undefined; + + /** + * @public + *

The title of the content. If not set, the title is equal to the name.

+ */ + title?: string; + + /** + * @public + *

The URI you want to use for the article. If the knowledge base has a templateUri, setting + * this argument overrides it for this piece of content.

+ */ + overrideLinkOutUri?: string; + + /** + * @public + *

A key/value map to store attributes without affecting tagging or recommendations. + * For example, when synchronizing data between an external system and Amazon Q, you can store an external version identifier as metadata to utilize for determining drift.

+ */ + metadata?: Record; + + /** + * @public + *

A pointer to the uploaded asset. This value is returned by StartContentUpload.

+ */ + uploadId: string | undefined; + + /** + * @public + *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request. If not provided, the Amazon Web Services + * SDK populates this field. For more information about idempotency, see + * Making retries safe with idempotent APIs.

+ */ + clientToken?: string; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; +} + +/** + * @public + * @enum + */ +export const ContentStatus = { + ACTIVE: "ACTIVE", + CREATE_FAILED: "CREATE_FAILED", + CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS", + DELETED: "DELETED", + DELETE_FAILED: "DELETE_FAILED", + DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS", + UPDATE_FAILED: "UPDATE_FAILED", +} as const; + +/** + * @public + */ +export type ContentStatus = (typeof ContentStatus)[keyof typeof ContentStatus]; + +/** + * @public + *

Information about the content.

+ */ +export interface ContentData { + /** + * @public + *

The Amazon Resource Name (ARN) of the content.

+ */ + contentArn: string | undefined; + + /** + * @public + *

The identifier of the content.

+ */ + contentId: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of the knowledge base.

+ */ + knowledgeBaseArn: string | undefined; + + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The name of the content.

+ */ + name: string | undefined; + + /** + * @public + *

The identifier of the content revision.

+ */ + revisionId: string | undefined; + + /** + * @public + *

The title of the content.

+ */ + title: string | undefined; + + /** + * @public + *

The media type of the content.

+ */ + contentType: string | undefined; + + /** + * @public + *

The status of the content.

+ */ + status: ContentStatus | undefined; + + /** + * @public + *

A key/value map to store attributes without affecting tagging or recommendations. + * For example, when synchronizing data between an external system and Amazon Q, you can store an external version identifier as metadata to utilize for determining drift.

+ */ + metadata: Record | undefined; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; + + /** + * @public + *

The URI of the content.

+ */ + linkOutUri?: string; + + /** + * @public + *

The URL of the content.

+ */ + url: string | undefined; + + /** + * @public + *

The expiration time of the URL as an epoch timestamp.

+ */ + urlExpiry: Date | undefined; +} + +/** + * @public + */ +export interface CreateContentResponse { + /** + * @public + *

The content.

+ */ + content?: ContentData; +} + +/** + * @public + */ +export interface DeleteContentRequest { + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + contentId: string | undefined; +} + +/** + * @public + */ +export interface DeleteContentResponse {} + +/** + * @public + */ +export interface GetContentRequest { + /** + * @public + *

The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + contentId: string | undefined; + + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + knowledgeBaseId: string | undefined; +} + +/** + * @public + */ +export interface GetContentResponse { + /** + * @public + *

The content.

+ */ + content?: ContentData; +} + +/** + * @public + */ +export interface GetContentSummaryRequest { + /** + * @public + *

The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + contentId: string | undefined; + + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + knowledgeBaseId: string | undefined; +} + +/** + * @public + *

Summary information about the content.

+ */ +export interface ContentSummary { + /** + * @public + *

The Amazon Resource Name (ARN) of the content.

+ */ + contentArn: string | undefined; + + /** + * @public + *

The identifier of the content.

+ */ + contentId: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of the knowledge base.

+ */ + knowledgeBaseArn: string | undefined; + + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The name of the content.

+ */ + name: string | undefined; + + /** + * @public + *

The identifier of the revision of the content.

+ */ + revisionId: string | undefined; + + /** + * @public + *

The title of the content.

+ */ + title: string | undefined; + + /** + * @public + *

The media type of the content.

+ */ + contentType: string | undefined; + + /** + * @public + *

The status of the content.

+ */ + status: ContentStatus | undefined; + + /** + * @public + *

A key/value map to store attributes without affecting tagging or recommendations. + * For example, when synchronizing data between an external system and Amazon Q, you can store an external version identifier as metadata to utilize for determining drift.

+ */ + metadata: Record | undefined; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; +} + +/** + * @public + */ +export interface GetContentSummaryResponse { + /** + * @public + *

The content summary.

+ */ + contentSummary?: ContentSummary; +} + +/** + * @public + */ +export interface ListContentsRequest { + /** + * @public + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of results to return per page.

+ */ + maxResults?: number; + + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + knowledgeBaseId: string | undefined; +} + +/** + * @public + */ +export interface ListContentsResponse { + /** + * @public + *

Information about the content.

+ */ + contentSummaries: ContentSummary[] | undefined; + + /** + * @public + *

If there are additional results, this is the token for the next set of results.

+ */ + nextToken?: string; +} + +/** + * @public + *

The provided revisionId does not match, indicating the content has been + * modified since it was last read.

+ */ +export class PreconditionFailedException extends __BaseException { + readonly name: "PreconditionFailedException" = "PreconditionFailedException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "PreconditionFailedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, PreconditionFailedException.prototype); + } +} + +/** + * @public + */ +export interface UpdateContentRequest { + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + contentId: string | undefined; + + /** + * @public + *

The revisionId of the content resource to update, taken from an earlier call + * to GetContent, GetContentSummary, SearchContent, or + * ListContents. If included, this argument acts as an optimistic lock to ensure + * content was not modified since it was last read. If it has been modified, this API throws a + * PreconditionFailedException.

+ */ + revisionId?: string; + + /** + * @public + *

The title of the content.

+ */ + title?: string; + + /** + * @public + *

The URI for the article. If the knowledge base has a templateUri, setting this argument + * overrides it for this piece of content. To remove an existing overrideLinkOurUri, + * exclude this argument and set removeOverrideLinkOutUri to true.

+ */ + overrideLinkOutUri?: string; + + /** + * @public + *

Unset the existing overrideLinkOutUri if it exists.

+ */ + removeOverrideLinkOutUri?: boolean; + + /** + * @public + *

A key/value map to store attributes without affecting tagging or recommendations. For + * example, when synchronizing data between an external system and Amazon Q, you can store an + * external version identifier as metadata to utilize for determining drift.

+ */ + metadata?: Record; + + /** + * @public + *

A pointer to the uploaded asset. This value is returned by StartContentUpload. + *

+ */ + uploadId?: string; +} + +/** + * @public + */ +export interface UpdateContentResponse { + /** + * @public + *

The content.

+ */ + content?: ContentData; +} + +/** + * @public + * @enum + */ +export const KnowledgeBaseType = { + CUSTOM: "CUSTOM", + EXTERNAL: "EXTERNAL", + QUICK_RESPONSES: "QUICK_RESPONSES", +} as const; + +/** + * @public + */ +export type KnowledgeBaseType = (typeof KnowledgeBaseType)[keyof typeof KnowledgeBaseType]; + +/** + * @public + *

Information about how to render the content.

+ */ +export interface RenderingConfiguration { + /** + * @public + *

A URI template containing exactly one variable in $\{variableName\} format. + * This can only be set for EXTERNAL knowledge bases. For Salesforce, ServiceNow, + * and Zendesk, the variable must be one of the following:

+ *
    + *
  • + *

    Salesforce: Id, ArticleNumber, VersionNumber, + * Title, PublishStatus, or IsDeleted + *

    + *
  • + *
  • + *

    ServiceNow: number, short_description, + * sys_mod_count, workflow_state, or active + *

    + *
  • + *
  • + *

    Zendesk: id, title, updated_at, or + * draft + *

    + *
  • + *
+ *

The variable is replaced with the actual value for a piece of content when calling GetContent.

+ */ + templateUri?: string; +} + +/** + * @public + *

Configuration information about the external data source.

+ */ +export type SourceConfiguration = SourceConfiguration.AppIntegrationsMember | SourceConfiguration.$UnknownMember; + +/** + * @public + */ +export namespace SourceConfiguration { + /** + * @public + *

Configuration information for Amazon AppIntegrations to automatically ingest content.

+ */ + export interface AppIntegrationsMember { + appIntegrations: AppIntegrationsConfiguration; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + appIntegrations?: never; + $unknown: [string, any]; + } + + export interface Visitor { + appIntegrations: (value: AppIntegrationsConfiguration) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: SourceConfiguration, visitor: Visitor): T => { + if (value.appIntegrations !== undefined) return visitor.appIntegrations(value.appIntegrations); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + */ +export interface CreateKnowledgeBaseRequest { + /** + * @public + *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request. If not provided, the Amazon Web Services + * SDK populates this field. For more information about idempotency, see + * Making retries safe with idempotent APIs.

+ */ + clientToken?: string; + + /** + * @public + *

The name of the knowledge base.

+ */ + name: string | undefined; + + /** + * @public + *

The type of knowledge base. Only CUSTOM knowledge bases allow you to upload your own content. + * EXTERNAL knowledge bases support integrations with third-party systems whose content is + * synchronized automatically.

+ */ + knowledgeBaseType: KnowledgeBaseType | undefined; + + /** + * @public + *

The source of the knowledge base content. Only set this argument for EXTERNAL knowledge + * bases.

+ */ + sourceConfiguration?: SourceConfiguration; + + /** + * @public + *

Information about how to render the content.

+ */ + renderingConfiguration?: RenderingConfiguration; + + /** + * @public + *

The configuration information for the customer managed key used for encryption.

+ *

This KMS key must have a policy that allows kms:CreateGrant, + * kms:DescribeKey, kms:Decrypt, and + * kms:GenerateDataKey* permissions to the IAM identity using the + * key to invoke Amazon Q.

+ *

For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for + * your instance.

+ */ + serverSideEncryptionConfiguration?: ServerSideEncryptionConfiguration; + + /** + * @public + *

The description.

+ */ + description?: string; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; +} + +/** + * @public + * @enum + */ +export const KnowledgeBaseStatus = { + ACTIVE: "ACTIVE", + CREATE_FAILED: "CREATE_FAILED", + CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS", + DELETED: "DELETED", + DELETE_FAILED: "DELETE_FAILED", + DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS", +} as const; + +/** + * @public + */ +export type KnowledgeBaseStatus = (typeof KnowledgeBaseStatus)[keyof typeof KnowledgeBaseStatus]; + +/** + * @public + *

Information about the knowledge base.

+ */ +export interface KnowledgeBaseData { + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of the knowledge base.

+ */ + knowledgeBaseArn: string | undefined; + + /** + * @public + *

The name of the knowledge base.

+ */ + name: string | undefined; + + /** + * @public + *

The type of knowledge base.

+ */ + knowledgeBaseType: KnowledgeBaseType | undefined; + + /** + * @public + *

The status of the knowledge base.

+ */ + status: KnowledgeBaseStatus | undefined; + + /** + * @public + *

An epoch timestamp indicating the most recent content modification inside the knowledge + * base. If no content exists in a knowledge base, this value is unset.

+ */ + lastContentModificationTime?: Date; + + /** + * @public + *

Source configuration information about the knowledge base.

+ */ + sourceConfiguration?: SourceConfiguration; + + /** + * @public + *

Information about how to render the content.

+ */ + renderingConfiguration?: RenderingConfiguration; + + /** + * @public + *

The configuration information for the customer managed key used for encryption.

+ *

This KMS key must have a policy that allows kms:CreateGrant, + * kms:DescribeKey, kms:Decrypt, and + * kms:GenerateDataKey* permissions to the IAM identity using the + * key to invoke Amazon Q.

+ *

For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for + * your instance.

+ */ + serverSideEncryptionConfiguration?: ServerSideEncryptionConfiguration; + + /** + * @public + *

The description.

+ */ + description?: string; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; +} + +/** + * @public + */ +export interface CreateKnowledgeBaseResponse { + /** + * @public + *

The knowledge base.

+ */ + knowledgeBase?: KnowledgeBaseData; +} + +/** + * @public + *

The container of quick response data.

+ */ +export type QuickResponseDataProvider = + | QuickResponseDataProvider.ContentMember + | QuickResponseDataProvider.$UnknownMember; + +/** + * @public + */ +export namespace QuickResponseDataProvider { + /** + * @public + *

The content of the quick response.

+ */ + export interface ContentMember { + content: string; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + content?: never; + $unknown: [string, any]; + } + + export interface Visitor { + content: (value: string) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: QuickResponseDataProvider, visitor: Visitor): T => { + if (value.content !== undefined) return visitor.content(value.content); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + *

The configuration information of the grouping of Amazon Q users.

+ */ +export interface GroupingConfiguration { + /** + * @public + *

The criteria used for grouping Amazon Q users.

+ *

The following is the list of supported criteria values.

+ * + */ + criteria?: string; + + /** + * @public + *

The list of values that define different groups of Amazon Q users.

+ *
    + *
  • + *

    When setting criteria to RoutingProfileArn, you need to provide a list of + * ARNs of Amazon Connect routing profiles as values of this parameter.

    + *
  • + *
+ */ + values?: string[]; +} + +/** + * @public + */ +export interface CreateQuickResponseRequest { + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The name of the quick response.

+ */ + name: string | undefined; + + /** + * @public + *

The content of the quick response.

+ */ + content: QuickResponseDataProvider | undefined; + + /** + * @public + *

The media type of the quick response content.

+ *
    + *
  • + *

    Use application/x.quickresponse;format=plain for a quick response written in plain text.

    + *
  • + *
  • + *

    Use application/x.quickresponse;format=markdown for a quick response written in richtext.

    + *
  • + *
+ */ + contentType?: string; + + /** + * @public + *

The configuration information of the user groups that the quick response is accessible to.

+ */ + groupingConfiguration?: GroupingConfiguration; + + /** + * @public + *

The description of the quick response.

+ */ + description?: string; + + /** + * @public + *

The shortcut key of the quick response. The value should be unique across the + * knowledge base. + *

+ */ + shortcutKey?: string; + + /** + * @public + *

Whether the quick response is active.

+ */ + isActive?: boolean; + + /** + * @public + *

The Amazon Connect channels this quick response applies to.

+ */ + channels?: string[]; + + /** + * @public + *

The language code value for the language in which the quick response is written. The supported language codes include de_DE, en_US, es_ES, + * fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, + * zh_CN, zh_TW + *

+ */ + language?: string; + + /** + * @public + *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request. If not provided, the Amazon Web Services + * SDK populates this field. For more information about idempotency, see + * Making retries safe with idempotent APIs.

+ */ + clientToken?: string; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; +} + +/** + * @public + *

The container quick response content.

+ */ +export type QuickResponseContentProvider = + | QuickResponseContentProvider.ContentMember + | QuickResponseContentProvider.$UnknownMember; + +/** + * @public + */ +export namespace QuickResponseContentProvider { + /** + * @public + *

The content of the quick response.

+ */ + export interface ContentMember { + content: string; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + content?: never; + $unknown: [string, any]; + } + + export interface Visitor { + content: (value: string) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: QuickResponseContentProvider, visitor: Visitor): T => { + if (value.content !== undefined) return visitor.content(value.content); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + *

The content of the quick response stored in different media types.

+ */ +export interface QuickResponseContents { + /** + * @public + *

The container quick response content.

+ */ + plainText?: QuickResponseContentProvider; + + /** + * @public + *

The container quick response content.

+ */ + markdown?: QuickResponseContentProvider; +} + +/** + * @public + * @enum + */ +export const QuickResponseStatus = { + CREATED: "CREATED", + CREATE_FAILED: "CREATE_FAILED", + CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS", + DELETED: "DELETED", + DELETE_FAILED: "DELETE_FAILED", + DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS", + UPDATE_FAILED: "UPDATE_FAILED", + UPDATE_IN_PROGRESS: "UPDATE_IN_PROGRESS", +} as const; + +/** + * @public + */ +export type QuickResponseStatus = (typeof QuickResponseStatus)[keyof typeof QuickResponseStatus]; + +/** + * @public + *

Information about the quick response.

+ */ +export interface QuickResponseData { + /** + * @public + *

The Amazon Resource Name (ARN) of the quick response.

+ */ + quickResponseArn: string | undefined; + + /** + * @public + *

The identifier of the quick response.

+ */ + quickResponseId: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of the knowledge base.

+ */ + knowledgeBaseArn: string | undefined; + + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The name of the quick response.

+ */ + name: string | undefined; + + /** + * @public + *

The media type of the quick response content.

+ *
    + *
  • + *

    Use application/x.quickresponse;format=plain for quick response written in plain text.

    + *
  • + *
  • + *

    Use application/x.quickresponse;format=markdown for quick response written in richtext.

    + *
  • + *
+ */ + contentType: string | undefined; + + /** + * @public + *

The status of the quick response data.

+ */ + status: QuickResponseStatus | undefined; + + /** + * @public + *

The timestamp when the quick response was created.

+ */ + createdTime: Date | undefined; + + /** + * @public + *

The timestamp when the quick response data was last modified.

+ */ + lastModifiedTime: Date | undefined; + + /** + * @public + *

The contents of the quick response.

+ */ + contents?: QuickResponseContents; + + /** + * @public + *

The description of the quick response.

+ */ + description?: string; + + /** + * @public + *

The configuration information of the user groups that the quick response is accessible to.

+ */ + groupingConfiguration?: GroupingConfiguration; + + /** + * @public + *

The shortcut key of the quick response. The value should be unique across the + * knowledge base.

+ */ + shortcutKey?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of the user who last updated the quick response data.

+ */ + lastModifiedBy?: string; + + /** + * @public + *

Whether the quick response is active.

+ */ + isActive?: boolean; + + /** + * @public + *

The Amazon Connect contact channels this quick response applies to. The supported contact channel types include Chat.

+ */ + channels?: string[]; + + /** + * @public + *

The language code value for the language in which the quick response is written.

+ */ + language?: string; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; +} + +/** + * @public + */ +export interface CreateQuickResponseResponse { + /** + * @public + *

The quick response.

+ */ + quickResponse?: QuickResponseData; +} + +/** + * @public + */ +export interface DeleteImportJobRequest { + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The identifier of the import job to be deleted.

+ */ + importJobId: string | undefined; +} + +/** + * @public + */ +export interface DeleteImportJobResponse {} + +/** + * @public + */ +export interface DeleteKnowledgeBaseRequest { + /** + * @public + *

The knowledge base to delete content from. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + knowledgeBaseId: string | undefined; +} + +/** + * @public + */ +export interface DeleteKnowledgeBaseResponse {} + +/** + * @public + */ +export interface DeleteQuickResponseRequest { + /** + * @public + *

The knowledge base from which the quick response is deleted. The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The identifier of the quick response to delete.

+ */ + quickResponseId: string | undefined; +} + +/** + * @public + */ +export interface DeleteQuickResponseResponse {} + +/** + * @public + * @enum + */ +export const ExternalSource = { + AMAZON_CONNECT: "AMAZON_CONNECT", +} as const; + +/** + * @public + */ +export type ExternalSource = (typeof ExternalSource)[keyof typeof ExternalSource]; + +/** + * @public + *

The configuration information of the external data source.

+ */ +export interface ExternalSourceConfiguration { + /** + * @public + *

The type of the external data source.

+ */ + source: ExternalSource | undefined; + + /** + * @public + *

The configuration information of the external data source.

+ */ + configuration: Configuration | undefined; +} + +/** + * @public + */ +export interface GetImportJobRequest { + /** + * @public + *

The identifier of the import job to retrieve.

+ */ + importJobId: string | undefined; + + /** + * @public + *

The identifier of the knowledge base that the import job belongs to.

+ */ + knowledgeBaseId: string | undefined; +} + +/** + * @public + * @enum + */ +export const ImportJobType = { + QUICK_RESPONSES: "QUICK_RESPONSES", +} as const; + +/** + * @public + */ +export type ImportJobType = (typeof ImportJobType)[keyof typeof ImportJobType]; + +/** + * @public + * @enum + */ +export const ImportJobStatus = { + COMPLETE: "COMPLETE", + DELETED: "DELETED", + DELETE_FAILED: "DELETE_FAILED", + DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS", + FAILED: "FAILED", + START_IN_PROGRESS: "START_IN_PROGRESS", +} as const; + +/** + * @public + */ +export type ImportJobStatus = (typeof ImportJobStatus)[keyof typeof ImportJobStatus]; + +/** + * @public + *

Summary information about the import job.

+ */ +export interface ImportJobData { + /** + * @public + *

The identifier of the import job.

+ */ + importJobId: string | undefined; + + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

A pointer to the uploaded asset. This value is returned by StartContentUpload.

+ */ + uploadId: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of the knowledge base.

+ */ + knowledgeBaseArn: string | undefined; + + /** + * @public + *

The type of the import job.

+ */ + importJobType: ImportJobType | undefined; + + /** + * @public + *

The status of the import job.

+ */ + status: ImportJobStatus | undefined; + + /** + * @public + *

The download link to the resource file that is uploaded to the import job.

+ */ + url: string | undefined; + + /** + * @public + *

The link to donwload the information of resource data that failed to be imported.

+ */ + failedRecordReport?: string; + + /** + * @public + *

The expiration time of the URL as an epoch timestamp.

+ */ + urlExpiry: Date | undefined; + + /** + * @public + *

The timestamp when the import job was created.

+ */ + createdTime: Date | undefined; + + /** + * @public + *

The timestamp when the import job data was last modified.

+ */ + lastModifiedTime: Date | undefined; + + /** + * @public + *

The metadata fields of the imported Amazon Q resources.

+ */ + metadata?: Record; + + /** + * @public + *

The configuration information of the external data source.

+ */ + externalSourceConfiguration?: ExternalSourceConfiguration; +} + +/** + * @public + */ +export interface GetImportJobResponse { + /** + * @public + *

The import job.

+ */ + importJob?: ImportJobData; +} + +/** + * @public + */ +export interface GetKnowledgeBaseRequest { + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + knowledgeBaseId: string | undefined; +} + +/** + * @public + */ +export interface GetKnowledgeBaseResponse { + /** + * @public + *

The knowledge base.

+ */ + knowledgeBase?: KnowledgeBaseData; +} + +/** + * @public + */ +export interface GetQuickResponseRequest { + /** + * @public + *

The identifier of the quick response.

+ */ + quickResponseId: string | undefined; + + /** + * @public + *

The identifier of the knowledge base. This should be a QUICK_RESPONSES type knowledge base.

+ */ + knowledgeBaseId: string | undefined; +} + +/** + * @public + */ +export interface GetQuickResponseResponse { + /** + * @public + *

The quick response.

+ */ + quickResponse?: QuickResponseData; +} + +/** + * @public + *

Summary information about the import job.

+ */ +export interface ImportJobSummary { + /** + * @public + *

The identifier of the import job.

+ */ + importJobId: string | undefined; + + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

A pointer to the uploaded asset. This value is returned by StartContentUpload.

+ */ + uploadId: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of the knowledge base.

+ */ + knowledgeBaseArn: string | undefined; + + /** + * @public + *

The type of import job.

+ */ + importJobType: ImportJobType | undefined; + + /** + * @public + *

The status of the import job.

+ */ + status: ImportJobStatus | undefined; + + /** + * @public + *

The timestamp when the import job was created.

+ */ + createdTime: Date | undefined; + + /** + * @public + *

The timestamp when the import job was last modified.

+ */ + lastModifiedTime: Date | undefined; + + /** + * @public + *

The metadata fields of the imported Amazon Q resources.

+ */ + metadata?: Record; + + /** + * @public + *

The configuration information of the external source that the resource data are imported from.

+ */ + externalSourceConfiguration?: ExternalSourceConfiguration; +} + +/** + * @public + */ +export interface ListImportJobsRequest { + /** + * @public + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of results to return per page.

+ */ + maxResults?: number; + + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + knowledgeBaseId: string | undefined; +} + +/** + * @public + */ +export interface ListImportJobsResponse { + /** + * @public + *

Summary information about the import jobs.

+ */ + importJobSummaries: ImportJobSummary[] | undefined; + + /** + * @public + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + nextToken?: string; +} + +/** + * @public + */ +export interface ListKnowledgeBasesRequest { + /** + * @public + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of results to return per page.

+ */ + maxResults?: number; +} + +/** + * @public + *

Summary information about the knowledge base.

+ */ +export interface KnowledgeBaseSummary { + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of the knowledge base.

+ */ + knowledgeBaseArn: string | undefined; + + /** + * @public + *

The name of the knowledge base.

+ */ + name: string | undefined; + + /** + * @public + *

The type of knowledge base.

+ */ + knowledgeBaseType: KnowledgeBaseType | undefined; + + /** + * @public + *

The status of the knowledge base summary.

+ */ + status: KnowledgeBaseStatus | undefined; + + /** + * @public + *

Configuration information about the external data source.

+ */ + sourceConfiguration?: SourceConfiguration; + + /** + * @public + *

Information about how to render the content.

+ */ + renderingConfiguration?: RenderingConfiguration; + + /** + * @public + *

The configuration information for the customer managed key used for encryption.

+ *

This KMS key must have a policy that allows kms:CreateGrant, + * kms:DescribeKey, kms:Decrypt, and + * kms:GenerateDataKey* permissions to the IAM identity using the + * key to invoke Amazon Q.

+ *

For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for + * your instance.

+ */ + serverSideEncryptionConfiguration?: ServerSideEncryptionConfiguration; + + /** + * @public + *

The description of the knowledge base.

+ */ + description?: string; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; +} + +/** + * @public + */ +export interface ListKnowledgeBasesResponse { + /** + * @public + *

Information about the knowledge bases.

+ */ + knowledgeBaseSummaries: KnowledgeBaseSummary[] | undefined; + + /** + * @public + *

If there are additional results, this is the token for the next set of results.

+ */ + nextToken?: string; +} + +/** + * @public + */ +export interface ListQuickResponsesRequest { + /** + * @public + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of results to return per page.

+ */ + maxResults?: number; + + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + knowledgeBaseId: string | undefined; +} + +/** + * @public + *

The summary information about the quick response.

+ */ +export interface QuickResponseSummary { + /** + * @public + *

The Amazon Resource Name (ARN) of the quick response.

+ */ + quickResponseArn: string | undefined; + + /** + * @public + *

The identifier of the quick response.

+ */ + quickResponseId: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of the knowledge base.

+ */ + knowledgeBaseArn: string | undefined; + + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The name of the quick response.

+ */ + name: string | undefined; + + /** + * @public + *

The media type of the quick response content.

+ *
    + *
  • + *

    Use application/x.quickresponse;format=plain for quick response written in plain text.

    + *
  • + *
  • + *

    Use application/x.quickresponse;format=markdown for quick response written in richtext.

    + *
  • + *
+ */ + contentType: string | undefined; + + /** + * @public + *

The resource status of the quick response.

+ */ + status: QuickResponseStatus | undefined; + + /** + * @public + *

The timestamp when the quick response was created.

+ */ + createdTime: Date | undefined; + + /** + * @public + *

The timestamp when the quick response summary was last modified.

+ */ + lastModifiedTime: Date | undefined; + + /** + * @public + *

The description of the quick response.

+ */ + description?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of the user who last updated the quick response data.

+ */ + lastModifiedBy?: string; + + /** + * @public + *

Whether the quick response is active.

+ */ + isActive?: boolean; + + /** + * @public + *

The Amazon Connect contact channels this quick response applies to. The supported contact channel types include Chat.

+ */ + channels?: string[]; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; +} + +/** + * @public + */ +export interface ListQuickResponsesResponse { + /** + * @public + *

Summary information about the quick responses.

+ */ + quickResponseSummaries: QuickResponseSummary[] | undefined; + + /** + * @public + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + nextToken?: string; +} + +/** + * @public + */ +export interface UpdateQuickResponseRequest { + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The identifier of the quick response.

+ */ + quickResponseId: string | undefined; + + /** + * @public + *

The name of the quick response.

+ */ + name?: string; + + /** + * @public + *

The updated content of the quick response.

+ */ + content?: QuickResponseDataProvider; + + /** + * @public + *

The media type of the quick response content.

+ *
    + *
  • + *

    Use application/x.quickresponse;format=plain for quick response written in plain text.

    + *
  • + *
  • + *

    Use application/x.quickresponse;format=markdown for quick response written in richtext.

    + *
  • + *
+ */ + contentType?: string; + + /** + * @public + *

The updated grouping configuration of the quick response.

+ */ + groupingConfiguration?: GroupingConfiguration; + + /** + * @public + *

Whether to remove the grouping configuration of the quick response.

+ */ + removeGroupingConfiguration?: boolean; + + /** + * @public + *

The updated description of the quick response.

+ */ + description?: string; + + /** + * @public + *

Whether to remove the description from the quick response.

+ */ + removeDescription?: boolean; + + /** + * @public + *

The shortcut key of the quick response. The value should be unique across the + * knowledge base.

+ */ + shortcutKey?: string; + + /** + * @public + *

Whether to remove the shortcut key of the quick response.

+ */ + removeShortcutKey?: boolean; + + /** + * @public + *

Whether the quick response is active.

+ */ + isActive?: boolean; + + /** + * @public + *

The Amazon Connect contact channels this quick response applies to. The supported contact channel types include Chat.

+ */ + channels?: string[]; + + /** + * @public + *

The language code value for the language in which the quick response is written. The supported language codes include de_DE, en_US, es_ES, + * fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, + * zh_CN, zh_TW + *

+ */ + language?: string; +} + +/** + * @public + */ +export interface UpdateQuickResponseResponse { + /** + * @public + *

The quick response.

+ */ + quickResponse?: QuickResponseData; +} + +/** + * @public + */ +export interface RemoveKnowledgeBaseTemplateUriRequest { + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + knowledgeBaseId: string | undefined; +} + +/** + * @public + */ +export interface RemoveKnowledgeBaseTemplateUriResponse {} + +/** + * @public + */ +export interface SearchContentRequest { + /** + * @public + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of results to return per page.

+ */ + maxResults?: number; + + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The search expression to filter results.

+ */ + searchExpression: SearchExpression | undefined; +} + +/** + * @public + */ +export interface SearchContentResponse { + /** + * @public + *

Summary information about the content.

+ */ + contentSummaries: ContentSummary[] | undefined; + + /** + * @public + *

If there are additional results, this is the token for the next set of results.

+ */ + nextToken?: string; +} + +/** + * @public + * @enum + */ +export const QuickResponseFilterOperator = { + EQUALS: "EQUALS", + PREFIX: "PREFIX", +} as const; + +/** + * @public + */ +export type QuickResponseFilterOperator = + (typeof QuickResponseFilterOperator)[keyof typeof QuickResponseFilterOperator]; + +/** + * @public + *

The quick response fields to filter the quick response query results by.

+ *

The following is the list of supported field names.

+ *
    + *
  • + *

    name

    + *
  • + *
  • + *

    description

    + *
  • + *
  • + *

    shortcutKey

    + *
  • + *
  • + *

    isActive

    + *
  • + *
  • + *

    channels

    + *
  • + *
  • + *

    language

    + *
  • + *
  • + *

    contentType

    + *
  • + *
  • + *

    createdTime

    + *
  • + *
  • + *

    lastModifiedTime

    + *
  • + *
  • + *

    lastModifiedBy

    + *
  • + *
  • + *

    groupingConfiguration.criteria

    + *
  • + *
  • + *

    groupingConfiguration.values

    + *
  • + *
+ */ +export interface QuickResponseFilterField { + /** + * @public + *

The name of the attribute field to filter the quick responses by.

+ */ + name: string | undefined; + + /** + * @public + *

The values of attribute field to filter the quick response by.

+ */ + values?: string[]; + + /** + * @public + *

The operator to use for filtering.

+ */ + operator: QuickResponseFilterOperator | undefined; + + /** + * @public + *

Whether to treat null value as a match for the attribute field.

+ */ + includeNoExistence?: boolean; +} + +/** + * @public + * @enum + */ +export const Order = { + ASC: "ASC", + DESC: "DESC", +} as const; + +/** + * @public + */ +export type Order = (typeof Order)[keyof typeof Order]; + +/** + * @public + *

The quick response fields to order the quick response query results by.

+ *

The following is the list of supported field names.

+ *
    + *
  • + *

    name

    + *
  • + *
  • + *

    description

    + *
  • + *
  • + *

    shortcutKey

    + *
  • + *
  • + *

    isActive

    + *
  • + *
  • + *

    channels

    + *
  • + *
  • + *

    language

    + *
  • + *
  • + *

    contentType

    + *
  • + *
  • + *

    createdTime

    + *
  • + *
  • + *

    lastModifiedTime

    + *
  • + *
  • + *

    lastModifiedBy

    + *
  • + *
  • + *

    groupingConfiguration.criteria

    + *
  • + *
  • + *

    groupingConfiguration.values

    + *
  • + *
+ */ +export interface QuickResponseOrderField { + /** + * @public + *

The name of the attribute to order the quick response query results by.

+ */ + name: string | undefined; + + /** + * @public + *

The order at which the quick responses are sorted by.

+ */ + order?: Order; +} + +/** + * @public + * @enum + */ +export const QuickResponseQueryOperator = { + CONTAINS: "CONTAINS", + CONTAINS_AND_PREFIX: "CONTAINS_AND_PREFIX", +} as const; + +/** + * @public + */ +export type QuickResponseQueryOperator = (typeof QuickResponseQueryOperator)[keyof typeof QuickResponseQueryOperator]; + +/** + * @public + * @enum + */ +export const Priority = { + HIGH: "HIGH", + LOW: "LOW", + MEDIUM: "MEDIUM", +} as const; + +/** + * @public + */ +export type Priority = (typeof Priority)[keyof typeof Priority]; + +/** + * @public + *

The quick response fields to query quick responses by.

+ *

The following is the list of supported field names.

+ *
    + *
  • + *

    content

    + *
  • + *
  • + *

    name

    + *
  • + *
  • + *

    description

    + *
  • + *
  • + *

    shortcutKey

    + *
  • + *
+ */ +export interface QuickResponseQueryField { + /** + * @public + *

The name of the attribute to query the quick responses by.

+ */ + name: string | undefined; + + /** + * @public + *

The values of the attribute to query the quick responses by.

+ */ + values: string[] | undefined; + + /** + * @public + *

The operator to use for matching attribute field values in the query.

+ */ + operator: QuickResponseQueryOperator | undefined; + + /** + * @public + *

Whether the query expects only exact matches on the attribute field values. The results of the query will only include exact matches if this parameter is set to false.

+ */ + allowFuzziness?: boolean; + + /** + * @public + *

The importance of the attribute field when calculating query result relevancy scores. + * The value set for this parameter affects the ordering of search results.

+ */ + priority?: Priority; +} + +/** + * @public + *

Information about the import job.

+ */ +export interface QuickResponseSearchExpression { + /** + * @public + *

The quick response query expressions.

+ */ + queries?: QuickResponseQueryField[]; + + /** + * @public + *

The configuration of filtering rules applied to quick response query results.

+ */ + filters?: QuickResponseFilterField[]; + + /** + * @public + *

The quick response attribute fields on which the query results are ordered.

+ */ + orderOnField?: QuickResponseOrderField; +} + +/** + * @public + */ +export interface SearchQuickResponsesRequest { + /** + * @public + *

The identifier of the knowledge base. This should be a QUICK_RESPONSES type knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The search expression for querying the quick response.

+ */ + searchExpression: QuickResponseSearchExpression | undefined; + + /** + * @public + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of results to return per page.

+ */ + maxResults?: number; + + /** + * @public + *

The user-defined Amazon Connect contact attributes to be resolved when search results are returned.

+ */ + attributes?: Record; +} + +/** + * @public + *

The result of quick response search.

+ */ +export interface QuickResponseSearchResultData { + /** + * @public + *

The Amazon Resource Name (ARN) of the quick response.

+ */ + quickResponseArn: string | undefined; + + /** + * @public + *

The identifier of the quick response.

+ */ + quickResponseId: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of the knowledge base.

+ */ + knowledgeBaseArn: string | undefined; + + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The name of the quick response.

+ */ + name: string | undefined; + + /** + * @public + *

The media type of the quick response content.

+ *
    + *
  • + *

    Use application/x.quickresponse;format=plain for quick response written in plain text.

    + *
  • + *
  • + *

    Use application/x.quickresponse;format=markdown for quick response written in richtext.

    + *
  • + *
+ */ + contentType: string | undefined; + + /** + * @public + *

The resource status of the quick response.

+ */ + status: QuickResponseStatus | undefined; + + /** + * @public + *

The contents of the quick response.

+ */ + contents: QuickResponseContents | undefined; + + /** + * @public + *

The timestamp when the quick response was created.

+ */ + createdTime: Date | undefined; + + /** + * @public + *

The timestamp when the quick response search result data was last modified.

+ */ + lastModifiedTime: Date | undefined; + + /** + * @public + *

Whether the quick response is active.

+ */ + isActive: boolean | undefined; + + /** + * @public + *

The description of the quick response.

+ */ + description?: string; + + /** + * @public + *

The configuration information of the user groups that the quick response is accessible to.

+ */ + groupingConfiguration?: GroupingConfiguration; + + /** + * @public + *

The shortcut key of the quick response. The value should be unique across the + * knowledge base.

+ */ + shortcutKey?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of the user who last updated the quick response search result data.

+ */ + lastModifiedBy?: string; + + /** + * @public + *

The Amazon Connect contact channels this quick response applies to. The supported contact channel types include Chat.

+ */ + channels?: string[]; + + /** + * @public + *

The language code value for the language in which the quick response is written.

+ */ + language?: string; + + /** + * @public + *

The user defined contact attributes that are not resolved when the search result is returned.

+ */ + attributesNotInterpolated?: string[]; + + /** + * @public + *

The user defined contact attributes that are resolved when the search result is returned.

+ */ + attributesInterpolated?: string[]; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; +} + +/** + * @public + */ +export interface SearchQuickResponsesResponse { + /** + * @public + *

The results of the quick response search.

+ */ + results: QuickResponseSearchResultData[] | undefined; + + /** + * @public + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + nextToken?: string; +} + +/** + * @public + */ +export interface StartContentUploadRequest { + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The type of content to upload.

+ */ + contentType: string | undefined; + + /** + * @public + *

The expected expiration time of the generated presigned URL, specified in minutes.

+ */ + presignedUrlTimeToLive?: number; +} + +/** + * @public + */ +export interface StartContentUploadResponse { + /** + * @public + *

The identifier of the upload.

+ */ + uploadId: string | undefined; + + /** + * @public + *

The URL of the upload.

+ */ + url: string | undefined; + + /** + * @public + *

The expiration time of the URL as an epoch timestamp.

+ */ + urlExpiry: Date | undefined; + + /** + * @public + *

The headers to include in the upload.

+ */ + headersToInclude: Record | undefined; +} + +/** + * @public + */ +export interface StartImportJobRequest { + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ *
    + *
  • + *

    For importing Amazon Q quick responses, this should be a QUICK_RESPONSES type knowledge base.

    + *
  • + *
+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The type of the import job.

+ *
    + *
  • + *

    For importing quick response resource, set the value to QUICK_RESPONSES.

    + *
  • + *
+ */ + importJobType: ImportJobType | undefined; + + /** + * @public + *

A pointer to the uploaded asset. This value is returned by StartContentUpload.

+ */ + uploadId: string | undefined; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + clientToken?: string; + + /** + * @public + *

The metadata fields of the imported Amazon Q resources.

+ */ + metadata?: Record; + + /** + * @public + *

The configuration information of the external source that the resource data are imported from.

+ */ + externalSourceConfiguration?: ExternalSourceConfiguration; +} + +/** + * @public + */ +export interface StartImportJobResponse { + /** + * @public + *

The import job.

+ */ + importJob?: ImportJobData; +} + +/** + * @public + */ +export interface UpdateKnowledgeBaseTemplateUriRequest { + /** + * @public + *

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge + * base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ */ + knowledgeBaseId: string | undefined; + + /** + * @public + *

The template URI to update.

+ */ + templateUri: string | undefined; +} + +/** + * @public + */ +export interface UpdateKnowledgeBaseTemplateUriResponse { + /** + * @public + *

The knowledge base to update.

+ */ + knowledgeBase?: KnowledgeBaseData; +} + +/** + * @public + */ +export interface ListTagsForResourceRequest { + /** + * @public + *

The Amazon Resource Name (ARN) of the resource.

+ */ + resourceArn: string | undefined; +} + +/** + * @public + */ +export interface ListTagsForResourceResponse { + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags?: Record; +} + +/** + * @public + */ +export interface TagResourceRequest { + /** + * @public + *

The Amazon Resource Name (ARN) of the resource.

+ */ + resourceArn: string | undefined; + + /** + * @public + *

The tags used to organize, track, or control access for this resource.

+ */ + tags: Record | undefined; +} + +/** + * @public + */ +export interface TagResourceResponse {} + +/** + * @public + *

Amazon Q in Connect throws this exception if you have too many tags in your tag set.

+ */ +export class TooManyTagsException extends __BaseException { + readonly name: "TooManyTagsException" = "TooManyTagsException"; + readonly $fault: "client" = "client"; + /** + * @public + *

The specified resource name.

+ */ + resourceName?: string; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "TooManyTagsException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, TooManyTagsException.prototype); + this.resourceName = opts.resourceName; + } +} + +/** + * @public + */ +export interface UntagResourceRequest { + /** + * @public + *

The Amazon Resource Name (ARN) of the resource.

+ */ + resourceArn: string | undefined; + + /** + * @public + *

The tag keys.

+ */ + tagKeys: string[] | undefined; +} + +/** + * @public + */ +export interface UntagResourceResponse {} + +/** + * @public + *

Details about the data.

+ */ +export type DataDetails = + | DataDetails.ContentDataMember + | DataDetails.GenerativeDataMember + | DataDetails.SourceContentDataMember + | DataDetails.$UnknownMember; + +/** + * @public + */ +export namespace DataDetails { + /** + * @public + *

Details about the content data.

+ */ + export interface ContentDataMember { + contentData: ContentDataDetails; + generativeData?: never; + sourceContentData?: never; + $unknown?: never; + } + + /** + * @public + *

Details about the generative data.

+ */ + export interface GenerativeDataMember { + contentData?: never; + generativeData: GenerativeDataDetails; + sourceContentData?: never; + $unknown?: never; + } + + /** + * @public + *

Details about the content data.

+ */ + export interface SourceContentDataMember { + contentData?: never; + generativeData?: never; + sourceContentData: SourceContentDataDetails; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + contentData?: never; + generativeData?: never; + sourceContentData?: never; + $unknown: [string, any]; + } + + export interface Visitor { + contentData: (value: ContentDataDetails) => T; + generativeData: (value: GenerativeDataDetails) => T; + sourceContentData: (value: SourceContentDataDetails) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: DataDetails, visitor: Visitor): T => { + if (value.contentData !== undefined) return visitor.contentData(value.contentData); + if (value.generativeData !== undefined) return visitor.generativeData(value.generativeData); + if (value.sourceContentData !== undefined) return visitor.sourceContentData(value.sourceContentData); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + *

Summary of the data.

+ */ +export interface DataSummary { + /** + * @public + *

Reference information about the content.

+ */ + reference: DataReference | undefined; + + /** + * @public + *

Details about the data.

+ */ + details: DataDetails | undefined; +} + +/** + * @public + *

Details about generative data.

+ */ +export interface GenerativeDataDetails { + /** + * @public + *

The LLM response.

+ */ + completion: string | undefined; + + /** + * @public + *

The references used to generative the LLM response.

+ */ + references: DataSummary[] | undefined; + + /** + * @public + *

Details about the generative content ranking data.

+ */ + rankingData: RankingData | undefined; +} + +/** + * @public + *

Information about the recommendation.

+ */ +export interface RecommendationData { + /** + * @public + *

The identifier of the recommendation.

+ */ + recommendationId: string | undefined; + + /** + * @public + *

The recommended document.

+ */ + document?: Document; + + /** + * @public + *

The relevance score of the recommendation.

+ */ + relevanceScore?: number; + + /** + * @public + *

The relevance level of the recommendation.

+ */ + relevanceLevel?: RelevanceLevel; + + /** + * @public + *

The type of recommendation.

+ */ + type?: RecommendationType; + + /** + * @public + *

Summary of the recommended content.

+ */ + data?: DataSummary; +} + +/** + * @public + *

Information about the result.

+ */ +export interface ResultData { + /** + * @public + *

The identifier of the result data.

+ */ + resultId: string | undefined; + + /** + * @public + *

The document.

+ */ + document?: Document; + + /** + * @public + *

The relevance score of the results.

+ */ + relevanceScore?: number; + + /** + * @public + *

Summary of the recommended content.

+ */ + data?: DataSummary; + + /** + * @public + *

The type of the query result.

+ */ + type?: QueryResultType; +} + +/** + * @public + */ +export interface GetRecommendationsResponse { + /** + * @public + *

The recommendations.

+ */ + recommendations: RecommendationData[] | undefined; + + /** + * @public + *

The triggers corresponding to recommendations.

+ */ + triggers?: RecommendationTrigger[]; +} + +/** + * @public + */ +export interface QueryAssistantResponse { + /** + * @public + *

The results of the query.

+ */ + results: ResultData[] | undefined; + + /** + * @public + *

If there are additional results, this is the token for the next set of results.

+ */ + nextToken?: string; +} + +/** + * @internal + */ +export const DocumentTextFilterSensitiveLog = (obj: DocumentText): any => ({ + ...obj, + ...(obj.text && { text: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const TextDataFilterSensitiveLog = (obj: TextData): any => ({ + ...obj, + ...(obj.title && { title: DocumentTextFilterSensitiveLog(obj.title) }), + ...(obj.excerpt && { excerpt: DocumentTextFilterSensitiveLog(obj.excerpt) }), +}); + +/** + * @internal + */ +export const ContentDataDetailsFilterSensitiveLog = (obj: ContentDataDetails): any => ({ + ...obj, + ...(obj.textData && { textData: TextDataFilterSensitiveLog(obj.textData) }), +}); + +/** + * @internal + */ +export const SourceContentDataDetailsFilterSensitiveLog = (obj: SourceContentDataDetails): any => ({ + ...obj, + ...(obj.textData && { textData: TextDataFilterSensitiveLog(obj.textData) }), +}); + +/** + * @internal + */ +export const DocumentFilterSensitiveLog = (obj: Document): any => ({ + ...obj, + ...(obj.title && { title: DocumentTextFilterSensitiveLog(obj.title) }), + ...(obj.excerpt && { excerpt: DocumentTextFilterSensitiveLog(obj.excerpt) }), +}); + +/** + * @internal + */ +export const QueryRecommendationTriggerDataFilterSensitiveLog = (obj: QueryRecommendationTriggerData): any => ({ + ...obj, + ...(obj.text && { text: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const RecommendationTriggerDataFilterSensitiveLog = (obj: RecommendationTriggerData): any => { + if (obj.query !== undefined) return { query: QueryRecommendationTriggerDataFilterSensitiveLog(obj.query) }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; +}; + +/** + * @internal + */ +export const RecommendationTriggerFilterSensitiveLog = (obj: RecommendationTrigger): any => ({ + ...obj, + ...(obj.data && { data: RecommendationTriggerDataFilterSensitiveLog(obj.data) }), +}); + +/** + * @internal + */ +export const QueryAssistantRequestFilterSensitiveLog = (obj: QueryAssistantRequest): any => ({ + ...obj, + ...(obj.queryText && { queryText: SENSITIVE_STRING }), + ...(obj.queryCondition && { queryCondition: obj.queryCondition.map((item) => item) }), +}); + +/** + * @internal + */ +export const ContentDataFilterSensitiveLog = (obj: ContentData): any => ({ + ...obj, + ...(obj.url && { url: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const CreateContentResponseFilterSensitiveLog = (obj: CreateContentResponse): any => ({ + ...obj, + ...(obj.content && { content: ContentDataFilterSensitiveLog(obj.content) }), +}); + +/** + * @internal + */ +export const GetContentResponseFilterSensitiveLog = (obj: GetContentResponse): any => ({ + ...obj, + ...(obj.content && { content: ContentDataFilterSensitiveLog(obj.content) }), +}); + +/** + * @internal + */ +export const UpdateContentResponseFilterSensitiveLog = (obj: UpdateContentResponse): any => ({ + ...obj, + ...(obj.content && { content: ContentDataFilterSensitiveLog(obj.content) }), +}); + +/** + * @internal + */ +export const QuickResponseDataProviderFilterSensitiveLog = (obj: QuickResponseDataProvider): any => { + if (obj.content !== undefined) return { content: SENSITIVE_STRING }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; +}; + +/** + * @internal + */ +export const GroupingConfigurationFilterSensitiveLog = (obj: GroupingConfiguration): any => ({ + ...obj, + ...(obj.criteria && { criteria: SENSITIVE_STRING }), + ...(obj.values && { values: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const CreateQuickResponseRequestFilterSensitiveLog = (obj: CreateQuickResponseRequest): any => ({ + ...obj, + ...(obj.content && { content: QuickResponseDataProviderFilterSensitiveLog(obj.content) }), + ...(obj.groupingConfiguration && { + groupingConfiguration: GroupingConfigurationFilterSensitiveLog(obj.groupingConfiguration), + }), + ...(obj.channels && { channels: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const QuickResponseContentProviderFilterSensitiveLog = (obj: QuickResponseContentProvider): any => { + if (obj.content !== undefined) return { content: SENSITIVE_STRING }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; +}; + +/** + * @internal + */ +export const QuickResponseContentsFilterSensitiveLog = (obj: QuickResponseContents): any => ({ + ...obj, + ...(obj.plainText && { plainText: QuickResponseContentProviderFilterSensitiveLog(obj.plainText) }), + ...(obj.markdown && { markdown: QuickResponseContentProviderFilterSensitiveLog(obj.markdown) }), +}); + +/** + * @internal + */ +export const QuickResponseDataFilterSensitiveLog = (obj: QuickResponseData): any => ({ + ...obj, + ...(obj.contents && { contents: QuickResponseContentsFilterSensitiveLog(obj.contents) }), + ...(obj.groupingConfiguration && { + groupingConfiguration: GroupingConfigurationFilterSensitiveLog(obj.groupingConfiguration), + }), + ...(obj.channels && { channels: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const CreateQuickResponseResponseFilterSensitiveLog = (obj: CreateQuickResponseResponse): any => ({ + ...obj, + ...(obj.quickResponse && { quickResponse: QuickResponseDataFilterSensitiveLog(obj.quickResponse) }), +}); + +/** + * @internal + */ +export const ImportJobDataFilterSensitiveLog = (obj: ImportJobData): any => ({ + ...obj, + ...(obj.url && { url: SENSITIVE_STRING }), + ...(obj.failedRecordReport && { failedRecordReport: SENSITIVE_STRING }), + ...(obj.externalSourceConfiguration && { externalSourceConfiguration: obj.externalSourceConfiguration }), +}); + +/** + * @internal + */ +export const GetImportJobResponseFilterSensitiveLog = (obj: GetImportJobResponse): any => ({ + ...obj, + ...(obj.importJob && { importJob: ImportJobDataFilterSensitiveLog(obj.importJob) }), +}); + +/** + * @internal + */ +export const GetQuickResponseResponseFilterSensitiveLog = (obj: GetQuickResponseResponse): any => ({ + ...obj, + ...(obj.quickResponse && { quickResponse: QuickResponseDataFilterSensitiveLog(obj.quickResponse) }), +}); + +/** + * @internal + */ +export const QuickResponseSummaryFilterSensitiveLog = (obj: QuickResponseSummary): any => ({ + ...obj, + ...(obj.channels && { channels: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const ListQuickResponsesResponseFilterSensitiveLog = (obj: ListQuickResponsesResponse): any => ({ + ...obj, + ...(obj.quickResponseSummaries && { + quickResponseSummaries: obj.quickResponseSummaries.map((item) => QuickResponseSummaryFilterSensitiveLog(item)), + }), +}); + +/** + * @internal + */ +export const UpdateQuickResponseRequestFilterSensitiveLog = (obj: UpdateQuickResponseRequest): any => ({ + ...obj, + ...(obj.content && { content: QuickResponseDataProviderFilterSensitiveLog(obj.content) }), + ...(obj.groupingConfiguration && { + groupingConfiguration: GroupingConfigurationFilterSensitiveLog(obj.groupingConfiguration), + }), + ...(obj.channels && { channels: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const UpdateQuickResponseResponseFilterSensitiveLog = (obj: UpdateQuickResponseResponse): any => ({ + ...obj, + ...(obj.quickResponse && { quickResponse: QuickResponseDataFilterSensitiveLog(obj.quickResponse) }), +}); + +/** + * @internal + */ +export const SearchQuickResponsesRequestFilterSensitiveLog = (obj: SearchQuickResponsesRequest): any => ({ + ...obj, + ...(obj.attributes && { attributes: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const QuickResponseSearchResultDataFilterSensitiveLog = (obj: QuickResponseSearchResultData): any => ({ + ...obj, + ...(obj.contents && { contents: QuickResponseContentsFilterSensitiveLog(obj.contents) }), + ...(obj.groupingConfiguration && { + groupingConfiguration: GroupingConfigurationFilterSensitiveLog(obj.groupingConfiguration), + }), + ...(obj.channels && { channels: SENSITIVE_STRING }), + ...(obj.attributesNotInterpolated && { attributesNotInterpolated: SENSITIVE_STRING }), + ...(obj.attributesInterpolated && { attributesInterpolated: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const SearchQuickResponsesResponseFilterSensitiveLog = (obj: SearchQuickResponsesResponse): any => ({ + ...obj, + ...(obj.results && { results: obj.results.map((item) => QuickResponseSearchResultDataFilterSensitiveLog(item)) }), +}); + +/** + * @internal + */ +export const StartContentUploadResponseFilterSensitiveLog = (obj: StartContentUploadResponse): any => ({ + ...obj, + ...(obj.url && { url: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const StartImportJobResponseFilterSensitiveLog = (obj: StartImportJobResponse): any => ({ + ...obj, + ...(obj.importJob && { importJob: ImportJobDataFilterSensitiveLog(obj.importJob) }), +}); + +/** + * @internal + */ +export const DataDetailsFilterSensitiveLog = (obj: DataDetails): any => { + if (obj.contentData !== undefined) return { contentData: ContentDataDetailsFilterSensitiveLog(obj.contentData) }; + if (obj.generativeData !== undefined) + return { generativeData: GenerativeDataDetailsFilterSensitiveLog(obj.generativeData) }; + if (obj.sourceContentData !== undefined) + return { sourceContentData: SourceContentDataDetailsFilterSensitiveLog(obj.sourceContentData) }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; +}; + +/** + * @internal + */ +export const DataSummaryFilterSensitiveLog = (obj: DataSummary): any => ({ + ...obj, + ...(obj.reference && { reference: obj.reference }), + ...(obj.details && { details: DataDetailsFilterSensitiveLog(obj.details) }), +}); + +/** + * @internal + */ +export const GenerativeDataDetailsFilterSensitiveLog = (obj: GenerativeDataDetails): any => ({ + ...obj, + ...(obj.completion && { completion: SENSITIVE_STRING }), + ...(obj.references && { references: obj.references.map((item) => DataSummaryFilterSensitiveLog(item)) }), +}); + +/** + * @internal + */ +export const RecommendationDataFilterSensitiveLog = (obj: RecommendationData): any => ({ + ...obj, + ...(obj.document && { document: DocumentFilterSensitiveLog(obj.document) }), + ...(obj.data && { data: DataSummaryFilterSensitiveLog(obj.data) }), +}); + +/** + * @internal + */ +export const ResultDataFilterSensitiveLog = (obj: ResultData): any => ({ + ...obj, + ...(obj.document && { document: DocumentFilterSensitiveLog(obj.document) }), + ...(obj.data && { data: DataSummaryFilterSensitiveLog(obj.data) }), +}); + +/** + * @internal + */ +export const GetRecommendationsResponseFilterSensitiveLog = (obj: GetRecommendationsResponse): any => ({ + ...obj, + ...(obj.recommendations && { + recommendations: obj.recommendations.map((item) => RecommendationDataFilterSensitiveLog(item)), + }), + ...(obj.triggers && { triggers: obj.triggers.map((item) => RecommendationTriggerFilterSensitiveLog(item)) }), +}); + +/** + * @internal + */ +export const QueryAssistantResponseFilterSensitiveLog = (obj: QueryAssistantResponse): any => ({ + ...obj, + ...(obj.results && { results: obj.results.map((item) => ResultDataFilterSensitiveLog(item)) }), +}); diff --git a/clients/client-qconnect/src/pagination/Interfaces.ts b/clients/client-qconnect/src/pagination/Interfaces.ts new file mode 100644 index 0000000000000..c1dab9f7ff0f5 --- /dev/null +++ b/clients/client-qconnect/src/pagination/Interfaces.ts @@ -0,0 +1,11 @@ +// smithy-typescript generated code +import { PaginationConfiguration } from "@smithy/types"; + +import { QConnectClient } from "../QConnectClient"; + +/** + * @public + */ +export interface QConnectPaginationConfiguration extends PaginationConfiguration { + client: QConnectClient; +} diff --git a/clients/client-qconnect/src/pagination/ListAssistantAssociationsPaginator.ts b/clients/client-qconnect/src/pagination/ListAssistantAssociationsPaginator.ts new file mode 100644 index 0000000000000..3397c13397dd5 --- /dev/null +++ b/clients/client-qconnect/src/pagination/ListAssistantAssociationsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListAssistantAssociationsCommand, + ListAssistantAssociationsCommandInput, + ListAssistantAssociationsCommandOutput, +} from "../commands/ListAssistantAssociationsCommand"; +import { QConnectClient } from "../QConnectClient"; +import { QConnectPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QConnectClient, + input: ListAssistantAssociationsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListAssistantAssociationsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListAssistantAssociations( + config: QConnectPaginationConfiguration, + input: ListAssistantAssociationsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListAssistantAssociationsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QConnectClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QConnect | QConnectClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qconnect/src/pagination/ListAssistantsPaginator.ts b/clients/client-qconnect/src/pagination/ListAssistantsPaginator.ts new file mode 100644 index 0000000000000..6db0339f5f8a4 --- /dev/null +++ b/clients/client-qconnect/src/pagination/ListAssistantsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListAssistantsCommand, + ListAssistantsCommandInput, + ListAssistantsCommandOutput, +} from "../commands/ListAssistantsCommand"; +import { QConnectClient } from "../QConnectClient"; +import { QConnectPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QConnectClient, + input: ListAssistantsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListAssistantsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListAssistants( + config: QConnectPaginationConfiguration, + input: ListAssistantsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListAssistantsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QConnectClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QConnect | QConnectClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qconnect/src/pagination/ListContentsPaginator.ts b/clients/client-qconnect/src/pagination/ListContentsPaginator.ts new file mode 100644 index 0000000000000..c602481ed1e30 --- /dev/null +++ b/clients/client-qconnect/src/pagination/ListContentsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListContentsCommand, + ListContentsCommandInput, + ListContentsCommandOutput, +} from "../commands/ListContentsCommand"; +import { QConnectClient } from "../QConnectClient"; +import { QConnectPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QConnectClient, + input: ListContentsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListContentsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListContents( + config: QConnectPaginationConfiguration, + input: ListContentsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListContentsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QConnectClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QConnect | QConnectClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qconnect/src/pagination/ListImportJobsPaginator.ts b/clients/client-qconnect/src/pagination/ListImportJobsPaginator.ts new file mode 100644 index 0000000000000..3f08bce638bd8 --- /dev/null +++ b/clients/client-qconnect/src/pagination/ListImportJobsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListImportJobsCommand, + ListImportJobsCommandInput, + ListImportJobsCommandOutput, +} from "../commands/ListImportJobsCommand"; +import { QConnectClient } from "../QConnectClient"; +import { QConnectPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QConnectClient, + input: ListImportJobsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListImportJobsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListImportJobs( + config: QConnectPaginationConfiguration, + input: ListImportJobsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListImportJobsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QConnectClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QConnect | QConnectClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qconnect/src/pagination/ListKnowledgeBasesPaginator.ts b/clients/client-qconnect/src/pagination/ListKnowledgeBasesPaginator.ts new file mode 100644 index 0000000000000..662639ee6660f --- /dev/null +++ b/clients/client-qconnect/src/pagination/ListKnowledgeBasesPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListKnowledgeBasesCommand, + ListKnowledgeBasesCommandInput, + ListKnowledgeBasesCommandOutput, +} from "../commands/ListKnowledgeBasesCommand"; +import { QConnectClient } from "../QConnectClient"; +import { QConnectPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QConnectClient, + input: ListKnowledgeBasesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListKnowledgeBasesCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListKnowledgeBases( + config: QConnectPaginationConfiguration, + input: ListKnowledgeBasesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListKnowledgeBasesCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QConnectClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QConnect | QConnectClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qconnect/src/pagination/ListQuickResponsesPaginator.ts b/clients/client-qconnect/src/pagination/ListQuickResponsesPaginator.ts new file mode 100644 index 0000000000000..4a0a13bdf90d8 --- /dev/null +++ b/clients/client-qconnect/src/pagination/ListQuickResponsesPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListQuickResponsesCommand, + ListQuickResponsesCommandInput, + ListQuickResponsesCommandOutput, +} from "../commands/ListQuickResponsesCommand"; +import { QConnectClient } from "../QConnectClient"; +import { QConnectPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QConnectClient, + input: ListQuickResponsesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListQuickResponsesCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListQuickResponses( + config: QConnectPaginationConfiguration, + input: ListQuickResponsesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListQuickResponsesCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QConnectClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QConnect | QConnectClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qconnect/src/pagination/QueryAssistantPaginator.ts b/clients/client-qconnect/src/pagination/QueryAssistantPaginator.ts new file mode 100644 index 0000000000000..d25ec1f9bf1aa --- /dev/null +++ b/clients/client-qconnect/src/pagination/QueryAssistantPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + QueryAssistantCommand, + QueryAssistantCommandInput, + QueryAssistantCommandOutput, +} from "../commands/QueryAssistantCommand"; +import { QConnectClient } from "../QConnectClient"; +import { QConnectPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QConnectClient, + input: QueryAssistantCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new QueryAssistantCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateQueryAssistant( + config: QConnectPaginationConfiguration, + input: QueryAssistantCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: QueryAssistantCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QConnectClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QConnect | QConnectClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qconnect/src/pagination/SearchContentPaginator.ts b/clients/client-qconnect/src/pagination/SearchContentPaginator.ts new file mode 100644 index 0000000000000..c00a6433d6535 --- /dev/null +++ b/clients/client-qconnect/src/pagination/SearchContentPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + SearchContentCommand, + SearchContentCommandInput, + SearchContentCommandOutput, +} from "../commands/SearchContentCommand"; +import { QConnectClient } from "../QConnectClient"; +import { QConnectPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QConnectClient, + input: SearchContentCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new SearchContentCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateSearchContent( + config: QConnectPaginationConfiguration, + input: SearchContentCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: SearchContentCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QConnectClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QConnect | QConnectClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qconnect/src/pagination/SearchQuickResponsesPaginator.ts b/clients/client-qconnect/src/pagination/SearchQuickResponsesPaginator.ts new file mode 100644 index 0000000000000..4105f58a0f5ce --- /dev/null +++ b/clients/client-qconnect/src/pagination/SearchQuickResponsesPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + SearchQuickResponsesCommand, + SearchQuickResponsesCommandInput, + SearchQuickResponsesCommandOutput, +} from "../commands/SearchQuickResponsesCommand"; +import { QConnectClient } from "../QConnectClient"; +import { QConnectPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QConnectClient, + input: SearchQuickResponsesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new SearchQuickResponsesCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateSearchQuickResponses( + config: QConnectPaginationConfiguration, + input: SearchQuickResponsesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: SearchQuickResponsesCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QConnectClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QConnect | QConnectClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qconnect/src/pagination/SearchSessionsPaginator.ts b/clients/client-qconnect/src/pagination/SearchSessionsPaginator.ts new file mode 100644 index 0000000000000..18da0cf33035f --- /dev/null +++ b/clients/client-qconnect/src/pagination/SearchSessionsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + SearchSessionsCommand, + SearchSessionsCommandInput, + SearchSessionsCommandOutput, +} from "../commands/SearchSessionsCommand"; +import { QConnectClient } from "../QConnectClient"; +import { QConnectPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QConnectClient, + input: SearchSessionsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new SearchSessionsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateSearchSessions( + config: QConnectPaginationConfiguration, + input: SearchSessionsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: SearchSessionsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QConnectClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QConnect | QConnectClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qconnect/src/pagination/index.ts b/clients/client-qconnect/src/pagination/index.ts new file mode 100644 index 0000000000000..a68c79acdfbe8 --- /dev/null +++ b/clients/client-qconnect/src/pagination/index.ts @@ -0,0 +1,12 @@ +// smithy-typescript generated code +export * from "./Interfaces"; +export * from "./ListAssistantAssociationsPaginator"; +export * from "./ListAssistantsPaginator"; +export * from "./ListContentsPaginator"; +export * from "./ListImportJobsPaginator"; +export * from "./ListKnowledgeBasesPaginator"; +export * from "./ListQuickResponsesPaginator"; +export * from "./QueryAssistantPaginator"; +export * from "./SearchContentPaginator"; +export * from "./SearchQuickResponsesPaginator"; +export * from "./SearchSessionsPaginator"; diff --git a/clients/client-qconnect/src/protocols/Aws_restJson1.ts b/clients/client-qconnect/src/protocols/Aws_restJson1.ts new file mode 100644 index 0000000000000..088c76815c564 --- /dev/null +++ b/clients/client-qconnect/src/protocols/Aws_restJson1.ts @@ -0,0 +1,4487 @@ +// smithy-typescript generated code +import { awsExpectUnion as __expectUnion } from "@aws-sdk/core"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { + _json, + collectBody, + decorateServiceException as __decorateServiceException, + expectBoolean as __expectBoolean, + expectNonNull as __expectNonNull, + expectNumber as __expectNumber, + expectObject as __expectObject, + expectString as __expectString, + extendedEncodeURIComponent as __extendedEncodeURIComponent, + limitedParseDouble as __limitedParseDouble, + map, + parseEpochTimestamp as __parseEpochTimestamp, + resolvedPath as __resolvedPath, + take, + withBaseException, +} from "@smithy/smithy-client"; +import { + Endpoint as __Endpoint, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, +} from "@smithy/types"; +import { v4 as generateIdempotencyToken } from "uuid"; + +import { + CreateAssistantAssociationCommandInput, + CreateAssistantAssociationCommandOutput, +} from "../commands/CreateAssistantAssociationCommand"; +import { CreateAssistantCommandInput, CreateAssistantCommandOutput } from "../commands/CreateAssistantCommand"; +import { CreateContentCommandInput, CreateContentCommandOutput } from "../commands/CreateContentCommand"; +import { + CreateKnowledgeBaseCommandInput, + CreateKnowledgeBaseCommandOutput, +} from "../commands/CreateKnowledgeBaseCommand"; +import { + CreateQuickResponseCommandInput, + CreateQuickResponseCommandOutput, +} from "../commands/CreateQuickResponseCommand"; +import { CreateSessionCommandInput, CreateSessionCommandOutput } from "../commands/CreateSessionCommand"; +import { + DeleteAssistantAssociationCommandInput, + DeleteAssistantAssociationCommandOutput, +} from "../commands/DeleteAssistantAssociationCommand"; +import { DeleteAssistantCommandInput, DeleteAssistantCommandOutput } from "../commands/DeleteAssistantCommand"; +import { DeleteContentCommandInput, DeleteContentCommandOutput } from "../commands/DeleteContentCommand"; +import { DeleteImportJobCommandInput, DeleteImportJobCommandOutput } from "../commands/DeleteImportJobCommand"; +import { + DeleteKnowledgeBaseCommandInput, + DeleteKnowledgeBaseCommandOutput, +} from "../commands/DeleteKnowledgeBaseCommand"; +import { + DeleteQuickResponseCommandInput, + DeleteQuickResponseCommandOutput, +} from "../commands/DeleteQuickResponseCommand"; +import { + GetAssistantAssociationCommandInput, + GetAssistantAssociationCommandOutput, +} from "../commands/GetAssistantAssociationCommand"; +import { GetAssistantCommandInput, GetAssistantCommandOutput } from "../commands/GetAssistantCommand"; +import { GetContentCommandInput, GetContentCommandOutput } from "../commands/GetContentCommand"; +import { GetContentSummaryCommandInput, GetContentSummaryCommandOutput } from "../commands/GetContentSummaryCommand"; +import { GetImportJobCommandInput, GetImportJobCommandOutput } from "../commands/GetImportJobCommand"; +import { GetKnowledgeBaseCommandInput, GetKnowledgeBaseCommandOutput } from "../commands/GetKnowledgeBaseCommand"; +import { GetQuickResponseCommandInput, GetQuickResponseCommandOutput } from "../commands/GetQuickResponseCommand"; +import { GetRecommendationsCommandInput, GetRecommendationsCommandOutput } from "../commands/GetRecommendationsCommand"; +import { GetSessionCommandInput, GetSessionCommandOutput } from "../commands/GetSessionCommand"; +import { + ListAssistantAssociationsCommandInput, + ListAssistantAssociationsCommandOutput, +} from "../commands/ListAssistantAssociationsCommand"; +import { ListAssistantsCommandInput, ListAssistantsCommandOutput } from "../commands/ListAssistantsCommand"; +import { ListContentsCommandInput, ListContentsCommandOutput } from "../commands/ListContentsCommand"; +import { ListImportJobsCommandInput, ListImportJobsCommandOutput } from "../commands/ListImportJobsCommand"; +import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "../commands/ListKnowledgeBasesCommand"; +import { ListQuickResponsesCommandInput, ListQuickResponsesCommandOutput } from "../commands/ListQuickResponsesCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "../commands/ListTagsForResourceCommand"; +import { + NotifyRecommendationsReceivedCommandInput, + NotifyRecommendationsReceivedCommandOutput, +} from "../commands/NotifyRecommendationsReceivedCommand"; +import { QueryAssistantCommandInput, QueryAssistantCommandOutput } from "../commands/QueryAssistantCommand"; +import { + RemoveKnowledgeBaseTemplateUriCommandInput, + RemoveKnowledgeBaseTemplateUriCommandOutput, +} from "../commands/RemoveKnowledgeBaseTemplateUriCommand"; +import { SearchContentCommandInput, SearchContentCommandOutput } from "../commands/SearchContentCommand"; +import { + SearchQuickResponsesCommandInput, + SearchQuickResponsesCommandOutput, +} from "../commands/SearchQuickResponsesCommand"; +import { SearchSessionsCommandInput, SearchSessionsCommandOutput } from "../commands/SearchSessionsCommand"; +import { StartContentUploadCommandInput, StartContentUploadCommandOutput } from "../commands/StartContentUploadCommand"; +import { StartImportJobCommandInput, StartImportJobCommandOutput } from "../commands/StartImportJobCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; +import { UpdateContentCommandInput, UpdateContentCommandOutput } from "../commands/UpdateContentCommand"; +import { + UpdateKnowledgeBaseTemplateUriCommandInput, + UpdateKnowledgeBaseTemplateUriCommandOutput, +} from "../commands/UpdateKnowledgeBaseTemplateUriCommand"; +import { + UpdateQuickResponseCommandInput, + UpdateQuickResponseCommandOutput, +} from "../commands/UpdateQuickResponseCommand"; +import { + AccessDeniedException, + AppIntegrationsConfiguration, + AssistantAssociationInputData, + Configuration, + ConflictException, + ConnectConfiguration, + ContentData, + ContentDataDetails, + DataDetails, + DataSummary, + ExternalSourceConfiguration, + Filter, + GenerativeDataDetails, + GroupingConfiguration, + ImportJobData, + ImportJobSummary, + KnowledgeBaseData, + PreconditionFailedException, + QueryCondition, + QueryConditionItem, + QuickResponseData, + QuickResponseDataProvider, + QuickResponseFilterField, + QuickResponseOrderField, + QuickResponseQueryField, + QuickResponseSearchExpression, + QuickResponseSearchResultData, + QuickResponseSummary, + RankingData, + RecommendationData, + RenderingConfiguration, + RequestTimeoutException, + ResourceNotFoundException, + ResultData, + SearchExpression, + ServerSideEncryptionConfiguration, + ServiceQuotaExceededException, + SourceConfiguration, + SourceContentDataDetails, + TooManyTagsException, + ValidationException, +} from "../models/models_0"; +import { QConnectServiceException as __BaseException } from "../models/QConnectServiceException"; + +/** + * serializeAws_restJson1CreateAssistantCommand + */ +export const se_CreateAssistantCommand = async ( + input: CreateAssistantCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants"; + let body: any; + body = JSON.stringify( + take(input, { + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + description: [], + name: [], + serverSideEncryptionConfiguration: (_) => _json(_), + tags: (_) => _json(_), + type: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1CreateAssistantAssociationCommand + */ +export const se_CreateAssistantAssociationCommand = async ( + input: CreateAssistantAssociationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/associations"; + resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId!, "{assistantId}", false); + let body: any; + body = JSON.stringify( + take(input, { + association: (_) => _json(_), + associationType: [], + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + tags: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1CreateContentCommand + */ +export const se_CreateContentCommand = async ( + input: CreateContentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/contents"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + metadata: (_) => _json(_), + name: [], + overrideLinkOutUri: [], + tags: (_) => _json(_), + title: [], + uploadId: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1CreateKnowledgeBaseCommand + */ +export const se_CreateKnowledgeBaseCommand = async ( + input: CreateKnowledgeBaseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases"; + let body: any; + body = JSON.stringify( + take(input, { + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + description: [], + knowledgeBaseType: [], + name: [], + renderingConfiguration: (_) => _json(_), + serverSideEncryptionConfiguration: (_) => _json(_), + sourceConfiguration: (_) => _json(_), + tags: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1CreateQuickResponseCommand + */ +export const se_CreateQuickResponseCommand = async ( + input: CreateQuickResponseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/quickResponses"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + channels: (_) => _json(_), + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + content: (_) => _json(_), + contentType: [], + description: [], + groupingConfiguration: (_) => _json(_), + isActive: [], + language: [], + name: [], + shortcutKey: [], + tags: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1CreateSessionCommand + */ +export const se_CreateSessionCommand = async ( + input: CreateSessionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/sessions"; + resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId!, "{assistantId}", false); + let body: any; + body = JSON.stringify( + take(input, { + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + description: [], + name: [], + tags: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1DeleteAssistantCommand + */ +export const se_DeleteAssistantCommand = async ( + input: DeleteAssistantCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}"; + resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId!, "{assistantId}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1DeleteAssistantAssociationCommand + */ +export const se_DeleteAssistantAssociationCommand = async ( + input: DeleteAssistantAssociationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/assistants/{assistantId}/associations/{assistantAssociationId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "assistantAssociationId", + () => input.assistantAssociationId!, + "{assistantAssociationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId!, "{assistantId}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1DeleteContentCommand + */ +export const se_DeleteContentCommand = async ( + input: DeleteContentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "contentId", () => input.contentId!, "{contentId}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1DeleteImportJobCommand + */ +export const se_DeleteImportJobCommand = async ( + input: DeleteImportJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/importJobs/{importJobId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "importJobId", () => input.importJobId!, "{importJobId}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1DeleteKnowledgeBaseCommand + */ +export const se_DeleteKnowledgeBaseCommand = async ( + input: DeleteKnowledgeBaseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases/{knowledgeBaseId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1DeleteQuickResponseCommand + */ +export const se_DeleteQuickResponseCommand = async ( + input: DeleteQuickResponseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "quickResponseId", + () => input.quickResponseId!, + "{quickResponseId}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetAssistantCommand + */ +export const se_GetAssistantCommand = async ( + input: GetAssistantCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}"; + resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId!, "{assistantId}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetAssistantAssociationCommand + */ +export const se_GetAssistantAssociationCommand = async ( + input: GetAssistantAssociationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/assistants/{assistantId}/associations/{assistantAssociationId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "assistantAssociationId", + () => input.assistantAssociationId!, + "{assistantAssociationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId!, "{assistantId}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetContentCommand + */ +export const se_GetContentCommand = async ( + input: GetContentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}"; + resolvedPath = __resolvedPath(resolvedPath, input, "contentId", () => input.contentId!, "{contentId}", false); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetContentSummaryCommand + */ +export const se_GetContentSummaryCommand = async ( + input: GetContentSummaryCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}/summary"; + resolvedPath = __resolvedPath(resolvedPath, input, "contentId", () => input.contentId!, "{contentId}", false); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetImportJobCommand + */ +export const se_GetImportJobCommand = async ( + input: GetImportJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/importJobs/{importJobId}"; + resolvedPath = __resolvedPath(resolvedPath, input, "importJobId", () => input.importJobId!, "{importJobId}", false); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetKnowledgeBaseCommand + */ +export const se_GetKnowledgeBaseCommand = async ( + input: GetKnowledgeBaseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases/{knowledgeBaseId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetQuickResponseCommand + */ +export const se_GetQuickResponseCommand = async ( + input: GetQuickResponseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "quickResponseId", + () => input.quickResponseId!, + "{quickResponseId}", + false + ); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetRecommendationsCommand + */ +export const se_GetRecommendationsCommand = async ( + input: GetRecommendationsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/assistants/{assistantId}/sessions/{sessionId}/recommendations"; + resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId!, "{assistantId}", false); + resolvedPath = __resolvedPath(resolvedPath, input, "sessionId", () => input.sessionId!, "{sessionId}", false); + const query: any = map({ + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + waitTimeSeconds: [() => input.waitTimeSeconds !== void 0, () => input.waitTimeSeconds!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1GetSessionCommand + */ +export const se_GetSessionCommand = async ( + input: GetSessionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/assistants/{assistantId}/sessions/{sessionId}"; + resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId!, "{assistantId}", false); + resolvedPath = __resolvedPath(resolvedPath, input, "sessionId", () => input.sessionId!, "{sessionId}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1ListAssistantAssociationsCommand + */ +export const se_ListAssistantAssociationsCommand = async ( + input: ListAssistantAssociationsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/associations"; + resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId!, "{assistantId}", false); + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListAssistantsCommand + */ +export const se_ListAssistantsCommand = async ( + input: ListAssistantsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants"; + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListContentsCommand + */ +export const se_ListContentsCommand = async ( + input: ListContentsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/contents"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListImportJobsCommand + */ +export const se_ListImportJobsCommand = async ( + input: ListImportJobsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/importJobs"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListKnowledgeBasesCommand + */ +export const se_ListKnowledgeBasesCommand = async ( + input: ListKnowledgeBasesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases"; + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListQuickResponsesCommand + */ +export const se_ListQuickResponsesCommand = async ( + input: ListQuickResponsesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/quickResponses"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListTagsForResourceCommand + */ +export const se_ListTagsForResourceCommand = async ( + input: ListTagsForResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; + resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1NotifyRecommendationsReceivedCommand + */ +export const se_NotifyRecommendationsReceivedCommand = async ( + input: NotifyRecommendationsReceivedCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/assistants/{assistantId}/sessions/{sessionId}/recommendations/notify"; + resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId!, "{assistantId}", false); + resolvedPath = __resolvedPath(resolvedPath, input, "sessionId", () => input.sessionId!, "{sessionId}", false); + let body: any; + body = JSON.stringify( + take(input, { + recommendationIds: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1QueryAssistantCommand + */ +export const se_QueryAssistantCommand = async ( + input: QueryAssistantCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/query"; + resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId!, "{assistantId}", false); + let body: any; + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + queryCondition: (_) => _json(_), + queryText: [], + sessionId: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1RemoveKnowledgeBaseTemplateUriCommand + */ +export const se_RemoveKnowledgeBaseTemplateUriCommand = async ( + input: RemoveKnowledgeBaseTemplateUriCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/templateUri"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1SearchContentCommand + */ +export const se_SearchContentCommand = async ( + input: SearchContentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases/{knowledgeBaseId}/search"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + body = JSON.stringify( + take(input, { + searchExpression: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1SearchQuickResponsesCommand + */ +export const se_SearchQuickResponsesCommand = async ( + input: SearchQuickResponsesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/search/quickResponses"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + body = JSON.stringify( + take(input, { + attributes: (_) => _json(_), + searchExpression: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1SearchSessionsCommand + */ +export const se_SearchSessionsCommand = async ( + input: SearchSessionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/searchSessions"; + resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId!, "{assistantId}", false); + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + body = JSON.stringify( + take(input, { + searchExpression: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1StartContentUploadCommand + */ +export const se_StartContentUploadCommand = async ( + input: StartContentUploadCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases/{knowledgeBaseId}/upload"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + contentType: [], + presignedUrlTimeToLive: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1StartImportJobCommand + */ +export const se_StartImportJobCommand = async ( + input: StartImportJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/importJobs"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + externalSourceConfiguration: (_) => _json(_), + importJobType: [], + metadata: (_) => _json(_), + uploadId: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1TagResourceCommand + */ +export const se_TagResourceCommand = async ( + input: TagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; + resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); + let body: any; + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1UntagResourceCommand + */ +export const se_UntagResourceCommand = async ( + input: UntagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; + resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); + const query: any = map({ + tagKeys: [ + __expectNonNull(input.tagKeys, `tagKeys`) != null, + () => (input.tagKeys! || []).map((_entry) => _entry as any), + ], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1UpdateContentCommand + */ +export const se_UpdateContentCommand = async ( + input: UpdateContentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "contentId", () => input.contentId!, "{contentId}", false); + let body: any; + body = JSON.stringify( + take(input, { + metadata: (_) => _json(_), + overrideLinkOutUri: [], + removeOverrideLinkOutUri: [], + revisionId: [], + title: [], + uploadId: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1UpdateKnowledgeBaseTemplateUriCommand + */ +export const se_UpdateKnowledgeBaseTemplateUriCommand = async ( + input: UpdateKnowledgeBaseTemplateUriCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/templateUri"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + templateUri: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1UpdateQuickResponseCommand + */ +export const se_UpdateQuickResponseCommand = async ( + input: UpdateQuickResponseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "knowledgeBaseId", + () => input.knowledgeBaseId!, + "{knowledgeBaseId}", + false + ); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "quickResponseId", + () => input.quickResponseId!, + "{quickResponseId}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + channels: (_) => _json(_), + content: (_) => _json(_), + contentType: [], + description: [], + groupingConfiguration: (_) => _json(_), + isActive: [], + language: [], + name: [], + removeDescription: [], + removeGroupingConfiguration: [], + removeShortcutKey: [], + shortcutKey: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * deserializeAws_restJson1CreateAssistantCommand + */ +export const de_CreateAssistantCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateAssistantCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + assistant: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1CreateAssistantCommandError + */ +const de_CreateAssistantCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qconnect#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qconnect#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1CreateAssistantAssociationCommand + */ +export const de_CreateAssistantAssociationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateAssistantAssociationCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + assistantAssociation: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1CreateAssistantAssociationCommandError + */ +const de_CreateAssistantAssociationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qconnect#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qconnect#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1CreateContentCommand + */ +export const de_CreateContentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateContentCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + content: (_) => de_ContentData(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1CreateContentCommandError + */ +const de_CreateContentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qconnect#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qconnect#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1CreateKnowledgeBaseCommand + */ +export const de_CreateKnowledgeBaseCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateKnowledgeBaseCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + knowledgeBase: (_) => de_KnowledgeBaseData(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1CreateKnowledgeBaseCommandError + */ +const de_CreateKnowledgeBaseCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qconnect#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qconnect#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1CreateQuickResponseCommand + */ +export const de_CreateQuickResponseCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateQuickResponseCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + quickResponse: (_) => de_QuickResponseData(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1CreateQuickResponseCommandError + */ +const de_CreateQuickResponseCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qconnect#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qconnect#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1CreateSessionCommand + */ +export const de_CreateSessionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateSessionCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + session: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1CreateSessionCommandError + */ +const de_CreateSessionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ConflictException": + case "com.amazonaws.qconnect#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteAssistantCommand + */ +export const de_DeleteAssistantCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return de_DeleteAssistantCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteAssistantCommandError + */ +const de_DeleteAssistantCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteAssistantAssociationCommand + */ +export const de_DeleteAssistantAssociationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return de_DeleteAssistantAssociationCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteAssistantAssociationCommandError + */ +const de_DeleteAssistantAssociationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteContentCommand + */ +export const de_DeleteContentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return de_DeleteContentCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteContentCommandError + */ +const de_DeleteContentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteImportJobCommand + */ +export const de_DeleteImportJobCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return de_DeleteImportJobCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteImportJobCommandError + */ +const de_DeleteImportJobCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qconnect#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteKnowledgeBaseCommand + */ +export const de_DeleteKnowledgeBaseCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return de_DeleteKnowledgeBaseCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteKnowledgeBaseCommandError + */ +const de_DeleteKnowledgeBaseCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qconnect#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteQuickResponseCommand + */ +export const de_DeleteQuickResponseCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return de_DeleteQuickResponseCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteQuickResponseCommandError + */ +const de_DeleteQuickResponseCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetAssistantCommand + */ +export const de_GetAssistantCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetAssistantCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + assistant: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetAssistantCommandError + */ +const de_GetAssistantCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetAssistantAssociationCommand + */ +export const de_GetAssistantAssociationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetAssistantAssociationCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + assistantAssociation: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetAssistantAssociationCommandError + */ +const de_GetAssistantAssociationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetContentCommand + */ +export const de_GetContentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetContentCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + content: (_) => de_ContentData(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetContentCommandError + */ +const de_GetContentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetContentSummaryCommand + */ +export const de_GetContentSummaryCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetContentSummaryCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + contentSummary: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetContentSummaryCommandError + */ +const de_GetContentSummaryCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetImportJobCommand + */ +export const de_GetImportJobCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetImportJobCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + importJob: (_) => de_ImportJobData(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetImportJobCommandError + */ +const de_GetImportJobCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetKnowledgeBaseCommand + */ +export const de_GetKnowledgeBaseCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetKnowledgeBaseCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + knowledgeBase: (_) => de_KnowledgeBaseData(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetKnowledgeBaseCommandError + */ +const de_GetKnowledgeBaseCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetQuickResponseCommand + */ +export const de_GetQuickResponseCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetQuickResponseCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + quickResponse: (_) => de_QuickResponseData(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetQuickResponseCommandError + */ +const de_GetQuickResponseCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetRecommendationsCommand + */ +export const de_GetRecommendationsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetRecommendationsCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + recommendations: (_) => de_RecommendationList(_, context), + triggers: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetRecommendationsCommandError + */ +const de_GetRecommendationsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetSessionCommand + */ +export const de_GetSessionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetSessionCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + session: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetSessionCommandError + */ +const de_GetSessionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListAssistantAssociationsCommand + */ +export const de_ListAssistantAssociationsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListAssistantAssociationsCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + assistantAssociationSummaries: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListAssistantAssociationsCommandError + */ +const de_ListAssistantAssociationsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListAssistantsCommand + */ +export const de_ListAssistantsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListAssistantsCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + assistantSummaries: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListAssistantsCommandError + */ +const de_ListAssistantsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListContentsCommand + */ +export const de_ListContentsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListContentsCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + contentSummaries: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListContentsCommandError + */ +const de_ListContentsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListImportJobsCommand + */ +export const de_ListImportJobsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListImportJobsCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + importJobSummaries: (_) => de_ImportJobList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListImportJobsCommandError + */ +const de_ListImportJobsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListKnowledgeBasesCommand + */ +export const de_ListKnowledgeBasesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListKnowledgeBasesCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + knowledgeBaseSummaries: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListKnowledgeBasesCommandError + */ +const de_ListKnowledgeBasesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListQuickResponsesCommand + */ +export const de_ListQuickResponsesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListQuickResponsesCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + nextToken: __expectString, + quickResponseSummaries: (_) => de_QuickResponseSummaryList(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListQuickResponsesCommandError + */ +const de_ListQuickResponsesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListTagsForResourceCommand + */ +export const de_ListTagsForResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListTagsForResourceCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListTagsForResourceCommandError + */ +const de_ListTagsForResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1NotifyRecommendationsReceivedCommand + */ +export const de_NotifyRecommendationsReceivedCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_NotifyRecommendationsReceivedCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + errors: _json, + recommendationIds: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1NotifyRecommendationsReceivedCommandError + */ +const de_NotifyRecommendationsReceivedCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1QueryAssistantCommand + */ +export const de_QueryAssistantCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_QueryAssistantCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + nextToken: __expectString, + results: (_) => de_QueryResultsList(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1QueryAssistantCommandError + */ +const de_QueryAssistantCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "RequestTimeoutException": + case "com.amazonaws.qconnect#RequestTimeoutException": + throw await de_RequestTimeoutExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1RemoveKnowledgeBaseTemplateUriCommand + */ +export const de_RemoveKnowledgeBaseTemplateUriCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return de_RemoveKnowledgeBaseTemplateUriCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1RemoveKnowledgeBaseTemplateUriCommandError + */ +const de_RemoveKnowledgeBaseTemplateUriCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1SearchContentCommand + */ +export const de_SearchContentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_SearchContentCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + contentSummaries: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1SearchContentCommandError + */ +const de_SearchContentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1SearchQuickResponsesCommand + */ +export const de_SearchQuickResponsesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_SearchQuickResponsesCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + nextToken: __expectString, + results: (_) => de_QuickResponseSearchResultsList(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1SearchQuickResponsesCommandError + */ +const de_SearchQuickResponsesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "RequestTimeoutException": + case "com.amazonaws.qconnect#RequestTimeoutException": + throw await de_RequestTimeoutExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1SearchSessionsCommand + */ +export const de_SearchSessionsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_SearchSessionsCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + nextToken: __expectString, + sessionSummaries: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1SearchSessionsCommandError + */ +const de_SearchSessionsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1StartContentUploadCommand + */ +export const de_StartContentUploadCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_StartContentUploadCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + headersToInclude: _json, + uploadId: __expectString, + url: __expectString, + urlExpiry: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1StartContentUploadCommandError + */ +const de_StartContentUploadCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1StartImportJobCommand + */ +export const de_StartImportJobCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_StartImportJobCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + importJob: (_) => de_ImportJobData(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1StartImportJobCommandError + */ +const de_StartImportJobCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qconnect#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qconnect#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1TagResourceCommand + */ +export const de_TagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_TagResourceCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1TagResourceCommandError + */ +const de_TagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "TooManyTagsException": + case "com.amazonaws.qconnect#TooManyTagsException": + throw await de_TooManyTagsExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1UntagResourceCommand + */ +export const de_UntagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_UntagResourceCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UntagResourceCommandError + */ +const de_UntagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1UpdateContentCommand + */ +export const de_UpdateContentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_UpdateContentCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + content: (_) => de_ContentData(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateContentCommandError + */ +const de_UpdateContentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "PreconditionFailedException": + case "com.amazonaws.qconnect#PreconditionFailedException": + throw await de_PreconditionFailedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1UpdateKnowledgeBaseTemplateUriCommand + */ +export const de_UpdateKnowledgeBaseTemplateUriCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_UpdateKnowledgeBaseTemplateUriCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + knowledgeBase: (_) => de_KnowledgeBaseData(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateKnowledgeBaseTemplateUriCommandError + */ +const de_UpdateKnowledgeBaseTemplateUriCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1UpdateQuickResponseCommand + */ +export const de_UpdateQuickResponseCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_UpdateQuickResponseCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + quickResponse: (_) => de_QuickResponseData(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateQuickResponseCommandError + */ +const de_UpdateQuickResponseCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qconnect#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qconnect#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "PreconditionFailedException": + case "com.amazonaws.qconnect#PreconditionFailedException": + throw await de_PreconditionFailedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qconnect#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qconnect#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +const throwDefaultError = withBaseException(__BaseException); +/** + * deserializeAws_restJson1AccessDeniedExceptionRes + */ +const de_AccessDeniedExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new AccessDeniedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ConflictExceptionRes + */ +const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new ConflictException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1PreconditionFailedExceptionRes + */ +const de_PreconditionFailedExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new PreconditionFailedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1RequestTimeoutExceptionRes + */ +const de_RequestTimeoutExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new RequestTimeoutException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ResourceNotFoundExceptionRes + */ +const de_ResourceNotFoundExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + resourceName: __expectString, + }); + Object.assign(contents, doc); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ServiceQuotaExceededExceptionRes + */ +const de_ServiceQuotaExceededExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new ServiceQuotaExceededException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1TooManyTagsExceptionRes + */ +const de_TooManyTagsExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + resourceName: __expectString, + }); + Object.assign(contents, doc); + const exception = new TooManyTagsException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ValidationExceptionRes + */ +const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new ValidationException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +// se_AppIntegrationsConfiguration omitted. + +// se_AssistantAssociationInputData omitted. + +// se_Channels omitted. + +// se_Configuration omitted. + +// se_ConnectConfiguration omitted. + +// se_ContactAttributes omitted. + +// se_ContentMetadata omitted. + +// se_ExternalSourceConfiguration omitted. + +// se_Filter omitted. + +// se_FilterList omitted. + +// se_GroupingConfiguration omitted. + +// se_GroupingValues omitted. + +// se_ObjectFieldsList omitted. + +// se_QueryCondition omitted. + +// se_QueryConditionExpression omitted. + +// se_QueryConditionItem omitted. + +// se_QuickResponseDataProvider omitted. + +// se_QuickResponseFilterField omitted. + +// se_QuickResponseFilterFieldList omitted. + +// se_QuickResponseFilterValueList omitted. + +// se_QuickResponseOrderField omitted. + +// se_QuickResponseQueryField omitted. + +// se_QuickResponseQueryFieldList omitted. + +// se_QuickResponseQueryValueList omitted. + +// se_QuickResponseSearchExpression omitted. + +// se_RecommendationIdList omitted. + +// se_RenderingConfiguration omitted. + +// se_SearchExpression omitted. + +// se_ServerSideEncryptionConfiguration omitted. + +// se_SourceConfiguration omitted. + +// se_Tags omitted. + +// de_AppIntegrationsConfiguration omitted. + +// de_AssistantAssociationData omitted. + +// de_AssistantAssociationOutputData omitted. + +// de_AssistantAssociationSummary omitted. + +// de_AssistantAssociationSummaryList omitted. + +// de_AssistantCapabilityConfiguration omitted. + +// de_AssistantData omitted. + +// de_AssistantIntegrationConfiguration omitted. + +// de_AssistantList omitted. + +// de_AssistantSummary omitted. + +// de_Channels omitted. + +// de_Configuration omitted. + +// de_ConnectConfiguration omitted. + +// de_ContactAttributeKeys omitted. + +/** + * deserializeAws_restJson1ContentData + */ +const de_ContentData = (output: any, context: __SerdeContext): ContentData => { + return take(output, { + contentArn: __expectString, + contentId: __expectString, + contentType: __expectString, + knowledgeBaseArn: __expectString, + knowledgeBaseId: __expectString, + linkOutUri: __expectString, + metadata: _json, + name: __expectString, + revisionId: __expectString, + status: __expectString, + tags: _json, + title: __expectString, + url: __expectString, + urlExpiry: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +/** + * deserializeAws_restJson1ContentDataDetails + */ +const de_ContentDataDetails = (output: any, context: __SerdeContext): ContentDataDetails => { + return take(output, { + rankingData: (_: any) => de_RankingData(_, context), + textData: _json, + }) as any; +}; + +// de_ContentMetadata omitted. + +// de_ContentReference omitted. + +// de_ContentSummary omitted. + +// de_ContentSummaryList omitted. + +/** + * deserializeAws_restJson1DataDetails + */ +const de_DataDetails = (output: any, context: __SerdeContext): DataDetails => { + if (output.contentData != null) { + return { + contentData: de_ContentDataDetails(output.contentData, context), + }; + } + if (output.generativeData != null) { + return { + generativeData: de_GenerativeDataDetails(output.generativeData, context), + }; + } + if (output.sourceContentData != null) { + return { + sourceContentData: de_SourceContentDataDetails(output.sourceContentData, context), + }; + } + return { $unknown: Object.entries(output)[0] }; +}; + +// de_DataReference omitted. + +/** + * deserializeAws_restJson1DataSummary + */ +const de_DataSummary = (output: any, context: __SerdeContext): DataSummary => { + return take(output, { + details: (_: any) => de_DataDetails(__expectUnion(_), context), + reference: (_: any) => _json(__expectUnion(_)), + }) as any; +}; + +/** + * deserializeAws_restJson1DataSummaryList + */ +const de_DataSummaryList = (output: any, context: __SerdeContext): DataSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DataSummary(entry, context); + }); + return retVal; +}; + +// de_Document omitted. + +// de_DocumentText omitted. + +// de_ExternalSourceConfiguration omitted. + +/** + * deserializeAws_restJson1GenerativeDataDetails + */ +const de_GenerativeDataDetails = (output: any, context: __SerdeContext): GenerativeDataDetails => { + return take(output, { + completion: __expectString, + rankingData: (_: any) => de_RankingData(_, context), + references: (_: any) => de_DataSummaryList(_, context), + }) as any; +}; + +// de_GenerativeReference omitted. + +// de_GroupingConfiguration omitted. + +// de_GroupingValues omitted. + +// de_Headers omitted. + +// de_Highlight omitted. + +// de_Highlights omitted. + +/** + * deserializeAws_restJson1ImportJobData + */ +const de_ImportJobData = (output: any, context: __SerdeContext): ImportJobData => { + return take(output, { + createdTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + externalSourceConfiguration: _json, + failedRecordReport: __expectString, + importJobId: __expectString, + importJobType: __expectString, + knowledgeBaseArn: __expectString, + knowledgeBaseId: __expectString, + lastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + metadata: _json, + status: __expectString, + uploadId: __expectString, + url: __expectString, + urlExpiry: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +/** + * deserializeAws_restJson1ImportJobList + */ +const de_ImportJobList = (output: any, context: __SerdeContext): ImportJobSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ImportJobSummary(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_restJson1ImportJobSummary + */ +const de_ImportJobSummary = (output: any, context: __SerdeContext): ImportJobSummary => { + return take(output, { + createdTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + externalSourceConfiguration: _json, + importJobId: __expectString, + importJobType: __expectString, + knowledgeBaseArn: __expectString, + knowledgeBaseId: __expectString, + lastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + metadata: _json, + status: __expectString, + uploadId: __expectString, + }) as any; +}; + +// de_KnowledgeBaseAssociationData omitted. + +/** + * deserializeAws_restJson1KnowledgeBaseData + */ +const de_KnowledgeBaseData = (output: any, context: __SerdeContext): KnowledgeBaseData => { + return take(output, { + description: __expectString, + knowledgeBaseArn: __expectString, + knowledgeBaseId: __expectString, + knowledgeBaseType: __expectString, + lastContentModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + renderingConfiguration: _json, + serverSideEncryptionConfiguration: _json, + sourceConfiguration: (_: any) => _json(__expectUnion(_)), + status: __expectString, + tags: _json, + }) as any; +}; + +// de_KnowledgeBaseList omitted. + +// de_KnowledgeBaseSummary omitted. + +// de_NotifyRecommendationsReceivedError omitted. + +// de_NotifyRecommendationsReceivedErrorList omitted. + +// de_ObjectFieldsList omitted. + +// de_QueryRecommendationTriggerData omitted. + +/** + * deserializeAws_restJson1QueryResultsList + */ +const de_QueryResultsList = (output: any, context: __SerdeContext): ResultData[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ResultData(entry, context); + }); + return retVal; +}; + +// de_QuickResponseContentProvider omitted. + +// de_QuickResponseContents omitted. + +/** + * deserializeAws_restJson1QuickResponseData + */ +const de_QuickResponseData = (output: any, context: __SerdeContext): QuickResponseData => { + return take(output, { + channels: _json, + contentType: __expectString, + contents: _json, + createdTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + groupingConfiguration: _json, + isActive: __expectBoolean, + knowledgeBaseArn: __expectString, + knowledgeBaseId: __expectString, + language: __expectString, + lastModifiedBy: __expectString, + lastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + quickResponseArn: __expectString, + quickResponseId: __expectString, + shortcutKey: __expectString, + status: __expectString, + tags: _json, + }) as any; +}; + +/** + * deserializeAws_restJson1QuickResponseSearchResultData + */ +const de_QuickResponseSearchResultData = (output: any, context: __SerdeContext): QuickResponseSearchResultData => { + return take(output, { + attributesInterpolated: _json, + attributesNotInterpolated: _json, + channels: _json, + contentType: __expectString, + contents: _json, + createdTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + groupingConfiguration: _json, + isActive: __expectBoolean, + knowledgeBaseArn: __expectString, + knowledgeBaseId: __expectString, + language: __expectString, + lastModifiedBy: __expectString, + lastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + quickResponseArn: __expectString, + quickResponseId: __expectString, + shortcutKey: __expectString, + status: __expectString, + tags: _json, + }) as any; +}; + +/** + * deserializeAws_restJson1QuickResponseSearchResultsList + */ +const de_QuickResponseSearchResultsList = (output: any, context: __SerdeContext): QuickResponseSearchResultData[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_QuickResponseSearchResultData(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_restJson1QuickResponseSummary + */ +const de_QuickResponseSummary = (output: any, context: __SerdeContext): QuickResponseSummary => { + return take(output, { + channels: _json, + contentType: __expectString, + createdTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + isActive: __expectBoolean, + knowledgeBaseArn: __expectString, + knowledgeBaseId: __expectString, + lastModifiedBy: __expectString, + lastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + quickResponseArn: __expectString, + quickResponseId: __expectString, + status: __expectString, + tags: _json, + }) as any; +}; + +/** + * deserializeAws_restJson1QuickResponseSummaryList + */ +const de_QuickResponseSummaryList = (output: any, context: __SerdeContext): QuickResponseSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_QuickResponseSummary(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_restJson1RankingData + */ +const de_RankingData = (output: any, context: __SerdeContext): RankingData => { + return take(output, { + relevanceLevel: __expectString, + relevanceScore: __limitedParseDouble, + }) as any; +}; + +/** + * deserializeAws_restJson1RecommendationData + */ +const de_RecommendationData = (output: any, context: __SerdeContext): RecommendationData => { + return take(output, { + data: (_: any) => de_DataSummary(_, context), + document: _json, + recommendationId: __expectString, + relevanceLevel: __expectString, + relevanceScore: __limitedParseDouble, + type: __expectString, + }) as any; +}; + +// de_RecommendationIdList omitted. + +/** + * deserializeAws_restJson1RecommendationList + */ +const de_RecommendationList = (output: any, context: __SerdeContext): RecommendationData[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_RecommendationData(entry, context); + }); + return retVal; +}; + +// de_RecommendationTrigger omitted. + +// de_RecommendationTriggerData omitted. + +// de_RecommendationTriggerList omitted. + +// de_RenderingConfiguration omitted. + +/** + * deserializeAws_restJson1ResultData + */ +const de_ResultData = (output: any, context: __SerdeContext): ResultData => { + return take(output, { + data: (_: any) => de_DataSummary(_, context), + document: _json, + relevanceScore: __limitedParseDouble, + resultId: __expectString, + type: __expectString, + }) as any; +}; + +// de_ServerSideEncryptionConfiguration omitted. + +// de_SessionData omitted. + +// de_SessionIntegrationConfiguration omitted. + +// de_SessionSummaries omitted. + +// de_SessionSummary omitted. + +// de_SourceConfiguration omitted. + +/** + * deserializeAws_restJson1SourceContentDataDetails + */ +const de_SourceContentDataDetails = (output: any, context: __SerdeContext): SourceContentDataDetails => { + return take(output, { + id: __expectString, + rankingData: (_: any) => de_RankingData(_, context), + textData: _json, + type: __expectString, + }) as any; +}; + +// de_Tags omitted. + +// de_TextData omitted. + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + requestId: + output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +// Encode Uint8Array data into string with utf-8. +const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => + collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); + +const isSerializableHeaderValue = (value: any): boolean => + value !== undefined && + value !== null && + value !== "" && + (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && + (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0); + +const parseBody = (streamBody: any, context: __SerdeContext): any => + collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; + }); + +const parseErrorBody = async (errorBody: any, context: __SerdeContext) => { + const value = await parseBody(errorBody, context); + value.message = value.message ?? value.Message; + return value; +}; + +/** + * Load an error code for the aws.rest-json-1.1 protocol. + */ +const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string | undefined => { + const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + + const sanitizeErrorCode = (rawValue: string | number): string => { + let cleanValue = rawValue; + if (typeof cleanValue === "number") { + cleanValue = cleanValue.toString(); + } + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; + } + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(output.headers[headerKey]); + } + + if (data.code !== undefined) { + return sanitizeErrorCode(data.code); + } + + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } +}; diff --git a/clients/client-qconnect/src/runtimeConfig.browser.ts b/clients/client-qconnect/src/runtimeConfig.browser.ts new file mode 100644 index 0000000000000..bc49b0f541284 --- /dev/null +++ b/clients/client-qconnect/src/runtimeConfig.browser.ts @@ -0,0 +1,44 @@ +// smithy-typescript generated code +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver"; +import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler"; +import { invalidProvider } from "@smithy/invalid-dependency"; +import { calculateBodyLength } from "@smithy/util-body-length-browser"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { QConnectClientConfig } from "./QConnectClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: QConnectClientConfig) => { + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? ((_: unknown) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? invalidProvider("Region is missing"), + requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), + sha256: config?.sha256 ?? Sha256, + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), + }; +}; diff --git a/clients/client-qconnect/src/runtimeConfig.native.ts b/clients/client-qconnect/src/runtimeConfig.native.ts new file mode 100644 index 0000000000000..747f47a91ac19 --- /dev/null +++ b/clients/client-qconnect/src/runtimeConfig.native.ts @@ -0,0 +1,18 @@ +// smithy-typescript generated code +import { Sha256 } from "@aws-crypto/sha256-js"; + +import { QConnectClientConfig } from "./QConnectClient"; +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: QConnectClientConfig) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/clients/client-qconnect/src/runtimeConfig.shared.ts b/clients/client-qconnect/src/runtimeConfig.shared.ts new file mode 100644 index 0000000000000..6fb5ad5c2c13b --- /dev/null +++ b/clients/client-qconnect/src/runtimeConfig.shared.ts @@ -0,0 +1,27 @@ +// smithy-typescript generated code +import { NoOpLogger } from "@smithy/smithy-client"; +import { parseUrl } from "@smithy/url-parser"; +import { fromBase64, toBase64 } from "@smithy/util-base64"; +import { fromUtf8, toUtf8 } from "@smithy/util-utf8"; + +import { defaultEndpointResolver } from "./endpoint/endpointResolver"; +import { QConnectClientConfig } from "./QConnectClient"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: QConnectClientConfig) => { + return { + apiVersion: "2020-10-19", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? defaultEndpointResolver, + extensions: config?.extensions ?? [], + logger: config?.logger ?? new NoOpLogger(), + serviceId: config?.serviceId ?? "QConnect", + urlParser: config?.urlParser ?? parseUrl, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-qconnect/src/runtimeConfig.ts b/clients/client-qconnect/src/runtimeConfig.ts new file mode 100644 index 0000000000000..07f506573596d --- /dev/null +++ b/clients/client-qconnect/src/runtimeConfig.ts @@ -0,0 +1,61 @@ +// smithy-typescript generated code +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; +import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core"; +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@smithy/config-resolver"; +import { Hash } from "@smithy/hash-node"; +import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry"; +import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider"; +import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler"; +import { calculateBodyLength } from "@smithy/util-body-length-node"; +import { DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { QConnectClientConfig } from "./QConnectClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node"; +import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: QConnectClientConfig) => { + emitWarningIfUnsupportedVersion(process.version); + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + awsCheckVersion(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + retryMode: + config?.retryMode ?? + loadNodeConfig({ + ...NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, + }), + sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + }; +}; diff --git a/clients/client-qconnect/src/runtimeExtensions.ts b/clients/client-qconnect/src/runtimeExtensions.ts new file mode 100644 index 0000000000000..d38aa2d36fa5d --- /dev/null +++ b/clients/client-qconnect/src/runtimeExtensions.ts @@ -0,0 +1,45 @@ +// smithy-typescript generated code +import { + getAwsRegionExtensionConfiguration, + resolveAwsRegionExtensionConfiguration, +} from "@aws-sdk/region-config-resolver"; +import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http"; +import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client"; + +import { QConnectExtensionConfiguration } from "./extensionConfiguration"; + +/** + * @public + */ +export interface RuntimeExtension { + configure(extensionConfiguration: QConnectExtensionConfiguration): void; +} + +/** + * @public + */ +export interface RuntimeExtensionsConfig { + extensions: RuntimeExtension[]; +} + +const asPartial = >(t: T) => t; + +/** + * @internal + */ +export const resolveRuntimeExtensions = (runtimeConfig: any, extensions: RuntimeExtension[]) => { + const extensionConfiguration: QConnectExtensionConfiguration = { + ...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)), + ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)), + ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)), + }; + + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + + return { + ...runtimeConfig, + ...resolveAwsRegionExtensionConfiguration(extensionConfiguration), + ...resolveDefaultRuntimeConfig(extensionConfiguration), + ...resolveHttpHandlerRuntimeConfig(extensionConfiguration), + }; +}; diff --git a/clients/client-qconnect/tsconfig.cjs.json b/clients/client-qconnect/tsconfig.cjs.json new file mode 100644 index 0000000000000..3567d85ba8460 --- /dev/null +++ b/clients/client-qconnect/tsconfig.cjs.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "dist-cjs" + } +} diff --git a/clients/client-qconnect/tsconfig.es.json b/clients/client-qconnect/tsconfig.es.json new file mode 100644 index 0000000000000..809f57bde65e6 --- /dev/null +++ b/clients/client-qconnect/tsconfig.es.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "lib": ["dom"], + "module": "esnext", + "outDir": "dist-es" + } +} diff --git a/clients/client-qconnect/tsconfig.json b/clients/client-qconnect/tsconfig.json new file mode 100644 index 0000000000000..344909de21289 --- /dev/null +++ b/clients/client-qconnect/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "@tsconfig/node14/tsconfig.json", + "compilerOptions": { + "downlevelIteration": true, + "importHelpers": true, + "incremental": true, + "removeComments": true, + "resolveJsonModule": true, + "rootDir": "src", + "useUnknownInCatchVariables": false + }, + "exclude": ["test/"] +} diff --git a/clients/client-qconnect/tsconfig.types.json b/clients/client-qconnect/tsconfig.types.json new file mode 100644 index 0000000000000..4c3dfa7b3d25f --- /dev/null +++ b/clients/client-qconnect/tsconfig.types.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "removeComments": false, + "declaration": true, + "declarationDir": "dist-types", + "emitDeclarationOnly": true + }, + "exclude": ["test/**/*", "dist-types/**/*"] +} diff --git a/clients/client-qconnect/typedoc.json b/clients/client-qconnect/typedoc.json new file mode 100644 index 0000000000000..8a364aa93b692 --- /dev/null +++ b/clients/client-qconnect/typedoc.json @@ -0,0 +1,6 @@ +{ + "extends": ["../../typedoc.client.json"], + "entryPoints": ["src/index.ts"], + "out": "docs", + "readme": "README.md" +} diff --git a/codegen/sdk-codegen/aws-models/qconnect.json b/codegen/sdk-codegen/aws-models/qconnect.json new file mode 100644 index 0000000000000..fb2131b4dfc64 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/qconnect.json @@ -0,0 +1,7383 @@ +{ + "smithy": "2.0", + "shapes": { + "com.amazonaws.qconnect#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "

You do not have sufficient access to perform this action.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.qconnect#AppIntegrationsConfiguration": { + "type": "structure", + "members": { + "appIntegrationArn": { + "target": "com.amazonaws.qconnect#GenericArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the AppIntegrations DataIntegration to use for ingesting content.

\n
    \n
  • \n

    For Salesforce, your AppIntegrations DataIntegration must have an ObjectConfiguration if\n objectFields is not provided, including at least Id,\n ArticleNumber, VersionNumber, Title,\n PublishStatus, and IsDeleted as source fields.

    \n
  • \n
  • \n

    For ServiceNow, your AppIntegrations DataIntegration must have an ObjectConfiguration if\n objectFields is not provided, including at least number,\n short_description, sys_mod_count, workflow_state,\n and active as source fields.

    \n
  • \n
  • \n

    For \n Zendesk, your AppIntegrations DataIntegration must have an ObjectConfiguration if\n objectFields is not provided, including at least id,\n title, updated_at, and draft as source fields.\n

    \n
  • \n
  • \n

    For SharePoint, your AppIntegrations DataIntegration must have a FileConfiguration,\n including only file extensions that are among docx, pdf,\n html, htm, and txt.

    \n
  • \n
  • \n

    For Amazon S3, the\n ObjectConfiguration and FileConfiguration of your AppIntegrations DataIntegration must be null.\n The SourceURI of your DataIntegration must use the following format:\n s3://your_s3_bucket_name.

    \n \n

    The bucket policy of the corresponding S3 bucket must allow the Amazon Web Services\n principal app-integrations.amazonaws.com to perform\n s3:ListBucket, s3:GetObject, and\n s3:GetBucketLocation against the bucket.

    \n
    \n
  • \n
", + "smithy.api#required": {} + } + }, + "objectFields": { + "target": "com.amazonaws.qconnect#ObjectFieldsList", + "traits": { + "smithy.api#documentation": "

The fields from the source that are made available to your agents in Amazon Q. Optional if\n ObjectConfiguration is included in the provided DataIntegration.

\n
    \n
  • \n

    For Salesforce, you must include at least Id,\n ArticleNumber, VersionNumber, Title,\n PublishStatus, and IsDeleted.

    \n
  • \n
  • \n

    For ServiceNow, you must include at least number,\n short_description, sys_mod_count, workflow_state,\n and active.

    \n
  • \n
  • \n

    For \n Zendesk, you must include at least id, title,\n updated_at, and draft.

    \n
  • \n
\n

Make sure to include additional fields. These fields are indexed and used to source\n recommendations.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Configuration information for Amazon AppIntegrations to automatically ingest content.

" + } + }, + "com.amazonaws.qconnect#Arn": { + "type": "string", + "traits": { + "smithy.api#pattern": "^arn:[a-z-]*?:wisdom:[a-z0-9-]*?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})?$" + } + }, + "com.amazonaws.qconnect#Assistant": { + "type": "resource", + "identifiers": { + "assistantId": { + "target": "com.amazonaws.qconnect#UuidOrArn" + } + }, + "create": { + "target": "com.amazonaws.qconnect#CreateAssistant" + }, + "read": { + "target": "com.amazonaws.qconnect#GetAssistant" + }, + "delete": { + "target": "com.amazonaws.qconnect#DeleteAssistant" + }, + "list": { + "target": "com.amazonaws.qconnect#ListAssistants" + }, + "operations": [ + { + "target": "com.amazonaws.qconnect#GetRecommendations" + }, + { + "target": "com.amazonaws.qconnect#NotifyRecommendationsReceived" + }, + { + "target": "com.amazonaws.qconnect#QueryAssistant" + }, + { + "target": "com.amazonaws.qconnect#SearchSessions" + } + ], + "resources": [ + { + "target": "com.amazonaws.qconnect#AssistantAssociation" + }, + { + "target": "com.amazonaws.qconnect#Session" + } + ], + "traits": { + "aws.api#arn": { + "template": "assistant/{assistantId}" + }, + "aws.cloudformation#cfnResource": {}, + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.qconnect#AssistantAssociation": { + "type": "resource", + "identifiers": { + "assistantId": { + "target": "com.amazonaws.qconnect#UuidOrArn" + }, + "assistantAssociationId": { + "target": "com.amazonaws.qconnect#UuidOrArn" + } + }, + "create": { + "target": "com.amazonaws.qconnect#CreateAssistantAssociation" + }, + "read": { + "target": "com.amazonaws.qconnect#GetAssistantAssociation" + }, + "delete": { + "target": "com.amazonaws.qconnect#DeleteAssistantAssociation" + }, + "list": { + "target": "com.amazonaws.qconnect#ListAssistantAssociations" + }, + "traits": { + "aws.api#arn": { + "template": "association/{assistantId}/{assistantAssociationId}" + }, + "aws.cloudformation#cfnResource": {}, + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.qconnect#AssistantAssociationData": { + "type": "structure", + "members": { + "assistantAssociationId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the assistant association.

", + "smithy.api#required": {} + } + }, + "assistantAssociationArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assistant association.

", + "smithy.api#required": {} + } + }, + "assistantId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q assistant.

", + "smithy.api#required": {} + } + }, + "assistantArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon Q assistant.

", + "smithy.api#required": {} + } + }, + "associationType": { + "target": "com.amazonaws.qconnect#AssociationType", + "traits": { + "smithy.api#documentation": "

The type of association.

", + "smithy.api#required": {} + } + }, + "associationData": { + "target": "com.amazonaws.qconnect#AssistantAssociationOutputData", + "traits": { + "smithy.api#documentation": "

A union type that currently has a single argument, the knowledge base ID.

", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about the assistant association.

", + "smithy.api#references": [ + { + "resource": "com.amazonaws.qconnect#AssistantAssociation" + } + ] + } + }, + "com.amazonaws.qconnect#AssistantAssociationInputData": { + "type": "union", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The data that is input into Amazon Q as a result of the assistant association.

" + } + }, + "com.amazonaws.qconnect#AssistantAssociationOutputData": { + "type": "union", + "members": { + "knowledgeBaseAssociation": { + "target": "com.amazonaws.qconnect#KnowledgeBaseAssociationData", + "traits": { + "smithy.api#documentation": "

The knowledge base where output data is sent.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The data that is output as a result of the assistant association.

" + } + }, + "com.amazonaws.qconnect#AssistantAssociationSummary": { + "type": "structure", + "members": { + "assistantAssociationId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the assistant association.

", + "smithy.api#required": {} + } + }, + "assistantAssociationArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assistant association.

", + "smithy.api#required": {} + } + }, + "assistantId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q assistant.

", + "smithy.api#required": {} + } + }, + "assistantArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon Q assistant.

", + "smithy.api#required": {} + } + }, + "associationType": { + "target": "com.amazonaws.qconnect#AssociationType", + "traits": { + "smithy.api#documentation": "

The type of association.

", + "smithy.api#required": {} + } + }, + "associationData": { + "target": "com.amazonaws.qconnect#AssistantAssociationOutputData", + "traits": { + "smithy.api#documentation": "

The association data.

", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary information about the assistant association.

", + "smithy.api#references": [ + { + "resource": "com.amazonaws.qconnect#AssistantAssociation" + } + ] + } + }, + "com.amazonaws.qconnect#AssistantAssociationSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#AssistantAssociationSummary" + } + }, + "com.amazonaws.qconnect#AssistantCapabilityConfiguration": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.qconnect#AssistantCapabilityType", + "traits": { + "smithy.api#documentation": "

The type of Amazon Q assistant capability.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The capability configuration for a Amazon Q assistant.

" + } + }, + "com.amazonaws.qconnect#AssistantCapabilityType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "V1", + "name": "V1" + }, + { + "value": "V2", + "name": "V2" + } + ] + } + }, + "com.amazonaws.qconnect#AssistantData": { + "type": "structure", + "members": { + "assistantId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q assistant.

", + "smithy.api#required": {} + } + }, + "assistantArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon Q assistant.

", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.qconnect#Name", + "traits": { + "smithy.api#documentation": "

The name.

", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.qconnect#AssistantType", + "traits": { + "smithy.api#documentation": "

The type of assistant.

", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.qconnect#AssistantStatus", + "traits": { + "smithy.api#documentation": "

The status of the assistant.

", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.qconnect#Description", + "traits": { + "smithy.api#documentation": "

The description.

" + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + }, + "serverSideEncryptionConfiguration": { + "target": "com.amazonaws.qconnect#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information for the customer managed key used for encryption.

\n

This KMS key must have a policy that allows kms:CreateGrant,\n kms:DescribeKey, kms:Decrypt, and\n kms:GenerateDataKey* permissions to the IAM identity using the\n key to invoke Amazon Q. To use Amazon Q with chat, the key policy must also allow\n kms:Decrypt, kms:GenerateDataKey*, and\n kms:DescribeKey permissions to the connect.amazonaws.com service\n principal.

\n

For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for\n your instance.

" + } + }, + "integrationConfiguration": { + "target": "com.amazonaws.qconnect#AssistantIntegrationConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information for the Amazon Q assistant integration.

" + } + }, + "capabilityConfiguration": { + "target": "com.amazonaws.qconnect#AssistantCapabilityConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information for the Amazon Q assistant capability.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The assistant data.

" + } + }, + "com.amazonaws.qconnect#AssistantIntegrationConfiguration": { + "type": "structure", + "members": { + "topicIntegrationArn": { + "target": "com.amazonaws.qconnect#GenericArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the integrated Amazon SNS topic used for streaming chat messages.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The configuration information for the Amazon Q assistant integration.

" + } + }, + "com.amazonaws.qconnect#AssistantList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#AssistantSummary" + } + }, + "com.amazonaws.qconnect#AssistantStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATE_IN_PROGRESS", + "name": "CREATE_IN_PROGRESS" + }, + { + "value": "CREATE_FAILED", + "name": "CREATE_FAILED" + }, + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "DELETE_IN_PROGRESS", + "name": "DELETE_IN_PROGRESS" + }, + { + "value": "DELETE_FAILED", + "name": "DELETE_FAILED" + }, + { + "value": "DELETED", + "name": "DELETED" + } + ] + } + }, + "com.amazonaws.qconnect#AssistantSummary": { + "type": "structure", + "members": { + "assistantId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q assistant.

", + "smithy.api#required": {} + } + }, + "assistantArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon Q assistant.

", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.qconnect#Name", + "traits": { + "smithy.api#documentation": "

The name of the assistant.

", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.qconnect#AssistantType", + "traits": { + "smithy.api#documentation": "

The type of the assistant.

", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.qconnect#AssistantStatus", + "traits": { + "smithy.api#documentation": "

The status of the assistant.

", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.qconnect#Description", + "traits": { + "smithy.api#documentation": "

The description of the assistant.

" + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + }, + "serverSideEncryptionConfiguration": { + "target": "com.amazonaws.qconnect#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information for the customer managed key used for encryption.

\n

This KMS key must have a policy that allows kms:CreateGrant,\n kms:DescribeKey, kms:Decrypt, and\n kms:GenerateDataKey* permissions to the IAM identity using the\n key to invoke Amazon Q. To use Amazon Q with chat, the key policy must also allow\n kms:Decrypt, kms:GenerateDataKey*, and\n kms:DescribeKey permissions to the connect.amazonaws.com service\n principal.

\n

For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for\n your instance.

" + } + }, + "integrationConfiguration": { + "target": "com.amazonaws.qconnect#AssistantIntegrationConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information for the Amazon Q assistant integration.

" + } + }, + "capabilityConfiguration": { + "target": "com.amazonaws.qconnect#AssistantCapabilityConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information for the Amazon Q assistant capability.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary information about the assistant.

" + } + }, + "com.amazonaws.qconnect#AssistantType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AGENT", + "name": "AGENT" + } + ] + } + }, + "com.amazonaws.qconnect#AssociationType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "KNOWLEDGE_BASE", + "name": "KNOWLEDGE_BASE" + } + ] + } + }, + "com.amazonaws.qconnect#Channel": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.qconnect#Channels": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#Channel" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.qconnect#ClientToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4096 + } + } + }, + "com.amazonaws.qconnect#Configuration": { + "type": "union", + "members": { + "connectConfiguration": { + "target": "com.amazonaws.qconnect#ConnectConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information of the Amazon Connect data source.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The configuration information of the external data source.

" + } + }, + "com.amazonaws.qconnect#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "

The request could not be processed because of conflict in the current state of the\n resource. For example, if you're using a Create API (such as\n CreateAssistant) that accepts name, a conflicting resource (usually with the\n same name) is being created or mutated.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.qconnect#ConnectConfiguration": { + "type": "structure", + "members": { + "instanceId": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The configuration information of the Amazon Connect data source.

" + } + }, + "com.amazonaws.qconnect#ContactAttributeKey": { + "type": "string" + }, + "com.amazonaws.qconnect#ContactAttributeKeys": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#ContactAttributeKey" + }, + "traits": { + "smithy.api#sensitive": {}, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.qconnect#ContactAttributeValue": { + "type": "string" + }, + "com.amazonaws.qconnect#ContactAttributes": { + "type": "map", + "key": { + "target": "com.amazonaws.qconnect#ContactAttributeKey" + }, + "value": { + "target": "com.amazonaws.qconnect#ContactAttributeValue" + }, + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.qconnect#Content": { + "type": "resource", + "identifiers": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn" + }, + "contentId": { + "target": "com.amazonaws.qconnect#UuidOrArn" + } + }, + "create": { + "target": "com.amazonaws.qconnect#CreateContent" + }, + "read": { + "target": "com.amazonaws.qconnect#GetContent" + }, + "update": { + "target": "com.amazonaws.qconnect#UpdateContent" + }, + "delete": { + "target": "com.amazonaws.qconnect#DeleteContent" + }, + "list": { + "target": "com.amazonaws.qconnect#ListContents" + }, + "operations": [ + { + "target": "com.amazonaws.qconnect#GetContentSummary" + } + ], + "traits": { + "aws.api#arn": { + "template": "content/{knowledgeBaseId}/{contentId}" + }, + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.qconnect#ContentData": { + "type": "structure", + "members": { + "contentArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the content.

", + "smithy.api#required": {} + } + }, + "contentId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the content.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the knowledge base.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it.

", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.qconnect#Name", + "traits": { + "smithy.api#documentation": "

The name of the content.

", + "smithy.api#required": {} + } + }, + "revisionId": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The identifier of the content revision.

", + "smithy.api#required": {} + } + }, + "title": { + "target": "com.amazonaws.qconnect#ContentTitle", + "traits": { + "smithy.api#documentation": "

The title of the content.

", + "smithy.api#required": {} + } + }, + "contentType": { + "target": "com.amazonaws.qconnect#ContentType", + "traits": { + "smithy.api#documentation": "

The media type of the content.

", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.qconnect#ContentStatus", + "traits": { + "smithy.api#documentation": "

The status of the content.

", + "smithy.api#required": {} + } + }, + "metadata": { + "target": "com.amazonaws.qconnect#ContentMetadata", + "traits": { + "smithy.api#documentation": "

A key/value map to store attributes without affecting tagging or recommendations. \nFor example, when synchronizing data between an external system and Amazon Q, you can store an external version identifier as metadata to utilize for determining drift.

", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + }, + "linkOutUri": { + "target": "com.amazonaws.qconnect#Uri", + "traits": { + "smithy.api#documentation": "

The URI of the content.

" + } + }, + "url": { + "target": "com.amazonaws.qconnect#Url", + "traits": { + "smithy.api#documentation": "

The URL of the content.

", + "smithy.api#required": {} + } + }, + "urlExpiry": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The expiration time of the URL as an epoch timestamp.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about the content.

", + "smithy.api#references": [ + { + "resource": "com.amazonaws.qconnect#Content" + }, + { + "resource": "com.amazonaws.qconnect#KnowledgeBase" + } + ] + } + }, + "com.amazonaws.qconnect#ContentDataDetails": { + "type": "structure", + "members": { + "textData": { + "target": "com.amazonaws.qconnect#TextData", + "traits": { + "smithy.api#documentation": "

Details about the content text data.

", + "smithy.api#required": {} + } + }, + "rankingData": { + "target": "com.amazonaws.qconnect#RankingData", + "traits": { + "smithy.api#documentation": "

Details about the content ranking data.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Details about the content data.

" + } + }, + "com.amazonaws.qconnect#ContentMetadata": { + "type": "map", + "key": { + "target": "com.amazonaws.qconnect#NonEmptyString" + }, + "value": { + "target": "com.amazonaws.qconnect#NonEmptyString" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10 + } + } + }, + "com.amazonaws.qconnect#ContentReference": { + "type": "structure", + "members": { + "knowledgeBaseArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the knowledge base.

" + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it.

" + } + }, + "contentArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the content.

" + } + }, + "contentId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the content.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Reference information about the content.

" + } + }, + "com.amazonaws.qconnect#ContentStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATE_IN_PROGRESS", + "name": "CREATE_IN_PROGRESS" + }, + { + "value": "CREATE_FAILED", + "name": "CREATE_FAILED" + }, + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "DELETE_IN_PROGRESS", + "name": "DELETE_IN_PROGRESS" + }, + { + "value": "DELETE_FAILED", + "name": "DELETE_FAILED" + }, + { + "value": "DELETED", + "name": "DELETED" + }, + { + "value": "UPDATE_FAILED", + "name": "UPDATE_FAILED" + } + ] + } + }, + "com.amazonaws.qconnect#ContentSummary": { + "type": "structure", + "members": { + "contentArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the content.

", + "smithy.api#required": {} + } + }, + "contentId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the content.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the knowledge base.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it.

", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.qconnect#Name", + "traits": { + "smithy.api#documentation": "

The name of the content.

", + "smithy.api#required": {} + } + }, + "revisionId": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The identifier of the revision of the content.

", + "smithy.api#required": {} + } + }, + "title": { + "target": "com.amazonaws.qconnect#ContentTitle", + "traits": { + "smithy.api#documentation": "

The title of the content.

", + "smithy.api#required": {} + } + }, + "contentType": { + "target": "com.amazonaws.qconnect#ContentType", + "traits": { + "smithy.api#documentation": "

The media type of the content.

", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.qconnect#ContentStatus", + "traits": { + "smithy.api#documentation": "

The status of the content.

", + "smithy.api#required": {} + } + }, + "metadata": { + "target": "com.amazonaws.qconnect#ContentMetadata", + "traits": { + "smithy.api#documentation": "

A key/value map to store attributes without affecting tagging or recommendations. \nFor example, when synchronizing data between an external system and Amazon Q, you can store an external version identifier as metadata to utilize for determining drift.

", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary information about the content.

", + "smithy.api#references": [ + { + "resource": "com.amazonaws.qconnect#Content" + }, + { + "resource": "com.amazonaws.qconnect#KnowledgeBase" + } + ] + } + }, + "com.amazonaws.qconnect#ContentSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#ContentSummary" + } + }, + "com.amazonaws.qconnect#ContentTitle": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + } + } + }, + "com.amazonaws.qconnect#ContentType": { + "type": "string", + "traits": { + "smithy.api#pattern": "^(text/(plain|html|csv))|(application/(pdf|vnd\\.openxmlformats-officedocument\\.wordprocessingml\\.document))|(application/x\\.wisdom-json;source=(salesforce|servicenow|zendesk))$" + } + }, + "com.amazonaws.qconnect#CreateAssistant": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#CreateAssistantRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#CreateAssistantResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ConflictException" + }, + { + "target": "com.amazonaws.qconnect#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates an Amazon Q in Connect assistant.

", + "smithy.api#http": { + "uri": "/assistants", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qconnect#CreateAssistantAssociation": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#CreateAssistantAssociationRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#CreateAssistantAssociationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ConflictException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates an association between an Amazon Q in Connect assistant and another resource. Currently, the\n only supported association is with a knowledge base. An assistant can have only a single\n association.

", + "smithy.api#http": { + "uri": "/assistants/{assistantId}/associations", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qconnect#CreateAssistantAssociationRequest": { + "type": "structure", + "members": { + "assistantId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "associationType": { + "target": "com.amazonaws.qconnect#AssociationType", + "traits": { + "smithy.api#documentation": "

The type of association.

", + "smithy.api#required": {} + } + }, + "association": { + "target": "com.amazonaws.qconnect#AssistantAssociationInputData", + "traits": { + "smithy.api#documentation": "

The identifier of the associated resource.

", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.qconnect#ClientToken", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If not provided, the Amazon Web Services\n SDK populates this field. For more information about idempotency, see\n Making retries safe with idempotent APIs.

", + "smithy.api#idempotencyToken": {} + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + } + }, + "com.amazonaws.qconnect#CreateAssistantAssociationResponse": { + "type": "structure", + "members": { + "assistantAssociation": { + "target": "com.amazonaws.qconnect#AssistantAssociationData", + "traits": { + "smithy.api#documentation": "

The assistant association.

" + } + } + } + }, + "com.amazonaws.qconnect#CreateAssistantRequest": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.qconnect#ClientToken", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If not provided, the Amazon Web Services\n SDK populates this field. For more information about idempotency, see\n Making retries safe with idempotent APIs.

", + "smithy.api#idempotencyToken": {} + } + }, + "name": { + "target": "com.amazonaws.qconnect#Name", + "traits": { + "smithy.api#documentation": "

The name of the assistant.

", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.qconnect#AssistantType", + "traits": { + "smithy.api#documentation": "

The type of assistant.

", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.qconnect#Description", + "traits": { + "smithy.api#documentation": "

The description of the assistant.

" + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + }, + "serverSideEncryptionConfiguration": { + "target": "com.amazonaws.qconnect#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information for the customer managed key used for encryption.

\n

The customer managed key must have a policy that allows kms:CreateGrant,\n kms:DescribeKey, kms:Decrypt, and\n kms:GenerateDataKey* permissions to the IAM identity using the\n key to invoke Amazon Q. To use Amazon Q with chat, the key policy must also allow\n kms:Decrypt, kms:GenerateDataKey*, and\n kms:DescribeKey permissions to the connect.amazonaws.com service\n principal.

\n

For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for\n your instance.

" + } + } + } + }, + "com.amazonaws.qconnect#CreateAssistantResponse": { + "type": "structure", + "members": { + "assistant": { + "target": "com.amazonaws.qconnect#AssistantData", + "traits": { + "smithy.api#documentation": "

Information about the assistant.

" + } + } + } + }, + "com.amazonaws.qconnect#CreateContent": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#CreateContentRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#CreateContentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ConflictException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates Amazon Q content. Before to calling this API, use StartContentUpload to\n upload an asset.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/contents", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qconnect#CreateContentRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.qconnect#Name", + "traits": { + "smithy.api#documentation": "

The name of the content. Each piece of content in a knowledge base must have a unique\n name. You can retrieve a piece of content using only its knowledge base and its name with the\n SearchContent API.

", + "smithy.api#required": {} + } + }, + "title": { + "target": "com.amazonaws.qconnect#ContentTitle", + "traits": { + "smithy.api#documentation": "

The title of the content. If not set, the title is equal to the name.

" + } + }, + "overrideLinkOutUri": { + "target": "com.amazonaws.qconnect#Uri", + "traits": { + "smithy.api#documentation": "

The URI you want to use for the article. If the knowledge base has a templateUri, setting\n this argument overrides it for this piece of content.

" + } + }, + "metadata": { + "target": "com.amazonaws.qconnect#ContentMetadata", + "traits": { + "smithy.api#documentation": "

A key/value map to store attributes without affecting tagging or recommendations. \nFor example, when synchronizing data between an external system and Amazon Q, you can store an external version identifier as metadata to utilize for determining drift.

" + } + }, + "uploadId": { + "target": "com.amazonaws.qconnect#UploadId", + "traits": { + "smithy.api#documentation": "

A pointer to the uploaded asset. This value is returned by StartContentUpload.

", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If not provided, the Amazon Web Services\n SDK populates this field. For more information about idempotency, see\n Making retries safe with idempotent APIs.

", + "smithy.api#idempotencyToken": {} + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + } + }, + "com.amazonaws.qconnect#CreateContentResponse": { + "type": "structure", + "members": { + "content": { + "target": "com.amazonaws.qconnect#ContentData", + "traits": { + "smithy.api#documentation": "

The content.

" + } + } + } + }, + "com.amazonaws.qconnect#CreateKnowledgeBase": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#CreateKnowledgeBaseRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#CreateKnowledgeBaseResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ConflictException" + }, + { + "target": "com.amazonaws.qconnect#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a knowledge base.

\n \n

When using this API, you cannot reuse Amazon AppIntegrations\n DataIntegrations with external knowledge bases such as Salesforce and ServiceNow. If you do,\n you'll get an InvalidRequestException error.

\n

For example, you're programmatically managing your external knowledge base, and you want\n to add or remove one of the fields that is being ingested from Salesforce. Do the\n following:

\n
    \n
  1. \n

    Call DeleteKnowledgeBase.

    \n
  2. \n
  3. \n

    Call DeleteDataIntegration.

    \n
  4. \n
  5. \n

    Call CreateDataIntegration to recreate the DataIntegration or a create different\n one.

    \n
  6. \n
  7. \n

    Call CreateKnowledgeBase.

    \n
  8. \n
\n
", + "smithy.api#http": { + "uri": "/knowledgeBases", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qconnect#CreateKnowledgeBaseRequest": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If not provided, the Amazon Web Services\n SDK populates this field. For more information about idempotency, see\n Making retries safe with idempotent APIs.

", + "smithy.api#idempotencyToken": {} + } + }, + "name": { + "target": "com.amazonaws.qconnect#Name", + "traits": { + "smithy.api#documentation": "

The name of the knowledge base.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseType": { + "target": "com.amazonaws.qconnect#KnowledgeBaseType", + "traits": { + "smithy.api#documentation": "

The type of knowledge base. Only CUSTOM knowledge bases allow you to upload your own content.\n EXTERNAL knowledge bases support integrations with third-party systems whose content is\n synchronized automatically.

", + "smithy.api#required": {} + } + }, + "sourceConfiguration": { + "target": "com.amazonaws.qconnect#SourceConfiguration", + "traits": { + "smithy.api#documentation": "

The source of the knowledge base content. Only set this argument for EXTERNAL knowledge\n bases.

" + } + }, + "renderingConfiguration": { + "target": "com.amazonaws.qconnect#RenderingConfiguration", + "traits": { + "smithy.api#documentation": "

Information about how to render the content.

" + } + }, + "serverSideEncryptionConfiguration": { + "target": "com.amazonaws.qconnect#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information for the customer managed key used for encryption.

\n

This KMS key must have a policy that allows kms:CreateGrant,\n kms:DescribeKey, kms:Decrypt, and\n kms:GenerateDataKey* permissions to the IAM identity using the\n key to invoke Amazon Q.

\n

For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for\n your instance.

" + } + }, + "description": { + "target": "com.amazonaws.qconnect#Description", + "traits": { + "smithy.api#documentation": "

The description.

" + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + } + }, + "com.amazonaws.qconnect#CreateKnowledgeBaseResponse": { + "type": "structure", + "members": { + "knowledgeBase": { + "target": "com.amazonaws.qconnect#KnowledgeBaseData", + "traits": { + "smithy.api#documentation": "

The knowledge base.

" + } + } + } + }, + "com.amazonaws.qconnect#CreateQuickResponse": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#CreateQuickResponseRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#CreateQuickResponseResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ConflictException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a Amazon Q quick response.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/quickResponses", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qconnect#CreateQuickResponseRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.qconnect#QuickResponseName", + "traits": { + "smithy.api#documentation": "

The name of the quick response.

", + "smithy.api#required": {} + } + }, + "content": { + "target": "com.amazonaws.qconnect#QuickResponseDataProvider", + "traits": { + "smithy.api#documentation": "

The content of the quick response.

", + "smithy.api#required": {} + } + }, + "contentType": { + "target": "com.amazonaws.qconnect#QuickResponseType", + "traits": { + "smithy.api#documentation": "

The media type of the quick response content.

\n
    \n
  • \n

    Use application/x.quickresponse;format=plain for a quick response written in plain text.

    \n
  • \n
  • \n

    Use application/x.quickresponse;format=markdown for a quick response written in richtext.

    \n
  • \n
" + } + }, + "groupingConfiguration": { + "target": "com.amazonaws.qconnect#GroupingConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information of the user groups that the quick response is accessible to.

" + } + }, + "description": { + "target": "com.amazonaws.qconnect#QuickResponseDescription", + "traits": { + "smithy.api#documentation": "

The description of the quick response.

" + } + }, + "shortcutKey": { + "target": "com.amazonaws.qconnect#ShortCutKey", + "traits": { + "smithy.api#documentation": "

The shortcut key of the quick response. The value should be unique across the\n knowledge base.\n

" + } + }, + "isActive": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Whether the quick response is active.

" + } + }, + "channels": { + "target": "com.amazonaws.qconnect#Channels", + "traits": { + "smithy.api#documentation": "

The Amazon Connect channels this quick response applies to.

" + } + }, + "language": { + "target": "com.amazonaws.qconnect#LanguageCode", + "traits": { + "smithy.api#documentation": "

The language code value for the language in which the quick response is written. The supported language codes include de_DE, en_US, es_ES,\n fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR,\n zh_CN, zh_TW\n

" + } + }, + "clientToken": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If not provided, the Amazon Web Services\n SDK populates this field. For more information about idempotency, see\n Making retries safe with idempotent APIs.

", + "smithy.api#idempotencyToken": {} + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qconnect#CreateQuickResponseResponse": { + "type": "structure", + "members": { + "quickResponse": { + "target": "com.amazonaws.qconnect#QuickResponseData", + "traits": { + "smithy.api#documentation": "

The quick response.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qconnect#CreateSession": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#CreateSessionRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#CreateSessionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#ConflictException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a session. A session is a contextual container used for generating\n recommendations. Amazon Connect creates a new Amazon Q session for each contact on which\n Amazon Q is enabled.

", + "smithy.api#http": { + "uri": "/assistants/{assistantId}/sessions", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qconnect#CreateSessionRequest": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.qconnect#ClientToken", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If not provided, the Amazon Web Services\n SDK populates this field. For more information about idempotency, see\n Making retries safe with idempotent APIs.

", + "smithy.api#idempotencyToken": {} + } + }, + "assistantId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.qconnect#Name", + "traits": { + "smithy.api#documentation": "

The name of the session.

", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.qconnect#Description", + "traits": { + "smithy.api#documentation": "

The description.

" + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + } + }, + "com.amazonaws.qconnect#CreateSessionResponse": { + "type": "structure", + "members": { + "session": { + "target": "com.amazonaws.qconnect#SessionData", + "traits": { + "smithy.api#documentation": "

The session.

" + } + } + } + }, + "com.amazonaws.qconnect#DataDetails": { + "type": "union", + "members": { + "contentData": { + "target": "com.amazonaws.qconnect#ContentDataDetails", + "traits": { + "smithy.api#documentation": "

Details about the content data.

" + } + }, + "generativeData": { + "target": "com.amazonaws.qconnect#GenerativeDataDetails", + "traits": { + "smithy.api#documentation": "

Details about the generative data.

" + } + }, + "sourceContentData": { + "target": "com.amazonaws.qconnect#SourceContentDataDetails", + "traits": { + "smithy.api#documentation": "

Details about the content data.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Details about the data.

" + } + }, + "com.amazonaws.qconnect#DataReference": { + "type": "union", + "members": { + "contentReference": { + "target": "com.amazonaws.qconnect#ContentReference" + }, + "generativeReference": { + "target": "com.amazonaws.qconnect#GenerativeReference", + "traits": { + "smithy.api#documentation": "

Reference information about the generative content.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Reference data.

" + } + }, + "com.amazonaws.qconnect#DataSummary": { + "type": "structure", + "members": { + "reference": { + "target": "com.amazonaws.qconnect#DataReference", + "traits": { + "smithy.api#documentation": "

Reference information about the content.

", + "smithy.api#required": {} + } + }, + "details": { + "target": "com.amazonaws.qconnect#DataDetails", + "traits": { + "smithy.api#documentation": "

Details about the data.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary of the data.

" + } + }, + "com.amazonaws.qconnect#DataSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#DataSummary" + } + }, + "com.amazonaws.qconnect#DeleteAssistant": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#DeleteAssistantRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#DeleteAssistantResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes an assistant.

", + "smithy.api#http": { + "uri": "/assistants/{assistantId}", + "method": "DELETE", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qconnect#DeleteAssistantAssociation": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#DeleteAssistantAssociationRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#DeleteAssistantAssociationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes an assistant association.

", + "smithy.api#http": { + "uri": "/assistants/{assistantId}/associations/{assistantAssociationId}", + "method": "DELETE", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qconnect#DeleteAssistantAssociationRequest": { + "type": "structure", + "members": { + "assistantAssociationId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the assistant association. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "assistantId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#DeleteAssistantAssociationResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.qconnect#DeleteAssistantRequest": { + "type": "structure", + "members": { + "assistantId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#DeleteAssistantResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.qconnect#DeleteContent": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#DeleteContentRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#DeleteContentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes the content.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}", + "method": "DELETE", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qconnect#DeleteContentRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "contentId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#DeleteContentResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.qconnect#DeleteImportJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#DeleteImportJobRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#DeleteImportJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ConflictException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes the quick response import job.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/importJobs/{importJobId}", + "method": "DELETE", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qconnect#DeleteImportJobRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "importJobId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the import job to be deleted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qconnect#DeleteImportJobResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qconnect#DeleteKnowledgeBase": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#DeleteKnowledgeBaseRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#DeleteKnowledgeBaseResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ConflictException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes the knowledge base.

\n \n

When you use this API to delete an external knowledge base such as Salesforce or\n ServiceNow, you must also delete the Amazon AppIntegrations\n DataIntegration. This is because you can't reuse the DataIntegration after it's been\n associated with an external knowledge base. However, you can delete and recreate it. See\n DeleteDataIntegration and CreateDataIntegration in the Amazon AppIntegrations API\n Reference.

\n
", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}", + "method": "DELETE", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qconnect#DeleteKnowledgeBaseRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The knowledge base to delete content from. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#DeleteKnowledgeBaseResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.qconnect#DeleteQuickResponse": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#DeleteQuickResponseRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#DeleteQuickResponseResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a quick response.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}", + "method": "DELETE", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qconnect#DeleteQuickResponseRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The knowledge base from which the quick response is deleted. The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "quickResponseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the quick response to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qconnect#DeleteQuickResponseResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qconnect#Description": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[a-zA-Z0-9\\s_.,-]+" + } + }, + "com.amazonaws.qconnect#Document": { + "type": "structure", + "members": { + "contentReference": { + "target": "com.amazonaws.qconnect#ContentReference", + "traits": { + "smithy.api#documentation": "

A reference to the content resource.

", + "smithy.api#required": {} + } + }, + "title": { + "target": "com.amazonaws.qconnect#DocumentText", + "traits": { + "smithy.api#documentation": "

The title of the document.

" + } + }, + "excerpt": { + "target": "com.amazonaws.qconnect#DocumentText", + "traits": { + "smithy.api#documentation": "

The excerpt from the document.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The document.

" + } + }, + "com.amazonaws.qconnect#DocumentText": { + "type": "structure", + "members": { + "text": { + "target": "com.amazonaws.qconnect#SensitiveString", + "traits": { + "smithy.api#documentation": "

Text in the document.

" + } + }, + "highlights": { + "target": "com.amazonaws.qconnect#Highlights", + "traits": { + "smithy.api#documentation": "

Highlights in the document text.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The text of the document.

" + } + }, + "com.amazonaws.qconnect#ExternalSource": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AMAZON_CONNECT", + "name": "AMAZON_CONNECT" + } + ] + } + }, + "com.amazonaws.qconnect#ExternalSourceConfiguration": { + "type": "structure", + "members": { + "source": { + "target": "com.amazonaws.qconnect#ExternalSource", + "traits": { + "smithy.api#documentation": "

The type of the external data source.

", + "smithy.api#required": {} + } + }, + "configuration": { + "target": "com.amazonaws.qconnect#Configuration", + "traits": { + "smithy.api#documentation": "

The configuration information of the external data source.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The configuration information of the external data source.

" + } + }, + "com.amazonaws.qconnect#Filter": { + "type": "structure", + "members": { + "field": { + "target": "com.amazonaws.qconnect#FilterField", + "traits": { + "smithy.api#documentation": "

The field on which to filter.

", + "smithy.api#required": {} + } + }, + "operator": { + "target": "com.amazonaws.qconnect#FilterOperator", + "traits": { + "smithy.api#documentation": "

The operator to use for comparing the field’s value with the provided value.

", + "smithy.api#required": {} + } + }, + "value": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The desired field value on which to filter.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

A search filter.

" + } + }, + "com.amazonaws.qconnect#FilterField": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NAME", + "name": "NAME" + } + ] + } + }, + "com.amazonaws.qconnect#FilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#Filter" + } + }, + "com.amazonaws.qconnect#FilterOperator": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EQUALS", + "name": "EQUALS" + } + ] + } + }, + "com.amazonaws.qconnect#GenerativeDataDetails": { + "type": "structure", + "members": { + "completion": { + "target": "com.amazonaws.qconnect#SensitiveString", + "traits": { + "smithy.api#documentation": "

The LLM response.

", + "smithy.api#required": {} + } + }, + "references": { + "target": "com.amazonaws.qconnect#DataSummaryList", + "traits": { + "smithy.api#documentation": "

The references used to generative the LLM response.

", + "smithy.api#required": {} + } + }, + "rankingData": { + "target": "com.amazonaws.qconnect#RankingData", + "traits": { + "smithy.api#documentation": "

Details about the generative content ranking data.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Details about generative data.

" + } + }, + "com.amazonaws.qconnect#GenerativeReference": { + "type": "structure", + "members": { + "modelId": { + "target": "com.amazonaws.qconnect#LlmModelId", + "traits": { + "smithy.api#documentation": "

The identifier of the LLM model.

" + } + }, + "generationId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the LLM model.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Reference information about generative content.

" + } + }, + "com.amazonaws.qconnect#GenericArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^arn:[a-z-]+?:[a-z-]+?:[a-z0-9-]*?:([0-9]{12})?:[a-zA-Z0-9-:/]+$" + } + }, + "com.amazonaws.qconnect#GetAssistant": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#GetAssistantRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#GetAssistantResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves information about an assistant.

", + "smithy.api#http": { + "uri": "/assistants/{assistantId}", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#GetAssistantAssociation": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#GetAssistantAssociationRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#GetAssistantAssociationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves information about an assistant association.

", + "smithy.api#http": { + "uri": "/assistants/{assistantId}/associations/{assistantAssociationId}", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#GetAssistantAssociationRequest": { + "type": "structure", + "members": { + "assistantAssociationId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the assistant association. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "assistantId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#GetAssistantAssociationResponse": { + "type": "structure", + "members": { + "assistantAssociation": { + "target": "com.amazonaws.qconnect#AssistantAssociationData", + "traits": { + "smithy.api#documentation": "

The assistant association.

" + } + } + } + }, + "com.amazonaws.qconnect#GetAssistantRequest": { + "type": "structure", + "members": { + "assistantId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#GetAssistantResponse": { + "type": "structure", + "members": { + "assistant": { + "target": "com.amazonaws.qconnect#AssistantData", + "traits": { + "smithy.api#documentation": "

Information about the assistant.

" + } + } + } + }, + "com.amazonaws.qconnect#GetContent": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#GetContentRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#GetContentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves content, including a pre-signed URL to download the content.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#GetContentRequest": { + "type": "structure", + "members": { + "contentId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#GetContentResponse": { + "type": "structure", + "members": { + "content": { + "target": "com.amazonaws.qconnect#ContentData", + "traits": { + "smithy.api#documentation": "

The content.

" + } + } + } + }, + "com.amazonaws.qconnect#GetContentSummary": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#GetContentSummaryRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#GetContentSummaryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves summary information about the content.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}/summary", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#GetContentSummaryRequest": { + "type": "structure", + "members": { + "contentId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#GetContentSummaryResponse": { + "type": "structure", + "members": { + "contentSummary": { + "target": "com.amazonaws.qconnect#ContentSummary", + "traits": { + "smithy.api#documentation": "

The content summary.

" + } + } + } + }, + "com.amazonaws.qconnect#GetImportJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#GetImportJobRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#GetImportJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves the started import job.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/importJobs/{importJobId}", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#GetImportJobRequest": { + "type": "structure", + "members": { + "importJobId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the import job to retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base that the import job belongs to.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qconnect#GetImportJobResponse": { + "type": "structure", + "members": { + "importJob": { + "target": "com.amazonaws.qconnect#ImportJobData", + "traits": { + "smithy.api#documentation": "

The import job.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qconnect#GetKnowledgeBase": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#GetKnowledgeBaseRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#GetKnowledgeBaseResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves information about the knowledge base.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#GetKnowledgeBaseRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#GetKnowledgeBaseResponse": { + "type": "structure", + "members": { + "knowledgeBase": { + "target": "com.amazonaws.qconnect#KnowledgeBaseData", + "traits": { + "smithy.api#documentation": "

The knowledge base.

" + } + } + } + }, + "com.amazonaws.qconnect#GetQuickResponse": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#GetQuickResponseRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#GetQuickResponseResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves the quick response.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#GetQuickResponseRequest": { + "type": "structure", + "members": { + "quickResponseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the quick response.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should be a QUICK_RESPONSES type knowledge base.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qconnect#GetQuickResponseResponse": { + "type": "structure", + "members": { + "quickResponse": { + "target": "com.amazonaws.qconnect#QuickResponseData", + "traits": { + "smithy.api#documentation": "

The quick response.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qconnect#GetRecommendations": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#GetRecommendationsRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#GetRecommendationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves recommendations for the specified session. To avoid retrieving the same\n recommendations in subsequent calls, use NotifyRecommendationsReceived. This API supports long-polling behavior with the\n waitTimeSeconds parameter. Short poll is the default behavior and only returns\n recommendations already available. To perform a manual query against an assistant, use QueryAssistant.

", + "smithy.api#http": { + "uri": "/assistants/{assistantId}/sessions/{sessionId}/recommendations", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#GetRecommendationsRequest": { + "type": "structure", + "members": { + "assistantId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "sessionId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "maxResults": { + "target": "com.amazonaws.qconnect#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return per page.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "waitTimeSeconds": { + "target": "com.amazonaws.qconnect#WaitTimeSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The duration (in seconds) for which the call waits for a recommendation to be made\n available before returning. If a recommendation is available, the call returns sooner than\n WaitTimeSeconds. If no messages are available and the wait time expires, the\n call returns successfully with an empty list.

", + "smithy.api#httpQuery": "waitTimeSeconds" + } + } + } + }, + "com.amazonaws.qconnect#GetRecommendationsResponse": { + "type": "structure", + "members": { + "recommendations": { + "target": "com.amazonaws.qconnect#RecommendationList", + "traits": { + "smithy.api#documentation": "

The recommendations.

", + "smithy.api#required": {} + } + }, + "triggers": { + "target": "com.amazonaws.qconnect#RecommendationTriggerList", + "traits": { + "smithy.api#documentation": "

The triggers corresponding to recommendations.

" + } + } + } + }, + "com.amazonaws.qconnect#GetSession": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#GetSessionRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#GetSessionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves information for a specified session.

", + "smithy.api#http": { + "uri": "/assistants/{assistantId}/sessions/{sessionId}", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#GetSessionRequest": { + "type": "structure", + "members": { + "assistantId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "sessionId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#GetSessionResponse": { + "type": "structure", + "members": { + "session": { + "target": "com.amazonaws.qconnect#SessionData", + "traits": { + "smithy.api#documentation": "

The session.

" + } + } + } + }, + "com.amazonaws.qconnect#GroupingConfiguration": { + "type": "structure", + "members": { + "criteria": { + "target": "com.amazonaws.qconnect#GroupingCriteria", + "traits": { + "smithy.api#documentation": "

The criteria used for grouping Amazon Q users.

\n

The following is the list of supported criteria values.

\n " + } + }, + "values": { + "target": "com.amazonaws.qconnect#GroupingValues", + "traits": { + "smithy.api#documentation": "

The list of values that define different groups of Amazon Q users.

\n
    \n
  • \n

    When setting criteria to RoutingProfileArn, you need to provide a list of\n ARNs of Amazon Connect routing profiles as values of this parameter.

    \n
  • \n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

The configuration information of the grouping of Amazon Q users.

" + } + }, + "com.amazonaws.qconnect#GroupingCriteria": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.qconnect#GroupingValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.qconnect#GroupingValues": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#GroupingValue" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.qconnect#Headers": { + "type": "map", + "key": { + "target": "com.amazonaws.qconnect#NonEmptyString" + }, + "value": { + "target": "com.amazonaws.qconnect#NonEmptyString" + } + }, + "com.amazonaws.qconnect#Highlight": { + "type": "structure", + "members": { + "beginOffsetInclusive": { + "target": "com.amazonaws.qconnect#HighlightOffset", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The offset for the start of the highlight.

" + } + }, + "endOffsetExclusive": { + "target": "com.amazonaws.qconnect#HighlightOffset", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The offset for the end of the highlight.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Offset specification to describe highlighting of document excerpts for rendering search\n results and recommendations.

" + } + }, + "com.amazonaws.qconnect#HighlightOffset": { + "type": "integer", + "traits": { + "smithy.api#default": 0 + } + }, + "com.amazonaws.qconnect#Highlights": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#Highlight" + } + }, + "com.amazonaws.qconnect#ImportJobData": { + "type": "structure", + "members": { + "importJobId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the import job.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it.

", + "smithy.api#required": {} + } + }, + "uploadId": { + "target": "com.amazonaws.qconnect#UploadId", + "traits": { + "smithy.api#documentation": "

A pointer to the uploaded asset. This value is returned by StartContentUpload.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the knowledge base.

", + "smithy.api#required": {} + } + }, + "importJobType": { + "target": "com.amazonaws.qconnect#ImportJobType", + "traits": { + "smithy.api#documentation": "

The type of the import job.

", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.qconnect#ImportJobStatus", + "traits": { + "smithy.api#documentation": "

The status of the import job.

", + "smithy.api#required": {} + } + }, + "url": { + "target": "com.amazonaws.qconnect#Url", + "traits": { + "smithy.api#documentation": "

The download link to the resource file that is uploaded to the import job.

", + "smithy.api#required": {} + } + }, + "failedRecordReport": { + "target": "com.amazonaws.qconnect#Url", + "traits": { + "smithy.api#documentation": "

The link to donwload the information of resource data that failed to be imported.

" + } + }, + "urlExpiry": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The expiration time of the URL as an epoch timestamp.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "createdTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp when the import job was created.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "lastModifiedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp when the import job data was last modified.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "metadata": { + "target": "com.amazonaws.qconnect#ContentMetadata", + "traits": { + "smithy.api#documentation": "

The metadata fields of the imported Amazon Q resources.

" + } + }, + "externalSourceConfiguration": { + "target": "com.amazonaws.qconnect#ExternalSourceConfiguration" + } + }, + "traits": { + "smithy.api#documentation": "

Summary information about the import job.

" + } + }, + "com.amazonaws.qconnect#ImportJobList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#ImportJobSummary" + } + }, + "com.amazonaws.qconnect#ImportJobStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "START_IN_PROGRESS", + "name": "START_IN_PROGRESS" + }, + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "COMPLETE", + "name": "COMPLETE" + }, + { + "value": "DELETE_IN_PROGRESS", + "name": "DELETE_IN_PROGRESS" + }, + { + "value": "DELETE_FAILED", + "name": "DELETE_FAILED" + }, + { + "value": "DELETED", + "name": "DELETED" + } + ] + } + }, + "com.amazonaws.qconnect#ImportJobSummary": { + "type": "structure", + "members": { + "importJobId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the import job.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it.

", + "smithy.api#required": {} + } + }, + "uploadId": { + "target": "com.amazonaws.qconnect#UploadId", + "traits": { + "smithy.api#documentation": "

A pointer to the uploaded asset. This value is returned by StartContentUpload.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the knowledge base.

", + "smithy.api#required": {} + } + }, + "importJobType": { + "target": "com.amazonaws.qconnect#ImportJobType", + "traits": { + "smithy.api#documentation": "

The type of import job.

", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.qconnect#ImportJobStatus", + "traits": { + "smithy.api#documentation": "

The status of the import job.

", + "smithy.api#required": {} + } + }, + "createdTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp when the import job was created.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "lastModifiedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp when the import job was last modified.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "metadata": { + "target": "com.amazonaws.qconnect#ContentMetadata", + "traits": { + "smithy.api#documentation": "

The metadata fields of the imported Amazon Q resources.

" + } + }, + "externalSourceConfiguration": { + "target": "com.amazonaws.qconnect#ExternalSourceConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information of the external source that the resource data are imported from.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary information about the import job.

" + } + }, + "com.amazonaws.qconnect#ImportJobType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "QUICK_RESPONSES", + "name": "QUICK_RESPONSES" + } + ] + } + }, + "com.amazonaws.qconnect#KnowledgeBase": { + "type": "resource", + "identifiers": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn" + } + }, + "create": { + "target": "com.amazonaws.qconnect#CreateKnowledgeBase" + }, + "read": { + "target": "com.amazonaws.qconnect#GetKnowledgeBase" + }, + "delete": { + "target": "com.amazonaws.qconnect#DeleteKnowledgeBase" + }, + "list": { + "target": "com.amazonaws.qconnect#ListKnowledgeBases" + }, + "operations": [ + { + "target": "com.amazonaws.qconnect#DeleteImportJob" + }, + { + "target": "com.amazonaws.qconnect#GetImportJob" + }, + { + "target": "com.amazonaws.qconnect#ListImportJobs" + }, + { + "target": "com.amazonaws.qconnect#RemoveKnowledgeBaseTemplateUri" + }, + { + "target": "com.amazonaws.qconnect#SearchContent" + }, + { + "target": "com.amazonaws.qconnect#SearchQuickResponses" + }, + { + "target": "com.amazonaws.qconnect#StartContentUpload" + }, + { + "target": "com.amazonaws.qconnect#StartImportJob" + }, + { + "target": "com.amazonaws.qconnect#UpdateKnowledgeBaseTemplateUri" + } + ], + "resources": [ + { + "target": "com.amazonaws.qconnect#Content" + }, + { + "target": "com.amazonaws.qconnect#QuickResponse" + } + ], + "traits": { + "aws.api#arn": { + "template": "knowledge-base/{knowledgeBaseId}" + }, + "aws.cloudformation#cfnResource": {}, + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.qconnect#KnowledgeBaseAssociationData": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it.

" + } + }, + "knowledgeBaseArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the knowledge base.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Association information about the knowledge base.

" + } + }, + "com.amazonaws.qconnect#KnowledgeBaseData": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the knowledge base.

", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.qconnect#Name", + "traits": { + "smithy.api#documentation": "

The name of the knowledge base.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseType": { + "target": "com.amazonaws.qconnect#KnowledgeBaseType", + "traits": { + "smithy.api#documentation": "

The type of knowledge base.

", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.qconnect#KnowledgeBaseStatus", + "traits": { + "smithy.api#documentation": "

The status of the knowledge base.

", + "smithy.api#required": {} + } + }, + "lastContentModificationTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

An epoch timestamp indicating the most recent content modification inside the knowledge\n base. If no content exists in a knowledge base, this value is unset.

", + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "sourceConfiguration": { + "target": "com.amazonaws.qconnect#SourceConfiguration", + "traits": { + "smithy.api#documentation": "

Source configuration information about the knowledge base.

" + } + }, + "renderingConfiguration": { + "target": "com.amazonaws.qconnect#RenderingConfiguration", + "traits": { + "smithy.api#documentation": "

Information about how to render the content.

" + } + }, + "serverSideEncryptionConfiguration": { + "target": "com.amazonaws.qconnect#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information for the customer managed key used for encryption.

\n

This KMS key must have a policy that allows kms:CreateGrant,\n kms:DescribeKey, kms:Decrypt, and\n kms:GenerateDataKey* permissions to the IAM identity using the\n key to invoke Amazon Q.

\n

For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for\n your instance.

" + } + }, + "description": { + "target": "com.amazonaws.qconnect#Description", + "traits": { + "smithy.api#documentation": "

The description.

" + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about the knowledge base.

", + "smithy.api#references": [ + { + "resource": "com.amazonaws.qconnect#KnowledgeBase" + } + ] + } + }, + "com.amazonaws.qconnect#KnowledgeBaseList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#KnowledgeBaseSummary" + } + }, + "com.amazonaws.qconnect#KnowledgeBaseStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATE_IN_PROGRESS", + "name": "CREATE_IN_PROGRESS" + }, + { + "value": "CREATE_FAILED", + "name": "CREATE_FAILED" + }, + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "DELETE_IN_PROGRESS", + "name": "DELETE_IN_PROGRESS" + }, + { + "value": "DELETE_FAILED", + "name": "DELETE_FAILED" + }, + { + "value": "DELETED", + "name": "DELETED" + } + ] + } + }, + "com.amazonaws.qconnect#KnowledgeBaseSummary": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the knowledge base.

", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.qconnect#Name", + "traits": { + "smithy.api#documentation": "

The name of the knowledge base.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseType": { + "target": "com.amazonaws.qconnect#KnowledgeBaseType", + "traits": { + "smithy.api#documentation": "

The type of knowledge base.

", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.qconnect#KnowledgeBaseStatus", + "traits": { + "smithy.api#documentation": "

The status of the knowledge base summary.

", + "smithy.api#required": {} + } + }, + "sourceConfiguration": { + "target": "com.amazonaws.qconnect#SourceConfiguration", + "traits": { + "smithy.api#documentation": "

Configuration information about the external data source.

" + } + }, + "renderingConfiguration": { + "target": "com.amazonaws.qconnect#RenderingConfiguration", + "traits": { + "smithy.api#documentation": "

Information about how to render the content.

" + } + }, + "serverSideEncryptionConfiguration": { + "target": "com.amazonaws.qconnect#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information for the customer managed key used for encryption.

\n

This KMS key must have a policy that allows kms:CreateGrant,\n kms:DescribeKey, kms:Decrypt, and\n kms:GenerateDataKey* permissions to the IAM identity using the\n key to invoke Amazon Q.

\n

For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for\n your instance.

" + } + }, + "description": { + "target": "com.amazonaws.qconnect#Description", + "traits": { + "smithy.api#documentation": "

The description of the knowledge base.

" + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary information about the knowledge base.

", + "smithy.api#references": [ + { + "resource": "com.amazonaws.qconnect#KnowledgeBase" + } + ] + } + }, + "com.amazonaws.qconnect#KnowledgeBaseType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EXTERNAL", + "name": "EXTERNAL" + }, + { + "value": "CUSTOM", + "name": "CUSTOM" + }, + { + "value": "QUICK_RESPONSES", + "name": "QUICK_RESPONSES" + } + ] + } + }, + "com.amazonaws.qconnect#LanguageCode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 5 + } + } + }, + "com.amazonaws.qconnect#ListAssistantAssociations": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#ListAssistantAssociationsRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#ListAssistantAssociationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists information about assistant associations.

", + "smithy.api#http": { + "uri": "/assistants/{assistantId}/associations", + "method": "GET" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "assistantAssociationSummaries" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#ListAssistantAssociationsRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.qconnect#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qconnect#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return per page.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "assistantId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#ListAssistantAssociationsResponse": { + "type": "structure", + "members": { + "assistantAssociationSummaries": { + "target": "com.amazonaws.qconnect#AssistantAssociationSummaryList", + "traits": { + "smithy.api#documentation": "

Summary information about assistant associations.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.qconnect#NextToken", + "traits": { + "smithy.api#documentation": "

If there are additional results, this is the token for the next set of results.

" + } + } + } + }, + "com.amazonaws.qconnect#ListAssistants": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#ListAssistantsRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#ListAssistantsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists information about assistants.

", + "smithy.api#http": { + "uri": "/assistants", + "method": "GET" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "assistantSummaries" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#ListAssistantsRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.qconnect#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qconnect#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return per page.

", + "smithy.api#httpQuery": "maxResults" + } + } + } + }, + "com.amazonaws.qconnect#ListAssistantsResponse": { + "type": "structure", + "members": { + "assistantSummaries": { + "target": "com.amazonaws.qconnect#AssistantList", + "traits": { + "smithy.api#documentation": "

Information about the assistants.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.qconnect#NextToken", + "traits": { + "smithy.api#documentation": "

If there are additional results, this is the token for the next set of results.

" + } + } + } + }, + "com.amazonaws.qconnect#ListContents": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#ListContentsRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#ListContentsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the content.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/contents", + "method": "GET" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "contentSummaries" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#ListContentsRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.qconnect#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qconnect#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return per page.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#ListContentsResponse": { + "type": "structure", + "members": { + "contentSummaries": { + "target": "com.amazonaws.qconnect#ContentSummaryList", + "traits": { + "smithy.api#documentation": "

Information about the content.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.qconnect#NextToken", + "traits": { + "smithy.api#documentation": "

If there are additional results, this is the token for the next set of results.

" + } + } + } + }, + "com.amazonaws.qconnect#ListImportJobs": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#ListImportJobsRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#ListImportJobsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists information about import jobs.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/importJobs", + "method": "GET" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "importJobSummaries" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#ListImportJobsRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qconnect#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return per page.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qconnect#ListImportJobsResponse": { + "type": "structure", + "members": { + "importJobSummaries": { + "target": "com.amazonaws.qconnect#ImportJobList", + "traits": { + "smithy.api#documentation": "

Summary information about the import jobs.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qconnect#ListKnowledgeBases": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#ListKnowledgeBasesRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#ListKnowledgeBasesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the knowledge bases.

", + "smithy.api#http": { + "uri": "/knowledgeBases", + "method": "GET" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "knowledgeBaseSummaries" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#ListKnowledgeBasesRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qconnect#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return per page.

", + "smithy.api#httpQuery": "maxResults" + } + } + } + }, + "com.amazonaws.qconnect#ListKnowledgeBasesResponse": { + "type": "structure", + "members": { + "knowledgeBaseSummaries": { + "target": "com.amazonaws.qconnect#KnowledgeBaseList", + "traits": { + "smithy.api#documentation": "

Information about the knowledge bases.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

If there are additional results, this is the token for the next set of results.

" + } + } + } + }, + "com.amazonaws.qconnect#ListQuickResponses": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#ListQuickResponsesRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#ListQuickResponsesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists information about quick response.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/quickResponses", + "method": "GET" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "quickResponseSummaries" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#ListQuickResponsesRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qconnect#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return per page.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qconnect#ListQuickResponsesResponse": { + "type": "structure", + "members": { + "quickResponseSummaries": { + "target": "com.amazonaws.qconnect#QuickResponseSummaryList", + "traits": { + "smithy.api#documentation": "

Summary information about the quick responses.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qconnect#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the tags for the specified resource.

", + "smithy.api#http": { + "uri": "/tags/{resourceArn}", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + } + }, + "com.amazonaws.qconnect#LlmModelId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, + "com.amazonaws.qconnect#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.qconnect#Name": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[a-zA-Z0-9\\s_.,-]+" + } + }, + "com.amazonaws.qconnect#NextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + } + } + }, + "com.amazonaws.qconnect#NonEmptyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4096 + } + } + }, + "com.amazonaws.qconnect#NotifyRecommendationsReceived": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#NotifyRecommendationsReceivedRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#NotifyRecommendationsReceivedResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Removes the specified recommendations from the specified assistant's queue of newly\n available recommendations. You can use this API in conjunction with GetRecommendations and a waitTimeSeconds input for long-polling\n behavior and avoiding duplicate recommendations.

", + "smithy.api#http": { + "uri": "/assistants/{assistantId}/sessions/{sessionId}/recommendations/notify", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qconnect#NotifyRecommendationsReceivedError": { + "type": "structure", + "members": { + "recommendationId": { + "target": "com.amazonaws.qconnect#RecommendationId", + "traits": { + "smithy.api#documentation": "

The identifier of the recommendation that is in error.

" + } + }, + "message": { + "target": "com.amazonaws.qconnect#NotifyRecommendationsReceivedErrorMessage", + "traits": { + "smithy.api#documentation": "

A recommendation is causing an error.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An error occurred when creating a recommendation.

" + } + }, + "com.amazonaws.qconnect#NotifyRecommendationsReceivedErrorList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#NotifyRecommendationsReceivedError" + } + }, + "com.amazonaws.qconnect#NotifyRecommendationsReceivedErrorMessage": { + "type": "string" + }, + "com.amazonaws.qconnect#NotifyRecommendationsReceivedRequest": { + "type": "structure", + "members": { + "assistantId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "sessionId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "recommendationIds": { + "target": "com.amazonaws.qconnect#RecommendationIdList", + "traits": { + "smithy.api#documentation": "

The identifiers of the recommendations.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#NotifyRecommendationsReceivedResponse": { + "type": "structure", + "members": { + "recommendationIds": { + "target": "com.amazonaws.qconnect#RecommendationIdList", + "traits": { + "smithy.api#documentation": "

The identifiers of the recommendations.

" + } + }, + "errors": { + "target": "com.amazonaws.qconnect#NotifyRecommendationsReceivedErrorList", + "traits": { + "smithy.api#documentation": "

The identifiers of recommendations that are causing errors.

" + } + } + } + }, + "com.amazonaws.qconnect#ObjectFieldsList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#NonEmptyString" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.qconnect#Order": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ASC", + "name": "ASC" + }, + { + "value": "DESC", + "name": "DESC" + } + ] + } + }, + "com.amazonaws.qconnect#PreconditionFailedException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "

The provided revisionId does not match, indicating the content has been\n modified since it was last read.

", + "smithy.api#error": "client", + "smithy.api#httpError": 412 + } + }, + "com.amazonaws.qconnect#Priority": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "HIGH", + "name": "HIGH" + }, + { + "value": "MEDIUM", + "name": "MEDIUM" + }, + { + "value": "LOW", + "name": "LOW" + } + ] + } + }, + "com.amazonaws.qconnect#QueryAssistant": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#QueryAssistantRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#QueryAssistantResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#RequestTimeoutException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Performs a manual search against the specified assistant. To retrieve recommendations for\n an assistant, use GetRecommendations.\n

", + "smithy.api#http": { + "uri": "/assistants/{assistantId}/query", + "method": "POST" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "results" + }, + "smithy.api#readonly": {}, + "smithy.api#suppress": ["HttpMethodSemantics"] + } + }, + "com.amazonaws.qconnect#QueryAssistantRequest": { + "type": "structure", + "members": { + "assistantId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "queryText": { + "target": "com.amazonaws.qconnect#QueryText", + "traits": { + "smithy.api#documentation": "

The text to search for.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.qconnect#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

" + } + }, + "maxResults": { + "target": "com.amazonaws.qconnect#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return per page.

" + } + }, + "sessionId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q session. Can be either the ID or the ARN. URLs cannot\n contain the ARN.

" + } + }, + "queryCondition": { + "target": "com.amazonaws.qconnect#QueryConditionExpression", + "traits": { + "smithy.api#documentation": "

Information about how to query content.

" + } + } + } + }, + "com.amazonaws.qconnect#QueryAssistantResponse": { + "type": "structure", + "members": { + "results": { + "target": "com.amazonaws.qconnect#QueryResultsList", + "traits": { + "smithy.api#documentation": "

The results of the query.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.qconnect#NextToken", + "traits": { + "smithy.api#documentation": "

If there are additional results, this is the token for the next set of results.

" + } + } + } + }, + "com.amazonaws.qconnect#QueryCondition": { + "type": "union", + "members": { + "single": { + "target": "com.amazonaws.qconnect#QueryConditionItem", + "traits": { + "smithy.api#documentation": "

The condition for the query.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about how to query content.

" + } + }, + "com.amazonaws.qconnect#QueryConditionComparisonOperator": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EQUALS", + "name": "EQUALS" + } + ] + } + }, + "com.amazonaws.qconnect#QueryConditionExpression": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#QueryCondition" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1 + } + } + }, + "com.amazonaws.qconnect#QueryConditionFieldName": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "RESULT_TYPE", + "name": "RESULT_TYPE" + } + ] + } + }, + "com.amazonaws.qconnect#QueryConditionItem": { + "type": "structure", + "members": { + "field": { + "target": "com.amazonaws.qconnect#QueryConditionFieldName", + "traits": { + "smithy.api#documentation": "

The name of the field for query condition to query on.

", + "smithy.api#required": {} + } + }, + "comparator": { + "target": "com.amazonaws.qconnect#QueryConditionComparisonOperator", + "traits": { + "smithy.api#documentation": "

The comparison operator for query condition to query on.

", + "smithy.api#required": {} + } + }, + "value": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The value for the query condition to query on.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The condition for the query.

" + } + }, + "com.amazonaws.qconnect#QueryRecommendationTriggerData": { + "type": "structure", + "members": { + "text": { + "target": "com.amazonaws.qconnect#QueryText", + "traits": { + "smithy.api#documentation": "

The text associated with the recommendation trigger.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Data associated with the QUERY RecommendationTriggerType.

" + } + }, + "com.amazonaws.qconnect#QueryResultType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "KNOWLEDGE_CONTENT", + "name": "KNOWLEDGE_CONTENT" + }, + { + "value": "GENERATIVE_ANSWER", + "name": "GENERATIVE_ANSWER" + } + ] + } + }, + "com.amazonaws.qconnect#QueryResultsList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#ResultData" + } + }, + "com.amazonaws.qconnect#QueryText": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 1024 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.qconnect#QuickResponse": { + "type": "resource", + "identifiers": { + "quickResponseId": { + "target": "com.amazonaws.qconnect#UuidOrArn" + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn" + } + }, + "create": { + "target": "com.amazonaws.qconnect#CreateQuickResponse" + }, + "read": { + "target": "com.amazonaws.qconnect#GetQuickResponse" + }, + "update": { + "target": "com.amazonaws.qconnect#UpdateQuickResponse" + }, + "delete": { + "target": "com.amazonaws.qconnect#DeleteQuickResponse" + }, + "list": { + "target": "com.amazonaws.qconnect#ListQuickResponses" + }, + "traits": { + "aws.api#arn": { + "template": "quick-response/{knowledgeBaseId}/{quickResponseId}" + }, + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.qconnect#QuickResponseContent": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.qconnect#QuickResponseContentProvider": { + "type": "union", + "members": { + "content": { + "target": "com.amazonaws.qconnect#QuickResponseContent", + "traits": { + "smithy.api#documentation": "

The content of the quick response.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The container quick response content.

" + } + }, + "com.amazonaws.qconnect#QuickResponseContents": { + "type": "structure", + "members": { + "plainText": { + "target": "com.amazonaws.qconnect#QuickResponseContentProvider" + }, + "markdown": { + "target": "com.amazonaws.qconnect#QuickResponseContentProvider" + } + }, + "traits": { + "smithy.api#documentation": "

The content of the quick response stored in different media types.

" + } + }, + "com.amazonaws.qconnect#QuickResponseData": { + "type": "structure", + "members": { + "quickResponseArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the quick response.

", + "smithy.api#required": {} + } + }, + "quickResponseId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the quick response.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the knowledge base.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.qconnect#QuickResponseName", + "traits": { + "smithy.api#documentation": "

The name of the quick response.

", + "smithy.api#required": {} + } + }, + "contentType": { + "target": "com.amazonaws.qconnect#QuickResponseType", + "traits": { + "smithy.api#documentation": "

The media type of the quick response content.

\n
    \n
  • \n

    Use application/x.quickresponse;format=plain for quick response written in plain text.

    \n
  • \n
  • \n

    Use application/x.quickresponse;format=markdown for quick response written in richtext.

    \n
  • \n
", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.qconnect#QuickResponseStatus", + "traits": { + "smithy.api#documentation": "

The status of the quick response data.

", + "smithy.api#required": {} + } + }, + "createdTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp when the quick response was created.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "lastModifiedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp when the quick response data was last modified.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "contents": { + "target": "com.amazonaws.qconnect#QuickResponseContents", + "traits": { + "smithy.api#documentation": "

The contents of the quick response.

" + } + }, + "description": { + "target": "com.amazonaws.qconnect#QuickResponseDescription", + "traits": { + "smithy.api#documentation": "

The description of the quick response.

" + } + }, + "groupingConfiguration": { + "target": "com.amazonaws.qconnect#GroupingConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information of the user groups that the quick response is accessible to.

" + } + }, + "shortcutKey": { + "target": "com.amazonaws.qconnect#ShortCutKey", + "traits": { + "smithy.api#documentation": "

The shortcut key of the quick response. The value should be unique across the\n knowledge base.

" + } + }, + "lastModifiedBy": { + "target": "com.amazonaws.qconnect#GenericArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the user who last updated the quick response data.

" + } + }, + "isActive": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Whether the quick response is active.

" + } + }, + "channels": { + "target": "com.amazonaws.qconnect#Channels", + "traits": { + "smithy.api#documentation": "

The Amazon Connect contact channels this quick response applies to. The supported contact channel types include Chat.

" + } + }, + "language": { + "target": "com.amazonaws.qconnect#LanguageCode", + "traits": { + "smithy.api#documentation": "

The language code value for the language in which the quick response is written.

" + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about the quick response.

", + "smithy.api#references": [ + { + "resource": "com.amazonaws.qconnect#QuickResponse" + }, + { + "resource": "com.amazonaws.qconnect#KnowledgeBase" + } + ] + } + }, + "com.amazonaws.qconnect#QuickResponseDataProvider": { + "type": "union", + "members": { + "content": { + "target": "com.amazonaws.qconnect#QuickResponseContent", + "traits": { + "smithy.api#documentation": "

The content of the quick response.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The container of quick response data.

" + } + }, + "com.amazonaws.qconnect#QuickResponseDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + } + } + }, + "com.amazonaws.qconnect#QuickResponseFilterField": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The name of the attribute field to filter the quick responses by.

", + "smithy.api#required": {} + } + }, + "values": { + "target": "com.amazonaws.qconnect#QuickResponseFilterValueList", + "traits": { + "smithy.api#documentation": "

The values of attribute field to filter the quick response by.

" + } + }, + "operator": { + "target": "com.amazonaws.qconnect#QuickResponseFilterOperator", + "traits": { + "smithy.api#documentation": "

The operator to use for filtering.

", + "smithy.api#required": {} + } + }, + "includeNoExistence": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Whether to treat null value as a match for the attribute field.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The quick response fields to filter the quick response query results by.

\n

The following is the list of supported field names.

\n
    \n
  • \n

    name

    \n
  • \n
  • \n

    description

    \n
  • \n
  • \n

    shortcutKey

    \n
  • \n
  • \n

    isActive

    \n
  • \n
  • \n

    channels

    \n
  • \n
  • \n

    language

    \n
  • \n
  • \n

    contentType

    \n
  • \n
  • \n

    createdTime

    \n
  • \n
  • \n

    lastModifiedTime

    \n
  • \n
  • \n

    lastModifiedBy

    \n
  • \n
  • \n

    groupingConfiguration.criteria

    \n
  • \n
  • \n

    groupingConfiguration.values

    \n
  • \n
" + } + }, + "com.amazonaws.qconnect#QuickResponseFilterFieldList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#QuickResponseFilterField" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10 + } + } + }, + "com.amazonaws.qconnect#QuickResponseFilterOperator": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EQUALS", + "name": "EQUALS" + }, + { + "value": "PREFIX", + "name": "PREFIX" + } + ] + } + }, + "com.amazonaws.qconnect#QuickResponseFilterValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + } + } + }, + "com.amazonaws.qconnect#QuickResponseFilterValueList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#QuickResponseFilterValue" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.qconnect#QuickResponseName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 40 + } + } + }, + "com.amazonaws.qconnect#QuickResponseOrderField": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The name of the attribute to order the quick response query results by.

", + "smithy.api#required": {} + } + }, + "order": { + "target": "com.amazonaws.qconnect#Order", + "traits": { + "smithy.api#documentation": "

The order at which the quick responses are sorted by.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The quick response fields to order the quick response query results by.

\n

The following is the list of supported field names.

\n
    \n
  • \n

    name

    \n
  • \n
  • \n

    description

    \n
  • \n
  • \n

    shortcutKey

    \n
  • \n
  • \n

    isActive

    \n
  • \n
  • \n

    channels

    \n
  • \n
  • \n

    language

    \n
  • \n
  • \n

    contentType

    \n
  • \n
  • \n

    createdTime

    \n
  • \n
  • \n

    lastModifiedTime

    \n
  • \n
  • \n

    lastModifiedBy

    \n
  • \n
  • \n

    groupingConfiguration.criteria

    \n
  • \n
  • \n

    groupingConfiguration.values

    \n
  • \n
" + } + }, + "com.amazonaws.qconnect#QuickResponseQueryField": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The name of the attribute to query the quick responses by.

", + "smithy.api#required": {} + } + }, + "values": { + "target": "com.amazonaws.qconnect#QuickResponseQueryValueList", + "traits": { + "smithy.api#documentation": "

The values of the attribute to query the quick responses by.

", + "smithy.api#required": {} + } + }, + "operator": { + "target": "com.amazonaws.qconnect#QuickResponseQueryOperator", + "traits": { + "smithy.api#documentation": "

The operator to use for matching attribute field values in the query.

", + "smithy.api#required": {} + } + }, + "allowFuzziness": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Whether the query expects only exact matches on the attribute field values. The results of the query will only include exact matches if this parameter is set to false.

" + } + }, + "priority": { + "target": "com.amazonaws.qconnect#Priority", + "traits": { + "smithy.api#documentation": "

The importance of the attribute field when calculating query result relevancy scores.\n The value set for this parameter affects the ordering of search results.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The quick response fields to query quick responses by.

\n

The following is the list of supported field names.

\n
    \n
  • \n

    content

    \n
  • \n
  • \n

    name

    \n
  • \n
  • \n

    description

    \n
  • \n
  • \n

    shortcutKey

    \n
  • \n
" + } + }, + "com.amazonaws.qconnect#QuickResponseQueryFieldList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#QuickResponseQueryField" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 4 + } + } + }, + "com.amazonaws.qconnect#QuickResponseQueryOperator": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CONTAINS", + "name": "CONTAINS" + }, + { + "value": "CONTAINS_AND_PREFIX", + "name": "CONTAINS_AND_PREFIX" + } + ] + } + }, + "com.amazonaws.qconnect#QuickResponseQueryValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.qconnect#QuickResponseQueryValueList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#QuickResponseQueryValue" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.qconnect#QuickResponseSearchExpression": { + "type": "structure", + "members": { + "queries": { + "target": "com.amazonaws.qconnect#QuickResponseQueryFieldList", + "traits": { + "smithy.api#documentation": "

The quick response query expressions.

" + } + }, + "filters": { + "target": "com.amazonaws.qconnect#QuickResponseFilterFieldList", + "traits": { + "smithy.api#documentation": "

The configuration of filtering rules applied to quick response query results.

" + } + }, + "orderOnField": { + "target": "com.amazonaws.qconnect#QuickResponseOrderField", + "traits": { + "smithy.api#documentation": "

The quick response attribute fields on which the query results are ordered.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about the import job.

" + } + }, + "com.amazonaws.qconnect#QuickResponseSearchResultData": { + "type": "structure", + "members": { + "quickResponseArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the quick response.

", + "smithy.api#required": {} + } + }, + "quickResponseId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the quick response.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the knowledge base.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.qconnect#QuickResponseName", + "traits": { + "smithy.api#documentation": "

The name of the quick response.

", + "smithy.api#required": {} + } + }, + "contentType": { + "target": "com.amazonaws.qconnect#QuickResponseType", + "traits": { + "smithy.api#documentation": "

The media type of the quick response content.

\n
    \n
  • \n

    Use application/x.quickresponse;format=plain for quick response written in plain text.

    \n
  • \n
  • \n

    Use application/x.quickresponse;format=markdown for quick response written in richtext.

    \n
  • \n
", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.qconnect#QuickResponseStatus", + "traits": { + "smithy.api#documentation": "

The resource status of the quick response.

", + "smithy.api#required": {} + } + }, + "contents": { + "target": "com.amazonaws.qconnect#QuickResponseContents", + "traits": { + "smithy.api#documentation": "

The contents of the quick response.

", + "smithy.api#required": {} + } + }, + "createdTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp when the quick response was created.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "lastModifiedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp when the quick response search result data was last modified.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "isActive": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Whether the quick response is active.

", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.qconnect#QuickResponseDescription", + "traits": { + "smithy.api#documentation": "

The description of the quick response.

" + } + }, + "groupingConfiguration": { + "target": "com.amazonaws.qconnect#GroupingConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information of the user groups that the quick response is accessible to.

" + } + }, + "shortcutKey": { + "target": "com.amazonaws.qconnect#ShortCutKey", + "traits": { + "smithy.api#documentation": "

The shortcut key of the quick response. The value should be unique across the\n knowledge base.

" + } + }, + "lastModifiedBy": { + "target": "com.amazonaws.qconnect#GenericArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the user who last updated the quick response search result data.

" + } + }, + "channels": { + "target": "com.amazonaws.qconnect#Channels", + "traits": { + "smithy.api#documentation": "

The Amazon Connect contact channels this quick response applies to. The supported contact channel types include Chat.

" + } + }, + "language": { + "target": "com.amazonaws.qconnect#LanguageCode", + "traits": { + "smithy.api#documentation": "

The language code value for the language in which the quick response is written.

" + } + }, + "attributesNotInterpolated": { + "target": "com.amazonaws.qconnect#ContactAttributeKeys", + "traits": { + "smithy.api#documentation": "

The user defined contact attributes that are not resolved when the search result is returned.

" + } + }, + "attributesInterpolated": { + "target": "com.amazonaws.qconnect#ContactAttributeKeys", + "traits": { + "smithy.api#documentation": "

The user defined contact attributes that are resolved when the search result is returned.

" + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of quick response search.

", + "smithy.api#references": [ + { + "resource": "com.amazonaws.qconnect#QuickResponse" + }, + { + "resource": "com.amazonaws.qconnect#KnowledgeBase" + } + ] + } + }, + "com.amazonaws.qconnect#QuickResponseSearchResultsList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#QuickResponseSearchResultData" + } + }, + "com.amazonaws.qconnect#QuickResponseStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATE_IN_PROGRESS", + "name": "CREATE_IN_PROGRESS" + }, + { + "value": "CREATE_FAILED", + "name": "CREATE_FAILED" + }, + { + "value": "CREATED", + "name": "CREATED" + }, + { + "value": "DELETE_IN_PROGRESS", + "name": "DELETE_IN_PROGRESS" + }, + { + "value": "DELETE_FAILED", + "name": "DELETE_FAILED" + }, + { + "value": "DELETED", + "name": "DELETED" + }, + { + "value": "UPDATE_IN_PROGRESS", + "name": "UPDATE_IN_PROGRESS" + }, + { + "value": "UPDATE_FAILED", + "name": "UPDATE_FAILED" + } + ] + } + }, + "com.amazonaws.qconnect#QuickResponseSummary": { + "type": "structure", + "members": { + "quickResponseArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the quick response.

", + "smithy.api#required": {} + } + }, + "quickResponseId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the quick response.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the knowledge base.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it.

", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.qconnect#QuickResponseName", + "traits": { + "smithy.api#documentation": "

The name of the quick response.

", + "smithy.api#required": {} + } + }, + "contentType": { + "target": "com.amazonaws.qconnect#QuickResponseType", + "traits": { + "smithy.api#documentation": "

The media type of the quick response content.

\n
    \n
  • \n

    Use application/x.quickresponse;format=plain for quick response written in plain text.

    \n
  • \n
  • \n

    Use application/x.quickresponse;format=markdown for quick response written in richtext.

    \n
  • \n
", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.qconnect#QuickResponseStatus", + "traits": { + "smithy.api#documentation": "

The resource status of the quick response.

", + "smithy.api#required": {} + } + }, + "createdTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp when the quick response was created.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "lastModifiedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp when the quick response summary was last modified.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "description": { + "target": "com.amazonaws.qconnect#QuickResponseDescription", + "traits": { + "smithy.api#documentation": "

The description of the quick response.

" + } + }, + "lastModifiedBy": { + "target": "com.amazonaws.qconnect#GenericArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the user who last updated the quick response data.

" + } + }, + "isActive": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Whether the quick response is active.

" + } + }, + "channels": { + "target": "com.amazonaws.qconnect#Channels", + "traits": { + "smithy.api#documentation": "

The Amazon Connect contact channels this quick response applies to. The supported contact channel types include Chat.

" + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The summary information about the quick response.

", + "smithy.api#references": [ + { + "resource": "com.amazonaws.qconnect#QuickResponse" + }, + { + "resource": "com.amazonaws.qconnect#KnowledgeBase" + } + ] + } + }, + "com.amazonaws.qconnect#QuickResponseSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#QuickResponseSummary" + } + }, + "com.amazonaws.qconnect#QuickResponseType": { + "type": "string", + "traits": { + "smithy.api#pattern": "^(application/x\\.quickresponse;format=(plain|markdown))$" + } + }, + "com.amazonaws.qconnect#RankingData": { + "type": "structure", + "members": { + "relevanceScore": { + "target": "com.amazonaws.qconnect#RelevanceScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The relevance level of the recommendation.

" + } + }, + "relevanceLevel": { + "target": "com.amazonaws.qconnect#RelevanceLevel", + "traits": { + "smithy.api#documentation": "

The relevance score of the content.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Details about the source content ranking data.

" + } + }, + "com.amazonaws.qconnect#RecommendationData": { + "type": "structure", + "members": { + "recommendationId": { + "target": "com.amazonaws.qconnect#RecommendationId", + "traits": { + "smithy.api#documentation": "

The identifier of the recommendation.

", + "smithy.api#required": {} + } + }, + "document": { + "target": "com.amazonaws.qconnect#Document", + "traits": { + "smithy.api#documentation": "

The recommended document.

" + } + }, + "relevanceScore": { + "target": "com.amazonaws.qconnect#RelevanceScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The relevance score of the recommendation.

" + } + }, + "relevanceLevel": { + "target": "com.amazonaws.qconnect#RelevanceLevel", + "traits": { + "smithy.api#documentation": "

The relevance level of the recommendation.

" + } + }, + "type": { + "target": "com.amazonaws.qconnect#RecommendationType", + "traits": { + "smithy.api#documentation": "

The type of recommendation.

" + } + }, + "data": { + "target": "com.amazonaws.qconnect#DataSummary", + "traits": { + "smithy.api#documentation": "

Summary of the recommended content.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about the recommendation.

" + } + }, + "com.amazonaws.qconnect#RecommendationId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + } + } + }, + "com.amazonaws.qconnect#RecommendationIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#RecommendationId" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 25 + } + } + }, + "com.amazonaws.qconnect#RecommendationList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#RecommendationData" + } + }, + "com.amazonaws.qconnect#RecommendationSourceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ISSUE_DETECTION", + "name": "ISSUE_DETECTION" + }, + { + "value": "RULE_EVALUATION", + "name": "RULE_EVALUATION" + }, + { + "value": "OTHER", + "name": "OTHER" + } + ] + } + }, + "com.amazonaws.qconnect#RecommendationTrigger": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the recommendation trigger.

", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.qconnect#RecommendationTriggerType", + "traits": { + "smithy.api#documentation": "

The type of recommendation trigger.

", + "smithy.api#required": {} + } + }, + "source": { + "target": "com.amazonaws.qconnect#RecommendationSourceType", + "traits": { + "smithy.api#documentation": "

The source of the recommendation trigger.

\n
    \n
  • \n

    ISSUE_DETECTION: The corresponding recommendations were triggered by a Contact Lens\n issue.

    \n
  • \n
  • \n

    RULE_EVALUATION: The corresponding recommendations were triggered by a Contact Lens\n rule.

    \n
  • \n
", + "smithy.api#required": {} + } + }, + "data": { + "target": "com.amazonaws.qconnect#RecommendationTriggerData", + "traits": { + "smithy.api#documentation": "

A union type containing information related to the trigger.

", + "smithy.api#required": {} + } + }, + "recommendationIds": { + "target": "com.amazonaws.qconnect#RecommendationIdList", + "traits": { + "smithy.api#documentation": "

The identifiers of the recommendations.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

A recommendation trigger provides context on the event that produced the referenced\n recommendations. Recommendations are only referenced in recommendationIds by a\n single RecommendationTrigger.

" + } + }, + "com.amazonaws.qconnect#RecommendationTriggerData": { + "type": "union", + "members": { + "query": { + "target": "com.amazonaws.qconnect#QueryRecommendationTriggerData", + "traits": { + "smithy.api#documentation": "

Data associated with the QUERY RecommendationTriggerType.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A union type containing information related to the trigger.

" + } + }, + "com.amazonaws.qconnect#RecommendationTriggerList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#RecommendationTrigger" + } + }, + "com.amazonaws.qconnect#RecommendationTriggerType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "QUERY", + "name": "QUERY" + }, + { + "value": "GENERATIVE", + "name": "GENERATIVE" + } + ] + } + }, + "com.amazonaws.qconnect#RecommendationType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "KNOWLEDGE_CONTENT", + "name": "KNOWLEDGE_CONTENT" + }, + { + "value": "GENERATIVE_RESPONSE", + "name": "GENERATIVE_RESPONSE" + }, + { + "value": "GENERATIVE_ANSWER", + "name": "GENERATIVE_ANSWER" + } + ] + } + }, + "com.amazonaws.qconnect#RelevanceLevel": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "HIGH", + "name": "HIGH" + }, + { + "value": "MEDIUM", + "name": "MEDIUM" + }, + { + "value": "LOW", + "name": "LOW" + } + ] + } + }, + "com.amazonaws.qconnect#RelevanceScore": { + "type": "double", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0.0 + } + } + }, + "com.amazonaws.qconnect#RemoveKnowledgeBaseTemplateUri": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#RemoveKnowledgeBaseTemplateUriRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#RemoveKnowledgeBaseTemplateUriResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Removes a URI template from a knowledge base.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/templateUri", + "method": "DELETE", + "code": 204 + } + } + }, + "com.amazonaws.qconnect#RemoveKnowledgeBaseTemplateUriRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#RemoveKnowledgeBaseTemplateUriResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.qconnect#RenderingConfiguration": { + "type": "structure", + "members": { + "templateUri": { + "target": "com.amazonaws.qconnect#Uri", + "traits": { + "smithy.api#documentation": "

A URI template containing exactly one variable in ${variableName} format.\n This can only be set for EXTERNAL knowledge bases. For Salesforce, ServiceNow,\n and Zendesk, the variable must be one of the following:

\n
    \n
  • \n

    Salesforce: Id, ArticleNumber, VersionNumber,\n Title, PublishStatus, or IsDeleted\n

    \n
  • \n
  • \n

    ServiceNow: number, short_description,\n sys_mod_count, workflow_state, or active\n

    \n
  • \n
  • \n

    Zendesk: id, title, updated_at, or\n draft\n

    \n
  • \n
\n

The variable is replaced with the actual value for a piece of content when calling GetContent.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about how to render the content.

" + } + }, + "com.amazonaws.qconnect#RequestTimeoutException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "

The request reached the service more than 15 minutes after the date stamp on the request\n or more than 15 minutes after the request expiration date (such as for pre-signed URLs), or\n the date stamp on the request is more than 15 minutes in the future.

", + "smithy.api#error": "client", + "smithy.api#httpError": 408, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.qconnect#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + }, + "resourceName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The specified resource name.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The specified resource does not exist.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.qconnect#ResultData": { + "type": "structure", + "members": { + "resultId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the result data.

", + "smithy.api#required": {} + } + }, + "document": { + "target": "com.amazonaws.qconnect#Document", + "traits": { + "smithy.api#documentation": "

The document.

" + } + }, + "relevanceScore": { + "target": "com.amazonaws.qconnect#RelevanceScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The relevance score of the results.

" + } + }, + "data": { + "target": "com.amazonaws.qconnect#DataSummary", + "traits": { + "smithy.api#documentation": "

Summary of the recommended content.

" + } + }, + "type": { + "target": "com.amazonaws.qconnect#QueryResultType", + "traits": { + "smithy.api#documentation": "

The type of the query result.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about the result.

" + } + }, + "com.amazonaws.qconnect#SearchContent": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#SearchContentRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#SearchContentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Searches for content in a specified knowledge base. Can be used to get a specific content\n resource by its name.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/search", + "method": "POST" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "contentSummaries" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#SearchContentRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.qconnect#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qconnect#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return per page.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "searchExpression": { + "target": "com.amazonaws.qconnect#SearchExpression", + "traits": { + "smithy.api#documentation": "

The search expression to filter results.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#SearchContentResponse": { + "type": "structure", + "members": { + "contentSummaries": { + "target": "com.amazonaws.qconnect#ContentSummaryList", + "traits": { + "smithy.api#documentation": "

Summary information about the content.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.qconnect#NextToken", + "traits": { + "smithy.api#documentation": "

If there are additional results, this is the token for the next set of results.

" + } + } + } + }, + "com.amazonaws.qconnect#SearchExpression": { + "type": "structure", + "members": { + "filters": { + "target": "com.amazonaws.qconnect#FilterList", + "traits": { + "smithy.api#documentation": "

The search expression filters.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The search expression.

" + } + }, + "com.amazonaws.qconnect#SearchQuickResponses": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#SearchQuickResponsesRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#SearchQuickResponsesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#RequestTimeoutException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Searches existing Amazon Q quick responses in a Amazon Q knowledge base.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/search/quickResponses", + "method": "POST" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "results" + } + } + }, + "com.amazonaws.qconnect#SearchQuickResponsesRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should be a QUICK_RESPONSES type knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "searchExpression": { + "target": "com.amazonaws.qconnect#QuickResponseSearchExpression", + "traits": { + "smithy.api#documentation": "

The search expression for querying the quick response.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qconnect#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return per page.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "attributes": { + "target": "com.amazonaws.qconnect#ContactAttributes", + "traits": { + "smithy.api#documentation": "

The user-defined Amazon Connect contact attributes to be resolved when search results are returned.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qconnect#SearchQuickResponsesResponse": { + "type": "structure", + "members": { + "results": { + "target": "com.amazonaws.qconnect#QuickResponseSearchResultsList", + "traits": { + "smithy.api#documentation": "

The results of the quick response search.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qconnect#SearchSessions": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#SearchSessionsRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#SearchSessionsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Searches for sessions.

", + "smithy.api#http": { + "uri": "/assistants/{assistantId}/searchSessions", + "method": "POST" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "sessionSummaries" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#SearchSessionsRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.qconnect#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qconnect#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return per page.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "assistantId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "searchExpression": { + "target": "com.amazonaws.qconnect#SearchExpression", + "traits": { + "smithy.api#documentation": "

The search expression to filter results.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#SearchSessionsResponse": { + "type": "structure", + "members": { + "sessionSummaries": { + "target": "com.amazonaws.qconnect#SessionSummaries", + "traits": { + "smithy.api#documentation": "

Summary information about the sessions.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.qconnect#NextToken", + "traits": { + "smithy.api#documentation": "

If there are additional results, this is the token for the next set of results.

" + } + } + } + }, + "com.amazonaws.qconnect#SensitiveString": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.qconnect#ServerSideEncryptionConfiguration": { + "type": "structure", + "members": { + "kmsKeyId": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The customer managed key used for encryption. For more information about setting up a\n customer managed key for Amazon Q, see Enable Amazon Q in Connect for your instance.\n For information about valid ID values, see Key identifiers (KeyId).

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The configuration information for the customer managed key used for encryption.

" + } + }, + "com.amazonaws.qconnect#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "

You've exceeded your service quota. To perform the requested action, remove some of the\n relevant resources, or use service quotas to request a service quota increase.

", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.qconnect#Session": { + "type": "resource", + "identifiers": { + "assistantId": { + "target": "com.amazonaws.qconnect#UuidOrArn" + }, + "sessionId": { + "target": "com.amazonaws.qconnect#UuidOrArn" + } + }, + "create": { + "target": "com.amazonaws.qconnect#CreateSession" + }, + "read": { + "target": "com.amazonaws.qconnect#GetSession" + }, + "traits": { + "aws.api#arn": { + "template": "session/{assistantId}/{sessionId}" + }, + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.qconnect#SessionData": { + "type": "structure", + "members": { + "sessionArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the session.

", + "smithy.api#required": {} + } + }, + "sessionId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the session.

", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.qconnect#Name", + "traits": { + "smithy.api#documentation": "

The name of the session.

", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.qconnect#Description", + "traits": { + "smithy.api#documentation": "

The description of the session.

" + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + }, + "integrationConfiguration": { + "target": "com.amazonaws.qconnect#SessionIntegrationConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information for the session integration.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about the session.

" + } + }, + "com.amazonaws.qconnect#SessionIntegrationConfiguration": { + "type": "structure", + "members": { + "topicIntegrationArn": { + "target": "com.amazonaws.qconnect#GenericArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the integrated Amazon SNS topic used for streaming chat messages.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The configuration information for the session integration.

" + } + }, + "com.amazonaws.qconnect#SessionSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#SessionSummary" + } + }, + "com.amazonaws.qconnect#SessionSummary": { + "type": "structure", + "members": { + "sessionId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the session.

", + "smithy.api#required": {} + } + }, + "sessionArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the session.

", + "smithy.api#required": {} + } + }, + "assistantId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q assistant.

", + "smithy.api#required": {} + } + }, + "assistantArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon Q assistant.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary information about the session.

" + } + }, + "com.amazonaws.qconnect#ShortCutKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.qconnect#SourceConfiguration": { + "type": "union", + "members": { + "appIntegrations": { + "target": "com.amazonaws.qconnect#AppIntegrationsConfiguration", + "traits": { + "smithy.api#documentation": "

Configuration information for Amazon AppIntegrations to automatically ingest content.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Configuration information about the external data source.

" + } + }, + "com.amazonaws.qconnect#SourceContentDataDetails": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the source content.

", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.qconnect#SourceContentType", + "traits": { + "smithy.api#documentation": "

The type of the source content.

", + "smithy.api#required": {} + } + }, + "textData": { + "target": "com.amazonaws.qconnect#TextData", + "traits": { + "smithy.api#documentation": "

Details about the source content text data.

", + "smithy.api#required": {} + } + }, + "rankingData": { + "target": "com.amazonaws.qconnect#RankingData", + "traits": { + "smithy.api#documentation": "

Details about the source content ranking data.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Details about the source content data.

" + } + }, + "com.amazonaws.qconnect#SourceContentType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "KNOWLEDGE_CONTENT", + "name": "KNOWLEDGE_CONTENT" + } + ] + } + }, + "com.amazonaws.qconnect#StartContentUpload": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#StartContentUploadRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#StartContentUploadResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Get a URL to upload content to a knowledge base. To upload content, first make a PUT\n request to the returned URL with your file, making sure to include the required headers. Then\n use CreateContent to finalize the content creation process or UpdateContent to modify an existing resource. You can only upload content to a\n knowledge base of type CUSTOM.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/upload", + "method": "POST" + } + } + }, + "com.amazonaws.qconnect#StartContentUploadRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "contentType": { + "target": "com.amazonaws.qconnect#ContentType", + "traits": { + "smithy.api#documentation": "

The type of content to upload.

", + "smithy.api#required": {} + } + }, + "presignedUrlTimeToLive": { + "target": "com.amazonaws.qconnect#TimeToLive", + "traits": { + "smithy.api#documentation": "

The expected expiration time of the generated presigned URL, specified in minutes.

" + } + } + } + }, + "com.amazonaws.qconnect#StartContentUploadResponse": { + "type": "structure", + "members": { + "uploadId": { + "target": "com.amazonaws.qconnect#UploadId", + "traits": { + "smithy.api#documentation": "

The identifier of the upload.

", + "smithy.api#required": {} + } + }, + "url": { + "target": "com.amazonaws.qconnect#Url", + "traits": { + "smithy.api#documentation": "

The URL of the upload.

", + "smithy.api#required": {} + } + }, + "urlExpiry": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The expiration time of the URL as an epoch timestamp.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "headersToInclude": { + "target": "com.amazonaws.qconnect#Headers", + "traits": { + "smithy.api#documentation": "

The headers to include in the upload.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#StartImportJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#StartImportJobRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#StartImportJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ConflictException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Start an asynchronous job to import Amazon Q resources from an uploaded source file. Before calling this API, use StartContentUpload to\n upload an asset that contains the resource data.

\n
    \n
  • \n

    For importing Amazon Q quick responses, you need to upload a csv file including the quick responses. For information about how to format the csv file for importing quick responses, see Import quick responses.

    \n
  • \n
", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/importJobs", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qconnect#StartImportJobRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

\n
    \n
  • \n

    For importing Amazon Q quick responses, this should be a QUICK_RESPONSES type knowledge base.

    \n
  • \n
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "importJobType": { + "target": "com.amazonaws.qconnect#ImportJobType", + "traits": { + "smithy.api#documentation": "

The type of the import job.

\n
    \n
  • \n

    For importing quick response resource, set the value to QUICK_RESPONSES.

    \n
  • \n
", + "smithy.api#required": {} + } + }, + "uploadId": { + "target": "com.amazonaws.qconnect#UploadId", + "traits": { + "smithy.api#documentation": "

A pointer to the uploaded asset. This value is returned by StartContentUpload.

", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

", + "smithy.api#idempotencyToken": {} + } + }, + "metadata": { + "target": "com.amazonaws.qconnect#ContentMetadata", + "traits": { + "smithy.api#documentation": "

The metadata fields of the imported Amazon Q resources.

" + } + }, + "externalSourceConfiguration": { + "target": "com.amazonaws.qconnect#ExternalSourceConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information of the external source that the resource data are imported from.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qconnect#StartImportJobResponse": { + "type": "structure", + "members": { + "importJob": { + "target": "com.amazonaws.qconnect#ImportJobData", + "traits": { + "smithy.api#documentation": "

The import job.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qconnect#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^(?!aws:)[a-zA-Z+-=._:/]+$" + } + }, + "com.amazonaws.qconnect#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.qconnect#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#TooManyTagsException" + } + ], + "traits": { + "smithy.api#documentation": "

Adds the specified tags to the specified resource.

", + "smithy.api#http": { + "uri": "/tags/{resourceArn}", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qconnect#TagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#TagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.qconnect#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + } + } + }, + "com.amazonaws.qconnect#Tags": { + "type": "map", + "key": { + "target": "com.amazonaws.qconnect#TagKey" + }, + "value": { + "target": "com.amazonaws.qconnect#TagValue" + } + }, + "com.amazonaws.qconnect#TextData": { + "type": "structure", + "members": { + "title": { + "target": "com.amazonaws.qconnect#DocumentText" + }, + "excerpt": { + "target": "com.amazonaws.qconnect#DocumentText" + } + }, + "traits": { + "smithy.api#documentation": "

Details about the source content text data.

" + } + }, + "com.amazonaws.qconnect#TimeToLive": { + "type": "integer", + "traits": { + "smithy.api#documentation": "Expiration time in minutes", + "smithy.api#range": { + "min": 1, + "max": 60 + } + } + }, + "com.amazonaws.qconnect#TooManyTagsException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + }, + "resourceName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The specified resource name.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Amazon Q in Connect throws this exception if you have too many tags in your tag set.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.qconnect#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Removes the specified tags from the specified resource.

", + "smithy.api#http": { + "uri": "/tags/{resourceArn}", + "method": "DELETE" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qconnect#UntagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tagKeys": { + "target": "com.amazonaws.qconnect#TagKeyList", + "traits": { + "smithy.api#documentation": "

The tag keys.

", + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#UntagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.qconnect#UpdateContent": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#UpdateContentRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#UpdateContentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#PreconditionFailedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates information about the content.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}", + "method": "POST" + } + } + }, + "com.amazonaws.qconnect#UpdateContentRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "contentId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "revisionId": { + "target": "com.amazonaws.qconnect#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The revisionId of the content resource to update, taken from an earlier call\n to GetContent, GetContentSummary, SearchContent, or\n ListContents. If included, this argument acts as an optimistic lock to ensure\n content was not modified since it was last read. If it has been modified, this API throws a\n PreconditionFailedException.

" + } + }, + "title": { + "target": "com.amazonaws.qconnect#ContentTitle", + "traits": { + "smithy.api#documentation": "

The title of the content.

" + } + }, + "overrideLinkOutUri": { + "target": "com.amazonaws.qconnect#Uri", + "traits": { + "smithy.api#documentation": "

The URI for the article. If the knowledge base has a templateUri, setting this argument\n overrides it for this piece of content. To remove an existing overrideLinkOurUri,\n exclude this argument and set removeOverrideLinkOutUri to true.

" + } + }, + "removeOverrideLinkOutUri": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Unset the existing overrideLinkOutUri if it exists.

" + } + }, + "metadata": { + "target": "com.amazonaws.qconnect#ContentMetadata", + "traits": { + "smithy.api#documentation": "

A key/value map to store attributes without affecting tagging or recommendations. For\n example, when synchronizing data between an external system and Amazon Q, you can store an\n external version identifier as metadata to utilize for determining drift.

" + } + }, + "uploadId": { + "target": "com.amazonaws.qconnect#UploadId", + "traits": { + "smithy.api#documentation": "

A pointer to the uploaded asset. This value is returned by StartContentUpload.\n

" + } + } + } + }, + "com.amazonaws.qconnect#UpdateContentResponse": { + "type": "structure", + "members": { + "content": { + "target": "com.amazonaws.qconnect#ContentData", + "traits": { + "smithy.api#documentation": "

The content.

" + } + } + } + }, + "com.amazonaws.qconnect#UpdateKnowledgeBaseTemplateUri": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#UpdateKnowledgeBaseTemplateUriRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#UpdateKnowledgeBaseTemplateUriResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates the template URI of a knowledge base. This is only supported for knowledge bases\n of type EXTERNAL. Include a single variable in ${variable} format; this\n interpolated by Amazon Q using ingested content. For example, if you ingest a Salesforce\n article, it has an Id value, and you can set the template URI to\n https://myInstanceName.lightning.force.com/lightning/r/Knowledge__kav/*${Id}*/view.\n

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/templateUri", + "method": "POST" + } + } + }, + "com.amazonaws.qconnect#UpdateKnowledgeBaseTemplateUriRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "templateUri": { + "target": "com.amazonaws.qconnect#Uri", + "traits": { + "smithy.api#documentation": "

The template URI to update.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.qconnect#UpdateKnowledgeBaseTemplateUriResponse": { + "type": "structure", + "members": { + "knowledgeBase": { + "target": "com.amazonaws.qconnect#KnowledgeBaseData", + "traits": { + "smithy.api#documentation": "

The knowledge base to update.

" + } + } + } + }, + "com.amazonaws.qconnect#UpdateQuickResponse": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#UpdateQuickResponseRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#UpdateQuickResponseResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ConflictException" + }, + { + "target": "com.amazonaws.qconnect#PreconditionFailedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates an existing Amazon Q quick response.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}", + "method": "POST" + } + } + }, + "com.amazonaws.qconnect#UpdateQuickResponseRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge \nbase if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "quickResponseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the quick response.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.qconnect#QuickResponseName", + "traits": { + "smithy.api#documentation": "

The name of the quick response.

" + } + }, + "content": { + "target": "com.amazonaws.qconnect#QuickResponseDataProvider", + "traits": { + "smithy.api#documentation": "

The updated content of the quick response.

" + } + }, + "contentType": { + "target": "com.amazonaws.qconnect#QuickResponseType", + "traits": { + "smithy.api#documentation": "

The media type of the quick response content.

\n
    \n
  • \n

    Use application/x.quickresponse;format=plain for quick response written in plain text.

    \n
  • \n
  • \n

    Use application/x.quickresponse;format=markdown for quick response written in richtext.

    \n
  • \n
" + } + }, + "groupingConfiguration": { + "target": "com.amazonaws.qconnect#GroupingConfiguration", + "traits": { + "smithy.api#documentation": "

The updated grouping configuration of the quick response.

" + } + }, + "removeGroupingConfiguration": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Whether to remove the grouping configuration of the quick response.

" + } + }, + "description": { + "target": "com.amazonaws.qconnect#QuickResponseDescription", + "traits": { + "smithy.api#documentation": "

The updated description of the quick response.

" + } + }, + "removeDescription": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Whether to remove the description from the quick response.

" + } + }, + "shortcutKey": { + "target": "com.amazonaws.qconnect#ShortCutKey", + "traits": { + "smithy.api#documentation": "

The shortcut key of the quick response. The value should be unique across the\n knowledge base.

" + } + }, + "removeShortcutKey": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Whether to remove the shortcut key of the quick response.

" + } + }, + "isActive": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Whether the quick response is active.

" + } + }, + "channels": { + "target": "com.amazonaws.qconnect#Channels", + "traits": { + "smithy.api#documentation": "

The Amazon Connect contact channels this quick response applies to. The supported contact channel types include Chat.

" + } + }, + "language": { + "target": "com.amazonaws.qconnect#LanguageCode", + "traits": { + "smithy.api#documentation": "

The language code value for the language in which the quick response is written. The supported language codes include de_DE, en_US, es_ES,\n fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR,\n zh_CN, zh_TW\n

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qconnect#UpdateQuickResponseResponse": { + "type": "structure", + "members": { + "quickResponse": { + "target": "com.amazonaws.qconnect#QuickResponseData", + "traits": { + "smithy.api#documentation": "

The quick response.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qconnect#UploadId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1200 + } + } + }, + "com.amazonaws.qconnect#Uri": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4096 + } + } + }, + "com.amazonaws.qconnect#Url": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4096 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.qconnect#Uuid": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$" + } + }, + "com.amazonaws.qconnect#UuidOrArn": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$|^arn:[a-z-]*?:wisdom:[a-z0-9-]*?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})?$" + } + }, + "com.amazonaws.qconnect#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "

The input fails to satisfy the constraints specified by a service.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.qconnect#WaitTimeSeconds": { + "type": "integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0, + "max": 20 + } + } + }, + "com.amazonaws.qconnect#WisdomService": { + "type": "service", + "version": "2020-10-19", + "operations": [ + { + "target": "com.amazonaws.qconnect#ListTagsForResource" + }, + { + "target": "com.amazonaws.qconnect#TagResource" + }, + { + "target": "com.amazonaws.qconnect#UntagResource" + } + ], + "resources": [ + { + "target": "com.amazonaws.qconnect#Assistant" + }, + { + "target": "com.amazonaws.qconnect#KnowledgeBase" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "QConnect", + "arnNamespace": "wisdom", + "cloudFormationName": "Wisdom" + }, + "aws.auth#sigv4": { + "name": "wisdom" + }, + "aws.protocols#restJson1": {}, + "smithy.api#cors": {}, + "smithy.api#documentation": "

Amazon Q in Connect is a generative AI customer service assistant. It is an LLM-enhanced evolution\n of Amazon Connect Wisdom that delivers real-time recommendations to help contact center\n agents resolve customer issues quickly and accurately.

\n

Amazon Q automatically detects customer intent during calls and chats using\n conversational analytics and natural language understanding (NLU). It then provides agents\n with immediate, real-time generative responses and suggested actions, and links to relevant\n documents and articles. Agents can also query Amazon Q directly using natural language or\n keywords to answer customer requests.

\n

Use the Amazon Q in Connect APIs to create an assistant and a knowledge base, for example, or\n manage content by uploading custom files.

\n

For more information, see Use Amazon Q in Connect for generative AI\n powered agent assistance in real-time in the Amazon Connect\n Administrator Guide.

", + "smithy.api#title": "Amazon Q Connect", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "String" + }, + "UseDualStack": { + "builtIn": "AWS::UseDualStack", + "required": true, + "default": false, + "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", + "type": "Boolean" + }, + "UseFIPS": { + "builtIn": "AWS::UseFIPS", + "required": true, + "default": false, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "Boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "String" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://wisdom-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://wisdom-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://wisdom.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://wisdom.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ], + "type": "tree" + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wisdom.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" + } + } + } + } +}