Closed coycoylaniba closed 1 year ago
Hi, @coycoylaniba.
Can y give an example what endpoits those param is not available, please? Because in my test it was. Let me check it please.
Thanks
this end points
node_modules/woocommerce-rest-ts-api/dist/src/typesANDinterfaces.d.ts:
export declare type WooRestApiEndpoint = "coupons" | "customers" | "orders" | "products" | "system_status";
Check the latest version and let me know @coycoylaniba
Thank you.
hello sir, the params type error is fixed. but i have another problem, if i do "products/:productId"
this error shows up
Argument of type 'string' is not assignable to parameter of type 'WooRestApiEndpoint'.
For while, if you want to use it like that is not possible, you would have to use it as a Parameter, in my opinion, it becomes a bit clear than direct if not leave your thoughts about that.
Thanks @coycoylaniba
oh okay thanks, will try it
@coycoylaniba just to know. Was everything ok?
get parameters should be optional
api.get("endpoint")
Expected 2 arguments, but got 1. index.d.ts(15, 52): An argument for 'params' was not provided.
per_page is not available in other endpoints aside from webhook (which is webhook is not in the endpoints either)
Argument of type '{ status: string; per_page: number; }' is not assignable to parameter of type 'WooRestApiParams'. Object literal may only specify known properties, and 'per_page' does not exist in type 'WooRestApiParams'.
package.json
"woocommerce-rest-ts-api": "^2.0.0",