@aws-sdk/client-personalize-runtime 3.987.0 → 3.989.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 CHANGED
@@ -15,6 +15,9 @@ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
15
15
  var runtimeConfig = require('./runtimeConfig');
16
16
  var regionConfigResolver = require('@aws-sdk/region-config-resolver');
17
17
  var protocolHttp = require('@smithy/protocol-http');
18
+ var schemas_0 = require('./schemas/schemas_0');
19
+ var errors = require('./models/errors');
20
+ var PersonalizeRuntimeServiceException = require('./models/PersonalizeRuntimeServiceException');
18
21
 
19
22
  const resolveClientEndpointParameters = (options) => {
20
23
  return Object.assign(options, {
@@ -110,187 +113,6 @@ class PersonalizeRuntimeClient extends smithyClient.Client {
110
113
  }
111
114
  }
112
115
 
113
- class PersonalizeRuntimeServiceException extends smithyClient.ServiceException {
114
- constructor(options) {
115
- super(options);
116
- Object.setPrototypeOf(this, PersonalizeRuntimeServiceException.prototype);
117
- }
118
- }
119
-
120
- class InvalidInputException extends PersonalizeRuntimeServiceException {
121
- name = "InvalidInputException";
122
- $fault = "client";
123
- constructor(opts) {
124
- super({
125
- name: "InvalidInputException",
126
- $fault: "client",
127
- ...opts,
128
- });
129
- Object.setPrototypeOf(this, InvalidInputException.prototype);
130
- }
131
- }
132
- class ResourceNotFoundException extends PersonalizeRuntimeServiceException {
133
- name = "ResourceNotFoundException";
134
- $fault = "client";
135
- constructor(opts) {
136
- super({
137
- name: "ResourceNotFoundException",
138
- $fault: "client",
139
- ...opts,
140
- });
141
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
142
- }
143
- }
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$ = [3, n0, _GARR,
200
- 0,
201
- [_cA, _uI, _nR, _fA, _fV],
202
- [0, 0, 1, 0, [() => FilterValues, 0]]
203
- ];
204
- var GetActionRecommendationsResponse$ = [3, n0, _GARRe,
205
- 0,
206
- [_aL, _rI],
207
- [() => ActionList, 0]
208
- ];
209
- var GetPersonalizedRankingRequest$ = [3, n0, _GPRR,
210
- 0,
211
- [_cA, _iL, _uI, _c, _fA, _fV, _mC],
212
- [0, 64 | 0, 0, [() => Context, 0], 0, [() => FilterValues, 0], [2, n0, _MC, 0, 0, 64 | 0]], 3
213
- ];
214
- var GetPersonalizedRankingResponse$ = [3, n0, _GPRRe,
215
- 0,
216
- [_pR, _rI],
217
- [[() => ItemList, 0], 0]
218
- ];
219
- var GetRecommendationsRequest$ = [3, n0, _GRR,
220
- 0,
221
- [_cA, _iI, _uI, _nR, _c, _fA, _fV, _rA, _p, _mC],
222
- [0, 0, 0, 1, [() => Context, 0], 0, [() => FilterValues, 0], 0, [() => PromotionList, 0], [2, n0, _MC, 0, 0, 64 | 0]]
223
- ];
224
- var GetRecommendationsResponse$ = [3, n0, _GRRe,
225
- 0,
226
- [_iLt, _rI],
227
- [[() => ItemList, 0], 0]
228
- ];
229
- var InvalidInputException$ = [-3, n0, _IIE,
230
- { [_e]: _cl, [_hE]: 400 },
231
- [_m],
232
- [0]
233
- ];
234
- schema.TypeRegistry.for(n0).registerError(InvalidInputException$, InvalidInputException);
235
- var PredictedAction$ = [3, n0, _PA,
236
- 0,
237
- [_aI, _s],
238
- [0, 1]
239
- ];
240
- var PredictedItem$ = [3, n0, _PI,
241
- 0,
242
- [_iI, _s, _pN, _me, _r],
243
- [0, 1, 0, [() => Metadata, 0], 64 | 0]
244
- ];
245
- var Promotion$ = [3, n0, _P,
246
- 0,
247
- [_n, _pPI, _fA, _fV],
248
- [0, 1, 0, [() => FilterValues, 0]]
249
- ];
250
- var ResourceNotFoundException$ = [-3, n0, _RNFE,
251
- { [_e]: _cl, [_hE]: 404 },
252
- [_m],
253
- [0]
254
- ];
255
- schema.TypeRegistry.for(n0).registerError(ResourceNotFoundException$, ResourceNotFoundException);
256
- var PersonalizeRuntimeServiceException$ = [-3, _sm, "PersonalizeRuntimeServiceException", 0, [], []];
257
- schema.TypeRegistry.for(_sm).registerError(PersonalizeRuntimeServiceException$, PersonalizeRuntimeServiceException);
258
- var ActionList = [1, n0, _AL,
259
- 0, () => PredictedAction$
260
- ];
261
- var ItemList = [1, n0, _IL,
262
- 0, [() => PredictedItem$,
263
- 0]
264
- ];
265
- var PromotionList = [1, n0, _PL,
266
- 0, [() => Promotion$,
267
- 0]
268
- ];
269
- var Context = [2, n0, _C,
270
- 0, [0,
271
- 0],
272
- [() => AttributeValue,
273
- 0]
274
- ];
275
- var FilterValues = [2, n0, _FV,
276
- 0, [0,
277
- 0],
278
- [() => FilterAttributeValue,
279
- 0]
280
- ];
281
- var Metadata = [2, n0, _M,
282
- 8, 0, 0
283
- ];
284
- var GetActionRecommendations$ = [9, n0, _GAR,
285
- { [_h]: ["POST", "/action-recommendations", 200] }, () => GetActionRecommendationsRequest$, () => GetActionRecommendationsResponse$
286
- ];
287
- var GetPersonalizedRanking$ = [9, n0, _GPR,
288
- { [_h]: ["POST", "/personalize-ranking", 200] }, () => GetPersonalizedRankingRequest$, () => GetPersonalizedRankingResponse$
289
- ];
290
- var GetRecommendations$ = [9, n0, _GR,
291
- { [_h]: ["POST", "/recommendations", 200] }, () => GetRecommendationsRequest$, () => GetRecommendationsResponse$
292
- ];
293
-
294
116
  class GetActionRecommendationsCommand extends smithyClient.Command
295
117
  .classBuilder()
296
118
  .ep(commonParams)
@@ -299,7 +121,7 @@ class GetActionRecommendationsCommand extends smithyClient.Command
299
121
  })
300
122
  .s("AmazonPersonalizeRuntime", "GetActionRecommendations", {})
301
123
  .n("PersonalizeRuntimeClient", "GetActionRecommendationsCommand")
302
- .sc(GetActionRecommendations$)
124
+ .sc(schemas_0.GetActionRecommendations$)
303
125
  .build() {
304
126
  }
305
127
 
@@ -311,7 +133,7 @@ class GetPersonalizedRankingCommand extends smithyClient.Command
311
133
  })
312
134
  .s("AmazonPersonalizeRuntime", "GetPersonalizedRanking", {})
313
135
  .n("PersonalizeRuntimeClient", "GetPersonalizedRankingCommand")
314
- .sc(GetPersonalizedRanking$)
136
+ .sc(schemas_0.GetPersonalizedRanking$)
315
137
  .build() {
316
138
  }
317
139
 
@@ -323,7 +145,7 @@ class GetRecommendationsCommand extends smithyClient.Command
323
145
  })
324
146
  .s("AmazonPersonalizeRuntime", "GetRecommendations", {})
325
147
  .n("PersonalizeRuntimeClient", "GetRecommendationsCommand")
326
- .sc(GetRecommendations$)
148
+ .sc(schemas_0.GetRecommendations$)
327
149
  .build() {
328
150
  }
329
151
 
@@ -344,26 +166,24 @@ Object.defineProperty(exports, "__Client", {
344
166
  enumerable: true,
345
167
  get: function () { return smithyClient.Client; }
346
168
  });
347
- exports.GetActionRecommendations$ = GetActionRecommendations$;
169
+ Object.defineProperty(exports, "PersonalizeRuntimeServiceException", {
170
+ enumerable: true,
171
+ get: function () { return PersonalizeRuntimeServiceException.PersonalizeRuntimeServiceException; }
172
+ });
348
173
  exports.GetActionRecommendationsCommand = GetActionRecommendationsCommand;
349
- exports.GetActionRecommendationsRequest$ = GetActionRecommendationsRequest$;
350
- exports.GetActionRecommendationsResponse$ = GetActionRecommendationsResponse$;
351
- exports.GetPersonalizedRanking$ = GetPersonalizedRanking$;
352
174
  exports.GetPersonalizedRankingCommand = GetPersonalizedRankingCommand;
353
- exports.GetPersonalizedRankingRequest$ = GetPersonalizedRankingRequest$;
354
- exports.GetPersonalizedRankingResponse$ = GetPersonalizedRankingResponse$;
355
- exports.GetRecommendations$ = GetRecommendations$;
356
175
  exports.GetRecommendationsCommand = GetRecommendationsCommand;
357
- exports.GetRecommendationsRequest$ = GetRecommendationsRequest$;
358
- exports.GetRecommendationsResponse$ = GetRecommendationsResponse$;
359
- exports.InvalidInputException = InvalidInputException;
360
- exports.InvalidInputException$ = InvalidInputException$;
361
176
  exports.PersonalizeRuntime = PersonalizeRuntime;
362
177
  exports.PersonalizeRuntimeClient = PersonalizeRuntimeClient;
363
- exports.PersonalizeRuntimeServiceException = PersonalizeRuntimeServiceException;
364
- exports.PersonalizeRuntimeServiceException$ = PersonalizeRuntimeServiceException$;
365
- exports.PredictedAction$ = PredictedAction$;
366
- exports.PredictedItem$ = PredictedItem$;
367
- exports.Promotion$ = Promotion$;
368
- exports.ResourceNotFoundException = ResourceNotFoundException;
369
- exports.ResourceNotFoundException$ = ResourceNotFoundException$;
178
+ Object.keys(schemas_0).forEach(function (k) {
179
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
180
+ enumerable: true,
181
+ get: function () { return schemas_0[k]; }
182
+ });
183
+ });
184
+ Object.keys(errors).forEach(function (k) {
185
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
186
+ enumerable: true,
187
+ get: function () { return errors[k]; }
188
+ });
189
+ });
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PersonalizeRuntimeServiceException = exports.__ServiceException = void 0;
4
+ const smithy_client_1 = require("@smithy/smithy-client");
5
+ Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
6
+ class PersonalizeRuntimeServiceException extends smithy_client_1.ServiceException {
7
+ constructor(options) {
8
+ super(options);
9
+ Object.setPrototypeOf(this, PersonalizeRuntimeServiceException.prototype);
10
+ }
11
+ }
12
+ exports.PersonalizeRuntimeServiceException = PersonalizeRuntimeServiceException;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResourceNotFoundException = exports.InvalidInputException = void 0;
4
+ const PersonalizeRuntimeServiceException_1 = require("./PersonalizeRuntimeServiceException");
5
+ class InvalidInputException extends PersonalizeRuntimeServiceException_1.PersonalizeRuntimeServiceException {
6
+ name = "InvalidInputException";
7
+ $fault = "client";
8
+ constructor(opts) {
9
+ super({
10
+ name: "InvalidInputException",
11
+ $fault: "client",
12
+ ...opts,
13
+ });
14
+ Object.setPrototypeOf(this, InvalidInputException.prototype);
15
+ }
16
+ }
17
+ exports.InvalidInputException = InvalidInputException;
18
+ class ResourceNotFoundException extends PersonalizeRuntimeServiceException_1.PersonalizeRuntimeServiceException {
19
+ name = "ResourceNotFoundException";
20
+ $fault = "client";
21
+ constructor(opts) {
22
+ super({
23
+ name: "ResourceNotFoundException",
24
+ $fault: "client",
25
+ ...opts,
26
+ });
27
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
28
+ }
29
+ }
30
+ exports.ResourceNotFoundException = ResourceNotFoundException;
@@ -9,6 +9,7 @@ const util_base64_1 = require("@smithy/util-base64");
9
9
  const util_utf8_1 = require("@smithy/util-utf8");
10
10
  const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
11
11
  const endpointResolver_1 = require("./endpoint/endpointResolver");
12
+ const schemas_0_1 = require("./schemas/schemas_0");
12
13
  const getRuntimeConfig = (config) => {
13
14
  return {
14
15
  apiVersion: "2018-05-22",
@@ -29,6 +30,7 @@ const getRuntimeConfig = (config) => {
29
30
  protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
30
31
  protocolSettings: config?.protocolSettings ?? {
31
32
  defaultNamespace: "com.amazonaws.personalizeruntime",
33
+ errorTypeRegistries: schemas_0_1.errorTypeRegistries,
32
34
  version: "2018-05-22",
33
35
  serviceTarget: "AmazonPersonalizeRuntime",
34
36
  },
@@ -0,0 +1,166 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetRecommendations$ = exports.GetPersonalizedRanking$ = exports.GetActionRecommendations$ = exports.Promotion$ = exports.PredictedItem$ = exports.PredictedAction$ = exports.GetRecommendationsResponse$ = exports.GetRecommendationsRequest$ = exports.GetPersonalizedRankingResponse$ = exports.GetPersonalizedRankingRequest$ = exports.GetActionRecommendationsResponse$ = exports.GetActionRecommendationsRequest$ = exports.errorTypeRegistries = exports.ResourceNotFoundException$ = exports.InvalidInputException$ = exports.PersonalizeRuntimeServiceException$ = void 0;
4
+ const _AL = "ActionList";
5
+ const _AV = "AttributeValue";
6
+ const _C = "Context";
7
+ const _FAV = "FilterAttributeValue";
8
+ const _FV = "FilterValues";
9
+ const _GAR = "GetActionRecommendations";
10
+ const _GARR = "GetActionRecommendationsRequest";
11
+ const _GARRe = "GetActionRecommendationsResponse";
12
+ const _GPR = "GetPersonalizedRanking";
13
+ const _GPRR = "GetPersonalizedRankingRequest";
14
+ const _GPRRe = "GetPersonalizedRankingResponse";
15
+ const _GR = "GetRecommendations";
16
+ const _GRR = "GetRecommendationsRequest";
17
+ const _GRRe = "GetRecommendationsResponse";
18
+ const _IIE = "InvalidInputException";
19
+ const _IL = "ItemList";
20
+ const _M = "Metadata";
21
+ const _MC = "MetadataColumns";
22
+ const _P = "Promotion";
23
+ const _PA = "PredictedAction";
24
+ const _PI = "PredictedItem";
25
+ const _PL = "PromotionList";
26
+ const _RNFE = "ResourceNotFoundException";
27
+ const _aI = "actionId";
28
+ const _aL = "actionList";
29
+ const _c = "client";
30
+ const _cA = "campaignArn";
31
+ const _co = "context";
32
+ const _e = "error";
33
+ const _fA = "filterArn";
34
+ const _fV = "filterValues";
35
+ const _h = "http";
36
+ const _hE = "httpError";
37
+ const _iI = "itemId";
38
+ const _iL = "inputList";
39
+ const _iLt = "itemList";
40
+ const _m = "message";
41
+ const _mC = "metadataColumns";
42
+ const _me = "metadata";
43
+ const _n = "name";
44
+ const _nR = "numResults";
45
+ const _p = "promotions";
46
+ const _pN = "promotionName";
47
+ const _pPI = "percentPromotedItems";
48
+ const _pR = "personalizedRanking";
49
+ const _r = "reason";
50
+ const _rA = "recommenderArn";
51
+ const _rI = "recommendationId";
52
+ const _s = "smithy.ts.sdk.synthetic.com.amazonaws.personalizeruntime";
53
+ const _sc = "score";
54
+ const _uI = "userId";
55
+ const n0 = "com.amazonaws.personalizeruntime";
56
+ const schema_1 = require("@smithy/core/schema");
57
+ const errors_1 = require("../models/errors");
58
+ const PersonalizeRuntimeServiceException_1 = require("../models/PersonalizeRuntimeServiceException");
59
+ const _s_registry = schema_1.TypeRegistry.for(_s);
60
+ exports.PersonalizeRuntimeServiceException$ = [-3, _s, "PersonalizeRuntimeServiceException", 0, [], []];
61
+ _s_registry.registerError(exports.PersonalizeRuntimeServiceException$, PersonalizeRuntimeServiceException_1.PersonalizeRuntimeServiceException);
62
+ const n0_registry = schema_1.TypeRegistry.for(n0);
63
+ exports.InvalidInputException$ = [-3, n0, _IIE,
64
+ { [_e]: _c, [_hE]: 400 },
65
+ [_m],
66
+ [0]
67
+ ];
68
+ n0_registry.registerError(exports.InvalidInputException$, errors_1.InvalidInputException);
69
+ exports.ResourceNotFoundException$ = [-3, n0, _RNFE,
70
+ { [_e]: _c, [_hE]: 404 },
71
+ [_m],
72
+ [0]
73
+ ];
74
+ n0_registry.registerError(exports.ResourceNotFoundException$, errors_1.ResourceNotFoundException);
75
+ exports.errorTypeRegistries = [
76
+ _s_registry,
77
+ n0_registry,
78
+ ];
79
+ var AttributeValue = [0, n0, _AV, 8, 0];
80
+ var FilterAttributeValue = [0, n0, _FAV, 8, 0];
81
+ exports.GetActionRecommendationsRequest$ = [3, n0, _GARR,
82
+ 0,
83
+ [_cA, _uI, _nR, _fA, _fV],
84
+ [0, 0, 1, 0, [() => FilterValues, 0]]
85
+ ];
86
+ exports.GetActionRecommendationsResponse$ = [3, n0, _GARRe,
87
+ 0,
88
+ [_aL, _rI],
89
+ [() => ActionList, 0]
90
+ ];
91
+ exports.GetPersonalizedRankingRequest$ = [3, n0, _GPRR,
92
+ 0,
93
+ [_cA, _iL, _uI, _co, _fA, _fV, _mC],
94
+ [0, 64 | 0, 0, [() => Context, 0], 0, [() => FilterValues, 0], [2, n0, _MC, 0, 0, 64 | 0]], 3
95
+ ];
96
+ exports.GetPersonalizedRankingResponse$ = [3, n0, _GPRRe,
97
+ 0,
98
+ [_pR, _rI],
99
+ [[() => ItemList, 0], 0]
100
+ ];
101
+ exports.GetRecommendationsRequest$ = [3, n0, _GRR,
102
+ 0,
103
+ [_cA, _iI, _uI, _nR, _co, _fA, _fV, _rA, _p, _mC],
104
+ [0, 0, 0, 1, [() => Context, 0], 0, [() => FilterValues, 0], 0, [() => PromotionList, 0], [2, n0, _MC, 0, 0, 64 | 0]]
105
+ ];
106
+ exports.GetRecommendationsResponse$ = [3, n0, _GRRe,
107
+ 0,
108
+ [_iLt, _rI],
109
+ [[() => ItemList, 0], 0]
110
+ ];
111
+ exports.PredictedAction$ = [3, n0, _PA,
112
+ 0,
113
+ [_aI, _sc],
114
+ [0, 1]
115
+ ];
116
+ exports.PredictedItem$ = [3, n0, _PI,
117
+ 0,
118
+ [_iI, _sc, _pN, _me, _r],
119
+ [0, 1, 0, [() => Metadata, 0], 64 | 0]
120
+ ];
121
+ exports.Promotion$ = [3, n0, _P,
122
+ 0,
123
+ [_n, _pPI, _fA, _fV],
124
+ [0, 1, 0, [() => FilterValues, 0]]
125
+ ];
126
+ var ActionList = [1, n0, _AL,
127
+ 0, () => exports.PredictedAction$
128
+ ];
129
+ var ColumnNamesList = 64 | 0;
130
+ var InputList = 64 | 0;
131
+ var ItemList = [1, n0, _IL,
132
+ 0, [() => exports.PredictedItem$,
133
+ 0]
134
+ ];
135
+ var PromotionList = [1, n0, _PL,
136
+ 0, [() => exports.Promotion$,
137
+ 0]
138
+ ];
139
+ var ReasonList = 64 | 0;
140
+ var Context = [2, n0, _C,
141
+ 0, [0,
142
+ 0],
143
+ [() => AttributeValue,
144
+ 0]
145
+ ];
146
+ var FilterValues = [2, n0, _FV,
147
+ 0, [0,
148
+ 0],
149
+ [() => FilterAttributeValue,
150
+ 0]
151
+ ];
152
+ var Metadata = [2, n0, _M,
153
+ 8, 0, 0
154
+ ];
155
+ var MetadataColumns = [2, n0, _MC,
156
+ 0, 0, 64 | 0
157
+ ];
158
+ exports.GetActionRecommendations$ = [9, n0, _GAR,
159
+ { [_h]: ["POST", "/action-recommendations", 200] }, () => exports.GetActionRecommendationsRequest$, () => exports.GetActionRecommendationsResponse$
160
+ ];
161
+ exports.GetPersonalizedRanking$ = [9, n0, _GPR,
162
+ { [_h]: ["POST", "/personalize-ranking", 200] }, () => exports.GetPersonalizedRankingRequest$, () => exports.GetPersonalizedRankingResponse$
163
+ ];
164
+ exports.GetRecommendations$ = [9, n0, _GR,
165
+ { [_h]: ["POST", "/recommendations", 200] }, () => exports.GetRecommendationsRequest$, () => exports.GetRecommendationsResponse$
166
+ ];
@@ -6,6 +6,7 @@ import { fromBase64, toBase64 } from "@smithy/util-base64";
6
6
  import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
7
7
  import { defaultPersonalizeRuntimeHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
8
8
  import { defaultEndpointResolver } from "./endpoint/endpointResolver";
9
+ import { errorTypeRegistries } from "./schemas/schemas_0";
9
10
  export const getRuntimeConfig = (config) => {
10
11
  return {
11
12
  apiVersion: "2018-05-22",
@@ -26,6 +27,7 @@ export const getRuntimeConfig = (config) => {
26
27
  protocol: config?.protocol ?? AwsRestJsonProtocol,
27
28
  protocolSettings: config?.protocolSettings ?? {
28
29
  defaultNamespace: "com.amazonaws.personalizeruntime",
30
+ errorTypeRegistries,
29
31
  version: "2018-05-22",
30
32
  serviceTarget: "AmazonPersonalizeRuntime",
31
33
  },
@@ -23,9 +23,9 @@ const _PL = "PromotionList";
23
23
  const _RNFE = "ResourceNotFoundException";
24
24
  const _aI = "actionId";
25
25
  const _aL = "actionList";
26
- const _c = "context";
26
+ const _c = "client";
27
27
  const _cA = "campaignArn";
28
- const _cl = "client";
28
+ const _co = "context";
29
29
  const _e = "error";
30
30
  const _fA = "filterArn";
31
31
  const _fV = "filterValues";
@@ -46,13 +46,33 @@ const _pR = "personalizedRanking";
46
46
  const _r = "reason";
47
47
  const _rA = "recommenderArn";
48
48
  const _rI = "recommendationId";
49
- const _s = "score";
50
- const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.personalizeruntime";
49
+ const _s = "smithy.ts.sdk.synthetic.com.amazonaws.personalizeruntime";
50
+ const _sc = "score";
51
51
  const _uI = "userId";
52
52
  const n0 = "com.amazonaws.personalizeruntime";
53
53
  import { TypeRegistry } from "@smithy/core/schema";
54
54
  import { InvalidInputException, ResourceNotFoundException } from "../models/errors";
55
55
  import { PersonalizeRuntimeServiceException } from "../models/PersonalizeRuntimeServiceException";
56
+ const _s_registry = TypeRegistry.for(_s);
57
+ export var PersonalizeRuntimeServiceException$ = [-3, _s, "PersonalizeRuntimeServiceException", 0, [], []];
58
+ _s_registry.registerError(PersonalizeRuntimeServiceException$, PersonalizeRuntimeServiceException);
59
+ const n0_registry = TypeRegistry.for(n0);
60
+ export var InvalidInputException$ = [-3, n0, _IIE,
61
+ { [_e]: _c, [_hE]: 400 },
62
+ [_m],
63
+ [0]
64
+ ];
65
+ n0_registry.registerError(InvalidInputException$, InvalidInputException);
66
+ export var ResourceNotFoundException$ = [-3, n0, _RNFE,
67
+ { [_e]: _c, [_hE]: 404 },
68
+ [_m],
69
+ [0]
70
+ ];
71
+ n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
72
+ export const errorTypeRegistries = [
73
+ _s_registry,
74
+ n0_registry,
75
+ ];
56
76
  var AttributeValue = [0, n0, _AV, 8, 0];
57
77
  var FilterAttributeValue = [0, n0, _FAV, 8, 0];
58
78
  export var GetActionRecommendationsRequest$ = [3, n0, _GARR,
@@ -67,7 +87,7 @@ export var GetActionRecommendationsResponse$ = [3, n0, _GARRe,
67
87
  ];
68
88
  export var GetPersonalizedRankingRequest$ = [3, n0, _GPRR,
69
89
  0,
70
- [_cA, _iL, _uI, _c, _fA, _fV, _mC],
90
+ [_cA, _iL, _uI, _co, _fA, _fV, _mC],
71
91
  [0, 64 | 0, 0, [() => Context, 0], 0, [() => FilterValues, 0], [2, n0, _MC, 0, 0, 64 | 0]], 3
72
92
  ];
73
93
  export var GetPersonalizedRankingResponse$ = [3, n0, _GPRRe,
@@ -77,7 +97,7 @@ export var GetPersonalizedRankingResponse$ = [3, n0, _GPRRe,
77
97
  ];
78
98
  export var GetRecommendationsRequest$ = [3, n0, _GRR,
79
99
  0,
80
- [_cA, _iI, _uI, _nR, _c, _fA, _fV, _rA, _p, _mC],
100
+ [_cA, _iI, _uI, _nR, _co, _fA, _fV, _rA, _p, _mC],
81
101
  [0, 0, 0, 1, [() => Context, 0], 0, [() => FilterValues, 0], 0, [() => PromotionList, 0], [2, n0, _MC, 0, 0, 64 | 0]]
82
102
  ];
83
103
  export var GetRecommendationsResponse$ = [3, n0, _GRRe,
@@ -85,20 +105,14 @@ export var GetRecommendationsResponse$ = [3, n0, _GRRe,
85
105
  [_iLt, _rI],
86
106
  [[() => ItemList, 0], 0]
87
107
  ];
88
- export var InvalidInputException$ = [-3, n0, _IIE,
89
- { [_e]: _cl, [_hE]: 400 },
90
- [_m],
91
- [0]
92
- ];
93
- TypeRegistry.for(n0).registerError(InvalidInputException$, InvalidInputException);
94
108
  export var PredictedAction$ = [3, n0, _PA,
95
109
  0,
96
- [_aI, _s],
110
+ [_aI, _sc],
97
111
  [0, 1]
98
112
  ];
99
113
  export var PredictedItem$ = [3, n0, _PI,
100
114
  0,
101
- [_iI, _s, _pN, _me, _r],
115
+ [_iI, _sc, _pN, _me, _r],
102
116
  [0, 1, 0, [() => Metadata, 0], 64 | 0]
103
117
  ];
104
118
  export var Promotion$ = [3, n0, _P,
@@ -106,14 +120,6 @@ export var Promotion$ = [3, n0, _P,
106
120
  [_n, _pPI, _fA, _fV],
107
121
  [0, 1, 0, [() => FilterValues, 0]]
108
122
  ];
109
- export var ResourceNotFoundException$ = [-3, n0, _RNFE,
110
- { [_e]: _cl, [_hE]: 404 },
111
- [_m],
112
- [0]
113
- ];
114
- TypeRegistry.for(n0).registerError(ResourceNotFoundException$, ResourceNotFoundException);
115
- export var PersonalizeRuntimeServiceException$ = [-3, _sm, "PersonalizeRuntimeServiceException", 0, [], []];
116
- TypeRegistry.for(_sm).registerError(PersonalizeRuntimeServiceException$, PersonalizeRuntimeServiceException);
117
123
  var ActionList = [1, n0, _AL,
118
124
  0, () => PredictedAction$
119
125
  ];
@@ -1,16 +1,23 @@
1
+ import { TypeRegistry } from "@smithy/core/schema";
1
2
  import type { StaticErrorSchema, StaticOperationSchema, StaticStructureSchema } from "@smithy/types";
3
+ export declare var PersonalizeRuntimeServiceException$: StaticErrorSchema;
4
+ export declare var InvalidInputException$: StaticErrorSchema;
5
+ export declare var ResourceNotFoundException$: StaticErrorSchema;
6
+ /**
7
+ * TypeRegistry instances containing modeled errors.
8
+ * @internal
9
+ *
10
+ */
11
+ export declare const errorTypeRegistries: TypeRegistry[];
2
12
  export declare var GetActionRecommendationsRequest$: StaticStructureSchema;
3
13
  export declare var GetActionRecommendationsResponse$: StaticStructureSchema;
4
14
  export declare var GetPersonalizedRankingRequest$: StaticStructureSchema;
5
15
  export declare var GetPersonalizedRankingResponse$: StaticStructureSchema;
6
16
  export declare var GetRecommendationsRequest$: StaticStructureSchema;
7
17
  export declare var GetRecommendationsResponse$: StaticStructureSchema;
8
- export declare var InvalidInputException$: StaticErrorSchema;
9
18
  export declare var PredictedAction$: StaticStructureSchema;
10
19
  export declare var PredictedItem$: StaticStructureSchema;
11
20
  export declare var Promotion$: StaticStructureSchema;
12
- export declare var ResourceNotFoundException$: StaticErrorSchema;
13
- export declare var PersonalizeRuntimeServiceException$: StaticErrorSchema;
14
21
  export declare var GetActionRecommendations$: StaticOperationSchema;
15
22
  export declare var GetPersonalizedRanking$: StaticOperationSchema;
16
23
  export declare var GetRecommendations$: StaticOperationSchema;
@@ -1,20 +1,22 @@
1
+ import { TypeRegistry } from "@smithy/core/schema";
1
2
  import {
2
3
  StaticErrorSchema,
3
4
  StaticOperationSchema,
4
5
  StaticStructureSchema,
5
6
  } from "@smithy/types";
7
+ export declare var PersonalizeRuntimeServiceException$: StaticErrorSchema;
8
+ export declare var InvalidInputException$: StaticErrorSchema;
9
+ export declare var ResourceNotFoundException$: StaticErrorSchema;
10
+ export declare const errorTypeRegistries: TypeRegistry[];
6
11
  export declare var GetActionRecommendationsRequest$: StaticStructureSchema;
7
12
  export declare var GetActionRecommendationsResponse$: StaticStructureSchema;
8
13
  export declare var GetPersonalizedRankingRequest$: StaticStructureSchema;
9
14
  export declare var GetPersonalizedRankingResponse$: StaticStructureSchema;
10
15
  export declare var GetRecommendationsRequest$: StaticStructureSchema;
11
16
  export declare var GetRecommendationsResponse$: StaticStructureSchema;
12
- export declare var InvalidInputException$: StaticErrorSchema;
13
17
  export declare var PredictedAction$: StaticStructureSchema;
14
18
  export declare var PredictedItem$: StaticStructureSchema;
15
19
  export declare var Promotion$: StaticStructureSchema;
16
- export declare var ResourceNotFoundException$: StaticErrorSchema;
17
- export declare var PersonalizeRuntimeServiceException$: StaticErrorSchema;
18
20
  export declare var GetActionRecommendations$: StaticOperationSchema;
19
21
  export declare var GetPersonalizedRanking$: StaticOperationSchema;
20
22
  export declare var GetRecommendations$: StaticOperationSchema;
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.987.0",
4
+ "version": "3.989.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-personalize-runtime",
@@ -21,38 +21,38 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "5.2.0",
23
23
  "@aws-crypto/sha256-js": "5.2.0",
24
- "@aws-sdk/core": "^3.973.7",
25
- "@aws-sdk/credential-provider-node": "^3.972.6",
24
+ "@aws-sdk/core": "^3.973.9",
25
+ "@aws-sdk/credential-provider-node": "^3.972.8",
26
26
  "@aws-sdk/middleware-host-header": "^3.972.3",
27
27
  "@aws-sdk/middleware-logger": "^3.972.3",
28
28
  "@aws-sdk/middleware-recursion-detection": "^3.972.3",
29
- "@aws-sdk/middleware-user-agent": "^3.972.7",
29
+ "@aws-sdk/middleware-user-agent": "^3.972.9",
30
30
  "@aws-sdk/region-config-resolver": "^3.972.3",
31
31
  "@aws-sdk/types": "^3.973.1",
32
- "@aws-sdk/util-endpoints": "3.987.0",
32
+ "@aws-sdk/util-endpoints": "3.989.0",
33
33
  "@aws-sdk/util-user-agent-browser": "^3.972.3",
34
- "@aws-sdk/util-user-agent-node": "^3.972.5",
34
+ "@aws-sdk/util-user-agent-node": "^3.972.7",
35
35
  "@smithy/config-resolver": "^4.4.6",
36
- "@smithy/core": "^3.22.1",
36
+ "@smithy/core": "^3.23.0",
37
37
  "@smithy/fetch-http-handler": "^5.3.9",
38
38
  "@smithy/hash-node": "^4.2.8",
39
39
  "@smithy/invalid-dependency": "^4.2.8",
40
40
  "@smithy/middleware-content-length": "^4.2.8",
41
- "@smithy/middleware-endpoint": "^4.4.13",
42
- "@smithy/middleware-retry": "^4.4.30",
41
+ "@smithy/middleware-endpoint": "^4.4.14",
42
+ "@smithy/middleware-retry": "^4.4.31",
43
43
  "@smithy/middleware-serde": "^4.2.9",
44
44
  "@smithy/middleware-stack": "^4.2.8",
45
45
  "@smithy/node-config-provider": "^4.3.8",
46
- "@smithy/node-http-handler": "^4.4.9",
46
+ "@smithy/node-http-handler": "^4.4.10",
47
47
  "@smithy/protocol-http": "^5.3.8",
48
- "@smithy/smithy-client": "^4.11.2",
48
+ "@smithy/smithy-client": "^4.11.3",
49
49
  "@smithy/types": "^4.12.0",
50
50
  "@smithy/url-parser": "^4.2.8",
51
51
  "@smithy/util-base64": "^4.3.0",
52
52
  "@smithy/util-body-length-browser": "^4.2.0",
53
53
  "@smithy/util-body-length-node": "^4.2.1",
54
- "@smithy/util-defaults-mode-browser": "^4.3.29",
55
- "@smithy/util-defaults-mode-node": "^4.2.32",
54
+ "@smithy/util-defaults-mode-browser": "^4.3.30",
55
+ "@smithy/util-defaults-mode-node": "^4.2.33",
56
56
  "@smithy/util-endpoints": "^3.2.8",
57
57
  "@smithy/util-middleware": "^4.2.8",
58
58
  "@smithy/util-retry": "^4.2.8",