@nosto/search-js 3.22.0 → 3.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { AsComponent, BaseElementProps } from '../../../common/src/components/BaseElement';
2
- import { KeywordHit, ProductHit } from '../types';
2
+ import { KeywordHit, PopularSearchHit, ProductHit } from '../types';
3
3
  export type AutocompleteElementProps<C extends AsComponent> = Omit<BaseElementProps<C>, "onClick"> & {
4
- hit: ProductHit | KeywordHit;
4
+ hit: ProductHit | KeywordHit | PopularSearchHit;
5
5
  };
6
6
  export declare function AutocompleteElement<C extends AsComponent>({ children, hit, as, componentProps }: AutocompleteElementProps<C>): import("preact").JSX.Element;
@@ -1,7 +1,5 @@
1
- export type ProductHit = {
2
- productId: string;
3
- url?: string;
4
- };
5
- export type KeywordHit = {
6
- keyword: string;
7
- };
1
+ import { SearchCategory, SearchKeyword, SearchPopularSearch, SearchProduct } from '@nosto/nosto-js/client';
2
+ export type ProductHit = Pick<SearchProduct, "productId" | "url">;
3
+ export type CategoryHit = Pick<SearchCategory, "externalId" | "fullName" | "url">;
4
+ export type KeywordHit = Pick<SearchKeyword, "keyword">;
5
+ export type PopularSearchHit = Pick<SearchPopularSearch, "query">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nosto/search-js",
3
- "version": "3.22.0",
3
+ "version": "3.22.1",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "files": [