@stripe/stripe-js 2.1.2 → 2.1.4

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: "2.1.2",
57
+ version: "2.1.4",
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: "2.1.2",
61
+ version: "2.1.4",
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: "2.1.2",
41
+ version: "2.1.4",
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: "2.1.2",
45
+ version: "2.1.4",
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": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "description": "Stripe.js loading utility",
5
5
  "main": "dist/stripe.js",
6
6
  "module": "dist/stripe.esm.js",
@@ -10,6 +10,7 @@ import {
10
10
  StripeAddressElement,
11
11
  } from './elements/address';
12
12
  import {Appearance, CssFontSource, CustomFontSource} from './elements-group';
13
+ import {StripeError} from './stripe';
13
14
 
14
15
  /**
15
16
  * Requires beta access:
@@ -49,24 +50,33 @@ export type StripeCustomCheckoutShippingAddress = {
49
50
  };
50
51
 
51
52
  export type StripeCustomCheckoutBillingAddress = StripeCustomCheckoutShippingAddress;
53
+ export type StripeCustomCheckoutResult =
54
+ | {session: StripeCustomCheckoutSession; error?: undefined}
55
+ | {session?: undefined; error: StripeError};
52
56
 
53
57
  export interface StripeCustomCheckoutActions {
54
- applyPromotionCode: (promotionCode: string) => Promise<void>;
55
- removePromotionCode: () => Promise<void>;
58
+ applyPromotionCode: (
59
+ promotionCode: string
60
+ ) => Promise<StripeCustomCheckoutResult>;
61
+ removePromotionCode: () => Promise<StripeCustomCheckoutResult>;
56
62
  updateShippingAddress: (
57
63
  shippingAddress: StripeCustomCheckoutShippingAddress
58
- ) => Promise<void>;
64
+ ) => Promise<StripeCustomCheckoutResult>;
59
65
  updateBillingAddress: (
60
66
  billingAddress: StripeCustomCheckoutBillingAddress
61
- ) => Promise<void>;
67
+ ) => Promise<StripeCustomCheckoutResult>;
62
68
  updatePhoneNumber: (phoneNumber: string) => void;
63
69
  updateEmail: (email: string) => void;
64
70
  updateLineItemQuantity: (args: {
65
71
  lineItem: string;
66
72
  quantity: number;
67
- }) => Promise<void>;
68
- updateShippingOption: (shippingOption: string) => Promise<void>;
69
- confirm: (args?: {return_url?: string}) => Promise<void>;
73
+ }) => Promise<StripeCustomCheckoutResult>;
74
+ updateShippingOption: (
75
+ shippingOption: string
76
+ ) => Promise<StripeCustomCheckoutResult>;
77
+ confirm: (args?: {
78
+ return_url?: string;
79
+ }) => Promise<StripeCustomCheckoutResult>;
70
80
  }
71
81
 
72
82
  /**
@@ -745,6 +745,22 @@ export interface StripeElementsOptionsMode extends BaseStripeElementsOptions {
745
745
  */
746
746
  payment_method_types?: string[];
747
747
 
748
+ /**
749
+ * When using automatic payment methods (omitting paymentMethodTypes), provide a
750
+ * payment method configuration ID for deriving payment methods.
751
+ *
752
+ * @docs https://stripe.com/docs/connect/payment-method-configurations
753
+ */
754
+ paymentMethodConfiguration?: string;
755
+
756
+ /**
757
+ * When using automatic payment methods (omitting payment_method_types), provide a
758
+ * payment method configuration ID for deriving payment methods.
759
+ *
760
+ * @docs https://stripe.com/docs/connect/payment-method-configurations
761
+ */
762
+ payment_method_configuration?: string;
763
+
748
764
  /**
749
765
  * Allows PaymentMethods to be created from the Elements instance.
750
766
  */