@aws-sdk/client-personalize-runtime 3.928.0 → 3.930.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/dist-cjs/index.js +191 -261
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-es/PersonalizeRuntimeClient.js +2 -0
- package/dist-es/commands/GetActionRecommendationsCommand.js +3 -10
- package/dist-es/commands/GetPersonalizedRankingCommand.js +3 -10
- package/dist-es/commands/GetRecommendationsCommand.js +3 -10
- package/dist-es/models/models_0.js +0 -34
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-es/schemas/schemas_0.js +181 -0
- package/dist-types/PersonalizeRuntimeClient.d.ts +10 -1
- package/dist-types/models/models_0.d.ts +0 -28
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +28 -0
- package/dist-types/ts3.4/PersonalizeRuntimeClient.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +0 -19
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +35 -0
- package/package.json +33 -33
- package/dist-es/protocols/Aws_restJson1.js +0 -195
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -29
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -41
package/dist-cjs/index.js
CHANGED
|
@@ -6,6 +6,7 @@ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detect
|
|
|
6
6
|
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
|
|
7
7
|
var configResolver = require('@smithy/config-resolver');
|
|
8
8
|
var core = require('@smithy/core');
|
|
9
|
+
var schema = require('@smithy/core/schema');
|
|
9
10
|
var middlewareContentLength = require('@smithy/middleware-content-length');
|
|
10
11
|
var middlewareEndpoint = require('@smithy/middleware-endpoint');
|
|
11
12
|
var middlewareRetry = require('@smithy/middleware-retry');
|
|
@@ -14,8 +15,6 @@ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
|
|
|
14
15
|
var runtimeConfig = require('./runtimeConfig');
|
|
15
16
|
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
16
17
|
var protocolHttp = require('@smithy/protocol-http');
|
|
17
|
-
var middlewareSerde = require('@smithy/middleware-serde');
|
|
18
|
-
var core$1 = require('@aws-sdk/core');
|
|
19
18
|
|
|
20
19
|
const resolveClientEndpointParameters = (options) => {
|
|
21
20
|
return Object.assign(options, {
|
|
@@ -91,6 +90,7 @@ class PersonalizeRuntimeClient extends smithyClient.Client {
|
|
|
91
90
|
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
|
|
92
91
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
93
92
|
this.config = _config_8;
|
|
93
|
+
this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
|
|
94
94
|
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
|
95
95
|
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
|
|
96
96
|
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
|
|
@@ -110,14 +110,14 @@ class PersonalizeRuntimeClient extends smithyClient.Client {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
class PersonalizeRuntimeServiceException extends smithyClient.ServiceException {
|
|
113
|
+
let PersonalizeRuntimeServiceException$1 = class PersonalizeRuntimeServiceException extends smithyClient.ServiceException {
|
|
114
114
|
constructor(options) {
|
|
115
115
|
super(options);
|
|
116
116
|
Object.setPrototypeOf(this, PersonalizeRuntimeServiceException.prototype);
|
|
117
117
|
}
|
|
118
|
-
}
|
|
118
|
+
};
|
|
119
119
|
|
|
120
|
-
class InvalidInputException extends PersonalizeRuntimeServiceException {
|
|
120
|
+
let InvalidInputException$1 = class InvalidInputException extends PersonalizeRuntimeServiceException$1 {
|
|
121
121
|
name = "InvalidInputException";
|
|
122
122
|
$fault = "client";
|
|
123
123
|
constructor(opts) {
|
|
@@ -128,8 +128,8 @@ class InvalidInputException extends PersonalizeRuntimeServiceException {
|
|
|
128
128
|
});
|
|
129
129
|
Object.setPrototypeOf(this, InvalidInputException.prototype);
|
|
130
130
|
}
|
|
131
|
-
}
|
|
132
|
-
class ResourceNotFoundException extends PersonalizeRuntimeServiceException {
|
|
131
|
+
};
|
|
132
|
+
let ResourceNotFoundException$1 = class ResourceNotFoundException extends PersonalizeRuntimeServiceException$1 {
|
|
133
133
|
name = "ResourceNotFoundException";
|
|
134
134
|
$fault = "client";
|
|
135
135
|
constructor(opts) {
|
|
@@ -140,245 +140,192 @@ class ResourceNotFoundException extends PersonalizeRuntimeServiceException {
|
|
|
140
140
|
});
|
|
141
141
|
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
142
142
|
}
|
|
143
|
-
}
|
|
144
|
-
const GetActionRecommendationsRequestFilterSensitiveLog = (obj) => ({
|
|
145
|
-
...obj,
|
|
146
|
-
...(obj.filterValues && { filterValues: smithyClient.SENSITIVE_STRING }),
|
|
147
|
-
});
|
|
148
|
-
const GetPersonalizedRankingRequestFilterSensitiveLog = (obj) => ({
|
|
149
|
-
...obj,
|
|
150
|
-
...(obj.context && { context: smithyClient.SENSITIVE_STRING }),
|
|
151
|
-
...(obj.filterValues && { filterValues: smithyClient.SENSITIVE_STRING }),
|
|
152
|
-
});
|
|
153
|
-
const PredictedItemFilterSensitiveLog = (obj) => ({
|
|
154
|
-
...obj,
|
|
155
|
-
...(obj.metadata && { metadata: smithyClient.SENSITIVE_STRING }),
|
|
156
|
-
});
|
|
157
|
-
const GetPersonalizedRankingResponseFilterSensitiveLog = (obj) => ({
|
|
158
|
-
...obj,
|
|
159
|
-
...(obj.personalizedRanking && {
|
|
160
|
-
personalizedRanking: obj.personalizedRanking.map((item) => PredictedItemFilterSensitiveLog(item)),
|
|
161
|
-
}),
|
|
162
|
-
});
|
|
163
|
-
const PromotionFilterSensitiveLog = (obj) => ({
|
|
164
|
-
...obj,
|
|
165
|
-
...(obj.filterValues && { filterValues: smithyClient.SENSITIVE_STRING }),
|
|
166
|
-
});
|
|
167
|
-
const GetRecommendationsRequestFilterSensitiveLog = (obj) => ({
|
|
168
|
-
...obj,
|
|
169
|
-
...(obj.context && { context: smithyClient.SENSITIVE_STRING }),
|
|
170
|
-
...(obj.filterValues && { filterValues: smithyClient.SENSITIVE_STRING }),
|
|
171
|
-
...(obj.promotions && { promotions: obj.promotions.map((item) => PromotionFilterSensitiveLog(item)) }),
|
|
172
|
-
});
|
|
173
|
-
const GetRecommendationsResponseFilterSensitiveLog = (obj) => ({
|
|
174
|
-
...obj,
|
|
175
|
-
...(obj.itemList && { itemList: obj.itemList.map((item) => PredictedItemFilterSensitiveLog(item)) }),
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
const se_GetActionRecommendationsCommand = async (input, context) => {
|
|
179
|
-
const b = core.requestBuilder(input, context);
|
|
180
|
-
const headers = {
|
|
181
|
-
"content-type": "application/json",
|
|
182
|
-
};
|
|
183
|
-
b.bp("/action-recommendations");
|
|
184
|
-
let body;
|
|
185
|
-
body = JSON.stringify(smithyClient.take(input, {
|
|
186
|
-
campaignArn: [],
|
|
187
|
-
filterArn: [],
|
|
188
|
-
filterValues: (_) => smithyClient._json(_),
|
|
189
|
-
numResults: [],
|
|
190
|
-
userId: [],
|
|
191
|
-
}));
|
|
192
|
-
b.m("POST").h(headers).b(body);
|
|
193
|
-
return b.build();
|
|
194
|
-
};
|
|
195
|
-
const se_GetPersonalizedRankingCommand = async (input, context) => {
|
|
196
|
-
const b = core.requestBuilder(input, context);
|
|
197
|
-
const headers = {
|
|
198
|
-
"content-type": "application/json",
|
|
199
|
-
};
|
|
200
|
-
b.bp("/personalize-ranking");
|
|
201
|
-
let body;
|
|
202
|
-
body = JSON.stringify(smithyClient.take(input, {
|
|
203
|
-
campaignArn: [],
|
|
204
|
-
context: (_) => smithyClient._json(_),
|
|
205
|
-
filterArn: [],
|
|
206
|
-
filterValues: (_) => smithyClient._json(_),
|
|
207
|
-
inputList: (_) => smithyClient._json(_),
|
|
208
|
-
metadataColumns: (_) => smithyClient._json(_),
|
|
209
|
-
userId: [],
|
|
210
|
-
}));
|
|
211
|
-
b.m("POST").h(headers).b(body);
|
|
212
|
-
return b.build();
|
|
213
|
-
};
|
|
214
|
-
const se_GetRecommendationsCommand = async (input, context) => {
|
|
215
|
-
const b = core.requestBuilder(input, context);
|
|
216
|
-
const headers = {
|
|
217
|
-
"content-type": "application/json",
|
|
218
|
-
};
|
|
219
|
-
b.bp("/recommendations");
|
|
220
|
-
let body;
|
|
221
|
-
body = JSON.stringify(smithyClient.take(input, {
|
|
222
|
-
campaignArn: [],
|
|
223
|
-
context: (_) => smithyClient._json(_),
|
|
224
|
-
filterArn: [],
|
|
225
|
-
filterValues: (_) => smithyClient._json(_),
|
|
226
|
-
itemId: [],
|
|
227
|
-
metadataColumns: (_) => smithyClient._json(_),
|
|
228
|
-
numResults: [],
|
|
229
|
-
promotions: (_) => smithyClient._json(_),
|
|
230
|
-
recommenderArn: [],
|
|
231
|
-
userId: [],
|
|
232
|
-
}));
|
|
233
|
-
b.m("POST").h(headers).b(body);
|
|
234
|
-
return b.build();
|
|
235
|
-
};
|
|
236
|
-
const de_GetActionRecommendationsCommand = async (output, context) => {
|
|
237
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
238
|
-
return de_CommandError(output, context);
|
|
239
|
-
}
|
|
240
|
-
const contents = smithyClient.map({
|
|
241
|
-
$metadata: deserializeMetadata(output),
|
|
242
|
-
});
|
|
243
|
-
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
244
|
-
const doc = smithyClient.take(data, {
|
|
245
|
-
actionList: (_) => de_ActionList(_),
|
|
246
|
-
recommendationId: smithyClient.expectString,
|
|
247
|
-
});
|
|
248
|
-
Object.assign(contents, doc);
|
|
249
|
-
return contents;
|
|
250
143
|
};
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
const
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
144
|
+
|
|
145
|
+
const _AL = "ActionList";
|
|
146
|
+
const _AV = "AttributeValue";
|
|
147
|
+
const _C = "Context";
|
|
148
|
+
const _FAV = "FilterAttributeValue";
|
|
149
|
+
const _FV = "FilterValues";
|
|
150
|
+
const _GAR = "GetActionRecommendations";
|
|
151
|
+
const _GARR = "GetActionRecommendationsRequest";
|
|
152
|
+
const _GARRe = "GetActionRecommendationsResponse";
|
|
153
|
+
const _GPR = "GetPersonalizedRanking";
|
|
154
|
+
const _GPRR = "GetPersonalizedRankingRequest";
|
|
155
|
+
const _GPRRe = "GetPersonalizedRankingResponse";
|
|
156
|
+
const _GR = "GetRecommendations";
|
|
157
|
+
const _GRR = "GetRecommendationsRequest";
|
|
158
|
+
const _GRRe = "GetRecommendationsResponse";
|
|
159
|
+
const _IIE = "InvalidInputException";
|
|
160
|
+
const _IL = "ItemList";
|
|
161
|
+
const _M = "Metadata";
|
|
162
|
+
const _MC = "MetadataColumns";
|
|
163
|
+
const _P = "Promotion";
|
|
164
|
+
const _PA = "PredictedAction";
|
|
165
|
+
const _PI = "PredictedItem";
|
|
166
|
+
const _PL = "PromotionList";
|
|
167
|
+
const _RNFE = "ResourceNotFoundException";
|
|
168
|
+
const _aI = "actionId";
|
|
169
|
+
const _aL = "actionList";
|
|
170
|
+
const _c = "context";
|
|
171
|
+
const _cA = "campaignArn";
|
|
172
|
+
const _cl = "client";
|
|
173
|
+
const _e = "error";
|
|
174
|
+
const _fA = "filterArn";
|
|
175
|
+
const _fV = "filterValues";
|
|
176
|
+
const _h = "http";
|
|
177
|
+
const _hE = "httpError";
|
|
178
|
+
const _iI = "itemId";
|
|
179
|
+
const _iL = "inputList";
|
|
180
|
+
const _iLt = "itemList";
|
|
181
|
+
const _m = "message";
|
|
182
|
+
const _mC = "metadataColumns";
|
|
183
|
+
const _me = "metadata";
|
|
184
|
+
const _n = "name";
|
|
185
|
+
const _nR = "numResults";
|
|
186
|
+
const _p = "promotions";
|
|
187
|
+
const _pN = "promotionName";
|
|
188
|
+
const _pPI = "percentPromotedItems";
|
|
189
|
+
const _pR = "personalizedRanking";
|
|
190
|
+
const _r = "reason";
|
|
191
|
+
const _rA = "recommenderArn";
|
|
192
|
+
const _rI = "recommendationId";
|
|
193
|
+
const _s = "score";
|
|
194
|
+
const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.personalizeruntime";
|
|
195
|
+
const _uI = "userId";
|
|
196
|
+
const n0 = "com.amazonaws.personalizeruntime";
|
|
197
|
+
var AttributeValue = [0, n0, _AV, 8, 0];
|
|
198
|
+
var FilterAttributeValue = [0, n0, _FAV, 8, 0];
|
|
199
|
+
var GetActionRecommendationsRequest = [
|
|
200
|
+
3,
|
|
201
|
+
n0,
|
|
202
|
+
_GARR,
|
|
203
|
+
0,
|
|
204
|
+
[_cA, _uI, _nR, _fA, _fV],
|
|
205
|
+
[0, 0, 1, 0, [() => FilterValues, 0]],
|
|
206
|
+
];
|
|
207
|
+
var GetActionRecommendationsResponse = [
|
|
208
|
+
3,
|
|
209
|
+
n0,
|
|
210
|
+
_GARRe,
|
|
211
|
+
0,
|
|
212
|
+
[_aL, _rI],
|
|
213
|
+
[() => ActionList, 0],
|
|
214
|
+
];
|
|
215
|
+
var GetPersonalizedRankingRequest = [
|
|
216
|
+
3,
|
|
217
|
+
n0,
|
|
218
|
+
_GPRR,
|
|
219
|
+
0,
|
|
220
|
+
[_cA, _iL, _uI, _c, _fA, _fV, _mC],
|
|
221
|
+
[0, 64 | 0, 0, [() => Context, 0], 0, [() => FilterValues, 0], [2, n0, _MC, 0, 0, 64 | 0]],
|
|
222
|
+
];
|
|
223
|
+
var GetPersonalizedRankingResponse = [
|
|
224
|
+
3,
|
|
225
|
+
n0,
|
|
226
|
+
_GPRRe,
|
|
227
|
+
0,
|
|
228
|
+
[_pR, _rI],
|
|
229
|
+
[[() => ItemList, 0], 0],
|
|
230
|
+
];
|
|
231
|
+
var GetRecommendationsRequest = [
|
|
232
|
+
3,
|
|
233
|
+
n0,
|
|
234
|
+
_GRR,
|
|
235
|
+
0,
|
|
236
|
+
[_cA, _iI, _uI, _nR, _c, _fA, _fV, _rA, _p, _mC],
|
|
237
|
+
[0, 0, 0, 1, [() => Context, 0], 0, [() => FilterValues, 0], 0, [() => PromotionList, 0], [2, n0, _MC, 0, 0, 64 | 0]],
|
|
238
|
+
];
|
|
239
|
+
var GetRecommendationsResponse = [3, n0, _GRRe, 0, [_iLt, _rI], [[() => ItemList, 0], 0]];
|
|
240
|
+
var InvalidInputException = [
|
|
241
|
+
-3,
|
|
242
|
+
n0,
|
|
243
|
+
_IIE,
|
|
244
|
+
{
|
|
245
|
+
[_e]: _cl,
|
|
246
|
+
[_hE]: 400,
|
|
247
|
+
},
|
|
248
|
+
[_m],
|
|
249
|
+
[0],
|
|
250
|
+
];
|
|
251
|
+
schema.TypeRegistry.for(n0).registerError(InvalidInputException, InvalidInputException$1);
|
|
252
|
+
var PredictedAction = [3, n0, _PA, 0, [_aI, _s], [0, 1]];
|
|
253
|
+
var PredictedItem = [
|
|
254
|
+
3,
|
|
255
|
+
n0,
|
|
256
|
+
_PI,
|
|
257
|
+
0,
|
|
258
|
+
[_iI, _s, _pN, _me, _r],
|
|
259
|
+
[0, 1, 0, [() => Metadata, 0], 64 | 0],
|
|
260
|
+
];
|
|
261
|
+
var Promotion = [3, n0, _P, 0, [_n, _pPI, _fA, _fV], [0, 1, 0, [() => FilterValues, 0]]];
|
|
262
|
+
var ResourceNotFoundException = [
|
|
263
|
+
-3,
|
|
264
|
+
n0,
|
|
265
|
+
_RNFE,
|
|
266
|
+
{
|
|
267
|
+
[_e]: _cl,
|
|
268
|
+
[_hE]: 404,
|
|
269
|
+
},
|
|
270
|
+
[_m],
|
|
271
|
+
[0],
|
|
272
|
+
];
|
|
273
|
+
schema.TypeRegistry.for(n0).registerError(ResourceNotFoundException, ResourceNotFoundException$1);
|
|
274
|
+
var PersonalizeRuntimeServiceException = [
|
|
275
|
+
-3,
|
|
276
|
+
_sm,
|
|
277
|
+
"PersonalizeRuntimeServiceException",
|
|
278
|
+
0,
|
|
279
|
+
[],
|
|
280
|
+
[],
|
|
281
|
+
];
|
|
282
|
+
schema.TypeRegistry.for(_sm).registerError(PersonalizeRuntimeServiceException, PersonalizeRuntimeServiceException$1);
|
|
283
|
+
var ActionList = [1, n0, _AL, 0, () => PredictedAction];
|
|
284
|
+
var ItemList = [1, n0, _IL, 0, [() => PredictedItem, 0]];
|
|
285
|
+
var PromotionList = [1, n0, _PL, 0, [() => Promotion, 0]];
|
|
286
|
+
var Context = [2, n0, _C, 0, [0, 0], [() => AttributeValue, 0]];
|
|
287
|
+
var FilterValues = [2, n0, _FV, 0, [0, 0], [() => FilterAttributeValue, 0]];
|
|
288
|
+
var Metadata = [2, n0, _M, 8, 0, 0];
|
|
289
|
+
var GetActionRecommendations = [
|
|
290
|
+
9,
|
|
291
|
+
n0,
|
|
292
|
+
_GAR,
|
|
293
|
+
{
|
|
294
|
+
[_h]: ["POST", "/action-recommendations", 200],
|
|
295
|
+
},
|
|
296
|
+
() => GetActionRecommendationsRequest,
|
|
297
|
+
() => GetActionRecommendationsResponse,
|
|
298
|
+
];
|
|
299
|
+
var GetPersonalizedRanking = [
|
|
300
|
+
9,
|
|
301
|
+
n0,
|
|
302
|
+
_GPR,
|
|
303
|
+
{
|
|
304
|
+
[_h]: ["POST", "/personalize-ranking", 200],
|
|
305
|
+
},
|
|
306
|
+
() => GetPersonalizedRankingRequest,
|
|
307
|
+
() => GetPersonalizedRankingResponse,
|
|
308
|
+
];
|
|
309
|
+
var GetRecommendations = [
|
|
310
|
+
9,
|
|
311
|
+
n0,
|
|
312
|
+
_GR,
|
|
313
|
+
{
|
|
314
|
+
[_h]: ["POST", "/recommendations", 200],
|
|
315
|
+
},
|
|
316
|
+
() => GetRecommendationsRequest,
|
|
317
|
+
() => GetRecommendationsResponse,
|
|
318
|
+
];
|
|
367
319
|
|
|
368
320
|
class GetActionRecommendationsCommand extends smithyClient.Command
|
|
369
321
|
.classBuilder()
|
|
370
322
|
.ep(commonParams)
|
|
371
323
|
.m(function (Command, cs, config, o) {
|
|
372
|
-
return [
|
|
373
|
-
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
374
|
-
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
375
|
-
];
|
|
324
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
376
325
|
})
|
|
377
326
|
.s("AmazonPersonalizeRuntime", "GetActionRecommendations", {})
|
|
378
327
|
.n("PersonalizeRuntimeClient", "GetActionRecommendationsCommand")
|
|
379
|
-
.
|
|
380
|
-
.ser(se_GetActionRecommendationsCommand)
|
|
381
|
-
.de(de_GetActionRecommendationsCommand)
|
|
328
|
+
.sc(GetActionRecommendations)
|
|
382
329
|
.build() {
|
|
383
330
|
}
|
|
384
331
|
|
|
@@ -386,16 +333,11 @@ class GetPersonalizedRankingCommand extends smithyClient.Command
|
|
|
386
333
|
.classBuilder()
|
|
387
334
|
.ep(commonParams)
|
|
388
335
|
.m(function (Command, cs, config, o) {
|
|
389
|
-
return [
|
|
390
|
-
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
391
|
-
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
392
|
-
];
|
|
336
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
393
337
|
})
|
|
394
338
|
.s("AmazonPersonalizeRuntime", "GetPersonalizedRanking", {})
|
|
395
339
|
.n("PersonalizeRuntimeClient", "GetPersonalizedRankingCommand")
|
|
396
|
-
.
|
|
397
|
-
.ser(se_GetPersonalizedRankingCommand)
|
|
398
|
-
.de(de_GetPersonalizedRankingCommand)
|
|
340
|
+
.sc(GetPersonalizedRanking)
|
|
399
341
|
.build() {
|
|
400
342
|
}
|
|
401
343
|
|
|
@@ -403,16 +345,11 @@ class GetRecommendationsCommand extends smithyClient.Command
|
|
|
403
345
|
.classBuilder()
|
|
404
346
|
.ep(commonParams)
|
|
405
347
|
.m(function (Command, cs, config, o) {
|
|
406
|
-
return [
|
|
407
|
-
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
408
|
-
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
409
|
-
];
|
|
348
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
410
349
|
})
|
|
411
350
|
.s("AmazonPersonalizeRuntime", "GetRecommendations", {})
|
|
412
351
|
.n("PersonalizeRuntimeClient", "GetRecommendationsCommand")
|
|
413
|
-
.
|
|
414
|
-
.ser(se_GetRecommendationsCommand)
|
|
415
|
-
.de(de_GetRecommendationsCommand)
|
|
352
|
+
.sc(GetRecommendations)
|
|
416
353
|
.build() {
|
|
417
354
|
}
|
|
418
355
|
|
|
@@ -434,17 +371,10 @@ Object.defineProperty(exports, "__Client", {
|
|
|
434
371
|
get: function () { return smithyClient.Client; }
|
|
435
372
|
});
|
|
436
373
|
exports.GetActionRecommendationsCommand = GetActionRecommendationsCommand;
|
|
437
|
-
exports.GetActionRecommendationsRequestFilterSensitiveLog = GetActionRecommendationsRequestFilterSensitiveLog;
|
|
438
374
|
exports.GetPersonalizedRankingCommand = GetPersonalizedRankingCommand;
|
|
439
|
-
exports.GetPersonalizedRankingRequestFilterSensitiveLog = GetPersonalizedRankingRequestFilterSensitiveLog;
|
|
440
|
-
exports.GetPersonalizedRankingResponseFilterSensitiveLog = GetPersonalizedRankingResponseFilterSensitiveLog;
|
|
441
375
|
exports.GetRecommendationsCommand = GetRecommendationsCommand;
|
|
442
|
-
exports.
|
|
443
|
-
exports.GetRecommendationsResponseFilterSensitiveLog = GetRecommendationsResponseFilterSensitiveLog;
|
|
444
|
-
exports.InvalidInputException = InvalidInputException;
|
|
376
|
+
exports.InvalidInputException = InvalidInputException$1;
|
|
445
377
|
exports.PersonalizeRuntime = PersonalizeRuntime;
|
|
446
378
|
exports.PersonalizeRuntimeClient = PersonalizeRuntimeClient;
|
|
447
|
-
exports.PersonalizeRuntimeServiceException = PersonalizeRuntimeServiceException;
|
|
448
|
-
exports.
|
|
449
|
-
exports.PromotionFilterSensitiveLog = PromotionFilterSensitiveLog;
|
|
450
|
-
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
379
|
+
exports.PersonalizeRuntimeServiceException = PersonalizeRuntimeServiceException$1;
|
|
380
|
+
exports.ResourceNotFoundException = ResourceNotFoundException$1;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
4
|
const core_1 = require("@aws-sdk/core");
|
|
5
|
+
const protocols_1 = require("@aws-sdk/core/protocols");
|
|
5
6
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
7
|
const url_parser_1 = require("@smithy/url-parser");
|
|
7
8
|
const util_base64_1 = require("@smithy/util-base64");
|
|
@@ -25,6 +26,7 @@ const getRuntimeConfig = (config) => {
|
|
|
25
26
|
},
|
|
26
27
|
],
|
|
27
28
|
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
|
29
|
+
protocol: config?.protocol ?? new protocols_1.AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.personalizeruntime" }),
|
|
28
30
|
serviceId: config?.serviceId ?? "Personalize Runtime",
|
|
29
31
|
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
|
30
32
|
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
|
@@ -4,6 +4,7 @@ import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detec
|
|
|
4
4
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
5
5
|
import { resolveRegionConfig } from "@smithy/config-resolver";
|
|
6
6
|
import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
|
|
7
|
+
import { getSchemaSerdePlugin } from "@smithy/core/schema";
|
|
7
8
|
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
|
|
8
9
|
import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
|
|
9
10
|
import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
|
|
@@ -28,6 +29,7 @@ export class PersonalizeRuntimeClient extends __Client {
|
|
|
28
29
|
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
29
30
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
30
31
|
this.config = _config_8;
|
|
32
|
+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
31
33
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
32
34
|
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
33
35
|
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
-
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
3
|
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
-
import {
|
|
6
|
-
import { de_GetActionRecommendationsCommand, se_GetActionRecommendationsCommand } from "../protocols/Aws_restJson1";
|
|
4
|
+
import { GetActionRecommendations } from "../schemas/schemas_0";
|
|
7
5
|
export { $Command };
|
|
8
6
|
export class GetActionRecommendationsCommand extends $Command
|
|
9
7
|
.classBuilder()
|
|
10
8
|
.ep(commonParams)
|
|
11
9
|
.m(function (Command, cs, config, o) {
|
|
12
|
-
return [
|
|
13
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
14
|
-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
15
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
16
11
|
})
|
|
17
12
|
.s("AmazonPersonalizeRuntime", "GetActionRecommendations", {})
|
|
18
13
|
.n("PersonalizeRuntimeClient", "GetActionRecommendationsCommand")
|
|
19
|
-
.
|
|
20
|
-
.ser(se_GetActionRecommendationsCommand)
|
|
21
|
-
.de(de_GetActionRecommendationsCommand)
|
|
14
|
+
.sc(GetActionRecommendations)
|
|
22
15
|
.build() {
|
|
23
16
|
}
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
-
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
3
|
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
-
import {
|
|
6
|
-
import { de_GetPersonalizedRankingCommand, se_GetPersonalizedRankingCommand } from "../protocols/Aws_restJson1";
|
|
4
|
+
import { GetPersonalizedRanking } from "../schemas/schemas_0";
|
|
7
5
|
export { $Command };
|
|
8
6
|
export class GetPersonalizedRankingCommand extends $Command
|
|
9
7
|
.classBuilder()
|
|
10
8
|
.ep(commonParams)
|
|
11
9
|
.m(function (Command, cs, config, o) {
|
|
12
|
-
return [
|
|
13
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
14
|
-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
15
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
16
11
|
})
|
|
17
12
|
.s("AmazonPersonalizeRuntime", "GetPersonalizedRanking", {})
|
|
18
13
|
.n("PersonalizeRuntimeClient", "GetPersonalizedRankingCommand")
|
|
19
|
-
.
|
|
20
|
-
.ser(se_GetPersonalizedRankingCommand)
|
|
21
|
-
.de(de_GetPersonalizedRankingCommand)
|
|
14
|
+
.sc(GetPersonalizedRanking)
|
|
22
15
|
.build() {
|
|
23
16
|
}
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
-
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
3
|
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
-
import {
|
|
6
|
-
import { de_GetRecommendationsCommand, se_GetRecommendationsCommand } from "../protocols/Aws_restJson1";
|
|
4
|
+
import { GetRecommendations } from "../schemas/schemas_0";
|
|
7
5
|
export { $Command };
|
|
8
6
|
export class GetRecommendationsCommand extends $Command
|
|
9
7
|
.classBuilder()
|
|
10
8
|
.ep(commonParams)
|
|
11
9
|
.m(function (Command, cs, config, o) {
|
|
12
|
-
return [
|
|
13
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
14
|
-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
15
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
16
11
|
})
|
|
17
12
|
.s("AmazonPersonalizeRuntime", "GetRecommendations", {})
|
|
18
13
|
.n("PersonalizeRuntimeClient", "GetRecommendationsCommand")
|
|
19
|
-
.
|
|
20
|
-
.ser(se_GetRecommendationsCommand)
|
|
21
|
-
.de(de_GetRecommendationsCommand)
|
|
14
|
+
.sc(GetRecommendations)
|
|
22
15
|
.build() {
|
|
23
16
|
}
|