Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add packageDocumentation and improve interface inheritance #770

Merged
merged 1 commit into from May 23, 2023

Conversation

MYoung25
Copy link
Contributor

Description of changes:

  1. Add packageDocumentation trait with service documentation
  2. Export types used in inheritance chain to allow documentation to follow the entire chain
    1. export imported types to allow them to be inherited
    2. export default types to allow them to be inherited

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@MYoung25 MYoung25 requested review from a team as code owners May 22, 2023 19:13
MYoung25 added a commit to MYoung25/aws-sdk-js-v3 that referenced this pull request May 22, 2023
@trivikr trivikr changed the title add packageDocumentation and improve interface inheritance Add packageDocumentation and improve interface inheritance May 22, 2023
Copy link
Contributor

@syall syall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to put examples of the generated diffs in the PR description, and see if the output TypeScript compiles with the additional export statements and formatting?

@MYoung25
Copy link
Contributor Author

See below for example diffs with suggested changes. I also ran yarn build:all successfully with the updated changes across all clients.

Client

diff --git a/clients/client-accessanalyzer/src/AccessAnalyzerClient.ts b/clients/client-accessanalyzer/src/AccessAnalyzerClient.ts
index a7ab7ab1338..32741e41e6d 100644
--- a/clients/client-accessanalyzer/src/AccessAnalyzerClient.ts
+++ b/clients/client-accessanalyzer/src/AccessAnalyzerClient.ts
@@ -111,6 +111,7 @@ import {
 } from "./endpoint/EndpointParameters";
 import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
 
+export { __Client };
 /**
  * @public
  */
@@ -304,7 +305,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
 /**
  * @public
  */
-type AccessAnalyzerClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> &
+export type AccessAnalyzerClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> &
   ClientDefaults &
   RegionInputConfig &
   EndpointInputConfig<EndpointParameters> &
@@ -323,7 +324,7 @@ export interface AccessAnalyzerClientConfig extends AccessAnalyzerClientConfigTy
 /**
  * @public
  */
-type AccessAnalyzerClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
+export type AccessAnalyzerClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
   Required<ClientDefaults> &
   RegionResolvedConfig &
   EndpointResolvedConfig<EndpointParameters> &

Command

diff --git a/clients/client-accessanalyzer/src/commands/ApplyArchiveRuleCommand.ts b/clients/client-accessanalyzer/src/commands/ApplyArchiveRuleCommand.ts
index b28fc40bccb..d67632c721a 100644
--- a/clients/client-accessanalyzer/src/commands/ApplyArchiveRuleCommand.ts
+++ b/clients/client-accessanalyzer/src/commands/ApplyArchiveRuleCommand.ts
@@ -17,6 +17,10 @@ import { AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTyp
 import { ApplyArchiveRuleRequest } from "../models/models_0";
 import { de_ApplyArchiveRuleCommand, se_ApplyArchiveRuleCommand } from "../protocols/Aws_restJson1";
 
+/**
+ * @public
+ */
+export { __MetadataBearer, $Command };
 /**
  * @public
  *

Package Documentation

diff --git a/clients/client-accessanalyzer/src/index.ts b/clients/client-accessanalyzer/src/index.ts
index c253b9f44f9..b39833d5156 100644
--- a/clients/client-accessanalyzer/src/index.ts
+++ b/clients/client-accessanalyzer/src/index.ts
@@ -1,8 +1,22 @@
-export * from "./AccessAnalyzer";
 // smithy-typescript generated code
+/* eslint-disable */
+/**
+ * <p>Identity and Access Management Access Analyzer helps identify potential resource-access risks by enabling you to
+ *          identify any policies that grant access to an external principal. It does this by using
+ *          logic-based reasoning to analyze resource-based policies in your Amazon Web Services environment. An
+ *          external principal can be another Amazon Web Services account, a root user, an IAM user or role, a
+ *          federated user, an Amazon Web Services service, or an anonymous user. You can also use IAM Access Analyzer to
+ *          preview and validate public and cross-account access to your resources before deploying
+ *          permissions changes. This guide describes the Identity and Access Management Access Analyzer operations that you can
+ *          call programmatically. For general information about IAM Access Analyzer, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/what-is-access-analyzer.html">Identity and Access Management Access Analyzer</a> in the <b>IAM User Guide</b>.</p>
+ *          <p>To start using IAM Access Analyzer, you first need to create an analyzer.</p>
+ *
+ * @packageDocumentation
+ */
 export * from "./AccessAnalyzerClient";
+export * from "./AccessAnalyzer";
 export * from "./commands";
-export * from "./models";
 export * from "./pagination";
+export * from "./models";
 
 export { AccessAnalyzerServiceException } from "./models/AccessAnalyzerServiceException";
diff --git a/clients/client-accessanalyzer/src/models/AccessAnalyzerServiceException.ts b/clients/client-accessanalyzer/src/models/AccessAnalyzerServiceException.ts
index b0c85fd6512..854bf3ad8c1 100644
--- a/clients/client-accessanalyzer/src/models/AccessAnalyzerServiceException.ts
+++ b/clients/client-accessanalyzer/src/models/AccessAnalyzerServiceException.ts
@@ -4,6 +4,7 @@ import {
   ServiceExceptionOptions as __ServiceExceptionOptions,
 } from "@aws-sdk/smithy-client";
 
+export { __ServiceException, __ServiceExceptionOptions };
 /**
  * @public
  *

@MYoung25 MYoung25 merged commit 988ad4c into smithy-lang:main May 23, 2023
7 checks passed
MYoung25 added a commit to aws/aws-sdk-js-v3 that referenced this pull request May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants