@aws-sdk/client-lex-runtime-v2 3.200.0 → 3.201.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.201.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.200.0...v3.201.0) (2022-11-01)
7
+
8
+
9
+ ### Features
10
+
11
+ * end support for Node.js 12.x ([#4123](https://github.com/aws/aws-sdk-js-v3/issues/4123)) ([83f913e](https://github.com/aws/aws-sdk-js-v3/commit/83f913ec2ac3878d8726c6964f585550dc5caf3e))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.200.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.199.0...v3.200.0) (2022-10-31)
7
18
 
8
19
  **Note:** Version bump only for package @aws-sdk/client-lex-runtime-v2
@@ -2,11 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.resolveClientEndpointParameters = void 0;
4
4
  const resolveClientEndpointParameters = (options) => {
5
- var _a, _b;
6
5
  return {
7
6
  ...options,
8
- useDualstackEndpoint: (_a = options.useDualstackEndpoint) !== null && _a !== void 0 ? _a : false,
9
- useFipsEndpoint: (_b = options.useFipsEndpoint) !== null && _b !== void 0 ? _b : false,
7
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
8
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
10
9
  defaultSigningName: "lex",
11
10
  };
12
11
  };
@@ -8,7 +8,7 @@ const models_0_1 = require("../models/models_0");
8
8
  const serializeAws_restJson1DeleteSessionCommand = async (input, context) => {
9
9
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
10
  const headers = {};
11
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
11
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
12
12
  "/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}";
13
13
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "botId", () => input.botId, "{botId}", false);
14
14
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "botAliasId", () => input.botAliasId, "{botAliasId}", false);
@@ -29,7 +29,7 @@ exports.serializeAws_restJson1DeleteSessionCommand = serializeAws_restJson1Delet
29
29
  const serializeAws_restJson1GetSessionCommand = async (input, context) => {
30
30
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
31
31
  const headers = {};
32
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
32
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
33
33
  "/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}";
34
34
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "botId", () => input.botId, "{botId}", false);
35
35
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "botAliasId", () => input.botAliasId, "{botAliasId}", false);
@@ -53,7 +53,7 @@ const serializeAws_restJson1PutSessionCommand = async (input, context) => {
53
53
  "content-type": "application/json",
54
54
  responsecontenttype: input.responseContentType,
55
55
  });
56
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
56
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
57
57
  "/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}";
58
58
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "botId", () => input.botId, "{botId}", false);
59
59
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "botAliasId", () => input.botAliasId, "{botAliasId}", false);
@@ -85,7 +85,7 @@ const serializeAws_restJson1RecognizeTextCommand = async (input, context) => {
85
85
  const headers = {
86
86
  "content-type": "application/json",
87
87
  };
88
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
88
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
89
89
  "/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/text";
90
90
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "botId", () => input.botId, "{botId}", false);
91
91
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "botAliasId", () => input.botAliasId, "{botAliasId}", false);
@@ -121,7 +121,7 @@ const serializeAws_restJson1RecognizeUtteranceCommand = async (input, context) =
121
121
  "x-amz-lex-request-attributes": input.requestAttributes,
122
122
  "response-content-type": input.responseContentType,
123
123
  });
124
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
124
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
125
125
  "/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/utterance";
126
126
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "botId", () => input.botId, "{botId}", false);
127
127
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "botAliasId", () => input.botAliasId, "{botAliasId}", false);
@@ -147,7 +147,7 @@ const serializeAws_restJson1StartConversationCommand = async (input, context) =>
147
147
  const headers = map({}, isSerializableHeaderValue, {
148
148
  "x-amz-lex-conversation-mode": input.conversationMode,
149
149
  });
150
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
150
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
151
151
  "/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/conversation";
152
152
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "botId", () => input.botId, "{botId}", false);
153
153
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "botAliasId", () => input.botAliasId, "{botAliasId}", false);
@@ -1441,15 +1441,12 @@ const deserializeAws_restJson1Values = (output, context) => {
1441
1441
  });
1442
1442
  return retVal;
1443
1443
  };
1444
- const deserializeMetadata = (output) => {
1445
- var _a, _b;
1446
- return ({
1447
- httpStatusCode: output.statusCode,
1448
- 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"],
1449
- extendedRequestId: output.headers["x-amz-id-2"],
1450
- cfId: output.headers["x-amz-cf-id"],
1451
- });
1452
- };
1444
+ const deserializeMetadata = (output) => ({
1445
+ httpStatusCode: output.statusCode,
1446
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1447
+ extendedRequestId: output.headers["x-amz-id-2"],
1448
+ cfId: output.headers["x-amz-cf-id"],
1449
+ });
1453
1450
  const collectBody = (streamBody = new Uint8Array(), context) => {
1454
1451
  if (streamBody instanceof Uint8Array) {
1455
1452
  return Promise.resolve(streamBody);
@@ -1469,9 +1466,8 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
1469
1466
  return {};
1470
1467
  });
1471
1468
  const parseErrorBody = async (errorBody, context) => {
1472
- var _a;
1473
1469
  const value = await parseBody(errorBody, context);
1474
- value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1470
+ value.message = value.message ?? value.Message;
1475
1471
  return value;
1476
1472
  };
1477
1473
  const loadRestJsonErrorCode = (output, data) => {
@@ -18,7 +18,6 @@ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
18
18
  const smithy_client_1 = require("@aws-sdk/smithy-client");
19
19
  const util_defaults_mode_browser_1 = require("@aws-sdk/util-defaults-mode-browser");
20
20
  const getRuntimeConfig = (config) => {
21
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
22
21
  const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
23
22
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
24
23
  const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
@@ -27,24 +26,26 @@ const getRuntimeConfig = (config) => {
27
26
  ...config,
28
27
  runtime: "browser",
29
28
  defaultsMode,
30
- base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_browser_1.fromBase64,
31
- base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_browser_1.toBase64,
32
- bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_browser_1.calculateBodyLength,
33
- credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : ((_) => () => Promise.reject(new Error("Credential is missing"))),
34
- defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
35
- eventStreamPayloadHandlerProvider: (_f = config === null || config === void 0 ? void 0 : config.eventStreamPayloadHandlerProvider) !== null && _f !== void 0 ? _f : (() => ({ handle: (0, invalid_dependency_1.invalidFunction)("event stream request is not supported in browser.") })),
36
- eventStreamSerdeProvider: (_g = config === null || config === void 0 ? void 0 : config.eventStreamSerdeProvider) !== null && _g !== void 0 ? _g : eventstream_serde_browser_1.eventStreamSerdeProvider,
37
- maxAttempts: (_h = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _h !== void 0 ? _h : middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
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"),
39
- requestHandler: (_k = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _k !== void 0 ? _k : new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
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),
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,
29
+ base64Decoder: config?.base64Decoder ?? util_base64_browser_1.fromBase64,
30
+ base64Encoder: config?.base64Encoder ?? util_base64_browser_1.toBase64,
31
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
32
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
33
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
34
+ (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
35
+ eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ??
36
+ (() => ({ handle: (0, invalid_dependency_1.invalidFunction)("event stream request is not supported in browser.") })),
37
+ eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventstream_serde_browser_1.eventStreamSerdeProvider,
38
+ maxAttempts: config?.maxAttempts ?? middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
39
+ region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
40
+ requestHandler: config?.requestHandler ?? new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
41
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
42
+ sdkStreamMixin: config?.sdkStreamMixin ?? util_stream_browser_1.sdkStreamMixin,
43
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
44
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
45
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
46
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
47
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_browser_1.fromUtf8,
48
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_browser_1.toUtf8,
48
49
  };
49
50
  };
50
51
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -22,7 +22,6 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
22
22
  const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
23
23
  const smithy_client_2 = require("@aws-sdk/smithy-client");
24
24
  const getRuntimeConfig = (config) => {
25
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
26
25
  (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
27
26
  const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
28
27
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
@@ -32,27 +31,30 @@ const getRuntimeConfig = (config) => {
32
31
  ...config,
33
32
  runtime: "node",
34
33
  defaultsMode,
35
- base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
36
- base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
37
- bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
38
- credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
39
- defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
40
- eventStreamPayloadHandlerProvider: (_f = config === null || config === void 0 ? void 0 : config.eventStreamPayloadHandlerProvider) !== null && _f !== void 0 ? _f : eventstream_handler_node_1.eventStreamPayloadHandlerProvider,
41
- eventStreamSerdeProvider: (_g = config === null || config === void 0 ? void 0 : config.eventStreamSerdeProvider) !== null && _g !== void 0 ? _g : eventstream_serde_node_1.eventStreamSerdeProvider,
42
- maxAttempts: (_h = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _h !== void 0 ? _h : (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
43
- region: (_j = config === null || config === void 0 ? void 0 : config.region) !== null && _j !== void 0 ? _j : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
44
- requestHandler: (_k = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _k !== void 0 ? _k : new node_http_handler_1.NodeHttp2Handler(async () => ({ ...(await defaultConfigProvider()), disableConcurrentStreams: true })),
45
- retryMode: (_l = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _l !== void 0 ? _l : (0, node_config_provider_1.loadConfig)({
46
- ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
47
- default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
48
- }),
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,
34
+ base64Decoder: config?.base64Decoder ?? util_base64_node_1.fromBase64,
35
+ base64Encoder: config?.base64Encoder ?? util_base64_node_1.toBase64,
36
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
37
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
38
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
39
+ (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
40
+ eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? eventstream_handler_node_1.eventStreamPayloadHandlerProvider,
41
+ eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventstream_serde_node_1.eventStreamSerdeProvider,
42
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
43
+ region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
44
+ requestHandler: config?.requestHandler ??
45
+ new node_http_handler_1.NodeHttp2Handler(async () => ({ ...(await defaultConfigProvider()), disableConcurrentStreams: true })),
46
+ retryMode: config?.retryMode ??
47
+ (0, node_config_provider_1.loadConfig)({
48
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
49
+ default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
50
+ }),
51
+ sdkStreamMixin: config?.sdkStreamMixin ?? util_stream_node_1.sdkStreamMixin,
52
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
53
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
54
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
55
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
56
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_node_1.fromUtf8,
57
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_node_1.toUtf8,
56
58
  };
57
59
  };
58
60
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -5,14 +5,14 @@ const sha256_js_1 = require("@aws-crypto/sha256-js");
5
5
  const invalid_dependency_1 = require("@aws-sdk/invalid-dependency");
6
6
  const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
7
7
  const getRuntimeConfig = (config) => {
8
- var _a, _b;
9
8
  const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
10
9
  return {
11
10
  ...browserDefaults,
12
11
  ...config,
13
12
  runtime: "react-native",
14
- eventStreamPayloadHandlerProvider: (_a = config === null || config === void 0 ? void 0 : config.eventStreamPayloadHandlerProvider) !== null && _a !== void 0 ? _a : (() => ({ handle: (0, invalid_dependency_1.invalidFunction)("event stream request is not supported in ReactNative.") })),
15
- sha256: (_b = config === null || config === void 0 ? void 0 : config.sha256) !== null && _b !== void 0 ? _b : sha256_js_1.Sha256,
13
+ eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ??
14
+ (() => ({ handle: (0, invalid_dependency_1.invalidFunction)("event stream request is not supported in ReactNative.") })),
15
+ sha256: config?.sha256 ?? sha256_js_1.Sha256,
16
16
  };
17
17
  };
18
18
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -3,15 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
4
  const url_parser_1 = require("@aws-sdk/url-parser");
5
5
  const endpointResolver_1 = require("./endpoint/endpointResolver");
6
- const getRuntimeConfig = (config) => {
7
- var _a, _b, _c, _d, _e;
8
- return ({
9
- apiVersion: "2020-08-07",
10
- disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false,
11
- endpointProvider: (_b = config === null || config === void 0 ? void 0 : config.endpointProvider) !== null && _b !== void 0 ? _b : endpointResolver_1.defaultEndpointResolver,
12
- logger: (_c = config === null || config === void 0 ? void 0 : config.logger) !== null && _c !== void 0 ? _c : {},
13
- serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "Lex Runtime V2",
14
- urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl,
15
- });
16
- };
6
+ const getRuntimeConfig = (config) => ({
7
+ apiVersion: "2020-08-07",
8
+ disableHostPrefix: config?.disableHostPrefix ?? false,
9
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
10
+ logger: config?.logger ?? {},
11
+ serviceId: config?.serviceId ?? "Lex Runtime V2",
12
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
13
+ });
17
14
  exports.getRuntimeConfig = getRuntimeConfig;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-lex-runtime-v2",
3
3
  "description": "AWS SDK for JavaScript Lex Runtime V2 Client for Node.js, Browser and React Native",
4
- "version": "3.200.0",
4
+ "version": "3.201.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",
@@ -19,51 +19,51 @@
19
19
  "dependencies": {
20
20
  "@aws-crypto/sha256-browser": "2.0.0",
21
21
  "@aws-crypto/sha256-js": "2.0.0",
22
- "@aws-sdk/client-sts": "3.200.0",
23
- "@aws-sdk/config-resolver": "3.200.0",
24
- "@aws-sdk/credential-provider-node": "3.200.0",
25
- "@aws-sdk/eventstream-handler-node": "3.200.0",
26
- "@aws-sdk/eventstream-serde-browser": "3.200.0",
27
- "@aws-sdk/eventstream-serde-config-resolver": "3.200.0",
28
- "@aws-sdk/eventstream-serde-node": "3.200.0",
29
- "@aws-sdk/fetch-http-handler": "3.200.0",
30
- "@aws-sdk/hash-node": "3.200.0",
31
- "@aws-sdk/invalid-dependency": "3.200.0",
32
- "@aws-sdk/middleware-content-length": "3.200.0",
33
- "@aws-sdk/middleware-endpoint": "3.200.0",
34
- "@aws-sdk/middleware-eventstream": "3.200.0",
35
- "@aws-sdk/middleware-host-header": "3.200.0",
36
- "@aws-sdk/middleware-logger": "3.200.0",
37
- "@aws-sdk/middleware-recursion-detection": "3.200.0",
38
- "@aws-sdk/middleware-retry": "3.200.0",
39
- "@aws-sdk/middleware-serde": "3.200.0",
40
- "@aws-sdk/middleware-signing": "3.200.0",
41
- "@aws-sdk/middleware-stack": "3.200.0",
42
- "@aws-sdk/middleware-user-agent": "3.200.0",
43
- "@aws-sdk/node-config-provider": "3.200.0",
44
- "@aws-sdk/node-http-handler": "3.200.0",
45
- "@aws-sdk/protocol-http": "3.200.0",
46
- "@aws-sdk/smithy-client": "3.200.0",
47
- "@aws-sdk/types": "3.200.0",
48
- "@aws-sdk/url-parser": "3.200.0",
22
+ "@aws-sdk/client-sts": "3.201.0",
23
+ "@aws-sdk/config-resolver": "3.201.0",
24
+ "@aws-sdk/credential-provider-node": "3.201.0",
25
+ "@aws-sdk/eventstream-handler-node": "3.201.0",
26
+ "@aws-sdk/eventstream-serde-browser": "3.201.0",
27
+ "@aws-sdk/eventstream-serde-config-resolver": "3.201.0",
28
+ "@aws-sdk/eventstream-serde-node": "3.201.0",
29
+ "@aws-sdk/fetch-http-handler": "3.201.0",
30
+ "@aws-sdk/hash-node": "3.201.0",
31
+ "@aws-sdk/invalid-dependency": "3.201.0",
32
+ "@aws-sdk/middleware-content-length": "3.201.0",
33
+ "@aws-sdk/middleware-endpoint": "3.201.0",
34
+ "@aws-sdk/middleware-eventstream": "3.201.0",
35
+ "@aws-sdk/middleware-host-header": "3.201.0",
36
+ "@aws-sdk/middleware-logger": "3.201.0",
37
+ "@aws-sdk/middleware-recursion-detection": "3.201.0",
38
+ "@aws-sdk/middleware-retry": "3.201.0",
39
+ "@aws-sdk/middleware-serde": "3.201.0",
40
+ "@aws-sdk/middleware-signing": "3.201.0",
41
+ "@aws-sdk/middleware-stack": "3.201.0",
42
+ "@aws-sdk/middleware-user-agent": "3.201.0",
43
+ "@aws-sdk/node-config-provider": "3.201.0",
44
+ "@aws-sdk/node-http-handler": "3.201.0",
45
+ "@aws-sdk/protocol-http": "3.201.0",
46
+ "@aws-sdk/smithy-client": "3.201.0",
47
+ "@aws-sdk/types": "3.201.0",
48
+ "@aws-sdk/url-parser": "3.201.0",
49
49
  "@aws-sdk/util-base64-browser": "3.188.0",
50
- "@aws-sdk/util-base64-node": "3.188.0",
50
+ "@aws-sdk/util-base64-node": "3.201.0",
51
51
  "@aws-sdk/util-body-length-browser": "3.188.0",
52
- "@aws-sdk/util-body-length-node": "3.188.0",
53
- "@aws-sdk/util-defaults-mode-browser": "3.200.0",
54
- "@aws-sdk/util-defaults-mode-node": "3.200.0",
55
- "@aws-sdk/util-endpoints": "3.200.0",
56
- "@aws-sdk/util-stream-browser": "3.200.0",
57
- "@aws-sdk/util-stream-node": "3.200.0",
58
- "@aws-sdk/util-user-agent-browser": "3.200.0",
59
- "@aws-sdk/util-user-agent-node": "3.200.0",
52
+ "@aws-sdk/util-body-length-node": "3.201.0",
53
+ "@aws-sdk/util-defaults-mode-browser": "3.201.0",
54
+ "@aws-sdk/util-defaults-mode-node": "3.201.0",
55
+ "@aws-sdk/util-endpoints": "3.201.0",
56
+ "@aws-sdk/util-stream-browser": "3.201.0",
57
+ "@aws-sdk/util-stream-node": "3.201.0",
58
+ "@aws-sdk/util-user-agent-browser": "3.201.0",
59
+ "@aws-sdk/util-user-agent-node": "3.201.0",
60
60
  "@aws-sdk/util-utf8-browser": "3.188.0",
61
- "@aws-sdk/util-utf8-node": "3.199.0",
61
+ "@aws-sdk/util-utf8-node": "3.201.0",
62
62
  "tslib": "^2.3.1"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@aws-sdk/service-client-documentation-generator": "3.188.0",
66
- "@tsconfig/recommended": "1.0.1",
66
+ "@tsconfig/node14": "1.0.3",
67
67
  "@types/node": "^12.7.5",
68
68
  "concurrently": "7.0.0",
69
69
  "downlevel-dts": "0.10.1",
@@ -77,7 +77,7 @@
77
77
  }
78
78
  },
79
79
  "engines": {
80
- "node": ">=12.0.0"
80
+ "node": ">=14.0.0"
81
81
  },
82
82
  "typesVersions": {
83
83
  "<4.0": {