(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"
},