@chargehive/types 2.7.1 → 2.7.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/chargehive.d.ts +9 -2
- package/package.json +1 -1
- package/validation.d.ts +1 -1
package/chargehive.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export interface ChargeHiveType extends ChargeType, ChargeHiveEventTarget
|
|
|
57
57
|
|
|
58
58
|
assertValid(): Promise<void>;
|
|
59
59
|
|
|
60
|
-
validate(field?: FieldName, timeout?: number): Promise<
|
|
60
|
+
validate(field?: FieldName, timeout?: number): Promise<ValidationEventData>;
|
|
61
61
|
|
|
62
62
|
tokenize(): Promise<TokenizeResponse>;
|
|
63
63
|
|
|
@@ -312,7 +312,7 @@ export type ChargeHiveEventData = {
|
|
|
312
312
|
readonly 'success': ChargehiveSuccessEvent;
|
|
313
313
|
readonly 'declined': ChargehiveDeclinedEvent;
|
|
314
314
|
readonly 'authentication': AuthenticationEvent;
|
|
315
|
-
readonly 'error':
|
|
315
|
+
readonly 'error': ChargehiveErrorEvent;
|
|
316
316
|
readonly 'token-config': PaymentMethodTokenizationConfig[PaymentMethodType];
|
|
317
317
|
readonly 'capability': ChargehiveCapabilityEvent;
|
|
318
318
|
readonly 'method-type-changed': ChargehiveMethodTypeChangedEvent;
|
|
@@ -353,6 +353,13 @@ interface ChargehiveSuccessEvent
|
|
|
353
353
|
responseBreakdown: TransactionResponse;
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
+
interface ChargehiveErrorEvent
|
|
357
|
+
{
|
|
358
|
+
requestId: string;
|
|
359
|
+
error: string;
|
|
360
|
+
code: string;
|
|
361
|
+
}
|
|
362
|
+
|
|
356
363
|
interface ChargehiveDeclinedEvent
|
|
357
364
|
{
|
|
358
365
|
chargeId: string;
|
package/package.json
CHANGED
package/validation.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from '@pci-bridge/types/validation';
|
|
5
5
|
import {FieldName} from './chargehive';
|
|
6
6
|
|
|
7
|
-
export type ValidationEventData = Map<FieldName, Validation>;
|
|
7
|
+
export type ValidationEventData = Map<FieldName | string, Validation>;
|
|
8
8
|
|
|
9
9
|
export type Validator = () => Promise<ValidationEventData>;
|
|
10
10
|
|