e-Spirit / javascript-content-api-library

Apache License 2.0
7 stars 11 forks source link

Filter for boolean values not possible #65

Closed tk127 closed 2 years ago

tk127 commented 2 years ago

When fetching datasource elements with fetchByFilter you can filter for values of the datasource elements. Currently this is possible for string, number and RegExp, but not for booleans:

Type 'boolean' is not assignable to type 'ComparisonFilterValue | ComparisonFilterValue[]'

I think this is just a small issue, as type 'boolean' could be added here:

https://github.com/e-Spirit/fsxa-api/blob/88e6c45492a2e7e9774c19a72742e8a3bc48a806/src/types.ts#L586

nico-mcalley commented 2 years ago

Hello @tk127 Thank you for sharing this issue with us. Since filtering of results is a basic feature of the fsxa-api, we created an internal jira ticket for this issue. A valid workaround could be to use the api with "additional params" (see https://github.com/e-Spirit/fsxa-api/blob/master/src/modules/FSXARemoteApi.ts#L141) By doing this, it is possible to add query parameters to the CaaS request, which the fsxa-api does not (yet) support natively.

Updates regarding this ticket will synced with your issue. Sorry for the long response time.

Internal Ticket id: TNG-1123

deangite commented 2 years ago

released to version: fsxa-api@10.5.0 fsxa-pattern-library@8.7.0 fsxa-nuxt-module@7.5.0 fsxa-pwa@3.8.0