@aws-sdk/client-artifact 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.
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.de_PutAccountSettingsCommand = exports.de_ListReportsCommand = exports.de_GetTermForReportCommand = exports.de_GetReportMetadataCommand = exports.de_GetReportCommand = exports.de_GetAccountSettingsCommand = exports.se_PutAccountSettingsCommand = exports.se_ListReportsCommand = exports.se_GetTermForReportCommand = exports.se_GetReportMetadataCommand = exports.se_GetReportCommand = exports.se_GetAccountSettingsCommand = void 0;
|
|
4
|
-
const core_1 = require("@
|
|
4
|
+
const core_1 = require("@aws-sdk/core");
|
|
5
|
+
const core_2 = require("@smithy/core");
|
|
5
6
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
7
|
const ArtifactServiceException_1 = require("../models/ArtifactServiceException");
|
|
7
8
|
const models_0_1 = require("../models/models_0");
|
|
8
9
|
const se_GetAccountSettingsCommand = async (input, context) => {
|
|
9
|
-
const b = (0,
|
|
10
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
10
11
|
const headers = {
|
|
11
12
|
"content-type": "application/json",
|
|
12
13
|
};
|
|
@@ -18,7 +19,7 @@ const se_GetAccountSettingsCommand = async (input, context) => {
|
|
|
18
19
|
};
|
|
19
20
|
exports.se_GetAccountSettingsCommand = se_GetAccountSettingsCommand;
|
|
20
21
|
const se_GetReportCommand = async (input, context) => {
|
|
21
|
-
const b = (0,
|
|
22
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
22
23
|
const headers = {};
|
|
23
24
|
b.bp("/v1/report/get");
|
|
24
25
|
const query = (0, smithy_client_1.map)({
|
|
@@ -32,7 +33,7 @@ const se_GetReportCommand = async (input, context) => {
|
|
|
32
33
|
};
|
|
33
34
|
exports.se_GetReportCommand = se_GetReportCommand;
|
|
34
35
|
const se_GetReportMetadataCommand = async (input, context) => {
|
|
35
|
-
const b = (0,
|
|
36
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
36
37
|
const headers = {};
|
|
37
38
|
b.bp("/v1/report/getMetadata");
|
|
38
39
|
const query = (0, smithy_client_1.map)({
|
|
@@ -45,7 +46,7 @@ const se_GetReportMetadataCommand = async (input, context) => {
|
|
|
45
46
|
};
|
|
46
47
|
exports.se_GetReportMetadataCommand = se_GetReportMetadataCommand;
|
|
47
48
|
const se_GetTermForReportCommand = async (input, context) => {
|
|
48
|
-
const b = (0,
|
|
49
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
49
50
|
const headers = {};
|
|
50
51
|
b.bp("/v1/report/getTermForReport");
|
|
51
52
|
const query = (0, smithy_client_1.map)({
|
|
@@ -58,7 +59,7 @@ const se_GetTermForReportCommand = async (input, context) => {
|
|
|
58
59
|
};
|
|
59
60
|
exports.se_GetTermForReportCommand = se_GetTermForReportCommand;
|
|
60
61
|
const se_ListReportsCommand = async (input, context) => {
|
|
61
|
-
const b = (0,
|
|
62
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
62
63
|
const headers = {};
|
|
63
64
|
b.bp("/v1/report/list");
|
|
64
65
|
const query = (0, smithy_client_1.map)({
|
|
@@ -71,7 +72,7 @@ const se_ListReportsCommand = async (input, context) => {
|
|
|
71
72
|
};
|
|
72
73
|
exports.se_ListReportsCommand = se_ListReportsCommand;
|
|
73
74
|
const se_PutAccountSettingsCommand = async (input, context) => {
|
|
74
|
-
const b = (0,
|
|
75
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
75
76
|
const headers = {
|
|
76
77
|
"content-type": "application/json",
|
|
77
78
|
};
|
|
@@ -91,7 +92,7 @@ const de_GetAccountSettingsCommand = async (output, context) => {
|
|
|
91
92
|
const contents = (0, smithy_client_1.map)({
|
|
92
93
|
$metadata: deserializeMetadata(output),
|
|
93
94
|
});
|
|
94
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await
|
|
95
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
95
96
|
const doc = (0, smithy_client_1.take)(data, {
|
|
96
97
|
accountSettings: smithy_client_1._json,
|
|
97
98
|
});
|
|
@@ -106,7 +107,7 @@ const de_GetReportCommand = async (output, context) => {
|
|
|
106
107
|
const contents = (0, smithy_client_1.map)({
|
|
107
108
|
$metadata: deserializeMetadata(output),
|
|
108
109
|
});
|
|
109
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await
|
|
110
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
110
111
|
const doc = (0, smithy_client_1.take)(data, {
|
|
111
112
|
documentPresignedUrl: smithy_client_1.expectString,
|
|
112
113
|
});
|
|
@@ -121,7 +122,7 @@ const de_GetReportMetadataCommand = async (output, context) => {
|
|
|
121
122
|
const contents = (0, smithy_client_1.map)({
|
|
122
123
|
$metadata: deserializeMetadata(output),
|
|
123
124
|
});
|
|
124
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await
|
|
125
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
125
126
|
const doc = (0, smithy_client_1.take)(data, {
|
|
126
127
|
reportDetails: (_) => de_ReportDetail(_, context),
|
|
127
128
|
});
|
|
@@ -136,7 +137,7 @@ const de_GetTermForReportCommand = async (output, context) => {
|
|
|
136
137
|
const contents = (0, smithy_client_1.map)({
|
|
137
138
|
$metadata: deserializeMetadata(output),
|
|
138
139
|
});
|
|
139
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await
|
|
140
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
140
141
|
const doc = (0, smithy_client_1.take)(data, {
|
|
141
142
|
documentPresignedUrl: smithy_client_1.expectString,
|
|
142
143
|
termToken: smithy_client_1.expectString,
|
|
@@ -152,7 +153,7 @@ const de_ListReportsCommand = async (output, context) => {
|
|
|
152
153
|
const contents = (0, smithy_client_1.map)({
|
|
153
154
|
$metadata: deserializeMetadata(output),
|
|
154
155
|
});
|
|
155
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await
|
|
156
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
156
157
|
const doc = (0, smithy_client_1.take)(data, {
|
|
157
158
|
nextToken: smithy_client_1.expectString,
|
|
158
159
|
reports: (_) => de_ReportsList(_, context),
|
|
@@ -168,7 +169,7 @@ const de_PutAccountSettingsCommand = async (output, context) => {
|
|
|
168
169
|
const contents = (0, smithy_client_1.map)({
|
|
169
170
|
$metadata: deserializeMetadata(output),
|
|
170
171
|
});
|
|
171
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await
|
|
172
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
172
173
|
const doc = (0, smithy_client_1.take)(data, {
|
|
173
174
|
accountSettings: smithy_client_1._json,
|
|
174
175
|
});
|
|
@@ -179,9 +180,9 @@ exports.de_PutAccountSettingsCommand = de_PutAccountSettingsCommand;
|
|
|
179
180
|
const de_CommandError = async (output, context) => {
|
|
180
181
|
const parsedOutput = {
|
|
181
182
|
...output,
|
|
182
|
-
body: await
|
|
183
|
+
body: await (0, core_1.parseJsonErrorBody)(output.body, context),
|
|
183
184
|
};
|
|
184
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
185
|
+
const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
185
186
|
switch (errorCode) {
|
|
186
187
|
case "AccessDeniedException":
|
|
187
188
|
case "com.amazonaws.artifact#AccessDeniedException":
|
|
@@ -390,43 +391,3 @@ const _rI = "reportId";
|
|
|
390
391
|
const _rV = "reportVersion";
|
|
391
392
|
const _ra = "retry-after";
|
|
392
393
|
const _tT = "termToken";
|
|
393
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
394
|
-
if (encoded.length) {
|
|
395
|
-
return JSON.parse(encoded);
|
|
396
|
-
}
|
|
397
|
-
return {};
|
|
398
|
-
});
|
|
399
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
400
|
-
const value = await parseBody(errorBody, context);
|
|
401
|
-
value.message = value.message ?? value.Message;
|
|
402
|
-
return value;
|
|
403
|
-
};
|
|
404
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
405
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
406
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
407
|
-
let cleanValue = rawValue;
|
|
408
|
-
if (typeof cleanValue === "number") {
|
|
409
|
-
cleanValue = cleanValue.toString();
|
|
410
|
-
}
|
|
411
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
412
|
-
cleanValue = cleanValue.split(",")[0];
|
|
413
|
-
}
|
|
414
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
415
|
-
cleanValue = cleanValue.split(":")[0];
|
|
416
|
-
}
|
|
417
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
418
|
-
cleanValue = cleanValue.split("#")[1];
|
|
419
|
-
}
|
|
420
|
-
return cleanValue;
|
|
421
|
-
};
|
|
422
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
423
|
-
if (headerKey !== undefined) {
|
|
424
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
425
|
-
}
|
|
426
|
-
if (data.code !== undefined) {
|
|
427
|
-
return sanitizeErrorCode(data.code);
|
|
428
|
-
}
|
|
429
|
-
if (data["__type"] !== undefined) {
|
|
430
|
-
return sanitizeErrorCode(data["__type"]);
|
|
431
|
-
}
|
|
432
|
-
};
|
|
@@ -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, 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 { ArtifactServiceException as __BaseException } from "../models/ArtifactServiceException";
|
|
@@ -375,43 +376,3 @@ const _rI = "reportId";
|
|
|
375
376
|
const _rV = "reportVersion";
|
|
376
377
|
const _ra = "retry-after";
|
|
377
378
|
const _tT = "termToken";
|
|
378
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
379
|
-
if (encoded.length) {
|
|
380
|
-
return JSON.parse(encoded);
|
|
381
|
-
}
|
|
382
|
-
return {};
|
|
383
|
-
});
|
|
384
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
385
|
-
const value = await parseBody(errorBody, context);
|
|
386
|
-
value.message = value.message ?? value.Message;
|
|
387
|
-
return value;
|
|
388
|
-
};
|
|
389
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
390
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
391
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
392
|
-
let cleanValue = rawValue;
|
|
393
|
-
if (typeof cleanValue === "number") {
|
|
394
|
-
cleanValue = cleanValue.toString();
|
|
395
|
-
}
|
|
396
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
397
|
-
cleanValue = cleanValue.split(",")[0];
|
|
398
|
-
}
|
|
399
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
400
|
-
cleanValue = cleanValue.split(":")[0];
|
|
401
|
-
}
|
|
402
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
403
|
-
cleanValue = cleanValue.split("#")[1];
|
|
404
|
-
}
|
|
405
|
-
return cleanValue;
|
|
406
|
-
};
|
|
407
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
408
|
-
if (headerKey !== undefined) {
|
|
409
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
410
|
-
}
|
|
411
|
-
if (data.code !== undefined) {
|
|
412
|
-
return sanitizeErrorCode(data.code);
|
|
413
|
-
}
|
|
414
|
-
if (data["__type"] !== undefined) {
|
|
415
|
-
return sanitizeErrorCode(data["__type"]);
|
|
416
|
-
}
|
|
417
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-artifact",
|
|
3
3
|
"description": "AWS SDK for JavaScript Artifact 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": "tsc -p tsconfig.cjs.json",
|
|
@@ -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",
|