Yuri-Lima / woocommerce-rest-api-ts-lib

This is some improvements for the oficial WooCommerce repo. https://github.com/woocommerce/woocommerce-rest-api-js-lib I hope they merge or accept it as new repo. soon. Please few free to contact me.
MIT License
29 stars 8 forks source link

get('orders') accepts parameter "customer" instead of "customer_id" #40

Open dmoebius opened 1 year ago

dmoebius commented 1 year ago

The GET orders endpoint accepts a "customer" parameter instead of "customer_id". The typescript definitions need to reflect this.

I think this can most easily achieved by changing:

export type OrdersParams = Partial<Orders>;

to

export type OrdersParams = Partial<Omit<Orders, 'customer_id'> & {'customer': number}>;
Yuri-Lima commented 1 year ago

Hi, @dmoebius, i have assigned you to this issue, if you have a chance to create a PR, would be very helpfull. Thank in advance.