Closed scernisevs closed 2 years ago
If I may pitch in, there are more types that aren't correct with what's coming from the API.
POST /getCatalogs
and /getNodes
should return a Catalog[]
and a Node[]
but there is a mismatch on some properties.
Hi @rjdmacedo
If you could create a issue with the sepcifics of the mismatched types then I'll be able to get them sorted 🙏. If you can make PR that would be even better. 😉
Issues with Order and CustomerAddress types not matching the order data from getOrder response
Here is an example of Order Data from GET https://api.moltin.com/v2/orders
Problems:
Order Types - https://github.com/moltin/js-sdk/blob/master/src/types/order.d.ts 1) Order --> shipping_address: AddressBase, billing_address: AddressBase AddressBase --> has mandatory fields "name", and "type", that are not present on the response 2) Order --> items?: RelationshipToMany<'product'> is incorrect and throws errors as it should be RelationshipToMany<'item'>
3) AddressBase has: phone_number, instructions fields as required, which are not present for billing_address