@aws-sdk/client-codeartifact 3.287.0 → 3.288.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/README.md +16 -0
- package/dist-cjs/Codeartifact.js +15 -0
- package/dist-cjs/commands/PublishPackageVersionCommand.js +46 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/endpoint/ruleset.js +3 -3
- package/dist-cjs/models/models_0.js +10 -1
- package/dist-cjs/protocols/Aws_restJson1.js +106 -2
- package/dist-es/Codeartifact.js +15 -0
- package/dist-es/commands/PublishPackageVersionCommand.js +42 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/endpoint/ruleset.js +3 -3
- package/dist-es/models/models_0.js +7 -0
- package/dist-es/protocols/Aws_restJson1.js +102 -0
- package/dist-types/Codeartifact.d.ts +20 -1
- package/dist-types/CodeartifactClient.d.ts +11 -2
- package/dist-types/commands/DeletePackageVersionsCommand.d.ts +1 -1
- package/dist-types/commands/PublishPackageVersionCommand.d.ts +58 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +194 -10
- package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
- package/dist-types/ts3.4/Codeartifact.d.ts +17 -0
- package/dist-types/ts3.4/CodeartifactClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/PublishPackageVersionCommand.d.ts +52 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/ts3.4/models/models_0.d.ts +29 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -126,6 +126,10 @@ repositories. </p>
|
|
|
126
126
|
</li>
|
|
127
127
|
<li>
|
|
128
128
|
<p>
|
|
129
|
+
<code>DeletePackage</code>: Deletes a package and all associated package versions.</p>
|
|
130
|
+
</li>
|
|
131
|
+
<li>
|
|
132
|
+
<p>
|
|
129
133
|
<code>DeletePackageVersions</code>: Deletes versions of a package. After a package has
|
|
130
134
|
been deleted, it can be republished, but its assets and metadata cannot be restored
|
|
131
135
|
because they have been permanently removed from storage.</p>
|
|
@@ -254,6 +258,10 @@ package in a repository.</p>
|
|
|
254
258
|
</li>
|
|
255
259
|
<li>
|
|
256
260
|
<p>
|
|
261
|
+
<code>PublishPackageVersion</code>: Creates a new package version containing one or more assets.</p>
|
|
262
|
+
</li>
|
|
263
|
+
<li>
|
|
264
|
+
<p>
|
|
257
265
|
<code>PutDomainPermissionsPolicy</code>: Attaches a resource policy to a domain.</p>
|
|
258
266
|
</li>
|
|
259
267
|
<li>
|
|
@@ -710,6 +718,14 @@ ListTagsForResource
|
|
|
710
718
|
|
|
711
719
|
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codeartifact/classes/listtagsforresourcecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codeartifact/interfaces/listtagsforresourcecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codeartifact/interfaces/listtagsforresourcecommandoutput.html)
|
|
712
720
|
|
|
721
|
+
</details>
|
|
722
|
+
<details>
|
|
723
|
+
<summary>
|
|
724
|
+
PublishPackageVersion
|
|
725
|
+
</summary>
|
|
726
|
+
|
|
727
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codeartifact/classes/publishpackageversioncommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codeartifact/interfaces/publishpackageversioncommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-codeartifact/interfaces/publishpackageversioncommandoutput.html)
|
|
728
|
+
|
|
713
729
|
</details>
|
|
714
730
|
<details>
|
|
715
731
|
<summary>
|
package/dist-cjs/Codeartifact.js
CHANGED
|
@@ -32,6 +32,7 @@ const ListPackageVersionsCommand_1 = require("./commands/ListPackageVersionsComm
|
|
|
32
32
|
const ListRepositoriesCommand_1 = require("./commands/ListRepositoriesCommand");
|
|
33
33
|
const ListRepositoriesInDomainCommand_1 = require("./commands/ListRepositoriesInDomainCommand");
|
|
34
34
|
const ListTagsForResourceCommand_1 = require("./commands/ListTagsForResourceCommand");
|
|
35
|
+
const PublishPackageVersionCommand_1 = require("./commands/PublishPackageVersionCommand");
|
|
35
36
|
const PutDomainPermissionsPolicyCommand_1 = require("./commands/PutDomainPermissionsPolicyCommand");
|
|
36
37
|
const PutPackageOriginConfigurationCommand_1 = require("./commands/PutPackageOriginConfigurationCommand");
|
|
37
38
|
const PutRepositoryPermissionsPolicyCommand_1 = require("./commands/PutRepositoryPermissionsPolicyCommand");
|
|
@@ -460,6 +461,20 @@ class Codeartifact extends CodeartifactClient_1.CodeartifactClient {
|
|
|
460
461
|
return this.send(command, optionsOrCb);
|
|
461
462
|
}
|
|
462
463
|
}
|
|
464
|
+
publishPackageVersion(args, optionsOrCb, cb) {
|
|
465
|
+
const command = new PublishPackageVersionCommand_1.PublishPackageVersionCommand(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 ${typeof optionsOrCb}`);
|
|
472
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
473
|
+
}
|
|
474
|
+
else {
|
|
475
|
+
return this.send(command, optionsOrCb);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
463
478
|
putDomainPermissionsPolicy(args, optionsOrCb, cb) {
|
|
464
479
|
const command = new PutDomainPermissionsPolicyCommand_1.PutDomainPermissionsPolicyCommand(args);
|
|
465
480
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PublishPackageVersionCommand = void 0;
|
|
4
|
+
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
8
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
9
|
+
class PublishPackageVersionCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
static getEndpointParameterInstructions() {
|
|
15
|
+
return {
|
|
16
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
17
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
18
|
+
Region: { type: "builtInParams", name: "region" },
|
|
19
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
23
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
24
|
+
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PublishPackageVersionCommand.getEndpointParameterInstructions()));
|
|
25
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
26
|
+
const { logger } = configuration;
|
|
27
|
+
const clientName = "CodeartifactClient";
|
|
28
|
+
const commandName = "PublishPackageVersionCommand";
|
|
29
|
+
const handlerExecutionContext = {
|
|
30
|
+
logger,
|
|
31
|
+
clientName,
|
|
32
|
+
commandName,
|
|
33
|
+
inputFilterSensitiveLog: models_0_1.PublishPackageVersionRequestFilterSensitiveLog,
|
|
34
|
+
outputFilterSensitiveLog: models_0_1.PublishPackageVersionResultFilterSensitiveLog,
|
|
35
|
+
};
|
|
36
|
+
const { requestHandler } = configuration;
|
|
37
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
38
|
+
}
|
|
39
|
+
serialize(input, context) {
|
|
40
|
+
return (0, Aws_restJson1_1.serializeAws_restJson1PublishPackageVersionCommand)(input, context);
|
|
41
|
+
}
|
|
42
|
+
deserialize(output, context) {
|
|
43
|
+
return (0, Aws_restJson1_1.deserializeAws_restJson1PublishPackageVersionCommand)(output, context);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.PublishPackageVersionCommand = PublishPackageVersionCommand;
|
|
@@ -31,6 +31,7 @@ tslib_1.__exportStar(require("./ListPackagesCommand"), exports);
|
|
|
31
31
|
tslib_1.__exportStar(require("./ListRepositoriesCommand"), exports);
|
|
32
32
|
tslib_1.__exportStar(require("./ListRepositoriesInDomainCommand"), exports);
|
|
33
33
|
tslib_1.__exportStar(require("./ListTagsForResourceCommand"), exports);
|
|
34
|
+
tslib_1.__exportStar(require("./PublishPackageVersionCommand"), exports);
|
|
34
35
|
tslib_1.__exportStar(require("./PutDomainPermissionsPolicyCommand"), exports);
|
|
35
36
|
tslib_1.__exportStar(require("./PutPackageOriginConfigurationCommand"), exports);
|
|
36
37
|
tslib_1.__exportStar(require("./PutRepositoryPermissionsPolicyCommand"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ruleSet = void 0;
|
|
4
|
-
const q = "
|
|
5
|
-
const a =
|
|
6
|
-
const _data = { version: "1.0", parameters: { Region:
|
|
4
|
+
const q = "required", r = "fn", s = "argv", t = "ref";
|
|
5
|
+
const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = { [q]: false, "type": "String" }, g = { [q]: true, "default": false, "type": "Boolean" }, h = { [t]: "Endpoint" }, i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }, j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }, k = {}, l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }, m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }, n = [i], o = [j], p = [{ [t]: "Region" }];
|
|
6
|
+
const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://codeartifact-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://codeartifact-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://codeartifact.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://codeartifact.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
|
|
7
7
|
exports.ruleSet = _data;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DeleteRepositoryResultFilterSensitiveLog = exports.DeleteRepositoryRequestFilterSensitiveLog = exports.DeletePackageVersionsResultFilterSensitiveLog = exports.DeletePackageVersionsRequestFilterSensitiveLog = exports.DeletePackageResultFilterSensitiveLog = exports.PackageSummaryFilterSensitiveLog = exports.PackageOriginConfigurationFilterSensitiveLog = exports.PackageOriginRestrictionsFilterSensitiveLog = exports.DeletePackageRequestFilterSensitiveLog = exports.DeleteDomainPermissionsPolicyResultFilterSensitiveLog = exports.ResourcePolicyFilterSensitiveLog = exports.DeleteDomainPermissionsPolicyRequestFilterSensitiveLog = exports.DeleteDomainResultFilterSensitiveLog = exports.DeleteDomainRequestFilterSensitiveLog = exports.CreateRepositoryResultFilterSensitiveLog = exports.CreateRepositoryRequestFilterSensitiveLog = exports.UpstreamRepositoryFilterSensitiveLog = exports.CreateDomainResultFilterSensitiveLog = exports.DomainDescriptionFilterSensitiveLog = exports.CreateDomainRequestFilterSensitiveLog = exports.TagFilterSensitiveLog = exports.CopyPackageVersionsResultFilterSensitiveLog = exports.SuccessfulPackageVersionInfoFilterSensitiveLog = exports.PackageVersionErrorFilterSensitiveLog = exports.CopyPackageVersionsRequestFilterSensitiveLog = exports.AssociateExternalConnectionResultFilterSensitiveLog = exports.RepositoryDescriptionFilterSensitiveLog = exports.UpstreamRepositoryInfoFilterSensitiveLog = exports.RepositoryExternalConnectionInfoFilterSensitiveLog = exports.AssociateExternalConnectionRequestFilterSensitiveLog = exports.AssetSummaryFilterSensitiveLog = exports.PackageVersionSortType = exports.PackageVersionOriginType = exports.DomainStatus = exports.PackageVersionStatus = exports.PackageVersionErrorCode = exports.ValidationException = exports.ValidationExceptionReason = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.InternalServerException = exports.ConflictException = exports.ResourceType = exports.ExternalConnectionStatus = exports.PackageFormat = exports.HashAlgorithm = exports.AllowUpstream = exports.AllowPublish = exports.AccessDeniedException = void 0;
|
|
4
4
|
exports.ListTagsForResourceRequestFilterSensitiveLog = exports.ListRepositoriesInDomainResultFilterSensitiveLog = exports.ListRepositoriesInDomainRequestFilterSensitiveLog = exports.ListRepositoriesResultFilterSensitiveLog = exports.RepositorySummaryFilterSensitiveLog = exports.ListRepositoriesRequestFilterSensitiveLog = exports.ListPackageVersionsResultFilterSensitiveLog = exports.PackageVersionSummaryFilterSensitiveLog = exports.ListPackageVersionsRequestFilterSensitiveLog = exports.ListPackageVersionDependenciesResultFilterSensitiveLog = exports.PackageDependencyFilterSensitiveLog = exports.ListPackageVersionDependenciesRequestFilterSensitiveLog = exports.ListPackageVersionAssetsResultFilterSensitiveLog = exports.ListPackageVersionAssetsRequestFilterSensitiveLog = exports.ListPackagesResultFilterSensitiveLog = exports.ListPackagesRequestFilterSensitiveLog = exports.ListDomainsResultFilterSensitiveLog = exports.DomainSummaryFilterSensitiveLog = exports.ListDomainsRequestFilterSensitiveLog = exports.GetRepositoryPermissionsPolicyResultFilterSensitiveLog = exports.GetRepositoryPermissionsPolicyRequestFilterSensitiveLog = exports.GetRepositoryEndpointResultFilterSensitiveLog = exports.GetRepositoryEndpointRequestFilterSensitiveLog = exports.GetPackageVersionReadmeResultFilterSensitiveLog = exports.GetPackageVersionReadmeRequestFilterSensitiveLog = exports.GetPackageVersionAssetResultFilterSensitiveLog = exports.GetPackageVersionAssetRequestFilterSensitiveLog = exports.GetDomainPermissionsPolicyResultFilterSensitiveLog = exports.GetDomainPermissionsPolicyRequestFilterSensitiveLog = exports.GetAuthorizationTokenResultFilterSensitiveLog = exports.GetAuthorizationTokenRequestFilterSensitiveLog = exports.DisposePackageVersionsResultFilterSensitiveLog = exports.DisposePackageVersionsRequestFilterSensitiveLog = exports.DisassociateExternalConnectionResultFilterSensitiveLog = exports.DisassociateExternalConnectionRequestFilterSensitiveLog = exports.DescribeRepositoryResultFilterSensitiveLog = exports.DescribeRepositoryRequestFilterSensitiveLog = exports.DescribePackageVersionResultFilterSensitiveLog = exports.PackageVersionDescriptionFilterSensitiveLog = exports.PackageVersionOriginFilterSensitiveLog = exports.DomainEntryPointFilterSensitiveLog = exports.LicenseInfoFilterSensitiveLog = exports.DescribePackageVersionRequestFilterSensitiveLog = exports.DescribePackageResultFilterSensitiveLog = exports.PackageDescriptionFilterSensitiveLog = exports.DescribePackageRequestFilterSensitiveLog = exports.DescribeDomainResultFilterSensitiveLog = exports.DescribeDomainRequestFilterSensitiveLog = exports.DeleteRepositoryPermissionsPolicyResultFilterSensitiveLog = exports.DeleteRepositoryPermissionsPolicyRequestFilterSensitiveLog = void 0;
|
|
5
|
-
exports.UpdateRepositoryResultFilterSensitiveLog = exports.UpdateRepositoryRequestFilterSensitiveLog = exports.UpdatePackageVersionsStatusResultFilterSensitiveLog = exports.UpdatePackageVersionsStatusRequestFilterSensitiveLog = exports.UntagResourceResultFilterSensitiveLog = exports.UntagResourceRequestFilterSensitiveLog = exports.TagResourceResultFilterSensitiveLog = exports.TagResourceRequestFilterSensitiveLog = exports.PutRepositoryPermissionsPolicyResultFilterSensitiveLog = exports.PutRepositoryPermissionsPolicyRequestFilterSensitiveLog = exports.PutPackageOriginConfigurationResultFilterSensitiveLog = exports.PutPackageOriginConfigurationRequestFilterSensitiveLog = exports.PutDomainPermissionsPolicyResultFilterSensitiveLog = exports.PutDomainPermissionsPolicyRequestFilterSensitiveLog = exports.ListTagsForResourceResultFilterSensitiveLog = void 0;
|
|
5
|
+
exports.UpdateRepositoryResultFilterSensitiveLog = exports.UpdateRepositoryRequestFilterSensitiveLog = exports.UpdatePackageVersionsStatusResultFilterSensitiveLog = exports.UpdatePackageVersionsStatusRequestFilterSensitiveLog = exports.UntagResourceResultFilterSensitiveLog = exports.UntagResourceRequestFilterSensitiveLog = exports.TagResourceResultFilterSensitiveLog = exports.TagResourceRequestFilterSensitiveLog = exports.PutRepositoryPermissionsPolicyResultFilterSensitiveLog = exports.PutRepositoryPermissionsPolicyRequestFilterSensitiveLog = exports.PutPackageOriginConfigurationResultFilterSensitiveLog = exports.PutPackageOriginConfigurationRequestFilterSensitiveLog = exports.PutDomainPermissionsPolicyResultFilterSensitiveLog = exports.PutDomainPermissionsPolicyRequestFilterSensitiveLog = exports.PublishPackageVersionResultFilterSensitiveLog = exports.PublishPackageVersionRequestFilterSensitiveLog = exports.ListTagsForResourceResultFilterSensitiveLog = void 0;
|
|
6
6
|
const CodeartifactServiceException_1 = require("./CodeartifactServiceException");
|
|
7
7
|
class AccessDeniedException extends CodeartifactServiceException_1.CodeartifactServiceException {
|
|
8
8
|
constructor(opts) {
|
|
@@ -36,6 +36,7 @@ var HashAlgorithm;
|
|
|
36
36
|
})(HashAlgorithm = exports.HashAlgorithm || (exports.HashAlgorithm = {}));
|
|
37
37
|
var PackageFormat;
|
|
38
38
|
(function (PackageFormat) {
|
|
39
|
+
PackageFormat["GENERIC"] = "generic";
|
|
39
40
|
PackageFormat["MAVEN"] = "maven";
|
|
40
41
|
PackageFormat["NPM"] = "npm";
|
|
41
42
|
PackageFormat["NUGET"] = "nuget";
|
|
@@ -508,6 +509,14 @@ const ListTagsForResourceResultFilterSensitiveLog = (obj) => ({
|
|
|
508
509
|
...obj,
|
|
509
510
|
});
|
|
510
511
|
exports.ListTagsForResourceResultFilterSensitiveLog = ListTagsForResourceResultFilterSensitiveLog;
|
|
512
|
+
const PublishPackageVersionRequestFilterSensitiveLog = (obj) => ({
|
|
513
|
+
...obj,
|
|
514
|
+
});
|
|
515
|
+
exports.PublishPackageVersionRequestFilterSensitiveLog = PublishPackageVersionRequestFilterSensitiveLog;
|
|
516
|
+
const PublishPackageVersionResultFilterSensitiveLog = (obj) => ({
|
|
517
|
+
...obj,
|
|
518
|
+
});
|
|
519
|
+
exports.PublishPackageVersionResultFilterSensitiveLog = PublishPackageVersionResultFilterSensitiveLog;
|
|
511
520
|
const PutDomainPermissionsPolicyRequestFilterSensitiveLog = (obj) => ({
|
|
512
521
|
...obj,
|
|
513
522
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.deserializeAws_restJson1UpdateRepositoryCommand = exports.deserializeAws_restJson1UpdatePackageVersionsStatusCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1PutRepositoryPermissionsPolicyCommand = exports.deserializeAws_restJson1PutPackageOriginConfigurationCommand = exports.deserializeAws_restJson1PutDomainPermissionsPolicyCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListRepositoriesInDomainCommand = exports.deserializeAws_restJson1ListRepositoriesCommand = exports.deserializeAws_restJson1ListPackageVersionsCommand = exports.deserializeAws_restJson1ListPackageVersionDependenciesCommand = exports.deserializeAws_restJson1ListPackageVersionAssetsCommand = exports.deserializeAws_restJson1ListPackagesCommand = exports.deserializeAws_restJson1ListDomainsCommand = exports.deserializeAws_restJson1GetRepositoryPermissionsPolicyCommand = exports.deserializeAws_restJson1GetRepositoryEndpointCommand = exports.deserializeAws_restJson1GetPackageVersionReadmeCommand = exports.deserializeAws_restJson1GetPackageVersionAssetCommand = exports.deserializeAws_restJson1GetDomainPermissionsPolicyCommand = exports.deserializeAws_restJson1GetAuthorizationTokenCommand = exports.deserializeAws_restJson1DisposePackageVersionsCommand = exports.deserializeAws_restJson1DisassociateExternalConnectionCommand = exports.deserializeAws_restJson1DescribeRepositoryCommand = void 0;
|
|
3
|
+
exports.deserializeAws_restJson1DescribePackageCommand = exports.deserializeAws_restJson1DescribeDomainCommand = exports.deserializeAws_restJson1DeleteRepositoryPermissionsPolicyCommand = exports.deserializeAws_restJson1DeleteRepositoryCommand = exports.deserializeAws_restJson1DeletePackageVersionsCommand = exports.deserializeAws_restJson1DeletePackageCommand = exports.deserializeAws_restJson1DeleteDomainPermissionsPolicyCommand = exports.deserializeAws_restJson1DeleteDomainCommand = exports.deserializeAws_restJson1CreateRepositoryCommand = exports.deserializeAws_restJson1CreateDomainCommand = exports.deserializeAws_restJson1CopyPackageVersionsCommand = exports.deserializeAws_restJson1AssociateExternalConnectionCommand = exports.serializeAws_restJson1UpdateRepositoryCommand = exports.serializeAws_restJson1UpdatePackageVersionsStatusCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1PutRepositoryPermissionsPolicyCommand = exports.serializeAws_restJson1PutPackageOriginConfigurationCommand = exports.serializeAws_restJson1PutDomainPermissionsPolicyCommand = exports.serializeAws_restJson1PublishPackageVersionCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListRepositoriesInDomainCommand = exports.serializeAws_restJson1ListRepositoriesCommand = exports.serializeAws_restJson1ListPackageVersionsCommand = exports.serializeAws_restJson1ListPackageVersionDependenciesCommand = exports.serializeAws_restJson1ListPackageVersionAssetsCommand = exports.serializeAws_restJson1ListPackagesCommand = exports.serializeAws_restJson1ListDomainsCommand = exports.serializeAws_restJson1GetRepositoryPermissionsPolicyCommand = exports.serializeAws_restJson1GetRepositoryEndpointCommand = exports.serializeAws_restJson1GetPackageVersionReadmeCommand = exports.serializeAws_restJson1GetPackageVersionAssetCommand = exports.serializeAws_restJson1GetDomainPermissionsPolicyCommand = exports.serializeAws_restJson1GetAuthorizationTokenCommand = exports.serializeAws_restJson1DisposePackageVersionsCommand = exports.serializeAws_restJson1DisassociateExternalConnectionCommand = exports.serializeAws_restJson1DescribeRepositoryCommand = exports.serializeAws_restJson1DescribePackageVersionCommand = exports.serializeAws_restJson1DescribePackageCommand = exports.serializeAws_restJson1DescribeDomainCommand = exports.serializeAws_restJson1DeleteRepositoryPermissionsPolicyCommand = exports.serializeAws_restJson1DeleteRepositoryCommand = exports.serializeAws_restJson1DeletePackageVersionsCommand = exports.serializeAws_restJson1DeletePackageCommand = exports.serializeAws_restJson1DeleteDomainPermissionsPolicyCommand = exports.serializeAws_restJson1DeleteDomainCommand = exports.serializeAws_restJson1CreateRepositoryCommand = exports.serializeAws_restJson1CreateDomainCommand = exports.serializeAws_restJson1CopyPackageVersionsCommand = exports.serializeAws_restJson1AssociateExternalConnectionCommand = void 0;
|
|
4
|
+
exports.deserializeAws_restJson1UpdateRepositoryCommand = exports.deserializeAws_restJson1UpdatePackageVersionsStatusCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1PutRepositoryPermissionsPolicyCommand = exports.deserializeAws_restJson1PutPackageOriginConfigurationCommand = exports.deserializeAws_restJson1PutDomainPermissionsPolicyCommand = exports.deserializeAws_restJson1PublishPackageVersionCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListRepositoriesInDomainCommand = exports.deserializeAws_restJson1ListRepositoriesCommand = exports.deserializeAws_restJson1ListPackageVersionsCommand = exports.deserializeAws_restJson1ListPackageVersionDependenciesCommand = exports.deserializeAws_restJson1ListPackageVersionAssetsCommand = exports.deserializeAws_restJson1ListPackagesCommand = exports.deserializeAws_restJson1ListDomainsCommand = exports.deserializeAws_restJson1GetRepositoryPermissionsPolicyCommand = exports.deserializeAws_restJson1GetRepositoryEndpointCommand = exports.deserializeAws_restJson1GetPackageVersionReadmeCommand = exports.deserializeAws_restJson1GetPackageVersionAssetCommand = exports.deserializeAws_restJson1GetDomainPermissionsPolicyCommand = exports.deserializeAws_restJson1GetAuthorizationTokenCommand = exports.deserializeAws_restJson1DisposePackageVersionsCommand = exports.deserializeAws_restJson1DisassociateExternalConnectionCommand = exports.deserializeAws_restJson1DescribeRepositoryCommand = exports.deserializeAws_restJson1DescribePackageVersionCommand = void 0;
|
|
5
5
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
7
|
const CodeartifactServiceException_1 = require("../models/CodeartifactServiceException");
|
|
@@ -762,6 +762,40 @@ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context)
|
|
|
762
762
|
});
|
|
763
763
|
};
|
|
764
764
|
exports.serializeAws_restJson1ListTagsForResourceCommand = serializeAws_restJson1ListTagsForResourceCommand;
|
|
765
|
+
const serializeAws_restJson1PublishPackageVersionCommand = async (input, context) => {
|
|
766
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
767
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
768
|
+
"content-type": "application/octet-stream",
|
|
769
|
+
"x-amz-content-sha256": input.assetSHA256,
|
|
770
|
+
});
|
|
771
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package/version/publish";
|
|
772
|
+
const query = map({
|
|
773
|
+
domain: [, (0, smithy_client_1.expectNonNull)(input.domain, `domain`)],
|
|
774
|
+
"domain-owner": [, input.domainOwner],
|
|
775
|
+
repository: [, (0, smithy_client_1.expectNonNull)(input.repository, `repository`)],
|
|
776
|
+
format: [, (0, smithy_client_1.expectNonNull)(input.format, `format`)],
|
|
777
|
+
namespace: [, input.namespace],
|
|
778
|
+
package: [, (0, smithy_client_1.expectNonNull)(input.package, `package`)],
|
|
779
|
+
version: [, (0, smithy_client_1.expectNonNull)(input.packageVersion, `packageVersion`)],
|
|
780
|
+
asset: [, (0, smithy_client_1.expectNonNull)(input.assetName, `assetName`)],
|
|
781
|
+
unfinished: [() => input.unfinished !== void 0, () => input.unfinished.toString()],
|
|
782
|
+
});
|
|
783
|
+
let body;
|
|
784
|
+
if (input.assetContent !== undefined) {
|
|
785
|
+
body = input.assetContent;
|
|
786
|
+
}
|
|
787
|
+
return new protocol_http_1.HttpRequest({
|
|
788
|
+
protocol,
|
|
789
|
+
hostname,
|
|
790
|
+
port,
|
|
791
|
+
method: "POST",
|
|
792
|
+
headers,
|
|
793
|
+
path: resolvedPath,
|
|
794
|
+
query,
|
|
795
|
+
body,
|
|
796
|
+
});
|
|
797
|
+
};
|
|
798
|
+
exports.serializeAws_restJson1PublishPackageVersionCommand = serializeAws_restJson1PublishPackageVersionCommand;
|
|
765
799
|
const serializeAws_restJson1PutDomainPermissionsPolicyCommand = async (input, context) => {
|
|
766
800
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
767
801
|
const headers = {
|
|
@@ -2478,6 +2512,76 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
2478
2512
|
});
|
|
2479
2513
|
}
|
|
2480
2514
|
};
|
|
2515
|
+
const deserializeAws_restJson1PublishPackageVersionCommand = async (output, context) => {
|
|
2516
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2517
|
+
return deserializeAws_restJson1PublishPackageVersionCommandError(output, context);
|
|
2518
|
+
}
|
|
2519
|
+
const contents = map({
|
|
2520
|
+
$metadata: deserializeMetadata(output),
|
|
2521
|
+
});
|
|
2522
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2523
|
+
if (data.asset != null) {
|
|
2524
|
+
contents.asset = deserializeAws_restJson1AssetSummary(data.asset, context);
|
|
2525
|
+
}
|
|
2526
|
+
if (data.format != null) {
|
|
2527
|
+
contents.format = (0, smithy_client_1.expectString)(data.format);
|
|
2528
|
+
}
|
|
2529
|
+
if (data.namespace != null) {
|
|
2530
|
+
contents.namespace = (0, smithy_client_1.expectString)(data.namespace);
|
|
2531
|
+
}
|
|
2532
|
+
if (data.package != null) {
|
|
2533
|
+
contents.package = (0, smithy_client_1.expectString)(data.package);
|
|
2534
|
+
}
|
|
2535
|
+
if (data.status != null) {
|
|
2536
|
+
contents.status = (0, smithy_client_1.expectString)(data.status);
|
|
2537
|
+
}
|
|
2538
|
+
if (data.version != null) {
|
|
2539
|
+
contents.version = (0, smithy_client_1.expectString)(data.version);
|
|
2540
|
+
}
|
|
2541
|
+
if (data.versionRevision != null) {
|
|
2542
|
+
contents.versionRevision = (0, smithy_client_1.expectString)(data.versionRevision);
|
|
2543
|
+
}
|
|
2544
|
+
return contents;
|
|
2545
|
+
};
|
|
2546
|
+
exports.deserializeAws_restJson1PublishPackageVersionCommand = deserializeAws_restJson1PublishPackageVersionCommand;
|
|
2547
|
+
const deserializeAws_restJson1PublishPackageVersionCommandError = async (output, context) => {
|
|
2548
|
+
const parsedOutput = {
|
|
2549
|
+
...output,
|
|
2550
|
+
body: await parseErrorBody(output.body, context),
|
|
2551
|
+
};
|
|
2552
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2553
|
+
switch (errorCode) {
|
|
2554
|
+
case "AccessDeniedException":
|
|
2555
|
+
case "com.amazonaws.codeartifact#AccessDeniedException":
|
|
2556
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
2557
|
+
case "ConflictException":
|
|
2558
|
+
case "com.amazonaws.codeartifact#ConflictException":
|
|
2559
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
2560
|
+
case "InternalServerException":
|
|
2561
|
+
case "com.amazonaws.codeartifact#InternalServerException":
|
|
2562
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2563
|
+
case "ResourceNotFoundException":
|
|
2564
|
+
case "com.amazonaws.codeartifact#ResourceNotFoundException":
|
|
2565
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2566
|
+
case "ServiceQuotaExceededException":
|
|
2567
|
+
case "com.amazonaws.codeartifact#ServiceQuotaExceededException":
|
|
2568
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
2569
|
+
case "ThrottlingException":
|
|
2570
|
+
case "com.amazonaws.codeartifact#ThrottlingException":
|
|
2571
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2572
|
+
case "ValidationException":
|
|
2573
|
+
case "com.amazonaws.codeartifact#ValidationException":
|
|
2574
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2575
|
+
default:
|
|
2576
|
+
const parsedBody = parsedOutput.body;
|
|
2577
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2578
|
+
output,
|
|
2579
|
+
parsedBody,
|
|
2580
|
+
exceptionCtor: CodeartifactServiceException_1.CodeartifactServiceException,
|
|
2581
|
+
errorCode,
|
|
2582
|
+
});
|
|
2583
|
+
}
|
|
2584
|
+
};
|
|
2481
2585
|
const deserializeAws_restJson1PutDomainPermissionsPolicyCommand = async (output, context) => {
|
|
2482
2586
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2483
2587
|
return deserializeAws_restJson1PutDomainPermissionsPolicyCommandError(output, context);
|
package/dist-es/Codeartifact.js
CHANGED
|
@@ -29,6 +29,7 @@ import { ListPackageVersionsCommand, } from "./commands/ListPackageVersionsComma
|
|
|
29
29
|
import { ListRepositoriesCommand, } from "./commands/ListRepositoriesCommand";
|
|
30
30
|
import { ListRepositoriesInDomainCommand, } from "./commands/ListRepositoriesInDomainCommand";
|
|
31
31
|
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
32
|
+
import { PublishPackageVersionCommand, } from "./commands/PublishPackageVersionCommand";
|
|
32
33
|
import { PutDomainPermissionsPolicyCommand, } from "./commands/PutDomainPermissionsPolicyCommand";
|
|
33
34
|
import { PutPackageOriginConfigurationCommand, } from "./commands/PutPackageOriginConfigurationCommand";
|
|
34
35
|
import { PutRepositoryPermissionsPolicyCommand, } from "./commands/PutRepositoryPermissionsPolicyCommand";
|
|
@@ -457,6 +458,20 @@ export class Codeartifact extends CodeartifactClient {
|
|
|
457
458
|
return this.send(command, optionsOrCb);
|
|
458
459
|
}
|
|
459
460
|
}
|
|
461
|
+
publishPackageVersion(args, optionsOrCb, cb) {
|
|
462
|
+
const command = new PublishPackageVersionCommand(args);
|
|
463
|
+
if (typeof optionsOrCb === "function") {
|
|
464
|
+
this.send(command, optionsOrCb);
|
|
465
|
+
}
|
|
466
|
+
else if (typeof cb === "function") {
|
|
467
|
+
if (typeof optionsOrCb !== "object")
|
|
468
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
469
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
470
|
+
}
|
|
471
|
+
else {
|
|
472
|
+
return this.send(command, optionsOrCb);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
460
475
|
putDomainPermissionsPolicy(args, optionsOrCb, cb) {
|
|
461
476
|
const command = new PutDomainPermissionsPolicyCommand(args);
|
|
462
477
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { PublishPackageVersionRequestFilterSensitiveLog, PublishPackageVersionResultFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_restJson1PublishPackageVersionCommand, serializeAws_restJson1PublishPackageVersionCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
export class PublishPackageVersionCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
10
|
+
}
|
|
11
|
+
static getEndpointParameterInstructions() {
|
|
12
|
+
return {
|
|
13
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
14
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
15
|
+
Region: { type: "builtInParams", name: "region" },
|
|
16
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, PublishPackageVersionCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "CodeartifactClient";
|
|
25
|
+
const commandName = "PublishPackageVersionCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: PublishPackageVersionRequestFilterSensitiveLog,
|
|
31
|
+
outputFilterSensitiveLog: PublishPackageVersionResultFilterSensitiveLog,
|
|
32
|
+
};
|
|
33
|
+
const { requestHandler } = configuration;
|
|
34
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
|
+
}
|
|
36
|
+
serialize(input, context) {
|
|
37
|
+
return serializeAws_restJson1PublishPackageVersionCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return deserializeAws_restJson1PublishPackageVersionCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -28,6 +28,7 @@ export * from "./ListPackagesCommand";
|
|
|
28
28
|
export * from "./ListRepositoriesCommand";
|
|
29
29
|
export * from "./ListRepositoriesInDomainCommand";
|
|
30
30
|
export * from "./ListTagsForResourceCommand";
|
|
31
|
+
export * from "./PublishPackageVersionCommand";
|
|
31
32
|
export * from "./PutDomainPermissionsPolicyCommand";
|
|
32
33
|
export * from "./PutPackageOriginConfigurationCommand";
|
|
33
34
|
export * from "./PutRepositoryPermissionsPolicyCommand";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const q = "
|
|
2
|
-
const a =
|
|
3
|
-
const _data = { version: "1.0", parameters: { Region:
|
|
1
|
+
const q = "required", r = "fn", s = "argv", t = "ref";
|
|
2
|
+
const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = { [q]: false, "type": "String" }, g = { [q]: true, "default": false, "type": "Boolean" }, h = { [t]: "Endpoint" }, i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }, j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }, k = {}, l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }, m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }, n = [i], o = [j], p = [{ [t]: "Region" }];
|
|
3
|
+
const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://codeartifact-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://codeartifact-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://codeartifact.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://codeartifact.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
|
|
4
4
|
export const ruleSet = _data;
|
|
@@ -30,6 +30,7 @@ export var HashAlgorithm;
|
|
|
30
30
|
})(HashAlgorithm || (HashAlgorithm = {}));
|
|
31
31
|
export var PackageFormat;
|
|
32
32
|
(function (PackageFormat) {
|
|
33
|
+
PackageFormat["GENERIC"] = "generic";
|
|
33
34
|
PackageFormat["MAVEN"] = "maven";
|
|
34
35
|
PackageFormat["NPM"] = "npm";
|
|
35
36
|
PackageFormat["NUGET"] = "nuget";
|
|
@@ -414,6 +415,12 @@ export const ListTagsForResourceRequestFilterSensitiveLog = (obj) => ({
|
|
|
414
415
|
export const ListTagsForResourceResultFilterSensitiveLog = (obj) => ({
|
|
415
416
|
...obj,
|
|
416
417
|
});
|
|
418
|
+
export const PublishPackageVersionRequestFilterSensitiveLog = (obj) => ({
|
|
419
|
+
...obj,
|
|
420
|
+
});
|
|
421
|
+
export const PublishPackageVersionResultFilterSensitiveLog = (obj) => ({
|
|
422
|
+
...obj,
|
|
423
|
+
});
|
|
417
424
|
export const PutDomainPermissionsPolicyRequestFilterSensitiveLog = (obj) => ({
|
|
418
425
|
...obj,
|
|
419
426
|
});
|
|
@@ -728,6 +728,39 @@ export const serializeAws_restJson1ListTagsForResourceCommand = async (input, co
|
|
|
728
728
|
body,
|
|
729
729
|
});
|
|
730
730
|
};
|
|
731
|
+
export const serializeAws_restJson1PublishPackageVersionCommand = async (input, context) => {
|
|
732
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
733
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
734
|
+
"content-type": "application/octet-stream",
|
|
735
|
+
"x-amz-content-sha256": input.assetSHA256,
|
|
736
|
+
});
|
|
737
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package/version/publish";
|
|
738
|
+
const query = map({
|
|
739
|
+
domain: [, __expectNonNull(input.domain, `domain`)],
|
|
740
|
+
"domain-owner": [, input.domainOwner],
|
|
741
|
+
repository: [, __expectNonNull(input.repository, `repository`)],
|
|
742
|
+
format: [, __expectNonNull(input.format, `format`)],
|
|
743
|
+
namespace: [, input.namespace],
|
|
744
|
+
package: [, __expectNonNull(input.package, `package`)],
|
|
745
|
+
version: [, __expectNonNull(input.packageVersion, `packageVersion`)],
|
|
746
|
+
asset: [, __expectNonNull(input.assetName, `assetName`)],
|
|
747
|
+
unfinished: [() => input.unfinished !== void 0, () => input.unfinished.toString()],
|
|
748
|
+
});
|
|
749
|
+
let body;
|
|
750
|
+
if (input.assetContent !== undefined) {
|
|
751
|
+
body = input.assetContent;
|
|
752
|
+
}
|
|
753
|
+
return new __HttpRequest({
|
|
754
|
+
protocol,
|
|
755
|
+
hostname,
|
|
756
|
+
port,
|
|
757
|
+
method: "POST",
|
|
758
|
+
headers,
|
|
759
|
+
path: resolvedPath,
|
|
760
|
+
query,
|
|
761
|
+
body,
|
|
762
|
+
});
|
|
763
|
+
};
|
|
731
764
|
export const serializeAws_restJson1PutDomainPermissionsPolicyCommand = async (input, context) => {
|
|
732
765
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
733
766
|
const headers = {
|
|
@@ -2407,6 +2440,75 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
2407
2440
|
});
|
|
2408
2441
|
}
|
|
2409
2442
|
};
|
|
2443
|
+
export const deserializeAws_restJson1PublishPackageVersionCommand = async (output, context) => {
|
|
2444
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2445
|
+
return deserializeAws_restJson1PublishPackageVersionCommandError(output, context);
|
|
2446
|
+
}
|
|
2447
|
+
const contents = map({
|
|
2448
|
+
$metadata: deserializeMetadata(output),
|
|
2449
|
+
});
|
|
2450
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2451
|
+
if (data.asset != null) {
|
|
2452
|
+
contents.asset = deserializeAws_restJson1AssetSummary(data.asset, context);
|
|
2453
|
+
}
|
|
2454
|
+
if (data.format != null) {
|
|
2455
|
+
contents.format = __expectString(data.format);
|
|
2456
|
+
}
|
|
2457
|
+
if (data.namespace != null) {
|
|
2458
|
+
contents.namespace = __expectString(data.namespace);
|
|
2459
|
+
}
|
|
2460
|
+
if (data.package != null) {
|
|
2461
|
+
contents.package = __expectString(data.package);
|
|
2462
|
+
}
|
|
2463
|
+
if (data.status != null) {
|
|
2464
|
+
contents.status = __expectString(data.status);
|
|
2465
|
+
}
|
|
2466
|
+
if (data.version != null) {
|
|
2467
|
+
contents.version = __expectString(data.version);
|
|
2468
|
+
}
|
|
2469
|
+
if (data.versionRevision != null) {
|
|
2470
|
+
contents.versionRevision = __expectString(data.versionRevision);
|
|
2471
|
+
}
|
|
2472
|
+
return contents;
|
|
2473
|
+
};
|
|
2474
|
+
const deserializeAws_restJson1PublishPackageVersionCommandError = async (output, context) => {
|
|
2475
|
+
const parsedOutput = {
|
|
2476
|
+
...output,
|
|
2477
|
+
body: await parseErrorBody(output.body, context),
|
|
2478
|
+
};
|
|
2479
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2480
|
+
switch (errorCode) {
|
|
2481
|
+
case "AccessDeniedException":
|
|
2482
|
+
case "com.amazonaws.codeartifact#AccessDeniedException":
|
|
2483
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
2484
|
+
case "ConflictException":
|
|
2485
|
+
case "com.amazonaws.codeartifact#ConflictException":
|
|
2486
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
2487
|
+
case "InternalServerException":
|
|
2488
|
+
case "com.amazonaws.codeartifact#InternalServerException":
|
|
2489
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2490
|
+
case "ResourceNotFoundException":
|
|
2491
|
+
case "com.amazonaws.codeartifact#ResourceNotFoundException":
|
|
2492
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2493
|
+
case "ServiceQuotaExceededException":
|
|
2494
|
+
case "com.amazonaws.codeartifact#ServiceQuotaExceededException":
|
|
2495
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
2496
|
+
case "ThrottlingException":
|
|
2497
|
+
case "com.amazonaws.codeartifact#ThrottlingException":
|
|
2498
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2499
|
+
case "ValidationException":
|
|
2500
|
+
case "com.amazonaws.codeartifact#ValidationException":
|
|
2501
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2502
|
+
default:
|
|
2503
|
+
const parsedBody = parsedOutput.body;
|
|
2504
|
+
throwDefaultError({
|
|
2505
|
+
output,
|
|
2506
|
+
parsedBody,
|
|
2507
|
+
exceptionCtor: __BaseException,
|
|
2508
|
+
errorCode,
|
|
2509
|
+
});
|
|
2510
|
+
}
|
|
2511
|
+
};
|
|
2410
2512
|
export const deserializeAws_restJson1PutDomainPermissionsPolicyCommand = async (output, context) => {
|
|
2411
2513
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2412
2514
|
return deserializeAws_restJson1PutDomainPermissionsPolicyCommandError(output, context);
|