@aws-sdk/client-chime 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,3 +1,4 @@
1
+ import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
1
2
  import { requestBuilder as rb } from "@smithy/core";
2
3
  import { isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
3
4
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
@@ -6158,43 +6159,3 @@ const _tfp = "toll-free-prefix";
6158
6159
  const _ue = "user-email";
6159
6160
  const _ut = "user-type";
6160
6161
  const _xacb = "x-amz-chime-bearer";
6161
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
6162
- if (encoded.length) {
6163
- return JSON.parse(encoded);
6164
- }
6165
- return {};
6166
- });
6167
- const parseErrorBody = async (errorBody, context) => {
6168
- const value = await parseBody(errorBody, context);
6169
- value.message = value.message ?? value.Message;
6170
- return value;
6171
- };
6172
- const loadRestJsonErrorCode = (output, data) => {
6173
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
6174
- const sanitizeErrorCode = (rawValue) => {
6175
- let cleanValue = rawValue;
6176
- if (typeof cleanValue === "number") {
6177
- cleanValue = cleanValue.toString();
6178
- }
6179
- if (cleanValue.indexOf(",") >= 0) {
6180
- cleanValue = cleanValue.split(",")[0];
6181
- }
6182
- if (cleanValue.indexOf(":") >= 0) {
6183
- cleanValue = cleanValue.split(":")[0];
6184
- }
6185
- if (cleanValue.indexOf("#") >= 0) {
6186
- cleanValue = cleanValue.split("#")[1];
6187
- }
6188
- return cleanValue;
6189
- };
6190
- const headerKey = findKey(output.headers, "x-amzn-errortype");
6191
- if (headerKey !== undefined) {
6192
- return sanitizeErrorCode(output.headers[headerKey]);
6193
- }
6194
- if (data.code !== undefined) {
6195
- return sanitizeErrorCode(data.code);
6196
- }
6197
- if (data["__type"] !== undefined) {
6198
- return sanitizeErrorCode(data["__type"]);
6199
- }
6200
- };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-chime",
3
3
  "description": "AWS SDK for JavaScript Chime 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-chime",
@@ -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",