@aws-sdk/client-codeartifact 3.121.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 +32 -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 +253 -69
- 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 +271 -53
- 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 +26 -26
|
@@ -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_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 = void 0;
|
|
3
|
+
exports.deserializeAws_restJson1DisassociateExternalConnectionCommand = exports.deserializeAws_restJson1DescribeRepositoryCommand = exports.deserializeAws_restJson1DescribePackageVersionCommand = exports.deserializeAws_restJson1DescribePackageCommand = exports.deserializeAws_restJson1DescribeDomainCommand = exports.deserializeAws_restJson1DeleteRepositoryPermissionsPolicyCommand = exports.deserializeAws_restJson1DeleteRepositoryCommand = exports.deserializeAws_restJson1DeletePackageVersionsCommand = 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_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_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_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 = 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");
|
|
@@ -46,16 +46,12 @@ const serializeAws_restJson1CopyPackageVersionsCommand = async (input, context)
|
|
|
46
46
|
};
|
|
47
47
|
let body;
|
|
48
48
|
body = JSON.stringify({
|
|
49
|
-
...(input.allowOverwrite
|
|
50
|
-
|
|
51
|
-
...(input.
|
|
52
|
-
input.includeFromUpstream !== null && { includeFromUpstream: input.includeFromUpstream }),
|
|
53
|
-
...(input.versionRevisions !== undefined &&
|
|
54
|
-
input.versionRevisions !== null && {
|
|
49
|
+
...(input.allowOverwrite != null && { allowOverwrite: input.allowOverwrite }),
|
|
50
|
+
...(input.includeFromUpstream != null && { includeFromUpstream: input.includeFromUpstream }),
|
|
51
|
+
...(input.versionRevisions != null && {
|
|
55
52
|
versionRevisions: serializeAws_restJson1PackageVersionRevisionMap(input.versionRevisions, context),
|
|
56
53
|
}),
|
|
57
|
-
...(input.versions
|
|
58
|
-
input.versions !== null && { versions: serializeAws_restJson1PackageVersionList(input.versions, context) }),
|
|
54
|
+
...(input.versions != null && { versions: serializeAws_restJson1PackageVersionList(input.versions, context) }),
|
|
59
55
|
});
|
|
60
56
|
return new protocol_http_1.HttpRequest({
|
|
61
57
|
protocol,
|
|
@@ -80,9 +76,8 @@ const serializeAws_restJson1CreateDomainCommand = async (input, context) => {
|
|
|
80
76
|
};
|
|
81
77
|
let body;
|
|
82
78
|
body = JSON.stringify({
|
|
83
|
-
...(input.encryptionKey
|
|
84
|
-
...(input.tags
|
|
85
|
-
input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
|
|
79
|
+
...(input.encryptionKey != null && { encryptionKey: input.encryptionKey }),
|
|
80
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
|
|
86
81
|
});
|
|
87
82
|
return new protocol_http_1.HttpRequest({
|
|
88
83
|
protocol,
|
|
@@ -109,11 +104,9 @@ const serializeAws_restJson1CreateRepositoryCommand = async (input, context) =>
|
|
|
109
104
|
};
|
|
110
105
|
let body;
|
|
111
106
|
body = JSON.stringify({
|
|
112
|
-
...(input.description
|
|
113
|
-
...(input.tags
|
|
114
|
-
|
|
115
|
-
...(input.upstreams !== undefined &&
|
|
116
|
-
input.upstreams !== null && {
|
|
107
|
+
...(input.description != null && { description: input.description }),
|
|
108
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
|
|
109
|
+
...(input.upstreams != null && {
|
|
117
110
|
upstreams: serializeAws_restJson1UpstreamRepositoryList(input.upstreams, context),
|
|
118
111
|
}),
|
|
119
112
|
});
|
|
@@ -188,10 +181,8 @@ const serializeAws_restJson1DeletePackageVersionsCommand = async (input, context
|
|
|
188
181
|
};
|
|
189
182
|
let body;
|
|
190
183
|
body = JSON.stringify({
|
|
191
|
-
...(input.expectedStatus
|
|
192
|
-
|
|
193
|
-
...(input.versions !== undefined &&
|
|
194
|
-
input.versions !== null && { versions: serializeAws_restJson1PackageVersionList(input.versions, context) }),
|
|
184
|
+
...(input.expectedStatus != null && { expectedStatus: input.expectedStatus }),
|
|
185
|
+
...(input.versions != null && { versions: serializeAws_restJson1PackageVersionList(input.versions, context) }),
|
|
195
186
|
});
|
|
196
187
|
return new protocol_http_1.HttpRequest({
|
|
197
188
|
protocol,
|
|
@@ -271,6 +262,31 @@ const serializeAws_restJson1DescribeDomainCommand = async (input, context) => {
|
|
|
271
262
|
});
|
|
272
263
|
};
|
|
273
264
|
exports.serializeAws_restJson1DescribeDomainCommand = serializeAws_restJson1DescribeDomainCommand;
|
|
265
|
+
const serializeAws_restJson1DescribePackageCommand = async (input, context) => {
|
|
266
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
267
|
+
const headers = {};
|
|
268
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package";
|
|
269
|
+
const query = {
|
|
270
|
+
...(input.domain !== undefined && { domain: input.domain }),
|
|
271
|
+
...(input.domainOwner !== undefined && { "domain-owner": input.domainOwner }),
|
|
272
|
+
...(input.repository !== undefined && { repository: input.repository }),
|
|
273
|
+
...(input.format !== undefined && { format: input.format }),
|
|
274
|
+
...(input.namespace !== undefined && { namespace: input.namespace }),
|
|
275
|
+
...(input.package !== undefined && { package: input.package }),
|
|
276
|
+
};
|
|
277
|
+
let body;
|
|
278
|
+
return new protocol_http_1.HttpRequest({
|
|
279
|
+
protocol,
|
|
280
|
+
hostname,
|
|
281
|
+
port,
|
|
282
|
+
method: "GET",
|
|
283
|
+
headers,
|
|
284
|
+
path: resolvedPath,
|
|
285
|
+
query,
|
|
286
|
+
body,
|
|
287
|
+
});
|
|
288
|
+
};
|
|
289
|
+
exports.serializeAws_restJson1DescribePackageCommand = serializeAws_restJson1DescribePackageCommand;
|
|
274
290
|
const serializeAws_restJson1DescribePackageVersionCommand = async (input, context) => {
|
|
275
291
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
276
292
|
const headers = {};
|
|
@@ -358,14 +374,11 @@ const serializeAws_restJson1DisposePackageVersionsCommand = async (input, contex
|
|
|
358
374
|
};
|
|
359
375
|
let body;
|
|
360
376
|
body = JSON.stringify({
|
|
361
|
-
...(input.expectedStatus
|
|
362
|
-
|
|
363
|
-
...(input.versionRevisions !== undefined &&
|
|
364
|
-
input.versionRevisions !== null && {
|
|
377
|
+
...(input.expectedStatus != null && { expectedStatus: input.expectedStatus }),
|
|
378
|
+
...(input.versionRevisions != null && {
|
|
365
379
|
versionRevisions: serializeAws_restJson1PackageVersionRevisionMap(input.versionRevisions, context),
|
|
366
380
|
}),
|
|
367
|
-
...(input.versions
|
|
368
|
-
input.versions !== null && { versions: serializeAws_restJson1PackageVersionList(input.versions, context) }),
|
|
381
|
+
...(input.versions != null && { versions: serializeAws_restJson1PackageVersionList(input.versions, context) }),
|
|
369
382
|
});
|
|
370
383
|
return new protocol_http_1.HttpRequest({
|
|
371
384
|
protocol,
|
|
@@ -529,8 +542,8 @@ const serializeAws_restJson1ListDomainsCommand = async (input, context) => {
|
|
|
529
542
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/domains";
|
|
530
543
|
let body;
|
|
531
544
|
body = JSON.stringify({
|
|
532
|
-
...(input.maxResults
|
|
533
|
-
...(input.nextToken
|
|
545
|
+
...(input.maxResults != null && { maxResults: input.maxResults }),
|
|
546
|
+
...(input.nextToken != null && { nextToken: input.nextToken }),
|
|
534
547
|
});
|
|
535
548
|
return new protocol_http_1.HttpRequest({
|
|
536
549
|
protocol,
|
|
@@ -556,6 +569,8 @@ const serializeAws_restJson1ListPackagesCommand = async (input, context) => {
|
|
|
556
569
|
...(input.packagePrefix !== undefined && { "package-prefix": input.packagePrefix }),
|
|
557
570
|
...(input.maxResults !== undefined && { "max-results": input.maxResults.toString() }),
|
|
558
571
|
...(input.nextToken !== undefined && { "next-token": input.nextToken }),
|
|
572
|
+
...(input.publish !== undefined && { publish: input.publish }),
|
|
573
|
+
...(input.upstream !== undefined && { upstream: input.upstream }),
|
|
559
574
|
};
|
|
560
575
|
let body;
|
|
561
576
|
return new protocol_http_1.HttpRequest({
|
|
@@ -640,6 +655,7 @@ const serializeAws_restJson1ListPackageVersionsCommand = async (input, context)
|
|
|
640
655
|
...(input.sortBy !== undefined && { sortBy: input.sortBy }),
|
|
641
656
|
...(input.maxResults !== undefined && { "max-results": input.maxResults.toString() }),
|
|
642
657
|
...(input.nextToken !== undefined && { "next-token": input.nextToken }),
|
|
658
|
+
...(input.originType !== undefined && { originType: input.originType }),
|
|
643
659
|
};
|
|
644
660
|
let body;
|
|
645
661
|
return new protocol_http_1.HttpRequest({
|
|
@@ -729,12 +745,10 @@ const serializeAws_restJson1PutDomainPermissionsPolicyCommand = async (input, co
|
|
|
729
745
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/domain/permissions/policy";
|
|
730
746
|
let body;
|
|
731
747
|
body = JSON.stringify({
|
|
732
|
-
...(input.domain
|
|
733
|
-
...(input.domainOwner
|
|
734
|
-
...(input.policyDocument
|
|
735
|
-
|
|
736
|
-
...(input.policyRevision !== undefined &&
|
|
737
|
-
input.policyRevision !== null && { policyRevision: input.policyRevision }),
|
|
748
|
+
...(input.domain != null && { domain: input.domain }),
|
|
749
|
+
...(input.domainOwner != null && { domainOwner: input.domainOwner }),
|
|
750
|
+
...(input.policyDocument != null && { policyDocument: input.policyDocument }),
|
|
751
|
+
...(input.policyRevision != null && { policyRevision: input.policyRevision }),
|
|
738
752
|
});
|
|
739
753
|
return new protocol_http_1.HttpRequest({
|
|
740
754
|
protocol,
|
|
@@ -747,6 +761,38 @@ const serializeAws_restJson1PutDomainPermissionsPolicyCommand = async (input, co
|
|
|
747
761
|
});
|
|
748
762
|
};
|
|
749
763
|
exports.serializeAws_restJson1PutDomainPermissionsPolicyCommand = serializeAws_restJson1PutDomainPermissionsPolicyCommand;
|
|
764
|
+
const serializeAws_restJson1PutPackageOriginConfigurationCommand = async (input, context) => {
|
|
765
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
766
|
+
const headers = {
|
|
767
|
+
"content-type": "application/json",
|
|
768
|
+
};
|
|
769
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package";
|
|
770
|
+
const query = {
|
|
771
|
+
...(input.domain !== undefined && { domain: input.domain }),
|
|
772
|
+
...(input.domainOwner !== undefined && { "domain-owner": input.domainOwner }),
|
|
773
|
+
...(input.repository !== undefined && { repository: input.repository }),
|
|
774
|
+
...(input.format !== undefined && { format: input.format }),
|
|
775
|
+
...(input.namespace !== undefined && { namespace: input.namespace }),
|
|
776
|
+
...(input.package !== undefined && { package: input.package }),
|
|
777
|
+
};
|
|
778
|
+
let body;
|
|
779
|
+
body = JSON.stringify({
|
|
780
|
+
...(input.restrictions != null && {
|
|
781
|
+
restrictions: serializeAws_restJson1PackageOriginRestrictions(input.restrictions, context),
|
|
782
|
+
}),
|
|
783
|
+
});
|
|
784
|
+
return new protocol_http_1.HttpRequest({
|
|
785
|
+
protocol,
|
|
786
|
+
hostname,
|
|
787
|
+
port,
|
|
788
|
+
method: "POST",
|
|
789
|
+
headers,
|
|
790
|
+
path: resolvedPath,
|
|
791
|
+
query,
|
|
792
|
+
body,
|
|
793
|
+
});
|
|
794
|
+
};
|
|
795
|
+
exports.serializeAws_restJson1PutPackageOriginConfigurationCommand = serializeAws_restJson1PutPackageOriginConfigurationCommand;
|
|
750
796
|
const serializeAws_restJson1PutRepositoryPermissionsPolicyCommand = async (input, context) => {
|
|
751
797
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
752
798
|
const headers = {
|
|
@@ -760,10 +806,8 @@ const serializeAws_restJson1PutRepositoryPermissionsPolicyCommand = async (input
|
|
|
760
806
|
};
|
|
761
807
|
let body;
|
|
762
808
|
body = JSON.stringify({
|
|
763
|
-
...(input.policyDocument
|
|
764
|
-
|
|
765
|
-
...(input.policyRevision !== undefined &&
|
|
766
|
-
input.policyRevision !== null && { policyRevision: input.policyRevision }),
|
|
809
|
+
...(input.policyDocument != null && { policyDocument: input.policyDocument }),
|
|
810
|
+
...(input.policyRevision != null && { policyRevision: input.policyRevision }),
|
|
767
811
|
});
|
|
768
812
|
return new protocol_http_1.HttpRequest({
|
|
769
813
|
protocol,
|
|
@@ -788,8 +832,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
|
788
832
|
};
|
|
789
833
|
let body;
|
|
790
834
|
body = JSON.stringify({
|
|
791
|
-
...(input.tags
|
|
792
|
-
input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
|
|
835
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
|
|
793
836
|
});
|
|
794
837
|
return new protocol_http_1.HttpRequest({
|
|
795
838
|
protocol,
|
|
@@ -814,8 +857,7 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
|
814
857
|
};
|
|
815
858
|
let body;
|
|
816
859
|
body = JSON.stringify({
|
|
817
|
-
...(input.tagKeys
|
|
818
|
-
input.tagKeys !== null && { tagKeys: serializeAws_restJson1TagKeyList(input.tagKeys, context) }),
|
|
860
|
+
...(input.tagKeys != null && { tagKeys: serializeAws_restJson1TagKeyList(input.tagKeys, context) }),
|
|
819
861
|
});
|
|
820
862
|
return new protocol_http_1.HttpRequest({
|
|
821
863
|
protocol,
|
|
@@ -845,15 +887,12 @@ const serializeAws_restJson1UpdatePackageVersionsStatusCommand = async (input, c
|
|
|
845
887
|
};
|
|
846
888
|
let body;
|
|
847
889
|
body = JSON.stringify({
|
|
848
|
-
...(input.expectedStatus
|
|
849
|
-
|
|
850
|
-
...(input.
|
|
851
|
-
...(input.versionRevisions !== undefined &&
|
|
852
|
-
input.versionRevisions !== null && {
|
|
890
|
+
...(input.expectedStatus != null && { expectedStatus: input.expectedStatus }),
|
|
891
|
+
...(input.targetStatus != null && { targetStatus: input.targetStatus }),
|
|
892
|
+
...(input.versionRevisions != null && {
|
|
853
893
|
versionRevisions: serializeAws_restJson1PackageVersionRevisionMap(input.versionRevisions, context),
|
|
854
894
|
}),
|
|
855
|
-
...(input.versions
|
|
856
|
-
input.versions !== null && { versions: serializeAws_restJson1PackageVersionList(input.versions, context) }),
|
|
895
|
+
...(input.versions != null && { versions: serializeAws_restJson1PackageVersionList(input.versions, context) }),
|
|
857
896
|
});
|
|
858
897
|
return new protocol_http_1.HttpRequest({
|
|
859
898
|
protocol,
|
|
@@ -880,9 +919,8 @@ const serializeAws_restJson1UpdateRepositoryCommand = async (input, context) =>
|
|
|
880
919
|
};
|
|
881
920
|
let body;
|
|
882
921
|
body = JSON.stringify({
|
|
883
|
-
...(input.description
|
|
884
|
-
...(input.upstreams
|
|
885
|
-
input.upstreams !== null && {
|
|
922
|
+
...(input.description != null && { description: input.description }),
|
|
923
|
+
...(input.upstreams != null && {
|
|
886
924
|
upstreams: serializeAws_restJson1UpstreamRepositoryList(input.upstreams, context),
|
|
887
925
|
}),
|
|
888
926
|
});
|
|
@@ -1442,6 +1480,56 @@ const deserializeAws_restJson1DescribeDomainCommandError = async (output, contex
|
|
|
1442
1480
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1443
1481
|
}
|
|
1444
1482
|
};
|
|
1483
|
+
const deserializeAws_restJson1DescribePackageCommand = async (output, context) => {
|
|
1484
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1485
|
+
return deserializeAws_restJson1DescribePackageCommandError(output, context);
|
|
1486
|
+
}
|
|
1487
|
+
const contents = {
|
|
1488
|
+
$metadata: deserializeMetadata(output),
|
|
1489
|
+
package: undefined,
|
|
1490
|
+
};
|
|
1491
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1492
|
+
if (data.package !== undefined && data.package !== null) {
|
|
1493
|
+
contents.package = deserializeAws_restJson1PackageDescription(data.package, context);
|
|
1494
|
+
}
|
|
1495
|
+
return Promise.resolve(contents);
|
|
1496
|
+
};
|
|
1497
|
+
exports.deserializeAws_restJson1DescribePackageCommand = deserializeAws_restJson1DescribePackageCommand;
|
|
1498
|
+
const deserializeAws_restJson1DescribePackageCommandError = async (output, context) => {
|
|
1499
|
+
const parsedOutput = {
|
|
1500
|
+
...output,
|
|
1501
|
+
body: await parseBody(output.body, context),
|
|
1502
|
+
};
|
|
1503
|
+
let response;
|
|
1504
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1505
|
+
switch (errorCode) {
|
|
1506
|
+
case "AccessDeniedException":
|
|
1507
|
+
case "com.amazonaws.codeartifact#AccessDeniedException":
|
|
1508
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1509
|
+
case "InternalServerException":
|
|
1510
|
+
case "com.amazonaws.codeartifact#InternalServerException":
|
|
1511
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1512
|
+
case "ResourceNotFoundException":
|
|
1513
|
+
case "com.amazonaws.codeartifact#ResourceNotFoundException":
|
|
1514
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1515
|
+
case "ThrottlingException":
|
|
1516
|
+
case "com.amazonaws.codeartifact#ThrottlingException":
|
|
1517
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1518
|
+
case "ValidationException":
|
|
1519
|
+
case "com.amazonaws.codeartifact#ValidationException":
|
|
1520
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1521
|
+
default:
|
|
1522
|
+
const parsedBody = parsedOutput.body;
|
|
1523
|
+
const $metadata = deserializeMetadata(output);
|
|
1524
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1525
|
+
response = new CodeartifactServiceException_1.CodeartifactServiceException({
|
|
1526
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1527
|
+
$fault: "client",
|
|
1528
|
+
$metadata,
|
|
1529
|
+
});
|
|
1530
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1531
|
+
}
|
|
1532
|
+
};
|
|
1445
1533
|
const deserializeAws_restJson1DescribePackageVersionCommand = async (output, context) => {
|
|
1446
1534
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1447
1535
|
return deserializeAws_restJson1DescribePackageVersionCommandError(output, context);
|
|
@@ -2526,6 +2614,56 @@ const deserializeAws_restJson1PutDomainPermissionsPolicyCommandError = async (ou
|
|
|
2526
2614
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2527
2615
|
}
|
|
2528
2616
|
};
|
|
2617
|
+
const deserializeAws_restJson1PutPackageOriginConfigurationCommand = async (output, context) => {
|
|
2618
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2619
|
+
return deserializeAws_restJson1PutPackageOriginConfigurationCommandError(output, context);
|
|
2620
|
+
}
|
|
2621
|
+
const contents = {
|
|
2622
|
+
$metadata: deserializeMetadata(output),
|
|
2623
|
+
originConfiguration: undefined,
|
|
2624
|
+
};
|
|
2625
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2626
|
+
if (data.originConfiguration !== undefined && data.originConfiguration !== null) {
|
|
2627
|
+
contents.originConfiguration = deserializeAws_restJson1PackageOriginConfiguration(data.originConfiguration, context);
|
|
2628
|
+
}
|
|
2629
|
+
return Promise.resolve(contents);
|
|
2630
|
+
};
|
|
2631
|
+
exports.deserializeAws_restJson1PutPackageOriginConfigurationCommand = deserializeAws_restJson1PutPackageOriginConfigurationCommand;
|
|
2632
|
+
const deserializeAws_restJson1PutPackageOriginConfigurationCommandError = async (output, context) => {
|
|
2633
|
+
const parsedOutput = {
|
|
2634
|
+
...output,
|
|
2635
|
+
body: await parseBody(output.body, context),
|
|
2636
|
+
};
|
|
2637
|
+
let response;
|
|
2638
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2639
|
+
switch (errorCode) {
|
|
2640
|
+
case "AccessDeniedException":
|
|
2641
|
+
case "com.amazonaws.codeartifact#AccessDeniedException":
|
|
2642
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
2643
|
+
case "InternalServerException":
|
|
2644
|
+
case "com.amazonaws.codeartifact#InternalServerException":
|
|
2645
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2646
|
+
case "ResourceNotFoundException":
|
|
2647
|
+
case "com.amazonaws.codeartifact#ResourceNotFoundException":
|
|
2648
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2649
|
+
case "ThrottlingException":
|
|
2650
|
+
case "com.amazonaws.codeartifact#ThrottlingException":
|
|
2651
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2652
|
+
case "ValidationException":
|
|
2653
|
+
case "com.amazonaws.codeartifact#ValidationException":
|
|
2654
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2655
|
+
default:
|
|
2656
|
+
const parsedBody = parsedOutput.body;
|
|
2657
|
+
const $metadata = deserializeMetadata(output);
|
|
2658
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2659
|
+
response = new CodeartifactServiceException_1.CodeartifactServiceException({
|
|
2660
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2661
|
+
$fault: "client",
|
|
2662
|
+
$metadata,
|
|
2663
|
+
});
|
|
2664
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2665
|
+
}
|
|
2666
|
+
};
|
|
2529
2667
|
const deserializeAws_restJson1PutRepositoryPermissionsPolicyCommand = async (output, context) => {
|
|
2530
2668
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2531
2669
|
return deserializeAws_restJson1PutRepositoryPermissionsPolicyCommandError(output, context);
|
|
@@ -2892,6 +3030,12 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
2892
3030
|
});
|
|
2893
3031
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2894
3032
|
};
|
|
3033
|
+
const serializeAws_restJson1PackageOriginRestrictions = (input, context) => {
|
|
3034
|
+
return {
|
|
3035
|
+
...(input.publish != null && { publish: input.publish }),
|
|
3036
|
+
...(input.upstream != null && { upstream: input.upstream }),
|
|
3037
|
+
};
|
|
3038
|
+
};
|
|
2895
3039
|
const serializeAws_restJson1PackageVersionList = (input, context) => {
|
|
2896
3040
|
return input
|
|
2897
3041
|
.filter((e) => e != null)
|
|
@@ -2915,8 +3059,8 @@ const serializeAws_restJson1PackageVersionRevisionMap = (input, context) => {
|
|
|
2915
3059
|
};
|
|
2916
3060
|
const serializeAws_restJson1Tag = (input, context) => {
|
|
2917
3061
|
return {
|
|
2918
|
-
...(input.key
|
|
2919
|
-
...(input.value
|
|
3062
|
+
...(input.key != null && { key: input.key }),
|
|
3063
|
+
...(input.value != null && { value: input.value }),
|
|
2920
3064
|
};
|
|
2921
3065
|
};
|
|
2922
3066
|
const serializeAws_restJson1TagKeyList = (input, context) => {
|
|
@@ -2941,8 +3085,7 @@ const serializeAws_restJson1TagList = (input, context) => {
|
|
|
2941
3085
|
};
|
|
2942
3086
|
const serializeAws_restJson1UpstreamRepository = (input, context) => {
|
|
2943
3087
|
return {
|
|
2944
|
-
...(input.repositoryName
|
|
2945
|
-
input.repositoryName !== null && { repositoryName: input.repositoryName }),
|
|
3088
|
+
...(input.repositoryName != null && { repositoryName: input.repositoryName }),
|
|
2946
3089
|
};
|
|
2947
3090
|
};
|
|
2948
3091
|
const serializeAws_restJson1UpstreamRepositoryList = (input, context) => {
|
|
@@ -2968,9 +3111,7 @@ const deserializeAws_restJson1AssetHashes = (output, context) => {
|
|
|
2968
3111
|
};
|
|
2969
3112
|
const deserializeAws_restJson1AssetSummary = (output, context) => {
|
|
2970
3113
|
return {
|
|
2971
|
-
hashes: output.hashes
|
|
2972
|
-
? deserializeAws_restJson1AssetHashes(output.hashes, context)
|
|
2973
|
-
: undefined,
|
|
3114
|
+
hashes: output.hashes != null ? deserializeAws_restJson1AssetHashes(output.hashes, context) : undefined,
|
|
2974
3115
|
name: (0, smithy_client_1.expectString)(output.name),
|
|
2975
3116
|
size: (0, smithy_client_1.expectLong)(output.size),
|
|
2976
3117
|
};
|
|
@@ -2990,7 +3131,7 @@ const deserializeAws_restJson1DomainDescription = (output, context) => {
|
|
|
2990
3131
|
return {
|
|
2991
3132
|
arn: (0, smithy_client_1.expectString)(output.arn),
|
|
2992
3133
|
assetSizeBytes: (0, smithy_client_1.expectLong)(output.assetSizeBytes),
|
|
2993
|
-
createdTime: output.createdTime
|
|
3134
|
+
createdTime: output.createdTime != null
|
|
2994
3135
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdTime)))
|
|
2995
3136
|
: undefined,
|
|
2996
3137
|
encryptionKey: (0, smithy_client_1.expectString)(output.encryptionKey),
|
|
@@ -3001,10 +3142,16 @@ const deserializeAws_restJson1DomainDescription = (output, context) => {
|
|
|
3001
3142
|
status: (0, smithy_client_1.expectString)(output.status),
|
|
3002
3143
|
};
|
|
3003
3144
|
};
|
|
3145
|
+
const deserializeAws_restJson1DomainEntryPoint = (output, context) => {
|
|
3146
|
+
return {
|
|
3147
|
+
externalConnectionName: (0, smithy_client_1.expectString)(output.externalConnectionName),
|
|
3148
|
+
repositoryName: (0, smithy_client_1.expectString)(output.repositoryName),
|
|
3149
|
+
};
|
|
3150
|
+
};
|
|
3004
3151
|
const deserializeAws_restJson1DomainSummary = (output, context) => {
|
|
3005
3152
|
return {
|
|
3006
3153
|
arn: (0, smithy_client_1.expectString)(output.arn),
|
|
3007
|
-
createdTime: output.createdTime
|
|
3154
|
+
createdTime: output.createdTime != null
|
|
3008
3155
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdTime)))
|
|
3009
3156
|
: undefined,
|
|
3010
3157
|
encryptionKey: (0, smithy_client_1.expectString)(output.encryptionKey),
|
|
@@ -3060,10 +3207,36 @@ const deserializeAws_restJson1PackageDependencyList = (output, context) => {
|
|
|
3060
3207
|
});
|
|
3061
3208
|
return retVal;
|
|
3062
3209
|
};
|
|
3210
|
+
const deserializeAws_restJson1PackageDescription = (output, context) => {
|
|
3211
|
+
return {
|
|
3212
|
+
format: (0, smithy_client_1.expectString)(output.format),
|
|
3213
|
+
name: (0, smithy_client_1.expectString)(output.name),
|
|
3214
|
+
namespace: (0, smithy_client_1.expectString)(output.namespace),
|
|
3215
|
+
originConfiguration: output.originConfiguration != null
|
|
3216
|
+
? deserializeAws_restJson1PackageOriginConfiguration(output.originConfiguration, context)
|
|
3217
|
+
: undefined,
|
|
3218
|
+
};
|
|
3219
|
+
};
|
|
3220
|
+
const deserializeAws_restJson1PackageOriginConfiguration = (output, context) => {
|
|
3221
|
+
return {
|
|
3222
|
+
restrictions: output.restrictions != null
|
|
3223
|
+
? deserializeAws_restJson1PackageOriginRestrictions(output.restrictions, context)
|
|
3224
|
+
: undefined,
|
|
3225
|
+
};
|
|
3226
|
+
};
|
|
3227
|
+
const deserializeAws_restJson1PackageOriginRestrictions = (output, context) => {
|
|
3228
|
+
return {
|
|
3229
|
+
publish: (0, smithy_client_1.expectString)(output.publish),
|
|
3230
|
+
upstream: (0, smithy_client_1.expectString)(output.upstream),
|
|
3231
|
+
};
|
|
3232
|
+
};
|
|
3063
3233
|
const deserializeAws_restJson1PackageSummary = (output, context) => {
|
|
3064
3234
|
return {
|
|
3065
3235
|
format: (0, smithy_client_1.expectString)(output.format),
|
|
3066
3236
|
namespace: (0, smithy_client_1.expectString)(output.namespace),
|
|
3237
|
+
originConfiguration: output.originConfiguration != null
|
|
3238
|
+
? deserializeAws_restJson1PackageOriginConfiguration(output.originConfiguration, context)
|
|
3239
|
+
: undefined,
|
|
3067
3240
|
package: (0, smithy_client_1.expectString)(output.package),
|
|
3068
3241
|
};
|
|
3069
3242
|
};
|
|
@@ -3083,12 +3256,11 @@ const deserializeAws_restJson1PackageVersionDescription = (output, context) => {
|
|
|
3083
3256
|
displayName: (0, smithy_client_1.expectString)(output.displayName),
|
|
3084
3257
|
format: (0, smithy_client_1.expectString)(output.format),
|
|
3085
3258
|
homePage: (0, smithy_client_1.expectString)(output.homePage),
|
|
3086
|
-
licenses: output.licenses
|
|
3087
|
-
? deserializeAws_restJson1LicenseInfoList(output.licenses, context)
|
|
3088
|
-
: undefined,
|
|
3259
|
+
licenses: output.licenses != null ? deserializeAws_restJson1LicenseInfoList(output.licenses, context) : undefined,
|
|
3089
3260
|
namespace: (0, smithy_client_1.expectString)(output.namespace),
|
|
3261
|
+
origin: output.origin != null ? deserializeAws_restJson1PackageVersionOrigin(output.origin, context) : undefined,
|
|
3090
3262
|
packageName: (0, smithy_client_1.expectString)(output.packageName),
|
|
3091
|
-
publishedTime: output.publishedTime
|
|
3263
|
+
publishedTime: output.publishedTime != null
|
|
3092
3264
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.publishedTime)))
|
|
3093
3265
|
: undefined,
|
|
3094
3266
|
revision: (0, smithy_client_1.expectString)(output.revision),
|
|
@@ -3115,8 +3287,17 @@ const deserializeAws_restJson1PackageVersionErrorMap = (output, context) => {
|
|
|
3115
3287
|
};
|
|
3116
3288
|
}, {});
|
|
3117
3289
|
};
|
|
3290
|
+
const deserializeAws_restJson1PackageVersionOrigin = (output, context) => {
|
|
3291
|
+
return {
|
|
3292
|
+
domainEntryPoint: output.domainEntryPoint != null
|
|
3293
|
+
? deserializeAws_restJson1DomainEntryPoint(output.domainEntryPoint, context)
|
|
3294
|
+
: undefined,
|
|
3295
|
+
originType: (0, smithy_client_1.expectString)(output.originType),
|
|
3296
|
+
};
|
|
3297
|
+
};
|
|
3118
3298
|
const deserializeAws_restJson1PackageVersionSummary = (output, context) => {
|
|
3119
3299
|
return {
|
|
3300
|
+
origin: output.origin != null ? deserializeAws_restJson1PackageVersionOrigin(output.origin, context) : undefined,
|
|
3120
3301
|
revision: (0, smithy_client_1.expectString)(output.revision),
|
|
3121
3302
|
status: (0, smithy_client_1.expectString)(output.status),
|
|
3122
3303
|
version: (0, smithy_client_1.expectString)(output.version),
|
|
@@ -3140,11 +3321,11 @@ const deserializeAws_restJson1RepositoryDescription = (output, context) => {
|
|
|
3140
3321
|
description: (0, smithy_client_1.expectString)(output.description),
|
|
3141
3322
|
domainName: (0, smithy_client_1.expectString)(output.domainName),
|
|
3142
3323
|
domainOwner: (0, smithy_client_1.expectString)(output.domainOwner),
|
|
3143
|
-
externalConnections: output.externalConnections
|
|
3324
|
+
externalConnections: output.externalConnections != null
|
|
3144
3325
|
? deserializeAws_restJson1RepositoryExternalConnectionInfoList(output.externalConnections, context)
|
|
3145
3326
|
: undefined,
|
|
3146
3327
|
name: (0, smithy_client_1.expectString)(output.name),
|
|
3147
|
-
upstreams: output.upstreams
|
|
3328
|
+
upstreams: output.upstreams != null
|
|
3148
3329
|
? deserializeAws_restJson1UpstreamRepositoryInfoList(output.upstreams, context)
|
|
3149
3330
|
: undefined,
|
|
3150
3331
|
};
|
|
@@ -3276,6 +3457,9 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
3276
3457
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
3277
3458
|
const sanitizeErrorCode = (rawValue) => {
|
|
3278
3459
|
let cleanValue = rawValue;
|
|
3460
|
+
if (typeof cleanValue === "number") {
|
|
3461
|
+
cleanValue = cleanValue.toString();
|
|
3462
|
+
}
|
|
3279
3463
|
if (cleanValue.indexOf(":") >= 0) {
|
|
3280
3464
|
cleanValue = cleanValue.split(":")[0];
|
|
3281
3465
|
}
|
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 };
|