@afriex/sdk 1.2.0 → 1.3.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/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
- import { AfriexClient, AfriexConfig } 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';
1
+ import { AfriexClient, AfriexConfig } 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 { CheckoutService } from "@afriex/checkout";
8
+ import { WebhookVerifier, WebhookService } from "@afriex/webhooks";
8
9
  export interface AfriexSDKConfig extends AfriexConfig {
9
10
  webhookPublicKey?: string;
10
11
  }
@@ -14,22 +15,26 @@ export declare class AfriexSDK extends AfriexClient {
14
15
  readonly paymentMethods: PaymentMethodService;
15
16
  readonly balance: BalanceService;
16
17
  readonly rates: RateService;
17
- readonly webhooks?: WebhookVerifier;
18
+ readonly checkout: CheckoutService;
19
+ readonly webhookVerifier?: WebhookVerifier;
20
+ readonly webhooks: WebhookService;
18
21
  constructor(config: AfriexSDKConfig);
19
22
  }
20
23
  export { AfriexSDK as Afriex };
21
- export * from '@afriex/core';
22
- export { CustomerService } from '@afriex/customers';
23
- export { TransactionService } from '@afriex/transactions';
24
- export { PaymentMethodService } from '@afriex/payment-methods';
25
- export { BalanceService } from '@afriex/balance';
26
- export { RateService } from '@afriex/rates';
27
- export { WebhookVerifier } from '@afriex/webhooks';
28
- export type { Customer, CreateCustomerRequest, UpdateCustomerKycRequest, ListCustomersParams, CustomerListResponse, } from '@afriex/customers';
29
- export type { Transaction, CreateTransactionRequest, ListTransactionsParams, TransactionListResponse, TransactionType, TransactionStatus, TransactionMeta, } from '@afriex/transactions';
30
- export type { PaymentMethod, CreatePaymentMethodRequest, ListPaymentMethodsParams, PaymentMethodListResponse, PaymentChannel, Institution, ResolveAccountParams, ResolveAccountResponse, GetInstitutionsParams, CryptoWalletResponse, GetCryptoWalletParams, GetVirtualAccountParams, } from '@afriex/payment-methods';
31
- export type { BalanceResponse, GetBalanceParams, } from '@afriex/balance';
32
- export type { RatesResponse, GetRatesParams, } from '@afriex/rates';
33
- export type { WebhookPayload, CustomerWebhookPayload, CustomerEventType, CustomerWebhookData, PaymentMethodWebhookPayload, PaymentMethodEventType, PaymentMethodWebhookData, TransactionWebhookPayload, TransactionEventType, TransactionWebhookData, TransactionWebhookStatus, } from '@afriex/webhooks';
34
- export { WEBHOOK_SIGNATURE_HEADER } from '@afriex/webhooks';
24
+ export * from "@afriex/core";
25
+ export { CustomerService } from "@afriex/customers";
26
+ export { TransactionService } from "@afriex/transactions";
27
+ export { PaymentMethodService } from "@afriex/payment-methods";
28
+ export { BalanceService } from "@afriex/balance";
29
+ export { RateService } from "@afriex/rates";
30
+ export { CheckoutService } from "@afriex/checkout";
31
+ export { WebhookVerifier, WebhookService } from "@afriex/webhooks";
32
+ export type { Customer, CreateCustomerRequest, UpdateCustomerKycRequest, ListCustomersParams, CustomerListResponse, } from "@afriex/customers";
33
+ export type { Transaction, CreateTransactionRequest, ListTransactionsParams, TransactionListResponse, TransactionType, TransactionStatus, TransactionMeta, } from "@afriex/transactions";
34
+ export type { PaymentMethod, CreatePaymentMethodRequest, ListPaymentMethodsParams, PaymentMethodListResponse, PaymentChannel, Institution, ResolveAccountParams, ResolveAccountResponse, GetInstitutionsParams, CryptoWalletResponse, GetCryptoWalletParams, ListVirtualAccountsParams, CreateVirtualAccountParams, ListPoolAccountsParams, VirtualAccountListResponse, } from "@afriex/payment-methods";
35
+ export type { BalanceResponse, GetBalanceParams } from "@afriex/balance";
36
+ export type { RatesResponse, GetRatesParams } from "@afriex/rates";
37
+ export type { CheckoutSession, CreateCheckoutSessionRequest, CheckoutCustomer, CheckoutTransaction, } from "@afriex/checkout";
38
+ export type { WebhookPayload, CustomerWebhookPayload, CustomerEventType, CustomerWebhookData, PaymentMethodWebhookPayload, PaymentMethodEventType, PaymentMethodWebhookData, TransactionWebhookPayload, TransactionEventType, TransactionWebhookData, TransactionWebhookStatus, TriggerWebhookRequest, WebhookEventType, } from "@afriex/webhooks";
39
+ export { WEBHOOK_SIGNATURE_HEADER } from "@afriex/webhooks";
35
40
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,10 +1,11 @@
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';
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 { CheckoutService } from "@afriex/checkout";
8
+ import { WebhookVerifier, WebhookService } from "@afriex/webhooks";
8
9
  export class AfriexSDK extends AfriexClient {
9
10
  constructor(config) {
10
11
  super(config);
@@ -14,21 +15,24 @@ export class AfriexSDK extends AfriexClient {
14
15
  this.paymentMethods = new PaymentMethodService(httpClient);
15
16
  this.balance = new BalanceService(httpClient);
16
17
  this.rates = new RateService(httpClient);
18
+ this.checkout = new CheckoutService(httpClient);
19
+ this.webhooks = new WebhookService(httpClient);
17
20
  if (config.webhookPublicKey) {
18
- this.webhooks = new WebhookVerifier(config.webhookPublicKey);
21
+ this.webhookVerifier = new WebhookVerifier(config.webhookPublicKey);
19
22
  }
20
23
  }
21
24
  }
22
25
  // Short alias
23
26
  export { AfriexSDK as Afriex };
24
27
  // Re-export core types
25
- export * from '@afriex/core';
28
+ export * from "@afriex/core";
26
29
  // Re-export service classes explicitly to avoid conflicts
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';
30
+ export { CustomerService } from "@afriex/customers";
31
+ export { TransactionService } from "@afriex/transactions";
32
+ export { PaymentMethodService } from "@afriex/payment-methods";
33
+ export { BalanceService } from "@afriex/balance";
34
+ export { RateService } from "@afriex/rates";
35
+ export { CheckoutService } from "@afriex/checkout";
36
+ export { WebhookVerifier, WebhookService } from "@afriex/webhooks";
37
+ export { WEBHOOK_SIGNATURE_HEADER } from "@afriex/webhooks";
34
38
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afriex/sdk",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Official TypeScript SDK for the Afriex Business API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -20,13 +20,14 @@
20
20
  }
21
21
  },
22
22
  "dependencies": {
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"
23
+ "@afriex/core": "1.3.0",
24
+ "@afriex/customers": "1.3.0",
25
+ "@afriex/transactions": "1.3.0",
26
+ "@afriex/payment-methods": "1.3.0",
27
+ "@afriex/balance": "1.3.0",
28
+ "@afriex/rates": "1.3.0",
29
+ "@afriex/checkout": "1.0.0",
30
+ "@afriex/webhooks": "1.3.0"
30
31
  },
31
32
  "devDependencies": {
32
33
  "rimraf": "^5.0.5",