Skip to content

Commit 058537c

Browse files
author
awstools
committed
feat(client-qapps): Adds UpdateLibraryItemMetadata api to change status of app for admin verification feature and returns isVerified field in any api returning the app or library item.
1 parent 6ce1172 commit 058537c

16 files changed

+486
-68
lines changed

clients/client-qapps/README.md

+18-5
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@ AWS SDK for JavaScript QApps Client for Node.js, Browser and React Native.
88

99
<p>The Amazon Q Apps feature capability within Amazon Q Business allows web experience
1010
users to create lightweight, purpose-built AI apps to fulfill specific tasks from
11-
within their web experience. For example, users can create an Q Appthat exclusively
11+
within their web experience. For example, users can create a Q App that exclusively
1212
generates marketing-related content to improve your marketing team's productivity or a
13-
Q App for marketing content-generation like writing customer emails and creating
14-
promotional content using a certain style of voice, tone, and branding.
15-
For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/purpose-built-qapps.html">Amazon Q App</a> in the
16-
<i>Amazon Q Business User Guide</i>.
13+
Q App for writing customer emails and creating promotional content using a certain
14+
style of voice, tone, and branding. For more information on the capabilities, see
15+
<a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/deploy-experience-iam-role.html#q-apps-actions">Amazon Q Apps capabilities</a> in the <i>Amazon Q Business User Guide</i>.
1716
</p>
17+
<p>For an overview of the Amazon Q App APIs, see <a href="https://docs.aws.amazon.com/amazonq/latest/api-reference/API_Operations_QApps.html">Overview of
18+
Amazon Q Apps API operations</a>.</p>
19+
<p>For information about the IAM access control permissions you need to
20+
use the Amazon Q Apps API, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/deploy-experience-iam-role.html">
21+
IAM role for the Amazon Q Business web experience including Amazon Q Apps</a> in the
22+
<i>Amazon Q Business User Guide</i>.</p>
1823

1924
## Installing
2025

@@ -378,6 +383,14 @@ UpdateLibraryItem
378383

379384
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qapps/command/UpdateLibraryItemCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/UpdateLibraryItemCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/UpdateLibraryItemCommandOutput/)
380385

386+
</details>
387+
<details>
388+
<summary>
389+
UpdateLibraryItemMetadata
390+
</summary>
391+
392+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qapps/command/UpdateLibraryItemMetadataCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/UpdateLibraryItemMetadataCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qapps/Interface/UpdateLibraryItemMetadataCommandOutput/)
393+
381394
</details>
382395
<details>
383396
<summary>

clients/client-qapps/src/QApps.ts

+33-5
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ import {
8383
UpdateLibraryItemCommandInput,
8484
UpdateLibraryItemCommandOutput,
8585
} from "./commands/UpdateLibraryItemCommand";
86+
import {
87+
UpdateLibraryItemMetadataCommand,
88+
UpdateLibraryItemMetadataCommandInput,
89+
UpdateLibraryItemMetadataCommandOutput,
90+
} from "./commands/UpdateLibraryItemMetadataCommand";
8691
import { UpdateQAppCommand, UpdateQAppCommandInput, UpdateQAppCommandOutput } from "./commands/UpdateQAppCommand";
8792
import {
8893
UpdateQAppSessionCommand,
@@ -113,6 +118,7 @@ const commands = {
113118
TagResourceCommand,
114119
UntagResourceCommand,
115120
UpdateLibraryItemCommand,
121+
UpdateLibraryItemMetadataCommand,
116122
UpdateQAppCommand,
117123
UpdateQAppSessionCommand,
118124
};
@@ -421,6 +427,23 @@ export interface QApps {
421427
cb: (err: any, data?: UpdateLibraryItemCommandOutput) => void
422428
): void;
423429

430+
/**
431+
* @see {@link UpdateLibraryItemMetadataCommand}
432+
*/
433+
updateLibraryItemMetadata(
434+
args: UpdateLibraryItemMetadataCommandInput,
435+
options?: __HttpHandlerOptions
436+
): Promise<UpdateLibraryItemMetadataCommandOutput>;
437+
updateLibraryItemMetadata(
438+
args: UpdateLibraryItemMetadataCommandInput,
439+
cb: (err: any, data?: UpdateLibraryItemMetadataCommandOutput) => void
440+
): void;
441+
updateLibraryItemMetadata(
442+
args: UpdateLibraryItemMetadataCommandInput,
443+
options: __HttpHandlerOptions,
444+
cb: (err: any, data?: UpdateLibraryItemMetadataCommandOutput) => void
445+
): void;
446+
424447
/**
425448
* @see {@link UpdateQAppCommand}
426449
*/
@@ -453,13 +476,18 @@ export interface QApps {
453476
/**
454477
* <p>The Amazon Q Apps feature capability within Amazon Q Business allows web experience
455478
* users to create lightweight, purpose-built AI apps to fulfill specific tasks from
456-
* within their web experience. For example, users can create an Q Appthat exclusively
479+
* within their web experience. For example, users can create a Q App that exclusively
457480
* generates marketing-related content to improve your marketing team's productivity or a
458-
* Q App for marketing content-generation like writing customer emails and creating
459-
* promotional content using a certain style of voice, tone, and branding.
460-
* For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/purpose-built-qapps.html">Amazon Q App</a> in the
461-
* <i>Amazon Q Business User Guide</i>.
481+
* Q App for writing customer emails and creating promotional content using a certain
482+
* style of voice, tone, and branding. For more information on the capabilities, see
483+
* <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/deploy-experience-iam-role.html#q-apps-actions">Amazon Q Apps capabilities</a> in the <i>Amazon Q Business User Guide</i>.
462484
* </p>
485+
* <p>For an overview of the Amazon Q App APIs, see <a href="https://docs.aws.amazon.com/amazonq/latest/api-reference/API_Operations_QApps.html">Overview of
486+
* Amazon Q Apps API operations</a>.</p>
487+
* <p>For information about the IAM access control permissions you need to
488+
* use the Amazon Q Apps API, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/deploy-experience-iam-role.html">
489+
* IAM role for the Amazon Q Business web experience including Amazon Q Apps</a> in the
490+
* <i>Amazon Q Business User Guide</i>.</p>
463491
* @public
464492
*/
465493
export class QApps extends QAppsClient implements QApps {}

clients/client-qapps/src/QAppsClient.ts

+16-5
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ import { StopQAppSessionCommandInput, StopQAppSessionCommandOutput } from "./com
8989
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
9090
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
9191
import { UpdateLibraryItemCommandInput, UpdateLibraryItemCommandOutput } from "./commands/UpdateLibraryItemCommand";
92+
import {
93+
UpdateLibraryItemMetadataCommandInput,
94+
UpdateLibraryItemMetadataCommandOutput,
95+
} from "./commands/UpdateLibraryItemMetadataCommand";
9296
import { UpdateQAppCommandInput, UpdateQAppCommandOutput } from "./commands/UpdateQAppCommand";
9397
import { UpdateQAppSessionCommandInput, UpdateQAppSessionCommandOutput } from "./commands/UpdateQAppSessionCommand";
9498
import {
@@ -127,6 +131,7 @@ export type ServiceInputTypes =
127131
| TagResourceCommandInput
128132
| UntagResourceCommandInput
129133
| UpdateLibraryItemCommandInput
134+
| UpdateLibraryItemMetadataCommandInput
130135
| UpdateQAppCommandInput
131136
| UpdateQAppSessionCommandInput;
132137

@@ -155,6 +160,7 @@ export type ServiceOutputTypes =
155160
| TagResourceCommandOutput
156161
| UntagResourceCommandOutput
157162
| UpdateLibraryItemCommandOutput
163+
| UpdateLibraryItemMetadataCommandOutput
158164
| UpdateQAppCommandOutput
159165
| UpdateQAppSessionCommandOutput;
160166

@@ -332,13 +338,18 @@ export interface QAppsClientResolvedConfig extends QAppsClientResolvedConfigType
332338
/**
333339
* <p>The Amazon Q Apps feature capability within Amazon Q Business allows web experience
334340
* users to create lightweight, purpose-built AI apps to fulfill specific tasks from
335-
* within their web experience. For example, users can create an Q Appthat exclusively
341+
* within their web experience. For example, users can create a Q App that exclusively
336342
* generates marketing-related content to improve your marketing team's productivity or a
337-
* Q App for marketing content-generation like writing customer emails and creating
338-
* promotional content using a certain style of voice, tone, and branding.
339-
* For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/purpose-built-qapps.html">Amazon Q App</a> in the
340-
* <i>Amazon Q Business User Guide</i>.
343+
* Q App for writing customer emails and creating promotional content using a certain
344+
* style of voice, tone, and branding. For more information on the capabilities, see
345+
* <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/deploy-experience-iam-role.html#q-apps-actions">Amazon Q Apps capabilities</a> in the <i>Amazon Q Business User Guide</i>.
341346
* </p>
347+
* <p>For an overview of the Amazon Q App APIs, see <a href="https://docs.aws.amazon.com/amazonq/latest/api-reference/API_Operations_QApps.html">Overview of
348+
* Amazon Q Apps API operations</a>.</p>
349+
* <p>For information about the IAM access control permissions you need to
350+
* use the Amazon Q Apps API, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/deploy-experience-iam-role.html">
351+
* IAM role for the Amazon Q Business web experience including Amazon Q Apps</a> in the
352+
* <i>Amazon Q Business User Guide</i>.</p>
342353
* @public
343354
*/
344355
export class QAppsClient extends __Client<

clients/client-qapps/src/commands/AssociateLibraryItemReviewCommand.ts

+4
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ export interface AssociateLibraryItemReviewCommandOutput extends __MetadataBeare
5555
* @throws {@link AccessDeniedException} (client fault)
5656
* <p>The client is not authorized to perform the requested operation.</p>
5757
*
58+
* @throws {@link ConflictException} (client fault)
59+
* <p>The requested operation could not be completed due to a
60+
* conflict with the current state of the resource.</p>
61+
*
5862
* @throws {@link InternalServerException} (server fault)
5963
* <p>An internal service error occurred while processing the request.</p>
6064
*

clients/client-qapps/src/commands/CreateLibraryItemCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export interface CreateLibraryItemCommandOutput extends CreateLibraryItemOutput,
5454
* // updatedAt: new Date("TIMESTAMP"),
5555
* // updatedBy: "STRING_VALUE",
5656
* // ratingCount: Number("int"), // required
57+
* // isVerified: true || false,
5758
* // };
5859
*
5960
* ```

clients/client-qapps/src/commands/DisassociateLibraryItemReviewCommand.ts

+4
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ export interface DisassociateLibraryItemReviewCommandOutput extends __MetadataBe
5757
* @throws {@link AccessDeniedException} (client fault)
5858
* <p>The client is not authorized to perform the requested operation.</p>
5959
*
60+
* @throws {@link ConflictException} (client fault)
61+
* <p>The requested operation could not be completed due to a
62+
* conflict with the current state of the resource.</p>
63+
*
6064
* @throws {@link InternalServerException} (server fault)
6165
* <p>An internal service error occurred while processing the request.</p>
6266
*

clients/client-qapps/src/commands/GetLibraryItemCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export interface GetLibraryItemCommandOutput extends GetLibraryItemOutput, __Met
6161
* // ratingCount: Number("int"), // required
6262
* // isRatedByUser: true || false,
6363
* // userCount: Number("int"),
64+
* // isVerified: true || false,
6465
* // };
6566
*
6667
* ```

clients/client-qapps/src/commands/ListLibraryItemsCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export interface ListLibraryItemsCommandOutput extends ListLibraryItemsOutput, _
6363
* // ratingCount: Number("int"), // required
6464
* // isRatedByUser: true || false,
6565
* // userCount: Number("int"),
66+
* // isVerified: true || false,
6667
* // },
6768
* // ],
6869
* // nextToken: "STRING_VALUE",

clients/client-qapps/src/commands/ListQAppsCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export interface ListQAppsCommandOutput extends ListQAppsOutput, __MetadataBeare
5454
* // createdAt: new Date("TIMESTAMP"), // required
5555
* // canEdit: true || false,
5656
* // status: "STRING_VALUE",
57+
* // isVerified: true || false,
5758
* // },
5859
* // ],
5960
* // nextToken: "STRING_VALUE",

clients/client-qapps/src/commands/UpdateLibraryItemCommand.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface UpdateLibraryItemCommandInput extends UpdateLibraryItemInput {}
2828
export interface UpdateLibraryItemCommandOutput extends UpdateLibraryItemOutput, __MetadataBearer {}
2929

3030
/**
31-
* <p>Updates the metadata and status of a library item for an Amazon Q App.</p>
31+
* <p>Updates the library item for an Amazon Q App.</p>
3232
* @example
3333
* Use a bare-bones client and the command you need to make an API call.
3434
* ```javascript
@@ -63,6 +63,7 @@ export interface UpdateLibraryItemCommandOutput extends UpdateLibraryItemOutput,
6363
* // ratingCount: Number("int"), // required
6464
* // isRatedByUser: true || false,
6565
* // userCount: Number("int"),
66+
* // isVerified: true || false,
6667
* // };
6768
*
6869
* ```
@@ -76,6 +77,10 @@ export interface UpdateLibraryItemCommandOutput extends UpdateLibraryItemOutput,
7677
* @throws {@link AccessDeniedException} (client fault)
7778
* <p>The client is not authorized to perform the requested operation.</p>
7879
*
80+
* @throws {@link ConflictException} (client fault)
81+
* <p>The requested operation could not be completed due to a
82+
* conflict with the current state of the resource.</p>
83+
*
7984
* @throws {@link InternalServerException} (server fault)
8085
* <p>An internal service error occurred while processing the request.</p>
8186
*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import { UpdateLibraryItemMetadataInput } from "../models/models_0";
9+
import { de_UpdateLibraryItemMetadataCommand, se_UpdateLibraryItemMetadataCommand } from "../protocols/Aws_restJson1";
10+
import { QAppsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QAppsClient";
11+
12+
/**
13+
* @public
14+
*/
15+
export type { __MetadataBearer };
16+
export { $Command };
17+
/**
18+
* @public
19+
*
20+
* The input for {@link UpdateLibraryItemMetadataCommand}.
21+
*/
22+
export interface UpdateLibraryItemMetadataCommandInput extends UpdateLibraryItemMetadataInput {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link UpdateLibraryItemMetadataCommand}.
27+
*/
28+
export interface UpdateLibraryItemMetadataCommandOutput extends __MetadataBearer {}
29+
30+
/**
31+
* <p>Updates the verification status of a library item for an Amazon Q App.</p>
32+
* @example
33+
* Use a bare-bones client and the command you need to make an API call.
34+
* ```javascript
35+
* import { QAppsClient, UpdateLibraryItemMetadataCommand } from "@aws-sdk/client-qapps"; // ES Modules import
36+
* // const { QAppsClient, UpdateLibraryItemMetadataCommand } = require("@aws-sdk/client-qapps"); // CommonJS import
37+
* const client = new QAppsClient(config);
38+
* const input = { // UpdateLibraryItemMetadataInput
39+
* instanceId: "STRING_VALUE", // required
40+
* libraryItemId: "STRING_VALUE", // required
41+
* isVerified: true || false,
42+
* };
43+
* const command = new UpdateLibraryItemMetadataCommand(input);
44+
* const response = await client.send(command);
45+
* // {};
46+
*
47+
* ```
48+
*
49+
* @param UpdateLibraryItemMetadataCommandInput - {@link UpdateLibraryItemMetadataCommandInput}
50+
* @returns {@link UpdateLibraryItemMetadataCommandOutput}
51+
* @see {@link UpdateLibraryItemMetadataCommandInput} for command's `input` shape.
52+
* @see {@link UpdateLibraryItemMetadataCommandOutput} for command's `response` shape.
53+
* @see {@link QAppsClientResolvedConfig | config} for QAppsClient's `config` shape.
54+
*
55+
* @throws {@link AccessDeniedException} (client fault)
56+
* <p>The client is not authorized to perform the requested operation.</p>
57+
*
58+
* @throws {@link ConflictException} (client fault)
59+
* <p>The requested operation could not be completed due to a
60+
* conflict with the current state of the resource.</p>
61+
*
62+
* @throws {@link InternalServerException} (server fault)
63+
* <p>An internal service error occurred while processing the request.</p>
64+
*
65+
* @throws {@link ResourceNotFoundException} (client fault)
66+
* <p>The requested resource could not be found.</p>
67+
*
68+
* @throws {@link ThrottlingException} (client fault)
69+
* <p>The requested operation could not be completed because too many
70+
* requests were sent at once. Wait a bit and try again later.</p>
71+
*
72+
* @throws {@link UnauthorizedException} (client fault)
73+
* <p>The client is not authenticated or authorized to perform the requested operation.</p>
74+
*
75+
* @throws {@link ValidationException} (client fault)
76+
* <p>The input failed to satisfy the constraints specified by the service.</p>
77+
*
78+
* @throws {@link QAppsServiceException}
79+
* <p>Base exception class for all service exceptions from QApps service.</p>
80+
*
81+
* @public
82+
*/
83+
export class UpdateLibraryItemMetadataCommand extends $Command
84+
.classBuilder<
85+
UpdateLibraryItemMetadataCommandInput,
86+
UpdateLibraryItemMetadataCommandOutput,
87+
QAppsClientResolvedConfig,
88+
ServiceInputTypes,
89+
ServiceOutputTypes
90+
>()
91+
.ep({
92+
...commonParams,
93+
})
94+
.m(function (this: any, Command: any, cs: any, config: QAppsClientResolvedConfig, o: any) {
95+
return [
96+
getSerdePlugin(config, this.serialize, this.deserialize),
97+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
98+
];
99+
})
100+
.s("QAppsService", "UpdateLibraryItemMetadata", {})
101+
.n("QAppsClient", "UpdateLibraryItemMetadataCommand")
102+
.f(void 0, void 0)
103+
.ser(se_UpdateLibraryItemMetadataCommand)
104+
.de(de_UpdateLibraryItemMetadataCommand)
105+
.build() {}

clients/client-qapps/src/commands/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ export * from "./StopQAppSessionCommand";
2020
export * from "./TagResourceCommand";
2121
export * from "./UntagResourceCommand";
2222
export * from "./UpdateLibraryItemCommand";
23+
export * from "./UpdateLibraryItemMetadataCommand";
2324
export * from "./UpdateQAppCommand";
2425
export * from "./UpdateQAppSessionCommand";

clients/client-qapps/src/index.ts

+10-5
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@
33
/**
44
* <p>The Amazon Q Apps feature capability within Amazon Q Business allows web experience
55
* users to create lightweight, purpose-built AI apps to fulfill specific tasks from
6-
* within their web experience. For example, users can create an Q Appthat exclusively
6+
* within their web experience. For example, users can create a Q App that exclusively
77
* generates marketing-related content to improve your marketing team's productivity or a
8-
* Q App for marketing content-generation like writing customer emails and creating
9-
* promotional content using a certain style of voice, tone, and branding.
10-
* For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/purpose-built-qapps.html">Amazon Q App</a> in the
11-
* <i>Amazon Q Business User Guide</i>.
8+
* Q App for writing customer emails and creating promotional content using a certain
9+
* style of voice, tone, and branding. For more information on the capabilities, see
10+
* <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/deploy-experience-iam-role.html#q-apps-actions">Amazon Q Apps capabilities</a> in the <i>Amazon Q Business User Guide</i>.
1211
* </p>
12+
* <p>For an overview of the Amazon Q App APIs, see <a href="https://docs.aws.amazon.com/amazonq/latest/api-reference/API_Operations_QApps.html">Overview of
13+
* Amazon Q Apps API operations</a>.</p>
14+
* <p>For information about the IAM access control permissions you need to
15+
* use the Amazon Q Apps API, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/deploy-experience-iam-role.html">
16+
* IAM role for the Amazon Q Business web experience including Amazon Q Apps</a> in the
17+
* <i>Amazon Q Business User Guide</i>.</p>
1318
*
1419
* @packageDocumentation
1520
*/

0 commit comments

Comments
 (0)