Skip to content

Commit

Permalink
feat: Add support for new 'Descendants' CategorySelectionStrategy
Browse files Browse the repository at this point in the history
This is only available for the CategoryHierarchyFacet
  • Loading branch information
RAORelewise committed May 8, 2024
1 parent 344e112 commit 3542e4d
Show file tree
Hide file tree
Showing 2 changed files with 522 additions and 500 deletions.
4 changes: 2 additions & 2 deletions packages/client/src/builders/search/facetBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class FacetBuilder {
return this;
}

public addProductCategoryHierarchyFacet(categorySelectionStrategy: 'ImmediateParent' | 'Ancestors', selectedValues: CategoryPath[] | null = null, selectedPropertiesSettings?: Partial<SelectedProductCategoryPropertiesSettings>, facetSettings?: FacetSettings): this {
public addProductCategoryHierarchyFacet(categorySelectionStrategy: 'ImmediateParent' | 'Ancestors' | 'Descendants', selectedValues: CategoryPath[] | null = null, selectedPropertiesSettings?: Partial<SelectedProductCategoryPropertiesSettings>, facetSettings?: FacetSettings): this {
const facet: CategoryHierarchyFacet = {
$type: 'Relewise.Client.DataTypes.Search.Facets.Queries.CategoryHierarchyFacet, Relewise.Client',
categorySelectionStrategy: categorySelectionStrategy,
Expand All @@ -62,7 +62,7 @@ export class FacetBuilder {
return this;
}

public addContentCategoryHierarchyFacet(categorySelectionStrategy: 'ImmediateParent' | 'Ancestors', selectedValues: CategoryPath[] | null = null, selectedPropertiesSettings?: Partial<SelectedContentCategoryPropertiesSettings>, facetSettings?: FacetSettings): this {
public addContentCategoryHierarchyFacet(categorySelectionStrategy: 'ImmediateParent' | 'Ancestors' | 'Descendants', selectedValues: CategoryPath[] | null = null, selectedPropertiesSettings?: Partial<SelectedContentCategoryPropertiesSettings>, facetSettings?: FacetSettings): this {
const facet: CategoryHierarchyFacet = {
$type: 'Relewise.Client.DataTypes.Search.Facets.Queries.CategoryHierarchyFacet, Relewise.Client',
categorySelectionStrategy: categorySelectionStrategy,
Expand Down
Loading

0 comments on commit 3542e4d

Please sign in to comment.