monime-package 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,13 +1,14 @@
1
1
 
2
2
  # monime-package
3
3
 
4
- Official, lightweight TypeScript SDK for Monime. It provides a typed client for common Monime endpoints with consistent results and simple ergonomics.
4
+ Official TypeScript SDK for Monime - a modern, type-safe client library for Sierra Leone's leading payment platform. Provides comprehensive API coverage with predictable response patterns and excellent developer experience.
5
5
 
6
6
  ![npm version](https://img.shields.io/npm/v/monime-package.svg)
7
7
  ![npm downloads](https://img.shields.io/npm/dm/monime-package.svg)
8
8
  ![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue.svg)
9
9
  ![Node.js](https://img.shields.io/badge/Node.js-%3E=14-green.svg)
10
10
  ![License](https://img.shields.io/badge/license-MIT-lightgrey.svg)
11
+ ![Package Size](https://img.shields.io/bundlephobia/minzip/monime-package.svg)
11
12
 
12
13
  Package: `monime-package`
13
14
 
@@ -20,6 +21,11 @@ Package: `monime-package`
20
21
  - **[Environment Variables](#environment-variables)**
21
22
  - **[Quick Start](#quick-start)**
22
23
  - **[API Reference](#api-reference)**
24
+ - **[Payments](#payments)**
25
+ - **[Webhooks](#webhooks)**
26
+ - **[Receipts](#receipts)**
27
+ - **[USSD OTPs](#ussd-otps)**
28
+ - **[Provider KYC](#provider-kyc)**
23
29
  - **[Financial Accounts](#financial-accounts)**
24
30
  - **[Internal Transfers](#internal-transfers)**
25
31
  - **[Payment Codes](#payment-codes)**
@@ -47,6 +53,8 @@ Package: `monime-package`
47
53
  - **Client-based** auth: set credentials once per instance
48
54
  - **Minimal deps** (`axios`) and small surface area
49
55
  - **Full API coverage** for all Monime endpoints
56
+ - **Tree-shaking support** - only bundle what you use
57
+ - **Dual module output** - works with both CommonJS and ES modules
50
58
  - **Mobile Money support** (Africell, Orange, etc.)
51
59
  - **Bank transfers** and digital wallet integrations
52
60
  - **Checkout sessions** for hosted payment pages
@@ -59,8 +67,15 @@ Package: `monime-package`
59
67
  npm install monime-package
60
68
  # or
61
69
  pnpm add monime-package
70
+ # or
71
+ yarn add monime-package
62
72
  ```
63
73
 
74
+ **Requirements:**
75
+ - Node.js >= 14
76
+ - TypeScript >= 4.5 (for type safety)
77
+ - Modern bundler that supports ES modules and tree-shaking
78
+
64
79
  ---
65
80
 
66
81
  ## Environment Variables
@@ -464,6 +479,35 @@ type ClientOptions = {
464
479
 
465
480
  ---
466
481
 
482
+ ## Development & Build
483
+
484
+ This package uses modern tooling for development and building:
485
+
486
+ ### Build System
487
+ - **tsup** for fast TypeScript compilation with dual CJS/ESM output
488
+ - **Biome** for code formatting and linting
489
+ - **Vitest** for testing framework
490
+
491
+ ### Available Scripts
492
+ ```bash
493
+ # Build the package
494
+ pnpm build
495
+
496
+ # Run tests
497
+ pnpm test
498
+
499
+ # Format and lint code
500
+ pnpm lint-format
501
+ ```
502
+
503
+ ### Module Structure
504
+ The package is organized into modules under `src/modules/`:
505
+ - Each module has its own types, implementation, and index file
506
+ - All types are exported from `src/modules/types.ts`
507
+ - The main client (`MonimeClient`) exposes all modules as properties
508
+
509
+ ---
510
+
467
511
  ## Complete Examples
468
512
 
469
513
  Here are comprehensive examples showing real-world usage patterns:
@@ -734,6 +778,30 @@ import type {
734
778
  // Core types
735
779
  ClientOptions,
736
780
 
781
+ // Payment types
782
+ GetPayment,
783
+ ListPayments,
784
+ PatchPayment,
785
+
786
+ // Webhook types
787
+ CreateWebhookRequest,
788
+ CreateWebhookResponse,
789
+ GetWebhookResponse,
790
+ ListWebhooksResponse,
791
+ UpdateWebhookRequest,
792
+ UpdateWebhookResponse,
793
+
794
+ // Receipt types
795
+ GetReceiptResponse,
796
+ RedeemReceiptResponse,
797
+
798
+ // USSD OTP types
799
+ CreateUssdOtpRequest,
800
+ CreateUssdOtpResponse,
801
+
802
+ // Provider KYC types
803
+ GetProviderKycResponse,
804
+
737
805
  // Financial Account types
738
806
  CreateFinancialAccount,
739
807
  GetFinancialAccount,
@@ -1031,10 +1099,13 @@ We welcome contributions.
1031
1099
  ### Getting Started
1032
1100
  1. **Fork the repository** on GitHub
1033
1101
  2. **Clone your fork** locally
1034
- 3. **Create a feature branch** from `main`
1035
- 4. **Make your changes** following our coding conventions
1036
- 5. **Test your changes** thoroughly
1037
- 6. **Submit a pull request** with a clear description
1102
+ 3. **Install dependencies** with `pnpm install`
1103
+ 4. **Create a feature branch** from `main`
1104
+ 5. **Make your changes** following our coding conventions
1105
+ 6. **Run linting** with `pnpm lint-format`
1106
+ 7. **Test your changes** with `pnpm test`
1107
+ 8. **Build the package** with `pnpm build`
1108
+ 9. **Submit a pull request** with a clear description
1038
1109
 
1039
1110
  For detailed contribution guidelines, see [CONTRIBUTING.md](./CONTRIBUTING.md)
1040
1111