stripe 22.1.0-alpha.1 → 22.1.0-alpha.2
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/CHANGELOG.md +103 -0
- package/OPENAPI_VERSION +1 -1
- package/VERSION +1 -1
- package/cjs/Error.d.ts +4 -0
- package/cjs/Error.js +11 -1
- package/cjs/Error.js.map +1 -1
- package/cjs/Types.d.ts +2 -2
- package/cjs/Webhooks.d.ts +11 -1
- package/cjs/Webhooks.js +7 -7
- package/cjs/Webhooks.js.map +1 -1
- package/cjs/apiVersion.d.ts +1 -1
- package/cjs/apiVersion.js +1 -1
- package/cjs/lib.d.ts +7 -1
- package/cjs/net/FetchHttpClient.js +4 -1
- package/cjs/net/FetchHttpClient.js.map +1 -1
- package/cjs/resources/ApplicationFees.d.ts +4 -0
- package/cjs/resources/Apps/index.d.ts +5 -1
- package/cjs/resources/Apps/index.js.map +1 -1
- package/cjs/resources/Billing/Analytics/index.d.ts +2 -1
- package/cjs/resources/Billing/Analytics/index.js.map +1 -1
- package/cjs/resources/Billing/index.d.ts +31 -7
- package/cjs/resources/Billing/index.js.map +1 -1
- package/cjs/resources/BillingPortal/index.d.ts +7 -2
- package/cjs/resources/BillingPortal/index.js.map +1 -1
- package/cjs/resources/Capital/index.d.ts +9 -3
- package/cjs/resources/Capital/index.js.map +1 -1
- package/cjs/resources/Charges.d.ts +190 -2
- package/cjs/resources/Checkout/index.d.ts +8 -1
- package/cjs/resources/Checkout/index.js.map +1 -1
- package/cjs/resources/Climate/index.d.ts +12 -3
- package/cjs/resources/Climate/index.js.map +1 -1
- package/cjs/resources/DelegatedCheckout/index.d.ts +6 -1
- package/cjs/resources/DelegatedCheckout/index.js.map +1 -1
- package/cjs/resources/Entitlements/index.d.ts +8 -2
- package/cjs/resources/Entitlements/index.js.map +1 -1
- package/cjs/resources/FinancialConnections/index.d.ts +20 -5
- package/cjs/resources/FinancialConnections/index.js.map +1 -1
- package/cjs/resources/Forwarding/index.d.ts +4 -1
- package/cjs/resources/Forwarding/index.js.map +1 -1
- package/cjs/resources/Identity/index.d.ts +15 -3
- package/cjs/resources/Identity/index.js.map +1 -1
- package/cjs/resources/Invoices.d.ts +21 -3
- package/cjs/resources/Issuing/index.d.ts +56 -12
- package/cjs/resources/Issuing/index.js.map +1 -1
- package/cjs/resources/Orchestration/index.d.ts +2 -1
- package/cjs/resources/Orchestration/index.js.map +1 -1
- package/cjs/resources/PaymentIntentAmountDetailsLineItems.d.ts +4 -0
- package/cjs/resources/PaymentIntents.d.ts +764 -4
- package/cjs/resources/PaymentMethods.d.ts +4 -0
- package/cjs/resources/Privacy/index.d.ts +9 -1
- package/cjs/resources/Privacy/index.js.map +1 -1
- package/cjs/resources/ProductCatalog/index.d.ts +2 -1
- package/cjs/resources/ProductCatalog/index.js.map +1 -1
- package/cjs/resources/QuotePreviewInvoices.d.ts +7 -1
- package/cjs/resources/Radar/CustomerEvaluations.d.ts +16 -9
- package/cjs/resources/Radar/PaymentEvaluations.d.ts +62 -0
- package/cjs/resources/Radar/index.d.ts +25 -7
- package/cjs/resources/Radar/index.js.map +1 -1
- package/cjs/resources/Reporting/index.d.ts +7 -2
- package/cjs/resources/Reporting/index.js.map +1 -1
- package/cjs/resources/Reserve/index.d.ts +8 -3
- package/cjs/resources/Reserve/index.js.map +1 -1
- package/cjs/resources/SharedPayment/GrantedTokens.d.ts +4 -1
- package/cjs/resources/SharedPayment/index.d.ts +2 -1
- package/cjs/resources/SharedPayment/index.js.map +1 -1
- package/cjs/resources/Sigma/index.d.ts +3 -1
- package/cjs/resources/Sigma/index.js.map +1 -1
- package/cjs/resources/Subscriptions.d.ts +66 -3
- package/cjs/resources/Tax/index.d.ts +27 -7
- package/cjs/resources/Tax/index.js.map +1 -1
- package/cjs/resources/Terminal/index.d.ts +32 -6
- package/cjs/resources/Terminal/index.js.map +1 -1
- package/cjs/resources/TestHelpers/Capital/index.js.map +1 -1
- package/cjs/resources/TestHelpers/Issuing/index.js.map +1 -1
- package/cjs/resources/TestHelpers/SharedPayment/index.js.map +1 -1
- package/cjs/resources/TestHelpers/Terminal/index.js.map +1 -1
- package/cjs/resources/TestHelpers/Treasury/index.js.map +1 -1
- package/cjs/resources/TestHelpers/index.d.ts +6 -1
- package/cjs/resources/TestHelpers/index.js.map +1 -1
- package/cjs/resources/Treasury/index.d.ts +43 -10
- package/cjs/resources/Treasury/index.js.map +1 -1
- package/cjs/resources/V2/Billing/index.d.ts +86 -18
- package/cjs/resources/V2/Billing/index.js.map +1 -1
- package/cjs/resources/V2/Core/AccountPersons.d.ts +1 -1
- package/cjs/resources/V2/Core/AccountTokens.d.ts +2 -2
- package/cjs/resources/V2/Core/Accounts/PersonTokens.d.ts +1 -1
- package/cjs/resources/V2/Core/Accounts/Persons.d.ts +2 -2
- package/cjs/resources/V2/Core/Accounts.d.ts +6 -6
- package/cjs/resources/V2/Core/Vault/index.d.ts +15 -2
- package/cjs/resources/V2/Core/Vault/index.js.map +1 -1
- package/cjs/resources/V2/Core/index.d.ts +35 -9
- package/cjs/resources/V2/Core/index.js.map +1 -1
- package/cjs/resources/V2/Data/Reporting/index.d.ts +3 -1
- package/cjs/resources/V2/Data/Reporting/index.js.map +1 -1
- package/cjs/resources/V2/Iam/index.d.ts +7 -1
- package/cjs/resources/V2/Iam/index.js.map +1 -1
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.d.ts +1 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +1 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.js.map +1 -1
- package/cjs/resources/V2/MoneyManagement/index.d.ts +63 -16
- package/cjs/resources/V2/MoneyManagement/index.js.map +1 -1
- package/cjs/resources/V2/Payments/index.d.ts +15 -2
- package/cjs/resources/V2/Payments/index.js.map +1 -1
- package/cjs/resources/V2/Reporting/index.d.ts +5 -2
- package/cjs/resources/V2/Reporting/index.js.map +1 -1
- package/cjs/resources/V2/Tax/index.d.ts +6 -1
- package/cjs/resources/V2/Tax/index.js.map +1 -1
- package/cjs/resources/V2/TestHelpers/index.js.map +1 -1
- package/cjs/stripe.cjs.node.d.ts +4 -1
- package/cjs/stripe.cjs.node.js +3 -1
- package/cjs/stripe.cjs.node.js.map +1 -1
- package/cjs/stripe.cjs.worker.d.ts +4 -1
- package/cjs/stripe.cjs.worker.js +3 -1
- package/cjs/stripe.cjs.worker.js.map +1 -1
- package/cjs/stripe.core.d.ts +5 -4
- package/cjs/stripe.core.js +1 -1
- package/cjs/stripe.core.js.map +1 -1
- package/esm/Error.d.ts +4 -0
- package/esm/Error.js +9 -0
- package/esm/Error.js.map +1 -1
- package/esm/Types.d.ts +2 -2
- package/esm/Webhooks.d.ts +11 -1
- package/esm/Webhooks.js +7 -7
- package/esm/Webhooks.js.map +1 -1
- package/esm/apiVersion.d.ts +1 -1
- package/esm/apiVersion.js +1 -1
- package/esm/lib.d.ts +7 -1
- package/esm/net/FetchHttpClient.js +4 -1
- package/esm/net/FetchHttpClient.js.map +1 -1
- package/esm/resources/ApplicationFees.d.ts +4 -0
- package/esm/resources/Apps/index.d.ts +5 -1
- package/esm/resources/Apps/index.js.map +1 -1
- package/esm/resources/Billing/Analytics/index.d.ts +2 -1
- package/esm/resources/Billing/Analytics/index.js +1 -1
- package/esm/resources/Billing/Analytics/index.js.map +1 -1
- package/esm/resources/Billing/index.d.ts +31 -7
- package/esm/resources/Billing/index.js +2 -2
- package/esm/resources/Billing/index.js.map +1 -1
- package/esm/resources/BillingPortal/index.d.ts +7 -2
- package/esm/resources/BillingPortal/index.js +2 -2
- package/esm/resources/BillingPortal/index.js.map +1 -1
- package/esm/resources/Capital/index.d.ts +9 -3
- package/esm/resources/Capital/index.js +1 -1
- package/esm/resources/Capital/index.js.map +1 -1
- package/esm/resources/Charges.d.ts +190 -2
- package/esm/resources/Checkout/index.d.ts +8 -1
- package/esm/resources/Checkout/index.js +1 -1
- package/esm/resources/Checkout/index.js.map +1 -1
- package/esm/resources/Climate/index.d.ts +12 -3
- package/esm/resources/Climate/index.js +2 -2
- package/esm/resources/Climate/index.js.map +1 -1
- package/esm/resources/DelegatedCheckout/index.d.ts +6 -1
- package/esm/resources/DelegatedCheckout/index.js.map +1 -1
- package/esm/resources/Entitlements/index.d.ts +8 -2
- package/esm/resources/Entitlements/index.js +1 -1
- package/esm/resources/Entitlements/index.js.map +1 -1
- package/esm/resources/FinancialConnections/index.d.ts +20 -5
- package/esm/resources/FinancialConnections/index.js +5 -5
- package/esm/resources/FinancialConnections/index.js.map +1 -1
- package/esm/resources/Forwarding/index.d.ts +4 -1
- package/esm/resources/Forwarding/index.js +1 -1
- package/esm/resources/Forwarding/index.js.map +1 -1
- package/esm/resources/Identity/index.d.ts +15 -3
- package/esm/resources/Identity/index.js +1 -1
- package/esm/resources/Identity/index.js.map +1 -1
- package/esm/resources/Invoices.d.ts +21 -3
- package/esm/resources/Issuing/index.d.ts +56 -12
- package/esm/resources/Issuing/index.js +6 -6
- package/esm/resources/Issuing/index.js.map +1 -1
- package/esm/resources/Orchestration/index.d.ts +2 -1
- package/esm/resources/Orchestration/index.js +1 -1
- package/esm/resources/Orchestration/index.js.map +1 -1
- package/esm/resources/PaymentIntentAmountDetailsLineItems.d.ts +4 -0
- package/esm/resources/PaymentIntents.d.ts +764 -4
- package/esm/resources/PaymentMethods.d.ts +4 -0
- package/esm/resources/Privacy/index.d.ts +9 -1
- package/esm/resources/Privacy/index.js +1 -1
- package/esm/resources/Privacy/index.js.map +1 -1
- package/esm/resources/ProductCatalog/index.d.ts +2 -1
- package/esm/resources/ProductCatalog/index.js +1 -1
- package/esm/resources/ProductCatalog/index.js.map +1 -1
- package/esm/resources/QuotePreviewInvoices.d.ts +7 -1
- package/esm/resources/Radar/CustomerEvaluations.d.ts +16 -9
- package/esm/resources/Radar/PaymentEvaluations.d.ts +62 -0
- package/esm/resources/Radar/index.d.ts +25 -7
- package/esm/resources/Radar/index.js +2 -2
- package/esm/resources/Radar/index.js.map +1 -1
- package/esm/resources/Reporting/index.d.ts +7 -2
- package/esm/resources/Reporting/index.js +2 -2
- package/esm/resources/Reporting/index.js.map +1 -1
- package/esm/resources/Reserve/index.d.ts +8 -3
- package/esm/resources/Reserve/index.js +1 -1
- package/esm/resources/Reserve/index.js.map +1 -1
- package/esm/resources/SharedPayment/GrantedTokens.d.ts +4 -1
- package/esm/resources/SharedPayment/index.d.ts +2 -1
- package/esm/resources/SharedPayment/index.js +1 -1
- package/esm/resources/SharedPayment/index.js.map +1 -1
- package/esm/resources/Sigma/index.d.ts +3 -1
- package/esm/resources/Sigma/index.js.map +1 -1
- package/esm/resources/Subscriptions.d.ts +66 -3
- package/esm/resources/Tax/index.d.ts +27 -7
- package/esm/resources/Tax/index.js +4 -4
- package/esm/resources/Tax/index.js.map +1 -1
- package/esm/resources/Terminal/index.d.ts +32 -6
- package/esm/resources/Terminal/index.js +5 -5
- package/esm/resources/Terminal/index.js.map +1 -1
- package/esm/resources/TestHelpers/Capital/index.js +1 -1
- package/esm/resources/TestHelpers/Capital/index.js.map +1 -1
- package/esm/resources/TestHelpers/Issuing/index.js +3 -3
- package/esm/resources/TestHelpers/Issuing/index.js.map +1 -1
- package/esm/resources/TestHelpers/SharedPayment/index.js +1 -1
- package/esm/resources/TestHelpers/SharedPayment/index.js.map +1 -1
- package/esm/resources/TestHelpers/Terminal/index.js +1 -1
- package/esm/resources/TestHelpers/Terminal/index.js.map +1 -1
- package/esm/resources/TestHelpers/Treasury/index.js +5 -5
- package/esm/resources/TestHelpers/Treasury/index.js.map +1 -1
- package/esm/resources/TestHelpers/index.d.ts +6 -1
- package/esm/resources/TestHelpers/index.js +5 -5
- package/esm/resources/TestHelpers/index.js.map +1 -1
- package/esm/resources/Treasury/index.d.ts +43 -10
- package/esm/resources/Treasury/index.js +7 -7
- package/esm/resources/Treasury/index.js.map +1 -1
- package/esm/resources/V2/Billing/index.d.ts +86 -18
- package/esm/resources/V2/Billing/index.js +9 -9
- package/esm/resources/V2/Billing/index.js.map +1 -1
- package/esm/resources/V2/Core/AccountPersons.d.ts +1 -1
- package/esm/resources/V2/Core/AccountTokens.d.ts +2 -2
- package/esm/resources/V2/Core/Accounts/PersonTokens.d.ts +1 -1
- package/esm/resources/V2/Core/Accounts/Persons.d.ts +2 -2
- package/esm/resources/V2/Core/Accounts.d.ts +6 -6
- package/esm/resources/V2/Core/Vault/index.d.ts +15 -2
- package/esm/resources/V2/Core/Vault/index.js +2 -2
- package/esm/resources/V2/Core/Vault/index.js.map +1 -1
- package/esm/resources/V2/Core/index.d.ts +35 -9
- package/esm/resources/V2/Core/index.js +2 -2
- package/esm/resources/V2/Core/index.js.map +1 -1
- package/esm/resources/V2/Data/Reporting/index.d.ts +3 -1
- package/esm/resources/V2/Data/Reporting/index.js.map +1 -1
- package/esm/resources/V2/Iam/index.d.ts +7 -1
- package/esm/resources/V2/Iam/index.js.map +1 -1
- package/esm/resources/V2/MoneyManagement/PayoutMethods.d.ts +1 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethods.js +1 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethods.js.map +1 -1
- package/esm/resources/V2/MoneyManagement/index.d.ts +63 -16
- package/esm/resources/V2/MoneyManagement/index.js +7 -7
- package/esm/resources/V2/MoneyManagement/index.js.map +1 -1
- package/esm/resources/V2/Payments/index.d.ts +15 -2
- package/esm/resources/V2/Payments/index.js.map +1 -1
- package/esm/resources/V2/Reporting/index.d.ts +5 -2
- package/esm/resources/V2/Reporting/index.js +1 -1
- package/esm/resources/V2/Reporting/index.js.map +1 -1
- package/esm/resources/V2/Tax/index.d.ts +6 -1
- package/esm/resources/V2/Tax/index.js +1 -1
- package/esm/resources/V2/Tax/index.js.map +1 -1
- package/esm/resources/V2/TestHelpers/index.js +2 -2
- package/esm/resources/V2/TestHelpers/index.js.map +1 -1
- package/esm/stripe.core.d.ts +5 -4
- package/esm/stripe.core.js +1 -1
- package/esm/stripe.core.js.map +1 -1
- package/esm/stripe.esm.node.d.ts +5 -4
- package/esm/stripe.esm.node.js +1 -1
- package/esm/stripe.esm.node.js.map +1 -1
- package/esm/stripe.esm.worker.d.ts +1 -0
- package/esm/stripe.esm.worker.js +1 -0
- package/esm/stripe.esm.worker.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 22.1.0-alpha.2 - 2026-04-08
|
|
4
|
+
* [#2657](https://github.com/stripe/stripe-node/pull/2657) Update generated code for private-preview
|
|
5
|
+
* Add support for `payment_record` on `ApplicationFee.fee_source`
|
|
6
|
+
* Add support for `beneficiary_account`, `beneficiary_details`, `sender_account`, and `sender_details` on `ChargeCaptureParams.payment_details.money_services.account_funding`, `ChargeUpdateParams.payment_details.money_services.account_funding`, `PaymentIntentCaptureParams.payment_details.money_services.account_funding`, `PaymentIntentConfirmParams.payment_details.money_services.account_funding`, `PaymentIntentCreateParams.payment_details.money_services.account_funding`, and `PaymentIntentUpdateParams.payment_details.money_services.account_funding`
|
|
7
|
+
* Change type of `ChargeCaptureParams.payment_details.money_services.transaction_type`, `ChargeUpdateParams.payment_details.money_services.transaction_type`, `PaymentIntentCaptureParams.payment_details.money_services.transaction_type`, `PaymentIntentConfirmParams.payment_details.money_services.transaction_type`, `PaymentIntentCreateParams.payment_details.money_services.transaction_type`, and `PaymentIntentUpdateParams.payment_details.money_services.transaction_type` from `literal('account_funding')` to `emptyable(literal('account_funding'))`
|
|
8
|
+
* Add support for `bizum` on `Invoice.payment_settings.payment_method_options`, `InvoiceCreateParams.payment_settings.payment_method_options`, `InvoiceUpdateParams.payment_settings.payment_method_options`, `QuotePreviewInvoice.payment_settings.payment_method_options`, `Subscription.payment_settings.payment_method_options`, `SubscriptionCreateParams.payment_settings.payment_method_options`, and `SubscriptionUpdateParams.payment_settings.payment_method_options`
|
|
9
|
+
* ⚠️ Add support for new value `bizum` on enums `Invoice.payment_settings.payment_method_types`, `InvoiceCreateParams.payment_settings.payment_method_types`, `InvoiceUpdateParams.payment_settings.payment_method_types`, `QuotePreviewInvoice.payment_settings.payment_method_types`, `Subscription.payment_settings.payment_method_types`, `SubscriptionCreateParams.payment_settings.payment_method_types`, and `SubscriptionUpdateParams.payment_settings.payment_method_types`
|
|
10
|
+
* Add support for `quantity_precision` on `PaymentIntentAmountDetailsLineItem`, `PaymentIntentCaptureParams.amount_details.line_items[]`, `PaymentIntentConfirmParams.amount_details.line_items[]`, `PaymentIntentCreateParams.amount_details.line_items[]`, `PaymentIntentDecrementAuthorizationParams.amount_details.line_items[]`, `PaymentIntentIncrementAuthorizationParams.amount_details.line_items[]`, and `PaymentIntentUpdateParams.amount_details.line_items[]`
|
|
11
|
+
* Add support for `liquid_asset` and `wallet` on `PaymentIntentConfirmParams.payment_method_options.card.payment_details.money_services.account_funding`, `PaymentIntentConfirmParams.payment_method_options.card_present.payment_details.money_services.account_funding`, `PaymentIntentCreateParams.payment_method_options.card.payment_details.money_services.account_funding`, `PaymentIntentCreateParams.payment_method_options.card_present.payment_details.money_services.account_funding`, `PaymentIntentUpdateParams.payment_method_options.card.payment_details.money_services.account_funding`, and `PaymentIntentUpdateParams.payment_method_options.card_present.payment_details.money_services.account_funding`
|
|
12
|
+
* Add support for `shared_payment_granted_token` on `PaymentMethod`
|
|
13
|
+
* ⚠️ Change type of `Radar.CustomerEvaluation.event_type` from `string` to `enum('login'|'registration')`
|
|
14
|
+
* ⚠️ Change type of `Radar.CustomerEvaluation.signals.account_sharing.risk_level` and `Radar.CustomerEvaluation.signals.multi_accounting.risk_level` from `string` to `enum`
|
|
15
|
+
* Add support for `data` on `Radar.PaymentEvaluation.client_device_metadata_details` and `Radar.PaymentEvaluationCreateParams.client_device_metadata_details`
|
|
16
|
+
* Add support for `sunbit` on `SharedPayment.GrantedToken.payment_method_details`
|
|
17
|
+
* ⚠️ Add support for new value `sunbit` on enum `SharedPayment.GrantedToken.payment_method_details.type`
|
|
18
|
+
* ⚠️ Remove support for values `bm_crn`, `bo_tin`, `bt_tpn`, `co_nit`, `ec_ruc`, `eg_tin`, `gh_tin`, `gy_tin`, `hn_rtn`, `jm_trn`, `jo_crn`, `ke_pin`, `ky_crn`, `lk_tin`, `mo_tin`, `mv_tin`, `ng_tin`, `pa_ruc`, `ph_tin`, `py_ruc`, `sl_tin`, `sv_nit`, `uy_ruc`, `vg_cn`, and `za_tin` from enums `V2.Core.Account.identity.business_details.id_numbers[].type`, `V2.Core.AccountCreateParams.identity.business_details.id_numbers[].type`, `V2.Core.AccountTokenCreateParams.identity.business_details.id_numbers[].type`, and `V2.Core.AccountUpdateParams.identity.business_details.id_numbers[].type`
|
|
19
|
+
* ⚠️ Remove support for values `bm_pp`, `bo_ci`, `bt_cid`, `eg_tin`, `gh_pin`, `gy_tin`, `hn_rtn`, `jm_trn`, `jo_pin`, `ky_pp`, `lk_nic`, `mo_bir`, `mt_nic`, `mv_tin`, `pa_ruc`, `ph_tin`, `py_ruc`, `si_pin`, `sv_nit`, and `vg_pp` from enums `V2.Core.Account.identity.individual.id_numbers[].type`, `V2.Core.AccountCreateParams.identity.individual.id_numbers[].type`, `V2.Core.AccountPerson.id_numbers[].type`, `V2.Core.AccountPersonCreateParams.id_numbers[].type`, `V2.Core.AccountPersonTokenCreateParams.id_numbers[].type`, `V2.Core.AccountPersonUpdateParams.id_numbers[].type`, `V2.Core.AccountTokenCreateParams.identity.individual.id_numbers[].type`, and `V2.Core.AccountUpdateParams.identity.individual.id_numbers[].type`
|
|
20
|
+
* Add support for error type `CannotProceedError`
|
|
21
|
+
|
|
3
22
|
## 22.1.0-alpha.1 - 2026-04-02
|
|
4
23
|
This release changes the pinned API version to 2026-04-01.preview and contains additional breaking changes. See the [GA changelog](https://github.com/stripe/stripe-node/blob/master/CHANGELOG.md#2200---2026-04-02) for more information.
|
|
5
24
|
|
|
@@ -56,6 +75,90 @@ This release changes the pinned API version to 2026-04-01.preview and contains a
|
|
|
56
75
|
* [#2641](https://github.com/stripe/stripe-node/pull/2641) Merge to private-preview
|
|
57
76
|
* [#2636](https://github.com/stripe/stripe-node/pull/2636) Prathmesh/merge node private preview
|
|
58
77
|
|
|
78
|
+
## 22.0.1 - 2026-04-08
|
|
79
|
+
* [#2669](https://github.com/stripe/stripe-node/pull/2669) Add constructor based initialization for CJS based TypeScript imports
|
|
80
|
+
* Initialization of Stripe class with `new` keyword is now possible for CJS based TypeScript project. Resolves: [2660](https://github.com/stripe/stripe-node/issues/2660)
|
|
81
|
+
```ts
|
|
82
|
+
import Stripe = require('stripe');
|
|
83
|
+
// ✅ Both statements work
|
|
84
|
+
const stripeNew: Stripe.Stripe = new Stripe('sk_test_...');
|
|
85
|
+
const stripeCalled: Stripe.Stripe = Stripe('sk_test_...');
|
|
86
|
+
```
|
|
87
|
+
* [#2664](https://github.com/stripe/stripe-node/pull/2664) Fixed nested service param exports in the Stripe namespace
|
|
88
|
+
* Resolves: [2658](https://github.com/stripe/stripe-node/issues/2658), [2662](https://github.com/stripe/stripe-node/issues/2662)
|
|
89
|
+
* [#2667](https://github.com/stripe/stripe-node/pull/2667) Add type safety to Stripe constructor config (no runtime change)
|
|
90
|
+
- Fixed some compile-time checks (no runtime changes)
|
|
91
|
+
- Fixed `Stripe` constructor config parameter to use `StripeConfig` type instead of `Record<string, unknown>`, restoring compile-time type safety.
|
|
92
|
+
- Added missing `authenticator` property to `StripeConfig`.
|
|
93
|
+
- Fixed `Stripe.API_VERSION` to retain the literal API version type.
|
|
94
|
+
- Fixed `StripeConfig.stripeContext` to accept `StripeContext` objects in addition to strings.
|
|
95
|
+
* [#2663](https://github.com/stripe/stripe-node/pull/2663) Throw a more descriptive error when calling `rawRequest` with absolute urls
|
|
96
|
+
* [#2652](https://github.com/stripe/stripe-node/pull/2652) Added `string[]` to `WebhookHeader` type for compatibility with express
|
|
97
|
+
* Added `string[]` to the type of `signature` param in `stripe.webhooks.construct_event` method.
|
|
98
|
+
|
|
99
|
+
## 22.0.0 - 2026-04-02
|
|
100
|
+
This release uses the same pinned API version to `2026-03-25.dahlia` as the last major release. The breaking changes in this release are prefixed with ⚠️ below. There's also a [detailed migration guide](https://github.com/stripe/stripe-node/wiki/Migration-guide-for-v22) to simplify your upgrade process.
|
|
101
|
+
|
|
102
|
+
* [#2619](https://github.com/stripe/stripe-node/pull/2619) Improved TypeScript support in the Node SDK
|
|
103
|
+
* Moved the types from the partially manually maintained and partially generated types folder to be inline with the implementation in TypeScript files.
|
|
104
|
+
* Removed top-level “stripe” ambient module. This allows import aliasing for the stripe package.
|
|
105
|
+
* ⚠️ `Stripe.StripeContext` is no longer exported as a type. Use `Stripe.StripeContextType` instead.
|
|
106
|
+
* ⚠️ `Stripe.errors.StripeError` is no longer a type. Use `typeof Stripe.errors.StripeError` or `Stripe.ErrorType` instead.
|
|
107
|
+
* ⚠️ CJS entry point no longer exports .default or .Stripe as separate properties.
|
|
108
|
+
* ⚠️ Stripe import is now a true ES6 class. Use `new Stripe()` to create a StripeClient instead of calling it:
|
|
109
|
+
```javascript
|
|
110
|
+
// Before
|
|
111
|
+
const stripeClient = Stripe("sk_test_...");
|
|
112
|
+
|
|
113
|
+
// After
|
|
114
|
+
const stripeClient = new Stripe("sk_test_...");
|
|
115
|
+
```
|
|
116
|
+
* [#2645](https://github.com/stripe/stripe-node/pull/2645) ⚠️ Remove `stripeMethod` and standardize how function args are handled (including removing callback support)
|
|
117
|
+
|
|
118
|
+
- ⚠️ Refactor how incoming method arguments are parsed. Type signatures for API methods should be _much_ more accurate and reliable now
|
|
119
|
+
- ⚠️ Remove support for providing callbacks to API methods. Use `async / await` instead
|
|
120
|
+
- ⚠️ Remove support for passing a plain API key as a function arg. If supplied on a per-request basis, it should be in the `RequestOptions` under the `apiKey` property
|
|
121
|
+
- ⚠️ Keys from `params` and `options` objects are no longer mixed. If present on a method, `RequestParams` must always come first and `RequestOptions` must always come second. To supply options without params, pass `undefined` as the first argument explicitly
|
|
122
|
+
- ⚠️ Removed methods from `StripeResource`: `createFullPath`, `createResourcePathWithSymbols`, `extend`, `method` and `_joinUrlParts`. These were mostly intended for internal use and we no longer need them
|
|
123
|
+
|
|
124
|
+
As a result, the following call patterns are no longer supported:
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
stripe.customers.retrieve('cus_123', 'sk_test_123')
|
|
128
|
+
stripe.customers.create({name: 'david', host: 'example.com'}, 'sk_test_123')
|
|
129
|
+
stripe.customers.create({apiKey: 'sk_test_123'})
|
|
130
|
+
stripe.customers.list(customers => {
|
|
131
|
+
// do something with customers
|
|
132
|
+
})
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
If those look familiar, head over to the [migration guide](https://github.com/stripe/stripe-node/wiki/Migration-guide-for-v22) to update your code.
|
|
136
|
+
* [#2643](https://github.com/stripe/stripe-node/pull/2643) ⚠️ Removed per-request host override. To use a custom host, set it in the client configuration. All requests from that client will use that host.
|
|
137
|
+
|
|
138
|
+
Before:
|
|
139
|
+
```ts
|
|
140
|
+
import Stripe from 'stripe';
|
|
141
|
+
const stripe = new Stripe('sk_test_...');
|
|
142
|
+
|
|
143
|
+
const customer = await stripe.customers.create({
|
|
144
|
+
email: 'customer@example.com',
|
|
145
|
+
}, {host: 'example.com'});
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
After:
|
|
149
|
+
```ts
|
|
150
|
+
import Stripe from 'stripe';
|
|
151
|
+
const stripe = new Stripe('sk_test_...', {host: 'example.com'});
|
|
152
|
+
|
|
153
|
+
// goes to example.com
|
|
154
|
+
const customer = await stripe.customers.create({
|
|
155
|
+
email: 'customer@example.com',
|
|
156
|
+
});
|
|
157
|
+
```
|
|
158
|
+
* [#2619](https://github.com/stripe/stripe-node/pull/2619) Improved TypeScript support in the Node SDK
|
|
159
|
+
* [#2638](https://github.com/stripe/stripe-node/pull/2638) Converted V2/Amount.ts to V2/V2Amount.ts
|
|
160
|
+
* [#2635](https://github.com/stripe/stripe-node/pull/2635) Updated stripe.spec.ts test and constructEvent.tolerance type
|
|
161
|
+
|
|
59
162
|
## 21.1.0-alpha.2 - 2026-03-26
|
|
60
163
|
* [#2628](https://github.com/stripe/stripe-node/pull/2628) Fix export for Stripe.Decimal in CJS and ESM. Resolves [#2625](https://github.com/stripe/stripe-node/issues/2625)
|
|
61
164
|
|
package/OPENAPI_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
v2229
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
22.1.0-alpha.
|
|
1
|
+
22.1.0-alpha.2
|
package/cjs/Error.d.ts
CHANGED
|
@@ -164,6 +164,10 @@ export declare class AlreadyExistsError extends StripeError {
|
|
|
164
164
|
export declare class BlockedByStripeError extends StripeError {
|
|
165
165
|
constructor(rawStripeError?: StripeRawError);
|
|
166
166
|
}
|
|
167
|
+
export declare class CannotProceedError extends StripeError {
|
|
168
|
+
reason: string;
|
|
169
|
+
constructor(rawStripeError: StripeRawError);
|
|
170
|
+
}
|
|
167
171
|
export declare class ControlledByAlternateResourceError extends StripeError {
|
|
168
172
|
constructor(rawStripeError?: StripeRawError);
|
|
169
173
|
}
|
package/cjs/Error.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable camelcase */
|
|
3
3
|
/* eslint-disable no-warning-comments */
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.TemporarySessionExpiredError = exports.RecipientNotNotifiableError = exports.RateLimitError = exports.QuotaExceededError = exports.NotCancelableError = exports.NonZeroBalanceError = exports.InvalidPayoutMethodError = exports.InvalidPaymentMethodError = exports.InsufficientFundsError = exports.FinancialAccountNotOpenError = exports.FeatureNotEnabledError = exports.ControlledByDashboardError = exports.ControlledByAlternateResourceError = exports.BlockedByStripeError = exports.AlreadyExistsError = exports.AlreadyCanceledError = exports.StripeUnsupportedResponseTypeError = exports.StripeUnsupportedGrantTypeError = exports.StripeInvalidScopeError = exports.StripeOAuthInvalidRequestError = exports.StripeInvalidClientError = exports.StripeInvalidGrantError = exports.StripeOAuthError = exports.StripeIdempotencyError = exports.StripeSignatureVerificationError = exports.StripeConnectionError = exports.StripeRateLimitError = exports.StripePermissionError = exports.StripeAuthenticationError = exports.StripeAPIError = exports.StripeInvalidRequestError = exports.StripeCardError = exports.StripeError = exports.generateV2Error = exports.generateOAuthError = exports.generateV1Error = void 0;
|
|
5
|
+
exports.TemporarySessionExpiredError = exports.RecipientNotNotifiableError = exports.RateLimitError = exports.QuotaExceededError = exports.NotCancelableError = exports.NonZeroBalanceError = exports.InvalidPayoutMethodError = exports.InvalidPaymentMethodError = exports.InsufficientFundsError = exports.FinancialAccountNotOpenError = exports.FeatureNotEnabledError = exports.ControlledByDashboardError = exports.ControlledByAlternateResourceError = exports.CannotProceedError = exports.BlockedByStripeError = exports.AlreadyExistsError = exports.AlreadyCanceledError = exports.StripeUnsupportedResponseTypeError = exports.StripeUnsupportedGrantTypeError = exports.StripeInvalidScopeError = exports.StripeOAuthInvalidRequestError = exports.StripeInvalidClientError = exports.StripeInvalidGrantError = exports.StripeOAuthError = exports.StripeIdempotencyError = exports.StripeSignatureVerificationError = exports.StripeConnectionError = exports.StripeRateLimitError = exports.StripePermissionError = exports.StripeAuthenticationError = exports.StripeAPIError = exports.StripeInvalidRequestError = exports.StripeCardError = exports.StripeError = exports.generateV2Error = exports.generateOAuthError = exports.generateV1Error = void 0;
|
|
6
6
|
const generateV1Error = (rawStripeError) => {
|
|
7
7
|
const statusCode = rawStripeError.statusCode;
|
|
8
8
|
if (statusCode === 429 ||
|
|
@@ -58,6 +58,8 @@ const generateV2Error = (rawStripeError) => {
|
|
|
58
58
|
return new AlreadyExistsError(rawStripeError);
|
|
59
59
|
case 'blocked_by_stripe':
|
|
60
60
|
return new BlockedByStripeError(rawStripeError);
|
|
61
|
+
case 'cannot_proceed':
|
|
62
|
+
return new CannotProceedError(rawStripeError);
|
|
61
63
|
case 'controlled_by_alternate_resource':
|
|
62
64
|
return new ControlledByAlternateResourceError(rawStripeError);
|
|
63
65
|
case 'controlled_by_dashboard':
|
|
@@ -316,6 +318,14 @@ class BlockedByStripeError extends StripeError {
|
|
|
316
318
|
}
|
|
317
319
|
}
|
|
318
320
|
exports.BlockedByStripeError = BlockedByStripeError;
|
|
321
|
+
class CannotProceedError extends StripeError {
|
|
322
|
+
constructor(rawStripeError) {
|
|
323
|
+
super(rawStripeError, 'CannotProceedError');
|
|
324
|
+
// @ts-ignore
|
|
325
|
+
this.reason = this.raw.reason;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
exports.CannotProceedError = CannotProceedError;
|
|
319
329
|
class ControlledByAlternateResourceError extends StripeError {
|
|
320
330
|
constructor(rawStripeError = {}) {
|
|
321
331
|
super(rawStripeError, 'ControlledByAlternateResourceError');
|
package/cjs/Error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Error.js","sourceRoot":"","sources":["../src/Error.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,wCAAwC;;;AAKjC,MAAM,eAAe,GAAG,CAC7B,cAA8B,EACjB,EAAE;IACf,MAAM,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC;IAE7C,IACE,UAAU,KAAK,GAAG;QAClB,CAAC,UAAU,KAAK,GAAG,IAAI,cAAc,CAAC,IAAI,KAAK,YAAY,CAAC,EAC5D;QACA,OAAO,IAAI,oBAAoB,CAAC,cAAc,CAAC,CAAC;KACjD;IAED,IAAI,UAAU,KAAK,GAAG,IAAI,UAAU,KAAK,GAAG,EAAE;QAC5C,IAAI,cAAc,CAAC,IAAI,KAAK,mBAAmB,EAAE;YAC/C,OAAO,IAAI,sBAAsB,CAAC,cAAc,CAAC,CAAC;SACnD;QACD,OAAO,IAAI,yBAAyB,CAAC,cAAc,CAAC,CAAC;KACtD;IAED,IAAI,UAAU,KAAK,GAAG,EAAE;QACtB,OAAO,IAAI,yBAAyB,CAAC,cAAc,CAAC,CAAC;KACtD;IAED,IAAI,UAAU,KAAK,GAAG,EAAE;QACtB,OAAO,IAAI,eAAe,CAAC,cAAc,CAAC,CAAC;KAC5C;IA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RequestData | StreamingFile | BufferedFile;
|
|
51
|
-
export type RawErrorType = 'card_error' | 'invalid_request_error' | 'api_error' | 'idempotency_error' | 'rate_limit_error' | 'authentication_error' | 'invalid_grant' | 'invalid_client' | 'invalid_request' | 'invalid_scope' | 'unsupported_grant_type' | 'unsupported_response_type' | 'already_canceled' | 'already_exists' | 'blocked_by_stripe' | 'controlled_by_alternate_resource' | 'controlled_by_dashboard' | 'feature_not_enabled' | 'financial_account_not_open' | 'insufficient_funds' | 'invalid_payment_method' | 'invalid_payout_method' | 'non_zero_balance' | 'not_cancelable' | 'quota_exceeded' | 'rate_limit' | 'recipient_not_notifiable' | 'temporary_session_expired';
|
|
51
|
+
export type RawErrorType = 'card_error' | 'invalid_request_error' | 'api_error' | 'idempotency_error' | 'rate_limit_error' | 'authentication_error' | 'invalid_grant' | 'invalid_client' | 'invalid_request' | 'invalid_scope' | 'unsupported_grant_type' | 'unsupported_response_type' | 'already_canceled' | 'already_exists' | 'blocked_by_stripe' | 'cannot_proceed' | 'controlled_by_alternate_resource' | 'controlled_by_dashboard' | 'feature_not_enabled' | 'financial_account_not_open' | 'insufficient_funds' | 'invalid_payment_method' | 'invalid_payout_method' | 'non_zero_balance' | 'not_cancelable' | 'quota_exceeded' | 'rate_limit' | 'recipient_not_notifiable' | 'temporary_session_expired';
|
|
52
52
|
export type RequestArgs = Array<any>;
|
|
53
53
|
export type StripeRequest = {
|
|
54
54
|
host: string;
|
|
@@ -179,7 +179,7 @@ export type UserProvidedConfig = {
|
|
|
179
179
|
host?: string;
|
|
180
180
|
httpAgent?: any;
|
|
181
181
|
timeout?: number;
|
|
182
|
-
port?: number;
|
|
182
|
+
port?: string | number;
|
|
183
183
|
maxNetworkRetries?: number;
|
|
184
184
|
httpClient?: HttpClientInterface;
|
|
185
185
|
stripeAccount?: string;
|
package/cjs/Webhooks.d.ts
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { CryptoProvider } from './crypto/CryptoProvider.js';
|
|
2
2
|
import { PlatformFunctions } from './platform/PlatformFunctions.js';
|
|
3
3
|
import { Event } from './resources/Events.js';
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Value of the `stripe-signature` header from Stripe.
|
|
6
|
+
* Typically a string.
|
|
7
|
+
*
|
|
8
|
+
* Note that this is typed to accept an array of strings
|
|
9
|
+
* so that it works seamlessly with express's types,
|
|
10
|
+
* but will throw if an array is passed in practice
|
|
11
|
+
* since express should never return this header as an array,
|
|
12
|
+
* only a string.
|
|
13
|
+
*/
|
|
14
|
+
type WebhookHeader = string | string[] | Uint8Array;
|
|
5
15
|
type WebhookTestHeaderOptions = {
|
|
6
16
|
timestamp: number;
|
|
7
17
|
payload: string;
|
package/cjs/Webhooks.js
CHANGED
|
@@ -90,6 +90,13 @@ function createWebhooks(platformFunctions) {
|
|
|
90
90
|
return `${details.timestamp}.${payload}`;
|
|
91
91
|
}
|
|
92
92
|
function parseEventDetails(encodedPayload, encodedHeader, expectedScheme) {
|
|
93
|
+
// Express's type for `Request#headers` is `string | []string`
|
|
94
|
+
// which is because the `set-cookie` header is an array,
|
|
95
|
+
// but no other headers are an array (docs: https://nodejs.org/api/http.html#http_message_headers)
|
|
96
|
+
// (Express's Request class is an extension of http.IncomingMessage, and doesn't appear to be relevantly modified: https://github.com/expressjs/express/blob/master/lib/request.js#L31)
|
|
97
|
+
if (Array.isArray(encodedHeader)) {
|
|
98
|
+
throw new Error('Unexpected: An array was passed as a header, which should not be possible for the stripe-signature header.');
|
|
99
|
+
}
|
|
93
100
|
if (!encodedPayload) {
|
|
94
101
|
throw new Error_js_1.StripeSignatureVerificationError(encodedHeader, encodedPayload, {
|
|
95
102
|
message: 'No webhook payload was provided.',
|
|
@@ -101,13 +108,6 @@ function createWebhooks(platformFunctions) {
|
|
|
101
108
|
const decodedPayload = encodedPayload instanceof Uint8Array
|
|
102
109
|
? textDecoder.decode(encodedPayload)
|
|
103
110
|
: encodedPayload;
|
|
104
|
-
// Express's type for `Request#headers` is `string | []string`
|
|
105
|
-
// which is because the `set-cookie` header is an array,
|
|
106
|
-
// but no other headers are an array (docs: https://nodejs.org/api/http.html#http_message_headers)
|
|
107
|
-
// (Express's Request class is an extension of http.IncomingMessage, and doesn't appear to be relevantly modified: https://github.com/expressjs/express/blob/master/lib/request.js#L31)
|
|
108
|
-
if (Array.isArray(encodedHeader)) {
|
|
109
|
-
throw new Error('Unexpected: An array was passed as a header, which should not be possible for the stripe-signature header.');
|
|
110
|
-
}
|
|
111
111
|
if (encodedHeader == null || encodedHeader == '') {
|
|
112
112
|
throw new Error_js_1.StripeSignatureVerificationError(encodedHeader, encodedPayload, {
|
|
113
113
|
message: 'No stripe-signature header value was provided.',
|
package/cjs/Webhooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Webhooks.js","sourceRoot":"","sources":["../src/Webhooks.ts"],"names":[],"mappings":";;;AAAA,yCAAyE;AACzE,kEAGoC;
|
|
1
|
+
{"version":3,"file":"Webhooks.js","sourceRoot":"","sources":["../src/Webhooks.ts"],"names":[],"mappings":";;;AAAA,yCAAyE;AACzE,kEAGoC;AA+EpC,SAAgB,cAAc,CAC5B,iBAAoC;IAEpC,MAAM,OAAO,GAAkB;QAC7B,iBAAiB,EAAE,GAAG;QACtB,SAAS,EAAE,IAAI;QACf,cAAc,CACZ,OAAuB,EACvB,MAAqB,EACrB,MAAc,EACd,SAAkB,EAClB,cAA+B,EAC/B,UAAmB;YAEnB,IAAI;gBACF,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;oBACnB,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;iBACpE;gBAED,cAAc,GAAG,cAAc,IAAI,iBAAiB,EAAE,CAAC;gBAEvD,IAAI,CAAC,SAAS,CAAC,YAAY,CACzB,OAAO,EACP,MAAM,EACN,MAAM,EACN,SAAS,IAAI,OAAO,CAAC,iBAAiB,EACtC,cAAc,EACd,UAAU,CACX,CAAC;aACH;YAAC,OAAO,CAAC,E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AAC,cAAc,IAAI,iBAAiB,EAAE,CAAC;QAClE,MAAM,aAAa,GAAG,GAAG,SAAS,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QAErD,MAAM,oBAAoB,GAAG,CAAC,SAAiB,EAAU,EAAE;YACzD,OAAO,KAAK,SAAS,IAAI,MAAM,IAAI,SAAS,EAAE,CAAC;QACjD,CAAC,CAAC;QAEF,OAAO;YACL,GAAG,IAAI;YACP,SAAS;YACT,MAAM;YACN,cAAc;YACd,aAAa;YACb,oBAAoB;SACrB,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;IAE9B,OAAO,OAAO,CAAC;AACjB,CAAC;AA9aD,wCA8aC"}
|
package/cjs/apiVersion.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ApiVersion = "2026-04-
|
|
1
|
+
export declare const ApiVersion = "2026-04-08.preview";
|
package/cjs/apiVersion.js
CHANGED
package/cjs/lib.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
/// <reference types="node" />
|
|
4
4
|
/// <reference types="node" />
|
|
5
5
|
import { Agent } from 'http';
|
|
6
|
+
import { RequestAuthenticator } from './Types.js';
|
|
6
7
|
import { ApiVersion } from './apiVersion.js';
|
|
7
8
|
import { HttpClient } from './net/HttpClient.js';
|
|
8
9
|
import { StripeContext } from './StripeContext.js';
|
|
@@ -26,6 +27,11 @@ export interface StripeConfig {
|
|
|
26
27
|
* @docs https://stripe.com/docs/api/versioning
|
|
27
28
|
*/
|
|
28
29
|
apiVersion?: LatestApiVersion;
|
|
30
|
+
/**
|
|
31
|
+
* Provide a custom authenticator function for all requests.
|
|
32
|
+
* Cannot be used together with apiKey (the first constructor argument).
|
|
33
|
+
*/
|
|
34
|
+
authenticator?: RequestAuthenticator;
|
|
29
35
|
/**
|
|
30
36
|
* Optionally indicate that you are using TypeScript.
|
|
31
37
|
* This currently has no runtime effect other than adding "TypeScript" to your user-agent.
|
|
@@ -85,7 +91,7 @@ export interface StripeConfig {
|
|
|
85
91
|
/**
|
|
86
92
|
* An account on whose behalf you wish to make every request. See https://docs.stripe.com/context for more information.
|
|
87
93
|
*/
|
|
88
|
-
stripeContext?: string;
|
|
94
|
+
stripeContext?: string | StripeContext;
|
|
89
95
|
}
|
|
90
96
|
export interface RequestOptions {
|
|
91
97
|
/**
|
|
@@ -91,7 +91,10 @@ class FetchHttpClient extends HttpClient_js_1.HttpClient {
|
|
|
91
91
|
}
|
|
92
92
|
async makeRequest(host, port, path, method, headers, requestData, protocol, timeout) {
|
|
93
93
|
const isInsecureConnection = protocol === 'http';
|
|
94
|
-
|
|
94
|
+
if (!path.startsWith('/')) {
|
|
95
|
+
throw new Error(`Only relative paths are supported, got: "${path}"`);
|
|
96
|
+
}
|
|
97
|
+
const url = new URL(`${isInsecureConnection ? 'http' : 'https'}://${host}${path}`);
|
|
95
98
|
url.port = port;
|
|
96
99
|
// For methods which expect payloads, we should always pass a body value
|
|
97
100
|
// even when it is empty. Without this, some JS runtimes (eg. Deno) will
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FetchHttpClient.js","sourceRoot":"","sources":["../../src/net/FetchHttpClient.ts"],"names":[],"mappings":";;;AACA,0CAAiD;AACjD,mDAKyB;AAQzB;;;;;;;GAOG;AACH,MAAa,eAAgB,SAAQ,0BAAU;IAI7C,YAAY,OAAsB;QAChC,KAAK,EAAE,CAAC;QAER,uCAAuC;QACvC,IAAI,CAAC,OAAO,EAAE;YACZ,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE;gBACrB,MAAM,IAAI,KAAK,CACb,wEAAwE;oBACtE,0CAA0C,CAC7C,CAAC;aACH;YACD,OAAO,GAAG,UAAU,CAAC,KAAK,CAAC;SAC5B;QAED,4CAA4C;QAC5C,sEAAsE;QACtE,sFAAsF;QACtF,IAAI,UAAU,CAAC,eAAe,EAAE;YAC9B,8CAA8C;YAC9C,sDAAsD;YACtD,IAAI,CAAC,QAAQ,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AO,CAAC,CAAC;YACZ,IAAI;gBACF,OAAO,MAAM,OAAO,CAAC,GAAG,EAAE;oBACxB,GAAG,IAAI;oBACP,MAAM,EAAE,KAAK,CAAC,MAAM;iBACrB,CAAC,CAAC;aACJ;YAAC,OAAO,GAAG,EAAE;gBACZ,qGAAqG;gBACrG,6CAA6C;gBAC7C,qDAAqD;gBACrD,IAAK,GAAW,CAAC,IAAI,KAAK,YAAY,EAAE;oBACtC,MAAM,0BAAU,CAAC,gBAAgB,EAAE,CAAC;iBACrC;qBAAM;oBACL,MAAM,GAAG,CAAC;iBACX;aACF;oBAAS;gBACR,IAAI,SAAS,EAAE;oBACb,YAAY,CAAC,SAAS,CAAC,CAAC;iBACzB;aACF;QACH,CAAC,CAAC;IACJ,CAAC;IAED,iBAAiB;IACjB,aAAa;QACX,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,WAAW,CACf,IAAY,EACZ,IAAY,EACZ,IAAY,EACZ,MAAc,EACd,OAAuB,EACvB,WAAmB,EACnB,QAAgB,EAChB,OAAe;QAEf,MAAM,oBAAoB,GAAG,QAAQ,KAAK,MAAM,CAAC;QAEjD,MAAM,GAAG,GAAG,IAAI,GAAG,CACjB,
|
|
1
|
+
{"version":3,"file":"FetchHttpClient.js","sourceRoot":"","sources":["../../src/net/FetchHttpClient.ts"],"names":[],"mappings":";;;AACA,0CAAiD;AACjD,mDAKyB;AAQzB;;;;;;;GAOG;AACH,MAAa,eAAgB,SAAQ,0BAAU;IAI7C,YAAY,OAAsB;QAChC,KAAK,EAAE,CAAC;QAER,uCAAuC;QACvC,IAAI,CAAC,OAAO,EAAE;YACZ,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE;gBACrB,MAAM,IAAI,KAAK,CACb,wEAAwE;oBACtE,0CAA0C,CAC7C,CAAC;aACH;YACD,OAAO,GAAG,UAAU,CAAC,KAAK,CAAC;SAC5B;QAED,4CAA4C;QAC5C,sEAAsE;QACtE,sFAAsF;QACtF,IAAI,U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MAAM,IAAI,KAAK,CACb,8JAA8J,CAC/J,CAAC;aACH;YAED,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;SACjC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;CACF;AAlDD,0DAkDC"}
|
|
@@ -130,6 +130,10 @@ export declare namespace ApplicationFee {
|
|
|
130
130
|
* Type of object that created the application fee.
|
|
131
131
|
*/
|
|
132
132
|
type: FeeSource.Type;
|
|
133
|
+
/**
|
|
134
|
+
* PaymentRecord ID that created this application fee.
|
|
135
|
+
*/
|
|
136
|
+
payment_record?: string;
|
|
133
137
|
}
|
|
134
138
|
interface FundingSource {
|
|
135
139
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Stripe } from '../../stripe.core.js';
|
|
2
|
-
import { Secret, SecretResource } from './Secrets.js';
|
|
2
|
+
import { Apps as AppsNamespace0, Secret, SecretResource } from './Secrets.js';
|
|
3
3
|
export { Secret } from './Secrets.js';
|
|
4
4
|
export declare class Apps {
|
|
5
5
|
private readonly stripe;
|
|
@@ -7,5 +7,9 @@ export declare class Apps {
|
|
|
7
7
|
constructor(stripe: Stripe);
|
|
8
8
|
}
|
|
9
9
|
export declare namespace Apps {
|
|
10
|
+
export type SecretListParams = AppsNamespace0.SecretListParams;
|
|
11
|
+
export type SecretCreateParams = AppsNamespace0.SecretCreateParams;
|
|
12
|
+
export type SecretFindParams = AppsNamespace0.SecretFindParams;
|
|
13
|
+
export type SecretDeleteWhereParams = AppsNamespace0.SecretDeleteWhereParams;
|
|
10
14
|
export { Secret };
|
|
11
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/Apps/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAGvC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/Apps/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAGvC,6CAA4E;AAI5E,MAAa,IAAI;IAGf,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,OAAO,GAAG,IAAI,2BAAc,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC;CACF;AAND,oBAMC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Stripe } from '../../../stripe.core.js';
|
|
2
|
-
import { MeterUsage, MeterUsageResource } from './MeterUsage.js';
|
|
2
|
+
import { Billing as BillingNamespace0, MeterUsage, MeterUsageResource } from './MeterUsage.js';
|
|
3
3
|
import { MeterUsageRow } from './MeterUsageRows.js';
|
|
4
4
|
export { MeterUsage } from './MeterUsage.js';
|
|
5
5
|
export { MeterUsageRow } from './MeterUsageRows.js';
|
|
@@ -9,6 +9,7 @@ export declare class Analytics {
|
|
|
9
9
|
constructor(stripe: Stripe);
|
|
10
10
|
}
|
|
11
11
|
export declare namespace Analytics {
|
|
12
|
+
export type MeterUsageRetrieveParams = BillingNamespace0.Analytics.MeterUsageRetrieveParams;
|
|
12
13
|
export { MeterUsage };
|
|
13
14
|
export { MeterUsageRow };
|
|
14
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/resources/Billing/Analytics/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAGvC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/resources/Billing/Analytics/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAGvC,mDAIyB;AAMzB,MAAa,SAAS;IAGpB,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,WAAW,GAAG,IAAI,kCAAkB,CAAC,MAAM,CAAC,CAAC;IACpD,CAAC;CACF;AAND,8BAMC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Stripe } from '../../stripe.core.js';
|
|
2
|
-
import { Alert, AlertResource } from './Alerts.js';
|
|
3
|
-
import { CreditBalanceSummary, CreditBalanceSummaryResource } from './CreditBalanceSummary.js';
|
|
4
|
-
import { CreditBalanceTransaction, CreditBalanceTransactionResource } from './CreditBalanceTransactions.js';
|
|
5
|
-
import { CreditGrant, CreditGrantResource } from './CreditGrants.js';
|
|
6
|
-
import { Meter, MeterResource } from './Meters.js';
|
|
7
|
-
import { MeterEvent, MeterEventResource } from './MeterEvents.js';
|
|
8
|
-
import { MeterEventAdjustment, MeterEventAdjustmentResource } from './MeterEventAdjustments.js';
|
|
2
|
+
import { Billing as BillingNamespace0, Alert, AlertResource } from './Alerts.js';
|
|
3
|
+
import { Billing as BillingNamespace1, CreditBalanceSummary, CreditBalanceSummaryResource } from './CreditBalanceSummary.js';
|
|
4
|
+
import { Billing as BillingNamespace2, CreditBalanceTransaction, CreditBalanceTransactionResource } from './CreditBalanceTransactions.js';
|
|
5
|
+
import { Billing as BillingNamespace3, CreditGrant, CreditGrantResource } from './CreditGrants.js';
|
|
6
|
+
import { Billing as BillingNamespace4, Meter, MeterResource } from './Meters.js';
|
|
7
|
+
import { Billing as BillingNamespace5, MeterEvent, MeterEventResource } from './MeterEvents.js';
|
|
8
|
+
import { Billing as BillingNamespace6, MeterEventAdjustment, MeterEventAdjustmentResource } from './MeterEventAdjustments.js';
|
|
9
9
|
import { AlertRecovered } from './AlertRecovereds.js';
|
|
10
10
|
import { AlertTriggered } from './AlertTriggereds.js';
|
|
11
11
|
import { MeterEventSummary } from './MeterEventSummaries.js';
|
|
@@ -33,12 +33,36 @@ export declare class Billing {
|
|
|
33
33
|
constructor(stripe: Stripe);
|
|
34
34
|
}
|
|
35
35
|
export declare namespace Billing {
|
|
36
|
+
export type AlertListParams = BillingNamespace0.AlertListParams;
|
|
37
|
+
export type AlertCreateParams = BillingNamespace0.AlertCreateParams;
|
|
38
|
+
export type AlertRetrieveParams = BillingNamespace0.AlertRetrieveParams;
|
|
39
|
+
export type AlertActivateParams = BillingNamespace0.AlertActivateParams;
|
|
40
|
+
export type AlertArchiveParams = BillingNamespace0.AlertArchiveParams;
|
|
41
|
+
export type AlertDeactivateParams = BillingNamespace0.AlertDeactivateParams;
|
|
36
42
|
export { Alert };
|
|
43
|
+
export type CreditBalanceSummaryRetrieveParams = BillingNamespace1.CreditBalanceSummaryRetrieveParams;
|
|
37
44
|
export { CreditBalanceSummary };
|
|
45
|
+
export type CreditBalanceTransactionListParams = BillingNamespace2.CreditBalanceTransactionListParams;
|
|
46
|
+
export type CreditBalanceTransactionRetrieveParams = BillingNamespace2.CreditBalanceTransactionRetrieveParams;
|
|
38
47
|
export { CreditBalanceTransaction };
|
|
48
|
+
export type CreditGrantListParams = BillingNamespace3.CreditGrantListParams;
|
|
49
|
+
export type CreditGrantCreateParams = BillingNamespace3.CreditGrantCreateParams;
|
|
50
|
+
export type CreditGrantRetrieveParams = BillingNamespace3.CreditGrantRetrieveParams;
|
|
51
|
+
export type CreditGrantUpdateParams = BillingNamespace3.CreditGrantUpdateParams;
|
|
52
|
+
export type CreditGrantExpireParams = BillingNamespace3.CreditGrantExpireParams;
|
|
53
|
+
export type CreditGrantVoidGrantParams = BillingNamespace3.CreditGrantVoidGrantParams;
|
|
39
54
|
export { CreditGrant };
|
|
55
|
+
export type MeterListParams = BillingNamespace4.MeterListParams;
|
|
56
|
+
export type MeterCreateParams = BillingNamespace4.MeterCreateParams;
|
|
57
|
+
export type MeterRetrieveParams = BillingNamespace4.MeterRetrieveParams;
|
|
58
|
+
export type MeterUpdateParams = BillingNamespace4.MeterUpdateParams;
|
|
59
|
+
export type MeterDeactivateParams = BillingNamespace4.MeterDeactivateParams;
|
|
60
|
+
export type MeterReactivateParams = BillingNamespace4.MeterReactivateParams;
|
|
61
|
+
export type MeterListEventSummariesParams = BillingNamespace4.MeterListEventSummariesParams;
|
|
40
62
|
export { Meter };
|
|
63
|
+
export type MeterEventCreateParams = BillingNamespace5.MeterEventCreateParams;
|
|
41
64
|
export { MeterEvent };
|
|
65
|
+
export type MeterEventAdjustmentCreateParams = BillingNamespace6.MeterEventAdjustmentCreateParams;
|
|
42
66
|
export { MeterEventAdjustment };
|
|
43
67
|
export { AlertRecovered };
|
|
44
68
|
export { AlertTriggered };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/Billing/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAGvC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/Billing/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAGvC,2CAA+E;AAC/E,uEAImC;AACnC,iFAIwC;AACxC,uDAI2B;AAC3B,2CAA+E;AAC/E,qDAI0B;AAC1B,yEAIoC;AAIpC,mDAA+C;AAa/C,MAAa,OAAO;IAUlB,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,MAAM,GAAG,IAAI,yBAAa,CAAC,MAAM,CAAC,CAAC;QACxC,IAAI,CAAC,sBAAsB,GAAG,IAAI,sDAA4B,CAAC,MAAM,CAAC,CAAC;QACvE,IAAI,CAAC,yBAAyB,GAAG,IAAI,+DAAgC,CACnE,MAAM,CACP,CAAC;QACF,IAAI,CAAC,YAAY,GAAG,IAAI,qCAAmB,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM,GAAG,IAAI,yBAAa,CAAC,MAAM,CAAC,CAAC;QACxC,IAAI,CAAC,WAAW,GAAG,IAAI,mCAAkB,CAAC,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,qBAAqB,GAAG,IAAI,uDAA4B,CAAC,MAAM,CAAC,CAAC;QACtE,IAAI,CAAC,SAAS,GAAG,IAAI,oBAAS,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;CACF;AAtBD,0BAsBC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Stripe } from '../../stripe.core.js';
|
|
2
|
-
import { Configuration, ConfigurationResource } from './Configurations.js';
|
|
3
|
-
import { Session, SessionResource } from './Sessions.js';
|
|
2
|
+
import { BillingPortal as BillingPortalNamespace0, Configuration, ConfigurationResource } from './Configurations.js';
|
|
3
|
+
import { BillingPortal as BillingPortalNamespace1, Session, SessionResource } from './Sessions.js';
|
|
4
4
|
export { Configuration } from './Configurations.js';
|
|
5
5
|
export { Session } from './Sessions.js';
|
|
6
6
|
export declare class BillingPortal {
|
|
@@ -10,6 +10,11 @@ export declare class BillingPortal {
|
|
|
10
10
|
constructor(stripe: Stripe);
|
|
11
11
|
}
|
|
12
12
|
export declare namespace BillingPortal {
|
|
13
|
+
export type ConfigurationListParams = BillingPortalNamespace0.ConfigurationListParams;
|
|
14
|
+
export type ConfigurationCreateParams = BillingPortalNamespace0.ConfigurationCreateParams;
|
|
15
|
+
export type ConfigurationRetrieveParams = BillingPortalNamespace0.ConfigurationRetrieveParams;
|
|
16
|
+
export type ConfigurationUpdateParams = BillingPortalNamespace0.ConfigurationUpdateParams;
|
|
13
17
|
export { Configuration };
|
|
18
|
+
export type SessionCreateParams = BillingPortalNamespace1.SessionCreateParams;
|
|
14
19
|
export { Session };
|
|
15
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/BillingPortal/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAGvC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/BillingPortal/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAGvC,2DAI6B;AAC7B,+CAIuB;AAKvB,MAAa,aAAa;IAIxB,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,cAAc,GAAG,IAAI,yCAAqB,CAAC,MAAM,CAAC,CAAC;QACxD,IAAI,CAAC,QAAQ,GAAG,IAAI,6BAAe,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;CACF;AARD,sCAQC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Stripe } from '../../stripe.core.js';
|
|
2
|
-
import { FinancingOffer, FinancingOfferResource } from './FinancingOffers.js';
|
|
3
|
-
import { FinancingSummary, FinancingSummaryResource } from './FinancingSummary.js';
|
|
4
|
-
import { FinancingTransaction, FinancingTransactionResource } from './FinancingTransactions.js';
|
|
2
|
+
import { Capital as CapitalNamespace0, FinancingOffer, FinancingOfferResource } from './FinancingOffers.js';
|
|
3
|
+
import { Capital as CapitalNamespace1, FinancingSummary, FinancingSummaryResource } from './FinancingSummary.js';
|
|
4
|
+
import { Capital as CapitalNamespace2, FinancingTransaction, FinancingTransactionResource } from './FinancingTransactions.js';
|
|
5
5
|
export { FinancingOffer } from './FinancingOffers.js';
|
|
6
6
|
export { FinancingSummary } from './FinancingSummary.js';
|
|
7
7
|
export { FinancingTransaction } from './FinancingTransactions.js';
|
|
@@ -13,7 +13,13 @@ export declare class Capital {
|
|
|
13
13
|
constructor(stripe: Stripe);
|
|
14
14
|
}
|
|
15
15
|
export declare namespace Capital {
|
|
16
|
+
export type FinancingOfferListParams = CapitalNamespace0.FinancingOfferListParams;
|
|
17
|
+
export type FinancingOfferRetrieveParams = CapitalNamespace0.FinancingOfferRetrieveParams;
|
|
18
|
+
export type FinancingOfferMarkDeliveredParams = CapitalNamespace0.FinancingOfferMarkDeliveredParams;
|
|
16
19
|
export { FinancingOffer };
|
|
20
|
+
export type FinancingSummaryRetrieveParams = CapitalNamespace1.FinancingSummaryRetrieveParams;
|
|
17
21
|
export { FinancingSummary };
|
|
22
|
+
export type FinancingTransactionListParams = CapitalNamespace2.FinancingTransactionListParams;
|
|
23
|
+
export type FinancingTransactionRetrieveParams = CapitalNamespace2.FinancingTransactionRetrieveParams;
|
|
18
24
|
export { FinancingTransaction };
|
|
19
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/Capital/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAGvC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/Capital/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAGvC,6DAI8B;AAC9B,+DAI+B;AAC/B,yEAIoC;AAMpC,MAAa,OAAO;IAKlB,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,eAAe,GAAG,IAAI,2CAAsB,CAAC,MAAM,CAAC,CAAC;QAC1D,IAAI,CAAC,kBAAkB,GAAG,IAAI,8CAAwB,CAAC,MAAM,CAAC,CAAC;QAC/D,IAAI,CAAC,qBAAqB,GAAG,IAAI,uDAA4B,CAAC,MAAM,CAAC,CAAC;IACxE,CAAC;CACF;AAVD,0BAUC"}
|