diff --git a/clients/client-qbusiness/README.md b/clients/client-qbusiness/README.md index e353e1987d2d9..693906b8d34c9 100644 --- a/clients/client-qbusiness/README.md +++ b/clients/client-qbusiness/README.md @@ -6,9 +6,6 @@ AWS SDK for JavaScript QBusiness Client for Node.js, Browser and React Native. - -

Amazon Q is in preview release and is subject to change.

-

This is the Amazon Q Business 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 @@ -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/) + +

+ +Chat + + +[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/) +
diff --git a/clients/client-qbusiness/package.json b/clients/client-qbusiness/package.json index 14f1051439604..4c275d247f3e3 100644 --- a/clients/client-qbusiness/package.json +++ b/clients/client-qbusiness/package.json @@ -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": "*", @@ -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", diff --git a/clients/client-qbusiness/src/QBusiness.ts b/clients/client-qbusiness/src/QBusiness.ts index 1f5b346d956a6..9f6846840e939 100644 --- a/clients/client-qbusiness/src/QBusiness.ts +++ b/clients/client-qbusiness/src/QBusiness.ts @@ -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, @@ -210,6 +211,7 @@ import { QBusinessClient, QBusinessClientConfig } from "./QBusinessClient"; const commands = { BatchDeleteDocumentCommand, BatchPutDocumentCommand, + ChatCommand, ChatSyncCommand, CreateApplicationCommand, CreateDataSourceCommand, @@ -300,6 +302,13 @@ export interface QBusiness { cb: (err: any, data?: BatchPutDocumentCommandOutput) => void ): void; + /** + * @see {@link ChatCommand} + */ + chat(args: ChatCommandInput, options?: __HttpHandlerOptions): Promise; + 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} */ @@ -1030,10 +1039,7 @@ export interface QBusiness { } /** - * - *

Amazon Q is in preview release and is subject to change.

- *
- *

This is the Amazon Q Business API Reference. Amazon Q Business is a fully + *

This is the Amazon Q Business 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, diff --git a/clients/client-qbusiness/src/QBusinessClient.ts b/clients/client-qbusiness/src/QBusinessClient.ts index c5c37b67c2732..e007bd29a7c8c 100644 --- a/clients/client-qbusiness/src/QBusinessClient.ts +++ b/clients/client-qbusiness/src/QBusinessClient.ts @@ -1,4 +1,9 @@ // smithy-typescript generated code +import { + EventStreamInputConfig, + EventStreamResolvedConfig, + resolveEventStreamConfig, +} from "@aws-sdk/middleware-eventstream"; import { getHostHeaderPlugin, HostHeaderInputConfig, @@ -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"; @@ -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, @@ -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"; @@ -158,6 +171,7 @@ export { __Client }; export type ServiceInputTypes = | BatchDeleteDocumentCommandInput | BatchPutDocumentCommandInput + | ChatCommandInput | ChatSyncCommandInput | CreateApplicationCommandInput | CreateDataSourceCommandInput @@ -218,6 +232,7 @@ export type ServiceInputTypes = export type ServiceOutputTypes = | BatchDeleteDocumentCommandOutput | BatchPutDocumentCommandOutput + | ChatCommandOutput | ChatSyncCommandOutput | CreateApplicationCommandOutput | CreateDataSourceCommandOutput @@ -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; } /** @@ -414,7 +440,9 @@ export type QBusinessClientConfigType = Partial<__SmithyConfiguration<__HttpHand RetryInputConfig & HostHeaderInputConfig & UserAgentInputConfig & + EventStreamSerdeInputConfig & HttpAuthSchemeInputConfig & + EventStreamInputConfig & ClientInputEndpointParameters; /** * @public @@ -434,7 +462,9 @@ export type QBusinessClientResolvedConfigType = __SmithyResolvedConfiguration<__ RetryResolvedConfig & HostHeaderResolvedConfig & UserAgentResolvedConfig & + EventStreamSerdeResolvedConfig & HttpAuthSchemeResolvedConfig & + EventStreamResolvedConfig & ClientResolvedEndpointParameters; /** * @public @@ -444,10 +474,7 @@ export type QBusinessClientResolvedConfigType = __SmithyResolvedConfiguration<__ export interface QBusinessClientResolvedConfig extends QBusinessClientResolvedConfigType {} /** - * - *

Amazon Q is in preview release and is subject to change.

- * - *

This is the Amazon Q Business API Reference. Amazon Q Business is a fully + *

This is the Amazon Q Business 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, @@ -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)); diff --git a/clients/client-qbusiness/src/commands/ChatCommand.ts b/clients/client-qbusiness/src/commands/ChatCommand.ts new file mode 100644 index 0000000000000..c98a8d8b37de1 --- /dev/null +++ b/clients/client-qbusiness/src/commands/ChatCommand.ts @@ -0,0 +1,313 @@ +// smithy-typescript generated code +import { getEventStreamPlugin } from "@aws-sdk/middleware-eventstream"; +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { ChatInput, ChatInputFilterSensitiveLog, ChatOutput, ChatOutputFilterSensitiveLog } from "../models/models_0"; +import { de_ChatCommand, se_ChatCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ChatCommand}. + */ +export interface ChatCommandInput extends ChatInput {} +/** + * @public + * + * The output of {@link ChatCommand}. + */ +export interface ChatCommandOutput extends ChatOutput, __MetadataBearer {} + +/** + *

Starts or continues a streaming Amazon Q Business conversation.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, ChatCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, ChatCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // ChatInput + * applicationId: "STRING_VALUE", // required + * userId: "STRING_VALUE", + * userGroups: [ // UserGroups + * "STRING_VALUE", + * ], + * conversationId: "STRING_VALUE", + * parentMessageId: "STRING_VALUE", + * clientToken: "STRING_VALUE", + * inputStream: { // ChatInputStream Union: only one key present + * configurationEvent: { // ConfigurationEvent + * chatMode: "RETRIEVAL_MODE" || "CREATOR_MODE" || "PLUGIN_MODE", + * chatModeConfiguration: { // ChatModeConfiguration Union: only one key present + * pluginConfiguration: { // PluginConfiguration + * pluginId: "STRING_VALUE", // required + * }, + * }, + * attributeFilter: { // AttributeFilter + * andAllFilters: [ // AttributeFilters + * { + * andAllFilters: [ + * "", + * ], + * orAllFilters: [ + * "", + * ], + * notFilter: "", + * equalsTo: { // DocumentAttribute + * name: "STRING_VALUE", // required + * value: { // DocumentAttributeValue Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ // DocumentAttributeStringListValue + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * }, + * containsAll: { + * name: "STRING_VALUE", // required + * value: {// Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * }, + * containsAny: { + * name: "STRING_VALUE", // required + * value: {// Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * }, + * greaterThan: { + * name: "STRING_VALUE", // required + * value: {// Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * }, + * greaterThanOrEquals: { + * name: "STRING_VALUE", // required + * value: {// Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * }, + * lessThan: "", + * lessThanOrEquals: "", + * }, + * ], + * orAllFilters: [ + * "", + * ], + * notFilter: "", + * equalsTo: "", + * containsAll: "", + * containsAny: "", + * greaterThan: "", + * greaterThanOrEquals: "", + * lessThan: "", + * lessThanOrEquals: "", + * }, + * }, + * textEvent: { // TextInputEvent + * userMessage: "STRING_VALUE", // required + * }, + * attachmentEvent: { // AttachmentInputEvent + * attachment: { // AttachmentInput + * name: "STRING_VALUE", // required + * data: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required + * }, + * }, + * actionExecutionEvent: { // ActionExecutionEvent + * pluginId: "STRING_VALUE", // required + * payload: { // ActionExecutionPayload // required + * "": { // ActionExecutionPayloadField + * value: "DOCUMENT_VALUE", // required + * }, + * }, + * payloadFieldNameSeparator: "STRING_VALUE", // required + * }, + * endOfInputEvent: {}, + * authChallengeResponseEvent: { // AuthChallengeResponseEvent + * responseMap: { // AuthorizationResponseMap // required + * "": "STRING_VALUE", + * }, + * }, + * }, + * }; + * const command = new ChatCommand(input); + * const response = await client.send(command); + * // { // ChatOutput + * // outputStream: { // ChatOutputStream Union: only one key present + * // textEvent: { // TextOutputEvent + * // conversationId: "STRING_VALUE", + * // userMessageId: "STRING_VALUE", + * // systemMessageId: "STRING_VALUE", + * // systemMessage: "STRING_VALUE", + * // }, + * // metadataEvent: { // MetadataEvent + * // conversationId: "STRING_VALUE", + * // userMessageId: "STRING_VALUE", + * // systemMessageId: "STRING_VALUE", + * // sourceAttributions: [ // SourceAttributions + * // { // SourceAttribution + * // title: "STRING_VALUE", + * // snippet: "STRING_VALUE", + * // url: "STRING_VALUE", + * // citationNumber: Number("int"), + * // updatedAt: new Date("TIMESTAMP"), + * // textMessageSegments: [ // TextSegmentList + * // { // TextSegment + * // beginOffset: Number("int"), + * // endOffset: Number("int"), + * // snippetExcerpt: { // SnippetExcerpt + * // text: "STRING_VALUE", + * // }, + * // }, + * // ], + * // }, + * // ], + * // finalTextMessage: "STRING_VALUE", + * // }, + * // actionReviewEvent: { // ActionReviewEvent + * // conversationId: "STRING_VALUE", + * // userMessageId: "STRING_VALUE", + * // systemMessageId: "STRING_VALUE", + * // pluginId: "STRING_VALUE", + * // pluginType: "SERVICE_NOW" || "SALESFORCE" || "JIRA" || "ZENDESK" || "CUSTOM", + * // payload: { // ActionReviewPayload + * // "": { // ActionReviewPayloadField + * // displayName: "STRING_VALUE", + * // displayOrder: Number("int"), + * // displayDescription: "STRING_VALUE", + * // type: "STRING" || "NUMBER" || "ARRAY" || "BOOLEAN", + * // value: "DOCUMENT_VALUE", + * // allowedValues: [ // ActionReviewPayloadFieldAllowedValues + * // { // ActionReviewPayloadFieldAllowedValue + * // value: "DOCUMENT_VALUE", + * // displayValue: "DOCUMENT_VALUE", + * // }, + * // ], + * // allowedFormat: "STRING_VALUE", + * // required: true || false, + * // }, + * // }, + * // payloadFieldNameSeparator: "STRING_VALUE", + * // }, + * // failedAttachmentEvent: { // FailedAttachmentEvent + * // conversationId: "STRING_VALUE", + * // userMessageId: "STRING_VALUE", + * // systemMessageId: "STRING_VALUE", + * // attachment: { // AttachmentOutput + * // name: "STRING_VALUE", + * // status: "FAILED" || "SUCCEEDED", + * // error: { // ErrorDetail + * // errorMessage: "STRING_VALUE", + * // errorCode: "InternalError" || "InvalidRequest" || "ResourceInactive" || "ResourceNotFound", + * // }, + * // }, + * // }, + * // authChallengeRequestEvent: { // AuthChallengeRequestEvent + * // authorizationUrl: "STRING_VALUE", // required + * // }, + * // }, + * // }; + * + * ``` + * + * @param ChatCommandInput - {@link ChatCommandInput} + * @returns {@link ChatCommandOutput} + * @see {@link ChatCommandInput} for command's `input` shape. + * @see {@link ChatCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

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.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q Business service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link LicenseNotFoundException} (client fault) + *

You don't have permissions to perform the action because your license is inactive. Ask + * your admin to activate your license and try again after your licence is active.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q Business service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + * @public + */ +export class ChatCommand extends $Command + .classBuilder< + ChatCommandInput, + ChatCommandOutput, + QBusinessClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: QBusinessClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + getEventStreamPlugin(config), + ]; + }) + .s("ExpertQ", "Chat", { + /** + * @internal + */ + eventStream: { + input: true, + output: true, + }, + }) + .n("QBusinessClient", "ChatCommand") + .f(ChatInputFilterSensitiveLog, ChatOutputFilterSensitiveLog) + .ser(se_ChatCommand) + .de(de_ChatCommand) + .build() {} diff --git a/clients/client-qbusiness/src/commands/ChatSyncCommand.ts b/clients/client-qbusiness/src/commands/ChatSyncCommand.ts index 9bec835d2d2a8..4958e46ce10c1 100644 --- a/clients/client-qbusiness/src/commands/ChatSyncCommand.ts +++ b/clients/client-qbusiness/src/commands/ChatSyncCommand.ts @@ -56,6 +56,11 @@ export interface ChatSyncCommandOutput extends ChatSyncOutput, __MetadataBearer * }, * payloadFieldNameSeparator: "STRING_VALUE", // required * }, + * authChallengeResponse: { // AuthChallengeResponse + * responseMap: { // AuthorizationResponseMap // required + * "": "STRING_VALUE", + * }, + * }, * conversationId: "STRING_VALUE", * parentMessageId: "STRING_VALUE", * attributeFilter: { // AttributeFilter @@ -156,11 +161,12 @@ export interface ChatSyncCommandOutput extends ChatSyncOutput, __MetadataBearer * // userMessageId: "STRING_VALUE", * // actionReview: { // ActionReview * // pluginId: "STRING_VALUE", - * // pluginType: "SERVICE_NOW" || "SALESFORCE" || "JIRA" || "ZENDESK", + * // pluginType: "SERVICE_NOW" || "SALESFORCE" || "JIRA" || "ZENDESK" || "CUSTOM", * // payload: { // ActionReviewPayload * // "": { // ActionReviewPayloadField * // displayName: "STRING_VALUE", * // displayOrder: Number("int"), + * // displayDescription: "STRING_VALUE", * // type: "STRING" || "NUMBER" || "ARRAY" || "BOOLEAN", * // value: "DOCUMENT_VALUE", * // allowedValues: [ // ActionReviewPayloadFieldAllowedValues @@ -169,11 +175,15 @@ export interface ChatSyncCommandOutput extends ChatSyncOutput, __MetadataBearer * // displayValue: "DOCUMENT_VALUE", * // }, * // ], + * // allowedFormat: "STRING_VALUE", * // required: true || false, * // }, * // }, * // payloadFieldNameSeparator: "STRING_VALUE", * // }, + * // authChallengeRequest: { // AuthChallengeRequest + * // authorizationUrl: "STRING_VALUE", // required + * // }, * // sourceAttributions: [ // SourceAttributions * // { // SourceAttribution * // title: "STRING_VALUE", @@ -185,6 +195,9 @@ export interface ChatSyncCommandOutput extends ChatSyncOutput, __MetadataBearer * // { // TextSegment * // beginOffset: Number("int"), * // endOffset: Number("int"), + * // snippetExcerpt: { // SnippetExcerpt + * // text: "STRING_VALUE", + * // }, * // }, * // ], * // }, diff --git a/clients/client-qbusiness/src/commands/CreateApplicationCommand.ts b/clients/client-qbusiness/src/commands/CreateApplicationCommand.ts index ff4f5aaeea1f5..129a39f4fd128 100644 --- a/clients/client-qbusiness/src/commands/CreateApplicationCommand.ts +++ b/clients/client-qbusiness/src/commands/CreateApplicationCommand.ts @@ -32,6 +32,13 @@ export interface CreateApplicationCommandOutput extends CreateApplicationRespons /** *

Creates an Amazon Q Business application.

+ * + *

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 Amazon Q Business tiers. + * You must use the Amazon Q Business console to assign subscription tiers to users.

+ *
* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript @@ -40,7 +47,7 @@ export interface CreateApplicationCommandOutput extends CreateApplicationRespons * const client = new QBusinessClient(config); * const input = { // CreateApplicationRequest * displayName: "STRING_VALUE", // required - * roleArn: "STRING_VALUE", // required + * roleArn: "STRING_VALUE", * identityCenterInstanceArn: "STRING_VALUE", * description: "STRING_VALUE", * encryptionConfiguration: { // EncryptionConfiguration diff --git a/clients/client-qbusiness/src/commands/CreateIndexCommand.ts b/clients/client-qbusiness/src/commands/CreateIndexCommand.ts index 9265c4867f249..d0eb26190e7f4 100644 --- a/clients/client-qbusiness/src/commands/CreateIndexCommand.ts +++ b/clients/client-qbusiness/src/commands/CreateIndexCommand.ts @@ -45,6 +45,7 @@ export interface CreateIndexCommandOutput extends CreateIndexResponse, __Metadat * const input = { // CreateIndexRequest * applicationId: "STRING_VALUE", // required * displayName: "STRING_VALUE", // required + * type: "ENTERPRISE" || "STARTER", * description: "STRING_VALUE", * tags: [ // Tags * { // Tag diff --git a/clients/client-qbusiness/src/commands/CreatePluginCommand.ts b/clients/client-qbusiness/src/commands/CreatePluginCommand.ts index 00a835741ed80..4e9588ac630d3 100644 --- a/clients/client-qbusiness/src/commands/CreatePluginCommand.ts +++ b/clients/client-qbusiness/src/commands/CreatePluginCommand.ts @@ -5,7 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; -import { CreatePluginRequest, CreatePluginResponse } from "../models/models_0"; +import { CreatePluginRequest, CreatePluginRequestFilterSensitiveLog, CreatePluginResponse } from "../models/models_0"; import { de_CreatePluginCommand, se_CreatePluginCommand } from "../protocols/Aws_restJson1"; import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; @@ -37,8 +37,7 @@ export interface CreatePluginCommandOutput extends CreatePluginResponse, __Metad * const input = { // CreatePluginRequest * applicationId: "STRING_VALUE", // required * displayName: "STRING_VALUE", // required - * type: "SERVICE_NOW" || "SALESFORCE" || "JIRA" || "ZENDESK", // required - * serverUrl: "STRING_VALUE", // required + * type: "SERVICE_NOW" || "SALESFORCE" || "JIRA" || "ZENDESK" || "CUSTOM", // required * authConfiguration: { // PluginAuthConfiguration Union: only one key present * basicAuthConfiguration: { // BasicAuthConfiguration * secretArn: "STRING_VALUE", // required @@ -48,6 +47,19 @@ export interface CreatePluginCommandOutput extends CreatePluginResponse, __Metad * secretArn: "STRING_VALUE", // required * roleArn: "STRING_VALUE", // required * }, + * noAuthConfiguration: {}, + * }, + * serverUrl: "STRING_VALUE", + * customPluginConfiguration: { // CustomPluginConfiguration + * description: "STRING_VALUE", // required + * apiSchemaType: "OPEN_API_V3", // required + * apiSchema: { // APISchema Union: only one key present + * payload: "STRING_VALUE", + * s3: { // S3 + * bucket: "STRING_VALUE", // required + * key: "STRING_VALUE", // required + * }, + * }, * }, * tags: [ // Tags * { // Tag @@ -62,6 +74,7 @@ export interface CreatePluginCommandOutput extends CreatePluginResponse, __Metad * // { // CreatePluginResponse * // pluginId: "STRING_VALUE", * // pluginArn: "STRING_VALUE", + * // buildStatus: "READY" || "CREATE_IN_PROGRESS" || "CREATE_FAILED" || "UPDATE_IN_PROGRESS" || "UPDATE_FAILED" || "DELETE_IN_PROGRESS" || "DELETE_FAILED", * // }; * * ``` @@ -123,7 +136,7 @@ export class CreatePluginCommand extends $Command }) .s("ExpertQ", "CreatePlugin", {}) .n("QBusinessClient", "CreatePluginCommand") - .f(void 0, void 0) + .f(CreatePluginRequestFilterSensitiveLog, void 0) .ser(se_CreatePluginCommand) .de(de_CreatePluginCommand) .build() {} diff --git a/clients/client-qbusiness/src/commands/GetIndexCommand.ts b/clients/client-qbusiness/src/commands/GetIndexCommand.ts index 010333e86055e..8f13ec46de5da 100644 --- a/clients/client-qbusiness/src/commands/GetIndexCommand.ts +++ b/clients/client-qbusiness/src/commands/GetIndexCommand.ts @@ -44,6 +44,7 @@ export interface GetIndexCommandOutput extends GetIndexResponse, __MetadataBeare * // applicationId: "STRING_VALUE", * // indexId: "STRING_VALUE", * // displayName: "STRING_VALUE", + * // type: "ENTERPRISE" || "STARTER", * // indexArn: "STRING_VALUE", * // status: "CREATING" || "ACTIVE" || "DELETING" || "FAILED" || "UPDATING", * // description: "STRING_VALUE", diff --git a/clients/client-qbusiness/src/commands/GetPluginCommand.ts b/clients/client-qbusiness/src/commands/GetPluginCommand.ts index b60722ba09dee..d39bb40b4b97a 100644 --- a/clients/client-qbusiness/src/commands/GetPluginCommand.ts +++ b/clients/client-qbusiness/src/commands/GetPluginCommand.ts @@ -5,7 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; -import { GetPluginRequest, GetPluginResponse } from "../models/models_0"; +import { GetPluginRequest, GetPluginResponse, GetPluginResponseFilterSensitiveLog } from "../models/models_0"; import { de_GetPluginCommand, se_GetPluginCommand } from "../protocols/Aws_restJson1"; import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; @@ -44,7 +44,7 @@ export interface GetPluginCommandOutput extends GetPluginResponse, __MetadataBea * // applicationId: "STRING_VALUE", * // pluginId: "STRING_VALUE", * // displayName: "STRING_VALUE", - * // type: "SERVICE_NOW" || "SALESFORCE" || "JIRA" || "ZENDESK", + * // type: "SERVICE_NOW" || "SALESFORCE" || "JIRA" || "ZENDESK" || "CUSTOM", * // serverUrl: "STRING_VALUE", * // authConfiguration: { // PluginAuthConfiguration Union: only one key present * // basicAuthConfiguration: { // BasicAuthConfiguration @@ -55,7 +55,20 @@ export interface GetPluginCommandOutput extends GetPluginResponse, __MetadataBea * // secretArn: "STRING_VALUE", // required * // roleArn: "STRING_VALUE", // required * // }, + * // noAuthConfiguration: {}, * // }, + * // customPluginConfiguration: { // CustomPluginConfiguration + * // description: "STRING_VALUE", // required + * // apiSchemaType: "OPEN_API_V3", // required + * // apiSchema: { // APISchema Union: only one key present + * // payload: "STRING_VALUE", + * // s3: { // S3 + * // bucket: "STRING_VALUE", // required + * // key: "STRING_VALUE", // required + * // }, + * // }, + * // }, + * // buildStatus: "READY" || "CREATE_IN_PROGRESS" || "CREATE_FAILED" || "UPDATE_IN_PROGRESS" || "UPDATE_FAILED" || "DELETE_IN_PROGRESS" || "DELETE_FAILED", * // pluginArn: "STRING_VALUE", * // state: "ENABLED" || "DISABLED", * // createdAt: new Date("TIMESTAMP"), @@ -114,7 +127,7 @@ export class GetPluginCommand extends $Command }) .s("ExpertQ", "GetPlugin", {}) .n("QBusinessClient", "GetPluginCommand") - .f(void 0, void 0) + .f(void 0, GetPluginResponseFilterSensitiveLog) .ser(se_GetPluginCommand) .de(de_GetPluginCommand) .build() {} diff --git a/clients/client-qbusiness/src/commands/ListMessagesCommand.ts b/clients/client-qbusiness/src/commands/ListMessagesCommand.ts index 5b2852e2d95ec..691294c451d2d 100644 --- a/clients/client-qbusiness/src/commands/ListMessagesCommand.ts +++ b/clients/client-qbusiness/src/commands/ListMessagesCommand.ts @@ -71,17 +71,21 @@ export interface ListMessagesCommandOutput extends ListMessagesResponse, __Metad * // { // TextSegment * // beginOffset: Number("int"), * // endOffset: Number("int"), + * // snippetExcerpt: { // SnippetExcerpt + * // text: "STRING_VALUE", + * // }, * // }, * // ], * // }, * // ], * // actionReview: { // ActionReview * // pluginId: "STRING_VALUE", - * // pluginType: "SERVICE_NOW" || "SALESFORCE" || "JIRA" || "ZENDESK", + * // pluginType: "SERVICE_NOW" || "SALESFORCE" || "JIRA" || "ZENDESK" || "CUSTOM", * // payload: { // ActionReviewPayload * // "": { // ActionReviewPayloadField * // displayName: "STRING_VALUE", * // displayOrder: Number("int"), + * // displayDescription: "STRING_VALUE", * // type: "STRING" || "NUMBER" || "ARRAY" || "BOOLEAN", * // value: "DOCUMENT_VALUE", * // allowedValues: [ // ActionReviewPayloadFieldAllowedValues @@ -90,6 +94,7 @@ export interface ListMessagesCommandOutput extends ListMessagesResponse, __Metad * // displayValue: "DOCUMENT_VALUE", * // }, * // ], + * // allowedFormat: "STRING_VALUE", * // required: true || false, * // }, * // }, diff --git a/clients/client-qbusiness/src/commands/ListPluginsCommand.ts b/clients/client-qbusiness/src/commands/ListPluginsCommand.ts index 989e0f872957c..cde58daedb40b 100644 --- a/clients/client-qbusiness/src/commands/ListPluginsCommand.ts +++ b/clients/client-qbusiness/src/commands/ListPluginsCommand.ts @@ -47,9 +47,10 @@ export interface ListPluginsCommandOutput extends ListPluginsResponse, __Metadat * // { // Plugin * // pluginId: "STRING_VALUE", * // displayName: "STRING_VALUE", - * // type: "SERVICE_NOW" || "SALESFORCE" || "JIRA" || "ZENDESK", + * // type: "SERVICE_NOW" || "SALESFORCE" || "JIRA" || "ZENDESK" || "CUSTOM", * // serverUrl: "STRING_VALUE", * // state: "ENABLED" || "DISABLED", + * // buildStatus: "READY" || "CREATE_IN_PROGRESS" || "CREATE_FAILED" || "UPDATE_IN_PROGRESS" || "UPDATE_FAILED" || "DELETE_IN_PROGRESS" || "DELETE_FAILED", * // createdAt: new Date("TIMESTAMP"), * // updatedAt: new Date("TIMESTAMP"), * // }, diff --git a/clients/client-qbusiness/src/commands/UpdateApplicationCommand.ts b/clients/client-qbusiness/src/commands/UpdateApplicationCommand.ts index a101d117b75d6..fb41691b71455 100644 --- a/clients/client-qbusiness/src/commands/UpdateApplicationCommand.ts +++ b/clients/client-qbusiness/src/commands/UpdateApplicationCommand.ts @@ -36,6 +36,7 @@ export interface UpdateApplicationCommandOutput extends UpdateApplicationRespons * const client = new QBusinessClient(config); * const input = { // UpdateApplicationRequest * applicationId: "STRING_VALUE", // required + * identityCenterInstanceArn: "STRING_VALUE", * displayName: "STRING_VALUE", * description: "STRING_VALUE", * roleArn: "STRING_VALUE", diff --git a/clients/client-qbusiness/src/commands/UpdatePluginCommand.ts b/clients/client-qbusiness/src/commands/UpdatePluginCommand.ts index 5a0ba339d58f1..8d1ac2b5f3a57 100644 --- a/clients/client-qbusiness/src/commands/UpdatePluginCommand.ts +++ b/clients/client-qbusiness/src/commands/UpdatePluginCommand.ts @@ -5,7 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; -import { UpdatePluginRequest, UpdatePluginResponse } from "../models/models_0"; +import { UpdatePluginRequest, UpdatePluginRequestFilterSensitiveLog, UpdatePluginResponse } from "../models/models_0"; import { de_UpdatePluginCommand, se_UpdatePluginCommand } from "../protocols/Aws_restJson1"; import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; @@ -40,6 +40,17 @@ export interface UpdatePluginCommandOutput extends UpdatePluginResponse, __Metad * displayName: "STRING_VALUE", * state: "ENABLED" || "DISABLED", * serverUrl: "STRING_VALUE", + * customPluginConfiguration: { // CustomPluginConfiguration + * description: "STRING_VALUE", // required + * apiSchemaType: "OPEN_API_V3", // required + * apiSchema: { // APISchema Union: only one key present + * payload: "STRING_VALUE", + * s3: { // S3 + * bucket: "STRING_VALUE", // required + * key: "STRING_VALUE", // required + * }, + * }, + * }, * authConfiguration: { // PluginAuthConfiguration Union: only one key present * basicAuthConfiguration: { // BasicAuthConfiguration * secretArn: "STRING_VALUE", // required @@ -49,6 +60,7 @@ export interface UpdatePluginCommandOutput extends UpdatePluginResponse, __Metad * secretArn: "STRING_VALUE", // required * roleArn: "STRING_VALUE", // required * }, + * noAuthConfiguration: {}, * }, * }; * const command = new UpdatePluginCommand(input); @@ -114,7 +126,7 @@ export class UpdatePluginCommand extends $Command }) .s("ExpertQ", "UpdatePlugin", {}) .n("QBusinessClient", "UpdatePluginCommand") - .f(void 0, void 0) + .f(UpdatePluginRequestFilterSensitiveLog, void 0) .ser(se_UpdatePluginCommand) .de(de_UpdatePluginCommand) .build() {} diff --git a/clients/client-qbusiness/src/commands/UpdateWebExperienceCommand.ts b/clients/client-qbusiness/src/commands/UpdateWebExperienceCommand.ts index 1dfcd024bd1a9..66f88cfae4672 100644 --- a/clients/client-qbusiness/src/commands/UpdateWebExperienceCommand.ts +++ b/clients/client-qbusiness/src/commands/UpdateWebExperienceCommand.ts @@ -37,6 +37,7 @@ export interface UpdateWebExperienceCommandOutput extends UpdateWebExperienceRes * const input = { // UpdateWebExperienceRequest * applicationId: "STRING_VALUE", // required * webExperienceId: "STRING_VALUE", // required + * roleArn: "STRING_VALUE", * authenticationConfiguration: { // WebExperienceAuthConfiguration Union: only one key present * samlConfiguration: { // SamlConfiguration * metadataXML: "STRING_VALUE", // required diff --git a/clients/client-qbusiness/src/commands/index.ts b/clients/client-qbusiness/src/commands/index.ts index cf3a34e3aa548..3f1d06826b2c9 100644 --- a/clients/client-qbusiness/src/commands/index.ts +++ b/clients/client-qbusiness/src/commands/index.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code export * from "./BatchDeleteDocumentCommand"; export * from "./BatchPutDocumentCommand"; +export * from "./ChatCommand"; export * from "./ChatSyncCommand"; export * from "./CreateApplicationCommand"; export * from "./CreateDataSourceCommand"; diff --git a/clients/client-qbusiness/src/index.ts b/clients/client-qbusiness/src/index.ts index 3eeb46b861201..f8c72a1a70dfa 100644 --- a/clients/client-qbusiness/src/index.ts +++ b/clients/client-qbusiness/src/index.ts @@ -1,10 +1,7 @@ // smithy-typescript generated code /* eslint-disable */ /** - * - *

Amazon Q is in preview release and is subject to change.

- *
- *

This is the Amazon Q Business API Reference. Amazon Q Business is a fully + *

This is the Amazon Q Business 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, diff --git a/clients/client-qbusiness/src/models/models_0.ts b/clients/client-qbusiness/src/models/models_0.ts index 0a9683f811c57..310c3a01a2723 100644 --- a/clients/client-qbusiness/src/models/models_0.ts +++ b/clients/client-qbusiness/src/models/models_0.ts @@ -248,6 +248,33 @@ export interface ActionExecution { payloadFieldNameSeparator: string | undefined; } +/** + *

A request from an end user signalling an intent to perform an Amazon Q Business plugin + * action during a streaming chat.

+ * @public + */ +export interface ActionExecutionEvent { + /** + *

The identifier of the plugin for which the action is being requested.

+ * @public + */ + pluginId: string | undefined; + + /** + *

A mapping of field names to the field values in input that an end user provides to + * Amazon Q Business requests to perform their plugin action.

+ * @public + */ + payload: Record | undefined; + + /** + *

A string used to retain information about the hierarchical contexts within a action + * execution event payload.

+ * @public + */ + payloadFieldNameSeparator: string | undefined; +} + /** * @public * @enum @@ -300,6 +327,14 @@ export interface ActionReviewPayloadField { */ displayOrder?: number; + /** + *

The field level description of each action review input field. This could be an + * explanation of the field. In the Amazon Q Business web experience, these descriptions could + * be used to display as tool tips to help users understand the field.

+ * @public + */ + displayDescription?: string; + /** *

The type of field.

* @public @@ -319,6 +354,14 @@ export interface ActionReviewPayloadField { */ allowedValues?: ActionReviewPayloadFieldAllowedValue[]; + /** + *

The expected data format for the action review input field value. For example, in PTO + * request, from and to would be of datetime allowed + * format.

+ * @public + */ + allowedFormat?: string; + /** *

Information about whether the field is required.

* @public @@ -331,6 +374,7 @@ export interface ActionReviewPayloadField { * @enum */ export const PluginType = { + CUSTOM: "CUSTOM", JIRA: "JIRA", SALESFORCE: "SALESFORCE", SERVICE_NOW: "SERVICE_NOW", @@ -377,6 +421,150 @@ export interface ActionReview { payloadFieldNameSeparator?: string; } +/** + *

An output event that Amazon Q Business returns to an user who wants to perform a plugin + * action during a streaming chat conversation. It contains information about the selected + * action with a list of possible user input fields, some pre-populated by Amazon Q Business. + *

+ * @public + */ +export interface ActionReviewEvent { + /** + *

The identifier of the conversation with which the action review event is + * associated.

+ * @public + */ + conversationId?: string; + + /** + *

The identifier of the conversation with which the plugin action is associated.

+ * @public + */ + userMessageId?: string; + + /** + *

The identifier of an Amazon Q Business AI generated associated with the action review + * event.

+ * @public + */ + systemMessageId?: string; + + /** + *

The identifier of the plugin associated with the action review event.

+ * @public + */ + pluginId?: string; + + /** + *

The type of plugin.

+ * @public + */ + pluginType?: PluginType; + + /** + *

Field values that an end user needs to provide to Amazon Q Business for Amazon Q Business to + * perform the requested plugin action.

+ * @public + */ + payload?: Record; + + /** + *

A string used to retain information about the hierarchical contexts within an action + * review event payload.

+ * @public + */ + payloadFieldNameSeparator?: string; +} + +/** + *

Information required for Amazon Q Business to find a specific file in an Amazon S3 + * bucket.

+ * @public + */ +export interface S3 { + /** + *

The name of the S3 bucket that contains the file.

+ * @public + */ + bucket: string | undefined; + + /** + *

The name of the file.

+ * @public + */ + key: string | undefined; +} + +/** + *

Contains details about the OpenAPI schema for a custom plugin. For more information, + * see custom plugin OpenAPI schemas. You can either include + * the schema directly in the payload field or you can upload it to an S3 bucket and + * specify the S3 bucket location in the s3 field.

+ * @public + */ +export type APISchema = APISchema.PayloadMember | APISchema.S3Member | APISchema.$UnknownMember; + +/** + * @public + */ +export namespace APISchema { + /** + *

The JSON or YAML-formatted payload defining the OpenAPI schema for a custom plugin. + *

+ * @public + */ + export interface PayloadMember { + payload: string; + s3?: never; + $unknown?: never; + } + + /** + *

Contains details about the S3 object containing the OpenAPI schema for a custom + * plugin. The schema could be in either JSON or YAML format.

+ * @public + */ + export interface S3Member { + payload?: never; + s3: S3; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + payload?: never; + s3?: never; + $unknown: [string, any]; + } + + export interface Visitor { + payload: (value: string) => T; + s3: (value: S3) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: APISchema, visitor: Visitor): T => { + if (value.payload !== undefined) return visitor.payload(value.payload); + if (value.s3 !== undefined) return visitor.s3(value.s3); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + * @enum + */ +export const APISchemaType = { + OPEN_API_V3: "OPEN_API_V3", +} as const; + +/** + * @public + */ +export type APISchemaType = (typeof APISchemaType)[keyof typeof APISchemaType]; + /** * @public * @enum @@ -544,7 +732,7 @@ export interface CreateApplicationRequest { * CloudWatch logs and metrics.

* @public */ - roleArn: string | undefined; + roleArn?: string; /** *

The Amazon Resource Name (ARN) of the IAM Identity Center instance you are either @@ -956,6 +1144,20 @@ export interface IndexCapacityConfiguration { units?: number; } +/** + * @public + * @enum + */ +export const IndexType = { + ENTERPRISE: "ENTERPRISE", + STARTER: "STARTER", +} as const; + +/** + * @public + */ +export type IndexType = (typeof IndexType)[keyof typeof IndexType]; + /** * @public */ @@ -972,6 +1174,14 @@ export interface CreateIndexRequest { */ displayName: string | undefined; + /** + *

The index type that's suitable for your needs. For more information on what's included + * in each type of index or index tier, see Amazon Q Business + * tiers.

+ * @public + */ + type?: IndexType; + /** *

A description for the Amazon Q Business index.

* @public @@ -1169,8 +1379,8 @@ export interface DocumentAttributeCondition { *

The identifier of the document attribute used for the condition.

*

For example, 'Source_URI' could be an identifier for the attribute or metadata field * that contains source URIs associated with the documents.

- *

Amazon Kendra currently does not support _document_body as an - * attribute key used for the condition.

+ *

Amazon Q Business currently does not support _document_body as an attribute + * key used for the condition.

* @public */ operator: DocumentEnrichmentConditionOperator | undefined; @@ -1316,10 +1526,12 @@ export interface InlineDocumentEnrichmentConfiguration { *

Provides the configuration information for invoking a Lambda function in * Lambda to alter document metadata and content when ingesting * documents into Amazon Q Business.

- *

You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on - * the original or raw documents.

+ *

You can configure your Lambda function using the + * PreExtractionHookConfiguration parameter if you want to apply advanced + * alterations on the original or raw documents.

*

If you want to apply advanced alterations on the Amazon Q Business structured documents, - * you must configure your Lambda function using PostExtractionHookConfiguration.

+ * you must configure your Lambda function using + * PostExtractionHookConfiguration.

*

You can only invoke one Lambda function. However, this function can invoke * other functions it requires.

*

For more information, see Custom document enrichment.

@@ -1378,10 +1590,12 @@ export interface DocumentEnrichmentConfiguration { *

Provides the configuration information for invoking a Lambda function in * Lambda to alter document metadata and content when ingesting * documents into Amazon Q Business.

- *

You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on - * the original or raw documents.

+ *

You can configure your Lambda function using the + * PreExtractionHookConfiguration parameter if you want to apply advanced + * alterations on the original or raw documents.

*

If you want to apply advanced alterations on the Amazon Q Business structured documents, - * you must configure your Lambda function using PostExtractionHookConfiguration.

+ * you must configure your Lambda function using + * PostExtractionHookConfiguration.

*

You can only invoke one Lambda function. However, this function can invoke * other functions it requires.

*

For more information, see Custom document enrichment.

@@ -1393,10 +1607,12 @@ export interface DocumentEnrichmentConfiguration { *

Provides the configuration information for invoking a Lambda function in * Lambda to alter document metadata and content when ingesting * documents into Amazon Q Business.

- *

You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on - * the original or raw documents.

+ *

You can configure your Lambda function using the + * PreExtractionHookConfiguration parameter if you want to apply advanced + * alterations on the original or raw documents.

*

If you want to apply advanced alterations on the Amazon Q Business structured documents, - * you must configure your Lambda function using PostExtractionHookConfiguration.

+ * you must configure your Lambda function using + * PostExtractionHookConfiguration.

*

You can only invoke one Lambda function. However, this function can invoke * other functions it requires.

*

For more information, see Custom document enrichment.

@@ -2053,6 +2269,12 @@ export interface GetIndexResponse { */ displayName?: string; + /** + *

The type of index attached to your Amazon Q Business application.

+ * @public + */ + type?: IndexType; + /** *

The Amazon Resource Name (ARN) of the Amazon Q Business index.

* @public @@ -2301,6 +2523,13 @@ export interface BasicAuthConfiguration { roleArn: string | undefined; } +/** + *

Information about invoking a custom plugin without any authentication or authorization + * requirement.

+ * @public + */ +export interface NoAuthConfiguration {} + /** *

Information about the OAuth 2.0 authentication credential/token used to configure a * plugin.

@@ -2328,6 +2557,7 @@ export interface OAuth2ClientCredentialConfiguration { */ export type PluginAuthConfiguration = | PluginAuthConfiguration.BasicAuthConfigurationMember + | PluginAuthConfiguration.NoAuthConfigurationMember | PluginAuthConfiguration.OAuth2ClientCredentialConfigurationMember | PluginAuthConfiguration.$UnknownMember; @@ -2343,6 +2573,7 @@ export namespace PluginAuthConfiguration { export interface BasicAuthConfigurationMember { basicAuthConfiguration: BasicAuthConfiguration; oAuth2ClientCredentialConfiguration?: never; + noAuthConfiguration?: never; $unknown?: never; } @@ -2354,6 +2585,18 @@ export namespace PluginAuthConfiguration { export interface OAuth2ClientCredentialConfigurationMember { basicAuthConfiguration?: never; oAuth2ClientCredentialConfiguration: OAuth2ClientCredentialConfiguration; + noAuthConfiguration?: never; + $unknown?: never; + } + + /** + *

Information about invoking a custom plugin without any authentication.

+ * @public + */ + export interface NoAuthConfigurationMember { + basicAuthConfiguration?: never; + oAuth2ClientCredentialConfiguration?: never; + noAuthConfiguration: NoAuthConfiguration; $unknown?: never; } @@ -2363,12 +2606,14 @@ export namespace PluginAuthConfiguration { export interface $UnknownMember { basicAuthConfiguration?: never; oAuth2ClientCredentialConfiguration?: never; + noAuthConfiguration?: never; $unknown: [string, any]; } export interface Visitor { basicAuthConfiguration: (value: BasicAuthConfiguration) => T; oAuth2ClientCredentialConfiguration: (value: OAuth2ClientCredentialConfiguration) => T; + noAuthConfiguration: (value: NoAuthConfiguration) => T; _: (name: string, value: any) => T; } @@ -2376,10 +2621,36 @@ export namespace PluginAuthConfiguration { if (value.basicAuthConfiguration !== undefined) return visitor.basicAuthConfiguration(value.basicAuthConfiguration); if (value.oAuth2ClientCredentialConfiguration !== undefined) return visitor.oAuth2ClientCredentialConfiguration(value.oAuth2ClientCredentialConfiguration); + if (value.noAuthConfiguration !== undefined) return visitor.noAuthConfiguration(value.noAuthConfiguration); return visitor._(value.$unknown[0], value.$unknown[1]); }; } +/** + *

Configuration information required to create a custom plugin.

+ * @public + */ +export interface CustomPluginConfiguration { + /** + *

A description for your custom plugin configuration.

+ * @public + */ + description: string | undefined; + + /** + *

The type of OpenAPI schema to use.

+ * @public + */ + apiSchemaType: APISchemaType | undefined; + + /** + *

Contains either details about the S3 object containing the OpenAPI schema for the + * action group or the JSON or YAML-formatted payload defining the schema.

+ * @public + */ + apiSchema: APISchema | undefined; +} + /** * @public */ @@ -2402,17 +2673,23 @@ export interface CreatePluginRequest { */ type: PluginType | undefined; + /** + *

Authentication configuration information for an Amazon Q Business plugin.

+ * @public + */ + authConfiguration: PluginAuthConfiguration | undefined; + /** *

The source URL used for plugin configuration.

* @public */ - serverUrl: string | undefined; + serverUrl?: string; /** - *

Authentication configuration information for an Amazon Q Business plugin.

+ *

Contains configuration for a custom plugin.

* @public */ - authConfiguration: PluginAuthConfiguration | undefined; + customPluginConfiguration?: CustomPluginConfiguration; /** *

A list of key-value pairs that identify or categorize the data source connector. You @@ -2431,6 +2708,25 @@ export interface CreatePluginRequest { clientToken?: string; } +/** + * @public + * @enum + */ +export const PluginBuildStatus = { + CREATE_FAILED: "CREATE_FAILED", + CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS", + DELETE_FAILED: "DELETE_FAILED", + DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS", + READY: "READY", + UPDATE_FAILED: "UPDATE_FAILED", + UPDATE_IN_PROGRESS: "UPDATE_IN_PROGRESS", +} as const; + +/** + * @public + */ +export type PluginBuildStatus = (typeof PluginBuildStatus)[keyof typeof PluginBuildStatus]; + /** * @public */ @@ -2446,6 +2742,12 @@ export interface CreatePluginResponse { * @public */ pluginArn?: string; + + /** + *

The current status of a plugin. A plugin is modified asynchronously.

+ * @public + */ + buildStatus?: PluginBuildStatus; } /** @@ -2541,6 +2843,18 @@ export interface GetPluginResponse { */ authConfiguration?: PluginAuthConfiguration; + /** + *

Configuration information required to create a custom plugin.

+ * @public + */ + customPluginConfiguration?: CustomPluginConfiguration; + + /** + *

The current status of a plugin. A plugin is modified asynchronously.

+ * @public + */ + buildStatus?: PluginBuildStatus; + /** *

The Amazon Resource Name (ARN) of the role with permission to access resources needed * to create the plugin.

@@ -2627,6 +2941,12 @@ export interface Plugin { */ state?: PluginState; + /** + *

The status of the plugin.

+ * @public + */ + buildStatus?: PluginBuildStatus; + /** *

The timestamp for when the plugin was created.

* @public @@ -2693,6 +3013,12 @@ export interface UpdatePluginRequest { */ serverUrl?: string; + /** + *

The configuration for a custom plugin.

+ * @public + */ + customPluginConfiguration?: CustomPluginConfiguration; + /** *

The authentication configuration the plugin is using.

* @public @@ -3378,6 +3704,13 @@ export interface UpdateApplicationRequest { */ applicationId: string | undefined; + /** + *

The Amazon Resource Name (ARN) of the IAM Identity Center instance you are either + * creating for—or connecting to—your Amazon Q Business application.

+ * @public + */ + identityCenterInstanceArn?: string; + /** *

A name for the Amazon Q Business application.

* @public @@ -3672,13 +4005,13 @@ export interface GetWebExperienceResponse { status?: WebExperienceStatus; /** - *

The Unix timestamp when the retriever was created.

+ *

The Unix timestamp when the Amazon Q Business web experience was last created.

* @public */ createdAt?: Date; /** - *

The Unix timestamp when the data source connector was last updated.

+ *

The Unix timestamp when the Amazon Q Business web experience was last updated.

* @public */ updatedAt?: Date; @@ -3717,6 +4050,8 @@ export interface GetWebExperienceResponse { roleArn?: string; /** + * @deprecated + * *

The authentication configuration information for your Amazon Q Business web * experience.

* @public @@ -3830,6 +4165,15 @@ export interface UpdateWebExperienceRequest { webExperienceId: string | undefined; /** + *

The Amazon Resource Name (ARN) of the role with permission to access the Amazon Q Business + * web experience and required resources.

+ * @public + */ + roleArn?: string; + + /** + * @deprecated + * *

The authentication configuration of the Amazon Q Business web experience.

* @public */ @@ -3915,6 +4259,19 @@ export interface AttachmentInput { data: Uint8Array | undefined; } +/** + *

A file input event activated by a end user request to upload files into their web + * experience chat.

+ * @public + */ +export interface AttachmentInputEvent { + /** + *

A file directly uploaded into a web experience chat.

+ * @public + */ + attachment?: AttachmentInput; +} + /** * @public * @enum @@ -3972,10 +4329,65 @@ export interface DocumentAttribute { } /** - *

A document deleted from an Amazon Q Business data source connector.

+ *

A request made by Amazon Q Business to a third paty authentication server to authenticate + * a custom plugin user.

* @public */ -export interface DeleteDocument { +export interface AuthChallengeRequest { + /** + *

The URL sent by Amazon Q Business to the third party authentication server to authenticate + * a custom plugin user through an OAuth protocol.

+ * @public + */ + authorizationUrl: string | undefined; +} + +/** + *

An authentication verification event activated by an end user request to use a custom + * plugin.

+ * @public + */ +export interface AuthChallengeRequestEvent { + /** + *

The URL sent by Amazon Q Business to a third party authentication server in response to an + * authentication verification event activated by an end user request to use a custom + * plugin.

+ * @public + */ + authorizationUrl: string | undefined; +} + +/** + *

Contains details of the authentication information received from a third party + * authentication server in response to an authentication challenge.

+ * @public + */ +export interface AuthChallengeResponse { + /** + *

The mapping of key-value pairs in an authentication challenge response.

+ * @public + */ + responseMap: Record | undefined; +} + +/** + *

An authentication verification event response by a third party authentication server + * to Amazon Q Business.

+ * @public + */ +export interface AuthChallengeResponseEvent { + /** + *

The mapping of key-value pairs in an authentication challenge response.

+ * @public + */ + responseMap: Record | undefined; +} + +/** + *

A document deleted from an Amazon Q Business data source connector.

+ * @public + */ +export interface DeleteDocument { /** *

The identifier of the deleted document.

* @public @@ -4054,25 +4466,6 @@ export interface BatchDeleteDocumentResponse { failedDocuments?: FailedDocument[]; } -/** - *

Information required for Amazon Q Business to find a specific file in an Amazon S3 - * bucket.

- * @public - */ -export interface S3 { - /** - *

The name of the S3 bucket that contains the file.

- * @public - */ - bucket: string | undefined; - - /** - *

The name of the file.

- * @public - */ - key: string | undefined; -} - /** *

The contents of a document.

* @public @@ -4371,6 +4764,68 @@ export namespace ChatModeConfiguration { }; } +/** + *

The end of the streaming input for the Chat API.

+ * @public + */ +export interface EndOfInputEvent {} + +/** + *

An input event for a end user message in an Amazon Q Business web experience.

+ * @public + */ +export interface TextInputEvent { + /** + *

A user message in a text message input event.

+ * @public + */ + userMessage: string | undefined; +} + +/** + *

A failed file upload during web experience chat.

+ * @public + */ +export interface FailedAttachmentEvent { + /** + *

The identifier of the conversation associated with the failed file upload.

+ * @public + */ + conversationId?: string; + + /** + *

The identifier of the end user chat message associated with the file upload.

+ * @public + */ + userMessageId?: string; + + /** + *

The identifier of the AI-generated message associated with the file upload.

+ * @public + */ + systemMessageId?: string; + + /** + *

The details of a file uploaded during chat.

+ * @public + */ + attachment?: AttachmentOutput; +} + +/** + *

Contains the relevant text excerpt from a source that was used to generate a citation + * text segment in an Amazon Q Business chat response.

+ * @public + */ +export interface SnippetExcerpt { + /** + *

The relevant text excerpt from a source that was used to generate a citation text + * segment in an Amazon Q chat response.

+ * @public + */ + text?: string; +} + /** *

Provides information about a text extract in a chat response that can be attributed to * a source document.

@@ -4390,6 +4845,13 @@ export interface TextSegment { * @public */ endOffset?: number; + + /** + *

The relevant text excerpt from a source that was used to generate a citation text + * segment in an Amazon Q Business chat response.

+ * @public + */ + snippetExcerpt?: SnippetExcerpt; } /** @@ -4438,20 +4900,24 @@ export interface SourceAttribution { } /** + *

A metadata event for a AI-generated text output message in a Amazon Q Business + * conversation, containing associated metadata generated.

* @public */ -export interface ChatSyncOutput { +export interface MetadataEvent { /** - *

The identifier of the Amazon Q Business conversation.

+ *

The identifier of the conversation with which the generated metadata is + * associated.

* @public */ conversationId?: string; /** - *

An AI-generated message in a conversation.

+ *

The identifier of an Amazon Q Business end user text input message within the + * conversation.

* @public */ - systemMessage?: string; + userMessageId?: string; /** *

The identifier of an Amazon Q Business AI generated message within the @@ -4461,30 +4927,176 @@ export interface ChatSyncOutput { systemMessageId?: string; /** - *

The identifier of an Amazon Q Business end user text input message within the - * conversation.

+ *

The source documents used to generate the conversation response.

+ * @public + */ + sourceAttributions?: SourceAttribution[]; + + /** + *

The final text output message generated by the system.

+ * @public + */ + finalTextMessage?: string; +} + +/** + *

An output event for an AI-generated response in an Amazon Q Business web + * experience.

+ * @public + */ +export interface TextOutputEvent { + /** + *

The identifier of the conversation with which the text output event is + * associated.

+ * @public + */ + conversationId?: string; + + /** + *

The identifier of an end user message in a TextOutputEvent.

* @public */ userMessageId?: string; + /** + *

The identifier of an AI-generated message in a TextOutputEvent.

+ * @public + */ + systemMessageId?: string; + + /** + *

An AI-generated message in a TextOutputEvent.

+ * @public + */ + systemMessage?: string; +} + +/** + *

The streaming output for the Chat API.

+ * @public + */ +export type ChatOutputStream = + | ChatOutputStream.ActionReviewEventMember + | ChatOutputStream.AuthChallengeRequestEventMember + | ChatOutputStream.FailedAttachmentEventMember + | ChatOutputStream.MetadataEventMember + | ChatOutputStream.TextEventMember + | ChatOutputStream.$UnknownMember; + +/** + * @public + */ +export namespace ChatOutputStream { + /** + *

Information about the payload of the ChatOutputStream event containing + * the AI-generated message output.

+ * @public + */ + export interface TextEventMember { + textEvent: TextOutputEvent; + metadataEvent?: never; + actionReviewEvent?: never; + failedAttachmentEvent?: never; + authChallengeRequestEvent?: never; + $unknown?: never; + } + + /** + *

A metadata event for a AI-generated text output message in a Amazon Q Business + * conversation.

+ * @public + */ + export interface MetadataEventMember { + textEvent?: never; + metadataEvent: MetadataEvent; + actionReviewEvent?: never; + failedAttachmentEvent?: never; + authChallengeRequestEvent?: never; + $unknown?: never; + } + /** *

A request from Amazon Q Business to the end user for information Amazon Q Business needs to * successfully complete a requested plugin action.

* @public */ - actionReview?: ActionReview; + export interface ActionReviewEventMember { + textEvent?: never; + metadataEvent?: never; + actionReviewEvent: ActionReviewEvent; + failedAttachmentEvent?: never; + authChallengeRequestEvent?: never; + $unknown?: never; + } /** - *

The source documents used to generate the conversation response.

+ *

A failed file upload event during a web experience chat.

* @public */ - sourceAttributions?: SourceAttribution[]; + export interface FailedAttachmentEventMember { + textEvent?: never; + metadataEvent?: never; + actionReviewEvent?: never; + failedAttachmentEvent: FailedAttachmentEvent; + authChallengeRequestEvent?: never; + $unknown?: never; + } /** - *

A list of files which failed to upload during chat.

+ *

An authentication verification event activated by an end user request to use a custom + * plugin.

* @public */ - failedAttachments?: AttachmentOutput[]; + export interface AuthChallengeRequestEventMember { + textEvent?: never; + metadataEvent?: never; + actionReviewEvent?: never; + failedAttachmentEvent?: never; + authChallengeRequestEvent: AuthChallengeRequestEvent; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + textEvent?: never; + metadataEvent?: never; + actionReviewEvent?: never; + failedAttachmentEvent?: never; + authChallengeRequestEvent?: never; + $unknown: [string, any]; + } + + export interface Visitor { + textEvent: (value: TextOutputEvent) => T; + metadataEvent: (value: MetadataEvent) => T; + actionReviewEvent: (value: ActionReviewEvent) => T; + failedAttachmentEvent: (value: FailedAttachmentEvent) => T; + authChallengeRequestEvent: (value: AuthChallengeRequestEvent) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: ChatOutputStream, visitor: Visitor): T => { + if (value.textEvent !== undefined) return visitor.textEvent(value.textEvent); + if (value.metadataEvent !== undefined) return visitor.metadataEvent(value.metadataEvent); + if (value.actionReviewEvent !== undefined) return visitor.actionReviewEvent(value.actionReviewEvent); + if (value.failedAttachmentEvent !== undefined) return visitor.failedAttachmentEvent(value.failedAttachmentEvent); + if (value.authChallengeRequestEvent !== undefined) + return visitor.authChallengeRequestEvent(value.authChallengeRequestEvent); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + */ +export interface ChatOutput { + /** + *

The streaming output for the Chat API.

+ * @public + */ + outputStream?: AsyncIterable; } /** @@ -4508,6 +5120,63 @@ export class LicenseNotFoundException extends __BaseException { } } +/** + * @public + */ +export interface ChatSyncOutput { + /** + *

The identifier of the Amazon Q Business conversation.

+ * @public + */ + conversationId?: string; + + /** + *

An AI-generated message in a conversation.

+ * @public + */ + systemMessage?: string; + + /** + *

The identifier of an Amazon Q Business AI generated message within the + * conversation.

+ * @public + */ + systemMessageId?: string; + + /** + *

The identifier of an Amazon Q Business end user text input message within the + * conversation.

+ * @public + */ + userMessageId?: string; + + /** + *

A request from Amazon Q Business to the end user for information Amazon Q Business needs to + * successfully complete a requested plugin action.

+ * @public + */ + actionReview?: ActionReview; + + /** + *

An authentication verification event activated by an end user request to use a custom + * plugin.

+ * @public + */ + authChallengeRequest?: AuthChallengeRequest; + + /** + *

The source documents used to generate the conversation response.

+ * @public + */ + sourceAttributions?: SourceAttribution[]; + + /** + *

A list of files which failed to upload during chat.

+ * @public + */ + failedAttachments?: AttachmentOutput[]; +} + /** *

A rule for configuring how Amazon Q Business responds when it encounters a a blocked * topic. You can configure a custom message to inform your end users that they have asked @@ -6256,6 +6925,13 @@ export interface ChatSyncInput { */ actionExecution?: ActionExecution; + /** + *

An authentication verification event response by a third party authentication server + * to Amazon Q Business.

+ * @public + */ + authChallengeResponse?: AuthChallengeResponse; + /** *

The identifier of the Amazon Q Business conversation.

* @public @@ -6276,7 +6952,7 @@ export interface ChatSyncInput { attributeFilter?: AttributeFilter; /** - *

The chat modes available in an Amazon Q Business web experience.

+ *

The chat modes available to an Amazon Q Business end user.

*
    *
  • *

    @@ -6316,6 +6992,250 @@ export interface ChatSyncInput { clientToken?: string; } +/** + *

    A configuration event activated by an end user request to select a specific chat + * mode.

    + * @public + */ +export interface ConfigurationEvent { + /** + *

    The chat modes available to an Amazon Q Business end user.

    + *
      + *
    • + *

      + * RETRIEVAL_MODE - The default chat mode for an + * Amazon Q Business application. When this mode is enabled, Amazon Q Business generates + * responses only from data sources connected to an Amazon Q Business + * application.

      + *
    • + *
    • + *

      + * CREATOR_MODE - By selecting this mode, users can choose to + * generate responses only from the LLM knowledge, without consulting connected + * data sources, for a chat request.

      + *
    • + *
    • + *

      + * PLUGIN_MODE - By selecting this mode, users can choose to + * use plugins in chat.

      + *
    • + *
    + *

    For more information, see Admin controls and guardrails, Plugins, + * and Conversation settings.

    + * @public + */ + chatMode?: ChatMode; + + /** + *

    Configuration information for Amazon Q Business conversation modes.

    + *

    For more information, see Admin controls and guardrails and Conversation settings.

    + * @public + */ + chatModeConfiguration?: ChatModeConfiguration; + + /** + *

    Enables filtering of responses based on document attributes or metadata fields.

    + * @public + */ + attributeFilter?: AttributeFilter; +} + +/** + *

    The streaming input for the Chat API.

    + * @public + */ +export type ChatInputStream = + | ChatInputStream.ActionExecutionEventMember + | ChatInputStream.AttachmentEventMember + | ChatInputStream.AuthChallengeResponseEventMember + | ChatInputStream.ConfigurationEventMember + | ChatInputStream.EndOfInputEventMember + | ChatInputStream.TextEventMember + | ChatInputStream.$UnknownMember; + +/** + * @public + */ +export namespace ChatInputStream { + /** + *

    A configuration event activated by an end user request to select a specific chat + * mode.

    + * @public + */ + export interface ConfigurationEventMember { + configurationEvent: ConfigurationEvent; + textEvent?: never; + attachmentEvent?: never; + actionExecutionEvent?: never; + endOfInputEvent?: never; + authChallengeResponseEvent?: never; + $unknown?: never; + } + + /** + *

    Information about the payload of the ChatInputStream event containing the + * end user message input.

    + * @public + */ + export interface TextEventMember { + configurationEvent?: never; + textEvent: TextInputEvent; + attachmentEvent?: never; + actionExecutionEvent?: never; + endOfInputEvent?: never; + authChallengeResponseEvent?: never; + $unknown?: never; + } + + /** + *

    A request by an end user to upload a file during chat.

    + * @public + */ + export interface AttachmentEventMember { + configurationEvent?: never; + textEvent?: never; + attachmentEvent: AttachmentInputEvent; + actionExecutionEvent?: never; + endOfInputEvent?: never; + authChallengeResponseEvent?: never; + $unknown?: never; + } + + /** + *

    A request from an end user to perform an Amazon Q Business plugin action.

    + * @public + */ + export interface ActionExecutionEventMember { + configurationEvent?: never; + textEvent?: never; + attachmentEvent?: never; + actionExecutionEvent: ActionExecutionEvent; + endOfInputEvent?: never; + authChallengeResponseEvent?: never; + $unknown?: never; + } + + /** + *

    The end of the streaming input for the Chat API.

    + * @public + */ + export interface EndOfInputEventMember { + configurationEvent?: never; + textEvent?: never; + attachmentEvent?: never; + actionExecutionEvent?: never; + endOfInputEvent: EndOfInputEvent; + authChallengeResponseEvent?: never; + $unknown?: never; + } + + /** + *

    An authentication verification event response by a third party authentication server + * to Amazon Q Business.

    + * @public + */ + export interface AuthChallengeResponseEventMember { + configurationEvent?: never; + textEvent?: never; + attachmentEvent?: never; + actionExecutionEvent?: never; + endOfInputEvent?: never; + authChallengeResponseEvent: AuthChallengeResponseEvent; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + configurationEvent?: never; + textEvent?: never; + attachmentEvent?: never; + actionExecutionEvent?: never; + endOfInputEvent?: never; + authChallengeResponseEvent?: never; + $unknown: [string, any]; + } + + export interface Visitor { + configurationEvent: (value: ConfigurationEvent) => T; + textEvent: (value: TextInputEvent) => T; + attachmentEvent: (value: AttachmentInputEvent) => T; + actionExecutionEvent: (value: ActionExecutionEvent) => T; + endOfInputEvent: (value: EndOfInputEvent) => T; + authChallengeResponseEvent: (value: AuthChallengeResponseEvent) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: ChatInputStream, visitor: Visitor): T => { + if (value.configurationEvent !== undefined) return visitor.configurationEvent(value.configurationEvent); + if (value.textEvent !== undefined) return visitor.textEvent(value.textEvent); + if (value.attachmentEvent !== undefined) return visitor.attachmentEvent(value.attachmentEvent); + if (value.actionExecutionEvent !== undefined) return visitor.actionExecutionEvent(value.actionExecutionEvent); + if (value.endOfInputEvent !== undefined) return visitor.endOfInputEvent(value.endOfInputEvent); + if (value.authChallengeResponseEvent !== undefined) + return visitor.authChallengeResponseEvent(value.authChallengeResponseEvent); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + */ +export interface ChatInput { + /** + *

    The identifier of the Amazon Q Business application linked to a streaming Amazon Q Business + * conversation.

    + * @public + */ + applicationId: string | undefined; + + /** + *

    The identifier of the user attached to the chat input.

    + * @public + */ + userId?: string; + + /** + *

    The groups that a user associated with the chat input belongs to.

    + * @public + */ + userGroups?: string[]; + + /** + *

    The identifier of the Amazon Q Business conversation.

    + * @public + */ + conversationId?: string; + + /** + *

    The identifier used to associate a user message with a AI generated response.

    + * @public + */ + parentMessageId?: string; + + /** + *

    A token that you provide to identify the chat input.

    + * @public + */ + clientToken?: string; + + /** + *

    The streaming input for the Chat API.

    + * @public + */ + inputStream?: AsyncIterable; +} + +/** + * @internal + */ +export const APISchemaFilterSensitiveLog = (obj: APISchema): any => { + if (obj.payload !== undefined) return { payload: SENSITIVE_STRING }; + if (obj.s3 !== undefined) return { s3: obj.s3 }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; +}; + /** * @internal */ @@ -6343,3 +7263,86 @@ export const GetApplicationResponseFilterSensitiveLog = (obj: GetApplicationResp encryptionConfiguration: EncryptionConfigurationFilterSensitiveLog(obj.encryptionConfiguration), }), }); + +/** + * @internal + */ +export const CustomPluginConfigurationFilterSensitiveLog = (obj: CustomPluginConfiguration): any => ({ + ...obj, + ...(obj.apiSchema && { apiSchema: APISchemaFilterSensitiveLog(obj.apiSchema) }), +}); + +/** + * @internal + */ +export const CreatePluginRequestFilterSensitiveLog = (obj: CreatePluginRequest): any => ({ + ...obj, + ...(obj.authConfiguration && { authConfiguration: obj.authConfiguration }), + ...(obj.customPluginConfiguration && { + customPluginConfiguration: CustomPluginConfigurationFilterSensitiveLog(obj.customPluginConfiguration), + }), +}); + +/** + * @internal + */ +export const GetPluginResponseFilterSensitiveLog = (obj: GetPluginResponse): any => ({ + ...obj, + ...(obj.authConfiguration && { authConfiguration: obj.authConfiguration }), + ...(obj.customPluginConfiguration && { + customPluginConfiguration: CustomPluginConfigurationFilterSensitiveLog(obj.customPluginConfiguration), + }), +}); + +/** + * @internal + */ +export const UpdatePluginRequestFilterSensitiveLog = (obj: UpdatePluginRequest): any => ({ + ...obj, + ...(obj.customPluginConfiguration && { + customPluginConfiguration: CustomPluginConfigurationFilterSensitiveLog(obj.customPluginConfiguration), + }), + ...(obj.authConfiguration && { authConfiguration: obj.authConfiguration }), +}); + +/** + * @internal + */ +export const ChatOutputStreamFilterSensitiveLog = (obj: ChatOutputStream): any => { + if (obj.textEvent !== undefined) return { textEvent: obj.textEvent }; + if (obj.metadataEvent !== undefined) return { metadataEvent: obj.metadataEvent }; + if (obj.actionReviewEvent !== undefined) return { actionReviewEvent: obj.actionReviewEvent }; + if (obj.failedAttachmentEvent !== undefined) return { failedAttachmentEvent: obj.failedAttachmentEvent }; + if (obj.authChallengeRequestEvent !== undefined) return { authChallengeRequestEvent: obj.authChallengeRequestEvent }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; +}; + +/** + * @internal + */ +export const ChatOutputFilterSensitiveLog = (obj: ChatOutput): any => ({ + ...obj, + ...(obj.outputStream && { outputStream: "STREAMING_CONTENT" }), +}); + +/** + * @internal + */ +export const ChatInputStreamFilterSensitiveLog = (obj: ChatInputStream): any => { + if (obj.configurationEvent !== undefined) return { configurationEvent: obj.configurationEvent }; + if (obj.textEvent !== undefined) return { textEvent: obj.textEvent }; + if (obj.attachmentEvent !== undefined) return { attachmentEvent: obj.attachmentEvent }; + if (obj.actionExecutionEvent !== undefined) return { actionExecutionEvent: obj.actionExecutionEvent }; + if (obj.endOfInputEvent !== undefined) return { endOfInputEvent: obj.endOfInputEvent }; + if (obj.authChallengeResponseEvent !== undefined) + return { authChallengeResponseEvent: obj.authChallengeResponseEvent }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; +}; + +/** + * @internal + */ +export const ChatInputFilterSensitiveLog = (obj: ChatInput): any => ({ + ...obj, + ...(obj.inputStream && { inputStream: "STREAMING_CONTENT" }), +}); diff --git a/clients/client-qbusiness/src/protocols/Aws_restJson1.ts b/clients/client-qbusiness/src/protocols/Aws_restJson1.ts index b98c5b17b1ccf..0a3679610ad12 100644 --- a/clients/client-qbusiness/src/protocols/Aws_restJson1.ts +++ b/clients/client-qbusiness/src/protocols/Aws_restJson1.ts @@ -28,6 +28,9 @@ import { import { DocumentType as __DocumentType, Endpoint as __Endpoint, + EventStreamSerdeContext as __EventStreamSerdeContext, + Message as __Message, + MessageHeaders as __MessageHeaders, ResponseMetadata as __ResponseMetadata, SerdeContext as __SerdeContext, } from "@smithy/types"; @@ -38,6 +41,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"; @@ -126,22 +130,33 @@ import { AccessControl, AccessDeniedException, ActionExecution, + ActionExecutionEvent, ActionExecutionPayloadField, ActionReview, + ActionReviewEvent, ActionReviewPayloadField, ActionReviewPayloadFieldAllowedValue, + APISchema, Application, AttachmentInput, + AttachmentInputEvent, AttachmentsConfiguration, AttributeFilter, + AuthChallengeRequestEvent, + AuthChallengeResponse, + AuthChallengeResponseEvent, BasicAuthConfiguration, BlockedPhrasesConfigurationUpdate, + ChatInputStream, ChatModeConfiguration, + ChatOutputStream, + ConfigurationEvent, ConflictException, ContentBlockerRule, ContentRetrievalRule, Conversation, CreatorModeConfiguration, + CustomPluginConfiguration, DataSource, DataSourceSyncJob, DataSourceVpcConfiguration, @@ -159,6 +174,8 @@ import { DocumentEnrichmentConfiguration, EligibleDataSource, EncryptionConfiguration, + EndOfInputEvent, + FailedAttachmentEvent, GroupMembers, GroupStatusDetail, HookConfiguration, @@ -172,7 +189,9 @@ import { MemberUser, Message, MessageUsefulnessFeedback, + MetadataEvent, NativeIndexConfiguration, + NoAuthConfiguration, NumberAttributeBoostingConfiguration, OAuth2ClientCredentialConfiguration, Plugin, @@ -193,6 +212,8 @@ import { StringAttributeValueBoostingLevel, StringListAttributeBoostingConfiguration, Tag, + TextInputEvent, + TextOutputEvent, ThrottlingException, TopicConfiguration, UserAlias, @@ -254,6 +275,32 @@ export const se_BatchPutDocumentCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1ChatCommand + */ +export const se_ChatCommand = async ( + input: ChatCommandInput, + context: __SerdeContext & __EventStreamSerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/applications/{applicationId}/conversations"); + b.p("applicationId", () => input.applicationId!, "{applicationId}", false); + const query: any = map({ + [_uI]: [, input[_uI]!], + [_uG]: [() => input.userGroups !== void 0, () => (input[_uG]! || []).map((_entry) => _entry as any)], + [_cI]: [, input[_cI]!], + [_pMI]: [, input[_pMI]!], + [_cT]: [, input[_cT] ?? generateIdempotencyToken()], + }); + let body: any; + if (input.inputStream !== undefined) { + body = se_ChatInputStream(input.inputStream, context); + } + b.m("POST").h(headers).q(query).b(body); + return b.build(); +}; + /** * serializeAws_restJson1ChatSyncCommand */ @@ -278,6 +325,7 @@ export const se_ChatSyncCommand = async ( actionExecution: (_) => se_ActionExecution(_, context), attachments: (_) => se_AttachmentsInput(_, context), attributeFilter: (_) => se_AttributeFilter(_, context), + authChallengeResponse: (_) => _json(_), chatMode: [], chatModeConfiguration: (_) => _json(_), clientToken: [true, (_) => _ ?? generateIdempotencyToken()], @@ -372,6 +420,7 @@ export const se_CreateIndexCommand = async ( description: [], displayName: [], tags: (_) => _json(_), + type: [], }) ); b.m("POST").h(headers).b(body); @@ -396,6 +445,7 @@ export const se_CreatePluginCommand = async ( take(input, { authConfiguration: (_) => _json(_), clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + customPluginConfiguration: (_) => _json(_), displayName: [], serverUrl: [], tags: (_) => _json(_), @@ -1232,6 +1282,7 @@ export const se_UpdateApplicationCommand = async ( attachmentsConfiguration: (_) => _json(_), description: [], displayName: [], + identityCenterInstanceArn: [], roleArn: [], }) ); @@ -1343,6 +1394,7 @@ export const se_UpdatePluginCommand = async ( body = JSON.stringify( take(input, { authConfiguration: (_) => _json(_), + customPluginConfiguration: (_) => _json(_), displayName: [], serverUrl: [], state: [], @@ -1421,6 +1473,7 @@ export const se_UpdateWebExperienceCommand = async ( body = JSON.stringify( take(input, { authenticationConfiguration: (_) => _json(_), + roleArn: [], samplePromptsControlMode: [], subtitle: [], title: [], @@ -1473,6 +1526,24 @@ export const de_BatchPutDocumentCommand = async ( return contents; }; +/** + * deserializeAws_restJson1ChatCommand + */ +export const de_ChatCommand = 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.outputStream = de_ChatOutputStream(data, context); + return contents; +}; + /** * deserializeAws_restJson1ChatSyncCommand */ @@ -1489,6 +1560,7 @@ export const de_ChatSyncCommand = async ( const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { actionReview: (_) => de_ActionReview(_, context), + authChallengeRequest: _json, conversationId: __expectString, failedAttachments: _json, sourceAttributions: (_) => de_SourceAttributions(_, context), @@ -1581,6 +1653,7 @@ export const de_CreatePluginCommand = async ( }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { + buildStatus: __expectString, pluginArn: __expectString, pluginId: __expectString, }); @@ -1960,6 +2033,7 @@ export const de_GetIndexCommand = async ( indexId: __expectString, indexStatistics: _json, status: __expectString, + type: __expectString, updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), }); Object.assign(contents, doc); @@ -1983,7 +2057,9 @@ export const de_GetPluginCommand = async ( const doc = take(data, { applicationId: __expectString, authConfiguration: (_) => _json(__expectUnion(_)), + buildStatus: __expectString, createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + customPluginConfiguration: _json, displayName: __expectString, pluginArn: __expectString, pluginId: __expectString, @@ -2796,6 +2872,160 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; +/** + * serializeAws_restJson1ChatInputStream + */ +const se_ChatInputStream = (input: any, context: __SerdeContext & __EventStreamSerdeContext): any => { + const eventMarshallingVisitor = (event: any): __Message => + ChatInputStream.visit(event, { + configurationEvent: (value) => se_ConfigurationEvent_event(value, context), + textEvent: (value) => se_TextInputEvent_event(value, context), + attachmentEvent: (value) => se_AttachmentInputEvent_event(value, context), + actionExecutionEvent: (value) => se_ActionExecutionEvent_event(value, context), + endOfInputEvent: (value) => se_EndOfInputEvent_event(value, context), + authChallengeResponseEvent: (value) => se_AuthChallengeResponseEvent_event(value, context), + _: (value) => value as any, + }); + return context.eventStreamMarshaller.serialize(input, eventMarshallingVisitor); +}; +const se_ActionExecutionEvent_event = (input: ActionExecutionEvent, context: __SerdeContext): __Message => { + const headers: __MessageHeaders = { + ":event-type": { type: "string", value: "ActionExecutionEvent" }, + ":message-type": { type: "string", value: "event" }, + ":content-type": { type: "string", value: "application/json" }, + }; + let body = new Uint8Array(); + body = se_ActionExecutionEvent(input, context); + body = context.utf8Decoder(JSON.stringify(body)); + return { headers, body }; +}; +const se_AttachmentInputEvent_event = (input: AttachmentInputEvent, context: __SerdeContext): __Message => { + const headers: __MessageHeaders = { + ":event-type": { type: "string", value: "AttachmentInputEvent" }, + ":message-type": { type: "string", value: "event" }, + ":content-type": { type: "string", value: "application/json" }, + }; + let body = new Uint8Array(); + body = se_AttachmentInputEvent(input, context); + body = context.utf8Decoder(JSON.stringify(body)); + return { headers, body }; +}; +const se_AuthChallengeResponseEvent_event = (input: AuthChallengeResponseEvent, context: __SerdeContext): __Message => { + const headers: __MessageHeaders = { + ":event-type": { type: "string", value: "AuthChallengeResponseEvent" }, + ":message-type": { type: "string", value: "event" }, + ":content-type": { type: "string", value: "application/json" }, + }; + let body = new Uint8Array(); + body = _json(input); + body = context.utf8Decoder(JSON.stringify(body)); + return { headers, body }; +}; +const se_ConfigurationEvent_event = (input: ConfigurationEvent, context: __SerdeContext): __Message => { + const headers: __MessageHeaders = { + ":event-type": { type: "string", value: "ConfigurationEvent" }, + ":message-type": { type: "string", value: "event" }, + ":content-type": { type: "string", value: "application/json" }, + }; + let body = new Uint8Array(); + body = se_ConfigurationEvent(input, context); + body = context.utf8Decoder(JSON.stringify(body)); + return { headers, body }; +}; +const se_EndOfInputEvent_event = (input: EndOfInputEvent, context: __SerdeContext): __Message => { + const headers: __MessageHeaders = { + ":event-type": { type: "string", value: "EndOfInputEvent" }, + ":message-type": { type: "string", value: "event" }, + ":content-type": { type: "string", value: "application/json" }, + }; + let body = new Uint8Array(); + body = _json(input); + body = context.utf8Decoder(JSON.stringify(body)); + return { headers, body }; +}; +const se_TextInputEvent_event = (input: TextInputEvent, context: __SerdeContext): __Message => { + const headers: __MessageHeaders = { + ":event-type": { type: "string", value: "TextInputEvent" }, + ":message-type": { type: "string", value: "event" }, + ":content-type": { type: "string", value: "application/json" }, + }; + let body = new Uint8Array(); + body = _json(input); + body = context.utf8Decoder(JSON.stringify(body)); + return { headers, body }; +}; +/** + * deserializeAws_restJson1ChatOutputStream + */ +const de_ChatOutputStream = ( + output: any, + context: __SerdeContext & __EventStreamSerdeContext +): AsyncIterable => { + return context.eventStreamMarshaller.deserialize(output, async (event) => { + if (event["textEvent"] != null) { + return { + textEvent: await de_TextOutputEvent_event(event["textEvent"], context), + }; + } + if (event["metadataEvent"] != null) { + return { + metadataEvent: await de_MetadataEvent_event(event["metadataEvent"], context), + }; + } + if (event["actionReviewEvent"] != null) { + return { + actionReviewEvent: await de_ActionReviewEvent_event(event["actionReviewEvent"], context), + }; + } + if (event["failedAttachmentEvent"] != null) { + return { + failedAttachmentEvent: await de_FailedAttachmentEvent_event(event["failedAttachmentEvent"], context), + }; + } + if (event["authChallengeRequestEvent"] != null) { + return { + authChallengeRequestEvent: await de_AuthChallengeRequestEvent_event( + event["authChallengeRequestEvent"], + context + ), + }; + } + return { $unknown: output }; + }); +}; +const de_ActionReviewEvent_event = async (output: any, context: __SerdeContext): Promise => { + const contents: ActionReviewEvent = {} as any; + const data: any = await parseBody(output.body, context); + Object.assign(contents, de_ActionReviewEvent(data, context)); + return contents; +}; +const de_AuthChallengeRequestEvent_event = async ( + output: any, + context: __SerdeContext +): Promise => { + const contents: AuthChallengeRequestEvent = {} as any; + const data: any = await parseBody(output.body, context); + Object.assign(contents, _json(data)); + return contents; +}; +const de_FailedAttachmentEvent_event = async (output: any, context: __SerdeContext): Promise => { + const contents: FailedAttachmentEvent = {} as any; + const data: any = await parseBody(output.body, context); + Object.assign(contents, _json(data)); + return contents; +}; +const de_MetadataEvent_event = async (output: any, context: __SerdeContext): Promise => { + const contents: MetadataEvent = {} as any; + const data: any = await parseBody(output.body, context); + Object.assign(contents, de_MetadataEvent(data, context)); + return contents; +}; +const de_TextOutputEvent_event = async (output: any, context: __SerdeContext): Promise => { + const contents: TextOutputEvent = {} as any; + const data: any = await parseBody(output.body, context); + Object.assign(contents, _json(data)); + return contents; +}; // se_AccessConfiguration omitted. // se_AccessControl omitted. @@ -2813,6 +3043,17 @@ const se_ActionExecution = (input: ActionExecution, context: __SerdeContext): an }); }; +/** + * serializeAws_restJson1ActionExecutionEvent + */ +const se_ActionExecutionEvent = (input: ActionExecutionEvent, context: __SerdeContext): any => { + return take(input, { + payload: (_) => se_ActionExecutionPayload(_, context), + payloadFieldNameSeparator: [], + pluginId: [], + }); +}; + /** * serializeAws_restJson1ActionExecutionPayload */ @@ -2845,6 +3086,8 @@ const se_ActionPayloadFieldValue = (input: __DocumentType, context: __SerdeConte return input; }; +// se_APISchema omitted. + /** * serializeAws_restJson1AttachmentInput */ @@ -2855,6 +3098,15 @@ const se_AttachmentInput = (input: AttachmentInput, context: __SerdeContext): an }); }; +/** + * serializeAws_restJson1AttachmentInputEvent + */ +const se_AttachmentInputEvent = (input: AttachmentInputEvent, context: __SerdeContext): any => { + return take(input, { + attachment: (_) => se_AttachmentInput(_, context), + }); +}; + // se_AttachmentsConfiguration omitted. /** @@ -2897,6 +3149,12 @@ const se_AttributeFilters = (input: AttributeFilter[], context: __SerdeContext): }); }; +// se_AuthChallengeResponse omitted. + +// se_AuthChallengeResponseEvent omitted. + +// se_AuthorizationResponseMap omitted. + // se_BasicAuthConfiguration omitted. // se_BlockedPhrases omitted. @@ -2905,12 +3163,25 @@ const se_AttributeFilters = (input: AttributeFilter[], context: __SerdeContext): // se_ChatModeConfiguration omitted. +/** + * serializeAws_restJson1ConfigurationEvent + */ +const se_ConfigurationEvent = (input: ConfigurationEvent, context: __SerdeContext): any => { + return take(input, { + attributeFilter: (_) => se_AttributeFilter(_, context), + chatMode: [], + chatModeConfiguration: _json, + }); +}; + // se_ContentBlockerRule omitted. // se_ContentRetrievalRule omitted. // se_CreatorModeConfiguration omitted. +// se_CustomPluginConfiguration omitted. + /** * serializeAws_restJson1DataSourceConfiguration */ @@ -3046,6 +3317,8 @@ const se_Documents = (input: Document[], context: __SerdeContext): any => { // se_EncryptionConfiguration omitted. +// se_EndOfInputEvent omitted. + // se_ExampleChatMessages omitted. // se_GroupMembers omitted. @@ -3116,6 +3389,8 @@ const se_MessageUsefulnessFeedback = (input: MessageUsefulnessFeedback, context: // se_NativeIndexConfiguration omitted. +// se_NoAuthConfiguration omitted. + // se_NumberAttributeBoostingConfiguration omitted. // se_OAuth2ClientCredentialConfiguration omitted. @@ -3158,6 +3433,8 @@ const se_MessageUsefulnessFeedback = (input: MessageUsefulnessFeedback, context: // se_Tags omitted. +// se_TextInputEvent omitted. + // se_TopicConfiguration omitted. // se_TopicConfigurations omitted. @@ -3232,6 +3509,21 @@ const de_ActionReview = (output: any, context: __SerdeContext): ActionReview => }) as any; }; +/** + * deserializeAws_restJson1ActionReviewEvent + */ +const de_ActionReviewEvent = (output: any, context: __SerdeContext): ActionReviewEvent => { + return take(output, { + conversationId: __expectString, + payload: (_: any) => de_ActionReviewPayload(_, context), + payloadFieldNameSeparator: __expectString, + pluginId: __expectString, + pluginType: __expectString, + systemMessageId: __expectString, + userMessageId: __expectString, + }) as any; +}; + /** * deserializeAws_restJson1ActionReviewPayload */ @@ -3250,7 +3542,9 @@ const de_ActionReviewPayload = (output: any, context: __SerdeContext): Record { return take(output, { + allowedFormat: __expectString, allowedValues: (_: any) => de_ActionReviewPayloadFieldAllowedValues(_, context), + displayDescription: __expectString, displayName: __expectString, displayOrder: __expectInt32, required: __expectBoolean, @@ -3287,6 +3581,8 @@ const de_ActionReviewPayloadFieldAllowedValues = ( return retVal; }; +// de_APISchema omitted. + /** * deserializeAws_restJson1Application */ @@ -3320,6 +3616,10 @@ const de_Applications = (output: any, context: __SerdeContext): Application[] => // de_AttachmentsOutput omitted. +// de_AuthChallengeRequest omitted. + +// de_AuthChallengeRequestEvent omitted. + // de_BasicAuthConfiguration omitted. // de_BlockedPhrases omitted. @@ -3353,6 +3653,8 @@ const de_Conversations = (output: any, context: __SerdeContext): Conversation[] return retVal; }; +// de_CustomPluginConfiguration omitted. + /** * deserializeAws_restJson1DataSource */ @@ -3520,6 +3822,8 @@ const de_DocumentEnrichmentConfiguration = (output: any, context: __SerdeContext // de_ExampleChatMessages omitted. +// de_FailedAttachmentEvent omitted. + // de_FailedDocument omitted. // de_FailedDocuments omitted. @@ -3651,8 +3955,23 @@ const de_Messages = (output: any, context: __SerdeContext): Message[] => { return retVal; }; +/** + * deserializeAws_restJson1MetadataEvent + */ +const de_MetadataEvent = (output: any, context: __SerdeContext): MetadataEvent => { + return take(output, { + conversationId: __expectString, + finalTextMessage: __expectString, + sourceAttributions: (_: any) => de_SourceAttributions(_, context), + systemMessageId: __expectString, + userMessageId: __expectString, + }) as any; +}; + // de_NativeIndexConfiguration omitted. +// de_NoAuthConfiguration omitted. + // de_NumberAttributeBoostingConfiguration omitted. // de_OAuth2ClientCredentialConfiguration omitted. @@ -3662,6 +3981,7 @@ const de_Messages = (output: any, context: __SerdeContext): Message[] => { */ const de_Plugin = (output: any, context: __SerdeContext): Plugin => { return take(output, { + buildStatus: __expectString, createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), displayName: __expectString, pluginId: __expectString, @@ -3698,10 +4018,14 @@ const de_Plugins = (output: any, context: __SerdeContext): Plugin[] => { // de_Rules omitted. +// de_S3 omitted. + // de_SamlConfiguration omitted. // de_SecurityGroupIds omitted. +// de_SnippetExcerpt omitted. + /** * deserializeAws_restJson1SourceAttribution */ @@ -3743,6 +4067,8 @@ const de_SourceAttributions = (output: any, context: __SerdeContext): SourceAttr // de_TextDocumentStatistics omitted. +// de_TextOutputEvent omitted. + // de_TextSegment omitted. // de_TextSegmentList omitted. @@ -3811,11 +4137,14 @@ const isSerializableHeaderValue = (value: any): boolean => (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0); +const _cI = "conversationId"; +const _cT = "clientToken"; const _dSI = "dataSourceId"; const _dSIa = "dataSourceIds"; const _eT = "endTime"; const _mR = "maxResults"; const _nT = "nextToken"; +const _pMI = "parentMessageId"; const _s = "sync"; const _sF = "statusFilter"; const _sS = "syncStatus"; diff --git a/clients/client-qbusiness/src/runtimeConfig.browser.ts b/clients/client-qbusiness/src/runtimeConfig.browser.ts index 524224d606117..cb33a9704b186 100644 --- a/clients/client-qbusiness/src/runtimeConfig.browser.ts +++ b/clients/client-qbusiness/src/runtimeConfig.browser.ts @@ -5,8 +5,9 @@ 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 { invalidFunction, 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 { QBusinessClientConfig } from "./QBusinessClient"; @@ -32,6 +33,10 @@ export const getRuntimeConfig = (config: QBusinessClientConfig) => { defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + eventStreamPayloadHandlerProvider: + config?.eventStreamPayloadHandlerProvider ?? + (() => ({ handle: invalidFunction("event stream request is not supported in browser.") })), + eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), diff --git a/clients/client-qbusiness/src/runtimeConfig.native.ts b/clients/client-qbusiness/src/runtimeConfig.native.ts index 68e042f27587e..7ee2dda00d4c7 100644 --- a/clients/client-qbusiness/src/runtimeConfig.native.ts +++ b/clients/client-qbusiness/src/runtimeConfig.native.ts @@ -1,5 +1,6 @@ // smithy-typescript generated code import { Sha256 } from "@aws-crypto/sha256-js"; +import { invalidFunction } from "@smithy/invalid-dependency"; import { QBusinessClientConfig } from "./QBusinessClient"; import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; @@ -13,6 +14,9 @@ export const getRuntimeConfig = (config: QBusinessClientConfig) => { ...browserDefaults, ...config, runtime: "react-native", + eventStreamPayloadHandlerProvider: + config?.eventStreamPayloadHandlerProvider ?? + (() => ({ handle: invalidFunction("event stream request is not supported in ReactNative.") })), sha256: config?.sha256 ?? Sha256, }; }; diff --git a/clients/client-qbusiness/src/runtimeConfig.ts b/clients/client-qbusiness/src/runtimeConfig.ts index 1b70bb7f3cec1..ecae01ba13386 100644 --- a/clients/client-qbusiness/src/runtimeConfig.ts +++ b/clients/client-qbusiness/src/runtimeConfig.ts @@ -4,6 +4,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { eventStreamPayloadHandlerProvider } from "@aws-sdk/eventstream-handler-node"; import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; import { NODE_REGION_CONFIG_FILE_OPTIONS, @@ -11,6 +12,7 @@ import { NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver"; +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"; @@ -42,6 +44,8 @@ export const getRuntimeConfig = (config: QBusinessClientConfig) => { defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? eventStreamPayloadHandlerProvider, + eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, 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( diff --git a/codegen/sdk-codegen/aws-models/qbusiness.json b/codegen/sdk-codegen/aws-models/qbusiness.json index 493802a32eb23..81d61e3adb61a 100644 --- a/codegen/sdk-codegen/aws-models/qbusiness.json +++ b/codegen/sdk-codegen/aws-models/qbusiness.json @@ -1,6 +1,37 @@ { "smithy": "2.0", "shapes": { + "com.amazonaws.qbusiness#APISchema": { + "type": "union", + "members": { + "payload": { + "target": "com.amazonaws.qbusiness#Payload", + "traits": { + "smithy.api#documentation": "

    The JSON or YAML-formatted payload defining the OpenAPI schema for a custom plugin.\n

    " + } + }, + "s3": { + "target": "com.amazonaws.qbusiness#S3", + "traits": { + "smithy.api#documentation": "

    Contains details about the S3 object containing the OpenAPI schema for a custom\n plugin. The schema could be in either JSON or YAML format.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    Contains details about the OpenAPI schema for a custom plugin. For more information,\n see custom plugin OpenAPI schemas. You can either include\n the schema directly in the payload field or you can upload it to an S3 bucket and\n specify the S3 bucket location in the s3 field.

    " + } + }, + "com.amazonaws.qbusiness#APISchemaType": { + "type": "enum", + "members": { + "OPEN_API_V3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OPEN_API_V3" + } + } + } + }, "com.amazonaws.qbusiness#AccessConfiguration": { "type": "structure", "members": { @@ -94,6 +125,35 @@ "smithy.api#documentation": "

    Performs an Amazon Q Business plugin action during a non-streaming chat\n conversation.

    " } }, + "com.amazonaws.qbusiness#ActionExecutionEvent": { + "type": "structure", + "members": { + "pluginId": { + "target": "com.amazonaws.qbusiness#PluginId", + "traits": { + "smithy.api#documentation": "

    The identifier of the plugin for which the action is being requested.

    ", + "smithy.api#required": {} + } + }, + "payload": { + "target": "com.amazonaws.qbusiness#ActionExecutionPayload", + "traits": { + "smithy.api#documentation": "

    A mapping of field names to the field values in input that an end user provides to\n Amazon Q Business requests to perform their plugin action.

    ", + "smithy.api#required": {} + } + }, + "payloadFieldNameSeparator": { + "target": "com.amazonaws.qbusiness#ActionPayloadFieldNameSeparator", + "traits": { + "smithy.api#documentation": "

    A string used to retain information about the hierarchical contexts within a action\n execution event payload.

    ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

    A request from an end user signalling an intent to perform an Amazon Q Business plugin\n action during a streaming chat.

    " + } + }, "com.amazonaws.qbusiness#ActionExecutionPayload": { "type": "map", "key": { @@ -199,6 +259,56 @@ "smithy.api#documentation": "

    An output event that Amazon Q Business returns to an user who wants to perform a plugin\n action during a non-streaming chat conversation. It contains information about the\n selected action with a list of possible user input fields, some pre-populated by\n Amazon Q Business.

    " } }, + "com.amazonaws.qbusiness#ActionReviewEvent": { + "type": "structure", + "members": { + "conversationId": { + "target": "com.amazonaws.qbusiness#ConversationId", + "traits": { + "smithy.api#documentation": "

    The identifier of the conversation with which the action review event is\n associated.

    " + } + }, + "userMessageId": { + "target": "com.amazonaws.qbusiness#MessageId", + "traits": { + "smithy.api#documentation": "

    The identifier of the conversation with which the plugin action is associated.

    " + } + }, + "systemMessageId": { + "target": "com.amazonaws.qbusiness#MessageId", + "traits": { + "smithy.api#documentation": "

    The identifier of an Amazon Q Business AI generated associated with the action review\n event.

    " + } + }, + "pluginId": { + "target": "com.amazonaws.qbusiness#PluginId", + "traits": { + "smithy.api#documentation": "

    The identifier of the plugin associated with the action review event.

    " + } + }, + "pluginType": { + "target": "com.amazonaws.qbusiness#PluginType", + "traits": { + "smithy.api#documentation": "

    The type of plugin.

    " + } + }, + "payload": { + "target": "com.amazonaws.qbusiness#ActionReviewPayload", + "traits": { + "smithy.api#documentation": "

    Field values that an end user needs to provide to Amazon Q Business for Amazon Q Business to\n perform the requested plugin action.

    " + } + }, + "payloadFieldNameSeparator": { + "target": "com.amazonaws.qbusiness#ActionPayloadFieldNameSeparator", + "traits": { + "smithy.api#documentation": "

    A string used to retain information about the hierarchical contexts within an action\n review event payload.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    An output event that Amazon Q Business returns to an user who wants to perform a plugin\n action during a streaming chat conversation. It contains information about the selected\n action with a list of possible user input fields, some pre-populated by Amazon Q Business.\n

    " + } + }, "com.amazonaws.qbusiness#ActionReviewPayload": { "type": "map", "key": { @@ -223,6 +333,12 @@ "smithy.api#documentation": "

    The display order of fields in a payload.

    " } }, + "displayDescription": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

    The field level description of each action review input field. This could be an\n explanation of the field. In the Amazon Q Business web experience, these descriptions could\n be used to display as tool tips to help users understand the field.

    " + } + }, "type": { "target": "com.amazonaws.qbusiness#ActionPayloadFieldType", "traits": { @@ -241,6 +357,12 @@ "smithy.api#documentation": "

    Information about the field values that an end user can use to provide to\n Amazon Q Business for Amazon Q Business to perform the requested plugin action.

    " } }, + "allowedFormat": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

    The expected data format for the action review input field value. For example, in PTO\n request, from and to would be of datetime allowed\n format.

    " + } + }, "required": { "target": "smithy.api#Boolean", "traits": { @@ -489,6 +611,17 @@ "smithy.api#documentation": "

    A file directly uploaded into a web experience chat.

    " } }, + "com.amazonaws.qbusiness#AttachmentInputEvent": { + "type": "structure", + "members": { + "attachment": { + "target": "com.amazonaws.qbusiness#AttachmentInput" + } + }, + "traits": { + "smithy.api#documentation": "

    A file input event activated by a end user request to upload files into their web\n experience chat.

    " + } + }, "com.amazonaws.qbusiness#AttachmentName": { "type": "string", "traits": { @@ -705,6 +838,93 @@ } } }, + "com.amazonaws.qbusiness#AuthChallengeRequest": { + "type": "structure", + "members": { + "authorizationUrl": { + "target": "com.amazonaws.qbusiness#Url", + "traits": { + "smithy.api#documentation": "

    The URL sent by Amazon Q Business to the third party authentication server to authenticate\n a custom plugin user through an OAuth protocol.

    ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

    A request made by Amazon Q Business to a third paty authentication server to authenticate\n a custom plugin user.

    " + } + }, + "com.amazonaws.qbusiness#AuthChallengeRequestEvent": { + "type": "structure", + "members": { + "authorizationUrl": { + "target": "com.amazonaws.qbusiness#Url", + "traits": { + "smithy.api#documentation": "

    The URL sent by Amazon Q Business to a third party authentication server in response to an\n authentication verification event activated by an end user request to use a custom\n plugin.

    ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

    An authentication verification event activated by an end user request to use a custom\n plugin.

    " + } + }, + "com.amazonaws.qbusiness#AuthChallengeResponse": { + "type": "structure", + "members": { + "responseMap": { + "target": "com.amazonaws.qbusiness#AuthorizationResponseMap", + "traits": { + "smithy.api#documentation": "

    The mapping of key-value pairs in an authentication challenge response.

    ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

    Contains details of the authentication information received from a third party\n authentication server in response to an authentication challenge.

    " + } + }, + "com.amazonaws.qbusiness#AuthChallengeResponseEvent": { + "type": "structure", + "members": { + "responseMap": { + "target": "com.amazonaws.qbusiness#AuthorizationResponseMap", + "traits": { + "smithy.api#documentation": "

    The mapping of key-value pairs in an authentication challenge response.

    ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

    An authentication verification event response by a third party authentication server\n to Amazon Q Business.

    " + } + }, + "com.amazonaws.qbusiness#AuthResponseKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.qbusiness#AuthResponseValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + } + } + }, + "com.amazonaws.qbusiness#AuthorizationResponseMap": { + "type": "map", + "key": { + "target": "com.amazonaws.qbusiness#AuthResponseKey" + }, + "value": { + "target": "com.amazonaws.qbusiness#AuthResponseValue" + } + }, "com.amazonaws.qbusiness#BasicAuthConfiguration": { "type": "structure", "members": { @@ -988,6 +1208,149 @@ } } }, + "com.amazonaws.qbusiness#Chat": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#ChatInput" + }, + "output": { + "target": "com.amazonaws.qbusiness#ChatOutput" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#LicenseNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Starts or continues a streaming Amazon Q Business conversation.

    ", + "smithy.api#http": { + "uri": "/applications/{applicationId}/conversations", + "method": "POST" + } + } + }, + "com.amazonaws.qbusiness#ChatInput": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

    The identifier of the Amazon Q Business application linked to a streaming Amazon Q Business\n conversation.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "userId": { + "target": "com.amazonaws.qbusiness#UserId", + "traits": { + "smithy.api#documentation": "

    The identifier of the user attached to the chat input.

    ", + "smithy.api#httpQuery": "userId" + } + }, + "userGroups": { + "target": "com.amazonaws.qbusiness#UserGroups", + "traits": { + "smithy.api#documentation": "

    The groups that a user associated with the chat input belongs to.

    ", + "smithy.api#httpQuery": "userGroups" + } + }, + "conversationId": { + "target": "com.amazonaws.qbusiness#ConversationId", + "traits": { + "smithy.api#documentation": "

    The identifier of the Amazon Q Business conversation.

    ", + "smithy.api#httpQuery": "conversationId" + } + }, + "parentMessageId": { + "target": "com.amazonaws.qbusiness#MessageId", + "traits": { + "smithy.api#documentation": "

    The identifier used to associate a user message with a AI generated response.

    ", + "smithy.api#httpQuery": "parentMessageId" + } + }, + "clientToken": { + "target": "com.amazonaws.qbusiness#ClientToken", + "traits": { + "smithy.api#documentation": "

    A token that you provide to identify the chat input.

    ", + "smithy.api#httpQuery": "clientToken", + "smithy.api#idempotencyToken": {} + } + }, + "inputStream": { + "target": "com.amazonaws.qbusiness#ChatInputStream", + "traits": { + "smithy.api#documentation": "

    The streaming input for the Chat API.

    ", + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#ChatInputStream": { + "type": "union", + "members": { + "configurationEvent": { + "target": "com.amazonaws.qbusiness#ConfigurationEvent", + "traits": { + "smithy.api#documentation": "

    A configuration event activated by an end user request to select a specific chat\n mode.

    " + } + }, + "textEvent": { + "target": "com.amazonaws.qbusiness#TextInputEvent", + "traits": { + "smithy.api#documentation": "

    Information about the payload of the ChatInputStream event containing the\n end user message input.

    " + } + }, + "attachmentEvent": { + "target": "com.amazonaws.qbusiness#AttachmentInputEvent", + "traits": { + "smithy.api#documentation": "

    A request by an end user to upload a file during chat.

    " + } + }, + "actionExecutionEvent": { + "target": "com.amazonaws.qbusiness#ActionExecutionEvent", + "traits": { + "smithy.api#documentation": "

    A request from an end user to perform an Amazon Q Business plugin action.

    " + } + }, + "endOfInputEvent": { + "target": "com.amazonaws.qbusiness#EndOfInputEvent", + "traits": { + "smithy.api#documentation": "

    The end of the streaming input for the Chat API.

    " + } + }, + "authChallengeResponseEvent": { + "target": "com.amazonaws.qbusiness#AuthChallengeResponseEvent", + "traits": { + "smithy.api#documentation": "

    An authentication verification event response by a third party authentication server\n to Amazon Q Business.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    The streaming input for the Chat API.

    ", + "smithy.api#streaming": {} + } + }, "com.amazonaws.qbusiness#ChatMode": { "type": "enum", "members": { @@ -1025,6 +1388,60 @@ "smithy.api#documentation": "

    Configuration information for Amazon Q Business conversation modes.

    \n

    For more information, see Admin controls and guardrails and Conversation settings.

    " } }, + "com.amazonaws.qbusiness#ChatOutput": { + "type": "structure", + "members": { + "outputStream": { + "target": "com.amazonaws.qbusiness#ChatOutputStream", + "traits": { + "smithy.api#documentation": "

    The streaming output for the Chat API.

    ", + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#ChatOutputStream": { + "type": "union", + "members": { + "textEvent": { + "target": "com.amazonaws.qbusiness#TextOutputEvent", + "traits": { + "smithy.api#documentation": "

    Information about the payload of the ChatOutputStream event containing\n the AI-generated message output.

    " + } + }, + "metadataEvent": { + "target": "com.amazonaws.qbusiness#MetadataEvent", + "traits": { + "smithy.api#documentation": "

    A metadata event for a AI-generated text output message in a Amazon Q Business\n conversation.

    " + } + }, + "actionReviewEvent": { + "target": "com.amazonaws.qbusiness#ActionReviewEvent", + "traits": { + "smithy.api#documentation": "

    A request from Amazon Q Business to the end user for information Amazon Q Business needs to\n successfully complete a requested plugin action.

    " + } + }, + "failedAttachmentEvent": { + "target": "com.amazonaws.qbusiness#FailedAttachmentEvent", + "traits": { + "smithy.api#documentation": "

    A failed file upload event during a web experience chat.

    " + } + }, + "authChallengeRequestEvent": { + "target": "com.amazonaws.qbusiness#AuthChallengeRequestEvent", + "traits": { + "smithy.api#documentation": "

    An authentication verification event activated by an end user request to use a custom\n plugin.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    The streaming output for the Chat API.

    ", + "smithy.api#streaming": {} + } + }, "com.amazonaws.qbusiness#ChatSync": { "type": "operation", "input": { @@ -1107,6 +1524,12 @@ "smithy.api#documentation": "

    A request from an end user to perform an Amazon Q Business plugin action.

    " } }, + "authChallengeResponse": { + "target": "com.amazonaws.qbusiness#AuthChallengeResponse", + "traits": { + "smithy.api#documentation": "

    An authentication verification event response by a third party authentication server\n to Amazon Q Business.

    " + } + }, "conversationId": { "target": "com.amazonaws.qbusiness#ConversationId", "traits": { @@ -1128,7 +1551,7 @@ "chatMode": { "target": "com.amazonaws.qbusiness#ChatMode", "traits": { - "smithy.api#documentation": "

    The chat modes available in an Amazon Q Business web experience.

    \n
      \n
    • \n

      \n RETRIEVAL_MODE - The default chat mode for an\n Amazon Q Business application. When this mode is enabled, Amazon Q Business generates\n responses only from data sources connected to an Amazon Q Business\n application.

      \n
    • \n
    • \n

      \n CREATOR_MODE - By selecting this mode, users can choose to\n generate responses only from the LLM knowledge, without consulting connected\n data sources, for a chat request.

      \n
    • \n
    • \n

      \n PLUGIN_MODE - By selecting this mode, users can choose to\n use plugins in chat.

      \n
    • \n
    \n

    For more information, see Admin controls and guardrails, Plugins,\n and Conversation settings.

    " + "smithy.api#documentation": "

    The chat modes available to an Amazon Q Business end user.

    \n
      \n
    • \n

      \n RETRIEVAL_MODE - The default chat mode for an\n Amazon Q Business application. When this mode is enabled, Amazon Q Business generates\n responses only from data sources connected to an Amazon Q Business\n application.

      \n
    • \n
    • \n

      \n CREATOR_MODE - By selecting this mode, users can choose to\n generate responses only from the LLM knowledge, without consulting connected\n data sources, for a chat request.

      \n
    • \n
    • \n

      \n PLUGIN_MODE - By selecting this mode, users can choose to\n use plugins in chat.

      \n
    • \n
    \n

    For more information, see Admin controls and guardrails, Plugins,\n and Conversation settings.

    " } }, "chatModeConfiguration": { @@ -1182,6 +1605,12 @@ "smithy.api#documentation": "

    A request from Amazon Q Business to the end user for information Amazon Q Business needs to\n successfully complete a requested plugin action.

    " } }, + "authChallengeRequest": { + "target": "com.amazonaws.qbusiness#AuthChallengeRequest", + "traits": { + "smithy.api#documentation": "

    An authentication verification event activated by an end user request to use a custom\n plugin.

    " + } + }, "sourceAttributions": { "target": "com.amazonaws.qbusiness#SourceAttributions", "traits": { @@ -1208,6 +1637,26 @@ } } }, + "com.amazonaws.qbusiness#ConfigurationEvent": { + "type": "structure", + "members": { + "chatMode": { + "target": "com.amazonaws.qbusiness#ChatMode", + "traits": { + "smithy.api#documentation": "

    The chat modes available to an Amazon Q Business end user.

    \n
      \n
    • \n

      \n RETRIEVAL_MODE - The default chat mode for an\n Amazon Q Business application. When this mode is enabled, Amazon Q Business generates\n responses only from data sources connected to an Amazon Q Business\n application.

      \n
    • \n
    • \n

      \n CREATOR_MODE - By selecting this mode, users can choose to\n generate responses only from the LLM knowledge, without consulting connected\n data sources, for a chat request.

      \n
    • \n
    • \n

      \n PLUGIN_MODE - By selecting this mode, users can choose to\n use plugins in chat.

      \n
    • \n
    \n

    For more information, see Admin controls and guardrails, Plugins,\n and Conversation settings.

    " + } + }, + "chatModeConfiguration": { + "target": "com.amazonaws.qbusiness#ChatModeConfiguration" + }, + "attributeFilter": { + "target": "com.amazonaws.qbusiness#AttributeFilter" + } + }, + "traits": { + "smithy.api#documentation": "

    A configuration event activated by an end user request to select a specific chat\n mode.

    " + } + }, "com.amazonaws.qbusiness#ConflictException": { "type": "structure", "members": { @@ -1429,7 +1878,7 @@ "kms:DescribeKey", "kms:CreateGrant" ], - "smithy.api#documentation": "

    Creates an Amazon Q Business application.

    ", + "smithy.api#documentation": "

    Creates an Amazon Q Business application.

    \n \n

    There are new tiers for Amazon Q Business. Not all features in Amazon Q Business Pro are \n also available in Amazon Q Business Lite. For information on what's included in \n Amazon Q Business Lite and what's included in \n Amazon Q Business Pro, see Amazon Q Business tiers. \n You must use the Amazon Q Business console to assign subscription tiers to users.

    \n
    ", "smithy.api#http": { "uri": "/applications", "method": "POST" @@ -1450,8 +1899,7 @@ "roleArn": { "target": "com.amazonaws.qbusiness#RoleArn", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of an IAM role with permissions to access your Amazon\n CloudWatch logs and metrics.

    ", - "smithy.api#required": {} + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of an IAM role with permissions to access your Amazon\n CloudWatch logs and metrics.

    " } }, "identityCenterInstanceArn": { @@ -1723,6 +2171,12 @@ "smithy.api#required": {} } }, + "type": { + "target": "com.amazonaws.qbusiness#IndexType", + "traits": { + "smithy.api#documentation": "

    The index type that's suitable for your needs. For more information on what's included\n in each type of index or index tier, see Amazon Q Business\n tiers.

    " + } + }, "description": { "target": "com.amazonaws.qbusiness#Description", "traits": { @@ -1806,6 +2260,7 @@ } ], "traits": { + "aws.iam#conditionKeys": ["aws:RequestTag/${TagKey}", "aws:TagKeys"], "aws.iam#requiredActions": [ "qbusiness:GetPlugin", "qbusiness:TagResource", @@ -1845,17 +2300,22 @@ "smithy.api#required": {} } }, + "authConfiguration": { + "target": "com.amazonaws.qbusiness#PluginAuthConfiguration", + "traits": { + "smithy.api#required": {} + } + }, "serverUrl": { "target": "com.amazonaws.qbusiness#Url", "traits": { - "smithy.api#documentation": "

    The source URL used for plugin configuration.

    ", - "smithy.api#required": {} + "smithy.api#documentation": "

    The source URL used for plugin configuration.

    " } }, - "authConfiguration": { - "target": "com.amazonaws.qbusiness#PluginAuthConfiguration", + "customPluginConfiguration": { + "target": "com.amazonaws.qbusiness#CustomPluginConfiguration", "traits": { - "smithy.api#required": {} + "smithy.api#documentation": "

    Contains configuration for a custom plugin.

    " } }, "tags": { @@ -1891,6 +2351,12 @@ "traits": { "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of a plugin.

    " } + }, + "buildStatus": { + "target": "com.amazonaws.qbusiness#PluginBuildStatus", + "traits": { + "smithy.api#documentation": "

    The current status of a plugin. A plugin is modified asynchronously.

    " + } } }, "traits": { @@ -2263,6 +2729,35 @@ } } }, + "com.amazonaws.qbusiness#CustomPluginConfiguration": { + "type": "structure", + "members": { + "description": { + "target": "com.amazonaws.qbusiness#PluginDescription", + "traits": { + "smithy.api#documentation": "

    A description for your custom plugin configuration.

    ", + "smithy.api#required": {} + } + }, + "apiSchemaType": { + "target": "com.amazonaws.qbusiness#APISchemaType", + "traits": { + "smithy.api#documentation": "

    The type of OpenAPI schema to use.

    ", + "smithy.api#required": {} + } + }, + "apiSchema": { + "target": "com.amazonaws.qbusiness#APISchema", + "traits": { + "smithy.api#documentation": "

    Contains either details about the S3 object containing the OpenAPI schema for the\n action group or the JSON or YAML-formatted payload defining the schema.

    ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

    Configuration information required to create a custom plugin.

    " + } + }, "com.amazonaws.qbusiness#DataSource": { "type": "structure", "members": { @@ -3526,7 +4021,7 @@ "operator": { "target": "com.amazonaws.qbusiness#DocumentEnrichmentConditionOperator", "traits": { - "smithy.api#documentation": "

    The identifier of the document attribute used for the condition.

    \n

    For example, 'Source_URI' could be an identifier for the attribute or metadata field\n that contains source URIs associated with the documents.

    \n

    Amazon Kendra currently does not support _document_body as an\n attribute key used for the condition.

    ", + "smithy.api#documentation": "

    The identifier of the document attribute used for the condition.

    \n

    For example, 'Source_URI' could be an identifier for the attribute or metadata field\n that contains source URIs associated with the documents.

    \n

    Amazon Q Business currently does not support _document_body as an attribute\n key used for the condition.

    ", "smithy.api#required": {} } }, @@ -3542,7 +4037,7 @@ "type": "structure", "members": { "name": { - "target": "com.amazonaws.qbusiness#String", + "target": "com.amazonaws.qbusiness#DocumentMetadataConfigurationName", "traits": { "smithy.api#documentation": "

    The name of the document attribute.

    " } @@ -3847,6 +4342,16 @@ "smithy.api#pattern": "^\\P{C}*$" } }, + "com.amazonaws.qbusiness#DocumentMetadataConfigurationName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 30 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$" + } + }, "com.amazonaws.qbusiness#DocumentStatus": { "type": "enum", "members": { @@ -3957,6 +4462,13 @@ "smithy.api#documentation": "

    Provides the identifier of the KMS key used to encrypt data indexed by\n Amazon Q Business. Amazon Q Business doesn't support asymmetric keys.

    " } }, + "com.amazonaws.qbusiness#EndOfInputEvent": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

    The end of the streaming input for the Chat API.

    " + } + }, "com.amazonaws.qbusiness#ErrorCode": { "type": "enum", "members": { @@ -4056,6 +4568,9 @@ { "target": "com.amazonaws.qbusiness#BatchPutDocument" }, + { + "target": "com.amazonaws.qbusiness#Chat" + }, { "target": "com.amazonaws.qbusiness#ChatSync" }, @@ -4145,7 +4660,7 @@ "http": ["h2", "http/1.1"], "eventStreamHttp": ["h2"] }, - "smithy.api#documentation": "\n

    Amazon Q is in preview release and is subject to change.

    \n
    \n

    This is the Amazon Q Business API Reference. Amazon Q Business is a fully\n managed, generative-AI powered enterprise chat assistant that you can deploy within your\n organization. Amazon Q Business enhances employee productivity by supporting key tasks such\n as question-answering, knowledge discovery, writing email messages, summarizing text,\n drafting document outlines, and brainstorming ideas. Users ask questions of\n Amazon Q Business and get answers that are presented in a conversational manner. For an\n introduction to the service, see the \n Amazon Q Business User Guide\n .

    \n

    For an overview of the Amazon Q Business APIs, see Overview of Amazon Q Business API operations.

    \n

    For information about the IAM access control permissions you need to\n use this API, see IAM roles for Amazon Q Business in the\n Amazon Q Business User Guide.

    \n

    You can use the following AWS SDKs to access Amazon Q Business APIs:

    \n \n

    The following resources provide additional information about using the Amazon Q Business\n API:

    \n ", + "smithy.api#documentation": "

    This is the Amazon Q Business API Reference. Amazon Q Business is a fully\n managed, generative-AI powered enterprise chat assistant that you can deploy within your\n organization. Amazon Q Business enhances employee productivity by supporting key tasks such\n as question-answering, knowledge discovery, writing email messages, summarizing text,\n drafting document outlines, and brainstorming ideas. Users ask questions of\n Amazon Q Business and get answers that are presented in a conversational manner. For an\n introduction to the service, see the \n Amazon Q Business User Guide\n .

    \n

    For an overview of the Amazon Q Business APIs, see Overview of Amazon Q Business API operations.

    \n

    For information about the IAM access control permissions you need to\n use this API, see IAM roles for Amazon Q Business in the\n Amazon Q Business User Guide.

    \n

    You can use the following AWS SDKs to access Amazon Q Business APIs:

    \n \n

    The following resources provide additional information about using the Amazon Q Business\n API:

    \n ", "smithy.api#title": "QBusiness", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -4515,6 +5030,35 @@ } } }, + "com.amazonaws.qbusiness#FailedAttachmentEvent": { + "type": "structure", + "members": { + "conversationId": { + "target": "com.amazonaws.qbusiness#ConversationId", + "traits": { + "smithy.api#documentation": "

    The identifier of the conversation associated with the failed file upload.

    " + } + }, + "userMessageId": { + "target": "com.amazonaws.qbusiness#MessageId", + "traits": { + "smithy.api#documentation": "

    The identifier of the end user chat message associated with the file upload.

    " + } + }, + "systemMessageId": { + "target": "com.amazonaws.qbusiness#MessageId", + "traits": { + "smithy.api#documentation": "

    The identifier of the AI-generated message associated with the file upload.

    " + } + }, + "attachment": { + "target": "com.amazonaws.qbusiness#AttachmentOutput" + } + }, + "traits": { + "smithy.api#documentation": "

    A failed file upload during web experience chat.

    " + } + }, "com.amazonaws.qbusiness#FailedDocument": { "type": "structure", "members": { @@ -5135,6 +5679,12 @@ "smithy.api#documentation": "

    The name of the Amazon Q Business index.

    " } }, + "type": { + "target": "com.amazonaws.qbusiness#IndexType", + "traits": { + "smithy.api#documentation": "

    The type of index attached to your Amazon Q Business application.

    " + } + }, "indexArn": { "target": "com.amazonaws.qbusiness#IndexArn", "traits": { @@ -5290,6 +5840,18 @@ "authConfiguration": { "target": "com.amazonaws.qbusiness#PluginAuthConfiguration" }, + "customPluginConfiguration": { + "target": "com.amazonaws.qbusiness#CustomPluginConfiguration", + "traits": { + "smithy.api#documentation": "

    Configuration information required to create a custom plugin.

    " + } + }, + "buildStatus": { + "target": "com.amazonaws.qbusiness#PluginBuildStatus", + "traits": { + "smithy.api#documentation": "

    The current status of a plugin. A plugin is modified asynchronously.

    " + } + }, "pluginArn": { "target": "com.amazonaws.qbusiness#PluginArn", "traits": { @@ -5613,13 +6175,13 @@ "createdAt": { "target": "com.amazonaws.qbusiness#Timestamp", "traits": { - "smithy.api#documentation": "

    The Unix timestamp when the retriever was created.

    " + "smithy.api#documentation": "

    The Unix timestamp when the Amazon Q Business web experience was last created.

    " } }, "updatedAt": { "target": "com.amazonaws.qbusiness#Timestamp", "traits": { - "smithy.api#documentation": "

    The Unix timestamp when the data source connector was last updated.

    " + "smithy.api#documentation": "

    The Unix timestamp when the Amazon Q Business web experience was last updated.

    " } }, "title": { @@ -5655,6 +6217,9 @@ "authenticationConfiguration": { "target": "com.amazonaws.qbusiness#WebExperienceAuthConfiguration", "traits": { + "smithy.api#deprecated": { + "message": "Property associated with legacy SAML IdP flow. Deprecated in favor of using AWS IAM Identity Center for user management." + }, "smithy.api#documentation": "

    The authentication configuration information for your Amazon Q Business web\n experience.

    " } }, @@ -5816,7 +6381,7 @@ } }, "traits": { - "smithy.api#documentation": "

    Provides the configuration information for invoking a Lambda function in\n Lambda to alter document metadata and content when ingesting\n documents into Amazon Q Business.

    \n

    You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on\n the original or raw documents.

    \n

    If you want to apply advanced alterations on the Amazon Q Business structured documents,\n you must configure your Lambda function using PostExtractionHookConfiguration.

    \n

    You can only invoke one Lambda function. However, this function can invoke\n other functions it requires.

    \n

    For more information, see Custom document enrichment.

    " + "smithy.api#documentation": "

    Provides the configuration information for invoking a Lambda function in\n Lambda to alter document metadata and content when ingesting\n documents into Amazon Q Business.

    \n

    You can configure your Lambda function using the\n PreExtractionHookConfiguration parameter if you want to apply advanced\n alterations on the original or raw documents.

    \n

    If you want to apply advanced alterations on the Amazon Q Business structured documents,\n you must configure your Lambda function using\n PostExtractionHookConfiguration.

    \n

    You can only invoke one Lambda function. However, this function can invoke\n other functions it requires.

    \n

    For more information, see Custom document enrichment.

    " } }, "com.amazonaws.qbusiness#IdcApplicationArn": { @@ -6004,6 +6569,23 @@ } } }, + "com.amazonaws.qbusiness#IndexType": { + "type": "enum", + "members": { + "ENTERPRISE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENTERPRISE" + } + }, + "STARTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STARTER" + } + } + } + }, "com.amazonaws.qbusiness#IndexedTextBytes": { "type": "long", "traits": { @@ -7747,6 +8329,44 @@ "target": "com.amazonaws.qbusiness#Message" } }, + "com.amazonaws.qbusiness#MetadataEvent": { + "type": "structure", + "members": { + "conversationId": { + "target": "com.amazonaws.qbusiness#ConversationId", + "traits": { + "smithy.api#documentation": "

    The identifier of the conversation with which the generated metadata is\n associated.

    " + } + }, + "userMessageId": { + "target": "com.amazonaws.qbusiness#MessageId", + "traits": { + "smithy.api#documentation": "

    The identifier of an Amazon Q Business end user text input message within the\n conversation.

    " + } + }, + "systemMessageId": { + "target": "com.amazonaws.qbusiness#MessageId", + "traits": { + "smithy.api#documentation": "

    The identifier of an Amazon Q Business AI generated message within the\n conversation.

    " + } + }, + "sourceAttributions": { + "target": "com.amazonaws.qbusiness#SourceAttributions", + "traits": { + "smithy.api#documentation": "

    The source documents used to generate the conversation response.

    " + } + }, + "finalTextMessage": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

    The final text output message generated by the system.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    A metadata event for a AI-generated text output message in a Amazon Q Business\n conversation, containing associated metadata generated.

    " + } + }, "com.amazonaws.qbusiness#MetricValue": { "type": "string", "traits": { @@ -7783,6 +8403,13 @@ } } }, + "com.amazonaws.qbusiness#NoAuthConfiguration": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

    Information about invoking a custom plugin without any authentication or authorization\n requirement.

    " + } + }, "com.amazonaws.qbusiness#NumberAttributeBoostingConfiguration": { "type": "structure", "members": { @@ -7843,6 +8470,12 @@ "smithy.api#documentation": "

    Information about the OAuth 2.0 authentication credential/token used to configure a\n plugin.

    " } }, + "com.amazonaws.qbusiness#Payload": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, "com.amazonaws.qbusiness#Plugin": { "type": "structure", "members": { @@ -7876,6 +8509,12 @@ "smithy.api#documentation": "

    The current status of the plugin.

    " } }, + "buildStatus": { + "target": "com.amazonaws.qbusiness#PluginBuildStatus", + "traits": { + "smithy.api#documentation": "

    The status of the plugin.

    " + } + }, "createdAt": { "target": "com.amazonaws.qbusiness#Timestamp", "traits": { @@ -7917,12 +8556,65 @@ "traits": { "smithy.api#documentation": "

    Information about the OAuth 2.0 authentication credential/token used to configure a\n plugin.

    " } + }, + "noAuthConfiguration": { + "target": "com.amazonaws.qbusiness#NoAuthConfiguration", + "traits": { + "smithy.api#documentation": "

    Information about invoking a custom plugin without any authentication.

    " + } } }, "traits": { "smithy.api#documentation": "

    Authentication configuration information for an Amazon Q Business plugin.

    " } }, + "com.amazonaws.qbusiness#PluginBuildStatus": { + "type": "enum", + "members": { + "READY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "READY" + } + }, + "CREATE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATE_IN_PROGRESS" + } + }, + "CREATE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATE_FAILED" + } + }, + "UPDATE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_IN_PROGRESS" + } + }, + "UPDATE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_FAILED" + } + }, + "DELETE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETE_IN_PROGRESS" + } + }, + "DELETE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETE_FAILED" + } + } + } + }, "com.amazonaws.qbusiness#PluginConfiguration": { "type": "structure", "members": { @@ -7938,6 +8630,15 @@ "smithy.api#documentation": "

    Configuration information required to invoke chat in PLUGIN_MODE.

    \n

    For more information, see Admin controls and guardrails, Plugins,\n and Conversation settings.

    " } }, + "com.amazonaws.qbusiness#PluginDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, "com.amazonaws.qbusiness#PluginId": { "type": "string", "traits": { @@ -8032,6 +8733,12 @@ "traits": { "smithy.api#enumValue": "ZENDESK" } + }, + "CUSTOM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CUSTOM" + } } } }, @@ -8778,6 +9485,23 @@ "smithy.api#httpError": 402 } }, + "com.amazonaws.qbusiness#SnippetExcerpt": { + "type": "structure", + "members": { + "text": { + "target": "com.amazonaws.qbusiness#SnippetExcerptText", + "traits": { + "smithy.api#documentation": "

    The relevant text excerpt from a source that was used to generate a citation text\n segment in an Amazon Q chat response.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    Contains the relevant text excerpt from a source that was used to generate a citation\n text segment in an Amazon Q Business chat response.

    " + } + }, + "com.amazonaws.qbusiness#SnippetExcerptText": { + "type": "string" + }, "com.amazonaws.qbusiness#SourceAttribution": { "type": "structure", "members": { @@ -9289,6 +10013,53 @@ "smithy.api#documentation": "

    Provides information about text documents in an index.

    " } }, + "com.amazonaws.qbusiness#TextInputEvent": { + "type": "structure", + "members": { + "userMessage": { + "target": "com.amazonaws.qbusiness#UserMessage", + "traits": { + "smithy.api#documentation": "

    A user message in a text message input event.

    ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

    An input event for a end user message in an Amazon Q Business web experience.

    " + } + }, + "com.amazonaws.qbusiness#TextOutputEvent": { + "type": "structure", + "members": { + "conversationId": { + "target": "com.amazonaws.qbusiness#ConversationId", + "traits": { + "smithy.api#documentation": "

    The identifier of the conversation with which the text output event is\n associated.

    " + } + }, + "userMessageId": { + "target": "com.amazonaws.qbusiness#MessageId", + "traits": { + "smithy.api#documentation": "

    The identifier of an end user message in a TextOutputEvent.

    " + } + }, + "systemMessageId": { + "target": "com.amazonaws.qbusiness#MessageId", + "traits": { + "smithy.api#documentation": "

    The identifier of an AI-generated message in a TextOutputEvent.

    " + } + }, + "systemMessage": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

    An AI-generated message in a TextOutputEvent.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    An output event for an AI-generated response in an Amazon Q Business web\n experience.

    " + } + }, "com.amazonaws.qbusiness#TextSegment": { "type": "structure", "members": { @@ -9303,6 +10074,12 @@ "traits": { "smithy.api#documentation": "

    The zero-based location in the response string where the source attribution\n ends.

    " } + }, + "snippetExcerpt": { + "target": "com.amazonaws.qbusiness#SnippetExcerpt", + "traits": { + "smithy.api#documentation": "

    The relevant text excerpt from a source that was used to generate a citation text\n segment in an Amazon Q Business chat response.

    " + } } }, "traits": { @@ -9528,6 +10305,12 @@ "smithy.api#required": {} } }, + "identityCenterInstanceArn": { + "target": "com.amazonaws.qbusiness#InstanceArn", + "traits": { + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the IAM Identity Center instance you are either\n creating for—or connecting to—your Amazon Q Business application.

    " + } + }, "displayName": { "target": "com.amazonaws.qbusiness#ApplicationName", "traits": { @@ -9966,6 +10749,12 @@ "smithy.api#documentation": "

    The source URL used for plugin configuration.

    " } }, + "customPluginConfiguration": { + "target": "com.amazonaws.qbusiness#CustomPluginConfiguration", + "traits": { + "smithy.api#documentation": "

    The configuration for a custom plugin.

    " + } + }, "authConfiguration": { "target": "com.amazonaws.qbusiness#PluginAuthConfiguration", "traits": { @@ -10239,9 +11028,18 @@ "smithy.api#required": {} } }, + "roleArn": { + "target": "com.amazonaws.qbusiness#RoleArn", + "traits": { + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the role with permission to access the Amazon Q Business\n web experience and required resources.

    " + } + }, "authenticationConfiguration": { "target": "com.amazonaws.qbusiness#WebExperienceAuthConfiguration", "traits": { + "smithy.api#deprecated": { + "message": "Property associated with legacy SAML IdP flow. Deprecated in favor of using AWS IAM Identity Center for user management." + }, "smithy.api#documentation": "

    The authentication configuration of the Amazon Q Business web experience.

    " } },