Skip to content

Commit

Permalink
feat(client-qbusiness): Add a new field in chat response. This field …
Browse files Browse the repository at this point in the history
…can be used to support nested schemas in array fields
  • Loading branch information
awstools committed Oct 24, 2024
1 parent 568714e commit e7c6ed5
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion clients/client-qbusiness/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Amazon Q Business</a>

## 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`
Expand Down
1 change: 1 addition & 0 deletions clients/client-qbusiness/src/commands/ChatCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ export interface ChatCommandOutput extends ChatOutput, __MetadataBearer {}
* // },
* // ],
* // allowedFormat: "STRING_VALUE",
* // arrayItemJsonSchema: "DOCUMENT_VALUE",
* // required: true || false,
* // },
* // },
Expand Down
1 change: 1 addition & 0 deletions clients/client-qbusiness/src/commands/ChatSyncCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export interface ChatSyncCommandOutput extends ChatSyncOutput, __MetadataBearer
* // },
* // ],
* // allowedFormat: "STRING_VALUE",
* // arrayItemJsonSchema: "DOCUMENT_VALUE",
* // required: true || false,
* // },
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export interface ListMessagesCommandOutput extends ListMessagesResponse, __Metad
* // },
* // ],
* // allowedFormat: "STRING_VALUE",
* // arrayItemJsonSchema: "DOCUMENT_VALUE",
* // required: true || false,
* // },
* // },
Expand Down
7 changes: 7 additions & 0 deletions clients/client-qbusiness/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,13 @@ export interface ActionReviewPayloadField {
*/
allowedFormat?: string;

/**
* <p>Use to create a custom form with array fields (fields with nested objects inside an
* array). </p>
* @public
*/
arrayItemJsonSchema?: __DocumentType;

/**
* <p>Information about whether the field is required.</p>
* @public
Expand Down
8 changes: 8 additions & 0 deletions clients/client-qbusiness/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -3623,6 +3624,13 @@ const de_ActionReviewPayloadFieldAllowedValues = (
return retVal;
};

/**
* deserializeAws_restJson1ActionReviewPayloadFieldArrayItemJsonSchema
*/
const de_ActionReviewPayloadFieldArrayItemJsonSchema = (output: any, context: __SerdeContext): __DocumentType => {
return output;
};

// de_APISchema omitted.

/**
Expand Down
9 changes: 9 additions & 0 deletions codegen/sdk-codegen/aws-models/qbusiness.json
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,12 @@
"smithy.api#documentation": "<p>The expected data format for the action review input field value. For example, in PTO\n request, <code>from</code> and <code>to</code> would be of <code>datetime</code> allowed\n format. </p>"
}
},
"arrayItemJsonSchema": {
"target": "com.amazonaws.qbusiness#ActionReviewPayloadFieldArrayItemJsonSchema",
"traits": {
"smithy.api#documentation": "<p>Use to create a custom form with array fields (fields with nested objects inside an\n array). </p>"
}
},
"required": {
"target": "smithy.api#Boolean",
"traits": {
Expand Down Expand Up @@ -400,6 +406,9 @@
"target": "com.amazonaws.qbusiness#ActionReviewPayloadFieldAllowedValue"
}
},
"com.amazonaws.qbusiness#ActionReviewPayloadFieldArrayItemJsonSchema": {
"type": "document"
},
"com.amazonaws.qbusiness#AmazonResourceName": {
"type": "string",
"traits": {
Expand Down

0 comments on commit e7c6ed5

Please sign in to comment.