import { Request, RequestHandler } from 'express'; /** * Extended Express request type with additional properties added by the * middleware. * * @property rawBody - Raw request body buffer used for HMAC signature * verification */ export type RequestWithExtraProps = Request & { rawBody?: Buffer; }; /** * Configuration options for creating an Express application. * * @property _console - Console object for logging (for testing purposes) * @property _process - Process object for environment variables (for testing * purposes) * @property apiKeyEnvVarName - Environment variable name for the API key * @property maxRequestBodySize - Controls the maximum request body size. If * this is a number, then the value specifies the number of bytes; if it is a * string, the value is passed to the bytes library for parsing. */ export type FunctionConfig = { _console?: typeof console; _process?: typeof process; apiKeyEnvVarName?: string; maxRequestBodySize?: string | number; }; /** * Easily create a new scanner application with built-in authentication * middleware. The middleware validates that the content-type is * `application/json`, authenticates the request, and ensures the method is * POST. Appropriate HTTP error codes are returned for various failure * scenarios: * - 400 (bad request) * - 401 (unauthorized) * - 404 (not found) * - 405 (method not allowed) * - 415 (unsupported media type) * - 500 (internal server error) * * @remarks * **Environment Variables:** * - `LAMBDA_API_KEY` - Required. API key for authentication (configurable * via `apiKeyEnvVarName`) * * **Authentication:** * - HMAC-SHA256: `Authorization: HMAC-SHA256 ` (digest of request * body) */ export declare const createExpressApp: ({ _console, _process, apiKeyEnvVarName, maxRequestBodySize, }?: FunctionConfig) => (handler: RequestHandler) => import("express-serve-static-core").Express; export * from './api'; export * from './auth'; export * from './download'; export * from './error';