@stripe/stripe-js 1.34.0 → 1.35.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/pure.esm.js +1 -1
- package/dist/pure.js +1 -1
- package/dist/stripe.esm.js +1 -1
- package/dist/stripe.js +1 -1
- package/package.json +1 -1
- package/types/stripe-js/elements/shipping-address.d.ts +26 -0
package/dist/pure.esm.js
CHANGED
package/dist/pure.js
CHANGED
package/dist/stripe.esm.js
CHANGED
package/dist/stripe.js
CHANGED
package/package.json
CHANGED
|
@@ -122,6 +122,14 @@ export type StripeShippingAddressElement = StripeElementBase & {
|
|
|
122
122
|
eventType: 'loaderstart',
|
|
123
123
|
handler?: (event: {elementType: 'shippingAddress'}) => any
|
|
124
124
|
): StripeShippingAddressElement;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Updates the options the `ShippingAddressElement` was initialized with.
|
|
128
|
+
* Updates are merged into the existing configuration.
|
|
129
|
+
*/
|
|
130
|
+
update(
|
|
131
|
+
options: Partial<StripeShippingAddressElementOptions>
|
|
132
|
+
): StripeShippingAddressElement;
|
|
125
133
|
};
|
|
126
134
|
|
|
127
135
|
export interface StripeShippingAddressElementOptions {
|
|
@@ -148,12 +156,29 @@ export interface StripeShippingAddressElementOptions {
|
|
|
148
156
|
postal_code?: string | null;
|
|
149
157
|
country: string;
|
|
150
158
|
};
|
|
159
|
+
phone?: string | null;
|
|
151
160
|
};
|
|
152
161
|
|
|
153
162
|
/**
|
|
154
163
|
* Whether or not ShippingAddressElement provides autocomplete suggestions
|
|
155
164
|
*/
|
|
156
165
|
disableAutocomplete?: boolean;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Control which additional fields to display in the shippingAddress Element.
|
|
169
|
+
*/
|
|
170
|
+
fields?: {
|
|
171
|
+
phone?: 'always' | 'never' | 'auto';
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Specify validation rules for the above additional fields.
|
|
176
|
+
*/
|
|
177
|
+
validation?: {
|
|
178
|
+
phone?: {
|
|
179
|
+
required: 'always' | 'never' | 'auto';
|
|
180
|
+
};
|
|
181
|
+
};
|
|
157
182
|
}
|
|
158
183
|
|
|
159
184
|
export interface StripeShippingAddressElementChangeEvent
|
|
@@ -191,5 +216,6 @@ export interface StripeShippingAddressElementChangeEvent
|
|
|
191
216
|
postal_code: string;
|
|
192
217
|
country: string;
|
|
193
218
|
};
|
|
219
|
+
phone?: string;
|
|
194
220
|
};
|
|
195
221
|
}
|