@aws-sdk/client-repostspace 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 +7 -47
- package/dist-es/protocols/Aws_restJson1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -424,6 +424,7 @@ var UpdateSpaceInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
|
424
424
|
}), "UpdateSpaceInputFilterSensitiveLog");
|
|
425
425
|
|
|
426
426
|
// src/protocols/Aws_restJson1.ts
|
|
427
|
+
var import_core2 = require("@aws-sdk/core");
|
|
427
428
|
|
|
428
429
|
|
|
429
430
|
var se_CreateSpaceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
@@ -580,7 +581,7 @@ var de_CreateSpaceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
580
581
|
const contents = (0, import_smithy_client.map)({
|
|
581
582
|
$metadata: deserializeMetadata(output)
|
|
582
583
|
});
|
|
583
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
584
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
584
585
|
const doc = (0, import_smithy_client.take)(data, {
|
|
585
586
|
spaceId: import_smithy_client.expectString
|
|
586
587
|
});
|
|
@@ -614,7 +615,7 @@ var de_GetSpaceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
614
615
|
const contents = (0, import_smithy_client.map)({
|
|
615
616
|
$metadata: deserializeMetadata(output)
|
|
616
617
|
});
|
|
617
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
618
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
618
619
|
const doc = (0, import_smithy_client.take)(data, {
|
|
619
620
|
arn: import_smithy_client.expectString,
|
|
620
621
|
clientId: import_smithy_client.expectString,
|
|
@@ -647,7 +648,7 @@ var de_ListSpacesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
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
|
nextToken: import_smithy_client.expectString,
|
|
653
654
|
spaces: (_) => de_SpacesList(_, context)
|
|
@@ -662,7 +663,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
662
663
|
const contents = (0, import_smithy_client.map)({
|
|
663
664
|
$metadata: deserializeMetadata(output)
|
|
664
665
|
});
|
|
665
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
666
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
666
667
|
const doc = (0, import_smithy_client.take)(data, {
|
|
667
668
|
tags: import_smithy_client._json
|
|
668
669
|
});
|
|
@@ -722,9 +723,9 @@ var de_UpdateSpaceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
722
723
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
723
724
|
const parsedOutput = {
|
|
724
725
|
...output,
|
|
725
|
-
body: await
|
|
726
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
726
727
|
};
|
|
727
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
728
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
728
729
|
switch (errorCode) {
|
|
729
730
|
case "AccessDeniedException":
|
|
730
731
|
case "com.amazonaws.repostspace#AccessDeniedException":
|
|
@@ -896,52 +897,11 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
896
897
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
897
898
|
cfId: output.headers["x-amz-cf-id"]
|
|
898
899
|
}), "deserializeMetadata");
|
|
899
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
900
900
|
var _mR = "maxResults";
|
|
901
901
|
var _nT = "nextToken";
|
|
902
902
|
var _rAS = "retryAfterSeconds";
|
|
903
903
|
var _ra = "retry-after";
|
|
904
904
|
var _tK = "tagKeys";
|
|
905
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
906
|
-
if (encoded.length) {
|
|
907
|
-
return JSON.parse(encoded);
|
|
908
|
-
}
|
|
909
|
-
return {};
|
|
910
|
-
}), "parseBody");
|
|
911
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
912
|
-
const value = await parseBody(errorBody, context);
|
|
913
|
-
value.message = value.message ?? value.Message;
|
|
914
|
-
return value;
|
|
915
|
-
}, "parseErrorBody");
|
|
916
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
917
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
918
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
919
|
-
let cleanValue = rawValue;
|
|
920
|
-
if (typeof cleanValue === "number") {
|
|
921
|
-
cleanValue = cleanValue.toString();
|
|
922
|
-
}
|
|
923
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
924
|
-
cleanValue = cleanValue.split(",")[0];
|
|
925
|
-
}
|
|
926
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
927
|
-
cleanValue = cleanValue.split(":")[0];
|
|
928
|
-
}
|
|
929
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
930
|
-
cleanValue = cleanValue.split("#")[1];
|
|
931
|
-
}
|
|
932
|
-
return cleanValue;
|
|
933
|
-
}, "sanitizeErrorCode");
|
|
934
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
935
|
-
if (headerKey !== void 0) {
|
|
936
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
937
|
-
}
|
|
938
|
-
if (data.code !== void 0) {
|
|
939
|
-
return sanitizeErrorCode(data.code);
|
|
940
|
-
}
|
|
941
|
-
if (data["__type"] !== void 0) {
|
|
942
|
-
return sanitizeErrorCode(data["__type"]);
|
|
943
|
-
}
|
|
944
|
-
}, "loadRestJsonErrorCode");
|
|
945
905
|
|
|
946
906
|
// src/commands/CreateSpaceCommand.ts
|
|
947
907
|
var _CreateSpaceCommand = class _CreateSpaceCommand 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, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
@@ -477,43 +478,3 @@ const _nT = "nextToken";
|
|
|
477
478
|
const _rAS = "retryAfterSeconds";
|
|
478
479
|
const _ra = "retry-after";
|
|
479
480
|
const _tK = "tagKeys";
|
|
480
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
481
|
-
if (encoded.length) {
|
|
482
|
-
return JSON.parse(encoded);
|
|
483
|
-
}
|
|
484
|
-
return {};
|
|
485
|
-
});
|
|
486
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
487
|
-
const value = await parseBody(errorBody, context);
|
|
488
|
-
value.message = value.message ?? value.Message;
|
|
489
|
-
return value;
|
|
490
|
-
};
|
|
491
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
492
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
493
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
494
|
-
let cleanValue = rawValue;
|
|
495
|
-
if (typeof cleanValue === "number") {
|
|
496
|
-
cleanValue = cleanValue.toString();
|
|
497
|
-
}
|
|
498
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
499
|
-
cleanValue = cleanValue.split(",")[0];
|
|
500
|
-
}
|
|
501
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
502
|
-
cleanValue = cleanValue.split(":")[0];
|
|
503
|
-
}
|
|
504
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
505
|
-
cleanValue = cleanValue.split("#")[1];
|
|
506
|
-
}
|
|
507
|
-
return cleanValue;
|
|
508
|
-
};
|
|
509
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
510
|
-
if (headerKey !== undefined) {
|
|
511
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
512
|
-
}
|
|
513
|
-
if (data.code !== undefined) {
|
|
514
|
-
return sanitizeErrorCode(data.code);
|
|
515
|
-
}
|
|
516
|
-
if (data["__type"] !== undefined) {
|
|
517
|
-
return sanitizeErrorCode(data["__type"]);
|
|
518
|
-
}
|
|
519
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-repostspace",
|
|
3
3
|
"description": "AWS SDK for JavaScript Repostspace 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-repostspace",
|
|
@@ -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",
|