@afriex/sdk 1.1.0 → 1.2.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.
Files changed (2) hide show
  1. package/dist/index.js +24 -48
  2. package/package.json +11 -11
package/dist/index.js CHANGED
@@ -1,58 +1,34 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.WEBHOOK_SIGNATURE_HEADER = exports.WebhookVerifier = exports.RateService = exports.BalanceService = exports.PaymentMethodService = exports.TransactionService = exports.CustomerService = exports.Afriex = exports.AfriexSDK = void 0;
18
- const core_1 = require("@afriex/core");
19
- const customers_1 = require("@afriex/customers");
20
- const transactions_1 = require("@afriex/transactions");
21
- const payment_methods_1 = require("@afriex/payment-methods");
22
- const balance_1 = require("@afriex/balance");
23
- const rates_1 = require("@afriex/rates");
24
- const webhooks_1 = require("@afriex/webhooks");
25
- class AfriexSDK extends core_1.AfriexClient {
1
+ import { AfriexClient } from '@afriex/core';
2
+ import { CustomerService } from '@afriex/customers';
3
+ import { TransactionService } from '@afriex/transactions';
4
+ import { PaymentMethodService } from '@afriex/payment-methods';
5
+ import { BalanceService } from '@afriex/balance';
6
+ import { RateService } from '@afriex/rates';
7
+ import { WebhookVerifier } from '@afriex/webhooks';
8
+ export class AfriexSDK extends AfriexClient {
26
9
  constructor(config) {
27
10
  super(config);
28
11
  const httpClient = this.getHttpClient();
29
- this.customers = new customers_1.CustomerService(httpClient);
30
- this.transactions = new transactions_1.TransactionService(httpClient);
31
- this.paymentMethods = new payment_methods_1.PaymentMethodService(httpClient);
32
- this.balance = new balance_1.BalanceService(httpClient);
33
- this.rates = new rates_1.RateService(httpClient);
12
+ this.customers = new CustomerService(httpClient);
13
+ this.transactions = new TransactionService(httpClient);
14
+ this.paymentMethods = new PaymentMethodService(httpClient);
15
+ this.balance = new BalanceService(httpClient);
16
+ this.rates = new RateService(httpClient);
34
17
  if (config.webhookPublicKey) {
35
- this.webhooks = new webhooks_1.WebhookVerifier(config.webhookPublicKey);
18
+ this.webhooks = new WebhookVerifier(config.webhookPublicKey);
36
19
  }
37
20
  }
38
21
  }
39
- exports.AfriexSDK = AfriexSDK;
40
- exports.Afriex = AfriexSDK;
22
+ // Short alias
23
+ export { AfriexSDK as Afriex };
41
24
  // Re-export core types
42
- __exportStar(require("@afriex/core"), exports);
25
+ export * from '@afriex/core';
43
26
  // Re-export service classes explicitly to avoid conflicts
44
- var customers_2 = require("@afriex/customers");
45
- Object.defineProperty(exports, "CustomerService", { enumerable: true, get: function () { return customers_2.CustomerService; } });
46
- var transactions_2 = require("@afriex/transactions");
47
- Object.defineProperty(exports, "TransactionService", { enumerable: true, get: function () { return transactions_2.TransactionService; } });
48
- var payment_methods_2 = require("@afriex/payment-methods");
49
- Object.defineProperty(exports, "PaymentMethodService", { enumerable: true, get: function () { return payment_methods_2.PaymentMethodService; } });
50
- var balance_2 = require("@afriex/balance");
51
- Object.defineProperty(exports, "BalanceService", { enumerable: true, get: function () { return balance_2.BalanceService; } });
52
- var rates_2 = require("@afriex/rates");
53
- Object.defineProperty(exports, "RateService", { enumerable: true, get: function () { return rates_2.RateService; } });
54
- var webhooks_2 = require("@afriex/webhooks");
55
- Object.defineProperty(exports, "WebhookVerifier", { enumerable: true, get: function () { return webhooks_2.WebhookVerifier; } });
56
- var webhooks_3 = require("@afriex/webhooks");
57
- Object.defineProperty(exports, "WEBHOOK_SIGNATURE_HEADER", { enumerable: true, get: function () { return webhooks_3.WEBHOOK_SIGNATURE_HEADER; } });
27
+ export { CustomerService } from '@afriex/customers';
28
+ export { TransactionService } from '@afriex/transactions';
29
+ export { PaymentMethodService } from '@afriex/payment-methods';
30
+ export { BalanceService } from '@afriex/balance';
31
+ export { RateService } from '@afriex/rates';
32
+ export { WebhookVerifier } from '@afriex/webhooks';
33
+ export { WEBHOOK_SIGNATURE_HEADER } from '@afriex/webhooks';
58
34
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@afriex/sdk",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Official TypeScript SDK for the Afriex Business API",
5
+ "type": "module",
5
6
  "main": "./dist/index.js",
6
7
  "types": "./dist/index.d.ts",
7
8
  "homepage": "https://afriex-sdk-docs.vercel.app",
@@ -13,20 +14,19 @@
13
14
  "author": "Victory Lucky <luckyvictory54@gmail.com>",
14
15
  "exports": {
15
16
  ".": {
17
+ "types": "./dist/index.d.ts",
16
18
  "import": "./dist/index.js",
17
- "require": "./dist/index.js",
18
- "default": "./dist/index.js",
19
- "types": "./dist/index.d.ts"
19
+ "default": "./dist/index.js"
20
20
  }
21
21
  },
22
22
  "dependencies": {
23
- "@afriex/core": "1.0.9",
24
- "@afriex/customers": "1.0.9",
25
- "@afriex/transactions": "1.1.0",
26
- "@afriex/payment-methods": "1.1.0",
27
- "@afriex/balance": "1.0.9",
28
- "@afriex/rates": "1.1.0",
29
- "@afriex/webhooks": "1.0.9"
23
+ "@afriex/core": "1.2.0",
24
+ "@afriex/customers": "1.2.0",
25
+ "@afriex/transactions": "1.2.0",
26
+ "@afriex/payment-methods": "1.2.0",
27
+ "@afriex/balance": "1.2.0",
28
+ "@afriex/rates": "1.2.0",
29
+ "@afriex/webhooks": "1.2.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "rimraf": "^5.0.5",