@stripe/stripe-js 2.1.4 → 2.1.5

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.4",
57
+ version: "2.1.5",
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.4",
61
+ version: "2.1.5",
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.4",
41
+ version: "2.1.5",
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.4",
45
+ version: "2.1.5",
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.4",
3
+ "version": "2.1.5",
4
4
  "description": "Stripe.js loading utility",
5
5
  "main": "dist/stripe.js",
6
6
  "module": "dist/stripe.esm.js",
@@ -36,20 +36,19 @@ export interface StripeCustomCheckoutOptions {
36
36
  */
37
37
 
38
38
  export type StripeCustomCheckoutAddress = {
39
- country: string | null;
40
- line1: string | null;
39
+ country: string;
40
+ line1?: string | null;
41
41
  line2?: string | null;
42
- city: string | null;
43
- postal_code: string | null;
44
- state: string | null;
42
+ city?: string | null;
43
+ postal_code?: string | null;
44
+ state?: string | null;
45
45
  };
46
46
 
47
- export type StripeCustomCheckoutShippingAddress = {
47
+ export type StripeCustomCheckoutContact = {
48
48
  name?: string | null;
49
49
  address: StripeCustomCheckoutAddress;
50
50
  };
51
51
 
52
- export type StripeCustomCheckoutBillingAddress = StripeCustomCheckoutShippingAddress;
53
52
  export type StripeCustomCheckoutResult =
54
53
  | {session: StripeCustomCheckoutSession; error?: undefined}
55
54
  | {session?: undefined; error: StripeError};
@@ -60,10 +59,10 @@ export interface StripeCustomCheckoutActions {
60
59
  ) => Promise<StripeCustomCheckoutResult>;
61
60
  removePromotionCode: () => Promise<StripeCustomCheckoutResult>;
62
61
  updateShippingAddress: (
63
- shippingAddress: StripeCustomCheckoutShippingAddress
62
+ shippingAddress: StripeCustomCheckoutContact
64
63
  ) => Promise<StripeCustomCheckoutResult>;
65
64
  updateBillingAddress: (
66
- billingAddress: StripeCustomCheckoutBillingAddress
65
+ billingAddress: StripeCustomCheckoutContact
67
66
  ) => Promise<StripeCustomCheckoutResult>;
68
67
  updatePhoneNumber: (phoneNumber: string) => void;
69
68
  updateEmail: (email: string) => void;
@@ -92,25 +91,25 @@ export type StripeCustomCheckoutTaxAmount = {
92
91
  export type StripeCustomCheckoutDiscountAmount = {
93
92
  amount: number;
94
93
  displayName: string;
95
- promotionCode?: string | null;
94
+ promotionCode: string | null;
96
95
  };
97
96
 
98
97
  export type StripeCustomCheckoutShipping = {
99
98
  shippingOption: StripeCustomCheckoutShippingOption;
100
- taxAmounts?: Array<StripeCustomCheckoutTaxAmount> | null;
99
+ taxAmounts: Array<StripeCustomCheckoutTaxAmount> | null;
101
100
  };
102
101
 
103
102
  export type StripeCustomCheckoutShippingOption = {
104
103
  id: string;
105
104
  amount: number;
106
105
  currency: string;
107
- displayName?: string | null;
108
- deliveryEstimate?: StripeCustomCheckoutDeliveryEstimate | null;
106
+ displayName: string | null;
107
+ deliveryEstimate: StripeCustomCheckoutDeliveryEstimate | null;
109
108
  };
110
109
 
111
110
  export type StripeCustomCheckoutDeliveryEstimate = {
112
- maximum?: StripeCustomCheckoutEstimate | null;
113
- minimum?: StripeCustomCheckoutEstimate | null;
111
+ maximum: StripeCustomCheckoutEstimate | null;
112
+ minimum: StripeCustomCheckoutEstimate | null;
114
113
  };
115
114
 
116
115
  export type StripeCustomCheckoutEstimate = {
@@ -118,11 +117,6 @@ export type StripeCustomCheckoutEstimate = {
118
117
  value: number;
119
118
  };
120
119
 
121
- export type StripeCustomCheckoutLineItemDiscountAmount = {
122
- amount: number;
123
- promotionCode?: string | null;
124
- };
125
-
126
120
  export type StripeCustomCheckoutBillingInterval =
127
121
  | 'day'
128
122
  | 'month'
@@ -134,13 +128,14 @@ export type StripeCustomCheckoutLineItem = {
134
128
  name: string;
135
129
  amount: number;
136
130
  unitAmount: number;
137
- description?: string | null;
131
+ description: string | null;
138
132
  quantity: number;
139
- discountAmounts?: Array<StripeCustomCheckoutLineItemDiscountAmount> | null;
140
- recurring?: {
133
+ discountAmounts: Array<StripeCustomCheckoutDiscountAmount> | null;
134
+ taxAmounts: Array<StripeCustomCheckoutTaxAmount> | null;
135
+ recurring: {
141
136
  interval: StripeCustomCheckoutBillingInterval;
142
137
  interval_count: number;
143
- };
138
+ } | null;
144
139
  };
145
140
 
146
141
  export type StripeCustomCheckoutTotalSummary = {
@@ -161,15 +156,15 @@ export type StripeCustomCheckoutConfirmationRequirement =
161
156
 
162
157
  export interface StripeCustomCheckoutSession {
163
158
  lineItems: Array<StripeCustomCheckoutLineItem>;
164
- taxAmounts?: Array<StripeCustomCheckoutTaxAmount> | null;
165
- discountAmounts?: Array<StripeCustomCheckoutDiscountAmount> | null;
159
+ taxAmounts: Array<StripeCustomCheckoutTaxAmount> | null;
160
+ discountAmounts: Array<StripeCustomCheckoutDiscountAmount> | null;
166
161
  currency: string;
167
- shipping?: StripeCustomCheckoutShipping | null;
162
+ shipping: StripeCustomCheckoutShipping | null;
168
163
  shippingOptions: Array<StripeCustomCheckoutShippingOption>;
169
- shippingAddress?: StripeCustomCheckoutShippingAddress | null;
170
- billingAddress?: StripeCustomCheckoutBillingAddress | null;
171
- phoneNumber?: string | null;
172
- email?: string | null;
164
+ shippingAddress: StripeCustomCheckoutContact | null;
165
+ billingAddress: StripeCustomCheckoutContact | null;
166
+ phoneNumber: string | null;
167
+ email: string | null;
173
168
  total: StripeCustomCheckoutTotalSummary;
174
169
  confirmationRequirements: StripeCustomCheckoutConfirmationRequirement[];
175
170
  canConfirm: boolean;
@@ -219,7 +214,6 @@ export type StripeCustomCheckoutUpdateHandler = (
219
214
 
220
215
  export interface StripeCustomCheckout
221
216
  extends StripeCustomCheckoutActions,
222
- StripeCustomCheckoutSession,
223
217
  StripeCustomCheckoutElementsActions {
224
218
  session: () => StripeCustomCheckoutSession;
225
219
  on: (event: 'change', handler: StripeCustomCheckoutUpdateHandler) => void;