@pay-com/js 1.2.2 → 1.2.3
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/lib/dts/types/index.d.ts +22 -1
- package/lib/index.d.ts +22 -1
- package/package.json +1 -1
package/lib/dts/types/index.d.ts
CHANGED
|
@@ -107,9 +107,29 @@ export interface CheckoutToggles {
|
|
|
107
107
|
withCvvTooltip?: boolean
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
/**
|
|
111
|
+
* [Styling options](https://developer.paypal.com/docs/business/checkout/reference/style-guide/#customize-the-payment-buttons) for customizing the button appearance.
|
|
112
|
+
*/
|
|
113
|
+
type PaypalButtonStyle = {
|
|
114
|
+
color?: 'gold' | 'blue' | 'silver' | 'white' | 'black'
|
|
115
|
+
height?: number
|
|
116
|
+
label?:
|
|
117
|
+
| 'paypal'
|
|
118
|
+
| 'checkout'
|
|
119
|
+
| 'buynow'
|
|
120
|
+
| 'pay'
|
|
121
|
+
| 'installment'
|
|
122
|
+
| 'subscribe'
|
|
123
|
+
| 'donate'
|
|
124
|
+
layout?: 'vertical' | 'horizontal'
|
|
125
|
+
shape?: 'rect' | 'pill'
|
|
126
|
+
tagline?: boolean
|
|
127
|
+
}
|
|
128
|
+
|
|
110
129
|
export interface PaypalOpts {
|
|
111
130
|
container: string
|
|
112
|
-
onClickValidation
|
|
131
|
+
onClickValidation?: () => Promise<boolean>
|
|
132
|
+
style?: PaypalButtonStyle
|
|
113
133
|
}
|
|
114
134
|
|
|
115
135
|
export interface RenderOpts {
|
|
@@ -522,6 +542,7 @@ export type AddressType = {
|
|
|
522
542
|
|
|
523
543
|
export type HeadlessPaymentOptions = {
|
|
524
544
|
saveSourceForFutureUse?: boolean
|
|
545
|
+
onValidateSession?: () => Promise<boolean>
|
|
525
546
|
}
|
|
526
547
|
|
|
527
548
|
export type HeadlessFn = (
|
package/lib/index.d.ts
CHANGED
|
@@ -112,9 +112,29 @@ interface CheckoutToggles {
|
|
|
112
112
|
withCvvTooltip?: boolean
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
/**
|
|
116
|
+
* [Styling options](https://developer.paypal.com/docs/business/checkout/reference/style-guide/#customize-the-payment-buttons) for customizing the button appearance.
|
|
117
|
+
*/
|
|
118
|
+
type PaypalButtonStyle = {
|
|
119
|
+
color?: 'gold' | 'blue' | 'silver' | 'white' | 'black'
|
|
120
|
+
height?: number
|
|
121
|
+
label?:
|
|
122
|
+
| 'paypal'
|
|
123
|
+
| 'checkout'
|
|
124
|
+
| 'buynow'
|
|
125
|
+
| 'pay'
|
|
126
|
+
| 'installment'
|
|
127
|
+
| 'subscribe'
|
|
128
|
+
| 'donate'
|
|
129
|
+
layout?: 'vertical' | 'horizontal'
|
|
130
|
+
shape?: 'rect' | 'pill'
|
|
131
|
+
tagline?: boolean
|
|
132
|
+
}
|
|
133
|
+
|
|
115
134
|
interface PaypalOpts {
|
|
116
135
|
container: string
|
|
117
|
-
onClickValidation
|
|
136
|
+
onClickValidation?: () => Promise<boolean>
|
|
137
|
+
style?: PaypalButtonStyle
|
|
118
138
|
}
|
|
119
139
|
|
|
120
140
|
interface RenderOpts {
|
|
@@ -521,6 +541,7 @@ type AddressType = {
|
|
|
521
541
|
|
|
522
542
|
type HeadlessPaymentOptions = {
|
|
523
543
|
saveSourceForFutureUse?: boolean
|
|
544
|
+
onValidateSession?: () => Promise<boolean>
|
|
524
545
|
}
|
|
525
546
|
|
|
526
547
|
type HeadlessFn = (
|