@aws-sdk/client-b2bi 3.525.0 → 3.529.1
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 +23 -64
- package/dist-es/protocols/Aws_json1_0.js +1 -41
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -667,7 +667,7 @@ var de_CreateCapabilityCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
667
667
|
if (output.statusCode >= 300) {
|
|
668
668
|
return de_CommandError(output, context);
|
|
669
669
|
}
|
|
670
|
-
const data = await
|
|
670
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
671
671
|
let contents = {};
|
|
672
672
|
contents = de_CreateCapabilityResponse(data, context);
|
|
673
673
|
const response = {
|
|
@@ -680,7 +680,7 @@ var de_CreatePartnershipCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
680
680
|
if (output.statusCode >= 300) {
|
|
681
681
|
return de_CommandError(output, context);
|
|
682
682
|
}
|
|
683
|
-
const data = await
|
|
683
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
684
684
|
let contents = {};
|
|
685
685
|
contents = de_CreatePartnershipResponse(data, context);
|
|
686
686
|
const response = {
|
|
@@ -693,7 +693,7 @@ var de_CreateProfileCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
693
693
|
if (output.statusCode >= 300) {
|
|
694
694
|
return de_CommandError(output, context);
|
|
695
695
|
}
|
|
696
|
-
const data = await
|
|
696
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
697
697
|
let contents = {};
|
|
698
698
|
contents = de_CreateProfileResponse(data, context);
|
|
699
699
|
const response = {
|
|
@@ -706,7 +706,7 @@ var de_CreateTransformerCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
706
706
|
if (output.statusCode >= 300) {
|
|
707
707
|
return de_CommandError(output, context);
|
|
708
708
|
}
|
|
709
|
-
const data = await
|
|
709
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
710
710
|
let contents = {};
|
|
711
711
|
contents = de_CreateTransformerResponse(data, context);
|
|
712
712
|
const response = {
|
|
@@ -759,7 +759,7 @@ var de_GetCapabilityCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
759
759
|
if (output.statusCode >= 300) {
|
|
760
760
|
return de_CommandError(output, context);
|
|
761
761
|
}
|
|
762
|
-
const data = await
|
|
762
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
763
763
|
let contents = {};
|
|
764
764
|
contents = de_GetCapabilityResponse(data, context);
|
|
765
765
|
const response = {
|
|
@@ -772,7 +772,7 @@ var de_GetPartnershipCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
772
772
|
if (output.statusCode >= 300) {
|
|
773
773
|
return de_CommandError(output, context);
|
|
774
774
|
}
|
|
775
|
-
const data = await
|
|
775
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
776
776
|
let contents = {};
|
|
777
777
|
contents = de_GetPartnershipResponse(data, context);
|
|
778
778
|
const response = {
|
|
@@ -785,7 +785,7 @@ var de_GetProfileCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
785
785
|
if (output.statusCode >= 300) {
|
|
786
786
|
return de_CommandError(output, context);
|
|
787
787
|
}
|
|
788
|
-
const data = await
|
|
788
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
789
789
|
let contents = {};
|
|
790
790
|
contents = de_GetProfileResponse(data, context);
|
|
791
791
|
const response = {
|
|
@@ -798,7 +798,7 @@ var de_GetTransformerCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
798
798
|
if (output.statusCode >= 300) {
|
|
799
799
|
return de_CommandError(output, context);
|
|
800
800
|
}
|
|
801
|
-
const data = await
|
|
801
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
802
802
|
let contents = {};
|
|
803
803
|
contents = de_GetTransformerResponse(data, context);
|
|
804
804
|
const response = {
|
|
@@ -811,7 +811,7 @@ var de_GetTransformerJobCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
811
811
|
if (output.statusCode >= 300) {
|
|
812
812
|
return de_CommandError(output, context);
|
|
813
813
|
}
|
|
814
|
-
const data = await
|
|
814
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
815
815
|
let contents = {};
|
|
816
816
|
contents = (0, import_smithy_client._json)(data);
|
|
817
817
|
const response = {
|
|
@@ -824,7 +824,7 @@ var de_ListCapabilitiesCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
824
824
|
if (output.statusCode >= 300) {
|
|
825
825
|
return de_CommandError(output, context);
|
|
826
826
|
}
|
|
827
|
-
const data = await
|
|
827
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
828
828
|
let contents = {};
|
|
829
829
|
contents = de_ListCapabilitiesResponse(data, context);
|
|
830
830
|
const response = {
|
|
@@ -837,7 +837,7 @@ var de_ListPartnershipsCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
837
837
|
if (output.statusCode >= 300) {
|
|
838
838
|
return de_CommandError(output, context);
|
|
839
839
|
}
|
|
840
|
-
const data = await
|
|
840
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
841
841
|
let contents = {};
|
|
842
842
|
contents = de_ListPartnershipsResponse(data, context);
|
|
843
843
|
const response = {
|
|
@@ -850,7 +850,7 @@ var de_ListProfilesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
850
850
|
if (output.statusCode >= 300) {
|
|
851
851
|
return de_CommandError(output, context);
|
|
852
852
|
}
|
|
853
|
-
const data = await
|
|
853
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
854
854
|
let contents = {};
|
|
855
855
|
contents = de_ListProfilesResponse(data, context);
|
|
856
856
|
const response = {
|
|
@@ -863,7 +863,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
863
863
|
if (output.statusCode >= 300) {
|
|
864
864
|
return de_CommandError(output, context);
|
|
865
865
|
}
|
|
866
|
-
const data = await
|
|
866
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
867
867
|
let contents = {};
|
|
868
868
|
contents = (0, import_smithy_client._json)(data);
|
|
869
869
|
const response = {
|
|
@@ -876,7 +876,7 @@ var de_ListTransformersCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
876
876
|
if (output.statusCode >= 300) {
|
|
877
877
|
return de_CommandError(output, context);
|
|
878
878
|
}
|
|
879
|
-
const data = await
|
|
879
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
880
880
|
let contents = {};
|
|
881
881
|
contents = de_ListTransformersResponse(data, context);
|
|
882
882
|
const response = {
|
|
@@ -889,7 +889,7 @@ var de_StartTransformerJobCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
889
889
|
if (output.statusCode >= 300) {
|
|
890
890
|
return de_CommandError(output, context);
|
|
891
891
|
}
|
|
892
|
-
const data = await
|
|
892
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
893
893
|
let contents = {};
|
|
894
894
|
contents = (0, import_smithy_client._json)(data);
|
|
895
895
|
const response = {
|
|
@@ -912,7 +912,7 @@ var de_TestMappingCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
912
912
|
if (output.statusCode >= 300) {
|
|
913
913
|
return de_CommandError(output, context);
|
|
914
914
|
}
|
|
915
|
-
const data = await
|
|
915
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
916
916
|
let contents = {};
|
|
917
917
|
contents = (0, import_smithy_client._json)(data);
|
|
918
918
|
const response = {
|
|
@@ -925,7 +925,7 @@ var de_TestParsingCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
925
925
|
if (output.statusCode >= 300) {
|
|
926
926
|
return de_CommandError(output, context);
|
|
927
927
|
}
|
|
928
|
-
const data = await
|
|
928
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
929
929
|
let contents = {};
|
|
930
930
|
contents = (0, import_smithy_client._json)(data);
|
|
931
931
|
const response = {
|
|
@@ -948,7 +948,7 @@ var de_UpdateCapabilityCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
948
948
|
if (output.statusCode >= 300) {
|
|
949
949
|
return de_CommandError(output, context);
|
|
950
950
|
}
|
|
951
|
-
const data = await
|
|
951
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
952
952
|
let contents = {};
|
|
953
953
|
contents = de_UpdateCapabilityResponse(data, context);
|
|
954
954
|
const response = {
|
|
@@ -961,7 +961,7 @@ var de_UpdatePartnershipCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
961
961
|
if (output.statusCode >= 300) {
|
|
962
962
|
return de_CommandError(output, context);
|
|
963
963
|
}
|
|
964
|
-
const data = await
|
|
964
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
965
965
|
let contents = {};
|
|
966
966
|
contents = de_UpdatePartnershipResponse(data, context);
|
|
967
967
|
const response = {
|
|
@@ -974,7 +974,7 @@ var de_UpdateProfileCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
974
974
|
if (output.statusCode >= 300) {
|
|
975
975
|
return de_CommandError(output, context);
|
|
976
976
|
}
|
|
977
|
-
const data = await
|
|
977
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
978
978
|
let contents = {};
|
|
979
979
|
contents = de_UpdateProfileResponse(data, context);
|
|
980
980
|
const response = {
|
|
@@ -987,7 +987,7 @@ var de_UpdateTransformerCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
987
987
|
if (output.statusCode >= 300) {
|
|
988
988
|
return de_CommandError(output, context);
|
|
989
989
|
}
|
|
990
|
-
const data = await
|
|
990
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
991
991
|
let contents = {};
|
|
992
992
|
contents = de_UpdateTransformerResponse(data, context);
|
|
993
993
|
const response = {
|
|
@@ -999,9 +999,9 @@ var de_UpdateTransformerCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
999
999
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1000
1000
|
const parsedOutput = {
|
|
1001
1001
|
...output,
|
|
1002
|
-
body: await
|
|
1002
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
1003
1003
|
};
|
|
1004
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1004
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
1005
1005
|
switch (errorCode) {
|
|
1006
1006
|
case "AccessDeniedException":
|
|
1007
1007
|
case "com.amazonaws.b2bi#AccessDeniedException":
|
|
@@ -1403,7 +1403,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
1403
1403
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1404
1404
|
cfId: output.headers["x-amz-cf-id"]
|
|
1405
1405
|
}), "deserializeMetadata");
|
|
1406
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1407
1406
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(B2biServiceException);
|
|
1408
1407
|
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
1409
1408
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -1430,46 +1429,6 @@ function sharedHeaders(operation) {
|
|
|
1430
1429
|
};
|
|
1431
1430
|
}
|
|
1432
1431
|
__name(sharedHeaders, "sharedHeaders");
|
|
1433
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1434
|
-
if (encoded.length) {
|
|
1435
|
-
return JSON.parse(encoded);
|
|
1436
|
-
}
|
|
1437
|
-
return {};
|
|
1438
|
-
}), "parseBody");
|
|
1439
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1440
|
-
const value = await parseBody(errorBody, context);
|
|
1441
|
-
value.message = value.message ?? value.Message;
|
|
1442
|
-
return value;
|
|
1443
|
-
}, "parseErrorBody");
|
|
1444
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1445
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1446
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1447
|
-
let cleanValue = rawValue;
|
|
1448
|
-
if (typeof cleanValue === "number") {
|
|
1449
|
-
cleanValue = cleanValue.toString();
|
|
1450
|
-
}
|
|
1451
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1452
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1453
|
-
}
|
|
1454
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1455
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1456
|
-
}
|
|
1457
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1458
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1459
|
-
}
|
|
1460
|
-
return cleanValue;
|
|
1461
|
-
}, "sanitizeErrorCode");
|
|
1462
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1463
|
-
if (headerKey !== void 0) {
|
|
1464
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1465
|
-
}
|
|
1466
|
-
if (data.code !== void 0) {
|
|
1467
|
-
return sanitizeErrorCode(data.code);
|
|
1468
|
-
}
|
|
1469
|
-
if (data["__type"] !== void 0) {
|
|
1470
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1471
|
-
}
|
|
1472
|
-
}, "loadRestJsonErrorCode");
|
|
1473
1432
|
|
|
1474
1433
|
// src/commands/CreateCapabilityCommand.ts
|
|
1475
1434
|
var _CreateCapabilityCommand = class _CreateCapabilityCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
@@ -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 { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
3
3
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectString as __expectString, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
@@ -940,43 +940,3 @@ function sharedHeaders(operation) {
|
|
|
940
940
|
"x-amz-target": `B2BI.${operation}`,
|
|
941
941
|
};
|
|
942
942
|
}
|
|
943
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
944
|
-
if (encoded.length) {
|
|
945
|
-
return JSON.parse(encoded);
|
|
946
|
-
}
|
|
947
|
-
return {};
|
|
948
|
-
});
|
|
949
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
950
|
-
const value = await parseBody(errorBody, context);
|
|
951
|
-
value.message = value.message ?? value.Message;
|
|
952
|
-
return value;
|
|
953
|
-
};
|
|
954
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
955
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
956
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
957
|
-
let cleanValue = rawValue;
|
|
958
|
-
if (typeof cleanValue === "number") {
|
|
959
|
-
cleanValue = cleanValue.toString();
|
|
960
|
-
}
|
|
961
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
962
|
-
cleanValue = cleanValue.split(",")[0];
|
|
963
|
-
}
|
|
964
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
965
|
-
cleanValue = cleanValue.split(":")[0];
|
|
966
|
-
}
|
|
967
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
968
|
-
cleanValue = cleanValue.split("#")[1];
|
|
969
|
-
}
|
|
970
|
-
return cleanValue;
|
|
971
|
-
};
|
|
972
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
973
|
-
if (headerKey !== undefined) {
|
|
974
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
975
|
-
}
|
|
976
|
-
if (data.code !== undefined) {
|
|
977
|
-
return sanitizeErrorCode(data.code);
|
|
978
|
-
}
|
|
979
|
-
if (data["__type"] !== undefined) {
|
|
980
|
-
return sanitizeErrorCode(data["__type"]);
|
|
981
|
-
}
|
|
982
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-b2bi",
|
|
3
3
|
"description": "AWS SDK for JavaScript B2bi Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.529.1",
|
|
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-b2bi",
|
|
@@ -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.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.529.1",
|
|
24
|
+
"@aws-sdk/core": "3.529.1",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.529.1",
|
|
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",
|