Skip to content

Commit

Permalink
feat(client-qbusiness): Amazon Q Business now supports capabilities t…
Browse files Browse the repository at this point in the history
…o extract insights and answer questions from visual elements embedded within documents, a browser extension for Google Chrome, Mozilla Firefox, and Microsoft Edge, and attachments across conversations.
  • Loading branch information
awstools committed Dec 2, 2024
1 parent 2af53c3 commit 45e207b
Show file tree
Hide file tree
Showing 50 changed files with 1,875 additions and 171 deletions.
16 changes: 16 additions & 0 deletions clients/client-qbusiness/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,14 @@ GetIndex

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/GetIndexCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetIndexCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetIndexCommandOutput/)

</details>
<details>
<summary>
GetMedia
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/GetMediaCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetMediaCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetMediaCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -488,6 +496,14 @@ ListApplications

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/ListApplicationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListApplicationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListApplicationsCommandOutput/)

</details>
<details>
<summary>
ListAttachments
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/ListAttachmentsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListAttachmentsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListAttachmentsCommandOutput/)

</details>
<details>
<summary>
Expand Down
33 changes: 33 additions & 0 deletions clients/client-qbusiness/src/QBusiness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ import {
} from "./commands/GetDataSourceCommand";
import { GetGroupCommand, GetGroupCommandInput, GetGroupCommandOutput } from "./commands/GetGroupCommand";
import { GetIndexCommand, GetIndexCommandInput, GetIndexCommandOutput } from "./commands/GetIndexCommand";
import { GetMediaCommand, GetMediaCommandInput, GetMediaCommandOutput } from "./commands/GetMediaCommand";
import { GetPluginCommand, GetPluginCommandInput, GetPluginCommandOutput } from "./commands/GetPluginCommand";
import {
GetRetrieverCommand,
Expand All @@ -113,6 +114,11 @@ import {
ListApplicationsCommandInput,
ListApplicationsCommandOutput,
} from "./commands/ListApplicationsCommand";
import {
ListAttachmentsCommand,
ListAttachmentsCommandInput,
ListAttachmentsCommandOutput,
} from "./commands/ListAttachmentsCommand";
import {
ListConversationsCommand,
ListConversationsCommandInput,
Expand Down Expand Up @@ -235,11 +241,13 @@ const commands = {
GetDataSourceCommand,
GetGroupCommand,
GetIndexCommand,
GetMediaCommand,
GetPluginCommand,
GetRetrieverCommand,
GetUserCommand,
GetWebExperienceCommand,
ListApplicationsCommand,
ListAttachmentsCommand,
ListConversationsCommand,
ListDataSourcesCommand,
ListDataSourceSyncJobsCommand,
Expand Down Expand Up @@ -625,6 +633,17 @@ export interface QBusiness {
cb: (err: any, data?: GetIndexCommandOutput) => void
): void;

/**
* @see {@link GetMediaCommand}
*/
getMedia(args: GetMediaCommandInput, options?: __HttpHandlerOptions): Promise<GetMediaCommandOutput>;
getMedia(args: GetMediaCommandInput, cb: (err: any, data?: GetMediaCommandOutput) => void): void;
getMedia(
args: GetMediaCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetMediaCommandOutput) => void
): void;

/**
* @see {@link GetPluginCommand}
*/
Expand Down Expand Up @@ -693,6 +712,20 @@ export interface QBusiness {
cb: (err: any, data?: ListApplicationsCommandOutput) => void
): void;

/**
* @see {@link ListAttachmentsCommand}
*/
listAttachments(
args: ListAttachmentsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListAttachmentsCommandOutput>;
listAttachments(args: ListAttachmentsCommandInput, cb: (err: any, data?: ListAttachmentsCommandOutput) => void): void;
listAttachments(
args: ListAttachmentsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListAttachmentsCommandOutput) => void
): void;

/**
* @see {@link ListConversationsCommand}
*/
Expand Down
6 changes: 6 additions & 0 deletions clients/client-qbusiness/src/QBusinessClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,13 @@ import {
import { GetDataSourceCommandInput, GetDataSourceCommandOutput } from "./commands/GetDataSourceCommand";
import { GetGroupCommandInput, GetGroupCommandOutput } from "./commands/GetGroupCommand";
import { GetIndexCommandInput, GetIndexCommandOutput } from "./commands/GetIndexCommand";
import { GetMediaCommandInput, GetMediaCommandOutput } from "./commands/GetMediaCommand";
import { GetPluginCommandInput, GetPluginCommandOutput } from "./commands/GetPluginCommand";
import { GetRetrieverCommandInput, GetRetrieverCommandOutput } from "./commands/GetRetrieverCommand";
import { GetUserCommandInput, GetUserCommandOutput } from "./commands/GetUserCommand";
import { GetWebExperienceCommandInput, GetWebExperienceCommandOutput } from "./commands/GetWebExperienceCommand";
import { ListApplicationsCommandInput, ListApplicationsCommandOutput } from "./commands/ListApplicationsCommand";
import { ListAttachmentsCommandInput, ListAttachmentsCommandOutput } from "./commands/ListAttachmentsCommand";
import { ListConversationsCommandInput, ListConversationsCommandOutput } from "./commands/ListConversationsCommand";
import { ListDataSourcesCommandInput, ListDataSourcesCommandOutput } from "./commands/ListDataSourcesCommand";
import {
Expand Down Expand Up @@ -195,11 +197,13 @@ export type ServiceInputTypes =
| GetDataSourceCommandInput
| GetGroupCommandInput
| GetIndexCommandInput
| GetMediaCommandInput
| GetPluginCommandInput
| GetRetrieverCommandInput
| GetUserCommandInput
| GetWebExperienceCommandInput
| ListApplicationsCommandInput
| ListAttachmentsCommandInput
| ListConversationsCommandInput
| ListDataSourceSyncJobsCommandInput
| ListDataSourcesCommandInput
Expand Down Expand Up @@ -256,11 +260,13 @@ export type ServiceOutputTypes =
| GetDataSourceCommandOutput
| GetGroupCommandOutput
| GetIndexCommandOutput
| GetMediaCommandOutput
| GetPluginCommandOutput
| GetRetrieverCommandOutput
| GetUserCommandOutput
| GetWebExperienceCommandOutput
| ListApplicationsCommandOutput
| ListAttachmentsCommandOutput
| ListConversationsCommandOutput
| ListDataSourceSyncJobsCommandOutput
| ListDataSourcesCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export interface BatchDeleteDocumentCommandOutput extends BatchDeleteDocumentRes
*
* @throws {@link ConflictException} (client fault)
* <p>You are trying to perform an action that conflicts with the current status of your
* resource. Fix any inconsistences with your resources and try again.</p>
* resource. Fix any inconsistencies with your resources and try again.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>An issue occurred with the internal server used for your Amazon Q Business service. Wait
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ export interface BatchPutDocumentCommandOutput extends BatchPutDocumentResponse,
* roleArn: "STRING_VALUE",
* },
* },
* mediaExtractionConfiguration: { // MediaExtractionConfiguration
* imageExtractionConfiguration: { // ImageExtractionConfiguration
* imageExtractionStatus: "ENABLED" || "DISABLED", // required
* },
* },
* },
* ],
* roleArn: "STRING_VALUE",
Expand Down Expand Up @@ -186,7 +191,7 @@ export interface BatchPutDocumentCommandOutput extends BatchPutDocumentResponse,
*
* @throws {@link ConflictException} (client fault)
* <p>You are trying to perform an action that conflicts with the current status of your
* resource. Fix any inconsistences with your resources and try again.</p>
* resource. Fix any inconsistencies with your resources and try again.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>An issue occurred with the internal server used for your Amazon Q Business service. Wait
Expand Down
23 changes: 19 additions & 4 deletions clients/client-qbusiness/src/commands/ChatCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,14 @@ export interface ChatCommandOutput extends ChatOutput, __MetadataBearer {}
* },
* attachmentEvent: { // AttachmentInputEvent
* attachment: { // AttachmentInput
* name: "STRING_VALUE", // required
* data: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required
* data: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
* name: "STRING_VALUE",
* copyFrom: { // CopyFromSource Union: only one key present
* conversation: { // ConversationSource
* conversationId: "STRING_VALUE", // required
* attachmentId: "STRING_VALUE", // required
* },
* },
* },
* },
* actionExecutionEvent: { // ActionExecutionEvent
Expand Down Expand Up @@ -189,6 +195,8 @@ export interface ChatCommandOutput extends ChatOutput, __MetadataBearer {}
* // snippetExcerpt: { // SnippetExcerpt
* // text: "STRING_VALUE",
* // },
* // mediaId: "STRING_VALUE",
* // mediaMimeType: "STRING_VALUE",
* // },
* // ],
* // },
Expand Down Expand Up @@ -227,11 +235,13 @@ export interface ChatCommandOutput extends ChatOutput, __MetadataBearer {}
* // systemMessageId: "STRING_VALUE",
* // attachment: { // AttachmentOutput
* // name: "STRING_VALUE",
* // status: "FAILED" || "SUCCEEDED",
* // status: "FAILED" || "SUCCESS",
* // error: { // ErrorDetail
* // errorMessage: "STRING_VALUE",
* // errorCode: "InternalError" || "InvalidRequest" || "ResourceInactive" || "ResourceNotFound",
* // },
* // attachmentId: "STRING_VALUE",
* // conversationId: "STRING_VALUE",
* // },
* // },
* // authChallengeRequestEvent: { // AuthChallengeRequestEvent
Expand All @@ -254,7 +264,12 @@ export interface ChatCommandOutput extends ChatOutput, __MetadataBearer {}
*
* @throws {@link ConflictException} (client fault)
* <p>You are trying to perform an action that conflicts with the current status of your
* resource. Fix any inconsistences with your resources and try again.</p>
* resource. Fix any inconsistencies with your resources and try again.</p>
*
* @throws {@link ExternalResourceException} (client fault)
* <p>An external resource that you configured with your application is returning errors and
* preventing this operation from succeeding. Fix those errors and try again.
* </p>
*
* @throws {@link InternalServerException} (server fault)
* <p>An issue occurred with the internal server used for your Amazon Q Business service. Wait
Expand Down
23 changes: 19 additions & 4 deletions clients/client-qbusiness/src/commands/ChatSyncCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,14 @@ export interface ChatSyncCommandOutput extends ChatSyncOutput, __MetadataBearer
* userMessage: "STRING_VALUE",
* attachments: [ // AttachmentsInput
* { // AttachmentInput
* name: "STRING_VALUE", // required
* data: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required
* data: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
* name: "STRING_VALUE",
* copyFrom: { // CopyFromSource Union: only one key present
* conversation: { // ConversationSource
* conversationId: "STRING_VALUE", // required
* attachmentId: "STRING_VALUE", // required
* },
* },
* },
* ],
* actionExecution: { // ActionExecution
Expand Down Expand Up @@ -200,18 +206,22 @@ export interface ChatSyncCommandOutput extends ChatSyncOutput, __MetadataBearer
* // snippetExcerpt: { // SnippetExcerpt
* // text: "STRING_VALUE",
* // },
* // mediaId: "STRING_VALUE",
* // mediaMimeType: "STRING_VALUE",
* // },
* // ],
* // },
* // ],
* // failedAttachments: [ // AttachmentsOutput
* // { // AttachmentOutput
* // name: "STRING_VALUE",
* // status: "FAILED" || "SUCCEEDED",
* // status: "FAILED" || "SUCCESS",
* // error: { // ErrorDetail
* // errorMessage: "STRING_VALUE",
* // errorCode: "InternalError" || "InvalidRequest" || "ResourceInactive" || "ResourceNotFound",
* // },
* // attachmentId: "STRING_VALUE",
* // conversationId: "STRING_VALUE",
* // },
* // ],
* // };
Expand All @@ -230,7 +240,12 @@ export interface ChatSyncCommandOutput extends ChatSyncOutput, __MetadataBearer
*
* @throws {@link ConflictException} (client fault)
* <p>You are trying to perform an action that conflicts with the current status of your
* resource. Fix any inconsistences with your resources and try again.</p>
* resource. Fix any inconsistencies with your resources and try again.</p>
*
* @throws {@link ExternalResourceException} (client fault)
* <p>An external resource that you configured with your application is returning errors and
* preventing this operation from succeeding. Fix those errors and try again.
* </p>
*
* @throws {@link InternalServerException} (server fault)
* <p>An issue occurred with the internal server used for your Amazon Q Business service. Wait
Expand Down
21 changes: 10 additions & 11 deletions clients/client-qbusiness/src/commands/CreateApplicationCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,15 @@ export interface CreateApplicationCommandOutput extends CreateApplicationRespons
* <p>There are new tiers for Amazon Q Business. Not all features in Amazon Q Business Pro are
* also available in Amazon Q Business Lite. For information on what's included in
* Amazon Q Business Lite and what's included in Amazon Q Business Pro, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/tiers.html#user-sub-tiers">Amazon Q Business tiers</a>. You must use the Amazon Q Business console to assign
* subscription tiers to users.
* </p>
* <p>
* A Amazon Q Apps service linked role will be created if it's absent in the
* Amazon Web Services account when the QAppsConfiguration is enabled in the request.
* For more information, see
* <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/using-service-linked-roles-qapps.html">
* Using service-linked roles for Q Apps
* </a>
* </p>
* subscription tiers to users. </p>
* <p>An Amazon Q Apps service linked role will be created if it's absent in the
* Amazon Web Services account when <code>QAppsConfiguration</code> is enabled in
* the request. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/using-service-linked-roles-qapps.html"> Using
* service-linked roles for Q Apps</a>.</p>
* <p>When you create an application, Amazon Q Business may securely transmit data for
* processing from your selected Amazon Web Services region, but within your geography.
* For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/cross-region-inference.html">Cross region
* inference in Amazon Q Business</a>.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down Expand Up @@ -105,7 +104,7 @@ export interface CreateApplicationCommandOutput extends CreateApplicationRespons
*
* @throws {@link ConflictException} (client fault)
* <p>You are trying to perform an action that conflicts with the current status of your
* resource. Fix any inconsistences with your resources and try again.</p>
* resource. Fix any inconsistencies with your resources and try again.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>An issue occurred with the internal server used for your Amazon Q Business service. Wait
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse,
* roleArn: "STRING_VALUE",
* },
* },
* mediaExtractionConfiguration: { // MediaExtractionConfiguration
* imageExtractionConfiguration: { // ImageExtractionConfiguration
* imageExtractionStatus: "ENABLED" || "DISABLED", // required
* },
* },
* };
* const command = new CreateDataSourceCommand(input);
* const response = await client.send(command);
Expand All @@ -148,7 +153,7 @@ export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse,
*
* @throws {@link ConflictException} (client fault)
* <p>You are trying to perform an action that conflicts with the current status of your
* resource. Fix any inconsistences with your resources and try again.</p>
* resource. Fix any inconsistencies with your resources and try again.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>An issue occurred with the internal server used for your Amazon Q Business service. Wait
Expand Down
4 changes: 2 additions & 2 deletions clients/client-qbusiness/src/commands/CreateIndexCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export interface CreateIndexCommandOutput extends CreateIndexResponse, __Metadat
* const input = { // CreateIndexRequest
* applicationId: "STRING_VALUE", // required
* displayName: "STRING_VALUE", // required
* type: "ENTERPRISE" || "STARTER",
* description: "STRING_VALUE",
* type: "ENTERPRISE" || "STARTER",
* tags: [ // Tags
* { // Tag
* key: "STRING_VALUE", // required
Expand Down Expand Up @@ -80,7 +80,7 @@ export interface CreateIndexCommandOutput extends CreateIndexResponse, __Metadat
*
* @throws {@link ConflictException} (client fault)
* <p>You are trying to perform an action that conflicts with the current status of your
* resource. Fix any inconsistences with your resources and try again.</p>
* resource. Fix any inconsistencies with your resources and try again.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>An issue occurred with the internal server used for your Amazon Q Business service. Wait
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export interface CreatePluginCommandOutput extends CreatePluginResponse, __Metad
*
* @throws {@link ConflictException} (client fault)
* <p>You are trying to perform an action that conflicts with the current status of your
* resource. Fix any inconsistences with your resources and try again.</p>
* resource. Fix any inconsistencies with your resources and try again.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>An issue occurred with the internal server used for your Amazon Q Business service. Wait
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export interface CreateRetrieverCommandOutput extends CreateRetrieverResponse, _
*
* @throws {@link ConflictException} (client fault)
* <p>You are trying to perform an action that conflicts with the current status of your
* resource. Fix any inconsistences with your resources and try again.</p>
* resource. Fix any inconsistencies with your resources and try again.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>An issue occurred with the internal server used for your Amazon Q Business service. Wait
Expand Down
2 changes: 1 addition & 1 deletion clients/client-qbusiness/src/commands/CreateUserCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export interface CreateUserCommandOutput extends CreateUserResponse, __MetadataB
*
* @throws {@link ConflictException} (client fault)
* <p>You are trying to perform an action that conflicts with the current status of your
* resource. Fix any inconsistences with your resources and try again.</p>
* resource. Fix any inconsistencies with your resources and try again.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>An issue occurred with the internal server used for your Amazon Q Business service. Wait
Expand Down
Loading

0 comments on commit 45e207b

Please sign in to comment.