@aws-sdk/client-sqs 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.
- package/dist-cjs/index.js +16 -57
- package/dist-es/protocols/Aws_json1_0.js +1 -41
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -927,7 +927,7 @@ var de_CancelMessageMoveTaskCommand = /* @__PURE__ */ __name(async (output, cont
|
|
|
927
927
|
if (output.statusCode >= 300) {
|
|
928
928
|
return de_CommandError(output, context);
|
|
929
929
|
}
|
|
930
|
-
const data = await
|
|
930
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
931
931
|
let contents = {};
|
|
932
932
|
contents = (0, import_smithy_client._json)(data);
|
|
933
933
|
const response = {
|
|
@@ -950,7 +950,7 @@ var de_ChangeMessageVisibilityBatchCommand = /* @__PURE__ */ __name(async (outpu
|
|
|
950
950
|
if (output.statusCode >= 300) {
|
|
951
951
|
return de_CommandError(output, context);
|
|
952
952
|
}
|
|
953
|
-
const data = await
|
|
953
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
954
954
|
let contents = {};
|
|
955
955
|
contents = (0, import_smithy_client._json)(data);
|
|
956
956
|
const response = {
|
|
@@ -963,7 +963,7 @@ var de_CreateQueueCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
963
963
|
if (output.statusCode >= 300) {
|
|
964
964
|
return de_CommandError(output, context);
|
|
965
965
|
}
|
|
966
|
-
const data = await
|
|
966
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
967
967
|
let contents = {};
|
|
968
968
|
contents = (0, import_smithy_client._json)(data);
|
|
969
969
|
const response = {
|
|
@@ -986,7 +986,7 @@ var de_DeleteMessageBatchCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
986
986
|
if (output.statusCode >= 300) {
|
|
987
987
|
return de_CommandError(output, context);
|
|
988
988
|
}
|
|
989
|
-
const data = await
|
|
989
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
990
990
|
let contents = {};
|
|
991
991
|
contents = (0, import_smithy_client._json)(data);
|
|
992
992
|
const response = {
|
|
@@ -1009,7 +1009,7 @@ var de_GetQueueAttributesCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
1009
1009
|
if (output.statusCode >= 300) {
|
|
1010
1010
|
return de_CommandError(output, context);
|
|
1011
1011
|
}
|
|
1012
|
-
const data = await
|
|
1012
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1013
1013
|
let contents = {};
|
|
1014
1014
|
contents = (0, import_smithy_client._json)(data);
|
|
1015
1015
|
const response = {
|
|
@@ -1022,7 +1022,7 @@ var de_GetQueueUrlCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1022
1022
|
if (output.statusCode >= 300) {
|
|
1023
1023
|
return de_CommandError(output, context);
|
|
1024
1024
|
}
|
|
1025
|
-
const data = await
|
|
1025
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1026
1026
|
let contents = {};
|
|
1027
1027
|
contents = (0, import_smithy_client._json)(data);
|
|
1028
1028
|
const response = {
|
|
@@ -1035,7 +1035,7 @@ var de_ListDeadLetterSourceQueuesCommand = /* @__PURE__ */ __name(async (output,
|
|
|
1035
1035
|
if (output.statusCode >= 300) {
|
|
1036
1036
|
return de_CommandError(output, context);
|
|
1037
1037
|
}
|
|
1038
|
-
const data = await
|
|
1038
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1039
1039
|
let contents = {};
|
|
1040
1040
|
contents = (0, import_smithy_client._json)(data);
|
|
1041
1041
|
const response = {
|
|
@@ -1048,7 +1048,7 @@ var de_ListMessageMoveTasksCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
1048
1048
|
if (output.statusCode >= 300) {
|
|
1049
1049
|
return de_CommandError(output, context);
|
|
1050
1050
|
}
|
|
1051
|
-
const data = await
|
|
1051
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1052
1052
|
let contents = {};
|
|
1053
1053
|
contents = (0, import_smithy_client._json)(data);
|
|
1054
1054
|
const response = {
|
|
@@ -1061,7 +1061,7 @@ var de_ListQueuesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1061
1061
|
if (output.statusCode >= 300) {
|
|
1062
1062
|
return de_CommandError(output, context);
|
|
1063
1063
|
}
|
|
1064
|
-
const data = await
|
|
1064
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1065
1065
|
let contents = {};
|
|
1066
1066
|
contents = (0, import_smithy_client._json)(data);
|
|
1067
1067
|
const response = {
|
|
@@ -1074,7 +1074,7 @@ var de_ListQueueTagsCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
1074
1074
|
if (output.statusCode >= 300) {
|
|
1075
1075
|
return de_CommandError(output, context);
|
|
1076
1076
|
}
|
|
1077
|
-
const data = await
|
|
1077
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1078
1078
|
let contents = {};
|
|
1079
1079
|
contents = (0, import_smithy_client._json)(data);
|
|
1080
1080
|
const response = {
|
|
@@ -1097,7 +1097,7 @@ var de_ReceiveMessageCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
1097
1097
|
if (output.statusCode >= 300) {
|
|
1098
1098
|
return de_CommandError(output, context);
|
|
1099
1099
|
}
|
|
1100
|
-
const data = await
|
|
1100
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1101
1101
|
let contents = {};
|
|
1102
1102
|
contents = de_ReceiveMessageResult(data, context);
|
|
1103
1103
|
const response = {
|
|
@@ -1120,7 +1120,7 @@ var de_SendMessageCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1120
1120
|
if (output.statusCode >= 300) {
|
|
1121
1121
|
return de_CommandError(output, context);
|
|
1122
1122
|
}
|
|
1123
|
-
const data = await
|
|
1123
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1124
1124
|
let contents = {};
|
|
1125
1125
|
contents = (0, import_smithy_client._json)(data);
|
|
1126
1126
|
const response = {
|
|
@@ -1133,7 +1133,7 @@ var de_SendMessageBatchCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1133
1133
|
if (output.statusCode >= 300) {
|
|
1134
1134
|
return de_CommandError(output, context);
|
|
1135
1135
|
}
|
|
1136
|
-
const data = await
|
|
1136
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1137
1137
|
let contents = {};
|
|
1138
1138
|
contents = (0, import_smithy_client._json)(data);
|
|
1139
1139
|
const response = {
|
|
@@ -1156,7 +1156,7 @@ var de_StartMessageMoveTaskCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
1156
1156
|
if (output.statusCode >= 300) {
|
|
1157
1157
|
return de_CommandError(output, context);
|
|
1158
1158
|
}
|
|
1159
|
-
const data = await
|
|
1159
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1160
1160
|
let contents = {};
|
|
1161
1161
|
contents = (0, import_smithy_client._json)(data);
|
|
1162
1162
|
const response = {
|
|
@@ -1188,10 +1188,10 @@ var de_UntagQueueCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1188
1188
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1189
1189
|
const parsedOutput = {
|
|
1190
1190
|
...output,
|
|
1191
|
-
body: await
|
|
1191
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
1192
1192
|
};
|
|
1193
1193
|
populateBodyWithQueryCompatibility(parsedOutput, output.headers);
|
|
1194
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1194
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
1195
1195
|
switch (errorCode) {
|
|
1196
1196
|
case "InvalidAddress":
|
|
1197
1197
|
case "com.amazonaws.sqs#InvalidAddress":
|
|
@@ -1872,7 +1872,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
1872
1872
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1873
1873
|
cfId: output.headers["x-amz-cf-id"]
|
|
1874
1874
|
}), "deserializeMetadata");
|
|
1875
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1876
1875
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(SQSServiceException);
|
|
1877
1876
|
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
1878
1877
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -1899,46 +1898,6 @@ function sharedHeaders(operation) {
|
|
|
1899
1898
|
};
|
|
1900
1899
|
}
|
|
1901
1900
|
__name(sharedHeaders, "sharedHeaders");
|
|
1902
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1903
|
-
if (encoded.length) {
|
|
1904
|
-
return JSON.parse(encoded);
|
|
1905
|
-
}
|
|
1906
|
-
return {};
|
|
1907
|
-
}), "parseBody");
|
|
1908
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1909
|
-
const value = await parseBody(errorBody, context);
|
|
1910
|
-
value.message = value.message ?? value.Message;
|
|
1911
|
-
return value;
|
|
1912
|
-
}, "parseErrorBody");
|
|
1913
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1914
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1915
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1916
|
-
let cleanValue = rawValue;
|
|
1917
|
-
if (typeof cleanValue === "number") {
|
|
1918
|
-
cleanValue = cleanValue.toString();
|
|
1919
|
-
}
|
|
1920
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1921
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1922
|
-
}
|
|
1923
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1924
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1925
|
-
}
|
|
1926
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1927
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1928
|
-
}
|
|
1929
|
-
return cleanValue;
|
|
1930
|
-
}, "sanitizeErrorCode");
|
|
1931
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1932
|
-
if (headerKey !== void 0) {
|
|
1933
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1934
|
-
}
|
|
1935
|
-
if (data.code !== void 0) {
|
|
1936
|
-
return sanitizeErrorCode(data.code);
|
|
1937
|
-
}
|
|
1938
|
-
if (data["__type"] !== void 0) {
|
|
1939
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1940
|
-
}
|
|
1941
|
-
}, "loadRestJsonErrorCode");
|
|
1942
1901
|
var populateBodyWithQueryCompatibility = /* @__PURE__ */ __name((parsedOutput, headers) => {
|
|
1943
1902
|
const queryErrorHeader = headers["x-amzn-query-error"];
|
|
1944
1903
|
if (parsedOutput.body !== void 0 && queryErrorHeader != null) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _toNum, _toStr } from "@aws-sdk/core";
|
|
1
|
+
import { _toNum, _toStr, 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, expectString as __expectString, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
4
|
import { BatchEntryIdsNotDistinct, BatchRequestTooLong, EmptyBatchRequest, InvalidAddress, InvalidAttributeName, InvalidAttributeValue, InvalidBatchEntryId, InvalidIdFormat, InvalidMessageContents, InvalidSecurity, KmsAccessDenied, KmsDisabled, KmsInvalidKeyUsage, KmsInvalidState, KmsNotFound, KmsOptInRequired, KmsThrottled, MessageNotInflight, OverLimit, PurgeQueueInProgress, QueueDeletedRecently, QueueDoesNotExist, QueueNameExists, ReceiptHandleIsInvalid, RequestThrottled, ResourceNotFoundException, TooManyEntriesInBatchRequest, UnsupportedOperation, } from "../models/models_0";
|
|
@@ -1147,46 +1147,6 @@ function sharedHeaders(operation) {
|
|
|
1147
1147
|
"x-amz-target": `AmazonSQS.${operation}`,
|
|
1148
1148
|
};
|
|
1149
1149
|
}
|
|
1150
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1151
|
-
if (encoded.length) {
|
|
1152
|
-
return JSON.parse(encoded);
|
|
1153
|
-
}
|
|
1154
|
-
return {};
|
|
1155
|
-
});
|
|
1156
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1157
|
-
const value = await parseBody(errorBody, context);
|
|
1158
|
-
value.message = value.message ?? value.Message;
|
|
1159
|
-
return value;
|
|
1160
|
-
};
|
|
1161
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1162
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1163
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1164
|
-
let cleanValue = rawValue;
|
|
1165
|
-
if (typeof cleanValue === "number") {
|
|
1166
|
-
cleanValue = cleanValue.toString();
|
|
1167
|
-
}
|
|
1168
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1169
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1170
|
-
}
|
|
1171
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1172
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1173
|
-
}
|
|
1174
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1175
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1176
|
-
}
|
|
1177
|
-
return cleanValue;
|
|
1178
|
-
};
|
|
1179
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1180
|
-
if (headerKey !== undefined) {
|
|
1181
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1182
|
-
}
|
|
1183
|
-
if (data.code !== undefined) {
|
|
1184
|
-
return sanitizeErrorCode(data.code);
|
|
1185
|
-
}
|
|
1186
|
-
if (data["__type"] !== undefined) {
|
|
1187
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1188
|
-
}
|
|
1189
|
-
};
|
|
1190
1150
|
const populateBodyWithQueryCompatibility = (parsedOutput, headers) => {
|
|
1191
1151
|
const queryErrorHeader = headers["x-amzn-query-error"];
|
|
1192
1152
|
if (parsedOutput.body !== undefined && queryErrorHeader != null) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sqs",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sqs Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
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-sqs",
|
|
@@ -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.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",
|