From c1ea3a8e709db9d9f85c5ccb1f4b81a4fd19961b Mon Sep 17 00:00:00 2001 From: awstools Date: Tue, 26 Nov 2024 19:15:55 +0000 Subject: [PATCH] feat(client-qapps): Private sharing, file upload and data collection feature support for Q Apps --- clients/client-qapps/README.md | 56 + clients/client-qapps/src/QApps.ts | 161 ++ clients/client-qapps/src/QAppsClient.ts | 43 +- .../src/commands/CreatePresignedUrlCommand.ts | 123 ++ .../src/commands/CreateQAppCommand.ts | 17 +- .../DescribeQAppPermissionsCommand.ts | 123 ++ .../commands/ExportQAppSessionDataCommand.ts | 122 ++ .../src/commands/GetQAppCommand.ts | 24 +- .../src/commands/GetQAppSessionCommand.ts | 15 +- .../commands/GetQAppSessionMetadataCommand.ts | 124 ++ .../commands/ListQAppSessionDataCommand.ts | 129 ++ .../src/commands/PredictQAppCommand.ts | 17 +- .../src/commands/StartQAppSessionCommand.ts | 5 + .../src/commands/UpdateQAppCommand.ts | 17 +- .../commands/UpdateQAppPermissionsCommand.ts | 135 ++ .../src/commands/UpdateQAppSessionCommand.ts | 4 + .../UpdateQAppSessionMetadataCommand.ts | 129 ++ clients/client-qapps/src/commands/index.ts | 7 + clients/client-qapps/src/models/models_0.ts | 885 +++++++++- .../src/protocols/Aws_restJson1.ts | 556 +++++- codegen/sdk-codegen/aws-models/qapps.json | 1548 ++++++++++++++++- 21 files changed, 4147 insertions(+), 93 deletions(-) create mode 100644 clients/client-qapps/src/commands/CreatePresignedUrlCommand.ts create mode 100644 clients/client-qapps/src/commands/DescribeQAppPermissionsCommand.ts create mode 100644 clients/client-qapps/src/commands/ExportQAppSessionDataCommand.ts create mode 100644 clients/client-qapps/src/commands/GetQAppSessionMetadataCommand.ts create mode 100644 clients/client-qapps/src/commands/ListQAppSessionDataCommand.ts create mode 100644 clients/client-qapps/src/commands/UpdateQAppPermissionsCommand.ts create mode 100644 clients/client-qapps/src/commands/UpdateQAppSessionMetadataCommand.ts diff --git a/clients/client-qapps/README.md b/clients/client-qapps/README.md index 985189eca7eab..616dabc581257 100644 --- a/clients/client-qapps/README.md +++ b/clients/client-qapps/README.md @@ -263,6 +263,14 @@ CreateLibraryItem [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qapps/command/CreateLibraryItemCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/CreateLibraryItemCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/CreateLibraryItemCommandOutput/) + +
+ +CreatePresignedUrl + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qapps/command/CreatePresignedUrlCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/CreatePresignedUrlCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/CreatePresignedUrlCommandOutput/) +
@@ -287,6 +295,14 @@ DeleteQApp [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qapps/command/DeleteQAppCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/DeleteQAppCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/DeleteQAppCommandOutput/) +
+
+ +DescribeQAppPermissions + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qapps/command/DescribeQAppPermissionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/DescribeQAppPermissionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/DescribeQAppPermissionsCommandOutput/) +
@@ -303,6 +319,14 @@ DisassociateQAppFromUser [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qapps/command/DisassociateQAppFromUserCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/DisassociateQAppFromUserCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/DisassociateQAppFromUserCommandOutput/) +
+
+ +ExportQAppSessionData + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qapps/command/ExportQAppSessionDataCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/ExportQAppSessionDataCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/ExportQAppSessionDataCommandOutput/) +
@@ -327,6 +351,14 @@ GetQAppSession [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qapps/command/GetQAppSessionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/GetQAppSessionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/GetQAppSessionCommandOutput/) +
+
+ +GetQAppSessionMetadata + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qapps/command/GetQAppSessionMetadataCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/GetQAppSessionMetadataCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/GetQAppSessionMetadataCommandOutput/) +
@@ -359,6 +391,14 @@ ListQApps [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qapps/command/ListQAppsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/ListQAppsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/ListQAppsCommandOutput/) +
+
+ +ListQAppSessionData + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qapps/command/ListQAppSessionDataCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/ListQAppSessionDataCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/ListQAppSessionDataCommandOutput/) +
@@ -431,6 +471,14 @@ UpdateQApp [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qapps/command/UpdateQAppCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/UpdateQAppCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/UpdateQAppCommandOutput/) +
+
+ +UpdateQAppPermissions + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qapps/command/UpdateQAppPermissionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/UpdateQAppPermissionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/UpdateQAppPermissionsCommandOutput/) +
@@ -440,3 +488,11 @@ UpdateQAppSession [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qapps/command/UpdateQAppSessionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/UpdateQAppSessionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/UpdateQAppSessionCommandOutput/)
+
+ +UpdateQAppSessionMetadata + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qapps/command/UpdateQAppSessionMetadataCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/UpdateQAppSessionMetadataCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/UpdateQAppSessionMetadataCommandOutput/) + +
diff --git a/clients/client-qapps/src/QApps.ts b/clients/client-qapps/src/QApps.ts index 5b90b0cb720f0..74a1dcef301c7 100644 --- a/clients/client-qapps/src/QApps.ts +++ b/clients/client-qapps/src/QApps.ts @@ -32,6 +32,11 @@ import { CreateLibraryItemCommandInput, CreateLibraryItemCommandOutput, } from "./commands/CreateLibraryItemCommand"; +import { + CreatePresignedUrlCommand, + CreatePresignedUrlCommandInput, + CreatePresignedUrlCommandOutput, +} from "./commands/CreatePresignedUrlCommand"; import { CreateQAppCommand, CreateQAppCommandInput, CreateQAppCommandOutput } from "./commands/CreateQAppCommand"; import { DeleteLibraryItemCommand, @@ -39,6 +44,11 @@ import { DeleteLibraryItemCommandOutput, } from "./commands/DeleteLibraryItemCommand"; import { DeleteQAppCommand, DeleteQAppCommandInput, DeleteQAppCommandOutput } from "./commands/DeleteQAppCommand"; +import { + DescribeQAppPermissionsCommand, + DescribeQAppPermissionsCommandInput, + DescribeQAppPermissionsCommandOutput, +} from "./commands/DescribeQAppPermissionsCommand"; import { DisassociateLibraryItemReviewCommand, DisassociateLibraryItemReviewCommandInput, @@ -49,6 +59,11 @@ import { DisassociateQAppFromUserCommandInput, DisassociateQAppFromUserCommandOutput, } from "./commands/DisassociateQAppFromUserCommand"; +import { + ExportQAppSessionDataCommand, + ExportQAppSessionDataCommandInput, + ExportQAppSessionDataCommandOutput, +} from "./commands/ExportQAppSessionDataCommand"; import { GetLibraryItemCommand, GetLibraryItemCommandInput, @@ -60,6 +75,11 @@ import { GetQAppSessionCommandInput, GetQAppSessionCommandOutput, } from "./commands/GetQAppSessionCommand"; +import { + GetQAppSessionMetadataCommand, + GetQAppSessionMetadataCommandInput, + GetQAppSessionMetadataCommandOutput, +} from "./commands/GetQAppSessionMetadataCommand"; import { ImportDocumentCommand, ImportDocumentCommandInput, @@ -76,6 +96,11 @@ import { ListLibraryItemsCommandOutput, } from "./commands/ListLibraryItemsCommand"; import { ListQAppsCommand, ListQAppsCommandInput, ListQAppsCommandOutput } from "./commands/ListQAppsCommand"; +import { + ListQAppSessionDataCommand, + ListQAppSessionDataCommandInput, + ListQAppSessionDataCommandOutput, +} from "./commands/ListQAppSessionDataCommand"; import { ListTagsForResourceCommand, ListTagsForResourceCommandInput, @@ -109,11 +134,21 @@ import { UpdateLibraryItemMetadataCommandOutput, } from "./commands/UpdateLibraryItemMetadataCommand"; import { UpdateQAppCommand, UpdateQAppCommandInput, UpdateQAppCommandOutput } from "./commands/UpdateQAppCommand"; +import { + UpdateQAppPermissionsCommand, + UpdateQAppPermissionsCommandInput, + UpdateQAppPermissionsCommandOutput, +} from "./commands/UpdateQAppPermissionsCommand"; import { UpdateQAppSessionCommand, UpdateQAppSessionCommandInput, UpdateQAppSessionCommandOutput, } from "./commands/UpdateQAppSessionCommand"; +import { + UpdateQAppSessionMetadataCommand, + UpdateQAppSessionMetadataCommandInput, + UpdateQAppSessionMetadataCommandOutput, +} from "./commands/UpdateQAppSessionMetadataCommand"; import { QAppsClient, QAppsClientConfig } from "./QAppsClient"; const commands = { @@ -123,18 +158,23 @@ const commands = { BatchDeleteCategoryCommand, BatchUpdateCategoryCommand, CreateLibraryItemCommand, + CreatePresignedUrlCommand, CreateQAppCommand, DeleteLibraryItemCommand, DeleteQAppCommand, + DescribeQAppPermissionsCommand, DisassociateLibraryItemReviewCommand, DisassociateQAppFromUserCommand, + ExportQAppSessionDataCommand, GetLibraryItemCommand, GetQAppCommand, GetQAppSessionCommand, + GetQAppSessionMetadataCommand, ImportDocumentCommand, ListCategoriesCommand, ListLibraryItemsCommand, ListQAppsCommand, + ListQAppSessionDataCommand, ListTagsForResourceCommand, PredictQAppCommand, StartQAppSessionCommand, @@ -144,7 +184,9 @@ const commands = { UpdateLibraryItemCommand, UpdateLibraryItemMetadataCommand, UpdateQAppCommand, + UpdateQAppPermissionsCommand, UpdateQAppSessionCommand, + UpdateQAppSessionMetadataCommand, }; export interface QApps { @@ -250,6 +292,23 @@ export interface QApps { cb: (err: any, data?: CreateLibraryItemCommandOutput) => void ): void; + /** + * @see {@link CreatePresignedUrlCommand} + */ + createPresignedUrl( + args: CreatePresignedUrlCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createPresignedUrl( + args: CreatePresignedUrlCommandInput, + cb: (err: any, data?: CreatePresignedUrlCommandOutput) => void + ): void; + createPresignedUrl( + args: CreatePresignedUrlCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreatePresignedUrlCommandOutput) => void + ): void; + /** * @see {@link CreateQAppCommand} */ @@ -289,6 +348,23 @@ export interface QApps { cb: (err: any, data?: DeleteQAppCommandOutput) => void ): void; + /** + * @see {@link DescribeQAppPermissionsCommand} + */ + describeQAppPermissions( + args: DescribeQAppPermissionsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + describeQAppPermissions( + args: DescribeQAppPermissionsCommandInput, + cb: (err: any, data?: DescribeQAppPermissionsCommandOutput) => void + ): void; + describeQAppPermissions( + args: DescribeQAppPermissionsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeQAppPermissionsCommandOutput) => void + ): void; + /** * @see {@link DisassociateLibraryItemReviewCommand} */ @@ -323,6 +399,23 @@ export interface QApps { cb: (err: any, data?: DisassociateQAppFromUserCommandOutput) => void ): void; + /** + * @see {@link ExportQAppSessionDataCommand} + */ + exportQAppSessionData( + args: ExportQAppSessionDataCommandInput, + options?: __HttpHandlerOptions + ): Promise; + exportQAppSessionData( + args: ExportQAppSessionDataCommandInput, + cb: (err: any, data?: ExportQAppSessionDataCommandOutput) => void + ): void; + exportQAppSessionData( + args: ExportQAppSessionDataCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ExportQAppSessionDataCommandOutput) => void + ): void; + /** * @see {@link GetLibraryItemCommand} */ @@ -362,6 +455,23 @@ export interface QApps { cb: (err: any, data?: GetQAppSessionCommandOutput) => void ): void; + /** + * @see {@link GetQAppSessionMetadataCommand} + */ + getQAppSessionMetadata( + args: GetQAppSessionMetadataCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getQAppSessionMetadata( + args: GetQAppSessionMetadataCommandInput, + cb: (err: any, data?: GetQAppSessionMetadataCommandOutput) => void + ): void; + getQAppSessionMetadata( + args: GetQAppSessionMetadataCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetQAppSessionMetadataCommandOutput) => void + ): void; + /** * @see {@link ImportDocumentCommand} */ @@ -418,6 +528,23 @@ export interface QApps { cb: (err: any, data?: ListQAppsCommandOutput) => void ): void; + /** + * @see {@link ListQAppSessionDataCommand} + */ + listQAppSessionData( + args: ListQAppSessionDataCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listQAppSessionData( + args: ListQAppSessionDataCommandInput, + cb: (err: any, data?: ListQAppSessionDataCommandOutput) => void + ): void; + listQAppSessionData( + args: ListQAppSessionDataCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListQAppSessionDataCommandOutput) => void + ): void; + /** * @see {@link ListTagsForResourceCommand} */ @@ -544,6 +671,23 @@ export interface QApps { cb: (err: any, data?: UpdateQAppCommandOutput) => void ): void; + /** + * @see {@link UpdateQAppPermissionsCommand} + */ + updateQAppPermissions( + args: UpdateQAppPermissionsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateQAppPermissions( + args: UpdateQAppPermissionsCommandInput, + cb: (err: any, data?: UpdateQAppPermissionsCommandOutput) => void + ): void; + updateQAppPermissions( + args: UpdateQAppPermissionsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateQAppPermissionsCommandOutput) => void + ): void; + /** * @see {@link UpdateQAppSessionCommand} */ @@ -560,6 +704,23 @@ export interface QApps { options: __HttpHandlerOptions, cb: (err: any, data?: UpdateQAppSessionCommandOutput) => void ): void; + + /** + * @see {@link UpdateQAppSessionMetadataCommand} + */ + updateQAppSessionMetadata( + args: UpdateQAppSessionMetadataCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateQAppSessionMetadata( + args: UpdateQAppSessionMetadataCommandInput, + cb: (err: any, data?: UpdateQAppSessionMetadataCommandOutput) => void + ): void; + updateQAppSessionMetadata( + args: UpdateQAppSessionMetadataCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateQAppSessionMetadataCommandOutput) => void + ): void; } /** diff --git a/clients/client-qapps/src/QAppsClient.ts b/clients/client-qapps/src/QAppsClient.ts index 7e3139589e2f5..282073268c53a 100644 --- a/clients/client-qapps/src/QAppsClient.ts +++ b/clients/client-qapps/src/QAppsClient.ts @@ -74,9 +74,14 @@ import { BatchUpdateCategoryCommandOutput, } from "./commands/BatchUpdateCategoryCommand"; import { CreateLibraryItemCommandInput, CreateLibraryItemCommandOutput } from "./commands/CreateLibraryItemCommand"; +import { CreatePresignedUrlCommandInput, CreatePresignedUrlCommandOutput } from "./commands/CreatePresignedUrlCommand"; import { CreateQAppCommandInput, CreateQAppCommandOutput } from "./commands/CreateQAppCommand"; import { DeleteLibraryItemCommandInput, DeleteLibraryItemCommandOutput } from "./commands/DeleteLibraryItemCommand"; import { DeleteQAppCommandInput, DeleteQAppCommandOutput } from "./commands/DeleteQAppCommand"; +import { + DescribeQAppPermissionsCommandInput, + DescribeQAppPermissionsCommandOutput, +} from "./commands/DescribeQAppPermissionsCommand"; import { DisassociateLibraryItemReviewCommandInput, DisassociateLibraryItemReviewCommandOutput, @@ -85,13 +90,25 @@ import { DisassociateQAppFromUserCommandInput, DisassociateQAppFromUserCommandOutput, } from "./commands/DisassociateQAppFromUserCommand"; +import { + ExportQAppSessionDataCommandInput, + ExportQAppSessionDataCommandOutput, +} from "./commands/ExportQAppSessionDataCommand"; import { GetLibraryItemCommandInput, GetLibraryItemCommandOutput } from "./commands/GetLibraryItemCommand"; import { GetQAppCommandInput, GetQAppCommandOutput } from "./commands/GetQAppCommand"; import { GetQAppSessionCommandInput, GetQAppSessionCommandOutput } from "./commands/GetQAppSessionCommand"; +import { + GetQAppSessionMetadataCommandInput, + GetQAppSessionMetadataCommandOutput, +} from "./commands/GetQAppSessionMetadataCommand"; import { ImportDocumentCommandInput, ImportDocumentCommandOutput } from "./commands/ImportDocumentCommand"; import { ListCategoriesCommandInput, ListCategoriesCommandOutput } from "./commands/ListCategoriesCommand"; import { ListLibraryItemsCommandInput, ListLibraryItemsCommandOutput } from "./commands/ListLibraryItemsCommand"; import { ListQAppsCommandInput, ListQAppsCommandOutput } from "./commands/ListQAppsCommand"; +import { + ListQAppSessionDataCommandInput, + ListQAppSessionDataCommandOutput, +} from "./commands/ListQAppSessionDataCommand"; import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, @@ -107,7 +124,15 @@ import { UpdateLibraryItemMetadataCommandOutput, } from "./commands/UpdateLibraryItemMetadataCommand"; import { UpdateQAppCommandInput, UpdateQAppCommandOutput } from "./commands/UpdateQAppCommand"; +import { + UpdateQAppPermissionsCommandInput, + UpdateQAppPermissionsCommandOutput, +} from "./commands/UpdateQAppPermissionsCommand"; import { UpdateQAppSessionCommandInput, UpdateQAppSessionCommandOutput } from "./commands/UpdateQAppSessionCommand"; +import { + UpdateQAppSessionMetadataCommandInput, + UpdateQAppSessionMetadataCommandOutput, +} from "./commands/UpdateQAppSessionMetadataCommand"; import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, @@ -129,17 +154,22 @@ export type ServiceInputTypes = | BatchDeleteCategoryCommandInput | BatchUpdateCategoryCommandInput | CreateLibraryItemCommandInput + | CreatePresignedUrlCommandInput | CreateQAppCommandInput | DeleteLibraryItemCommandInput | DeleteQAppCommandInput + | DescribeQAppPermissionsCommandInput | DisassociateLibraryItemReviewCommandInput | DisassociateQAppFromUserCommandInput + | ExportQAppSessionDataCommandInput | GetLibraryItemCommandInput | GetQAppCommandInput | GetQAppSessionCommandInput + | GetQAppSessionMetadataCommandInput | ImportDocumentCommandInput | ListCategoriesCommandInput | ListLibraryItemsCommandInput + | ListQAppSessionDataCommandInput | ListQAppsCommandInput | ListTagsForResourceCommandInput | PredictQAppCommandInput @@ -150,7 +180,9 @@ export type ServiceInputTypes = | UpdateLibraryItemCommandInput | UpdateLibraryItemMetadataCommandInput | UpdateQAppCommandInput - | UpdateQAppSessionCommandInput; + | UpdateQAppPermissionsCommandInput + | UpdateQAppSessionCommandInput + | UpdateQAppSessionMetadataCommandInput; /** * @public @@ -162,17 +194,22 @@ export type ServiceOutputTypes = | BatchDeleteCategoryCommandOutput | BatchUpdateCategoryCommandOutput | CreateLibraryItemCommandOutput + | CreatePresignedUrlCommandOutput | CreateQAppCommandOutput | DeleteLibraryItemCommandOutput | DeleteQAppCommandOutput + | DescribeQAppPermissionsCommandOutput | DisassociateLibraryItemReviewCommandOutput | DisassociateQAppFromUserCommandOutput + | ExportQAppSessionDataCommandOutput | GetLibraryItemCommandOutput | GetQAppCommandOutput | GetQAppSessionCommandOutput + | GetQAppSessionMetadataCommandOutput | ImportDocumentCommandOutput | ListCategoriesCommandOutput | ListLibraryItemsCommandOutput + | ListQAppSessionDataCommandOutput | ListQAppsCommandOutput | ListTagsForResourceCommandOutput | PredictQAppCommandOutput @@ -183,7 +220,9 @@ export type ServiceOutputTypes = | UpdateLibraryItemCommandOutput | UpdateLibraryItemMetadataCommandOutput | UpdateQAppCommandOutput - | UpdateQAppSessionCommandOutput; + | UpdateQAppPermissionsCommandOutput + | UpdateQAppSessionCommandOutput + | UpdateQAppSessionMetadataCommandOutput; /** * @public diff --git a/clients/client-qapps/src/commands/CreatePresignedUrlCommand.ts b/clients/client-qapps/src/commands/CreatePresignedUrlCommand.ts new file mode 100644 index 0000000000000..e2a6edd2e4d53 --- /dev/null +++ b/clients/client-qapps/src/commands/CreatePresignedUrlCommand.ts @@ -0,0 +1,123 @@ +// smithy-typescript generated code +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 { CreatePresignedUrlInput, CreatePresignedUrlOutput } from "../models/models_0"; +import { de_CreatePresignedUrlCommand, se_CreatePresignedUrlCommand } from "../protocols/Aws_restJson1"; +import { QAppsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QAppsClient"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link CreatePresignedUrlCommand}. + */ +export interface CreatePresignedUrlCommandInput extends CreatePresignedUrlInput {} +/** + * @public + * + * The output of {@link CreatePresignedUrlCommand}. + */ +export interface CreatePresignedUrlCommandOutput extends CreatePresignedUrlOutput, __MetadataBearer {} + +/** + *

Creates a presigned URL for an S3 POST operation to upload a file. + * You can use this URL to set a default file for a FileUploadCard + * in a Q App definition or to provide a file for a single Q App run. + * The scope parameter determines how the file will be used, + * either at the app definition level or the app session level.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QAppsClient, CreatePresignedUrlCommand } from "@aws-sdk/client-qapps"; // ES Modules import + * // const { QAppsClient, CreatePresignedUrlCommand } = require("@aws-sdk/client-qapps"); // CommonJS import + * const client = new QAppsClient(config); + * const input = { // CreatePresignedUrlInput + * instanceId: "STRING_VALUE", // required + * cardId: "STRING_VALUE", // required + * appId: "STRING_VALUE", // required + * fileContentsSha256: "STRING_VALUE", // required + * fileName: "STRING_VALUE", // required + * scope: "APPLICATION" || "SESSION", // required + * sessionId: "STRING_VALUE", + * }; + * const command = new CreatePresignedUrlCommand(input); + * const response = await client.send(command); + * // { // CreatePresignedUrlOutput + * // fileId: "STRING_VALUE", // required + * // presignedUrl: "STRING_VALUE", // required + * // presignedUrlFields: { // PresignedUrlFields // required + * // "": "STRING_VALUE", + * // }, + * // presignedUrlExpiration: new Date("TIMESTAMP"), // required + * // }; + * + * ``` + * + * @param CreatePresignedUrlCommandInput - {@link CreatePresignedUrlCommandInput} + * @returns {@link CreatePresignedUrlCommandOutput} + * @see {@link CreatePresignedUrlCommandInput} for command's `input` shape. + * @see {@link CreatePresignedUrlCommandOutput} for command's `response` shape. + * @see {@link QAppsClientResolvedConfig | config} for QAppsClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

The client is not authorized to perform the requested operation.

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

An internal service error occurred while processing the request.

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

The requested operation could not be completed because too many + * requests were sent at once. Wait a bit and try again later.

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

The client is not authenticated or authorized to perform the requested operation.

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

The input failed to satisfy the constraints specified by the service.

+ * + * @throws {@link QAppsServiceException} + *

Base exception class for all service exceptions from QApps service.

+ * + * @public + */ +export class CreatePresignedUrlCommand extends $Command + .classBuilder< + CreatePresignedUrlCommandInput, + CreatePresignedUrlCommandOutput, + QAppsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: QAppsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("QAppsService", "CreatePresignedUrl", {}) + .n("QAppsClient", "CreatePresignedUrlCommand") + .f(void 0, void 0) + .ser(se_CreatePresignedUrlCommand) + .de(de_CreatePresignedUrlCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: CreatePresignedUrlInput; + output: CreatePresignedUrlOutput; + }; + sdk: { + input: CreatePresignedUrlCommandInput; + output: CreatePresignedUrlCommandOutput; + }; + }; +} diff --git a/clients/client-qapps/src/commands/CreateQAppCommand.ts b/clients/client-qapps/src/commands/CreateQAppCommand.ts index 0d3139fb9a878..f4e51b372e8ea 100644 --- a/clients/client-qapps/src/commands/CreateQAppCommand.ts +++ b/clients/client-qapps/src/commands/CreateQAppCommand.ts @@ -47,14 +47,14 @@ export interface CreateQAppCommandOutput extends CreateQAppOutput, __MetadataBea * textInput: { // TextInputCardInput * title: "STRING_VALUE", // required * id: "STRING_VALUE", // required - * type: "text-input" || "q-query" || "file-upload" || "q-plugin", // required + * type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required * placeholder: "STRING_VALUE", * defaultValue: "STRING_VALUE", * }, * qQuery: { // QQueryCardInput * title: "STRING_VALUE", // required * id: "STRING_VALUE", // required - * type: "text-input" || "q-query" || "file-upload" || "q-plugin", // required + * type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required * prompt: "STRING_VALUE", // required * outputSource: "approved-sources" || "llm", * attributeFilter: { // AttributeFilter @@ -142,18 +142,27 @@ export interface CreateQAppCommandOutput extends CreateQAppOutput, __MetadataBea * qPlugin: { // QPluginCardInput * title: "STRING_VALUE", // required * id: "STRING_VALUE", // required - * type: "text-input" || "q-query" || "file-upload" || "q-plugin", // required + * type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required * prompt: "STRING_VALUE", // required * pluginId: "STRING_VALUE", // required * }, * fileUpload: { // FileUploadCardInput * title: "STRING_VALUE", // required * id: "STRING_VALUE", // required - * type: "text-input" || "q-query" || "file-upload" || "q-plugin", // required + * type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required * filename: "STRING_VALUE", * fileId: "STRING_VALUE", * allowOverride: true || false, * }, + * formInput: { // FormInputCardInput + * title: "STRING_VALUE", // required + * id: "STRING_VALUE", // required + * type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required + * metadata: { // FormInputCardMetadata + * schema: "DOCUMENT_VALUE", // required + * }, + * computeMode: "append" || "replace", + * }, * }, * ], * initialPrompt: "STRING_VALUE", diff --git a/clients/client-qapps/src/commands/DescribeQAppPermissionsCommand.ts b/clients/client-qapps/src/commands/DescribeQAppPermissionsCommand.ts new file mode 100644 index 0000000000000..da61b49e5c468 --- /dev/null +++ b/clients/client-qapps/src/commands/DescribeQAppPermissionsCommand.ts @@ -0,0 +1,123 @@ +// smithy-typescript generated code +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 { DescribeQAppPermissionsInput, DescribeQAppPermissionsOutput } from "../models/models_0"; +import { de_DescribeQAppPermissionsCommand, se_DescribeQAppPermissionsCommand } from "../protocols/Aws_restJson1"; +import { QAppsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QAppsClient"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DescribeQAppPermissionsCommand}. + */ +export interface DescribeQAppPermissionsCommandInput extends DescribeQAppPermissionsInput {} +/** + * @public + * + * The output of {@link DescribeQAppPermissionsCommand}. + */ +export interface DescribeQAppPermissionsCommandOutput extends DescribeQAppPermissionsOutput, __MetadataBearer {} + +/** + *

Describes read permissions for a Amazon Q App in Amazon Q Business application environment instance.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QAppsClient, DescribeQAppPermissionsCommand } from "@aws-sdk/client-qapps"; // ES Modules import + * // const { QAppsClient, DescribeQAppPermissionsCommand } = require("@aws-sdk/client-qapps"); // CommonJS import + * const client = new QAppsClient(config); + * const input = { // DescribeQAppPermissionsInput + * instanceId: "STRING_VALUE", // required + * appId: "STRING_VALUE", // required + * }; + * const command = new DescribeQAppPermissionsCommand(input); + * const response = await client.send(command); + * // { // DescribeQAppPermissionsOutput + * // resourceArn: "STRING_VALUE", + * // appId: "STRING_VALUE", + * // permissions: [ // PermissionsOutputList + * // { // PermissionOutput + * // action: "read" || "write", // required + * // principal: { // PrincipalOutput + * // userId: "STRING_VALUE", + * // userType: "owner" || "user", + * // email: "STRING_VALUE", + * // }, + * // }, + * // ], + * // }; + * + * ``` + * + * @param DescribeQAppPermissionsCommandInput - {@link DescribeQAppPermissionsCommandInput} + * @returns {@link DescribeQAppPermissionsCommandOutput} + * @see {@link DescribeQAppPermissionsCommandInput} for command's `input` shape. + * @see {@link DescribeQAppPermissionsCommandOutput} for command's `response` shape. + * @see {@link QAppsClientResolvedConfig | config} for QAppsClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

The client is not authorized to perform the requested operation.

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

An internal service error occurred while processing the request.

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

The requested resource could not be found.

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

The requested operation could not be completed because too many + * requests were sent at once. Wait a bit and try again later.

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

The client is not authenticated or authorized to perform the requested operation.

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

The input failed to satisfy the constraints specified by the service.

+ * + * @throws {@link QAppsServiceException} + *

Base exception class for all service exceptions from QApps service.

+ * + * @public + */ +export class DescribeQAppPermissionsCommand extends $Command + .classBuilder< + DescribeQAppPermissionsCommandInput, + DescribeQAppPermissionsCommandOutput, + QAppsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: QAppsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("QAppsService", "DescribeQAppPermissions", {}) + .n("QAppsClient", "DescribeQAppPermissionsCommand") + .f(void 0, void 0) + .ser(se_DescribeQAppPermissionsCommand) + .de(de_DescribeQAppPermissionsCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: DescribeQAppPermissionsInput; + output: DescribeQAppPermissionsOutput; + }; + sdk: { + input: DescribeQAppPermissionsCommandInput; + output: DescribeQAppPermissionsCommandOutput; + }; + }; +} diff --git a/clients/client-qapps/src/commands/ExportQAppSessionDataCommand.ts b/clients/client-qapps/src/commands/ExportQAppSessionDataCommand.ts new file mode 100644 index 0000000000000..12a5affab40dc --- /dev/null +++ b/clients/client-qapps/src/commands/ExportQAppSessionDataCommand.ts @@ -0,0 +1,122 @@ +// smithy-typescript generated code +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 { ExportQAppSessionDataInput, ExportQAppSessionDataOutput } from "../models/models_0"; +import { de_ExportQAppSessionDataCommand, se_ExportQAppSessionDataCommand } from "../protocols/Aws_restJson1"; +import { QAppsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QAppsClient"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ExportQAppSessionDataCommand}. + */ +export interface ExportQAppSessionDataCommandInput extends ExportQAppSessionDataInput {} +/** + * @public + * + * The output of {@link ExportQAppSessionDataCommand}. + */ +export interface ExportQAppSessionDataCommandOutput extends ExportQAppSessionDataOutput, __MetadataBearer {} + +/** + *

Exports the collected data of a Q App data collection session.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QAppsClient, ExportQAppSessionDataCommand } from "@aws-sdk/client-qapps"; // ES Modules import + * // const { QAppsClient, ExportQAppSessionDataCommand } = require("@aws-sdk/client-qapps"); // CommonJS import + * const client = new QAppsClient(config); + * const input = { // ExportQAppSessionDataInput + * instanceId: "STRING_VALUE", // required + * sessionId: "STRING_VALUE", // required + * }; + * const command = new ExportQAppSessionDataCommand(input); + * const response = await client.send(command); + * // { // ExportQAppSessionDataOutput + * // csvFileLink: "STRING_VALUE", // required + * // expiresAt: new Date("TIMESTAMP"), // required + * // sessionArn: "STRING_VALUE", // required + * // }; + * + * ``` + * + * @param ExportQAppSessionDataCommandInput - {@link ExportQAppSessionDataCommandInput} + * @returns {@link ExportQAppSessionDataCommandOutput} + * @see {@link ExportQAppSessionDataCommandInput} for command's `input` shape. + * @see {@link ExportQAppSessionDataCommandOutput} for command's `response` shape. + * @see {@link QAppsClientResolvedConfig | config} for QAppsClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

The client is not authorized to perform the requested operation.

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

The requested operation could not be completed due to a + * conflict with the current state of the resource.

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

An internal service error occurred while processing the request.

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

The requested resource could not be found.

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

The requested operation could not be completed because + * it would exceed the service's quota or limit.

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

The requested operation could not be completed because too many + * requests were sent at once. Wait a bit and try again later.

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

The client is not authenticated or authorized to perform the requested operation.

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

The input failed to satisfy the constraints specified by the service.

+ * + * @throws {@link QAppsServiceException} + *

Base exception class for all service exceptions from QApps service.

+ * + * @public + */ +export class ExportQAppSessionDataCommand extends $Command + .classBuilder< + ExportQAppSessionDataCommandInput, + ExportQAppSessionDataCommandOutput, + QAppsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: QAppsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("QAppsService", "ExportQAppSessionData", {}) + .n("QAppsClient", "ExportQAppSessionDataCommand") + .f(void 0, void 0) + .ser(se_ExportQAppSessionDataCommand) + .de(de_ExportQAppSessionDataCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ExportQAppSessionDataInput; + output: ExportQAppSessionDataOutput; + }; + sdk: { + input: ExportQAppSessionDataCommandInput; + output: ExportQAppSessionDataCommandOutput; + }; + }; +} diff --git a/clients/client-qapps/src/commands/GetQAppCommand.ts b/clients/client-qapps/src/commands/GetQAppCommand.ts index 54cf9ce211a14..5185fb37438d6 100644 --- a/clients/client-qapps/src/commands/GetQAppCommand.ts +++ b/clients/client-qapps/src/commands/GetQAppCommand.ts @@ -38,6 +38,7 @@ export interface GetQAppCommandOutput extends GetQAppOutput, __MetadataBearer {} * const input = { // GetQAppInput * instanceId: "STRING_VALUE", // required * appId: "STRING_VALUE", // required + * appVersion: Number("int"), * }; * const command = new GetQAppCommand(input); * const response = await client.send(command); @@ -66,7 +67,7 @@ export interface GetQAppCommandOutput extends GetQAppOutput, __MetadataBearer {} * // dependencies: [ // DependencyList // required * // "STRING_VALUE", * // ], - * // type: "text-input" || "q-query" || "file-upload" || "q-plugin", // required + * // type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required * // placeholder: "STRING_VALUE", * // defaultValue: "STRING_VALUE", * // }, @@ -76,7 +77,7 @@ export interface GetQAppCommandOutput extends GetQAppOutput, __MetadataBearer {} * // dependencies: [ // required * // "STRING_VALUE", * // ], - * // type: "text-input" || "q-query" || "file-upload" || "q-plugin", // required + * // type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required * // prompt: "STRING_VALUE", // required * // outputSource: "approved-sources" || "llm", // required * // attributeFilter: { // AttributeFilter @@ -160,6 +161,9 @@ export interface GetQAppCommandOutput extends GetQAppOutput, __MetadataBearer {} * // lessThan: "", * // lessThanOrEquals: "", * // }, + * // memoryReferences: [ // MemoryReferenceList + * // "STRING_VALUE", + * // ], * // }, * // qPlugin: { // QPluginCard * // id: "STRING_VALUE", // required @@ -167,7 +171,7 @@ export interface GetQAppCommandOutput extends GetQAppOutput, __MetadataBearer {} * // dependencies: [ // required * // "STRING_VALUE", * // ], - * // type: "text-input" || "q-query" || "file-upload" || "q-plugin", // required + * // type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required * // prompt: "STRING_VALUE", // required * // pluginType: "SERVICE_NOW" || "SALESFORCE" || "JIRA" || "ZENDESK" || "CUSTOM", // required * // pluginId: "STRING_VALUE", // required @@ -178,11 +182,23 @@ export interface GetQAppCommandOutput extends GetQAppOutput, __MetadataBearer {} * // dependencies: [ // required * // "STRING_VALUE", * // ], - * // type: "text-input" || "q-query" || "file-upload" || "q-plugin", // required + * // type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required * // filename: "STRING_VALUE", * // fileId: "STRING_VALUE", * // allowOverride: true || false, * // }, + * // formInput: { // FormInputCard + * // id: "STRING_VALUE", // required + * // title: "STRING_VALUE", // required + * // dependencies: [ // required + * // "STRING_VALUE", + * // ], + * // type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required + * // metadata: { // FormInputCardMetadata + * // schema: "DOCUMENT_VALUE", // required + * // }, + * // computeMode: "append" || "replace", + * // }, * // }, * // ], * // canEdit: true || false, diff --git a/clients/client-qapps/src/commands/GetQAppSessionCommand.ts b/clients/client-qapps/src/commands/GetQAppSessionCommand.ts index 8c797373236db..a25d3546ac0db 100644 --- a/clients/client-qapps/src/commands/GetQAppSessionCommand.ts +++ b/clients/client-qapps/src/commands/GetQAppSessionCommand.ts @@ -44,13 +44,24 @@ export interface GetQAppSessionCommandOutput extends GetQAppSessionOutput, __Met * // { // GetQAppSessionOutput * // sessionId: "STRING_VALUE", // required * // sessionArn: "STRING_VALUE", // required - * // status: "IN_PROGRESS" || "WAITING" || "COMPLETED", // required + * // sessionName: "STRING_VALUE", + * // appVersion: Number("int"), + * // latestPublishedAppVersion: Number("int"), + * // status: "IN_PROGRESS" || "WAITING" || "COMPLETED" || "ERROR", // required * // cardStatus: { // CardStatusMap // required * // "": { // CardStatus - * // currentState: "IN_PROGRESS" || "WAITING" || "COMPLETED", // required + * // currentState: "IN_PROGRESS" || "WAITING" || "COMPLETED" || "ERROR", // required * // currentValue: "STRING_VALUE", // required + * // submissions: [ // SubmissionList + * // { // Submission + * // value: "DOCUMENT_VALUE", + * // submissionId: "STRING_VALUE", + * // timestamp: new Date("TIMESTAMP"), + * // }, + * // ], * // }, * // }, + * // userIsHost: true || false, * // }; * * ``` diff --git a/clients/client-qapps/src/commands/GetQAppSessionMetadataCommand.ts b/clients/client-qapps/src/commands/GetQAppSessionMetadataCommand.ts new file mode 100644 index 0000000000000..2ea651612543d --- /dev/null +++ b/clients/client-qapps/src/commands/GetQAppSessionMetadataCommand.ts @@ -0,0 +1,124 @@ +// smithy-typescript generated code +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 { GetQAppSessionMetadataInput, GetQAppSessionMetadataOutput } from "../models/models_0"; +import { de_GetQAppSessionMetadataCommand, se_GetQAppSessionMetadataCommand } from "../protocols/Aws_restJson1"; +import { QAppsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QAppsClient"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetQAppSessionMetadataCommand}. + */ +export interface GetQAppSessionMetadataCommandInput extends GetQAppSessionMetadataInput {} +/** + * @public + * + * The output of {@link GetQAppSessionMetadataCommand}. + */ +export interface GetQAppSessionMetadataCommandOutput extends GetQAppSessionMetadataOutput, __MetadataBearer {} + +/** + *

Retrieves the current configuration of a Q App session.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QAppsClient, GetQAppSessionMetadataCommand } from "@aws-sdk/client-qapps"; // ES Modules import + * // const { QAppsClient, GetQAppSessionMetadataCommand } = require("@aws-sdk/client-qapps"); // CommonJS import + * const client = new QAppsClient(config); + * const input = { // GetQAppSessionMetadataInput + * instanceId: "STRING_VALUE", // required + * sessionId: "STRING_VALUE", // required + * }; + * const command = new GetQAppSessionMetadataCommand(input); + * const response = await client.send(command); + * // { // GetQAppSessionMetadataOutput + * // sessionId: "STRING_VALUE", // required + * // sessionArn: "STRING_VALUE", // required + * // sessionName: "STRING_VALUE", + * // sharingConfiguration: { // SessionSharingConfiguration + * // enabled: true || false, // required + * // acceptResponses: true || false, + * // revealCards: true || false, + * // }, + * // sessionOwner: true || false, + * // }; + * + * ``` + * + * @param GetQAppSessionMetadataCommandInput - {@link GetQAppSessionMetadataCommandInput} + * @returns {@link GetQAppSessionMetadataCommandOutput} + * @see {@link GetQAppSessionMetadataCommandInput} for command's `input` shape. + * @see {@link GetQAppSessionMetadataCommandOutput} for command's `response` shape. + * @see {@link QAppsClientResolvedConfig | config} for QAppsClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

The client is not authorized to perform the requested operation.

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

An internal service error occurred while processing the request.

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

The requested resource could not be found.

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

The requested operation could not be completed because + * it would exceed the service's quota or limit.

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

The requested operation could not be completed because too many + * requests were sent at once. Wait a bit and try again later.

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

The client is not authenticated or authorized to perform the requested operation.

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

The input failed to satisfy the constraints specified by the service.

+ * + * @throws {@link QAppsServiceException} + *

Base exception class for all service exceptions from QApps service.

+ * + * @public + */ +export class GetQAppSessionMetadataCommand extends $Command + .classBuilder< + GetQAppSessionMetadataCommandInput, + GetQAppSessionMetadataCommandOutput, + QAppsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: QAppsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("QAppsService", "GetQAppSessionMetadata", {}) + .n("QAppsClient", "GetQAppSessionMetadataCommand") + .f(void 0, void 0) + .ser(se_GetQAppSessionMetadataCommand) + .de(de_GetQAppSessionMetadataCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetQAppSessionMetadataInput; + output: GetQAppSessionMetadataOutput; + }; + sdk: { + input: GetQAppSessionMetadataCommandInput; + output: GetQAppSessionMetadataCommandOutput; + }; + }; +} diff --git a/clients/client-qapps/src/commands/ListQAppSessionDataCommand.ts b/clients/client-qapps/src/commands/ListQAppSessionDataCommand.ts new file mode 100644 index 0000000000000..f70fc098eee49 --- /dev/null +++ b/clients/client-qapps/src/commands/ListQAppSessionDataCommand.ts @@ -0,0 +1,129 @@ +// smithy-typescript generated code +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 { ListQAppSessionDataInput, ListQAppSessionDataOutput } from "../models/models_0"; +import { de_ListQAppSessionDataCommand, se_ListQAppSessionDataCommand } from "../protocols/Aws_restJson1"; +import { QAppsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QAppsClient"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListQAppSessionDataCommand}. + */ +export interface ListQAppSessionDataCommandInput extends ListQAppSessionDataInput {} +/** + * @public + * + * The output of {@link ListQAppSessionDataCommand}. + */ +export interface ListQAppSessionDataCommandOutput extends ListQAppSessionDataOutput, __MetadataBearer {} + +/** + *

Lists the collected data of a Q App data collection session.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QAppsClient, ListQAppSessionDataCommand } from "@aws-sdk/client-qapps"; // ES Modules import + * // const { QAppsClient, ListQAppSessionDataCommand } = require("@aws-sdk/client-qapps"); // CommonJS import + * const client = new QAppsClient(config); + * const input = { // ListQAppSessionDataInput + * instanceId: "STRING_VALUE", // required + * sessionId: "STRING_VALUE", // required + * }; + * const command = new ListQAppSessionDataCommand(input); + * const response = await client.send(command); + * // { // ListQAppSessionDataOutput + * // sessionId: "STRING_VALUE", // required + * // sessionArn: "STRING_VALUE", // required + * // sessionData: [ // QAppSessionDataList + * // { // QAppSessionData + * // cardId: "STRING_VALUE", // required + * // value: "DOCUMENT_VALUE", + * // user: { // User + * // userId: "STRING_VALUE", + * // }, + * // submissionId: "STRING_VALUE", + * // timestamp: new Date("TIMESTAMP"), + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListQAppSessionDataCommandInput - {@link ListQAppSessionDataCommandInput} + * @returns {@link ListQAppSessionDataCommandOutput} + * @see {@link ListQAppSessionDataCommandInput} for command's `input` shape. + * @see {@link ListQAppSessionDataCommandOutput} for command's `response` shape. + * @see {@link QAppsClientResolvedConfig | config} for QAppsClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

The client is not authorized to perform the requested operation.

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

An internal service error occurred while processing the request.

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

The requested resource could not be found.

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

The requested operation could not be completed because + * it would exceed the service's quota or limit.

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

The requested operation could not be completed because too many + * requests were sent at once. Wait a bit and try again later.

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

The client is not authenticated or authorized to perform the requested operation.

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

The input failed to satisfy the constraints specified by the service.

+ * + * @throws {@link QAppsServiceException} + *

Base exception class for all service exceptions from QApps service.

+ * + * @public + */ +export class ListQAppSessionDataCommand extends $Command + .classBuilder< + ListQAppSessionDataCommandInput, + ListQAppSessionDataCommandOutput, + QAppsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: QAppsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("QAppsService", "ListQAppSessionData", {}) + .n("QAppsClient", "ListQAppSessionDataCommand") + .f(void 0, void 0) + .ser(se_ListQAppSessionDataCommand) + .de(de_ListQAppSessionDataCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ListQAppSessionDataInput; + output: ListQAppSessionDataOutput; + }; + sdk: { + input: ListQAppSessionDataCommandInput; + output: ListQAppSessionDataCommandOutput; + }; + }; +} diff --git a/clients/client-qapps/src/commands/PredictQAppCommand.ts b/clients/client-qapps/src/commands/PredictQAppCommand.ts index 6a0779891d51f..a4a3ae19407bb 100644 --- a/clients/client-qapps/src/commands/PredictQAppCommand.ts +++ b/clients/client-qapps/src/commands/PredictQAppCommand.ts @@ -62,14 +62,14 @@ export interface PredictQAppCommandOutput extends PredictQAppOutput, __MetadataB * // textInput: { // TextInputCardInput * // title: "STRING_VALUE", // required * // id: "STRING_VALUE", // required - * // type: "text-input" || "q-query" || "file-upload" || "q-plugin", // required + * // type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required * // placeholder: "STRING_VALUE", * // defaultValue: "STRING_VALUE", * // }, * // qQuery: { // QQueryCardInput * // title: "STRING_VALUE", // required * // id: "STRING_VALUE", // required - * // type: "text-input" || "q-query" || "file-upload" || "q-plugin", // required + * // type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required * // prompt: "STRING_VALUE", // required * // outputSource: "approved-sources" || "llm", * // attributeFilter: { // AttributeFilter @@ -157,18 +157,27 @@ export interface PredictQAppCommandOutput extends PredictQAppOutput, __MetadataB * // qPlugin: { // QPluginCardInput * // title: "STRING_VALUE", // required * // id: "STRING_VALUE", // required - * // type: "text-input" || "q-query" || "file-upload" || "q-plugin", // required + * // type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required * // prompt: "STRING_VALUE", // required * // pluginId: "STRING_VALUE", // required * // }, * // fileUpload: { // FileUploadCardInput * // title: "STRING_VALUE", // required * // id: "STRING_VALUE", // required - * // type: "text-input" || "q-query" || "file-upload" || "q-plugin", // required + * // type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required * // filename: "STRING_VALUE", * // fileId: "STRING_VALUE", * // allowOverride: true || false, * // }, + * // formInput: { // FormInputCardInput + * // title: "STRING_VALUE", // required + * // id: "STRING_VALUE", // required + * // type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required + * // metadata: { // FormInputCardMetadata + * // schema: "DOCUMENT_VALUE", // required + * // }, + * // computeMode: "append" || "replace", + * // }, * // }, * // ], * // initialPrompt: "STRING_VALUE", diff --git a/clients/client-qapps/src/commands/StartQAppSessionCommand.ts b/clients/client-qapps/src/commands/StartQAppSessionCommand.ts index 1dfd2cac737e6..d419e9d1a44a6 100644 --- a/clients/client-qapps/src/commands/StartQAppSessionCommand.ts +++ b/clients/client-qapps/src/commands/StartQAppSessionCommand.ts @@ -48,8 +48,13 @@ export interface StartQAppSessionCommandOutput extends StartQAppSessionOutput, _ * { // CardValue * cardId: "STRING_VALUE", // required * value: "STRING_VALUE", // required + * submissionMutation: { // SubmissionMutation + * submissionId: "STRING_VALUE", // required + * mutationType: "edit" || "delete" || "add", // required + * }, * }, * ], + * sessionId: "STRING_VALUE", * tags: { // TagMap * "": "STRING_VALUE", * }, diff --git a/clients/client-qapps/src/commands/UpdateQAppCommand.ts b/clients/client-qapps/src/commands/UpdateQAppCommand.ts index 9637165913345..90225dc1d0b2b 100644 --- a/clients/client-qapps/src/commands/UpdateQAppCommand.ts +++ b/clients/client-qapps/src/commands/UpdateQAppCommand.ts @@ -46,14 +46,14 @@ export interface UpdateQAppCommandOutput extends UpdateQAppOutput, __MetadataBea * textInput: { // TextInputCardInput * title: "STRING_VALUE", // required * id: "STRING_VALUE", // required - * type: "text-input" || "q-query" || "file-upload" || "q-plugin", // required + * type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required * placeholder: "STRING_VALUE", * defaultValue: "STRING_VALUE", * }, * qQuery: { // QQueryCardInput * title: "STRING_VALUE", // required * id: "STRING_VALUE", // required - * type: "text-input" || "q-query" || "file-upload" || "q-plugin", // required + * type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required * prompt: "STRING_VALUE", // required * outputSource: "approved-sources" || "llm", * attributeFilter: { // AttributeFilter @@ -141,18 +141,27 @@ export interface UpdateQAppCommandOutput extends UpdateQAppOutput, __MetadataBea * qPlugin: { // QPluginCardInput * title: "STRING_VALUE", // required * id: "STRING_VALUE", // required - * type: "text-input" || "q-query" || "file-upload" || "q-plugin", // required + * type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required * prompt: "STRING_VALUE", // required * pluginId: "STRING_VALUE", // required * }, * fileUpload: { // FileUploadCardInput * title: "STRING_VALUE", // required * id: "STRING_VALUE", // required - * type: "text-input" || "q-query" || "file-upload" || "q-plugin", // required + * type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required * filename: "STRING_VALUE", * fileId: "STRING_VALUE", * allowOverride: true || false, * }, + * formInput: { // FormInputCardInput + * title: "STRING_VALUE", // required + * id: "STRING_VALUE", // required + * type: "text-input" || "q-query" || "file-upload" || "q-plugin" || "form-input", // required + * metadata: { // FormInputCardMetadata + * schema: "DOCUMENT_VALUE", // required + * }, + * computeMode: "append" || "replace", + * }, * }, * ], * initialPrompt: "STRING_VALUE", diff --git a/clients/client-qapps/src/commands/UpdateQAppPermissionsCommand.ts b/clients/client-qapps/src/commands/UpdateQAppPermissionsCommand.ts new file mode 100644 index 0000000000000..754a12dffa0ac --- /dev/null +++ b/clients/client-qapps/src/commands/UpdateQAppPermissionsCommand.ts @@ -0,0 +1,135 @@ +// smithy-typescript generated code +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 { UpdateQAppPermissionsInput, UpdateQAppPermissionsOutput } from "../models/models_0"; +import { de_UpdateQAppPermissionsCommand, se_UpdateQAppPermissionsCommand } from "../protocols/Aws_restJson1"; +import { QAppsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QAppsClient"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UpdateQAppPermissionsCommand}. + */ +export interface UpdateQAppPermissionsCommandInput extends UpdateQAppPermissionsInput {} +/** + * @public + * + * The output of {@link UpdateQAppPermissionsCommand}. + */ +export interface UpdateQAppPermissionsCommandOutput extends UpdateQAppPermissionsOutput, __MetadataBearer {} + +/** + *

Updates read permissions for a Amazon Q App in Amazon Q Business application environment instance.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QAppsClient, UpdateQAppPermissionsCommand } from "@aws-sdk/client-qapps"; // ES Modules import + * // const { QAppsClient, UpdateQAppPermissionsCommand } = require("@aws-sdk/client-qapps"); // CommonJS import + * const client = new QAppsClient(config); + * const input = { // UpdateQAppPermissionsInput + * instanceId: "STRING_VALUE", // required + * appId: "STRING_VALUE", // required + * grantPermissions: [ // PermissionsInputList + * { // PermissionInput + * action: "read" || "write", // required + * principal: "STRING_VALUE", // required + * }, + * ], + * revokePermissions: [ + * { + * action: "read" || "write", // required + * principal: "STRING_VALUE", // required + * }, + * ], + * }; + * const command = new UpdateQAppPermissionsCommand(input); + * const response = await client.send(command); + * // { // UpdateQAppPermissionsOutput + * // resourceArn: "STRING_VALUE", + * // appId: "STRING_VALUE", + * // permissions: [ // PermissionsOutputList + * // { // PermissionOutput + * // action: "read" || "write", // required + * // principal: { // PrincipalOutput + * // userId: "STRING_VALUE", + * // userType: "owner" || "user", + * // email: "STRING_VALUE", + * // }, + * // }, + * // ], + * // }; + * + * ``` + * + * @param UpdateQAppPermissionsCommandInput - {@link UpdateQAppPermissionsCommandInput} + * @returns {@link UpdateQAppPermissionsCommandOutput} + * @see {@link UpdateQAppPermissionsCommandInput} for command's `input` shape. + * @see {@link UpdateQAppPermissionsCommandOutput} for command's `response` shape. + * @see {@link QAppsClientResolvedConfig | config} for QAppsClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

The client is not authorized to perform the requested operation.

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

An internal service error occurred while processing the request.

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

The requested resource could not be found.

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

The requested operation could not be completed because too many + * requests were sent at once. Wait a bit and try again later.

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

The client is not authenticated or authorized to perform the requested operation.

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

The input failed to satisfy the constraints specified by the service.

+ * + * @throws {@link QAppsServiceException} + *

Base exception class for all service exceptions from QApps service.

+ * + * @public + */ +export class UpdateQAppPermissionsCommand extends $Command + .classBuilder< + UpdateQAppPermissionsCommandInput, + UpdateQAppPermissionsCommandOutput, + QAppsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: QAppsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("QAppsService", "UpdateQAppPermissions", {}) + .n("QAppsClient", "UpdateQAppPermissionsCommand") + .f(void 0, void 0) + .ser(se_UpdateQAppPermissionsCommand) + .de(de_UpdateQAppPermissionsCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: UpdateQAppPermissionsInput; + output: UpdateQAppPermissionsOutput; + }; + sdk: { + input: UpdateQAppPermissionsCommandInput; + output: UpdateQAppPermissionsCommandOutput; + }; + }; +} diff --git a/clients/client-qapps/src/commands/UpdateQAppSessionCommand.ts b/clients/client-qapps/src/commands/UpdateQAppSessionCommand.ts index b79c9267b7b7c..1a05d825e057a 100644 --- a/clients/client-qapps/src/commands/UpdateQAppSessionCommand.ts +++ b/clients/client-qapps/src/commands/UpdateQAppSessionCommand.ts @@ -46,6 +46,10 @@ export interface UpdateQAppSessionCommandOutput extends UpdateQAppSessionOutput, * { // CardValue * cardId: "STRING_VALUE", // required * value: "STRING_VALUE", // required + * submissionMutation: { // SubmissionMutation + * submissionId: "STRING_VALUE", // required + * mutationType: "edit" || "delete" || "add", // required + * }, * }, * ], * }; diff --git a/clients/client-qapps/src/commands/UpdateQAppSessionMetadataCommand.ts b/clients/client-qapps/src/commands/UpdateQAppSessionMetadataCommand.ts new file mode 100644 index 0000000000000..c12e67622ff1c --- /dev/null +++ b/clients/client-qapps/src/commands/UpdateQAppSessionMetadataCommand.ts @@ -0,0 +1,129 @@ +// smithy-typescript generated code +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 { UpdateQAppSessionMetadataInput, UpdateQAppSessionMetadataOutput } from "../models/models_0"; +import { de_UpdateQAppSessionMetadataCommand, se_UpdateQAppSessionMetadataCommand } from "../protocols/Aws_restJson1"; +import { QAppsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QAppsClient"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UpdateQAppSessionMetadataCommand}. + */ +export interface UpdateQAppSessionMetadataCommandInput extends UpdateQAppSessionMetadataInput {} +/** + * @public + * + * The output of {@link UpdateQAppSessionMetadataCommand}. + */ +export interface UpdateQAppSessionMetadataCommandOutput extends UpdateQAppSessionMetadataOutput, __MetadataBearer {} + +/** + *

Updates the configuration metadata of a session for a given Q App sessionId.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QAppsClient, UpdateQAppSessionMetadataCommand } from "@aws-sdk/client-qapps"; // ES Modules import + * // const { QAppsClient, UpdateQAppSessionMetadataCommand } = require("@aws-sdk/client-qapps"); // CommonJS import + * const client = new QAppsClient(config); + * const input = { // UpdateQAppSessionMetadataInput + * instanceId: "STRING_VALUE", // required + * sessionId: "STRING_VALUE", // required + * sessionName: "STRING_VALUE", + * sharingConfiguration: { // SessionSharingConfiguration + * enabled: true || false, // required + * acceptResponses: true || false, + * revealCards: true || false, + * }, + * }; + * const command = new UpdateQAppSessionMetadataCommand(input); + * const response = await client.send(command); + * // { // UpdateQAppSessionMetadataOutput + * // sessionId: "STRING_VALUE", // required + * // sessionArn: "STRING_VALUE", // required + * // sessionName: "STRING_VALUE", + * // sharingConfiguration: { // SessionSharingConfiguration + * // enabled: true || false, // required + * // acceptResponses: true || false, + * // revealCards: true || false, + * // }, + * // }; + * + * ``` + * + * @param UpdateQAppSessionMetadataCommandInput - {@link UpdateQAppSessionMetadataCommandInput} + * @returns {@link UpdateQAppSessionMetadataCommandOutput} + * @see {@link UpdateQAppSessionMetadataCommandInput} for command's `input` shape. + * @see {@link UpdateQAppSessionMetadataCommandOutput} for command's `response` shape. + * @see {@link QAppsClientResolvedConfig | config} for QAppsClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

The client is not authorized to perform the requested operation.

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

An internal service error occurred while processing the request.

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

The requested resource could not be found.

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

The requested operation could not be completed because + * it would exceed the service's quota or limit.

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

The requested operation could not be completed because too many + * requests were sent at once. Wait a bit and try again later.

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

The client is not authenticated or authorized to perform the requested operation.

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

The input failed to satisfy the constraints specified by the service.

+ * + * @throws {@link QAppsServiceException} + *

Base exception class for all service exceptions from QApps service.

+ * + * @public + */ +export class UpdateQAppSessionMetadataCommand extends $Command + .classBuilder< + UpdateQAppSessionMetadataCommandInput, + UpdateQAppSessionMetadataCommandOutput, + QAppsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: QAppsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("QAppsService", "UpdateQAppSessionMetadata", {}) + .n("QAppsClient", "UpdateQAppSessionMetadataCommand") + .f(void 0, void 0) + .ser(se_UpdateQAppSessionMetadataCommand) + .de(de_UpdateQAppSessionMetadataCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: UpdateQAppSessionMetadataInput; + output: UpdateQAppSessionMetadataOutput; + }; + sdk: { + input: UpdateQAppSessionMetadataCommandInput; + output: UpdateQAppSessionMetadataCommandOutput; + }; + }; +} diff --git a/clients/client-qapps/src/commands/index.ts b/clients/client-qapps/src/commands/index.ts index 0a4d488aca22f..ab9d0695070e7 100644 --- a/clients/client-qapps/src/commands/index.ts +++ b/clients/client-qapps/src/commands/index.ts @@ -5,17 +5,22 @@ export * from "./BatchCreateCategoryCommand"; export * from "./BatchDeleteCategoryCommand"; export * from "./BatchUpdateCategoryCommand"; export * from "./CreateLibraryItemCommand"; +export * from "./CreatePresignedUrlCommand"; export * from "./CreateQAppCommand"; export * from "./DeleteLibraryItemCommand"; export * from "./DeleteQAppCommand"; +export * from "./DescribeQAppPermissionsCommand"; export * from "./DisassociateLibraryItemReviewCommand"; export * from "./DisassociateQAppFromUserCommand"; +export * from "./ExportQAppSessionDataCommand"; export * from "./GetLibraryItemCommand"; export * from "./GetQAppCommand"; export * from "./GetQAppSessionCommand"; +export * from "./GetQAppSessionMetadataCommand"; export * from "./ImportDocumentCommand"; export * from "./ListCategoriesCommand"; export * from "./ListLibraryItemsCommand"; +export * from "./ListQAppSessionDataCommand"; export * from "./ListQAppsCommand"; export * from "./ListTagsForResourceCommand"; export * from "./PredictQAppCommand"; @@ -26,4 +31,6 @@ export * from "./UntagResourceCommand"; export * from "./UpdateLibraryItemCommand"; export * from "./UpdateLibraryItemMetadataCommand"; export * from "./UpdateQAppCommand"; +export * from "./UpdateQAppPermissionsCommand"; export * from "./UpdateQAppSessionCommand"; +export * from "./UpdateQAppSessionMetadataCommand"; diff --git a/clients/client-qapps/src/models/models_0.ts b/clients/client-qapps/src/models/models_0.ts index d0a24c811a153..81f2bcd9a297f 100644 --- a/clients/client-qapps/src/models/models_0.ts +++ b/clients/client-qapps/src/models/models_0.ts @@ -1,6 +1,8 @@ // smithy-typescript generated code import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client"; +import { DocumentType as __DocumentType } from "@smithy/types"; + import { QAppsServiceException as __BaseException } from "./QAppsServiceException"; /** @@ -23,12 +25,27 @@ export class AccessDeniedException extends __BaseException { } } +/** + * @public + * @enum + */ +export const Action = { + READ: "read", + WRITE: "write", +} as const; + +/** + * @public + */ +export type Action = (typeof Action)[keyof typeof Action]; + /** * @public * @enum */ export const CardType = { FILE_UPLOAD: "file-upload", + FORM_INPUT: "form-input", Q_PLUGIN: "q-plugin", Q_QUERY: "q-query", TEXT_INPUT: "text-input", @@ -87,6 +104,80 @@ export interface FileUploadCard { allowOverride?: boolean | undefined; } +/** + * @public + * @enum + */ +export const InputCardComputeMode = { + APPEND: "append", + REPLACE: "replace", +} as const; + +/** + * @public + */ +export type InputCardComputeMode = (typeof InputCardComputeMode)[keyof typeof InputCardComputeMode]; + +/** + *

The metadata of the form input card.

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

The JSON schema that defines the shape of the response data.

+ * @public + */ + schema: __DocumentType | undefined; +} + +/** + *

A card in an Amazon Q App that allows the user to submit a response.

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

The unique identifier of the form input card.

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

The title of the form input card.

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

Any dependencies or requirements for the form input card.

+ * @public + */ + dependencies: string[] | undefined; + + /** + *

The type of the card.

+ * @public + */ + type: CardType | undefined; + + /** + *

The metadata that defines the form input card data.

+ * @public + */ + metadata: FormInputCardMetadata | undefined; + + /** + *

The compute mode of the form input card. + * This property determines whether individual participants of a + * data collection session can submit multiple response or one response. + * A compute mode of append shall allow participants + * to submit the same form multiple times with different values. + * A compute mode of replacecode> shall overwrite + * the current value for each participant.

+ * @public + */ + computeMode?: InputCardComputeMode | undefined; +} + /** * @public * @enum @@ -366,6 +457,48 @@ export interface FileUploadCardInput { allowOverride?: boolean | undefined; } +/** + *

Represents a form input card for an Amazon Q App.

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

The title or label of the form input card.

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

The unique identifier of the form input card.

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

The type of the card.

+ * @public + */ + type: CardType | undefined; + + /** + *

The metadata that defines the form input card data.

+ * @public + */ + metadata: FormInputCardMetadata | undefined; + + /** + *

The compute mode of the form input card. + * This property determines whether individual participants of a + * data collection session can submit multiple response or one response. + * A compute mode of append shall allow participants + * to submit the same form multiple times with different values. + * A compute mode of replacecode> shall overwrite + * the current value for each participant.

+ * @public + */ + computeMode?: InputCardComputeMode | undefined; +} + /** *

The input shape for defining a plugin card in an Amazon Q App.

* @public @@ -839,6 +972,7 @@ export interface BatchUpdateCategoryInput { */ export const ExecutionStatus = { COMPLETED: "COMPLETED", + ERROR: "ERROR", IN_PROGRESS: "IN_PROGRESS", WAITING: "WAITING", } as const; @@ -848,6 +982,30 @@ export const ExecutionStatus = { */ export type ExecutionStatus = (typeof ExecutionStatus)[keyof typeof ExecutionStatus]; +/** + *

A record created when a user submits a form card.

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

The data submitted by the user.

+ * @public + */ + value?: __DocumentType | undefined; + + /** + *

The unique identifier of the submission.

+ * @public + */ + submissionId?: string | undefined; + + /** + *

The date and time when the card is submitted.

+ * @public + */ + timestamp?: Date | undefined; +} + /** *

The current status and value of a card in an active Amazon Q App session.

* @public @@ -864,6 +1022,45 @@ export interface CardStatus { * @public */ currentValue: string | undefined; + + /** + *

A list of previous submissions, if the card is a form card.

+ * @public + */ + submissions?: Submission[] | undefined; +} + +/** + * @public + * @enum + */ +export const SubmissionMutationKind = { + add: "add", + delete: "delete", + edit: "edit", +} as const; + +/** + * @public + */ +export type SubmissionMutationKind = (typeof SubmissionMutationKind)[keyof typeof SubmissionMutationKind]; + +/** + *

Represents an action performed on a submission.

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

The unique identifier of the submission.

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

The operation that is performed on a submission.

+ * @public + */ + mutationType: SubmissionMutationKind | undefined; } /** @@ -882,6 +1079,13 @@ export interface CardValue { * @public */ value: string | undefined; + + /** + *

The structure that describes how the current form card value is mutated. + * Only applies for form cards when multiple responses are allowed.

+ * @public + */ + submissionMutation?: SubmissionMutation | undefined; } /** @@ -1063,6 +1267,96 @@ export interface CreateLibraryItemOutput { isVerified?: boolean | undefined; } +/** + * @public + * @enum + */ +export const DocumentScope = { + APPLICATION: "APPLICATION", + SESSION: "SESSION", +} as const; + +/** + * @public + */ +export type DocumentScope = (typeof DocumentScope)[keyof typeof DocumentScope]; + +/** + * @public + */ +export interface CreatePresignedUrlInput { + /** + *

The unique identifier of the Amazon Q Business application environment instance.

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

The unique identifier of the card the file is associated with.

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

The unique identifier of the Q App the file is associated with.

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

The Base64-encoded SHA-256 digest of the contents of the file to be uploaded.

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

The name of the file to be uploaded.

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

Whether the file is associated with a Q App definition or a specific Q App session.

+ * @public + */ + scope: DocumentScope | undefined; + + /** + *

The unique identifier of the Q App session the file is associated with, if applicable.

+ * @public + */ + sessionId?: string | undefined; +} + +/** + * @public + */ +export interface CreatePresignedUrlOutput { + /** + *

The unique identifier assigned to the file to be uploaded.

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

The URL for a presigned S3 POST operation used to upload a file.

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

The form fields to include in the presigned S3 POST operation used to upload a file.

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

The date and time that the presigned URL will expire in ISO 8601 format.

+ * @public + */ + presignedUrlExpiration: Date | undefined; +} + /** * @public */ @@ -1177,24 +1471,7 @@ export interface DeleteQAppInput { /** * @public */ -export interface DisassociateLibraryItemReviewInput { - /** - *

The unique identifier of the Amazon Q Business application environment instance.

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

The unique identifier of the library item to remove the review from.

- * @public - */ - libraryItemId: string | undefined; -} - -/** - * @public - */ -export interface DisassociateQAppFromUserInput { +export interface DescribeQAppPermissionsInput { /** *

The unique identifier of the Amazon Q Business application environment instance.

* @public @@ -1202,7 +1479,7 @@ export interface DisassociateQAppFromUserInput { instanceId: string | undefined; /** - *

The unique identifier of the Q App to disassociate from the user.

+ *

The unique identifier of the Amazon Q App for which to retrieve permissions.

* @public */ appId: string | undefined; @@ -1212,69 +1489,208 @@ export interface DisassociateQAppFromUserInput { * @public * @enum */ -export const DocumentScope = { - APPLICATION: "APPLICATION", - SESSION: "SESSION", +export const UserType = { + OWNER: "owner", + USER: "user", } as const; /** * @public */ -export type DocumentScope = (typeof DocumentScope)[keyof typeof DocumentScope]; +export type UserType = (typeof UserType)[keyof typeof UserType]; /** + *

The principal for which the permission applies.

* @public */ -export interface GetLibraryItemInput { +export interface PrincipalOutput { /** - *

The unique identifier of the Amazon Q Business application environment instance.

+ *

The unique identifier of the user.

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

The unique identifier of the library item to retrieve.

+ *

The type of the user.

* @public */ - libraryItemId: string | undefined; + userType?: UserType | undefined; /** - *

The unique identifier of the Amazon Q App associated with the library item.

+ *

The email address associated with the user.

* @public */ - appId?: string | undefined; + email?: string | undefined; } /** + *

The permission granted to the Amazon Q App.

* @public */ -export interface GetLibraryItemOutput { +export interface PermissionOutput { /** - *

The unique identifier of the library item.

+ *

The action associated with the permission.

* @public */ - libraryItemId: string | undefined; + action: Action | undefined; /** - *

The unique identifier of the Q App associated with the library item.

+ *

The principal user to which the permission applies.

* @public */ - appId: string | undefined; + principal: PrincipalOutput | undefined; +} +/** + * @public + */ +export interface DescribeQAppPermissionsOutput { /** - *

The version of the Q App associated with the library item.

+ *

The Amazon Resource Name (ARN) of the Amazon Q App for which permissions are returned.

* @public */ - appVersion: number | undefined; + resourceArn?: string | undefined; /** - *

The categories associated with the library item for discovery.

+ *

The unique identifier of the Amazon Q App for which permissions are returned.

* @public */ - categories: Category[] | undefined; + appId?: string | undefined; /** - *

The status of the library item, such as "Published".

+ *

The list of permissions granted for the Amazon Q App.

+ * @public + */ + permissions?: PermissionOutput[] | undefined; +} + +/** + * @public + */ +export interface DisassociateLibraryItemReviewInput { + /** + *

The unique identifier of the Amazon Q Business application environment instance.

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

The unique identifier of the library item to remove the review from.

+ * @public + */ + libraryItemId: string | undefined; +} + +/** + * @public + */ +export interface DisassociateQAppFromUserInput { + /** + *

The unique identifier of the Amazon Q Business application environment instance.

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

The unique identifier of the Q App to disassociate from the user.

+ * @public + */ + appId: string | undefined; +} + +/** + * @public + */ +export interface ExportQAppSessionDataInput { + /** + *

The unique identifier of the Amazon Q Business application environment instance.

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

The unique identifier of the Q App data collection session.

+ * @public + */ + sessionId: string | undefined; +} + +/** + * @public + */ +export interface ExportQAppSessionDataOutput { + /** + *

The link where the exported Q App session data can be downloaded from.

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

The date and time when the link for the exported Q App session data expires.

+ * @public + */ + expiresAt: Date | undefined; + + /** + *

The Amazon Resource Name (ARN) of the Q App data collection session.

+ * @public + */ + sessionArn: string | undefined; +} + +/** + * @public + */ +export interface GetLibraryItemInput { + /** + *

The unique identifier of the Amazon Q Business application environment instance.

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

The unique identifier of the library item to retrieve.

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

The unique identifier of the Amazon Q App associated with the library item.

+ * @public + */ + appId?: string | undefined; +} + +/** + * @public + */ +export interface GetLibraryItemOutput { + /** + *

The unique identifier of the library item.

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

The unique identifier of the Q App associated with the library item.

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

The version of the Q App associated with the library item.

+ * @public + */ + appVersion: number | undefined; + + /** + *

The categories associated with the library item for discovery.

+ * @public + */ + categories: Category[] | undefined; + + /** + *

The status of the library item, such as "Published".

* @public */ status: string | undefined; @@ -1343,6 +1759,12 @@ export interface GetQAppInput { * @public */ appId: string | undefined; + + /** + *

The version of the Q App.

+ * @public + */ + appVersion?: number | undefined; } /** @@ -1378,6 +1800,24 @@ export interface GetQAppSessionOutput { */ sessionArn: string | undefined; + /** + *

The name of the Q App session.

+ * @public + */ + sessionName?: string | undefined; + + /** + *

The version of the Q App used for the session.

+ * @public + */ + appVersion?: number | undefined; + + /** + *

The latest published version of the Q App used for the session.

+ * @public + */ + latestPublishedAppVersion?: number | undefined; + /** *

The current status of the Q App session.

* @public @@ -1389,6 +1829,88 @@ export interface GetQAppSessionOutput { * @public */ cardStatus: Record | undefined; + + /** + *

Indicates whether the current user is the owner of the Q App data collection session.

+ * @public + */ + userIsHost?: boolean | undefined; +} + +/** + * @public + */ +export interface GetQAppSessionMetadataInput { + /** + *

The unique identifier of the Amazon Q Business application environment instance.

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

The unique identifier of the Q App session.

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

The sharing configuration of an Amazon Q App data collection session.

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

Indicates whether an Q App session is shareable with other users.

+ * @public + */ + enabled: boolean | undefined; + + /** + *

Indicates whether an Q App session can accept responses from users.

+ * @public + */ + acceptResponses?: boolean | undefined; + + /** + *

Indicates whether collected responses for an Q App session are revealed for all users.

+ * @public + */ + revealCards?: boolean | undefined; +} + +/** + * @public + */ +export interface GetQAppSessionMetadataOutput { + /** + *

The unique identifier of the Q App session.

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

The Amazon Resource Name (ARN) of the Q App session.

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

The name of the Q App session.

+ * @public + */ + sessionName?: string | undefined; + + /** + *

The sharing configuration of the Q App data collection session.

+ * @public + */ + sharingConfiguration: SessionSharingConfiguration | undefined; + + /** + *

Indicates whether the current user is the owner of the Q App session.

+ * @public + */ + sessionOwner?: boolean | undefined; } /** @@ -1402,7 +1924,7 @@ export interface ImportDocumentInput { instanceId: string | undefined; /** - *

The unique identifier of the card the file is associated with, if applicable.

+ *

The unique identifier of the card the file is associated with.

* @public */ cardId: string | undefined; @@ -1426,7 +1948,7 @@ export interface ImportDocumentInput { fileName: string | undefined; /** - *

Whether the file is associated with an Q App definition or a specific Q App session.

+ *

Whether the file is associated with a Q App definition or a specific Q App session.

* @public */ scope: DocumentScope | undefined; @@ -1711,6 +2233,101 @@ export interface ListQAppsOutput { nextToken?: string | undefined; } +/** + * @public + */ +export interface ListQAppSessionDataInput { + /** + *

The unique identifier of the Amazon Q Business application environment instance.

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

The unique identifier of the Q App data collection session.

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

A user of an Amazon Q App.

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

The unique identifier of a user.

+ * @public + */ + userId?: string | undefined; +} + +/** + *

The response collected for a Amazon Q App session. + * This container represents a single response to a Q App session.

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

The card Id associated with the response submitted for a Q App session.

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

The response submitted for a Q App session.

+ * @public + */ + value?: __DocumentType | undefined; + + /** + *

The user who submitted the response for a Q App session.

+ * @public + */ + user: User | undefined; + + /** + *

The unique identifier of the submission.

+ * @public + */ + submissionId?: string | undefined; + + /** + *

The date and time when the session data is submitted.

+ * @public + */ + timestamp?: Date | undefined; +} + +/** + * @public + */ +export interface ListQAppSessionDataOutput { + /** + *

The unique identifier of the Q App data collection session.

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

The Amazon Resource Name (ARN) of the Q App data collection session.

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

The collected responses of a Q App session.

+ * @public + */ + sessionData?: QAppSessionData[] | undefined; + + /** + *

The pagination token that indicates the next set of results to retrieve.

+ * @public + */ + nextToken?: string | undefined; +} + /** * @public */ @@ -1733,6 +2350,24 @@ export interface ListTagsForResourceResponse { tags?: Record | undefined; } +/** + *

The permission to grant or revoke for a Amazon Q App.

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

The action associated with the permission.

+ * @public + */ + action: Action | undefined; + + /** + *

The principal user to which the permission applies.

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

The input options for generating an Q App definition.

* @public @@ -1833,6 +2468,12 @@ export interface StartQAppSessionInput { */ initialValues?: CardValue[] | undefined; + /** + *

The unique identifier of the a Q App session.

+ * @public + */ + sessionId?: string | undefined; + /** *

Optional tags to associate with the new Q App session.

* @public @@ -1845,7 +2486,7 @@ export interface StartQAppSessionInput { */ export interface StartQAppSessionOutput { /** - *

The unique identifier of the new Q App session.

+ *

The unique identifier of the new or retrieved Q App session.

* @public */ sessionId: string | undefined; @@ -2130,6 +2771,58 @@ export interface UpdateQAppOutput { requiredCapabilities?: AppRequiredCapability[] | undefined; } +/** + * @public + */ +export interface UpdateQAppPermissionsInput { + /** + *

The unique identifier of the Amazon Q Business application environment instance.

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

The unique identifier of the Amazon Q App for which permissions are being updated.

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

The list of permissions to grant for the Amazon Q App.

+ * @public + */ + grantPermissions?: PermissionInput[] | undefined; + + /** + *

The list of permissions to revoke for the Amazon Q App.

+ * @public + */ + revokePermissions?: PermissionInput[] | undefined; +} + +/** + * @public + */ +export interface UpdateQAppPermissionsOutput { + /** + *

The Amazon Resource Name (ARN) of the Amazon Q App for which permissions were updated.

+ * @public + */ + resourceArn?: string | undefined; + + /** + *

The unique identifier of the Amazon Q App for which permissions were updated.

+ * @public + */ + appId?: string | undefined; + + /** + *

The updated list of permissions for the Amazon Q App.

+ * @public + */ + permissions?: PermissionOutput[] | undefined; +} + /** * @public */ @@ -2170,6 +2863,64 @@ export interface UpdateQAppSessionOutput { sessionArn: string | undefined; } +/** + * @public + */ +export interface UpdateQAppSessionMetadataInput { + /** + *

The unique identifier of the Amazon Q Business application environment instance.

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

The unique identifier of the Q App session to update configuration for.

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

The new name for the Q App session.

+ * @public + */ + sessionName?: string | undefined; + + /** + *

The new sharing configuration for the Q App data collection session.

+ * @public + */ + sharingConfiguration: SessionSharingConfiguration | undefined; +} + +/** + * @public + */ +export interface UpdateQAppSessionMetadataOutput { + /** + *

The unique identifier of the updated Q App session.

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

The Amazon Resource Name (ARN) of the updated Q App session.

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

The new name of the updated Q App session.

+ * @public + */ + sessionName?: string | undefined; + + /** + *

The new sharing configuration of the updated Q App data collection session.

+ * @public + */ + sharingConfiguration: SessionSharingConfiguration | undefined; +} + /** *

The filter criteria used on responses based on document attributes or metadata fields.

* @public @@ -2298,6 +3049,12 @@ export interface QQueryCard { * @public */ attributeFilter?: AttributeFilter | undefined; + + /** + *

Any dependencies for the query card, where the dependencies are references to the collected responses.

+ * @public + */ + memoryReferences?: string[] | undefined; } /** @@ -2348,6 +3105,7 @@ export interface QQueryCardInput { */ export type Card = | Card.FileUploadMember + | Card.FormInputMember | Card.QPluginMember | Card.QQueryMember | Card.TextInputMember @@ -2366,6 +3124,7 @@ export namespace Card { qQuery?: never; qPlugin?: never; fileUpload?: never; + formInput?: never; $unknown?: never; } @@ -2378,6 +3137,7 @@ export namespace Card { qQuery: QQueryCard; qPlugin?: never; fileUpload?: never; + formInput?: never; $unknown?: never; } @@ -2390,6 +3150,7 @@ export namespace Card { qQuery?: never; qPlugin: QPluginCard; fileUpload?: never; + formInput?: never; $unknown?: never; } @@ -2402,6 +3163,20 @@ export namespace Card { qQuery?: never; qPlugin?: never; fileUpload: FileUploadCard; + formInput?: never; + $unknown?: never; + } + + /** + *

A container for the properties of the form input card.

+ * @public + */ + export interface FormInputMember { + textInput?: never; + qQuery?: never; + qPlugin?: never; + fileUpload?: never; + formInput: FormInputCard; $unknown?: never; } @@ -2413,6 +3188,7 @@ export namespace Card { qQuery?: never; qPlugin?: never; fileUpload?: never; + formInput?: never; $unknown: [string, any]; } @@ -2421,6 +3197,7 @@ export namespace Card { qQuery: (value: QQueryCard) => T; qPlugin: (value: QPluginCard) => T; fileUpload: (value: FileUploadCard) => T; + formInput: (value: FormInputCard) => T; _: (name: string, value: any) => T; } @@ -2429,6 +3206,7 @@ export namespace Card { if (value.qQuery !== undefined) return visitor.qQuery(value.qQuery); if (value.qPlugin !== undefined) return visitor.qPlugin(value.qPlugin); if (value.fileUpload !== undefined) return visitor.fileUpload(value.fileUpload); + if (value.formInput !== undefined) return visitor.formInput(value.formInput); return visitor._(value.$unknown[0], value.$unknown[1]); }; } @@ -2439,6 +3217,7 @@ export namespace Card { */ export type CardInput = | CardInput.FileUploadMember + | CardInput.FormInputMember | CardInput.QPluginMember | CardInput.QQueryMember | CardInput.TextInputMember @@ -2457,6 +3236,7 @@ export namespace CardInput { qQuery?: never; qPlugin?: never; fileUpload?: never; + formInput?: never; $unknown?: never; } @@ -2469,6 +3249,7 @@ export namespace CardInput { qQuery: QQueryCardInput; qPlugin?: never; fileUpload?: never; + formInput?: never; $unknown?: never; } @@ -2481,6 +3262,7 @@ export namespace CardInput { qQuery?: never; qPlugin: QPluginCardInput; fileUpload?: never; + formInput?: never; $unknown?: never; } @@ -2493,6 +3275,20 @@ export namespace CardInput { qQuery?: never; qPlugin?: never; fileUpload: FileUploadCardInput; + formInput?: never; + $unknown?: never; + } + + /** + *

A container for the properties of the form input card.

+ * @public + */ + export interface FormInputMember { + textInput?: never; + qQuery?: never; + qPlugin?: never; + fileUpload?: never; + formInput: FormInputCardInput; $unknown?: never; } @@ -2504,6 +3300,7 @@ export namespace CardInput { qQuery?: never; qPlugin?: never; fileUpload?: never; + formInput?: never; $unknown: [string, any]; } @@ -2512,6 +3309,7 @@ export namespace CardInput { qQuery: (value: QQueryCardInput) => T; qPlugin: (value: QPluginCardInput) => T; fileUpload: (value: FileUploadCardInput) => T; + formInput: (value: FormInputCardInput) => T; _: (name: string, value: any) => T; } @@ -2520,6 +3318,7 @@ export namespace CardInput { if (value.qQuery !== undefined) return visitor.qQuery(value.qQuery); if (value.qPlugin !== undefined) return visitor.qPlugin(value.qPlugin); if (value.fileUpload !== undefined) return visitor.fileUpload(value.fileUpload); + if (value.formInput !== undefined) return visitor.formInput(value.formInput); return visitor._(value.$unknown[0], value.$unknown[1]); }; } diff --git a/clients/client-qapps/src/protocols/Aws_restJson1.ts b/clients/client-qapps/src/protocols/Aws_restJson1.ts index 7317831e8e7cd..6fb6df251f116 100644 --- a/clients/client-qapps/src/protocols/Aws_restJson1.ts +++ b/clients/client-qapps/src/protocols/Aws_restJson1.ts @@ -29,6 +29,7 @@ import { withBaseException, } from "@smithy/smithy-client"; import { + DocumentType as __DocumentType, Endpoint as __Endpoint, ResponseMetadata as __ResponseMetadata, SerdeContext as __SerdeContext, @@ -55,9 +56,14 @@ import { BatchUpdateCategoryCommandOutput, } from "../commands/BatchUpdateCategoryCommand"; import { CreateLibraryItemCommandInput, CreateLibraryItemCommandOutput } from "../commands/CreateLibraryItemCommand"; +import { CreatePresignedUrlCommandInput, CreatePresignedUrlCommandOutput } from "../commands/CreatePresignedUrlCommand"; import { CreateQAppCommandInput, CreateQAppCommandOutput } from "../commands/CreateQAppCommand"; import { DeleteLibraryItemCommandInput, DeleteLibraryItemCommandOutput } from "../commands/DeleteLibraryItemCommand"; import { DeleteQAppCommandInput, DeleteQAppCommandOutput } from "../commands/DeleteQAppCommand"; +import { + DescribeQAppPermissionsCommandInput, + DescribeQAppPermissionsCommandOutput, +} from "../commands/DescribeQAppPermissionsCommand"; import { DisassociateLibraryItemReviewCommandInput, DisassociateLibraryItemReviewCommandOutput, @@ -66,13 +72,25 @@ import { DisassociateQAppFromUserCommandInput, DisassociateQAppFromUserCommandOutput, } from "../commands/DisassociateQAppFromUserCommand"; +import { + ExportQAppSessionDataCommandInput, + ExportQAppSessionDataCommandOutput, +} from "../commands/ExportQAppSessionDataCommand"; import { GetLibraryItemCommandInput, GetLibraryItemCommandOutput } from "../commands/GetLibraryItemCommand"; import { GetQAppCommandInput, GetQAppCommandOutput } from "../commands/GetQAppCommand"; import { GetQAppSessionCommandInput, GetQAppSessionCommandOutput } from "../commands/GetQAppSessionCommand"; +import { + GetQAppSessionMetadataCommandInput, + GetQAppSessionMetadataCommandOutput, +} from "../commands/GetQAppSessionMetadataCommand"; import { ImportDocumentCommandInput, ImportDocumentCommandOutput } from "../commands/ImportDocumentCommand"; import { ListCategoriesCommandInput, ListCategoriesCommandOutput } from "../commands/ListCategoriesCommand"; import { ListLibraryItemsCommandInput, ListLibraryItemsCommandOutput } from "../commands/ListLibraryItemsCommand"; import { ListQAppsCommandInput, ListQAppsCommandOutput } from "../commands/ListQAppsCommand"; +import { + ListQAppSessionDataCommandInput, + ListQAppSessionDataCommandOutput, +} from "../commands/ListQAppSessionDataCommand"; import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, @@ -88,7 +106,15 @@ import { UpdateLibraryItemMetadataCommandOutput, } from "../commands/UpdateLibraryItemMetadataCommand"; import { UpdateQAppCommandInput, UpdateQAppCommandOutput } from "../commands/UpdateQAppCommand"; +import { + UpdateQAppPermissionsCommandInput, + UpdateQAppPermissionsCommandOutput, +} from "../commands/UpdateQAppPermissionsCommand"; import { UpdateQAppSessionCommandInput, UpdateQAppSessionCommandOutput } from "../commands/UpdateQAppSessionCommand"; +import { + UpdateQAppSessionMetadataCommandInput, + UpdateQAppSessionMetadataCommandOutput, +} from "../commands/UpdateQAppSessionMetadataCommand"; import { AccessDeniedException, AppDefinition, @@ -97,6 +123,7 @@ import { BatchCreateCategoryInputCategory, Card, CardInput, + CardStatus, CardValue, CategoryInput, ConflictException, @@ -105,15 +132,23 @@ import { DocumentAttribute, DocumentAttributeValue, FileUploadCardInput, + FormInputCard, + FormInputCardInput, + FormInputCardMetadata, InternalServerException, LibraryItemMember, + PermissionInput, PredictAppDefinition, PredictQAppInputOptions, + QAppSessionData, QPluginCardInput, QQueryCard, QQueryCardInput, ResourceNotFoundException, ServiceQuotaExceededException, + SessionSharingConfiguration, + Submission, + SubmissionMutation, TextInputCardInput, ThrottlingException, UnauthorizedException, @@ -262,6 +297,34 @@ export const se_CreateLibraryItemCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1CreatePresignedUrlCommand + */ +export const se_CreatePresignedUrlCommand = async ( + input: CreatePresignedUrlCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = map({}, isSerializableHeaderValue, { + "content-type": "application/json", + [_ii]: input[_iI]!, + }); + b.bp("/apps.createPresignedUrl"); + let body: any; + body = JSON.stringify( + take(input, { + appId: [], + cardId: [], + fileContentsSha256: [], + fileName: [], + scope: [], + sessionId: [], + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1CreateQAppCommand */ @@ -334,6 +397,26 @@ export const se_DeleteQAppCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1DescribeQAppPermissionsCommand + */ +export const se_DescribeQAppPermissionsCommand = async ( + input: DescribeQAppPermissionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = map({}, isSerializableHeaderValue, { + [_ii]: input[_iI]!, + }); + b.bp("/apps.describeQAppPermissions"); + const query: any = map({ + [_aI]: [, __expectNonNull(input[_aI]!, `appId`)], + }); + let body: any; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; + /** * serializeAws_restJson1DisassociateLibraryItemReviewCommand */ @@ -380,6 +463,29 @@ export const se_DisassociateQAppFromUserCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1ExportQAppSessionDataCommand + */ +export const se_ExportQAppSessionDataCommand = async ( + input: ExportQAppSessionDataCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = map({}, isSerializableHeaderValue, { + "content-type": "application/json", + [_ii]: input[_iI]!, + }); + b.bp("/runtime.exportQAppSessionData"); + let body: any; + body = JSON.stringify( + take(input, { + sessionId: [], + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1GetLibraryItemCommand */ @@ -415,6 +521,7 @@ export const se_GetQAppCommand = async ( b.bp("/apps.get"); const query: any = map({ [_aI]: [, __expectNonNull(input[_aI]!, `appId`)], + [_aV]: [() => input.appVersion !== void 0, () => input[_aV]!.toString()], }); let body: any; b.m("GET").h(headers).q(query).b(body); @@ -441,6 +548,26 @@ export const se_GetQAppSessionCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1GetQAppSessionMetadataCommand + */ +export const se_GetQAppSessionMetadataCommand = async ( + input: GetQAppSessionMetadataCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = map({}, isSerializableHeaderValue, { + [_ii]: input[_iI]!, + }); + b.bp("/runtime.getQAppSessionMetadata"); + const query: any = map({ + [_sI]: [, __expectNonNull(input[_sI]!, `sessionId`)], + }); + let body: any; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; + /** * serializeAws_restJson1ImportDocumentCommand */ @@ -529,6 +656,26 @@ export const se_ListQAppsCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1ListQAppSessionDataCommand + */ +export const se_ListQAppSessionDataCommand = async ( + input: ListQAppSessionDataCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = map({}, isSerializableHeaderValue, { + [_ii]: input[_iI]!, + }); + b.bp("/runtime.listQAppSessionData"); + const query: any = map({ + [_sI]: [, __expectNonNull(input[_sI]!, `sessionId`)], + }); + let body: any; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; + /** * serializeAws_restJson1ListTagsForResourceCommand */ @@ -587,6 +734,7 @@ export const se_StartQAppSessionCommand = async ( appId: [], appVersion: [], initialValues: (_) => _json(_), + sessionId: [], tags: (_) => _json(_), }) ); @@ -734,6 +882,31 @@ export const se_UpdateQAppCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1UpdateQAppPermissionsCommand + */ +export const se_UpdateQAppPermissionsCommand = async ( + input: UpdateQAppPermissionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = map({}, isSerializableHeaderValue, { + "content-type": "application/json", + [_ii]: input[_iI]!, + }); + b.bp("/apps.updateQAppPermissions"); + let body: any; + body = JSON.stringify( + take(input, { + appId: [], + grantPermissions: (_) => _json(_), + revokePermissions: (_) => _json(_), + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1UpdateQAppSessionCommand */ @@ -758,6 +931,31 @@ export const se_UpdateQAppSessionCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1UpdateQAppSessionMetadataCommand + */ +export const se_UpdateQAppSessionMetadataCommand = async ( + input: UpdateQAppSessionMetadataCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = map({}, isSerializableHeaderValue, { + "content-type": "application/json", + [_ii]: input[_iI]!, + }); + b.bp("/runtime.updateQAppSessionMetadata"); + let body: any; + body = JSON.stringify( + take(input, { + sessionId: [], + sessionName: [], + sharingConfiguration: (_) => _json(_), + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * deserializeAws_restJson1AssociateLibraryItemReviewCommand */ @@ -871,6 +1069,30 @@ export const de_CreateLibraryItemCommand = async ( return contents; }; +/** + * deserializeAws_restJson1CreatePresignedUrlCommand + */ +export const de_CreatePresignedUrlCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + fileId: __expectString, + presignedUrl: __expectString, + presignedUrlExpiration: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + presignedUrlFields: _json, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1CreateQAppCommand */ @@ -937,6 +1159,29 @@ export const de_DeleteQAppCommand = async ( return contents; }; +/** + * deserializeAws_restJson1DescribeQAppPermissionsCommand + */ +export const de_DescribeQAppPermissionsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + appId: __expectString, + permissions: _json, + resourceArn: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1DisassociateLibraryItemReviewCommand */ @@ -971,6 +1216,29 @@ export const de_DisassociateQAppFromUserCommand = async ( return contents; }; +/** + * deserializeAws_restJson1ExportQAppSessionDataCommand + */ +export const de_ExportQAppSessionDataCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + csvFileLink: __expectString, + expiresAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + sessionArn: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1GetLibraryItemCommand */ @@ -1052,10 +1320,39 @@ export const de_GetQAppSessionCommand = async ( }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - cardStatus: _json, + appVersion: __expectInt32, + cardStatus: (_) => de_CardStatusMap(_, context), + latestPublishedAppVersion: __expectInt32, sessionArn: __expectString, sessionId: __expectString, + sessionName: __expectString, status: __expectString, + userIsHost: __expectBoolean, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetQAppSessionMetadataCommand + */ +export const de_GetQAppSessionMetadataCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + sessionArn: __expectString, + sessionId: __expectString, + sessionName: __expectString, + sessionOwner: __expectBoolean, + sharingConfiguration: _json, }); Object.assign(contents, doc); return contents; @@ -1147,6 +1444,30 @@ export const de_ListQAppsCommand = async ( return contents; }; +/** + * deserializeAws_restJson1ListQAppSessionDataCommand + */ +export const de_ListQAppSessionDataCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + nextToken: __expectString, + sessionArn: __expectString, + sessionData: (_) => de_QAppSessionDataList(_, context), + sessionId: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1ListTagsForResourceCommand */ @@ -1345,6 +1666,29 @@ export const de_UpdateQAppCommand = async ( return contents; }; +/** + * deserializeAws_restJson1UpdateQAppPermissionsCommand + */ +export const de_UpdateQAppPermissionsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + appId: __expectString, + permissions: _json, + resourceArn: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1UpdateQAppSessionCommand */ @@ -1367,6 +1711,30 @@ export const de_UpdateQAppSessionCommand = async ( return contents; }; +/** + * deserializeAws_restJson1UpdateQAppSessionMetadataCommand + */ +export const de_UpdateQAppSessionMetadataCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + sessionArn: __expectString, + sessionId: __expectString, + sessionName: __expectString, + sharingConfiguration: _json, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserialize_Aws_restJson1CommandError */ @@ -1651,6 +2019,7 @@ const se_AttributeFilters = (input: AttributeFilter[], context: __SerdeContext): const se_CardInput = (input: CardInput, context: __SerdeContext): any => { return CardInput.visit(input, { fileUpload: (value) => ({ fileUpload: _json(value) }), + formInput: (value) => ({ formInput: se_FormInputCardInput(value, context) }), qPlugin: (value) => ({ qPlugin: _json(value) }), qQuery: (value) => ({ qQuery: se_QQueryCardInput(value, context) }), textInput: (value) => ({ textInput: _json(value) }), @@ -1710,8 +2079,41 @@ const se_DocumentAttributeValue = (input: DocumentAttributeValue, context: __Ser // se_FileUploadCardInput omitted. +/** + * serializeAws_restJson1FormInputCardInput + */ +const se_FormInputCardInput = (input: FormInputCardInput, context: __SerdeContext): any => { + return take(input, { + computeMode: [], + id: [], + metadata: (_) => se_FormInputCardMetadata(_, context), + title: [], + type: [], + }); +}; + +/** + * serializeAws_restJson1FormInputCardMetadata + */ +const se_FormInputCardMetadata = (input: FormInputCardMetadata, context: __SerdeContext): any => { + return take(input, { + schema: (_) => se_FormInputCardMetadataSchema(_, context), + }); +}; + +/** + * serializeAws_restJson1FormInputCardMetadataSchema + */ +const se_FormInputCardMetadataSchema = (input: __DocumentType, context: __SerdeContext): any => { + return input; +}; + // se_MessageList omitted. +// se_PermissionInput omitted. + +// se_PermissionsInputList omitted. + // se_PredictQAppInputOptions omitted. // se_QPluginCardInput omitted. @@ -1730,6 +2132,10 @@ const se_QQueryCardInput = (input: QQueryCardInput, context: __SerdeContext): an }); }; +// se_SessionSharingConfiguration omitted. + +// se_SubmissionMutation omitted. + // se_TagMap omitted. // se_Tags omitted. @@ -1798,6 +2204,11 @@ const de_Card = (output: any, context: __SerdeContext): Card => { fileUpload: _json(output.fileUpload), }; } + if (output.formInput != null) { + return { + formInput: de_FormInputCard(output.formInput, context), + }; + } if (output.qPlugin != null) { return { qPlugin: _json(output.qPlugin), @@ -1825,6 +2236,11 @@ const de_CardInput = (output: any, context: __SerdeContext): CardInput => { fileUpload: _json(output.fileUpload), }; } + if (output.formInput != null) { + return { + formInput: de_FormInputCardInput(output.formInput, context), + }; + } if (output.qPlugin != null) { return { qPlugin: _json(output.qPlugin), @@ -1867,9 +2283,29 @@ const de_CardModelList = (output: any, context: __SerdeContext): Card[] => { return retVal; }; -// de_CardStatus omitted. +/** + * deserializeAws_restJson1CardStatus + */ +const de_CardStatus = (output: any, context: __SerdeContext): CardStatus => { + return take(output, { + currentState: __expectString, + currentValue: __expectString, + submissions: (_: any) => de_SubmissionList(_, context), + }) as any; +}; -// de_CardStatusMap omitted. +/** + * deserializeAws_restJson1CardStatusMap + */ +const de_CardStatusMap = (output: any, context: __SerdeContext): Record => { + return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + acc[key as string] = de_CardStatus(value, context); + return acc; + }, {} as Record); +}; // de_CategoriesList omitted. @@ -1918,6 +2354,49 @@ const de_DocumentAttributeValue = (output: any, context: __SerdeContext): Docume // de_FileUploadCardInput omitted. +/** + * deserializeAws_restJson1FormInputCard + */ +const de_FormInputCard = (output: any, context: __SerdeContext): FormInputCard => { + return take(output, { + computeMode: __expectString, + dependencies: _json, + id: __expectString, + metadata: (_: any) => de_FormInputCardMetadata(_, context), + title: __expectString, + type: __expectString, + }) as any; +}; + +/** + * deserializeAws_restJson1FormInputCardInput + */ +const de_FormInputCardInput = (output: any, context: __SerdeContext): FormInputCardInput => { + return take(output, { + computeMode: __expectString, + id: __expectString, + metadata: (_: any) => de_FormInputCardMetadata(_, context), + title: __expectString, + type: __expectString, + }) as any; +}; + +/** + * deserializeAws_restJson1FormInputCardMetadata + */ +const de_FormInputCardMetadata = (output: any, context: __SerdeContext): FormInputCardMetadata => { + return take(output, { + schema: (_: any) => de_FormInputCardMetadataSchema(_, context), + }) as any; +}; + +/** + * deserializeAws_restJson1FormInputCardMetadataSchema + */ +const de_FormInputCardMetadataSchema = (output: any, context: __SerdeContext): __DocumentType => { + return output; +}; + /** * deserializeAws_restJson1LibraryItemList */ @@ -1951,6 +2430,12 @@ const de_LibraryItemMember = (output: any, context: __SerdeContext): LibraryItem }) as any; }; +// de_MemoryReferenceList omitted. + +// de_PermissionOutput omitted. + +// de_PermissionsOutputList omitted. + /** * deserializeAws_restJson1PredictAppDefinition */ @@ -1962,6 +2447,35 @@ const de_PredictAppDefinition = (output: any, context: __SerdeContext): PredictA }) as any; }; +// de_PresignedUrlFields omitted. + +// de_PrincipalOutput omitted. + +/** + * deserializeAws_restJson1QAppSessionData + */ +const de_QAppSessionData = (output: any, context: __SerdeContext): QAppSessionData => { + return take(output, { + cardId: __expectString, + submissionId: __expectString, + timestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + user: _json, + value: (_: any) => de_Document(_, context), + }) as any; +}; + +/** + * deserializeAws_restJson1QAppSessionDataList + */ +const de_QAppSessionDataList = (output: any, context: __SerdeContext): QAppSessionData[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_QAppSessionData(entry, context); + }); + return retVal; +}; + // de_QPluginCard omitted. // de_QPluginCardInput omitted. @@ -1974,6 +2488,7 @@ const de_QQueryCard = (output: any, context: __SerdeContext): QQueryCard => { attributeFilter: (_: any) => de_AttributeFilter(_, context), dependencies: _json, id: __expectString, + memoryReferences: _json, outputSource: __expectString, prompt: __expectString, title: __expectString, @@ -1995,12 +2510,39 @@ const de_QQueryCardInput = (output: any, context: __SerdeContext): QQueryCardInp }) as any; }; +// de_SessionSharingConfiguration omitted. + +/** + * deserializeAws_restJson1Submission + */ +const de_Submission = (output: any, context: __SerdeContext): Submission => { + return take(output, { + submissionId: __expectString, + timestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + value: (_: any) => de_Document(_, context), + }) as any; +}; + +/** + * deserializeAws_restJson1SubmissionList + */ +const de_SubmissionList = (output: any, context: __SerdeContext): Submission[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Submission(entry, context); + }); + return retVal; +}; + // de_Tags omitted. // de_TextInputCard omitted. // de_TextInputCardInput omitted. +// de_User omitted. + /** * deserializeAws_restJson1UserAppItem */ @@ -2029,6 +2571,13 @@ const de_UserAppsList = (output: any, context: __SerdeContext): UserAppItem[] => return retVal; }; +/** + * deserializeAws_restJson1Document + */ +const de_Document = (output: any, context: __SerdeContext): __DocumentType => { + return output; +}; + const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, requestId: @@ -2042,6 +2591,7 @@ const collectBodyString = (streamBody: any, context: __SerdeContext): Promise context.utf8Encoder(body)); const _aI = "appId"; +const _aV = "appVersion"; const _cI = "categoryId"; const _iI = "instanceId"; const _ii = "instance-id"; diff --git a/codegen/sdk-codegen/aws-models/qapps.json b/codegen/sdk-codegen/aws-models/qapps.json index 783e4a4ac81ef..661f4f0e094bd 100644 --- a/codegen/sdk-codegen/aws-models/qapps.json +++ b/codegen/sdk-codegen/aws-models/qapps.json @@ -17,6 +17,23 @@ "smithy.api#httpError": 403 } }, + "com.amazonaws.qapps#Action": { + "type": "enum", + "members": { + "READ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "read" + } + }, + "WRITE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "write" + } + } + } + }, "com.amazonaws.qapps#AmazonResourceName": { "type": "string", "traits": { @@ -669,6 +686,12 @@ "traits": { "smithy.api#documentation": "

A container for the properties of the file upload card.

" } + }, + "formInput": { + "target": "com.amazonaws.qapps#FormInputCard", + "traits": { + "smithy.api#documentation": "

A container for the properties of the form input card.

" + } } }, "traits": { @@ -701,6 +724,12 @@ "traits": { "smithy.api#documentation": "

A container for the properties of the file upload input card.

" } + }, + "formInput": { + "target": "com.amazonaws.qapps#FormInputCardInput", + "traits": { + "smithy.api#documentation": "

A container for the properties of the form input card.

" + } } }, "traits": { @@ -762,6 +791,12 @@ "smithy.api#documentation": "

The current value or result associated with the card.

", "smithy.api#required": {} } + }, + "submissions": { + "target": "com.amazonaws.qapps#SubmissionList", + "traits": { + "smithy.api#documentation": "

A list of previous submissions, if the card is a form card.

" + } } }, "traits": { @@ -803,6 +838,12 @@ "traits": { "smithy.api#enumValue": "q-plugin" } + }, + "FORM_INPUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "form-input" + } } } }, @@ -821,10 +862,16 @@ "traits": { "smithy.api#documentation": "

The value or result associated with the card.

", "smithy.api#length": { - "max": 5000 + "max": 40000 }, "smithy.api#required": {} } + }, + "submissionMutation": { + "target": "com.amazonaws.qapps#SubmissionMutation", + "traits": { + "smithy.api#documentation": "

The structure that describes how the current form card value is mutated.\n Only applies for form cards when multiple responses are allowed.

" + } } }, "traits": { @@ -1201,6 +1248,180 @@ "smithy.api#output": {} } }, + "com.amazonaws.qapps#CreatePresignedUrl": { + "type": "operation", + "input": { + "target": "com.amazonaws.qapps#CreatePresignedUrlInput" + }, + "output": { + "target": "com.amazonaws.qapps#CreatePresignedUrlOutput" + }, + "errors": [ + { + "target": "com.amazonaws.qapps#AccessDeniedException" + }, + { + "target": "com.amazonaws.qapps#InternalServerException" + }, + { + "target": "com.amazonaws.qapps#ThrottlingException" + }, + { + "target": "com.amazonaws.qapps#UnauthorizedException" + }, + { + "target": "com.amazonaws.qapps#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a presigned URL for an S3 POST operation to upload a file.\n You can use this URL to set a default file for a FileUploadCard\n in a Q App definition or to provide a file for a single Q App run.\n The scope parameter determines how the file will be used,\n either at the app definition level or the app session level.

", + "smithy.api#examples": [ + { + "title": "Upload a file to a specific session", + "input": { + "instanceId": "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", + "fileContentsSha256": "myMXwslBoXkTDQ0olhq1QsiHRWWL4yj1V0IuoK+PYOg=", + "fileName": "myFile.txt", + "cardId": "82f69028-22a9-4bea-8727-0eabf58e9fed", + "appId": "4263767c-d889-4cb2-a8f6-8b649bc66af0", + "scope": "SESSION", + "sessionId": "4f0e5b87-9d38-41cd-9eb4-ebce2f2917cc" + }, + "output": { + "fileId": "412aa1b4-341c-45af-936d-da52f8a1a3b4", + "presignedUrl": "https://presign-test-omg-6f98533b-3f9f-4e8a-8183-63793b9ffef0.s3.us-west-2.amazonaws.com/", + "presignedUrlFields": { + "x-amz-server-side-encryption": "aws:kms", + "x-amz-server-side-encryption-aws-kms-key-id": "0a6a474b-f2ca-46ea-9e72-deea9077d92f", + "x-amz-server-side-encryption-context": "eyJzb21ldGhpbmciOiJ0aGVyZSJ9", + "x-amz-checksum-sha256": "fmHCdgdPjOGub9TVZ4NIOpAYP4UlIOaPRUwHw8nihR4=" + }, + "presignedUrlExpiration": "2024-09-14T00:11:54.232Z" + } + }, + { + "title": "Upload a file into a application", + "input": { + "instanceId": "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", + "fileContentsSha256": "myMXwslBoXkTDQ0olhq1QsiHRWWL4yj1V0IuoK+PYOg=", + "fileName": "anApplicationFile.txt", + "appId": "4263767c-d889-4cb2-a8f6-8b649bc66af0", + "cardId": "7a11f34b-42d4-4bc8-b668-ae4a788dae1e", + "scope": "APPLICATION" + }, + "output": { + "fileId": "412aa1b4-341c-45af-936d-da52f8a1a3b4", + "presignedUrl": "https://presign-test-omg-6f98533b-3f9f-4e8a-8183-63793b9ffef0.s3.us-west-2.amazonaws.com/", + "presignedUrlFields": { + "x-amz-server-side-encryption": "aws:kms", + "x-amz-server-side-encryption-aws-kms-key-id": "0a6a474b-f2ca-46ea-9e72-deea9077d92f", + "x-amz-server-side-encryption-context": "eyJzb21ldGhpbmciOiJ0aGVyZSJ9", + "x-amz-checksum-sha256": "fmHCdgdPjOGub9TVZ4NIOpAYP4UlIOaPRUwHw8nihR4=" + }, + "presignedUrlExpiration": "2024-09-14T00:11:54.232Z" + } + } + ], + "smithy.api#http": { + "method": "POST", + "uri": "/apps.createPresignedUrl" + } + } + }, + "com.amazonaws.qapps#CreatePresignedUrlInput": { + "type": "structure", + "members": { + "instanceId": { + "target": "com.amazonaws.qapps#InstanceId", + "traits": { + "smithy.api#documentation": "

The unique identifier of the Amazon Q Business application environment instance.

", + "smithy.api#httpHeader": "instance-id", + "smithy.api#required": {} + } + }, + "cardId": { + "target": "com.amazonaws.qapps#UUID", + "traits": { + "smithy.api#documentation": "

The unique identifier of the card the file is associated with.

", + "smithy.api#required": {} + } + }, + "appId": { + "target": "com.amazonaws.qapps#UUID", + "traits": { + "smithy.api#documentation": "

The unique identifier of the Q App the file is associated with.

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

The Base64-encoded SHA-256 digest of the contents of the file to be uploaded.

", + "smithy.api#pattern": "^[A-Za-z0-9+/]{43}=$|^[A-Za-z0-9+/]{42}==$|^[A-Za-z0-9+/]{44}$", + "smithy.api#required": {} + } + }, + "fileName": { + "target": "com.amazonaws.qapps#Filename", + "traits": { + "smithy.api#documentation": "

The name of the file to be uploaded.

", + "smithy.api#required": {} + } + }, + "scope": { + "target": "com.amazonaws.qapps#DocumentScope", + "traits": { + "smithy.api#documentation": "

Whether the file is associated with a Q App definition or a specific Q App session.

", + "smithy.api#required": {} + } + }, + "sessionId": { + "target": "com.amazonaws.qapps#UUID", + "traits": { + "smithy.api#documentation": "

The unique identifier of the Q App session the file is associated with, if applicable.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qapps#CreatePresignedUrlOutput": { + "type": "structure", + "members": { + "fileId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique identifier assigned to the file to be uploaded.

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

The URL for a presigned S3 POST operation used to upload a file.

", + "smithy.api#required": {} + } + }, + "presignedUrlFields": { + "target": "com.amazonaws.qapps#PresignedUrlFields", + "traits": { + "smithy.api#documentation": "

The form fields to include in the presigned S3 POST operation used to upload a file.

", + "smithy.api#required": {} + } + }, + "presignedUrlExpiration": { + "target": "com.amazonaws.qapps#QAppsTimestamp", + "traits": { + "smithy.api#documentation": "

The date and time that the presigned URL will expire in ISO 8601 format.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.qapps#CreateQApp": { "type": "operation", "input": { @@ -1582,6 +1803,122 @@ "target": "smithy.api#String" } }, + "com.amazonaws.qapps#DescribeQAppPermissions": { + "type": "operation", + "input": { + "target": "com.amazonaws.qapps#DescribeQAppPermissionsInput" + }, + "output": { + "target": "com.amazonaws.qapps#DescribeQAppPermissionsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.qapps#AccessDeniedException" + }, + { + "target": "com.amazonaws.qapps#InternalServerException" + }, + { + "target": "com.amazonaws.qapps#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qapps#ThrottlingException" + }, + { + "target": "com.amazonaws.qapps#UnauthorizedException" + }, + { + "target": "com.amazonaws.qapps#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Describes read permissions for a Amazon Q App in Amazon Q Business application environment instance.

", + "smithy.api#examples": [ + { + "title": "Describe permissions for the app", + "input": { + "instanceId": "01793661-ad73-4c7d-8eaa-1c95a10151c2", + "appId": "fe0acf86-49e5-4def-a0c2-40ce0cafee14" + }, + "output": { + "resourceArn": "arn:aws:qapps:us-west-2:111111111111:application/01793661-ad73-4c7d-8eaa-1c95a10151c2/qapp/fe0acf86-49e5-4def-a0c2-40ce0cafee14", + "appId": "fe0acf86-49e5-4def-a0c2-40ce0cafee14", + "permissions": [ + { + "action": "write", + "principal": { + "userId": "f8f15330-b091-708b-d46e-adb0d914b699", + "email": "user1@example.com" + } + }, + { + "action": "read", + "principal": { + "userId": "c81133d0-10d1-70eb-aaa3-d427ea6fc0f3", + "email": "user2@example.com" + } + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/apps.describeQAppPermissions" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qapps#DescribeQAppPermissionsInput": { + "type": "structure", + "members": { + "instanceId": { + "target": "com.amazonaws.qapps#InstanceId", + "traits": { + "smithy.api#documentation": "

The unique identifier of the Amazon Q Business application environment instance.

", + "smithy.api#httpHeader": "instance-id", + "smithy.api#required": {} + } + }, + "appId": { + "target": "com.amazonaws.qapps#UUID", + "traits": { + "smithy.api#documentation": "

The unique identifier of the Amazon Q App for which to retrieve permissions.

", + "smithy.api#httpQuery": "appId", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qapps#DescribeQAppPermissionsOutput": { + "type": "structure", + "members": { + "resourceArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon Q App for which permissions are returned.

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

The unique identifier of the Amazon Q App for which permissions are returned.

" + } + }, + "permissions": { + "target": "com.amazonaws.qapps#PermissionsOutputList", + "traits": { + "smithy.api#documentation": "

The list of permissions granted for the Amazon Q App.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.qapps#Description": { "type": "string", "traits": { @@ -1850,10 +2187,110 @@ "traits": { "smithy.api#enumValue": "COMPLETED" } + }, + "ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ERROR" + } } } }, - "com.amazonaws.qapps#FileUploadCard": { + "com.amazonaws.qapps#ExportQAppSessionData": { + "type": "operation", + "input": { + "target": "com.amazonaws.qapps#ExportQAppSessionDataInput" + }, + "output": { + "target": "com.amazonaws.qapps#ExportQAppSessionDataOutput" + }, + "errors": [ + { + "target": "com.amazonaws.qapps#AccessDeniedException" + }, + { + "target": "com.amazonaws.qapps#ConflictException" + }, + { + "target": "com.amazonaws.qapps#InternalServerException" + }, + { + "target": "com.amazonaws.qapps#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qapps#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qapps#ThrottlingException" + }, + { + "target": "com.amazonaws.qapps#UnauthorizedException" + }, + { + "target": "com.amazonaws.qapps#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Exports the collected data of a Q App data collection session.

", + "smithy.api#http": { + "method": "POST", + "uri": "/runtime.exportQAppSessionData" + } + } + }, + "com.amazonaws.qapps#ExportQAppSessionDataInput": { + "type": "structure", + "members": { + "instanceId": { + "target": "com.amazonaws.qapps#InstanceId", + "traits": { + "smithy.api#documentation": "

The unique identifier of the Amazon Q Business application environment instance.

", + "smithy.api#httpHeader": "instance-id", + "smithy.api#required": {} + } + }, + "sessionId": { + "target": "com.amazonaws.qapps#UUID", + "traits": { + "smithy.api#documentation": "

The unique identifier of the Q App data collection session.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qapps#ExportQAppSessionDataOutput": { + "type": "structure", + "members": { + "csvFileLink": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The link where the exported Q App session data can be downloaded from.

", + "smithy.api#required": {} + } + }, + "expiresAt": { + "target": "com.amazonaws.qapps#QAppsTimestamp", + "traits": { + "smithy.api#documentation": "

The date and time when the link for the exported Q App session data expires.

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

The Amazon Resource Name (ARN) of the Q App data collection session.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qapps#FileUploadCard": { "type": "structure", "members": { "id": { @@ -1963,6 +2400,116 @@ } } }, + "com.amazonaws.qapps#FormInputCard": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.qapps#UUID", + "traits": { + "smithy.api#documentation": "

The unique identifier of the form input card.

", + "smithy.api#required": {} + } + }, + "title": { + "target": "com.amazonaws.qapps#Title", + "traits": { + "smithy.api#documentation": "

The title of the form input card.

", + "smithy.api#required": {} + } + }, + "dependencies": { + "target": "com.amazonaws.qapps#DependencyList", + "traits": { + "smithy.api#documentation": "

Any dependencies or requirements for the form input card.

", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.qapps#CardType", + "traits": { + "smithy.api#documentation": "

The type of the card.

", + "smithy.api#required": {} + } + }, + "metadata": { + "target": "com.amazonaws.qapps#FormInputCardMetadata", + "traits": { + "smithy.api#documentation": "

The metadata that defines the form input card data.

", + "smithy.api#required": {} + } + }, + "computeMode": { + "target": "com.amazonaws.qapps#InputCardComputeMode", + "traits": { + "smithy.api#documentation": "

The compute mode of the form input card.\n This property determines whether individual participants of a\n data collection session can submit multiple response or one response.\n A compute mode of append shall allow participants\n to submit the same form multiple times with different values.\n A compute mode of replacecode> shall overwrite\n the current value for each participant.

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

A card in an Amazon Q App that allows the user to submit a response.

" + } + }, + "com.amazonaws.qapps#FormInputCardInput": { + "type": "structure", + "members": { + "title": { + "target": "com.amazonaws.qapps#Title", + "traits": { + "smithy.api#documentation": "

The title or label of the form input card.

", + "smithy.api#required": {} + } + }, + "id": { + "target": "com.amazonaws.qapps#UUID", + "traits": { + "smithy.api#documentation": "

The unique identifier of the form input card.

", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.qapps#CardType", + "traits": { + "smithy.api#default": "form-input", + "smithy.api#documentation": "

The type of the card.

", + "smithy.api#required": {} + } + }, + "metadata": { + "target": "com.amazonaws.qapps#FormInputCardMetadata", + "traits": { + "smithy.api#documentation": "

The metadata that defines the form input card data.

", + "smithy.api#required": {} + } + }, + "computeMode": { + "target": "com.amazonaws.qapps#InputCardComputeMode", + "traits": { + "smithy.api#documentation": "

The compute mode of the form input card.\n This property determines whether individual participants of a\n data collection session can submit multiple response or one response.\n A compute mode of append shall allow participants\n to submit the same form multiple times with different values.\n A compute mode of replacecode> shall overwrite\n the current value for each participant.

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

Represents a form input card for an Amazon Q App.

" + } + }, + "com.amazonaws.qapps#FormInputCardMetadata": { + "type": "structure", + "members": { + "schema": { + "target": "com.amazonaws.qapps#FormInputCardMetadataSchema", + "traits": { + "smithy.api#documentation": "

The JSON schema that defines the shape of the response data.

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

The metadata of the form input card.

" + } + }, + "com.amazonaws.qapps#FormInputCardMetadataSchema": { + "type": "document" + }, "com.amazonaws.qapps#GetLibraryItem": { "type": "operation", "input": { @@ -2260,6 +2807,13 @@ "smithy.api#httpQuery": "appId", "smithy.api#required": {} } + }, + "appVersion": { + "target": "com.amazonaws.qapps#AppVersion", + "traits": { + "smithy.api#documentation": "

The version of the Q App.

", + "smithy.api#httpQuery": "appVersion" + } } }, "traits": { @@ -2409,7 +2963,17 @@ "cardStatus": { "6fb5b404-3b7b-48a4-8a8b-56406922a606": { "currentState": "COMPLETED", - "currentValue": "" + "currentValue": "", + "submissions": [ + { + "value": { + "d52030f9-6c4b-47a9-a946-377f632c77cc": "red", + "18cee4cb-253e-4f87-9154-849fbb98e482": "user1" + }, + "submissionId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", + "timestamp": "2023-06-15T14:30:45Z" + } + ] }, "1e6caeac-b481-45ff-a082-8b9a4a0b72e8": { "currentState": "COMPLETED", @@ -2450,6 +3014,131 @@ "smithy.api#input": {} } }, + "com.amazonaws.qapps#GetQAppSessionMetadata": { + "type": "operation", + "input": { + "target": "com.amazonaws.qapps#GetQAppSessionMetadataInput" + }, + "output": { + "target": "com.amazonaws.qapps#GetQAppSessionMetadataOutput" + }, + "errors": [ + { + "target": "com.amazonaws.qapps#AccessDeniedException" + }, + { + "target": "com.amazonaws.qapps#InternalServerException" + }, + { + "target": "com.amazonaws.qapps#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qapps#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qapps#ThrottlingException" + }, + { + "target": "com.amazonaws.qapps#UnauthorizedException" + }, + { + "target": "com.amazonaws.qapps#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves the current configuration of a Q App session.

", + "smithy.api#examples": [ + { + "title": "Retrieves an existing session metadata for an Amazon Q App", + "input": { + "instanceId": "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", + "sessionId": "56ae47c3-10bc-4c2c-8b27-9b9fe23b3edb" + }, + "output": { + "sessionId": "56ae47c3-10bc-4c2c-8b27-9b9fe23b3edb", + "sessionArn": "arn:aws:qapps:us-west-2:0123456789012:application/cbea8329-41c0-4566-a112-19250921a220/qapp/387ccac9-4717-489f-841f-729b7d7de355/session/56ae47c3-10bc-4c2c-8b27-9b9fe23b3edb", + "sessionName": "Trip itinerary collection session", + "sharingConfiguration": { + "enabled": true, + "acceptResponses": true, + "revealCards": false + }, + "sessionOwner": true + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/runtime.getQAppSessionMetadata" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qapps#GetQAppSessionMetadataInput": { + "type": "structure", + "members": { + "instanceId": { + "target": "com.amazonaws.qapps#InstanceId", + "traits": { + "smithy.api#documentation": "

The unique identifier of the Amazon Q Business application environment instance.

", + "smithy.api#httpHeader": "instance-id", + "smithy.api#required": {} + } + }, + "sessionId": { + "target": "com.amazonaws.qapps#UUID", + "traits": { + "smithy.api#documentation": "

The unique identifier of the Q App session.

", + "smithy.api#httpQuery": "sessionId", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qapps#GetQAppSessionMetadataOutput": { + "type": "structure", + "members": { + "sessionId": { + "target": "com.amazonaws.qapps#UUID", + "traits": { + "smithy.api#documentation": "

The unique identifier of the Q App session.

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

The Amazon Resource Name (ARN) of the Q App session.

", + "smithy.api#required": {} + } + }, + "sessionName": { + "target": "com.amazonaws.qapps#SessionName", + "traits": { + "smithy.api#documentation": "

The name of the Q App session.

" + } + }, + "sharingConfiguration": { + "target": "com.amazonaws.qapps#SessionSharingConfiguration", + "traits": { + "smithy.api#documentation": "

The sharing configuration of the Q App data collection session.

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

Indicates whether the current user is the owner of the Q App session.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.qapps#GetQAppSessionOutput": { "type": "structure", "members": { @@ -2467,6 +3156,24 @@ "smithy.api#required": {} } }, + "sessionName": { + "target": "com.amazonaws.qapps#SessionName", + "traits": { + "smithy.api#documentation": "

The name of the Q App session.

" + } + }, + "appVersion": { + "target": "com.amazonaws.qapps#AppVersion", + "traits": { + "smithy.api#documentation": "

The version of the Q App used for the session.

" + } + }, + "latestPublishedAppVersion": { + "target": "com.amazonaws.qapps#AppVersion", + "traits": { + "smithy.api#documentation": "

The latest published version of the Q App used for the session.

" + } + }, "status": { "target": "com.amazonaws.qapps#ExecutionStatus", "traits": { @@ -2480,6 +3187,12 @@ "smithy.api#documentation": "

The current status for each card in the Q App session.

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

Indicates whether the current user is the owner of the Q App data collection session.

" + } } }, "traits": { @@ -2573,7 +3286,7 @@ "cardId": { "target": "com.amazonaws.qapps#UUID", "traits": { - "smithy.api#documentation": "

The unique identifier of the card the file is associated with, if applicable.

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

The unique identifier of the card the file is associated with.

", "smithy.api#required": {} } }, @@ -2601,7 +3314,7 @@ "scope": { "target": "com.amazonaws.qapps#DocumentScope", "traits": { - "smithy.api#documentation": "

Whether the file is associated with an Q App definition or a specific Q App session.

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

Whether the file is associated with a Q App definition or a specific Q App session.

", "smithy.api#required": {} } }, @@ -2638,6 +3351,23 @@ } } }, + "com.amazonaws.qapps#InputCardComputeMode": { + "type": "enum", + "members": { + "APPEND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "append" + } + }, + "REPLACE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "replace" + } + } + } + }, "com.amazonaws.qapps#InstanceId": { "type": "string" }, @@ -3019,11 +3749,95 @@ "smithy.api#httpQuery": "nextToken" } }, - "categoryId": { + "categoryId": { + "target": "com.amazonaws.qapps#UUID", + "traits": { + "smithy.api#documentation": "

Optional category to filter the library items by.

", + "smithy.api#httpQuery": "categoryId" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qapps#ListLibraryItemsOutput": { + "type": "structure", + "members": { + "libraryItems": { + "target": "com.amazonaws.qapps#LibraryItemList", + "traits": { + "smithy.api#documentation": "

The list of library items meeting the request criteria.

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

The token to use to request the next page of results.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qapps#ListQAppSessionData": { + "type": "operation", + "input": { + "target": "com.amazonaws.qapps#ListQAppSessionDataInput" + }, + "output": { + "target": "com.amazonaws.qapps#ListQAppSessionDataOutput" + }, + "errors": [ + { + "target": "com.amazonaws.qapps#AccessDeniedException" + }, + { + "target": "com.amazonaws.qapps#InternalServerException" + }, + { + "target": "com.amazonaws.qapps#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qapps#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qapps#ThrottlingException" + }, + { + "target": "com.amazonaws.qapps#UnauthorizedException" + }, + { + "target": "com.amazonaws.qapps#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the collected data of a Q App data collection session.

", + "smithy.api#http": { + "method": "GET", + "uri": "/runtime.listQAppSessionData" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qapps#ListQAppSessionDataInput": { + "type": "structure", + "members": { + "instanceId": { + "target": "com.amazonaws.qapps#InstanceId", + "traits": { + "smithy.api#documentation": "

The unique identifier of the Amazon Q Business application environment instance.

", + "smithy.api#httpHeader": "instance-id", + "smithy.api#required": {} + } + }, + "sessionId": { "target": "com.amazonaws.qapps#UUID", "traits": { - "smithy.api#documentation": "

Optional category to filter the library items by.

", - "smithy.api#httpQuery": "categoryId" + "smithy.api#documentation": "

The unique identifier of the Q App data collection session.

", + "smithy.api#httpQuery": "sessionId", + "smithy.api#required": {} } } }, @@ -3031,19 +3845,33 @@ "smithy.api#input": {} } }, - "com.amazonaws.qapps#ListLibraryItemsOutput": { + "com.amazonaws.qapps#ListQAppSessionDataOutput": { "type": "structure", "members": { - "libraryItems": { - "target": "com.amazonaws.qapps#LibraryItemList", + "sessionId": { + "target": "com.amazonaws.qapps#UUID", "traits": { - "smithy.api#documentation": "

The list of library items meeting the request criteria.

" + "smithy.api#documentation": "

The unique identifier of the Q App data collection session.

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

The Amazon Resource Name (ARN) of the Q App data collection session.

", + "smithy.api#required": {} + } + }, + "sessionData": { + "target": "com.amazonaws.qapps#QAppSessionDataList", + "traits": { + "smithy.api#documentation": "

The collected responses of a Q App session.

" } }, "nextToken": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

The token to use to request the next page of results.

" + "smithy.api#documentation": "

The pagination token that indicates the next set of results to retrieve.

" } } }, @@ -3304,6 +4132,12 @@ "com.amazonaws.qapps#Long": { "type": "long" }, + "com.amazonaws.qapps#MemoryReferenceList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, "com.amazonaws.qapps#MessageList": { "type": "list", "member": { @@ -3327,6 +4161,84 @@ } } }, + "com.amazonaws.qapps#PermissionInput": { + "type": "structure", + "members": { + "action": { + "target": "com.amazonaws.qapps#Action", + "traits": { + "smithy.api#documentation": "

The action associated with the permission.

", + "smithy.api#length": { + "min": 1, + "max": 20 + }, + "smithy.api#required": {} + } + }, + "principal": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The principal user to which the permission applies.

", + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The permission to grant or revoke for a Amazon Q App.

" + } + }, + "com.amazonaws.qapps#PermissionOutput": { + "type": "structure", + "members": { + "action": { + "target": "com.amazonaws.qapps#Action", + "traits": { + "smithy.api#documentation": "

The action associated with the permission.

", + "smithy.api#length": { + "min": 1, + "max": 20 + }, + "smithy.api#required": {} + } + }, + "principal": { + "target": "com.amazonaws.qapps#PrincipalOutput", + "traits": { + "smithy.api#documentation": "

The principal user to which the permission applies.

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

The permission granted to the Amazon Q App.

" + } + }, + "com.amazonaws.qapps#PermissionsInputList": { + "type": "list", + "member": { + "target": "com.amazonaws.qapps#PermissionInput" + }, + "traits": { + "smithy.api#documentation": "

A list of permissions to grant or revoke for a Amazon Q App.

", + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.qapps#PermissionsOutputList": { + "type": "list", + "member": { + "target": "com.amazonaws.qapps#PermissionOutput" + }, + "traits": { + "smithy.api#documentation": "

A list of permissions granted for a Amazon Q App.

" + } + }, "com.amazonaws.qapps#Placeholder": { "type": "string", "traits": { @@ -3521,12 +4433,105 @@ "smithy.api#output": {} } }, + "com.amazonaws.qapps#PresignedUrlFields": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "com.amazonaws.qapps#PrincipalOutput": { + "type": "structure", + "members": { + "userId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique identifier of the user.

", + "smithy.api#length": { + "min": 1, + "max": 256 + } + } + }, + "userType": { + "target": "com.amazonaws.qapps#UserType", + "traits": { + "smithy.api#documentation": "

The type of the user.

", + "smithy.api#length": { + "min": 1, + "max": 256 + } + } + }, + "email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The email address associated with the user.

", + "smithy.api#length": { + "min": 1, + "max": 256 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

The principal for which the permission applies.

" + } + }, "com.amazonaws.qapps#Prompt": { "type": "string", "traits": { "smithy.api#length": { - "max": 7000 + "max": 50000 + } + } + }, + "com.amazonaws.qapps#QAppSessionData": { + "type": "structure", + "members": { + "cardId": { + "target": "com.amazonaws.qapps#UUID", + "traits": { + "smithy.api#documentation": "

The card Id associated with the response submitted for a Q App session.

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

The response submitted for a Q App session.

" + } + }, + "user": { + "target": "com.amazonaws.qapps#User", + "traits": { + "smithy.api#documentation": "

The user who submitted the response for a Q App session.

", + "smithy.api#required": {} + } + }, + "submissionId": { + "target": "com.amazonaws.qapps#UUID", + "traits": { + "smithy.api#documentation": "

The unique identifier of the submission.

" + } + }, + "timestamp": { + "target": "com.amazonaws.qapps#QAppsTimestamp", + "traits": { + "smithy.api#documentation": "

The date and time when the session data is submitted.

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

The response collected for a Amazon Q App session.\n This container represents a single response to a Q App session.

" + } + }, + "com.amazonaws.qapps#QAppSessionDataList": { + "type": "list", + "member": { + "target": "com.amazonaws.qapps#QAppSessionData" } }, "com.amazonaws.qapps#QAppsService": { @@ -3551,6 +4556,9 @@ { "target": "com.amazonaws.qapps#CreateLibraryItem" }, + { + "target": "com.amazonaws.qapps#CreatePresignedUrl" + }, { "target": "com.amazonaws.qapps#CreateQApp" }, @@ -3560,12 +4568,18 @@ { "target": "com.amazonaws.qapps#DeleteQApp" }, + { + "target": "com.amazonaws.qapps#DescribeQAppPermissions" + }, { "target": "com.amazonaws.qapps#DisassociateLibraryItemReview" }, { "target": "com.amazonaws.qapps#DisassociateQAppFromUser" }, + { + "target": "com.amazonaws.qapps#ExportQAppSessionData" + }, { "target": "com.amazonaws.qapps#GetLibraryItem" }, @@ -3575,6 +4589,9 @@ { "target": "com.amazonaws.qapps#GetQAppSession" }, + { + "target": "com.amazonaws.qapps#GetQAppSessionMetadata" + }, { "target": "com.amazonaws.qapps#ImportDocument" }, @@ -3587,6 +4604,9 @@ { "target": "com.amazonaws.qapps#ListQApps" }, + { + "target": "com.amazonaws.qapps#ListQAppSessionData" + }, { "target": "com.amazonaws.qapps#ListTagsForResource" }, @@ -3614,8 +4634,14 @@ { "target": "com.amazonaws.qapps#UpdateQApp" }, + { + "target": "com.amazonaws.qapps#UpdateQAppPermissions" + }, { "target": "com.amazonaws.qapps#UpdateQAppSession" + }, + { + "target": "com.amazonaws.qapps#UpdateQAppSessionMetadata" } ], "traits": { @@ -4453,6 +5479,12 @@ "traits": { "smithy.api#documentation": "

The Amazon Q Business filters applied in this query card when resolving data sources

" } + }, + "memoryReferences": { + "target": "com.amazonaws.qapps#MemoryReferenceList", + "traits": { + "smithy.api#documentation": "

Any dependencies for the query card, where the dependencies are references to the collected responses.

" + } } }, "traits": { @@ -4600,6 +5632,50 @@ "smithy.api#httpError": 402 } }, + "com.amazonaws.qapps#SessionName": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 100 + } + } + }, + "com.amazonaws.qapps#SessionSharingAcceptResponses": { + "type": "boolean" + }, + "com.amazonaws.qapps#SessionSharingConfiguration": { + "type": "structure", + "members": { + "enabled": { + "target": "com.amazonaws.qapps#SessionSharingEnabled", + "traits": { + "smithy.api#documentation": "

Indicates whether an Q App session is shareable with other users.

", + "smithy.api#required": {} + } + }, + "acceptResponses": { + "target": "com.amazonaws.qapps#SessionSharingAcceptResponses", + "traits": { + "smithy.api#documentation": "

Indicates whether an Q App session can accept responses from users.

" + } + }, + "revealCards": { + "target": "com.amazonaws.qapps#SessionSharingRevealCards", + "traits": { + "smithy.api#documentation": "

Indicates whether collected responses for an Q App session are revealed for all users.

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

The sharing configuration of an Amazon Q App data collection session.

" + } + }, + "com.amazonaws.qapps#SessionSharingEnabled": { + "type": "boolean" + }, + "com.amazonaws.qapps#SessionSharingRevealCards": { + "type": "boolean" + }, "com.amazonaws.qapps#StartQAppSession": { "type": "operation", "input": { @@ -4690,6 +5766,12 @@ "smithy.api#documentation": "

Optional initial input values to provide for the Q App session.

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

The unique identifier of the a Q App session.

" + } + }, "tags": { "target": "com.amazonaws.qapps#TagMap", "traits": { @@ -4707,7 +5789,7 @@ "sessionId": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

The unique identifier of the new Q App session.

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

The unique identifier of the new or retrieved Q App session.

", "smithy.api#required": {} } }, @@ -4765,24 +5847,101 @@ "com.amazonaws.qapps#StopQAppSessionInput": { "type": "structure", "members": { - "instanceId": { - "target": "com.amazonaws.qapps#InstanceId", + "instanceId": { + "target": "com.amazonaws.qapps#InstanceId", + "traits": { + "smithy.api#documentation": "

The unique identifier of the Amazon Q Business application environment instance.

", + "smithy.api#httpHeader": "instance-id", + "smithy.api#required": {} + } + }, + "sessionId": { + "target": "com.amazonaws.qapps#UUID", + "traits": { + "smithy.api#documentation": "

The unique identifier of the Q App session to stop.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qapps#Submission": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "

The data submitted by the user.

" + } + }, + "submissionId": { + "target": "com.amazonaws.qapps#UUID", + "traits": { + "smithy.api#documentation": "

The unique identifier of the submission.

" + } + }, + "timestamp": { + "target": "com.amazonaws.qapps#QAppsTimestamp", + "traits": { + "smithy.api#documentation": "

The date and time when the card is submitted.

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

A record created when a user submits a form card.

" + } + }, + "com.amazonaws.qapps#SubmissionList": { + "type": "list", + "member": { + "target": "com.amazonaws.qapps#Submission" + } + }, + "com.amazonaws.qapps#SubmissionMutation": { + "type": "structure", + "members": { + "submissionId": { + "target": "com.amazonaws.qapps#UUID", + "traits": { + "smithy.api#documentation": "

The unique identifier of the submission.

", + "smithy.api#required": {} + } + }, + "mutationType": { + "target": "com.amazonaws.qapps#SubmissionMutationKind", + "traits": { + "smithy.api#documentation": "

The operation that is performed on a submission.

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

Represents an action performed on a submission.

" + } + }, + "com.amazonaws.qapps#SubmissionMutationKind": { + "type": "enum", + "members": { + "edit": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The unique identifier of the Amazon Q Business application environment instance.

", - "smithy.api#httpHeader": "instance-id", - "smithy.api#required": {} + "smithy.api#enumValue": "edit" } }, - "sessionId": { - "target": "com.amazonaws.qapps#UUID", + "delete": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The unique identifier of the Q App session to stop.

", - "smithy.api#required": {} + "smithy.api#enumValue": "delete" + } + }, + "add": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "add" } } - }, - "traits": { - "smithy.api#input": {} } }, "com.amazonaws.qapps#TagKey": { @@ -5656,6 +6815,172 @@ "smithy.api#output": {} } }, + "com.amazonaws.qapps#UpdateQAppPermissions": { + "type": "operation", + "input": { + "target": "com.amazonaws.qapps#UpdateQAppPermissionsInput" + }, + "output": { + "target": "com.amazonaws.qapps#UpdateQAppPermissionsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.qapps#AccessDeniedException" + }, + { + "target": "com.amazonaws.qapps#InternalServerException" + }, + { + "target": "com.amazonaws.qapps#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qapps#ThrottlingException" + }, + { + "target": "com.amazonaws.qapps#UnauthorizedException" + }, + { + "target": "com.amazonaws.qapps#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates read permissions for a Amazon Q App in Amazon Q Business application environment instance.

", + "smithy.api#examples": [ + { + "title": "Grant permissions for the app", + "input": { + "instanceId": "01793661-ad73-4c7d-8eaa-1c95a10151c2", + "appId": "fe0acf86-49e5-4def-a0c2-40ce0cafee14", + "grantPermissions": [ + { + "action": "read", + "principal": "user2@example.com" + } + ] + }, + "output": { + "resourceArn": "arn:aws:qapps:us-west-2:111111111111:application/01793661-ad73-4c7d-8eaa-1c95a10151c2/qapp/fe0acf86-49e5-4def-a0c2-40ce0cafee14", + "appId": "fe0acf86-49e5-4def-a0c2-40ce0cafee14", + "permissions": [ + { + "action": "write", + "principal": { + "userId": "f8f15330-b091-708b-d46e-adb0d914b699", + "email": "user1@example.com" + } + }, + { + "action": "read", + "principal": { + "userId": "c81133d0-10d1-70eb-aaa3-d427ea6fc0f3", + "email": "user2@example.com" + } + } + ] + } + }, + { + "title": "Revoke permissions for the app", + "input": { + "instanceId": "01793661-ad73-4c7d-8eaa-1c95a10151c2", + "appId": "fe0acf86-49e5-4def-a0c2-40ce0cafee14", + "revokePermissions": [ + { + "action": "read", + "principal": "user2@example.com" + } + ] + }, + "output": { + "resourceArn": "arn:aws:qapps:us-west-2:111111111111:application/01793661-ad73-4c7d-8eaa-1c95a10151c2/qapp/fe0acf86-49e5-4def-a0c2-40ce0cafee14", + "appId": "fe0acf86-49e5-4def-a0c2-40ce0cafee14", + "permissions": [ + { + "action": "write", + "principal": { + "userId": "f8f15330-b091-708b-d46e-adb0d914b699", + "email": "user1@example.com" + } + } + ] + } + } + ], + "smithy.api#http": { + "method": "POST", + "uri": "/apps.updateQAppPermissions" + } + } + }, + "com.amazonaws.qapps#UpdateQAppPermissionsInput": { + "type": "structure", + "members": { + "instanceId": { + "target": "com.amazonaws.qapps#InstanceId", + "traits": { + "smithy.api#documentation": "

The unique identifier of the Amazon Q Business application environment instance.

", + "smithy.api#httpHeader": "instance-id", + "smithy.api#required": {} + } + }, + "appId": { + "target": "com.amazonaws.qapps#UUID", + "traits": { + "smithy.api#documentation": "

The unique identifier of the Amazon Q App for which permissions are being updated.

", + "smithy.api#required": {} + } + }, + "grantPermissions": { + "target": "com.amazonaws.qapps#PermissionsInputList", + "traits": { + "smithy.api#documentation": "

The list of permissions to grant for the Amazon Q App.

", + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "revokePermissions": { + "target": "com.amazonaws.qapps#PermissionsInputList", + "traits": { + "smithy.api#documentation": "

The list of permissions to revoke for the Amazon Q App.

", + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qapps#UpdateQAppPermissionsOutput": { + "type": "structure", + "members": { + "resourceArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon Q App for which permissions were updated.

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

The unique identifier of the Amazon Q App for which permissions were updated.

" + } + }, + "permissions": { + "target": "com.amazonaws.qapps#PermissionsOutputList", + "traits": { + "smithy.api#documentation": "

The updated list of permissions for the Amazon Q App.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.qapps#UpdateQAppSession": { "type": "operation", "input": { @@ -5724,6 +7049,141 @@ "smithy.api#input": {} } }, + "com.amazonaws.qapps#UpdateQAppSessionMetadata": { + "type": "operation", + "input": { + "target": "com.amazonaws.qapps#UpdateQAppSessionMetadataInput" + }, + "output": { + "target": "com.amazonaws.qapps#UpdateQAppSessionMetadataOutput" + }, + "errors": [ + { + "target": "com.amazonaws.qapps#AccessDeniedException" + }, + { + "target": "com.amazonaws.qapps#InternalServerException" + }, + { + "target": "com.amazonaws.qapps#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qapps#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qapps#ThrottlingException" + }, + { + "target": "com.amazonaws.qapps#UnauthorizedException" + }, + { + "target": "com.amazonaws.qapps#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates the configuration metadata of a session for a given Q App sessionId.

", + "smithy.api#examples": [ + { + "title": "Updates an existing session metadata for an Amazon Q App", + "input": { + "instanceId": "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", + "sessionId": "56ae47c3-10bc-4c2c-8b27-9b9fe23b3edb", + "sessionName": "Trip itinerary collection session", + "sharingConfiguration": { + "enabled": true, + "acceptResponses": true, + "revealCards": false + } + }, + "output": { + "sessionId": "56ae47c3-10bc-4c2c-8b27-9b9fe23b3edb", + "sessionArn": "arn:aws:qapps:us-west-2:0123456789012:application/cbea8329-41c0-4566-a112-19250921a220/qapp/387ccac9-4717-489f-841f-729b7d7de355/session/56ae47c3-10bc-4c2c-8b27-9b9fe23b3edb", + "sessionName": "Trip itinerary collection session", + "sharingConfiguration": { + "enabled": true, + "acceptResponses": true, + "revealCards": false + } + } + } + ], + "smithy.api#http": { + "method": "POST", + "uri": "/runtime.updateQAppSessionMetadata" + } + } + }, + "com.amazonaws.qapps#UpdateQAppSessionMetadataInput": { + "type": "structure", + "members": { + "instanceId": { + "target": "com.amazonaws.qapps#InstanceId", + "traits": { + "smithy.api#documentation": "

The unique identifier of the Amazon Q Business application environment instance.

", + "smithy.api#httpHeader": "instance-id", + "smithy.api#required": {} + } + }, + "sessionId": { + "target": "com.amazonaws.qapps#UUID", + "traits": { + "smithy.api#documentation": "

The unique identifier of the Q App session to update configuration for.

", + "smithy.api#required": {} + } + }, + "sessionName": { + "target": "com.amazonaws.qapps#SessionName", + "traits": { + "smithy.api#documentation": "

The new name for the Q App session.

" + } + }, + "sharingConfiguration": { + "target": "com.amazonaws.qapps#SessionSharingConfiguration", + "traits": { + "smithy.api#documentation": "

The new sharing configuration for the Q App data collection session.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qapps#UpdateQAppSessionMetadataOutput": { + "type": "structure", + "members": { + "sessionId": { + "target": "com.amazonaws.qapps#UUID", + "traits": { + "smithy.api#documentation": "

The unique identifier of the updated Q App session.

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

The Amazon Resource Name (ARN) of the updated Q App session.

", + "smithy.api#required": {} + } + }, + "sessionName": { + "target": "com.amazonaws.qapps#SessionName", + "traits": { + "smithy.api#documentation": "

The new name of the updated Q App session.

" + } + }, + "sharingConfiguration": { + "target": "com.amazonaws.qapps#SessionSharingConfiguration", + "traits": { + "smithy.api#documentation": "

The new sharing configuration of the updated Q App data collection session.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.qapps#UpdateQAppSessionOutput": { "type": "structure", "members": { @@ -5746,6 +7206,20 @@ "smithy.api#output": {} } }, + "com.amazonaws.qapps#User": { + "type": "structure", + "members": { + "userId": { + "target": "com.amazonaws.qapps#UserId", + "traits": { + "smithy.api#documentation": "

The unique identifier of a user.

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

A user of an Amazon Q App.

" + } + }, "com.amazonaws.qapps#UserAppItem": { "type": "structure", "members": { @@ -5813,6 +7287,26 @@ "target": "com.amazonaws.qapps#UserAppItem" } }, + "com.amazonaws.qapps#UserId": { + "type": "string" + }, + "com.amazonaws.qapps#UserType": { + "type": "enum", + "members": { + "OWNER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "owner" + } + }, + "USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "user" + } + } + } + }, "com.amazonaws.qapps#ValidationException": { "type": "structure", "members": {