@aws-sdk/client-lex-runtime-v2 3.185.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 (35) hide show
  1. package/CHANGELOG.md +19 -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/LexRuntimeV2.js +26 -33
  6. package/dist-es/LexRuntimeV2Client.js +24 -30
  7. package/dist-es/commands/DeleteSessionCommand.js +21 -28
  8. package/dist-es/commands/GetSessionCommand.js +21 -28
  9. package/dist-es/commands/PutSessionCommand.js +21 -28
  10. package/dist-es/commands/RecognizeTextCommand.js +21 -28
  11. package/dist-es/commands/RecognizeUtteranceCommand.js +21 -28
  12. package/dist-es/commands/StartConversationCommand.js +21 -28
  13. package/dist-es/endpoints.js +8 -8
  14. package/dist-es/models/LexRuntimeV2ServiceException.js +5 -10
  15. package/dist-es/models/models_0.js +237 -141
  16. package/dist-es/protocols/Aws_restJson1.js +1065 -1301
  17. package/dist-es/runtimeConfig.browser.js +31 -12
  18. package/dist-es/runtimeConfig.js +35 -19
  19. package/dist-es/runtimeConfig.native.js +10 -5
  20. package/dist-es/runtimeConfig.shared.js +8 -11
  21. package/dist-types/LexRuntimeV2Client.d.ts +6 -1
  22. package/dist-types/commands/PutSessionCommand.d.ts +2 -2
  23. package/dist-types/commands/RecognizeUtteranceCommand.d.ts +2 -2
  24. package/dist-types/protocols/Aws_restJson1.d.ts +3 -3
  25. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  26. package/dist-types/runtimeConfig.d.ts +1 -0
  27. package/dist-types/runtimeConfig.native.d.ts +1 -0
  28. package/dist-types/ts3.4/LexRuntimeV2Client.d.ts +2 -0
  29. package/dist-types/ts3.4/commands/PutSessionCommand.d.ts +2 -1
  30. package/dist-types/ts3.4/commands/RecognizeUtteranceCommand.d.ts +2 -1
  31. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +3 -2
  32. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -0
  33. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
  34. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
  35. package/package.json +40 -38
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
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
+
17
+ # [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)
18
+
19
+ **Note:** Version bump only for package @aws-sdk/client-lex-runtime-v2
20
+
21
+
22
+
23
+
24
+
6
25
  # [3.185.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.184.0...v3.185.0) (2022-10-05)
7
26
 
8
27
 
@@ -294,6 +294,7 @@ const deserializeAws_restJson1PutSessionCommand = async (output, context) => {
294
294
  sessionId: [, output.headers["x-amz-lex-session-id"]],
295
295
  });
296
296
  const data = output.body;
297
+ context.sdkStreamMixin(data);
297
298
  contents.audioStream = data;
298
299
  return contents;
299
300
  };
@@ -422,6 +423,7 @@ const deserializeAws_restJson1RecognizeUtteranceCommand = async (output, context
422
423
  inputTranscript: [, output.headers["x-amz-lex-input-transcript"]],
423
424
  });
424
425
  const data = output.body;
426
+ context.sdkStreamMixin(data);
425
427
  contents.audioStream = data;
426
428
  return contents;
427
429
  };
@@ -11,13 +11,14 @@ const invalid_dependency_1 = require("@aws-sdk/invalid-dependency");
11
11
  const middleware_retry_1 = require("@aws-sdk/middleware-retry");
12
12
  const util_base64_browser_1 = require("@aws-sdk/util-base64-browser");
13
13
  const util_body_length_browser_1 = require("@aws-sdk/util-body-length-browser");
14
+ const util_stream_browser_1 = require("@aws-sdk/util-stream-browser");
14
15
  const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
15
16
  const util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser");
16
17
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
17
18
  const smithy_client_1 = require("@aws-sdk/smithy-client");
18
19
  const util_defaults_mode_browser_1 = require("@aws-sdk/util-defaults-mode-browser");
19
20
  const getRuntimeConfig = (config) => {
20
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
21
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
21
22
  const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
22
23
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
23
24
  const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
@@ -37,12 +38,13 @@ const getRuntimeConfig = (config) => {
37
38
  region: (_j = config === null || config === void 0 ? void 0 : config.region) !== null && _j !== void 0 ? _j : (0, invalid_dependency_1.invalidProvider)("Region is missing"),
38
39
  requestHandler: (_k = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _k !== void 0 ? _k : new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
39
40
  retryMode: (_l = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _l !== void 0 ? _l : (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
40
- sha256: (_m = config === null || config === void 0 ? void 0 : config.sha256) !== null && _m !== void 0 ? _m : sha256_browser_1.Sha256,
41
- streamCollector: (_o = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _o !== void 0 ? _o : fetch_http_handler_1.streamCollector,
42
- useDualstackEndpoint: (_p = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _p !== void 0 ? _p : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
43
- useFipsEndpoint: (_q = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _q !== void 0 ? _q : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
44
- utf8Decoder: (_r = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _r !== void 0 ? _r : util_utf8_browser_1.fromUtf8,
45
- utf8Encoder: (_s = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _s !== void 0 ? _s : util_utf8_browser_1.toUtf8,
41
+ sdkStreamMixin: (_m = config === null || config === void 0 ? void 0 : config.sdkStreamMixin) !== null && _m !== void 0 ? _m : util_stream_browser_1.sdkStreamMixin,
42
+ sha256: (_o = config === null || config === void 0 ? void 0 : config.sha256) !== null && _o !== void 0 ? _o : sha256_browser_1.Sha256,
43
+ streamCollector: (_p = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _p !== void 0 ? _p : fetch_http_handler_1.streamCollector,
44
+ useDualstackEndpoint: (_q = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _q !== void 0 ? _q : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
45
+ useFipsEndpoint: (_r = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _r !== void 0 ? _r : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
46
+ utf8Decoder: (_s = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _s !== void 0 ? _s : util_utf8_browser_1.fromUtf8,
47
+ utf8Encoder: (_t = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _t !== void 0 ? _t : util_utf8_browser_1.toUtf8,
46
48
  };
47
49
  };
48
50
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -14,6 +14,7 @@ const node_config_provider_1 = require("@aws-sdk/node-config-provider");
14
14
  const node_http_handler_1 = require("@aws-sdk/node-http-handler");
15
15
  const util_base64_node_1 = require("@aws-sdk/util-base64-node");
16
16
  const util_body_length_node_1 = require("@aws-sdk/util-body-length-node");
17
+ const util_stream_node_1 = require("@aws-sdk/util-stream-node");
17
18
  const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
18
19
  const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
19
20
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
@@ -21,7 +22,7 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
21
22
  const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
22
23
  const smithy_client_2 = require("@aws-sdk/smithy-client");
23
24
  const getRuntimeConfig = (config) => {
24
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
25
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
25
26
  (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
26
27
  const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
27
28
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
@@ -45,12 +46,13 @@ const getRuntimeConfig = (config) => {
45
46
  ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
46
47
  default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
47
48
  }),
48
- sha256: (_m = config === null || config === void 0 ? void 0 : config.sha256) !== null && _m !== void 0 ? _m : hash_node_1.Hash.bind(null, "sha256"),
49
- streamCollector: (_o = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _o !== void 0 ? _o : node_http_handler_1.streamCollector,
50
- useDualstackEndpoint: (_p = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _p !== void 0 ? _p : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
51
- useFipsEndpoint: (_q = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _q !== void 0 ? _q : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
52
- utf8Decoder: (_r = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _r !== void 0 ? _r : util_utf8_node_1.fromUtf8,
53
- utf8Encoder: (_s = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _s !== void 0 ? _s : util_utf8_node_1.toUtf8,
49
+ sdkStreamMixin: (_m = config === null || config === void 0 ? void 0 : config.sdkStreamMixin) !== null && _m !== void 0 ? _m : util_stream_node_1.sdkStreamMixin,
50
+ sha256: (_o = config === null || config === void 0 ? void 0 : config.sha256) !== null && _o !== void 0 ? _o : hash_node_1.Hash.bind(null, "sha256"),
51
+ streamCollector: (_p = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _p !== void 0 ? _p : node_http_handler_1.streamCollector,
52
+ useDualstackEndpoint: (_q = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _q !== void 0 ? _q : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
53
+ useFipsEndpoint: (_r = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _r !== void 0 ? _r : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
54
+ utf8Decoder: (_s = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _s !== void 0 ? _s : util_utf8_node_1.fromUtf8,
55
+ utf8Encoder: (_t = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _t !== void 0 ? _t : util_utf8_node_1.toUtf8,
54
56
  };
55
57
  };
56
58
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { DeleteSessionCommand, } from "./commands/DeleteSessionCommand";
3
2
  import { GetSessionCommand } from "./commands/GetSessionCommand";
4
3
  import { PutSessionCommand } from "./commands/PutSessionCommand";
@@ -6,95 +5,89 @@ import { RecognizeTextCommand, } from "./commands/RecognizeTextCommand";
6
5
  import { RecognizeUtteranceCommand, } from "./commands/RecognizeUtteranceCommand";
7
6
  import { StartConversationCommand, } from "./commands/StartConversationCommand";
8
7
  import { LexRuntimeV2Client } from "./LexRuntimeV2Client";
9
- var LexRuntimeV2 = (function (_super) {
10
- __extends(LexRuntimeV2, _super);
11
- function LexRuntimeV2() {
12
- return _super !== null && _super.apply(this, arguments) || this;
13
- }
14
- LexRuntimeV2.prototype.deleteSession = function (args, optionsOrCb, cb) {
15
- var command = new DeleteSessionCommand(args);
8
+ export class LexRuntimeV2 extends LexRuntimeV2Client {
9
+ deleteSession(args, optionsOrCb, cb) {
10
+ const command = new DeleteSessionCommand(args);
16
11
  if (typeof optionsOrCb === "function") {
17
12
  this.send(command, optionsOrCb);
18
13
  }
19
14
  else if (typeof cb === "function") {
20
15
  if (typeof optionsOrCb !== "object")
21
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
16
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
22
17
  this.send(command, optionsOrCb || {}, cb);
23
18
  }
24
19
  else {
25
20
  return this.send(command, optionsOrCb);
26
21
  }
27
- };
28
- LexRuntimeV2.prototype.getSession = function (args, optionsOrCb, cb) {
29
- var command = new GetSessionCommand(args);
22
+ }
23
+ getSession(args, optionsOrCb, cb) {
24
+ const command = new GetSessionCommand(args);
30
25
  if (typeof optionsOrCb === "function") {
31
26
  this.send(command, optionsOrCb);
32
27
  }
33
28
  else if (typeof cb === "function") {
34
29
  if (typeof optionsOrCb !== "object")
35
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
30
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
36
31
  this.send(command, optionsOrCb || {}, cb);
37
32
  }
38
33
  else {
39
34
  return this.send(command, optionsOrCb);
40
35
  }
41
- };
42
- LexRuntimeV2.prototype.putSession = function (args, optionsOrCb, cb) {
43
- var command = new PutSessionCommand(args);
36
+ }
37
+ putSession(args, optionsOrCb, cb) {
38
+ const command = new PutSessionCommand(args);
44
39
  if (typeof optionsOrCb === "function") {
45
40
  this.send(command, optionsOrCb);
46
41
  }
47
42
  else if (typeof cb === "function") {
48
43
  if (typeof optionsOrCb !== "object")
49
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
44
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
50
45
  this.send(command, optionsOrCb || {}, cb);
51
46
  }
52
47
  else {
53
48
  return this.send(command, optionsOrCb);
54
49
  }
55
- };
56
- LexRuntimeV2.prototype.recognizeText = function (args, optionsOrCb, cb) {
57
- var command = new RecognizeTextCommand(args);
50
+ }
51
+ recognizeText(args, optionsOrCb, cb) {
52
+ const command = new RecognizeTextCommand(args);
58
53
  if (typeof optionsOrCb === "function") {
59
54
  this.send(command, optionsOrCb);
60
55
  }
61
56
  else if (typeof cb === "function") {
62
57
  if (typeof optionsOrCb !== "object")
63
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
58
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
64
59
  this.send(command, optionsOrCb || {}, cb);
65
60
  }
66
61
  else {
67
62
  return this.send(command, optionsOrCb);
68
63
  }
69
- };
70
- LexRuntimeV2.prototype.recognizeUtterance = function (args, optionsOrCb, cb) {
71
- var command = new RecognizeUtteranceCommand(args);
64
+ }
65
+ recognizeUtterance(args, optionsOrCb, cb) {
66
+ const command = new RecognizeUtteranceCommand(args);
72
67
  if (typeof optionsOrCb === "function") {
73
68
  this.send(command, optionsOrCb);
74
69
  }
75
70
  else if (typeof cb === "function") {
76
71
  if (typeof optionsOrCb !== "object")
77
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
72
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
78
73
  this.send(command, optionsOrCb || {}, cb);
79
74
  }
80
75
  else {
81
76
  return this.send(command, optionsOrCb);
82
77
  }
83
- };
84
- LexRuntimeV2.prototype.startConversation = function (args, optionsOrCb, cb) {
85
- var command = new StartConversationCommand(args);
78
+ }
79
+ startConversation(args, optionsOrCb, cb) {
80
+ const command = new StartConversationCommand(args);
86
81
  if (typeof optionsOrCb === "function") {
87
82
  this.send(command, optionsOrCb);
88
83
  }
89
84
  else if (typeof cb === "function") {
90
85
  if (typeof optionsOrCb !== "object")
91
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
86
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
92
87
  this.send(command, optionsOrCb || {}, cb);
93
88
  }
94
89
  else {
95
90
  return this.send(command, optionsOrCb);
96
91
  }
97
- };
98
- return LexRuntimeV2;
99
- }(LexRuntimeV2Client));
100
- export { LexRuntimeV2 };
92
+ }
93
+ }
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
3
2
  import { resolveEventStreamSerdeConfig, } from "@aws-sdk/eventstream-serde-config-resolver";
4
3
  import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
@@ -11,33 +10,28 @@ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-sig
11
10
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
12
11
  import { Client as __Client, } from "@aws-sdk/smithy-client";
13
12
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
14
- var LexRuntimeV2Client = (function (_super) {
15
- __extends(LexRuntimeV2Client, _super);
16
- function LexRuntimeV2Client(configuration) {
17
- var _this = this;
18
- var _config_0 = __getRuntimeConfig(configuration);
19
- var _config_1 = resolveRegionConfig(_config_0);
20
- var _config_2 = resolveEndpointsConfig(_config_1);
21
- var _config_3 = resolveRetryConfig(_config_2);
22
- var _config_4 = resolveHostHeaderConfig(_config_3);
23
- var _config_5 = resolveAwsAuthConfig(_config_4);
24
- var _config_6 = resolveEventStreamConfig(_config_5);
25
- var _config_7 = resolveUserAgentConfig(_config_6);
26
- var _config_8 = resolveEventStreamSerdeConfig(_config_7);
27
- _this = _super.call(this, _config_8) || this;
28
- _this.config = _config_8;
29
- _this.middlewareStack.use(getRetryPlugin(_this.config));
30
- _this.middlewareStack.use(getContentLengthPlugin(_this.config));
31
- _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
32
- _this.middlewareStack.use(getLoggerPlugin(_this.config));
33
- _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
34
- _this.middlewareStack.use(getAwsAuthPlugin(_this.config));
35
- _this.middlewareStack.use(getUserAgentPlugin(_this.config));
36
- return _this;
13
+ export class LexRuntimeV2Client extends __Client {
14
+ constructor(configuration) {
15
+ const _config_0 = __getRuntimeConfig(configuration);
16
+ const _config_1 = resolveRegionConfig(_config_0);
17
+ const _config_2 = resolveEndpointsConfig(_config_1);
18
+ const _config_3 = resolveRetryConfig(_config_2);
19
+ const _config_4 = resolveHostHeaderConfig(_config_3);
20
+ const _config_5 = resolveAwsAuthConfig(_config_4);
21
+ const _config_6 = resolveEventStreamConfig(_config_5);
22
+ const _config_7 = resolveUserAgentConfig(_config_6);
23
+ const _config_8 = resolveEventStreamSerdeConfig(_config_7);
24
+ super(_config_8);
25
+ this.config = _config_8;
26
+ this.middlewareStack.use(getRetryPlugin(this.config));
27
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
28
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
29
+ this.middlewareStack.use(getLoggerPlugin(this.config));
30
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
31
+ this.middlewareStack.use(getAwsAuthPlugin(this.config));
32
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
37
33
  }
38
- LexRuntimeV2Client.prototype.destroy = function () {
39
- _super.prototype.destroy.call(this);
40
- };
41
- return LexRuntimeV2Client;
42
- }(__Client));
43
- export { LexRuntimeV2Client };
34
+ destroy() {
35
+ super.destroy();
36
+ }
37
+ }
@@ -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 = "LexRuntimeV2Client";
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 = "LexRuntimeV2Client";
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 = "LexRuntimeV2Client";
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 = "LexRuntimeV2Client";
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 { 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 = "LexRuntimeV2Client";
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 = "LexRuntimeV2Client";
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,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 { RecognizeTextRequestFilterSensitiveLog, RecognizeTextResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1RecognizeTextCommand, serializeAws_restJson1RecognizeTextCommand, } from "../protocols/Aws_restJson1";
6
- var RecognizeTextCommand = (function (_super) {
7
- __extends(RecognizeTextCommand, _super);
8
- function RecognizeTextCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class RecognizeTextCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- RecognizeTextCommand.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 = "LexRuntimeV2Client";
18
- var commandName = "RecognizeTextCommand";
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 = "LexRuntimeV2Client";
15
+ const commandName = "RecognizeTextCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: RecognizeTextRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: RecognizeTextResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- RecognizeTextCommand.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_restJson1RecognizeTextCommand(input, context);
33
- };
34
- RecognizeTextCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1RecognizeTextCommand(output, context);
36
- };
37
- return RecognizeTextCommand;
38
- }($Command));
39
- export { RecognizeTextCommand };
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 { RecognizeUtteranceRequestFilterSensitiveLog, RecognizeUtteranceResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1RecognizeUtteranceCommand, serializeAws_restJson1RecognizeUtteranceCommand, } from "../protocols/Aws_restJson1";
6
- var RecognizeUtteranceCommand = (function (_super) {
7
- __extends(RecognizeUtteranceCommand, _super);
8
- function RecognizeUtteranceCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class RecognizeUtteranceCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- RecognizeUtteranceCommand.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 = "LexRuntimeV2Client";
18
- var commandName = "RecognizeUtteranceCommand";
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 = "LexRuntimeV2Client";
15
+ const commandName = "RecognizeUtteranceCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: RecognizeUtteranceRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: RecognizeUtteranceResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- RecognizeUtteranceCommand.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_restJson1RecognizeUtteranceCommand(input, context);
33
- };
34
- RecognizeUtteranceCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1RecognizeUtteranceCommand(output, context);
36
- };
37
- return RecognizeUtteranceCommand;
38
- }($Command));
39
- export { RecognizeUtteranceCommand };
31
+ }
32
+ }