@reevit/core 0.4.6 → 0.5.0

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
@@ -13,7 +13,7 @@ npm install @reevit/core
13
13
  - **ReevitAPIClient**: A lightweight, promise-based client for interacting with the Reevit backend.
14
14
  - **State Machine**: Framework-agnostic logic for managing checkout flows.
15
15
  - **Utilities**: Amount formatting, phone validation, network detection, and more.
16
- - **Types**: Comprehensive TypeScript definitions for the entire Reevit ecosystem.
16
+ - **Types**: Comprehensive TypeScript definitions for the entire Reevit ecosystem (Card, Mobile Money, Bank Transfer, Apple Pay, Google Pay).
17
17
  - **Styles**: Shared CSS for the "Unified Payment Widget" appearance.
18
18
 
19
19
  ## Usage (Low-level API)
package/dist/index.d.mts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Reevit Core Types
3
3
  * Shared type definitions for all Reevit SDKs
4
4
  */
5
- type PaymentMethod = 'card' | 'mobile_money' | 'bank_transfer';
5
+ type PaymentMethod = 'card' | 'mobile_money' | 'bank_transfer' | 'apple_pay' | 'google_pay';
6
6
  type MobileMoneyNetwork = 'mtn' | 'vodafone' | 'airteltigo';
7
7
  type PSPType = 'paystack' | 'hubtel' | 'flutterwave' | 'stripe' | 'monnify' | 'mpesa';
8
8
  /** Payment source type - indicates where the payment originated from */
@@ -103,6 +103,8 @@ interface ReevitTheme {
103
103
  darkMode?: boolean;
104
104
  /** Custom logo URL to display in checkout header */
105
105
  logoUrl?: string;
106
+ /** Company or organization name to display in checkout header */
107
+ companyName?: string;
106
108
  /** PSP selector background color */
107
109
  pspSelectorBgColor?: string;
108
110
  /** PSP selector text color */
@@ -111,6 +113,14 @@ interface ReevitTheme {
111
113
  pspSelectorBorderColor?: string;
112
114
  /** Use border-only style for PSP selector (no filled background) */
113
115
  pspSelectorUseBorder?: boolean;
116
+ /** Selected PSP background color */
117
+ selectedBackgroundColor?: string;
118
+ /** Selected PSP primary text color */
119
+ selectedTextColor?: string;
120
+ /** Selected PSP description/muted text color */
121
+ selectedDescriptionColor?: string;
122
+ /** Selected PSP border color */
123
+ selectedBorderColor?: string;
114
124
  }
115
125
  interface PSPConfig {
116
126
  id: string;
@@ -157,7 +167,7 @@ interface PaymentIntent {
157
167
  /** Currency code */
158
168
  currency: string;
159
169
  /** Payment status */
160
- status: 'pending' | 'processing' | 'succeeded' | 'failed' | 'cancelled';
170
+ status: 'pending' | 'requires_action' | 'processing' | 'succeeded' | 'failed' | 'canceled' | 'cancelled';
161
171
  /** Recommended PSP based on routing rules */
162
172
  recommendedPsp: PSPType;
163
173
  /** Available payment methods for this intent */
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Reevit Core Types
3
3
  * Shared type definitions for all Reevit SDKs
4
4
  */
5
- type PaymentMethod = 'card' | 'mobile_money' | 'bank_transfer';
5
+ type PaymentMethod = 'card' | 'mobile_money' | 'bank_transfer' | 'apple_pay' | 'google_pay';
6
6
  type MobileMoneyNetwork = 'mtn' | 'vodafone' | 'airteltigo';
7
7
  type PSPType = 'paystack' | 'hubtel' | 'flutterwave' | 'stripe' | 'monnify' | 'mpesa';
8
8
  /** Payment source type - indicates where the payment originated from */
@@ -103,6 +103,8 @@ interface ReevitTheme {
103
103
  darkMode?: boolean;
104
104
  /** Custom logo URL to display in checkout header */
105
105
  logoUrl?: string;
106
+ /** Company or organization name to display in checkout header */
107
+ companyName?: string;
106
108
  /** PSP selector background color */
107
109
  pspSelectorBgColor?: string;
108
110
  /** PSP selector text color */
@@ -111,6 +113,14 @@ interface ReevitTheme {
111
113
  pspSelectorBorderColor?: string;
112
114
  /** Use border-only style for PSP selector (no filled background) */
113
115
  pspSelectorUseBorder?: boolean;
116
+ /** Selected PSP background color */
117
+ selectedBackgroundColor?: string;
118
+ /** Selected PSP primary text color */
119
+ selectedTextColor?: string;
120
+ /** Selected PSP description/muted text color */
121
+ selectedDescriptionColor?: string;
122
+ /** Selected PSP border color */
123
+ selectedBorderColor?: string;
114
124
  }
115
125
  interface PSPConfig {
116
126
  id: string;
@@ -157,7 +167,7 @@ interface PaymentIntent {
157
167
  /** Currency code */
158
168
  currency: string;
159
169
  /** Payment status */
160
- status: 'pending' | 'processing' | 'succeeded' | 'failed' | 'cancelled';
170
+ status: 'pending' | 'requires_action' | 'processing' | 'succeeded' | 'failed' | 'canceled' | 'cancelled';
161
171
  /** Recommended PSP based on routing rules */
162
172
  recommendedPsp: PSPType;
163
173
  /** Available payment methods for this intent */
package/dist/styles.css CHANGED
@@ -74,7 +74,7 @@
74
74
  border: 1px solid var(--reevit-border);
75
75
  box-shadow: var(--reevit-shadow);
76
76
  width: 100%;
77
- max-width: 380px;
77
+ max-width: 360px;
78
78
  max-height: 90vh;
79
79
  overflow: hidden;
80
80
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reevit/core",
3
- "version": "0.4.6",
3
+ "version": "0.5.0",
4
4
  "description": "Core utilities and API client for Reevit payment SDKs",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -17,7 +17,8 @@
17
17
  "scripts": {
18
18
  "build": "tsup",
19
19
  "dev": "tsup --watch",
20
- "typecheck": "tsc --noEmit"
20
+ "typecheck": "tsc --noEmit",
21
+ "prepublishOnly": "npm run build"
21
22
  },
22
23
  "keywords": ["reevit", "payments", "africa", "sdk"],
23
24
  "author": "Reevit",