@aws-sdk/client-personalize-events 3.183.0 → 3.185.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.185.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.184.0...v3.185.0) (2022-10-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **codegen:** add deser check for x-amz-request-id ([#4015](https://github.com/aws/aws-sdk-js-v3/issues/4015)) ([6ff07bd](https://github.com/aws/aws-sdk-js-v3/commit/6ff07bd7e72bd56725f318013ac1d6d0fbbcdd9a))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
7
18
 
8
19
  **Note:** Version bump only for package @aws-sdk/client-personalize-events
@@ -268,10 +268,10 @@ const serializeAws_restJson1UserList = (input, context) => {
268
268
  });
269
269
  };
270
270
  const deserializeMetadata = (output) => {
271
- var _a;
271
+ var _a, _b;
272
272
  return ({
273
273
  httpStatusCode: output.statusCode,
274
- requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
274
+ requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
275
275
  extendedRequestId: output.headers["x-amz-id-2"],
276
276
  cfId: output.headers["x-amz-cf-id"],
277
277
  });
@@ -1,48 +1,55 @@
1
+ import { __extends } from "tslib";
1
2
  import { PutEventsCommand } from "./commands/PutEventsCommand";
2
3
  import { PutItemsCommand } from "./commands/PutItemsCommand";
3
4
  import { PutUsersCommand } from "./commands/PutUsersCommand";
4
5
  import { PersonalizeEventsClient } from "./PersonalizeEventsClient";
5
- export class PersonalizeEvents extends PersonalizeEventsClient {
6
- putEvents(args, optionsOrCb, cb) {
7
- const command = new PutEventsCommand(args);
6
+ var PersonalizeEvents = (function (_super) {
7
+ __extends(PersonalizeEvents, _super);
8
+ function PersonalizeEvents() {
9
+ return _super !== null && _super.apply(this, arguments) || this;
10
+ }
11
+ PersonalizeEvents.prototype.putEvents = function (args, optionsOrCb, cb) {
12
+ var command = new PutEventsCommand(args);
8
13
  if (typeof optionsOrCb === "function") {
9
14
  this.send(command, optionsOrCb);
10
15
  }
11
16
  else if (typeof cb === "function") {
12
17
  if (typeof optionsOrCb !== "object")
13
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
18
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
14
19
  this.send(command, optionsOrCb || {}, cb);
15
20
  }
16
21
  else {
17
22
  return this.send(command, optionsOrCb);
18
23
  }
19
- }
20
- putItems(args, optionsOrCb, cb) {
21
- const command = new PutItemsCommand(args);
24
+ };
25
+ PersonalizeEvents.prototype.putItems = function (args, optionsOrCb, cb) {
26
+ var command = new PutItemsCommand(args);
22
27
  if (typeof optionsOrCb === "function") {
23
28
  this.send(command, optionsOrCb);
24
29
  }
25
30
  else if (typeof cb === "function") {
26
31
  if (typeof optionsOrCb !== "object")
27
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
32
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
28
33
  this.send(command, optionsOrCb || {}, cb);
29
34
  }
30
35
  else {
31
36
  return this.send(command, optionsOrCb);
32
37
  }
33
- }
34
- putUsers(args, optionsOrCb, cb) {
35
- const command = new PutUsersCommand(args);
38
+ };
39
+ PersonalizeEvents.prototype.putUsers = function (args, optionsOrCb, cb) {
40
+ var command = new PutUsersCommand(args);
36
41
  if (typeof optionsOrCb === "function") {
37
42
  this.send(command, optionsOrCb);
38
43
  }
39
44
  else if (typeof cb === "function") {
40
45
  if (typeof optionsOrCb !== "object")
41
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
46
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
42
47
  this.send(command, optionsOrCb || {}, cb);
43
48
  }
44
49
  else {
45
50
  return this.send(command, optionsOrCb);
46
51
  }
47
- }
48
- }
52
+ };
53
+ return PersonalizeEvents;
54
+ }(PersonalizeEventsClient));
55
+ export { PersonalizeEvents };
@@ -1,3 +1,4 @@
1
+ import { __extends } from "tslib";
1
2
  import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
2
3
  import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
3
4
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
@@ -8,26 +9,31 @@ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-sig
8
9
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
9
10
  import { Client as __Client, } from "@aws-sdk/smithy-client";
10
11
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
11
- export class PersonalizeEventsClient extends __Client {
12
- constructor(configuration) {
13
- const _config_0 = __getRuntimeConfig(configuration);
14
- const _config_1 = resolveRegionConfig(_config_0);
15
- const _config_2 = resolveEndpointsConfig(_config_1);
16
- const _config_3 = resolveRetryConfig(_config_2);
17
- const _config_4 = resolveHostHeaderConfig(_config_3);
18
- const _config_5 = resolveAwsAuthConfig(_config_4);
19
- const _config_6 = resolveUserAgentConfig(_config_5);
20
- super(_config_6);
21
- this.config = _config_6;
22
- this.middlewareStack.use(getRetryPlugin(this.config));
23
- this.middlewareStack.use(getContentLengthPlugin(this.config));
24
- this.middlewareStack.use(getHostHeaderPlugin(this.config));
25
- this.middlewareStack.use(getLoggerPlugin(this.config));
26
- this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
27
- this.middlewareStack.use(getAwsAuthPlugin(this.config));
28
- this.middlewareStack.use(getUserAgentPlugin(this.config));
12
+ var PersonalizeEventsClient = (function (_super) {
13
+ __extends(PersonalizeEventsClient, _super);
14
+ function PersonalizeEventsClient(configuration) {
15
+ var _this = this;
16
+ var _config_0 = __getRuntimeConfig(configuration);
17
+ var _config_1 = resolveRegionConfig(_config_0);
18
+ var _config_2 = resolveEndpointsConfig(_config_1);
19
+ var _config_3 = resolveRetryConfig(_config_2);
20
+ var _config_4 = resolveHostHeaderConfig(_config_3);
21
+ var _config_5 = resolveAwsAuthConfig(_config_4);
22
+ var _config_6 = resolveUserAgentConfig(_config_5);
23
+ _this = _super.call(this, _config_6) || this;
24
+ _this.config = _config_6;
25
+ _this.middlewareStack.use(getRetryPlugin(_this.config));
26
+ _this.middlewareStack.use(getContentLengthPlugin(_this.config));
27
+ _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
28
+ _this.middlewareStack.use(getLoggerPlugin(_this.config));
29
+ _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
30
+ _this.middlewareStack.use(getAwsAuthPlugin(_this.config));
31
+ _this.middlewareStack.use(getUserAgentPlugin(_this.config));
32
+ return _this;
29
33
  }
30
- destroy() {
31
- super.destroy();
32
- }
33
- }
34
+ PersonalizeEventsClient.prototype.destroy = function () {
35
+ _super.prototype.destroy.call(this);
36
+ };
37
+ return PersonalizeEventsClient;
38
+ }(__Client));
39
+ export { PersonalizeEventsClient };
@@ -1,32 +1,39 @@
1
+ import { __extends } from "tslib";
1
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
4
  import { PutEventsRequestFilterSensitiveLog } from "../models/models_0";
4
5
  import { deserializeAws_restJson1PutEventsCommand, serializeAws_restJson1PutEventsCommand, } from "../protocols/Aws_restJson1";
5
- export class PutEventsCommand extends $Command {
6
- constructor(input) {
7
- super();
8
- this.input = input;
6
+ var PutEventsCommand = (function (_super) {
7
+ __extends(PutEventsCommand, _super);
8
+ function PutEventsCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
9
12
  }
10
- resolveMiddleware(clientStack, configuration, options) {
13
+ PutEventsCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
11
14
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
12
- const stack = clientStack.concat(this.middlewareStack);
13
- const { logger } = configuration;
14
- const clientName = "PersonalizeEventsClient";
15
- const commandName = "PutEventsCommand";
16
- const handlerExecutionContext = {
17
- logger,
18
- clientName,
19
- commandName,
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "PersonalizeEventsClient";
18
+ var commandName = "PutEventsCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
20
23
  inputFilterSensitiveLog: PutEventsRequestFilterSensitiveLog,
21
- outputFilterSensitiveLog: (output) => output,
24
+ outputFilterSensitiveLog: function (output) { return output; },
22
25
  };
23
- const { requestHandler } = configuration;
24
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
- }
26
- serialize(input, context) {
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ PutEventsCommand.prototype.serialize = function (input, context) {
27
32
  return serializeAws_restJson1PutEventsCommand(input, context);
28
- }
29
- deserialize(output, context) {
33
+ };
34
+ PutEventsCommand.prototype.deserialize = function (output, context) {
30
35
  return deserializeAws_restJson1PutEventsCommand(output, context);
31
- }
32
- }
36
+ };
37
+ return PutEventsCommand;
38
+ }($Command));
39
+ export { PutEventsCommand };
@@ -1,32 +1,39 @@
1
+ import { __extends } from "tslib";
1
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
4
  import { PutItemsRequestFilterSensitiveLog } from "../models/models_0";
4
5
  import { deserializeAws_restJson1PutItemsCommand, serializeAws_restJson1PutItemsCommand, } from "../protocols/Aws_restJson1";
5
- export class PutItemsCommand extends $Command {
6
- constructor(input) {
7
- super();
8
- this.input = input;
6
+ var PutItemsCommand = (function (_super) {
7
+ __extends(PutItemsCommand, _super);
8
+ function PutItemsCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
9
12
  }
10
- resolveMiddleware(clientStack, configuration, options) {
13
+ PutItemsCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
11
14
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
12
- const stack = clientStack.concat(this.middlewareStack);
13
- const { logger } = configuration;
14
- const clientName = "PersonalizeEventsClient";
15
- const commandName = "PutItemsCommand";
16
- const handlerExecutionContext = {
17
- logger,
18
- clientName,
19
- commandName,
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "PersonalizeEventsClient";
18
+ var commandName = "PutItemsCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
20
23
  inputFilterSensitiveLog: PutItemsRequestFilterSensitiveLog,
21
- outputFilterSensitiveLog: (output) => output,
24
+ outputFilterSensitiveLog: function (output) { return output; },
22
25
  };
23
- const { requestHandler } = configuration;
24
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
- }
26
- serialize(input, context) {
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ PutItemsCommand.prototype.serialize = function (input, context) {
27
32
  return serializeAws_restJson1PutItemsCommand(input, context);
28
- }
29
- deserialize(output, context) {
33
+ };
34
+ PutItemsCommand.prototype.deserialize = function (output, context) {
30
35
  return deserializeAws_restJson1PutItemsCommand(output, context);
31
- }
32
- }
36
+ };
37
+ return PutItemsCommand;
38
+ }($Command));
39
+ export { PutItemsCommand };
@@ -1,32 +1,39 @@
1
+ import { __extends } from "tslib";
1
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
4
  import { PutUsersRequestFilterSensitiveLog } from "../models/models_0";
4
5
  import { deserializeAws_restJson1PutUsersCommand, serializeAws_restJson1PutUsersCommand, } from "../protocols/Aws_restJson1";
5
- export class PutUsersCommand extends $Command {
6
- constructor(input) {
7
- super();
8
- this.input = input;
6
+ var PutUsersCommand = (function (_super) {
7
+ __extends(PutUsersCommand, _super);
8
+ function PutUsersCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
9
12
  }
10
- resolveMiddleware(clientStack, configuration, options) {
13
+ PutUsersCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
11
14
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
12
- const stack = clientStack.concat(this.middlewareStack);
13
- const { logger } = configuration;
14
- const clientName = "PersonalizeEventsClient";
15
- const commandName = "PutUsersCommand";
16
- const handlerExecutionContext = {
17
- logger,
18
- clientName,
19
- commandName,
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "PersonalizeEventsClient";
18
+ var commandName = "PutUsersCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
20
23
  inputFilterSensitiveLog: PutUsersRequestFilterSensitiveLog,
21
- outputFilterSensitiveLog: (output) => output,
24
+ outputFilterSensitiveLog: function (output) { return output; },
22
25
  };
23
- const { requestHandler } = configuration;
24
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
- }
26
- serialize(input, context) {
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ PutUsersCommand.prototype.serialize = function (input, context) {
27
32
  return serializeAws_restJson1PutUsersCommand(input, context);
28
- }
29
- deserialize(output, context) {
33
+ };
34
+ PutUsersCommand.prototype.deserialize = function (output, context) {
30
35
  return deserializeAws_restJson1PutUsersCommand(output, context);
31
- }
32
- }
36
+ };
37
+ return PutUsersCommand;
38
+ }($Command));
39
+ export { PutUsersCommand };
@@ -1,6 +1,7 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import { getRegionInfo } from "@aws-sdk/config-resolver";
2
- const regionHash = {};
3
- const partitionHash = {
3
+ var regionHash = {};
4
+ var partitionHash = {
4
5
  aws: {
5
6
  regions: [
6
7
  "af-south-1",
@@ -120,9 +121,8 @@ const partitionHash = {
120
121
  ],
121
122
  },
122
123
  };
123
- export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
124
- ...options,
125
- signingService: "personalize",
126
- regionHash,
127
- partitionHash,
128
- });
124
+ export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
125
+ return __generator(this, function (_a) {
126
+ return [2, getRegionInfo(region, __assign(__assign({}, options), { signingService: "personalize", regionHash: regionHash, partitionHash: partitionHash }))];
127
+ });
128
+ }); };
@@ -1,7 +1,12 @@
1
+ import { __extends } from "tslib";
1
2
  import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
2
- export class PersonalizeEventsServiceException extends __ServiceException {
3
- constructor(options) {
4
- super(options);
5
- Object.setPrototypeOf(this, PersonalizeEventsServiceException.prototype);
3
+ var PersonalizeEventsServiceException = (function (_super) {
4
+ __extends(PersonalizeEventsServiceException, _super);
5
+ function PersonalizeEventsServiceException(options) {
6
+ var _this = _super.call(this, options) || this;
7
+ Object.setPrototypeOf(_this, PersonalizeEventsServiceException.prototype);
8
+ return _this;
6
9
  }
7
- }
10
+ return PersonalizeEventsServiceException;
11
+ }(__ServiceException));
12
+ export { PersonalizeEventsServiceException };
@@ -1,55 +1,44 @@
1
+ import { __assign, __extends } from "tslib";
1
2
  import { PersonalizeEventsServiceException as __BaseException } from "./PersonalizeEventsServiceException";
2
- export class InvalidInputException extends __BaseException {
3
- constructor(opts) {
4
- super({
5
- name: "InvalidInputException",
6
- $fault: "client",
7
- ...opts,
8
- });
9
- this.name = "InvalidInputException";
10
- this.$fault = "client";
11
- Object.setPrototypeOf(this, InvalidInputException.prototype);
3
+ var InvalidInputException = (function (_super) {
4
+ __extends(InvalidInputException, _super);
5
+ function InvalidInputException(opts) {
6
+ var _this = _super.call(this, __assign({ name: "InvalidInputException", $fault: "client" }, opts)) || this;
7
+ _this.name = "InvalidInputException";
8
+ _this.$fault = "client";
9
+ Object.setPrototypeOf(_this, InvalidInputException.prototype);
10
+ return _this;
12
11
  }
13
- }
14
- export class ResourceInUseException extends __BaseException {
15
- constructor(opts) {
16
- super({
17
- name: "ResourceInUseException",
18
- $fault: "client",
19
- ...opts,
20
- });
21
- this.name = "ResourceInUseException";
22
- this.$fault = "client";
23
- Object.setPrototypeOf(this, ResourceInUseException.prototype);
12
+ return InvalidInputException;
13
+ }(__BaseException));
14
+ export { InvalidInputException };
15
+ var ResourceInUseException = (function (_super) {
16
+ __extends(ResourceInUseException, _super);
17
+ function ResourceInUseException(opts) {
18
+ var _this = _super.call(this, __assign({ name: "ResourceInUseException", $fault: "client" }, opts)) || this;
19
+ _this.name = "ResourceInUseException";
20
+ _this.$fault = "client";
21
+ Object.setPrototypeOf(_this, ResourceInUseException.prototype);
22
+ return _this;
24
23
  }
25
- }
26
- export class ResourceNotFoundException extends __BaseException {
27
- constructor(opts) {
28
- super({
29
- name: "ResourceNotFoundException",
30
- $fault: "client",
31
- ...opts,
32
- });
33
- this.name = "ResourceNotFoundException";
34
- this.$fault = "client";
35
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
24
+ return ResourceInUseException;
25
+ }(__BaseException));
26
+ export { ResourceInUseException };
27
+ var ResourceNotFoundException = (function (_super) {
28
+ __extends(ResourceNotFoundException, _super);
29
+ function ResourceNotFoundException(opts) {
30
+ var _this = _super.call(this, __assign({ name: "ResourceNotFoundException", $fault: "client" }, opts)) || this;
31
+ _this.name = "ResourceNotFoundException";
32
+ _this.$fault = "client";
33
+ Object.setPrototypeOf(_this, ResourceNotFoundException.prototype);
34
+ return _this;
36
35
  }
37
- }
38
- export const EventFilterSensitiveLog = (obj) => ({
39
- ...obj,
40
- });
41
- export const PutEventsRequestFilterSensitiveLog = (obj) => ({
42
- ...obj,
43
- });
44
- export const ItemFilterSensitiveLog = (obj) => ({
45
- ...obj,
46
- });
47
- export const PutItemsRequestFilterSensitiveLog = (obj) => ({
48
- ...obj,
49
- });
50
- export const UserFilterSensitiveLog = (obj) => ({
51
- ...obj,
52
- });
53
- export const PutUsersRequestFilterSensitiveLog = (obj) => ({
54
- ...obj,
55
- });
36
+ return ResourceNotFoundException;
37
+ }(__BaseException));
38
+ export { ResourceNotFoundException };
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)); };