diff --git a/examples/app/functions/commons/helpers/scan-items.ts b/examples/app/functions/commons/helpers/scan-items.ts index d528085f28..9c1ad6ef94 100644 --- a/examples/app/functions/commons/helpers/scan-items.ts +++ b/examples/app/functions/commons/helpers/scan-items.ts @@ -6,7 +6,7 @@ import type { DebugLogger } from '#types'; /** * Scan the DynamoDB table and return all items. * - * @note this function is purposefully not paginated to keep the example simple + * this function is purposefully not paginated to keep the example simple * * @param logger A logger instance */ diff --git a/packages/batch/src/BasePartialBatchProcessor.ts b/packages/batch/src/BasePartialBatchProcessor.ts index 7a6c422f57..f4ac5ac6c9 100644 --- a/packages/batch/src/BasePartialBatchProcessor.ts +++ b/packages/batch/src/BasePartialBatchProcessor.ts @@ -22,8 +22,6 @@ import type { * This class extends the {@link BasePartialProcessor} class and adds additional * functionality to handle batch processing. Specifically, it provides methods * to collect failed records and build the partial failure response. - * - * @abstract */ abstract class BasePartialBatchProcessor extends BasePartialProcessor { /** diff --git a/packages/batch/src/BasePartialProcessor.ts b/packages/batch/src/BasePartialProcessor.ts index a01c09db29..2e7e9bf8ac 100644 --- a/packages/batch/src/BasePartialProcessor.ts +++ b/packages/batch/src/BasePartialProcessor.ts @@ -18,8 +18,6 @@ import type { * The class comes with a few helper methods and hooks that can be used to prepare * the processor before processing records, clean up after processing records, and * handle records that succeed or fail processing. - * - * @abstract */ abstract class BasePartialProcessor { /** @@ -67,8 +65,6 @@ abstract class BasePartialProcessor { * This method should be called after processing a full batch to reset the processor. * * You can use this as a hook to run any cleanup logic after processing the records. - * - * @abstract */ public abstract clean(): void; @@ -98,8 +94,6 @@ abstract class BasePartialProcessor { * This method should be called before processing the records * * You can use this as a hook to run any setup logic before processing the records. - * - * @abstract */ public abstract prepare(): void; @@ -151,8 +145,6 @@ abstract class BasePartialProcessor { * This is to ensure that the processor keeps track of the results and the records * that succeeded and failed processing. * - * @abstract - * * @param record Record to be processed */ public abstract processRecord( @@ -171,8 +163,6 @@ abstract class BasePartialProcessor { * This is to ensure that the processor keeps track of the results and the records * that succeeded and failed processing. * - * @abstract - * * @param record Record to be processed */ public abstract processRecordSync( diff --git a/packages/commons/src/LRUCache.ts b/packages/commons/src/LRUCache.ts index 76d2c6efc2..161938021b 100644 --- a/packages/commons/src/LRUCache.ts +++ b/packages/commons/src/LRUCache.ts @@ -46,8 +46,8 @@ class Item { * which is licensed under the MIT license and [recommends users to copy the code into their * own projects](https://github.com/rsms/js-lru/tree/master#usage). * - * @typeparam K - The type of the key - * @typeparam V - The type of the value + * @typeParam K - The type of the key + * @typeParam V - The type of the value */ class LRUCache { private leastRecentlyUsed?: Item; diff --git a/packages/commons/src/config/EnvironmentVariablesService.ts b/packages/commons/src/config/EnvironmentVariablesService.ts index 726c05b683..f75ac127d0 100644 --- a/packages/commons/src/config/EnvironmentVariablesService.ts +++ b/packages/commons/src/config/EnvironmentVariablesService.ts @@ -17,7 +17,6 @@ import type { ConfigServiceInterface } from '../types/ConfigServiceInterface.js' * @see https://docs.powertools.aws.dev/lambda/typescript/latest/#environment-variables * * @class - * @implements {ConfigServiceInterface} */ class EnvironmentVariablesService implements ConfigServiceInterface { /** diff --git a/packages/commons/src/middleware/cleanupMiddlewares.ts b/packages/commons/src/middleware/cleanupMiddlewares.ts index 577b793904..6a85d104d1 100644 --- a/packages/commons/src/middleware/cleanupMiddlewares.ts +++ b/packages/commons/src/middleware/cleanupMiddlewares.ts @@ -59,7 +59,6 @@ const isFunction = (obj: unknown): obj is CleanupFunction => { * ``` * * @param request The Middy request object - * @param options An optional object that can be used to pass options to the function */ const cleanupMiddlewares = async (request: MiddyLikeRequest): Promise => { const cleanupFunctionNames = [ diff --git a/packages/commons/src/types/ConfigServiceInterface.ts b/packages/commons/src/types/ConfigServiceInterface.ts index 2c9e5b2d4f..bfe1b24904 100644 --- a/packages/commons/src/types/ConfigServiceInterface.ts +++ b/packages/commons/src/types/ConfigServiceInterface.ts @@ -1,6 +1,4 @@ /** - * @abstract ConfigServiceInterface - * * This class defines common methods and variables that can be set by the developer * in the runtime. */ diff --git a/packages/commons/src/types/middy.ts b/packages/commons/src/types/middy.ts index ab48fcbf6e..b8173d263e 100644 --- a/packages/commons/src/types/middy.ts +++ b/packages/commons/src/types/middy.ts @@ -3,7 +3,7 @@ import type { Context } from 'aws-lambda'; /** * This type represents the shape of a Middy.js request object. * - * @note We need to define these types and interfaces here because we can't import them from Middy.js. + * We need to define these types and interfaces here because we can't import them from Middy.js. * * Importing them from Middy.js would introduce a dependency on it, which we don't want * because we want to keep it as an optional dependency. @@ -72,7 +72,8 @@ type MiddyLikeRequest = { * Each Powertools for AWS middleware that needs to perform cleanup operations will * store a cleanup function with this signature in the `request.internal` object. * - * @see {@link cleanupMiddlewares} + * @see {@link middleware/cleanupMiddlewares.cleanupMiddlewares} + * */ type CleanupFunction = (request: MiddyLikeRequest) => Promise; diff --git a/packages/commons/typedoc.json b/packages/commons/typedoc.json index fb15e9b68e..d34f7f99ef 100644 --- a/packages/commons/typedoc.json +++ b/packages/commons/typedoc.json @@ -5,6 +5,7 @@ "entryPoints": [ "./src/index.ts", "./src/types/index.ts", + "./src/middleware/cleanupMiddlewares.ts", "./src/typeUtils.ts", "./src/fromBase64.ts", "./src/LRUCache.ts" diff --git a/packages/idempotency/src/config/EnvironmentVariablesService.ts b/packages/idempotency/src/config/EnvironmentVariablesService.ts index a6d3e9b257..b5cc1ba262 100644 --- a/packages/idempotency/src/config/EnvironmentVariablesService.ts +++ b/packages/idempotency/src/config/EnvironmentVariablesService.ts @@ -1,5 +1,5 @@ -import type { ConfigServiceInterface } from '../types/ConfigServiceInterface.js'; import { EnvironmentVariablesService as CommonEnvironmentVariablesService } from '@aws-lambda-powertools/commons'; +import type { ConfigServiceInterface } from '../types/ConfigServiceInterface.js'; /** * Class EnvironmentVariablesService @@ -11,7 +11,6 @@ import { EnvironmentVariablesService as CommonEnvironmentVariablesService } from * * @class * @extends {CommonEnvironmentVariablesService} - * @implements {ConfigServiceInterface} * @see https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime * @see https://docs.powertools.aws.dev/lambda/typescript/latest/#environment-variables */ diff --git a/packages/idempotency/src/types/DynamoDBPersistence.ts b/packages/idempotency/src/types/DynamoDBPersistence.ts index 97733e8732..15a3f7ab4f 100644 --- a/packages/idempotency/src/types/DynamoDBPersistence.ts +++ b/packages/idempotency/src/types/DynamoDBPersistence.ts @@ -62,7 +62,7 @@ interface DynamoDBPersistenceOptionsWithClientInstance } /** - * Options for the {@link DynamoDBPersistenceLayer} class constructor. + * Options for the {@link persistence/DynamoDBPersistenceLayer.DynamoDBPersistenceLayer | DynamoDBPersistenceLayer} class constructor. * * @see {@link DynamoDBPersistenceOptionsBase}, {@link DynamoDBPersistenceOptionsWithClientConfig}, and {@link DynamoDBPersistenceOptionsWithClientInstance} for full list of properties. * diff --git a/packages/idempotency/src/types/IdempotencyOptions.ts b/packages/idempotency/src/types/IdempotencyOptions.ts index 755e2edcac..99736c6e22 100644 --- a/packages/idempotency/src/types/IdempotencyOptions.ts +++ b/packages/idempotency/src/types/IdempotencyOptions.ts @@ -6,8 +6,9 @@ import type { BasePersistenceLayer } from '../persistence/BasePersistenceLayer.j /** * Configuration options for the idempotency utility. * - * When making a function idempotent you should always set - * a persistence store (i.e. @see {@link persistence/DynamoDBPersistenceLayer.DynamoDBPersistenceLayer | DynamoDBPersistenceLayer}). + * When making a function idempotent you should always set a persistence store. + * + * @see {@link persistence/DynamoDBPersistenceLayer.DynamoDBPersistenceLayer | DynamoDBPersistenceLayer} * * Optionally, you can also pass a custom configuration object, * this allows you to customize the behavior of the idempotency utility. diff --git a/packages/jmespath/src/PowertoolsFunctions.ts b/packages/jmespath/src/PowertoolsFunctions.ts index 3cba848f73..fcdc86b668 100644 --- a/packages/jmespath/src/PowertoolsFunctions.ts +++ b/packages/jmespath/src/PowertoolsFunctions.ts @@ -29,7 +29,7 @@ const decoder = new TextDecoder('utf-8'); * console.log(result); // { foo: 'bar' } * ``` * - * When using the {@link extractDataFromEnvelope} function, the PowertoolsFunctions class is automatically used. + * When using the {@link envelopes.extractDataFromEnvelope} function, the PowertoolsFunctions class is automatically used. * */ class PowertoolsFunctions extends Functions { diff --git a/packages/logger/src/types/Logger.ts b/packages/logger/src/types/Logger.ts index f52cc52143..0d6b7999ff 100644 --- a/packages/logger/src/types/Logger.ts +++ b/packages/logger/src/types/Logger.ts @@ -40,7 +40,7 @@ type InjectLambdaContextOptions = { */ clearState?: boolean; /** - * If `true`, the logger will reset the keys added via {@link `appendKeys()`} + * If `true`, the logger will reset the keys added via {@link index.Logger.appendKeys()} */ resetKeys?: boolean; }; @@ -197,7 +197,4 @@ export type { ConstructorOptions, InjectLambdaContextOptions, CustomJsonReplacerFn, - BaseConstructorOptions, - PersistentKeysOption, - DeprecatedOption, }; diff --git a/packages/logger/src/types/index.ts b/packages/logger/src/types/index.ts index 8248f65496..3b3d69232f 100644 --- a/packages/logger/src/types/index.ts +++ b/packages/logger/src/types/index.ts @@ -5,9 +5,6 @@ export type { LogLevelThresholds, LogAttributes, LogLevel, - LogFormatterInterface, - LogItemInterface, - LogFormatterOptions, } from './Log.js'; export type { LogItemMessage, @@ -19,7 +16,4 @@ export type { InjectLambdaContextOptions, CustomJsonReplacerFn, LoggerInterface, - BaseConstructorOptions, - PersistentKeysOption, - DeprecatedOption, } from './Logger.js'; diff --git a/packages/logger/typedoc.json b/packages/logger/typedoc.json index ea40eba195..7df20e3456 100644 --- a/packages/logger/typedoc.json +++ b/packages/logger/typedoc.json @@ -3,10 +3,7 @@ "entryPoints": [ "./src/index.ts", "./src/types/index.ts", - "./src/types/ConfigServiceInterface.ts", - "./src/middleware/middy.ts", - "./src/formatter/LogFormatter.ts", - "./src/config/EnvironmentVariablesService.ts" + "./src/middleware/middy.ts" ], "readme": "README.md" } diff --git a/packages/parameters/src/base/transformValue.ts b/packages/parameters/src/base/transformValue.ts index 7e5f4db64c..7d2a0e55ee 100644 --- a/packages/parameters/src/base/transformValue.ts +++ b/packages/parameters/src/base/transformValue.ts @@ -23,7 +23,7 @@ import type { TransformOptions } from '../types/BaseProvider.js'; * * If the transformation fails, the function will return the value as-is unless `throwOnTransformError` is set to `true`. * - * @note When using `auto` mode, the key must end with either `.json` or `.binary` to be transformed. Automatic transformation is supported only for + * When using `auto` mode, the key must end with either `.json` or `.binary` to be transformed. Automatic transformation is supported only for * `getMultiple` calls. * * @param {string | Uint8Array} value - Value to be transformed diff --git a/packages/parser/src/middleware/parser.ts b/packages/parser/src/middleware/parser.ts index f411bc119b..aa889125b5 100644 --- a/packages/parser/src/middleware/parser.ts +++ b/packages/parser/src/middleware/parser.ts @@ -8,7 +8,7 @@ import type { ParserOptions, ParserOutput } from '../types/parser.js'; /** * A middiy middleware to parse your event. * - * @exmaple + * @example * ```typescript * import { parser } from '@aws-lambda-powertools/parser/middleware'; * import middy from '@middy/core'; diff --git a/packages/parser/src/types/index.ts b/packages/parser/src/types/index.ts index 33c9fadcd0..93864c43ee 100644 --- a/packages/parser/src/types/index.ts +++ b/packages/parser/src/types/index.ts @@ -29,6 +29,7 @@ export type { KinesisFireHoseSqsEvent, LambdaFunctionUrlEvent, SesEvent, + SnsSqsNotification, S3ObjectLambdaEvent, VpcLatticeEvent, VpcLatticeEventV2, diff --git a/packages/tracer/src/provider/ProviderService.ts b/packages/tracer/src/provider/ProviderService.ts index 7d5afffa96..69e7255b8c 100644 --- a/packages/tracer/src/provider/ProviderService.ts +++ b/packages/tracer/src/provider/ProviderService.ts @@ -99,7 +99,7 @@ class ProviderService implements ProviderServiceInterface { /** * Create a segment at the start of a request made with `undici` or `fetch`. * - * @note that `message` must be `unknown` because that's the type expected by `subscribe` + * That `message` must be `unknown` because that's the type expected by `subscribe` * * @param message The message received from the `undici` channel */ @@ -129,7 +129,7 @@ class ProviderService implements ProviderServiceInterface { * Enrich the subsegment with the response details, and close it. * Then, set the parent segment as the active segment. * - * @note that `message` must be `unknown` because that's the type expected by `subscribe` + * `message` must be `unknown` because that's the type expected by `subscribe` * * @param message The message received from the `undici` channel */ @@ -174,7 +174,7 @@ class ProviderService implements ProviderServiceInterface { * This is used to handle the case when the request fails to establish a connection with the server or timeouts. * In all other cases, for example, when the server returns a 4xx or 5xx status code, the error is added in the `onResponse` function. * - * @note that `message` must be `unknown` because that's the type expected by `subscribe` + * that `message` must be `unknown` because that's the type expected by `subscribe` * * @param message The message received from the `undici` channel */ diff --git a/typedoc.json b/typedoc.json index bd2767fbd8..7f053ad259 100644 --- a/typedoc.json +++ b/typedoc.json @@ -13,8 +13,9 @@ "layers", "examples/**", "packages/event-handler", + "packages/testing" ], - "plugin": ["typedoc-plugin-zod"], + "plugin": ["typedoc-plugin-zod", "typedoc-plugin-missing-exports"], "skipErrorChecking": true, "excludePrivate": true, "visibilityFilters": {