Closed ybirader closed 4 months ago
Found myself in the same situation. Currently using the types package (DTO types). ProductVariantDTO doesn't have prices, apparently? I think it should, since that field is returned from the API.
Update: Cart types are even more confusing. The DTO and non-dto types have many different fields. After updating the types and medusa sdk, it got better but typescript is now screaming that DTO type has more fields than what is returned from the sdk. I wonder if this is just misaligned because of the re-work going on, or if there's something else we should be using all along.
Same for me
Hey all, the DTO types are used for the v2 modules, and as such, differ from what was being exported from @medusajs/medusa in v1. Please use those types if you are using medusa v1, or use the @medusajs/types package for v2. Thanks!
I've been using the medusas/types library to add type info.
However, it seems that the exported types are distinct from those used in the core library. For example,
Product
is similar but not exactly the same asProductDTO
.Alongside that, there is also the Medusa client-types package, which is also missing the required types.
Where should one find the required types?