@aws-sdk/client-lex-runtime-service 3.186.0 → 3.188.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.
Files changed (34) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist-cjs/protocols/Aws_restJson1.js +2 -0
  3. package/dist-cjs/runtimeConfig.browser.js +9 -7
  4. package/dist-cjs/runtimeConfig.js +9 -7
  5. package/dist-es/LexRuntimeService.js +22 -29
  6. package/dist-es/LexRuntimeServiceClient.js +22 -28
  7. package/dist-es/commands/DeleteSessionCommand.js +21 -28
  8. package/dist-es/commands/GetSessionCommand.js +21 -28
  9. package/dist-es/commands/PostContentCommand.js +21 -28
  10. package/dist-es/commands/PostTextCommand.js +21 -28
  11. package/dist-es/commands/PutSessionCommand.js +21 -28
  12. package/dist-es/endpoints.js +8 -8
  13. package/dist-es/models/LexRuntimeServiceServiceException.js +5 -10
  14. package/dist-es/models/models_0.js +223 -152
  15. package/dist-es/protocols/Aws_restJson1.js +755 -913
  16. package/dist-es/runtimeConfig.browser.js +28 -12
  17. package/dist-es/runtimeConfig.js +32 -12
  18. package/dist-es/runtimeConfig.native.js +8 -5
  19. package/dist-es/runtimeConfig.shared.js +8 -11
  20. package/dist-types/LexRuntimeServiceClient.d.ts +6 -1
  21. package/dist-types/commands/PostContentCommand.d.ts +2 -2
  22. package/dist-types/commands/PutSessionCommand.d.ts +2 -2
  23. package/dist-types/protocols/Aws_restJson1.d.ts +3 -3
  24. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  25. package/dist-types/runtimeConfig.d.ts +1 -0
  26. package/dist-types/runtimeConfig.native.d.ts +1 -0
  27. package/dist-types/ts3.4/LexRuntimeServiceClient.d.ts +2 -0
  28. package/dist-types/ts3.4/commands/PostContentCommand.d.ts +2 -1
  29. package/dist-types/ts3.4/commands/PutSessionCommand.d.ts +2 -1
  30. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +6 -3
  31. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -0
  32. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
  33. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
  34. package/package.json +35 -33
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.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13)
7
+
8
+
9
+ ### Features
10
+
11
+ * **clients:** support util functions to consume response streams ([#3977](https://github.com/aws/aws-sdk-js-v3/issues/3977)) ([ad99b66](https://github.com/aws/aws-sdk-js-v3/commit/ad99b66944b6fe1ce83082c1a33193dff033cfaf))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)
7
18
 
8
19
  **Note:** Version bump only for package @aws-sdk/client-lex-runtime-service
@@ -309,6 +309,7 @@ const deserializeAws_restJson1PostContentCommand = async (output, context) => {
309
309
  ],
310
310
  });
311
311
  const data = output.body;
312
+ context.sdkStreamMixin(data);
312
313
  contents.audioStream = data;
313
314
  return contents;
314
315
  };
@@ -485,6 +486,7 @@ const deserializeAws_restJson1PutSessionCommand = async (output, context) => {
485
486
  ],
486
487
  });
487
488
  const data = output.body;
489
+ context.sdkStreamMixin(data);
488
490
  contents.audioStream = data;
489
491
  return contents;
490
492
  };
@@ -10,13 +10,14 @@ const invalid_dependency_1 = require("@aws-sdk/invalid-dependency");
10
10
  const middleware_retry_1 = require("@aws-sdk/middleware-retry");
11
11
  const util_base64_browser_1 = require("@aws-sdk/util-base64-browser");
12
12
  const util_body_length_browser_1 = require("@aws-sdk/util-body-length-browser");
13
+ const util_stream_browser_1 = require("@aws-sdk/util-stream-browser");
13
14
  const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
14
15
  const util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser");
15
16
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
16
17
  const smithy_client_1 = require("@aws-sdk/smithy-client");
17
18
  const util_defaults_mode_browser_1 = require("@aws-sdk/util-defaults-mode-browser");
18
19
  const getRuntimeConfig = (config) => {
19
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
20
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
20
21
  const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
21
22
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
22
23
  const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
@@ -34,12 +35,13 @@ const getRuntimeConfig = (config) => {
34
35
  region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : (0, invalid_dependency_1.invalidProvider)("Region is missing"),
35
36
  requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
36
37
  retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
37
- sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : sha256_browser_1.Sha256,
38
- streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : fetch_http_handler_1.streamCollector,
39
- useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
40
- useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
41
- utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_browser_1.fromUtf8,
42
- utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_browser_1.toUtf8,
38
+ sdkStreamMixin: (_k = config === null || config === void 0 ? void 0 : config.sdkStreamMixin) !== null && _k !== void 0 ? _k : util_stream_browser_1.sdkStreamMixin,
39
+ sha256: (_l = config === null || config === void 0 ? void 0 : config.sha256) !== null && _l !== void 0 ? _l : sha256_browser_1.Sha256,
40
+ streamCollector: (_m = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _m !== void 0 ? _m : fetch_http_handler_1.streamCollector,
41
+ useDualstackEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _o !== void 0 ? _o : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
42
+ useFipsEndpoint: (_p = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _p !== void 0 ? _p : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
43
+ utf8Decoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _q !== void 0 ? _q : util_utf8_browser_1.fromUtf8,
44
+ utf8Encoder: (_r = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _r !== void 0 ? _r : util_utf8_browser_1.toUtf8,
43
45
  };
44
46
  };
45
47
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -12,6 +12,7 @@ const node_config_provider_1 = require("@aws-sdk/node-config-provider");
12
12
  const node_http_handler_1 = require("@aws-sdk/node-http-handler");
13
13
  const util_base64_node_1 = require("@aws-sdk/util-base64-node");
14
14
  const util_body_length_node_1 = require("@aws-sdk/util-body-length-node");
15
+ const util_stream_node_1 = require("@aws-sdk/util-stream-node");
15
16
  const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
16
17
  const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
17
18
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
@@ -19,7 +20,7 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
19
20
  const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
20
21
  const smithy_client_2 = require("@aws-sdk/smithy-client");
21
22
  const getRuntimeConfig = (config) => {
22
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
23
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
23
24
  (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
24
25
  const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
25
26
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
@@ -41,12 +42,13 @@ const getRuntimeConfig = (config) => {
41
42
  ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
42
43
  default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
43
44
  }),
44
- sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
45
- streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
46
- useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
47
- useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
48
- utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.fromUtf8,
49
- utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_node_1.toUtf8,
45
+ sdkStreamMixin: (_k = config === null || config === void 0 ? void 0 : config.sdkStreamMixin) !== null && _k !== void 0 ? _k : util_stream_node_1.sdkStreamMixin,
46
+ sha256: (_l = config === null || config === void 0 ? void 0 : config.sha256) !== null && _l !== void 0 ? _l : hash_node_1.Hash.bind(null, "sha256"),
47
+ streamCollector: (_m = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _m !== void 0 ? _m : node_http_handler_1.streamCollector,
48
+ useDualstackEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _o !== void 0 ? _o : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
49
+ useFipsEndpoint: (_p = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _p !== void 0 ? _p : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
50
+ utf8Decoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _q !== void 0 ? _q : util_utf8_node_1.fromUtf8,
51
+ utf8Encoder: (_r = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _r !== void 0 ? _r : util_utf8_node_1.toUtf8,
50
52
  };
51
53
  };
52
54
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,85 +1,78 @@
1
- import { __extends } from "tslib";
2
1
  import { DeleteSessionCommand, } from "./commands/DeleteSessionCommand";
3
2
  import { GetSessionCommand } from "./commands/GetSessionCommand";
4
3
  import { PostContentCommand } from "./commands/PostContentCommand";
5
4
  import { PostTextCommand } from "./commands/PostTextCommand";
6
5
  import { PutSessionCommand } from "./commands/PutSessionCommand";
7
6
  import { LexRuntimeServiceClient } from "./LexRuntimeServiceClient";
8
- var LexRuntimeService = (function (_super) {
9
- __extends(LexRuntimeService, _super);
10
- function LexRuntimeService() {
11
- return _super !== null && _super.apply(this, arguments) || this;
12
- }
13
- LexRuntimeService.prototype.deleteSession = function (args, optionsOrCb, cb) {
14
- var command = new DeleteSessionCommand(args);
7
+ export class LexRuntimeService extends LexRuntimeServiceClient {
8
+ deleteSession(args, optionsOrCb, cb) {
9
+ const command = new DeleteSessionCommand(args);
15
10
  if (typeof optionsOrCb === "function") {
16
11
  this.send(command, optionsOrCb);
17
12
  }
18
13
  else if (typeof cb === "function") {
19
14
  if (typeof optionsOrCb !== "object")
20
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
15
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
21
16
  this.send(command, optionsOrCb || {}, cb);
22
17
  }
23
18
  else {
24
19
  return this.send(command, optionsOrCb);
25
20
  }
26
- };
27
- LexRuntimeService.prototype.getSession = function (args, optionsOrCb, cb) {
28
- var command = new GetSessionCommand(args);
21
+ }
22
+ getSession(args, optionsOrCb, cb) {
23
+ const command = new GetSessionCommand(args);
29
24
  if (typeof optionsOrCb === "function") {
30
25
  this.send(command, optionsOrCb);
31
26
  }
32
27
  else if (typeof cb === "function") {
33
28
  if (typeof optionsOrCb !== "object")
34
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
29
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
35
30
  this.send(command, optionsOrCb || {}, cb);
36
31
  }
37
32
  else {
38
33
  return this.send(command, optionsOrCb);
39
34
  }
40
- };
41
- LexRuntimeService.prototype.postContent = function (args, optionsOrCb, cb) {
42
- var command = new PostContentCommand(args);
35
+ }
36
+ postContent(args, optionsOrCb, cb) {
37
+ const command = new PostContentCommand(args);
43
38
  if (typeof optionsOrCb === "function") {
44
39
  this.send(command, optionsOrCb);
45
40
  }
46
41
  else if (typeof cb === "function") {
47
42
  if (typeof optionsOrCb !== "object")
48
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
43
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
49
44
  this.send(command, optionsOrCb || {}, cb);
50
45
  }
51
46
  else {
52
47
  return this.send(command, optionsOrCb);
53
48
  }
54
- };
55
- LexRuntimeService.prototype.postText = function (args, optionsOrCb, cb) {
56
- var command = new PostTextCommand(args);
49
+ }
50
+ postText(args, optionsOrCb, cb) {
51
+ const command = new PostTextCommand(args);
57
52
  if (typeof optionsOrCb === "function") {
58
53
  this.send(command, optionsOrCb);
59
54
  }
60
55
  else if (typeof cb === "function") {
61
56
  if (typeof optionsOrCb !== "object")
62
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
57
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
63
58
  this.send(command, optionsOrCb || {}, cb);
64
59
  }
65
60
  else {
66
61
  return this.send(command, optionsOrCb);
67
62
  }
68
- };
69
- LexRuntimeService.prototype.putSession = function (args, optionsOrCb, cb) {
70
- var command = new PutSessionCommand(args);
63
+ }
64
+ putSession(args, optionsOrCb, cb) {
65
+ const command = new PutSessionCommand(args);
71
66
  if (typeof optionsOrCb === "function") {
72
67
  this.send(command, optionsOrCb);
73
68
  }
74
69
  else if (typeof cb === "function") {
75
70
  if (typeof optionsOrCb !== "object")
76
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
71
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
77
72
  this.send(command, optionsOrCb || {}, cb);
78
73
  }
79
74
  else {
80
75
  return this.send(command, optionsOrCb);
81
76
  }
82
- };
83
- return LexRuntimeService;
84
- }(LexRuntimeServiceClient));
85
- export { LexRuntimeService };
77
+ }
78
+ }
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
3
2
  import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
4
3
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
@@ -9,31 +8,26 @@ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-sig
9
8
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
10
9
  import { Client as __Client, } from "@aws-sdk/smithy-client";
11
10
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
12
- var LexRuntimeServiceClient = (function (_super) {
13
- __extends(LexRuntimeServiceClient, _super);
14
- function LexRuntimeServiceClient(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;
11
+ export class LexRuntimeServiceClient 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));
33
29
  }
34
- LexRuntimeServiceClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return LexRuntimeServiceClient;
38
- }(__Client));
39
- export { LexRuntimeServiceClient };
30
+ destroy() {
31
+ super.destroy();
32
+ }
33
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { DeleteSessionRequestFilterSensitiveLog, DeleteSessionResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1DeleteSessionCommand, serializeAws_restJson1DeleteSessionCommand, } from "../protocols/Aws_restJson1";
6
- var DeleteSessionCommand = (function (_super) {
7
- __extends(DeleteSessionCommand, _super);
8
- function DeleteSessionCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class DeleteSessionCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- DeleteSessionCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "LexRuntimeServiceClient";
18
- var commandName = "DeleteSessionCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "LexRuntimeServiceClient";
15
+ const commandName = "DeleteSessionCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: DeleteSessionRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: DeleteSessionResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- DeleteSessionCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1DeleteSessionCommand(input, context);
33
- };
34
- DeleteSessionCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1DeleteSessionCommand(output, context);
36
- };
37
- return DeleteSessionCommand;
38
- }($Command));
39
- export { DeleteSessionCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { GetSessionRequestFilterSensitiveLog, GetSessionResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1GetSessionCommand, serializeAws_restJson1GetSessionCommand, } from "../protocols/Aws_restJson1";
6
- var GetSessionCommand = (function (_super) {
7
- __extends(GetSessionCommand, _super);
8
- function GetSessionCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class GetSessionCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- GetSessionCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "LexRuntimeServiceClient";
18
- var commandName = "GetSessionCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "LexRuntimeServiceClient";
15
+ const commandName = "GetSessionCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: GetSessionRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: GetSessionResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- GetSessionCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1GetSessionCommand(input, context);
33
- };
34
- GetSessionCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1GetSessionCommand(output, context);
36
- };
37
- return GetSessionCommand;
38
- }($Command));
39
- export { GetSessionCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { PostContentRequestFilterSensitiveLog, PostContentResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1PostContentCommand, serializeAws_restJson1PostContentCommand, } from "../protocols/Aws_restJson1";
6
- var PostContentCommand = (function (_super) {
7
- __extends(PostContentCommand, _super);
8
- function PostContentCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class PostContentCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- PostContentCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "LexRuntimeServiceClient";
18
- var commandName = "PostContentCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "LexRuntimeServiceClient";
15
+ const commandName = "PostContentCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: PostContentRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: PostContentResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- PostContentCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1PostContentCommand(input, context);
33
- };
34
- PostContentCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1PostContentCommand(output, context);
36
- };
37
- return PostContentCommand;
38
- }($Command));
39
- export { PostContentCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { PostTextRequestFilterSensitiveLog, PostTextResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1PostTextCommand, serializeAws_restJson1PostTextCommand, } from "../protocols/Aws_restJson1";
6
- var PostTextCommand = (function (_super) {
7
- __extends(PostTextCommand, _super);
8
- function PostTextCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class PostTextCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- PostTextCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "LexRuntimeServiceClient";
18
- var commandName = "PostTextCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "LexRuntimeServiceClient";
15
+ const commandName = "PostTextCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: PostTextRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: PostTextResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- PostTextCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1PostTextCommand(input, context);
33
- };
34
- PostTextCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1PostTextCommand(output, context);
36
- };
37
- return PostTextCommand;
38
- }($Command));
39
- export { PostTextCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { PutSessionRequestFilterSensitiveLog, PutSessionResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1PutSessionCommand, serializeAws_restJson1PutSessionCommand, } from "../protocols/Aws_restJson1";
6
- var PutSessionCommand = (function (_super) {
7
- __extends(PutSessionCommand, _super);
8
- function PutSessionCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class PutSessionCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- PutSessionCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "LexRuntimeServiceClient";
18
- var commandName = "PutSessionCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "LexRuntimeServiceClient";
15
+ const commandName = "PutSessionCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: PutSessionRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: PutSessionResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- PutSessionCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1PutSessionCommand(input, context);
33
- };
34
- PutSessionCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1PutSessionCommand(output, context);
36
- };
37
- return PutSessionCommand;
38
- }($Command));
39
- export { PutSessionCommand };
31
+ }
32
+ }
@@ -1,6 +1,5 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { getRegionInfo } from "@aws-sdk/config-resolver";
3
- var regionHash = {
2
+ const regionHash = {
4
3
  "us-east-1": {
5
4
  variants: [
6
5
  {
@@ -26,7 +25,7 @@ var regionHash = {
26
25
  ],
27
26
  },
28
27
  };
29
- var partitionHash = {
28
+ const partitionHash = {
30
29
  aws: {
31
30
  regions: [
32
31
  "af-south-1",
@@ -148,8 +147,9 @@ var partitionHash = {
148
147
  ],
149
148
  },
150
149
  };
151
- export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
152
- return __generator(this, function (_a) {
153
- return [2, getRegionInfo(region, __assign(__assign({}, options), { signingService: "lex", regionHash: regionHash, partitionHash: partitionHash }))];
154
- });
155
- }); };
150
+ export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
151
+ ...options,
152
+ signingService: "lex",
153
+ regionHash,
154
+ partitionHash,
155
+ });