@ogateway/shared-types 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.
- package/dist/index.d.ts +92 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/package.json +35 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export declare enum TrxChannels {
|
|
2
|
+
MOMO = "MOMO",
|
|
3
|
+
BANK = "BANK",
|
|
4
|
+
CARD = "CARD",
|
|
5
|
+
CRYPTO = "CRYPTO"
|
|
6
|
+
}
|
|
7
|
+
export declare enum TrxTypes {
|
|
8
|
+
CREDIT = "CREDIT",
|
|
9
|
+
DEBIT = "DEBIT",
|
|
10
|
+
SETTLEMENT = "SETTLEMENT"
|
|
11
|
+
}
|
|
12
|
+
export declare enum Currencies {
|
|
13
|
+
GHS = "GHS",
|
|
14
|
+
NGN = "NGN",
|
|
15
|
+
UGX = "UGX",
|
|
16
|
+
XOF = "XOF",
|
|
17
|
+
XAF = "XAF",
|
|
18
|
+
KES = "KES",
|
|
19
|
+
TZS = "TZS",
|
|
20
|
+
ZMW = "ZMW",
|
|
21
|
+
GBP = "GBP",
|
|
22
|
+
EUR = "EUR",
|
|
23
|
+
USD = "USD",
|
|
24
|
+
USDC = "USDC",
|
|
25
|
+
USDT = "USDT"
|
|
26
|
+
}
|
|
27
|
+
export declare enum TrxStatus {
|
|
28
|
+
OTP = "OTP",
|
|
29
|
+
INITIATED = "INITIATED",
|
|
30
|
+
PROCESSING = "PROCESSING",
|
|
31
|
+
FAILED = "FAILED",
|
|
32
|
+
COMPLETED = "COMPLETED",
|
|
33
|
+
CANCELLED = "CANCELLED",
|
|
34
|
+
RECONCILE = "RECONCILE",
|
|
35
|
+
REVERSAL = "REVERSAL"
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Integration Response Interface
|
|
39
|
+
* for creditMomo, debitMomo, creditBank, etc.
|
|
40
|
+
*/
|
|
41
|
+
interface IntegrationResponseDefault {
|
|
42
|
+
data: object;
|
|
43
|
+
status: TrxStatus;
|
|
44
|
+
reference: string;
|
|
45
|
+
checkout_url?: string;
|
|
46
|
+
}
|
|
47
|
+
export type IntegrationResponse = IntegrationResponseDefault | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Verify Response Interface
|
|
50
|
+
*/
|
|
51
|
+
interface VerifyResponseDefault {
|
|
52
|
+
data: {
|
|
53
|
+
mmessage: string;
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
};
|
|
56
|
+
status: TrxStatus;
|
|
57
|
+
reference: string;
|
|
58
|
+
}
|
|
59
|
+
export type VerifyResponse = VerifyResponseDefault | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Resolve Response Interface
|
|
62
|
+
*/
|
|
63
|
+
interface ResolveResponseDefault {
|
|
64
|
+
accountName: string;
|
|
65
|
+
}
|
|
66
|
+
export type ResolveResponse = ResolveResponseDefault | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Balance Response Interface
|
|
69
|
+
*/
|
|
70
|
+
interface BalanceResponseDefault {
|
|
71
|
+
currency: Currencies;
|
|
72
|
+
balance: number;
|
|
73
|
+
}
|
|
74
|
+
export type BalanceResponse = BalanceResponseDefault[] | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Virtual Account Interface
|
|
77
|
+
*/
|
|
78
|
+
export declare enum VirtualAccountTypes {
|
|
79
|
+
TEMPORARY = "TEMPORARY",
|
|
80
|
+
PERMANENT = "PERMANENT"
|
|
81
|
+
}
|
|
82
|
+
interface VirtualAccountResponseDefault {
|
|
83
|
+
type: VirtualAccountTypes;
|
|
84
|
+
bank_code: string;
|
|
85
|
+
bank_name: string;
|
|
86
|
+
account_name: string;
|
|
87
|
+
account_number: string;
|
|
88
|
+
provider_data: any;
|
|
89
|
+
}
|
|
90
|
+
export type VirtualAccountResponse = VirtualAccountResponseDefault[] | undefined;
|
|
91
|
+
export {};
|
|
92
|
+
//# sourceMappingURL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B,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,eAAe,GAAG,sBAAsB,GAAG,SAAS,CAAC;AAEjE;;GAEG;AACH,UAAU,sBAAsB;IAC5B,QAAQ,EAAE,UAAU,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,eAAe,GAAG,sBAAsB,EAAE,GAAG,SAAS,CAAC;AAEnE;;GAEG;AACH,oBAAY,mBAAmB;IAC3B,SAAS,cAAc;IACvB,SAAS,cAAc;CAC1B;AAED,UAAU,6BAA6B;IACnC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,GAAG,CAAC;CACtB;AAED,MAAM,MAAM,sBAAsB,GAAG,6BAA6B,EAAE,GAAG,SAAS,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export var TrxChannels;
|
|
2
|
+
(function (TrxChannels) {
|
|
3
|
+
TrxChannels["MOMO"] = "MOMO";
|
|
4
|
+
TrxChannels["BANK"] = "BANK";
|
|
5
|
+
TrxChannels["CARD"] = "CARD";
|
|
6
|
+
TrxChannels["CRYPTO"] = "CRYPTO";
|
|
7
|
+
})(TrxChannels || (TrxChannels = {}));
|
|
8
|
+
export var TrxTypes;
|
|
9
|
+
(function (TrxTypes) {
|
|
10
|
+
TrxTypes["CREDIT"] = "CREDIT";
|
|
11
|
+
TrxTypes["DEBIT"] = "DEBIT";
|
|
12
|
+
TrxTypes["SETTLEMENT"] = "SETTLEMENT";
|
|
13
|
+
})(TrxTypes || (TrxTypes = {}));
|
|
14
|
+
export var Currencies;
|
|
15
|
+
(function (Currencies) {
|
|
16
|
+
Currencies["GHS"] = "GHS";
|
|
17
|
+
Currencies["NGN"] = "NGN";
|
|
18
|
+
Currencies["UGX"] = "UGX";
|
|
19
|
+
Currencies["XOF"] = "XOF";
|
|
20
|
+
Currencies["XAF"] = "XAF";
|
|
21
|
+
Currencies["KES"] = "KES";
|
|
22
|
+
Currencies["TZS"] = "TZS";
|
|
23
|
+
Currencies["ZMW"] = "ZMW";
|
|
24
|
+
Currencies["GBP"] = "GBP";
|
|
25
|
+
Currencies["EUR"] = "EUR";
|
|
26
|
+
Currencies["USD"] = "USD";
|
|
27
|
+
Currencies["USDC"] = "USDC";
|
|
28
|
+
Currencies["USDT"] = "USDT";
|
|
29
|
+
})(Currencies || (Currencies = {}));
|
|
30
|
+
export var TrxStatus;
|
|
31
|
+
(function (TrxStatus) {
|
|
32
|
+
TrxStatus["OTP"] = "OTP";
|
|
33
|
+
TrxStatus["INITIATED"] = "INITIATED";
|
|
34
|
+
TrxStatus["PROCESSING"] = "PROCESSING";
|
|
35
|
+
TrxStatus["FAILED"] = "FAILED";
|
|
36
|
+
TrxStatus["COMPLETED"] = "COMPLETED";
|
|
37
|
+
TrxStatus["CANCELLED"] = "CANCELLED";
|
|
38
|
+
TrxStatus["RECONCILE"] = "RECONCILE";
|
|
39
|
+
TrxStatus["REVERSAL"] = "REVERSAL";
|
|
40
|
+
})(TrxStatus || (TrxStatus = {}));
|
|
41
|
+
;
|
|
42
|
+
;
|
|
43
|
+
;
|
|
44
|
+
/**
|
|
45
|
+
* Virtual Account Interface
|
|
46
|
+
*/
|
|
47
|
+
export var VirtualAccountTypes;
|
|
48
|
+
(function (VirtualAccountTypes) {
|
|
49
|
+
VirtualAccountTypes["TEMPORARY"] = "TEMPORARY";
|
|
50
|
+
VirtualAccountTypes["PERMANENT"] = "PERMANENT";
|
|
51
|
+
})(VirtualAccountTypes || (VirtualAccountTypes = {}));
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ogateway/shared-types",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Open Gateway Shared Interfaces",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc -p tsconfig.build.json",
|
|
13
|
+
"push:local": "npm run build && yalc publish && yalc push",
|
|
14
|
+
"publish": "npm publish"
|
|
15
|
+
},
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"keywords": [],
|
|
23
|
+
"author": "",
|
|
24
|
+
"license": "ISC",
|
|
25
|
+
"type": "module",
|
|
26
|
+
"files": [
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"typescript": "^5.9.3"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"tsup": "^8.5.1"
|
|
34
|
+
}
|
|
35
|
+
}
|