@aws-sdk/client-osis 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 +14 -54
- package/dist-es/protocols/Aws_restJson1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -208,6 +208,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
208
208
|
var import_types = require("@smithy/types");
|
|
209
209
|
|
|
210
210
|
// src/protocols/Aws_restJson1.ts
|
|
211
|
+
var import_core2 = require("@aws-sdk/core");
|
|
211
212
|
|
|
212
213
|
|
|
213
214
|
|
|
@@ -581,7 +582,7 @@ var de_CreatePipelineCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
581
582
|
const contents = (0, import_smithy_client.map)({
|
|
582
583
|
$metadata: deserializeMetadata(output)
|
|
583
584
|
});
|
|
584
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
585
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
585
586
|
const doc = (0, import_smithy_client.take)(data, {
|
|
586
587
|
Pipeline: (_) => de_Pipeline(_, context)
|
|
587
588
|
});
|
|
@@ -605,7 +606,7 @@ var de_GetPipelineCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
605
606
|
const contents = (0, import_smithy_client.map)({
|
|
606
607
|
$metadata: deserializeMetadata(output)
|
|
607
608
|
});
|
|
608
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
609
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
609
610
|
const doc = (0, import_smithy_client.take)(data, {
|
|
610
611
|
Pipeline: (_) => de_Pipeline(_, context)
|
|
611
612
|
});
|
|
@@ -619,7 +620,7 @@ var de_GetPipelineBlueprintCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
619
620
|
const contents = (0, import_smithy_client.map)({
|
|
620
621
|
$metadata: deserializeMetadata(output)
|
|
621
622
|
});
|
|
622
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
623
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
623
624
|
const doc = (0, import_smithy_client.take)(data, {
|
|
624
625
|
Blueprint: import_smithy_client._json
|
|
625
626
|
});
|
|
@@ -633,7 +634,7 @@ var de_GetPipelineChangeProgressCommand = /* @__PURE__ */ __name(async (output,
|
|
|
633
634
|
const contents = (0, import_smithy_client.map)({
|
|
634
635
|
$metadata: deserializeMetadata(output)
|
|
635
636
|
});
|
|
636
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
637
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
637
638
|
const doc = (0, import_smithy_client.take)(data, {
|
|
638
639
|
ChangeProgressStatuses: (_) => de_ChangeProgressStatusList(_, context)
|
|
639
640
|
});
|
|
@@ -647,7 +648,7 @@ var de_ListPipelineBlueprintsCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
647
648
|
const contents = (0, import_smithy_client.map)({
|
|
648
649
|
$metadata: deserializeMetadata(output)
|
|
649
650
|
});
|
|
650
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
651
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
651
652
|
const doc = (0, import_smithy_client.take)(data, {
|
|
652
653
|
Blueprints: import_smithy_client._json
|
|
653
654
|
});
|
|
@@ -661,7 +662,7 @@ var de_ListPipelinesCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
661
662
|
const contents = (0, import_smithy_client.map)({
|
|
662
663
|
$metadata: deserializeMetadata(output)
|
|
663
664
|
});
|
|
664
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
665
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
665
666
|
const doc = (0, import_smithy_client.take)(data, {
|
|
666
667
|
NextToken: import_smithy_client.expectString,
|
|
667
668
|
Pipelines: (_) => de_PipelineSummaryList(_, context)
|
|
@@ -676,7 +677,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
676
677
|
const contents = (0, import_smithy_client.map)({
|
|
677
678
|
$metadata: deserializeMetadata(output)
|
|
678
679
|
});
|
|
679
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
680
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
680
681
|
const doc = (0, import_smithy_client.take)(data, {
|
|
681
682
|
Tags: import_smithy_client._json
|
|
682
683
|
});
|
|
@@ -690,7 +691,7 @@ var de_StartPipelineCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
690
691
|
const contents = (0, import_smithy_client.map)({
|
|
691
692
|
$metadata: deserializeMetadata(output)
|
|
692
693
|
});
|
|
693
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
694
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
694
695
|
const doc = (0, import_smithy_client.take)(data, {
|
|
695
696
|
Pipeline: (_) => de_Pipeline(_, context)
|
|
696
697
|
});
|
|
@@ -704,7 +705,7 @@ var de_StopPipelineCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
704
705
|
const contents = (0, import_smithy_client.map)({
|
|
705
706
|
$metadata: deserializeMetadata(output)
|
|
706
707
|
});
|
|
707
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
708
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
708
709
|
const doc = (0, import_smithy_client.take)(data, {
|
|
709
710
|
Pipeline: (_) => de_Pipeline(_, context)
|
|
710
711
|
});
|
|
@@ -738,7 +739,7 @@ var de_UpdatePipelineCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
738
739
|
const contents = (0, import_smithy_client.map)({
|
|
739
740
|
$metadata: deserializeMetadata(output)
|
|
740
741
|
});
|
|
741
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
742
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
742
743
|
const doc = (0, import_smithy_client.take)(data, {
|
|
743
744
|
Pipeline: (_) => de_Pipeline(_, context)
|
|
744
745
|
});
|
|
@@ -752,7 +753,7 @@ var de_ValidatePipelineCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
752
753
|
const contents = (0, import_smithy_client.map)({
|
|
753
754
|
$metadata: deserializeMetadata(output)
|
|
754
755
|
});
|
|
755
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
756
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
756
757
|
const doc = (0, import_smithy_client.take)(data, {
|
|
757
758
|
Errors: import_smithy_client._json,
|
|
758
759
|
isValid: import_smithy_client.expectBoolean
|
|
@@ -763,9 +764,9 @@ var de_ValidatePipelineCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
763
764
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
764
765
|
const parsedOutput = {
|
|
765
766
|
...output,
|
|
766
|
-
body: await
|
|
767
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
767
768
|
};
|
|
768
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
769
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
769
770
|
switch (errorCode) {
|
|
770
771
|
case "AccessDeniedException":
|
|
771
772
|
case "com.amazonaws.osis#AccessDeniedException":
|
|
@@ -978,53 +979,12 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
978
979
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
979
980
|
cfId: output.headers["x-amz-cf-id"]
|
|
980
981
|
}), "deserializeMetadata");
|
|
981
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
982
982
|
var _A = "Arn";
|
|
983
983
|
var _MR = "MaxResults";
|
|
984
984
|
var _NT = "NextToken";
|
|
985
985
|
var _a = "arn";
|
|
986
986
|
var _mR = "maxResults";
|
|
987
987
|
var _nT = "nextToken";
|
|
988
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
989
|
-
if (encoded.length) {
|
|
990
|
-
return JSON.parse(encoded);
|
|
991
|
-
}
|
|
992
|
-
return {};
|
|
993
|
-
}), "parseBody");
|
|
994
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
995
|
-
const value = await parseBody(errorBody, context);
|
|
996
|
-
value.message = value.message ?? value.Message;
|
|
997
|
-
return value;
|
|
998
|
-
}, "parseErrorBody");
|
|
999
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1000
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1001
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1002
|
-
let cleanValue = rawValue;
|
|
1003
|
-
if (typeof cleanValue === "number") {
|
|
1004
|
-
cleanValue = cleanValue.toString();
|
|
1005
|
-
}
|
|
1006
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1007
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1008
|
-
}
|
|
1009
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1010
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1011
|
-
}
|
|
1012
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1013
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1014
|
-
}
|
|
1015
|
-
return cleanValue;
|
|
1016
|
-
}, "sanitizeErrorCode");
|
|
1017
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1018
|
-
if (headerKey !== void 0) {
|
|
1019
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1020
|
-
}
|
|
1021
|
-
if (data.code !== void 0) {
|
|
1022
|
-
return sanitizeErrorCode(data.code);
|
|
1023
|
-
}
|
|
1024
|
-
if (data["__type"] !== void 0) {
|
|
1025
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1026
|
-
}
|
|
1027
|
-
}, "loadRestJsonErrorCode");
|
|
1028
988
|
|
|
1029
989
|
// src/commands/CreatePipelineCommand.ts
|
|
1030
990
|
var _CreatePipelineCommand = class _CreatePipelineCommand 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, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { AccessDeniedException, ConflictException, InternalException, InvalidPaginationTokenException, LimitExceededException, ResourceAlreadyExistsException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
|
|
@@ -597,43 +598,3 @@ const _NT = "NextToken";
|
|
|
597
598
|
const _a = "arn";
|
|
598
599
|
const _mR = "maxResults";
|
|
599
600
|
const _nT = "nextToken";
|
|
600
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
601
|
-
if (encoded.length) {
|
|
602
|
-
return JSON.parse(encoded);
|
|
603
|
-
}
|
|
604
|
-
return {};
|
|
605
|
-
});
|
|
606
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
607
|
-
const value = await parseBody(errorBody, context);
|
|
608
|
-
value.message = value.message ?? value.Message;
|
|
609
|
-
return value;
|
|
610
|
-
};
|
|
611
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
612
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
613
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
614
|
-
let cleanValue = rawValue;
|
|
615
|
-
if (typeof cleanValue === "number") {
|
|
616
|
-
cleanValue = cleanValue.toString();
|
|
617
|
-
}
|
|
618
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
619
|
-
cleanValue = cleanValue.split(",")[0];
|
|
620
|
-
}
|
|
621
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
622
|
-
cleanValue = cleanValue.split(":")[0];
|
|
623
|
-
}
|
|
624
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
625
|
-
cleanValue = cleanValue.split("#")[1];
|
|
626
|
-
}
|
|
627
|
-
return cleanValue;
|
|
628
|
-
};
|
|
629
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
630
|
-
if (headerKey !== undefined) {
|
|
631
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
632
|
-
}
|
|
633
|
-
if (data.code !== undefined) {
|
|
634
|
-
return sanitizeErrorCode(data.code);
|
|
635
|
-
}
|
|
636
|
-
if (data["__type"] !== undefined) {
|
|
637
|
-
return sanitizeErrorCode(data["__type"]);
|
|
638
|
-
}
|
|
639
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-osis",
|
|
3
3
|
"description": "AWS SDK for JavaScript Osis 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-osis",
|
|
@@ -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",
|