diff --git a/.gitignore b/.gitignore index 7e2e4a6a6..2cd301232 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,8 @@ build .gradle .idea **/*.tgz +!core/codewhisperer-streaming/amzn-codewhisperer-streaming-1.0.0.tgz .testresults/** -core/codewhisperer-streaming/dist* # Visual Studio Related **/.vs diff --git a/.prettierignore b/.prettierignore index bf3d15e4a..d115549b1 100644 --- a/.prettierignore +++ b/.prettierignore @@ -7,5 +7,4 @@ out/ server/aws-lsp-codewhisperer/src/client/sigv4/codewhisperersigv4client.d.ts server/aws-lsp-codewhisperer/src/client/token/codewhispererbearertokenclient.d.ts **/*.md -core/codewhisperer-streaming/* **/antlr-generated/ \ No newline at end of file diff --git a/core/codewhisperer-streaming/.gitignore b/core/codewhisperer-streaming/.gitignore deleted file mode 100644 index 4911f1039..000000000 --- a/core/codewhisperer-streaming/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -dist* -src/**/*.js \ No newline at end of file diff --git a/core/codewhisperer-streaming/LICENSE b/core/codewhisperer-streaming/LICENSE deleted file mode 100644 index 1349aa7c9..000000000 --- a/core/codewhisperer-streaming/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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-2024 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/core/codewhisperer-streaming/README.md b/core/codewhisperer-streaming/README.md deleted file mode 100644 index bf718155d..000000000 --- a/core/codewhisperer-streaming/README.md +++ /dev/null @@ -1,737 +0,0 @@ - - -# @amzn/codewhisperer-streaming - -## Description - -AWS SDK for JavaScript CodeWhispererStreaming Client for Node.js, Browser and React Native. - -## Installing -To install the this package, simply type add or install @amzn/codewhisperer-streaming -using your favorite package manager: -- `npm install @amzn/codewhisperer-streaming` -- `yarn add @amzn/codewhisperer-streaming` -- `pnpm add @amzn/codewhisperer-streaming` - -## Getting Started - -### Import - -The AWS SDK is modulized by clients and commands. -To send a request, you only need to import the `CodeWhispererStreamingClient` and -the commands you need, for example `SendMessageCommand`: - -```js -// ES5 example -const { CodeWhispererStreamingClient, SendMessageCommand } = require("@amzn/codewhisperer-streaming"); -``` - -```ts -// ES6+ example -import { CodeWhispererStreamingClient, SendMessageCommand } from "@amzn/codewhisperer-streaming"; -``` - -### 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 CodeWhispererStreamingClient({ region: "REGION" }); - -const params = { /** input parameters */ }; -const command = new SendMessageCommand(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 "@amzn/codewhisperer-streaming"; -const client = new AWS.CodeWhispererStreaming({ region: "REGION" }); - -// async/await. -try { - const data = await client.sendMessage(params); - // process data. -} catch (error) { - // error handling. -} - -// Promises. -client - .sendMessage(params) - .then((data) => { - // process data. - }) - .catch((error) => { - // error handling. - }); - -// callbacks. -client.sendMessage(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 `@amzn/codewhisperer-streaming` 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) - -
- -AllowVendedLogDeliveryForResource - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/AllowVendedLogDeliveryForResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/AllowVendedLogDeliveryForResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/AllowVendedLogDeliveryForResourceCommandOutput/) -
-
- -AssociateConnectorResource - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/AssociateConnectorResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/AssociateConnectorResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/AssociateConnectorResourceCommandOutput/) -
-
- -AssociateCustomizationPermission - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/AssociateCustomizationPermissionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/AssociateCustomizationPermissionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/AssociateCustomizationPermissionCommandOutput/) -
-
- -CreateCustomization - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/CreateCustomizationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/CreateCustomizationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/CreateCustomizationCommandOutput/) -
-
- -CreateProfile - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/CreateProfileCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/CreateProfileCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/CreateProfileCommandOutput/) -
-
- -DeleteCustomization - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/DeleteCustomizationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/DeleteCustomizationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/DeleteCustomizationCommandOutput/) -
-
- -DeleteProfile - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/DeleteProfileCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/DeleteProfileCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/DeleteProfileCommandOutput/) -
-
- -DisassociateCustomizationPermission - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/DisassociateCustomizationPermissionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/DisassociateCustomizationPermissionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/DisassociateCustomizationPermissionCommandOutput/) -
-
- -GenerateRecommendations - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/GenerateRecommendationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GenerateRecommendationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GenerateRecommendationsCommandOutput/) -
-
- -GetConnector - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/GetConnectorCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetConnectorCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetConnectorCommandOutput/) -
-
- -GetCustomization - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/GetCustomizationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetCustomizationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetCustomizationCommandOutput/) -
-
- -ListCustomizationPermissions - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/ListCustomizationPermissionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListCustomizationPermissionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListCustomizationPermissionsCommandOutput/) -
-
- -ListCustomizations - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/ListCustomizationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListCustomizationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListCustomizationsCommandOutput/) -
-
- -ListCustomizationVersions - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/ListCustomizationVersionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListCustomizationVersionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListCustomizationVersionsCommandOutput/) -
-
- -ListProfiles - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/ListProfilesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListProfilesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListProfilesCommandOutput/) -
-
- -ListTagsForResource - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/ListTagsForResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListTagsForResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListTagsForResourceCommandOutput/) -
-
- -RejectConnector - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/RejectConnectorCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/RejectConnectorCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/RejectConnectorCommandOutput/) -
-
- -TagResource - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/TagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/TagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/TagResourceCommandOutput/) -
-
- -UntagResource - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/UntagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/UntagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/UntagResourceCommandOutput/) -
-
- -UpdateCustomization - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/UpdateCustomizationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/UpdateCustomizationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/UpdateCustomizationCommandOutput/) -
-
- -UpdateProfile - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/UpdateProfileCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/UpdateProfileCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/UpdateProfileCommandOutput/) -
-
- -CreateArtifactUploadUrl - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/CreateArtifactUploadUrlCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/CreateArtifactUploadUrlCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/CreateArtifactUploadUrlCommandOutput/) -
-
- -CreateTaskAssistConversation - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/CreateTaskAssistConversationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/CreateTaskAssistConversationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/CreateTaskAssistConversationCommandOutput/) -
-
- -CreateUploadUrl - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/CreateUploadUrlCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/CreateUploadUrlCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/CreateUploadUrlCommandOutput/) -
-
- -DeleteTaskAssistConversation - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/DeleteTaskAssistConversationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/DeleteTaskAssistConversationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/DeleteTaskAssistConversationCommandOutput/) -
-
- -GenerateCompletions - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/GenerateCompletionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GenerateCompletionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GenerateCompletionsCommandOutput/) -
-
- -GetCodeAnalysis - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/GetCodeAnalysisCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetCodeAnalysisCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetCodeAnalysisCommandOutput/) -
-
- -GetTaskAssistCodeGeneration - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/GetTaskAssistCodeGenerationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetTaskAssistCodeGenerationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetTaskAssistCodeGenerationCommandOutput/) -
-
- -GetTestGeneration - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/GetTestGenerationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetTestGenerationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetTestGenerationCommandOutput/) -
-
- -GetTransformation - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/GetTransformationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetTransformationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetTransformationCommandOutput/) -
-
- -GetTransformationPlan - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/GetTransformationPlanCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetTransformationPlanCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetTransformationPlanCommandOutput/) -
-
- -ListAvailableCustomizations - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/ListAvailableCustomizationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListAvailableCustomizationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListAvailableCustomizationsCommandOutput/) -
-
- -ListCodeAnalysisFindings - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/ListCodeAnalysisFindingsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListCodeAnalysisFindingsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListCodeAnalysisFindingsCommandOutput/) -
-
- -ListFeatureEvaluations - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/ListFeatureEvaluationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListFeatureEvaluationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListFeatureEvaluationsCommandOutput/) -
-
- -ResumeTransformation - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/ResumeTransformationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ResumeTransformationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ResumeTransformationCommandOutput/) -
-
- -SendTelemetryEvent - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/SendTelemetryEventCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/SendTelemetryEventCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/SendTelemetryEventCommandOutput/) -
-
- -StartCodeAnalysis - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/StartCodeAnalysisCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/StartCodeAnalysisCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/StartCodeAnalysisCommandOutput/) -
-
- -StartTaskAssistCodeGeneration - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/StartTaskAssistCodeGenerationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/StartTaskAssistCodeGenerationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/StartTaskAssistCodeGenerationCommandOutput/) -
-
- -StartTestGeneration - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/StartTestGenerationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/StartTestGenerationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/StartTestGenerationCommandOutput/) -
-
- -StartTransformation - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/StartTransformationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/StartTransformationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/StartTransformationCommandOutput/) -
-
- -StopTransformation - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/StopTransformationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/StopTransformationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/StopTransformationCommandOutput/) -
-
- -ExportResultArchive - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/ExportResultArchiveCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ExportResultArchiveCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ExportResultArchiveCommandOutput/) -
-
- -GenerateAssistantResponse - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/GenerateAssistantResponseCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GenerateAssistantResponseCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GenerateAssistantResponseCommandOutput/) -
-
- -GenerateTaskAssistPlan - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/GenerateTaskAssistPlanCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GenerateTaskAssistPlanCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GenerateTaskAssistPlanCommandOutput/) -
-
- -CreateAssignment - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/CreateAssignmentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/CreateAssignmentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/CreateAssignmentCommandOutput/) -
-
- -CreateExtension - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/CreateExtensionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/CreateExtensionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/CreateExtensionCommandOutput/) -
-
- -CreatePlugin - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/CreatePluginCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/CreatePluginCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/CreatePluginCommandOutput/) -
-
- -CreateResolution - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/CreateResolutionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/CreateResolutionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/CreateResolutionCommandOutput/) -
-
- -DeleteAssignment - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/DeleteAssignmentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/DeleteAssignmentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/DeleteAssignmentCommandOutput/) -
-
- -DeleteExtension - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/DeleteExtensionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/DeleteExtensionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/DeleteExtensionCommandOutput/) -
-
- -DeletePlugin - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/DeletePluginCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/DeletePluginCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/DeletePluginCommandOutput/) -
-
- -GetConversation - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/GetConversationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetConversationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetConversationCommandOutput/) -
-
- -GetExtension - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/GetExtensionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetExtensionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetExtensionCommandOutput/) -
-
- -GetIdentityMetadata - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/GetIdentityMetadataCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetIdentityMetadataCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetIdentityMetadataCommandOutput/) -
-
- -GetPlugin - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/GetPluginCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetPluginCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetPluginCommandOutput/) -
-
- -GetTask - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/GetTaskCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetTaskCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetTaskCommandOutput/) -
-
- -GetTroubleshootingResults - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/GetTroubleshootingResultsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetTroubleshootingResultsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GetTroubleshootingResultsCommandOutput/) -
-
- -InvokeTask - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/InvokeTaskCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/InvokeTaskCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/InvokeTaskCommandOutput/) -
-
- -ListConversations - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/ListConversationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListConversationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListConversationsCommandOutput/) -
-
- -ListExtensionProviders - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/ListExtensionProvidersCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListExtensionProvidersCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListExtensionProvidersCommandOutput/) -
-
- -ListExtensions - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/ListExtensionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListExtensionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListExtensionsCommandOutput/) -
-
- -ListPluginProviders - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/ListPluginProvidersCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListPluginProvidersCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListPluginProvidersCommandOutput/) -
-
- -ListPlugins - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/ListPluginsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListPluginsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListPluginsCommandOutput/) -
-
- -ListTagsForResource - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/ListTagsForResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListTagsForResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListTagsForResourceCommandOutput/) -
-
- -ListTasks - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/ListTasksCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListTasksCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/ListTasksCommandOutput/) -
-
- -PassRequest - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/PassRequestCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/PassRequestCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/PassRequestCommandOutput/) -
-
- -SendEvent - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/SendEventCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/SendEventCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/SendEventCommandOutput/) -
-
- -SendMessage - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/SendMessageCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/SendMessageCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/SendMessageCommandOutput/) -
-
- -StartConversation - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/StartConversationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/StartConversationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/StartConversationCommandOutput/) -
-
- -StartTroubleshootingAnalysis - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/StartTroubleshootingAnalysisCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/StartTroubleshootingAnalysisCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/StartTroubleshootingAnalysisCommandOutput/) -
-
- -StartTroubleshootingResolutionExplanation - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/StartTroubleshootingResolutionExplanationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/StartTroubleshootingResolutionExplanationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/StartTroubleshootingResolutionExplanationCommandOutput/) -
-
- -TagResource - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/TagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/TagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/TagResourceCommandOutput/) -
-
- -UntagResource - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/UntagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/UntagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/UntagResourceCommandOutput/) -
-
- -UpdateTroubleshootingCommandResult - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/UpdateTroubleshootingCommandResultCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/UpdateTroubleshootingCommandResultCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/UpdateTroubleshootingCommandResultCommandOutput/) -
-
- -UsePlugin - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/UsePluginCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/UsePluginCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/UsePluginCommandOutput/) -
-
- -GenerateCodeFromCommands - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/GenerateCodeFromCommandsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GenerateCodeFromCommandsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/GenerateCodeFromCommandsCommandOutput/) -
-
- -SendMessage - - -[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codewhispererstreaming/command/SendMessageCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/SendMessageCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codewhispererstreaming/Interface/SendMessageCommandOutput/) -
diff --git a/core/codewhisperer-streaming/amzn-codewhisperer-streaming-1.0.0.tgz b/core/codewhisperer-streaming/amzn-codewhisperer-streaming-1.0.0.tgz new file mode 100644 index 000000000..20af36226 Binary files /dev/null and b/core/codewhisperer-streaming/amzn-codewhisperer-streaming-1.0.0.tgz differ diff --git a/core/codewhisperer-streaming/api-extractor.json b/core/codewhisperer-streaming/api-extractor.json deleted file mode 100644 index d5bf5ffee..000000000 --- a/core/codewhisperer-streaming/api-extractor.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../../api-extractor.json", - "mainEntryPointFilePath": "/dist-types/index.d.ts" -} diff --git a/core/codewhisperer-streaming/package.json b/core/codewhisperer-streaming/package.json deleted file mode 100644 index 80856f2d4..000000000 --- a/core/codewhisperer-streaming/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "@amzn/codewhisperer-streaming", - "description": "@amzn/codewhisperer-streaming client", - "version": "1.0.0", - "scripts": { - "build": "concurrently 'npm:build:cjs' 'npm:build:es' 'npm:build:types'", - "build:cjs": "tsc -p tsconfig.cjs.json", - "build:es": "tsc -p tsconfig.es.json", - "build:types": "tsc -p tsconfig.types.json", - "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", - "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", - "prepack": "npm run clean && npm run build" - }, - "main": "./dist-cjs/index.js", - "types": "./dist-types/index.d.ts", - "module": "./dist-es/index.js", - "sideEffects": false, - "dependencies": { - "tslib": "^2.6.2", - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.658.1", - "@aws-sdk/middleware-host-header": "3.654.0", - "@aws-sdk/middleware-logger": "3.654.0", - "@aws-sdk/middleware-recursion-detection": "3.654.0", - "@aws-sdk/middleware-user-agent": "3.654.0", - "@aws-sdk/region-config-resolver": "3.654.0", - "@aws-sdk/token-providers": "3.654.0", - "@aws-sdk/types": "3.654.0", - "@aws-sdk/util-user-agent-browser": "3.654.0", - "@aws-sdk/util-user-agent-node": "3.654.0", - "@smithy/config-resolver": "^3.0.8", - "@smithy/core": "^2.4.6", - "@smithy/eventstream-serde-browser": "^3.0.9", - "@smithy/eventstream-serde-config-resolver": "^3.0.6", - "@smithy/eventstream-serde-node": "^3.0.8", - "@smithy/fetch-http-handler": "^3.2.8", - "@smithy/hash-node": "^3.0.6", - "@smithy/invalid-dependency": "^3.0.8", - "@smithy/middleware-content-length": "^3.0.8", - "@smithy/middleware-retry": "^3.0.21", - "@smithy/middleware-serde": "^3.0.6", - "@smithy/middleware-stack": "^3.0.6", - "@smithy/node-config-provider": "^3.1.7", - "@smithy/node-http-handler": "^3.2.3", - "@smithy/protocol-http": "^4.1.3", - "@smithy/smithy-client": "^3.3.5", - "@smithy/types": "^3.4.2", - "@smithy/url-parser": "^3.0.6", - "@smithy/util-base64": "^3.0.0", - "@smithy/util-body-length-browser": "^3.0.0", - "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.21", - "@smithy/util-defaults-mode-node": "^3.0.21", - "@smithy/util-middleware": "^3.0.6", - "@smithy/util-retry": "^3.0.6", - "@smithy/util-utf8": "^3.0.0", - "uuid": "^9.0.1" - }, - "devDependencies": { - "@tsconfig/node16": "16.1.3", - "concurrently": "7.0.0", - "downlevel-dts": "0.10.1", - "rimraf": "^3.0.0", - "typescript": "~4.9.5", - "@types/node": "^22.9.0", - "@types/uuid": "^9.0.4" - }, - "engines": { - "node": ">=16.0.0" - }, - "typesVersions": { - "<4.0": { - "dist-types/*": [ - "dist-types/ts3.4/*" - ] - } - }, - "files": [ - "dist-*/**" - ], - "browser": { - "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" - }, - "react-native": { - "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" - } -} \ No newline at end of file diff --git a/core/codewhisperer-streaming/src/CodeWhispererStreaming.ts b/core/codewhisperer-streaming/src/CodeWhispererStreaming.ts deleted file mode 100644 index b7e543f80..000000000 --- a/core/codewhisperer-streaming/src/CodeWhispererStreaming.ts +++ /dev/null @@ -1,111 +0,0 @@ -// smithy-typescript generated code -import { - CodeWhispererStreamingClient, - CodeWhispererStreamingClientConfig, -} from "./CodeWhispererStreamingClient"; -import { - ExportResultArchiveCommand, - ExportResultArchiveCommandInput, - ExportResultArchiveCommandOutput, -} from "./commands/ExportResultArchiveCommand"; -import { - GenerateAssistantResponseCommand, - GenerateAssistantResponseCommandInput, - GenerateAssistantResponseCommandOutput, -} from "./commands/GenerateAssistantResponseCommand"; -import { - GenerateTaskAssistPlanCommand, - GenerateTaskAssistPlanCommandInput, - GenerateTaskAssistPlanCommandOutput, -} from "./commands/GenerateTaskAssistPlanCommand"; -import { - SendMessageCommand, - SendMessageCommandInput, - SendMessageCommandOutput, -} from "./commands/SendMessageCommand"; -import { createAggregatedClient } from "@smithy/smithy-client"; -import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; - -const commands = { - ExportResultArchiveCommand, - GenerateAssistantResponseCommand, - GenerateTaskAssistPlanCommand, - SendMessageCommand, -} - -export interface CodeWhispererStreaming { - /** - * @see {@link ExportResultArchiveCommand} - */ - exportResultArchive( - args: ExportResultArchiveCommandInput, - options?: __HttpHandlerOptions, - ): Promise; - exportResultArchive( - args: ExportResultArchiveCommandInput, - cb: (err: any, data?: ExportResultArchiveCommandOutput) => void - ): void; - exportResultArchive( - args: ExportResultArchiveCommandInput, - options: __HttpHandlerOptions, - cb: (err: any, data?: ExportResultArchiveCommandOutput) => void - ): void; - - /** - * @see {@link GenerateAssistantResponseCommand} - */ - generateAssistantResponse( - args: GenerateAssistantResponseCommandInput, - options?: __HttpHandlerOptions, - ): Promise; - generateAssistantResponse( - args: GenerateAssistantResponseCommandInput, - cb: (err: any, data?: GenerateAssistantResponseCommandOutput) => void - ): void; - generateAssistantResponse( - args: GenerateAssistantResponseCommandInput, - options: __HttpHandlerOptions, - cb: (err: any, data?: GenerateAssistantResponseCommandOutput) => void - ): void; - - /** - * @see {@link GenerateTaskAssistPlanCommand} - */ - generateTaskAssistPlan( - args: GenerateTaskAssistPlanCommandInput, - options?: __HttpHandlerOptions, - ): Promise; - generateTaskAssistPlan( - args: GenerateTaskAssistPlanCommandInput, - cb: (err: any, data?: GenerateTaskAssistPlanCommandOutput) => void - ): void; - generateTaskAssistPlan( - args: GenerateTaskAssistPlanCommandInput, - options: __HttpHandlerOptions, - cb: (err: any, data?: GenerateTaskAssistPlanCommandOutput) => void - ): void; - - /** - * @see {@link SendMessageCommand} - */ - sendMessage( - args: SendMessageCommandInput, - options?: __HttpHandlerOptions, - ): Promise; - sendMessage( - args: SendMessageCommandInput, - cb: (err: any, data?: SendMessageCommandOutput) => void - ): void; - sendMessage( - args: SendMessageCommandInput, - options: __HttpHandlerOptions, - cb: (err: any, data?: SendMessageCommandOutput) => void - ): void; - -} - -/** - * @public - */ -export class CodeWhispererStreaming extends CodeWhispererStreamingClient implements CodeWhispererStreaming {} -createAggregatedClient(commands, CodeWhispererStreaming); diff --git a/core/codewhisperer-streaming/src/CodeWhispererStreamingClient.ts b/core/codewhisperer-streaming/src/CodeWhispererStreamingClient.ts deleted file mode 100644 index e5fcd9b65..000000000 --- a/core/codewhisperer-streaming/src/CodeWhispererStreamingClient.ts +++ /dev/null @@ -1,346 +0,0 @@ -// smithy-typescript generated code -import { - HttpAuthSchemeInputConfig, - HttpAuthSchemeResolvedConfig, - defaultCodeWhispererStreamingHttpAuthSchemeParametersProvider, - resolveHttpAuthSchemeConfig, -} from "./auth/httpAuthSchemeProvider"; -import { - ExportResultArchiveCommandInput, - ExportResultArchiveCommandOutput, -} from "./commands/ExportResultArchiveCommand"; -import { - GenerateAssistantResponseCommandInput, - GenerateAssistantResponseCommandOutput, -} from "./commands/GenerateAssistantResponseCommand"; -import { - GenerateTaskAssistPlanCommandInput, - GenerateTaskAssistPlanCommandOutput, -} from "./commands/GenerateTaskAssistPlanCommand"; -import { - SendMessageCommandInput, - SendMessageCommandOutput, -} from "./commands/SendMessageCommand"; -import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; -import { - RuntimeExtension, - RuntimeExtensionsConfig, - resolveRuntimeExtensions, -} from "./runtimeExtensions"; -import { - HostHeaderInputConfig, - HostHeaderResolvedConfig, - getHostHeaderPlugin, - resolveHostHeaderConfig, -} from "@aws-sdk/middleware-host-header"; -import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; -import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection"; -import { - UserAgentInputConfig, - UserAgentResolvedConfig, - getUserAgentPlugin, - resolveUserAgentConfig, -} from "@aws-sdk/middleware-user-agent"; -import { - EndpointsInputConfig, - EndpointsResolvedConfig, - RegionInputConfig, - RegionResolvedConfig, - resolveEndpointsConfig, - resolveRegionConfig, -} from "@smithy/config-resolver"; -import { - DefaultIdentityProviderConfig, - getHttpAuthSchemePlugin, - getHttpSigningPlugin, -} from "@smithy/core"; -import { - EventStreamSerdeInputConfig, - EventStreamSerdeResolvedConfig, - resolveEventStreamSerdeConfig, -} from "@smithy/eventstream-serde-config-resolver"; -import { getContentLengthPlugin } from "@smithy/middleware-content-length"; -import { - RetryInputConfig, - RetryResolvedConfig, - getRetryPlugin, - resolveRetryConfig, -} from "@smithy/middleware-retry"; -import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; -import { - Client as __Client, - DefaultsMode as __DefaultsMode, - SmithyConfiguration as __SmithyConfiguration, - SmithyResolvedConfiguration as __SmithyResolvedConfiguration, -} from "@smithy/smithy-client"; -import { - Provider, - RegionInfoProvider, - BodyLengthCalculator as __BodyLengthCalculator, - CheckOptionalClientConfig as __CheckOptionalClientConfig, - ChecksumConstructor as __ChecksumConstructor, - Decoder as __Decoder, - Encoder as __Encoder, - EventStreamSerdeProvider as __EventStreamSerdeProvider, - HashConstructor as __HashConstructor, - HttpHandlerOptions as __HttpHandlerOptions, - Logger as __Logger, - Provider as __Provider, - StreamCollector as __StreamCollector, - UrlParser as __UrlParser, - UserAgent as __UserAgent, -} from "@smithy/types"; - -export { __Client } - -/** - * @public - */ -export type ServiceInputTypes = - | ExportResultArchiveCommandInput - | GenerateAssistantResponseCommandInput - | GenerateTaskAssistPlanCommandInput - | SendMessageCommandInput; - -/** - * @public - */ -export type ServiceOutputTypes = - | ExportResultArchiveCommandOutput - | GenerateAssistantResponseCommandOutput - | GenerateTaskAssistPlanCommandOutput - | SendMessageCommandOutput; - -/** - * @public - */ -export interface ClientDefaults - extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { - /** - * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. - */ - requestHandler?: __HttpHandlerUserInput; - - /** - * 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; - - /** - * Fetch related hostname, signing name or signing region with given region. - * @internal - */ - regionInfoProvider?: RegionInfoProvider; - - /** - * 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 function that provides necessary utilities for generating and parsing event stream - */ - eventStreamSerdeProvider?: __EventStreamSerdeProvider; - - /** - * 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 CodeWhispererStreamingClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> - & ClientDefaults - & UserAgentInputConfig - & RetryInputConfig - & RegionInputConfig - & HostHeaderInputConfig - & EndpointsInputConfig - & EventStreamSerdeInputConfig - & HttpAuthSchemeInputConfig -/** - * @public - * - * The configuration interface of CodeWhispererStreamingClient class constructor that set the region, credentials and other options. - */ -export interface CodeWhispererStreamingClientConfig extends CodeWhispererStreamingClientConfigType {} - -/** - * @public - */ -export type CodeWhispererStreamingClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> - & Required - & RuntimeExtensionsConfig - & UserAgentResolvedConfig - & RetryResolvedConfig - & RegionResolvedConfig - & HostHeaderResolvedConfig - & EndpointsResolvedConfig - & EventStreamSerdeResolvedConfig - & HttpAuthSchemeResolvedConfig -/** - * @public - * - * The resolved configuration interface of CodeWhispererStreamingClient class. This is resolved and normalized from the {@link CodeWhispererStreamingClientConfig | constructor configuration interface}. - */ -export interface CodeWhispererStreamingClientResolvedConfig extends CodeWhispererStreamingClientResolvedConfigType {} - -/** - * @public - */ -export class CodeWhispererStreamingClient extends __Client< - __HttpHandlerOptions, - ServiceInputTypes, - ServiceOutputTypes, - CodeWhispererStreamingClientResolvedConfig -> { - /** - * The resolved configuration of CodeWhispererStreamingClient class. This is resolved and normalized from the {@link CodeWhispererStreamingClientConfig | constructor configuration interface}. - */ - readonly config: CodeWhispererStreamingClientResolvedConfig; - - constructor(...[configuration]: __CheckOptionalClientConfig) { - let _config_0 = __getRuntimeConfig(configuration || {}); - let _config_1 = resolveUserAgentConfig(_config_0); - let _config_2 = resolveRetryConfig(_config_1); - let _config_3 = resolveRegionConfig(_config_2); - let _config_4 = resolveHostHeaderConfig(_config_3); - let _config_5 = resolveEndpointsConfig(_config_4); - let _config_6 = resolveEventStreamSerdeConfig(_config_5); - let _config_7 = resolveHttpAuthSchemeConfig(_config_6); - let _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); - super(_config_8); - this.config = _config_8; - this.middlewareStack.use(getUserAgentPlugin(this.config - )); - 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(getHttpAuthSchemePlugin(this.config - , { - httpAuthSchemeParametersProvider: defaultCodeWhispererStreamingHttpAuthSchemeParametersProvider,identityProviderConfigProvider: async (config: CodeWhispererStreamingClientResolvedConfig) => new DefaultIdentityProviderConfig({ - "smithy.api#httpBearerAuth": config.token,}), } - )); - this.middlewareStack.use(getHttpSigningPlugin(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/core/codewhisperer-streaming/src/auth/httpAuthExtensionConfiguration.ts b/core/codewhisperer-streaming/src/auth/httpAuthExtensionConfiguration.ts deleted file mode 100644 index d19643786..000000000 --- a/core/codewhisperer-streaming/src/auth/httpAuthExtensionConfiguration.ts +++ /dev/null @@ -1,73 +0,0 @@ -// smithy-typescript generated code -import { CodeWhispererStreamingHttpAuthSchemeProvider } from "./httpAuthSchemeProvider"; -import { - HttpAuthScheme, - TokenIdentity, - TokenIdentityProvider, -} from "@smithy/types"; - -/** - * @internal - */ -export interface HttpAuthExtensionConfiguration { - setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void; - httpAuthSchemes(): HttpAuthScheme[]; - setHttpAuthSchemeProvider(httpAuthSchemeProvider: CodeWhispererStreamingHttpAuthSchemeProvider): void; - httpAuthSchemeProvider(): CodeWhispererStreamingHttpAuthSchemeProvider; - setToken(token: TokenIdentity | TokenIdentityProvider): void; - token(): TokenIdentity | TokenIdentityProvider | undefined; -} - -/** - * @internal - */ -export type HttpAuthRuntimeConfig = Partial<{ - httpAuthSchemes: HttpAuthScheme[]; - httpAuthSchemeProvider: CodeWhispererStreamingHttpAuthSchemeProvider; - token: TokenIdentity | TokenIdentityProvider; -}>; - -/** - * @internal - */ -export const getHttpAuthExtensionConfiguration = (runtimeConfig: HttpAuthRuntimeConfig): HttpAuthExtensionConfiguration => { - let _httpAuthSchemes = runtimeConfig.httpAuthSchemes!; - let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider!; - let _token = runtimeConfig.token; - return { - setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void { - const index = _httpAuthSchemes.findIndex(scheme => scheme.schemeId === httpAuthScheme.schemeId); - if (index === -1) { - _httpAuthSchemes.push(httpAuthScheme); - } else { - _httpAuthSchemes.splice(index, 1, httpAuthScheme); - } - }, - httpAuthSchemes(): HttpAuthScheme[] { - return _httpAuthSchemes; - }, - setHttpAuthSchemeProvider(httpAuthSchemeProvider: CodeWhispererStreamingHttpAuthSchemeProvider): void { - _httpAuthSchemeProvider = httpAuthSchemeProvider; - }, - httpAuthSchemeProvider(): CodeWhispererStreamingHttpAuthSchemeProvider { - return _httpAuthSchemeProvider; - }, - setToken(token: TokenIdentity | TokenIdentityProvider): void { - _token = token; - }, - token(): TokenIdentity | TokenIdentityProvider | undefined { - return _token; - }, - } -}; - -/** - * @internal - */ -export const resolveHttpAuthRuntimeConfig = (config: HttpAuthExtensionConfiguration): HttpAuthRuntimeConfig => { - return { - httpAuthSchemes: config.httpAuthSchemes(), - httpAuthSchemeProvider: config.httpAuthSchemeProvider(), - token: config.token(), - }; -}; diff --git a/core/codewhisperer-streaming/src/auth/httpAuthSchemeProvider.ts b/core/codewhisperer-streaming/src/auth/httpAuthSchemeProvider.ts deleted file mode 100644 index b5f24e566..000000000 --- a/core/codewhisperer-streaming/src/auth/httpAuthSchemeProvider.ts +++ /dev/null @@ -1,134 +0,0 @@ -// smithy-typescript generated code -import { CodeWhispererStreamingClientResolvedConfig } from "../CodeWhispererStreamingClient"; -import { FromSsoInit } from "@aws-sdk/token-providers"; -import { - doesIdentityRequireRefresh, - isIdentityExpired, - memoizeIdentityProvider, -} from "@smithy/core"; -import { - HandlerExecutionContext, - HttpAuthOption, - HttpAuthScheme, - HttpAuthSchemeParameters, - HttpAuthSchemeParametersProvider, - HttpAuthSchemeProvider, - TokenIdentity, - TokenIdentityProvider, -} from "@smithy/types"; -import { getSmithyContext } from "@smithy/util-middleware"; - -/** - * @internal - */ -export interface CodeWhispererStreamingHttpAuthSchemeParameters extends HttpAuthSchemeParameters { -} - -/** - * @internal - */ -export interface CodeWhispererStreamingHttpAuthSchemeParametersProvider extends HttpAuthSchemeParametersProvider {} - -/** - * @internal - */ -export const defaultCodeWhispererStreamingHttpAuthSchemeParametersProvider = async (config: CodeWhispererStreamingClientResolvedConfig, context: HandlerExecutionContext, input: object): Promise => { - return { - operation: getSmithyContext(context).operation as string, - }; -}; - -function createSmithyApiHttpBearerAuthHttpAuthOption(authParameters: CodeWhispererStreamingHttpAuthSchemeParameters): HttpAuthOption { - return { - schemeId: "smithy.api#httpBearerAuth", - propertiesExtractor: ({ - profile, - filepath, - configFilepath, - ignoreCache, - }: T & FromSsoInit, context: HandlerExecutionContext) => ({ - /** - * @internal - */ - identityProperties: { - profile, - filepath, - configFilepath, - ignoreCache, - }, - }), - }; -}; - -/** - * @internal - */ -export interface CodeWhispererStreamingHttpAuthSchemeProvider extends HttpAuthSchemeProvider {} - -/** - * @internal - */ -export const defaultCodeWhispererStreamingHttpAuthSchemeProvider: CodeWhispererStreamingHttpAuthSchemeProvider = (authParameters) => { - const options: HttpAuthOption[] = []; - switch (authParameters.operation) { - default: { - options.push(createSmithyApiHttpBearerAuthHttpAuthOption(authParameters)); - }; - }; - return options; -}; - -/** - * @internal - */ -export interface HttpAuthSchemeInputConfig { - /** - * Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. - * @internal - */ - httpAuthSchemes?: HttpAuthScheme[]; - - /** - * Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use. - * @internal - */ - httpAuthSchemeProvider?: CodeWhispererStreamingHttpAuthSchemeProvider; - - /** - * The token used to authenticate requests. - */ - token?: TokenIdentity | TokenIdentityProvider; -} - -/** - * @internal - */ -export interface HttpAuthSchemeResolvedConfig { - /** - * Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. - * @internal - */ - readonly httpAuthSchemes: HttpAuthScheme[]; - - /** - * Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use. - * @internal - */ - readonly httpAuthSchemeProvider: CodeWhispererStreamingHttpAuthSchemeProvider; - - /** - * The token used to authenticate requests. - */ - readonly token?: TokenIdentityProvider; -} - -/** - * @internal - */ -export const resolveHttpAuthSchemeConfig = (config: T & HttpAuthSchemeInputConfig): T & HttpAuthSchemeResolvedConfig => { - const token = memoizeIdentityProvider(config.token, isIdentityExpired, doesIdentityRequireRefresh); - return { - ...config, - token, - } as T & HttpAuthSchemeResolvedConfig; -}; diff --git a/core/codewhisperer-streaming/src/commands/ExportResultArchiveCommand.ts b/core/codewhisperer-streaming/src/commands/ExportResultArchiveCommand.ts deleted file mode 100644 index 8b8a50167..000000000 --- a/core/codewhisperer-streaming/src/commands/ExportResultArchiveCommand.ts +++ /dev/null @@ -1,142 +0,0 @@ -// smithy-typescript generated code -import { - CodeWhispererStreamingClientResolvedConfig, - ServiceInputTypes, - ServiceOutputTypes, -} from "../CodeWhispererStreamingClient"; -import { - ExportResultArchiveRequest, - ExportResultArchiveResponse, - ExportResultArchiveResponseFilterSensitiveLog, -} from "../models/models_0"; -import { - de_ExportResultArchiveCommand, - se_ExportResultArchiveCommand, -} from "../protocols/Aws_restJson1"; -import { getSerdePlugin } from "@smithy/middleware-serde"; -import { Command as $Command } from "@smithy/smithy-client"; -import { MetadataBearer as __MetadataBearer } from "@smithy/types"; - -/** - * @public - */ -export type { __MetadataBearer }; -export { $Command }; -/** - * @public - * - * The input for {@link ExportResultArchiveCommand}. - */ -export interface ExportResultArchiveCommandInput extends ExportResultArchiveRequest {} -/** - * @public - * - * The output of {@link ExportResultArchiveCommand}. - */ -export interface ExportResultArchiveCommandOutput extends ExportResultArchiveResponse, __MetadataBearer {} - -/** - * API to export operation result as an archive - * @example - * Use a bare-bones client and the command you need to make an API call. - * ```javascript - * import { CodeWhispererStreamingClient, ExportResultArchiveCommand } from "@amzn/codewhisperer-streaming"; // ES Modules import - * // const { CodeWhispererStreamingClient, ExportResultArchiveCommand } = require("@amzn/codewhisperer-streaming"); // CommonJS import - * const client = new CodeWhispererStreamingClient(config); - * const input = { // ExportResultArchiveRequest - * exportId: "STRING_VALUE", // required - * exportIntent: "TRANSFORMATION" || "TASK_ASSIST" || "UNIT_TESTS", // required - * exportContext: { // ExportContext Union: only one key present - * transformationExportContext: { // TransformationExportContext - * downloadArtifactId: "STRING_VALUE", // required - * downloadArtifactType: "ClientInstructions" || "Logs" || "GeneratedCode", // required - * }, - * unitTestGenerationExportContext: { // UnitTestGenerationExportContext - * testGenerationJobGroupName: "STRING_VALUE", // required - * testGenerationJobId: "STRING_VALUE", - * }, - * }, - * }; - * const command = new ExportResultArchiveCommand(input); - * const response = await client.send(command); - * // { // ExportResultArchiveResponse - * // body: { // ResultArchiveStream Union: only one key present - * // binaryMetadataEvent: { // BinaryMetadataEvent - * // size: Number("long"), - * // mimeType: "STRING_VALUE", - * // contentChecksum: "STRING_VALUE", - * // contentChecksumType: "SHA_256", - * // }, - * // binaryPayloadEvent: { // BinaryPayloadEvent - * // bytes: new Uint8Array(), - * // }, - * // internalServerException: { // InternalServerException - * // message: "STRING_VALUE", // required - * // }, - * // }, - * // }; - * - * ``` - * - * @param ExportResultArchiveCommandInput - {@link ExportResultArchiveCommandInput} - * @returns {@link ExportResultArchiveCommandOutput} - * @see {@link ExportResultArchiveCommandInput} for command's `input` shape. - * @see {@link ExportResultArchiveCommandOutput} for command's `response` shape. - * @see {@link CodeWhispererStreamingClientResolvedConfig | config} for CodeWhispererStreamingClient's `config` shape. - * - * @throws {@link InternalServerException} (server fault) - * This exception is thrown when an unexpected error occurred during the processing of a request. - * - * @throws {@link ThrottlingException} (client fault) - * This exception is thrown when request was denied due to request throttling. - * - * @throws {@link ValidationException} (client fault) - * This exception is thrown when the input fails to satisfy the constraints specified by the service. - * - * @throws {@link ConflictException} (client fault) - * This exception is thrown when the action to perform could not be completed because the resource is in a conflicting state. - * - * @throws {@link ResourceNotFoundException} (client fault) - * This exception is thrown when describing a resource that does not exist. - * - * @throws {@link AccessDeniedException} (client fault) - * This exception is thrown when the user does not have sufficient access to perform this action. - * - * @throws {@link CodeWhispererStreamingServiceException} - *

Base exception class for all service exceptions from CodeWhispererStreaming service.

- * - * @public - */ -export class ExportResultArchiveCommand extends $Command.classBuilder() - .m(function (this: any, Command: any, cs: any, config: CodeWhispererStreamingClientResolvedConfig, o: any) { - return [ - - getSerdePlugin(config, this.serialize, this.deserialize), - ]; - }) - .s("AmazonCodeWhispererStreamingService", "ExportResultArchive", { - - /** - * @internal - */ - eventStream: { - output: true, - }, - }) - .n("CodeWhispererStreamingClient", "ExportResultArchiveCommand") - .f(void 0, ExportResultArchiveResponseFilterSensitiveLog) - .ser(se_ExportResultArchiveCommand) - .de(de_ExportResultArchiveCommand) -.build() { -/** @internal type navigation helper, not in runtime. */ -declare protected static __types: { - api: { - input: ExportResultArchiveRequest; - output: ExportResultArchiveResponse; - }; - sdk: { - input: ExportResultArchiveCommandInput; - output: ExportResultArchiveCommandOutput; - }; -}; -} diff --git a/core/codewhisperer-streaming/src/commands/GenerateAssistantResponseCommand.ts b/core/codewhisperer-streaming/src/commands/GenerateAssistantResponseCommand.ts deleted file mode 100644 index 44b7d3050..000000000 --- a/core/codewhisperer-streaming/src/commands/GenerateAssistantResponseCommand.ts +++ /dev/null @@ -1,653 +0,0 @@ -// smithy-typescript generated code -import { - CodeWhispererStreamingClientResolvedConfig, - ServiceInputTypes, - ServiceOutputTypes, -} from "../CodeWhispererStreamingClient"; -import { - GenerateAssistantResponseRequest, - GenerateAssistantResponseRequestFilterSensitiveLog, - GenerateAssistantResponseResponse, - GenerateAssistantResponseResponseFilterSensitiveLog, -} from "../models/models_0"; -import { - de_GenerateAssistantResponseCommand, - se_GenerateAssistantResponseCommand, -} from "../protocols/Aws_restJson1"; -import { getSerdePlugin } from "@smithy/middleware-serde"; -import { Command as $Command } from "@smithy/smithy-client"; -import { MetadataBearer as __MetadataBearer } from "@smithy/types"; - -/** - * @public - */ -export type { __MetadataBearer }; -export { $Command }; -/** - * @public - * - * The input for {@link GenerateAssistantResponseCommand}. - */ -export interface GenerateAssistantResponseCommandInput extends GenerateAssistantResponseRequest {} -/** - * @public - * - * The output of {@link GenerateAssistantResponseCommand}. - */ -export interface GenerateAssistantResponseCommandOutput extends GenerateAssistantResponseResponse, __MetadataBearer {} - -/** - * API to generate assistant response. - * @example - * Use a bare-bones client and the command you need to make an API call. - * ```javascript - * import { CodeWhispererStreamingClient, GenerateAssistantResponseCommand } from "@amzn/codewhisperer-streaming"; // ES Modules import - * // const { CodeWhispererStreamingClient, GenerateAssistantResponseCommand } = require("@amzn/codewhisperer-streaming"); // CommonJS import - * const client = new CodeWhispererStreamingClient(config); - * const input = { // GenerateAssistantResponseRequest - * conversationState: { // ConversationState - * conversationId: "STRING_VALUE", - * history: [ // ChatHistory - * { // ChatMessage Union: only one key present - * userInputMessage: { // UserInputMessage - * content: "STRING_VALUE", // required - * userInputMessageContext: { // UserInputMessageContext - * editorState: { // EditorState - * document: { // TextDocument - * relativeFilePath: "STRING_VALUE", // required - * programmingLanguage: { // ProgrammingLanguage - * languageName: "STRING_VALUE", // required - * }, - * text: "STRING_VALUE", - * documentSymbols: [ // DocumentSymbols - * { // DocumentSymbol - * name: "STRING_VALUE", // required - * type: "DECLARATION" || "USAGE", // required - * source: "STRING_VALUE", - * }, - * ], - * }, - * cursorState: { // CursorState Union: only one key present - * position: { // Position - * line: Number("int"), // required - * character: Number("int"), // required - * }, - * range: { // Range - * start: { - * line: Number("int"), // required - * character: Number("int"), // required - * }, - * end: { - * line: Number("int"), // required - * character: Number("int"), // required - * }, - * }, - * }, - * relevantDocuments: [ // RelevantDocumentList - * { // RelevantTextDocument - * relativeFilePath: "STRING_VALUE", // required - * programmingLanguage: { - * languageName: "STRING_VALUE", // required - * }, - * text: "STRING_VALUE", - * documentSymbols: [ - * { - * name: "STRING_VALUE", // required - * type: "DECLARATION" || "USAGE", // required - * source: "STRING_VALUE", - * }, - * ], - * }, - * ], - * useRelevantDocuments: true || false, - * }, - * shellState: { // ShellState - * shellName: "STRING_VALUE", // required - * shellHistory: [ // ShellHistory - * { // ShellHistoryEntry - * command: "STRING_VALUE", // required - * directory: "STRING_VALUE", - * exitCode: Number("int"), - * stdout: "STRING_VALUE", - * stderr: "STRING_VALUE", - * }, - * ], - * }, - * gitState: { // GitState - * status: "STRING_VALUE", - * }, - * envState: { // EnvState - * operatingSystem: "STRING_VALUE", - * currentWorkingDirectory: "STRING_VALUE", - * environmentVariables: [ // EnvironmentVariables - * { // EnvironmentVariable - * key: "STRING_VALUE", - * value: "STRING_VALUE", - * }, - * ], - * }, - * appStudioContext: { // AppStudioState - * namespace: "STRING_VALUE", // required - * propertyName: "STRING_VALUE", // required - * propertyValue: "STRING_VALUE", - * propertyContext: "STRING_VALUE", // required - * }, - * diagnostic: { // Diagnostic Union: only one key present - * textDocumentDiagnostic: { // TextDocumentDiagnostic - * document: { - * relativeFilePath: "STRING_VALUE", // required - * programmingLanguage: { - * languageName: "STRING_VALUE", // required - * }, - * text: "STRING_VALUE", - * documentSymbols: [ - * { - * name: "STRING_VALUE", // required - * type: "DECLARATION" || "USAGE", // required - * source: "STRING_VALUE", - * }, - * ], - * }, - * range: { - * start: { - * line: Number("int"), // required - * character: Number("int"), // required - * }, - * end: { - * line: Number("int"), // required - * character: Number("int"), // required - * }, - * }, - * source: "STRING_VALUE", // required - * severity: "ERROR" || "WARNING" || "INFORMATION" || "HINT", // required - * message: "STRING_VALUE", // required - * }, - * runtimeDiagnostic: { // RuntimeDiagnostic - * source: "STRING_VALUE", // required - * severity: "ERROR" || "WARNING" || "INFORMATION" || "HINT", // required - * message: "STRING_VALUE", // required - * }, - * }, - * consoleState: { // ConsoleState - * region: "STRING_VALUE", - * consoleUrl: "STRING_VALUE", - * serviceId: "STRING_VALUE", - * serviceConsolePage: "STRING_VALUE", - * serviceSubconsolePage: "STRING_VALUE", - * taskName: "STRING_VALUE", - * }, - * userSettings: { // UserSettings - * hasConsentedToCrossRegionCalls: true || false, - * }, - * }, - * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION", - * }, - * assistantResponseMessage: { // AssistantResponseMessage - * messageId: "STRING_VALUE", - * content: "STRING_VALUE", // required - * supplementaryWebLinks: [ // SupplementaryWebLinks - * { // SupplementaryWebLink - * url: "STRING_VALUE", // required - * title: "STRING_VALUE", // required - * snippet: "STRING_VALUE", - * }, - * ], - * references: [ // References - * { // Reference - * licenseName: "STRING_VALUE", - * repository: "STRING_VALUE", - * url: "STRING_VALUE", - * recommendationContentSpan: { // Span - * start: Number("int"), - * end: Number("int"), - * }, - * }, - * ], - * followupPrompt: { // FollowupPrompt - * content: "STRING_VALUE", // required - * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION", - * }, - * }, - * }, - * ], - * currentMessage: {// Union: only one key present - * userInputMessage: { - * content: "STRING_VALUE", // required - * userInputMessageContext: { - * editorState: { - * document: "", - * cursorState: {// Union: only one key present - * position: "", - * range: { - * start: "", // required - * end: "", // required - * }, - * }, - * relevantDocuments: [ - * { - * relativeFilePath: "STRING_VALUE", // required - * programmingLanguage: { - * languageName: "STRING_VALUE", // required - * }, - * text: "STRING_VALUE", - * documentSymbols: [ - * { - * name: "STRING_VALUE", // required - * type: "DECLARATION" || "USAGE", // required - * source: "STRING_VALUE", - * }, - * ], - * }, - * ], - * useRelevantDocuments: true || false, - * }, - * shellState: { - * shellName: "STRING_VALUE", // required - * shellHistory: [ - * { - * command: "STRING_VALUE", // required - * directory: "STRING_VALUE", - * exitCode: Number("int"), - * stdout: "STRING_VALUE", - * stderr: "STRING_VALUE", - * }, - * ], - * }, - * gitState: { - * status: "STRING_VALUE", - * }, - * envState: { - * operatingSystem: "STRING_VALUE", - * currentWorkingDirectory: "STRING_VALUE", - * environmentVariables: [ - * { - * key: "STRING_VALUE", - * value: "STRING_VALUE", - * }, - * ], - * }, - * appStudioContext: { - * namespace: "STRING_VALUE", // required - * propertyName: "STRING_VALUE", // required - * propertyValue: "STRING_VALUE", - * propertyContext: "STRING_VALUE", // required - * }, - * diagnostic: {// Union: only one key present - * textDocumentDiagnostic: { - * document: "", // required - * range: { - * start: "", // required - * end: "", // required - * }, - * source: "STRING_VALUE", // required - * severity: "ERROR" || "WARNING" || "INFORMATION" || "HINT", // required - * message: "STRING_VALUE", // required - * }, - * runtimeDiagnostic: { - * source: "STRING_VALUE", // required - * severity: "ERROR" || "WARNING" || "INFORMATION" || "HINT", // required - * message: "STRING_VALUE", // required - * }, - * }, - * consoleState: { - * region: "STRING_VALUE", - * consoleUrl: "STRING_VALUE", - * serviceId: "STRING_VALUE", - * serviceConsolePage: "STRING_VALUE", - * serviceSubconsolePage: "STRING_VALUE", - * taskName: "STRING_VALUE", - * }, - * userSettings: { - * hasConsentedToCrossRegionCalls: true || false, - * }, - * }, - * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION", - * }, - * assistantResponseMessage: { - * messageId: "STRING_VALUE", - * content: "STRING_VALUE", // required - * supplementaryWebLinks: [ - * { - * url: "STRING_VALUE", // required - * title: "STRING_VALUE", // required - * snippet: "STRING_VALUE", - * }, - * ], - * references: [ - * { - * licenseName: "STRING_VALUE", - * repository: "STRING_VALUE", - * url: "STRING_VALUE", - * recommendationContentSpan: { - * start: Number("int"), - * end: Number("int"), - * }, - * }, - * ], - * followupPrompt: { - * content: "STRING_VALUE", // required - * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION", - * }, - * }, - * }, - * chatTriggerType: "MANUAL" || "DIAGNOSTIC" || "INLINE_CHAT", // required - * customizationArn: "STRING_VALUE", - * }, - * profileArn: "STRING_VALUE", - * }; - * const command = new GenerateAssistantResponseCommand(input); - * const response = await client.send(command); - * // { // GenerateAssistantResponseResponse - * // conversationId: "STRING_VALUE", // required - * // generateAssistantResponseResponse: { // ChatResponseStream Union: only one key present - * // messageMetadataEvent: { // MessageMetadataEvent - * // conversationId: "STRING_VALUE", - * // utteranceId: "STRING_VALUE", - * // }, - * // assistantResponseEvent: { // AssistantResponseEvent - * // content: "STRING_VALUE", // required - * // }, - * // dryRunSucceedEvent: {}, - * // codeReferenceEvent: { // CodeReferenceEvent - * // references: [ // References - * // { // Reference - * // licenseName: "STRING_VALUE", - * // repository: "STRING_VALUE", - * // url: "STRING_VALUE", - * // recommendationContentSpan: { // Span - * // start: Number("int"), - * // end: Number("int"), - * // }, - * // }, - * // ], - * // }, - * // supplementaryWebLinksEvent: { // SupplementaryWebLinksEvent - * // supplementaryWebLinks: [ // SupplementaryWebLinks - * // { // SupplementaryWebLink - * // url: "STRING_VALUE", // required - * // title: "STRING_VALUE", // required - * // snippet: "STRING_VALUE", - * // }, - * // ], - * // }, - * // followupPromptEvent: { // FollowupPromptEvent - * // followupPrompt: { // FollowupPrompt - * // content: "STRING_VALUE", // required - * // userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION", - * // }, - * // }, - * // codeEvent: { // CodeEvent - * // content: "STRING_VALUE", // required - * // }, - * // intentsEvent: { // IntentsEvent - * // intents: { // IntentMap - * // "": { // IntentData - * // "": { // IntentDataType Union: only one key present - * // string: "STRING_VALUE", - * // }, - * // }, - * // }, - * // }, - * // interactionComponentsEvent: { // InteractionComponentsEvent - * // interactionComponentEntries: [ // InteractionComponentEntryList // required - * // { // InteractionComponentEntry - * // interactionComponentId: "STRING_VALUE", - * // interactionComponent: { // InteractionComponent - * // text: { // Text - * // content: "STRING_VALUE", // required - * // }, - * // alert: { // Alert - * // type: "INFO" || "ERROR" || "WARNING", // required - * // content: [ // AlertComponentList // required - * // { // AlertComponent - * // text: { - * // content: "STRING_VALUE", // required - * // }, - * // }, - * // ], - * // }, - * // infrastructureUpdate: { // InfrastructureUpdate - * // transition: { // InfrastructureUpdateTransition - * // currentState: "STRING_VALUE", // required - * // nextState: "STRING_VALUE", // required - * // }, - * // }, - * // progress: { // Progress - * // content: [ // ProgressComponentList // required - * // { // ProgressComponent - * // step: { // Step - * // id: Number("int"), // required - * // state: "FAILED" || "SUCCEEDED" || "STOPPED" || "PENDING" || "IN_PROGRESS" || "LOADING" || "PAUSED", // required - * // label: "STRING_VALUE", // required - * // content: [ // StepComponentList - * // { // StepComponent - * // text: "", - * // }, - * // ], - * // }, - * // }, - * // ], - * // }, - * // step: { - * // id: Number("int"), // required - * // state: "FAILED" || "SUCCEEDED" || "STOPPED" || "PENDING" || "IN_PROGRESS" || "LOADING" || "PAUSED", // required - * // label: "STRING_VALUE", // required - * // content: [ - * // { - * // text: "", - * // }, - * // ], - * // }, - * // taskDetails: { // TaskDetails - * // overview: { // TaskOverview - * // label: "STRING_VALUE", // required - * // description: "STRING_VALUE", // required - * // }, - * // content: [ // TaskComponentList // required - * // { // TaskComponent - * // text: "", - * // infrastructureUpdate: { - * // transition: { - * // currentState: "STRING_VALUE", // required - * // nextState: "STRING_VALUE", // required - * // }, - * // }, - * // alert: { - * // type: "INFO" || "ERROR" || "WARNING", // required - * // content: [ // required - * // { - * // text: "", - * // }, - * // ], - * // }, - * // progress: { - * // content: [ // required - * // { - * // step: "", - * // }, - * // ], - * // }, - * // }, - * // ], - * // actions: [ // TaskActionList - * // { // TaskAction - * // label: "STRING_VALUE", // required - * // note: { // TaskActionNote - * // content: "STRING_VALUE", // required - * // type: "INFO" || "WARNING", - * // }, - * // primary: true || false, - * // disabled: true || false, - * // payload: { // TaskActionPayload // required - * // "": "STRING_VALUE", - * // }, - * // confirmation: { // TaskActionConfirmation - * // content: "STRING_VALUE", - * // }, - * // }, - * // ], - * // }, - * // taskReference: { // TaskReference - * // taskId: "STRING_VALUE", // required - * // }, - * // suggestions: { // Suggestions - * // items: [ // SuggestionList // required - * // { // Suggestion - * // value: "STRING_VALUE", // required - * // }, - * // ], - * // }, - * // section: { // Section - * // title: "STRING_VALUE", // required - * // content: [ // SectionComponentList // required - * // { // SectionComponent - * // text: "", - * // alert: { - * // type: "INFO" || "ERROR" || "WARNING", // required - * // content: [ // required - * // { - * // text: "", - * // }, - * // ], - * // }, - * // resource: { // Resource - * // title: "STRING_VALUE", // required - * // link: "STRING_VALUE", // required - * // description: "STRING_VALUE", // required - * // type: "STRING_VALUE", // required - * // ARN: "STRING_VALUE", // required - * // resourceJsonString: "STRING_VALUE", // required - * // }, - * // resourceList: { // ResourceList - * // action: { // Action - * // webLink: { // WebLink - * // label: "STRING_VALUE", // required - * // url: "STRING_VALUE", // required - * // }, - * // moduleLink: { // ModuleLink - * // cloudWatchTroubleshootingLink: { // CloudWatchTroubleshootingLink - * // label: "STRING_VALUE", // required - * // investigationPayload: "STRING_VALUE", // required - * // defaultText: "STRING_VALUE", - * // }, - * // }, - * // }, - * // items: [ // Resources // required - * // { - * // title: "STRING_VALUE", // required - * // link: "STRING_VALUE", // required - * // description: "STRING_VALUE", // required - * // type: "STRING_VALUE", // required - * // ARN: "STRING_VALUE", // required - * // resourceJsonString: "STRING_VALUE", // required - * // }, - * // ], - * // }, - * // }, - * // ], - * // action: { - * // webLink: { - * // label: "STRING_VALUE", // required - * // url: "STRING_VALUE", // required - * // }, - * // moduleLink: { - * // cloudWatchTroubleshootingLink: { - * // label: "STRING_VALUE", // required - * // investigationPayload: "STRING_VALUE", // required - * // defaultText: "STRING_VALUE", - * // }, - * // }, - * // }, - * // }, - * // resource: "", - * // resourceList: { - * // action: { - * // webLink: { - * // label: "STRING_VALUE", // required - * // url: "STRING_VALUE", // required - * // }, - * // moduleLink: { - * // cloudWatchTroubleshootingLink: { - * // label: "STRING_VALUE", // required - * // investigationPayload: "STRING_VALUE", // required - * // defaultText: "STRING_VALUE", - * // }, - * // }, - * // }, - * // items: [ // required - * // "", - * // ], - * // }, - * // action: "", - * // }, - * // }, - * // ], - * // }, - * // invalidStateEvent: { // InvalidStateEvent - * // reason: "INVALID_TASK_ASSIST_PLAN", // required - * // message: "STRING_VALUE", // required - * // }, - * // error: { // InternalServerException - * // message: "STRING_VALUE", // required - * // }, - * // }, - * // }; - * - * ``` - * - * @param GenerateAssistantResponseCommandInput - {@link GenerateAssistantResponseCommandInput} - * @returns {@link GenerateAssistantResponseCommandOutput} - * @see {@link GenerateAssistantResponseCommandInput} for command's `input` shape. - * @see {@link GenerateAssistantResponseCommandOutput} for command's `response` shape. - * @see {@link CodeWhispererStreamingClientResolvedConfig | config} for CodeWhispererStreamingClient's `config` shape. - * - * @throws {@link InternalServerException} (server fault) - * This exception is thrown when an unexpected error occurred during the processing of a request. - * - * @throws {@link ThrottlingException} (client fault) - * This exception is thrown when request was denied due to request throttling. - * - * @throws {@link ValidationException} (client fault) - * This exception is thrown when the input fails to satisfy the constraints specified by the service. - * - * @throws {@link AccessDeniedException} (client fault) - * This exception is thrown when the user does not have sufficient access to perform this action. - * - * @throws {@link CodeWhispererStreamingServiceException} - *

Base exception class for all service exceptions from CodeWhispererStreaming service.

- * - * @public - */ -export class GenerateAssistantResponseCommand extends $Command.classBuilder() - .m(function (this: any, Command: any, cs: any, config: CodeWhispererStreamingClientResolvedConfig, o: any) { - return [ - - getSerdePlugin(config, this.serialize, this.deserialize), - ]; - }) - .s("AmazonCodeWhispererStreamingService", "GenerateAssistantResponse", { - - /** - * @internal - */ - eventStream: { - output: true, - }, - }) - .n("CodeWhispererStreamingClient", "GenerateAssistantResponseCommand") - .f(GenerateAssistantResponseRequestFilterSensitiveLog, GenerateAssistantResponseResponseFilterSensitiveLog) - .ser(se_GenerateAssistantResponseCommand) - .de(de_GenerateAssistantResponseCommand) -.build() { -/** @internal type navigation helper, not in runtime. */ -declare protected static __types: { - api: { - input: GenerateAssistantResponseRequest; - output: GenerateAssistantResponseResponse; - }; - sdk: { - input: GenerateAssistantResponseCommandInput; - output: GenerateAssistantResponseCommandOutput; - }; -}; -} diff --git a/core/codewhisperer-streaming/src/commands/GenerateTaskAssistPlanCommand.ts b/core/codewhisperer-streaming/src/commands/GenerateTaskAssistPlanCommand.ts deleted file mode 100644 index f83a77e3d..000000000 --- a/core/codewhisperer-streaming/src/commands/GenerateTaskAssistPlanCommand.ts +++ /dev/null @@ -1,665 +0,0 @@ -// smithy-typescript generated code -import { - CodeWhispererStreamingClientResolvedConfig, - ServiceInputTypes, - ServiceOutputTypes, -} from "../CodeWhispererStreamingClient"; -import { - GenerateTaskAssistPlanRequest, - GenerateTaskAssistPlanRequestFilterSensitiveLog, - GenerateTaskAssistPlanResponse, - GenerateTaskAssistPlanResponseFilterSensitiveLog, -} from "../models/models_0"; -import { - de_GenerateTaskAssistPlanCommand, - se_GenerateTaskAssistPlanCommand, -} from "../protocols/Aws_restJson1"; -import { getSerdePlugin } from "@smithy/middleware-serde"; -import { Command as $Command } from "@smithy/smithy-client"; -import { MetadataBearer as __MetadataBearer } from "@smithy/types"; - -/** - * @public - */ -export type { __MetadataBearer }; -export { $Command }; -/** - * @public - * - * The input for {@link GenerateTaskAssistPlanCommand}. - */ -export interface GenerateTaskAssistPlanCommandInput extends GenerateTaskAssistPlanRequest {} -/** - * @public - * - * The output of {@link GenerateTaskAssistPlanCommand}. - */ -export interface GenerateTaskAssistPlanCommandOutput extends GenerateTaskAssistPlanResponse, __MetadataBearer {} - -/** - * API to generate task assit plan. - * @example - * Use a bare-bones client and the command you need to make an API call. - * ```javascript - * import { CodeWhispererStreamingClient, GenerateTaskAssistPlanCommand } from "@amzn/codewhisperer-streaming"; // ES Modules import - * // const { CodeWhispererStreamingClient, GenerateTaskAssistPlanCommand } = require("@amzn/codewhisperer-streaming"); // CommonJS import - * const client = new CodeWhispererStreamingClient(config); - * const input = { // GenerateTaskAssistPlanRequest - * conversationState: { // ConversationState - * conversationId: "STRING_VALUE", - * history: [ // ChatHistory - * { // ChatMessage Union: only one key present - * userInputMessage: { // UserInputMessage - * content: "STRING_VALUE", // required - * userInputMessageContext: { // UserInputMessageContext - * editorState: { // EditorState - * document: { // TextDocument - * relativeFilePath: "STRING_VALUE", // required - * programmingLanguage: { // ProgrammingLanguage - * languageName: "STRING_VALUE", // required - * }, - * text: "STRING_VALUE", - * documentSymbols: [ // DocumentSymbols - * { // DocumentSymbol - * name: "STRING_VALUE", // required - * type: "DECLARATION" || "USAGE", // required - * source: "STRING_VALUE", - * }, - * ], - * }, - * cursorState: { // CursorState Union: only one key present - * position: { // Position - * line: Number("int"), // required - * character: Number("int"), // required - * }, - * range: { // Range - * start: { - * line: Number("int"), // required - * character: Number("int"), // required - * }, - * end: { - * line: Number("int"), // required - * character: Number("int"), // required - * }, - * }, - * }, - * relevantDocuments: [ // RelevantDocumentList - * { // RelevantTextDocument - * relativeFilePath: "STRING_VALUE", // required - * programmingLanguage: { - * languageName: "STRING_VALUE", // required - * }, - * text: "STRING_VALUE", - * documentSymbols: [ - * { - * name: "STRING_VALUE", // required - * type: "DECLARATION" || "USAGE", // required - * source: "STRING_VALUE", - * }, - * ], - * }, - * ], - * useRelevantDocuments: true || false, - * }, - * shellState: { // ShellState - * shellName: "STRING_VALUE", // required - * shellHistory: [ // ShellHistory - * { // ShellHistoryEntry - * command: "STRING_VALUE", // required - * directory: "STRING_VALUE", - * exitCode: Number("int"), - * stdout: "STRING_VALUE", - * stderr: "STRING_VALUE", - * }, - * ], - * }, - * gitState: { // GitState - * status: "STRING_VALUE", - * }, - * envState: { // EnvState - * operatingSystem: "STRING_VALUE", - * currentWorkingDirectory: "STRING_VALUE", - * environmentVariables: [ // EnvironmentVariables - * { // EnvironmentVariable - * key: "STRING_VALUE", - * value: "STRING_VALUE", - * }, - * ], - * }, - * appStudioContext: { // AppStudioState - * namespace: "STRING_VALUE", // required - * propertyName: "STRING_VALUE", // required - * propertyValue: "STRING_VALUE", - * propertyContext: "STRING_VALUE", // required - * }, - * diagnostic: { // Diagnostic Union: only one key present - * textDocumentDiagnostic: { // TextDocumentDiagnostic - * document: { - * relativeFilePath: "STRING_VALUE", // required - * programmingLanguage: { - * languageName: "STRING_VALUE", // required - * }, - * text: "STRING_VALUE", - * documentSymbols: [ - * { - * name: "STRING_VALUE", // required - * type: "DECLARATION" || "USAGE", // required - * source: "STRING_VALUE", - * }, - * ], - * }, - * range: { - * start: { - * line: Number("int"), // required - * character: Number("int"), // required - * }, - * end: { - * line: Number("int"), // required - * character: Number("int"), // required - * }, - * }, - * source: "STRING_VALUE", // required - * severity: "ERROR" || "WARNING" || "INFORMATION" || "HINT", // required - * message: "STRING_VALUE", // required - * }, - * runtimeDiagnostic: { // RuntimeDiagnostic - * source: "STRING_VALUE", // required - * severity: "ERROR" || "WARNING" || "INFORMATION" || "HINT", // required - * message: "STRING_VALUE", // required - * }, - * }, - * consoleState: { // ConsoleState - * region: "STRING_VALUE", - * consoleUrl: "STRING_VALUE", - * serviceId: "STRING_VALUE", - * serviceConsolePage: "STRING_VALUE", - * serviceSubconsolePage: "STRING_VALUE", - * taskName: "STRING_VALUE", - * }, - * userSettings: { // UserSettings - * hasConsentedToCrossRegionCalls: true || false, - * }, - * }, - * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION", - * }, - * assistantResponseMessage: { // AssistantResponseMessage - * messageId: "STRING_VALUE", - * content: "STRING_VALUE", // required - * supplementaryWebLinks: [ // SupplementaryWebLinks - * { // SupplementaryWebLink - * url: "STRING_VALUE", // required - * title: "STRING_VALUE", // required - * snippet: "STRING_VALUE", - * }, - * ], - * references: [ // References - * { // Reference - * licenseName: "STRING_VALUE", - * repository: "STRING_VALUE", - * url: "STRING_VALUE", - * recommendationContentSpan: { // Span - * start: Number("int"), - * end: Number("int"), - * }, - * }, - * ], - * followupPrompt: { // FollowupPrompt - * content: "STRING_VALUE", // required - * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION", - * }, - * }, - * }, - * ], - * currentMessage: {// Union: only one key present - * userInputMessage: { - * content: "STRING_VALUE", // required - * userInputMessageContext: { - * editorState: { - * document: "", - * cursorState: {// Union: only one key present - * position: "", - * range: { - * start: "", // required - * end: "", // required - * }, - * }, - * relevantDocuments: [ - * { - * relativeFilePath: "STRING_VALUE", // required - * programmingLanguage: { - * languageName: "STRING_VALUE", // required - * }, - * text: "STRING_VALUE", - * documentSymbols: [ - * { - * name: "STRING_VALUE", // required - * type: "DECLARATION" || "USAGE", // required - * source: "STRING_VALUE", - * }, - * ], - * }, - * ], - * useRelevantDocuments: true || false, - * }, - * shellState: { - * shellName: "STRING_VALUE", // required - * shellHistory: [ - * { - * command: "STRING_VALUE", // required - * directory: "STRING_VALUE", - * exitCode: Number("int"), - * stdout: "STRING_VALUE", - * stderr: "STRING_VALUE", - * }, - * ], - * }, - * gitState: { - * status: "STRING_VALUE", - * }, - * envState: { - * operatingSystem: "STRING_VALUE", - * currentWorkingDirectory: "STRING_VALUE", - * environmentVariables: [ - * { - * key: "STRING_VALUE", - * value: "STRING_VALUE", - * }, - * ], - * }, - * appStudioContext: { - * namespace: "STRING_VALUE", // required - * propertyName: "STRING_VALUE", // required - * propertyValue: "STRING_VALUE", - * propertyContext: "STRING_VALUE", // required - * }, - * diagnostic: {// Union: only one key present - * textDocumentDiagnostic: { - * document: "", // required - * range: { - * start: "", // required - * end: "", // required - * }, - * source: "STRING_VALUE", // required - * severity: "ERROR" || "WARNING" || "INFORMATION" || "HINT", // required - * message: "STRING_VALUE", // required - * }, - * runtimeDiagnostic: { - * source: "STRING_VALUE", // required - * severity: "ERROR" || "WARNING" || "INFORMATION" || "HINT", // required - * message: "STRING_VALUE", // required - * }, - * }, - * consoleState: { - * region: "STRING_VALUE", - * consoleUrl: "STRING_VALUE", - * serviceId: "STRING_VALUE", - * serviceConsolePage: "STRING_VALUE", - * serviceSubconsolePage: "STRING_VALUE", - * taskName: "STRING_VALUE", - * }, - * userSettings: { - * hasConsentedToCrossRegionCalls: true || false, - * }, - * }, - * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION", - * }, - * assistantResponseMessage: { - * messageId: "STRING_VALUE", - * content: "STRING_VALUE", // required - * supplementaryWebLinks: [ - * { - * url: "STRING_VALUE", // required - * title: "STRING_VALUE", // required - * snippet: "STRING_VALUE", - * }, - * ], - * references: [ - * { - * licenseName: "STRING_VALUE", - * repository: "STRING_VALUE", - * url: "STRING_VALUE", - * recommendationContentSpan: { - * start: Number("int"), - * end: Number("int"), - * }, - * }, - * ], - * followupPrompt: { - * content: "STRING_VALUE", // required - * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION", - * }, - * }, - * }, - * chatTriggerType: "MANUAL" || "DIAGNOSTIC" || "INLINE_CHAT", // required - * customizationArn: "STRING_VALUE", - * }, - * workspaceState: { // WorkspaceState - * uploadId: "STRING_VALUE", // required - * programmingLanguage: "", // required - * contextTruncationScheme: "ANALYSIS" || "GUMBY", - * }, - * }; - * const command = new GenerateTaskAssistPlanCommand(input); - * const response = await client.send(command); - * // { // GenerateTaskAssistPlanResponse - * // planningResponseStream: { // ChatResponseStream Union: only one key present - * // messageMetadataEvent: { // MessageMetadataEvent - * // conversationId: "STRING_VALUE", - * // utteranceId: "STRING_VALUE", - * // }, - * // assistantResponseEvent: { // AssistantResponseEvent - * // content: "STRING_VALUE", // required - * // }, - * // dryRunSucceedEvent: {}, - * // codeReferenceEvent: { // CodeReferenceEvent - * // references: [ // References - * // { // Reference - * // licenseName: "STRING_VALUE", - * // repository: "STRING_VALUE", - * // url: "STRING_VALUE", - * // recommendationContentSpan: { // Span - * // start: Number("int"), - * // end: Number("int"), - * // }, - * // }, - * // ], - * // }, - * // supplementaryWebLinksEvent: { // SupplementaryWebLinksEvent - * // supplementaryWebLinks: [ // SupplementaryWebLinks - * // { // SupplementaryWebLink - * // url: "STRING_VALUE", // required - * // title: "STRING_VALUE", // required - * // snippet: "STRING_VALUE", - * // }, - * // ], - * // }, - * // followupPromptEvent: { // FollowupPromptEvent - * // followupPrompt: { // FollowupPrompt - * // content: "STRING_VALUE", // required - * // userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION", - * // }, - * // }, - * // codeEvent: { // CodeEvent - * // content: "STRING_VALUE", // required - * // }, - * // intentsEvent: { // IntentsEvent - * // intents: { // IntentMap - * // "": { // IntentData - * // "": { // IntentDataType Union: only one key present - * // string: "STRING_VALUE", - * // }, - * // }, - * // }, - * // }, - * // interactionComponentsEvent: { // InteractionComponentsEvent - * // interactionComponentEntries: [ // InteractionComponentEntryList // required - * // { // InteractionComponentEntry - * // interactionComponentId: "STRING_VALUE", - * // interactionComponent: { // InteractionComponent - * // text: { // Text - * // content: "STRING_VALUE", // required - * // }, - * // alert: { // Alert - * // type: "INFO" || "ERROR" || "WARNING", // required - * // content: [ // AlertComponentList // required - * // { // AlertComponent - * // text: { - * // content: "STRING_VALUE", // required - * // }, - * // }, - * // ], - * // }, - * // infrastructureUpdate: { // InfrastructureUpdate - * // transition: { // InfrastructureUpdateTransition - * // currentState: "STRING_VALUE", // required - * // nextState: "STRING_VALUE", // required - * // }, - * // }, - * // progress: { // Progress - * // content: [ // ProgressComponentList // required - * // { // ProgressComponent - * // step: { // Step - * // id: Number("int"), // required - * // state: "FAILED" || "SUCCEEDED" || "STOPPED" || "PENDING" || "IN_PROGRESS" || "LOADING" || "PAUSED", // required - * // label: "STRING_VALUE", // required - * // content: [ // StepComponentList - * // { // StepComponent - * // text: "", - * // }, - * // ], - * // }, - * // }, - * // ], - * // }, - * // step: { - * // id: Number("int"), // required - * // state: "FAILED" || "SUCCEEDED" || "STOPPED" || "PENDING" || "IN_PROGRESS" || "LOADING" || "PAUSED", // required - * // label: "STRING_VALUE", // required - * // content: [ - * // { - * // text: "", - * // }, - * // ], - * // }, - * // taskDetails: { // TaskDetails - * // overview: { // TaskOverview - * // label: "STRING_VALUE", // required - * // description: "STRING_VALUE", // required - * // }, - * // content: [ // TaskComponentList // required - * // { // TaskComponent - * // text: "", - * // infrastructureUpdate: { - * // transition: { - * // currentState: "STRING_VALUE", // required - * // nextState: "STRING_VALUE", // required - * // }, - * // }, - * // alert: { - * // type: "INFO" || "ERROR" || "WARNING", // required - * // content: [ // required - * // { - * // text: "", - * // }, - * // ], - * // }, - * // progress: { - * // content: [ // required - * // { - * // step: "", - * // }, - * // ], - * // }, - * // }, - * // ], - * // actions: [ // TaskActionList - * // { // TaskAction - * // label: "STRING_VALUE", // required - * // note: { // TaskActionNote - * // content: "STRING_VALUE", // required - * // type: "INFO" || "WARNING", - * // }, - * // primary: true || false, - * // disabled: true || false, - * // payload: { // TaskActionPayload // required - * // "": "STRING_VALUE", - * // }, - * // confirmation: { // TaskActionConfirmation - * // content: "STRING_VALUE", - * // }, - * // }, - * // ], - * // }, - * // taskReference: { // TaskReference - * // taskId: "STRING_VALUE", // required - * // }, - * // suggestions: { // Suggestions - * // items: [ // SuggestionList // required - * // { // Suggestion - * // value: "STRING_VALUE", // required - * // }, - * // ], - * // }, - * // section: { // Section - * // title: "STRING_VALUE", // required - * // content: [ // SectionComponentList // required - * // { // SectionComponent - * // text: "", - * // alert: { - * // type: "INFO" || "ERROR" || "WARNING", // required - * // content: [ // required - * // { - * // text: "", - * // }, - * // ], - * // }, - * // resource: { // Resource - * // title: "STRING_VALUE", // required - * // link: "STRING_VALUE", // required - * // description: "STRING_VALUE", // required - * // type: "STRING_VALUE", // required - * // ARN: "STRING_VALUE", // required - * // resourceJsonString: "STRING_VALUE", // required - * // }, - * // resourceList: { // ResourceList - * // action: { // Action - * // webLink: { // WebLink - * // label: "STRING_VALUE", // required - * // url: "STRING_VALUE", // required - * // }, - * // moduleLink: { // ModuleLink - * // cloudWatchTroubleshootingLink: { // CloudWatchTroubleshootingLink - * // label: "STRING_VALUE", // required - * // investigationPayload: "STRING_VALUE", // required - * // defaultText: "STRING_VALUE", - * // }, - * // }, - * // }, - * // items: [ // Resources // required - * // { - * // title: "STRING_VALUE", // required - * // link: "STRING_VALUE", // required - * // description: "STRING_VALUE", // required - * // type: "STRING_VALUE", // required - * // ARN: "STRING_VALUE", // required - * // resourceJsonString: "STRING_VALUE", // required - * // }, - * // ], - * // }, - * // }, - * // ], - * // action: { - * // webLink: { - * // label: "STRING_VALUE", // required - * // url: "STRING_VALUE", // required - * // }, - * // moduleLink: { - * // cloudWatchTroubleshootingLink: { - * // label: "STRING_VALUE", // required - * // investigationPayload: "STRING_VALUE", // required - * // defaultText: "STRING_VALUE", - * // }, - * // }, - * // }, - * // }, - * // resource: "", - * // resourceList: { - * // action: { - * // webLink: { - * // label: "STRING_VALUE", // required - * // url: "STRING_VALUE", // required - * // }, - * // moduleLink: { - * // cloudWatchTroubleshootingLink: { - * // label: "STRING_VALUE", // required - * // investigationPayload: "STRING_VALUE", // required - * // defaultText: "STRING_VALUE", - * // }, - * // }, - * // }, - * // items: [ // required - * // "", - * // ], - * // }, - * // action: "", - * // }, - * // }, - * // ], - * // }, - * // invalidStateEvent: { // InvalidStateEvent - * // reason: "INVALID_TASK_ASSIST_PLAN", // required - * // message: "STRING_VALUE", // required - * // }, - * // error: { // InternalServerException - * // message: "STRING_VALUE", // required - * // }, - * // }, - * // }; - * - * ``` - * - * @param GenerateTaskAssistPlanCommandInput - {@link GenerateTaskAssistPlanCommandInput} - * @returns {@link GenerateTaskAssistPlanCommandOutput} - * @see {@link GenerateTaskAssistPlanCommandInput} for command's `input` shape. - * @see {@link GenerateTaskAssistPlanCommandOutput} for command's `response` shape. - * @see {@link CodeWhispererStreamingClientResolvedConfig | config} for CodeWhispererStreamingClient's `config` shape. - * - * @throws {@link InternalServerException} (server fault) - * This exception is thrown when an unexpected error occurred during the processing of a request. - * - * @throws {@link ServiceQuotaExceededException} (client fault) - * This exception is thrown when request was denied due to caller exceeding their usage limits - * - * @throws {@link ThrottlingException} (client fault) - * This exception is thrown when request was denied due to request throttling. - * - * @throws {@link ValidationException} (client fault) - * This exception is thrown when the input fails to satisfy the constraints specified by the service. - * - * @throws {@link ConflictException} (client fault) - * This exception is thrown when the action to perform could not be completed because the resource is in a conflicting state. - * - * @throws {@link ResourceNotFoundException} (client fault) - * This exception is thrown when describing a resource that does not exist. - * - * @throws {@link AccessDeniedException} (client fault) - * This exception is thrown when the user does not have sufficient access to perform this action. - * - * @throws {@link CodeWhispererStreamingServiceException} - *

Base exception class for all service exceptions from CodeWhispererStreaming service.

- * - * @public - */ -export class GenerateTaskAssistPlanCommand extends $Command.classBuilder() - .m(function (this: any, Command: any, cs: any, config: CodeWhispererStreamingClientResolvedConfig, o: any) { - return [ - - getSerdePlugin(config, this.serialize, this.deserialize), - ]; - }) - .s("AmazonCodeWhispererStreamingService", "GenerateTaskAssistPlan", { - - /** - * @internal - */ - eventStream: { - output: true, - }, - }) - .n("CodeWhispererStreamingClient", "GenerateTaskAssistPlanCommand") - .f(GenerateTaskAssistPlanRequestFilterSensitiveLog, GenerateTaskAssistPlanResponseFilterSensitiveLog) - .ser(se_GenerateTaskAssistPlanCommand) - .de(de_GenerateTaskAssistPlanCommand) -.build() { -/** @internal type navigation helper, not in runtime. */ -declare protected static __types: { - api: { - input: GenerateTaskAssistPlanRequest; - output: GenerateTaskAssistPlanResponse; - }; - sdk: { - input: GenerateTaskAssistPlanCommandInput; - output: GenerateTaskAssistPlanCommandOutput; - }; -}; -} diff --git a/core/codewhisperer-streaming/src/commands/SendMessageCommand.ts b/core/codewhisperer-streaming/src/commands/SendMessageCommand.ts deleted file mode 100644 index 87d78c380..000000000 --- a/core/codewhisperer-streaming/src/commands/SendMessageCommand.ts +++ /dev/null @@ -1,666 +0,0 @@ -// smithy-typescript generated code -import { - CodeWhispererStreamingClientResolvedConfig, - ServiceInputTypes, - ServiceOutputTypes, -} from "../CodeWhispererStreamingClient"; -import { - SendMessageRequest, - SendMessageRequestFilterSensitiveLog, - SendMessageResponse, - SendMessageResponseFilterSensitiveLog, -} from "../models/models_0"; -import { - de_SendMessageCommand, - se_SendMessageCommand, -} from "../protocols/Aws_restJson1"; -import { getSerdePlugin } from "@smithy/middleware-serde"; -import { Command as $Command } from "@smithy/smithy-client"; -import { MetadataBearer as __MetadataBearer } from "@smithy/types"; - -/** - * @public - */ -export type { __MetadataBearer }; -export { $Command }; -/** - * @public - * - * The input for {@link SendMessageCommand}. - */ -export interface SendMessageCommandInput extends SendMessageRequest {} -/** - * @public - * - * The output of {@link SendMessageCommand}. - */ -export interface SendMessageCommandOutput extends SendMessageResponse, __MetadataBearer {} - -/** - * @public - * - * @example - * Use a bare-bones client and the command you need to make an API call. - * ```javascript - * import { CodeWhispererStreamingClient, SendMessageCommand } from "@amzn/codewhisperer-streaming"; // ES Modules import - * // const { CodeWhispererStreamingClient, SendMessageCommand } = require("@amzn/codewhisperer-streaming"); // CommonJS import - * const client = new CodeWhispererStreamingClient(config); - * const input = { // SendMessageRequest - * conversationState: { // ConversationState - * conversationId: "STRING_VALUE", - * history: [ // ChatHistory - * { // ChatMessage Union: only one key present - * userInputMessage: { // UserInputMessage - * content: "STRING_VALUE", // required - * userInputMessageContext: { // UserInputMessageContext - * editorState: { // EditorState - * document: { // TextDocument - * relativeFilePath: "STRING_VALUE", // required - * programmingLanguage: { // ProgrammingLanguage - * languageName: "STRING_VALUE", // required - * }, - * text: "STRING_VALUE", - * documentSymbols: [ // DocumentSymbols - * { // DocumentSymbol - * name: "STRING_VALUE", // required - * type: "DECLARATION" || "USAGE", // required - * source: "STRING_VALUE", - * }, - * ], - * }, - * cursorState: { // CursorState Union: only one key present - * position: { // Position - * line: Number("int"), // required - * character: Number("int"), // required - * }, - * range: { // Range - * start: { - * line: Number("int"), // required - * character: Number("int"), // required - * }, - * end: { - * line: Number("int"), // required - * character: Number("int"), // required - * }, - * }, - * }, - * relevantDocuments: [ // RelevantDocumentList - * { // RelevantTextDocument - * relativeFilePath: "STRING_VALUE", // required - * programmingLanguage: { - * languageName: "STRING_VALUE", // required - * }, - * text: "STRING_VALUE", - * documentSymbols: [ - * { - * name: "STRING_VALUE", // required - * type: "DECLARATION" || "USAGE", // required - * source: "STRING_VALUE", - * }, - * ], - * }, - * ], - * useRelevantDocuments: true || false, - * }, - * shellState: { // ShellState - * shellName: "STRING_VALUE", // required - * shellHistory: [ // ShellHistory - * { // ShellHistoryEntry - * command: "STRING_VALUE", // required - * directory: "STRING_VALUE", - * exitCode: Number("int"), - * stdout: "STRING_VALUE", - * stderr: "STRING_VALUE", - * }, - * ], - * }, - * gitState: { // GitState - * status: "STRING_VALUE", - * }, - * envState: { // EnvState - * operatingSystem: "STRING_VALUE", - * currentWorkingDirectory: "STRING_VALUE", - * environmentVariables: [ // EnvironmentVariables - * { // EnvironmentVariable - * key: "STRING_VALUE", - * value: "STRING_VALUE", - * }, - * ], - * }, - * appStudioContext: { // AppStudioState - * namespace: "STRING_VALUE", // required - * propertyName: "STRING_VALUE", // required - * propertyValue: "STRING_VALUE", - * propertyContext: "STRING_VALUE", // required - * }, - * diagnostic: { // Diagnostic Union: only one key present - * textDocumentDiagnostic: { // TextDocumentDiagnostic - * document: { - * relativeFilePath: "STRING_VALUE", // required - * programmingLanguage: { - * languageName: "STRING_VALUE", // required - * }, - * text: "STRING_VALUE", - * documentSymbols: [ - * { - * name: "STRING_VALUE", // required - * type: "DECLARATION" || "USAGE", // required - * source: "STRING_VALUE", - * }, - * ], - * }, - * range: { - * start: { - * line: Number("int"), // required - * character: Number("int"), // required - * }, - * end: { - * line: Number("int"), // required - * character: Number("int"), // required - * }, - * }, - * source: "STRING_VALUE", // required - * severity: "ERROR" || "WARNING" || "INFORMATION" || "HINT", // required - * message: "STRING_VALUE", // required - * }, - * runtimeDiagnostic: { // RuntimeDiagnostic - * source: "STRING_VALUE", // required - * severity: "ERROR" || "WARNING" || "INFORMATION" || "HINT", // required - * message: "STRING_VALUE", // required - * }, - * }, - * consoleState: { // ConsoleState - * region: "STRING_VALUE", - * consoleUrl: "STRING_VALUE", - * serviceId: "STRING_VALUE", - * serviceConsolePage: "STRING_VALUE", - * serviceSubconsolePage: "STRING_VALUE", - * taskName: "STRING_VALUE", - * }, - * userSettings: { // UserSettings - * hasConsentedToCrossRegionCalls: true || false, - * }, - * }, - * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION", - * }, - * assistantResponseMessage: { // AssistantResponseMessage - * messageId: "STRING_VALUE", - * content: "STRING_VALUE", // required - * supplementaryWebLinks: [ // SupplementaryWebLinks - * { // SupplementaryWebLink - * url: "STRING_VALUE", // required - * title: "STRING_VALUE", // required - * snippet: "STRING_VALUE", - * }, - * ], - * references: [ // References - * { // Reference - * licenseName: "STRING_VALUE", - * repository: "STRING_VALUE", - * url: "STRING_VALUE", - * recommendationContentSpan: { // Span - * start: Number("int"), - * end: Number("int"), - * }, - * }, - * ], - * followupPrompt: { // FollowupPrompt - * content: "STRING_VALUE", // required - * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION", - * }, - * }, - * }, - * ], - * currentMessage: {// Union: only one key present - * userInputMessage: { - * content: "STRING_VALUE", // required - * userInputMessageContext: { - * editorState: { - * document: "", - * cursorState: {// Union: only one key present - * position: "", - * range: { - * start: "", // required - * end: "", // required - * }, - * }, - * relevantDocuments: [ - * { - * relativeFilePath: "STRING_VALUE", // required - * programmingLanguage: { - * languageName: "STRING_VALUE", // required - * }, - * text: "STRING_VALUE", - * documentSymbols: [ - * { - * name: "STRING_VALUE", // required - * type: "DECLARATION" || "USAGE", // required - * source: "STRING_VALUE", - * }, - * ], - * }, - * ], - * useRelevantDocuments: true || false, - * }, - * shellState: { - * shellName: "STRING_VALUE", // required - * shellHistory: [ - * { - * command: "STRING_VALUE", // required - * directory: "STRING_VALUE", - * exitCode: Number("int"), - * stdout: "STRING_VALUE", - * stderr: "STRING_VALUE", - * }, - * ], - * }, - * gitState: { - * status: "STRING_VALUE", - * }, - * envState: { - * operatingSystem: "STRING_VALUE", - * currentWorkingDirectory: "STRING_VALUE", - * environmentVariables: [ - * { - * key: "STRING_VALUE", - * value: "STRING_VALUE", - * }, - * ], - * }, - * appStudioContext: { - * namespace: "STRING_VALUE", // required - * propertyName: "STRING_VALUE", // required - * propertyValue: "STRING_VALUE", - * propertyContext: "STRING_VALUE", // required - * }, - * diagnostic: {// Union: only one key present - * textDocumentDiagnostic: { - * document: "", // required - * range: { - * start: "", // required - * end: "", // required - * }, - * source: "STRING_VALUE", // required - * severity: "ERROR" || "WARNING" || "INFORMATION" || "HINT", // required - * message: "STRING_VALUE", // required - * }, - * runtimeDiagnostic: { - * source: "STRING_VALUE", // required - * severity: "ERROR" || "WARNING" || "INFORMATION" || "HINT", // required - * message: "STRING_VALUE", // required - * }, - * }, - * consoleState: { - * region: "STRING_VALUE", - * consoleUrl: "STRING_VALUE", - * serviceId: "STRING_VALUE", - * serviceConsolePage: "STRING_VALUE", - * serviceSubconsolePage: "STRING_VALUE", - * taskName: "STRING_VALUE", - * }, - * userSettings: { - * hasConsentedToCrossRegionCalls: true || false, - * }, - * }, - * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION", - * }, - * assistantResponseMessage: { - * messageId: "STRING_VALUE", - * content: "STRING_VALUE", // required - * supplementaryWebLinks: [ - * { - * url: "STRING_VALUE", // required - * title: "STRING_VALUE", // required - * snippet: "STRING_VALUE", - * }, - * ], - * references: [ - * { - * licenseName: "STRING_VALUE", - * repository: "STRING_VALUE", - * url: "STRING_VALUE", - * recommendationContentSpan: { - * start: Number("int"), - * end: Number("int"), - * }, - * }, - * ], - * followupPrompt: { - * content: "STRING_VALUE", // required - * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION", - * }, - * }, - * }, - * chatTriggerType: "MANUAL" || "DIAGNOSTIC" || "INLINE_CHAT", // required - * customizationArn: "STRING_VALUE", - * }, - * profileArn: "STRING_VALUE", - * source: "STRING_VALUE", - * dryRun: true || false, - * }; - * const command = new SendMessageCommand(input); - * const response = await client.send(command); - * // { // SendMessageResponse - * // sendMessageResponse: { // ChatResponseStream Union: only one key present - * // messageMetadataEvent: { // MessageMetadataEvent - * // conversationId: "STRING_VALUE", - * // utteranceId: "STRING_VALUE", - * // }, - * // assistantResponseEvent: { // AssistantResponseEvent - * // content: "STRING_VALUE", // required - * // }, - * // dryRunSucceedEvent: {}, - * // codeReferenceEvent: { // CodeReferenceEvent - * // references: [ // References - * // { // Reference - * // licenseName: "STRING_VALUE", - * // repository: "STRING_VALUE", - * // url: "STRING_VALUE", - * // recommendationContentSpan: { // Span - * // start: Number("int"), - * // end: Number("int"), - * // }, - * // }, - * // ], - * // }, - * // supplementaryWebLinksEvent: { // SupplementaryWebLinksEvent - * // supplementaryWebLinks: [ // SupplementaryWebLinks - * // { // SupplementaryWebLink - * // url: "STRING_VALUE", // required - * // title: "STRING_VALUE", // required - * // snippet: "STRING_VALUE", - * // }, - * // ], - * // }, - * // followupPromptEvent: { // FollowupPromptEvent - * // followupPrompt: { // FollowupPrompt - * // content: "STRING_VALUE", // required - * // userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION", - * // }, - * // }, - * // codeEvent: { // CodeEvent - * // content: "STRING_VALUE", // required - * // }, - * // intentsEvent: { // IntentsEvent - * // intents: { // IntentMap - * // "": { // IntentData - * // "": { // IntentDataType Union: only one key present - * // string: "STRING_VALUE", - * // }, - * // }, - * // }, - * // }, - * // interactionComponentsEvent: { // InteractionComponentsEvent - * // interactionComponentEntries: [ // InteractionComponentEntryList // required - * // { // InteractionComponentEntry - * // interactionComponentId: "STRING_VALUE", - * // interactionComponent: { // InteractionComponent - * // text: { // Text - * // content: "STRING_VALUE", // required - * // }, - * // alert: { // Alert - * // type: "INFO" || "ERROR" || "WARNING", // required - * // content: [ // AlertComponentList // required - * // { // AlertComponent - * // text: { - * // content: "STRING_VALUE", // required - * // }, - * // }, - * // ], - * // }, - * // infrastructureUpdate: { // InfrastructureUpdate - * // transition: { // InfrastructureUpdateTransition - * // currentState: "STRING_VALUE", // required - * // nextState: "STRING_VALUE", // required - * // }, - * // }, - * // progress: { // Progress - * // content: [ // ProgressComponentList // required - * // { // ProgressComponent - * // step: { // Step - * // id: Number("int"), // required - * // state: "FAILED" || "SUCCEEDED" || "STOPPED" || "PENDING" || "IN_PROGRESS" || "LOADING" || "PAUSED", // required - * // label: "STRING_VALUE", // required - * // content: [ // StepComponentList - * // { // StepComponent - * // text: "", - * // }, - * // ], - * // }, - * // }, - * // ], - * // }, - * // step: { - * // id: Number("int"), // required - * // state: "FAILED" || "SUCCEEDED" || "STOPPED" || "PENDING" || "IN_PROGRESS" || "LOADING" || "PAUSED", // required - * // label: "STRING_VALUE", // required - * // content: [ - * // { - * // text: "", - * // }, - * // ], - * // }, - * // taskDetails: { // TaskDetails - * // overview: { // TaskOverview - * // label: "STRING_VALUE", // required - * // description: "STRING_VALUE", // required - * // }, - * // content: [ // TaskComponentList // required - * // { // TaskComponent - * // text: "", - * // infrastructureUpdate: { - * // transition: { - * // currentState: "STRING_VALUE", // required - * // nextState: "STRING_VALUE", // required - * // }, - * // }, - * // alert: { - * // type: "INFO" || "ERROR" || "WARNING", // required - * // content: [ // required - * // { - * // text: "", - * // }, - * // ], - * // }, - * // progress: { - * // content: [ // required - * // { - * // step: "", - * // }, - * // ], - * // }, - * // }, - * // ], - * // actions: [ // TaskActionList - * // { // TaskAction - * // label: "STRING_VALUE", // required - * // note: { // TaskActionNote - * // content: "STRING_VALUE", // required - * // type: "INFO" || "WARNING", - * // }, - * // primary: true || false, - * // disabled: true || false, - * // payload: { // TaskActionPayload // required - * // "": "STRING_VALUE", - * // }, - * // confirmation: { // TaskActionConfirmation - * // content: "STRING_VALUE", - * // }, - * // }, - * // ], - * // }, - * // taskReference: { // TaskReference - * // taskId: "STRING_VALUE", // required - * // }, - * // suggestions: { // Suggestions - * // items: [ // SuggestionList // required - * // { // Suggestion - * // value: "STRING_VALUE", // required - * // }, - * // ], - * // }, - * // section: { // Section - * // title: "STRING_VALUE", // required - * // content: [ // SectionComponentList // required - * // { // SectionComponent - * // text: "", - * // alert: { - * // type: "INFO" || "ERROR" || "WARNING", // required - * // content: [ // required - * // { - * // text: "", - * // }, - * // ], - * // }, - * // resource: { // Resource - * // title: "STRING_VALUE", // required - * // link: "STRING_VALUE", // required - * // description: "STRING_VALUE", // required - * // type: "STRING_VALUE", // required - * // ARN: "STRING_VALUE", // required - * // resourceJsonString: "STRING_VALUE", // required - * // }, - * // resourceList: { // ResourceList - * // action: { // Action - * // webLink: { // WebLink - * // label: "STRING_VALUE", // required - * // url: "STRING_VALUE", // required - * // }, - * // moduleLink: { // ModuleLink - * // cloudWatchTroubleshootingLink: { // CloudWatchTroubleshootingLink - * // label: "STRING_VALUE", // required - * // investigationPayload: "STRING_VALUE", // required - * // defaultText: "STRING_VALUE", - * // }, - * // }, - * // }, - * // items: [ // Resources // required - * // { - * // title: "STRING_VALUE", // required - * // link: "STRING_VALUE", // required - * // description: "STRING_VALUE", // required - * // type: "STRING_VALUE", // required - * // ARN: "STRING_VALUE", // required - * // resourceJsonString: "STRING_VALUE", // required - * // }, - * // ], - * // }, - * // }, - * // ], - * // action: { - * // webLink: { - * // label: "STRING_VALUE", // required - * // url: "STRING_VALUE", // required - * // }, - * // moduleLink: { - * // cloudWatchTroubleshootingLink: { - * // label: "STRING_VALUE", // required - * // investigationPayload: "STRING_VALUE", // required - * // defaultText: "STRING_VALUE", - * // }, - * // }, - * // }, - * // }, - * // resource: "", - * // resourceList: { - * // action: { - * // webLink: { - * // label: "STRING_VALUE", // required - * // url: "STRING_VALUE", // required - * // }, - * // moduleLink: { - * // cloudWatchTroubleshootingLink: { - * // label: "STRING_VALUE", // required - * // investigationPayload: "STRING_VALUE", // required - * // defaultText: "STRING_VALUE", - * // }, - * // }, - * // }, - * // items: [ // required - * // "", - * // ], - * // }, - * // action: "", - * // }, - * // }, - * // ], - * // }, - * // invalidStateEvent: { // InvalidStateEvent - * // reason: "INVALID_TASK_ASSIST_PLAN", // required - * // message: "STRING_VALUE", // required - * // }, - * // error: { // InternalServerException - * // message: "STRING_VALUE", // required - * // }, - * // }, - * // }; - * - * ``` - * - * @param SendMessageCommandInput - {@link SendMessageCommandInput} - * @returns {@link SendMessageCommandOutput} - * @see {@link SendMessageCommandInput} for command's `input` shape. - * @see {@link SendMessageCommandOutput} for command's `response` shape. - * @see {@link CodeWhispererStreamingClientResolvedConfig | config} for CodeWhispererStreamingClient's `config` shape. - * - * @throws {@link InternalServerException} (server fault) - * This exception is thrown when an unexpected error occurred during the processing of a request. - * - * @throws {@link ServiceQuotaExceededException} (client fault) - * This exception is thrown when request was denied due to caller exceeding their usage limits - * - * @throws {@link DryRunOperationException} (client fault) - * This exception is translated to a 204 as it succeeded the IAM Auth. - * - * @throws {@link ThrottlingException} (client fault) - * This exception is thrown when request was denied due to request throttling. - * - * @throws {@link ValidationException} (client fault) - * This exception is thrown when the input fails to satisfy the constraints specified by the service. - * - * @throws {@link ConflictException} (client fault) - * This exception is thrown when the action to perform could not be completed because the resource is in a conflicting state. - * - * @throws {@link ResourceNotFoundException} (client fault) - * This exception is thrown when describing a resource that does not exist. - * - * @throws {@link AccessDeniedException} (client fault) - * This exception is thrown when the user does not have sufficient access to perform this action. - * - * @throws {@link CodeWhispererStreamingServiceException} - *

Base exception class for all service exceptions from CodeWhispererStreaming service.

- * - */ -export class SendMessageCommand extends $Command.classBuilder() - .m(function (this: any, Command: any, cs: any, config: CodeWhispererStreamingClientResolvedConfig, o: any) { - return [ - - getSerdePlugin(config, this.serialize, this.deserialize), - ]; - }) - .s("AmazonCodeWhispererStreamingService", "SendMessage", { - - /** - * @internal - */ - eventStream: { - output: true, - }, - }) - .n("CodeWhispererStreamingClient", "SendMessageCommand") - .f(SendMessageRequestFilterSensitiveLog, SendMessageResponseFilterSensitiveLog) - .ser(se_SendMessageCommand) - .de(de_SendMessageCommand) -.build() { -/** @internal type navigation helper, not in runtime. */ -declare protected static __types: { - api: { - input: SendMessageRequest; - output: SendMessageResponse; - }; - sdk: { - input: SendMessageCommandInput; - output: SendMessageCommandOutput; - }; -}; -} diff --git a/core/codewhisperer-streaming/src/commands/index.ts b/core/codewhisperer-streaming/src/commands/index.ts deleted file mode 100644 index d129f0976..000000000 --- a/core/codewhisperer-streaming/src/commands/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -// smithy-typescript generated code -export * from "./ExportResultArchiveCommand"; -export * from "./GenerateAssistantResponseCommand"; -export * from "./GenerateTaskAssistPlanCommand"; -export * from "./SendMessageCommand"; diff --git a/core/codewhisperer-streaming/src/endpoints.ts b/core/codewhisperer-streaming/src/endpoints.ts deleted file mode 100644 index 1bcae7151..000000000 --- a/core/codewhisperer-streaming/src/endpoints.ts +++ /dev/null @@ -1,224 +0,0 @@ -// smithy-typescript generated code -import { - RegionInfoProvider, - RegionInfoProviderOptions, -} from "@aws-sdk/types"; -import { - PartitionHash, - RegionHash, - getRegionInfo, -} from "@smithy/config-resolver"; - -const regionHash: RegionHash = { -}; - -const partitionHash: PartitionHash = { - "aws": { - regions: [ - "af-south-1", - "ap-east-1", - "ap-northeast-1", - "ap-northeast-2", - "ap-northeast-3", - "ap-south-1", - "ap-south-2", - "ap-southeast-1", - "ap-southeast-2", - "ap-southeast-3", - "ap-southeast-4", - "ap-southeast-5", - "ca-central-1", - "ca-west-1", - "eu-central-1", - "eu-central-2", - "eu-north-1", - "eu-south-1", - "eu-south-2", - "eu-west-1", - "eu-west-2", - "eu-west-3", - "il-central-1", - "me-central-1", - "me-south-1", - "sa-east-1", - "us-east-1", - "us-east-2", - "us-west-1", - "us-west-2", - ], - regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", - variants: [ - { - "hostname": "amazoncodewhispererstreamingservice.{region}.amazonaws.com", - "tags": [] - }, - { - "hostname": "amazoncodewhispererstreamingservice-fips.{region}.amazonaws.com", - "tags": [ - "fips" - ] - }, - { - "hostname": "amazoncodewhispererstreamingservice-fips.{region}.api.aws", - "tags": [ - "dualstack", - "fips" - ] - }, - { - "hostname": "amazoncodewhispererstreamingservice.{region}.api.aws", - "tags": [ - "dualstack" - ] - } - ], - }, - "aws-cn": { - regions: [ - "cn-north-1", - "cn-northwest-1", - ], - regionRegex: "^cn\\-\\w+\\-\\d+$", - variants: [ - { - "hostname": "amazoncodewhispererstreamingservice.{region}.amazonaws.com.cn", - "tags": [] - }, - { - "hostname": "amazoncodewhispererstreamingservice-fips.{region}.amazonaws.com.cn", - "tags": [ - "fips" - ] - }, - { - "hostname": "amazoncodewhispererstreamingservice-fips.{region}.api.amazonwebservices.com.cn", - "tags": [ - "dualstack", - "fips" - ] - }, - { - "hostname": "amazoncodewhispererstreamingservice.{region}.api.amazonwebservices.com.cn", - "tags": [ - "dualstack" - ] - } - ], - }, - "aws-iso": { - regions: [ - "us-iso-east-1", - "us-iso-west-1", - ], - regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", - variants: [ - { - "hostname": "amazoncodewhispererstreamingservice.{region}.c2s.ic.gov", - "tags": [] - }, - { - "hostname": "amazoncodewhispererstreamingservice-fips.{region}.c2s.ic.gov", - "tags": [ - "fips" - ] - } - ], - }, - "aws-iso-b": { - regions: [ - "us-isob-east-1", - ], - regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", - variants: [ - { - "hostname": "amazoncodewhispererstreamingservice.{region}.sc2s.sgov.gov", - "tags": [] - }, - { - "hostname": "amazoncodewhispererstreamingservice-fips.{region}.sc2s.sgov.gov", - "tags": [ - "fips" - ] - } - ], - }, - "aws-iso-e": { - regions: [ - "eu-isoe-west-1", - ], - regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", - variants: [ - { - "hostname": "amazoncodewhispererstreamingservice.{region}.cloud.adc-e.uk", - "tags": [] - }, - { - "hostname": "amazoncodewhispererstreamingservice-fips.{region}.cloud.adc-e.uk", - "tags": [ - "fips" - ] - } - ], - }, - "aws-iso-f": { - regions: [ - ], - regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", - variants: [ - { - "hostname": "amazoncodewhispererstreamingservice.{region}.csp.hci.ic.gov", - "tags": [] - }, - { - "hostname": "amazoncodewhispererstreamingservice-fips.{region}.csp.hci.ic.gov", - "tags": [ - "fips" - ] - } - ], - }, - "aws-us-gov": { - regions: [ - "us-gov-east-1", - "us-gov-west-1", - ], - regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", - variants: [ - { - "hostname": "amazoncodewhispererstreamingservice.{region}.amazonaws.com", - "tags": [] - }, - { - "hostname": "amazoncodewhispererstreamingservice-fips.{region}.amazonaws.com", - "tags": [ - "fips" - ] - }, - { - "hostname": "amazoncodewhispererstreamingservice-fips.{region}.api.aws", - "tags": [ - "dualstack", - "fips" - ] - }, - { - "hostname": "amazoncodewhispererstreamingservice.{region}.api.aws", - "tags": [ - "dualstack" - ] - } - ], - }, -}; - -export const defaultRegionInfoProvider: RegionInfoProvider = async ( - region: string, - options?: RegionInfoProviderOptions -) => - getRegionInfo(region, { - ...options, - signingService: "amazoncodewhispererstreamingservice", - regionHash, - partitionHash, - }) -; diff --git a/core/codewhisperer-streaming/src/extensionConfiguration.ts b/core/codewhisperer-streaming/src/extensionConfiguration.ts deleted file mode 100644 index 99cf43fdd..000000000 --- a/core/codewhisperer-streaming/src/extensionConfiguration.ts +++ /dev/null @@ -1,10 +0,0 @@ -// smithy-typescript generated code -import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration"; -import { AwsRegionExtensionConfiguration } from "@aws-sdk/types"; -import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http"; -import { DefaultExtensionConfiguration } from "@smithy/types"; - -/** - * @internal - */ -export interface CodeWhispererStreamingExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration, HttpAuthExtensionConfiguration {} diff --git a/core/codewhisperer-streaming/src/index.ts b/core/codewhisperer-streaming/src/index.ts deleted file mode 100644 index 99403eb1a..000000000 --- a/core/codewhisperer-streaming/src/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -// smithy-typescript generated code -/* eslint-disable */ -export * from "./CodeWhispererStreamingClient"; -export * from "./CodeWhispererStreaming"; -export type { RuntimeExtension } from "./runtimeExtensions"; -export type { CodeWhispererStreamingExtensionConfiguration } from "./extensionConfiguration"; -export * from "./commands"; -export * from "./models"; - -export { CodeWhispererStreamingServiceException } from "./models/CodeWhispererStreamingServiceException"; diff --git a/core/codewhisperer-streaming/src/models/CodeWhispererStreamingServiceException.ts b/core/codewhisperer-streaming/src/models/CodeWhispererStreamingServiceException.ts deleted file mode 100644 index 242c89f66..000000000 --- a/core/codewhisperer-streaming/src/models/CodeWhispererStreamingServiceException.ts +++ /dev/null @@ -1,24 +0,0 @@ -// smithy-typescript generated code -import { - ServiceException as __ServiceException, - ServiceExceptionOptions as __ServiceExceptionOptions, -} from "@smithy/smithy-client"; - -export type { __ServiceExceptionOptions } - -export { __ServiceException } - -/** - * @public - * - * Base exception class for all service exceptions from CodeWhispererStreaming service. - */ -export class CodeWhispererStreamingServiceException extends __ServiceException { - /** - * @internal - */ - constructor(options: __ServiceExceptionOptions) { - super(options); - Object.setPrototypeOf(this, CodeWhispererStreamingServiceException.prototype); - } -} diff --git a/core/codewhisperer-streaming/src/models/index.ts b/core/codewhisperer-streaming/src/models/index.ts deleted file mode 100644 index 9eaceb128..000000000 --- a/core/codewhisperer-streaming/src/models/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -// smithy-typescript generated code -export * from "./models_0"; diff --git a/core/codewhisperer-streaming/src/models/models_0.ts b/core/codewhisperer-streaming/src/models/models_0.ts deleted file mode 100644 index 67bfed78c..000000000 --- a/core/codewhisperer-streaming/src/models/models_0.ts +++ /dev/null @@ -1,3597 +0,0 @@ -// smithy-typescript generated code -import { CodeWhispererStreamingServiceException as __BaseException } from "./CodeWhispererStreamingServiceException"; -import { - SENSITIVE_STRING, - ExceptionOptionType as __ExceptionOptionType, -} from "@smithy/smithy-client"; - -/** - * @public - * @enum - */ -export const AccessDeniedExceptionReason = { - UNAUTHORIZED_CUSTOMIZATION_RESOURCE_ACCESS: "UNAUTHORIZED_CUSTOMIZATION_RESOURCE_ACCESS", -} as const -/** - * @public - */ -export type AccessDeniedExceptionReason = typeof AccessDeniedExceptionReason[keyof typeof AccessDeniedExceptionReason] - -/** - * This exception is thrown when the user does not have sufficient access to perform this action. - * @public - */ -export class AccessDeniedException extends __BaseException { - readonly name: "AccessDeniedException" = "AccessDeniedException"; - readonly $fault: "client" = "client"; - /** - * Reason for AccessDeniedException - * @public - */ - reason?: AccessDeniedExceptionReason; - - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "AccessDeniedException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, AccessDeniedException.prototype); - this.reason = opts.reason; - } -} - -/** - * This exception is thrown when an unexpected error occurred during the processing of a request. - * @public - */ -export class InternalServerException extends __BaseException { - readonly name: "InternalServerException" = "InternalServerException"; - readonly $fault: "server" = "server"; - $retryable = { - }; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "InternalServerException", - $fault: "server", - ...opts - }); - Object.setPrototypeOf(this, InternalServerException.prototype); - } -} - -/** - * This exception is thrown when describing a resource that does not exist. - * @public - */ -export class ResourceNotFoundException extends __BaseException { - readonly name: "ResourceNotFoundException" = "ResourceNotFoundException"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "ResourceNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, ResourceNotFoundException.prototype); - } -} - -/** - * This exception is thrown when request was denied due to request throttling. - * @public - */ -export class ThrottlingException extends __BaseException { - readonly name: "ThrottlingException" = "ThrottlingException"; - readonly $fault: "client" = "client"; - $retryable = { - throttling: true, - }; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "ThrottlingException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, ThrottlingException.prototype); - } -} - -/** - * @public - * @enum - */ -export const ValidationExceptionReason = { - CONTENT_LENGTH_EXCEEDS_THRESHOLD: "CONTENT_LENGTH_EXCEEDS_THRESHOLD", - INVALID_CONVERSATION_ID: "INVALID_CONVERSATION_ID", - INVALID_KMS_GRANT: "INVALID_KMS_GRANT", -} as const -/** - * @public - */ -export type ValidationExceptionReason = typeof ValidationExceptionReason[keyof typeof ValidationExceptionReason] - -/** - * This exception is thrown when the input fails to satisfy the constraints specified by the service. - * @public - */ -export class ValidationException extends __BaseException { - readonly name: "ValidationException" = "ValidationException"; - readonly $fault: "client" = "client"; - /** - * Reason for ValidationException - * @public - */ - reason?: ValidationExceptionReason; - - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "ValidationException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, ValidationException.prototype); - this.reason = opts.reason; - } -} - -/** - * Description of a user's context when they are calling Q Chat from AppStudio - * @public - */ -export interface AppStudioState { - /** - * The namespace of the context. Examples: 'ui.Button', 'ui.Table.DataSource', 'ui.Table.RowActions.Button', 'logic.invokeAWS', 'logic.JavaScript' - * @public - */ - namespace: string | undefined; - - /** - * The name of the property. Examples: 'visibility', 'disability', 'value', 'code' - * @public - */ - propertyName: string | undefined; - - /** - * The value of the property. - * @public - */ - propertyValue?: string; - - /** - * Context about how the property is used - * @public - */ - propertyContext: string | undefined; -} - -/** - * @internal - */ -export const AppStudioStateFilterSensitiveLog = (obj: AppStudioState): any => ({ - ...obj, - ...(obj.namespace && { namespace: - SENSITIVE_STRING - }), - ...(obj.propertyName && { propertyName: - SENSITIVE_STRING - }), - ...(obj.propertyValue && { propertyValue: - SENSITIVE_STRING - }), - ...(obj.propertyContext && { propertyContext: - SENSITIVE_STRING - }), -}) - -/** - * Streaming Response Event for Assistant Markdown text message. - * @public - */ -export interface AssistantResponseEvent { - /** - * The content of the text message in markdown format. - * @public - */ - content: string | undefined; -} - -/** - * @internal - */ -export const AssistantResponseEventFilterSensitiveLog = (obj: AssistantResponseEvent): any => ({ - ...obj, - ...(obj.content && { content: - SENSITIVE_STRING - }), -}) - -/** - * @public - * @enum - */ -export const UserIntent = { - /** - * Apply Common Best Practices - */ - APPLY_COMMON_BEST_PRACTICES: "APPLY_COMMON_BEST_PRACTICES", - /** - * Cite Sources - */ - CITE_SOURCES: "CITE_SOURCES", - /** - * generate code - */ - CODE_GENERATION: "CODE_GENERATION", - /** - * Explain Code Selection - */ - EXPLAIN_CODE_SELECTION: "EXPLAIN_CODE_SELECTION", - /** - * Explain Code Line By Line - */ - EXPLAIN_LINE_BY_LINE: "EXPLAIN_LINE_BY_LINE", - /** - * Generate CloudFormation Template - */ - GENERATE_CLOUDFORMATION_TEMPLATE: "GENERATE_CLOUDFORMATION_TEMPLATE", - /** - * Generate Unit Tests - */ - GENERATE_UNIT_TESTS: "GENERATE_UNIT_TESTS", - /** - * Improve Code - */ - IMPROVE_CODE: "IMPROVE_CODE", - /** - * Show More Examples - */ - SHOW_EXAMPLES: "SHOW_EXAMPLES", - /** - * Suggest Alternative Implementation - */ - SUGGEST_ALTERNATE_IMPLEMENTATION: "SUGGEST_ALTERNATE_IMPLEMENTATION", -} as const -/** - * @public - */ -export type UserIntent = typeof UserIntent[keyof typeof UserIntent] - -/** - * Followup Prompt for the Assistant Response - * @public - */ -export interface FollowupPrompt { - /** - * The content of the text message in markdown format. - * @public - */ - content: string | undefined; - - /** - * User Intent - * @public - */ - userIntent?: UserIntent; -} - -/** - * @internal - */ -export const FollowupPromptFilterSensitiveLog = (obj: FollowupPrompt): any => ({ - ...obj, - ...(obj.content && { content: - SENSITIVE_STRING - }), -}) - -/** - * Represents span in a text - * @public - */ -export interface Span { - start?: number; - end?: number; -} - -/** - * Code Reference / Repository details - * @public - */ -export interface Reference { - /** - * License name - * @public - */ - licenseName?: string; - - /** - * Code Repsitory for the associated reference - * @public - */ - repository?: string; - - /** - * Respository URL - * @public - */ - url?: string; - - /** - * Span / Range for the Reference - * @public - */ - recommendationContentSpan?: Span; -} - -/** - * Represents an additional reference link retured with the Chat message - * @public - */ -export interface SupplementaryWebLink { - /** - * URL of the web reference link - * @public - */ - url: string | undefined; - - /** - * Title of the web reference link - * @public - */ - title: string | undefined; - - /** - * Relevant text snippet from the link - * @public - */ - snippet?: string; -} - -/** - * @internal - */ -export const SupplementaryWebLinkFilterSensitiveLog = (obj: SupplementaryWebLink): any => ({ - ...obj, - ...(obj.url && { url: - SENSITIVE_STRING - }), - ...(obj.title && { title: - SENSITIVE_STRING - }), - ...(obj.snippet && { snippet: - SENSITIVE_STRING - }), -}) - -/** - * Markdown text message. - * @public - */ -export interface AssistantResponseMessage { - /** - * Unique identifier for the chat message - * @public - */ - messageId?: string; - - /** - * The content of the text message in markdown format. - * @public - */ - content: string | undefined; - - /** - * Web References - * @public - */ - supplementaryWebLinks?: (SupplementaryWebLink)[]; - - /** - * Code References - * @public - */ - references?: (Reference)[]; - - /** - * Followup Prompt - * @public - */ - followupPrompt?: FollowupPrompt; -} - -/** - * @internal - */ -export const AssistantResponseMessageFilterSensitiveLog = (obj: AssistantResponseMessage): any => ({ - ...obj, - ...(obj.content && { content: - SENSITIVE_STRING - }), - ...(obj.supplementaryWebLinks && { supplementaryWebLinks: - obj.supplementaryWebLinks.map( - item => - SupplementaryWebLinkFilterSensitiveLog(item) - ) - }), - ...(obj.followupPrompt && { followupPrompt: - FollowupPromptFilterSensitiveLog(obj.followupPrompt) - }), -}) - -/** - * @public - * @enum - */ -export const ConflictExceptionReason = { - CUSTOMER_KMS_KEY_DISABLED: "CUSTOMER_KMS_KEY_DISABLED", - CUSTOMER_KMS_KEY_INVALID_KEY_POLICY: "CUSTOMER_KMS_KEY_INVALID_KEY_POLICY", - MISMATCHED_KMS_KEY: "MISMATCHED_KMS_KEY", -} as const -/** - * @public - */ -export type ConflictExceptionReason = typeof ConflictExceptionReason[keyof typeof ConflictExceptionReason] - -/** - * This exception is thrown when the action to perform could not be completed because the resource is in a conflicting state. - * @public - */ -export class ConflictException extends __BaseException { - readonly name: "ConflictException" = "ConflictException"; - readonly $fault: "client" = "client"; - /** - * Reason for ConflictException - * @public - */ - reason?: ConflictExceptionReason; - - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "ConflictException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, ConflictException.prototype); - this.reason = opts.reason; - } -} - -/** - * Programming Languages supported by CodeWhisperer - * @public - */ -export interface ProgrammingLanguage { - languageName: string | undefined; -} - -/** - * @public - * @enum - */ -export const ContentChecksumType = { - SHA_256: "SHA_256", -} as const -/** - * @public - */ -export type ContentChecksumType = typeof ContentChecksumType[keyof typeof ContentChecksumType] - -/** - * Payload Part - * @public - */ -export interface BinaryMetadataEvent { - /** - * Content length of the binary payload - * @public - */ - size?: number; - - /** - * Content type of the response - * @public - */ - mimeType?: string; - - /** - * Content checksum of the binary payload - * @public - */ - contentChecksum?: string; - - /** - * Content checksum type of the binary payload - * @public - */ - contentChecksumType?: ContentChecksumType; -} - -/** - * @internal - */ -export const BinaryMetadataEventFilterSensitiveLog = (obj: BinaryMetadataEvent): any => ({ - ...obj, -}) - -/** - * Payload Part - * @public - */ -export interface BinaryPayloadEvent { - /** - * Payload Part's body - * @public - */ - bytes?: Uint8Array; -} - -/** - * @internal - */ -export const BinaryPayloadEventFilterSensitiveLog = (obj: BinaryPayloadEvent): any => ({ - ...obj, - ...(obj.bytes && { bytes: - SENSITIVE_STRING - }), -}) - -/** - * Information about the state of the AWS management console page from which the user is calling - * @public - */ -export interface ConsoleState { - region?: string; - consoleUrl?: string; - serviceId?: string; - serviceConsolePage?: string; - serviceSubconsolePage?: string; - taskName?: string; -} - -/** - * @internal - */ -export const ConsoleStateFilterSensitiveLog = (obj: ConsoleState): any => ({ - ...obj, - ...(obj.consoleUrl && { consoleUrl: - SENSITIVE_STRING - }), - ...(obj.taskName && { taskName: - SENSITIVE_STRING - }), -}) - -/** - * @public - * @enum - */ -export const DiagnosticSeverity = { - ERROR: "ERROR", - HINT: "HINT", - INFORMATION: "INFORMATION", - WARNING: "WARNING", -} as const -/** - * @public - */ -export type DiagnosticSeverity = typeof DiagnosticSeverity[keyof typeof DiagnosticSeverity] - -/** - * Structure to represent metadata about a Runtime Diagnostics - * @public - */ -export interface RuntimeDiagnostic { - /** - * A human-readable string describing the source of the diagnostic - * @public - */ - source: string | undefined; - - /** - * Diagnostic Error type - * @public - */ - severity: DiagnosticSeverity | undefined; - - /** - * The diagnostic's message. - * @public - */ - message: string | undefined; -} - -/** - * @internal - */ -export const RuntimeDiagnosticFilterSensitiveLog = (obj: RuntimeDiagnostic): any => ({ - ...obj, - ...(obj.source && { source: - SENSITIVE_STRING - }), - ...(obj.message && { message: - SENSITIVE_STRING - }), -}) - -/** - * @public - * @enum - */ -export const SymbolType = { - DECLARATION: "DECLARATION", - USAGE: "USAGE", -} as const -/** - * @public - */ -export type SymbolType = typeof SymbolType[keyof typeof SymbolType] - -/** - * @public - */ -export interface DocumentSymbol { - /** - * Name of the Document Symbol - * @public - */ - name: string | undefined; - - /** - * Symbol type - DECLARATION / USAGE - * @public - */ - type: SymbolType | undefined; - - /** - * Symbol package / source for FullyQualified names - * @public - */ - source?: string; -} - -/** - * Represents a Text Document / File - * @public - */ -export interface TextDocument { - /** - * Filepath relative to the root of the workspace - * @public - */ - relativeFilePath: string | undefined; - - /** - * The text document's language identifier. - * @public - */ - programmingLanguage?: ProgrammingLanguage; - - /** - * Content of the text document - * @public - */ - text?: string; - - /** - * DocumentSymbols parsed from a text document - * @public - */ - documentSymbols?: (DocumentSymbol)[]; -} - -/** - * @internal - */ -export const TextDocumentFilterSensitiveLog = (obj: TextDocument): any => ({ - ...obj, - ...(obj.relativeFilePath && { relativeFilePath: - SENSITIVE_STRING - }), - ...(obj.text && { text: - SENSITIVE_STRING - }), -}) - -/** - * Indicates Cursor postion in a Text Document - * @public - */ -export interface Position { - /** - * Line position in a document. - * @public - */ - line: number | undefined; - - /** - * Character offset on a line in a document (zero-based) - * @public - */ - character: number | undefined; -} - -/** - * Indicates Range / Span in a Text Document - * @public - */ -export interface Range { - /** - * The range's start position. - * @public - */ - start: Position | undefined; - - /** - * The range's end position. - * @public - */ - end: Position | undefined; -} - -/** - * Structure to represent metadata about a TextDocument Diagnostic - * @public - */ -export interface TextDocumentDiagnostic { - /** - * Represents a Text Document associated with Diagnostic - * @public - */ - document: TextDocument | undefined; - - /** - * The range at which the message applies. - * @public - */ - range: Range | undefined; - - /** - * A human-readable string describing the source of the diagnostic - * @public - */ - source: string | undefined; - - /** - * Diagnostic Error type - * @public - */ - severity: DiagnosticSeverity | undefined; - - /** - * The diagnostic's message. - * @public - */ - message: string | undefined; -} - -/** - * @internal - */ -export const TextDocumentDiagnosticFilterSensitiveLog = (obj: TextDocumentDiagnostic): any => ({ - ...obj, - ...(obj.document && { document: - TextDocumentFilterSensitiveLog(obj.document) - }), - ...(obj.source && { source: - SENSITIVE_STRING - }), - ...(obj.message && { message: - SENSITIVE_STRING - }), -}) - -/** - * Represents a Diagnostic message - * @public - */ -export type Diagnostic = - | Diagnostic.RuntimeDiagnosticMember - | Diagnostic.TextDocumentDiagnosticMember - | Diagnostic.$UnknownMember - -/** - * @public - */ -export namespace Diagnostic { - - /** - * Diagnostics originating from a TextDocument - * @public - */ - export interface TextDocumentDiagnosticMember { - textDocumentDiagnostic: TextDocumentDiagnostic; - runtimeDiagnostic?: never; - $unknown?: never; - } - - /** - * Diagnostics originating from a Runtime - * @public - */ - export interface RuntimeDiagnosticMember { - textDocumentDiagnostic?: never; - runtimeDiagnostic: RuntimeDiagnostic; - $unknown?: never; - } - - /** - * @public - */ - export interface $UnknownMember { - textDocumentDiagnostic?: never; - runtimeDiagnostic?: never; - $unknown: [string, any]; - } - - export interface Visitor { - textDocumentDiagnostic: (value: TextDocumentDiagnostic) => T; - runtimeDiagnostic: (value: RuntimeDiagnostic) => T; - _: (name: string, value: any) => T; - } - - export const visit = ( - value: Diagnostic, - visitor: Visitor - ): T => { - if (value.textDocumentDiagnostic !== undefined) return visitor.textDocumentDiagnostic(value.textDocumentDiagnostic); - if (value.runtimeDiagnostic !== undefined) return visitor.runtimeDiagnostic(value.runtimeDiagnostic); - return visitor._(value.$unknown[0], value.$unknown[1]); - } - -} -/** - * @internal - */ -export const DiagnosticFilterSensitiveLog = (obj: Diagnostic): any => { - if (obj.textDocumentDiagnostic !== undefined) return {textDocumentDiagnostic: - TextDocumentDiagnosticFilterSensitiveLog(obj.textDocumentDiagnostic) - }; - if (obj.runtimeDiagnostic !== undefined) return {runtimeDiagnostic: - RuntimeDiagnosticFilterSensitiveLog(obj.runtimeDiagnostic) - }; - if (obj.$unknown !== undefined) return {[obj.$unknown[0]]: 'UNKNOWN'}; -} - -/** - * Represents the state of the Cursor in an Editor - * @public - */ -export type CursorState = - | CursorState.PositionMember - | CursorState.RangeMember - | CursorState.$UnknownMember - -/** - * @public - */ -export namespace CursorState { - - /** - * Represents a cursor position in a Text Document - * @public - */ - export interface PositionMember { - position: Position; - range?: never; - $unknown?: never; - } - - /** - * Represents a text selection in a Text Document - * @public - */ - export interface RangeMember { - position?: never; - range: Range; - $unknown?: never; - } - - /** - * @public - */ - export interface $UnknownMember { - position?: never; - range?: never; - $unknown: [string, any]; - } - - export interface Visitor { - position: (value: Position) => T; - range: (value: Range) => T; - _: (name: string, value: any) => T; - } - - export const visit = ( - value: CursorState, - visitor: Visitor - ): T => { - if (value.position !== undefined) return visitor.position(value.position); - if (value.range !== undefined) return visitor.range(value.range); - return visitor._(value.$unknown[0], value.$unknown[1]); - } - -} - -/** - * Represents an IDE retrieved relevant Text Document / File - * @public - */ -export interface RelevantTextDocument { - /** - * Filepath relative to the root of the workspace - * @public - */ - relativeFilePath: string | undefined; - - /** - * The text document's language identifier. - * @public - */ - programmingLanguage?: ProgrammingLanguage; - - /** - * Content of the text document - * @public - */ - text?: string; - - /** - * DocumentSymbols parsed from a text document - * @public - */ - documentSymbols?: (DocumentSymbol)[]; -} - -/** - * @internal - */ -export const RelevantTextDocumentFilterSensitiveLog = (obj: RelevantTextDocument): any => ({ - ...obj, - ...(obj.relativeFilePath && { relativeFilePath: - SENSITIVE_STRING - }), - ...(obj.text && { text: - SENSITIVE_STRING - }), -}) - -/** - * Represents the state of an Editor - * @public - */ -export interface EditorState { - /** - * Represents currently edited file - * @public - */ - document?: TextDocument; - - /** - * Position of the cursor - * @public - */ - cursorState?: CursorState; - - /** - * Represents IDE provided relevant files - * @public - */ - relevantDocuments?: (RelevantTextDocument)[]; - - /** - * Whether service should use relevant document in prompt - * @public - */ - useRelevantDocuments?: boolean; -} - -/** - * @internal - */ -export const EditorStateFilterSensitiveLog = (obj: EditorState): any => ({ - ...obj, - ...(obj.document && { document: - TextDocumentFilterSensitiveLog(obj.document) - }), - ...(obj.cursorState && { cursorState: - obj.cursorState - }), - ...(obj.relevantDocuments && { relevantDocuments: - obj.relevantDocuments.map( - item => - RelevantTextDocumentFilterSensitiveLog(item) - ) - }), -}) - -/** - * An environment variable - * @public - */ -export interface EnvironmentVariable { - /** - * The key of an environment variable - * @public - */ - key?: string; - - /** - * The value of an environment variable - * @public - */ - value?: string; -} - -/** - * @internal - */ -export const EnvironmentVariableFilterSensitiveLog = (obj: EnvironmentVariable): any => ({ - ...obj, - ...(obj.key && { key: - SENSITIVE_STRING - }), - ...(obj.value && { value: - SENSITIVE_STRING - }), -}) - -/** - * State related to the user's environment - * @public - */ -export interface EnvState { - /** - * The name of the operating system in use - * @public - */ - operatingSystem?: string; - - /** - * The current working directory of the environment - * @public - */ - currentWorkingDirectory?: string; - - /** - * The environment variables set in the current environment - * @public - */ - environmentVariables?: (EnvironmentVariable)[]; -} - -/** - * @internal - */ -export const EnvStateFilterSensitiveLog = (obj: EnvState): any => ({ - ...obj, - ...(obj.currentWorkingDirectory && { currentWorkingDirectory: - SENSITIVE_STRING - }), - ...(obj.environmentVariables && { environmentVariables: - obj.environmentVariables.map( - item => - EnvironmentVariableFilterSensitiveLog(item) - ) - }), -}) - -/** - * State related to the Git VSC - * @public - */ -export interface GitState { - /** - * The output of the command `git status --porcelain=v1 -b` - * @public - */ - status?: string; -} - -/** - * @internal - */ -export const GitStateFilterSensitiveLog = (obj: GitState): any => ({ - ...obj, - ...(obj.status && { status: - SENSITIVE_STRING - }), -}) - -/** - * An single entry in the shell history - * @public - */ -export interface ShellHistoryEntry { - /** - * The shell command that was run - * @public - */ - command: string | undefined; - - /** - * The directory the command was ran in - * @public - */ - directory?: string; - - /** - * The exit code of the command after it finished - * @public - */ - exitCode?: number; - - /** - * The stdout from the command - * @public - */ - stdout?: string; - - /** - * The stderr from the command - * @public - */ - stderr?: string; -} - -/** - * @internal - */ -export const ShellHistoryEntryFilterSensitiveLog = (obj: ShellHistoryEntry): any => ({ - ...obj, - ...(obj.command && { command: - SENSITIVE_STRING - }), - ...(obj.directory && { directory: - SENSITIVE_STRING - }), - ...(obj.stdout && { stdout: - SENSITIVE_STRING - }), - ...(obj.stderr && { stderr: - SENSITIVE_STRING - }), -}) - -/** - * Represents the state of a shell - * @public - */ -export interface ShellState { - /** - * The name of the current shell - * @public - */ - shellName: string | undefined; - - /** - * The history previous shell commands for the current shell - * @public - */ - shellHistory?: (ShellHistoryEntry)[]; -} - -/** - * @internal - */ -export const ShellStateFilterSensitiveLog = (obj: ShellState): any => ({ - ...obj, - ...(obj.shellHistory && { shellHistory: - obj.shellHistory.map( - item => - ShellHistoryEntryFilterSensitiveLog(item) - ) - }), -}) - -/** - * Settings information passed by the Q widget - * @public - */ -export interface UserSettings { - hasConsentedToCrossRegionCalls?: boolean; -} - -/** - * Additional Chat message context associated with the Chat Message - * @public - */ -export interface UserInputMessageContext { - /** - * Editor state chat message context. - * @public - */ - editorState?: EditorState; - - /** - * Shell state chat message context. - * @public - */ - shellState?: ShellState; - - /** - * Git state chat message context. - * @public - */ - gitState?: GitState; - - /** - * Environment state chat message context. - * @public - */ - envState?: EnvState; - - /** - * The state of a user's AppStudio UI when sending a message. - * @public - */ - appStudioContext?: AppStudioState; - - /** - * Diagnostic chat message context. - * @public - */ - diagnostic?: Diagnostic; - - /** - * Contextual information about the environment from which the user is calling. - * @public - */ - consoleState?: ConsoleState; - - /** - * Settings information, e.g., whether the user has enabled cross-region API calls. - * @public - */ - userSettings?: UserSettings; -} - -/** - * @internal - */ -export const UserInputMessageContextFilterSensitiveLog = (obj: UserInputMessageContext): any => ({ - ...obj, - ...(obj.editorState && { editorState: - EditorStateFilterSensitiveLog(obj.editorState) - }), - ...(obj.shellState && { shellState: - ShellStateFilterSensitiveLog(obj.shellState) - }), - ...(obj.gitState && { gitState: - GitStateFilterSensitiveLog(obj.gitState) - }), - ...(obj.envState && { envState: - EnvStateFilterSensitiveLog(obj.envState) - }), - ...(obj.appStudioContext && { appStudioContext: - AppStudioStateFilterSensitiveLog(obj.appStudioContext) - }), - ...(obj.diagnostic && { diagnostic: - DiagnosticFilterSensitiveLog(obj.diagnostic) - }), - ...(obj.consoleState && { consoleState: - ConsoleStateFilterSensitiveLog(obj.consoleState) - }), -}) - -/** - * Structure to represent a chat input message from User - * @public - */ -export interface UserInputMessage { - /** - * The content of the chat message. - * @public - */ - content: string | undefined; - - /** - * Chat message context associated with the Chat Message - * @public - */ - userInputMessageContext?: UserInputMessageContext; - - /** - * User Intent - * @public - */ - userIntent?: UserIntent; -} - -/** - * @internal - */ -export const UserInputMessageFilterSensitiveLog = (obj: UserInputMessage): any => ({ - ...obj, - ...(obj.content && { content: - SENSITIVE_STRING - }), - ...(obj.userInputMessageContext && { userInputMessageContext: - UserInputMessageContextFilterSensitiveLog(obj.userInputMessageContext) - }), -}) - -/** - * @public - */ -export type ChatMessage = - | ChatMessage.AssistantResponseMessageMember - | ChatMessage.UserInputMessageMember - | ChatMessage.$UnknownMember - -/** - * @public - */ -export namespace ChatMessage { - - /** - * Structure to represent a chat input message from User - * @public - */ - export interface UserInputMessageMember { - userInputMessage: UserInputMessage; - assistantResponseMessage?: never; - $unknown?: never; - } - - /** - * Markdown text message. - * @public - */ - export interface AssistantResponseMessageMember { - userInputMessage?: never; - assistantResponseMessage: AssistantResponseMessage; - $unknown?: never; - } - - /** - * @public - */ - export interface $UnknownMember { - userInputMessage?: never; - assistantResponseMessage?: never; - $unknown: [string, any]; - } - - export interface Visitor { - userInputMessage: (value: UserInputMessage) => T; - assistantResponseMessage: (value: AssistantResponseMessage) => T; - _: (name: string, value: any) => T; - } - - export const visit = ( - value: ChatMessage, - visitor: Visitor - ): T => { - if (value.userInputMessage !== undefined) return visitor.userInputMessage(value.userInputMessage); - if (value.assistantResponseMessage !== undefined) return visitor.assistantResponseMessage(value.assistantResponseMessage); - return visitor._(value.$unknown[0], value.$unknown[1]); - } - -} -/** - * @internal - */ -export const ChatMessageFilterSensitiveLog = (obj: ChatMessage): any => { - if (obj.userInputMessage !== undefined) return {userInputMessage: - UserInputMessageFilterSensitiveLog(obj.userInputMessage) - }; - if (obj.assistantResponseMessage !== undefined) return {assistantResponseMessage: - AssistantResponseMessageFilterSensitiveLog(obj.assistantResponseMessage) - }; - if (obj.$unknown !== undefined) return {[obj.$unknown[0]]: 'UNKNOWN'}; -} - -/** - * Streaming response event for generated code text. - * @public - */ -export interface CodeEvent { - /** - * Generated code snippet. - * @public - */ - content: string | undefined; -} - -/** - * @internal - */ -export const CodeEventFilterSensitiveLog = (obj: CodeEvent): any => ({ - ...obj, - ...(obj.content && { content: - SENSITIVE_STRING - }), -}) - -/** - * Streaming Response Event for CodeReferences - * @public - */ -export interface CodeReferenceEvent { - /** - * Code References for Assistant Response Message - * @public - */ - references?: (Reference)[]; -} - -/** - * Streaming Response Event when DryRun is succeessful - * @public - */ -export interface DryRunSucceedEvent { -} - -/** - * Streaming Response Event for Followup Prompt. - * @public - */ -export interface FollowupPromptEvent { - /** - * Followup Prompt for the Assistant Response - * @public - */ - followupPrompt?: FollowupPrompt; -} - -/** - * @internal - */ -export const FollowupPromptEventFilterSensitiveLog = (obj: FollowupPromptEvent): any => ({ - ...obj, - ...(obj.followupPrompt && { followupPrompt: - FollowupPromptFilterSensitiveLog(obj.followupPrompt) - }), -}) - -/** - * @public - * @enum - */ -export const IntentType = { - GLUE_SENSEI: "GLUE_SENSEI", - RESOURCE_DATA: "RESOURCE_DATA", - SUPPORT: "SUPPORT", -} as const -/** - * @public - */ -export type IntentType = typeof IntentType[keyof typeof IntentType] - -/** - * @public - */ -export type IntentDataType = - | IntentDataType.StringMember - | IntentDataType.$UnknownMember - -/** - * @public - */ -export namespace IntentDataType { - - export interface StringMember { - string: string; - $unknown?: never; - } - - /** - * @public - */ - export interface $UnknownMember { - string?: never; - $unknown: [string, any]; - } - - export interface Visitor { - string: (value: string) => T; - _: (name: string, value: any) => T; - } - - export const visit = ( - value: IntentDataType, - visitor: Visitor - ): T => { - if (value.string !== undefined) return visitor.string(value.string); - return visitor._(value.$unknown[0], value.$unknown[1]); - } - -} - -/** - * Streaming Response Event for Intents - * @public - */ -export interface IntentsEvent { - /** - * A map of Intent objects - * @public - */ - intents?: Partial>>; -} - -/** - * @internal - */ -export const IntentsEventFilterSensitiveLog = (obj: IntentsEvent): any => ({ - ...obj, - ...(obj.intents && { intents: - SENSITIVE_STRING - }), -}) - -/** - * For CloudWatch Troubleshooting Link Module - * @public - */ -export interface CloudWatchTroubleshootingLink { - /** - * A label for the link. - * @public - */ - label: string | undefined; - - /** - * Stringified JSON payload. See spec here https://code.amazon.com/packages/CloudWatchOdysseyModel/blobs/50c0832f0e393e4ab68827eb4f04d832366821c1/--/model/events.smithy#L28 . - * @public - */ - investigationPayload: string | undefined; - - /** - * Fallback string, if target channel does not support the CloudWatchTroubleshootingLink. - * @public - */ - defaultText?: string; -} - -/** - * @internal - */ -export const CloudWatchTroubleshootingLinkFilterSensitiveLog = (obj: CloudWatchTroubleshootingLink): any => ({ - ...obj, - ...(obj.label && { label: - SENSITIVE_STRING - }), - ...(obj.investigationPayload && { investigationPayload: - SENSITIVE_STRING - }), - ...(obj.defaultText && { defaultText: - SENSITIVE_STRING - }), -}) - -/** - * @public - */ -export interface ModuleLink { - /** - * For CloudWatch Troubleshooting Link Module - * @public - */ - cloudWatchTroubleshootingLink?: CloudWatchTroubleshootingLink; -} - -/** - * @internal - */ -export const ModuleLinkFilterSensitiveLog = (obj: ModuleLink): any => ({ - ...obj, - ...(obj.cloudWatchTroubleshootingLink && { cloudWatchTroubleshootingLink: - CloudWatchTroubleshootingLinkFilterSensitiveLog(obj.cloudWatchTroubleshootingLink) - }), -}) - -/** - * @public - */ -export interface WebLink { - /** - * A label for the link - * @public - */ - label: string | undefined; - - /** - * URL of the Weblink - * @public - */ - url: string | undefined; -} - -/** - * @internal - */ -export const WebLinkFilterSensitiveLog = (obj: WebLink): any => ({ - ...obj, - ...(obj.label && { label: - SENSITIVE_STRING - }), - ...(obj.url && { url: - SENSITIVE_STRING - }), -}) - -/** - * @public - */ -export interface Action { - webLink?: WebLink; - moduleLink?: ModuleLink; -} - -/** - * @internal - */ -export const ActionFilterSensitiveLog = (obj: Action): any => ({ - ...obj, - ...(obj.webLink && { webLink: - WebLinkFilterSensitiveLog(obj.webLink) - }), - ...(obj.moduleLink && { moduleLink: - ModuleLinkFilterSensitiveLog(obj.moduleLink) - }), -}) - -/** - * Structure representing a simple text component with sensitive content, which can include Markdown formatting. - * @public - */ -export interface Text { - /** - * Contains text content that may include sensitive information and can support Markdown formatting. - * @public - */ - content: string | undefined; -} - -/** - * @internal - */ -export const TextFilterSensitiveLog = (obj: Text): any => ({ - ...obj, - ...(obj.content && { content: - SENSITIVE_STRING - }), -}) - -/** - * @public - */ -export interface AlertComponent { - /** - * Structure representing a simple text component with sensitive content, which can include Markdown formatting. - * @public - */ - text?: Text; -} - -/** - * @internal - */ -export const AlertComponentFilterSensitiveLog = (obj: AlertComponent): any => ({ - ...obj, - ...(obj.text && { text: - TextFilterSensitiveLog(obj.text) - }), -}) - -/** - * @public - * @enum - */ -export const AlertType = { - /** - * Alert indicating an error or failure that requires attention. - */ - ERROR: "ERROR", - /** - * Informational alert providing general information. - */ - INFO: "INFO", - /** - * Alert indicating a warning or potential issue that should be noted. - */ - WARNING: "WARNING", -} as const -/** - * @public - */ -export type AlertType = typeof AlertType[keyof typeof AlertType] - -/** - * Structure representing an alert with a type and content. - * @public - */ -export interface Alert { - /** - * Enum defining types of alerts that can be issued. - * @public - */ - type: AlertType | undefined; - - /** - * Contains the content of the alert, which may include sensitive information. - * @public - */ - content: (AlertComponent)[] | undefined; -} - -/** - * @internal - */ -export const AlertFilterSensitiveLog = (obj: Alert): any => ({ - ...obj, - ...(obj.content && { content: - obj.content.map( - item => - AlertComponentFilterSensitiveLog(item) - ) - }), -}) - -/** - * Structure describing a transition between two states in an infrastructure update. - * @public - */ -export interface InfrastructureUpdateTransition { - /** - * The current state of the infrastructure before the update. - * @public - */ - currentState: string | undefined; - - /** - * The next state of the infrastructure following the update. - * @public - */ - nextState: string | undefined; -} - -/** - * @internal - */ -export const InfrastructureUpdateTransitionFilterSensitiveLog = (obj: InfrastructureUpdateTransition): any => ({ - ...obj, - ...(obj.currentState && { currentState: - SENSITIVE_STRING - }), - ...(obj.nextState && { nextState: - SENSITIVE_STRING - }), -}) - -/** - * Structure representing different types of infrastructure updates. - * @public - */ -export interface InfrastructureUpdate { - /** - * Structure describing a transition between two states in an infrastructure update. - * @public - */ - transition?: InfrastructureUpdateTransition; -} - -/** - * @internal - */ -export const InfrastructureUpdateFilterSensitiveLog = (obj: InfrastructureUpdate): any => ({ - ...obj, - ...(obj.transition && { transition: - InfrastructureUpdateTransitionFilterSensitiveLog(obj.transition) - }), -}) - -/** - * @public - */ -export interface StepComponent { - /** - * Structure representing a simple text component with sensitive content, which can include Markdown formatting. - * @public - */ - text?: Text; -} - -/** - * @internal - */ -export const StepComponentFilterSensitiveLog = (obj: StepComponent): any => ({ - ...obj, - ...(obj.text && { text: - TextFilterSensitiveLog(obj.text) - }), -}) - -/** - * @public - * @enum - */ -export const StepState = { - /** - * Indicates a failure or issue that needs to be addressed. - */ - FAILED: "FAILED", - /** - * Indicates that the step is currently being processed. This is a non-terminal state, meaning the process is active and ongoing. - */ - IN_PROGRESS: "IN_PROGRESS", - /** - * Indicates that the step is being loaded or initialized. This is a non-terminal state, meaning the process is in the setup phase. - */ - LOADING: "LOADING", - /** - * Indicates that the step is temporarily halted but can resume. This is a non-terminal state, representing a temporary pause. - */ - PAUSED: "PAUSED", - /** - * Indicates that the step is waiting for some condition or input. This is a non-terminal state, meaning the process is paused but not complete. - */ - PENDING: "PENDING", - /** - * Indicates that the step was stopped, either intentionally or unintentionally. - */ - STOPPED: "STOPPED", - /** - * Indicates successful completion of the step. - */ - SUCCEEDED: "SUCCEEDED", -} as const -/** - * @public - */ -export type StepState = typeof StepState[keyof typeof StepState] - -/** - * Structure representing an individual step in a process. - * @public - */ -export interface Step { - /** - * A unique identifier for the step. It must be a non-negative integer to ensure each step is distinct. - * @public - */ - id: number | undefined; - - /** - * Enum representing all possible step states, combining terminal and non-terminal states. - * @public - */ - state: StepState | undefined; - - /** - * A label for the step, providing a concise description. - * @public - */ - label: string | undefined; - - /** - * Optional content providing additional details about the step. - * @public - */ - content?: (StepComponent)[]; -} - -/** - * @internal - */ -export const StepFilterSensitiveLog = (obj: Step): any => ({ - ...obj, - ...(obj.label && { label: - SENSITIVE_STRING - }), - ...(obj.content && { content: - obj.content.map( - item => - StepComponentFilterSensitiveLog(item) - ) - }), -}) - -/** - * @public - */ -export interface ProgressComponent { - /** - * Structure representing an individual step in a process. - * @public - */ - step?: Step; -} - -/** - * @internal - */ -export const ProgressComponentFilterSensitiveLog = (obj: ProgressComponent): any => ({ - ...obj, - ...(obj.step && { step: - StepFilterSensitiveLog(obj.step) - }), -}) - -/** - * Structure representing a collection of steps in a process. - * @public - */ -export interface Progress { - /** - * A collection of steps that make up a process. Each step is detailed using the Step structure. - * @public - */ - content: (ProgressComponent)[] | undefined; -} - -/** - * @internal - */ -export const ProgressFilterSensitiveLog = (obj: Progress): any => ({ - ...obj, - ...(obj.content && { content: - obj.content.map( - item => - ProgressComponentFilterSensitiveLog(item) - ) - }), -}) - -/** - * Structure representing a resource item - * @public - */ -export interface Resource { - /** - * Card title. - * @public - */ - title: string | undefined; - - /** - * Link for the resource item - * @public - */ - link: string | undefined; - - /** - * Short text about that resource for example Region: us-east-1 - * @public - */ - description: string | undefined; - - /** - * Resource type e.g AWS EC2 - * @public - */ - type: string | undefined; - - /** - * Amazon resource number e.g arn:aws:aec:..... - * @public - */ - ARN: string | undefined; - - /** - * A stringified object - * @public - */ - resourceJsonString: string | undefined; -} - -/** - * @internal - */ -export const ResourceFilterSensitiveLog = (obj: Resource): any => ({ - ...obj, - ...(obj.title && { title: - SENSITIVE_STRING - }), - ...(obj.link && { link: - SENSITIVE_STRING - }), - ...(obj.description && { description: - SENSITIVE_STRING - }), - ...(obj.type && { type: - SENSITIVE_STRING - }), - ...(obj.ARN && { ARN: - SENSITIVE_STRING - }), - ...(obj.resourceJsonString && { resourceJsonString: - SENSITIVE_STRING - }), -}) - -/** - * Structure representing a list of Items - * @public - */ -export interface ResourceList { - /** - * Action associated with the list - * @public - */ - action?: Action; - - /** - * List of resources - * @public - */ - items: (Resource)[] | undefined; -} - -/** - * @internal - */ -export const ResourceListFilterSensitiveLog = (obj: ResourceList): any => ({ - ...obj, - ...(obj.action && { action: - ActionFilterSensitiveLog(obj.action) - }), - ...(obj.items && { items: - obj.items.map( - item => - ResourceFilterSensitiveLog(item) - ) - }), -}) - -/** - * @public - */ -export interface SectionComponent { - /** - * Structure representing a simple text component with sensitive content, which can include Markdown formatting. - * @public - */ - text?: Text; - - /** - * Structure representing an alert with a type and content. - * @public - */ - alert?: Alert; - - /** - * Structure representing a resource item - * @public - */ - resource?: Resource; - - /** - * Structure representing a list of Items - * @public - */ - resourceList?: ResourceList; -} - -/** - * @internal - */ -export const SectionComponentFilterSensitiveLog = (obj: SectionComponent): any => ({ - ...obj, - ...(obj.text && { text: - TextFilterSensitiveLog(obj.text) - }), - ...(obj.alert && { alert: - AlertFilterSensitiveLog(obj.alert) - }), - ...(obj.resource && { resource: - ResourceFilterSensitiveLog(obj.resource) - }), - ...(obj.resourceList && { resourceList: - ResourceListFilterSensitiveLog(obj.resourceList) - }), -}) - -/** - * Structure representing a collapsable section - * @public - */ -export interface Section { - /** - * Contains text content that may include sensitive information and can support Markdown formatting. - * @public - */ - title: string | undefined; - - /** - * Contains a list of interaction components e.g Text, Alert, List, etc. - * @public - */ - content: (SectionComponent)[] | undefined; - - /** - * Action associated with the Section - * @public - */ - action?: Action; -} - -/** - * @internal - */ -export const SectionFilterSensitiveLog = (obj: Section): any => ({ - ...obj, - ...(obj.title && { title: - SENSITIVE_STRING - }), - ...(obj.content && { content: - obj.content.map( - item => - SectionComponentFilterSensitiveLog(item) - ) - }), - ...(obj.action && { action: - ActionFilterSensitiveLog(obj.action) - }), -}) - -/** - * Structure representing a suggestion for follow-ups. - * @public - */ -export interface Suggestion { - value: string | undefined; -} - -/** - * Structure containing a list of suggestions. - * @public - */ -export interface Suggestions { - items: (Suggestion)[] | undefined; -} - -/** - * Structure representing a confirmation message related to a task action. - * @public - */ -export interface TaskActionConfirmation { - /** - * Confirmation message related to the action note, which may include sensitive information. - * @public - */ - content?: string; -} - -/** - * @internal - */ -export const TaskActionConfirmationFilterSensitiveLog = (obj: TaskActionConfirmation): any => ({ - ...obj, - ...(obj.content && { content: - SENSITIVE_STRING - }), -}) - -/** - * @public - * @enum - */ -export const TaskActionNoteType = { - /** - * Information note providing general details. - */ - INFO: "INFO", - /** - * Warning note indicating a potential issue. - */ - WARNING: "WARNING", -} as const -/** - * @public - */ -export type TaskActionNoteType = typeof TaskActionNoteType[keyof typeof TaskActionNoteType] - -/** - * Structure representing a note associated with a task action. - * @public - */ -export interface TaskActionNote { - /** - * Content of the note, which may include sensitive information. - * @public - */ - content: string | undefined; - - /** - * Enum defining the types of notes that can be associated with a task action. - * @public - */ - type?: TaskActionNoteType; -} - -/** - * @internal - */ -export const TaskActionNoteFilterSensitiveLog = (obj: TaskActionNote): any => ({ - ...obj, - ...(obj.content && { content: - SENSITIVE_STRING - }), -}) - -/** - * Structure representing an action associated with a task. - * @public - */ -export interface TaskAction { - /** - * A label for the action. - * @public - */ - label: string | undefined; - - /** - * Structure representing a note associated with a task action. - * @public - */ - note?: TaskActionNote; - - /** - * Indicates whether the action is primary or not. - * @public - */ - primary?: boolean; - - /** - * Indicates whether the action is disabled or not. - * @public - */ - disabled?: boolean; - - /** - * Map representing key-value pairs for the payload of a task action. - * @public - */ - payload: Record | undefined; - - /** - * Structure representing a confirmation message related to a task action. - * @public - */ - confirmation?: TaskActionConfirmation; -} - -/** - * @internal - */ -export const TaskActionFilterSensitiveLog = (obj: TaskAction): any => ({ - ...obj, - ...(obj.label && { label: - SENSITIVE_STRING - }), - ...(obj.note && { note: - TaskActionNoteFilterSensitiveLog(obj.note) - }), - ...(obj.payload && { payload: - SENSITIVE_STRING - }), - ...(obj.confirmation && { confirmation: - TaskActionConfirmationFilterSensitiveLog(obj.confirmation) - }), -}) - -/** - * Structure representing different types of components that can be part of a task. - * @public - */ -export interface TaskComponent { - /** - * Structure representing a simple text component with sensitive content, which can include Markdown formatting. - * @public - */ - text?: Text; - - /** - * Structure representing different types of infrastructure updates. - * @public - */ - infrastructureUpdate?: InfrastructureUpdate; - - /** - * Structure representing an alert with a type and content. - * @public - */ - alert?: Alert; - - /** - * Structure representing a collection of steps in a process. - * @public - */ - progress?: Progress; -} - -/** - * @internal - */ -export const TaskComponentFilterSensitiveLog = (obj: TaskComponent): any => ({ - ...obj, - ...(obj.text && { text: - TextFilterSensitiveLog(obj.text) - }), - ...(obj.infrastructureUpdate && { infrastructureUpdate: - InfrastructureUpdateFilterSensitiveLog(obj.infrastructureUpdate) - }), - ...(obj.alert && { alert: - AlertFilterSensitiveLog(obj.alert) - }), - ...(obj.progress && { progress: - ProgressFilterSensitiveLog(obj.progress) - }), -}) - -/** - * Structure representing an overview of a task, including a label and description. - * @public - */ -export interface TaskOverview { - /** - * A label for the task overview. - * @public - */ - label: string | undefined; - - /** - * Text description providing details about the task. This field may include sensitive information and supports Markdown formatting. - * @public - */ - description: string | undefined; -} - -/** - * @internal - */ -export const TaskOverviewFilterSensitiveLog = (obj: TaskOverview): any => ({ - ...obj, - ...(obj.label && { label: - SENSITIVE_STRING - }), - ...(obj.description && { description: - SENSITIVE_STRING - }), -}) - -/** - * Structure containing details about a task. - * @public - */ -export interface TaskDetails { - /** - * Structure representing an overview of a task, including a label and description. - * @public - */ - overview: TaskOverview | undefined; - - /** - * Lists the components that can be used to form the task's content. - * @public - */ - content: (TaskComponent)[] | undefined; - - /** - * Optional list of actions associated with the task. - * @public - */ - actions?: (TaskAction)[]; -} - -/** - * @internal - */ -export const TaskDetailsFilterSensitiveLog = (obj: TaskDetails): any => ({ - ...obj, - ...(obj.overview && { overview: - TaskOverviewFilterSensitiveLog(obj.overview) - }), - ...(obj.content && { content: - obj.content.map( - item => - TaskComponentFilterSensitiveLog(item) - ) - }), - ...(obj.actions && { actions: - obj.actions.map( - item => - TaskActionFilterSensitiveLog(item) - ) - }), -}) - -/** - * Structure representing a reference to a task. - * @public - */ -export interface TaskReference { - /** - * Unique identifier for the task. - * @public - */ - taskId: string | undefined; -} - -/** - * Structure representing different types of interaction components. - * @public - */ -export interface InteractionComponent { - /** - * Structure representing a simple text component with sensitive content, which can include Markdown formatting. - * @public - */ - text?: Text; - - /** - * Structure representing an alert with a type and content. - * @public - */ - alert?: Alert; - - /** - * Structure representing different types of infrastructure updates. - * @public - */ - infrastructureUpdate?: InfrastructureUpdate; - - /** - * Structure representing a collection of steps in a process. - * @public - */ - progress?: Progress; - - /** - * Structure representing an individual step in a process. - * @public - */ - step?: Step; - - /** - * Structure containing details about a task. - * @public - */ - taskDetails?: TaskDetails; - - /** - * Structure representing a reference to a task. - * @public - */ - taskReference?: TaskReference; - - /** - * Structure containing a list of suggestions. - * @public - */ - suggestions?: Suggestions; - - /** - * Structure representing a collapsable section - * @public - */ - section?: Section; - - /** - * Structure representing a resource item - * @public - */ - resource?: Resource; - - /** - * Structure representing a list of Items - * @public - */ - resourceList?: ResourceList; - - action?: Action; -} - -/** - * @internal - */ -export const InteractionComponentFilterSensitiveLog = (obj: InteractionComponent): any => ({ - ...obj, - ...(obj.text && { text: - TextFilterSensitiveLog(obj.text) - }), - ...(obj.alert && { alert: - AlertFilterSensitiveLog(obj.alert) - }), - ...(obj.infrastructureUpdate && { infrastructureUpdate: - InfrastructureUpdateFilterSensitiveLog(obj.infrastructureUpdate) - }), - ...(obj.progress && { progress: - ProgressFilterSensitiveLog(obj.progress) - }), - ...(obj.step && { step: - StepFilterSensitiveLog(obj.step) - }), - ...(obj.taskDetails && { taskDetails: - TaskDetailsFilterSensitiveLog(obj.taskDetails) - }), - ...(obj.section && { section: - SectionFilterSensitiveLog(obj.section) - }), - ...(obj.resource && { resource: - ResourceFilterSensitiveLog(obj.resource) - }), - ...(obj.resourceList && { resourceList: - ResourceListFilterSensitiveLog(obj.resourceList) - }), - ...(obj.action && { action: - ActionFilterSensitiveLog(obj.action) - }), -}) - -/** - * Interaction component with an identifier - * @public - */ -export interface InteractionComponentEntry { - /** - * Identifier that can uniquely identify the interaction component within - * stream response. This field is optional. - * @public - */ - interactionComponentId?: string; - - /** - * Interaction component - * @public - */ - interactionComponent: InteractionComponent | undefined; -} - -/** - * @internal - */ -export const InteractionComponentEntryFilterSensitiveLog = (obj: InteractionComponentEntry): any => ({ - ...obj, - ...(obj.interactionComponent && { interactionComponent: - InteractionComponentFilterSensitiveLog(obj.interactionComponent) - }), -}) - -/** - * Streaming Event for interaction components list - * @public - */ -export interface InteractionComponentsEvent { - /** - * List of identifiable interaction components - * @public - */ - interactionComponentEntries: (InteractionComponentEntry)[] | undefined; -} - -/** - * @internal - */ -export const InteractionComponentsEventFilterSensitiveLog = (obj: InteractionComponentsEvent): any => ({ - ...obj, - ...(obj.interactionComponentEntries && { interactionComponentEntries: - obj.interactionComponentEntries.map( - item => - InteractionComponentEntryFilterSensitiveLog(item) - ) - }), -}) - -/** - * @public - * @enum - */ -export const InvalidStateReason = { - INVALID_TASK_ASSIST_PLAN: "INVALID_TASK_ASSIST_PLAN", -} as const -/** - * @public - */ -export type InvalidStateReason = typeof InvalidStateReason[keyof typeof InvalidStateReason] - -/** - * Streaming Response Event when an Invalid State is reached - * @public - */ -export interface InvalidStateEvent { - /** - * Reasons for Invalid State Event - * @public - */ - reason: InvalidStateReason | undefined; - - message: string | undefined; -} - -/** - * Streaming Response Event for AssistantResponse Metadata - * @public - */ -export interface MessageMetadataEvent { - /** - * Unique identifier for the conversation - * @public - */ - conversationId?: string; - - /** - * Unique identifier for the utterance - * @public - */ - utteranceId?: string; -} - -/** - * Streaming Response Event for SupplementaryWebLinks - * @public - */ -export interface SupplementaryWebLinksEvent { - /** - * Web References for Assistant Response Message - * @public - */ - supplementaryWebLinks?: (SupplementaryWebLink)[]; -} - -/** - * @internal - */ -export const SupplementaryWebLinksEventFilterSensitiveLog = (obj: SupplementaryWebLinksEvent): any => ({ - ...obj, - ...(obj.supplementaryWebLinks && { supplementaryWebLinks: - obj.supplementaryWebLinks.map( - item => - SupplementaryWebLinkFilterSensitiveLog(item) - ) - }), -}) - -/** - * Streaming events from UniDirectional Streaming Conversational APIs. - * @public - */ -export type ChatResponseStream = - | ChatResponseStream.AssistantResponseEventMember - | ChatResponseStream.CodeEventMember - | ChatResponseStream.CodeReferenceEventMember - | ChatResponseStream.DryRunSucceedEventMember - | ChatResponseStream.ErrorMember - | ChatResponseStream.FollowupPromptEventMember - | ChatResponseStream.IntentsEventMember - | ChatResponseStream.InteractionComponentsEventMember - | ChatResponseStream.InvalidStateEventMember - | ChatResponseStream.MessageMetadataEventMember - | ChatResponseStream.SupplementaryWebLinksEventMember - | ChatResponseStream.$UnknownMember - -/** - * @public - */ -export namespace ChatResponseStream { - - /** - * Message Metadata event - * @public - */ - export interface MessageMetadataEventMember { - messageMetadataEvent: MessageMetadataEvent; - assistantResponseEvent?: never; - dryRunSucceedEvent?: never; - codeReferenceEvent?: never; - supplementaryWebLinksEvent?: never; - followupPromptEvent?: never; - codeEvent?: never; - intentsEvent?: never; - interactionComponentsEvent?: never; - invalidStateEvent?: never; - error?: never; - $unknown?: never; - } - - /** - * Assistant response event - Text / Code snippet - * @public - */ - export interface AssistantResponseEventMember { - messageMetadataEvent?: never; - assistantResponseEvent: AssistantResponseEvent; - dryRunSucceedEvent?: never; - codeReferenceEvent?: never; - supplementaryWebLinksEvent?: never; - followupPromptEvent?: never; - codeEvent?: never; - intentsEvent?: never; - interactionComponentsEvent?: never; - invalidStateEvent?: never; - error?: never; - $unknown?: never; - } - - /** - * DryRun Succeed Event - * @public - */ - export interface DryRunSucceedEventMember { - messageMetadataEvent?: never; - assistantResponseEvent?: never; - dryRunSucceedEvent: DryRunSucceedEvent; - codeReferenceEvent?: never; - supplementaryWebLinksEvent?: never; - followupPromptEvent?: never; - codeEvent?: never; - intentsEvent?: never; - interactionComponentsEvent?: never; - invalidStateEvent?: never; - error?: never; - $unknown?: never; - } - - /** - * Code References event - * @public - */ - export interface CodeReferenceEventMember { - messageMetadataEvent?: never; - assistantResponseEvent?: never; - dryRunSucceedEvent?: never; - codeReferenceEvent: CodeReferenceEvent; - supplementaryWebLinksEvent?: never; - followupPromptEvent?: never; - codeEvent?: never; - intentsEvent?: never; - interactionComponentsEvent?: never; - invalidStateEvent?: never; - error?: never; - $unknown?: never; - } - - /** - * Web Reference links event - * @public - */ - export interface SupplementaryWebLinksEventMember { - messageMetadataEvent?: never; - assistantResponseEvent?: never; - dryRunSucceedEvent?: never; - codeReferenceEvent?: never; - supplementaryWebLinksEvent: SupplementaryWebLinksEvent; - followupPromptEvent?: never; - codeEvent?: never; - intentsEvent?: never; - interactionComponentsEvent?: never; - invalidStateEvent?: never; - error?: never; - $unknown?: never; - } - - /** - * Followup prompt event - * @public - */ - export interface FollowupPromptEventMember { - messageMetadataEvent?: never; - assistantResponseEvent?: never; - dryRunSucceedEvent?: never; - codeReferenceEvent?: never; - supplementaryWebLinksEvent?: never; - followupPromptEvent: FollowupPromptEvent; - codeEvent?: never; - intentsEvent?: never; - interactionComponentsEvent?: never; - invalidStateEvent?: never; - error?: never; - $unknown?: never; - } - - /** - * Code Generated event - * @public - */ - export interface CodeEventMember { - messageMetadataEvent?: never; - assistantResponseEvent?: never; - dryRunSucceedEvent?: never; - codeReferenceEvent?: never; - supplementaryWebLinksEvent?: never; - followupPromptEvent?: never; - codeEvent: CodeEvent; - intentsEvent?: never; - interactionComponentsEvent?: never; - invalidStateEvent?: never; - error?: never; - $unknown?: never; - } - - /** - * Intents event - * @public - */ - export interface IntentsEventMember { - messageMetadataEvent?: never; - assistantResponseEvent?: never; - dryRunSucceedEvent?: never; - codeReferenceEvent?: never; - supplementaryWebLinksEvent?: never; - followupPromptEvent?: never; - codeEvent?: never; - intentsEvent: IntentsEvent; - interactionComponentsEvent?: never; - invalidStateEvent?: never; - error?: never; - $unknown?: never; - } - - /** - * Interactions components event - * @public - */ - export interface InteractionComponentsEventMember { - messageMetadataEvent?: never; - assistantResponseEvent?: never; - dryRunSucceedEvent?: never; - codeReferenceEvent?: never; - supplementaryWebLinksEvent?: never; - followupPromptEvent?: never; - codeEvent?: never; - intentsEvent?: never; - interactionComponentsEvent: InteractionComponentsEvent; - invalidStateEvent?: never; - error?: never; - $unknown?: never; - } - - /** - * Invalid State event - * @public - */ - export interface InvalidStateEventMember { - messageMetadataEvent?: never; - assistantResponseEvent?: never; - dryRunSucceedEvent?: never; - codeReferenceEvent?: never; - supplementaryWebLinksEvent?: never; - followupPromptEvent?: never; - codeEvent?: never; - intentsEvent?: never; - interactionComponentsEvent?: never; - invalidStateEvent: InvalidStateEvent; - error?: never; - $unknown?: never; - } - - /** - * Internal Server Exception - * @public - */ - export interface ErrorMember { - messageMetadataEvent?: never; - assistantResponseEvent?: never; - dryRunSucceedEvent?: never; - codeReferenceEvent?: never; - supplementaryWebLinksEvent?: never; - followupPromptEvent?: never; - codeEvent?: never; - intentsEvent?: never; - interactionComponentsEvent?: never; - invalidStateEvent?: never; - error: InternalServerException; - $unknown?: never; - } - - /** - * @public - */ - export interface $UnknownMember { - messageMetadataEvent?: never; - assistantResponseEvent?: never; - dryRunSucceedEvent?: never; - codeReferenceEvent?: never; - supplementaryWebLinksEvent?: never; - followupPromptEvent?: never; - codeEvent?: never; - intentsEvent?: never; - interactionComponentsEvent?: never; - invalidStateEvent?: never; - error?: never; - $unknown: [string, any]; - } - - export interface Visitor { - messageMetadataEvent: (value: MessageMetadataEvent) => T; - assistantResponseEvent: (value: AssistantResponseEvent) => T; - dryRunSucceedEvent: (value: DryRunSucceedEvent) => T; - codeReferenceEvent: (value: CodeReferenceEvent) => T; - supplementaryWebLinksEvent: (value: SupplementaryWebLinksEvent) => T; - followupPromptEvent: (value: FollowupPromptEvent) => T; - codeEvent: (value: CodeEvent) => T; - intentsEvent: (value: IntentsEvent) => T; - interactionComponentsEvent: (value: InteractionComponentsEvent) => T; - invalidStateEvent: (value: InvalidStateEvent) => T; - error: (value: InternalServerException) => T; - _: (name: string, value: any) => T; - } - - export const visit = ( - value: ChatResponseStream, - visitor: Visitor - ): T => { - if (value.messageMetadataEvent !== undefined) return visitor.messageMetadataEvent(value.messageMetadataEvent); - if (value.assistantResponseEvent !== undefined) return visitor.assistantResponseEvent(value.assistantResponseEvent); - if (value.dryRunSucceedEvent !== undefined) return visitor.dryRunSucceedEvent(value.dryRunSucceedEvent); - if (value.codeReferenceEvent !== undefined) return visitor.codeReferenceEvent(value.codeReferenceEvent); - if (value.supplementaryWebLinksEvent !== undefined) return visitor.supplementaryWebLinksEvent(value.supplementaryWebLinksEvent); - if (value.followupPromptEvent !== undefined) return visitor.followupPromptEvent(value.followupPromptEvent); - if (value.codeEvent !== undefined) return visitor.codeEvent(value.codeEvent); - if (value.intentsEvent !== undefined) return visitor.intentsEvent(value.intentsEvent); - if (value.interactionComponentsEvent !== undefined) return visitor.interactionComponentsEvent(value.interactionComponentsEvent); - if (value.invalidStateEvent !== undefined) return visitor.invalidStateEvent(value.invalidStateEvent); - if (value.error !== undefined) return visitor.error(value.error); - return visitor._(value.$unknown[0], value.$unknown[1]); - } - -} -/** - * @internal - */ -export const ChatResponseStreamFilterSensitiveLog = (obj: ChatResponseStream): any => { - if (obj.messageMetadataEvent !== undefined) return {messageMetadataEvent: - obj.messageMetadataEvent - }; - if (obj.assistantResponseEvent !== undefined) return {assistantResponseEvent: - AssistantResponseEventFilterSensitiveLog(obj.assistantResponseEvent) - }; - if (obj.dryRunSucceedEvent !== undefined) return {dryRunSucceedEvent: - obj.dryRunSucceedEvent - }; - if (obj.codeReferenceEvent !== undefined) return {codeReferenceEvent: - obj.codeReferenceEvent - }; - if (obj.supplementaryWebLinksEvent !== undefined) return {supplementaryWebLinksEvent: - SupplementaryWebLinksEventFilterSensitiveLog(obj.supplementaryWebLinksEvent) - }; - if (obj.followupPromptEvent !== undefined) return {followupPromptEvent: - FollowupPromptEventFilterSensitiveLog(obj.followupPromptEvent) - }; - if (obj.codeEvent !== undefined) return {codeEvent: - CodeEventFilterSensitiveLog(obj.codeEvent) - }; - if (obj.intentsEvent !== undefined) return {intentsEvent: - IntentsEventFilterSensitiveLog(obj.intentsEvent) - }; - if (obj.interactionComponentsEvent !== undefined) return {interactionComponentsEvent: - InteractionComponentsEventFilterSensitiveLog(obj.interactionComponentsEvent) - }; - if (obj.invalidStateEvent !== undefined) return {invalidStateEvent: - obj.invalidStateEvent - }; - if (obj.error !== undefined) return {error: - obj.error - }; - if (obj.$unknown !== undefined) return {[obj.$unknown[0]]: 'UNKNOWN'}; -} - -/** - * @public - * @enum - */ -export const ChatTriggerType = { - /** - * Indicates the Chat was triggered in response to a IDE diagnostic - */ - DIAGNOSTIC: "DIAGNOSTIC", - /** - * Indicates the Chat was triggered in response to an inline chat event - */ - INLINE_CHAT: "INLINE_CHAT", - /** - * Indicates the Chat was triggered due to an explicit chat request by an end-user - */ - MANUAL: "MANUAL", -} as const -/** - * @public - */ -export type ChatTriggerType = typeof ChatTriggerType[keyof typeof ChatTriggerType] - -/** - * @public - * @enum - */ -export const ContextTruncationScheme = { - ANALYSIS: "ANALYSIS", - GUMBY: "GUMBY", -} as const -/** - * @public - */ -export type ContextTruncationScheme = typeof ContextTruncationScheme[keyof typeof ContextTruncationScheme] - -/** - * Structure to represent the current state of a chat conversation. - * @public - */ -export interface ConversationState { - /** - * Unique identifier for the chat conversation stream - * @public - */ - conversationId?: string; - - /** - * Holds the history of chat messages. - * @public - */ - history?: (ChatMessage)[]; - - /** - * Holds the current message being processed or displayed. - * @public - */ - currentMessage: ChatMessage | undefined; - - /** - * Trigger Reason for Chat - * @public - */ - chatTriggerType: ChatTriggerType | undefined; - - customizationArn?: string; -} - -/** - * @internal - */ -export const ConversationStateFilterSensitiveLog = (obj: ConversationState): any => ({ - ...obj, - ...(obj.history && { history: - obj.history.map( - item => - ChatMessageFilterSensitiveLog(item) - ) - }), - ...(obj.currentMessage && { currentMessage: - ChatMessageFilterSensitiveLog(obj.currentMessage) - }), -}) - -/** - * This exception is translated to a 204 as it succeeded the IAM Auth. - * @public - */ -export class DryRunOperationException extends __BaseException { - readonly name: "DryRunOperationException" = "DryRunOperationException"; - readonly $fault: "client" = "client"; - responseCode?: number; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "DryRunOperationException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, DryRunOperationException.prototype); - this.responseCode = opts.responseCode; - } -} - -/** - * @public - * @enum - */ -export const TransformationDownloadArtifactType = { - CLIENT_INSTRUCTIONS: "ClientInstructions", - GENERATED_CODE: "GeneratedCode", - LOGS: "Logs", -} as const -/** - * @public - */ -export type TransformationDownloadArtifactType = typeof TransformationDownloadArtifactType[keyof typeof TransformationDownloadArtifactType] - -/** - * Transformation export context - * @public - */ -export interface TransformationExportContext { - downloadArtifactId: string | undefined; - downloadArtifactType: TransformationDownloadArtifactType | undefined; -} - -/** - * Unit test generation export context - * @public - */ -export interface UnitTestGenerationExportContext { - /** - * Test generation job group name - * @public - */ - testGenerationJobGroupName: string | undefined; - - testGenerationJobId?: string; -} - -/** - * Export Context - * @public - */ -export type ExportContext = - | ExportContext.TransformationExportContextMember - | ExportContext.UnitTestGenerationExportContextMember - | ExportContext.$UnknownMember - -/** - * @public - */ -export namespace ExportContext { - - /** - * Transformation export context - * @public - */ - export interface TransformationExportContextMember { - transformationExportContext: TransformationExportContext; - unitTestGenerationExportContext?: never; - $unknown?: never; - } - - /** - * Unit test generation export context - * @public - */ - export interface UnitTestGenerationExportContextMember { - transformationExportContext?: never; - unitTestGenerationExportContext: UnitTestGenerationExportContext; - $unknown?: never; - } - - /** - * @public - */ - export interface $UnknownMember { - transformationExportContext?: never; - unitTestGenerationExportContext?: never; - $unknown: [string, any]; - } - - export interface Visitor { - transformationExportContext: (value: TransformationExportContext) => T; - unitTestGenerationExportContext: (value: UnitTestGenerationExportContext) => T; - _: (name: string, value: any) => T; - } - - export const visit = ( - value: ExportContext, - visitor: Visitor - ): T => { - if (value.transformationExportContext !== undefined) return visitor.transformationExportContext(value.transformationExportContext); - if (value.unitTestGenerationExportContext !== undefined) return visitor.unitTestGenerationExportContext(value.unitTestGenerationExportContext); - return visitor._(value.$unknown[0], value.$unknown[1]); - } - -} - -/** - * @public - * @enum - */ -export const ExportIntent = { - /** - * Code Task Assist - */ - TASK_ASSIST: "TASK_ASSIST", - /** - * Code Transformation - */ - TRANSFORMATION: "TRANSFORMATION", - /** - * Unit Test - */ - UNIT_TESTS: "UNIT_TESTS", -} as const -/** - * @public - */ -export type ExportIntent = typeof ExportIntent[keyof typeof ExportIntent] - -/** - * Response Stream - * @public - */ -export type ResultArchiveStream = - | ResultArchiveStream.BinaryMetadataEventMember - | ResultArchiveStream.BinaryPayloadEventMember - | ResultArchiveStream.InternalServerExceptionMember - | ResultArchiveStream.$UnknownMember - -/** - * @public - */ -export namespace ResultArchiveStream { - - /** - * Payload Part - * @public - */ - export interface BinaryMetadataEventMember { - binaryMetadataEvent: BinaryMetadataEvent; - binaryPayloadEvent?: never; - internalServerException?: never; - $unknown?: never; - } - - /** - * Payload Part - * @public - */ - export interface BinaryPayloadEventMember { - binaryMetadataEvent?: never; - binaryPayloadEvent: BinaryPayloadEvent; - internalServerException?: never; - $unknown?: never; - } - - /** - * This exception is thrown when an unexpected error occurred during the processing of a request. - * @public - */ - export interface InternalServerExceptionMember { - binaryMetadataEvent?: never; - binaryPayloadEvent?: never; - internalServerException: InternalServerException; - $unknown?: never; - } - - /** - * @public - */ - export interface $UnknownMember { - binaryMetadataEvent?: never; - binaryPayloadEvent?: never; - internalServerException?: never; - $unknown: [string, any]; - } - - export interface Visitor { - binaryMetadataEvent: (value: BinaryMetadataEvent) => T; - binaryPayloadEvent: (value: BinaryPayloadEvent) => T; - internalServerException: (value: InternalServerException) => T; - _: (name: string, value: any) => T; - } - - export const visit = ( - value: ResultArchiveStream, - visitor: Visitor - ): T => { - if (value.binaryMetadataEvent !== undefined) return visitor.binaryMetadataEvent(value.binaryMetadataEvent); - if (value.binaryPayloadEvent !== undefined) return visitor.binaryPayloadEvent(value.binaryPayloadEvent); - if (value.internalServerException !== undefined) return visitor.internalServerException(value.internalServerException); - return visitor._(value.$unknown[0], value.$unknown[1]); - } - -} -/** - * @internal - */ -export const ResultArchiveStreamFilterSensitiveLog = (obj: ResultArchiveStream): any => { - if (obj.binaryMetadataEvent !== undefined) return {binaryMetadataEvent: - SENSITIVE_STRING - }; - if (obj.binaryPayloadEvent !== undefined) return {binaryPayloadEvent: - SENSITIVE_STRING - }; - if (obj.internalServerException !== undefined) return {internalServerException: - obj.internalServerException - }; - if (obj.$unknown !== undefined) return {[obj.$unknown[0]]: 'UNKNOWN'}; -} - -/** - * This exception is thrown when request was denied due to caller exceeding their usage limits - * @public - */ -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); - } -} - -/** - * Represents a Workspace state uploaded to S3 for Async Code Actions - * @public - */ -export interface WorkspaceState { - /** - * Upload ID representing an Upload using a PreSigned URL - * @public - */ - uploadId: string | undefined; - - /** - * Primary programming language of the Workspace - * @public - */ - programmingLanguage: ProgrammingLanguage | undefined; - - /** - * Workspace context truncation schemes based on usecase - * @public - */ - contextTruncationScheme?: ContextTruncationScheme; -} - -/** - * Structure to represent a new generate assistant response request. - * @public - */ -export interface GenerateAssistantResponseRequest { - /** - * Structure to represent the current state of a chat conversation. - * @public - */ - conversationState: ConversationState | undefined; - - profileArn?: string; -} - -/** - * @internal - */ -export const GenerateAssistantResponseRequestFilterSensitiveLog = (obj: GenerateAssistantResponseRequest): any => ({ - ...obj, - ...(obj.conversationState && { conversationState: - ConversationStateFilterSensitiveLog(obj.conversationState) - }), -}) - -/** - * Structure to represent generate assistant response response. - * @public - */ -export interface GenerateAssistantResponseResponse { - /** - * ID which represents a multi-turn conversation - * @public - */ - conversationId: string | undefined; - - /** - * Streaming events from UniDirectional Streaming Conversational APIs. - * @public - */ - generateAssistantResponseResponse: AsyncIterable | undefined; -} - -/** - * @internal - */ -export const GenerateAssistantResponseResponseFilterSensitiveLog = (obj: GenerateAssistantResponseResponse): any => ({ - ...obj, - ...(obj.generateAssistantResponseResponse && { generateAssistantResponseResponse: - 'STREAMING_CONTENT' - }), -}) - -/** - * Structure to represent a new ExportResultArchive request. - * @public - */ -export interface ExportResultArchiveRequest { - exportId: string | undefined; - /** - * Export Intent - * @public - */ - exportIntent: ExportIntent | undefined; - - /** - * Export Context - * @public - */ - exportContext?: ExportContext; -} - -/** - * Structure to represent ExportResultArchive response. - * @public - */ -export interface ExportResultArchiveResponse { - /** - * Response Stream - * @public - */ - body: AsyncIterable | undefined; -} - -/** - * @internal - */ -export const ExportResultArchiveResponseFilterSensitiveLog = (obj: ExportResultArchiveResponse): any => ({ - ...obj, - ...(obj.body && { body: - 'STREAMING_CONTENT' - }), -}) - -/** - * @public - * @enum - */ -export const Origin = { - /** - * AWS Chatbot - */ - CHATBOT: "CHATBOT", - /** - * AWS Management Console (https://.console.aws.amazon.com) - */ - CONSOLE: "CONSOLE", - /** - * AWS Documentation Website (https://docs.aws.amazon.com) - */ - DOCUMENTATION: "DOCUMENTATION", - /** - * Any IDE caller. - */ - IDE: "IDE", - /** - * AWS Marketing Website (https://aws.amazon.com) - */ - MARKETING: "MARKETING", - /** - * MD. - */ - MD: "MD", - /** - * AWS Mobile Application (ACMA) - */ - MOBILE: "MOBILE", - /** - * Internal Service Traffic (Integ Tests, Canaries, etc.). This is the default when no Origin header present in request. - */ - SERVICE_INTERNAL: "SERVICE_INTERNAL", - /** - * Unified Search in AWS Management Console (https://.console.aws.amazon.com) - */ - UNIFIED_SEARCH: "UNIFIED_SEARCH", - /** - * Origin header is not set. - */ - UNKNOWN: "UNKNOWN", -} as const -/** - * @public - */ -export type Origin = typeof Origin[keyof typeof Origin] - -/** - * Structure to represent a SendMessage request. - * @public - */ -export interface SendMessageRequest { - /** - * Structure to represent the current state of a chat conversation. - * @public - */ - conversationState: ConversationState | undefined; - - profileArn?: string; - /** - * The origin of the caller - * @public - */ - source?: Origin; - - dryRun?: boolean; -} - -/** - * @internal - */ -export const SendMessageRequestFilterSensitiveLog = (obj: SendMessageRequest): any => ({ - ...obj, - ...(obj.conversationState && { conversationState: - ConversationStateFilterSensitiveLog(obj.conversationState) - }), -}) - -/** - * Structure to represent a SendMessage response. - * @public - */ -export interface SendMessageResponse { - /** - * Streaming events from UniDirectional Streaming Conversational APIs. - * @public - */ - sendMessageResponse: AsyncIterable | undefined; -} - -/** - * @internal - */ -export const SendMessageResponseFilterSensitiveLog = (obj: SendMessageResponse): any => ({ - ...obj, - ...(obj.sendMessageResponse && { sendMessageResponse: - 'STREAMING_CONTENT' - }), -}) - -/** - * Structure to represent execute planning interaction request. - * @public - */ -export interface GenerateTaskAssistPlanRequest { - /** - * Structure to represent the current state of a chat conversation. - * @public - */ - conversationState: ConversationState | undefined; - - /** - * Represents a Workspace state uploaded to S3 for Async Code Actions - * @public - */ - workspaceState: WorkspaceState | undefined; -} - -/** - * @internal - */ -export const GenerateTaskAssistPlanRequestFilterSensitiveLog = (obj: GenerateTaskAssistPlanRequest): any => ({ - ...obj, - ...(obj.conversationState && { conversationState: - ConversationStateFilterSensitiveLog(obj.conversationState) - }), -}) - -/** - * Structure to represent execute planning interaction response. - * @public - */ -export interface GenerateTaskAssistPlanResponse { - /** - * Streaming events from UniDirectional Streaming Conversational APIs. - * @public - */ - planningResponseStream?: AsyncIterable; -} - -/** - * @internal - */ -export const GenerateTaskAssistPlanResponseFilterSensitiveLog = (obj: GenerateTaskAssistPlanResponse): any => ({ - ...obj, - ...(obj.planningResponseStream && { planningResponseStream: - 'STREAMING_CONTENT' - }), -}) diff --git a/core/codewhisperer-streaming/src/protocols/Aws_restJson1.ts b/core/codewhisperer-streaming/src/protocols/Aws_restJson1.ts deleted file mode 100644 index e22372b4f..000000000 --- a/core/codewhisperer-streaming/src/protocols/Aws_restJson1.ts +++ /dev/null @@ -1,977 +0,0 @@ -// smithy-typescript generated code -import { - ExportResultArchiveCommandInput, - ExportResultArchiveCommandOutput, -} from "../commands/ExportResultArchiveCommand"; -import { - GenerateAssistantResponseCommandInput, - GenerateAssistantResponseCommandOutput, -} from "../commands/GenerateAssistantResponseCommand"; -import { - GenerateTaskAssistPlanCommandInput, - GenerateTaskAssistPlanCommandOutput, -} from "../commands/GenerateTaskAssistPlanCommand"; -import { - SendMessageCommandInput, - SendMessageCommandOutput, -} from "../commands/SendMessageCommand"; -import { CodeWhispererStreamingServiceException as __BaseException } from "../models/CodeWhispererStreamingServiceException"; -import { - AccessDeniedException, - AppStudioState, - AssistantResponseEvent, - AssistantResponseMessage, - BinaryMetadataEvent, - BinaryPayloadEvent, - ChatMessage, - ChatResponseStream, - CodeEvent, - CodeReferenceEvent, - ConflictException, - ConsoleState, - ConversationState, - CursorState, - Diagnostic, - DocumentSymbol, - DryRunOperationException, - DryRunSucceedEvent, - EditorState, - EnvState, - EnvironmentVariable, - ExportContext, - FollowupPrompt, - FollowupPromptEvent, - GitState, - IntentsEvent, - InteractionComponent, - InteractionComponentEntry, - InteractionComponentsEvent, - InternalServerException, - InvalidStateEvent, - MessageMetadataEvent, - Position, - ProgrammingLanguage, - Range, - Reference, - RelevantTextDocument, - ResourceNotFoundException, - ResultArchiveStream, - RuntimeDiagnostic, - ServiceQuotaExceededException, - ShellHistoryEntry, - ShellState, - Span, - SupplementaryWebLink, - SupplementaryWebLinksEvent, - TextDocument, - TextDocumentDiagnostic, - ThrottlingException, - TransformationExportContext, - UnitTestGenerationExportContext, - UserInputMessage, - UserInputMessageContext, - UserSettings, - ValidationException, - WorkspaceState, -} from "../models/models_0"; -import { - loadRestJsonErrorCode, - parseJsonBody as parseBody, - parseJsonErrorBody as parseErrorBody, -} from "@aws-sdk/core"; -import { requestBuilder as rb } from "@smithy/core"; -import { - HttpRequest as __HttpRequest, - HttpResponse as __HttpResponse, -} from "@smithy/protocol-http"; -import { - decorateServiceException as __decorateServiceException, - expectString as __expectString, - _json, - collectBody, - map, - take, - withBaseException, -} from "@smithy/smithy-client"; -import { - Endpoint as __Endpoint, - EventStreamSerdeContext as __EventStreamSerdeContext, - ResponseMetadata as __ResponseMetadata, - SerdeContext as __SerdeContext, -} from "@smithy/types"; -import { v4 as generateIdempotencyToken } from "uuid"; - -/** - * serializeAws_restJson1ExportResultArchiveCommand - */ -export const se_ExportResultArchiveCommand = async( - input: ExportResultArchiveCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const b = rb(input, context); - const headers: any = { - 'content-type': 'application/json', - }; - b.bp("/exportResultArchive"); - let body: any; - body = JSON.stringify(take(input, { - 'exportContext': _ => _json(_), - 'exportId': [], - 'exportIntent': [], - })); - b.m("POST") - .h(headers) - .b(body); - return b.build(); -} - -/** - * serializeAws_restJson1GenerateAssistantResponseCommand - */ -export const se_GenerateAssistantResponseCommand = async( - input: GenerateAssistantResponseCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const b = rb(input, context); - const headers: any = { - 'content-type': 'application/json', - }; - b.bp("/generateAssistantResponse"); - let body: any; - body = JSON.stringify(take(input, { - 'conversationState': _ => _json(_), - 'profileArn': [], - })); - b.m("POST") - .h(headers) - .b(body); - return b.build(); -} - -/** - * serializeAws_restJson1GenerateTaskAssistPlanCommand - */ -export const se_GenerateTaskAssistPlanCommand = async( - input: GenerateTaskAssistPlanCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const b = rb(input, context); - const headers: any = { - 'content-type': 'application/json', - }; - b.bp("/generateTaskAssistPlan"); - let body: any; - body = JSON.stringify(take(input, { - 'conversationState': _ => _json(_), - 'workspaceState': _ => _json(_), - })); - b.m("POST") - .h(headers) - .b(body); - return b.build(); -} - -/** - * serializeAws_restJson1SendMessageCommand - */ -export const se_SendMessageCommand = async( - input: SendMessageCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const b = rb(input, context); - const headers: any = { - 'content-type': 'application/json', - }; - b.bp("/SendMessageStreaming"); - let body: any; - body = JSON.stringify(take(input, { - 'conversationState': _ => _json(_), - 'dryRun': [], - 'profileArn': [], - 'source': [], - })); - b.m("POST") - .h(headers) - .b(body); - return b.build(); -} - -/** - * deserializeAws_restJson1ExportResultArchiveCommand - */ -export const de_ExportResultArchiveCommand = async( - output: __HttpResponse, - context: __SerdeContext & __EventStreamSerdeContext -): Promise => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents: any = map({ - $metadata: deserializeMetadata(output), - }); - const data: any = output.body; - contents.body = de_ResultArchiveStream(data, context); - return contents; -} - -/** - * deserializeAws_restJson1GenerateAssistantResponseCommand - */ -export const de_GenerateAssistantResponseCommand = async( - output: __HttpResponse, - context: __SerdeContext & __EventStreamSerdeContext -): Promise => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents: any = map({ - $metadata: deserializeMetadata(output), - [_cI]: [, output.headers[_xacci]], - }); - const data: any = output.body; - contents.generateAssistantResponseResponse = de_ChatResponseStream(data, context); - return contents; -} - -/** - * deserializeAws_restJson1GenerateTaskAssistPlanCommand - */ -export const de_GenerateTaskAssistPlanCommand = async( - output: __HttpResponse, - context: __SerdeContext & __EventStreamSerdeContext -): Promise => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents: any = map({ - $metadata: deserializeMetadata(output), - }); - const data: any = output.body; - contents.planningResponseStream = de_ChatResponseStream(data, context); - return contents; -} - -/** - * deserializeAws_restJson1SendMessageCommand - */ -export const de_SendMessageCommand = async( - output: __HttpResponse, - context: __SerdeContext & __EventStreamSerdeContext -): Promise => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents: any = map({ - $metadata: deserializeMetadata(output), - }); - const data: any = output.body; - contents.sendMessageResponse = de_ChatResponseStream(data, context); - return contents; -} - -/** - * deserialize_Aws_restJson1CommandError - */ -const de_CommandError = 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.amazon.aws.codewhisperer#AccessDeniedException": - throw await de_AccessDeniedExceptionRes(parsedOutput, context); - case "ConflictException": - case "com.amazon.aws.codewhisperer#ConflictException": - throw await de_ConflictExceptionRes(parsedOutput, context); - case "InternalServerException": - case "com.amazon.aws.codewhisperer#InternalServerException": - throw await de_InternalServerExceptionRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazon.aws.codewhisperer#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - case "ThrottlingException": - case "com.amazon.aws.codewhisperer#ThrottlingException": - throw await de_ThrottlingExceptionRes(parsedOutput, context); - case "ValidationException": - case "com.amazon.aws.codewhisperer#ValidationException": - throw await de_ValidationExceptionRes(parsedOutput, context); - case "ServiceQuotaExceededException": - case "com.amazon.aws.codewhisperer#ServiceQuotaExceededException": - throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); - case "DryRunOperationException": - case "com.amazon.aws.codewhisperer#DryRunOperationException": - throw await de_DryRunOperationExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }) as never - } - } - - 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, - 'reason': __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, - 'reason': __expectString, - }); - Object.assign(contents, doc); - const exception = new ConflictException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return __decorateServiceException(exception, parsedOutput.body); - }; - - /** - * deserializeAws_restJson1DryRunOperationExceptionRes - */ - const de_DryRunOperationExceptionRes = 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 DryRunOperationException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return __decorateServiceException(exception, parsedOutput.body); - }; - - /** - * deserializeAws_restJson1InternalServerExceptionRes - */ - const de_InternalServerExceptionRes = 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 InternalServerException({ - $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, - }); - 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_restJson1ThrottlingExceptionRes - */ - const de_ThrottlingExceptionRes = 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 ThrottlingException({ - $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, - 'reason': __expectString, - }); - Object.assign(contents, doc); - const exception = new ValidationException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return __decorateServiceException(exception, parsedOutput.body); - }; - - /** - * deserializeAws_restJson1ChatResponseStream - */ - const de_ChatResponseStream = ( - output: any, - context: __SerdeContext & __EventStreamSerdeContext - ): AsyncIterable => { - return context.eventStreamMarshaller.deserialize( - output, - async event => { - if (event["messageMetadataEvent"] != null) { - return { - messageMetadataEvent: await de_MessageMetadataEvent_event(event["messageMetadataEvent"], context), - }; - } - if (event["assistantResponseEvent"] != null) { - return { - assistantResponseEvent: await de_AssistantResponseEvent_event(event["assistantResponseEvent"], context), - }; - } - if (event["dryRunSucceedEvent"] != null) { - return { - dryRunSucceedEvent: await de_DryRunSucceedEvent_event(event["dryRunSucceedEvent"], context), - }; - } - if (event["codeReferenceEvent"] != null) { - return { - codeReferenceEvent: await de_CodeReferenceEvent_event(event["codeReferenceEvent"], context), - }; - } - if (event["supplementaryWebLinksEvent"] != null) { - return { - supplementaryWebLinksEvent: await de_SupplementaryWebLinksEvent_event(event["supplementaryWebLinksEvent"], context), - }; - } - if (event["followupPromptEvent"] != null) { - return { - followupPromptEvent: await de_FollowupPromptEvent_event(event["followupPromptEvent"], context), - }; - } - if (event["codeEvent"] != null) { - return { - codeEvent: await de_CodeEvent_event(event["codeEvent"], context), - }; - } - if (event["intentsEvent"] != null) { - return { - intentsEvent: await de_IntentsEvent_event(event["intentsEvent"], context), - }; - } - if (event["interactionComponentsEvent"] != null) { - return { - interactionComponentsEvent: await de_InteractionComponentsEvent_event(event["interactionComponentsEvent"], context), - }; - } - if (event["invalidStateEvent"] != null) { - return { - invalidStateEvent: await de_InvalidStateEvent_event(event["invalidStateEvent"], context), - }; - } - if (event["error"] != null) { - return { - error: await de_InternalServerException_event(event["error"], context), - }; - } - return {$unknown: output}; - } - ); - } - /** - * deserializeAws_restJson1ResultArchiveStream - */ - const de_ResultArchiveStream = ( - output: any, - context: __SerdeContext & __EventStreamSerdeContext - ): AsyncIterable => { - return context.eventStreamMarshaller.deserialize( - output, - async event => { - if (event["binaryMetadataEvent"] != null) { - return { - binaryMetadataEvent: await de_BinaryMetadataEvent_event(event["binaryMetadataEvent"], context), - }; - } - if (event["binaryPayloadEvent"] != null) { - return { - binaryPayloadEvent: await de_BinaryPayloadEvent_event(event["binaryPayloadEvent"], context), - }; - } - if (event["internalServerException"] != null) { - return { - internalServerException: await de_InternalServerException_event(event["internalServerException"], context), - }; - } - return {$unknown: output}; - } - ); - } - const de_AssistantResponseEvent_event = async ( - output: any, - context: __SerdeContext - ): Promise => { - const contents: AssistantResponseEvent = {} as any; - const data: any = await parseBody(output.body, context); - Object.assign(contents, _json(data)); - return contents; - } - const de_BinaryMetadataEvent_event = async ( - output: any, - context: __SerdeContext - ): Promise => { - const contents: BinaryMetadataEvent = {} as any; - const data: any = await parseBody(output.body, context); - Object.assign(contents, _json(data)); - return contents; - } - const de_BinaryPayloadEvent_event = async ( - output: any, - context: __SerdeContext - ): Promise => { - const contents: BinaryPayloadEvent = {} as any; - const data: any = await parseBody(output.body, context); - Object.assign(contents, de_BinaryPayloadEvent(data, context)); - return contents; - } - const de_CodeEvent_event = async ( - output: any, - context: __SerdeContext - ): Promise => { - const contents: CodeEvent = {} as any; - const data: any = await parseBody(output.body, context); - Object.assign(contents, _json(data)); - return contents; - } - const de_CodeReferenceEvent_event = async ( - output: any, - context: __SerdeContext - ): Promise => { - const contents: CodeReferenceEvent = {} as any; - const data: any = await parseBody(output.body, context); - Object.assign(contents, _json(data)); - return contents; - } - const de_DryRunSucceedEvent_event = async ( - output: any, - context: __SerdeContext - ): Promise => { - const contents: DryRunSucceedEvent = {} as any; - const data: any = await parseBody(output.body, context); - Object.assign(contents, _json(data)); - return contents; - } - const de_FollowupPromptEvent_event = async ( - output: any, - context: __SerdeContext - ): Promise => { - const contents: FollowupPromptEvent = {} as any; - const data: any = await parseBody(output.body, context); - Object.assign(contents, _json(data)); - return contents; - } - const de_IntentsEvent_event = async ( - output: any, - context: __SerdeContext - ): Promise => { - const contents: IntentsEvent = {} as any; - const data: any = await parseBody(output.body, context); - Object.assign(contents, _json(data)); - return contents; - } - const de_InternalServerException_event = async ( - output: any, - context: __SerdeContext - ): Promise => { - const parsedOutput: any = { - ...output, - body: await parseBody(output.body, context) - }; - return de_InternalServerExceptionRes(parsedOutput, context); - } - const de_InvalidStateEvent_event = async ( - output: any, - context: __SerdeContext - ): Promise => { - const contents: InvalidStateEvent = {} as any; - const data: any = await parseBody(output.body, context); - Object.assign(contents, _json(data)); - return contents; - } - const de_MessageMetadataEvent_event = async ( - output: any, - context: __SerdeContext - ): Promise => { - const contents: MessageMetadataEvent = {} as any; - const data: any = await parseBody(output.body, context); - Object.assign(contents, _json(data)); - return contents; - } - const de_SupplementaryWebLinksEvent_event = async ( - output: any, - context: __SerdeContext - ): Promise => { - const contents: SupplementaryWebLinksEvent = {} as any; - const data: any = await parseBody(output.body, context); - Object.assign(contents, _json(data)); - return contents; - } - const de_InteractionComponentsEvent_event = async ( - output: any, - context: __SerdeContext - ): Promise => { - const contents: InteractionComponentsEvent = {} as any; - const data: any = await parseBody(output.body, context); - Object.assign(contents, de_InteractionComponentsEvent(data, context)); - return contents; - } - // se_AppStudioState omitted. - - // se_AssistantResponseMessage omitted. - - // se_ChatHistory omitted. - - // se_ChatMessage omitted. - - // se_ConsoleState omitted. - - // se_ConversationState omitted. - - // se_CursorState omitted. - - // se_Diagnostic omitted. - - // se_DocumentSymbol omitted. - - // se_DocumentSymbols omitted. - - // se_EditorState omitted. - - // se_EnvironmentVariable omitted. - - // se_EnvironmentVariables omitted. - - // se_EnvState omitted. - - // se_ExportContext omitted. - - // se_FollowupPrompt omitted. - - // se_GitState omitted. - - // se_Position omitted. - - // se_ProgrammingLanguage omitted. - - // se_Range omitted. - - // se_Reference omitted. - - // se_References omitted. - - // se_RelevantDocumentList omitted. - - // se_RelevantTextDocument omitted. - - // se_RuntimeDiagnostic omitted. - - // se_ShellHistory omitted. - - // se_ShellHistoryEntry omitted. - - // se_ShellState omitted. - - // se_Span omitted. - - // se_SupplementaryWebLink omitted. - - // se_SupplementaryWebLinks omitted. - - // se_TextDocument omitted. - - // se_TextDocumentDiagnostic omitted. - - // se_TransformationExportContext omitted. - - // se_UnitTestGenerationExportContext omitted. - - // se_UserInputMessage omitted. - - // se_UserInputMessageContext omitted. - - // se_UserSettings omitted. - - // se_WorkspaceState omitted. - - // de_AssistantResponseEvent omitted. - - // de_BinaryMetadataEvent omitted. - - /** - * deserializeAws_restJson1BinaryPayloadEvent - */ - const de_BinaryPayloadEvent = ( - output: any, - context: __SerdeContext - ): BinaryPayloadEvent => { - return take(output, { - 'bytes': context.base64Decoder, - }) as any; - } - - // de_CodeEvent omitted. - - // de_CodeReferenceEvent omitted. - - // de_DryRunSucceedEvent omitted. - - // de_FollowupPrompt omitted. - - // de_FollowupPromptEvent omitted. - - // de_IntentData omitted. - - // de_IntentDataType omitted. - - // de_IntentMap omitted. - - // de_IntentsEvent omitted. - - // de_InvalidStateEvent omitted. - - // de_MessageMetadataEvent omitted. - - // de_Reference omitted. - - // de_References omitted. - - // de_Span omitted. - - // de_SupplementaryWebLink omitted. - - // de_SupplementaryWebLinks omitted. - - // de_SupplementaryWebLinksEvent omitted. - - /** - * deserializeAws_restJson1InteractionComponentsEvent - */ - const de_InteractionComponentsEvent = ( - output: any, - context: __SerdeContext - ): InteractionComponentsEvent => { - return take(output, { - 'interactionComponentEntries': (_: any) => de_InteractionComponentEntryList(_, context), - }) as any; - } - - // de_Action omitted. - - // de_Alert omitted. - - // de_AlertComponent omitted. - - // de_AlertComponentList omitted. - - // de_CloudWatchTroubleshootingLink omitted. - - // de_InfrastructureUpdate omitted. - - // de_InfrastructureUpdateTransition omitted. - - /** - * deserializeAws_restJson1InteractionComponent - */ - const de_InteractionComponent = ( - output: any, - context: __SerdeContext - ): InteractionComponent => { - return take(output, { - 'action': _json, - 'alert': _json, - 'infrastructureUpdate': _json, - 'progress': _json, - 'resource': _json, - 'resourceList': _json, - 'section': _json, - 'step': _json, - 'suggestions': _json, - 'taskDetails': _json, - 'taskReference': _json, - 'text': _json, - }) as any; - } - - /** - * deserializeAws_restJson1InteractionComponentEntry - */ - const de_InteractionComponentEntry = ( - output: any, - context: __SerdeContext - ): InteractionComponentEntry => { - return take(output, { - 'interactionComponent': (_: any) => de_InteractionComponent(_, context), - 'interactionComponentId': __expectString, - }) as any; - } - - /** - * deserializeAws_restJson1InteractionComponentEntryList - */ - const de_InteractionComponentEntryList = ( - output: any, - context: __SerdeContext - ): (InteractionComponentEntry)[] => { - const retVal = (output || []).filter((e: any) => e != null).map((entry: any) => { - return de_InteractionComponentEntry(entry, context); - }); - return retVal; - } - - // de_ModuleLink omitted. - - // de_Progress omitted. - - // de_ProgressComponent omitted. - - // de_ProgressComponentList omitted. - - // de_Resource omitted. - - // de_ResourceList omitted. - - // de_Resources omitted. - - // de_Section omitted. - - // de_SectionComponent omitted. - - // de_SectionComponentList omitted. - - // de_Step omitted. - - // de_StepComponent omitted. - - // de_StepComponentList omitted. - - // de_Suggestion omitted. - - // de_SuggestionList omitted. - - // de_Suggestions omitted. - - // de_TaskAction omitted. - - // de_TaskActionConfirmation omitted. - - // de_TaskActionList omitted. - - // de_TaskActionNote omitted. - - // de_TaskActionPayload omitted. - - // de_TaskComponent omitted. - - // de_TaskComponentList omitted. - - // de_TaskDetails omitted. - - // de_TaskOverview omitted. - - // de_TaskReference omitted. - - // de_Text omitted. - - // de_WebLink 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 _cI = "conversationId"; - const _xacci = "x-amzn-codewhisperer-conversation-id"; diff --git a/core/codewhisperer-streaming/src/runtimeConfig.browser.ts b/core/codewhisperer-streaming/src/runtimeConfig.browser.ts deleted file mode 100644 index 58e6d27fe..000000000 --- a/core/codewhisperer-streaming/src/runtimeConfig.browser.ts +++ /dev/null @@ -1,51 +0,0 @@ -// 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 { eventStreamSerdeProvider } from "@smithy/eventstream-serde-browser"; -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 { CodeWhispererStreamingClientConfig } from "./CodeWhispererStreamingClient"; -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: CodeWhispererStreamingClientConfig) => { - const defaultsMode = resolveDefaultsModeConfig(config); - const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); - const clientSharedValues = getSharedRuntimeConfig(config); - return { - ...clientSharedValues, - ...config, - runtime: "browser", - defaultsMode, - bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version}), - eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, - maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, - region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: RequestHandler.create(config?.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/core/codewhisperer-streaming/src/runtimeConfig.native.ts b/core/codewhisperer-streaming/src/runtimeConfig.native.ts deleted file mode 100644 index 36c385cdb..000000000 --- a/core/codewhisperer-streaming/src/runtimeConfig.native.ts +++ /dev/null @@ -1,17 +0,0 @@ -// smithy-typescript generated code -import { Sha256 } from "@aws-crypto/sha256-js"; -import { CodeWhispererStreamingClientConfig } from "./CodeWhispererStreamingClient"; -import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; - -/** - * @internal - */ -export const getRuntimeConfig = (config: CodeWhispererStreamingClientConfig) => { - const browserDefaults = getBrowserRuntimeConfig(config); - return { - ...browserDefaults, - ...config, - runtime: "react-native", - sha256: config?.sha256 ?? Sha256, - }; -}; diff --git a/core/codewhisperer-streaming/src/runtimeConfig.shared.ts b/core/codewhisperer-streaming/src/runtimeConfig.shared.ts deleted file mode 100644 index 506018264..000000000 --- a/core/codewhisperer-streaming/src/runtimeConfig.shared.ts +++ /dev/null @@ -1,42 +0,0 @@ -// smithy-typescript generated code -import { defaultCodeWhispererStreamingHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider"; -import { defaultRegionInfoProvider } from "./endpoints"; -import { HttpBearerAuthSigner } from "@smithy/core"; -import { NoOpLogger } from "@smithy/smithy-client"; -import { IdentityProviderConfig } from "@smithy/types"; -import { parseUrl } from "@smithy/url-parser"; -import { - fromBase64, - toBase64, -} from "@smithy/util-base64"; -import { - fromUtf8, - toUtf8, -} from "@smithy/util-utf8"; -import { CodeWhispererStreamingClientConfig } from "./CodeWhispererStreamingClient"; - -/** - * @internal - */ -export const getRuntimeConfig = (config: CodeWhispererStreamingClientConfig) => { - return { - apiVersion: "2023-11-27", - base64Decoder: config?.base64Decoder ?? fromBase64, - base64Encoder: config?.base64Encoder ?? toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - extensions: config?.extensions ?? [], - httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultCodeWhispererStreamingHttpAuthSchemeProvider, - httpAuthSchemes: config?.httpAuthSchemes ?? [{ - schemeId: "smithy.api#httpBearerAuth", - identityProvider: (ipc: IdentityProviderConfig) => - ipc.getIdentityProvider("smithy.api#httpBearerAuth"), - signer: new HttpBearerAuthSigner(), - }], - logger: config?.logger ?? new NoOpLogger(), - regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider, - serviceId: config?.serviceId ?? "CodeWhispererStreaming", - urlParser: config?.urlParser ?? parseUrl, - utf8Decoder: config?.utf8Decoder ?? fromUtf8, - utf8Encoder: config?.utf8Encoder ?? toUtf8, - } -}; diff --git a/core/codewhisperer-streaming/src/runtimeConfig.ts b/core/codewhisperer-streaming/src/runtimeConfig.ts deleted file mode 100644 index b52b4f780..000000000 --- a/core/codewhisperer-streaming/src/runtimeConfig.ts +++ /dev/null @@ -1,69 +0,0 @@ -// smithy-typescript generated code -// @ts-ignore: package.json will be imported from dist folders -import packageInfo from "../package.json"; // eslint-disable-line - -import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core"; -import { - FromSsoInit, - nodeProvider, -} from "@aws-sdk/token-providers"; -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 { HttpBearerAuthSigner } from "@smithy/core"; -import { eventStreamSerdeProvider } from "@smithy/eventstream-serde-node"; -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 { IdentityProviderConfig } from "@smithy/types"; -import { calculateBodyLength } from "@smithy/util-body-length-node"; -import { DEFAULT_RETRY_MODE } from "@smithy/util-retry"; -import { CodeWhispererStreamingClientConfig } from "./CodeWhispererStreamingClient"; -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: any = (config: CodeWhispererStreamingClientConfig) => { - 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, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version}), - eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, - httpAuthSchemes: config?.httpAuthSchemes ?? [{ - schemeId: "smithy.api#httpBearerAuth", - identityProvider: (ipc: IdentityProviderConfig) => - ipc.getIdentityProvider("smithy.api#httpBearerAuth") || (async (idProps) => await nodeProvider(idProps as FromSsoInit)(idProps)), - signer: new HttpBearerAuthSigner(), - }], - maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: RequestHandler.create(config?.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/core/codewhisperer-streaming/src/runtimeExtensions.ts b/core/codewhisperer-streaming/src/runtimeExtensions.ts deleted file mode 100644 index 174ceda28..000000000 --- a/core/codewhisperer-streaming/src/runtimeExtensions.ts +++ /dev/null @@ -1,59 +0,0 @@ -// smithy-typescript generated code -import { - getHttpAuthExtensionConfiguration, - resolveHttpAuthRuntimeConfig, -} from "./auth/httpAuthExtensionConfiguration"; -import { - getAwsRegionExtensionConfiguration, - resolveAwsRegionExtensionConfiguration, -} from "@aws-sdk/region-config-resolver"; -import { - getHttpHandlerExtensionConfiguration, - resolveHttpHandlerRuntimeConfig, -} from "@smithy/protocol-http"; -import { - getDefaultExtensionConfiguration, - resolveDefaultRuntimeConfig, -} from "@smithy/smithy-client"; -import { CodeWhispererStreamingExtensionConfiguration } from "./extensionConfiguration"; - -/** - * @public - */ -export interface RuntimeExtension { - configure(extensionConfiguration: CodeWhispererStreamingExtensionConfiguration): void; -} - -/** - * @public - */ -export interface RuntimeExtensionsConfig { - extensions: RuntimeExtension[] -} - -const asPartial = >(t: T) => t; - -/** - * @internal - */ -export const resolveRuntimeExtensions = ( - runtimeConfig: any, - extensions: RuntimeExtension[] -) => { - const extensionConfiguration: CodeWhispererStreamingExtensionConfiguration = { - ...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)), - ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)), - ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)), - ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)), - }; - - extensions.forEach(extension => extension.configure(extensionConfiguration)); - - return { - ...runtimeConfig, - ...resolveAwsRegionExtensionConfiguration(extensionConfiguration), - ...resolveDefaultRuntimeConfig(extensionConfiguration), - ...resolveHttpHandlerRuntimeConfig(extensionConfiguration), - ...resolveHttpAuthRuntimeConfig(extensionConfiguration), - }; -} diff --git a/core/codewhisperer-streaming/tsconfig.cjs.json b/core/codewhisperer-streaming/tsconfig.cjs.json deleted file mode 100644 index 3567d85ba..000000000 --- a/core/codewhisperer-streaming/tsconfig.cjs.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "./tsconfig", - "compilerOptions": { - "outDir": "dist-cjs" - } -} diff --git a/core/codewhisperer-streaming/tsconfig.es.json b/core/codewhisperer-streaming/tsconfig.es.json deleted file mode 100644 index 809f57bde..000000000 --- a/core/codewhisperer-streaming/tsconfig.es.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./tsconfig", - "compilerOptions": { - "lib": ["dom"], - "module": "esnext", - "outDir": "dist-es" - } -} diff --git a/core/codewhisperer-streaming/tsconfig.json b/core/codewhisperer-streaming/tsconfig.json deleted file mode 100644 index e7f5ec56b..000000000 --- a/core/codewhisperer-streaming/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "@tsconfig/node16/tsconfig.json", - "compilerOptions": { - "downlevelIteration": true, - "importHelpers": true, - "incremental": true, - "removeComments": true, - "resolveJsonModule": true, - "rootDir": "src", - "useUnknownInCatchVariables": false - }, - "exclude": ["test/"] -} diff --git a/core/codewhisperer-streaming/tsconfig.types.json b/core/codewhisperer-streaming/tsconfig.types.json deleted file mode 100644 index 4c3dfa7b3..000000000 --- a/core/codewhisperer-streaming/tsconfig.types.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./tsconfig", - "compilerOptions": { - "removeComments": false, - "declaration": true, - "declarationDir": "dist-types", - "emitDeclarationOnly": true - }, - "exclude": ["test/**/*", "dist-types/**/*"] -} diff --git a/package-lock.json b/package-lock.json index bbe3931cd..8c4b77caf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -284,9 +284,35 @@ "node": ">=18.0.0" } }, - "core/codewhisperer-streaming": { - "name": "@amzn/codewhisperer-streaming", + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@ampproject/remapping/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@amzn/codewhisperer-streaming": { "version": "1.0.0", + "resolved": "file:core/codewhisperer-streaming/amzn-codewhisperer-streaming-1.0.0.tgz", + "integrity": "sha512-2htOiIO7BkSnaiNw4gkV0StZ2CDpJiTfTJQUxqLbkk0+E/BY3YR+yfxwNlg0KxwjZfThCWRWLvMAsbYnUc9TyA==", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", @@ -307,7 +333,7 @@ "@smithy/eventstream-serde-node": "^3.0.8", "@smithy/fetch-http-handler": "^3.2.8", "@smithy/hash-node": "^3.0.6", - "@smithy/invalid-dependency": "^3.0.8", + "@smithy/invalid-dependency": "^3.0.6", "@smithy/middleware-content-length": "^3.0.8", "@smithy/middleware-retry": "^3.0.21", "@smithy/middleware-serde": "^3.0.6", @@ -329,62 +355,10 @@ "tslib": "^2.6.2", "uuid": "^9.0.1" }, - "devDependencies": { - "@tsconfig/node16": "16.1.3", - "@types/node": "^22.9.0", - "@types/uuid": "^9.0.4", - "concurrently": "7.0.0", - "downlevel-dts": "0.10.1", - "rimraf": "^3.0.0", - "typescript": "~4.9.5" - }, "engines": { "node": ">=16.0.0" } }, - "core/codewhisperer-streaming/node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@ampproject/remapping/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@amzn/codewhisperer-streaming": { - "resolved": "core/codewhisperer-streaming", - "link": true - }, "node_modules/@amzn/device-sso-auth-lsp": { "resolved": "server/device-sso-auth-lsp", "link": true @@ -3393,19 +3367,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/runtime": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", - "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", - "dev": true, - "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/template": { "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", @@ -6092,13 +6053,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@tsconfig/node16": { - "version": "16.1.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-16.1.3.tgz", - "integrity": "sha512-9nTOUBn+EMKO6rtSZJk+DcqsfgtlERGT9XPJ5PRj/HNENPCBY1yu/JEj5wT6GLtbCLBO2k46SeXDaY0pjMqypw==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/adm-zip": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@types/adm-zip/-/adm-zip-0.5.7.tgz", @@ -8618,100 +8572,6 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "license": "MIT" }, - "node_modules/concurrently": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-7.0.0.tgz", - "integrity": "sha512-WKM7PUsI8wyXpF80H+zjHP32fsgsHNQfPLw/e70Z5dYkV7hF+rf8q3D+ScWJIEr57CpkO3OWBko6hwhQLPR8Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "date-fns": "^2.16.1", - "lodash": "^4.17.21", - "rxjs": "^6.6.3", - "spawn-command": "^0.0.2-1", - "supports-color": "^8.1.0", - "tree-kill": "^1.2.2", - "yargs": "^16.2.0" - }, - "bin": { - "concurrently": "dist/bin/concurrently.js" - }, - "engines": { - "node": "^12.20.0 || ^14.13.0 || >=16.0.0" - } - }, - "node_modules/concurrently/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/concurrently/node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/concurrently/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/concurrently/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/concurrently/node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, "node_modules/connect-history-api-fallback": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz", @@ -9137,23 +8997,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/date-fns": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", - "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.21.0" - }, - "engines": { - "node": ">=0.11" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" - } - }, "node_modules/dateformat": { "version": "4.6.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", @@ -9521,21 +9364,6 @@ "node": ">=8" } }, - "node_modules/downlevel-dts": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/downlevel-dts/-/downlevel-dts-0.10.1.tgz", - "integrity": "sha512-bwY63Y0Gfwotcly4vU6rB66m5txvfQzDGd1Gai9E9orqsDIswXKjkdR18Tm6TidnAk9+J5N68a5VMDO2bsQCKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.3.2", - "shelljs": "^0.8.3", - "typescript": "next" - }, - "bin": { - "downlevel-dts": "index.js" - } - }, "node_modules/dunder-proto": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.0.tgz", @@ -16142,13 +15970,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true, - "license": "MIT" - }, "node_modules/regexp.prototype.flags": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz", @@ -16413,26 +16234,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "tslib": "^1.9.0" - }, - "engines": { - "npm": ">=2.0.0" - } - }, - "node_modules/rxjs/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" - }, "node_modules/safe-array-concat": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", @@ -17125,12 +16926,6 @@ "node": ">=0.10.0" } }, - "node_modules/spawn-command": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2.tgz", - "integrity": "sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==", - "dev": true - }, "node_modules/spdy": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", @@ -17789,16 +17584,6 @@ "tslib": "2" } }, - "node_modules/tree-kill": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", - "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", - "dev": true, - "license": "MIT", - "bin": { - "tree-kill": "cli.js" - } - }, "node_modules/ts-api-utils": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", @@ -19667,7 +19452,7 @@ "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@amzn/codewhisperer-streaming": "*", + "@amzn/codewhisperer-streaming": "file:../../core/codewhisperer-streaming/amzn-codewhisperer-streaming-1.0.0.tgz", "@aws-sdk/util-retry": "^3.374.0", "@aws/chat-client-ui-types": "^0.1.0", "@aws/language-server-runtimes": "^0.2.31", diff --git a/server/aws-lsp-codewhisperer/.prettierignore b/server/aws-lsp-codewhisperer/.prettierignore index 5548d39c2..f1287fa3c 100644 --- a/server/aws-lsp-codewhisperer/.prettierignore +++ b/server/aws-lsp-codewhisperer/.prettierignore @@ -6,5 +6,4 @@ out/ **/obj/ src/client/sigv4/codewhisperersigv4client.d.ts src/client/token/codewhispererbearertokenclient.d.ts -src.gen/@amzn/codewhisperer-streaming/** **/*.md diff --git a/server/aws-lsp-codewhisperer/package.json b/server/aws-lsp-codewhisperer/package.json index 3f69f9656..c4eda38a5 100644 --- a/server/aws-lsp-codewhisperer/package.json +++ b/server/aws-lsp-codewhisperer/package.json @@ -27,7 +27,7 @@ "postinstall": "node ./script/install_transitive_dep.js" }, "dependencies": { - "@amzn/codewhisperer-streaming": "*", + "@amzn/codewhisperer-streaming": "file:../../core/codewhisperer-streaming/amzn-codewhisperer-streaming-1.0.0.tgz", "@aws-sdk/util-retry": "^3.374.0", "@aws/chat-client-ui-types": "^0.1.0", "@aws/language-server-runtimes": "^0.2.31", diff --git a/tsconfig.json b/tsconfig.json index 08fd9231d..794079dd8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,9 +21,6 @@ { "path": "./core/aws-lsp-core" }, - { - "path": "./core/codewhisperer-streaming" - }, { "path": "./server/aws-lsp-json" },