@afriex/sdk 1.0.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.
@@ -0,0 +1,35 @@
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';
8
+ export interface AfriexSDKConfig extends AfriexConfig {
9
+ webhookPublicKey?: string;
10
+ }
11
+ export declare class AfriexSDK extends AfriexClient {
12
+ readonly customers: CustomerService;
13
+ readonly transactions: TransactionService;
14
+ readonly paymentMethods: PaymentMethodService;
15
+ readonly balance: BalanceService;
16
+ readonly rates: RateService;
17
+ readonly webhooks?: WebhookVerifier;
18
+ constructor(config: AfriexSDKConfig);
19
+ }
20
+ 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';
35
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACjD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,qBAAa,SAAU,SAAQ,YAAY;IACvC,SAAgB,SAAS,EAAE,eAAe,CAAC;IAC3C,SAAgB,YAAY,EAAE,kBAAkB,CAAC;IACjD,SAAgB,cAAc,EAAE,oBAAoB,CAAC;IACrD,SAAgB,OAAO,EAAE,cAAc,CAAC;IACxC,SAAgB,KAAK,EAAE,WAAW,CAAC;IACnC,SAAgB,QAAQ,CAAC,EAAE,eAAe,CAAC;gBAE/B,MAAM,EAAE,eAAe;CAetC;AAGD,OAAO,EAAE,SAAS,IAAI,MAAM,EAAE,CAAC;AAG/B,cAAc,cAAc,CAAC;AAG7B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGnD,YAAY,EACR,QAAQ,EACR,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,GACvB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACR,WAAW,EACX,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,eAAe,EACf,iBAAiB,EACjB,eAAe,GAClB,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACR,aAAa,EACb,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,GAC1B,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EACR,eAAe,EACf,gBAAgB,GACnB,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EACR,aAAa,EACb,cAAc,GACjB,MAAM,eAAe,CAAC;AAEvB,YAAY,EACR,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,2BAA2B,EAC3B,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,GAC3B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,58 @@
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 {
26
+ constructor(config) {
27
+ super(config);
28
+ 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);
34
+ if (config.webhookPublicKey) {
35
+ this.webhooks = new webhooks_1.WebhookVerifier(config.webhookPublicKey);
36
+ }
37
+ }
38
+ }
39
+ exports.AfriexSDK = AfriexSDK;
40
+ exports.Afriex = AfriexSDK;
41
+ // Re-export core types
42
+ __exportStar(require("@afriex/core"), exports);
43
+ // 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; } });
58
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAA0D;AAC1D,iDAAoD;AACpD,uDAA0D;AAC1D,6DAA+D;AAC/D,6CAAiD;AACjD,yCAA4C;AAC5C,+CAAmD;AAMnD,MAAa,SAAU,SAAQ,mBAAY;IAQvC,YAAY,MAAuB;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QAExC,IAAI,CAAC,SAAS,GAAG,IAAI,2BAAe,CAAC,UAAU,CAAC,CAAC;QACjD,IAAI,CAAC,YAAY,GAAG,IAAI,iCAAkB,CAAC,UAAU,CAAC,CAAC;QACvD,IAAI,CAAC,cAAc,GAAG,IAAI,sCAAoB,CAAC,UAAU,CAAC,CAAC;QAC3D,IAAI,CAAC,OAAO,GAAG,IAAI,wBAAc,CAAC,UAAU,CAAC,CAAC;QAC9C,IAAI,CAAC,KAAK,GAAG,IAAI,mBAAW,CAAC,UAAU,CAAC,CAAC;QAEzC,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC;YAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,0BAAe,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;QACjE,CAAC;IACL,CAAC;CACJ;AAvBD,8BAuBC;AAGqB,2BAAM;AAE5B,uBAAuB;AACvB,+CAA6B;AAE7B,0DAA0D;AAC1D,+CAAoD;AAA3C,4GAAA,eAAe,OAAA;AACxB,qDAA0D;AAAjD,kHAAA,kBAAkB,OAAA;AAC3B,2DAA+D;AAAtD,uHAAA,oBAAoB,OAAA;AAC7B,2CAAiD;AAAxC,yGAAA,cAAc,OAAA;AACvB,uCAA4C;AAAnC,oGAAA,WAAW,OAAA;AACpB,6CAAmD;AAA1C,2GAAA,eAAe,OAAA;AA4DxB,6CAA4D;AAAnD,oHAAA,wBAAwB,OAAA"}
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@afriex/sdk",
3
+ "version": "1.0.0",
4
+ "description": "Official TypeScript SDK for the Afriex Business API",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "homepage": "https://afriex-sdk-docs.vercel.app",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/codewithveek/afriex-sdk.git",
11
+ "directory": "packages/sdk"
12
+ },
13
+ "author": "Victory Lucky <luckyvictory54@gmail.com>",
14
+ "exports": {
15
+ ".": {
16
+ "require": "./dist/index.js",
17
+ "types": "./dist/index.d.ts"
18
+ }
19
+ },
20
+ "dependencies": {
21
+ "@afriex/customers": "1.0.0",
22
+ "@afriex/transactions": "1.0.0",
23
+ "@afriex/core": "1.0.0",
24
+ "@afriex/payment-methods": "1.0.0",
25
+ "@afriex/balance": "1.0.0",
26
+ "@afriex/rates": "1.0.0",
27
+ "@afriex/webhooks": "1.0.0"
28
+ },
29
+ "devDependencies": {
30
+ "rimraf": "^5.0.5",
31
+ "typescript": "^5.3.3"
32
+ },
33
+ "peerDependencies": {
34
+ "typescript": ">=5.0.0"
35
+ },
36
+ "files": [
37
+ "dist",
38
+ "README.md"
39
+ ],
40
+ "publishConfig": {
41
+ "access": "public"
42
+ },
43
+ "keywords": [
44
+ "afriex",
45
+ "sdk",
46
+ "api",
47
+ "money-transfer",
48
+ "payments",
49
+ "fintech",
50
+ "typescript"
51
+ ],
52
+ "license": "MIT",
53
+ "scripts": {
54
+ "build": "tsc",
55
+ "type-check": "tsc --noEmit",
56
+ "clean": "rimraf dist"
57
+ }
58
+ }