Interface NostoClient

interface NostoClient {
    placements: {
        getPlacements(): string[];
        injectCampaigns(recommendations: Record<string, Recommendation>): void;
    };
    captureError(error: unknown, reporter: string, level: LogLevel): void;
    defaultSession(): NostoSession;
    recordSearchClick(type: "autocomplete" | "category" | "serp", hit: {
        keyword?: string;
        url?: string;
    }): void;
    recordSearchSubmit(query: string): void;
    search(query: InputSearchQueryWithFields, options?: SearchOptions): PromiseLike<SearchResult>;
    setAutoLoad(autoload: boolean): NostoClient;
}

Properties

placements: {
    getPlacements(): string[];
    injectCampaigns(recommendations: Record<string, Recommendation>): void;
}

Methods

  • Parameters

    • error: unknown
    • reporter: string
    • level: LogLevel

    Returns void

  • Parameters

    • type: "autocomplete" | "category" | "serp"
    • hit: {
          keyword?: string;
          url?: string;
      }
      • Optionalkeyword?: string
      • Optionalurl?: string

    Returns void

  • Parameters

    • query: string

    Returns void