@aws-sdk/client-personalize-runtime 3.42.0 → 3.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.43.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.42.0...v3.43.0) (2021-11-29)
7
+
8
+
9
+ ### Features
10
+
11
+ * **clients:** update clients as of 11/28/2021 ([#3072](https://github.com/aws/aws-sdk-js-v3/issues/3072)) ([2ad1622](https://github.com/aws/aws-sdk-js-v3/commit/2ad1622ba8586b926fe508055211803bb29e3976))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.42.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.41.0...v3.42.0) (2021-11-19)
7
18
 
8
19
  **Note:** Version bump only for package @aws-sdk/client-personalize-runtime
@@ -48,6 +48,8 @@ const serializeAws_restJson1GetRecommendationsCommand = async (input, context) =
48
48
  input.filterValues !== null && { filterValues: serializeAws_restJson1FilterValues(input.filterValues, context) }),
49
49
  ...(input.itemId !== undefined && input.itemId !== null && { itemId: input.itemId }),
50
50
  ...(input.numResults !== undefined && input.numResults !== null && { numResults: input.numResults }),
51
+ ...(input.recommenderArn !== undefined &&
52
+ input.recommenderArn !== null && { recommenderArn: input.recommenderArn }),
51
53
  ...(input.userId !== undefined && input.userId !== null && { userId: input.userId }),
52
54
  });
53
55
  return new protocol_http_1.HttpRequest({
@@ -39,9 +39,10 @@ export var serializeAws_restJson1GetRecommendationsCommand = function (input, co
39
39
  "content-type": "application/json",
40
40
  };
41
41
  resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/recommendations";
42
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.campaignArn !== undefined && input.campaignArn !== null && { campaignArn: input.campaignArn })), (input.context !== undefined &&
42
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.campaignArn !== undefined && input.campaignArn !== null && { campaignArn: input.campaignArn })), (input.context !== undefined &&
43
43
  input.context !== null && { context: serializeAws_restJson1Context(input.context, context) })), (input.filterArn !== undefined && input.filterArn !== null && { filterArn: input.filterArn })), (input.filterValues !== undefined &&
44
- input.filterValues !== null && { filterValues: serializeAws_restJson1FilterValues(input.filterValues, context) })), (input.itemId !== undefined && input.itemId !== null && { itemId: input.itemId })), (input.numResults !== undefined && input.numResults !== null && { numResults: input.numResults })), (input.userId !== undefined && input.userId !== null && { userId: input.userId })));
44
+ input.filterValues !== null && { filterValues: serializeAws_restJson1FilterValues(input.filterValues, context) })), (input.itemId !== undefined && input.itemId !== null && { itemId: input.itemId })), (input.numResults !== undefined && input.numResults !== null && { numResults: input.numResults })), (input.recommenderArn !== undefined &&
45
+ input.recommenderArn !== null && { recommenderArn: input.recommenderArn })), (input.userId !== undefined && input.userId !== null && { userId: input.userId })));
45
46
  return [2, new __HttpRequest({
46
47
  protocol: protocol,
47
48
  hostname: hostname,
@@ -18,21 +18,24 @@ export declare class PersonalizeRuntime extends PersonalizeRuntimeClient {
18
18
  getPersonalizedRanking(args: GetPersonalizedRankingCommandInput, cb: (err: any, data?: GetPersonalizedRankingCommandOutput) => void): void;
19
19
  getPersonalizedRanking(args: GetPersonalizedRankingCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPersonalizedRankingCommandOutput) => void): void;
20
20
  /**
21
- * <p>Returns a list of recommended items. The required input depends on the recipe type used to
22
- * create the solution backing the campaign, as follows:</p>
21
+ * <p>Returns a list of recommended items. For campaigns, the campaign's Amazon Resource Name (ARN) is required and the required user and item input depends on the recipe type used to
22
+ * create the solution backing the campaign as follows:</p>
23
23
  * <ul>
24
24
  * <li>
25
- * <p>RELATED_ITEMS - <code>itemId</code> required, <code>userId</code> not used</p>
25
+ * <p>USER_PERSONALIZATION - <code>userId</code> required, <code>itemId</code> not used</p>
26
26
  * </li>
27
27
  * <li>
28
- * <p>USER_PERSONALIZATION - <code>itemId</code> optional, <code>userId</code>
29
- * required</p>
28
+ * <p>RELATED_ITEMS - <code>itemId</code> required, <code>userId</code> not used</p>
30
29
  * </li>
31
30
  * </ul>
32
31
  * <note>
33
32
  * <p>Campaigns that are backed by a solution created using a recipe of type
34
33
  * PERSONALIZED_RANKING use the API.</p>
35
34
  * </note>
35
+ * <p>
36
+ * For recommenders, the recommender's ARN is required and the required item and user input depends on the use case (domain-based recipe) backing the recommender.
37
+ * For information on use case requirements see <a href="https://docs.aws.amazon.com/personalize/latest/dg/domain-use-cases.html">Choosing recommender use cases</a>.
38
+ * </p>
36
39
  */
37
40
  getRecommendations(args: GetRecommendationsCommandInput, options?: __HttpHandlerOptions): Promise<GetRecommendationsCommandOutput>;
38
41
  getRecommendations(args: GetRecommendationsCommandInput, cb: (err: any, data?: GetRecommendationsCommandOutput) => void): void;
@@ -7,21 +7,24 @@ export interface GetRecommendationsCommandInput extends GetRecommendationsReques
7
7
  export interface GetRecommendationsCommandOutput extends GetRecommendationsResponse, __MetadataBearer {
8
8
  }
9
9
  /**
10
- * <p>Returns a list of recommended items. The required input depends on the recipe type used to
11
- * create the solution backing the campaign, as follows:</p>
10
+ * <p>Returns a list of recommended items. For campaigns, the campaign's Amazon Resource Name (ARN) is required and the required user and item input depends on the recipe type used to
11
+ * create the solution backing the campaign as follows:</p>
12
12
  * <ul>
13
13
  * <li>
14
- * <p>RELATED_ITEMS - <code>itemId</code> required, <code>userId</code> not used</p>
14
+ * <p>USER_PERSONALIZATION - <code>userId</code> required, <code>itemId</code> not used</p>
15
15
  * </li>
16
16
  * <li>
17
- * <p>USER_PERSONALIZATION - <code>itemId</code> optional, <code>userId</code>
18
- * required</p>
17
+ * <p>RELATED_ITEMS - <code>itemId</code> required, <code>userId</code> not used</p>
19
18
  * </li>
20
19
  * </ul>
21
20
  * <note>
22
21
  * <p>Campaigns that are backed by a solution created using a recipe of type
23
22
  * PERSONALIZED_RANKING use the API.</p>
24
23
  * </note>
24
+ * <p>
25
+ * For recommenders, the recommender's ARN is required and the required item and user input depends on the use case (domain-based recipe) backing the recommender.
26
+ * For information on use case requirements see <a href="https://docs.aws.amazon.com/personalize/latest/dg/domain-use-cases.html">Choosing recommender use cases</a>.
27
+ * </p>
25
28
  * @example
26
29
  * Use a bare-bones client and the command you need to make an API call.
27
30
  * ```javascript
@@ -120,7 +120,7 @@ export interface GetRecommendationsRequest {
120
120
  /**
121
121
  * <p>The Amazon Resource Name (ARN) of the campaign to use for getting recommendations.</p>
122
122
  */
123
- campaignArn: string | undefined;
123
+ campaignArn?: string;
124
124
  /**
125
125
  * <p>The item ID to provide recommendations for.</p>
126
126
  * <p>Required for <code>RELATED_ITEMS</code> recipe type.</p>
@@ -164,6 +164,11 @@ export interface GetRecommendationsRequest {
164
164
  filterValues?: {
165
165
  [key: string]: string;
166
166
  };
167
+ /**
168
+ * <p>The Amazon Resource Name (ARN) of the recommender to use to get recommendations. Provide a recommender ARN if you
169
+ * created a Domain dataset group with a recommender for a domain use case.</p>
170
+ */
171
+ recommenderArn?: string;
167
172
  }
168
173
  export declare namespace GetRecommendationsRequest {
169
174
  /**
@@ -173,7 +178,7 @@ export declare namespace GetRecommendationsRequest {
173
178
  }
174
179
  export interface GetRecommendationsResponse {
175
180
  /**
176
- * <p>A list of recommendations sorted in ascending order by prediction score. There can be a
181
+ * <p>A list of recommendations sorted in descending order by prediction score. There can be a
177
182
  * maximum of 500 items in the list.</p>
178
183
  */
179
184
  itemList?: PredictedItem[];
@@ -64,7 +64,7 @@ export declare namespace ResourceNotFoundException {
64
64
  }
65
65
  export interface GetRecommendationsRequest {
66
66
 
67
- campaignArn: string | undefined;
67
+ campaignArn?: string;
68
68
 
69
69
  itemId?: string;
70
70
 
@@ -81,6 +81,8 @@ export interface GetRecommendationsRequest {
81
81
  filterValues?: {
82
82
  [key: string]: string;
83
83
  };
84
+
85
+ recommenderArn?: string;
84
86
  }
85
87
  export declare namespace GetRecommendationsRequest {
86
88
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-personalize-runtime",
3
3
  "description": "AWS SDK for JavaScript Personalize Runtime Client for Node.js, Browser and React Native",
4
- "version": "3.42.0",
4
+ "version": "3.43.0",
5
5
  "scripts": {
6
6
  "build": "yarn build:cjs && yarn build:es && yarn build:types",
7
7
  "build:cjs": "tsc -p tsconfig.json",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "2.0.0",
23
23
  "@aws-crypto/sha256-js": "2.0.0",
24
- "@aws-sdk/client-sts": "3.42.0",
24
+ "@aws-sdk/client-sts": "3.43.0",
25
25
  "@aws-sdk/config-resolver": "3.40.0",
26
26
  "@aws-sdk/credential-provider-node": "3.41.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.40.0",