Classes
Class: KlevuResponseQueryObject
60 min
@klevu/core / docid 7vdpes 8 0tv 43dya7ly / klevuresponsequeryobject result object for each query a storage for results can be used to fetch more data, send events etc table of contents constructors docid\ phrcdx6tn6mmutkzfuwjb properties docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb accessors docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb methods docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb docid\ phrcdx6tn6mmutkzfuwjb constructors constructor • new klevuresponsequeryobject ( responseobject , query , func ) parameters true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l65 properties categorymerchandisingclickevent • optional categorymerchandisingclickevent ( params { categorytitle string ; override? partial < klevuv1categoryproductsview > ; productid string ; variantid? string }) => void type declaration ▸ ( params ) void when query is categorymerchandising this is available it is used to send categorymerchandising click events parameters true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type returns void defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l48 func • func @klevu/core docid 7vdpes 8 0tv 43dya7ly function used to create this query defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l33 getredirects • optional getredirects () => promise < interface klevukeywordurlmap docid\ ldp3zbw oyvjhpfr0d2hy \[]> type declaration ▸ () promise < interface klevukeywordurlmap docid\ ldp3zbw oyvjhpfr0d2hy \[]> fetches redirects for this query this is available only for search queries returns promise < interface klevukeywordurlmap docid\ ldp3zbw oyvjhpfr0d2hy \[]> defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l63 hooks • hooks @klevu/core docid 7vdpes 8 0tv 43dya7ly \[] = \[] hooks that can be used to listen for events defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l38 query • query @klevu/core docid 7vdpes 8 0tv 43dya7ly this query defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l28 recommendationbannerclickevent • optional recommendationbannerclickevent ( params { resolution "desktop" | "mobile" }) => void type declaration ▸ ( params ) void when there is a banner in the recommendation this is available it is used to send recommendation banner click events parameters true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type returns void defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l58 recommendationclickevent • optional recommendationclickevent ( params { override? partial < klevurecommendationseventv2data > ; productid string ; variantid? string }) => void type declaration ▸ ( params ) void when query is recommendation this is available it is used to send recommendation click events parameters true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type returns void defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l53 responseobject • responseobject class klevuresponseobject docid ozqiexf73m6lamic6 oo original request response that includes all queries defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l23 searchclickevent • optional searchclickevent ( params { autosendviewevent? boolean ; override? partial < v1searchevent > ; productid string ; variantid? string }) => void type declaration ▸ ( params ) void when query is search this is available it is used to send search click events parameters true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type returns void defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l43 accessors filters • get filters () undefined | ( @klevu/core docid 7vdpes 8 0tv 43dya7ly | @klevu/core docid 7vdpes 8 0tv 43dya7ly | @klevu/core docid 7vdpes 8 0tv 43dya7ly )\[] all filters related to this query returns undefined | ( @klevu/core docid 7vdpes 8 0tv 43dya7ly | @klevu/core docid 7vdpes 8 0tv 43dya7ly | @klevu/core docid 7vdpes 8 0tv 43dya7ly )\[] defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l80 functionparams • get functionparams () undefined | @klevu/core docid 7vdpes 8 0tv 43dya7ly special parameters that are saved to query returns undefined | @klevu/core docid 7vdpes 8 0tv 43dya7ly defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l108 id • get id () string id if the query returns string defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l87 meta • get meta () object meta data of the query returns object true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l94 records • get records () { id string } & @klevu/core docid 7vdpes 8 0tv 43dya7ly \[] records of the query returns { id string } & @klevu/core docid 7vdpes 8 0tv 43dya7ly \[] defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l101 methods \#initeventfunctions ▸ private #initeventfunctions () void returns void defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l206 \#initredirects ▸ private #initredirects () void returns void defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l194 annotationsbyid ▸ annotationsbyid ( productid , languagecode ) promise < undefined | @klevu/core docid 7vdpes 8 0tv 43dya7ly > parameters true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type returns promise < undefined | @klevu/core docid 7vdpes 8 0tv 43dya7ly > defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l400 getbanners ▸ getbanners ( params? ) promise < interface klevubanner docid\ x1iaotagack9b1ktwa3io \[]> parameters true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type returns promise < interface klevubanner docid\ x1iaotagack9b1ktwa3io \[]> list of banners that were received for this query defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l408 getpage ▸ getpage ( params? ) promise < undefined | class klevuresponseobject docid ozqiexf73m6lamic6 oo > fetches page of results if pageindex is not defined it will fetch next page parameters true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type returns promise < undefined | class klevuresponseobject docid ozqiexf73m6lamic6 oo > defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l118 getqueryparameters ▸ getqueryparameters () undefined | @klevu/core docid 7vdpes 8 0tv 43dya7ly returns undefined | @klevu/core docid 7vdpes 8 0tv 43dya7ly list of params used in the query and the metadata that was generated during the query this is useful for example to fetching kmc metadata that was received for recommendations query defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l421 gettotalpages ▸ gettotalpages () number returns number total number of pages defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l190 hasnextpage ▸ hasnextpage () boolean returns boolean true if there are more pages to fetch defined in https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/connection/responsequeryobject ts#l179