Closed arodundef closed 1 year ago
Hey, thanks for reporting! Indeed, that PR is modifying an auto-generated file. It's generated based on the services repo openapi specs.
The issue you mentioned might come from this line I guess https://github.com/cowprotocol/services/blob/main/crates/orderbook/openapi.yml#L1161
It could either be that the openapi specs it incorrect or something in the auto-generation that's broken.
I'll raise this internally with the team.
Seems like indeed the code generation lib is to blame https://github.com/ferdikoomen/openapi-typescript-codegen/issues/1424
Not done yet, still pending the PR approval/merge and a new version release
Released on 2.3.1 https://www.npmjs.com/package/@cowprotocol/cow-sdk?activeTab=versions
According to your API documentation here. I could use in the
getQuote
function theOrderKind.SELL
orOrderKind.BUY
.But, it is impossible because
kind
only acceptsOrderQuoteSide
enum, as in the following image.Then, I have to use
OrderQuoteSide.kind
insteadOrderKind
.And there is the second issue
OrderQuoteSide.kind
has onlySELL
enum, not the buy one. So, it's impossible to useOrderQuoteSide.kind.BUY
. As the images below:I'm using the
@cowprotocol/cow-sdk@^2.3.0-rc.7
I tried to help with a PR, but @mfw78 told me that is not the right place to change it. Feel free to refuse that.