@aws-sdk/client-codeartifact 3.128.0 → 3.130.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/CHANGELOG.md +16 -0
- package/README.md +10 -0
- package/dist-cjs/Codeartifact.js +30 -0
- package/dist-cjs/commands/DescribePackageCommand.js +36 -0
- package/dist-cjs/commands/PutPackageOriginConfigurationCommand.js +36 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/models/models_0.js +73 -3
- package/dist-cjs/protocols/Aws_restJson1.js +213 -2
- package/dist-es/Codeartifact.js +30 -0
- package/dist-es/commands/DescribePackageCommand.js +39 -0
- package/dist-es/commands/PutPackageOriginConfigurationCommand.js +39 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/models_0.js +52 -0
- package/dist-es/protocols/Aws_restJson1.js +247 -2
- package/dist-types/Codeartifact.d.ts +37 -1
- package/dist-types/CodeartifactClient.d.ts +14 -2
- package/dist-types/commands/DescribePackageCommand.d.ts +37 -0
- package/dist-types/commands/GetPackageVersionReadmeCommand.d.ts +3 -1
- package/dist-types/commands/PutPackageOriginConfigurationCommand.d.ts +43 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +466 -177
- package/dist-types/protocols/Aws_restJson1.d.ts +6 -0
- package/dist-types/ts3.4/Codeartifact.d.ts +10 -0
- package/dist-types/ts3.4/CodeartifactClient.d.ts +4 -2
- package/dist-types/ts3.4/commands/DescribePackageCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/PutPackageOriginConfigurationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/models/models_0.d.ts +136 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +6 -0
- package/package.json +6 -6
package/dist-es/Codeartifact.js
CHANGED
|
@@ -10,6 +10,7 @@ import { DeletePackageVersionsCommand, } from "./commands/DeletePackageVersionsC
|
|
|
10
10
|
import { DeleteRepositoryCommand, } from "./commands/DeleteRepositoryCommand";
|
|
11
11
|
import { DeleteRepositoryPermissionsPolicyCommand, } from "./commands/DeleteRepositoryPermissionsPolicyCommand";
|
|
12
12
|
import { DescribeDomainCommand, } from "./commands/DescribeDomainCommand";
|
|
13
|
+
import { DescribePackageCommand, } from "./commands/DescribePackageCommand";
|
|
13
14
|
import { DescribePackageVersionCommand, } from "./commands/DescribePackageVersionCommand";
|
|
14
15
|
import { DescribeRepositoryCommand, } from "./commands/DescribeRepositoryCommand";
|
|
15
16
|
import { DisassociateExternalConnectionCommand, } from "./commands/DisassociateExternalConnectionCommand";
|
|
@@ -29,6 +30,7 @@ import { ListRepositoriesCommand, } from "./commands/ListRepositoriesCommand";
|
|
|
29
30
|
import { ListRepositoriesInDomainCommand, } from "./commands/ListRepositoriesInDomainCommand";
|
|
30
31
|
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
31
32
|
import { PutDomainPermissionsPolicyCommand, } from "./commands/PutDomainPermissionsPolicyCommand";
|
|
33
|
+
import { PutPackageOriginConfigurationCommand, } from "./commands/PutPackageOriginConfigurationCommand";
|
|
32
34
|
import { PutRepositoryPermissionsPolicyCommand, } from "./commands/PutRepositoryPermissionsPolicyCommand";
|
|
33
35
|
import { TagResourceCommand } from "./commands/TagResourceCommand";
|
|
34
36
|
import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
|
|
@@ -179,6 +181,20 @@ var Codeartifact = (function (_super) {
|
|
|
179
181
|
return this.send(command, optionsOrCb);
|
|
180
182
|
}
|
|
181
183
|
};
|
|
184
|
+
Codeartifact.prototype.describePackage = function (args, optionsOrCb, cb) {
|
|
185
|
+
var command = new DescribePackageCommand(args);
|
|
186
|
+
if (typeof optionsOrCb === "function") {
|
|
187
|
+
this.send(command, optionsOrCb);
|
|
188
|
+
}
|
|
189
|
+
else if (typeof cb === "function") {
|
|
190
|
+
if (typeof optionsOrCb !== "object")
|
|
191
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
192
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
return this.send(command, optionsOrCb);
|
|
196
|
+
}
|
|
197
|
+
};
|
|
182
198
|
Codeartifact.prototype.describePackageVersion = function (args, optionsOrCb, cb) {
|
|
183
199
|
var command = new DescribePackageVersionCommand(args);
|
|
184
200
|
if (typeof optionsOrCb === "function") {
|
|
@@ -445,6 +461,20 @@ var Codeartifact = (function (_super) {
|
|
|
445
461
|
return this.send(command, optionsOrCb);
|
|
446
462
|
}
|
|
447
463
|
};
|
|
464
|
+
Codeartifact.prototype.putPackageOriginConfiguration = function (args, optionsOrCb, cb) {
|
|
465
|
+
var command = new PutPackageOriginConfigurationCommand(args);
|
|
466
|
+
if (typeof optionsOrCb === "function") {
|
|
467
|
+
this.send(command, optionsOrCb);
|
|
468
|
+
}
|
|
469
|
+
else if (typeof cb === "function") {
|
|
470
|
+
if (typeof optionsOrCb !== "object")
|
|
471
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
472
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
473
|
+
}
|
|
474
|
+
else {
|
|
475
|
+
return this.send(command, optionsOrCb);
|
|
476
|
+
}
|
|
477
|
+
};
|
|
448
478
|
Codeartifact.prototype.putRepositoryPermissionsPolicy = function (args, optionsOrCb, cb) {
|
|
449
479
|
var command = new PutRepositoryPermissionsPolicyCommand(args);
|
|
450
480
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { DescribePackageRequest, DescribePackageResult } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_restJson1DescribePackageCommand, serializeAws_restJson1DescribePackageCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
var DescribePackageCommand = (function (_super) {
|
|
7
|
+
__extends(DescribePackageCommand, _super);
|
|
8
|
+
function DescribePackageCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
DescribePackageCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
var logger = configuration.logger;
|
|
17
|
+
var clientName = "CodeartifactClient";
|
|
18
|
+
var commandName = "DescribePackageCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: DescribePackageRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: DescribePackageResult.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
DescribePackageCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_restJson1DescribePackageCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
DescribePackageCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_restJson1DescribePackageCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return DescribePackageCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { DescribePackageCommand };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { PutPackageOriginConfigurationRequest, PutPackageOriginConfigurationResult } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_restJson1PutPackageOriginConfigurationCommand, serializeAws_restJson1PutPackageOriginConfigurationCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
var PutPackageOriginConfigurationCommand = (function (_super) {
|
|
7
|
+
__extends(PutPackageOriginConfigurationCommand, _super);
|
|
8
|
+
function PutPackageOriginConfigurationCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
PutPackageOriginConfigurationCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
var logger = configuration.logger;
|
|
17
|
+
var clientName = "CodeartifactClient";
|
|
18
|
+
var commandName = "PutPackageOriginConfigurationCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: PutPackageOriginConfigurationRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: PutPackageOriginConfigurationResult.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
PutPackageOriginConfigurationCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_restJson1PutPackageOriginConfigurationCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
PutPackageOriginConfigurationCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_restJson1PutPackageOriginConfigurationCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return PutPackageOriginConfigurationCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { PutPackageOriginConfigurationCommand };
|
|
@@ -8,6 +8,7 @@ export * from "./DeletePackageVersionsCommand";
|
|
|
8
8
|
export * from "./DeleteRepositoryCommand";
|
|
9
9
|
export * from "./DeleteRepositoryPermissionsPolicyCommand";
|
|
10
10
|
export * from "./DescribeDomainCommand";
|
|
11
|
+
export * from "./DescribePackageCommand";
|
|
11
12
|
export * from "./DescribePackageVersionCommand";
|
|
12
13
|
export * from "./DescribeRepositoryCommand";
|
|
13
14
|
export * from "./DisassociateExternalConnectionCommand";
|
|
@@ -27,6 +28,7 @@ export * from "./ListRepositoriesCommand";
|
|
|
27
28
|
export * from "./ListRepositoriesInDomainCommand";
|
|
28
29
|
export * from "./ListTagsForResourceCommand";
|
|
29
30
|
export * from "./PutDomainPermissionsPolicyCommand";
|
|
31
|
+
export * from "./PutPackageOriginConfigurationCommand";
|
|
30
32
|
export * from "./PutRepositoryPermissionsPolicyCommand";
|
|
31
33
|
export * from "./TagResourceCommand";
|
|
32
34
|
export * from "./UntagResourceCommand";
|
|
@@ -12,6 +12,16 @@ var AccessDeniedException = (function (_super) {
|
|
|
12
12
|
return AccessDeniedException;
|
|
13
13
|
}(__BaseException));
|
|
14
14
|
export { AccessDeniedException };
|
|
15
|
+
export var AllowPublish;
|
|
16
|
+
(function (AllowPublish) {
|
|
17
|
+
AllowPublish["ALLOW"] = "ALLOW";
|
|
18
|
+
AllowPublish["BLOCK"] = "BLOCK";
|
|
19
|
+
})(AllowPublish || (AllowPublish = {}));
|
|
20
|
+
export var AllowUpstream;
|
|
21
|
+
(function (AllowUpstream) {
|
|
22
|
+
AllowUpstream["ALLOW"] = "ALLOW";
|
|
23
|
+
AllowUpstream["BLOCK"] = "BLOCK";
|
|
24
|
+
})(AllowUpstream || (AllowUpstream = {}));
|
|
15
25
|
export var HashAlgorithm;
|
|
16
26
|
(function (HashAlgorithm) {
|
|
17
27
|
HashAlgorithm["MD5"] = "MD5";
|
|
@@ -269,6 +279,26 @@ export var DescribeDomainResult;
|
|
|
269
279
|
(function (DescribeDomainResult) {
|
|
270
280
|
DescribeDomainResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
271
281
|
})(DescribeDomainResult || (DescribeDomainResult = {}));
|
|
282
|
+
export var DescribePackageRequest;
|
|
283
|
+
(function (DescribePackageRequest) {
|
|
284
|
+
DescribePackageRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
285
|
+
})(DescribePackageRequest || (DescribePackageRequest = {}));
|
|
286
|
+
export var PackageOriginRestrictions;
|
|
287
|
+
(function (PackageOriginRestrictions) {
|
|
288
|
+
PackageOriginRestrictions.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
289
|
+
})(PackageOriginRestrictions || (PackageOriginRestrictions = {}));
|
|
290
|
+
export var PackageOriginConfiguration;
|
|
291
|
+
(function (PackageOriginConfiguration) {
|
|
292
|
+
PackageOriginConfiguration.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
293
|
+
})(PackageOriginConfiguration || (PackageOriginConfiguration = {}));
|
|
294
|
+
export var PackageDescription;
|
|
295
|
+
(function (PackageDescription) {
|
|
296
|
+
PackageDescription.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
297
|
+
})(PackageDescription || (PackageDescription = {}));
|
|
298
|
+
export var DescribePackageResult;
|
|
299
|
+
(function (DescribePackageResult) {
|
|
300
|
+
DescribePackageResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
301
|
+
})(DescribePackageResult || (DescribePackageResult = {}));
|
|
272
302
|
export var DescribePackageVersionRequest;
|
|
273
303
|
(function (DescribePackageVersionRequest) {
|
|
274
304
|
DescribePackageVersionRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -277,6 +307,20 @@ export var LicenseInfo;
|
|
|
277
307
|
(function (LicenseInfo) {
|
|
278
308
|
LicenseInfo.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
279
309
|
})(LicenseInfo || (LicenseInfo = {}));
|
|
310
|
+
export var DomainEntryPoint;
|
|
311
|
+
(function (DomainEntryPoint) {
|
|
312
|
+
DomainEntryPoint.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
313
|
+
})(DomainEntryPoint || (DomainEntryPoint = {}));
|
|
314
|
+
export var PackageVersionOriginType;
|
|
315
|
+
(function (PackageVersionOriginType) {
|
|
316
|
+
PackageVersionOriginType["EXTERNAL"] = "EXTERNAL";
|
|
317
|
+
PackageVersionOriginType["INTERNAL"] = "INTERNAL";
|
|
318
|
+
PackageVersionOriginType["UNKNOWN"] = "UNKNOWN";
|
|
319
|
+
})(PackageVersionOriginType || (PackageVersionOriginType = {}));
|
|
320
|
+
export var PackageVersionOrigin;
|
|
321
|
+
(function (PackageVersionOrigin) {
|
|
322
|
+
PackageVersionOrigin.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
323
|
+
})(PackageVersionOrigin || (PackageVersionOrigin = {}));
|
|
280
324
|
export var PackageVersionDescription;
|
|
281
325
|
(function (PackageVersionDescription) {
|
|
282
326
|
PackageVersionDescription.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -453,6 +497,14 @@ export var PutDomainPermissionsPolicyResult;
|
|
|
453
497
|
(function (PutDomainPermissionsPolicyResult) {
|
|
454
498
|
PutDomainPermissionsPolicyResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
455
499
|
})(PutDomainPermissionsPolicyResult || (PutDomainPermissionsPolicyResult = {}));
|
|
500
|
+
export var PutPackageOriginConfigurationRequest;
|
|
501
|
+
(function (PutPackageOriginConfigurationRequest) {
|
|
502
|
+
PutPackageOriginConfigurationRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
503
|
+
})(PutPackageOriginConfigurationRequest || (PutPackageOriginConfigurationRequest = {}));
|
|
504
|
+
export var PutPackageOriginConfigurationResult;
|
|
505
|
+
(function (PutPackageOriginConfigurationResult) {
|
|
506
|
+
PutPackageOriginConfigurationResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
507
|
+
})(PutPackageOriginConfigurationResult || (PutPackageOriginConfigurationResult = {}));
|
|
456
508
|
export var PutRepositoryPermissionsPolicyRequest;
|
|
457
509
|
(function (PutRepositoryPermissionsPolicyRequest) {
|
|
458
510
|
PutRepositoryPermissionsPolicyRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -249,6 +249,29 @@ export var serializeAws_restJson1DescribeDomainCommand = function (input, contex
|
|
|
249
249
|
}
|
|
250
250
|
});
|
|
251
251
|
}); };
|
|
252
|
+
export var serializeAws_restJson1DescribePackageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
253
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
254
|
+
return __generator(this, function (_c) {
|
|
255
|
+
switch (_c.label) {
|
|
256
|
+
case 0: return [4, context.endpoint()];
|
|
257
|
+
case 1:
|
|
258
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
259
|
+
headers = {};
|
|
260
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/package";
|
|
261
|
+
query = __assign(__assign(__assign(__assign(__assign(__assign({}, (input.domain !== undefined && { domain: input.domain })), (input.domainOwner !== undefined && { "domain-owner": input.domainOwner })), (input.repository !== undefined && { repository: input.repository })), (input.format !== undefined && { format: input.format })), (input.namespace !== undefined && { namespace: input.namespace })), (input.package !== undefined && { package: input.package }));
|
|
262
|
+
return [2, new __HttpRequest({
|
|
263
|
+
protocol: protocol,
|
|
264
|
+
hostname: hostname,
|
|
265
|
+
port: port,
|
|
266
|
+
method: "GET",
|
|
267
|
+
headers: headers,
|
|
268
|
+
path: resolvedPath,
|
|
269
|
+
query: query,
|
|
270
|
+
body: body,
|
|
271
|
+
})];
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
}); };
|
|
252
275
|
export var serializeAws_restJson1DescribePackageVersionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
253
276
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
254
277
|
return __generator(this, function (_c) {
|
|
@@ -517,7 +540,7 @@ export var serializeAws_restJson1ListPackagesCommand = function (input, context)
|
|
|
517
540
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
518
541
|
headers = {};
|
|
519
542
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/packages";
|
|
520
|
-
query = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.domain !== undefined && { domain: input.domain })), (input.domainOwner !== undefined && { "domain-owner": input.domainOwner })), (input.repository !== undefined && { repository: input.repository })), (input.format !== undefined && { format: input.format })), (input.namespace !== undefined && { namespace: input.namespace })), (input.packagePrefix !== undefined && { "package-prefix": input.packagePrefix })), (input.maxResults !== undefined && { "max-results": input.maxResults.toString() })), (input.nextToken !== undefined && { "next-token": input.nextToken }));
|
|
543
|
+
query = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.domain !== undefined && { domain: input.domain })), (input.domainOwner !== undefined && { "domain-owner": input.domainOwner })), (input.repository !== undefined && { repository: input.repository })), (input.format !== undefined && { format: input.format })), (input.namespace !== undefined && { namespace: input.namespace })), (input.packagePrefix !== undefined && { "package-prefix": input.packagePrefix })), (input.maxResults !== undefined && { "max-results": input.maxResults.toString() })), (input.nextToken !== undefined && { "next-token": input.nextToken })), (input.publish !== undefined && { publish: input.publish })), (input.upstream !== undefined && { upstream: input.upstream }));
|
|
521
544
|
return [2, new __HttpRequest({
|
|
522
545
|
protocol: protocol,
|
|
523
546
|
hostname: hostname,
|
|
@@ -586,7 +609,7 @@ export var serializeAws_restJson1ListPackageVersionsCommand = function (input, c
|
|
|
586
609
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
587
610
|
headers = {};
|
|
588
611
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/package/versions";
|
|
589
|
-
query = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.domain !== undefined && { domain: input.domain })), (input.domainOwner !== undefined && { "domain-owner": input.domainOwner })), (input.repository !== undefined && { repository: input.repository })), (input.format !== undefined && { format: input.format })), (input.namespace !== undefined && { namespace: input.namespace })), (input.package !== undefined && { package: input.package })), (input.status !== undefined && { status: input.status })), (input.sortBy !== undefined && { sortBy: input.sortBy })), (input.maxResults !== undefined && { "max-results": input.maxResults.toString() })), (input.nextToken !== undefined && { "next-token": input.nextToken }));
|
|
612
|
+
query = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.domain !== undefined && { domain: input.domain })), (input.domainOwner !== undefined && { "domain-owner": input.domainOwner })), (input.repository !== undefined && { repository: input.repository })), (input.format !== undefined && { format: input.format })), (input.namespace !== undefined && { namespace: input.namespace })), (input.package !== undefined && { package: input.package })), (input.status !== undefined && { status: input.status })), (input.sortBy !== undefined && { sortBy: input.sortBy })), (input.maxResults !== undefined && { "max-results": input.maxResults.toString() })), (input.nextToken !== undefined && { "next-token": input.nextToken })), (input.originType !== undefined && { originType: input.originType }));
|
|
590
613
|
return [2, new __HttpRequest({
|
|
591
614
|
protocol: protocol,
|
|
592
615
|
hostname: hostname,
|
|
@@ -693,6 +716,34 @@ export var serializeAws_restJson1PutDomainPermissionsPolicyCommand = function (i
|
|
|
693
716
|
}
|
|
694
717
|
});
|
|
695
718
|
}); };
|
|
719
|
+
export var serializeAws_restJson1PutPackageOriginConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
720
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
721
|
+
return __generator(this, function (_c) {
|
|
722
|
+
switch (_c.label) {
|
|
723
|
+
case 0: return [4, context.endpoint()];
|
|
724
|
+
case 1:
|
|
725
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
726
|
+
headers = {
|
|
727
|
+
"content-type": "application/json",
|
|
728
|
+
};
|
|
729
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/package";
|
|
730
|
+
query = __assign(__assign(__assign(__assign(__assign(__assign({}, (input.domain !== undefined && { domain: input.domain })), (input.domainOwner !== undefined && { "domain-owner": input.domainOwner })), (input.repository !== undefined && { repository: input.repository })), (input.format !== undefined && { format: input.format })), (input.namespace !== undefined && { namespace: input.namespace })), (input.package !== undefined && { package: input.package }));
|
|
731
|
+
body = JSON.stringify(__assign({}, (input.restrictions != null && {
|
|
732
|
+
restrictions: serializeAws_restJson1PackageOriginRestrictions(input.restrictions, context),
|
|
733
|
+
})));
|
|
734
|
+
return [2, new __HttpRequest({
|
|
735
|
+
protocol: protocol,
|
|
736
|
+
hostname: hostname,
|
|
737
|
+
port: port,
|
|
738
|
+
method: "POST",
|
|
739
|
+
headers: headers,
|
|
740
|
+
path: resolvedPath,
|
|
741
|
+
query: query,
|
|
742
|
+
body: body,
|
|
743
|
+
})];
|
|
744
|
+
}
|
|
745
|
+
});
|
|
746
|
+
}); };
|
|
696
747
|
export var serializeAws_restJson1PutRepositoryPermissionsPolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
697
748
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
698
749
|
return __generator(this, function (_c) {
|
|
@@ -1613,6 +1664,79 @@ var deserializeAws_restJson1DescribeDomainCommandError = function (output, conte
|
|
|
1613
1664
|
}
|
|
1614
1665
|
});
|
|
1615
1666
|
}); };
|
|
1667
|
+
export var deserializeAws_restJson1DescribePackageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1668
|
+
var contents, data, _a, _b;
|
|
1669
|
+
return __generator(this, function (_c) {
|
|
1670
|
+
switch (_c.label) {
|
|
1671
|
+
case 0:
|
|
1672
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1673
|
+
return [2, deserializeAws_restJson1DescribePackageCommandError(output, context)];
|
|
1674
|
+
}
|
|
1675
|
+
contents = {
|
|
1676
|
+
$metadata: deserializeMetadata(output),
|
|
1677
|
+
package: undefined,
|
|
1678
|
+
};
|
|
1679
|
+
_a = __expectNonNull;
|
|
1680
|
+
_b = __expectObject;
|
|
1681
|
+
return [4, parseBody(output.body, context)];
|
|
1682
|
+
case 1:
|
|
1683
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1684
|
+
if (data.package !== undefined && data.package !== null) {
|
|
1685
|
+
contents.package = deserializeAws_restJson1PackageDescription(data.package, context);
|
|
1686
|
+
}
|
|
1687
|
+
return [2, Promise.resolve(contents)];
|
|
1688
|
+
}
|
|
1689
|
+
});
|
|
1690
|
+
}); };
|
|
1691
|
+
var deserializeAws_restJson1DescribePackageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1692
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
1693
|
+
var _c;
|
|
1694
|
+
return __generator(this, function (_d) {
|
|
1695
|
+
switch (_d.label) {
|
|
1696
|
+
case 0:
|
|
1697
|
+
_a = [__assign({}, output)];
|
|
1698
|
+
_c = {};
|
|
1699
|
+
return [4, parseBody(output.body, context)];
|
|
1700
|
+
case 1:
|
|
1701
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1702
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1703
|
+
_b = errorCode;
|
|
1704
|
+
switch (_b) {
|
|
1705
|
+
case "AccessDeniedException": return [3, 2];
|
|
1706
|
+
case "com.amazonaws.codeartifact#AccessDeniedException": return [3, 2];
|
|
1707
|
+
case "InternalServerException": return [3, 4];
|
|
1708
|
+
case "com.amazonaws.codeartifact#InternalServerException": return [3, 4];
|
|
1709
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
1710
|
+
case "com.amazonaws.codeartifact#ResourceNotFoundException": return [3, 6];
|
|
1711
|
+
case "ThrottlingException": return [3, 8];
|
|
1712
|
+
case "com.amazonaws.codeartifact#ThrottlingException": return [3, 8];
|
|
1713
|
+
case "ValidationException": return [3, 10];
|
|
1714
|
+
case "com.amazonaws.codeartifact#ValidationException": return [3, 10];
|
|
1715
|
+
}
|
|
1716
|
+
return [3, 12];
|
|
1717
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1718
|
+
case 3: throw _d.sent();
|
|
1719
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1720
|
+
case 5: throw _d.sent();
|
|
1721
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1722
|
+
case 7: throw _d.sent();
|
|
1723
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1724
|
+
case 9: throw _d.sent();
|
|
1725
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1726
|
+
case 11: throw _d.sent();
|
|
1727
|
+
case 12:
|
|
1728
|
+
parsedBody = parsedOutput.body;
|
|
1729
|
+
$metadata = deserializeMetadata(output);
|
|
1730
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1731
|
+
response = new __BaseException({
|
|
1732
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1733
|
+
$fault: "client",
|
|
1734
|
+
$metadata: $metadata,
|
|
1735
|
+
});
|
|
1736
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1737
|
+
}
|
|
1738
|
+
});
|
|
1739
|
+
}); };
|
|
1616
1740
|
export var deserializeAws_restJson1DescribePackageVersionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1617
1741
|
var contents, data, _a, _b;
|
|
1618
1742
|
return __generator(this, function (_c) {
|
|
@@ -3131,6 +3255,79 @@ var deserializeAws_restJson1PutDomainPermissionsPolicyCommandError = function (o
|
|
|
3131
3255
|
}
|
|
3132
3256
|
});
|
|
3133
3257
|
}); };
|
|
3258
|
+
export var deserializeAws_restJson1PutPackageOriginConfigurationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3259
|
+
var contents, data, _a, _b;
|
|
3260
|
+
return __generator(this, function (_c) {
|
|
3261
|
+
switch (_c.label) {
|
|
3262
|
+
case 0:
|
|
3263
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3264
|
+
return [2, deserializeAws_restJson1PutPackageOriginConfigurationCommandError(output, context)];
|
|
3265
|
+
}
|
|
3266
|
+
contents = {
|
|
3267
|
+
$metadata: deserializeMetadata(output),
|
|
3268
|
+
originConfiguration: undefined,
|
|
3269
|
+
};
|
|
3270
|
+
_a = __expectNonNull;
|
|
3271
|
+
_b = __expectObject;
|
|
3272
|
+
return [4, parseBody(output.body, context)];
|
|
3273
|
+
case 1:
|
|
3274
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
3275
|
+
if (data.originConfiguration !== undefined && data.originConfiguration !== null) {
|
|
3276
|
+
contents.originConfiguration = deserializeAws_restJson1PackageOriginConfiguration(data.originConfiguration, context);
|
|
3277
|
+
}
|
|
3278
|
+
return [2, Promise.resolve(contents)];
|
|
3279
|
+
}
|
|
3280
|
+
});
|
|
3281
|
+
}); };
|
|
3282
|
+
var deserializeAws_restJson1PutPackageOriginConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3283
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
3284
|
+
var _c;
|
|
3285
|
+
return __generator(this, function (_d) {
|
|
3286
|
+
switch (_d.label) {
|
|
3287
|
+
case 0:
|
|
3288
|
+
_a = [__assign({}, output)];
|
|
3289
|
+
_c = {};
|
|
3290
|
+
return [4, parseBody(output.body, context)];
|
|
3291
|
+
case 1:
|
|
3292
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
3293
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3294
|
+
_b = errorCode;
|
|
3295
|
+
switch (_b) {
|
|
3296
|
+
case "AccessDeniedException": return [3, 2];
|
|
3297
|
+
case "com.amazonaws.codeartifact#AccessDeniedException": return [3, 2];
|
|
3298
|
+
case "InternalServerException": return [3, 4];
|
|
3299
|
+
case "com.amazonaws.codeartifact#InternalServerException": return [3, 4];
|
|
3300
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
3301
|
+
case "com.amazonaws.codeartifact#ResourceNotFoundException": return [3, 6];
|
|
3302
|
+
case "ThrottlingException": return [3, 8];
|
|
3303
|
+
case "com.amazonaws.codeartifact#ThrottlingException": return [3, 8];
|
|
3304
|
+
case "ValidationException": return [3, 10];
|
|
3305
|
+
case "com.amazonaws.codeartifact#ValidationException": return [3, 10];
|
|
3306
|
+
}
|
|
3307
|
+
return [3, 12];
|
|
3308
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3309
|
+
case 3: throw _d.sent();
|
|
3310
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
3311
|
+
case 5: throw _d.sent();
|
|
3312
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
3313
|
+
case 7: throw _d.sent();
|
|
3314
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
3315
|
+
case 9: throw _d.sent();
|
|
3316
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
3317
|
+
case 11: throw _d.sent();
|
|
3318
|
+
case 12:
|
|
3319
|
+
parsedBody = parsedOutput.body;
|
|
3320
|
+
$metadata = deserializeMetadata(output);
|
|
3321
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3322
|
+
response = new __BaseException({
|
|
3323
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3324
|
+
$fault: "client",
|
|
3325
|
+
$metadata: $metadata,
|
|
3326
|
+
});
|
|
3327
|
+
throw __decorateServiceException(response, parsedBody);
|
|
3328
|
+
}
|
|
3329
|
+
});
|
|
3330
|
+
}); };
|
|
3134
3331
|
export var deserializeAws_restJson1PutRepositoryPermissionsPolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3135
3332
|
var contents, data, _a, _b;
|
|
3136
3333
|
return __generator(this, function (_c) {
|
|
@@ -3612,6 +3809,9 @@ var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput
|
|
|
3612
3809
|
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
3613
3810
|
});
|
|
3614
3811
|
}); };
|
|
3812
|
+
var serializeAws_restJson1PackageOriginRestrictions = function (input, context) {
|
|
3813
|
+
return __assign(__assign({}, (input.publish != null && { publish: input.publish })), (input.upstream != null && { upstream: input.upstream }));
|
|
3814
|
+
};
|
|
3615
3815
|
var serializeAws_restJson1PackageVersionList = function (input, context) {
|
|
3616
3816
|
return input
|
|
3617
3817
|
.filter(function (e) { return e != null; })
|
|
@@ -3711,6 +3911,12 @@ var deserializeAws_restJson1DomainDescription = function (output, context) {
|
|
|
3711
3911
|
status: __expectString(output.status),
|
|
3712
3912
|
};
|
|
3713
3913
|
};
|
|
3914
|
+
var deserializeAws_restJson1DomainEntryPoint = function (output, context) {
|
|
3915
|
+
return {
|
|
3916
|
+
externalConnectionName: __expectString(output.externalConnectionName),
|
|
3917
|
+
repositoryName: __expectString(output.repositoryName),
|
|
3918
|
+
};
|
|
3919
|
+
};
|
|
3714
3920
|
var deserializeAws_restJson1DomainSummary = function (output, context) {
|
|
3715
3921
|
return {
|
|
3716
3922
|
arn: __expectString(output.arn),
|
|
@@ -3770,10 +3976,36 @@ var deserializeAws_restJson1PackageDependencyList = function (output, context) {
|
|
|
3770
3976
|
});
|
|
3771
3977
|
return retVal;
|
|
3772
3978
|
};
|
|
3979
|
+
var deserializeAws_restJson1PackageDescription = function (output, context) {
|
|
3980
|
+
return {
|
|
3981
|
+
format: __expectString(output.format),
|
|
3982
|
+
name: __expectString(output.name),
|
|
3983
|
+
namespace: __expectString(output.namespace),
|
|
3984
|
+
originConfiguration: output.originConfiguration != null
|
|
3985
|
+
? deserializeAws_restJson1PackageOriginConfiguration(output.originConfiguration, context)
|
|
3986
|
+
: undefined,
|
|
3987
|
+
};
|
|
3988
|
+
};
|
|
3989
|
+
var deserializeAws_restJson1PackageOriginConfiguration = function (output, context) {
|
|
3990
|
+
return {
|
|
3991
|
+
restrictions: output.restrictions != null
|
|
3992
|
+
? deserializeAws_restJson1PackageOriginRestrictions(output.restrictions, context)
|
|
3993
|
+
: undefined,
|
|
3994
|
+
};
|
|
3995
|
+
};
|
|
3996
|
+
var deserializeAws_restJson1PackageOriginRestrictions = function (output, context) {
|
|
3997
|
+
return {
|
|
3998
|
+
publish: __expectString(output.publish),
|
|
3999
|
+
upstream: __expectString(output.upstream),
|
|
4000
|
+
};
|
|
4001
|
+
};
|
|
3773
4002
|
var deserializeAws_restJson1PackageSummary = function (output, context) {
|
|
3774
4003
|
return {
|
|
3775
4004
|
format: __expectString(output.format),
|
|
3776
4005
|
namespace: __expectString(output.namespace),
|
|
4006
|
+
originConfiguration: output.originConfiguration != null
|
|
4007
|
+
? deserializeAws_restJson1PackageOriginConfiguration(output.originConfiguration, context)
|
|
4008
|
+
: undefined,
|
|
3777
4009
|
package: __expectString(output.package),
|
|
3778
4010
|
};
|
|
3779
4011
|
};
|
|
@@ -3795,6 +4027,7 @@ var deserializeAws_restJson1PackageVersionDescription = function (output, contex
|
|
|
3795
4027
|
homePage: __expectString(output.homePage),
|
|
3796
4028
|
licenses: output.licenses != null ? deserializeAws_restJson1LicenseInfoList(output.licenses, context) : undefined,
|
|
3797
4029
|
namespace: __expectString(output.namespace),
|
|
4030
|
+
origin: output.origin != null ? deserializeAws_restJson1PackageVersionOrigin(output.origin, context) : undefined,
|
|
3798
4031
|
packageName: __expectString(output.packageName),
|
|
3799
4032
|
publishedTime: output.publishedTime != null
|
|
3800
4033
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.publishedTime)))
|
|
@@ -3822,8 +4055,17 @@ var deserializeAws_restJson1PackageVersionErrorMap = function (output, context)
|
|
|
3822
4055
|
return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_restJson1PackageVersionError(value, context), _b));
|
|
3823
4056
|
}, {});
|
|
3824
4057
|
};
|
|
4058
|
+
var deserializeAws_restJson1PackageVersionOrigin = function (output, context) {
|
|
4059
|
+
return {
|
|
4060
|
+
domainEntryPoint: output.domainEntryPoint != null
|
|
4061
|
+
? deserializeAws_restJson1DomainEntryPoint(output.domainEntryPoint, context)
|
|
4062
|
+
: undefined,
|
|
4063
|
+
originType: __expectString(output.originType),
|
|
4064
|
+
};
|
|
4065
|
+
};
|
|
3825
4066
|
var deserializeAws_restJson1PackageVersionSummary = function (output, context) {
|
|
3826
4067
|
return {
|
|
4068
|
+
origin: output.origin != null ? deserializeAws_restJson1PackageVersionOrigin(output.origin, context) : undefined,
|
|
3827
4069
|
revision: __expectString(output.revision),
|
|
3828
4070
|
status: __expectString(output.status),
|
|
3829
4071
|
version: __expectString(output.version),
|
|
@@ -3989,6 +4231,9 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
3989
4231
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
3990
4232
|
var sanitizeErrorCode = function (rawValue) {
|
|
3991
4233
|
var cleanValue = rawValue;
|
|
4234
|
+
if (typeof cleanValue === "number") {
|
|
4235
|
+
cleanValue = cleanValue.toString();
|
|
4236
|
+
}
|
|
3992
4237
|
if (cleanValue.indexOf(":") >= 0) {
|
|
3993
4238
|
cleanValue = cleanValue.split(":")[0];
|
|
3994
4239
|
}
|