stripe / stripe-node

Node.js library for the Stripe API.
https://stripe.com
MIT License
3.85k stars 748 forks source link

update typescript interface to include v15.0.0 changes (features => marketing_features) #2081

Closed HaruMiyaGi closed 5 months ago

HaruMiyaGi commented 5 months ago

Describe the bug

I use inbuilt types from the Stripe library, the interface for Product still has the old 'features' instead of the new 'marketing_features' which been introduced in v15.

To Reproduce

  1. Import Product interface from the 'stripe' library
  2. try to access product.marketing_features.

throws a type error.

const prd: Stripe.Product = ....

console.log(prd.marketing_features) // <- type error

Expected behavior

works correctly

Code snippets

No response

OS

Win10

Node version

v20.9.0

Library version

latest

API version

2022-08-01

Additional context

No response

remi-stripe commented 5 months ago

@HaruMiyaGi The types are generated automatically from our openapi spec and should already be up to date. You can see they are defined in the code here as expected. You are either using external/third-party types (like DefinitelyTyped) or using an older version I would say.

HaruMiyaGi commented 5 months ago

@HaruMiyaGi The types are generated automatically from our openapi spec and should already be up to date. You can see they are defined in the code here as expected. You are either using external/third-party types (like DefinitelyTyped) or using an older version I would say.

yes, did an rm -rf ./node_modules/ and a fresh install, this fixed it. thank you!