// Copyright 2017 - 2026 will Farrell, Luciano Mammino, and Middy contributors. // SPDX-License-Identifier: MIT import type { Signer, SignerConfig } from "@aws-sdk/rds-signer"; import type middy from "@middy/core"; import type { Options as MiddyOptions } from "@middy/util"; import type { Context as LambdaContext } from "aws-lambda"; export type ParamType = string & { __returnType?: T }; export declare function rdsSignerParam(name: string): ParamType; export type RdsSignerOptions = Omit< MiddyOptions, "fetchData" > & { fetchData?: { [key: string]: SignerConfig; }; }; export type Context = TOptions extends { setToContext: true } ? TOptions extends { fetchData: infer TFetchData } ? LambdaContext & { [Key in keyof TFetchData]: string; } : never : LambdaContext; export type Internal = TOptions extends RdsSignerOptions ? TOptions extends { fetchData: infer TFetchData } ? { [Key in keyof TFetchData]: string; } : {} : {}; declare function rdsSigner( options?: TOptions, ): middy.MiddlewareObj< unknown, unknown, Error, Context, Internal >; export default rdsSigner;