Skip to content

Commit

Permalink
Merge pull request #58 from Relewise/feat-Add-support-for-new-'Descen…
Browse files Browse the repository at this point in the history
…dants'-CategorySelectionStrategy

feat: Add support for new 'Descendants' CategorySelectionStrategy for CategoryHierarchyFacet
  • Loading branch information
mzanoni authored May 8, 2024
2 parents 344e112 + 3542e4d commit e32552d
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 e32552d

Please sign in to comment.