Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] apiclient-next abstraction of Criteria #563

Open
shyim opened this issue Feb 4, 2024 · 1 comment
Open

[FEATURE] apiclient-next abstraction of Criteria #563

shyim opened this issue Feb 4, 2024 · 1 comment
Labels
enhancement New feature or request OpenAPI-schema

Comments

@shyim
Copy link
Member

shyim commented Feb 4, 2024

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

@shyim shyim added the enhancement New feature or request label Feb 4, 2024
@patzick
Copy link
Collaborator

patzick commented Feb 5, 2024

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request OpenAPI-schema
Projects
Status: Developer Backlog
Development

No branches or pull requests

2 participants