@aws-sdk/client-codeartifact 3.128.0 → 3.137.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.
Files changed (98) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +10 -0
  3. package/dist-cjs/Codeartifact.js +30 -0
  4. package/dist-cjs/commands/AssociateExternalConnectionCommand.js +2 -2
  5. package/dist-cjs/commands/CopyPackageVersionsCommand.js +2 -2
  6. package/dist-cjs/commands/CreateDomainCommand.js +2 -2
  7. package/dist-cjs/commands/CreateRepositoryCommand.js +2 -2
  8. package/dist-cjs/commands/DeleteDomainCommand.js +2 -2
  9. package/dist-cjs/commands/DeleteDomainPermissionsPolicyCommand.js +2 -2
  10. package/dist-cjs/commands/DeletePackageVersionsCommand.js +2 -2
  11. package/dist-cjs/commands/DeleteRepositoryCommand.js +2 -2
  12. package/dist-cjs/commands/DeleteRepositoryPermissionsPolicyCommand.js +2 -2
  13. package/dist-cjs/commands/DescribeDomainCommand.js +2 -2
  14. package/dist-cjs/commands/DescribePackageCommand.js +36 -0
  15. package/dist-cjs/commands/DescribePackageVersionCommand.js +2 -2
  16. package/dist-cjs/commands/DescribeRepositoryCommand.js +2 -2
  17. package/dist-cjs/commands/DisassociateExternalConnectionCommand.js +2 -2
  18. package/dist-cjs/commands/DisposePackageVersionsCommand.js +2 -2
  19. package/dist-cjs/commands/GetAuthorizationTokenCommand.js +2 -2
  20. package/dist-cjs/commands/GetDomainPermissionsPolicyCommand.js +2 -2
  21. package/dist-cjs/commands/GetPackageVersionAssetCommand.js +2 -2
  22. package/dist-cjs/commands/GetPackageVersionReadmeCommand.js +2 -2
  23. package/dist-cjs/commands/GetRepositoryEndpointCommand.js +2 -2
  24. package/dist-cjs/commands/GetRepositoryPermissionsPolicyCommand.js +2 -2
  25. package/dist-cjs/commands/ListDomainsCommand.js +2 -2
  26. package/dist-cjs/commands/ListPackageVersionAssetsCommand.js +2 -2
  27. package/dist-cjs/commands/ListPackageVersionDependenciesCommand.js +2 -2
  28. package/dist-cjs/commands/ListPackageVersionsCommand.js +2 -2
  29. package/dist-cjs/commands/ListPackagesCommand.js +2 -2
  30. package/dist-cjs/commands/ListRepositoriesCommand.js +2 -2
  31. package/dist-cjs/commands/ListRepositoriesInDomainCommand.js +2 -2
  32. package/dist-cjs/commands/ListTagsForResourceCommand.js +2 -2
  33. package/dist-cjs/commands/PutDomainPermissionsPolicyCommand.js +2 -2
  34. package/dist-cjs/commands/PutPackageOriginConfigurationCommand.js +36 -0
  35. package/dist-cjs/commands/PutRepositoryPermissionsPolicyCommand.js +2 -2
  36. package/dist-cjs/commands/TagResourceCommand.js +2 -2
  37. package/dist-cjs/commands/UntagResourceCommand.js +2 -2
  38. package/dist-cjs/commands/UpdatePackageVersionsStatusCommand.js +2 -2
  39. package/dist-cjs/commands/UpdateRepositoryCommand.js +2 -2
  40. package/dist-cjs/commands/index.js +2 -0
  41. package/dist-cjs/models/models_0.js +395 -513
  42. package/dist-cjs/protocols/Aws_restJson1.js +213 -2
  43. package/dist-es/Codeartifact.js +30 -0
  44. package/dist-es/commands/AssociateExternalConnectionCommand.js +3 -3
  45. package/dist-es/commands/CopyPackageVersionsCommand.js +3 -3
  46. package/dist-es/commands/CreateDomainCommand.js +3 -3
  47. package/dist-es/commands/CreateRepositoryCommand.js +3 -3
  48. package/dist-es/commands/DeleteDomainCommand.js +3 -3
  49. package/dist-es/commands/DeleteDomainPermissionsPolicyCommand.js +3 -3
  50. package/dist-es/commands/DeletePackageVersionsCommand.js +3 -3
  51. package/dist-es/commands/DeleteRepositoryCommand.js +3 -3
  52. package/dist-es/commands/DeleteRepositoryPermissionsPolicyCommand.js +3 -3
  53. package/dist-es/commands/DescribeDomainCommand.js +3 -3
  54. package/dist-es/commands/DescribePackageCommand.js +39 -0
  55. package/dist-es/commands/DescribePackageVersionCommand.js +3 -3
  56. package/dist-es/commands/DescribeRepositoryCommand.js +3 -3
  57. package/dist-es/commands/DisassociateExternalConnectionCommand.js +3 -3
  58. package/dist-es/commands/DisposePackageVersionsCommand.js +3 -3
  59. package/dist-es/commands/GetAuthorizationTokenCommand.js +3 -3
  60. package/dist-es/commands/GetDomainPermissionsPolicyCommand.js +3 -3
  61. package/dist-es/commands/GetPackageVersionAssetCommand.js +3 -3
  62. package/dist-es/commands/GetPackageVersionReadmeCommand.js +3 -3
  63. package/dist-es/commands/GetRepositoryEndpointCommand.js +3 -3
  64. package/dist-es/commands/GetRepositoryPermissionsPolicyCommand.js +3 -3
  65. package/dist-es/commands/ListDomainsCommand.js +3 -3
  66. package/dist-es/commands/ListPackageVersionAssetsCommand.js +3 -3
  67. package/dist-es/commands/ListPackageVersionDependenciesCommand.js +3 -3
  68. package/dist-es/commands/ListPackageVersionsCommand.js +3 -3
  69. package/dist-es/commands/ListPackagesCommand.js +3 -3
  70. package/dist-es/commands/ListRepositoriesCommand.js +3 -3
  71. package/dist-es/commands/ListRepositoriesInDomainCommand.js +3 -3
  72. package/dist-es/commands/ListTagsForResourceCommand.js +3 -3
  73. package/dist-es/commands/PutDomainPermissionsPolicyCommand.js +3 -3
  74. package/dist-es/commands/PutPackageOriginConfigurationCommand.js +39 -0
  75. package/dist-es/commands/PutRepositoryPermissionsPolicyCommand.js +3 -3
  76. package/dist-es/commands/TagResourceCommand.js +3 -3
  77. package/dist-es/commands/UntagResourceCommand.js +3 -3
  78. package/dist-es/commands/UpdatePackageVersionsStatusCommand.js +3 -3
  79. package/dist-es/commands/UpdateRepositoryCommand.js +3 -3
  80. package/dist-es/commands/index.js +2 -0
  81. package/dist-es/models/models_0.js +110 -340
  82. package/dist-es/protocols/Aws_restJson1.js +247 -2
  83. package/dist-types/Codeartifact.d.ts +37 -1
  84. package/dist-types/CodeartifactClient.d.ts +14 -2
  85. package/dist-types/commands/DescribePackageCommand.d.ts +37 -0
  86. package/dist-types/commands/GetPackageVersionReadmeCommand.d.ts +3 -1
  87. package/dist-types/commands/PutPackageOriginConfigurationCommand.d.ts +43 -0
  88. package/dist-types/commands/index.d.ts +2 -0
  89. package/dist-types/models/models_0.d.ts +770 -669
  90. package/dist-types/protocols/Aws_restJson1.d.ts +6 -0
  91. package/dist-types/ts3.4/Codeartifact.d.ts +10 -0
  92. package/dist-types/ts3.4/CodeartifactClient.d.ts +4 -2
  93. package/dist-types/ts3.4/commands/DescribePackageCommand.d.ts +17 -0
  94. package/dist-types/ts3.4/commands/PutPackageOriginConfigurationCommand.d.ts +17 -0
  95. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  96. package/dist-types/ts3.4/models/models_0.d.ts +276 -328
  97. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +6 -0
  98. package/package.json +9 -9
@@ -249,6 +249,29 @@ export var serializeAws_restJson1DescribeDomainCommand = function (input, contex
249
249
  }
250
250
  });
251
251
  }); };
252
+ export var serializeAws_restJson1DescribePackageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
253
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
254
+ return __generator(this, function (_c) {
255
+ switch (_c.label) {
256
+ case 0: return [4, context.endpoint()];
257
+ case 1:
258
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
259
+ headers = {};
260
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/package";
261
+ query = __assign(__assign(__assign(__assign(__assign(__assign({}, (input.domain !== undefined && { domain: input.domain })), (input.domainOwner !== undefined && { "domain-owner": input.domainOwner })), (input.repository !== undefined && { repository: input.repository })), (input.format !== undefined && { format: input.format })), (input.namespace !== undefined && { namespace: input.namespace })), (input.package !== undefined && { package: input.package }));
262
+ return [2, new __HttpRequest({
263
+ protocol: protocol,
264
+ hostname: hostname,
265
+ port: port,
266
+ method: "GET",
267
+ headers: headers,
268
+ path: resolvedPath,
269
+ query: query,
270
+ body: body,
271
+ })];
272
+ }
273
+ });
274
+ }); };
252
275
  export var serializeAws_restJson1DescribePackageVersionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
253
276
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
254
277
  return __generator(this, function (_c) {
@@ -517,7 +540,7 @@ export var serializeAws_restJson1ListPackagesCommand = function (input, context)
517
540
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
518
541
  headers = {};
519
542
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/packages";
520
- query = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.domain !== undefined && { domain: input.domain })), (input.domainOwner !== undefined && { "domain-owner": input.domainOwner })), (input.repository !== undefined && { repository: input.repository })), (input.format !== undefined && { format: input.format })), (input.namespace !== undefined && { namespace: input.namespace })), (input.packagePrefix !== undefined && { "package-prefix": input.packagePrefix })), (input.maxResults !== undefined && { "max-results": input.maxResults.toString() })), (input.nextToken !== undefined && { "next-token": input.nextToken }));
543
+ query = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.domain !== undefined && { domain: input.domain })), (input.domainOwner !== undefined && { "domain-owner": input.domainOwner })), (input.repository !== undefined && { repository: input.repository })), (input.format !== undefined && { format: input.format })), (input.namespace !== undefined && { namespace: input.namespace })), (input.packagePrefix !== undefined && { "package-prefix": input.packagePrefix })), (input.maxResults !== undefined && { "max-results": input.maxResults.toString() })), (input.nextToken !== undefined && { "next-token": input.nextToken })), (input.publish !== undefined && { publish: input.publish })), (input.upstream !== undefined && { upstream: input.upstream }));
521
544
  return [2, new __HttpRequest({
522
545
  protocol: protocol,
523
546
  hostname: hostname,
@@ -586,7 +609,7 @@ export var serializeAws_restJson1ListPackageVersionsCommand = function (input, c
586
609
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
587
610
  headers = {};
588
611
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/package/versions";
589
- query = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.domain !== undefined && { domain: input.domain })), (input.domainOwner !== undefined && { "domain-owner": input.domainOwner })), (input.repository !== undefined && { repository: input.repository })), (input.format !== undefined && { format: input.format })), (input.namespace !== undefined && { namespace: input.namespace })), (input.package !== undefined && { package: input.package })), (input.status !== undefined && { status: input.status })), (input.sortBy !== undefined && { sortBy: input.sortBy })), (input.maxResults !== undefined && { "max-results": input.maxResults.toString() })), (input.nextToken !== undefined && { "next-token": input.nextToken }));
612
+ query = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.domain !== undefined && { domain: input.domain })), (input.domainOwner !== undefined && { "domain-owner": input.domainOwner })), (input.repository !== undefined && { repository: input.repository })), (input.format !== undefined && { format: input.format })), (input.namespace !== undefined && { namespace: input.namespace })), (input.package !== undefined && { package: input.package })), (input.status !== undefined && { status: input.status })), (input.sortBy !== undefined && { sortBy: input.sortBy })), (input.maxResults !== undefined && { "max-results": input.maxResults.toString() })), (input.nextToken !== undefined && { "next-token": input.nextToken })), (input.originType !== undefined && { originType: input.originType }));
590
613
  return [2, new __HttpRequest({
591
614
  protocol: protocol,
592
615
  hostname: hostname,
@@ -693,6 +716,34 @@ export var serializeAws_restJson1PutDomainPermissionsPolicyCommand = function (i
693
716
  }
694
717
  });
695
718
  }); };
719
+ export var serializeAws_restJson1PutPackageOriginConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
720
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
721
+ return __generator(this, function (_c) {
722
+ switch (_c.label) {
723
+ case 0: return [4, context.endpoint()];
724
+ case 1:
725
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
726
+ headers = {
727
+ "content-type": "application/json",
728
+ };
729
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/package";
730
+ query = __assign(__assign(__assign(__assign(__assign(__assign({}, (input.domain !== undefined && { domain: input.domain })), (input.domainOwner !== undefined && { "domain-owner": input.domainOwner })), (input.repository !== undefined && { repository: input.repository })), (input.format !== undefined && { format: input.format })), (input.namespace !== undefined && { namespace: input.namespace })), (input.package !== undefined && { package: input.package }));
731
+ body = JSON.stringify(__assign({}, (input.restrictions != null && {
732
+ restrictions: serializeAws_restJson1PackageOriginRestrictions(input.restrictions, context),
733
+ })));
734
+ return [2, new __HttpRequest({
735
+ protocol: protocol,
736
+ hostname: hostname,
737
+ port: port,
738
+ method: "POST",
739
+ headers: headers,
740
+ path: resolvedPath,
741
+ query: query,
742
+ body: body,
743
+ })];
744
+ }
745
+ });
746
+ }); };
696
747
  export var serializeAws_restJson1PutRepositoryPermissionsPolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
697
748
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
698
749
  return __generator(this, function (_c) {
@@ -1613,6 +1664,79 @@ var deserializeAws_restJson1DescribeDomainCommandError = function (output, conte
1613
1664
  }
1614
1665
  });
1615
1666
  }); };
1667
+ export var deserializeAws_restJson1DescribePackageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1668
+ var contents, data, _a, _b;
1669
+ return __generator(this, function (_c) {
1670
+ switch (_c.label) {
1671
+ case 0:
1672
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1673
+ return [2, deserializeAws_restJson1DescribePackageCommandError(output, context)];
1674
+ }
1675
+ contents = {
1676
+ $metadata: deserializeMetadata(output),
1677
+ package: undefined,
1678
+ };
1679
+ _a = __expectNonNull;
1680
+ _b = __expectObject;
1681
+ return [4, parseBody(output.body, context)];
1682
+ case 1:
1683
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1684
+ if (data.package !== undefined && data.package !== null) {
1685
+ contents.package = deserializeAws_restJson1PackageDescription(data.package, context);
1686
+ }
1687
+ return [2, Promise.resolve(contents)];
1688
+ }
1689
+ });
1690
+ }); };
1691
+ var deserializeAws_restJson1DescribePackageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1692
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1693
+ var _c;
1694
+ return __generator(this, function (_d) {
1695
+ switch (_d.label) {
1696
+ case 0:
1697
+ _a = [__assign({}, output)];
1698
+ _c = {};
1699
+ return [4, parseBody(output.body, context)];
1700
+ case 1:
1701
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1702
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1703
+ _b = errorCode;
1704
+ switch (_b) {
1705
+ case "AccessDeniedException": return [3, 2];
1706
+ case "com.amazonaws.codeartifact#AccessDeniedException": return [3, 2];
1707
+ case "InternalServerException": return [3, 4];
1708
+ case "com.amazonaws.codeartifact#InternalServerException": return [3, 4];
1709
+ case "ResourceNotFoundException": return [3, 6];
1710
+ case "com.amazonaws.codeartifact#ResourceNotFoundException": return [3, 6];
1711
+ case "ThrottlingException": return [3, 8];
1712
+ case "com.amazonaws.codeartifact#ThrottlingException": return [3, 8];
1713
+ case "ValidationException": return [3, 10];
1714
+ case "com.amazonaws.codeartifact#ValidationException": return [3, 10];
1715
+ }
1716
+ return [3, 12];
1717
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1718
+ case 3: throw _d.sent();
1719
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1720
+ case 5: throw _d.sent();
1721
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1722
+ case 7: throw _d.sent();
1723
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1724
+ case 9: throw _d.sent();
1725
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1726
+ case 11: throw _d.sent();
1727
+ case 12:
1728
+ parsedBody = parsedOutput.body;
1729
+ $metadata = deserializeMetadata(output);
1730
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1731
+ response = new __BaseException({
1732
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1733
+ $fault: "client",
1734
+ $metadata: $metadata,
1735
+ });
1736
+ throw __decorateServiceException(response, parsedBody);
1737
+ }
1738
+ });
1739
+ }); };
1616
1740
  export var deserializeAws_restJson1DescribePackageVersionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1617
1741
  var contents, data, _a, _b;
1618
1742
  return __generator(this, function (_c) {
@@ -3131,6 +3255,79 @@ var deserializeAws_restJson1PutDomainPermissionsPolicyCommandError = function (o
3131
3255
  }
3132
3256
  });
3133
3257
  }); };
3258
+ export var deserializeAws_restJson1PutPackageOriginConfigurationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3259
+ var contents, data, _a, _b;
3260
+ return __generator(this, function (_c) {
3261
+ switch (_c.label) {
3262
+ case 0:
3263
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3264
+ return [2, deserializeAws_restJson1PutPackageOriginConfigurationCommandError(output, context)];
3265
+ }
3266
+ contents = {
3267
+ $metadata: deserializeMetadata(output),
3268
+ originConfiguration: undefined,
3269
+ };
3270
+ _a = __expectNonNull;
3271
+ _b = __expectObject;
3272
+ return [4, parseBody(output.body, context)];
3273
+ case 1:
3274
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3275
+ if (data.originConfiguration !== undefined && data.originConfiguration !== null) {
3276
+ contents.originConfiguration = deserializeAws_restJson1PackageOriginConfiguration(data.originConfiguration, context);
3277
+ }
3278
+ return [2, Promise.resolve(contents)];
3279
+ }
3280
+ });
3281
+ }); };
3282
+ var deserializeAws_restJson1PutPackageOriginConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3283
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3284
+ var _c;
3285
+ return __generator(this, function (_d) {
3286
+ switch (_d.label) {
3287
+ case 0:
3288
+ _a = [__assign({}, output)];
3289
+ _c = {};
3290
+ return [4, parseBody(output.body, context)];
3291
+ case 1:
3292
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3293
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3294
+ _b = errorCode;
3295
+ switch (_b) {
3296
+ case "AccessDeniedException": return [3, 2];
3297
+ case "com.amazonaws.codeartifact#AccessDeniedException": return [3, 2];
3298
+ case "InternalServerException": return [3, 4];
3299
+ case "com.amazonaws.codeartifact#InternalServerException": return [3, 4];
3300
+ case "ResourceNotFoundException": return [3, 6];
3301
+ case "com.amazonaws.codeartifact#ResourceNotFoundException": return [3, 6];
3302
+ case "ThrottlingException": return [3, 8];
3303
+ case "com.amazonaws.codeartifact#ThrottlingException": return [3, 8];
3304
+ case "ValidationException": return [3, 10];
3305
+ case "com.amazonaws.codeartifact#ValidationException": return [3, 10];
3306
+ }
3307
+ return [3, 12];
3308
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
3309
+ case 3: throw _d.sent();
3310
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
3311
+ case 5: throw _d.sent();
3312
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
3313
+ case 7: throw _d.sent();
3314
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
3315
+ case 9: throw _d.sent();
3316
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
3317
+ case 11: throw _d.sent();
3318
+ case 12:
3319
+ parsedBody = parsedOutput.body;
3320
+ $metadata = deserializeMetadata(output);
3321
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3322
+ response = new __BaseException({
3323
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3324
+ $fault: "client",
3325
+ $metadata: $metadata,
3326
+ });
3327
+ throw __decorateServiceException(response, parsedBody);
3328
+ }
3329
+ });
3330
+ }); };
3134
3331
  export var deserializeAws_restJson1PutRepositoryPermissionsPolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3135
3332
  var contents, data, _a, _b;
3136
3333
  return __generator(this, function (_c) {
@@ -3612,6 +3809,9 @@ var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput
3612
3809
  return [2, __decorateServiceException(exception, parsedOutput.body)];
3613
3810
  });
3614
3811
  }); };
3812
+ var serializeAws_restJson1PackageOriginRestrictions = function (input, context) {
3813
+ return __assign(__assign({}, (input.publish != null && { publish: input.publish })), (input.upstream != null && { upstream: input.upstream }));
3814
+ };
3615
3815
  var serializeAws_restJson1PackageVersionList = function (input, context) {
3616
3816
  return input
3617
3817
  .filter(function (e) { return e != null; })
@@ -3711,6 +3911,12 @@ var deserializeAws_restJson1DomainDescription = function (output, context) {
3711
3911
  status: __expectString(output.status),
3712
3912
  };
3713
3913
  };
3914
+ var deserializeAws_restJson1DomainEntryPoint = function (output, context) {
3915
+ return {
3916
+ externalConnectionName: __expectString(output.externalConnectionName),
3917
+ repositoryName: __expectString(output.repositoryName),
3918
+ };
3919
+ };
3714
3920
  var deserializeAws_restJson1DomainSummary = function (output, context) {
3715
3921
  return {
3716
3922
  arn: __expectString(output.arn),
@@ -3770,10 +3976,36 @@ var deserializeAws_restJson1PackageDependencyList = function (output, context) {
3770
3976
  });
3771
3977
  return retVal;
3772
3978
  };
3979
+ var deserializeAws_restJson1PackageDescription = function (output, context) {
3980
+ return {
3981
+ format: __expectString(output.format),
3982
+ name: __expectString(output.name),
3983
+ namespace: __expectString(output.namespace),
3984
+ originConfiguration: output.originConfiguration != null
3985
+ ? deserializeAws_restJson1PackageOriginConfiguration(output.originConfiguration, context)
3986
+ : undefined,
3987
+ };
3988
+ };
3989
+ var deserializeAws_restJson1PackageOriginConfiguration = function (output, context) {
3990
+ return {
3991
+ restrictions: output.restrictions != null
3992
+ ? deserializeAws_restJson1PackageOriginRestrictions(output.restrictions, context)
3993
+ : undefined,
3994
+ };
3995
+ };
3996
+ var deserializeAws_restJson1PackageOriginRestrictions = function (output, context) {
3997
+ return {
3998
+ publish: __expectString(output.publish),
3999
+ upstream: __expectString(output.upstream),
4000
+ };
4001
+ };
3773
4002
  var deserializeAws_restJson1PackageSummary = function (output, context) {
3774
4003
  return {
3775
4004
  format: __expectString(output.format),
3776
4005
  namespace: __expectString(output.namespace),
4006
+ originConfiguration: output.originConfiguration != null
4007
+ ? deserializeAws_restJson1PackageOriginConfiguration(output.originConfiguration, context)
4008
+ : undefined,
3777
4009
  package: __expectString(output.package),
3778
4010
  };
3779
4011
  };
@@ -3795,6 +4027,7 @@ var deserializeAws_restJson1PackageVersionDescription = function (output, contex
3795
4027
  homePage: __expectString(output.homePage),
3796
4028
  licenses: output.licenses != null ? deserializeAws_restJson1LicenseInfoList(output.licenses, context) : undefined,
3797
4029
  namespace: __expectString(output.namespace),
4030
+ origin: output.origin != null ? deserializeAws_restJson1PackageVersionOrigin(output.origin, context) : undefined,
3798
4031
  packageName: __expectString(output.packageName),
3799
4032
  publishedTime: output.publishedTime != null
3800
4033
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.publishedTime)))
@@ -3822,8 +4055,17 @@ var deserializeAws_restJson1PackageVersionErrorMap = function (output, context)
3822
4055
  return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_restJson1PackageVersionError(value, context), _b));
3823
4056
  }, {});
3824
4057
  };
4058
+ var deserializeAws_restJson1PackageVersionOrigin = function (output, context) {
4059
+ return {
4060
+ domainEntryPoint: output.domainEntryPoint != null
4061
+ ? deserializeAws_restJson1DomainEntryPoint(output.domainEntryPoint, context)
4062
+ : undefined,
4063
+ originType: __expectString(output.originType),
4064
+ };
4065
+ };
3825
4066
  var deserializeAws_restJson1PackageVersionSummary = function (output, context) {
3826
4067
  return {
4068
+ origin: output.origin != null ? deserializeAws_restJson1PackageVersionOrigin(output.origin, context) : undefined,
3827
4069
  revision: __expectString(output.revision),
3828
4070
  status: __expectString(output.status),
3829
4071
  version: __expectString(output.version),
@@ -3989,6 +4231,9 @@ var loadRestJsonErrorCode = function (output, data) {
3989
4231
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
3990
4232
  var sanitizeErrorCode = function (rawValue) {
3991
4233
  var cleanValue = rawValue;
4234
+ if (typeof cleanValue === "number") {
4235
+ cleanValue = cleanValue.toString();
4236
+ }
3992
4237
  if (cleanValue.indexOf(":") >= 0) {
3993
4238
  cleanValue = cleanValue.split(":")[0];
3994
4239
  }
@@ -10,6 +10,7 @@ import { DeletePackageVersionsCommandInput, DeletePackageVersionsCommandOutput }
10
10
  import { DeleteRepositoryCommandInput, DeleteRepositoryCommandOutput } from "./commands/DeleteRepositoryCommand";
11
11
  import { DeleteRepositoryPermissionsPolicyCommandInput, DeleteRepositoryPermissionsPolicyCommandOutput } from "./commands/DeleteRepositoryPermissionsPolicyCommand";
12
12
  import { DescribeDomainCommandInput, DescribeDomainCommandOutput } from "./commands/DescribeDomainCommand";
13
+ import { DescribePackageCommandInput, DescribePackageCommandOutput } from "./commands/DescribePackageCommand";
13
14
  import { DescribePackageVersionCommandInput, DescribePackageVersionCommandOutput } from "./commands/DescribePackageVersionCommand";
14
15
  import { DescribeRepositoryCommandInput, DescribeRepositoryCommandOutput } from "./commands/DescribeRepositoryCommand";
15
16
  import { DisassociateExternalConnectionCommandInput, DisassociateExternalConnectionCommandOutput } from "./commands/DisassociateExternalConnectionCommand";
@@ -29,6 +30,7 @@ import { ListRepositoriesCommandInput, ListRepositoriesCommandOutput } from "./c
29
30
  import { ListRepositoriesInDomainCommandInput, ListRepositoriesInDomainCommandOutput } from "./commands/ListRepositoriesInDomainCommand";
30
31
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
31
32
  import { PutDomainPermissionsPolicyCommandInput, PutDomainPermissionsPolicyCommandOutput } from "./commands/PutDomainPermissionsPolicyCommand";
33
+ import { PutPackageOriginConfigurationCommandInput, PutPackageOriginConfigurationCommandOutput } from "./commands/PutPackageOriginConfigurationCommand";
32
34
  import { PutRepositoryPermissionsPolicyCommandInput, PutRepositoryPermissionsPolicyCommandOutput } from "./commands/PutRepositoryPermissionsPolicyCommand";
33
35
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
34
36
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
@@ -175,6 +177,11 @@ import { UpdateRepositoryCommandInput, UpdateRepositoryCommandOutput } from "./c
175
177
  * </li>
176
178
  * <li>
177
179
  * <p>
180
+ * <code>DescribePackage</code>: Returns a <a href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageDescription.html">PackageDescription</a>
181
+ * object that contains details about a package. </p>
182
+ * </li>
183
+ * <li>
184
+ * <p>
178
185
  * <code>DescribePackageVersion</code>: Returns a <a href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageVersionDescription.html">PackageVersionDescription</a>
179
186
  * object that contains details about a package version. </p>
180
187
  * </li>
@@ -282,6 +289,11 @@ import { UpdateRepositoryCommandInput, UpdateRepositoryCommandOutput } from "./c
282
289
  * </li>
283
290
  * <li>
284
291
  * <p>
292
+ * <code>PutPackageOriginConfiguration</code>: Sets the package origin configuration for a package, which determine
293
+ * how new versions of the package can be added to a specific repository.</p>
294
+ * </li>
295
+ * <li>
296
+ * <p>
285
297
  * <code>PutRepositoryPermissionsPolicy</code>: Sets the resource policy on a repository
286
298
  * that specifies permissions to access it. </p>
287
299
  * </li>
@@ -403,6 +415,14 @@ export declare class Codeartifact extends CodeartifactClient {
403
415
  describeDomain(args: DescribeDomainCommandInput, options?: __HttpHandlerOptions): Promise<DescribeDomainCommandOutput>;
404
416
  describeDomain(args: DescribeDomainCommandInput, cb: (err: any, data?: DescribeDomainCommandOutput) => void): void;
405
417
  describeDomain(args: DescribeDomainCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeDomainCommandOutput) => void): void;
418
+ /**
419
+ * <p> Returns a
420
+ * <a href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageDescription.html">PackageDescription</a>
421
+ * object that contains information about the requested package.</p>
422
+ */
423
+ describePackage(args: DescribePackageCommandInput, options?: __HttpHandlerOptions): Promise<DescribePackageCommandOutput>;
424
+ describePackage(args: DescribePackageCommandInput, cb: (err: any, data?: DescribePackageCommandOutput) => void): void;
425
+ describePackage(args: DescribePackageCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribePackageCommandOutput) => void): void;
406
426
  /**
407
427
  * <p>
408
428
  * Returns a
@@ -502,7 +522,9 @@ export declare class Codeartifact extends CodeartifactClient {
502
522
  getPackageVersionAsset(args: GetPackageVersionAssetCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPackageVersionAssetCommandOutput) => void): void;
503
523
  /**
504
524
  * <p>
505
- * Gets the readme file or descriptive text for a package version.
525
+ * Gets the readme file or descriptive text for a package version. For packages that do not contain a readme file, CodeArtifact
526
+ * extracts a description from a metadata file. For example, from the <code><description></code> element in the
527
+ * <code>pom.xml</code> file of a Maven package.
506
528
  * </p>
507
529
  * <p>
508
530
  * The returned text might contain formatting. For example, it might contain formatting for Markdown or reStructuredText.
@@ -641,6 +663,20 @@ export declare class Codeartifact extends CodeartifactClient {
641
663
  putDomainPermissionsPolicy(args: PutDomainPermissionsPolicyCommandInput, options?: __HttpHandlerOptions): Promise<PutDomainPermissionsPolicyCommandOutput>;
642
664
  putDomainPermissionsPolicy(args: PutDomainPermissionsPolicyCommandInput, cb: (err: any, data?: PutDomainPermissionsPolicyCommandOutput) => void): void;
643
665
  putDomainPermissionsPolicy(args: PutDomainPermissionsPolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutDomainPermissionsPolicyCommandOutput) => void): void;
666
+ /**
667
+ * <p>Sets the package origin configuration for a package.</p>
668
+ * <p>The package origin configuration determines how new versions of a package can be added to a repository. You can allow or block direct
669
+ * publishing of new package versions, or ingestion and retaining of new package versions from an external connection or upstream source.
670
+ * For more information about package origin controls and configuration, see <a href="https://docs.aws.amazon.com/codeartifact/latest/ug/package-origin-controls.html">Editing package origin controls</a> in the <i>CodeArtifact User Guide</i>.</p>
671
+ * <p>
672
+ * <code>PutPackageOriginConfiguration</code> can be called on a package that doesn't yet exist in the repository. When called
673
+ * on a package that does not exist, a package is created in the repository with no versions and the requested restrictions are set on the package.
674
+ * This can be used to preemptively block ingesting or retaining any versions from external connections or upstream repositories, or to block
675
+ * publishing any versions of the package into the repository before connecting any package managers or publishers to the repository.</p>
676
+ */
677
+ putPackageOriginConfiguration(args: PutPackageOriginConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<PutPackageOriginConfigurationCommandOutput>;
678
+ putPackageOriginConfiguration(args: PutPackageOriginConfigurationCommandInput, cb: (err: any, data?: PutPackageOriginConfigurationCommandOutput) => void): void;
679
+ putPackageOriginConfiguration(args: PutPackageOriginConfigurationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutPackageOriginConfigurationCommandOutput) => void): void;
644
680
  /**
645
681
  * <p>
646
682
  * Sets the resource policy on a repository that specifies permissions to access it.
@@ -16,6 +16,7 @@ import { DeletePackageVersionsCommandInput, DeletePackageVersionsCommandOutput }
16
16
  import { DeleteRepositoryCommandInput, DeleteRepositoryCommandOutput } from "./commands/DeleteRepositoryCommand";
17
17
  import { DeleteRepositoryPermissionsPolicyCommandInput, DeleteRepositoryPermissionsPolicyCommandOutput } from "./commands/DeleteRepositoryPermissionsPolicyCommand";
18
18
  import { DescribeDomainCommandInput, DescribeDomainCommandOutput } from "./commands/DescribeDomainCommand";
19
+ import { DescribePackageCommandInput, DescribePackageCommandOutput } from "./commands/DescribePackageCommand";
19
20
  import { DescribePackageVersionCommandInput, DescribePackageVersionCommandOutput } from "./commands/DescribePackageVersionCommand";
20
21
  import { DescribeRepositoryCommandInput, DescribeRepositoryCommandOutput } from "./commands/DescribeRepositoryCommand";
21
22
  import { DisassociateExternalConnectionCommandInput, DisassociateExternalConnectionCommandOutput } from "./commands/DisassociateExternalConnectionCommand";
@@ -35,13 +36,14 @@ import { ListRepositoriesCommandInput, ListRepositoriesCommandOutput } from "./c
35
36
  import { ListRepositoriesInDomainCommandInput, ListRepositoriesInDomainCommandOutput } from "./commands/ListRepositoriesInDomainCommand";
36
37
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
37
38
  import { PutDomainPermissionsPolicyCommandInput, PutDomainPermissionsPolicyCommandOutput } from "./commands/PutDomainPermissionsPolicyCommand";
39
+ import { PutPackageOriginConfigurationCommandInput, PutPackageOriginConfigurationCommandOutput } from "./commands/PutPackageOriginConfigurationCommand";
38
40
  import { PutRepositoryPermissionsPolicyCommandInput, PutRepositoryPermissionsPolicyCommandOutput } from "./commands/PutRepositoryPermissionsPolicyCommand";
39
41
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
40
42
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
41
43
  import { UpdatePackageVersionsStatusCommandInput, UpdatePackageVersionsStatusCommandOutput } from "./commands/UpdatePackageVersionsStatusCommand";
42
44
  import { UpdateRepositoryCommandInput, UpdateRepositoryCommandOutput } from "./commands/UpdateRepositoryCommand";
43
- export declare type ServiceInputTypes = AssociateExternalConnectionCommandInput | CopyPackageVersionsCommandInput | CreateDomainCommandInput | CreateRepositoryCommandInput | DeleteDomainCommandInput | DeleteDomainPermissionsPolicyCommandInput | DeletePackageVersionsCommandInput | DeleteRepositoryCommandInput | DeleteRepositoryPermissionsPolicyCommandInput | DescribeDomainCommandInput | DescribePackageVersionCommandInput | DescribeRepositoryCommandInput | DisassociateExternalConnectionCommandInput | DisposePackageVersionsCommandInput | GetAuthorizationTokenCommandInput | GetDomainPermissionsPolicyCommandInput | GetPackageVersionAssetCommandInput | GetPackageVersionReadmeCommandInput | GetRepositoryEndpointCommandInput | GetRepositoryPermissionsPolicyCommandInput | ListDomainsCommandInput | ListPackageVersionAssetsCommandInput | ListPackageVersionDependenciesCommandInput | ListPackageVersionsCommandInput | ListPackagesCommandInput | ListRepositoriesCommandInput | ListRepositoriesInDomainCommandInput | ListTagsForResourceCommandInput | PutDomainPermissionsPolicyCommandInput | PutRepositoryPermissionsPolicyCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdatePackageVersionsStatusCommandInput | UpdateRepositoryCommandInput;
44
- export declare type ServiceOutputTypes = AssociateExternalConnectionCommandOutput | CopyPackageVersionsCommandOutput | CreateDomainCommandOutput | CreateRepositoryCommandOutput | DeleteDomainCommandOutput | DeleteDomainPermissionsPolicyCommandOutput | DeletePackageVersionsCommandOutput | DeleteRepositoryCommandOutput | DeleteRepositoryPermissionsPolicyCommandOutput | DescribeDomainCommandOutput | DescribePackageVersionCommandOutput | DescribeRepositoryCommandOutput | DisassociateExternalConnectionCommandOutput | DisposePackageVersionsCommandOutput | GetAuthorizationTokenCommandOutput | GetDomainPermissionsPolicyCommandOutput | GetPackageVersionAssetCommandOutput | GetPackageVersionReadmeCommandOutput | GetRepositoryEndpointCommandOutput | GetRepositoryPermissionsPolicyCommandOutput | ListDomainsCommandOutput | ListPackageVersionAssetsCommandOutput | ListPackageVersionDependenciesCommandOutput | ListPackageVersionsCommandOutput | ListPackagesCommandOutput | ListRepositoriesCommandOutput | ListRepositoriesInDomainCommandOutput | ListTagsForResourceCommandOutput | PutDomainPermissionsPolicyCommandOutput | PutRepositoryPermissionsPolicyCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdatePackageVersionsStatusCommandOutput | UpdateRepositoryCommandOutput;
45
+ export declare type ServiceInputTypes = AssociateExternalConnectionCommandInput | CopyPackageVersionsCommandInput | CreateDomainCommandInput | CreateRepositoryCommandInput | DeleteDomainCommandInput | DeleteDomainPermissionsPolicyCommandInput | DeletePackageVersionsCommandInput | DeleteRepositoryCommandInput | DeleteRepositoryPermissionsPolicyCommandInput | DescribeDomainCommandInput | DescribePackageCommandInput | DescribePackageVersionCommandInput | DescribeRepositoryCommandInput | DisassociateExternalConnectionCommandInput | DisposePackageVersionsCommandInput | GetAuthorizationTokenCommandInput | GetDomainPermissionsPolicyCommandInput | GetPackageVersionAssetCommandInput | GetPackageVersionReadmeCommandInput | GetRepositoryEndpointCommandInput | GetRepositoryPermissionsPolicyCommandInput | ListDomainsCommandInput | ListPackageVersionAssetsCommandInput | ListPackageVersionDependenciesCommandInput | ListPackageVersionsCommandInput | ListPackagesCommandInput | ListRepositoriesCommandInput | ListRepositoriesInDomainCommandInput | ListTagsForResourceCommandInput | PutDomainPermissionsPolicyCommandInput | PutPackageOriginConfigurationCommandInput | PutRepositoryPermissionsPolicyCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdatePackageVersionsStatusCommandInput | UpdateRepositoryCommandInput;
46
+ export declare type ServiceOutputTypes = AssociateExternalConnectionCommandOutput | CopyPackageVersionsCommandOutput | CreateDomainCommandOutput | CreateRepositoryCommandOutput | DeleteDomainCommandOutput | DeleteDomainPermissionsPolicyCommandOutput | DeletePackageVersionsCommandOutput | DeleteRepositoryCommandOutput | DeleteRepositoryPermissionsPolicyCommandOutput | DescribeDomainCommandOutput | DescribePackageCommandOutput | DescribePackageVersionCommandOutput | DescribeRepositoryCommandOutput | DisassociateExternalConnectionCommandOutput | DisposePackageVersionsCommandOutput | GetAuthorizationTokenCommandOutput | GetDomainPermissionsPolicyCommandOutput | GetPackageVersionAssetCommandOutput | GetPackageVersionReadmeCommandOutput | GetRepositoryEndpointCommandOutput | GetRepositoryPermissionsPolicyCommandOutput | ListDomainsCommandOutput | ListPackageVersionAssetsCommandOutput | ListPackageVersionDependenciesCommandOutput | ListPackageVersionsCommandOutput | ListPackagesCommandOutput | ListRepositoriesCommandOutput | ListRepositoriesInDomainCommandOutput | ListTagsForResourceCommandOutput | PutDomainPermissionsPolicyCommandOutput | PutPackageOriginConfigurationCommandOutput | PutRepositoryPermissionsPolicyCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdatePackageVersionsStatusCommandOutput | UpdateRepositoryCommandOutput;
45
47
  export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
46
48
  /**
47
49
  * The HTTP handler to use. Fetch in browser and Https in Nodejs.
@@ -300,6 +302,11 @@ export interface CodeartifactClientResolvedConfig extends CodeartifactClientReso
300
302
  * </li>
301
303
  * <li>
302
304
  * <p>
305
+ * <code>DescribePackage</code>: Returns a <a href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageDescription.html">PackageDescription</a>
306
+ * object that contains details about a package. </p>
307
+ * </li>
308
+ * <li>
309
+ * <p>
303
310
  * <code>DescribePackageVersion</code>: Returns a <a href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageVersionDescription.html">PackageVersionDescription</a>
304
311
  * object that contains details about a package version. </p>
305
312
  * </li>
@@ -407,6 +414,11 @@ export interface CodeartifactClientResolvedConfig extends CodeartifactClientReso
407
414
  * </li>
408
415
  * <li>
409
416
  * <p>
417
+ * <code>PutPackageOriginConfiguration</code>: Sets the package origin configuration for a package, which determine
418
+ * how new versions of the package can be added to a specific repository.</p>
419
+ * </li>
420
+ * <li>
421
+ * <p>
410
422
  * <code>PutRepositoryPermissionsPolicy</code>: Sets the resource policy on a repository
411
423
  * that specifies permissions to access it. </p>
412
424
  * </li>
@@ -0,0 +1,37 @@
1
+ import { Command as $Command } from "@aws-sdk/smithy-client";
2
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { CodeartifactClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CodeartifactClient";
4
+ import { DescribePackageRequest, DescribePackageResult } from "../models/models_0";
5
+ export interface DescribePackageCommandInput extends DescribePackageRequest {
6
+ }
7
+ export interface DescribePackageCommandOutput extends DescribePackageResult, __MetadataBearer {
8
+ }
9
+ /**
10
+ * <p> Returns a
11
+ * <a href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageDescription.html">PackageDescription</a>
12
+ * object that contains information about the requested package.</p>
13
+ * @example
14
+ * Use a bare-bones client and the command you need to make an API call.
15
+ * ```javascript
16
+ * import { CodeartifactClient, DescribePackageCommand } from "@aws-sdk/client-codeartifact"; // ES Modules import
17
+ * // const { CodeartifactClient, DescribePackageCommand } = require("@aws-sdk/client-codeartifact"); // CommonJS import
18
+ * const client = new CodeartifactClient(config);
19
+ * const command = new DescribePackageCommand(input);
20
+ * const response = await client.send(command);
21
+ * ```
22
+ *
23
+ * @see {@link DescribePackageCommandInput} for command's `input` shape.
24
+ * @see {@link DescribePackageCommandOutput} for command's `response` shape.
25
+ * @see {@link CodeartifactClientResolvedConfig | config} for CodeartifactClient's `config` shape.
26
+ *
27
+ */
28
+ export declare class DescribePackageCommand extends $Command<DescribePackageCommandInput, DescribePackageCommandOutput, CodeartifactClientResolvedConfig> {
29
+ readonly input: DescribePackageCommandInput;
30
+ constructor(input: DescribePackageCommandInput);
31
+ /**
32
+ * @internal
33
+ */
34
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CodeartifactClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DescribePackageCommandInput, DescribePackageCommandOutput>;
35
+ private serialize;
36
+ private deserialize;
37
+ }
@@ -8,7 +8,9 @@ export interface GetPackageVersionReadmeCommandOutput extends GetPackageVersionR
8
8
  }
9
9
  /**
10
10
  * <p>
11
- * Gets the readme file or descriptive text for a package version.
11
+ * Gets the readme file or descriptive text for a package version. For packages that do not contain a readme file, CodeArtifact
12
+ * extracts a description from a metadata file. For example, from the <code><description></code> element in the
13
+ * <code>pom.xml</code> file of a Maven package.
12
14
  * </p>
13
15
  * <p>
14
16
  * The returned text might contain formatting. For example, it might contain formatting for Markdown or reStructuredText.
@@ -0,0 +1,43 @@
1
+ import { Command as $Command } from "@aws-sdk/smithy-client";
2
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { CodeartifactClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CodeartifactClient";
4
+ import { PutPackageOriginConfigurationRequest, PutPackageOriginConfigurationResult } from "../models/models_0";
5
+ export interface PutPackageOriginConfigurationCommandInput extends PutPackageOriginConfigurationRequest {
6
+ }
7
+ export interface PutPackageOriginConfigurationCommandOutput extends PutPackageOriginConfigurationResult, __MetadataBearer {
8
+ }
9
+ /**
10
+ * <p>Sets the package origin configuration for a package.</p>
11
+ * <p>The package origin configuration determines how new versions of a package can be added to a repository. You can allow or block direct
12
+ * publishing of new package versions, or ingestion and retaining of new package versions from an external connection or upstream source.
13
+ * For more information about package origin controls and configuration, see <a href="https://docs.aws.amazon.com/codeartifact/latest/ug/package-origin-controls.html">Editing package origin controls</a> in the <i>CodeArtifact User Guide</i>.</p>
14
+ * <p>
15
+ * <code>PutPackageOriginConfiguration</code> can be called on a package that doesn't yet exist in the repository. When called
16
+ * on a package that does not exist, a package is created in the repository with no versions and the requested restrictions are set on the package.
17
+ * This can be used to preemptively block ingesting or retaining any versions from external connections or upstream repositories, or to block
18
+ * publishing any versions of the package into the repository before connecting any package managers or publishers to the repository.</p>
19
+ * @example
20
+ * Use a bare-bones client and the command you need to make an API call.
21
+ * ```javascript
22
+ * import { CodeartifactClient, PutPackageOriginConfigurationCommand } from "@aws-sdk/client-codeartifact"; // ES Modules import
23
+ * // const { CodeartifactClient, PutPackageOriginConfigurationCommand } = require("@aws-sdk/client-codeartifact"); // CommonJS import
24
+ * const client = new CodeartifactClient(config);
25
+ * const command = new PutPackageOriginConfigurationCommand(input);
26
+ * const response = await client.send(command);
27
+ * ```
28
+ *
29
+ * @see {@link PutPackageOriginConfigurationCommandInput} for command's `input` shape.
30
+ * @see {@link PutPackageOriginConfigurationCommandOutput} for command's `response` shape.
31
+ * @see {@link CodeartifactClientResolvedConfig | config} for CodeartifactClient's `config` shape.
32
+ *
33
+ */
34
+ export declare class PutPackageOriginConfigurationCommand extends $Command<PutPackageOriginConfigurationCommandInput, PutPackageOriginConfigurationCommandOutput, CodeartifactClientResolvedConfig> {
35
+ readonly input: PutPackageOriginConfigurationCommandInput;
36
+ constructor(input: PutPackageOriginConfigurationCommandInput);
37
+ /**
38
+ * @internal
39
+ */
40
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CodeartifactClientResolvedConfig, options?: __HttpHandlerOptions): Handler<PutPackageOriginConfigurationCommandInput, PutPackageOriginConfigurationCommandOutput>;
41
+ private serialize;
42
+ private deserialize;
43
+ }
@@ -8,6 +8,7 @@ export * from "./DeletePackageVersionsCommand";
8
8
  export * from "./DeleteRepositoryCommand";
9
9
  export * from "./DeleteRepositoryPermissionsPolicyCommand";
10
10
  export * from "./DescribeDomainCommand";
11
+ export * from "./DescribePackageCommand";
11
12
  export * from "./DescribePackageVersionCommand";
12
13
  export * from "./DescribeRepositoryCommand";
13
14
  export * from "./DisassociateExternalConnectionCommand";
@@ -27,6 +28,7 @@ export * from "./ListRepositoriesCommand";
27
28
  export * from "./ListRepositoriesInDomainCommand";
28
29
  export * from "./ListTagsForResourceCommand";
29
30
  export * from "./PutDomainPermissionsPolicyCommand";
31
+ export * from "./PutPackageOriginConfigurationCommand";
30
32
  export * from "./PutRepositoryPermissionsPolicyCommand";
31
33
  export * from "./TagResourceCommand";
32
34
  export * from "./UntagResourceCommand";