@aws-sdk/client-firehose 3.523.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.
package/dist-cjs/index.js CHANGED
@@ -741,6 +741,7 @@ var UpdateDestinationInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => (
741
741
  }), "UpdateDestinationInputFilterSensitiveLog");
742
742
 
743
743
  // src/protocols/Aws_json1_1.ts
744
+ var import_core2 = require("@aws-sdk/core");
744
745
 
745
746
 
746
747
  var se_CreateDeliveryStreamCommand = /* @__PURE__ */ __name(async (input, context) => {
@@ -819,7 +820,7 @@ var de_CreateDeliveryStreamCommand = /* @__PURE__ */ __name(async (output, conte
819
820
  if (output.statusCode >= 300) {
820
821
  return de_CommandError(output, context);
821
822
  }
822
- const data = await parseBody(output.body, context);
823
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
823
824
  let contents = {};
824
825
  contents = (0, import_smithy_client._json)(data);
825
826
  const response = {
@@ -832,7 +833,7 @@ var de_DeleteDeliveryStreamCommand = /* @__PURE__ */ __name(async (output, conte
832
833
  if (output.statusCode >= 300) {
833
834
  return de_CommandError(output, context);
834
835
  }
835
- const data = await parseBody(output.body, context);
836
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
836
837
  let contents = {};
837
838
  contents = (0, import_smithy_client._json)(data);
838
839
  const response = {
@@ -845,7 +846,7 @@ var de_DescribeDeliveryStreamCommand = /* @__PURE__ */ __name(async (output, con
845
846
  if (output.statusCode >= 300) {
846
847
  return de_CommandError(output, context);
847
848
  }
848
- const data = await parseBody(output.body, context);
849
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
849
850
  let contents = {};
850
851
  contents = de_DescribeDeliveryStreamOutput(data, context);
851
852
  const response = {
@@ -858,7 +859,7 @@ var de_ListDeliveryStreamsCommand = /* @__PURE__ */ __name(async (output, contex
858
859
  if (output.statusCode >= 300) {
859
860
  return de_CommandError(output, context);
860
861
  }
861
- const data = await parseBody(output.body, context);
862
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
862
863
  let contents = {};
863
864
  contents = (0, import_smithy_client._json)(data);
864
865
  const response = {
@@ -871,7 +872,7 @@ var de_ListTagsForDeliveryStreamCommand = /* @__PURE__ */ __name(async (output,
871
872
  if (output.statusCode >= 300) {
872
873
  return de_CommandError(output, context);
873
874
  }
874
- const data = await parseBody(output.body, context);
875
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
875
876
  let contents = {};
876
877
  contents = (0, import_smithy_client._json)(data);
877
878
  const response = {
@@ -884,7 +885,7 @@ var de_PutRecordCommand = /* @__PURE__ */ __name(async (output, context) => {
884
885
  if (output.statusCode >= 300) {
885
886
  return de_CommandError(output, context);
886
887
  }
887
- const data = await parseBody(output.body, context);
888
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
888
889
  let contents = {};
889
890
  contents = (0, import_smithy_client._json)(data);
890
891
  const response = {
@@ -897,7 +898,7 @@ var de_PutRecordBatchCommand = /* @__PURE__ */ __name(async (output, context) =>
897
898
  if (output.statusCode >= 300) {
898
899
  return de_CommandError(output, context);
899
900
  }
900
- const data = await parseBody(output.body, context);
901
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
901
902
  let contents = {};
902
903
  contents = (0, import_smithy_client._json)(data);
903
904
  const response = {
@@ -910,7 +911,7 @@ var de_StartDeliveryStreamEncryptionCommand = /* @__PURE__ */ __name(async (outp
910
911
  if (output.statusCode >= 300) {
911
912
  return de_CommandError(output, context);
912
913
  }
913
- const data = await parseBody(output.body, context);
914
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
914
915
  let contents = {};
915
916
  contents = (0, import_smithy_client._json)(data);
916
917
  const response = {
@@ -923,7 +924,7 @@ var de_StopDeliveryStreamEncryptionCommand = /* @__PURE__ */ __name(async (outpu
923
924
  if (output.statusCode >= 300) {
924
925
  return de_CommandError(output, context);
925
926
  }
926
- const data = await parseBody(output.body, context);
927
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
927
928
  let contents = {};
928
929
  contents = (0, import_smithy_client._json)(data);
929
930
  const response = {
@@ -936,7 +937,7 @@ var de_TagDeliveryStreamCommand = /* @__PURE__ */ __name(async (output, context)
936
937
  if (output.statusCode >= 300) {
937
938
  return de_CommandError(output, context);
938
939
  }
939
- const data = await parseBody(output.body, context);
940
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
940
941
  let contents = {};
941
942
  contents = (0, import_smithy_client._json)(data);
942
943
  const response = {
@@ -949,7 +950,7 @@ var de_UntagDeliveryStreamCommand = /* @__PURE__ */ __name(async (output, contex
949
950
  if (output.statusCode >= 300) {
950
951
  return de_CommandError(output, context);
951
952
  }
952
- const data = await parseBody(output.body, context);
953
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
953
954
  let contents = {};
954
955
  contents = (0, import_smithy_client._json)(data);
955
956
  const response = {
@@ -962,7 +963,7 @@ var de_UpdateDestinationCommand = /* @__PURE__ */ __name(async (output, context)
962
963
  if (output.statusCode >= 300) {
963
964
  return de_CommandError(output, context);
964
965
  }
965
- const data = await parseBody(output.body, context);
966
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
966
967
  let contents = {};
967
968
  contents = (0, import_smithy_client._json)(data);
968
969
  const response = {
@@ -974,9 +975,9 @@ var de_UpdateDestinationCommand = /* @__PURE__ */ __name(async (output, context)
974
975
  var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
975
976
  const parsedOutput = {
976
977
  ...output,
977
- body: await parseErrorBody(output.body, context)
978
+ body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
978
979
  };
979
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
980
+ const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
980
981
  switch (errorCode) {
981
982
  case "InvalidArgumentException":
982
983
  case "com.amazonaws.firehose#InvalidArgumentException":
@@ -1331,7 +1332,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
1331
1332
  extendedRequestId: output.headers["x-amz-id-2"],
1332
1333
  cfId: output.headers["x-amz-cf-id"]
1333
1334
  }), "deserializeMetadata");
1334
- var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
1335
1335
  var throwDefaultError = (0, import_smithy_client.withBaseException)(FirehoseServiceException);
1336
1336
  var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
1337
1337
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -1358,46 +1358,6 @@ function sharedHeaders(operation) {
1358
1358
  };
1359
1359
  }
1360
1360
  __name(sharedHeaders, "sharedHeaders");
1361
- var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1362
- if (encoded.length) {
1363
- return JSON.parse(encoded);
1364
- }
1365
- return {};
1366
- }), "parseBody");
1367
- var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
1368
- const value = await parseBody(errorBody, context);
1369
- value.message = value.message ?? value.Message;
1370
- return value;
1371
- }, "parseErrorBody");
1372
- var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
1373
- const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
1374
- const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
1375
- let cleanValue = rawValue;
1376
- if (typeof cleanValue === "number") {
1377
- cleanValue = cleanValue.toString();
1378
- }
1379
- if (cleanValue.indexOf(",") >= 0) {
1380
- cleanValue = cleanValue.split(",")[0];
1381
- }
1382
- if (cleanValue.indexOf(":") >= 0) {
1383
- cleanValue = cleanValue.split(":")[0];
1384
- }
1385
- if (cleanValue.indexOf("#") >= 0) {
1386
- cleanValue = cleanValue.split("#")[1];
1387
- }
1388
- return cleanValue;
1389
- }, "sanitizeErrorCode");
1390
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1391
- if (headerKey !== void 0) {
1392
- return sanitizeErrorCode(output.headers[headerKey]);
1393
- }
1394
- if (data.code !== void 0) {
1395
- return sanitizeErrorCode(data.code);
1396
- }
1397
- if (data["__type"] !== void 0) {
1398
- return sanitizeErrorCode(data["__type"]);
1399
- }
1400
- }, "loadRestJsonErrorCode");
1401
1361
 
1402
1362
  // src/commands/CreateDeliveryStreamCommand.ts
1403
1363
  var _CreateDeliveryStreamCommand = class _CreateDeliveryStreamCommand extends import_smithy_client.Command.classBuilder().ep({
@@ -1,3 +1,4 @@
1
+ import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
1
2
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
3
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
3
4
  import { FirehoseServiceException as __BaseException } from "../models/FirehoseServiceException";
@@ -620,43 +621,3 @@ function sharedHeaders(operation) {
620
621
  "x-amz-target": `Firehose_20150804.${operation}`,
621
622
  };
622
623
  }
623
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
624
- if (encoded.length) {
625
- return JSON.parse(encoded);
626
- }
627
- return {};
628
- });
629
- const parseErrorBody = async (errorBody, context) => {
630
- const value = await parseBody(errorBody, context);
631
- value.message = value.message ?? value.Message;
632
- return value;
633
- };
634
- const loadRestJsonErrorCode = (output, data) => {
635
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
636
- const sanitizeErrorCode = (rawValue) => {
637
- let cleanValue = rawValue;
638
- if (typeof cleanValue === "number") {
639
- cleanValue = cleanValue.toString();
640
- }
641
- if (cleanValue.indexOf(",") >= 0) {
642
- cleanValue = cleanValue.split(",")[0];
643
- }
644
- if (cleanValue.indexOf(":") >= 0) {
645
- cleanValue = cleanValue.split(":")[0];
646
- }
647
- if (cleanValue.indexOf("#") >= 0) {
648
- cleanValue = cleanValue.split("#")[1];
649
- }
650
- return cleanValue;
651
- };
652
- const headerKey = findKey(output.headers, "x-amzn-errortype");
653
- if (headerKey !== undefined) {
654
- return sanitizeErrorCode(output.headers[headerKey]);
655
- }
656
- if (data.code !== undefined) {
657
- return sanitizeErrorCode(data.code);
658
- }
659
- if (data["__type"] !== undefined) {
660
- return sanitizeErrorCode(data["__type"]);
661
- }
662
- };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-firehose",
3
3
  "description": "AWS SDK for JavaScript Firehose Client for Node.js, Browser and React Native",
4
- "version": "3.523.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-firehose",
@@ -20,40 +20,40 @@
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.523.0",
24
- "@aws-sdk/core": "3.523.0",
25
- "@aws-sdk/credential-provider-node": "3.523.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",
29
- "@aws-sdk/middleware-user-agent": "3.523.0",
30
- "@aws-sdk/region-config-resolver": "3.523.0",
29
+ "@aws-sdk/middleware-user-agent": "3.525.0",
30
+ "@aws-sdk/region-config-resolver": "3.525.0",
31
31
  "@aws-sdk/types": "3.523.0",
32
- "@aws-sdk/util-endpoints": "3.523.0",
32
+ "@aws-sdk/util-endpoints": "3.525.0",
33
33
  "@aws-sdk/util-user-agent-browser": "3.523.0",
34
- "@aws-sdk/util-user-agent-node": "3.523.0",
35
- "@smithy/config-resolver": "^2.1.3",
36
- "@smithy/core": "^1.3.4",
34
+ "@aws-sdk/util-user-agent-node": "3.525.0",
35
+ "@smithy/config-resolver": "^2.1.4",
36
+ "@smithy/core": "^1.3.5",
37
37
  "@smithy/fetch-http-handler": "^2.4.3",
38
38
  "@smithy/hash-node": "^2.1.3",
39
39
  "@smithy/invalid-dependency": "^2.1.3",
40
40
  "@smithy/middleware-content-length": "^2.1.3",
41
- "@smithy/middleware-endpoint": "^2.4.3",
42
- "@smithy/middleware-retry": "^2.1.3",
41
+ "@smithy/middleware-endpoint": "^2.4.4",
42
+ "@smithy/middleware-retry": "^2.1.4",
43
43
  "@smithy/middleware-serde": "^2.1.3",
44
44
  "@smithy/middleware-stack": "^2.1.3",
45
- "@smithy/node-config-provider": "^2.2.3",
45
+ "@smithy/node-config-provider": "^2.2.4",
46
46
  "@smithy/node-http-handler": "^2.4.1",
47
47
  "@smithy/protocol-http": "^3.2.1",
48
- "@smithy/smithy-client": "^2.4.1",
48
+ "@smithy/smithy-client": "^2.4.2",
49
49
  "@smithy/types": "^2.10.1",
50
50
  "@smithy/url-parser": "^2.1.3",
51
51
  "@smithy/util-base64": "^2.1.1",
52
52
  "@smithy/util-body-length-browser": "^2.1.1",
53
53
  "@smithy/util-body-length-node": "^2.2.1",
54
- "@smithy/util-defaults-mode-browser": "^2.1.3",
55
- "@smithy/util-defaults-mode-node": "^2.2.2",
56
- "@smithy/util-endpoints": "^1.1.3",
54
+ "@smithy/util-defaults-mode-browser": "^2.1.4",
55
+ "@smithy/util-defaults-mode-node": "^2.2.3",
56
+ "@smithy/util-endpoints": "^1.1.4",
57
57
  "@smithy/util-middleware": "^2.1.3",
58
58
  "@smithy/util-retry": "^2.1.3",
59
59
  "@smithy/util-utf8": "^2.1.1",
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");