Skip to content

Commit f337d01

Browse files
authored
deps: upgrade codewhisperer-streaming client aws#5328
Problem The streaming client needs to be updated to access recent API changes. Solution Auto generate the client. Manually tested chat, /dev and /transform.
1 parent 366e44a commit f337d01

File tree

9 files changed

+1542
-428
lines changed

9 files changed

+1542
-428
lines changed

src.gen/@amzn/codewhisperer-streaming/README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ using your favorite package manager:
1919

2020
The AWS SDK is modulized by clients and commands.
2121
To send a request, you only need to import the `CodeWhispererStreamingClient` and
22-
the commands you need, for example `ExportResultArchiveCommand`:
22+
the commands you need, for example `ConverseStreamCommand`:
2323

2424
```js
2525
// ES5 example
26-
const { CodeWhispererStreamingClient, ExportResultArchiveCommand } = require("@amzn/codewhisperer-streaming");
26+
const { CodeWhispererStreamingClient, ConverseStreamCommand } = require("@amzn/codewhisperer-streaming");
2727
```
2828

2929
```ts
3030
// ES6+ example
31-
import { CodeWhispererStreamingClient, ExportResultArchiveCommand } from "@amzn/codewhisperer-streaming";
31+
import { CodeWhispererStreamingClient, ConverseStreamCommand } from "@amzn/codewhisperer-streaming";
3232
```
3333

3434
### Usage
@@ -45,7 +45,7 @@ To send a request, you:
4545
const client = new CodeWhispererStreamingClient({ region: "REGION" });
4646

4747
const params = { /** input parameters */ };
48-
const command = new ExportResultArchiveCommand(params);
48+
const command = new ConverseStreamCommand(params);
4949
```
5050

5151
#### Async/await
@@ -124,15 +124,15 @@ const client = new AWS.CodeWhispererStreaming({ region: "REGION" });
124124

125125
// async/await.
126126
try {
127-
const data = await client.exportResultArchive(params);
127+
const data = await client.converseStream(params);
128128
// process data.
129129
} catch (error) {
130130
// error handling.
131131
}
132132

133133
// Promises.
134134
client
135-
.exportResultArchive(params)
135+
.converseStream(params)
136136
.then((data) => {
137137
// process data.
138138
})
@@ -141,7 +141,7 @@ client
141141
});
142142

143143
// callbacks.
144-
client.exportResultArchive(params, (err, data) => {
144+
client.converseStream(params, (err, data) => {
145145
// process err and data.
146146
});
147147
```
@@ -560,3 +560,17 @@ UpdateTroubleshootingCommandResult
560560

561561
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codewhispererstreaming/classes/updatetroubleshootingcommandresultcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codewhispererstreaming/interfaces/updatetroubleshootingcommandresultcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codewhispererstreaming/interfaces/updatetroubleshootingcommandresultcommandoutput.html)
562562
</details>
563+
<details>
564+
<summary>
565+
ConverseStream
566+
</summary>
567+
568+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codewhispererstreaming/classes/conversestreamcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codewhispererstreaming/interfaces/conversestreamcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codewhispererstreaming/interfaces/conversestreamcommandoutput.html)
569+
</details>
570+
<details>
571+
<summary>
572+
GenerateInfrastructureCode
573+
</summary>
574+
575+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codewhispererstreaming/classes/generateinfrastructurecodecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codewhispererstreaming/interfaces/generateinfrastructurecodecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codewhispererstreaming/interfaces/generateinfrastructurecodecommandoutput.html)
576+
</details>

src.gen/@amzn/codewhisperer-streaming/src/CodeWhispererStreaming.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ import {
33
CodeWhispererStreamingClient,
44
CodeWhispererStreamingClientConfig,
55
} from "./CodeWhispererStreamingClient";
6+
import {
7+
ConverseStreamCommand,
8+
ConverseStreamCommandInput,
9+
ConverseStreamCommandOutput,
10+
} from "./commands/ConverseStreamCommand";
611
import {
712
ExportResultArchiveCommand,
813
ExportResultArchiveCommandInput,
@@ -25,6 +30,7 @@ const commands = {
2530
ExportResultArchiveCommand,
2631
GenerateAssistantResponseCommand,
2732
GenerateTaskAssistPlanCommand,
33+
ConverseStreamCommand,
2834
}
2935

3036
export interface CodeWhispererStreaming {
@@ -79,6 +85,23 @@ export interface CodeWhispererStreaming {
7985
cb: (err: any, data?: GenerateTaskAssistPlanCommandOutput) => void
8086
): void;
8187

88+
/**
89+
* @see {@link ConverseStreamCommand}
90+
*/
91+
converseStream(
92+
args: ConverseStreamCommandInput,
93+
options?: __HttpHandlerOptions,
94+
): Promise<ConverseStreamCommandOutput>;
95+
converseStream(
96+
args: ConverseStreamCommandInput,
97+
cb: (err: any, data?: ConverseStreamCommandOutput) => void
98+
): void;
99+
converseStream(
100+
args: ConverseStreamCommandInput,
101+
options: __HttpHandlerOptions,
102+
cb: (err: any, data?: ConverseStreamCommandOutput) => void
103+
): void;
104+
82105
}
83106

84107
/**

src.gen/@amzn/codewhisperer-streaming/src/CodeWhispererStreamingClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
// smithy-typescript generated code
2+
import {
3+
ConverseStreamCommandInput,
4+
ConverseStreamCommandOutput,
5+
} from "./commands/ConverseStreamCommand";
26
import {
37
ExportResultArchiveCommandInput,
48
ExportResultArchiveCommandOutput,
@@ -90,6 +94,7 @@ export { __Client }
9094
* @public
9195
*/
9296
export type ServiceInputTypes =
97+
| ConverseStreamCommandInput
9398
| ExportResultArchiveCommandInput
9499
| GenerateAssistantResponseCommandInput
95100
| GenerateTaskAssistPlanCommandInput;
@@ -98,6 +103,7 @@ export type ServiceInputTypes =
98103
* @public
99104
*/
100105
export type ServiceOutputTypes =
106+
| ConverseStreamCommandOutput
101107
| ExportResultArchiveCommandOutput
102108
| GenerateAssistantResponseCommandOutput
103109
| GenerateTaskAssistPlanCommandOutput;

0 commit comments

Comments
 (0)