Skip to content

Commit

Permalink
feat(client-qbusiness): This is a general availability (GA) release o…
Browse files Browse the repository at this point in the history
…f 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.
  • Loading branch information
awstools committed Apr 30, 2024
1 parent 6f5f3a1 commit 56e646d
Show file tree
Hide file tree
Showing 24 changed files with 2,665 additions and 98 deletions.
11 changes: 8 additions & 3 deletions clients/client-qbusiness/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

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

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

[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/)

</details>
<details>
<summary>
Chat
</summary>

[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/)

</details>
<details>
<summary>
Expand Down
5 changes: 5 additions & 0 deletions clients/client-qbusiness/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"@aws-crypto/sha256-js": "3.0.0",
"@aws-sdk/core": "*",
"@aws-sdk/credential-provider-node": "*",
"@aws-sdk/eventstream-handler-node": "*",
"@aws-sdk/middleware-eventstream": "*",
"@aws-sdk/middleware-host-header": "*",
"@aws-sdk/middleware-logger": "*",
"@aws-sdk/middleware-recursion-detection": "*",
Expand All @@ -33,6 +35,9 @@
"@aws-sdk/util-user-agent-node": "*",
"@smithy/config-resolver": "^2.2.0",
"@smithy/core": "^1.4.2",
"@smithy/eventstream-serde-browser": "^2.2.0",
"@smithy/eventstream-serde-config-resolver": "^2.2.0",
"@smithy/eventstream-serde-node": "^2.2.0",
"@smithy/fetch-http-handler": "^2.5.0",
"@smithy/hash-node": "^2.2.0",
"@smithy/invalid-dependency": "^2.2.0",
Expand Down
14 changes: 10 additions & 4 deletions clients/client-qbusiness/src/QBusiness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
BatchPutDocumentCommandInput,
BatchPutDocumentCommandOutput,
} from "./commands/BatchPutDocumentCommand";
import { ChatCommand, ChatCommandInput, ChatCommandOutput } from "./commands/ChatCommand";
import { ChatSyncCommand, ChatSyncCommandInput, ChatSyncCommandOutput } from "./commands/ChatSyncCommand";
import {
CreateApplicationCommand,
Expand Down Expand Up @@ -210,6 +211,7 @@ import { QBusinessClient, QBusinessClientConfig } from "./QBusinessClient";
const commands = {
BatchDeleteDocumentCommand,
BatchPutDocumentCommand,
ChatCommand,
ChatSyncCommand,
CreateApplicationCommand,
CreateDataSourceCommand,
Expand Down Expand Up @@ -300,6 +302,13 @@ export interface QBusiness {
cb: (err: any, data?: BatchPutDocumentCommandOutput) => void
): void;

/**
* @see {@link ChatCommand}
*/
chat(args: ChatCommandInput, options?: __HttpHandlerOptions): Promise<ChatCommandOutput>;
chat(args: ChatCommandInput, cb: (err: any, data?: ChatCommandOutput) => void): void;
chat(args: ChatCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ChatCommandOutput) => void): void;

/**
* @see {@link ChatSyncCommand}
*/
Expand Down Expand Up @@ -1030,10 +1039,7 @@ export interface QBusiness {
}

/**
* <note>
* <p>Amazon Q is in preview release and is subject to change.</p>
* </note>
* <p>This is the <i>Amazon Q Business</i> API Reference. Amazon Q Business is a fully
* <p>This is the <i>Amazon Q Business</i> API Reference. Amazon Q Business is a fully
* managed, generative-AI powered enterprise chat assistant that you can deploy within your
* organization. Amazon Q Business enhances employee productivity by supporting key tasks such
* as question-answering, knowledge discovery, writing email messages, summarizing text,
Expand Down
45 changes: 37 additions & 8 deletions clients/client-qbusiness/src/QBusinessClient.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// smithy-typescript generated code
import {
EventStreamInputConfig,
EventStreamResolvedConfig,
resolveEventStreamConfig,
} from "@aws-sdk/middleware-eventstream";
import {
getHostHeaderPlugin,
HostHeaderInputConfig,
Expand All @@ -13,12 +18,18 @@ import {
UserAgentInputConfig,
UserAgentResolvedConfig,
} from "@aws-sdk/middleware-user-agent";
import { EventStreamPayloadHandlerProvider as __EventStreamPayloadHandlerProvider } from "@aws-sdk/types";
import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@smithy/config-resolver";
import {
DefaultIdentityProviderConfig,
getHttpAuthSchemeEndpointRuleSetPlugin,
getHttpSigningPlugin,
} from "@smithy/core";
import {
EventStreamSerdeInputConfig,
EventStreamSerdeResolvedConfig,
resolveEventStreamSerdeConfig,
} from "@smithy/eventstream-serde-config-resolver";
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint";
import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
Expand All @@ -37,6 +48,7 @@ import {
Decoder as __Decoder,
Encoder as __Encoder,
EndpointV2 as __EndpointV2,
EventStreamSerdeProvider as __EventStreamSerdeProvider,
HashConstructor as __HashConstructor,
HttpHandlerOptions as __HttpHandlerOptions,
Logger as __Logger,
Expand All @@ -58,6 +70,7 @@ import {
BatchDeleteDocumentCommandOutput,
} from "./commands/BatchDeleteDocumentCommand";
import { BatchPutDocumentCommandInput, BatchPutDocumentCommandOutput } from "./commands/BatchPutDocumentCommand";
import { ChatCommandInput, ChatCommandOutput } from "./commands/ChatCommand";
import { ChatSyncCommandInput, ChatSyncCommandOutput } from "./commands/ChatSyncCommand";
import { CreateApplicationCommandInput, CreateApplicationCommandOutput } from "./commands/CreateApplicationCommand";
import { CreateDataSourceCommandInput, CreateDataSourceCommandOutput } from "./commands/CreateDataSourceCommand";
Expand Down Expand Up @@ -158,6 +171,7 @@ export { __Client };
export type ServiceInputTypes =
| BatchDeleteDocumentCommandInput
| BatchPutDocumentCommandInput
| ChatCommandInput
| ChatSyncCommandInput
| CreateApplicationCommandInput
| CreateDataSourceCommandInput
Expand Down Expand Up @@ -218,6 +232,7 @@ export type ServiceInputTypes =
export type ServiceOutputTypes =
| BatchDeleteDocumentCommandOutput
| BatchPutDocumentCommandOutput
| ChatCommandOutput
| ChatSyncCommandOutput
| CreateApplicationCommandOutput
| CreateDataSourceCommandOutput
Expand Down Expand Up @@ -398,10 +413,21 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
*/
extensions?: RuntimeExtension[];

/**
* The function that provides necessary utilities for generating and parsing event stream
*/
eventStreamSerdeProvider?: __EventStreamSerdeProvider;

/**
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
*/
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;

/**
* The function that provides necessary utilities for handling request event stream.
* @internal
*/
eventStreamPayloadHandlerProvider?: __EventStreamPayloadHandlerProvider;
}

/**
Expand All @@ -414,7 +440,9 @@ export type QBusinessClientConfigType = Partial<__SmithyConfiguration<__HttpHand
RetryInputConfig &
HostHeaderInputConfig &
UserAgentInputConfig &
EventStreamSerdeInputConfig &
HttpAuthSchemeInputConfig &
EventStreamInputConfig &
ClientInputEndpointParameters;
/**
* @public
Expand All @@ -434,7 +462,9 @@ export type QBusinessClientResolvedConfigType = __SmithyResolvedConfiguration<__
RetryResolvedConfig &
HostHeaderResolvedConfig &
UserAgentResolvedConfig &
EventStreamSerdeResolvedConfig &
HttpAuthSchemeResolvedConfig &
EventStreamResolvedConfig &
ClientResolvedEndpointParameters;
/**
* @public
Expand All @@ -444,10 +474,7 @@ export type QBusinessClientResolvedConfigType = __SmithyResolvedConfiguration<__
export interface QBusinessClientResolvedConfig extends QBusinessClientResolvedConfigType {}

/**
* <note>
* <p>Amazon Q is in preview release and is subject to change.</p>
* </note>
* <p>This is the <i>Amazon Q Business</i> API Reference. Amazon Q Business is a fully
* <p>This is the <i>Amazon Q Business</i> API Reference. Amazon Q Business is a fully
* managed, generative-AI powered enterprise chat assistant that you can deploy within your
* organization. Amazon Q Business enhances employee productivity by supporting key tasks such
* as question-answering, knowledge discovery, writing email messages, summarizing text,
Expand Down Expand Up @@ -547,10 +574,12 @@ export class QBusinessClient extends __Client<
const _config_4 = resolveRetryConfig(_config_3);
const _config_5 = resolveHostHeaderConfig(_config_4);
const _config_6 = resolveUserAgentConfig(_config_5);
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
super(_config_8);
this.config = _config_8;
const _config_7 = resolveEventStreamSerdeConfig(_config_6);
const _config_8 = resolveHttpAuthSchemeConfig(_config_7);
const _config_9 = resolveEventStreamConfig(_config_8);
const _config_10 = resolveRuntimeExtensions(_config_9, configuration?.extensions || []);
super(_config_10);
this.config = _config_10;
this.middlewareStack.use(getRetryPlugin(this.config));
this.middlewareStack.use(getContentLengthPlugin(this.config));
this.middlewareStack.use(getHostHeaderPlugin(this.config));
Expand Down
Loading

0 comments on commit 56e646d

Please sign in to comment.