@aws-sdk/client-personalize-runtime 3.451.0 → 3.458.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/README.md +10 -2
- package/dist-cjs/PersonalizeRuntime.js +2 -0
- package/dist-cjs/commands/GetActionRecommendationsCommand.js +52 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +6 -1
- package/dist-cjs/protocols/Aws_restJson1.js +81 -1
- package/dist-es/PersonalizeRuntime.js +2 -0
- package/dist-es/commands/GetActionRecommendationsCommand.js +48 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +4 -0
- package/dist-es/protocols/Aws_restJson1.js +79 -1
- package/dist-types/PersonalizeRuntime.d.ts +7 -0
- package/dist-types/PersonalizeRuntimeClient.d.ts +3 -2
- package/dist-types/commands/GetActionRecommendationsCommand.d.ts +96 -0
- package/dist-types/commands/GetPersonalizedRankingCommand.d.ts +8 -0
- package/dist-types/commands/GetRecommendationsCommand.d.ts +8 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +135 -26
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/ts3.4/PersonalizeRuntime.d.ts +17 -0
- package/dist-types/ts3.4/PersonalizeRuntimeClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/GetActionRecommendationsCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +33 -12
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -203,12 +203,20 @@ see LICENSE for more information.
|
|
|
203
203
|
|
|
204
204
|
## Client Commands (Operations List)
|
|
205
205
|
|
|
206
|
+
<details>
|
|
207
|
+
<summary>
|
|
208
|
+
GetActionRecommendations
|
|
209
|
+
</summary>
|
|
210
|
+
|
|
211
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/personalize-runtime/command/GetActionRecommendationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-personalize-runtime/Interface/GetActionRecommendationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-personalize-runtime/Interface/GetActionRecommendationsCommandOutput/)
|
|
212
|
+
|
|
213
|
+
</details>
|
|
206
214
|
<details>
|
|
207
215
|
<summary>
|
|
208
216
|
GetPersonalizedRanking
|
|
209
217
|
</summary>
|
|
210
218
|
|
|
211
|
-
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/
|
|
219
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/personalize-runtime/command/GetPersonalizedRankingCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-personalize-runtime/Interface/GetPersonalizedRankingCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-personalize-runtime/Interface/GetPersonalizedRankingCommandOutput/)
|
|
212
220
|
|
|
213
221
|
</details>
|
|
214
222
|
<details>
|
|
@@ -216,6 +224,6 @@ GetPersonalizedRanking
|
|
|
216
224
|
GetRecommendations
|
|
217
225
|
</summary>
|
|
218
226
|
|
|
219
|
-
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/
|
|
227
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/personalize-runtime/command/GetRecommendationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-personalize-runtime/Interface/GetRecommendationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-personalize-runtime/Interface/GetRecommendationsCommandOutput/)
|
|
220
228
|
|
|
221
229
|
</details>
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PersonalizeRuntime = void 0;
|
|
4
4
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
+
const GetActionRecommendationsCommand_1 = require("./commands/GetActionRecommendationsCommand");
|
|
5
6
|
const GetPersonalizedRankingCommand_1 = require("./commands/GetPersonalizedRankingCommand");
|
|
6
7
|
const GetRecommendationsCommand_1 = require("./commands/GetRecommendationsCommand");
|
|
7
8
|
const PersonalizeRuntimeClient_1 = require("./PersonalizeRuntimeClient");
|
|
8
9
|
const commands = {
|
|
10
|
+
GetActionRecommendationsCommand: GetActionRecommendationsCommand_1.GetActionRecommendationsCommand,
|
|
9
11
|
GetPersonalizedRankingCommand: GetPersonalizedRankingCommand_1.GetPersonalizedRankingCommand,
|
|
10
12
|
GetRecommendationsCommand: GetRecommendationsCommand_1.GetRecommendationsCommand,
|
|
11
13
|
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetActionRecommendationsCommand = exports.$Command = void 0;
|
|
4
|
+
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
const types_1 = require("@smithy/types");
|
|
9
|
+
const models_0_1 = require("../models/models_0");
|
|
10
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
11
|
+
class GetActionRecommendationsCommand extends smithy_client_1.Command {
|
|
12
|
+
static getEndpointParameterInstructions() {
|
|
13
|
+
return {
|
|
14
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
15
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
16
|
+
Region: { type: "builtInParams", name: "region" },
|
|
17
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
constructor(input) {
|
|
21
|
+
super();
|
|
22
|
+
this.input = input;
|
|
23
|
+
}
|
|
24
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
25
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
26
|
+
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetActionRecommendationsCommand.getEndpointParameterInstructions()));
|
|
27
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
28
|
+
const { logger } = configuration;
|
|
29
|
+
const clientName = "PersonalizeRuntimeClient";
|
|
30
|
+
const commandName = "GetActionRecommendationsCommand";
|
|
31
|
+
const handlerExecutionContext = {
|
|
32
|
+
logger,
|
|
33
|
+
clientName,
|
|
34
|
+
commandName,
|
|
35
|
+
inputFilterSensitiveLog: models_0_1.GetActionRecommendationsRequestFilterSensitiveLog,
|
|
36
|
+
outputFilterSensitiveLog: (_) => _,
|
|
37
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
38
|
+
service: "AmazonPersonalizeRuntime",
|
|
39
|
+
operation: "GetActionRecommendations",
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
const { requestHandler } = configuration;
|
|
43
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
44
|
+
}
|
|
45
|
+
serialize(input, context) {
|
|
46
|
+
return (0, Aws_restJson1_1.se_GetActionRecommendationsCommand)(input, context);
|
|
47
|
+
}
|
|
48
|
+
deserialize(output, context) {
|
|
49
|
+
return (0, Aws_restJson1_1.de_GetActionRecommendationsCommand)(output, context);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.GetActionRecommendationsCommand = GetActionRecommendationsCommand;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./GetActionRecommendationsCommand"), exports);
|
|
4
5
|
tslib_1.__exportStar(require("./GetPersonalizedRankingCommand"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./GetRecommendationsCommand"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetRecommendationsRequestFilterSensitiveLog = exports.PromotionFilterSensitiveLog = exports.GetPersonalizedRankingRequestFilterSensitiveLog = exports.ResourceNotFoundException = exports.InvalidInputException = void 0;
|
|
3
|
+
exports.GetRecommendationsRequestFilterSensitiveLog = exports.PromotionFilterSensitiveLog = exports.GetPersonalizedRankingRequestFilterSensitiveLog = exports.GetActionRecommendationsRequestFilterSensitiveLog = exports.ResourceNotFoundException = exports.InvalidInputException = void 0;
|
|
4
4
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
5
|
const PersonalizeRuntimeServiceException_1 = require("./PersonalizeRuntimeServiceException");
|
|
6
6
|
class InvalidInputException extends PersonalizeRuntimeServiceException_1.PersonalizeRuntimeServiceException {
|
|
@@ -29,6 +29,11 @@ class ResourceNotFoundException extends PersonalizeRuntimeServiceException_1.Per
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
32
|
+
const GetActionRecommendationsRequestFilterSensitiveLog = (obj) => ({
|
|
33
|
+
...obj,
|
|
34
|
+
...(obj.filterValues && { filterValues: smithy_client_1.SENSITIVE_STRING }),
|
|
35
|
+
});
|
|
36
|
+
exports.GetActionRecommendationsRequestFilterSensitiveLog = GetActionRecommendationsRequestFilterSensitiveLog;
|
|
32
37
|
const GetPersonalizedRankingRequestFilterSensitiveLog = (obj) => ({
|
|
33
38
|
...obj,
|
|
34
39
|
...(obj.context && { context: smithy_client_1.SENSITIVE_STRING }),
|
|
@@ -1,10 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_GetRecommendationsCommand = exports.de_GetPersonalizedRankingCommand = exports.se_GetRecommendationsCommand = exports.se_GetPersonalizedRankingCommand = void 0;
|
|
3
|
+
exports.de_GetRecommendationsCommand = exports.de_GetPersonalizedRankingCommand = exports.de_GetActionRecommendationsCommand = exports.se_GetRecommendationsCommand = exports.se_GetPersonalizedRankingCommand = exports.se_GetActionRecommendationsCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const PersonalizeRuntimeServiceException_1 = require("../models/PersonalizeRuntimeServiceException");
|
|
8
|
+
const se_GetActionRecommendationsCommand = async (input, context) => {
|
|
9
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
|
+
const headers = {
|
|
11
|
+
"content-type": "application/json",
|
|
12
|
+
};
|
|
13
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/action-recommendations";
|
|
14
|
+
let body;
|
|
15
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
|
+
campaignArn: [],
|
|
17
|
+
filterArn: [],
|
|
18
|
+
filterValues: (_) => (0, smithy_client_1._json)(_),
|
|
19
|
+
numResults: [],
|
|
20
|
+
userId: [],
|
|
21
|
+
}));
|
|
22
|
+
return new protocol_http_1.HttpRequest({
|
|
23
|
+
protocol,
|
|
24
|
+
hostname,
|
|
25
|
+
port,
|
|
26
|
+
method: "POST",
|
|
27
|
+
headers,
|
|
28
|
+
path: resolvedPath,
|
|
29
|
+
body,
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
exports.se_GetActionRecommendationsCommand = se_GetActionRecommendationsCommand;
|
|
8
33
|
const se_GetPersonalizedRankingCommand = async (input, context) => {
|
|
9
34
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
35
|
const headers = {
|
|
@@ -18,6 +43,7 @@ const se_GetPersonalizedRankingCommand = async (input, context) => {
|
|
|
18
43
|
filterArn: [],
|
|
19
44
|
filterValues: (_) => (0, smithy_client_1._json)(_),
|
|
20
45
|
inputList: (_) => (0, smithy_client_1._json)(_),
|
|
46
|
+
metadataColumns: (_) => (0, smithy_client_1._json)(_),
|
|
21
47
|
userId: [],
|
|
22
48
|
}));
|
|
23
49
|
return new protocol_http_1.HttpRequest({
|
|
@@ -44,6 +70,7 @@ const se_GetRecommendationsCommand = async (input, context) => {
|
|
|
44
70
|
filterArn: [],
|
|
45
71
|
filterValues: (_) => (0, smithy_client_1._json)(_),
|
|
46
72
|
itemId: [],
|
|
73
|
+
metadataColumns: (_) => (0, smithy_client_1._json)(_),
|
|
47
74
|
numResults: [],
|
|
48
75
|
promotions: (_) => (0, smithy_client_1._json)(_),
|
|
49
76
|
recommenderArn: [],
|
|
@@ -60,6 +87,44 @@ const se_GetRecommendationsCommand = async (input, context) => {
|
|
|
60
87
|
});
|
|
61
88
|
};
|
|
62
89
|
exports.se_GetRecommendationsCommand = se_GetRecommendationsCommand;
|
|
90
|
+
const de_GetActionRecommendationsCommand = async (output, context) => {
|
|
91
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
92
|
+
return de_GetActionRecommendationsCommandError(output, context);
|
|
93
|
+
}
|
|
94
|
+
const contents = (0, smithy_client_1.map)({
|
|
95
|
+
$metadata: deserializeMetadata(output),
|
|
96
|
+
});
|
|
97
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
98
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
99
|
+
actionList: (_) => de_ActionList(_, context),
|
|
100
|
+
recommendationId: smithy_client_1.expectString,
|
|
101
|
+
});
|
|
102
|
+
Object.assign(contents, doc);
|
|
103
|
+
return contents;
|
|
104
|
+
};
|
|
105
|
+
exports.de_GetActionRecommendationsCommand = de_GetActionRecommendationsCommand;
|
|
106
|
+
const de_GetActionRecommendationsCommandError = async (output, context) => {
|
|
107
|
+
const parsedOutput = {
|
|
108
|
+
...output,
|
|
109
|
+
body: await parseErrorBody(output.body, context),
|
|
110
|
+
};
|
|
111
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
112
|
+
switch (errorCode) {
|
|
113
|
+
case "InvalidInputException":
|
|
114
|
+
case "com.amazonaws.personalizeruntime#InvalidInputException":
|
|
115
|
+
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
116
|
+
case "ResourceNotFoundException":
|
|
117
|
+
case "com.amazonaws.personalizeruntime#ResourceNotFoundException":
|
|
118
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
119
|
+
default:
|
|
120
|
+
const parsedBody = parsedOutput.body;
|
|
121
|
+
return throwDefaultError({
|
|
122
|
+
output,
|
|
123
|
+
parsedBody,
|
|
124
|
+
errorCode,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
};
|
|
63
128
|
const de_GetPersonalizedRankingCommand = async (output, context) => {
|
|
64
129
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
65
130
|
return de_GetPersonalizedRankingCommandError(output, context);
|
|
@@ -163,6 +228,14 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
163
228
|
});
|
|
164
229
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
165
230
|
};
|
|
231
|
+
const de_ActionList = (output, context) => {
|
|
232
|
+
const retVal = (output || [])
|
|
233
|
+
.filter((e) => e != null)
|
|
234
|
+
.map((entry) => {
|
|
235
|
+
return de_PredictedAction(entry, context);
|
|
236
|
+
});
|
|
237
|
+
return retVal;
|
|
238
|
+
};
|
|
166
239
|
const de_ItemList = (output, context) => {
|
|
167
240
|
const retVal = (output || [])
|
|
168
241
|
.filter((e) => e != null)
|
|
@@ -171,9 +244,16 @@ const de_ItemList = (output, context) => {
|
|
|
171
244
|
});
|
|
172
245
|
return retVal;
|
|
173
246
|
};
|
|
247
|
+
const de_PredictedAction = (output, context) => {
|
|
248
|
+
return (0, smithy_client_1.take)(output, {
|
|
249
|
+
actionId: smithy_client_1.expectString,
|
|
250
|
+
score: smithy_client_1.limitedParseDouble,
|
|
251
|
+
});
|
|
252
|
+
};
|
|
174
253
|
const de_PredictedItem = (output, context) => {
|
|
175
254
|
return (0, smithy_client_1.take)(output, {
|
|
176
255
|
itemId: smithy_client_1.expectString,
|
|
256
|
+
metadata: smithy_client_1._json,
|
|
177
257
|
promotionName: smithy_client_1.expectString,
|
|
178
258
|
score: smithy_client_1.limitedParseDouble,
|
|
179
259
|
});
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
2
|
+
import { GetActionRecommendationsCommand, } from "./commands/GetActionRecommendationsCommand";
|
|
2
3
|
import { GetPersonalizedRankingCommand, } from "./commands/GetPersonalizedRankingCommand";
|
|
3
4
|
import { GetRecommendationsCommand, } from "./commands/GetRecommendationsCommand";
|
|
4
5
|
import { PersonalizeRuntimeClient } from "./PersonalizeRuntimeClient";
|
|
5
6
|
const commands = {
|
|
7
|
+
GetActionRecommendationsCommand,
|
|
6
8
|
GetPersonalizedRankingCommand,
|
|
7
9
|
GetRecommendationsCommand,
|
|
8
10
|
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { GetActionRecommendationsRequestFilterSensitiveLog, } from "../models/models_0";
|
|
6
|
+
import { de_GetActionRecommendationsCommand, se_GetActionRecommendationsCommand } from "../protocols/Aws_restJson1";
|
|
7
|
+
export { $Command };
|
|
8
|
+
export class GetActionRecommendationsCommand extends $Command {
|
|
9
|
+
static getEndpointParameterInstructions() {
|
|
10
|
+
return {
|
|
11
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
12
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
13
|
+
Region: { type: "builtInParams", name: "region" },
|
|
14
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
constructor(input) {
|
|
18
|
+
super();
|
|
19
|
+
this.input = input;
|
|
20
|
+
}
|
|
21
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
22
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
23
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, GetActionRecommendationsCommand.getEndpointParameterInstructions()));
|
|
24
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
25
|
+
const { logger } = configuration;
|
|
26
|
+
const clientName = "PersonalizeRuntimeClient";
|
|
27
|
+
const commandName = "GetActionRecommendationsCommand";
|
|
28
|
+
const handlerExecutionContext = {
|
|
29
|
+
logger,
|
|
30
|
+
clientName,
|
|
31
|
+
commandName,
|
|
32
|
+
inputFilterSensitiveLog: GetActionRecommendationsRequestFilterSensitiveLog,
|
|
33
|
+
outputFilterSensitiveLog: (_) => _,
|
|
34
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
35
|
+
service: "AmazonPersonalizeRuntime",
|
|
36
|
+
operation: "GetActionRecommendations",
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
const { requestHandler } = configuration;
|
|
40
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
41
|
+
}
|
|
42
|
+
serialize(input, context) {
|
|
43
|
+
return se_GetActionRecommendationsCommand(input, context);
|
|
44
|
+
}
|
|
45
|
+
deserialize(output, context) {
|
|
46
|
+
return de_GetActionRecommendationsCommand(output, context);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -24,6 +24,10 @@ export class ResourceNotFoundException extends __BaseException {
|
|
|
24
24
|
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
+
export const GetActionRecommendationsRequestFilterSensitiveLog = (obj) => ({
|
|
28
|
+
...obj,
|
|
29
|
+
...(obj.filterValues && { filterValues: SENSITIVE_STRING }),
|
|
30
|
+
});
|
|
27
31
|
export const GetPersonalizedRankingRequestFilterSensitiveLog = (obj) => ({
|
|
28
32
|
...obj,
|
|
29
33
|
...(obj.context && { context: SENSITIVE_STRING }),
|
|
@@ -1,7 +1,31 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
2
2
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
|
-
import { InvalidInputException, ResourceNotFoundException } from "../models/models_0";
|
|
3
|
+
import { InvalidInputException, ResourceNotFoundException, } from "../models/models_0";
|
|
4
4
|
import { PersonalizeRuntimeServiceException as __BaseException } from "../models/PersonalizeRuntimeServiceException";
|
|
5
|
+
export const se_GetActionRecommendationsCommand = async (input, context) => {
|
|
6
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
|
+
const headers = {
|
|
8
|
+
"content-type": "application/json",
|
|
9
|
+
};
|
|
10
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/action-recommendations";
|
|
11
|
+
let body;
|
|
12
|
+
body = JSON.stringify(take(input, {
|
|
13
|
+
campaignArn: [],
|
|
14
|
+
filterArn: [],
|
|
15
|
+
filterValues: (_) => _json(_),
|
|
16
|
+
numResults: [],
|
|
17
|
+
userId: [],
|
|
18
|
+
}));
|
|
19
|
+
return new __HttpRequest({
|
|
20
|
+
protocol,
|
|
21
|
+
hostname,
|
|
22
|
+
port,
|
|
23
|
+
method: "POST",
|
|
24
|
+
headers,
|
|
25
|
+
path: resolvedPath,
|
|
26
|
+
body,
|
|
27
|
+
});
|
|
28
|
+
};
|
|
5
29
|
export const se_GetPersonalizedRankingCommand = async (input, context) => {
|
|
6
30
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
31
|
const headers = {
|
|
@@ -15,6 +39,7 @@ export const se_GetPersonalizedRankingCommand = async (input, context) => {
|
|
|
15
39
|
filterArn: [],
|
|
16
40
|
filterValues: (_) => _json(_),
|
|
17
41
|
inputList: (_) => _json(_),
|
|
42
|
+
metadataColumns: (_) => _json(_),
|
|
18
43
|
userId: [],
|
|
19
44
|
}));
|
|
20
45
|
return new __HttpRequest({
|
|
@@ -40,6 +65,7 @@ export const se_GetRecommendationsCommand = async (input, context) => {
|
|
|
40
65
|
filterArn: [],
|
|
41
66
|
filterValues: (_) => _json(_),
|
|
42
67
|
itemId: [],
|
|
68
|
+
metadataColumns: (_) => _json(_),
|
|
43
69
|
numResults: [],
|
|
44
70
|
promotions: (_) => _json(_),
|
|
45
71
|
recommenderArn: [],
|
|
@@ -55,6 +81,43 @@ export const se_GetRecommendationsCommand = async (input, context) => {
|
|
|
55
81
|
body,
|
|
56
82
|
});
|
|
57
83
|
};
|
|
84
|
+
export const de_GetActionRecommendationsCommand = async (output, context) => {
|
|
85
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
86
|
+
return de_GetActionRecommendationsCommandError(output, context);
|
|
87
|
+
}
|
|
88
|
+
const contents = map({
|
|
89
|
+
$metadata: deserializeMetadata(output),
|
|
90
|
+
});
|
|
91
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
92
|
+
const doc = take(data, {
|
|
93
|
+
actionList: (_) => de_ActionList(_, context),
|
|
94
|
+
recommendationId: __expectString,
|
|
95
|
+
});
|
|
96
|
+
Object.assign(contents, doc);
|
|
97
|
+
return contents;
|
|
98
|
+
};
|
|
99
|
+
const de_GetActionRecommendationsCommandError = async (output, context) => {
|
|
100
|
+
const parsedOutput = {
|
|
101
|
+
...output,
|
|
102
|
+
body: await parseErrorBody(output.body, context),
|
|
103
|
+
};
|
|
104
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
105
|
+
switch (errorCode) {
|
|
106
|
+
case "InvalidInputException":
|
|
107
|
+
case "com.amazonaws.personalizeruntime#InvalidInputException":
|
|
108
|
+
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
109
|
+
case "ResourceNotFoundException":
|
|
110
|
+
case "com.amazonaws.personalizeruntime#ResourceNotFoundException":
|
|
111
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
112
|
+
default:
|
|
113
|
+
const parsedBody = parsedOutput.body;
|
|
114
|
+
return throwDefaultError({
|
|
115
|
+
output,
|
|
116
|
+
parsedBody,
|
|
117
|
+
errorCode,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
};
|
|
58
121
|
export const de_GetPersonalizedRankingCommand = async (output, context) => {
|
|
59
122
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
60
123
|
return de_GetPersonalizedRankingCommandError(output, context);
|
|
@@ -156,6 +219,14 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
156
219
|
});
|
|
157
220
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
158
221
|
};
|
|
222
|
+
const de_ActionList = (output, context) => {
|
|
223
|
+
const retVal = (output || [])
|
|
224
|
+
.filter((e) => e != null)
|
|
225
|
+
.map((entry) => {
|
|
226
|
+
return de_PredictedAction(entry, context);
|
|
227
|
+
});
|
|
228
|
+
return retVal;
|
|
229
|
+
};
|
|
159
230
|
const de_ItemList = (output, context) => {
|
|
160
231
|
const retVal = (output || [])
|
|
161
232
|
.filter((e) => e != null)
|
|
@@ -164,9 +235,16 @@ const de_ItemList = (output, context) => {
|
|
|
164
235
|
});
|
|
165
236
|
return retVal;
|
|
166
237
|
};
|
|
238
|
+
const de_PredictedAction = (output, context) => {
|
|
239
|
+
return take(output, {
|
|
240
|
+
actionId: __expectString,
|
|
241
|
+
score: __limitedParseDouble,
|
|
242
|
+
});
|
|
243
|
+
};
|
|
167
244
|
const de_PredictedItem = (output, context) => {
|
|
168
245
|
return take(output, {
|
|
169
246
|
itemId: __expectString,
|
|
247
|
+
metadata: _json,
|
|
170
248
|
promotionName: __expectString,
|
|
171
249
|
score: __limitedParseDouble,
|
|
172
250
|
});
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
|
+
import { GetActionRecommendationsCommandInput, GetActionRecommendationsCommandOutput } from "./commands/GetActionRecommendationsCommand";
|
|
2
3
|
import { GetPersonalizedRankingCommandInput, GetPersonalizedRankingCommandOutput } from "./commands/GetPersonalizedRankingCommand";
|
|
3
4
|
import { GetRecommendationsCommandInput, GetRecommendationsCommandOutput } from "./commands/GetRecommendationsCommand";
|
|
4
5
|
import { PersonalizeRuntimeClient } from "./PersonalizeRuntimeClient";
|
|
5
6
|
export interface PersonalizeRuntime {
|
|
7
|
+
/**
|
|
8
|
+
* @see {@link GetActionRecommendationsCommand}
|
|
9
|
+
*/
|
|
10
|
+
getActionRecommendations(args: GetActionRecommendationsCommandInput, options?: __HttpHandlerOptions): Promise<GetActionRecommendationsCommandOutput>;
|
|
11
|
+
getActionRecommendations(args: GetActionRecommendationsCommandInput, cb: (err: any, data?: GetActionRecommendationsCommandOutput) => void): void;
|
|
12
|
+
getActionRecommendations(args: GetActionRecommendationsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetActionRecommendationsCommandOutput) => void): void;
|
|
6
13
|
/**
|
|
7
14
|
* @see {@link GetPersonalizedRankingCommand}
|
|
8
15
|
*/
|
|
@@ -8,6 +8,7 @@ import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"
|
|
|
8
8
|
import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
|
|
9
9
|
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
10
10
|
import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
11
|
+
import { GetActionRecommendationsCommandInput, GetActionRecommendationsCommandOutput } from "./commands/GetActionRecommendationsCommand";
|
|
11
12
|
import { GetPersonalizedRankingCommandInput, GetPersonalizedRankingCommandOutput } from "./commands/GetPersonalizedRankingCommand";
|
|
12
13
|
import { GetRecommendationsCommandInput, GetRecommendationsCommandOutput } from "./commands/GetRecommendationsCommand";
|
|
13
14
|
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
@@ -16,11 +17,11 @@ export { __Client };
|
|
|
16
17
|
/**
|
|
17
18
|
* @public
|
|
18
19
|
*/
|
|
19
|
-
export type ServiceInputTypes = GetPersonalizedRankingCommandInput | GetRecommendationsCommandInput;
|
|
20
|
+
export type ServiceInputTypes = GetActionRecommendationsCommandInput | GetPersonalizedRankingCommandInput | GetRecommendationsCommandInput;
|
|
20
21
|
/**
|
|
21
22
|
* @public
|
|
22
23
|
*/
|
|
23
|
-
export type ServiceOutputTypes = GetPersonalizedRankingCommandOutput | GetRecommendationsCommandOutput;
|
|
24
|
+
export type ServiceOutputTypes = GetActionRecommendationsCommandOutput | GetPersonalizedRankingCommandOutput | GetRecommendationsCommandOutput;
|
|
24
25
|
/**
|
|
25
26
|
* @public
|
|
26
27
|
*/
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
|
|
4
|
+
import { GetActionRecommendationsRequest, GetActionRecommendationsResponse } from "../models/models_0";
|
|
5
|
+
import { PersonalizeRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PersonalizeRuntimeClient";
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export { __MetadataBearer, $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link GetActionRecommendationsCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface GetActionRecommendationsCommandInput extends GetActionRecommendationsRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link GetActionRecommendationsCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface GetActionRecommendationsCommandOutput extends GetActionRecommendationsResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
* <p>Returns a list of recommended actions in sorted in descending order by prediction score.
|
|
27
|
+
* Use the <code>GetActionRecommendations</code> API if you have a custom
|
|
28
|
+
* campaign that deploys a solution version trained with a PERSONALIZED_ACTIONS recipe.
|
|
29
|
+
* </p>
|
|
30
|
+
* <p>For more information about PERSONALIZED_ACTIONS recipes, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/nexts-best-action-recipes.html">PERSONALIZED_ACTIONS recipes</a>.
|
|
31
|
+
* For more information about getting action recommendations, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/get-action-recommendations.html">Getting action recommendations</a>.</p>
|
|
32
|
+
* @example
|
|
33
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
34
|
+
* ```javascript
|
|
35
|
+
* import { PersonalizeRuntimeClient, GetActionRecommendationsCommand } from "@aws-sdk/client-personalize-runtime"; // ES Modules import
|
|
36
|
+
* // const { PersonalizeRuntimeClient, GetActionRecommendationsCommand } = require("@aws-sdk/client-personalize-runtime"); // CommonJS import
|
|
37
|
+
* const client = new PersonalizeRuntimeClient(config);
|
|
38
|
+
* const input = { // GetActionRecommendationsRequest
|
|
39
|
+
* campaignArn: "STRING_VALUE",
|
|
40
|
+
* userId: "STRING_VALUE",
|
|
41
|
+
* numResults: Number("int"),
|
|
42
|
+
* filterArn: "STRING_VALUE",
|
|
43
|
+
* filterValues: { // FilterValues
|
|
44
|
+
* "<keys>": "STRING_VALUE",
|
|
45
|
+
* },
|
|
46
|
+
* };
|
|
47
|
+
* const command = new GetActionRecommendationsCommand(input);
|
|
48
|
+
* const response = await client.send(command);
|
|
49
|
+
* // { // GetActionRecommendationsResponse
|
|
50
|
+
* // actionList: [ // ActionList
|
|
51
|
+
* // { // PredictedAction
|
|
52
|
+
* // actionId: "STRING_VALUE",
|
|
53
|
+
* // score: Number("double"),
|
|
54
|
+
* // },
|
|
55
|
+
* // ],
|
|
56
|
+
* // recommendationId: "STRING_VALUE",
|
|
57
|
+
* // };
|
|
58
|
+
*
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @param GetActionRecommendationsCommandInput - {@link GetActionRecommendationsCommandInput}
|
|
62
|
+
* @returns {@link GetActionRecommendationsCommandOutput}
|
|
63
|
+
* @see {@link GetActionRecommendationsCommandInput} for command's `input` shape.
|
|
64
|
+
* @see {@link GetActionRecommendationsCommandOutput} for command's `response` shape.
|
|
65
|
+
* @see {@link PersonalizeRuntimeClientResolvedConfig | config} for PersonalizeRuntimeClient's `config` shape.
|
|
66
|
+
*
|
|
67
|
+
* @throws {@link InvalidInputException} (client fault)
|
|
68
|
+
* <p>Provide a valid value for the field or parameter.</p>
|
|
69
|
+
*
|
|
70
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
71
|
+
* <p>The specified resource does not exist.</p>
|
|
72
|
+
*
|
|
73
|
+
* @throws {@link PersonalizeRuntimeServiceException}
|
|
74
|
+
* <p>Base exception class for all service exceptions from PersonalizeRuntime service.</p>
|
|
75
|
+
*
|
|
76
|
+
*/
|
|
77
|
+
export declare class GetActionRecommendationsCommand extends $Command<GetActionRecommendationsCommandInput, GetActionRecommendationsCommandOutput, PersonalizeRuntimeClientResolvedConfig> {
|
|
78
|
+
readonly input: GetActionRecommendationsCommandInput;
|
|
79
|
+
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
80
|
+
/**
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
constructor(input: GetActionRecommendationsCommandInput);
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: PersonalizeRuntimeClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetActionRecommendationsCommandInput, GetActionRecommendationsCommandOutput>;
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
private serialize;
|
|
92
|
+
/**
|
|
93
|
+
* @internal
|
|
94
|
+
*/
|
|
95
|
+
private deserialize;
|
|
96
|
+
}
|
|
@@ -48,6 +48,11 @@ export interface GetPersonalizedRankingCommandOutput extends GetPersonalizedRank
|
|
|
48
48
|
* filterValues: { // FilterValues
|
|
49
49
|
* "<keys>": "STRING_VALUE",
|
|
50
50
|
* },
|
|
51
|
+
* metadataColumns: { // MetadataColumns
|
|
52
|
+
* "<keys>": [ // ColumnNamesList
|
|
53
|
+
* "STRING_VALUE",
|
|
54
|
+
* ],
|
|
55
|
+
* },
|
|
51
56
|
* };
|
|
52
57
|
* const command = new GetPersonalizedRankingCommand(input);
|
|
53
58
|
* const response = await client.send(command);
|
|
@@ -57,6 +62,9 @@ export interface GetPersonalizedRankingCommandOutput extends GetPersonalizedRank
|
|
|
57
62
|
* // itemId: "STRING_VALUE",
|
|
58
63
|
* // score: Number("double"),
|
|
59
64
|
* // promotionName: "STRING_VALUE",
|
|
65
|
+
* // metadata: { // Metadata
|
|
66
|
+
* // "<keys>": "STRING_VALUE",
|
|
67
|
+
* // },
|
|
60
68
|
* // },
|
|
61
69
|
* // ],
|
|
62
70
|
* // recommendationId: "STRING_VALUE",
|
|
@@ -70,6 +70,11 @@ export interface GetRecommendationsCommandOutput extends GetRecommendationsRespo
|
|
|
70
70
|
* },
|
|
71
71
|
* },
|
|
72
72
|
* ],
|
|
73
|
+
* metadataColumns: { // MetadataColumns
|
|
74
|
+
* "<keys>": [ // ColumnNamesList
|
|
75
|
+
* "STRING_VALUE",
|
|
76
|
+
* ],
|
|
77
|
+
* },
|
|
73
78
|
* };
|
|
74
79
|
* const command = new GetRecommendationsCommand(input);
|
|
75
80
|
* const response = await client.send(command);
|
|
@@ -79,6 +84,9 @@ export interface GetRecommendationsCommandOutput extends GetRecommendationsRespo
|
|
|
79
84
|
* // itemId: "STRING_VALUE",
|
|
80
85
|
* // score: Number("double"),
|
|
81
86
|
* // promotionName: "STRING_VALUE",
|
|
87
|
+
* // metadata: { // Metadata
|
|
88
|
+
* // "<keys>": "STRING_VALUE",
|
|
89
|
+
* // },
|
|
82
90
|
* // },
|
|
83
91
|
* // ],
|
|
84
92
|
* // recommendationId: "STRING_VALUE",
|
|
@@ -1,5 +1,105 @@
|
|
|
1
1
|
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
|
|
2
2
|
import { PersonalizeRuntimeServiceException as __BaseException } from "./PersonalizeRuntimeServiceException";
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
* <p>An object that identifies an action.</p>
|
|
6
|
+
* <p>The API returns a list of
|
|
7
|
+
* <code>PredictedAction</code>s.</p>
|
|
8
|
+
*/
|
|
9
|
+
export interface PredictedAction {
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
* <p>The ID of the recommended action.</p>
|
|
13
|
+
*/
|
|
14
|
+
actionId?: string;
|
|
15
|
+
/**
|
|
16
|
+
* @public
|
|
17
|
+
* <p>The score of the recommended action. For information about action scores, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/how-action-recommendation-scoring-works.html">How action recommendation scoring works</a>.</p>
|
|
18
|
+
*/
|
|
19
|
+
score?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export interface GetActionRecommendationsRequest {
|
|
25
|
+
/**
|
|
26
|
+
* @public
|
|
27
|
+
* <p>The Amazon Resource Name (ARN) of the campaign to use for getting action recommendations. This campaign must deploy a solution version trained with a PERSONALIZED_ACTIONS recipe.</p>
|
|
28
|
+
*/
|
|
29
|
+
campaignArn?: string;
|
|
30
|
+
/**
|
|
31
|
+
* @public
|
|
32
|
+
* <p>The user ID of the user to provide action recommendations for.</p>
|
|
33
|
+
*/
|
|
34
|
+
userId?: string;
|
|
35
|
+
/**
|
|
36
|
+
* @public
|
|
37
|
+
* <p>The number of results to return. The default is 5. The maximum is 100.</p>
|
|
38
|
+
*/
|
|
39
|
+
numResults?: number;
|
|
40
|
+
/**
|
|
41
|
+
* @public
|
|
42
|
+
* <p>The ARN of the filter to apply to the returned recommendations. For more information, see
|
|
43
|
+
* <a href="https://docs.aws.amazon.com/personalize/latest/dg/filter.html">Filtering Recommendations</a>.</p>
|
|
44
|
+
* <p>When using this parameter, be sure the filter resource is <code>ACTIVE</code>.</p>
|
|
45
|
+
*/
|
|
46
|
+
filterArn?: string;
|
|
47
|
+
/**
|
|
48
|
+
* @public
|
|
49
|
+
* <p>The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case)
|
|
50
|
+
* as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma.
|
|
51
|
+
* </p>
|
|
52
|
+
* <p>For filter expressions that use an <code>INCLUDE</code> element to include actions,
|
|
53
|
+
* you must provide values for all parameters that are defined in the expression. For
|
|
54
|
+
* filters with expressions that use an <code>EXCLUDE</code> element to exclude actions, you
|
|
55
|
+
* can omit the <code>filter-values</code>. In this case, Amazon Personalize doesn't use that portion of
|
|
56
|
+
* the expression to filter recommendations.</p>
|
|
57
|
+
* <p>For more information, see
|
|
58
|
+
* <a href="https://docs.aws.amazon.com/personalize/latest/dg/filter.html">Filtering recommendations and user segments</a>.</p>
|
|
59
|
+
*/
|
|
60
|
+
filterValues?: Record<string, string>;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
export interface GetActionRecommendationsResponse {
|
|
66
|
+
/**
|
|
67
|
+
* @public
|
|
68
|
+
* <p>A list of action recommendations sorted in descending order by prediction score. There can be a maximum of 100 actions
|
|
69
|
+
* in the list. For information about action scores, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/how-action-recommendation-scoring-works.html">How action recommendation scoring
|
|
70
|
+
* works</a>.</p>
|
|
71
|
+
*/
|
|
72
|
+
actionList?: PredictedAction[];
|
|
73
|
+
/**
|
|
74
|
+
* @public
|
|
75
|
+
* <p>The ID of the recommendation.</p>
|
|
76
|
+
*/
|
|
77
|
+
recommendationId?: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* @public
|
|
81
|
+
* <p>Provide a valid value for the field or parameter.</p>
|
|
82
|
+
*/
|
|
83
|
+
export declare class InvalidInputException extends __BaseException {
|
|
84
|
+
readonly name: "InvalidInputException";
|
|
85
|
+
readonly $fault: "client";
|
|
86
|
+
/**
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
constructor(opts: __ExceptionOptionType<InvalidInputException, __BaseException>);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* @public
|
|
93
|
+
* <p>The specified resource does not exist.</p>
|
|
94
|
+
*/
|
|
95
|
+
export declare class ResourceNotFoundException extends __BaseException {
|
|
96
|
+
readonly name: "ResourceNotFoundException";
|
|
97
|
+
readonly $fault: "client";
|
|
98
|
+
/**
|
|
99
|
+
* @internal
|
|
100
|
+
*/
|
|
101
|
+
constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
|
|
102
|
+
}
|
|
3
103
|
/**
|
|
4
104
|
* @public
|
|
5
105
|
*/
|
|
@@ -13,7 +113,8 @@ export interface GetPersonalizedRankingRequest {
|
|
|
13
113
|
/**
|
|
14
114
|
* @public
|
|
15
115
|
* <p>A list of items (by <code>itemId</code>) to rank. If an item was not included in the training dataset,
|
|
16
|
-
* the item is appended to the end of the reranked list.
|
|
116
|
+
* the item is appended to the end of the reranked list. If you are including
|
|
117
|
+
* metadata in recommendations, the maximum is 50. Otherwise, the maximum is 500.</p>
|
|
17
118
|
*/
|
|
18
119
|
inputList: string[] | undefined;
|
|
19
120
|
/**
|
|
@@ -49,6 +150,17 @@ export interface GetPersonalizedRankingRequest {
|
|
|
49
150
|
* <a href="https://docs.aws.amazon.com/personalize/latest/dg/filter.html">Filtering Recommendations</a>.</p>
|
|
50
151
|
*/
|
|
51
152
|
filterValues?: Record<string, string>;
|
|
153
|
+
/**
|
|
154
|
+
* @public
|
|
155
|
+
* <p>If you enabled metadata in recommendations when you created or updated the campaign, specify metadata columns from your Items dataset to include
|
|
156
|
+
* in the personalized ranking.
|
|
157
|
+
* The map key is <code>ITEMS</code> and the value is a list of column names from your Items dataset.
|
|
158
|
+
* The maximum number of columns you can provide is 10.</p>
|
|
159
|
+
* <p>
|
|
160
|
+
* For information about enabling metadata for a campaign, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/create-campaign-return-metadata.html">Enabling metadata in recommendations for a campaign</a>.
|
|
161
|
+
* </p>
|
|
162
|
+
*/
|
|
163
|
+
metadataColumns?: Record<string, string[]>;
|
|
52
164
|
}
|
|
53
165
|
/**
|
|
54
166
|
* @public
|
|
@@ -73,6 +185,11 @@ export interface PredictedItem {
|
|
|
73
185
|
* <p>The name of the promotion that included the predicted item.</p>
|
|
74
186
|
*/
|
|
75
187
|
promotionName?: string;
|
|
188
|
+
/**
|
|
189
|
+
* @public
|
|
190
|
+
* <p>Metadata about the item from your Items dataset.</p>
|
|
191
|
+
*/
|
|
192
|
+
metadata?: Record<string, string>;
|
|
76
193
|
}
|
|
77
194
|
/**
|
|
78
195
|
* @public
|
|
@@ -89,30 +206,6 @@ export interface GetPersonalizedRankingResponse {
|
|
|
89
206
|
*/
|
|
90
207
|
recommendationId?: string;
|
|
91
208
|
}
|
|
92
|
-
/**
|
|
93
|
-
* @public
|
|
94
|
-
* <p>Provide a valid value for the field or parameter.</p>
|
|
95
|
-
*/
|
|
96
|
-
export declare class InvalidInputException extends __BaseException {
|
|
97
|
-
readonly name: "InvalidInputException";
|
|
98
|
-
readonly $fault: "client";
|
|
99
|
-
/**
|
|
100
|
-
* @internal
|
|
101
|
-
*/
|
|
102
|
-
constructor(opts: __ExceptionOptionType<InvalidInputException, __BaseException>);
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* @public
|
|
106
|
-
* <p>The specified resource does not exist.</p>
|
|
107
|
-
*/
|
|
108
|
-
export declare class ResourceNotFoundException extends __BaseException {
|
|
109
|
-
readonly name: "ResourceNotFoundException";
|
|
110
|
-
readonly $fault: "client";
|
|
111
|
-
/**
|
|
112
|
-
* @internal
|
|
113
|
-
*/
|
|
114
|
-
constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
|
|
115
|
-
}
|
|
116
209
|
/**
|
|
117
210
|
* @public
|
|
118
211
|
* <p>Contains information on a promotion. A promotion defines additional business rules that apply to a configurable subset of recommended items.</p>
|
|
@@ -172,7 +265,8 @@ export interface GetRecommendationsRequest {
|
|
|
172
265
|
userId?: string;
|
|
173
266
|
/**
|
|
174
267
|
* @public
|
|
175
|
-
* <p>The number of results to return. The default is 25.
|
|
268
|
+
* <p>The number of results to return. The default is 25. If you are including
|
|
269
|
+
* metadata in recommendations, the maximum is 50. Otherwise, the maximum is 500.</p>
|
|
176
270
|
*/
|
|
177
271
|
numResults?: number;
|
|
178
272
|
/**
|
|
@@ -215,6 +309,17 @@ export interface GetRecommendationsRequest {
|
|
|
215
309
|
* A promotion defines additional business rules that apply to a configurable subset of recommended items.</p>
|
|
216
310
|
*/
|
|
217
311
|
promotions?: Promotion[];
|
|
312
|
+
/**
|
|
313
|
+
* @public
|
|
314
|
+
* <p>If you enabled metadata in recommendations when you created or updated the campaign or recommender, specify the metadata columns from your Items dataset to include in item recommendations.
|
|
315
|
+
* The map key is <code>ITEMS</code> and the value is a list of column names from your Items dataset.
|
|
316
|
+
* The maximum number of columns you can provide is 10.</p>
|
|
317
|
+
* <p>
|
|
318
|
+
* For information about enabling metadata for a campaign, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/create-campaign-return-metadata.html">Enabling metadata in recommendations for a campaign</a>.
|
|
319
|
+
* For information about enabling metadata for a recommender, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/create-recommender-return-metadata.html">Enabling metadata in recommendations for a recommender</a>.
|
|
320
|
+
* </p>
|
|
321
|
+
*/
|
|
322
|
+
metadataColumns?: Record<string, string[]>;
|
|
218
323
|
}
|
|
219
324
|
/**
|
|
220
325
|
* @public
|
|
@@ -232,6 +337,10 @@ export interface GetRecommendationsResponse {
|
|
|
232
337
|
*/
|
|
233
338
|
recommendationId?: string;
|
|
234
339
|
}
|
|
340
|
+
/**
|
|
341
|
+
* @internal
|
|
342
|
+
*/
|
|
343
|
+
export declare const GetActionRecommendationsRequestFilterSensitiveLog: (obj: GetActionRecommendationsRequest) => any;
|
|
235
344
|
/**
|
|
236
345
|
* @internal
|
|
237
346
|
*/
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
|
|
2
2
|
import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
3
|
+
import { GetActionRecommendationsCommandInput, GetActionRecommendationsCommandOutput } from "../commands/GetActionRecommendationsCommand";
|
|
3
4
|
import { GetPersonalizedRankingCommandInput, GetPersonalizedRankingCommandOutput } from "../commands/GetPersonalizedRankingCommand";
|
|
4
5
|
import { GetRecommendationsCommandInput, GetRecommendationsCommandOutput } from "../commands/GetRecommendationsCommand";
|
|
6
|
+
/**
|
|
7
|
+
* serializeAws_restJson1GetActionRecommendationsCommand
|
|
8
|
+
*/
|
|
9
|
+
export declare const se_GetActionRecommendationsCommand: (input: GetActionRecommendationsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
5
10
|
/**
|
|
6
11
|
* serializeAws_restJson1GetPersonalizedRankingCommand
|
|
7
12
|
*/
|
|
@@ -10,6 +15,10 @@ export declare const se_GetPersonalizedRankingCommand: (input: GetPersonalizedRa
|
|
|
10
15
|
* serializeAws_restJson1GetRecommendationsCommand
|
|
11
16
|
*/
|
|
12
17
|
export declare const se_GetRecommendationsCommand: (input: GetRecommendationsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
18
|
+
/**
|
|
19
|
+
* deserializeAws_restJson1GetActionRecommendationsCommand
|
|
20
|
+
*/
|
|
21
|
+
export declare const de_GetActionRecommendationsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetActionRecommendationsCommandOutput>;
|
|
13
22
|
/**
|
|
14
23
|
* deserializeAws_restJson1GetPersonalizedRankingCommand
|
|
15
24
|
*/
|
|
@@ -30,7 +30,7 @@ export declare const getRuntimeConfig: (config: PersonalizeRuntimeClientConfig)
|
|
|
30
30
|
serviceId: string;
|
|
31
31
|
logger: import("@smithy/types").Logger;
|
|
32
32
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
33
|
-
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").
|
|
33
|
+
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
|
|
34
34
|
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
|
35
35
|
logger?: import("@smithy/types").Logger | undefined;
|
|
36
36
|
}) => import("@smithy/types").EndpointV2;
|
|
@@ -30,7 +30,7 @@ export declare const getRuntimeConfig: (config: PersonalizeRuntimeClientConfig)
|
|
|
30
30
|
serviceId: string;
|
|
31
31
|
logger: import("@smithy/types").Logger;
|
|
32
32
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
33
|
-
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").
|
|
33
|
+
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
|
|
34
34
|
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
|
35
35
|
logger?: import("@smithy/types").Logger | undefined;
|
|
36
36
|
}) => import("@smithy/types").EndpointV2;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
|
+
import {
|
|
3
|
+
GetActionRecommendationsCommandInput,
|
|
4
|
+
GetActionRecommendationsCommandOutput,
|
|
5
|
+
} from "./commands/GetActionRecommendationsCommand";
|
|
2
6
|
import {
|
|
3
7
|
GetPersonalizedRankingCommandInput,
|
|
4
8
|
GetPersonalizedRankingCommandOutput,
|
|
@@ -9,6 +13,19 @@ import {
|
|
|
9
13
|
} from "./commands/GetRecommendationsCommand";
|
|
10
14
|
import { PersonalizeRuntimeClient } from "./PersonalizeRuntimeClient";
|
|
11
15
|
export interface PersonalizeRuntime {
|
|
16
|
+
getActionRecommendations(
|
|
17
|
+
args: GetActionRecommendationsCommandInput,
|
|
18
|
+
options?: __HttpHandlerOptions
|
|
19
|
+
): Promise<GetActionRecommendationsCommandOutput>;
|
|
20
|
+
getActionRecommendations(
|
|
21
|
+
args: GetActionRecommendationsCommandInput,
|
|
22
|
+
cb: (err: any, data?: GetActionRecommendationsCommandOutput) => void
|
|
23
|
+
): void;
|
|
24
|
+
getActionRecommendations(
|
|
25
|
+
args: GetActionRecommendationsCommandInput,
|
|
26
|
+
options: __HttpHandlerOptions,
|
|
27
|
+
cb: (err: any, data?: GetActionRecommendationsCommandOutput) => void
|
|
28
|
+
): void;
|
|
12
29
|
getPersonalizedRanking(
|
|
13
30
|
args: GetPersonalizedRankingCommandInput,
|
|
14
31
|
options?: __HttpHandlerOptions
|
|
@@ -45,6 +45,10 @@ import {
|
|
|
45
45
|
UrlParser as __UrlParser,
|
|
46
46
|
UserAgent as __UserAgent,
|
|
47
47
|
} from "@smithy/types";
|
|
48
|
+
import {
|
|
49
|
+
GetActionRecommendationsCommandInput,
|
|
50
|
+
GetActionRecommendationsCommandOutput,
|
|
51
|
+
} from "./commands/GetActionRecommendationsCommand";
|
|
48
52
|
import {
|
|
49
53
|
GetPersonalizedRankingCommandInput,
|
|
50
54
|
GetPersonalizedRankingCommandOutput,
|
|
@@ -61,9 +65,11 @@ import {
|
|
|
61
65
|
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
62
66
|
export { __Client };
|
|
63
67
|
export type ServiceInputTypes =
|
|
68
|
+
| GetActionRecommendationsCommandInput
|
|
64
69
|
| GetPersonalizedRankingCommandInput
|
|
65
70
|
| GetRecommendationsCommandInput;
|
|
66
71
|
export type ServiceOutputTypes =
|
|
72
|
+
| GetActionRecommendationsCommandOutput
|
|
67
73
|
| GetPersonalizedRankingCommandOutput
|
|
68
74
|
| GetRecommendationsCommandOutput;
|
|
69
75
|
export interface ClientDefaults
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
|
+
import {
|
|
4
|
+
Handler,
|
|
5
|
+
HttpHandlerOptions as __HttpHandlerOptions,
|
|
6
|
+
MetadataBearer as __MetadataBearer,
|
|
7
|
+
MiddlewareStack,
|
|
8
|
+
} from "@smithy/types";
|
|
9
|
+
import {
|
|
10
|
+
GetActionRecommendationsRequest,
|
|
11
|
+
GetActionRecommendationsResponse,
|
|
12
|
+
} from "../models/models_0";
|
|
13
|
+
import {
|
|
14
|
+
PersonalizeRuntimeClientResolvedConfig,
|
|
15
|
+
ServiceInputTypes,
|
|
16
|
+
ServiceOutputTypes,
|
|
17
|
+
} from "../PersonalizeRuntimeClient";
|
|
18
|
+
export { __MetadataBearer, $Command };
|
|
19
|
+
export interface GetActionRecommendationsCommandInput
|
|
20
|
+
extends GetActionRecommendationsRequest {}
|
|
21
|
+
export interface GetActionRecommendationsCommandOutput
|
|
22
|
+
extends GetActionRecommendationsResponse,
|
|
23
|
+
__MetadataBearer {}
|
|
24
|
+
export declare class GetActionRecommendationsCommand extends $Command<
|
|
25
|
+
GetActionRecommendationsCommandInput,
|
|
26
|
+
GetActionRecommendationsCommandOutput,
|
|
27
|
+
PersonalizeRuntimeClientResolvedConfig
|
|
28
|
+
> {
|
|
29
|
+
readonly input: GetActionRecommendationsCommandInput;
|
|
30
|
+
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
31
|
+
constructor(input: GetActionRecommendationsCommandInput);
|
|
32
|
+
resolveMiddleware(
|
|
33
|
+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
34
|
+
configuration: PersonalizeRuntimeClientResolvedConfig,
|
|
35
|
+
options?: __HttpHandlerOptions
|
|
36
|
+
): Handler<
|
|
37
|
+
GetActionRecommendationsCommandInput,
|
|
38
|
+
GetActionRecommendationsCommandOutput
|
|
39
|
+
>;
|
|
40
|
+
private serialize;
|
|
41
|
+
private deserialize;
|
|
42
|
+
}
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
|
|
2
2
|
import { PersonalizeRuntimeServiceException as __BaseException } from "./PersonalizeRuntimeServiceException";
|
|
3
|
-
export interface
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
export interface PredictedAction {
|
|
4
|
+
actionId?: string;
|
|
5
|
+
score?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface GetActionRecommendationsRequest {
|
|
8
|
+
campaignArn?: string;
|
|
9
|
+
userId?: string;
|
|
10
|
+
numResults?: number;
|
|
8
11
|
filterArn?: string;
|
|
9
12
|
filterValues?: Record<string, string>;
|
|
10
13
|
}
|
|
11
|
-
export interface
|
|
12
|
-
|
|
13
|
-
score?: number;
|
|
14
|
-
promotionName?: string;
|
|
15
|
-
}
|
|
16
|
-
export interface GetPersonalizedRankingResponse {
|
|
17
|
-
personalizedRanking?: PredictedItem[];
|
|
14
|
+
export interface GetActionRecommendationsResponse {
|
|
15
|
+
actionList?: PredictedAction[];
|
|
18
16
|
recommendationId?: string;
|
|
19
17
|
}
|
|
20
18
|
export declare class InvalidInputException extends __BaseException {
|
|
@@ -31,6 +29,25 @@ export declare class ResourceNotFoundException extends __BaseException {
|
|
|
31
29
|
opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>
|
|
32
30
|
);
|
|
33
31
|
}
|
|
32
|
+
export interface GetPersonalizedRankingRequest {
|
|
33
|
+
campaignArn: string | undefined;
|
|
34
|
+
inputList: string[] | undefined;
|
|
35
|
+
userId: string | undefined;
|
|
36
|
+
context?: Record<string, string>;
|
|
37
|
+
filterArn?: string;
|
|
38
|
+
filterValues?: Record<string, string>;
|
|
39
|
+
metadataColumns?: Record<string, string[]>;
|
|
40
|
+
}
|
|
41
|
+
export interface PredictedItem {
|
|
42
|
+
itemId?: string;
|
|
43
|
+
score?: number;
|
|
44
|
+
promotionName?: string;
|
|
45
|
+
metadata?: Record<string, string>;
|
|
46
|
+
}
|
|
47
|
+
export interface GetPersonalizedRankingResponse {
|
|
48
|
+
personalizedRanking?: PredictedItem[];
|
|
49
|
+
recommendationId?: string;
|
|
50
|
+
}
|
|
34
51
|
export interface Promotion {
|
|
35
52
|
name?: string;
|
|
36
53
|
percentPromotedItems?: number;
|
|
@@ -47,11 +64,15 @@ export interface GetRecommendationsRequest {
|
|
|
47
64
|
filterValues?: Record<string, string>;
|
|
48
65
|
recommenderArn?: string;
|
|
49
66
|
promotions?: Promotion[];
|
|
67
|
+
metadataColumns?: Record<string, string[]>;
|
|
50
68
|
}
|
|
51
69
|
export interface GetRecommendationsResponse {
|
|
52
70
|
itemList?: PredictedItem[];
|
|
53
71
|
recommendationId?: string;
|
|
54
72
|
}
|
|
73
|
+
export declare const GetActionRecommendationsRequestFilterSensitiveLog: (
|
|
74
|
+
obj: GetActionRecommendationsRequest
|
|
75
|
+
) => any;
|
|
55
76
|
export declare const GetPersonalizedRankingRequestFilterSensitiveLog: (
|
|
56
77
|
obj: GetPersonalizedRankingRequest
|
|
57
78
|
) => any;
|
|
@@ -3,6 +3,10 @@ import {
|
|
|
3
3
|
HttpResponse as __HttpResponse,
|
|
4
4
|
} from "@smithy/protocol-http";
|
|
5
5
|
import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
6
|
+
import {
|
|
7
|
+
GetActionRecommendationsCommandInput,
|
|
8
|
+
GetActionRecommendationsCommandOutput,
|
|
9
|
+
} from "../commands/GetActionRecommendationsCommand";
|
|
6
10
|
import {
|
|
7
11
|
GetPersonalizedRankingCommandInput,
|
|
8
12
|
GetPersonalizedRankingCommandOutput,
|
|
@@ -11,6 +15,10 @@ import {
|
|
|
11
15
|
GetRecommendationsCommandInput,
|
|
12
16
|
GetRecommendationsCommandOutput,
|
|
13
17
|
} from "../commands/GetRecommendationsCommand";
|
|
18
|
+
export declare const se_GetActionRecommendationsCommand: (
|
|
19
|
+
input: GetActionRecommendationsCommandInput,
|
|
20
|
+
context: __SerdeContext
|
|
21
|
+
) => Promise<__HttpRequest>;
|
|
14
22
|
export declare const se_GetPersonalizedRankingCommand: (
|
|
15
23
|
input: GetPersonalizedRankingCommandInput,
|
|
16
24
|
context: __SerdeContext
|
|
@@ -19,6 +27,10 @@ export declare const se_GetRecommendationsCommand: (
|
|
|
19
27
|
input: GetRecommendationsCommandInput,
|
|
20
28
|
context: __SerdeContext
|
|
21
29
|
) => Promise<__HttpRequest>;
|
|
30
|
+
export declare const de_GetActionRecommendationsCommand: (
|
|
31
|
+
output: __HttpResponse,
|
|
32
|
+
context: __SerdeContext
|
|
33
|
+
) => Promise<GetActionRecommendationsCommandOutput>;
|
|
22
34
|
export declare const de_GetPersonalizedRankingCommand: (
|
|
23
35
|
output: __HttpResponse,
|
|
24
36
|
context: __SerdeContext
|
|
@@ -56,9 +56,9 @@ export declare const getRuntimeConfig: (
|
|
|
56
56
|
) &
|
|
57
57
|
(
|
|
58
58
|
| string
|
|
59
|
+
| import("@smithy/types").Provider<string>
|
|
59
60
|
| import("@smithy/types").Endpoint
|
|
60
61
|
| import("@smithy/types").Provider<import("@smithy/types").Endpoint>
|
|
61
|
-
| import("@smithy/types").Provider<string>
|
|
62
62
|
| import("@smithy/types").EndpointV2
|
|
63
63
|
| import("@smithy/types").Provider<import("@smithy/types").EndpointV2>
|
|
64
64
|
))
|
|
@@ -56,9 +56,9 @@ export declare const getRuntimeConfig: (
|
|
|
56
56
|
) &
|
|
57
57
|
(
|
|
58
58
|
| string
|
|
59
|
+
| import("@smithy/types").Provider<string>
|
|
59
60
|
| import("@smithy/types").Endpoint
|
|
60
61
|
| import("@smithy/types").Provider<import("@smithy/types").Endpoint>
|
|
61
|
-
| import("@smithy/types").Provider<string>
|
|
62
62
|
| import("@smithy/types").EndpointV2
|
|
63
63
|
| import("@smithy/types").Provider<import("@smithy/types").EndpointV2>
|
|
64
64
|
))
|
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.
|
|
4
|
+
"version": "3.458.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.458.0",
|
|
25
25
|
"@aws-sdk/core": "3.451.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.458.0",
|
|
27
27
|
"@aws-sdk/middleware-host-header": "3.451.0",
|
|
28
28
|
"@aws-sdk/middleware-logger": "3.451.0",
|
|
29
29
|
"@aws-sdk/middleware-recursion-detection": "3.451.0",
|