@aws-sdk/client-pipes 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 +11 -51
- package/dist-es/protocols/Aws_restJson1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -762,6 +762,7 @@ var TagResourceRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
|
762
762
|
}), "TagResourceRequestFilterSensitiveLog");
|
|
763
763
|
|
|
764
764
|
// src/protocols/Aws_restJson1.ts
|
|
765
|
+
var import_core2 = require("@aws-sdk/core");
|
|
765
766
|
|
|
766
767
|
|
|
767
768
|
var se_CreatePipeCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
@@ -914,7 +915,7 @@ var de_CreatePipeCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
914
915
|
const contents = (0, import_smithy_client.map)({
|
|
915
916
|
$metadata: deserializeMetadata(output)
|
|
916
917
|
});
|
|
917
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
918
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
918
919
|
const doc = (0, import_smithy_client.take)(data, {
|
|
919
920
|
Arn: import_smithy_client.expectString,
|
|
920
921
|
CreationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
|
|
@@ -933,7 +934,7 @@ var de_DeletePipeCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
933
934
|
const contents = (0, import_smithy_client.map)({
|
|
934
935
|
$metadata: deserializeMetadata(output)
|
|
935
936
|
});
|
|
936
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
937
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
937
938
|
const doc = (0, import_smithy_client.take)(data, {
|
|
938
939
|
Arn: import_smithy_client.expectString,
|
|
939
940
|
CreationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
|
|
@@ -952,7 +953,7 @@ var de_DescribePipeCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
952
953
|
const contents = (0, import_smithy_client.map)({
|
|
953
954
|
$metadata: deserializeMetadata(output)
|
|
954
955
|
});
|
|
955
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
956
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
956
957
|
const doc = (0, import_smithy_client.take)(data, {
|
|
957
958
|
Arn: import_smithy_client.expectString,
|
|
958
959
|
CreationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
|
|
@@ -982,7 +983,7 @@ var de_ListPipesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
982
983
|
const contents = (0, import_smithy_client.map)({
|
|
983
984
|
$metadata: deserializeMetadata(output)
|
|
984
985
|
});
|
|
985
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
986
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
986
987
|
const doc = (0, import_smithy_client.take)(data, {
|
|
987
988
|
NextToken: import_smithy_client.expectString,
|
|
988
989
|
Pipes: (_) => de_PipeList(_, context)
|
|
@@ -997,7 +998,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
997
998
|
const contents = (0, import_smithy_client.map)({
|
|
998
999
|
$metadata: deserializeMetadata(output)
|
|
999
1000
|
});
|
|
1000
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1001
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1001
1002
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1002
1003
|
tags: import_smithy_client._json
|
|
1003
1004
|
});
|
|
@@ -1011,7 +1012,7 @@ var de_StartPipeCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1011
1012
|
const contents = (0, import_smithy_client.map)({
|
|
1012
1013
|
$metadata: deserializeMetadata(output)
|
|
1013
1014
|
});
|
|
1014
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1015
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1015
1016
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1016
1017
|
Arn: import_smithy_client.expectString,
|
|
1017
1018
|
CreationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
|
|
@@ -1030,7 +1031,7 @@ var de_StopPipeCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1030
1031
|
const contents = (0, import_smithy_client.map)({
|
|
1031
1032
|
$metadata: deserializeMetadata(output)
|
|
1032
1033
|
});
|
|
1033
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1034
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1034
1035
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1035
1036
|
Arn: import_smithy_client.expectString,
|
|
1036
1037
|
CreationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
|
|
@@ -1069,7 +1070,7 @@ var de_UpdatePipeCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1069
1070
|
const contents = (0, import_smithy_client.map)({
|
|
1070
1071
|
$metadata: deserializeMetadata(output)
|
|
1071
1072
|
});
|
|
1072
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1073
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1073
1074
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1074
1075
|
Arn: import_smithy_client.expectString,
|
|
1075
1076
|
CreationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
|
|
@@ -1084,9 +1085,9 @@ var de_UpdatePipeCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1084
1085
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1085
1086
|
const parsedOutput = {
|
|
1086
1087
|
...output,
|
|
1087
|
-
body: await
|
|
1088
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
1088
1089
|
};
|
|
1089
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1090
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
1090
1091
|
switch (errorCode) {
|
|
1091
1092
|
case "ConflictException":
|
|
1092
1093
|
case "com.amazonaws.pipes#ConflictException":
|
|
@@ -1283,7 +1284,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
1283
1284
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1284
1285
|
cfId: output.headers["x-amz-cf-id"]
|
|
1285
1286
|
}), "deserializeMetadata");
|
|
1286
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1287
1287
|
var _CS = "CurrentState";
|
|
1288
1288
|
var _DS = "DesiredState";
|
|
1289
1289
|
var _L = "Limit";
|
|
@@ -1294,46 +1294,6 @@ var _TP = "TargetPrefix";
|
|
|
1294
1294
|
var _rAS = "retryAfterSeconds";
|
|
1295
1295
|
var _ra = "retry-after";
|
|
1296
1296
|
var _tK = "tagKeys";
|
|
1297
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1298
|
-
if (encoded.length) {
|
|
1299
|
-
return JSON.parse(encoded);
|
|
1300
|
-
}
|
|
1301
|
-
return {};
|
|
1302
|
-
}), "parseBody");
|
|
1303
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1304
|
-
const value = await parseBody(errorBody, context);
|
|
1305
|
-
value.message = value.message ?? value.Message;
|
|
1306
|
-
return value;
|
|
1307
|
-
}, "parseErrorBody");
|
|
1308
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1309
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1310
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1311
|
-
let cleanValue = rawValue;
|
|
1312
|
-
if (typeof cleanValue === "number") {
|
|
1313
|
-
cleanValue = cleanValue.toString();
|
|
1314
|
-
}
|
|
1315
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1316
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1317
|
-
}
|
|
1318
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1319
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1320
|
-
}
|
|
1321
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1322
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1323
|
-
}
|
|
1324
|
-
return cleanValue;
|
|
1325
|
-
}, "sanitizeErrorCode");
|
|
1326
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1327
|
-
if (headerKey !== void 0) {
|
|
1328
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1329
|
-
}
|
|
1330
|
-
if (data.code !== void 0) {
|
|
1331
|
-
return sanitizeErrorCode(data.code);
|
|
1332
|
-
}
|
|
1333
|
-
if (data["__type"] !== void 0) {
|
|
1334
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1335
|
-
}
|
|
1336
|
-
}, "loadRestJsonErrorCode");
|
|
1337
1297
|
|
|
1338
1298
|
// src/commands/CreatePipeCommand.ts
|
|
1339
1299
|
var _CreatePipeCommand = class _CreatePipeCommand 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 { requestBuilder as rb } from "@smithy/core";
|
|
2
3
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { ConflictException, InternalException, NotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
@@ -533,43 +534,3 @@ const _TP = "TargetPrefix";
|
|
|
533
534
|
const _rAS = "retryAfterSeconds";
|
|
534
535
|
const _ra = "retry-after";
|
|
535
536
|
const _tK = "tagKeys";
|
|
536
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
537
|
-
if (encoded.length) {
|
|
538
|
-
return JSON.parse(encoded);
|
|
539
|
-
}
|
|
540
|
-
return {};
|
|
541
|
-
});
|
|
542
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
543
|
-
const value = await parseBody(errorBody, context);
|
|
544
|
-
value.message = value.message ?? value.Message;
|
|
545
|
-
return value;
|
|
546
|
-
};
|
|
547
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
548
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
549
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
550
|
-
let cleanValue = rawValue;
|
|
551
|
-
if (typeof cleanValue === "number") {
|
|
552
|
-
cleanValue = cleanValue.toString();
|
|
553
|
-
}
|
|
554
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
555
|
-
cleanValue = cleanValue.split(",")[0];
|
|
556
|
-
}
|
|
557
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
558
|
-
cleanValue = cleanValue.split(":")[0];
|
|
559
|
-
}
|
|
560
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
561
|
-
cleanValue = cleanValue.split("#")[1];
|
|
562
|
-
}
|
|
563
|
-
return cleanValue;
|
|
564
|
-
};
|
|
565
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
566
|
-
if (headerKey !== undefined) {
|
|
567
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
568
|
-
}
|
|
569
|
-
if (data.code !== undefined) {
|
|
570
|
-
return sanitizeErrorCode(data.code);
|
|
571
|
-
}
|
|
572
|
-
if (data["__type"] !== undefined) {
|
|
573
|
-
return sanitizeErrorCode(data["__type"]);
|
|
574
|
-
}
|
|
575
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-pipes",
|
|
3
3
|
"description": "AWS SDK for JavaScript Pipes 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-pipes",
|
|
@@ -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",
|