@stripe/stripe-js 1.41.0 → 1.42.1

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/pure.esm.js CHANGED
@@ -54,7 +54,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
54
54
 
55
55
  stripe._registerWrapper({
56
56
  name: 'stripe-js',
57
- version: "1.41.0",
57
+ version: "1.42.1",
58
58
  startTime: startTime
59
59
  });
60
60
  };
package/dist/pure.js CHANGED
@@ -58,7 +58,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
58
58
 
59
59
  stripe._registerWrapper({
60
60
  name: 'stripe-js',
61
- version: "1.41.0",
61
+ version: "1.42.1",
62
62
  startTime: startTime
63
63
  });
64
64
  };
@@ -38,7 +38,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
38
38
 
39
39
  stripe._registerWrapper({
40
40
  name: 'stripe-js',
41
- version: "1.41.0",
41
+ version: "1.42.1",
42
42
  startTime: startTime
43
43
  });
44
44
  };
package/dist/stripe.js CHANGED
@@ -42,7 +42,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
42
42
 
43
43
  stripe._registerWrapper({
44
44
  name: 'stripe-js',
45
- version: "1.41.0",
45
+ version: "1.42.1",
46
46
  startTime: startTime
47
47
  });
48
48
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/stripe-js",
3
- "version": "1.41.0",
3
+ "version": "1.42.1",
4
4
  "description": "Stripe.js loading utility",
5
5
  "main": "dist/stripe.js",
6
6
  "module": "dist/stripe.esm.js",
@@ -86,7 +86,39 @@ export type StripeCartElement = StripeElementBase & {
86
86
  * Updates the options the `CartElement` was initialized with.
87
87
  * Updates are merged into the existing configuration.
88
88
  */
89
- update(options: Partial<StripeCartElementOptions>): StripeCartElement;
89
+ update(options: StripeCartElementUpdateOptions): StripeCartElement;
90
+
91
+ /**
92
+ * Makes the Cart Element visible
93
+ */
94
+ show(): StripeCartElement;
95
+
96
+ /**
97
+ * Makes the Cart Element not visible
98
+ */
99
+ hide(): StripeCartElement;
100
+
101
+ /**
102
+ * Cancels the "Check Out" button loader and displays an error message regarding why going to checkout failed
103
+ */
104
+ cancelCheckout(errorMessage?: string | null): StripeCartElement;
105
+
106
+ /**
107
+ * Adds a line item to the CartSession
108
+ */
109
+ addLineItem(
110
+ lineItemData:
111
+ | {
112
+ product: string;
113
+ price?: null;
114
+ quantity?: number | null;
115
+ }
116
+ | {
117
+ price: string;
118
+ product?: null;
119
+ quantity?: number | null;
120
+ }
121
+ ): Promise<{error?: StripeError}>;
90
122
  };
91
123
 
92
124
  export type CartDescriptor = 'cart' | 'bag' | 'basket';
@@ -110,7 +142,26 @@ export interface StripeCartElementOptions {
110
142
  * By default the Cart Element will use the title 'Your [descriptor]'.
111
143
  */
112
144
  header?: {
113
- text?: string;
145
+ text?: string | null;
146
+ };
147
+
148
+ /**
149
+ * Control whether the Element automatically appears when items are added to the cart.
150
+ * By default, the Cart Element will use 'auto'.
151
+ */
152
+ showOnAdd?: CartShowOnAdd | null;
153
+ }
154
+
155
+ /*
156
+ * Updatable options for an `Elements` instance
157
+ */
158
+ export interface StripeCartElementUpdateOptions {
159
+ /**
160
+ * Override the text used in the title of the Element.
161
+ * By default the Cart Element will use the title 'Your [descriptor]'.
162
+ */
163
+ header?: {
164
+ text?: string | null;
114
165
  };
115
166
 
116
167
  /**
@@ -80,9 +80,9 @@ export interface StripePaymentMethodMessagingElementOptions {
80
80
  | 'SE';
81
81
 
82
82
  /**
83
- * The font color of the promotional message.
83
+ * The logo color to display in the message. Defaults to black
84
84
  */
85
- darkMode?: boolean;
85
+ logoColor?: 'black' | 'white' | 'color';
86
86
 
87
87
  /**
88
88
  * The font size of the promotional message.
@@ -658,16 +658,16 @@ export interface ConfirmCustomerBalancePaymentData
658
658
  funding_type?: 'bank_transfer';
659
659
  bank_transfer?: {
660
660
  type:
661
- | 'us_bank_account'
662
- | 'eu_bank_account'
663
- | 'id_bank_account'
664
- | 'gb_bank_account'
665
- | 'jp_bank_account'
666
- | 'mx_bank_account';
667
- eu_bank_account?: {
668
- country: 'ES' | 'FR' | 'IE' | 'NL';
661
+ | 'eu_bank_transfer'
662
+ | 'gb_bank_transfer'
663
+ | 'id_bank_transfer'
664
+ | 'jp_bank_transfer'
665
+ | 'mx_bank_transfer'
666
+ | 'us_bank_transfer';
667
+ eu_bank_transfer?: {
668
+ country: 'DE' | 'ES' | 'FR' | 'IE' | 'NL';
669
669
  };
670
- id_bank_account?: {
670
+ id_bank_transfer?: {
671
671
  bank: 'bni' | 'bca';
672
672
  };
673
673
  requested_address_types?: Array<