@vantagepay/vantagepay 0.15.0 → 0.15.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vantagepay/vantagepay",
3
- "version": "0.15.0",
3
+ "version": "0.15.2",
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.m.js",
@@ -14,11 +14,12 @@
14
14
  "build": "microbundle --tsconfig tsconfig.json",
15
15
  "dev": "microbundle watch --tsconfig tsconfig.json",
16
16
  "test": "jest --coverage",
17
+ "format": "prettier --write .",
17
18
  "ncu": "npx npm-check-updates --interactive"
18
19
  },
19
20
  "dependencies": {
20
21
  "@microsoft/signalr": "^9.0.6",
21
- "axios": "^1.13.0",
22
+ "axios": "^1.13.1",
22
23
  "axios-auth-refresh": "^3.3.6",
23
24
  "axios-retry": "^4.5.0",
24
25
  "pubsub-js": "^1.9.5",
@@ -31,6 +32,7 @@
31
32
  "@types/qrcode": "^1.5.6",
32
33
  "jest": "^30.2.0",
33
34
  "microbundle": "0.15.1",
35
+ "prettier": "^3.6.2",
34
36
  "ts-jest": "^29.4.5"
35
37
  },
36
38
  "keywords": [
@@ -1,48 +0,0 @@
1
- import { BaseApi } from '../baseApi';
2
- import { OtpVerificationResponse, GMoneyConsumerCreateProfileRequest, GMoneyConsumerUpdateProfileRequest, GMoneyConsumerProfileResponse, GMoneyConsumerWalletResponse, TransactionReportResponse, LinkBankAccountRequest, TransactionReceiptResponse, GMoneyConsumerBankAccountResponse } from './types';
3
- import { TokenResponse } from '../authentication/types';
4
- import { FaceMovementDetectionLevel } from '../lookups/types';
5
- import { ConsumerBankAccount } from '../consumers/types';
6
- export declare class GMoney extends BaseApi {
7
- private readonly branchesCache;
8
- private readonly atmsCache;
9
- private readonly agentsCache;
10
- private readonly merchantNameCache;
11
- private readonly customerNameCache;
12
- private readonly bankAccountNameCache;
13
- private clientContentCache;
14
- private contactDetailsCache;
15
- verifyMobileNumber(msisdn: string): Promise<OtpVerificationResponse>;
16
- validateOtp(otpValue: string): Promise<OtpVerificationResponse>;
17
- resendOtp(): Promise<void>;
18
- createConsumerProfile(request: GMoneyConsumerCreateProfileRequest): Promise<TokenResponse>;
19
- deleteConsumerProfile(): Promise<void>;
20
- updateConsumerProfile(request: GMoneyConsumerUpdateProfileRequest): Promise<GMoneyConsumerProfileResponse>;
21
- getConsumerProfile(): Promise<GMoneyConsumerProfileResponse>;
22
- getWalletInformation(): Promise<GMoneyConsumerWalletResponse>;
23
- changeWalletPin(tempPin: string, newPin: string): Promise<void>;
24
- activateCustomer(oldPin: string, newPin: string): Promise<void>;
25
- resetWalletPin(): Promise<void>;
26
- saveConsumerSelfie(base64Image: string): Promise<string>;
27
- linkGcbBankAccount(request: LinkBankAccountRequest): Promise<void>;
28
- checkConsumerLiveness(base64Images: string[]): Promise<FaceMovementDetectionLevel>;
29
- saveProfilePicture(base64Image: string): Promise<string>;
30
- getBranches(limit?: number, latitude?: number, longitude?: number): Promise<any>;
31
- getAtms(limit?: number, latitude?: number, longitude?: number): Promise<any>;
32
- getAgents(limit?: number, latitude?: number, longitude?: number): Promise<any>;
33
- getMerchantNameFromOrganizationCode(organizationCode: string): Promise<string>;
34
- getCustomerNameFromWalletNumber(msisdn: string): Promise<string>;
35
- getCustomerNameFromBankAccountNumber(accountNumber: string): Promise<string>;
36
- getClientContent(): Promise<any>;
37
- getContactDetails(): Promise<any>;
38
- getRecentTransactions(limit?: number, successOnly?: boolean): Promise<TransactionReportResponse>;
39
- getTransactionHistory(dateFrom?: string, dateTo?: string): Promise<TransactionReportResponse>;
40
- getTransactionReceipt(paymentReference: string): Promise<TransactionReceiptResponse>;
41
- forgotPassword(msisdn: string): Promise<void>;
42
- getServiceStatus(): Promise<boolean>;
43
- getAllLinkedBankAccounts(): Promise<ConsumerBankAccount[]>;
44
- getLinkedBankAccountInformation(bankAccountReference: string): Promise<GMoneyConsumerBankAccountResponse>;
45
- getLinkedBankAccountRecentTransactions(bankAccountReference: string, limit?: number): Promise<TransactionReportResponse>;
46
- getLinkedBankAccountTransactionHistory(bankAccountReference: string): Promise<TransactionReportResponse>;
47
- getLinkedBankAccountTransactionReceipt(paymentReference: string): Promise<TransactionReceiptResponse>;
48
- }
@@ -1,136 +0,0 @@
1
- import { Gender, Currency } from '../lookups/types';
2
- import { KycStatusSummary } from '../consumers/types';
3
- import { PaymentStatusResponse } from '../payments/types';
4
- export interface ForgotPasswordRequest {
5
- msisdn: string;
6
- }
7
- export interface GMoneyActivateCustomerRequest {
8
- oldPin: string;
9
- newPin: string;
10
- }
11
- export interface GMoneyChangePinRequest {
12
- currentTemporaryPin: string;
13
- newPin: string;
14
- }
15
- export interface GMoneyConsumerBankAccountResponse {
16
- isGcbBankAccountLinked: boolean;
17
- accountNumber: string | null;
18
- accountStatus: string | null;
19
- currency: Currency | null;
20
- accountBalanceInCents: number | null;
21
- lastTransactionCurrency: Currency | null;
22
- lastTransactionAmountInCents: number | null;
23
- lastTransactionDate: string | null;
24
- lastTransactionDescription: string | null;
25
- }
26
- export interface GMoneyConsumerCreateProfileRequest {
27
- firstName: string;
28
- lastName: string;
29
- ghanaCardIdNumber: string;
30
- password: string;
31
- emailAddress: string | null;
32
- base64Image: string | null;
33
- }
34
- export interface GMoneyConsumerLivenessRequest {
35
- base64Images: string[];
36
- }
37
- export interface GMoneyConsumerProfilePictureRequest {
38
- base64Image: string | null;
39
- }
40
- export interface GMoneyConsumerProfileResponse {
41
- alias: string | null;
42
- firstName: string;
43
- lastName: string;
44
- dateOfBirth: string;
45
- gender: Gender;
46
- emailAddress: string;
47
- mobileNumber: string;
48
- profileImage: string | null;
49
- rewardPointsInfo: GMoneyRewardPointsInfo | null;
50
- ghanaCardId: string | null;
51
- }
52
- export interface GMoneyConsumerSelfieRequest {
53
- base64Image: string | null;
54
- }
55
- export interface GMoneyConsumerUpdateProfileRequest {
56
- alias: string | null;
57
- dateOfBirth: string | null;
58
- emailAddress: string;
59
- }
60
- export interface GMoneyConsumerWalletResponse {
61
- isAccountLinked: boolean;
62
- isGcbBankAccountLinked: boolean;
63
- isWalletPinLocked: boolean;
64
- isAccountKycVerified: boolean;
65
- hasAccount: boolean;
66
- gMoneyMobileWalletAccountNumber: string | null;
67
- accountStatus: GMoneyIdentityStatus;
68
- currency: Currency | null;
69
- accountBalanceInCents: number | null;
70
- lastTransactionCurrency: Currency | null;
71
- lastTransactionAmountInCents: number | null;
72
- lastTransactionDate: string | null;
73
- lastTransactionDescription: string | null;
74
- kycStatusSummary: KycStatusSummary;
75
- selfieImageRequired: boolean;
76
- }
77
- export declare enum GMoneyIdentityStatus {
78
- NoAccount = -2,
79
- Unknown = -1,
80
- New = 0,
81
- PendingActive = 2,
82
- Active = 3,
83
- Suspended = 4,
84
- Frozen = 5,
85
- Closed = 6,
86
- Capped = 7,
87
- Dormant = 8
88
- }
89
- export interface GMoneyRewardPointsInfo {
90
- pointsBalance: number;
91
- rewardTier: GMoneyRewardTier;
92
- }
93
- export declare enum GMoneyRewardTier {
94
- Basic = 0,
95
- Bronze = 1,
96
- Silver = 2,
97
- Gold = 3
98
- }
99
- export interface LinkBankAccountRequest {
100
- bankAccountName: string;
101
- bankAccountNumber: string;
102
- }
103
- export interface OtpRequest {
104
- msisdn: string;
105
- }
106
- export interface OtpVerificationResponse {
107
- registrationRequired: boolean | null;
108
- otpVerificationRequired: boolean | null;
109
- selfieImageRequired: boolean | null;
110
- previousProfileDeactivated: boolean | null;
111
- accessToken: string | null;
112
- }
113
- export interface RequestBase {
114
- createdDateTime: string;
115
- originatorConversationId: string;
116
- callbackUrl: string | null;
117
- gMoneyWalletPin: string | null;
118
- transactionBatchReference: string;
119
- commentToCustomer: string;
120
- isElevyExempt: boolean;
121
- }
122
- export interface TransactionReceiptResponse extends PaymentStatusResponse {
123
- name: string | null;
124
- receiptId: string | null;
125
- iconUrl: string | null;
126
- }
127
- export interface TransactionReportResponse {
128
- paymentReference: string;
129
- name: string | null;
130
- transactionCompletedDateUtc: string;
131
- currency: string;
132
- amountInCents: number;
133
- isSuccess: boolean;
134
- status: string;
135
- iconUrl: string;
136
- }
@@ -1,21 +0,0 @@
1
- import { AxiosInstance } from 'axios';
2
- import { BaseApi } from '../baseApi';
3
- import { Payments } from '../payments';
4
- import { PaymentStatusResponse } from '../payments/types';
5
- import { PayTvAccountRequest, TopupMobileAirtimeRequest, TopupMobileVoiceDataRequest, TopupMobileDataRequest, BundleData, HubtelMobileOperator } from './types';
6
- export declare class Hubtel extends BaseApi {
7
- private readonly payments;
8
- private readonly mobileDataBundlesCache;
9
- private readonly mobileVoiceBundlesCache;
10
- private mobileOperatorsCache;
11
- constructor(axiosInstance: AxiosInstance, payments: Payments, consoleLogging?: boolean);
12
- payDstv(request: PayTvAccountRequest): Promise<PaymentStatusResponse>;
13
- payGotv(request: PayTvAccountRequest): Promise<PaymentStatusResponse>;
14
- payStarTimesTv(request: PayTvAccountRequest): Promise<PaymentStatusResponse>;
15
- topupMobileData(request: TopupMobileDataRequest): Promise<PaymentStatusResponse>;
16
- topupMobileVoiceData(request: TopupMobileVoiceDataRequest): Promise<PaymentStatusResponse>;
17
- topupMobileAirtime(request: TopupMobileAirtimeRequest): Promise<PaymentStatusResponse>;
18
- getAvailableMobileDataBundles(mobileOperator: HubtelMobileOperator): Promise<BundleData[]>;
19
- getAvailableMobileVoiceBundles(mobileOperator: HubtelMobileOperator): Promise<BundleData[]>;
20
- getMobileOperators(): Promise<any>;
21
- }
@@ -1,35 +0,0 @@
1
- import { BasePaymentRequest, PaymentSources } from '../payments/types';
2
- export interface BundleData {
3
- bundleAmountInCents: number;
4
- displayText: string;
5
- bundleName: string;
6
- }
7
- export declare enum HubtelMobileOperator {
8
- MTN = 1,
9
- VDF = 2,
10
- ATG = 3,
11
- GLO = 4,
12
- SFL = 5,
13
- B4G = 6
14
- }
15
- export interface PayTvAccountRequest extends BasePaymentRequest {
16
- paymentSources: PaymentSources | null;
17
- accountNumber: string;
18
- }
19
- export interface TopupMobileAirtimeRequest extends BasePaymentRequest {
20
- paymentSources: PaymentSources | null;
21
- recipientMobileNumber: string | null;
22
- recipientMobileOperator: HubtelMobileOperator;
23
- }
24
- export interface TopupMobileDataRequest extends BasePaymentRequest {
25
- paymentSources: PaymentSources | null;
26
- recipientMobileNumber: string | null;
27
- recipientMobileOperator: HubtelMobileOperator;
28
- bundleName: string | null;
29
- }
30
- export interface TopupMobileVoiceDataRequest extends BasePaymentRequest {
31
- paymentSources: PaymentSources | null;
32
- recipientMobileNumber: string | null;
33
- recipientMobileOperator: HubtelMobileOperator;
34
- bundleName: string | null;
35
- }
@@ -1,11 +0,0 @@
1
- import { AxiosInstance } from 'axios';
2
- import { BaseApi } from '../baseApi';
3
- import { Payments } from '../payments';
4
- import { PaymentStatusResponse } from '../payments/types';
5
- import { PayWaterAccountRequest, PayElectricityAccountRequest } from './types';
6
- export declare class TransFlow extends BaseApi {
7
- private readonly payments;
8
- constructor(axiosInstance: AxiosInstance, payments: Payments, consoleLogging?: boolean);
9
- payElectricityAccount(request: PayElectricityAccountRequest): Promise<PaymentStatusResponse>;
10
- payWaterAccount(request: PayWaterAccountRequest): Promise<PaymentStatusResponse>;
11
- }
@@ -1,11 +0,0 @@
1
- import { BasePaymentRequest, PaymentSources } from '../payments/types';
2
- export interface PayElectricityAccountRequest extends BasePaymentRequest {
3
- paymentSources: PaymentSources | null;
4
- accountNumber: string;
5
- }
6
- export interface PayWaterAccountRequest extends BasePaymentRequest {
7
- paymentSources: PaymentSources | null;
8
- accountReference: string;
9
- accountHolderEmailAddress: string | null;
10
- accountHolderMobileNumber: string | null;
11
- }