Options
All
  • Public
  • Public/Protected
  • All
Menu

@sajari/sdk-js

Index

Type aliases

Aggregates

Aggregates: Record<string, Record<string, CountAggregate | MetricAggregate>>

ClickToken

ClickToken: { click: string }

ClickToken defines a click token. See TrackingType.Click for more details.

Type declaration

  • click: string

FilterFunc

FilterFunc: () => string

Type declaration

    • (): string
    • Returns string

MetricAggregate

MetricAggregate: number

PosNegToken

PosNegToken: { neg: string; pos: string }

PosNegToken defines a pos/neg token pair. See TrackingType.PosNeg for more details.

Type declaration

  • neg: string
  • pos: string

SubCallback

SubCallback: (...data: any) => void

Type declaration

    • (...data: any): void
    • Parameters

      • Rest ...data: any

      Returns void

Token

Tracking

Tracking: { data?: Record<string, string>; field?: undefined | string; queryID?: undefined | string; sequence?: undefined | number; type: TrackingType }

Tracking defines behaviour for handling search sessions and result interactions.

Type declaration

  • Optional data?: Record<string, string>
  • Optional field?: undefined | string
  • Optional queryID?: undefined | string
  • Optional sequence?: undefined | number
  • type: TrackingType

UnSubFn

UnSubFn: () => void

Type declaration

    • (): void
    • Returns void

ValueFunc

ValueFunc: () => string

Type declaration

    • (): string
    • Returns string

ValueType

ValueType: string | number | boolean | string[] | number[] | boolean[] | ValueFunc

Variables

Const EVENT_OPTIONS_UPDATED

EVENT_OPTIONS_UPDATED: "options-updated" = "options-updated"

Const EVENT_SEARCH_SENT

EVENT_SEARCH_SENT: "search-sent" = "search-sent"

Const EVENT_SELECTION_UPDATED

EVENT_SELECTION_UPDATED: "selection-updated" = "selection-updated"

Const EVENT_TRACKING_RESET

EVENT_TRACKING_RESET: "tracking-reset" = "tracking-reset"

Const EVENT_VALUES_UPDATED

EVENT_VALUES_UPDATED: "values-changed" = "values-changed"

Const scriptTag

scriptTag: undefined | null | string = !isSSR()? (document.currentScript as HTMLScriptElement | null)?.src: null

Let suffix

suffix: string = ""

Functions

Const isSSR

  • isSSR(): boolean
  • Check if we're in a server-side rendering context

    Returns boolean

Generated using TypeDoc