Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
get facetsApiParams(): Record> {
const { facets } = this;
const facetsApiParams: Record> = facets ? fromRestli(facets) : {};
return facetsApiParams;
}
export const facetFromParamUrl = (value: string = '') => {
return toFacetSelectionsMap(fromRestli(value));
};
export const searchUrl = ({ facets, ...params }: ISearchApiParams): string => {
return buildUrl(`${getApiRoot()}/search`, { ...params, ...fromRestli(facets || '') });
};