@aws-sdk/client-opensearch 3.199.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,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.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
+
17
+ # [3.200.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.199.0...v3.200.0) (2022-10-31)
18
+
19
+ **Note:** Version bump only for package @aws-sdk/client-opensearch
20
+
21
+
22
+
23
+
24
+
6
25
  # [3.199.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.198.0...v3.199.0) (2022-10-28)
7
26
 
8
27
  **Note:** Version bump only for package @aws-sdk/client-opensearch
@@ -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: "es",
11
10
  };
12
11
  };
@@ -9,7 +9,7 @@ const OpenSearchServiceException_1 = require("../models/OpenSearchServiceExcepti
9
9
  const serializeAws_restJson1AcceptInboundConnectionCommand = async (input, context) => {
10
10
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
11
11
  const headers = {};
12
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
12
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
13
13
  "/2021-01-01/opensearch/cc/inboundConnection/{ConnectionId}/accept";
14
14
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConnectionId", () => input.ConnectionId, "{ConnectionId}", false);
15
15
  let body;
@@ -29,7 +29,7 @@ const serializeAws_restJson1AddTagsCommand = async (input, context) => {
29
29
  const headers = {
30
30
  "content-type": "application/json",
31
31
  };
32
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/tags";
32
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/tags";
33
33
  let body;
34
34
  body = JSON.stringify({
35
35
  ...(input.ARN != null && { ARN: input.ARN }),
@@ -49,7 +49,7 @@ exports.serializeAws_restJson1AddTagsCommand = serializeAws_restJson1AddTagsComm
49
49
  const serializeAws_restJson1AssociatePackageCommand = async (input, context) => {
50
50
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
51
51
  const headers = {};
52
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
52
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
53
53
  "/2021-01-01/packages/associate/{PackageID}/{DomainName}";
54
54
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PackageID", () => input.PackageID, "{PackageID}", false);
55
55
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
@@ -70,7 +70,7 @@ const serializeAws_restJson1CancelServiceSoftwareUpdateCommand = async (input, c
70
70
  const headers = {
71
71
  "content-type": "application/json",
72
72
  };
73
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
73
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
74
74
  "/2021-01-01/opensearch/serviceSoftwareUpdate/cancel";
75
75
  let body;
76
76
  body = JSON.stringify({
@@ -92,7 +92,7 @@ const serializeAws_restJson1CreateDomainCommand = async (input, context) => {
92
92
  const headers = {
93
93
  "content-type": "application/json",
94
94
  };
95
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/domain";
95
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/domain";
96
96
  let body;
97
97
  body = JSON.stringify({
98
98
  ...(input.AccessPolicies != null && { AccessPolicies: input.AccessPolicies }),
@@ -148,7 +148,7 @@ const serializeAws_restJson1CreateOutboundConnectionCommand = async (input, cont
148
148
  const headers = {
149
149
  "content-type": "application/json",
150
150
  };
151
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
151
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
152
152
  "/2021-01-01/opensearch/cc/outboundConnection";
153
153
  let body;
154
154
  body = JSON.stringify({
@@ -176,7 +176,7 @@ const serializeAws_restJson1CreatePackageCommand = async (input, context) => {
176
176
  const headers = {
177
177
  "content-type": "application/json",
178
178
  };
179
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages";
179
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages";
180
180
  let body;
181
181
  body = JSON.stringify({
182
182
  ...(input.PackageDescription != null && { PackageDescription: input.PackageDescription }),
@@ -200,7 +200,7 @@ exports.serializeAws_restJson1CreatePackageCommand = serializeAws_restJson1Creat
200
200
  const serializeAws_restJson1DeleteDomainCommand = async (input, context) => {
201
201
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
202
202
  const headers = {};
203
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
203
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
204
204
  "/2021-01-01/opensearch/domain/{DomainName}";
205
205
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
206
206
  let body;
@@ -218,7 +218,7 @@ exports.serializeAws_restJson1DeleteDomainCommand = serializeAws_restJson1Delete
218
218
  const serializeAws_restJson1DeleteInboundConnectionCommand = async (input, context) => {
219
219
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
220
220
  const headers = {};
221
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
221
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
222
222
  "/2021-01-01/opensearch/cc/inboundConnection/{ConnectionId}";
223
223
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConnectionId", () => input.ConnectionId, "{ConnectionId}", false);
224
224
  let body;
@@ -236,7 +236,7 @@ exports.serializeAws_restJson1DeleteInboundConnectionCommand = serializeAws_rest
236
236
  const serializeAws_restJson1DeleteOutboundConnectionCommand = async (input, context) => {
237
237
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
238
238
  const headers = {};
239
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
239
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
240
240
  "/2021-01-01/opensearch/cc/outboundConnection/{ConnectionId}";
241
241
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConnectionId", () => input.ConnectionId, "{ConnectionId}", false);
242
242
  let body;
@@ -254,7 +254,7 @@ exports.serializeAws_restJson1DeleteOutboundConnectionCommand = serializeAws_res
254
254
  const serializeAws_restJson1DeletePackageCommand = async (input, context) => {
255
255
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
256
256
  const headers = {};
257
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages/{PackageID}";
257
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages/{PackageID}";
258
258
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PackageID", () => input.PackageID, "{PackageID}", false);
259
259
  let body;
260
260
  return new protocol_http_1.HttpRequest({
@@ -271,7 +271,7 @@ exports.serializeAws_restJson1DeletePackageCommand = serializeAws_restJson1Delet
271
271
  const serializeAws_restJson1DescribeDomainCommand = async (input, context) => {
272
272
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
273
273
  const headers = {};
274
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
274
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
275
275
  "/2021-01-01/opensearch/domain/{DomainName}";
276
276
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
277
277
  let body;
@@ -291,7 +291,7 @@ const serializeAws_restJson1DescribeDomainAutoTunesCommand = async (input, conte
291
291
  const headers = {
292
292
  "content-type": "application/json",
293
293
  };
294
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
294
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
295
295
  "/2021-01-01/opensearch/domain/{DomainName}/autoTunes";
296
296
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
297
297
  let body;
@@ -313,7 +313,7 @@ exports.serializeAws_restJson1DescribeDomainAutoTunesCommand = serializeAws_rest
313
313
  const serializeAws_restJson1DescribeDomainChangeProgressCommand = async (input, context) => {
314
314
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
315
315
  const headers = {};
316
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
316
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
317
317
  "/2021-01-01/opensearch/domain/{DomainName}/progress";
318
318
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
319
319
  const query = map({
@@ -335,7 +335,7 @@ exports.serializeAws_restJson1DescribeDomainChangeProgressCommand = serializeAws
335
335
  const serializeAws_restJson1DescribeDomainConfigCommand = async (input, context) => {
336
336
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
337
337
  const headers = {};
338
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
338
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
339
339
  "/2021-01-01/opensearch/domain/{DomainName}/config";
340
340
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
341
341
  let body;
@@ -355,7 +355,7 @@ const serializeAws_restJson1DescribeDomainsCommand = async (input, context) => {
355
355
  const headers = {
356
356
  "content-type": "application/json",
357
357
  };
358
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/domain-info";
358
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/domain-info";
359
359
  let body;
360
360
  body = JSON.stringify({
361
361
  ...(input.DomainNames != null && { DomainNames: serializeAws_restJson1DomainNameList(input.DomainNames, context) }),
@@ -376,7 +376,7 @@ const serializeAws_restJson1DescribeInboundConnectionsCommand = async (input, co
376
376
  const headers = {
377
377
  "content-type": "application/json",
378
378
  };
379
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
379
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
380
380
  "/2021-01-01/opensearch/cc/inboundConnection/search";
381
381
  let body;
382
382
  body = JSON.stringify({
@@ -398,7 +398,7 @@ exports.serializeAws_restJson1DescribeInboundConnectionsCommand = serializeAws_r
398
398
  const serializeAws_restJson1DescribeInstanceTypeLimitsCommand = async (input, context) => {
399
399
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
400
400
  const headers = {};
401
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
401
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
402
402
  "/2021-01-01/opensearch/instanceTypeLimits/{EngineVersion}/{InstanceType}";
403
403
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceType", () => input.InstanceType, "{InstanceType}", false);
404
404
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "EngineVersion", () => input.EngineVersion, "{EngineVersion}", false);
@@ -423,7 +423,7 @@ const serializeAws_restJson1DescribeOutboundConnectionsCommand = async (input, c
423
423
  const headers = {
424
424
  "content-type": "application/json",
425
425
  };
426
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
426
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
427
427
  "/2021-01-01/opensearch/cc/outboundConnection/search";
428
428
  let body;
429
429
  body = JSON.stringify({
@@ -447,7 +447,7 @@ const serializeAws_restJson1DescribePackagesCommand = async (input, context) =>
447
447
  const headers = {
448
448
  "content-type": "application/json",
449
449
  };
450
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages/describe";
450
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages/describe";
451
451
  let body;
452
452
  body = JSON.stringify({
453
453
  ...(input.Filters != null && { Filters: serializeAws_restJson1DescribePackagesFilterList(input.Filters, context) }),
@@ -468,7 +468,7 @@ exports.serializeAws_restJson1DescribePackagesCommand = serializeAws_restJson1De
468
468
  const serializeAws_restJson1DescribeReservedInstanceOfferingsCommand = async (input, context) => {
469
469
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
470
470
  const headers = {};
471
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
471
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
472
472
  "/2021-01-01/opensearch/reservedInstanceOfferings";
473
473
  const query = map({
474
474
  offeringId: [, input.ReservedInstanceOfferingId],
@@ -491,7 +491,7 @@ exports.serializeAws_restJson1DescribeReservedInstanceOfferingsCommand = seriali
491
491
  const serializeAws_restJson1DescribeReservedInstancesCommand = async (input, context) => {
492
492
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
493
493
  const headers = {};
494
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/reservedInstances";
494
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/reservedInstances";
495
495
  const query = map({
496
496
  reservationId: [, input.ReservedInstanceId],
497
497
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -513,7 +513,7 @@ exports.serializeAws_restJson1DescribeReservedInstancesCommand = serializeAws_re
513
513
  const serializeAws_restJson1DissociatePackageCommand = async (input, context) => {
514
514
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
515
515
  const headers = {};
516
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
516
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
517
517
  "/2021-01-01/packages/dissociate/{PackageID}/{DomainName}";
518
518
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PackageID", () => input.PackageID, "{PackageID}", false);
519
519
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
@@ -532,7 +532,7 @@ exports.serializeAws_restJson1DissociatePackageCommand = serializeAws_restJson1D
532
532
  const serializeAws_restJson1GetCompatibleVersionsCommand = async (input, context) => {
533
533
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
534
534
  const headers = {};
535
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/compatibleVersions";
535
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/compatibleVersions";
536
536
  const query = map({
537
537
  domainName: [, input.DomainName],
538
538
  });
@@ -552,7 +552,7 @@ exports.serializeAws_restJson1GetCompatibleVersionsCommand = serializeAws_restJs
552
552
  const serializeAws_restJson1GetPackageVersionHistoryCommand = async (input, context) => {
553
553
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
554
554
  const headers = {};
555
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages/{PackageID}/history";
555
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages/{PackageID}/history";
556
556
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PackageID", () => input.PackageID, "{PackageID}", false);
557
557
  const query = map({
558
558
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -574,7 +574,7 @@ exports.serializeAws_restJson1GetPackageVersionHistoryCommand = serializeAws_res
574
574
  const serializeAws_restJson1GetUpgradeHistoryCommand = async (input, context) => {
575
575
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
576
576
  const headers = {};
577
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
577
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
578
578
  "/2021-01-01/opensearch/upgradeDomain/{DomainName}/history";
579
579
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
580
580
  const query = map({
@@ -597,7 +597,7 @@ exports.serializeAws_restJson1GetUpgradeHistoryCommand = serializeAws_restJson1G
597
597
  const serializeAws_restJson1GetUpgradeStatusCommand = async (input, context) => {
598
598
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
599
599
  const headers = {};
600
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
600
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
601
601
  "/2021-01-01/opensearch/upgradeDomain/{DomainName}/status";
602
602
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
603
603
  let body;
@@ -615,7 +615,7 @@ exports.serializeAws_restJson1GetUpgradeStatusCommand = serializeAws_restJson1Ge
615
615
  const serializeAws_restJson1ListDomainNamesCommand = async (input, context) => {
616
616
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
617
617
  const headers = {};
618
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/domain";
618
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/domain";
619
619
  const query = map({
620
620
  engineType: [, input.EngineType],
621
621
  });
@@ -635,7 +635,7 @@ exports.serializeAws_restJson1ListDomainNamesCommand = serializeAws_restJson1Lis
635
635
  const serializeAws_restJson1ListDomainsForPackageCommand = async (input, context) => {
636
636
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
637
637
  const headers = {};
638
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages/{PackageID}/domains";
638
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages/{PackageID}/domains";
639
639
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PackageID", () => input.PackageID, "{PackageID}", false);
640
640
  const query = map({
641
641
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -657,7 +657,7 @@ exports.serializeAws_restJson1ListDomainsForPackageCommand = serializeAws_restJs
657
657
  const serializeAws_restJson1ListInstanceTypeDetailsCommand = async (input, context) => {
658
658
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
659
659
  const headers = {};
660
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
660
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
661
661
  "/2021-01-01/opensearch/instanceTypeDetails/{EngineVersion}";
662
662
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "EngineVersion", () => input.EngineVersion, "{EngineVersion}", false);
663
663
  const query = map({
@@ -681,7 +681,7 @@ exports.serializeAws_restJson1ListInstanceTypeDetailsCommand = serializeAws_rest
681
681
  const serializeAws_restJson1ListPackagesForDomainCommand = async (input, context) => {
682
682
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
683
683
  const headers = {};
684
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/domain/{DomainName}/packages";
684
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/domain/{DomainName}/packages";
685
685
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
686
686
  const query = map({
687
687
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -703,7 +703,7 @@ exports.serializeAws_restJson1ListPackagesForDomainCommand = serializeAws_restJs
703
703
  const serializeAws_restJson1ListTagsCommand = async (input, context) => {
704
704
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
705
705
  const headers = {};
706
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/tags";
706
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/tags";
707
707
  const query = map({
708
708
  arn: [, input.ARN],
709
709
  });
@@ -723,7 +723,7 @@ exports.serializeAws_restJson1ListTagsCommand = serializeAws_restJson1ListTagsCo
723
723
  const serializeAws_restJson1ListVersionsCommand = async (input, context) => {
724
724
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
725
725
  const headers = {};
726
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/versions";
726
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/versions";
727
727
  const query = map({
728
728
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
729
729
  nextToken: [, input.NextToken],
@@ -746,7 +746,7 @@ const serializeAws_restJson1PurchaseReservedInstanceOfferingCommand = async (inp
746
746
  const headers = {
747
747
  "content-type": "application/json",
748
748
  };
749
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
749
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
750
750
  "/2021-01-01/opensearch/purchaseReservedInstanceOffering";
751
751
  let body;
752
752
  body = JSON.stringify({
@@ -768,7 +768,7 @@ exports.serializeAws_restJson1PurchaseReservedInstanceOfferingCommand = serializ
768
768
  const serializeAws_restJson1RejectInboundConnectionCommand = async (input, context) => {
769
769
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
770
770
  const headers = {};
771
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
771
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
772
772
  "/2021-01-01/opensearch/cc/inboundConnection/{ConnectionId}/reject";
773
773
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConnectionId", () => input.ConnectionId, "{ConnectionId}", false);
774
774
  let body;
@@ -788,7 +788,7 @@ const serializeAws_restJson1RemoveTagsCommand = async (input, context) => {
788
788
  const headers = {
789
789
  "content-type": "application/json",
790
790
  };
791
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/tags-removal";
791
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/tags-removal";
792
792
  let body;
793
793
  body = JSON.stringify({
794
794
  ...(input.ARN != null && { ARN: input.ARN }),
@@ -810,7 +810,7 @@ const serializeAws_restJson1StartServiceSoftwareUpdateCommand = async (input, co
810
810
  const headers = {
811
811
  "content-type": "application/json",
812
812
  };
813
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
813
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
814
814
  "/2021-01-01/opensearch/serviceSoftwareUpdate/start";
815
815
  let body;
816
816
  body = JSON.stringify({
@@ -832,7 +832,7 @@ const serializeAws_restJson1UpdateDomainConfigCommand = async (input, context) =
832
832
  const headers = {
833
833
  "content-type": "application/json",
834
834
  };
835
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
835
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
836
836
  "/2021-01-01/opensearch/domain/{DomainName}/config";
837
837
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
838
838
  let body;
@@ -888,7 +888,7 @@ const serializeAws_restJson1UpdatePackageCommand = async (input, context) => {
888
888
  const headers = {
889
889
  "content-type": "application/json",
890
890
  };
891
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages/update";
891
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages/update";
892
892
  let body;
893
893
  body = JSON.stringify({
894
894
  ...(input.CommitMessage != null && { CommitMessage: input.CommitMessage }),
@@ -914,7 +914,7 @@ const serializeAws_restJson1UpgradeDomainCommand = async (input, context) => {
914
914
  const headers = {
915
915
  "content-type": "application/json",
916
916
  };
917
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/upgradeDomain";
917
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/upgradeDomain";
918
918
  let body;
919
919
  body = JSON.stringify({
920
920
  ...(input.AdvancedOptions != null && {
@@ -4156,15 +4156,12 @@ const deserializeAws_restJson1ZoneAwarenessConfig = (output, context) => {
4156
4156
  AvailabilityZoneCount: (0, smithy_client_1.expectInt32)(output.AvailabilityZoneCount),
4157
4157
  };
4158
4158
  };
4159
- const deserializeMetadata = (output) => {
4160
- var _a, _b;
4161
- return ({
4162
- httpStatusCode: output.statusCode,
4163
- 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"],
4164
- extendedRequestId: output.headers["x-amz-id-2"],
4165
- cfId: output.headers["x-amz-cf-id"],
4166
- });
4167
- };
4159
+ const deserializeMetadata = (output) => ({
4160
+ httpStatusCode: output.statusCode,
4161
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
4162
+ extendedRequestId: output.headers["x-amz-id-2"],
4163
+ cfId: output.headers["x-amz-cf-id"],
4164
+ });
4168
4165
  const collectBody = (streamBody = new Uint8Array(), context) => {
4169
4166
  if (streamBody instanceof Uint8Array) {
4170
4167
  return Promise.resolve(streamBody);
@@ -4184,9 +4181,8 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
4184
4181
  return {};
4185
4182
  });
4186
4183
  const parseErrorBody = async (errorBody, context) => {
4187
- var _a;
4188
4184
  const value = await parseBody(errorBody, context);
4189
- value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
4185
+ value.message = value.message ?? value.Message;
4190
4186
  return value;
4191
4187
  };
4192
4188
  const loadRestJsonErrorCode = (output, data) => {
@@ -16,7 +16,6 @@ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
16
16
  const smithy_client_1 = require("@aws-sdk/smithy-client");
17
17
  const util_defaults_mode_browser_1 = require("@aws-sdk/util-defaults-mode-browser");
18
18
  const getRuntimeConfig = (config) => {
19
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
20
19
  const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
21
20
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
22
21
  const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
@@ -25,21 +24,22 @@ const getRuntimeConfig = (config) => {
25
24
  ...config,
26
25
  runtime: "browser",
27
26
  defaultsMode,
28
- base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_browser_1.fromBase64,
29
- base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_browser_1.toBase64,
30
- bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_browser_1.calculateBodyLength,
31
- credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : ((_) => () => Promise.reject(new Error("Credential is missing"))),
32
- 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 }),
33
- maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
34
- 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
- requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
36
- 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,
27
+ base64Decoder: config?.base64Decoder ?? util_base64_browser_1.fromBase64,
28
+ base64Encoder: config?.base64Encoder ?? util_base64_browser_1.toBase64,
29
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
30
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
31
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
32
+ (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
33
+ maxAttempts: config?.maxAttempts ?? middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
34
+ region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
35
+ requestHandler: config?.requestHandler ?? new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
36
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
37
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
38
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
39
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
40
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
41
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_browser_1.fromUtf8,
42
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_browser_1.toUtf8,
43
43
  };
44
44
  };
45
45
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -19,7 +19,6 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
19
19
  const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
20
20
  const smithy_client_2 = require("@aws-sdk/smithy-client");
21
21
  const getRuntimeConfig = (config) => {
22
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
23
22
  (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
24
23
  const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
25
24
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
@@ -29,24 +28,26 @@ const getRuntimeConfig = (config) => {
29
28
  ...config,
30
29
  runtime: "node",
31
30
  defaultsMode,
32
- base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
33
- base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
34
- bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
35
- 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),
36
- 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 }),
37
- maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
38
- region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
39
- requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
40
- retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (0, node_config_provider_1.loadConfig)({
41
- ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
42
- default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
43
- }),
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,
31
+ base64Decoder: config?.base64Decoder ?? util_base64_node_1.fromBase64,
32
+ base64Encoder: config?.base64Encoder ?? util_base64_node_1.toBase64,
33
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
34
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
35
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
36
+ (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
37
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
38
+ region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
39
+ requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
40
+ retryMode: config?.retryMode ??
41
+ (0, node_config_provider_1.loadConfig)({
42
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
43
+ default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
44
+ }),
45
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
46
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
47
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
48
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
49
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_node_1.fromUtf8,
50
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_node_1.toUtf8,
50
51
  };
51
52
  };
52
53
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -4,13 +4,12 @@ exports.getRuntimeConfig = void 0;
4
4
  const sha256_js_1 = require("@aws-crypto/sha256-js");
5
5
  const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
6
6
  const getRuntimeConfig = (config) => {
7
- var _a;
8
7
  const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
9
8
  return {
10
9
  ...browserDefaults,
11
10
  ...config,
12
11
  runtime: "react-native",
13
- sha256: (_a = config === null || config === void 0 ? void 0 : config.sha256) !== null && _a !== void 0 ? _a : sha256_js_1.Sha256,
12
+ sha256: config?.sha256 ?? sha256_js_1.Sha256,
14
13
  };
15
14
  };
16
15
  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: "2021-01-01",
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 : "OpenSearch",
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: "2021-01-01",
8
+ disableHostPrefix: config?.disableHostPrefix ?? false,
9
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
10
+ logger: config?.logger ?? {},
11
+ serviceId: config?.serviceId ?? "OpenSearch",
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-opensearch",
3
3
  "description": "AWS SDK for JavaScript Opensearch Client for Node.js, Browser and React Native",
4
- "version": "3.199.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,44 +19,44 @@
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.199.0",
23
- "@aws-sdk/config-resolver": "3.198.0",
24
- "@aws-sdk/credential-provider-node": "3.199.0",
25
- "@aws-sdk/fetch-http-handler": "3.199.0",
26
- "@aws-sdk/hash-node": "3.198.0",
27
- "@aws-sdk/invalid-dependency": "3.198.0",
28
- "@aws-sdk/middleware-content-length": "3.199.0",
29
- "@aws-sdk/middleware-endpoint": "3.198.0",
30
- "@aws-sdk/middleware-host-header": "3.198.0",
31
- "@aws-sdk/middleware-logger": "3.198.0",
32
- "@aws-sdk/middleware-recursion-detection": "3.198.0",
33
- "@aws-sdk/middleware-retry": "3.198.0",
34
- "@aws-sdk/middleware-serde": "3.198.0",
35
- "@aws-sdk/middleware-signing": "3.198.0",
36
- "@aws-sdk/middleware-stack": "3.198.0",
37
- "@aws-sdk/middleware-user-agent": "3.198.0",
38
- "@aws-sdk/node-config-provider": "3.198.0",
39
- "@aws-sdk/node-http-handler": "3.199.0",
40
- "@aws-sdk/protocol-http": "3.198.0",
41
- "@aws-sdk/smithy-client": "3.198.0",
42
- "@aws-sdk/types": "3.198.0",
43
- "@aws-sdk/url-parser": "3.198.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/fetch-http-handler": "3.201.0",
26
+ "@aws-sdk/hash-node": "3.201.0",
27
+ "@aws-sdk/invalid-dependency": "3.201.0",
28
+ "@aws-sdk/middleware-content-length": "3.201.0",
29
+ "@aws-sdk/middleware-endpoint": "3.201.0",
30
+ "@aws-sdk/middleware-host-header": "3.201.0",
31
+ "@aws-sdk/middleware-logger": "3.201.0",
32
+ "@aws-sdk/middleware-recursion-detection": "3.201.0",
33
+ "@aws-sdk/middleware-retry": "3.201.0",
34
+ "@aws-sdk/middleware-serde": "3.201.0",
35
+ "@aws-sdk/middleware-signing": "3.201.0",
36
+ "@aws-sdk/middleware-stack": "3.201.0",
37
+ "@aws-sdk/middleware-user-agent": "3.201.0",
38
+ "@aws-sdk/node-config-provider": "3.201.0",
39
+ "@aws-sdk/node-http-handler": "3.201.0",
40
+ "@aws-sdk/protocol-http": "3.201.0",
41
+ "@aws-sdk/smithy-client": "3.201.0",
42
+ "@aws-sdk/types": "3.201.0",
43
+ "@aws-sdk/url-parser": "3.201.0",
44
44
  "@aws-sdk/util-base64-browser": "3.188.0",
45
- "@aws-sdk/util-base64-node": "3.188.0",
45
+ "@aws-sdk/util-base64-node": "3.201.0",
46
46
  "@aws-sdk/util-body-length-browser": "3.188.0",
47
- "@aws-sdk/util-body-length-node": "3.188.0",
48
- "@aws-sdk/util-defaults-mode-browser": "3.198.0",
49
- "@aws-sdk/util-defaults-mode-node": "3.198.0",
50
- "@aws-sdk/util-endpoints": "3.198.0",
51
- "@aws-sdk/util-user-agent-browser": "3.198.0",
52
- "@aws-sdk/util-user-agent-node": "3.198.0",
47
+ "@aws-sdk/util-body-length-node": "3.201.0",
48
+ "@aws-sdk/util-defaults-mode-browser": "3.201.0",
49
+ "@aws-sdk/util-defaults-mode-node": "3.201.0",
50
+ "@aws-sdk/util-endpoints": "3.201.0",
51
+ "@aws-sdk/util-user-agent-browser": "3.201.0",
52
+ "@aws-sdk/util-user-agent-node": "3.201.0",
53
53
  "@aws-sdk/util-utf8-browser": "3.188.0",
54
- "@aws-sdk/util-utf8-node": "3.199.0",
54
+ "@aws-sdk/util-utf8-node": "3.201.0",
55
55
  "tslib": "^2.3.1"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@aws-sdk/service-client-documentation-generator": "3.188.0",
59
- "@tsconfig/recommended": "1.0.1",
59
+ "@tsconfig/node14": "1.0.3",
60
60
  "@types/node": "^12.7.5",
61
61
  "concurrently": "7.0.0",
62
62
  "downlevel-dts": "0.10.1",
@@ -70,7 +70,7 @@
70
70
  }
71
71
  },
72
72
  "engines": {
73
- "node": ">=12.0.0"
73
+ "node": ">=14.0.0"
74
74
  },
75
75
  "typesVersions": {
76
76
  "<4.0": {