@aws-sdk/client-codeartifact 3.128.0 → 3.130.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +10 -0
  3. package/dist-cjs/Codeartifact.js +30 -0
  4. package/dist-cjs/commands/DescribePackageCommand.js +36 -0
  5. package/dist-cjs/commands/PutPackageOriginConfigurationCommand.js +36 -0
  6. package/dist-cjs/commands/index.js +2 -0
  7. package/dist-cjs/models/models_0.js +73 -3
  8. package/dist-cjs/protocols/Aws_restJson1.js +213 -2
  9. package/dist-es/Codeartifact.js +30 -0
  10. package/dist-es/commands/DescribePackageCommand.js +39 -0
  11. package/dist-es/commands/PutPackageOriginConfigurationCommand.js +39 -0
  12. package/dist-es/commands/index.js +2 -0
  13. package/dist-es/models/models_0.js +52 -0
  14. package/dist-es/protocols/Aws_restJson1.js +247 -2
  15. package/dist-types/Codeartifact.d.ts +37 -1
  16. package/dist-types/CodeartifactClient.d.ts +14 -2
  17. package/dist-types/commands/DescribePackageCommand.d.ts +37 -0
  18. package/dist-types/commands/GetPackageVersionReadmeCommand.d.ts +3 -1
  19. package/dist-types/commands/PutPackageOriginConfigurationCommand.d.ts +43 -0
  20. package/dist-types/commands/index.d.ts +2 -0
  21. package/dist-types/models/models_0.d.ts +466 -177
  22. package/dist-types/protocols/Aws_restJson1.d.ts +6 -0
  23. package/dist-types/ts3.4/Codeartifact.d.ts +10 -0
  24. package/dist-types/ts3.4/CodeartifactClient.d.ts +4 -2
  25. package/dist-types/ts3.4/commands/DescribePackageCommand.d.ts +17 -0
  26. package/dist-types/ts3.4/commands/PutPackageOriginConfigurationCommand.d.ts +17 -0
  27. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  28. package/dist-types/ts3.4/models/models_0.d.ts +136 -0
  29. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +6 -0
  30. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.130.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.129.0...v3.130.0) (2022-07-14)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **codegen:** fix error code parsing when it's a number ([#3371](https://github.com/aws/aws-sdk-js-v3/issues/3371)) ([c2d8522](https://github.com/aws/aws-sdk-js-v3/commit/c2d852279a3d23958521a6ceb4f4c642b0cb1848))
12
+
13
+
14
+ ### Features
15
+
16
+ * **client-codeartifact:** This release introduces Package Origin Controls, a mechanism used to counteract Dependency Confusion attacks. Adds two new APIs, PutPackageOriginConfiguration and DescribePackage, and updates the ListPackage, DescribePackageVersion and ListPackageVersion APIs in support of the feature. ([ac9d765](https://github.com/aws/aws-sdk-js-v3/commit/ac9d765c47c18635c9e98922ba9a04eb785ca0fa))
17
+
18
+
19
+
20
+
21
+
6
22
  # [3.128.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.127.0...v3.128.0) (2022-07-12)
7
23
 
8
24
  **Note:** Version bump only for package @aws-sdk/client-codeartifact
package/README.md CHANGED
@@ -149,6 +149,11 @@ contains information about the requested domain.</p>
149
149
  </li>
150
150
  <li>
151
151
  <p>
152
+ <code>DescribePackage</code>: Returns a <a href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageDescription.html">PackageDescription</a>
153
+ object that contains details about a package. </p>
154
+ </li>
155
+ <li>
156
+ <p>
152
157
  <code>DescribePackageVersion</code>: Returns a <a href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageVersionDescription.html">PackageVersionDescription</a>
153
158
  object that contains details about a package version. </p>
154
159
  </li>
@@ -256,6 +261,11 @@ package in a repository.</p>
256
261
  </li>
257
262
  <li>
258
263
  <p>
264
+ <code>PutPackageOriginConfiguration</code>: Sets the package origin configuration for a package, which determine
265
+ how new versions of the package can be added to a specific repository.</p>
266
+ </li>
267
+ <li>
268
+ <p>
259
269
  <code>PutRepositoryPermissionsPolicy</code>: Sets the resource policy on a repository
260
270
  that specifies permissions to access it. </p>
261
271
  </li>
@@ -12,6 +12,7 @@ const DeletePackageVersionsCommand_1 = require("./commands/DeletePackageVersions
12
12
  const DeleteRepositoryCommand_1 = require("./commands/DeleteRepositoryCommand");
13
13
  const DeleteRepositoryPermissionsPolicyCommand_1 = require("./commands/DeleteRepositoryPermissionsPolicyCommand");
14
14
  const DescribeDomainCommand_1 = require("./commands/DescribeDomainCommand");
15
+ const DescribePackageCommand_1 = require("./commands/DescribePackageCommand");
15
16
  const DescribePackageVersionCommand_1 = require("./commands/DescribePackageVersionCommand");
16
17
  const DescribeRepositoryCommand_1 = require("./commands/DescribeRepositoryCommand");
17
18
  const DisassociateExternalConnectionCommand_1 = require("./commands/DisassociateExternalConnectionCommand");
@@ -31,6 +32,7 @@ const ListRepositoriesCommand_1 = require("./commands/ListRepositoriesCommand");
31
32
  const ListRepositoriesInDomainCommand_1 = require("./commands/ListRepositoriesInDomainCommand");
32
33
  const ListTagsForResourceCommand_1 = require("./commands/ListTagsForResourceCommand");
33
34
  const PutDomainPermissionsPolicyCommand_1 = require("./commands/PutDomainPermissionsPolicyCommand");
35
+ const PutPackageOriginConfigurationCommand_1 = require("./commands/PutPackageOriginConfigurationCommand");
34
36
  const PutRepositoryPermissionsPolicyCommand_1 = require("./commands/PutRepositoryPermissionsPolicyCommand");
35
37
  const TagResourceCommand_1 = require("./commands/TagResourceCommand");
36
38
  const UntagResourceCommand_1 = require("./commands/UntagResourceCommand");
@@ -177,6 +179,20 @@ class Codeartifact extends CodeartifactClient_1.CodeartifactClient {
177
179
  return this.send(command, optionsOrCb);
178
180
  }
179
181
  }
182
+ describePackage(args, optionsOrCb, cb) {
183
+ const command = new DescribePackageCommand_1.DescribePackageCommand(args);
184
+ if (typeof optionsOrCb === "function") {
185
+ this.send(command, optionsOrCb);
186
+ }
187
+ else if (typeof cb === "function") {
188
+ if (typeof optionsOrCb !== "object")
189
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
190
+ this.send(command, optionsOrCb || {}, cb);
191
+ }
192
+ else {
193
+ return this.send(command, optionsOrCb);
194
+ }
195
+ }
180
196
  describePackageVersion(args, optionsOrCb, cb) {
181
197
  const command = new DescribePackageVersionCommand_1.DescribePackageVersionCommand(args);
182
198
  if (typeof optionsOrCb === "function") {
@@ -443,6 +459,20 @@ class Codeartifact extends CodeartifactClient_1.CodeartifactClient {
443
459
  return this.send(command, optionsOrCb);
444
460
  }
445
461
  }
462
+ putPackageOriginConfiguration(args, optionsOrCb, cb) {
463
+ const command = new PutPackageOriginConfigurationCommand_1.PutPackageOriginConfigurationCommand(args);
464
+ if (typeof optionsOrCb === "function") {
465
+ this.send(command, optionsOrCb);
466
+ }
467
+ else if (typeof cb === "function") {
468
+ if (typeof optionsOrCb !== "object")
469
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
470
+ this.send(command, optionsOrCb || {}, cb);
471
+ }
472
+ else {
473
+ return this.send(command, optionsOrCb);
474
+ }
475
+ }
446
476
  putRepositoryPermissionsPolicy(args, optionsOrCb, cb) {
447
477
  const command = new PutRepositoryPermissionsPolicyCommand_1.PutRepositoryPermissionsPolicyCommand(args);
448
478
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DescribePackageCommand = void 0;
4
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const models_0_1 = require("../models/models_0");
7
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
8
+ class DescribePackageCommand extends smithy_client_1.Command {
9
+ constructor(input) {
10
+ super();
11
+ this.input = input;
12
+ }
13
+ resolveMiddleware(clientStack, configuration, options) {
14
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
15
+ const stack = clientStack.concat(this.middlewareStack);
16
+ const { logger } = configuration;
17
+ const clientName = "CodeartifactClient";
18
+ const commandName = "DescribePackageCommand";
19
+ const handlerExecutionContext = {
20
+ logger,
21
+ clientName,
22
+ commandName,
23
+ inputFilterSensitiveLog: models_0_1.DescribePackageRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.DescribePackageResult.filterSensitiveLog,
25
+ };
26
+ const { requestHandler } = configuration;
27
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
28
+ }
29
+ serialize(input, context) {
30
+ return (0, Aws_restJson1_1.serializeAws_restJson1DescribePackageCommand)(input, context);
31
+ }
32
+ deserialize(output, context) {
33
+ return (0, Aws_restJson1_1.deserializeAws_restJson1DescribePackageCommand)(output, context);
34
+ }
35
+ }
36
+ exports.DescribePackageCommand = DescribePackageCommand;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PutPackageOriginConfigurationCommand = void 0;
4
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const models_0_1 = require("../models/models_0");
7
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
8
+ class PutPackageOriginConfigurationCommand extends smithy_client_1.Command {
9
+ constructor(input) {
10
+ super();
11
+ this.input = input;
12
+ }
13
+ resolveMiddleware(clientStack, configuration, options) {
14
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
15
+ const stack = clientStack.concat(this.middlewareStack);
16
+ const { logger } = configuration;
17
+ const clientName = "CodeartifactClient";
18
+ const commandName = "PutPackageOriginConfigurationCommand";
19
+ const handlerExecutionContext = {
20
+ logger,
21
+ clientName,
22
+ commandName,
23
+ inputFilterSensitiveLog: models_0_1.PutPackageOriginConfigurationRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.PutPackageOriginConfigurationResult.filterSensitiveLog,
25
+ };
26
+ const { requestHandler } = configuration;
27
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
28
+ }
29
+ serialize(input, context) {
30
+ return (0, Aws_restJson1_1.serializeAws_restJson1PutPackageOriginConfigurationCommand)(input, context);
31
+ }
32
+ deserialize(output, context) {
33
+ return (0, Aws_restJson1_1.deserializeAws_restJson1PutPackageOriginConfigurationCommand)(output, context);
34
+ }
35
+ }
36
+ exports.PutPackageOriginConfigurationCommand = PutPackageOriginConfigurationCommand;
@@ -11,6 +11,7 @@ tslib_1.__exportStar(require("./DeletePackageVersionsCommand"), exports);
11
11
  tslib_1.__exportStar(require("./DeleteRepositoryCommand"), exports);
12
12
  tslib_1.__exportStar(require("./DeleteRepositoryPermissionsPolicyCommand"), exports);
13
13
  tslib_1.__exportStar(require("./DescribeDomainCommand"), exports);
14
+ tslib_1.__exportStar(require("./DescribePackageCommand"), exports);
14
15
  tslib_1.__exportStar(require("./DescribePackageVersionCommand"), exports);
15
16
  tslib_1.__exportStar(require("./DescribeRepositoryCommand"), exports);
16
17
  tslib_1.__exportStar(require("./DisassociateExternalConnectionCommand"), exports);
@@ -30,6 +31,7 @@ tslib_1.__exportStar(require("./ListRepositoriesCommand"), exports);
30
31
  tslib_1.__exportStar(require("./ListRepositoriesInDomainCommand"), exports);
31
32
  tslib_1.__exportStar(require("./ListTagsForResourceCommand"), exports);
32
33
  tslib_1.__exportStar(require("./PutDomainPermissionsPolicyCommand"), exports);
34
+ tslib_1.__exportStar(require("./PutPackageOriginConfigurationCommand"), exports);
33
35
  tslib_1.__exportStar(require("./PutRepositoryPermissionsPolicyCommand"), exports);
34
36
  tslib_1.__exportStar(require("./TagResourceCommand"), exports);
35
37
  tslib_1.__exportStar(require("./UntagResourceCommand"), exports);
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DescribeRepositoryRequest = exports.DescribePackageVersionResult = exports.PackageVersionDescription = exports.LicenseInfo = exports.DescribePackageVersionRequest = exports.DescribeDomainResult = exports.DescribeDomainRequest = exports.DeleteRepositoryPermissionsPolicyResult = exports.DeleteRepositoryPermissionsPolicyRequest = exports.DeleteRepositoryResult = exports.DeleteRepositoryRequest = exports.DeletePackageVersionsResult = exports.DeletePackageVersionsRequest = exports.DeleteDomainPermissionsPolicyResult = exports.ResourcePolicy = exports.DeleteDomainPermissionsPolicyRequest = exports.DeleteDomainResult = exports.DeleteDomainRequest = exports.CreateRepositoryResult = exports.CreateRepositoryRequest = exports.UpstreamRepository = exports.CreateDomainResult = exports.DomainDescription = exports.DomainStatus = exports.CreateDomainRequest = exports.Tag = exports.CopyPackageVersionsResult = exports.SuccessfulPackageVersionInfo = exports.PackageVersionStatus = exports.PackageVersionError = exports.PackageVersionErrorCode = exports.CopyPackageVersionsRequest = exports.ValidationException = exports.ValidationExceptionReason = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.InternalServerException = exports.ConflictException = exports.ResourceType = exports.AssociateExternalConnectionResult = exports.RepositoryDescription = exports.UpstreamRepositoryInfo = exports.RepositoryExternalConnectionInfo = exports.ExternalConnectionStatus = exports.PackageFormat = exports.AssociateExternalConnectionRequest = exports.AssetSummary = exports.HashAlgorithm = exports.AccessDeniedException = void 0;
4
- exports.UpdateRepositoryRequest = exports.UpdatePackageVersionsStatusResult = exports.UpdatePackageVersionsStatusRequest = exports.UntagResourceResult = exports.UntagResourceRequest = exports.TagResourceResult = exports.TagResourceRequest = exports.PutRepositoryPermissionsPolicyResult = exports.PutRepositoryPermissionsPolicyRequest = exports.PutDomainPermissionsPolicyResult = exports.PutDomainPermissionsPolicyRequest = exports.ListTagsForResourceResult = exports.ListTagsForResourceRequest = exports.ListRepositoriesInDomainResult = exports.ListRepositoriesInDomainRequest = exports.ListRepositoriesResult = exports.RepositorySummary = exports.ListRepositoriesRequest = exports.ListPackageVersionsResult = exports.PackageVersionSummary = exports.ListPackageVersionsRequest = exports.PackageVersionSortType = exports.ListPackageVersionDependenciesResult = exports.PackageDependency = exports.ListPackageVersionDependenciesRequest = exports.ListPackageVersionAssetsResult = exports.ListPackageVersionAssetsRequest = exports.ListPackagesResult = exports.PackageSummary = exports.ListPackagesRequest = exports.ListDomainsResult = exports.DomainSummary = exports.ListDomainsRequest = exports.GetRepositoryPermissionsPolicyResult = exports.GetRepositoryPermissionsPolicyRequest = exports.GetRepositoryEndpointResult = exports.GetRepositoryEndpointRequest = exports.GetPackageVersionReadmeResult = exports.GetPackageVersionReadmeRequest = exports.GetPackageVersionAssetResult = exports.GetPackageVersionAssetRequest = exports.GetDomainPermissionsPolicyResult = exports.GetDomainPermissionsPolicyRequest = exports.GetAuthorizationTokenResult = exports.GetAuthorizationTokenRequest = exports.DisposePackageVersionsResult = exports.DisposePackageVersionsRequest = exports.DisassociateExternalConnectionResult = exports.DisassociateExternalConnectionRequest = exports.DescribeRepositoryResult = void 0;
5
- exports.UpdateRepositoryResult = void 0;
3
+ exports.PackageOriginConfiguration = exports.PackageOriginRestrictions = exports.DescribePackageRequest = exports.DescribeDomainResult = exports.DescribeDomainRequest = exports.DeleteRepositoryPermissionsPolicyResult = exports.DeleteRepositoryPermissionsPolicyRequest = exports.DeleteRepositoryResult = exports.DeleteRepositoryRequest = exports.DeletePackageVersionsResult = exports.DeletePackageVersionsRequest = exports.DeleteDomainPermissionsPolicyResult = exports.ResourcePolicy = exports.DeleteDomainPermissionsPolicyRequest = exports.DeleteDomainResult = exports.DeleteDomainRequest = exports.CreateRepositoryResult = exports.CreateRepositoryRequest = exports.UpstreamRepository = exports.CreateDomainResult = exports.DomainDescription = exports.DomainStatus = exports.CreateDomainRequest = exports.Tag = exports.CopyPackageVersionsResult = exports.SuccessfulPackageVersionInfo = exports.PackageVersionStatus = exports.PackageVersionError = exports.PackageVersionErrorCode = exports.CopyPackageVersionsRequest = exports.ValidationException = exports.ValidationExceptionReason = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.InternalServerException = exports.ConflictException = exports.ResourceType = exports.AssociateExternalConnectionResult = exports.RepositoryDescription = exports.UpstreamRepositoryInfo = exports.RepositoryExternalConnectionInfo = exports.ExternalConnectionStatus = exports.PackageFormat = exports.AssociateExternalConnectionRequest = exports.AssetSummary = exports.HashAlgorithm = exports.AllowUpstream = exports.AllowPublish = exports.AccessDeniedException = void 0;
4
+ exports.PutDomainPermissionsPolicyRequest = exports.ListTagsForResourceResult = exports.ListTagsForResourceRequest = exports.ListRepositoriesInDomainResult = exports.ListRepositoriesInDomainRequest = exports.ListRepositoriesResult = exports.RepositorySummary = exports.ListRepositoriesRequest = exports.ListPackageVersionsResult = exports.PackageVersionSummary = exports.ListPackageVersionsRequest = exports.PackageVersionSortType = exports.ListPackageVersionDependenciesResult = exports.PackageDependency = exports.ListPackageVersionDependenciesRequest = exports.ListPackageVersionAssetsResult = exports.ListPackageVersionAssetsRequest = exports.ListPackagesResult = exports.PackageSummary = exports.ListPackagesRequest = exports.ListDomainsResult = exports.DomainSummary = exports.ListDomainsRequest = exports.GetRepositoryPermissionsPolicyResult = exports.GetRepositoryPermissionsPolicyRequest = exports.GetRepositoryEndpointResult = exports.GetRepositoryEndpointRequest = exports.GetPackageVersionReadmeResult = exports.GetPackageVersionReadmeRequest = exports.GetPackageVersionAssetResult = exports.GetPackageVersionAssetRequest = exports.GetDomainPermissionsPolicyResult = exports.GetDomainPermissionsPolicyRequest = exports.GetAuthorizationTokenResult = exports.GetAuthorizationTokenRequest = exports.DisposePackageVersionsResult = exports.DisposePackageVersionsRequest = exports.DisassociateExternalConnectionResult = exports.DisassociateExternalConnectionRequest = exports.DescribeRepositoryResult = exports.DescribeRepositoryRequest = exports.DescribePackageVersionResult = exports.PackageVersionDescription = exports.PackageVersionOrigin = exports.PackageVersionOriginType = exports.DomainEntryPoint = exports.LicenseInfo = exports.DescribePackageVersionRequest = exports.DescribePackageResult = exports.PackageDescription = void 0;
5
+ exports.UpdateRepositoryResult = exports.UpdateRepositoryRequest = exports.UpdatePackageVersionsStatusResult = exports.UpdatePackageVersionsStatusRequest = exports.UntagResourceResult = exports.UntagResourceRequest = exports.TagResourceResult = exports.TagResourceRequest = exports.PutRepositoryPermissionsPolicyResult = exports.PutRepositoryPermissionsPolicyRequest = exports.PutPackageOriginConfigurationResult = exports.PutPackageOriginConfigurationRequest = exports.PutDomainPermissionsPolicyResult = void 0;
6
6
  const CodeartifactServiceException_1 = require("./CodeartifactServiceException");
7
7
  class AccessDeniedException extends CodeartifactServiceException_1.CodeartifactServiceException {
8
8
  constructor(opts) {
@@ -17,6 +17,16 @@ class AccessDeniedException extends CodeartifactServiceException_1.CodeartifactS
17
17
  }
18
18
  }
19
19
  exports.AccessDeniedException = AccessDeniedException;
20
+ var AllowPublish;
21
+ (function (AllowPublish) {
22
+ AllowPublish["ALLOW"] = "ALLOW";
23
+ AllowPublish["BLOCK"] = "BLOCK";
24
+ })(AllowPublish = exports.AllowPublish || (exports.AllowPublish = {}));
25
+ var AllowUpstream;
26
+ (function (AllowUpstream) {
27
+ AllowUpstream["ALLOW"] = "ALLOW";
28
+ AllowUpstream["BLOCK"] = "BLOCK";
29
+ })(AllowUpstream = exports.AllowUpstream || (exports.AllowUpstream = {}));
20
30
  var HashAlgorithm;
21
31
  (function (HashAlgorithm) {
22
32
  HashAlgorithm["MD5"] = "MD5";
@@ -340,6 +350,36 @@ var DescribeDomainResult;
340
350
  ...obj,
341
351
  });
342
352
  })(DescribeDomainResult = exports.DescribeDomainResult || (exports.DescribeDomainResult = {}));
353
+ var DescribePackageRequest;
354
+ (function (DescribePackageRequest) {
355
+ DescribePackageRequest.filterSensitiveLog = (obj) => ({
356
+ ...obj,
357
+ });
358
+ })(DescribePackageRequest = exports.DescribePackageRequest || (exports.DescribePackageRequest = {}));
359
+ var PackageOriginRestrictions;
360
+ (function (PackageOriginRestrictions) {
361
+ PackageOriginRestrictions.filterSensitiveLog = (obj) => ({
362
+ ...obj,
363
+ });
364
+ })(PackageOriginRestrictions = exports.PackageOriginRestrictions || (exports.PackageOriginRestrictions = {}));
365
+ var PackageOriginConfiguration;
366
+ (function (PackageOriginConfiguration) {
367
+ PackageOriginConfiguration.filterSensitiveLog = (obj) => ({
368
+ ...obj,
369
+ });
370
+ })(PackageOriginConfiguration = exports.PackageOriginConfiguration || (exports.PackageOriginConfiguration = {}));
371
+ var PackageDescription;
372
+ (function (PackageDescription) {
373
+ PackageDescription.filterSensitiveLog = (obj) => ({
374
+ ...obj,
375
+ });
376
+ })(PackageDescription = exports.PackageDescription || (exports.PackageDescription = {}));
377
+ var DescribePackageResult;
378
+ (function (DescribePackageResult) {
379
+ DescribePackageResult.filterSensitiveLog = (obj) => ({
380
+ ...obj,
381
+ });
382
+ })(DescribePackageResult = exports.DescribePackageResult || (exports.DescribePackageResult = {}));
343
383
  var DescribePackageVersionRequest;
344
384
  (function (DescribePackageVersionRequest) {
345
385
  DescribePackageVersionRequest.filterSensitiveLog = (obj) => ({
@@ -352,6 +392,24 @@ var LicenseInfo;
352
392
  ...obj,
353
393
  });
354
394
  })(LicenseInfo = exports.LicenseInfo || (exports.LicenseInfo = {}));
395
+ var DomainEntryPoint;
396
+ (function (DomainEntryPoint) {
397
+ DomainEntryPoint.filterSensitiveLog = (obj) => ({
398
+ ...obj,
399
+ });
400
+ })(DomainEntryPoint = exports.DomainEntryPoint || (exports.DomainEntryPoint = {}));
401
+ var PackageVersionOriginType;
402
+ (function (PackageVersionOriginType) {
403
+ PackageVersionOriginType["EXTERNAL"] = "EXTERNAL";
404
+ PackageVersionOriginType["INTERNAL"] = "INTERNAL";
405
+ PackageVersionOriginType["UNKNOWN"] = "UNKNOWN";
406
+ })(PackageVersionOriginType = exports.PackageVersionOriginType || (exports.PackageVersionOriginType = {}));
407
+ var PackageVersionOrigin;
408
+ (function (PackageVersionOrigin) {
409
+ PackageVersionOrigin.filterSensitiveLog = (obj) => ({
410
+ ...obj,
411
+ });
412
+ })(PackageVersionOrigin = exports.PackageVersionOrigin || (exports.PackageVersionOrigin = {}));
355
413
  var PackageVersionDescription;
356
414
  (function (PackageVersionDescription) {
357
415
  PackageVersionDescription.filterSensitiveLog = (obj) => ({
@@ -614,6 +672,18 @@ var PutDomainPermissionsPolicyResult;
614
672
  ...obj,
615
673
  });
616
674
  })(PutDomainPermissionsPolicyResult = exports.PutDomainPermissionsPolicyResult || (exports.PutDomainPermissionsPolicyResult = {}));
675
+ var PutPackageOriginConfigurationRequest;
676
+ (function (PutPackageOriginConfigurationRequest) {
677
+ PutPackageOriginConfigurationRequest.filterSensitiveLog = (obj) => ({
678
+ ...obj,
679
+ });
680
+ })(PutPackageOriginConfigurationRequest = exports.PutPackageOriginConfigurationRequest || (exports.PutPackageOriginConfigurationRequest = {}));
681
+ var PutPackageOriginConfigurationResult;
682
+ (function (PutPackageOriginConfigurationResult) {
683
+ PutPackageOriginConfigurationResult.filterSensitiveLog = (obj) => ({
684
+ ...obj,
685
+ });
686
+ })(PutPackageOriginConfigurationResult = exports.PutPackageOriginConfigurationResult || (exports.PutPackageOriginConfigurationResult = {}));
617
687
  var PutRepositoryPermissionsPolicyRequest;
618
688
  (function (PutRepositoryPermissionsPolicyRequest) {
619
689
  PutRepositoryPermissionsPolicyRequest.filterSensitiveLog = (obj) => ({
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1GetDomainPermissionsPolicyCommand = exports.deserializeAws_restJson1GetAuthorizationTokenCommand = exports.deserializeAws_restJson1DisposePackageVersionsCommand = exports.deserializeAws_restJson1DisassociateExternalConnectionCommand = exports.deserializeAws_restJson1DescribeRepositoryCommand = exports.deserializeAws_restJson1DescribePackageVersionCommand = 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_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_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_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");
@@ -262,6 +262,31 @@ const serializeAws_restJson1DescribeDomainCommand = async (input, context) => {
262
262
  });
263
263
  };
264
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;
265
290
  const serializeAws_restJson1DescribePackageVersionCommand = async (input, context) => {
266
291
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
267
292
  const headers = {};
@@ -544,6 +569,8 @@ const serializeAws_restJson1ListPackagesCommand = async (input, context) => {
544
569
  ...(input.packagePrefix !== undefined && { "package-prefix": input.packagePrefix }),
545
570
  ...(input.maxResults !== undefined && { "max-results": input.maxResults.toString() }),
546
571
  ...(input.nextToken !== undefined && { "next-token": input.nextToken }),
572
+ ...(input.publish !== undefined && { publish: input.publish }),
573
+ ...(input.upstream !== undefined && { upstream: input.upstream }),
547
574
  };
548
575
  let body;
549
576
  return new protocol_http_1.HttpRequest({
@@ -628,6 +655,7 @@ const serializeAws_restJson1ListPackageVersionsCommand = async (input, context)
628
655
  ...(input.sortBy !== undefined && { sortBy: input.sortBy }),
629
656
  ...(input.maxResults !== undefined && { "max-results": input.maxResults.toString() }),
630
657
  ...(input.nextToken !== undefined && { "next-token": input.nextToken }),
658
+ ...(input.originType !== undefined && { originType: input.originType }),
631
659
  };
632
660
  let body;
633
661
  return new protocol_http_1.HttpRequest({
@@ -733,6 +761,38 @@ const serializeAws_restJson1PutDomainPermissionsPolicyCommand = async (input, co
733
761
  });
734
762
  };
735
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;
736
796
  const serializeAws_restJson1PutRepositoryPermissionsPolicyCommand = async (input, context) => {
737
797
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
738
798
  const headers = {
@@ -1420,6 +1480,56 @@ const deserializeAws_restJson1DescribeDomainCommandError = async (output, contex
1420
1480
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1421
1481
  }
1422
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
+ };
1423
1533
  const deserializeAws_restJson1DescribePackageVersionCommand = async (output, context) => {
1424
1534
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1425
1535
  return deserializeAws_restJson1DescribePackageVersionCommandError(output, context);
@@ -2504,6 +2614,56 @@ const deserializeAws_restJson1PutDomainPermissionsPolicyCommandError = async (ou
2504
2614
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2505
2615
  }
2506
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
+ };
2507
2667
  const deserializeAws_restJson1PutRepositoryPermissionsPolicyCommand = async (output, context) => {
2508
2668
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2509
2669
  return deserializeAws_restJson1PutRepositoryPermissionsPolicyCommandError(output, context);
@@ -2870,6 +3030,12 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
2870
3030
  });
2871
3031
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2872
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
+ };
2873
3039
  const serializeAws_restJson1PackageVersionList = (input, context) => {
2874
3040
  return input
2875
3041
  .filter((e) => e != null)
@@ -2976,6 +3142,12 @@ const deserializeAws_restJson1DomainDescription = (output, context) => {
2976
3142
  status: (0, smithy_client_1.expectString)(output.status),
2977
3143
  };
2978
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
+ };
2979
3151
  const deserializeAws_restJson1DomainSummary = (output, context) => {
2980
3152
  return {
2981
3153
  arn: (0, smithy_client_1.expectString)(output.arn),
@@ -3035,10 +3207,36 @@ const deserializeAws_restJson1PackageDependencyList = (output, context) => {
3035
3207
  });
3036
3208
  return retVal;
3037
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
+ };
3038
3233
  const deserializeAws_restJson1PackageSummary = (output, context) => {
3039
3234
  return {
3040
3235
  format: (0, smithy_client_1.expectString)(output.format),
3041
3236
  namespace: (0, smithy_client_1.expectString)(output.namespace),
3237
+ originConfiguration: output.originConfiguration != null
3238
+ ? deserializeAws_restJson1PackageOriginConfiguration(output.originConfiguration, context)
3239
+ : undefined,
3042
3240
  package: (0, smithy_client_1.expectString)(output.package),
3043
3241
  };
3044
3242
  };
@@ -3060,6 +3258,7 @@ const deserializeAws_restJson1PackageVersionDescription = (output, context) => {
3060
3258
  homePage: (0, smithy_client_1.expectString)(output.homePage),
3061
3259
  licenses: output.licenses != null ? deserializeAws_restJson1LicenseInfoList(output.licenses, context) : undefined,
3062
3260
  namespace: (0, smithy_client_1.expectString)(output.namespace),
3261
+ origin: output.origin != null ? deserializeAws_restJson1PackageVersionOrigin(output.origin, context) : undefined,
3063
3262
  packageName: (0, smithy_client_1.expectString)(output.packageName),
3064
3263
  publishedTime: output.publishedTime != null
3065
3264
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.publishedTime)))
@@ -3088,8 +3287,17 @@ const deserializeAws_restJson1PackageVersionErrorMap = (output, context) => {
3088
3287
  };
3089
3288
  }, {});
3090
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
+ };
3091
3298
  const deserializeAws_restJson1PackageVersionSummary = (output, context) => {
3092
3299
  return {
3300
+ origin: output.origin != null ? deserializeAws_restJson1PackageVersionOrigin(output.origin, context) : undefined,
3093
3301
  revision: (0, smithy_client_1.expectString)(output.revision),
3094
3302
  status: (0, smithy_client_1.expectString)(output.status),
3095
3303
  version: (0, smithy_client_1.expectString)(output.version),
@@ -3249,6 +3457,9 @@ const loadRestJsonErrorCode = (output, data) => {
3249
3457
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3250
3458
  const sanitizeErrorCode = (rawValue) => {
3251
3459
  let cleanValue = rawValue;
3460
+ if (typeof cleanValue === "number") {
3461
+ cleanValue = cleanValue.toString();
3462
+ }
3252
3463
  if (cleanValue.indexOf(":") >= 0) {
3253
3464
  cleanValue = cleanValue.split(":")[0];
3254
3465
  }