From e7c6ed54abfb89203cc746890afdc5af006ca293 Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 24 Oct 2024 19:12:09 +0000 Subject: [PATCH] feat(client-qbusiness): Add a new field in chat response. This field can be used to support nested schemas in array fields --- clients/client-qbusiness/README.md | 2 +- clients/client-qbusiness/src/commands/ChatCommand.ts | 1 + clients/client-qbusiness/src/commands/ChatSyncCommand.ts | 1 + .../client-qbusiness/src/commands/ListMessagesCommand.ts | 1 + clients/client-qbusiness/src/models/models_0.ts | 7 +++++++ clients/client-qbusiness/src/protocols/Aws_restJson1.ts | 8 ++++++++ codegen/sdk-codegen/aws-models/qbusiness.json | 9 +++++++++ 7 files changed, 28 insertions(+), 1 deletion(-) diff --git a/clients/client-qbusiness/README.md b/clients/client-qbusiness/README.md index 8fd0f383c38b..7b1055bcd58f 100644 --- a/clients/client-qbusiness/README.md +++ b/clients/client-qbusiness/README.md @@ -48,7 +48,7 @@ Amazon Q Business ## Installing -To install the this package, simply type add or install @aws-sdk/client-qbusiness +To install this package, simply type add or install @aws-sdk/client-qbusiness using your favorite package manager: - `npm install @aws-sdk/client-qbusiness` diff --git a/clients/client-qbusiness/src/commands/ChatCommand.ts b/clients/client-qbusiness/src/commands/ChatCommand.ts index c604d610865f..34c66bcff951 100644 --- a/clients/client-qbusiness/src/commands/ChatCommand.ts +++ b/clients/client-qbusiness/src/commands/ChatCommand.ts @@ -215,6 +215,7 @@ export interface ChatCommandOutput extends ChatOutput, __MetadataBearer {} * // }, * // ], * // allowedFormat: "STRING_VALUE", + * // arrayItemJsonSchema: "DOCUMENT_VALUE", * // required: true || false, * // }, * // }, diff --git a/clients/client-qbusiness/src/commands/ChatSyncCommand.ts b/clients/client-qbusiness/src/commands/ChatSyncCommand.ts index 8f0fb157de80..e53ef4f400f8 100644 --- a/clients/client-qbusiness/src/commands/ChatSyncCommand.ts +++ b/clients/client-qbusiness/src/commands/ChatSyncCommand.ts @@ -177,6 +177,7 @@ export interface ChatSyncCommandOutput extends ChatSyncOutput, __MetadataBearer * // }, * // ], * // allowedFormat: "STRING_VALUE", + * // arrayItemJsonSchema: "DOCUMENT_VALUE", * // required: true || false, * // }, * // }, diff --git a/clients/client-qbusiness/src/commands/ListMessagesCommand.ts b/clients/client-qbusiness/src/commands/ListMessagesCommand.ts index 09c1ca35fdb3..b5c8955f8dba 100644 --- a/clients/client-qbusiness/src/commands/ListMessagesCommand.ts +++ b/clients/client-qbusiness/src/commands/ListMessagesCommand.ts @@ -96,6 +96,7 @@ export interface ListMessagesCommandOutput extends ListMessagesResponse, __Metad * // }, * // ], * // allowedFormat: "STRING_VALUE", + * // arrayItemJsonSchema: "DOCUMENT_VALUE", * // required: true || false, * // }, * // }, diff --git a/clients/client-qbusiness/src/models/models_0.ts b/clients/client-qbusiness/src/models/models_0.ts index 61c1e14995d2..2c23e88d1355 100644 --- a/clients/client-qbusiness/src/models/models_0.ts +++ b/clients/client-qbusiness/src/models/models_0.ts @@ -362,6 +362,13 @@ export interface ActionReviewPayloadField { */ allowedFormat?: string; + /** + *

Use to create a custom form with array fields (fields with nested objects inside an + * array).

+ * @public + */ + arrayItemJsonSchema?: __DocumentType; + /** *

Information about whether the field is required.

* @public diff --git a/clients/client-qbusiness/src/protocols/Aws_restJson1.ts b/clients/client-qbusiness/src/protocols/Aws_restJson1.ts index d7778395b194..5ceed080e11b 100644 --- a/clients/client-qbusiness/src/protocols/Aws_restJson1.ts +++ b/clients/client-qbusiness/src/protocols/Aws_restJson1.ts @@ -3586,6 +3586,7 @@ const de_ActionReviewPayloadField = (output: any, context: __SerdeContext): Acti return take(output, { allowedFormat: __expectString, allowedValues: (_: any) => de_ActionReviewPayloadFieldAllowedValues(_, context), + arrayItemJsonSchema: (_: any) => de_ActionReviewPayloadFieldArrayItemJsonSchema(_, context), displayDescription: __expectString, displayName: __expectString, displayOrder: __expectInt32, @@ -3623,6 +3624,13 @@ const de_ActionReviewPayloadFieldAllowedValues = ( return retVal; }; +/** + * deserializeAws_restJson1ActionReviewPayloadFieldArrayItemJsonSchema + */ +const de_ActionReviewPayloadFieldArrayItemJsonSchema = (output: any, context: __SerdeContext): __DocumentType => { + return output; +}; + // de_APISchema omitted. /** diff --git a/codegen/sdk-codegen/aws-models/qbusiness.json b/codegen/sdk-codegen/aws-models/qbusiness.json index 34dfb1a1749a..5303a35981b0 100644 --- a/codegen/sdk-codegen/aws-models/qbusiness.json +++ b/codegen/sdk-codegen/aws-models/qbusiness.json @@ -363,6 +363,12 @@ "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.

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

Use to create a custom form with array fields (fields with nested objects inside an\n array).

" + } + }, "required": { "target": "smithy.api#Boolean", "traits": { @@ -400,6 +406,9 @@ "target": "com.amazonaws.qbusiness#ActionReviewPayloadFieldAllowedValue" } }, + "com.amazonaws.qbusiness#ActionReviewPayloadFieldArrayItemJsonSchema": { + "type": "document" + }, "com.amazonaws.qbusiness#AmazonResourceName": { "type": "string", "traits": {