@kuvarpay/sdk 1.4.1 → 1.4.2

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.
Files changed (3) hide show
  1. package/index.d.ts +22 -3
  2. package/index.js +1 -1
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -30,6 +30,26 @@ export interface VerifyPaymentResult {
30
30
  raw: any;
31
31
  }
32
32
 
33
+ export interface CreateSubaccountRequest {
34
+ business_name: string;
35
+ percentage_charge?: number | string;
36
+ currency?: string;
37
+ account_name?: string;
38
+ settlement_bank?: string;
39
+ account_number?: string;
40
+ mobile_money_number?: string;
41
+ mobile_money_provider?: string;
42
+ crypto_currency?: string;
43
+ crypto_network?: string;
44
+ wallet_address?: string;
45
+ primary_contact_email?: string;
46
+ primary_contact_phone?: string;
47
+ description?: string;
48
+ metadata?: Record<string, any>;
49
+ type?: string | 'BANK_TRANSFER' | 'MOBILE_MONEY' | 'CRYPTO';
50
+ [key: string]: any;
51
+ }
52
+
33
53
  export class KuvarPayServer {
34
54
  constructor(config?: KuvarPayServerConfig);
35
55
  getSessionStatus(sessionId: string): Promise<SessionStatusResult>;
@@ -97,11 +117,10 @@ export class KuvarPayServer {
97
117
  getOptimalTransferFee(amount: number, currency?: string): Promise<any>;
98
118
  sendInvoiceEmail(sessionId: string): Promise<any>;
99
119
 
100
- // Subaccounts
101
- createSubaccount(subaccountData: Record<string, any>): Promise<any>;
120
+ createSubaccount(subaccountData: CreateSubaccountRequest): Promise<any>;
102
121
  listSubaccounts(params?: { page?: number; perPage?: number }): Promise<any>;
103
122
  getSubaccount(code: string): Promise<any>;
104
- updateSubaccount(code: string, subaccountData: Record<string, any>): Promise<any>;
123
+ updateSubaccount(code: string, subaccountData: Partial<CreateSubaccountRequest>): Promise<any>;
105
124
  deleteSubaccount(code: string): Promise<any>;
106
125
 
107
126
  // Split Groups
package/index.js CHANGED
@@ -299,7 +299,7 @@ class KuvarPayServer {
299
299
 
300
300
  /**
301
301
  * Create a new subaccount
302
- * @param {Object} subaccountData - { business_name, percentage_charge, ... }
302
+ * @param {Object} subaccountData - { business_name, percentage_charge, currency, type, crypto_currency, crypto_network, wallet_address, ... }
303
303
  */
304
304
  async createSubaccount(subaccountData) {
305
305
  return this._post('/api/v1/subaccounts', subaccountData);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuvarpay/sdk",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Official KuvarPay Server SDK for Node.js",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",