From 599a60f9a2069529f949b4cd5daa0fc3938b8632 Mon Sep 17 00:00:00 2001 From: George Fu Date: Tue, 31 Dec 2024 17:17:51 -0500 Subject: [PATCH] docs: fix various tsdoc tags (#6765) --- packages/credential-providers/src/createCredentialChain.ts | 2 ++ packages/credential-providers/src/fromCognitoIdentity.ts | 5 +++++ packages/credential-providers/src/fromCognitoIdentityPool.ts | 2 ++ packages/credential-providers/src/fromContainerMetadata.ts | 2 ++ packages/credential-providers/src/fromEnv.ts | 2 ++ packages/credential-providers/src/fromIni.ts | 2 ++ packages/credential-providers/src/fromInstanceMetadata.ts | 2 ++ packages/credential-providers/src/fromNodeProviderChain.ts | 2 ++ packages/credential-providers/src/fromProcess.ts | 2 ++ packages/credential-providers/src/fromSSO.ts | 2 ++ .../credential-providers/src/fromTemporaryCredentials.ts | 2 ++ packages/credential-providers/src/fromTokenFile.ts | 2 ++ packages/credential-providers/src/fromWebToken.ts | 2 ++ packages/credential-providers/src/loadSts.ts | 3 +++ .../middleware-bucket-endpoint/src/bucketHostnameUtils.ts | 2 +- packages/middleware-user-agent/src/user-agent-middleware.ts | 2 +- packages/token-providers/src/fromStatic.ts | 1 + packages/xhr-http-handler/src/xhr-http-handler.ts | 4 ++-- 18 files changed, 37 insertions(+), 4 deletions(-) diff --git a/packages/credential-providers/src/createCredentialChain.ts b/packages/credential-providers/src/createCredentialChain.ts index 6bc80f26cde5..795d5f6115b3 100644 --- a/packages/credential-providers/src/createCredentialChain.ts +++ b/packages/credential-providers/src/createCredentialChain.ts @@ -55,6 +55,8 @@ type Mutable = { * @param credentialProviders - one or more credential providers. * @returns a single AwsCredentialIdentityProvider that calls the given * providers in sequence until one succeeds or all fail. + * + * @public */ export const createCredentialChain = ( ...credentialProviders: RuntimeConfigAwsCredentialIdentityProvider[] diff --git a/packages/credential-providers/src/fromCognitoIdentity.ts b/packages/credential-providers/src/fromCognitoIdentity.ts index 16167efbfdb0..fb467bb9d000 100644 --- a/packages/credential-providers/src/fromCognitoIdentity.ts +++ b/packages/credential-providers/src/fromCognitoIdentity.ts @@ -5,6 +5,9 @@ import { FromCognitoIdentityParameters as _FromCognitoIdentityParameters, } from "@aws-sdk/credential-provider-cognito-identity"; +/** + * @public + */ export interface FromCognitoIdentityParameters extends Omit<_FromCognitoIdentityParameters, "client"> { /** * Custom client configuration if you need overwrite default Cognito Identity client configuration. @@ -48,6 +51,8 @@ export type CognitoIdentityCredentialProvider = _CognitoIdentityCredentialProvid * }), * }); * ``` + * + * @public */ export const fromCognitoIdentity = (options: FromCognitoIdentityParameters): CognitoIdentityCredentialProvider => _fromCognitoIdentity({ diff --git a/packages/credential-providers/src/fromCognitoIdentityPool.ts b/packages/credential-providers/src/fromCognitoIdentityPool.ts index 9f6082ccb3e2..4f05354d4ca8 100644 --- a/packages/credential-providers/src/fromCognitoIdentityPool.ts +++ b/packages/credential-providers/src/fromCognitoIdentityPool.ts @@ -48,6 +48,8 @@ export interface FromCognitoIdentityPoolParameters extends Omit<_FromCognitoIden * }), * }); * ``` + * + * @public */ export const fromCognitoIdentityPool = ( options: FromCognitoIdentityPoolParameters diff --git a/packages/credential-providers/src/fromContainerMetadata.ts b/packages/credential-providers/src/fromContainerMetadata.ts index ee2d9b28cf5c..2bf2f01f54ae 100644 --- a/packages/credential-providers/src/fromContainerMetadata.ts +++ b/packages/credential-providers/src/fromContainerMetadata.ts @@ -25,6 +25,8 @@ export interface RemoteProviderInit extends _RemoteProviderInit, CredentialProvi * }), * }); * ``` + * + * @public */ export const fromContainerMetadata = (init?: RemoteProviderInit): AwsCredentialIdentityProvider => { init?.logger?.debug("@smithy/credential-provider-imds", "fromContainerMetadata"); diff --git a/packages/credential-providers/src/fromEnv.ts b/packages/credential-providers/src/fromEnv.ts index 2d939ba609cc..fe70aac8f196 100644 --- a/packages/credential-providers/src/fromEnv.ts +++ b/packages/credential-providers/src/fromEnv.ts @@ -24,5 +24,7 @@ import { AwsCredentialIdentityProvider } from "@smithy/types"; * credentials: fromEnv(), * }); * ``` + * + * @public */ export const fromEnv = (init?: FromEnvInit): AwsCredentialIdentityProvider => _fromEnv(init); diff --git a/packages/credential-providers/src/fromIni.ts b/packages/credential-providers/src/fromIni.ts index 40b64511178c..000eec90f1f7 100644 --- a/packages/credential-providers/src/fromIni.ts +++ b/packages/credential-providers/src/fromIni.ts @@ -39,6 +39,8 @@ import type { RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types" * }), * }); * ``` + * + * @public */ export const fromIni = (init: FromIniInit = {}): RuntimeConfigAwsCredentialIdentityProvider => _fromIni({ diff --git a/packages/credential-providers/src/fromInstanceMetadata.ts b/packages/credential-providers/src/fromInstanceMetadata.ts index 50f9dc7e0790..3aa48cbfb4c7 100644 --- a/packages/credential-providers/src/fromInstanceMetadata.ts +++ b/packages/credential-providers/src/fromInstanceMetadata.ts @@ -24,6 +24,8 @@ import { AwsCredentialIdentityProvider } from "@smithy/types"; * }), * }); * ``` + * + * @public */ export const fromInstanceMetadata = ( init?: _RemoteProviderInit & CredentialProviderOptions diff --git a/packages/credential-providers/src/fromNodeProviderChain.ts b/packages/credential-providers/src/fromNodeProviderChain.ts index efcbf3184a84..87d11fb86bb7 100644 --- a/packages/credential-providers/src/fromNodeProviderChain.ts +++ b/packages/credential-providers/src/fromNodeProviderChain.ts @@ -31,6 +31,8 @@ import type { AwsCredentialIdentityProvider } from "@smithy/types"; * clientPlugins: [addFooHeadersPlugin], * }) * ``` + * + * @public */ export const fromNodeProviderChain = (init: DefaultProviderInit = {}): AwsCredentialIdentityProvider => defaultProvider({ diff --git a/packages/credential-providers/src/fromProcess.ts b/packages/credential-providers/src/fromProcess.ts index e71dbee9839c..03141382b057 100644 --- a/packages/credential-providers/src/fromProcess.ts +++ b/packages/credential-providers/src/fromProcess.ts @@ -23,5 +23,7 @@ import { AwsCredentialIdentityProvider } from "@smithy/types"; * }), * }); * ``` + * + * @public */ export const fromProcess = (init?: FromProcessInit): AwsCredentialIdentityProvider => _fromProcess(init); diff --git a/packages/credential-providers/src/fromSSO.ts b/packages/credential-providers/src/fromSSO.ts index 19133bf75980..af04b52cc65c 100644 --- a/packages/credential-providers/src/fromSSO.ts +++ b/packages/credential-providers/src/fromSSO.ts @@ -41,6 +41,8 @@ import { AwsCredentialIdentityProvider } from "@smithy/types"; * }), * }); * ``` + * + * @public */ export const fromSSO = (init: FromSSOInit = {}): AwsCredentialIdentityProvider => { return _fromSSO({ ...init }); diff --git a/packages/credential-providers/src/fromTemporaryCredentials.ts b/packages/credential-providers/src/fromTemporaryCredentials.ts index a20ace99d171..c20f6f72a291 100644 --- a/packages/credential-providers/src/fromTemporaryCredentials.ts +++ b/packages/credential-providers/src/fromTemporaryCredentials.ts @@ -50,6 +50,8 @@ export interface FromTemporaryCredentialsOptions extends CredentialProviderOptio * ), * }); * ``` + * + * @public */ export const fromTemporaryCredentials = (options: FromTemporaryCredentialsOptions): AwsCredentialIdentityProvider => { let stsClient: STSClient; diff --git a/packages/credential-providers/src/fromTokenFile.ts b/packages/credential-providers/src/fromTokenFile.ts index c5614c12d3ca..5a7e854294a8 100644 --- a/packages/credential-providers/src/fromTokenFile.ts +++ b/packages/credential-providers/src/fromTokenFile.ts @@ -28,6 +28,8 @@ import type { AwsCredentialIdentityProvider } from "@smithy/types"; * }); * }); * ``` + * + * @public */ export const fromTokenFile = (init: FromTokenFileInit = {}): AwsCredentialIdentityProvider => _fromTokenFile({ diff --git a/packages/credential-providers/src/fromWebToken.ts b/packages/credential-providers/src/fromWebToken.ts index 93e75cbd83ba..d49a37470fcb 100644 --- a/packages/credential-providers/src/fromWebToken.ts +++ b/packages/credential-providers/src/fromWebToken.ts @@ -37,6 +37,8 @@ import type { AwsCredentialIdentityProvider } from "@smithy/types"; * }), * }); * ``` + * + * @public */ export const fromWebToken = (init: FromWebTokenInit): AwsCredentialIdentityProvider => _fromWebToken({ diff --git a/packages/credential-providers/src/loadSts.ts b/packages/credential-providers/src/loadSts.ts index 9a4a3a091916..864c032c4351 100644 --- a/packages/credential-providers/src/loadSts.ts +++ b/packages/credential-providers/src/loadSts.ts @@ -1,4 +1,7 @@ import { AssumeRoleCommand, STSClient } from "@aws-sdk/client-sts"; // This file must be loaded dynamically. +/** + * @internal + */ export { AssumeRoleCommand, STSClient }; diff --git a/packages/middleware-bucket-endpoint/src/bucketHostnameUtils.ts b/packages/middleware-bucket-endpoint/src/bucketHostnameUtils.ts index fe50709caccf..182cba30b89f 100644 --- a/packages/middleware-bucket-endpoint/src/bucketHostnameUtils.ts +++ b/packages/middleware-bucket-endpoint/src/bucketHostnameUtils.ts @@ -249,7 +249,7 @@ export const validateNoFIPS = (useFipsEndpoint?: boolean) => { /** * Validate the multi-region access point alias. - * @private + * @internal */ export const validateMrapAlias = (name: string) => { try { diff --git a/packages/middleware-user-agent/src/user-agent-middleware.ts b/packages/middleware-user-agent/src/user-agent-middleware.ts index 4438ede668d0..8af5dc0e8838 100644 --- a/packages/middleware-user-agent/src/user-agent-middleware.ts +++ b/packages/middleware-user-agent/src/user-agent-middleware.ts @@ -99,7 +99,7 @@ export const userAgentMiddleware = /** * Escape the each pair according to https://tools.ietf.org/html/rfc5234 and join the pair with pattern `name/version`. * User agent name may include prefix like `md/`, `api/`, `os/` etc., we should not escape the `/` after the prefix. - * @private + * @internal */ const escapeUserAgent = (userAgentPair: UserAgentPair): string => { const name = userAgentPair[0] diff --git a/packages/token-providers/src/fromStatic.ts b/packages/token-providers/src/fromStatic.ts index 308b8e6fc927..6127d609d08e 100644 --- a/packages/token-providers/src/fromStatic.ts +++ b/packages/token-providers/src/fromStatic.ts @@ -7,6 +7,7 @@ export interface FromStaticInit extends CredentialProviderOptions { /** * Creates a token provider that will read from static token. + * @public */ export const fromStatic = ({ token, logger }: FromStaticInit): TokenIdentityProvider => diff --git a/packages/xhr-http-handler/src/xhr-http-handler.ts b/packages/xhr-http-handler/src/xhr-http-handler.ts index 9d551ce35f20..84aab7ddede4 100644 --- a/packages/xhr-http-handler/src/xhr-http-handler.ts +++ b/packages/xhr-http-handler/src/xhr-http-handler.ts @@ -282,7 +282,7 @@ export class XhrHttpHandler extends EventEmitter implements HttpHandler { header = header.toLowerCase(); @@ -296,7 +296,7 @@ const isForbiddenRequestHeader = (header: string): boolean => { }; /** - * @private + * @internal */ const forbiddenHeaders = [ "Accept-Charset",