@yuno-payments/sdk-web-types 5.7.0 → 5.8.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/dist/global.d.ts +54 -0
- package/dist/index.d.ts +54 -0
- package/package.json +1 -1
package/dist/global.d.ts
CHANGED
|
@@ -746,6 +746,59 @@ interface SecureFields {
|
|
|
746
746
|
}
|
|
747
747
|
|
|
748
748
|
declare namespace ExternalButtonsNameSpace {
|
|
749
|
+
type PaypalBraintreeButtonStyleConfig = {
|
|
750
|
+
type?: 'pay' | 'checkout' | 'buynow' | 'subscribe';
|
|
751
|
+
color?: 'gold' | 'blue' | 'white';
|
|
752
|
+
borderRadius?: number;
|
|
753
|
+
height?: number;
|
|
754
|
+
width?: number;
|
|
755
|
+
};
|
|
756
|
+
type ShippingAddressOverride = {
|
|
757
|
+
line1: string;
|
|
758
|
+
line2?: string;
|
|
759
|
+
city: string;
|
|
760
|
+
state: string;
|
|
761
|
+
postalCode: string;
|
|
762
|
+
countryCode: string;
|
|
763
|
+
phone?: string;
|
|
764
|
+
recipientName?: string;
|
|
765
|
+
recipientEmail?: string;
|
|
766
|
+
};
|
|
767
|
+
type GetShippingAddressOverride = () => ShippingAddressOverride | undefined;
|
|
768
|
+
type ShippingAddress = {
|
|
769
|
+
city: string;
|
|
770
|
+
state: string;
|
|
771
|
+
postalCode: string;
|
|
772
|
+
countryCode: string;
|
|
773
|
+
};
|
|
774
|
+
type OnShippingAddressChangeArgs = {
|
|
775
|
+
shippingAddress: ShippingAddress;
|
|
776
|
+
paypalOrderId: string;
|
|
777
|
+
};
|
|
778
|
+
type AmountBreakdown = {
|
|
779
|
+
itemTotal: string;
|
|
780
|
+
shipping?: string;
|
|
781
|
+
tax?: string;
|
|
782
|
+
};
|
|
783
|
+
type ShippingAddressUpdatePrice = {
|
|
784
|
+
action: 'UPDATE_PRICE';
|
|
785
|
+
amount: string;
|
|
786
|
+
breakdown?: AmountBreakdown;
|
|
787
|
+
};
|
|
788
|
+
type ShippingAddressAccept = {
|
|
789
|
+
action: 'ACCEPT';
|
|
790
|
+
};
|
|
791
|
+
type ShippingAddressReject = {
|
|
792
|
+
action: 'REJECT';
|
|
793
|
+
reason?: 'COUNTRY' | 'STATE' | 'POSTAL_CODE' | 'ADDRESS';
|
|
794
|
+
};
|
|
795
|
+
type ShippingAddressChangeResult = ShippingAddressUpdatePrice | ShippingAddressAccept | ShippingAddressReject;
|
|
796
|
+
type OnShippingAddressChange = (args: OnShippingAddressChangeArgs) => Promise<ShippingAddressChangeResult>;
|
|
797
|
+
type PaypalBraintreeButtonConfig = {
|
|
798
|
+
style?: PaypalBraintreeButtonStyleConfig;
|
|
799
|
+
shippingAddressOverride?: GetShippingAddressOverride;
|
|
800
|
+
onShippingAddressChange?: OnShippingAddressChange;
|
|
801
|
+
};
|
|
749
802
|
type ExternalButton = {
|
|
750
803
|
elementSelector: string;
|
|
751
804
|
paymentMethodType: string;
|
|
@@ -796,6 +849,7 @@ declare namespace ExternalButtonsNameSpace {
|
|
|
796
849
|
applePay?: ApplePayButtonConfig;
|
|
797
850
|
paypal?: PayPalButtonConfig;
|
|
798
851
|
revolutPay?: RevolutPayButtonConfig;
|
|
852
|
+
paypalBraintree?: PaypalBraintreeButtonConfig;
|
|
799
853
|
};
|
|
800
854
|
}
|
|
801
855
|
|
package/dist/index.d.ts
CHANGED
|
@@ -746,6 +746,59 @@ interface SecureFields {
|
|
|
746
746
|
}
|
|
747
747
|
|
|
748
748
|
declare namespace ExternalButtonsNameSpace {
|
|
749
|
+
type PaypalBraintreeButtonStyleConfig = {
|
|
750
|
+
type?: 'pay' | 'checkout' | 'buynow' | 'subscribe';
|
|
751
|
+
color?: 'gold' | 'blue' | 'white';
|
|
752
|
+
borderRadius?: number;
|
|
753
|
+
height?: number;
|
|
754
|
+
width?: number;
|
|
755
|
+
};
|
|
756
|
+
type ShippingAddressOverride = {
|
|
757
|
+
line1: string;
|
|
758
|
+
line2?: string;
|
|
759
|
+
city: string;
|
|
760
|
+
state: string;
|
|
761
|
+
postalCode: string;
|
|
762
|
+
countryCode: string;
|
|
763
|
+
phone?: string;
|
|
764
|
+
recipientName?: string;
|
|
765
|
+
recipientEmail?: string;
|
|
766
|
+
};
|
|
767
|
+
type GetShippingAddressOverride = () => ShippingAddressOverride | undefined;
|
|
768
|
+
type ShippingAddress = {
|
|
769
|
+
city: string;
|
|
770
|
+
state: string;
|
|
771
|
+
postalCode: string;
|
|
772
|
+
countryCode: string;
|
|
773
|
+
};
|
|
774
|
+
type OnShippingAddressChangeArgs = {
|
|
775
|
+
shippingAddress: ShippingAddress;
|
|
776
|
+
paypalOrderId: string;
|
|
777
|
+
};
|
|
778
|
+
type AmountBreakdown = {
|
|
779
|
+
itemTotal: string;
|
|
780
|
+
shipping?: string;
|
|
781
|
+
tax?: string;
|
|
782
|
+
};
|
|
783
|
+
type ShippingAddressUpdatePrice = {
|
|
784
|
+
action: 'UPDATE_PRICE';
|
|
785
|
+
amount: string;
|
|
786
|
+
breakdown?: AmountBreakdown;
|
|
787
|
+
};
|
|
788
|
+
type ShippingAddressAccept = {
|
|
789
|
+
action: 'ACCEPT';
|
|
790
|
+
};
|
|
791
|
+
type ShippingAddressReject = {
|
|
792
|
+
action: 'REJECT';
|
|
793
|
+
reason?: 'COUNTRY' | 'STATE' | 'POSTAL_CODE' | 'ADDRESS';
|
|
794
|
+
};
|
|
795
|
+
type ShippingAddressChangeResult = ShippingAddressUpdatePrice | ShippingAddressAccept | ShippingAddressReject;
|
|
796
|
+
type OnShippingAddressChange = (args: OnShippingAddressChangeArgs) => Promise<ShippingAddressChangeResult>;
|
|
797
|
+
type PaypalBraintreeButtonConfig = {
|
|
798
|
+
style?: PaypalBraintreeButtonStyleConfig;
|
|
799
|
+
shippingAddressOverride?: GetShippingAddressOverride;
|
|
800
|
+
onShippingAddressChange?: OnShippingAddressChange;
|
|
801
|
+
};
|
|
749
802
|
type ExternalButton = {
|
|
750
803
|
elementSelector: string;
|
|
751
804
|
paymentMethodType: string;
|
|
@@ -796,6 +849,7 @@ declare namespace ExternalButtonsNameSpace {
|
|
|
796
849
|
applePay?: ApplePayButtonConfig;
|
|
797
850
|
paypal?: PayPalButtonConfig;
|
|
798
851
|
revolutPay?: RevolutPayButtonConfig;
|
|
852
|
+
paypalBraintree?: PaypalBraintreeButtonConfig;
|
|
799
853
|
};
|
|
800
854
|
}
|
|
801
855
|
|