@aws-sdk/client-cognito-sync 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-cognito-sync
@@ -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: "cognito-sync",
11
10
  };
12
11
  };
@@ -8,7 +8,7 @@ const models_0_1 = require("../models/models_0");
8
8
  const serializeAws_restJson1BulkPublishCommand = 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
  "/identitypools/{IdentityPoolId}/bulkpublish";
13
13
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
14
14
  let body;
@@ -26,7 +26,7 @@ exports.serializeAws_restJson1BulkPublishCommand = serializeAws_restJson1BulkPub
26
26
  const serializeAws_restJson1DeleteDatasetCommand = async (input, context) => {
27
27
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
28
28
  const headers = {};
29
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
29
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
30
30
  "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}";
31
31
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
32
32
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
@@ -46,7 +46,7 @@ exports.serializeAws_restJson1DeleteDatasetCommand = serializeAws_restJson1Delet
46
46
  const serializeAws_restJson1DescribeDatasetCommand = async (input, context) => {
47
47
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
48
48
  const headers = {};
49
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
49
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
50
50
  "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}";
51
51
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
52
52
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
@@ -66,7 +66,7 @@ exports.serializeAws_restJson1DescribeDatasetCommand = serializeAws_restJson1Des
66
66
  const serializeAws_restJson1DescribeIdentityPoolUsageCommand = async (input, context) => {
67
67
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
68
68
  const headers = {};
69
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/identitypools/{IdentityPoolId}";
69
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/identitypools/{IdentityPoolId}";
70
70
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
71
71
  let body;
72
72
  return new protocol_http_1.HttpRequest({
@@ -83,7 +83,7 @@ exports.serializeAws_restJson1DescribeIdentityPoolUsageCommand = serializeAws_re
83
83
  const serializeAws_restJson1DescribeIdentityUsageCommand = async (input, context) => {
84
84
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
85
85
  const headers = {};
86
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
86
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
87
87
  "/identitypools/{IdentityPoolId}/identities/{IdentityId}";
88
88
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
89
89
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
@@ -102,7 +102,7 @@ exports.serializeAws_restJson1DescribeIdentityUsageCommand = serializeAws_restJs
102
102
  const serializeAws_restJson1GetBulkPublishDetailsCommand = async (input, context) => {
103
103
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
104
104
  const headers = {};
105
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
105
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
106
106
  "/identitypools/{IdentityPoolId}/getBulkPublishDetails";
107
107
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
108
108
  let body;
@@ -120,7 +120,7 @@ exports.serializeAws_restJson1GetBulkPublishDetailsCommand = serializeAws_restJs
120
120
  const serializeAws_restJson1GetCognitoEventsCommand = async (input, context) => {
121
121
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
122
122
  const headers = {};
123
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/identitypools/{IdentityPoolId}/events";
123
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/identitypools/{IdentityPoolId}/events";
124
124
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
125
125
  let body;
126
126
  return new protocol_http_1.HttpRequest({
@@ -137,7 +137,7 @@ exports.serializeAws_restJson1GetCognitoEventsCommand = serializeAws_restJson1Ge
137
137
  const serializeAws_restJson1GetIdentityPoolConfigurationCommand = async (input, context) => {
138
138
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
139
139
  const headers = {};
140
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
140
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
141
141
  "/identitypools/{IdentityPoolId}/configuration";
142
142
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
143
143
  let body;
@@ -155,7 +155,7 @@ exports.serializeAws_restJson1GetIdentityPoolConfigurationCommand = serializeAws
155
155
  const serializeAws_restJson1ListDatasetsCommand = async (input, context) => {
156
156
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
157
157
  const headers = {};
158
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
158
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
159
159
  "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets";
160
160
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
161
161
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
@@ -179,7 +179,7 @@ exports.serializeAws_restJson1ListDatasetsCommand = serializeAws_restJson1ListDa
179
179
  const serializeAws_restJson1ListIdentityPoolUsageCommand = async (input, context) => {
180
180
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
181
181
  const headers = {};
182
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/identitypools";
182
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/identitypools";
183
183
  const query = map({
184
184
  nextToken: [, input.NextToken],
185
185
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -200,7 +200,7 @@ exports.serializeAws_restJson1ListIdentityPoolUsageCommand = serializeAws_restJs
200
200
  const serializeAws_restJson1ListRecordsCommand = 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
  "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/records";
205
205
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
206
206
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
@@ -229,7 +229,7 @@ const serializeAws_restJson1RegisterDeviceCommand = async (input, context) => {
229
229
  const headers = {
230
230
  "content-type": "application/json",
231
231
  };
232
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
232
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
233
233
  "/identitypools/{IdentityPoolId}/identity/{IdentityId}/device";
234
234
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
235
235
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
@@ -254,7 +254,7 @@ const serializeAws_restJson1SetCognitoEventsCommand = async (input, context) =>
254
254
  const headers = {
255
255
  "content-type": "application/json",
256
256
  };
257
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/identitypools/{IdentityPoolId}/events";
257
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/identitypools/{IdentityPoolId}/events";
258
258
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
259
259
  let body;
260
260
  body = JSON.stringify({
@@ -276,7 +276,7 @@ const serializeAws_restJson1SetIdentityPoolConfigurationCommand = async (input,
276
276
  const headers = {
277
277
  "content-type": "application/json",
278
278
  };
279
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
279
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
280
280
  "/identitypools/{IdentityPoolId}/configuration";
281
281
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
282
282
  let body;
@@ -300,7 +300,7 @@ exports.serializeAws_restJson1SetIdentityPoolConfigurationCommand = serializeAws
300
300
  const serializeAws_restJson1SubscribeToDatasetCommand = async (input, context) => {
301
301
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
302
302
  const headers = {};
303
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
303
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
304
304
  "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}";
305
305
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
306
306
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
@@ -321,7 +321,7 @@ exports.serializeAws_restJson1SubscribeToDatasetCommand = serializeAws_restJson1
321
321
  const serializeAws_restJson1UnsubscribeFromDatasetCommand = async (input, context) => {
322
322
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
323
323
  const headers = {};
324
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
324
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
325
325
  "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}";
326
326
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
327
327
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
@@ -345,7 +345,7 @@ const serializeAws_restJson1UpdateRecordsCommand = async (input, context) => {
345
345
  "content-type": "application/json",
346
346
  "x-amz-client-context": input.ClientContext,
347
347
  });
348
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
348
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
349
349
  "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}";
350
350
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
351
351
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
@@ -1562,15 +1562,12 @@ const deserializeAws_restJson1RecordList = (output, context) => {
1562
1562
  });
1563
1563
  return retVal;
1564
1564
  };
1565
- const deserializeMetadata = (output) => {
1566
- var _a, _b;
1567
- return ({
1568
- httpStatusCode: output.statusCode,
1569
- 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"],
1570
- extendedRequestId: output.headers["x-amz-id-2"],
1571
- cfId: output.headers["x-amz-cf-id"],
1572
- });
1573
- };
1565
+ const deserializeMetadata = (output) => ({
1566
+ httpStatusCode: output.statusCode,
1567
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1568
+ extendedRequestId: output.headers["x-amz-id-2"],
1569
+ cfId: output.headers["x-amz-cf-id"],
1570
+ });
1574
1571
  const collectBody = (streamBody = new Uint8Array(), context) => {
1575
1572
  if (streamBody instanceof Uint8Array) {
1576
1573
  return Promise.resolve(streamBody);
@@ -1590,9 +1587,8 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
1590
1587
  return {};
1591
1588
  });
1592
1589
  const parseErrorBody = async (errorBody, context) => {
1593
- var _a;
1594
1590
  const value = await parseBody(errorBody, context);
1595
- value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1591
+ value.message = value.message ?? value.Message;
1596
1592
  return value;
1597
1593
  };
1598
1594
  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: "2014-06-30",
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 : "Cognito Sync",
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: "2014-06-30",
8
+ disableHostPrefix: config?.disableHostPrefix ?? false,
9
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
10
+ logger: config?.logger ?? {},
11
+ serviceId: config?.serviceId ?? "Cognito Sync",
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-cognito-sync",
3
3
  "description": "AWS SDK for JavaScript Cognito Sync 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,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.200.0",
23
- "@aws-sdk/config-resolver": "3.200.0",
24
- "@aws-sdk/credential-provider-node": "3.200.0",
25
- "@aws-sdk/fetch-http-handler": "3.200.0",
26
- "@aws-sdk/hash-node": "3.200.0",
27
- "@aws-sdk/invalid-dependency": "3.200.0",
28
- "@aws-sdk/middleware-content-length": "3.200.0",
29
- "@aws-sdk/middleware-endpoint": "3.200.0",
30
- "@aws-sdk/middleware-host-header": "3.200.0",
31
- "@aws-sdk/middleware-logger": "3.200.0",
32
- "@aws-sdk/middleware-recursion-detection": "3.200.0",
33
- "@aws-sdk/middleware-retry": "3.200.0",
34
- "@aws-sdk/middleware-serde": "3.200.0",
35
- "@aws-sdk/middleware-signing": "3.200.0",
36
- "@aws-sdk/middleware-stack": "3.200.0",
37
- "@aws-sdk/middleware-user-agent": "3.200.0",
38
- "@aws-sdk/node-config-provider": "3.200.0",
39
- "@aws-sdk/node-http-handler": "3.200.0",
40
- "@aws-sdk/protocol-http": "3.200.0",
41
- "@aws-sdk/smithy-client": "3.200.0",
42
- "@aws-sdk/types": "3.200.0",
43
- "@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/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.200.0",
49
- "@aws-sdk/util-defaults-mode-node": "3.200.0",
50
- "@aws-sdk/util-endpoints": "3.200.0",
51
- "@aws-sdk/util-user-agent-browser": "3.200.0",
52
- "@aws-sdk/util-user-agent-node": "3.200.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": {