@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/README.md
CHANGED
|
@@ -382,15 +382,17 @@ The library uses [pubsub-js](https://www.npmjs.com/package/pubsub-js) to publish
|
|
|
382
382
|
|
|
383
383
|
These events can be useful if your application needs to react to certain things happening behind the scenes. It is especially useful when used to automatically receive payment status updates during payment processing.
|
|
384
384
|
```js
|
|
385
|
-
import { VantagePay, OnApiRetry, OnAutomaticRefresh, OnSessionExpired } from '@vantagepay/vantagepay'
|
|
385
|
+
import { VantagePay, OnApiRetry, OnAutomaticRefresh, OnSessionStarted, OnSessionExpired } from '@vantagepay/vantagepay'
|
|
386
386
|
...
|
|
387
387
|
const onApiRetrySub = VantagePayClient.events.subscribe(OnApiRetry, (_, retryInfo) => console.log('API performed an automatic retry', retryInfo))
|
|
388
388
|
const onAutoRefreshSub = VantagePayClient.events.subscribe(OnAutomaticRefresh, (_, tokenResponse) => console.log('Automatic refresh was triggered', tokenResponse))
|
|
389
|
+
const onSessionStartedSub = VantagePayClient.events.subscribe(OnSessionStarted, () => console.log('Session started'))
|
|
389
390
|
const onSessionExpiredSub = VantagePayClient.events.subscribe(OnSessionExpired, () => console.log('Session expired'))
|
|
390
391
|
...
|
|
391
392
|
// Unsubscribe if you no longer want to receive events.
|
|
392
393
|
VantagePayClient.events.unsubscribe(onApiRetrySub)
|
|
393
394
|
VantagePayClient.events.unsubscribe(onAutoRefreshSub)
|
|
395
|
+
VantagePayClient.events.unsubscribe(onSessionStartedSub)
|
|
394
396
|
VantagePayClient.events.unsubscribe(onSessionExpiredSub)
|
|
395
397
|
```
|
|
396
398
|
|
|
@@ -11,7 +11,7 @@ export declare class Authentication extends BaseApi {
|
|
|
11
11
|
checkFace(base64Image: string): Promise<FaceCheckResult>;
|
|
12
12
|
changePassword(oldPassword: string, newPassword: string): Promise<TokenResponse>;
|
|
13
13
|
forgotPassword(username: string): Promise<void>;
|
|
14
|
-
validateOtp(otpValue: string): Promise<
|
|
14
|
+
validateOtp(otpValue: string): Promise<TokenResponse>;
|
|
15
15
|
resendOtp(): Promise<void>;
|
|
16
16
|
resendEmailAddressVerification(): Promise<void>;
|
|
17
17
|
getCurrentConsumerReference(token?: string): string;
|
package/dist/common/types.d.ts
CHANGED
|
@@ -38,7 +38,8 @@ export declare enum AddressType {
|
|
|
38
38
|
/** Model to hold account balance details. */
|
|
39
39
|
export declare class Balance {
|
|
40
40
|
currency: Currency;
|
|
41
|
-
|
|
41
|
+
availableAmountInCents?: number;
|
|
42
|
+
currentAmountInCents?: number;
|
|
42
43
|
}
|
|
43
44
|
export declare enum BankAccountType {
|
|
44
45
|
SAVINGS = "SAVINGS",
|
|
@@ -6,6 +6,8 @@ export declare class Consumers extends BaseApi {
|
|
|
6
6
|
updateConsumer(request: Consumer): Promise<Consumer>;
|
|
7
7
|
deleteConsumer(): Promise<void>;
|
|
8
8
|
getConsumer(): Promise<Consumer>;
|
|
9
|
+
getConsumerAgreement(): Promise<string>;
|
|
10
|
+
acceptConsumerAgreement(): Promise<void>;
|
|
9
11
|
stopCard(cardReference: string, reason?: string): Promise<void>;
|
|
10
12
|
getBankAccountBalance(bankAccountReference: string): Promise<Balance>;
|
|
11
13
|
downloadFile(fileReference: string, queryParameters?: Record<string, string>): Promise<ConsumerFile | null>;
|
|
@@ -269,9 +269,9 @@ export declare class ConsumerAccounts {
|
|
|
269
269
|
bankAccounts: ConsumerBankAccount[];
|
|
270
270
|
/** A list of mobile money / wallet accounts associated with a consumer. */
|
|
271
271
|
mobileWallets: ConsumerMobileWallet[];
|
|
272
|
-
/** A list of
|
|
272
|
+
/** A list of loan accounts associated with a consumer. */
|
|
273
273
|
loanAccounts: ConsumerLoanAccount[];
|
|
274
|
-
/** A list of
|
|
274
|
+
/** A list of insurance policies associated with a consumer. */
|
|
275
275
|
insurancePolicies: ConsumerInsurancePolicy[];
|
|
276
276
|
/** A list of cards associated with a consumer. */
|
|
277
277
|
cards: ConsumerCard[];
|
|
@@ -314,6 +314,7 @@ export declare class ConsumerBankAccount {
|
|
|
314
314
|
accountName: string;
|
|
315
315
|
isActive: boolean;
|
|
316
316
|
iconUrl?: string;
|
|
317
|
+
linkedFileReferences: string[];
|
|
317
318
|
}
|
|
318
319
|
export declare class ConsumerCard {
|
|
319
320
|
/** Additional customer information to facilitate the card payment. */
|
|
@@ -342,6 +343,7 @@ export declare class ConsumerCard {
|
|
|
342
343
|
accountName: string;
|
|
343
344
|
isActive: boolean;
|
|
344
345
|
iconUrl?: string;
|
|
346
|
+
linkedFileReferences: string[];
|
|
345
347
|
}
|
|
346
348
|
export declare class ConsumerFile {
|
|
347
349
|
fileType: ConsumerFileType;
|
|
@@ -353,6 +355,7 @@ export declare class ConsumerFile {
|
|
|
353
355
|
base64Data?: string;
|
|
354
356
|
createdDate: Date;
|
|
355
357
|
lastUpdatedDate?: Date;
|
|
358
|
+
isActive: boolean;
|
|
356
359
|
}
|
|
357
360
|
export declare class ConsumerInsurancePolicy {
|
|
358
361
|
policyNumber: string;
|
|
@@ -369,6 +372,7 @@ export declare class ConsumerInsurancePolicy {
|
|
|
369
372
|
accountName: string;
|
|
370
373
|
isActive: boolean;
|
|
371
374
|
iconUrl?: string;
|
|
375
|
+
linkedFileReferences: string[];
|
|
372
376
|
}
|
|
373
377
|
export declare class ConsumerLoanAccount {
|
|
374
378
|
contractNumber: string;
|
|
@@ -397,6 +401,7 @@ export declare class ConsumerLoanAccount {
|
|
|
397
401
|
accountName: string;
|
|
398
402
|
isActive: boolean;
|
|
399
403
|
iconUrl?: string;
|
|
404
|
+
linkedFileReferences: string[];
|
|
400
405
|
}
|
|
401
406
|
export declare class ConsumerMobileWallet {
|
|
402
407
|
/**
|
|
@@ -415,6 +420,7 @@ export declare class ConsumerMobileWallet {
|
|
|
415
420
|
accountName: string;
|
|
416
421
|
isActive: boolean;
|
|
417
422
|
iconUrl?: string;
|
|
423
|
+
linkedFileReferences: string[];
|
|
418
424
|
}
|
|
419
425
|
export declare class Feedback {
|
|
420
426
|
description?: string;
|
package/dist/eventTypes.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,17 @@ export * from './apiError';
|
|
|
24
24
|
export * from './apiConfig';
|
|
25
25
|
export { default as ApiTokens } from './apiTokens';
|
|
26
26
|
export declare class VantagePay {
|
|
27
|
+
static OnSessionStarted: symbol;
|
|
28
|
+
static OnSessionExpired: symbol;
|
|
29
|
+
static OnAutomaticRefresh: symbol;
|
|
30
|
+
static OnApiRetry: symbol;
|
|
31
|
+
static OnPaymentStatusUpdate: symbol;
|
|
32
|
+
static OnPaymentComplete: symbol;
|
|
33
|
+
static OnRequires3DSecure: symbol;
|
|
34
|
+
static OnRequiresPin: symbol;
|
|
35
|
+
static OnRequiresConfirmation: symbol;
|
|
36
|
+
static OnRequiresAddress: symbol;
|
|
37
|
+
static OnComplete3DSecure: symbol;
|
|
27
38
|
private readonly baseUrl;
|
|
28
39
|
private readonly consoleLogging;
|
|
29
40
|
private readonly logBatchSize;
|