- Add AbortSignal support for request cancellation, configurable timeout, exponential backoff for retries, and update TypeScript target to ES2020
- Major improvements and new features:
- Added request/response logging with optional
loggingflag - Implemented retry logic for failed requests with
retriesandretryDelayoptions - Added webhook signature verification utility (
verifyWebhookmethod) - Migrated from deprecated tsdx to modern Rollup build system
- Improved error handling with TypeScript type guards and centralized error handling
- Created dedicated axios instance with proper configuration
- Fixed TypeScript configuration issues and enabled strict mode
- Updated Husky to v9 with modern configuration
- Added comprehensive CHANGELOG.md
- Added request/response logging with optional
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Request/response logging capability with optional
loggingflag - Retry logic for failed requests with configurable
retriesandretryDelayoptions - Webhook signature verification utility (
verifyWebhookmethod) webhookSecretoption in ChapaOptions for webhook verification- Standalone
verifyWebhookSignaturefunction for webhook validation - TypeScript strict mode for enhanced type safety
- Node.js type definitions for better IDE support
- Migrated from deprecated
tsdxto modern Rollup build system - Updated Husky configuration from v4 to v9 format
- Improved error handling with proper TypeScript type guards
- Centralized error handling with
withErrorHandlingutility function - Created dedicated axios instance with proper configuration (base URL, timeout, headers)
- Optimized tsconfig.json for Node.js environment (removed DOM lib, added strict mode)
- Updated package.json with proper
typesfield and modern tooling
- TypeScript configuration issues (removed conflicting
noEmit, unnecessaryjsxanddomlib) - Duplicate error handling code across all methods
- Missing type safety in error handling
- Husky hooks configuration for v9 compatibility
- Module type warning in rollup.config (renamed to .mjs)
- Code maintainability with DRY principles
- Type safety throughout the codebase
- Build configuration and output
- Error messages and handling
- Developer experience with better TypeScript support
- Added
crypto-jsfor webhook signature verification - Added
@types/crypto-jsfor TypeScript support - Added
@types/nodefor Node.js type definitions - Added Rollup and related plugins for modern build system
- Added ESLint for code quality
- Removed deprecated
tsdxpackage - Removed
size-limitpackage
- Initialize Transaction
- Split Payment
- Verify Payment
- List Banks
- Create Subaccount
- All Transaction
- Transaction Logs
- Transfer
- Bulk Transfer
- Verify Transfer
- All Transfer
- Direct Charge
- Authorize Direct Charge
- Refund
- Generate Transaction Reference
- Full TypeScript Support