@chargehive/types 2.1.3 → 2.1.4
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 +12 -6
- package/package.json +2 -2
- package/validation.d.ts +8 -1
package/chargehive.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
FieldName as PCIBFieldName,
|
|
3
|
+
EventName as PCIBEventName,
|
|
4
|
+
PCIBridgeTokenizeResponse,
|
|
5
|
+
} from '@pci-bridge/types/pcibridge';
|
|
2
6
|
import {FieldValidation} from '@pci-bridge/types/validation';
|
|
3
7
|
import {InitResponse} from '../src/types/paymentauth';
|
|
4
8
|
import {Address, Person} from './address';
|
|
@@ -35,7 +39,7 @@ export interface ChargeHiveType extends ChargeType, ChargeHiveEventTarget
|
|
|
35
39
|
*/
|
|
36
40
|
readonly version: string;
|
|
37
41
|
|
|
38
|
-
initialize(
|
|
42
|
+
initialize(options: ChargeHiveInitOptions);
|
|
39
43
|
|
|
40
44
|
isInitialized(): boolean;
|
|
41
45
|
|
|
@@ -58,7 +62,10 @@ export interface ChargeHiveType extends ChargeType, ChargeHiveEventTarget
|
|
|
58
62
|
|
|
59
63
|
export interface ChargeHiveInitOptions
|
|
60
64
|
{
|
|
61
|
-
|
|
65
|
+
projectId: string;
|
|
66
|
+
projectPlacement: string;
|
|
67
|
+
merchantHash: string;
|
|
68
|
+
merchantPlacement: string;
|
|
62
69
|
country: string;
|
|
63
70
|
currency: string;
|
|
64
71
|
environment?: ChargeEnvironment;
|
|
@@ -134,6 +141,7 @@ export interface ChargeMeta
|
|
|
134
141
|
|
|
135
142
|
export interface ChargeData
|
|
136
143
|
{
|
|
144
|
+
billingProfileId: string;
|
|
137
145
|
amount: number;
|
|
138
146
|
currency: string;
|
|
139
147
|
references?: Dictionary;
|
|
@@ -188,7 +196,7 @@ export interface OrderItem
|
|
|
188
196
|
termUnits: number;
|
|
189
197
|
}
|
|
190
198
|
|
|
191
|
-
export type EventName =
|
|
199
|
+
export type EventName = PCIBEventName
|
|
192
200
|
| 'init'
|
|
193
201
|
| 'token'
|
|
194
202
|
| 'success'
|
|
@@ -198,8 +206,6 @@ export type EventName =
|
|
|
198
206
|
| 'authentication'
|
|
199
207
|
| 'ready'
|
|
200
208
|
| 'paste'
|
|
201
|
-
| 'all-valid'
|
|
202
|
-
| 'submit'
|
|
203
209
|
| 'method-type-changed'
|
|
204
210
|
| 'charge-created'
|
|
205
211
|
| 'charge-id';
|
package/package.json
CHANGED
package/validation.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
FieldValidation as PCIBFieldValidation,
|
|
3
|
+
CardFieldValidation as PCIBCardFieldValidation,
|
|
4
|
+
} from '@pci-bridge/types/validation';
|
|
2
5
|
|
|
3
6
|
export type FieldValidation = PCIBFieldValidation
|
|
7
|
+
|
|
8
|
+
export type CardFieldValidation = PCIBCardFieldValidation
|
|
9
|
+
|
|
10
|
+
export type ValidationEvent = CustomEvent<FieldValidation | CardFieldValidation>;
|