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

fix(types): allow mixed arrays in numeric and tag filters #1395

Merged
merged 1 commit into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/client-search/src/types/DeleteByFiltersOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ export type DeleteByFiltersOptions = {
/**
* Filter on numeric attributes.
*/
readonly numericFilters?: string | readonly string[] | ReadonlyArray<readonly string[]>;
readonly numericFilters?: string | readonly string[] | ReadonlyArray<readonly string[] | string>;

/**
* Filter hits by tags. tagFilters is a different way of filtering, which relies on the _tags
* attribute. It uses a simpler syntax than filters. You can use it when you want to do
* simple filtering based on tags.
*/
readonly tagFilters?: string | readonly string[] | ReadonlyArray<readonly string[]>;
readonly tagFilters?: string | readonly string[] | ReadonlyArray<readonly string[] | string>;

/**
* Search for entries around a central geolocation, enabling a geo search within a circular area.
Expand Down
4 changes: 2 additions & 2 deletions packages/client-search/src/types/SearchOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ export type SearchOptions = {
/**
* Filter on numeric attributes.
*/
readonly numericFilters?: string | readonly string[] | ReadonlyArray<readonly string[]>;
readonly numericFilters?: string | readonly string[] | ReadonlyArray<readonly string[] | string>;

/**
* Filter hits by tags. tagFilters is a different way of filtering, which relies on the _tags
* attribute. It uses a simpler syntax than filters. You can use it when you want to do
* simple filtering based on tags.
*/
readonly tagFilters?: string | readonly string[] | ReadonlyArray<readonly string[]>;
readonly tagFilters?: string | readonly string[] | ReadonlyArray<readonly string[] | string>;

/**
* Determines how to calculate the total score for filtering.
Expand Down