@aws-sdk/client-personalize-events 3.131.0 → 3.142.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,39 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.142.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.141.0...v3.142.0) (2022-08-02)
7
+
8
+
9
+ ### Features
10
+
11
+ * **codegen:** general data mapping function ([#3830](https://github.com/aws/aws-sdk-js-v3/issues/3830)) ([9417eae](https://github.com/aws/aws-sdk-js-v3/commit/9417eae722806799fb4c15c07921574268c1165c))
12
+
13
+
14
+
15
+
16
+
17
+ # [3.141.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.140.0...v3.141.0) (2022-08-01)
18
+
19
+
20
+ ### Features
21
+
22
+ * **clients:** update client endpoints as of 2022-08-01 ([aaf49f2](https://github.com/aws/aws-sdk-js-v3/commit/aaf49f21b371412e6ea7e00890b71a7b31991b66))
23
+
24
+
25
+
26
+
27
+
28
+ # [3.137.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.136.1...v3.137.0) (2022-07-26)
29
+
30
+
31
+ ### Features
32
+
33
+ * **namespaces:** remove namespaces with only a log filter ([#3823](https://github.com/aws/aws-sdk-js-v3/issues/3823)) ([33e6822](https://github.com/aws/aws-sdk-js-v3/commit/33e68228fb64c53dd8f89e6be76dd5f46edc3cfd))
34
+
35
+
36
+
37
+
38
+
6
39
  # [3.131.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.130.0...v3.131.0) (2022-07-15)
7
40
 
8
41
  **Note:** Version bump only for package @aws-sdk/client-personalize-events
package/README.md CHANGED
@@ -167,7 +167,7 @@ try {
167
167
  const data = await client.send(command);
168
168
  // process data.
169
169
  } catch (error) {
170
- const { requestId, cfId, extendedRequestId } = error.$metadata;
170
+ const { requestId, cfId, extendedRequestId } = error.$$metadata;
171
171
  console.log({ requestId, cfId, extendedRequestId });
172
172
  /**
173
173
  * The keys within exceptions are also parsed.
@@ -20,7 +20,7 @@ class PutEventsCommand extends smithy_client_1.Command {
20
20
  logger,
21
21
  clientName,
22
22
  commandName,
23
- inputFilterSensitiveLog: models_0_1.PutEventsRequest.filterSensitiveLog,
23
+ inputFilterSensitiveLog: models_0_1.PutEventsRequestFilterSensitiveLog,
24
24
  outputFilterSensitiveLog: (output) => output,
25
25
  };
26
26
  const { requestHandler } = configuration;
@@ -20,7 +20,7 @@ class PutItemsCommand extends smithy_client_1.Command {
20
20
  logger,
21
21
  clientName,
22
22
  commandName,
23
- inputFilterSensitiveLog: models_0_1.PutItemsRequest.filterSensitiveLog,
23
+ inputFilterSensitiveLog: models_0_1.PutItemsRequestFilterSensitiveLog,
24
24
  outputFilterSensitiveLog: (output) => output,
25
25
  };
26
26
  const { requestHandler } = configuration;
@@ -20,7 +20,7 @@ class PutUsersCommand extends smithy_client_1.Command {
20
20
  logger,
21
21
  clientName,
22
22
  commandName,
23
- inputFilterSensitiveLog: models_0_1.PutUsersRequest.filterSensitiveLog,
23
+ inputFilterSensitiveLog: models_0_1.PutUsersRequestFilterSensitiveLog,
24
24
  outputFilterSensitiveLog: (output) => output,
25
25
  };
26
26
  const { requestHandler } = configuration;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PutUsersRequest = exports.User = exports.ResourceNotFoundException = exports.ResourceInUseException = exports.PutItemsRequest = exports.Item = exports.PutEventsRequest = exports.Event = exports.InvalidInputException = void 0;
3
+ exports.PutUsersRequestFilterSensitiveLog = exports.UserFilterSensitiveLog = exports.PutItemsRequestFilterSensitiveLog = exports.ItemFilterSensitiveLog = exports.PutEventsRequestFilterSensitiveLog = exports.EventFilterSensitiveLog = exports.ResourceNotFoundException = exports.ResourceInUseException = exports.InvalidInputException = void 0;
4
4
  const PersonalizeEventsServiceException_1 = require("./PersonalizeEventsServiceException");
5
5
  class InvalidInputException extends PersonalizeEventsServiceException_1.PersonalizeEventsServiceException {
6
6
  constructor(opts) {
@@ -15,30 +15,6 @@ class InvalidInputException extends PersonalizeEventsServiceException_1.Personal
15
15
  }
16
16
  }
17
17
  exports.InvalidInputException = InvalidInputException;
18
- var Event;
19
- (function (Event) {
20
- Event.filterSensitiveLog = (obj) => ({
21
- ...obj,
22
- });
23
- })(Event = exports.Event || (exports.Event = {}));
24
- var PutEventsRequest;
25
- (function (PutEventsRequest) {
26
- PutEventsRequest.filterSensitiveLog = (obj) => ({
27
- ...obj,
28
- });
29
- })(PutEventsRequest = exports.PutEventsRequest || (exports.PutEventsRequest = {}));
30
- var Item;
31
- (function (Item) {
32
- Item.filterSensitiveLog = (obj) => ({
33
- ...obj,
34
- });
35
- })(Item = exports.Item || (exports.Item = {}));
36
- var PutItemsRequest;
37
- (function (PutItemsRequest) {
38
- PutItemsRequest.filterSensitiveLog = (obj) => ({
39
- ...obj,
40
- });
41
- })(PutItemsRequest = exports.PutItemsRequest || (exports.PutItemsRequest = {}));
42
18
  class ResourceInUseException extends PersonalizeEventsServiceException_1.PersonalizeEventsServiceException {
43
19
  constructor(opts) {
44
20
  super({
@@ -65,15 +41,27 @@ class ResourceNotFoundException extends PersonalizeEventsServiceException_1.Pers
65
41
  }
66
42
  }
67
43
  exports.ResourceNotFoundException = ResourceNotFoundException;
68
- var User;
69
- (function (User) {
70
- User.filterSensitiveLog = (obj) => ({
71
- ...obj,
72
- });
73
- })(User = exports.User || (exports.User = {}));
74
- var PutUsersRequest;
75
- (function (PutUsersRequest) {
76
- PutUsersRequest.filterSensitiveLog = (obj) => ({
77
- ...obj,
78
- });
79
- })(PutUsersRequest = exports.PutUsersRequest || (exports.PutUsersRequest = {}));
44
+ const EventFilterSensitiveLog = (obj) => ({
45
+ ...obj,
46
+ });
47
+ exports.EventFilterSensitiveLog = EventFilterSensitiveLog;
48
+ const PutEventsRequestFilterSensitiveLog = (obj) => ({
49
+ ...obj,
50
+ });
51
+ exports.PutEventsRequestFilterSensitiveLog = PutEventsRequestFilterSensitiveLog;
52
+ const ItemFilterSensitiveLog = (obj) => ({
53
+ ...obj,
54
+ });
55
+ exports.ItemFilterSensitiveLog = ItemFilterSensitiveLog;
56
+ const PutItemsRequestFilterSensitiveLog = (obj) => ({
57
+ ...obj,
58
+ });
59
+ exports.PutItemsRequestFilterSensitiveLog = PutItemsRequestFilterSensitiveLog;
60
+ const UserFilterSensitiveLog = (obj) => ({
61
+ ...obj,
62
+ });
63
+ exports.UserFilterSensitiveLog = UserFilterSensitiveLog;
64
+ const PutUsersRequestFilterSensitiveLog = (obj) => ({
65
+ ...obj,
66
+ });
67
+ exports.PutUsersRequestFilterSensitiveLog = PutUsersRequestFilterSensitiveLog;
@@ -77,11 +77,11 @@ const deserializeAws_restJson1PutEventsCommand = async (output, context) => {
77
77
  if (output.statusCode !== 200 && output.statusCode >= 300) {
78
78
  return deserializeAws_restJson1PutEventsCommandError(output, context);
79
79
  }
80
- const contents = {
80
+ const contents = map({
81
81
  $metadata: deserializeMetadata(output),
82
- };
82
+ });
83
83
  await collectBody(output.body, context);
84
- return Promise.resolve(contents);
84
+ return contents;
85
85
  };
86
86
  exports.deserializeAws_restJson1PutEventsCommand = deserializeAws_restJson1PutEventsCommand;
87
87
  const deserializeAws_restJson1PutEventsCommandError = async (output, context) => {
@@ -89,7 +89,6 @@ const deserializeAws_restJson1PutEventsCommandError = async (output, context) =>
89
89
  ...output,
90
90
  body: await parseBody(output.body, context),
91
91
  };
92
- let response;
93
92
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
94
93
  switch (errorCode) {
95
94
  case "InvalidInputException":
@@ -97,25 +96,23 @@ const deserializeAws_restJson1PutEventsCommandError = async (output, context) =>
97
96
  throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
98
97
  default:
99
98
  const parsedBody = parsedOutput.body;
100
- const $metadata = deserializeMetadata(output);
101
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
102
- response = new PersonalizeEventsServiceException_1.PersonalizeEventsServiceException({
103
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
104
- $fault: "client",
105
- $metadata,
99
+ (0, smithy_client_1.throwDefaultError)({
100
+ output,
101
+ parsedBody,
102
+ exceptionCtor: PersonalizeEventsServiceException_1.PersonalizeEventsServiceException,
103
+ errorCode,
106
104
  });
107
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
108
105
  }
109
106
  };
110
107
  const deserializeAws_restJson1PutItemsCommand = async (output, context) => {
111
108
  if (output.statusCode !== 200 && output.statusCode >= 300) {
112
109
  return deserializeAws_restJson1PutItemsCommandError(output, context);
113
110
  }
114
- const contents = {
111
+ const contents = map({
115
112
  $metadata: deserializeMetadata(output),
116
- };
113
+ });
117
114
  await collectBody(output.body, context);
118
- return Promise.resolve(contents);
115
+ return contents;
119
116
  };
120
117
  exports.deserializeAws_restJson1PutItemsCommand = deserializeAws_restJson1PutItemsCommand;
121
118
  const deserializeAws_restJson1PutItemsCommandError = async (output, context) => {
@@ -123,7 +120,6 @@ const deserializeAws_restJson1PutItemsCommandError = async (output, context) =>
123
120
  ...output,
124
121
  body: await parseBody(output.body, context),
125
122
  };
126
- let response;
127
123
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
128
124
  switch (errorCode) {
129
125
  case "InvalidInputException":
@@ -137,25 +133,23 @@ const deserializeAws_restJson1PutItemsCommandError = async (output, context) =>
137
133
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
138
134
  default:
139
135
  const parsedBody = parsedOutput.body;
140
- const $metadata = deserializeMetadata(output);
141
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
142
- response = new PersonalizeEventsServiceException_1.PersonalizeEventsServiceException({
143
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
144
- $fault: "client",
145
- $metadata,
136
+ (0, smithy_client_1.throwDefaultError)({
137
+ output,
138
+ parsedBody,
139
+ exceptionCtor: PersonalizeEventsServiceException_1.PersonalizeEventsServiceException,
140
+ errorCode,
146
141
  });
147
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
148
142
  }
149
143
  };
150
144
  const deserializeAws_restJson1PutUsersCommand = async (output, context) => {
151
145
  if (output.statusCode !== 200 && output.statusCode >= 300) {
152
146
  return deserializeAws_restJson1PutUsersCommandError(output, context);
153
147
  }
154
- const contents = {
148
+ const contents = map({
155
149
  $metadata: deserializeMetadata(output),
156
- };
150
+ });
157
151
  await collectBody(output.body, context);
158
- return Promise.resolve(contents);
152
+ return contents;
159
153
  };
160
154
  exports.deserializeAws_restJson1PutUsersCommand = deserializeAws_restJson1PutUsersCommand;
161
155
  const deserializeAws_restJson1PutUsersCommandError = async (output, context) => {
@@ -163,7 +157,6 @@ const deserializeAws_restJson1PutUsersCommandError = async (output, context) =>
163
157
  ...output,
164
158
  body: await parseBody(output.body, context),
165
159
  };
166
- let response;
167
160
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
168
161
  switch (errorCode) {
169
162
  case "InvalidInputException":
@@ -177,20 +170,19 @@ const deserializeAws_restJson1PutUsersCommandError = async (output, context) =>
177
170
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
178
171
  default:
179
172
  const parsedBody = parsedOutput.body;
180
- const $metadata = deserializeMetadata(output);
181
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
182
- response = new PersonalizeEventsServiceException_1.PersonalizeEventsServiceException({
183
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
184
- $fault: "client",
185
- $metadata,
173
+ (0, smithy_client_1.throwDefaultError)({
174
+ output,
175
+ parsedBody,
176
+ exceptionCtor: PersonalizeEventsServiceException_1.PersonalizeEventsServiceException,
177
+ errorCode,
186
178
  });
187
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
188
179
  }
189
180
  };
181
+ const map = smithy_client_1.map;
190
182
  const deserializeAws_restJson1InvalidInputExceptionResponse = async (parsedOutput, context) => {
191
- const contents = {};
183
+ const contents = map({});
192
184
  const data = parsedOutput.body;
193
- if (data.message !== undefined && data.message !== null) {
185
+ if (data.message != null) {
194
186
  contents.message = (0, smithy_client_1.expectString)(data.message);
195
187
  }
196
188
  const exception = new models_0_1.InvalidInputException({
@@ -200,9 +192,9 @@ const deserializeAws_restJson1InvalidInputExceptionResponse = async (parsedOutpu
200
192
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
201
193
  };
202
194
  const deserializeAws_restJson1ResourceInUseExceptionResponse = async (parsedOutput, context) => {
203
- const contents = {};
195
+ const contents = map({});
204
196
  const data = parsedOutput.body;
205
- if (data.message !== undefined && data.message !== null) {
197
+ if (data.message != null) {
206
198
  contents.message = (0, smithy_client_1.expectString)(data.message);
207
199
  }
208
200
  const exception = new models_0_1.ResourceInUseException({
@@ -212,9 +204,9 @@ const deserializeAws_restJson1ResourceInUseExceptionResponse = async (parsedOutp
212
204
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
213
205
  };
214
206
  const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
215
- const contents = {};
207
+ const contents = map({});
216
208
  const data = parsedOutput.body;
217
- if (data.message !== undefined && data.message !== null) {
209
+ if (data.message != null) {
218
210
  contents.message = (0, smithy_client_1.expectString)(data.message);
219
211
  }
220
212
  const exception = new models_0_1.ResourceNotFoundException({
@@ -239,9 +231,6 @@ const serializeAws_restJson1EventList = (input, context) => {
239
231
  return input
240
232
  .filter((e) => e != null)
241
233
  .map((entry) => {
242
- if (entry === null) {
243
- return null;
244
- }
245
234
  return serializeAws_restJson1Event(entry, context);
246
235
  });
247
236
  };
@@ -249,9 +238,6 @@ const serializeAws_restJson1Impression = (input, context) => {
249
238
  return input
250
239
  .filter((e) => e != null)
251
240
  .map((entry) => {
252
- if (entry === null) {
253
- return null;
254
- }
255
241
  return entry;
256
242
  });
257
243
  };
@@ -265,9 +251,6 @@ const serializeAws_restJson1ItemList = (input, context) => {
265
251
  return input
266
252
  .filter((e) => e != null)
267
253
  .map((entry) => {
268
- if (entry === null) {
269
- return null;
270
- }
271
254
  return serializeAws_restJson1Item(entry, context);
272
255
  });
273
256
  };
@@ -281,9 +264,6 @@ const serializeAws_restJson1UserList = (input, context) => {
281
264
  return input
282
265
  .filter((e) => e != null)
283
266
  .map((entry) => {
284
- if (entry === null) {
285
- return null;
286
- }
287
267
  return serializeAws_restJson1User(entry, context);
288
268
  });
289
269
  };
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { PutEventsRequest } from "../models/models_0";
4
+ import { PutEventsRequestFilterSensitiveLog } from "../models/models_0";
5
5
  import { deserializeAws_restJson1PutEventsCommand, serializeAws_restJson1PutEventsCommand, } from "../protocols/Aws_restJson1";
6
6
  var PutEventsCommand = (function (_super) {
7
7
  __extends(PutEventsCommand, _super);
@@ -20,7 +20,7 @@ var PutEventsCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: PutEventsRequest.filterSensitiveLog,
23
+ inputFilterSensitiveLog: PutEventsRequestFilterSensitiveLog,
24
24
  outputFilterSensitiveLog: function (output) { return output; },
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { PutItemsRequest } from "../models/models_0";
4
+ import { PutItemsRequestFilterSensitiveLog } from "../models/models_0";
5
5
  import { deserializeAws_restJson1PutItemsCommand, serializeAws_restJson1PutItemsCommand, } from "../protocols/Aws_restJson1";
6
6
  var PutItemsCommand = (function (_super) {
7
7
  __extends(PutItemsCommand, _super);
@@ -20,7 +20,7 @@ var PutItemsCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: PutItemsRequest.filterSensitiveLog,
23
+ inputFilterSensitiveLog: PutItemsRequestFilterSensitiveLog,
24
24
  outputFilterSensitiveLog: function (output) { return output; },
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { PutUsersRequest } from "../models/models_0";
4
+ import { PutUsersRequestFilterSensitiveLog } from "../models/models_0";
5
5
  import { deserializeAws_restJson1PutUsersCommand, serializeAws_restJson1PutUsersCommand, } from "../protocols/Aws_restJson1";
6
6
  var PutUsersCommand = (function (_super) {
7
7
  __extends(PutUsersCommand, _super);
@@ -20,7 +20,7 @@ var PutUsersCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: PutUsersRequest.filterSensitiveLog,
23
+ inputFilterSensitiveLog: PutUsersRequestFilterSensitiveLog,
24
24
  outputFilterSensitiveLog: function (output) { return output; },
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
@@ -12,22 +12,6 @@ var InvalidInputException = (function (_super) {
12
12
  return InvalidInputException;
13
13
  }(__BaseException));
14
14
  export { InvalidInputException };
15
- export var Event;
16
- (function (Event) {
17
- Event.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
18
- })(Event || (Event = {}));
19
- export var PutEventsRequest;
20
- (function (PutEventsRequest) {
21
- PutEventsRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
22
- })(PutEventsRequest || (PutEventsRequest = {}));
23
- export var Item;
24
- (function (Item) {
25
- Item.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
26
- })(Item || (Item = {}));
27
- export var PutItemsRequest;
28
- (function (PutItemsRequest) {
29
- PutItemsRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
30
- })(PutItemsRequest || (PutItemsRequest = {}));
31
15
  var ResourceInUseException = (function (_super) {
32
16
  __extends(ResourceInUseException, _super);
33
17
  function ResourceInUseException(opts) {
@@ -52,11 +36,9 @@ var ResourceNotFoundException = (function (_super) {
52
36
  return ResourceNotFoundException;
53
37
  }(__BaseException));
54
38
  export { ResourceNotFoundException };
55
- export var User;
56
- (function (User) {
57
- User.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
58
- })(User || (User = {}));
59
- export var PutUsersRequest;
60
- (function (PutUsersRequest) {
61
- PutUsersRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
62
- })(PutUsersRequest || (PutUsersRequest = {}));
39
+ export var EventFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
40
+ export var PutEventsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
41
+ export var ItemFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
42
+ export var PutItemsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
43
+ export var UserFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
44
+ export var PutUsersRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { decorateServiceException as __decorateServiceException, expectString as __expectString, LazyJsonString as __LazyJsonString, serializeFloat as __serializeFloat, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectString as __expectString, LazyJsonString as __LazyJsonString, map as __map, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
4
4
  import { InvalidInputException, ResourceInUseException, ResourceNotFoundException, } from "../models/models_0";
5
5
  import { PersonalizeEventsServiceException as __BaseException } from "../models/PersonalizeEventsServiceException";
6
6
  export var serializeAws_restJson1PutEventsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -83,18 +83,18 @@ export var deserializeAws_restJson1PutEventsCommand = function (output, context)
83
83
  if (output.statusCode !== 200 && output.statusCode >= 300) {
84
84
  return [2, deserializeAws_restJson1PutEventsCommandError(output, context)];
85
85
  }
86
- contents = {
86
+ contents = map({
87
87
  $metadata: deserializeMetadata(output),
88
- };
88
+ });
89
89
  return [4, collectBody(output.body, context)];
90
90
  case 1:
91
91
  _a.sent();
92
- return [2, Promise.resolve(contents)];
92
+ return [2, contents];
93
93
  }
94
94
  });
95
95
  }); };
96
96
  var deserializeAws_restJson1PutEventsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
97
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
97
+ var parsedOutput, _a, errorCode, _b, parsedBody;
98
98
  var _c;
99
99
  return __generator(this, function (_d) {
100
100
  switch (_d.label) {
@@ -115,14 +115,14 @@ var deserializeAws_restJson1PutEventsCommandError = function (output, context) {
115
115
  case 3: throw _d.sent();
116
116
  case 4:
117
117
  parsedBody = parsedOutput.body;
118
- $metadata = deserializeMetadata(output);
119
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
120
- response = new __BaseException({
121
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
122
- $fault: "client",
123
- $metadata: $metadata,
118
+ throwDefaultError({
119
+ output: output,
120
+ parsedBody: parsedBody,
121
+ exceptionCtor: __BaseException,
122
+ errorCode: errorCode,
124
123
  });
125
- throw __decorateServiceException(response, parsedBody);
124
+ _d.label = 5;
125
+ case 5: return [2];
126
126
  }
127
127
  });
128
128
  }); };
@@ -134,18 +134,18 @@ export var deserializeAws_restJson1PutItemsCommand = function (output, context)
134
134
  if (output.statusCode !== 200 && output.statusCode >= 300) {
135
135
  return [2, deserializeAws_restJson1PutItemsCommandError(output, context)];
136
136
  }
137
- contents = {
137
+ contents = map({
138
138
  $metadata: deserializeMetadata(output),
139
- };
139
+ });
140
140
  return [4, collectBody(output.body, context)];
141
141
  case 1:
142
142
  _a.sent();
143
- return [2, Promise.resolve(contents)];
143
+ return [2, contents];
144
144
  }
145
145
  });
146
146
  }); };
147
147
  var deserializeAws_restJson1PutItemsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
148
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
148
+ var parsedOutput, _a, errorCode, _b, parsedBody;
149
149
  var _c;
150
150
  return __generator(this, function (_d) {
151
151
  switch (_d.label) {
@@ -174,14 +174,14 @@ var deserializeAws_restJson1PutItemsCommandError = function (output, context) {
174
174
  case 7: throw _d.sent();
175
175
  case 8:
176
176
  parsedBody = parsedOutput.body;
177
- $metadata = deserializeMetadata(output);
178
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
179
- response = new __BaseException({
180
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
181
- $fault: "client",
182
- $metadata: $metadata,
177
+ throwDefaultError({
178
+ output: output,
179
+ parsedBody: parsedBody,
180
+ exceptionCtor: __BaseException,
181
+ errorCode: errorCode,
183
182
  });
184
- throw __decorateServiceException(response, parsedBody);
183
+ _d.label = 9;
184
+ case 9: return [2];
185
185
  }
186
186
  });
187
187
  }); };
@@ -193,18 +193,18 @@ export var deserializeAws_restJson1PutUsersCommand = function (output, context)
193
193
  if (output.statusCode !== 200 && output.statusCode >= 300) {
194
194
  return [2, deserializeAws_restJson1PutUsersCommandError(output, context)];
195
195
  }
196
- contents = {
196
+ contents = map({
197
197
  $metadata: deserializeMetadata(output),
198
- };
198
+ });
199
199
  return [4, collectBody(output.body, context)];
200
200
  case 1:
201
201
  _a.sent();
202
- return [2, Promise.resolve(contents)];
202
+ return [2, contents];
203
203
  }
204
204
  });
205
205
  }); };
206
206
  var deserializeAws_restJson1PutUsersCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
207
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
207
+ var parsedOutput, _a, errorCode, _b, parsedBody;
208
208
  var _c;
209
209
  return __generator(this, function (_d) {
210
210
  switch (_d.label) {
@@ -233,23 +233,24 @@ var deserializeAws_restJson1PutUsersCommandError = function (output, context) {
233
233
  case 7: throw _d.sent();
234
234
  case 8:
235
235
  parsedBody = parsedOutput.body;
236
- $metadata = deserializeMetadata(output);
237
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
238
- response = new __BaseException({
239
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
240
- $fault: "client",
241
- $metadata: $metadata,
236
+ throwDefaultError({
237
+ output: output,
238
+ parsedBody: parsedBody,
239
+ exceptionCtor: __BaseException,
240
+ errorCode: errorCode,
242
241
  });
243
- throw __decorateServiceException(response, parsedBody);
242
+ _d.label = 9;
243
+ case 9: return [2];
244
244
  }
245
245
  });
246
246
  }); };
247
+ var map = __map;
247
248
  var deserializeAws_restJson1InvalidInputExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
248
249
  var contents, data, exception;
249
250
  return __generator(this, function (_a) {
250
- contents = {};
251
+ contents = map({});
251
252
  data = parsedOutput.body;
252
- if (data.message !== undefined && data.message !== null) {
253
+ if (data.message != null) {
253
254
  contents.message = __expectString(data.message);
254
255
  }
255
256
  exception = new InvalidInputException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -259,9 +260,9 @@ var deserializeAws_restJson1InvalidInputExceptionResponse = function (parsedOutp
259
260
  var deserializeAws_restJson1ResourceInUseExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
260
261
  var contents, data, exception;
261
262
  return __generator(this, function (_a) {
262
- contents = {};
263
+ contents = map({});
263
264
  data = parsedOutput.body;
264
- if (data.message !== undefined && data.message !== null) {
265
+ if (data.message != null) {
265
266
  contents.message = __expectString(data.message);
266
267
  }
267
268
  exception = new ResourceInUseException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -271,9 +272,9 @@ var deserializeAws_restJson1ResourceInUseExceptionResponse = function (parsedOut
271
272
  var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
272
273
  var contents, data, exception;
273
274
  return __generator(this, function (_a) {
274
- contents = {};
275
+ contents = map({});
275
276
  data = parsedOutput.body;
276
- if (data.message !== undefined && data.message !== null) {
277
+ if (data.message != null) {
277
278
  contents.message = __expectString(data.message);
278
279
  }
279
280
  exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -287,9 +288,6 @@ var serializeAws_restJson1EventList = function (input, context) {
287
288
  return input
288
289
  .filter(function (e) { return e != null; })
289
290
  .map(function (entry) {
290
- if (entry === null) {
291
- return null;
292
- }
293
291
  return serializeAws_restJson1Event(entry, context);
294
292
  });
295
293
  };
@@ -297,9 +295,6 @@ var serializeAws_restJson1Impression = function (input, context) {
297
295
  return input
298
296
  .filter(function (e) { return e != null; })
299
297
  .map(function (entry) {
300
- if (entry === null) {
301
- return null;
302
- }
303
298
  return entry;
304
299
  });
305
300
  };
@@ -310,9 +305,6 @@ var serializeAws_restJson1ItemList = function (input, context) {
310
305
  return input
311
306
  .filter(function (e) { return e != null; })
312
307
  .map(function (entry) {
313
- if (entry === null) {
314
- return null;
315
- }
316
308
  return serializeAws_restJson1Item(entry, context);
317
309
  });
318
310
  };
@@ -323,9 +315,6 @@ var serializeAws_restJson1UserList = function (input, context) {
323
315
  return input
324
316
  .filter(function (e) { return e != null; })
325
317
  .map(function (entry) {
326
- if (entry === null) {
327
- return null;
328
- }
329
318
  return serializeAws_restJson1User(entry, context);
330
319
  });
331
320
  };
@@ -63,12 +63,6 @@ export interface Event {
63
63
  */
64
64
  impression?: string[];
65
65
  }
66
- export declare namespace Event {
67
- /**
68
- * @internal
69
- */
70
- const filterSensitiveLog: (obj: Event) => any;
71
- }
72
66
  export interface PutEventsRequest {
73
67
  /**
74
68
  * <p>The tracking ID for the event.
@@ -91,12 +85,6 @@ export interface PutEventsRequest {
91
85
  */
92
86
  eventList: Event[] | undefined;
93
87
  }
94
- export declare namespace PutEventsRequest {
95
- /**
96
- * @internal
97
- */
98
- const filterSensitiveLog: (obj: PutEventsRequest) => any;
99
- }
100
88
  /**
101
89
  * <p>Represents item metadata added to an Items dataset using the
102
90
  * <code>PutItems</code> API. For more information see
@@ -118,12 +106,6 @@ export interface Item {
118
106
  */
119
107
  properties?: __LazyJsonString | string;
120
108
  }
121
- export declare namespace Item {
122
- /**
123
- * @internal
124
- */
125
- const filterSensitiveLog: (obj: Item) => any;
126
- }
127
109
  export interface PutItemsRequest {
128
110
  /**
129
111
  * <p>The Amazon Resource Name (ARN) of the Items dataset you are adding the item or items to.</p>
@@ -134,12 +116,6 @@ export interface PutItemsRequest {
134
116
  */
135
117
  items: Item[] | undefined;
136
118
  }
137
- export declare namespace PutItemsRequest {
138
- /**
139
- * @internal
140
- */
141
- const filterSensitiveLog: (obj: PutItemsRequest) => any;
142
- }
143
119
  /**
144
120
  * <p>The specified resource is in use.</p>
145
121
  */
@@ -183,12 +159,6 @@ export interface User {
183
159
  */
184
160
  properties?: __LazyJsonString | string;
185
161
  }
186
- export declare namespace User {
187
- /**
188
- * @internal
189
- */
190
- const filterSensitiveLog: (obj: User) => any;
191
- }
192
162
  export interface PutUsersRequest {
193
163
  /**
194
164
  * <p>The Amazon Resource Name (ARN) of the Users dataset you are adding the user or users to.</p>
@@ -199,9 +169,27 @@ export interface PutUsersRequest {
199
169
  */
200
170
  users: User[] | undefined;
201
171
  }
202
- export declare namespace PutUsersRequest {
203
- /**
204
- * @internal
205
- */
206
- const filterSensitiveLog: (obj: PutUsersRequest) => any;
207
- }
172
+ /**
173
+ * @internal
174
+ */
175
+ export declare const EventFilterSensitiveLog: (obj: Event) => any;
176
+ /**
177
+ * @internal
178
+ */
179
+ export declare const PutEventsRequestFilterSensitiveLog: (obj: PutEventsRequest) => any;
180
+ /**
181
+ * @internal
182
+ */
183
+ export declare const ItemFilterSensitiveLog: (obj: Item) => any;
184
+ /**
185
+ * @internal
186
+ */
187
+ export declare const PutItemsRequestFilterSensitiveLog: (obj: PutItemsRequest) => any;
188
+ /**
189
+ * @internal
190
+ */
191
+ export declare const UserFilterSensitiveLog: (obj: User) => any;
192
+ /**
193
+ * @internal
194
+ */
195
+ export declare const PutUsersRequestFilterSensitiveLog: (obj: PutUsersRequest) => any;
@@ -26,10 +26,6 @@ export interface Event {
26
26
 
27
27
  impression?: string[];
28
28
  }
29
- export declare namespace Event {
30
-
31
- const filterSensitiveLog: (obj: Event) => any;
32
- }
33
29
  export interface PutEventsRequest {
34
30
 
35
31
  trackingId: string | undefined;
@@ -40,10 +36,6 @@ export interface PutEventsRequest {
40
36
 
41
37
  eventList: Event[] | undefined;
42
38
  }
43
- export declare namespace PutEventsRequest {
44
-
45
- const filterSensitiveLog: (obj: PutEventsRequest) => any;
46
- }
47
39
 
48
40
  export interface Item {
49
41
 
@@ -51,20 +43,12 @@ export interface Item {
51
43
 
52
44
  properties?: __LazyJsonString | string;
53
45
  }
54
- export declare namespace Item {
55
-
56
- const filterSensitiveLog: (obj: Item) => any;
57
- }
58
46
  export interface PutItemsRequest {
59
47
 
60
48
  datasetArn: string | undefined;
61
49
 
62
50
  items: Item[] | undefined;
63
51
  }
64
- export declare namespace PutItemsRequest {
65
-
66
- const filterSensitiveLog: (obj: PutItemsRequest) => any;
67
- }
68
52
 
69
53
  export declare class ResourceInUseException extends __BaseException {
70
54
  readonly name: "ResourceInUseException";
@@ -86,17 +70,21 @@ export interface User {
86
70
 
87
71
  properties?: __LazyJsonString | string;
88
72
  }
89
- export declare namespace User {
90
-
91
- const filterSensitiveLog: (obj: User) => any;
92
- }
93
73
  export interface PutUsersRequest {
94
74
 
95
75
  datasetArn: string | undefined;
96
76
 
97
77
  users: User[] | undefined;
98
78
  }
99
- export declare namespace PutUsersRequest {
100
-
101
- const filterSensitiveLog: (obj: PutUsersRequest) => any;
102
- }
79
+
80
+ export declare const EventFilterSensitiveLog: (obj: Event) => any;
81
+
82
+ export declare const PutEventsRequestFilterSensitiveLog: (obj: PutEventsRequest) => any;
83
+
84
+ export declare const ItemFilterSensitiveLog: (obj: Item) => any;
85
+
86
+ export declare const PutItemsRequestFilterSensitiveLog: (obj: PutItemsRequest) => any;
87
+
88
+ export declare const UserFilterSensitiveLog: (obj: User) => any;
89
+
90
+ export declare const PutUsersRequestFilterSensitiveLog: (obj: PutUsersRequest) => any;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-personalize-events",
3
3
  "description": "AWS SDK for JavaScript Personalize Events Client for Node.js, Browser and React Native",
4
- "version": "3.131.0",
4
+ "version": "3.142.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",
@@ -18,9 +18,9 @@
18
18
  "dependencies": {
19
19
  "@aws-crypto/sha256-browser": "2.0.0",
20
20
  "@aws-crypto/sha256-js": "2.0.0",
21
- "@aws-sdk/client-sts": "3.131.0",
21
+ "@aws-sdk/client-sts": "3.142.0",
22
22
  "@aws-sdk/config-resolver": "3.130.0",
23
- "@aws-sdk/credential-provider-node": "3.131.0",
23
+ "@aws-sdk/credential-provider-node": "3.142.0",
24
24
  "@aws-sdk/fetch-http-handler": "3.131.0",
25
25
  "@aws-sdk/hash-node": "3.127.0",
26
26
  "@aws-sdk/invalid-dependency": "3.127.0",
@@ -36,15 +36,15 @@
36
36
  "@aws-sdk/node-config-provider": "3.127.0",
37
37
  "@aws-sdk/node-http-handler": "3.127.0",
38
38
  "@aws-sdk/protocol-http": "3.127.0",
39
- "@aws-sdk/smithy-client": "3.127.0",
39
+ "@aws-sdk/smithy-client": "3.142.0",
40
40
  "@aws-sdk/types": "3.127.0",
41
41
  "@aws-sdk/url-parser": "3.127.0",
42
42
  "@aws-sdk/util-base64-browser": "3.109.0",
43
43
  "@aws-sdk/util-base64-node": "3.55.0",
44
44
  "@aws-sdk/util-body-length-browser": "3.55.0",
45
45
  "@aws-sdk/util-body-length-node": "3.55.0",
46
- "@aws-sdk/util-defaults-mode-browser": "3.127.0",
47
- "@aws-sdk/util-defaults-mode-node": "3.130.0",
46
+ "@aws-sdk/util-defaults-mode-browser": "3.142.0",
47
+ "@aws-sdk/util-defaults-mode-node": "3.142.0",
48
48
  "@aws-sdk/util-user-agent-browser": "3.127.0",
49
49
  "@aws-sdk/util-user-agent-node": "3.127.0",
50
50
  "@aws-sdk/util-utf8-browser": "3.109.0",