UNPKG

@ronnakamoto/inp-middleware

Version:

INP Protocol middleware for Express.js and Next.js applications - API-driven implementation with automatic metrics integration

37 lines 1.97 kB
"use strict"; /** * INP Middleware - Internet Native Payments for Express.js and Next.js * * A TypeScript middleware library that enables service providers to accept * and validate payments using the INP (Internet Native Payments) protocol. * * @packageDocumentation */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.INP_PROTOCOL_VERSION = exports.VERSION = exports.DEFAULT_CONFIG = exports.INPPaymentError = exports.INPValidationError = exports.INPError = exports.INPClient = exports.INPMiddleware = exports.inpMiddleware = void 0; // Main middleware export var middleware_1 = require("./middleware"); Object.defineProperty(exports, "inpMiddleware", { enumerable: true, get: function () { return middleware_1.inpMiddleware; } }); Object.defineProperty(exports, "INPMiddleware", { enumerable: true, get: function () { return __importDefault(middleware_1).default; } }); // Client for direct API interactions var inp_client_1 = require("./client/inp-client"); Object.defineProperty(exports, "INPClient", { enumerable: true, get: function () { return inp_client_1.INPClient; } }); // Error classes var errors_1 = require("./errors"); Object.defineProperty(exports, "INPError", { enumerable: true, get: function () { return errors_1.INPError; } }); Object.defineProperty(exports, "INPValidationError", { enumerable: true, get: function () { return errors_1.INPValidationError; } }); Object.defineProperty(exports, "INPPaymentError", { enumerable: true, get: function () { return errors_1.INPPaymentError; } }); // Default configuration exports.DEFAULT_CONFIG = { inpPlatformUrl: 'https://internetnativepayment.org', timeout: 30000, retries: 3, logErrors: true }; // Version information exports.VERSION = '1.0.0'; exports.INP_PROTOCOL_VERSION = '1.0'; //# sourceMappingURL=index.js.map