@stripe/stripe-js 9.3.0 → 9.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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/pure.d.mts +2 -0
- package/dist/pure.d.ts +2 -0
- package/dist/pure.js +2 -2
- package/dist/pure.mjs +2 -2
- package/dist/shared.d.mts +2 -0
- package/dist/shared.d.ts +2 -0
- package/dist/stripe-js/checkout.d.mts +20 -3
- package/dist/stripe-js/checkout.d.ts +20 -3
- package/dist/stripe-js/stripe.d.mts +13 -0
- package/dist/stripe-js/stripe.d.ts +13 -0
- package/package.json +1 -1
- package/src/shared.ts +2 -2
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -71,7 +71,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
71
71
|
|
|
72
72
|
stripe._registerWrapper({
|
|
73
73
|
name: 'stripe-js',
|
|
74
|
-
version: "9.
|
|
74
|
+
version: "9.4.0",
|
|
75
75
|
startTime: startTime
|
|
76
76
|
});
|
|
77
77
|
};
|
|
@@ -172,7 +172,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
172
172
|
var expectedVersion = RELEASE_TRAIN;
|
|
173
173
|
|
|
174
174
|
if (isTestKey && version !== expectedVersion) {
|
|
175
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.
|
|
175
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.4.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/index.mjs
CHANGED
|
@@ -67,7 +67,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
67
67
|
|
|
68
68
|
stripe._registerWrapper({
|
|
69
69
|
name: 'stripe-js',
|
|
70
|
-
version: "9.
|
|
70
|
+
version: "9.4.0",
|
|
71
71
|
startTime: startTime
|
|
72
72
|
});
|
|
73
73
|
};
|
|
@@ -168,7 +168,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
168
168
|
var expectedVersion = RELEASE_TRAIN;
|
|
169
169
|
|
|
170
170
|
if (isTestKey && version !== expectedVersion) {
|
|
171
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.
|
|
171
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.4.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/pure.d.mts
CHANGED
package/dist/pure.d.ts
CHANGED
package/dist/pure.js
CHANGED
|
@@ -71,7 +71,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
71
71
|
|
|
72
72
|
stripe._registerWrapper({
|
|
73
73
|
name: 'stripe-js',
|
|
74
|
-
version: "9.
|
|
74
|
+
version: "9.4.0",
|
|
75
75
|
startTime: startTime
|
|
76
76
|
});
|
|
77
77
|
};
|
|
@@ -172,7 +172,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
172
172
|
var expectedVersion = RELEASE_TRAIN;
|
|
173
173
|
|
|
174
174
|
if (isTestKey && version !== expectedVersion) {
|
|
175
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.
|
|
175
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.4.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/pure.mjs
CHANGED
|
@@ -67,7 +67,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
67
67
|
|
|
68
68
|
stripe._registerWrapper({
|
|
69
69
|
name: 'stripe-js',
|
|
70
|
-
version: "9.
|
|
70
|
+
version: "9.4.0",
|
|
71
71
|
startTime: startTime
|
|
72
72
|
});
|
|
73
73
|
};
|
|
@@ -168,7 +168,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
168
168
|
var expectedVersion = RELEASE_TRAIN;
|
|
169
169
|
|
|
170
170
|
if (isTestKey && version !== expectedVersion) {
|
|
171
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.
|
|
171
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.4.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/shared.d.mts
CHANGED
package/dist/shared.d.ts
CHANGED
|
@@ -626,7 +626,7 @@ export type StripeCheckoutRunServerUpdateResult =
|
|
|
626
626
|
| {type: 'error'; error: AnyBuyerError};
|
|
627
627
|
|
|
628
628
|
type LoadActionsError = {message: string; code: null};
|
|
629
|
-
type
|
|
629
|
+
export type StripeCheckoutLoadActionsSuccess = {
|
|
630
630
|
applyPromotionCode: (
|
|
631
631
|
promotionCode: string
|
|
632
632
|
) => Promise<StripeCheckoutApplyPromotionCodeResult>;
|
|
@@ -672,7 +672,24 @@ type LoadActionsSuccess = {
|
|
|
672
672
|
) => Promise<StripeCheckoutRunServerUpdateResult>;
|
|
673
673
|
};
|
|
674
674
|
export type StripeCheckoutLoadActionsResult =
|
|
675
|
-
| {type: 'success'; actions:
|
|
675
|
+
| {type: 'success'; actions: StripeCheckoutLoadActionsSuccess}
|
|
676
|
+
| {type: 'error'; error: LoadActionsError};
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* Form SDK actions omit the client-only update methods that are handled
|
|
680
|
+
* internally by the CheckoutForm UI. Merchants using `initCheckoutFormSdk`
|
|
681
|
+
* should drive these fields via the form, not via imperative action calls.
|
|
682
|
+
*/
|
|
683
|
+
export type StripeCheckoutFormLoadActionsSuccess = Omit<
|
|
684
|
+
StripeCheckoutLoadActionsSuccess,
|
|
685
|
+
| 'updateEmail'
|
|
686
|
+
| 'updatePhoneNumber'
|
|
687
|
+
| 'updateShippingAddress'
|
|
688
|
+
| 'updateBillingAddress'
|
|
689
|
+
| 'updateTaxIdInfo'
|
|
690
|
+
>;
|
|
691
|
+
export type StripeCheckoutFormLoadActionsResult =
|
|
692
|
+
| {type: 'success'; actions: StripeCheckoutFormLoadActionsSuccess}
|
|
676
693
|
| {type: 'error'; error: LoadActionsError};
|
|
677
694
|
|
|
678
695
|
export interface StripeCheckoutElementsSdk {
|
|
@@ -713,7 +730,7 @@ export interface StripeCheckoutElementsSdk {
|
|
|
713
730
|
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
714
731
|
export interface StripeCheckoutFormSdk {
|
|
715
732
|
on: (event: 'change', handler: StripeCheckoutUpdateHandler) => void;
|
|
716
|
-
loadActions: () => Promise<
|
|
733
|
+
loadActions: () => Promise<StripeCheckoutFormLoadActionsResult>;
|
|
717
734
|
|
|
718
735
|
changeAppearance: (appearance: Omit<Appearance, 'rules'>) => void;
|
|
719
736
|
loadFonts: (fonts: Array<CssFontSource | CustomFontSource>) => void;
|
|
@@ -626,7 +626,7 @@ export type StripeCheckoutRunServerUpdateResult =
|
|
|
626
626
|
| {type: 'error'; error: AnyBuyerError};
|
|
627
627
|
|
|
628
628
|
type LoadActionsError = {message: string; code: null};
|
|
629
|
-
type
|
|
629
|
+
export type StripeCheckoutLoadActionsSuccess = {
|
|
630
630
|
applyPromotionCode: (
|
|
631
631
|
promotionCode: string
|
|
632
632
|
) => Promise<StripeCheckoutApplyPromotionCodeResult>;
|
|
@@ -672,7 +672,24 @@ type LoadActionsSuccess = {
|
|
|
672
672
|
) => Promise<StripeCheckoutRunServerUpdateResult>;
|
|
673
673
|
};
|
|
674
674
|
export type StripeCheckoutLoadActionsResult =
|
|
675
|
-
| {type: 'success'; actions:
|
|
675
|
+
| {type: 'success'; actions: StripeCheckoutLoadActionsSuccess}
|
|
676
|
+
| {type: 'error'; error: LoadActionsError};
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* Form SDK actions omit the client-only update methods that are handled
|
|
680
|
+
* internally by the CheckoutForm UI. Merchants using `initCheckoutFormSdk`
|
|
681
|
+
* should drive these fields via the form, not via imperative action calls.
|
|
682
|
+
*/
|
|
683
|
+
export type StripeCheckoutFormLoadActionsSuccess = Omit<
|
|
684
|
+
StripeCheckoutLoadActionsSuccess,
|
|
685
|
+
| 'updateEmail'
|
|
686
|
+
| 'updatePhoneNumber'
|
|
687
|
+
| 'updateShippingAddress'
|
|
688
|
+
| 'updateBillingAddress'
|
|
689
|
+
| 'updateTaxIdInfo'
|
|
690
|
+
>;
|
|
691
|
+
export type StripeCheckoutFormLoadActionsResult =
|
|
692
|
+
| {type: 'success'; actions: StripeCheckoutFormLoadActionsSuccess}
|
|
676
693
|
| {type: 'error'; error: LoadActionsError};
|
|
677
694
|
|
|
678
695
|
export interface StripeCheckoutElementsSdk {
|
|
@@ -713,7 +730,7 @@ export interface StripeCheckoutElementsSdk {
|
|
|
713
730
|
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
714
731
|
export interface StripeCheckoutFormSdk {
|
|
715
732
|
on: (event: 'change', handler: StripeCheckoutUpdateHandler) => void;
|
|
716
|
-
loadActions: () => Promise<
|
|
733
|
+
loadActions: () => Promise<StripeCheckoutFormLoadActionsResult>;
|
|
717
734
|
|
|
718
735
|
changeAppearance: (appearance: Omit<Appearance, 'rules'>) => void;
|
|
719
736
|
loadFonts: (fonts: Array<CssFontSource | CustomFontSource>) => void;
|
|
@@ -674,6 +674,19 @@ export interface Stripe {
|
|
|
674
674
|
clientSecret: string;
|
|
675
675
|
}): Promise<PaymentIntentOrSetupIntentResult>;
|
|
676
676
|
|
|
677
|
+
/**
|
|
678
|
+
* On your client, display the next action flow. Stripe automatically displays the authentication
|
|
679
|
+
* user interface in a pop-up modal when you call `handleNextAction`.
|
|
680
|
+
*
|
|
681
|
+
* Use `stripe.handleNextAction` to handle the required next action when a SharedPaymentToken
|
|
682
|
+
* has a `requires_action` status.
|
|
683
|
+
*
|
|
684
|
+
* @docs https://docs.stripe.com/agentic-commerce/concepts/shared-payment-tokens?agent-seller=agent#handle-next-actions
|
|
685
|
+
*/
|
|
686
|
+
handleNextAction(options: {
|
|
687
|
+
hashedValue: string;
|
|
688
|
+
}): Promise<PaymentIntentOrSetupIntentResult>;
|
|
689
|
+
|
|
677
690
|
/**
|
|
678
691
|
* Use `stripe.verifyMicrodepositsForPayment` in the [Accept a Canadian pre-authorized debit payment](https://stripe.com/docs/payments/acss-debit/accept-a-payment) flow
|
|
679
692
|
* to verify a customer's bank account with micro-deposits.
|
|
@@ -674,6 +674,19 @@ export interface Stripe {
|
|
|
674
674
|
clientSecret: string;
|
|
675
675
|
}): Promise<PaymentIntentOrSetupIntentResult>;
|
|
676
676
|
|
|
677
|
+
/**
|
|
678
|
+
* On your client, display the next action flow. Stripe automatically displays the authentication
|
|
679
|
+
* user interface in a pop-up modal when you call `handleNextAction`.
|
|
680
|
+
*
|
|
681
|
+
* Use `stripe.handleNextAction` to handle the required next action when a SharedPaymentToken
|
|
682
|
+
* has a `requires_action` status.
|
|
683
|
+
*
|
|
684
|
+
* @docs https://docs.stripe.com/agentic-commerce/concepts/shared-payment-tokens?agent-seller=agent#handle-next-actions
|
|
685
|
+
*/
|
|
686
|
+
handleNextAction(options: {
|
|
687
|
+
hashedValue: string;
|
|
688
|
+
}): Promise<PaymentIntentOrSetupIntentResult>;
|
|
689
|
+
|
|
677
690
|
/**
|
|
678
691
|
* Use `stripe.verifyMicrodepositsForPayment` in the [Accept a Canadian pre-authorized debit payment](https://stripe.com/docs/payments/acss-debit/accept-a-payment) flow
|
|
679
692
|
* to verify a customer's bank account with micro-deposits.
|
package/package.json
CHANGED
package/src/shared.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {Stripe, StripeConstructor} from '../types';
|
|
1
|
+
import {Stripe, StripeConstructor, ReleaseTrain} from '../types';
|
|
2
2
|
|
|
3
3
|
export type LoadStripe = (
|
|
4
4
|
...args: Parameters<StripeConstructor>
|
|
@@ -12,7 +12,7 @@ export interface LoadParams {
|
|
|
12
12
|
// containing the package.json version
|
|
13
13
|
declare const _VERSION: string;
|
|
14
14
|
|
|
15
|
-
export const RELEASE_TRAIN = 'dahlia';
|
|
15
|
+
export const RELEASE_TRAIN: ReleaseTrain = 'dahlia';
|
|
16
16
|
|
|
17
17
|
const runtimeVersionToUrlVersion = (version: string | number) =>
|
|
18
18
|
version === 3 ? 'v3' : version;
|