@bigcommerce/checkout-sdk 1.281.2 → 1.282.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/CHANGELOG.md +7 -0
- package/dist/checkout-button.js +1 -1
- package/dist/checkout-button.js.map +1 -1
- package/dist/checkout-button.umd.js +1 -1
- package/dist/checkout-button.umd.js.map +1 -1
- package/dist/checkout-sdk.d.ts +112 -0
- package/dist/checkout-sdk.js +1 -1
- package/dist/checkout-sdk.js.map +1 -1
- package/dist/checkout-sdk.umd.js +1 -1
- package/dist/checkout-sdk.umd.js.map +1 -1
- package/docs/README.md +12 -0
- package/docs/interfaces/BaseCustomerInitializeOptions.md +10 -0
- package/docs/interfaces/ShippingInitializeOptions.md +10 -0
- package/docs/interfaces/StripeCustomerEvent.md +74 -0
- package/docs/interfaces/StripeEvent.md +37 -0
- package/docs/interfaces/StripeShippingEvent.md +74 -0
- package/docs/interfaces/StripeUPECustomerInitializeOptions.md +92 -0
- package/docs/interfaces/StripeUPEShippingInitializeOptions.md +87 -0
- package/package.json +1 -1
package/dist/checkout-sdk.d.ts
CHANGED
|
@@ -1157,6 +1157,11 @@ declare interface BaseCustomerInitializeOptions extends CustomerRequestOptions {
|
|
|
1157
1157
|
* They can be omitted unless you need to support GooglePay.
|
|
1158
1158
|
*/
|
|
1159
1159
|
googlepaystripeupe?: GooglePayCustomerInitializeOptions;
|
|
1160
|
+
/**
|
|
1161
|
+
* The options that are required to initialize the Customer Stripe Upe payment method.
|
|
1162
|
+
* They can be omitted unless you need to support Customer Stripe Upe.
|
|
1163
|
+
*/
|
|
1164
|
+
stripeupe?: StripeUPECustomerInitializeOptions;
|
|
1160
1165
|
}
|
|
1161
1166
|
|
|
1162
1167
|
declare interface BaseElementOptions {
|
|
@@ -6598,6 +6603,11 @@ declare interface ShippingInitializeOptions<T = {}> extends ShippingRequestOptio
|
|
|
6598
6603
|
* when using AmazonPayV2.
|
|
6599
6604
|
*/
|
|
6600
6605
|
amazonpay?: AmazonPayV2ShippingInitializeOptions;
|
|
6606
|
+
/**
|
|
6607
|
+
* The options that are required to initialize the shipping step of checkout
|
|
6608
|
+
* when using Stripe Upe Link.
|
|
6609
|
+
*/
|
|
6610
|
+
stripeupe?: StripeUPEShippingInitializeOptions;
|
|
6601
6611
|
}
|
|
6602
6612
|
|
|
6603
6613
|
declare interface ShippingOption {
|
|
@@ -6824,6 +6834,14 @@ declare interface StoreProfile {
|
|
|
6824
6834
|
storeLanguage: string;
|
|
6825
6835
|
}
|
|
6826
6836
|
|
|
6837
|
+
declare interface StripeCustomerEvent extends StripeEvent {
|
|
6838
|
+
collapsed?: boolean;
|
|
6839
|
+
authenticated: boolean;
|
|
6840
|
+
value: {
|
|
6841
|
+
email: string;
|
|
6842
|
+
};
|
|
6843
|
+
}
|
|
6844
|
+
|
|
6827
6845
|
/**
|
|
6828
6846
|
* CSS properties supported by Stripe.js.
|
|
6829
6847
|
*/
|
|
@@ -6971,6 +6989,62 @@ declare interface StripeElementStyleVariant extends StripeElementCSSProperties {
|
|
|
6971
6989
|
};
|
|
6972
6990
|
}
|
|
6973
6991
|
|
|
6992
|
+
declare interface StripeEvent {
|
|
6993
|
+
complete: boolean;
|
|
6994
|
+
elementType: string;
|
|
6995
|
+
empty: boolean;
|
|
6996
|
+
}
|
|
6997
|
+
|
|
6998
|
+
declare type StripeEventType = StripeShippingEvent | StripeCustomerEvent;
|
|
6999
|
+
|
|
7000
|
+
declare interface StripeShippingEvent extends StripeEvent {
|
|
7001
|
+
isNewAddress?: boolean;
|
|
7002
|
+
value: {
|
|
7003
|
+
address: {
|
|
7004
|
+
city: string;
|
|
7005
|
+
country: string;
|
|
7006
|
+
line1: string;
|
|
7007
|
+
line2?: string;
|
|
7008
|
+
postal_code: string;
|
|
7009
|
+
state: string;
|
|
7010
|
+
};
|
|
7011
|
+
name: string;
|
|
7012
|
+
};
|
|
7013
|
+
}
|
|
7014
|
+
|
|
7015
|
+
declare interface StripeUPECustomerInitializeOptions {
|
|
7016
|
+
/**
|
|
7017
|
+
* The ID of a container which the stripe iframe should be inserted.
|
|
7018
|
+
*/
|
|
7019
|
+
container: string;
|
|
7020
|
+
/**
|
|
7021
|
+
* The identifier of the payment method.
|
|
7022
|
+
*/
|
|
7023
|
+
methodId: string;
|
|
7024
|
+
/**
|
|
7025
|
+
* The identifier of the payment provider providing the payment method. This
|
|
7026
|
+
* option is only required if the provider offers multiple payment options.
|
|
7027
|
+
* i.e.: Stripeupe and Klarna.
|
|
7028
|
+
*/
|
|
7029
|
+
gatewayId: string;
|
|
7030
|
+
/**
|
|
7031
|
+
* A callback that gets called whenever the Stripe Link Authentication Element's value changes.
|
|
7032
|
+
* @param authenticated - if the email is authenticated on Stripe.
|
|
7033
|
+
* @param email - The new value of the email.
|
|
7034
|
+
*/
|
|
7035
|
+
onEmailChange(authenticated: boolean, email: string): void;
|
|
7036
|
+
/**
|
|
7037
|
+
* A callback that gets called when Stripe Link Authentication Element is Loaded.
|
|
7038
|
+
*/
|
|
7039
|
+
isLoading(mounted: boolean): void;
|
|
7040
|
+
/**
|
|
7041
|
+
* get styles from store theme
|
|
7042
|
+
*/
|
|
7043
|
+
getStyles?(): {
|
|
7044
|
+
[key: string]: string;
|
|
7045
|
+
};
|
|
7046
|
+
}
|
|
7047
|
+
|
|
6974
7048
|
/**
|
|
6975
7049
|
* A set of options that are required to initialize the Stripe payment method.
|
|
6976
7050
|
*
|
|
@@ -7006,6 +7080,44 @@ declare interface StripeUPEPaymentInitializeOptions {
|
|
|
7006
7080
|
onError?(error?: Error): void;
|
|
7007
7081
|
}
|
|
7008
7082
|
|
|
7083
|
+
/**
|
|
7084
|
+
* A set of options that are required to initialize the shipping step of
|
|
7085
|
+
* checkout in order to support StripeUpe.
|
|
7086
|
+
*
|
|
7087
|
+
* When StripeUpe is initialized, an iframe will be inserted into the DOM. The
|
|
7088
|
+
* iframe has a list of shipping addresses for the customer to choose from.
|
|
7089
|
+
*/
|
|
7090
|
+
declare interface StripeUPEShippingInitializeOptions {
|
|
7091
|
+
/**
|
|
7092
|
+
* The ID of a container which the stripe iframe should be inserted.
|
|
7093
|
+
*/
|
|
7094
|
+
container?: string;
|
|
7095
|
+
/**
|
|
7096
|
+
* The identifier of the payment method.
|
|
7097
|
+
*/
|
|
7098
|
+
methodId: string;
|
|
7099
|
+
/**
|
|
7100
|
+
* The identifier of the payment provider providing the payment method. This
|
|
7101
|
+
* option is only required if the provider offers multiple payment options.
|
|
7102
|
+
* i.e.: Stripeupe and Klarna.
|
|
7103
|
+
*/
|
|
7104
|
+
gatewayId: string;
|
|
7105
|
+
/**
|
|
7106
|
+
* A callback that gets called whenever the Stripe Link Shipping Element's object is completed.
|
|
7107
|
+
*/
|
|
7108
|
+
onChangeShipping(shipping: StripeEventType): void;
|
|
7109
|
+
/**
|
|
7110
|
+
* Available countries configured on BC shipping setup.
|
|
7111
|
+
*/
|
|
7112
|
+
availableCountries: string;
|
|
7113
|
+
/**
|
|
7114
|
+
* get styles from store theme
|
|
7115
|
+
*/
|
|
7116
|
+
getStyles?(): {
|
|
7117
|
+
[key: string]: string;
|
|
7118
|
+
};
|
|
7119
|
+
}
|
|
7120
|
+
|
|
7009
7121
|
/**
|
|
7010
7122
|
* A set of options that are required to initialize the Stripe payment method.
|
|
7011
7123
|
*
|