[FEATURE] apiclient-next abstraction of Criteria
Description
All search, search-ids support a Shopware Criteria. It's pretty annoying to craft that with raw objects. Maybe we can use the existing here? https://github.com/shopware/meteor-admin-sdk/blob/trunk/src/data/Criteria.ts
Use Case
Make live of devs easier when crafting custom search.
const criteria = new Criteria();
// do stuff with the criteria object
const keywords = await adminApiClient.invoke(
"getProductSearchKeywordList post /search/product-search-keyword",
criteria
);
Proposed Solution
No response
Alternatives Considered
No response
Additional Context
No response
Priority would be to improve Criteria definition in the OpenAPI schema to make it complete. Currently, a lot is missing there (which also makes filling it more painful and requires advanced knowledge of how it works).
When it's complete we'll be able to prepare helper for creating Criteria, or even generate it from the schema definition, as it needs to rely only on that and be able to also include custom filters.
Help in improving that area of the OpenAPI schema would be appreciated :)