@ronnakamoto/inp-middleware
Version:
INP Protocol middleware for Express.js and Next.js applications - API-driven implementation with automatic metrics integration
19 lines • 933 B
TypeScript
/**
* INP Middleware Index
*
* Main exports for the INP middleware library
*/
import { Response, NextFunction } from 'express';
import { INPMiddlewareOptions, INPRequest } from '../types';
/**
* Unified INP Middleware
*
* A single middleware function that handles both service discovery and payment validation.
* It automatically discovers the service configuration and validates payments based on the endpoint requirements.
*/
export declare function inpMiddleware(options: INPMiddlewareOptions): (req: INPRequest, res: Response, next: NextFunction) => Promise<void>;
export default inpMiddleware;
export type { INPMiddlewareOptions, INPPaymentMiddlewareOptions, INPDiscoveryMiddlewareOptions } from '../types';
export { INPClient } from '../client/inp-client';
export { INPError, INPValidationError, INPPaymentError, INPDiscoveryError, INPClientError, INPConfigError } from '../errors';
//# sourceMappingURL=index.d.ts.map