@aws-sdk/client-connect 3.525.0 → 3.529.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.
@@ -1,4 +1,4 @@
1
- import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
1
+ import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
2
2
  import { requestBuilder as rb } from "@smithy/core";
3
3
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, map, parseEpochTimestamp as __parseEpochTimestamp, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
@@ -8621,43 +8621,3 @@ const _st = "status";
8621
8621
  const _t = "type";
8622
8622
  const _tK = "tagKeys";
8623
8623
  const _v = "version";
8624
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
8625
- if (encoded.length) {
8626
- return JSON.parse(encoded);
8627
- }
8628
- return {};
8629
- });
8630
- const parseErrorBody = async (errorBody, context) => {
8631
- const value = await parseBody(errorBody, context);
8632
- value.message = value.message ?? value.Message;
8633
- return value;
8634
- };
8635
- const loadRestJsonErrorCode = (output, data) => {
8636
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
8637
- const sanitizeErrorCode = (rawValue) => {
8638
- let cleanValue = rawValue;
8639
- if (typeof cleanValue === "number") {
8640
- cleanValue = cleanValue.toString();
8641
- }
8642
- if (cleanValue.indexOf(",") >= 0) {
8643
- cleanValue = cleanValue.split(",")[0];
8644
- }
8645
- if (cleanValue.indexOf(":") >= 0) {
8646
- cleanValue = cleanValue.split(":")[0];
8647
- }
8648
- if (cleanValue.indexOf("#") >= 0) {
8649
- cleanValue = cleanValue.split("#")[1];
8650
- }
8651
- return cleanValue;
8652
- };
8653
- const headerKey = findKey(output.headers, "x-amzn-errortype");
8654
- if (headerKey !== undefined) {
8655
- return sanitizeErrorCode(output.headers[headerKey]);
8656
- }
8657
- if (data.code !== undefined) {
8658
- return sanitizeErrorCode(data.code);
8659
- }
8660
- if (data["__type"] !== undefined) {
8661
- return sanitizeErrorCode(data["__type"]);
8662
- }
8663
- };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-connect",
3
3
  "description": "AWS SDK for JavaScript Connect Client for Node.js, Browser and React Native",
4
- "version": "3.525.0",
4
+ "version": "3.529.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-connect",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.525.0",
24
- "@aws-sdk/core": "3.525.0",
25
- "@aws-sdk/credential-provider-node": "3.525.0",
23
+ "@aws-sdk/client-sts": "3.529.0",
24
+ "@aws-sdk/core": "3.529.0",
25
+ "@aws-sdk/credential-provider-node": "3.529.0",
26
26
  "@aws-sdk/middleware-host-header": "3.523.0",
27
27
  "@aws-sdk/middleware-logger": "3.523.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.523.0",