Skip to content

Commit 56e646d

Browse files
author
awstools
committed
feat(client-qbusiness): This is a general availability (GA) release of Amazon Q Business. Q Business enables employees in an enterprise to get comprehensive answers to complex questions and take actions through a unified, intuitive web-based chat experience - using an enterprise's existing content, data, and systems.
1 parent 6f5f3a1 commit 56e646d

24 files changed

+2665
-98
lines changed

clients/client-qbusiness/README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
AWS SDK for JavaScript QBusiness Client for Node.js, Browser and React Native.
88

9-
<note>
10-
<p>Amazon Q is in preview release and is subject to change.</p>
11-
</note>
129
<p>This is the <i>Amazon Q Business</i> API Reference. Amazon Q Business is a fully
1310
managed, generative-AI powered enterprise chat assistant that you can deploy within your
1411
organization. Amazon Q Business enhances employee productivity by supporting key tasks such
@@ -299,6 +296,14 @@ BatchPutDocument
299296

300297
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/BatchPutDocumentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/BatchPutDocumentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/BatchPutDocumentCommandOutput/)
301298

299+
</details>
300+
<details>
301+
<summary>
302+
Chat
303+
</summary>
304+
305+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/ChatCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ChatCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ChatCommandOutput/)
306+
302307
</details>
303308
<details>
304309
<summary>

clients/client-qbusiness/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
"@aws-crypto/sha256-js": "3.0.0",
2323
"@aws-sdk/core": "*",
2424
"@aws-sdk/credential-provider-node": "*",
25+
"@aws-sdk/eventstream-handler-node": "*",
26+
"@aws-sdk/middleware-eventstream": "*",
2527
"@aws-sdk/middleware-host-header": "*",
2628
"@aws-sdk/middleware-logger": "*",
2729
"@aws-sdk/middleware-recursion-detection": "*",
@@ -33,6 +35,9 @@
3335
"@aws-sdk/util-user-agent-node": "*",
3436
"@smithy/config-resolver": "^2.2.0",
3537
"@smithy/core": "^1.4.2",
38+
"@smithy/eventstream-serde-browser": "^2.2.0",
39+
"@smithy/eventstream-serde-config-resolver": "^2.2.0",
40+
"@smithy/eventstream-serde-node": "^2.2.0",
3641
"@smithy/fetch-http-handler": "^2.5.0",
3742
"@smithy/hash-node": "^2.2.0",
3843
"@smithy/invalid-dependency": "^2.2.0",

clients/client-qbusiness/src/QBusiness.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
BatchPutDocumentCommandInput,
1313
BatchPutDocumentCommandOutput,
1414
} from "./commands/BatchPutDocumentCommand";
15+
import { ChatCommand, ChatCommandInput, ChatCommandOutput } from "./commands/ChatCommand";
1516
import { ChatSyncCommand, ChatSyncCommandInput, ChatSyncCommandOutput } from "./commands/ChatSyncCommand";
1617
import {
1718
CreateApplicationCommand,
@@ -210,6 +211,7 @@ import { QBusinessClient, QBusinessClientConfig } from "./QBusinessClient";
210211
const commands = {
211212
BatchDeleteDocumentCommand,
212213
BatchPutDocumentCommand,
214+
ChatCommand,
213215
ChatSyncCommand,
214216
CreateApplicationCommand,
215217
CreateDataSourceCommand,
@@ -300,6 +302,13 @@ export interface QBusiness {
300302
cb: (err: any, data?: BatchPutDocumentCommandOutput) => void
301303
): void;
302304

305+
/**
306+
* @see {@link ChatCommand}
307+
*/
308+
chat(args: ChatCommandInput, options?: __HttpHandlerOptions): Promise<ChatCommandOutput>;
309+
chat(args: ChatCommandInput, cb: (err: any, data?: ChatCommandOutput) => void): void;
310+
chat(args: ChatCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ChatCommandOutput) => void): void;
311+
303312
/**
304313
* @see {@link ChatSyncCommand}
305314
*/
@@ -1030,10 +1039,7 @@ export interface QBusiness {
10301039
}
10311040

10321041
/**
1033-
* <note>
1034-
* <p>Amazon Q is in preview release and is subject to change.</p>
1035-
* </note>
1036-
* <p>This is the <i>Amazon Q Business</i> API Reference. Amazon Q Business is a fully
1042+
* <p>This is the <i>Amazon Q Business</i> API Reference. Amazon Q Business is a fully
10371043
* managed, generative-AI powered enterprise chat assistant that you can deploy within your
10381044
* organization. Amazon Q Business enhances employee productivity by supporting key tasks such
10391045
* as question-answering, knowledge discovery, writing email messages, summarizing text,

clients/client-qbusiness/src/QBusinessClient.ts

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
// smithy-typescript generated code
2+
import {
3+
EventStreamInputConfig,
4+
EventStreamResolvedConfig,
5+
resolveEventStreamConfig,
6+
} from "@aws-sdk/middleware-eventstream";
27
import {
38
getHostHeaderPlugin,
49
HostHeaderInputConfig,
@@ -13,12 +18,18 @@ import {
1318
UserAgentInputConfig,
1419
UserAgentResolvedConfig,
1520
} from "@aws-sdk/middleware-user-agent";
21+
import { EventStreamPayloadHandlerProvider as __EventStreamPayloadHandlerProvider } from "@aws-sdk/types";
1622
import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@smithy/config-resolver";
1723
import {
1824
DefaultIdentityProviderConfig,
1925
getHttpAuthSchemeEndpointRuleSetPlugin,
2026
getHttpSigningPlugin,
2127
} from "@smithy/core";
28+
import {
29+
EventStreamSerdeInputConfig,
30+
EventStreamSerdeResolvedConfig,
31+
resolveEventStreamSerdeConfig,
32+
} from "@smithy/eventstream-serde-config-resolver";
2233
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
2334
import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint";
2435
import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
@@ -37,6 +48,7 @@ import {
3748
Decoder as __Decoder,
3849
Encoder as __Encoder,
3950
EndpointV2 as __EndpointV2,
51+
EventStreamSerdeProvider as __EventStreamSerdeProvider,
4052
HashConstructor as __HashConstructor,
4153
HttpHandlerOptions as __HttpHandlerOptions,
4254
Logger as __Logger,
@@ -58,6 +70,7 @@ import {
5870
BatchDeleteDocumentCommandOutput,
5971
} from "./commands/BatchDeleteDocumentCommand";
6072
import { BatchPutDocumentCommandInput, BatchPutDocumentCommandOutput } from "./commands/BatchPutDocumentCommand";
73+
import { ChatCommandInput, ChatCommandOutput } from "./commands/ChatCommand";
6174
import { ChatSyncCommandInput, ChatSyncCommandOutput } from "./commands/ChatSyncCommand";
6275
import { CreateApplicationCommandInput, CreateApplicationCommandOutput } from "./commands/CreateApplicationCommand";
6376
import { CreateDataSourceCommandInput, CreateDataSourceCommandOutput } from "./commands/CreateDataSourceCommand";
@@ -158,6 +171,7 @@ export { __Client };
158171
export type ServiceInputTypes =
159172
| BatchDeleteDocumentCommandInput
160173
| BatchPutDocumentCommandInput
174+
| ChatCommandInput
161175
| ChatSyncCommandInput
162176
| CreateApplicationCommandInput
163177
| CreateDataSourceCommandInput
@@ -218,6 +232,7 @@ export type ServiceInputTypes =
218232
export type ServiceOutputTypes =
219233
| BatchDeleteDocumentCommandOutput
220234
| BatchPutDocumentCommandOutput
235+
| ChatCommandOutput
221236
| ChatSyncCommandOutput
222237
| CreateApplicationCommandOutput
223238
| CreateDataSourceCommandOutput
@@ -398,10 +413,21 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
398413
*/
399414
extensions?: RuntimeExtension[];
400415

416+
/**
417+
* The function that provides necessary utilities for generating and parsing event stream
418+
*/
419+
eventStreamSerdeProvider?: __EventStreamSerdeProvider;
420+
401421
/**
402422
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
403423
*/
404424
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
425+
426+
/**
427+
* The function that provides necessary utilities for handling request event stream.
428+
* @internal
429+
*/
430+
eventStreamPayloadHandlerProvider?: __EventStreamPayloadHandlerProvider;
405431
}
406432

407433
/**
@@ -414,7 +440,9 @@ export type QBusinessClientConfigType = Partial<__SmithyConfiguration<__HttpHand
414440
RetryInputConfig &
415441
HostHeaderInputConfig &
416442
UserAgentInputConfig &
443+
EventStreamSerdeInputConfig &
417444
HttpAuthSchemeInputConfig &
445+
EventStreamInputConfig &
418446
ClientInputEndpointParameters;
419447
/**
420448
* @public
@@ -434,7 +462,9 @@ export type QBusinessClientResolvedConfigType = __SmithyResolvedConfiguration<__
434462
RetryResolvedConfig &
435463
HostHeaderResolvedConfig &
436464
UserAgentResolvedConfig &
465+
EventStreamSerdeResolvedConfig &
437466
HttpAuthSchemeResolvedConfig &
467+
EventStreamResolvedConfig &
438468
ClientResolvedEndpointParameters;
439469
/**
440470
* @public
@@ -444,10 +474,7 @@ export type QBusinessClientResolvedConfigType = __SmithyResolvedConfiguration<__
444474
export interface QBusinessClientResolvedConfig extends QBusinessClientResolvedConfigType {}
445475

446476
/**
447-
* <note>
448-
* <p>Amazon Q is in preview release and is subject to change.</p>
449-
* </note>
450-
* <p>This is the <i>Amazon Q Business</i> API Reference. Amazon Q Business is a fully
477+
* <p>This is the <i>Amazon Q Business</i> API Reference. Amazon Q Business is a fully
451478
* managed, generative-AI powered enterprise chat assistant that you can deploy within your
452479
* organization. Amazon Q Business enhances employee productivity by supporting key tasks such
453480
* as question-answering, knowledge discovery, writing email messages, summarizing text,
@@ -547,10 +574,12 @@ export class QBusinessClient extends __Client<
547574
const _config_4 = resolveRetryConfig(_config_3);
548575
const _config_5 = resolveHostHeaderConfig(_config_4);
549576
const _config_6 = resolveUserAgentConfig(_config_5);
550-
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
551-
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
552-
super(_config_8);
553-
this.config = _config_8;
577+
const _config_7 = resolveEventStreamSerdeConfig(_config_6);
578+
const _config_8 = resolveHttpAuthSchemeConfig(_config_7);
579+
const _config_9 = resolveEventStreamConfig(_config_8);
580+
const _config_10 = resolveRuntimeExtensions(_config_9, configuration?.extensions || []);
581+
super(_config_10);
582+
this.config = _config_10;
554583
this.middlewareStack.use(getRetryPlugin(this.config));
555584
this.middlewareStack.use(getContentLengthPlugin(this.config));
556585
this.middlewareStack.use(getHostHeaderPlugin(this.config));

0 commit comments

Comments
 (0)