Creating multiple items type definition is incorrect
When creating multiple items in 1 call, the client still defines the return type as CollectionItem when in reality the return type is {items: CollectionItem[]}.
Honestly, for a company that is shutting down their v1 API, your v2 tooling and documentation is inconsistent and at times incorrect. There are calls where the tooling enforces a type but the API rejects this type, and when trying to satisfy the API validation, the tool then enforces the wrong type back. This is a mess and I am surprised a company as big as webflow has such big gaps in their tech and tooling. Have you not tested these things internally?
Hey @gugahoi - thank you for reporting this, we'll make sure we get this corrected upstream in our openapi spec which generates this SDK.
Also absolutely understand the frustration here. The goal is to ensure we get the SDKs to match reality, and there are plans in the near future to add automated testing via the tooling we use to generate the TS SDK here to make sure that reflects. We're still relatively "early" on in getting this right, so I really appreciate you raising these issues. In the meantime, recommend using fetch calls where necessary so you're not blocked by validation errors. Will follow up once we've released a new version with this specific fix for the multiple items issue
Thanks @zplata but you are shutting down the old APIs in a couple of weeks and these issues seem to be quite basic and can be found by just using the tools. I hope you can understand that this is concerning and makes it sound like the new APIs are not ready or complete.
For reference, I welcome the changes you are making and the new APIs are much more comprehensive but it just leaves a poor experience to your consumers when the tools and documentation are incorrect.