@vantagepay/vantagepay 0.15.7 → 0.16.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/README.md +3 -1
- package/dist/authentication/index.d.ts +1 -1
- package/dist/common/types.d.ts +2 -1
- package/dist/consumers/index.d.ts +2 -0
- package/dist/consumers/types.d.ts +8 -2
- package/dist/eventTypes.d.ts +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/index.modern.mjs +1 -1
- package/dist/index.modern.mjs.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/lookups/types.d.ts +14 -3
- package/dist/merchants/index.d.ts +5 -4
- package/dist/merchants/types.d.ts +5 -3
- package/dist/payments/types.d.ts +27 -23
- package/dist/reports/index.d.ts +6 -4
- package/dist/reports/types.d.ts +12 -12
- package/package.json +5 -6
package/dist/lookups/types.d.ts
CHANGED
|
@@ -120,7 +120,14 @@ export declare enum ConsumerFileType {
|
|
|
120
120
|
IdentityDocumentBack = "IdentityDocumentBack",
|
|
121
121
|
Liveness = "Liveness",
|
|
122
122
|
ProfileImage = "ProfileImage",
|
|
123
|
-
Signature = "Signature"
|
|
123
|
+
Signature = "Signature",
|
|
124
|
+
ConsumerAgreement = "ConsumerAgreement",
|
|
125
|
+
LoanContract = "LoanContract",
|
|
126
|
+
LoanSettlementQuote = "LoanSettlementQuote",
|
|
127
|
+
LoanPaidUpLetter = "LoanPaidUpLetter",
|
|
128
|
+
LoanStatement = "LoanStatement",
|
|
129
|
+
BankAccountLetter = "BankAccountLetter",
|
|
130
|
+
BankAccountStatement = "BankAccountStatement"
|
|
124
131
|
}
|
|
125
132
|
export declare enum Country {
|
|
126
133
|
None = "None",
|
|
@@ -561,7 +568,8 @@ export declare enum KycStatus {
|
|
|
561
568
|
export declare enum KycVerificationType {
|
|
562
569
|
Identity = "Identity",
|
|
563
570
|
Liveness = "Liveness",
|
|
564
|
-
Facial = "Facial"
|
|
571
|
+
Facial = "Facial",
|
|
572
|
+
Other = "Other"
|
|
565
573
|
}
|
|
566
574
|
export declare enum Language {
|
|
567
575
|
None = "None",
|
|
@@ -1806,7 +1814,10 @@ export declare enum MobileWalletOperator {
|
|
|
1806
1814
|
GMY = "GMY",
|
|
1807
1815
|
ZPY = "ZPY",
|
|
1808
1816
|
GHP = "GHP",
|
|
1809
|
-
TCG = "TCG"
|
|
1817
|
+
TCG = "TCG",
|
|
1818
|
+
VDC = "VDC",
|
|
1819
|
+
CLC = "CLC",
|
|
1820
|
+
TKM = "TKM"
|
|
1810
1821
|
}
|
|
1811
1822
|
export declare class MobileWalletOperatorData {
|
|
1812
1823
|
isAvailable: boolean;
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { OtpVerificationResponse, TokenResponse } from '../authentication/types';
|
|
2
2
|
import { BaseApi } from '../baseApi';
|
|
3
3
|
import { Device } from '../devices/types';
|
|
4
|
-
import { Currency } from '../lookups/types';
|
|
4
|
+
import { Currency, ProductType } from '../lookups/types';
|
|
5
5
|
import { BasicMerchant, Merchant, MerchantFile, MerchantProduct, TerminalConfiguration, TerminalPaymentQrCodeUrls, TerminalPaymentQrCodes, TerminalSetup } from './types';
|
|
6
6
|
export declare class Merchants extends BaseApi {
|
|
7
7
|
private readonly productDetailCache;
|
|
8
8
|
private productsCache;
|
|
9
9
|
private createMerchantProductProxy;
|
|
10
10
|
private getAllProducts;
|
|
11
|
-
getActiveProductTypes(): Promise<
|
|
11
|
+
getActiveProductTypes(): Promise<ProductType[]>;
|
|
12
12
|
getMerchantNamesFromProductType(productType: string): Promise<string[]>;
|
|
13
|
-
getProductTypesForMerchant(merchantName: string): Promise<
|
|
14
|
-
getProductsForMerchantAndProductType(productType:
|
|
13
|
+
getProductTypesForMerchant(merchantName: string): Promise<ProductType[]>;
|
|
14
|
+
getProductsForMerchantAndProductType(productType: ProductType, merchantName: string): Promise<any[]>;
|
|
15
15
|
getProductDetails(productReference: string): Promise<MerchantProduct>;
|
|
16
16
|
getProducts(): Promise<MerchantProduct[]>;
|
|
17
17
|
createProduct(product: MerchantProduct): Promise<MerchantProduct>;
|
|
18
18
|
updateProduct(product: MerchantProduct): Promise<MerchantProduct>;
|
|
19
19
|
deleteProduct(productReference: string): Promise<void>;
|
|
20
|
+
groupProductsByName(products: any): any;
|
|
20
21
|
getMerchant(): Promise<Merchant>;
|
|
21
22
|
createMerchant(request: Merchant): Promise<Merchant>;
|
|
22
23
|
updateMerchant(request: Merchant): Promise<Merchant>;
|
|
@@ -226,6 +226,7 @@ export declare class MerchantFile {
|
|
|
226
226
|
base64Data?: string;
|
|
227
227
|
createdDate: Date;
|
|
228
228
|
lastUpdatedDate?: Date;
|
|
229
|
+
isActive: boolean;
|
|
229
230
|
}
|
|
230
231
|
export declare class MerchantLoginCredentials {
|
|
231
232
|
emailAddress?: string;
|
|
@@ -282,9 +283,9 @@ export declare class MerchantProduct {
|
|
|
282
283
|
unitLabel?: string;
|
|
283
284
|
productType: ProductType;
|
|
284
285
|
currency: Currency;
|
|
285
|
-
amountInCents
|
|
286
|
-
maximumAmountInCents
|
|
287
|
-
futureAmountInCents
|
|
286
|
+
amountInCents?: number;
|
|
287
|
+
maximumAmountInCents?: number;
|
|
288
|
+
futureAmountInCents?: number;
|
|
288
289
|
futureAmountEffectiveFromDate?: Date;
|
|
289
290
|
fullAmountRequired: boolean;
|
|
290
291
|
quantityRequired: boolean;
|
|
@@ -304,6 +305,7 @@ export declare class MerchantProductField {
|
|
|
304
305
|
name: string;
|
|
305
306
|
isRequired: boolean;
|
|
306
307
|
isAccountKey: boolean;
|
|
308
|
+
validationRegex?: string;
|
|
307
309
|
selectionItems: MerchantProductFieldSelectionItem[];
|
|
308
310
|
}
|
|
309
311
|
export declare class MerchantProductFieldSelectionItem {
|
package/dist/payments/types.d.ts
CHANGED
|
@@ -843,20 +843,20 @@ export declare class WalletDestinationResult {
|
|
|
843
843
|
message: string;
|
|
844
844
|
}
|
|
845
845
|
export declare enum FeeType {
|
|
846
|
-
None =
|
|
846
|
+
None = 0,
|
|
847
847
|
/**
|
|
848
848
|
* A real-time commission that is deducted from the amount we are instructed to debit from a source account so that the amount we actually
|
|
849
849
|
* debit is less the commission to be paid to the account holder being debited and the commission is therefore effectively paid in real-time.
|
|
850
850
|
*/
|
|
851
|
-
FeeTakenFromSourceByMerchant =
|
|
852
|
-
Elevy =
|
|
851
|
+
FeeTakenFromSourceByMerchant = 1,
|
|
852
|
+
Elevy = 2,
|
|
853
853
|
/** A processing fee charged by the external payment processor that we used to process the payment, that is charged to us, and is not charged to the end user. */
|
|
854
|
-
ExternalPaymentProcessorFee =
|
|
855
|
-
ExternallyProcessedElevy =
|
|
856
|
-
InternalUserTransactionFee =
|
|
857
|
-
ExternalUserTransactionFee =
|
|
854
|
+
ExternalPaymentProcessorFee = 3,
|
|
855
|
+
ExternallyProcessedElevy = 4,
|
|
856
|
+
InternalUserTransactionFee = 5,
|
|
857
|
+
ExternalUserTransactionFee = 6,
|
|
858
858
|
/** A processing fee charged by us for processing a transaction, that is charged to the 3rd party using our payment engine to process transactions, and is not charged to the end user. */
|
|
859
|
-
InternalPaymentProcessorFee =
|
|
859
|
+
InternalPaymentProcessorFee = 7
|
|
860
860
|
}
|
|
861
861
|
export declare class LineItem {
|
|
862
862
|
reference: string;
|
|
@@ -1805,7 +1805,7 @@ export declare enum TransactionCategory {
|
|
|
1805
1805
|
QrCode = 7,
|
|
1806
1806
|
DigitalWallet = 8,
|
|
1807
1807
|
Wallet = 8,
|
|
1808
|
-
|
|
1808
|
+
BillPayment = 9
|
|
1809
1809
|
}
|
|
1810
1810
|
/** A model that holds the details of a transaction confirmation. */
|
|
1811
1811
|
export declare class TransactionConfirmation {
|
|
@@ -1832,20 +1832,24 @@ export declare enum TransactionIconType {
|
|
|
1832
1832
|
Merchant = 4,
|
|
1833
1833
|
QrCode = 5,
|
|
1834
1834
|
DigitalWallet = 6,
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1835
|
+
CellC = 7,
|
|
1836
|
+
Telkom = 8,
|
|
1837
|
+
TelkomMobile = 9,
|
|
1838
|
+
MTN = 10,
|
|
1839
|
+
Vodacom = 11,
|
|
1840
|
+
Vodafone = 12,
|
|
1841
|
+
AirtelTigo = 13,
|
|
1842
|
+
GhanaPay = 14,
|
|
1843
|
+
Zeepay = 15,
|
|
1844
|
+
Glo = 16,
|
|
1845
|
+
Surfline = 17,
|
|
1846
|
+
Busy4G = 18,
|
|
1847
|
+
DSTV = 19,
|
|
1848
|
+
GoTV = 20,
|
|
1849
|
+
StarTimesTV = 21,
|
|
1850
|
+
ECG = 22,
|
|
1851
|
+
GhanaWater = 23,
|
|
1852
|
+
Telecel = 24
|
|
1849
1853
|
}
|
|
1850
1854
|
/** A model to hold the details of a pin or voucher code submission. */
|
|
1851
1855
|
export declare class TransactionPin {
|
package/dist/reports/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { BaseApi } from '../baseApi';
|
|
2
2
|
import { Currency } from '../lookups/types';
|
|
3
|
-
import {
|
|
3
|
+
import { TransactionDetailsByDayResponse, TransactionDetailsResponse, TransactionMonthSummaryResponse } from './types';
|
|
4
4
|
export declare class Reports extends BaseApi {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
private dailyTransactionCache;
|
|
6
|
+
getRecentTransactions(limit?: number, successfulOnly?: boolean): Promise<TransactionDetailsResponse[]>;
|
|
7
|
+
getTransactionSummary(currency: Currency): Promise<TransactionMonthSummaryResponse>;
|
|
8
|
+
getAllTransactionDetails(currency: Currency, dateFrom?: string, dateTo?: string): Promise<TransactionDetailsResponse[]>;
|
|
9
|
+
getDailyTransactions(currency: Currency, dateFrom?: string, dateTo?: string): Promise<TransactionDetailsByDayResponse[]>;
|
|
8
10
|
}
|
package/dist/reports/types.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { Currency } from '../lookups/types';
|
|
2
2
|
import { TransactionIconType } from '../payments/types';
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class TransactionCategorySummaryResponse {
|
|
4
4
|
category: string;
|
|
5
5
|
transactionCount: number;
|
|
6
6
|
currency: Currency;
|
|
7
|
-
|
|
7
|
+
totalAmountInCents: number;
|
|
8
8
|
}
|
|
9
|
-
export declare class
|
|
9
|
+
export declare class TransactionDetailsByDayResponse {
|
|
10
10
|
date: Date;
|
|
11
11
|
transactionCount: number;
|
|
12
12
|
currency: Currency;
|
|
13
|
-
|
|
13
|
+
totalAmountInCents: number;
|
|
14
14
|
totalCashbackInCents: number;
|
|
15
15
|
totalCommissionFeesInCents: number;
|
|
16
16
|
totalServiceFeesInCents: number;
|
|
17
17
|
totalELevyFeesInCents: number;
|
|
18
18
|
totalUserFeesInCents: number;
|
|
19
19
|
totalTipsInCents: number;
|
|
20
|
-
paymentDetails?:
|
|
20
|
+
paymentDetails?: TransactionDetailsResponse[];
|
|
21
21
|
}
|
|
22
|
-
export declare class
|
|
22
|
+
export declare class TransactionDetailsResponse {
|
|
23
23
|
paymentReference: string;
|
|
24
24
|
shortPaymentReference: string;
|
|
25
25
|
channel: string;
|
|
@@ -49,17 +49,17 @@ export declare class SalesDetailsResponse {
|
|
|
49
49
|
transactionIconType: TransactionIconType;
|
|
50
50
|
wasQrCodeInitiated: boolean;
|
|
51
51
|
}
|
|
52
|
-
export declare class
|
|
52
|
+
export declare class TransactionMonthSummaryResponse {
|
|
53
53
|
year: number;
|
|
54
54
|
month: number;
|
|
55
55
|
currency: Currency;
|
|
56
56
|
description: string;
|
|
57
|
-
|
|
58
|
-
periodTotals:
|
|
57
|
+
totalAmountInCents: number;
|
|
58
|
+
periodTotals: TransactionPeriodSummaryResponse[];
|
|
59
59
|
}
|
|
60
|
-
export declare class
|
|
60
|
+
export declare class TransactionPeriodSummaryResponse {
|
|
61
61
|
description: string;
|
|
62
62
|
currency: Currency;
|
|
63
|
-
|
|
64
|
-
categoryTotals?:
|
|
63
|
+
totalAmountInCents: number;
|
|
64
|
+
categoryTotals?: TransactionCategorySummaryResponse[];
|
|
65
65
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vantagepay/vantagepay",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "VantagePay API wrapper and SDK for integrating into VantagePay payment, consumer and merchant services.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"url": ""
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
|
-
"build": "microbundle --tsconfig tsconfig.json",
|
|
15
|
-
"dev": "microbundle watch --tsconfig tsconfig.json",
|
|
14
|
+
"build": "microbundle --tsconfig tsconfig.json --globals @microsoft/signalr=signalR",
|
|
15
|
+
"dev": "microbundle watch --tsconfig tsconfig.json --globals @microsoft/signalr=signalR",
|
|
16
16
|
"test": "jest --coverage",
|
|
17
|
-
"format": "prettier --write .",
|
|
17
|
+
"format": "npx prettier --write .",
|
|
18
18
|
"ncu": "npx npm-check-updates --interactive"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
"@types/qrcode": "^1.5.6",
|
|
33
33
|
"jest": "^30.2.0",
|
|
34
34
|
"microbundle": "0.15.1",
|
|
35
|
-
"
|
|
36
|
-
"ts-jest": "^29.4.5"
|
|
35
|
+
"ts-jest": "^29.4.6"
|
|
37
36
|
},
|
|
38
37
|
"keywords": [
|
|
39
38
|
"vantagepay",
|