import type { AxiosPromise, AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig } from 'axios'; import type { Lambda, LambdaClientConfig } from '@aws-sdk/client-lambda'; import type { Context, Handler } from 'aws-lambda'; import { SignatureV4CryptoInit, SignatureV4Init } from '@aws-sdk/signature-v4'; export interface RetryOptions { attempts?: number; factor?: number; maxTimeout?: number; retryCondition?: (err: Error) => boolean; } declare type SignatureV4Constructor = SignatureV4Init & SignatureV4CryptoInit; declare type SignatureV4Optionals = 'credentials' | 'region' | 'sha256' | 'service'; export declare type SignAwsV4Config = Omit & Partial>; export interface AlphaOptions extends AxiosRequestConfig { retry?: RetryOptions | boolean; lambda?: Handler; context?: Context; signAwsV4?: SignAwsV4Config; /** * (Optional) The AWS endpoint to use when invoking the target Lambda function. */ lambdaEndpoint?: string; /** * (Optional) The AWS region to use when invoking the target Lambda function. */ lambdaRegion?: LambdaClientConfig['region']; Lambda?: typeof Lambda; } export declare type InternalAlphaRequestConfig = AlphaOptions & InternalAxiosRequestConfig; export declare type AlphaAdapter = (config: InternalAlphaRequestConfig) => AxiosPromise; export declare type AlphaInterceptor = (config: InternalAlphaRequestConfig) => (Promise | InternalAlphaRequestConfig); export interface AlphaResponse extends AxiosResponse { config: InternalAlphaRequestConfig; } export interface HandlerRequest> { event: T; context: Context; } export {};