@stripe/stripe-js 5.3.0 → 5.4.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/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/pure.js +1 -1
- package/dist/pure.mjs +1 -1
- package/dist/stripe-js/checkout.d.mts +11 -0
- package/dist/stripe-js/checkout.d.ts +11 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
package/dist/pure.js
CHANGED
package/dist/pure.mjs
CHANGED
|
@@ -422,6 +422,14 @@ type ConfirmError =
|
|
|
422
422
|
export type StripeCheckoutConfirmResult =
|
|
423
423
|
| {type: 'success'; success: StripeCheckoutSession}
|
|
424
424
|
| {type: 'error'; error: ConfirmError};
|
|
425
|
+
|
|
426
|
+
type RunServerUpdateFunction = (
|
|
427
|
+
session: StripeCheckoutSession
|
|
428
|
+
) => Promise<void>;
|
|
429
|
+
export type StripeCheckoutRunServerUpdateResult =
|
|
430
|
+
| {type: 'success'; success: StripeCheckoutSession}
|
|
431
|
+
| {type: 'error'; error: AnyBuyerError};
|
|
432
|
+
|
|
425
433
|
export interface StripeCheckout {
|
|
426
434
|
/* Custom Checkout methods */
|
|
427
435
|
applyPromotionCode: (
|
|
@@ -458,6 +466,9 @@ export interface StripeCheckout {
|
|
|
458
466
|
}) => Promise<StripeCheckoutConfirmResult>;
|
|
459
467
|
session: () => StripeCheckoutSession;
|
|
460
468
|
on: (event: 'change', handler: StripeCheckoutUpdateHandler) => void;
|
|
469
|
+
runServerUpdate: (
|
|
470
|
+
userFunction: RunServerUpdateFunction
|
|
471
|
+
) => Promise<StripeCheckoutRunServerUpdateResult>;
|
|
461
472
|
|
|
462
473
|
/* Elements methods */
|
|
463
474
|
changeAppearance: (appearance: Appearance) => void;
|
|
@@ -422,6 +422,14 @@ type ConfirmError =
|
|
|
422
422
|
export type StripeCheckoutConfirmResult =
|
|
423
423
|
| {type: 'success'; success: StripeCheckoutSession}
|
|
424
424
|
| {type: 'error'; error: ConfirmError};
|
|
425
|
+
|
|
426
|
+
type RunServerUpdateFunction = (
|
|
427
|
+
session: StripeCheckoutSession
|
|
428
|
+
) => Promise<void>;
|
|
429
|
+
export type StripeCheckoutRunServerUpdateResult =
|
|
430
|
+
| {type: 'success'; success: StripeCheckoutSession}
|
|
431
|
+
| {type: 'error'; error: AnyBuyerError};
|
|
432
|
+
|
|
425
433
|
export interface StripeCheckout {
|
|
426
434
|
/* Custom Checkout methods */
|
|
427
435
|
applyPromotionCode: (
|
|
@@ -458,6 +466,9 @@ export interface StripeCheckout {
|
|
|
458
466
|
}) => Promise<StripeCheckoutConfirmResult>;
|
|
459
467
|
session: () => StripeCheckoutSession;
|
|
460
468
|
on: (event: 'change', handler: StripeCheckoutUpdateHandler) => void;
|
|
469
|
+
runServerUpdate: (
|
|
470
|
+
userFunction: RunServerUpdateFunction
|
|
471
|
+
) => Promise<StripeCheckoutRunServerUpdateResult>;
|
|
461
472
|
|
|
462
473
|
/* Elements methods */
|
|
463
474
|
changeAppearance: (appearance: Appearance) => void;
|