Alokai

GetFacetParams

Parameters for the getFacet API endpoint

interface GetFacetParams extends Partial<{
  category: {
    limit?: number;
    offset?: number;
    sort?: string;
  };
  categorySlug: string;
  customParams: {
    [key: string]: unknown;
  };
  customQuery: Record<string, string>;
  filters: {
    [key: string]: string[];
  };
  page: number;
  perPage: number;
  phrase: string;
  rootCatSlug: string;
  sort: string;
  withVariants: boolean;
}>, Pick<RequestVariables, "country" | "currency" | "customerGroupId" | "locale"> {
	category: {
    limit?: number;
    offset?: number;
    sort?: string;
  };
	categorySlug: string;
	customParams: {
    [key: string]: unknown;
  };
	customQuery: Record<string, string>;
	filters: {
    [key: string]: string[];
  };
	page: number;
	perPage: number;
	phrase: string;
	rootCatSlug: string;
	sort: string;
	withVariants: boolean;
}

Properties

NameRequiredTypeDescription
categoryRequired{ limit?: number; offset?: number; sort?: string; }Category results options
categorySlugRequiredstringSlug of the category
customParamsRequired{ [key: string]: unknown; }Custom GraphQL variables to pass to the query.
customQueryRequiredRecord<string, string>Customization of the GraphQL query that's used to fetch the data.
filtersRequired{ [key: string]: string[]; }List of facets to apply to the search. Each key can be either category or a facet name defined in the api-client config file integrations.ct.configuration.faceting.availableFacets
pageRequirednumberPage number
perPageRequirednumberDetermines how many products should be returned in a single page.
phraseRequiredstringPhrase to search by
rootCatSlugRequiredstring
sortRequiredstringSorting option. A valid option is an id of sortingOptions from the api client config.
withVariantsRequiredbooleanShould results include products variants?

Referenced Types

On this page