@bigcommerce/checkout-sdk 1.952.0 → 1.953.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/cjs/checkout-button.js +1 -1
- package/dist/cjs/checkout-sdk-essential.js +1 -1
- package/dist/cjs/checkout-sdk.js +1 -1
- package/dist/cjs/hosted-form-v2-iframe-host.js +1 -1
- package/dist/cjs/integrations/amazon-pay.js +1 -1
- package/dist/cjs/integrations/bigcommerce-payments.js +1 -1
- package/dist/cjs/integrations/bigcommerce-payments.js.map +1 -1
- package/dist/cjs/integrations/braintree.js +1 -1
- package/dist/cjs/integrations/google-pay.js +1 -1
- package/dist/cjs/integrations/klarna.js +1 -1
- package/dist/cjs/integrations/paypal-commerce.js +1 -1
- package/dist/cjs/integrations/paypal-commerce.js.map +1 -1
- package/dist/cjs/integrations/paypal-express.js +1 -1
- package/dist/cjs/integrations/zip.js +1 -1
- package/dist/cjs/wallet-button.js +1 -1
- package/dist/cjs/wallet-button.js.map +1 -1
- package/dist/esm/checkout-button.js +1 -1
- package/dist/esm/checkout-sdk-essential.js +1 -1
- package/dist/esm/checkout-sdk.js +1 -1
- package/dist/esm/hosted-form-v2-iframe-host.js +1 -1
- package/dist/esm/integrations/amazon-pay.js +1 -1
- package/dist/esm/integrations/bigcommerce-payments.js +1 -1
- package/dist/esm/integrations/bigcommerce-payments.js.map +1 -1
- package/dist/esm/integrations/braintree.js +1 -1
- package/dist/esm/integrations/google-pay.js +1 -1
- package/dist/esm/integrations/klarna.js +1 -1
- package/dist/esm/integrations/paypal-commerce.js +1 -1
- package/dist/esm/integrations/paypal-commerce.js.map +1 -1
- package/dist/esm/integrations/paypal-express.js +1 -1
- package/dist/esm/integrations/zip.js +1 -1
- package/dist/esm/wallet-button.js +1 -1
- package/dist/esm/wallet-button.js.map +1 -1
- package/dist/types/integrations/bigcommerce-payments.d.ts +27 -0
- package/dist/types/integrations/paypal-commerce.d.ts +1 -42
- package/package.json +1 -1
|
@@ -25,11 +25,13 @@ import { PaymentMethod } from '@bigcommerce/checkout-sdk/payment-integration-api
|
|
|
25
25
|
import { PaymentRequestOptions } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
26
26
|
import { PaymentStrategy } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
27
27
|
import { PaymentStrategyFactory } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
28
|
+
import { PaypalCommerceWalletService } from '@bigcommerce/checkout-sdk/paypal-utils';
|
|
28
29
|
import { RequestOptions } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
29
30
|
import { RequestSender } from '@bigcommerce/request-sender';
|
|
30
31
|
import { ScriptLoader } from '@bigcommerce/script-loader';
|
|
31
32
|
import { ShippingOption } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
32
33
|
import { VaultedInstrument } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
34
|
+
import { WalletPaymentButtonStrategyFactory } from '@bigcommerce/checkout-sdk/wallet-button-integration';
|
|
33
35
|
|
|
34
36
|
declare interface AllowedPaymentMethods {
|
|
35
37
|
type: string;
|
|
@@ -1747,6 +1749,23 @@ declare class BigCommercePaymentsVenmoPaymentStrategy implements PaymentStrategy
|
|
|
1747
1749
|
private toggleLoadingIndicator;
|
|
1748
1750
|
}
|
|
1749
1751
|
|
|
1752
|
+
declare interface BigCommercePaymentsWalletInitializeOptions {
|
|
1753
|
+
cartId: string;
|
|
1754
|
+
currency: {
|
|
1755
|
+
code: string;
|
|
1756
|
+
};
|
|
1757
|
+
initializationData: string;
|
|
1758
|
+
clientToken: string;
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
declare class BigCommercePaymentsWalletStrategy implements CheckoutButtonStrategy {
|
|
1762
|
+
private bigCommercePaymentsWalletService;
|
|
1763
|
+
constructor(bigCommercePaymentsWalletService: PaypalCommerceWalletService);
|
|
1764
|
+
initialize(options: CheckoutButtonInitializeOptions & WithBigCommercePaymentsWalletInitializeOptions): Promise<void>;
|
|
1765
|
+
deinitialize(): Promise<void>;
|
|
1766
|
+
private renderButton;
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1750
1769
|
declare interface BirthDate {
|
|
1751
1770
|
getFullYear(): number;
|
|
1752
1771
|
getDate(): number;
|
|
@@ -2053,6 +2072,10 @@ declare interface WithBigCommercePaymentsVenmoPaymentInitializeOptions {
|
|
|
2053
2072
|
bigcommerce_payments_venmo?: BigCommercePaymentsVenmoPaymentInitializeOptions;
|
|
2054
2073
|
}
|
|
2055
2074
|
|
|
2075
|
+
declare interface WithBigCommercePaymentsWalletInitializeOptions {
|
|
2076
|
+
bigcommerce_paymentspaypal?: BigCommercePaymentsWalletInitializeOptions;
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2056
2079
|
export declare const createBigCommercePaymentsAlternativeMethodsPaymentStrategy: import("@bigcommerce/checkout-sdk/payment-integration-api").ResolvableModule<PaymentStrategyFactory<BigCommercePaymentsAlternativeMethodsPaymentStrategy>, {
|
|
2057
2080
|
gateway: string;
|
|
2058
2081
|
}>;
|
|
@@ -2114,3 +2137,7 @@ export declare const createBigCommercePaymentsVenmoCustomerStrategy: import("@bi
|
|
|
2114
2137
|
export declare const createBigCommercePaymentsVenmoPaymentStrategy: import("@bigcommerce/checkout-sdk/payment-integration-api").ResolvableModule<PaymentStrategyFactory<BigCommercePaymentsVenmoPaymentStrategy>, {
|
|
2115
2138
|
id: string;
|
|
2116
2139
|
}>;
|
|
2140
|
+
|
|
2141
|
+
export declare const createBigCommercePaymentsWalletStrategy: import("@bigcommerce/checkout-sdk/payment-integration-api").ResolvableModule<WalletPaymentButtonStrategyFactory<BigCommercePaymentsWalletStrategy>, {
|
|
2142
|
+
id: string;
|
|
2143
|
+
}>;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { AddressRequestBody } from '@bigcommerce/checkout-sdk/wallet-button-integration';
|
|
2
1
|
import { BillingAddressRequestBody } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
3
|
-
import { BillingAddressResponse } from '@bigcommerce/checkout-sdk/wallet-button-integration';
|
|
4
2
|
import { BuyNowCartRequestBody } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
5
3
|
import { CardInstrument } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
6
4
|
import { Cart } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
@@ -13,7 +11,6 @@ import { CustomerStrategy } from '@bigcommerce/checkout-sdk/payment-integration-
|
|
|
13
11
|
import { CustomerStrategyFactory } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
14
12
|
import { ExecutePaymentMethodCheckoutOptions } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
15
13
|
import { FormPoster } from '@bigcommerce/form-poster';
|
|
16
|
-
import { GraphQLRequestOptions } from '@bigcommerce/checkout-sdk/wallet-button-integration';
|
|
17
14
|
import { HostedFormOptions } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
18
15
|
import { HostedInstrument } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
19
16
|
import { LoadingIndicator } from '@bigcommerce/checkout-sdk/ui';
|
|
@@ -29,13 +26,12 @@ import { PaymentRequestOptions } from '@bigcommerce/checkout-sdk/payment-integra
|
|
|
29
26
|
import { PaymentStrategy } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
30
27
|
import { PaymentStrategyFactory } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
31
28
|
import { PaypalButtonCreationService } from '@bigcommerce/checkout-sdk/paypal-utils';
|
|
29
|
+
import { PaypalCommerceWalletService } from '@bigcommerce/checkout-sdk/paypal-utils';
|
|
32
30
|
import { RequestOptions } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
33
31
|
import { RequestSender } from '@bigcommerce/request-sender';
|
|
34
|
-
import { Response } from '@bigcommerce/request-sender';
|
|
35
32
|
import { ScriptLoader } from '@bigcommerce/script-loader';
|
|
36
33
|
import { ShippingOption } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
37
34
|
import { VaultedInstrument } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
38
|
-
import { WalletButtonIntegrationService } from '@bigcommerce/checkout-sdk/wallet-button-integration';
|
|
39
35
|
import { WalletPaymentButtonStrategyFactory } from '@bigcommerce/checkout-sdk/wallet-button-integration';
|
|
40
36
|
|
|
41
37
|
declare interface AllowedPaymentMethods {
|
|
@@ -902,7 +898,6 @@ declare class PayPalCommerceCreditWalletStrategy implements CheckoutButtonStrate
|
|
|
902
898
|
initialize(options: CheckoutButtonInitializeOptions & WithPayPalCommerceCreditWalletInitializeOptions): Promise<void>;
|
|
903
899
|
deinitialize(): Promise<void>;
|
|
904
900
|
private renderButton;
|
|
905
|
-
private mapOrderDetailsToBillingAddress;
|
|
906
901
|
}
|
|
907
902
|
|
|
908
903
|
/**
|
|
@@ -1973,48 +1968,12 @@ declare class PaypalCommerceRatepayPaymentStrategy implements PaymentStrategy {
|
|
|
1973
1968
|
private toggleLoadingIndicator;
|
|
1974
1969
|
}
|
|
1975
1970
|
|
|
1976
|
-
declare class PaypalCommerceWalletService {
|
|
1977
|
-
private walletButtonIntegrationService;
|
|
1978
|
-
private paypalCommerceScriptLoader;
|
|
1979
|
-
private paypalSdk?;
|
|
1980
|
-
constructor(walletButtonIntegrationService: WalletButtonIntegrationService, paypalCommerceScriptLoader: PayPalCommerceScriptLoader);
|
|
1981
|
-
/**
|
|
1982
|
-
*
|
|
1983
|
-
* PayPalSDK methods
|
|
1984
|
-
*
|
|
1985
|
-
*/
|
|
1986
|
-
loadPayPalSdk(paymentMethod: PaymentMethod<PayPalCommerceInitializationData>, providedCurrencyCode: string, initializesOnCheckoutPage?: boolean, forceLoad?: boolean): Promise<PayPalSDK | undefined>;
|
|
1987
|
-
getPayPalSdkOrThrow(): PayPalSDK;
|
|
1988
|
-
/**
|
|
1989
|
-
*
|
|
1990
|
-
* Payment submitting and tokenizing methods
|
|
1991
|
-
*
|
|
1992
|
-
*/
|
|
1993
|
-
proxyTokenizationPayment(cartId: string, providerId: string, methodId: string, orderId?: string): Promise<void>;
|
|
1994
|
-
createPaymentOrderIntent(providerId: string, cartId: string, options?: GraphQLRequestOptions): Promise<string>;
|
|
1995
|
-
addBillingAddress(cartId: string, address: AddressRequestBody, options?: GraphQLRequestOptions): Promise<Response<BillingAddressResponse>>;
|
|
1996
|
-
/**
|
|
1997
|
-
*
|
|
1998
|
-
* Buttons style methods
|
|
1999
|
-
*
|
|
2000
|
-
*/
|
|
2001
|
-
getValidButtonStyle(style?: PayPalButtonStyleOptions): PayPalButtonStyleOptions;
|
|
2002
|
-
getValidHeight(height?: number): number;
|
|
2003
|
-
/**
|
|
2004
|
-
*
|
|
2005
|
-
* Utils methods
|
|
2006
|
-
*
|
|
2007
|
-
*/
|
|
2008
|
-
removeElement(elementId?: string): void;
|
|
2009
|
-
}
|
|
2010
|
-
|
|
2011
1971
|
declare class PaypalCommerceWalletStrategy implements CheckoutButtonStrategy {
|
|
2012
1972
|
private paypalCommerceHeadlessWalletButtonService;
|
|
2013
1973
|
constructor(paypalCommerceHeadlessWalletButtonService: PaypalCommerceWalletService);
|
|
2014
1974
|
initialize(options: CheckoutButtonInitializeOptions & WithPayPalCommerceWalletInitializeOptions): Promise<void>;
|
|
2015
1975
|
deinitialize(): Promise<void>;
|
|
2016
1976
|
private renderButton;
|
|
2017
|
-
private mapOrderDetailsToBillingAddress;
|
|
2018
1977
|
}
|
|
2019
1978
|
|
|
2020
1979
|
declare interface ShippingAddressChangeCallbackPayload {
|