@algolia/client-personalization 5.0.0-alpha.7 → 5.0.0-alpha.71

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.
Files changed (38) hide show
  1. package/dist/builds/browser.d.ts +5 -5
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +5 -5
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/client-personalization.cjs.js +283 -285
  6. package/dist/client-personalization.esm.browser.js +466 -516
  7. package/dist/client-personalization.esm.node.js +283 -285
  8. package/dist/client-personalization.umd.js +2 -2
  9. package/dist/model/clientMethodProps.d.ts +78 -78
  10. package/dist/model/clientMethodProps.d.ts.map +1 -1
  11. package/dist/model/deleteUserProfileResponse.d.ts +10 -10
  12. package/dist/model/deleteUserProfileResponse.d.ts.map +1 -1
  13. package/dist/model/errorBase.d.ts +6 -6
  14. package/dist/model/errorBase.d.ts.map +1 -1
  15. package/dist/model/eventScoring.d.ts +14 -14
  16. package/dist/model/eventScoring.d.ts.map +1 -1
  17. package/dist/model/facetScoring.d.ts +10 -10
  18. package/dist/model/facetScoring.d.ts.map +1 -1
  19. package/dist/model/getUserTokenResponse.d.ts +14 -14
  20. package/dist/model/getUserTokenResponse.d.ts.map +1 -1
  21. package/dist/model/index.d.ts +8 -8
  22. package/dist/model/index.d.ts.map +1 -1
  23. package/dist/model/personalizationStrategyParams.d.ts +16 -16
  24. package/dist/model/personalizationStrategyParams.d.ts.map +1 -1
  25. package/dist/model/setPersonalizationStrategyResponse.d.ts +6 -6
  26. package/dist/model/setPersonalizationStrategyResponse.d.ts.map +1 -1
  27. package/dist/src/personalizationClient.d.ts +112 -112
  28. package/dist/src/personalizationClient.d.ts.map +1 -1
  29. package/model/clientMethodProps.ts +1 -1
  30. package/model/deleteUserProfileResponse.ts +1 -1
  31. package/model/errorBase.ts +1 -1
  32. package/model/eventScoring.ts +1 -1
  33. package/model/facetScoring.ts +1 -1
  34. package/model/getUserTokenResponse.ts +1 -1
  35. package/model/index.ts +1 -1
  36. package/model/personalizationStrategyParams.ts +1 -1
  37. package/model/setPersonalizationStrategyResponse.ts +1 -1
  38. package/package.json +31 -13
@@ -1,2 +1,2 @@
1
- /*! client-personalization.umd.js | 5.0.0-alpha.7 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
2
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/client-personalization"]={})}(this,(function(e){"use strict";function t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r(e){let t;const r=`algolia-client-js-${e.key}`;function a(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function n(){return JSON.parse(a().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),a=n()[r];return Promise.all([a||t(),void 0!==a])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const s=n();return s[JSON.stringify(e)]=t,a().setItem(r,JSON.stringify(s)),t})),delete:e=>Promise.resolve().then((()=>{const t=n();delete t[JSON.stringify(e)],a().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(r)}))}}function a(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,n,s={miss:()=>Promise.resolve()})=>r.get(e,n,s).catch((()=>a({caches:t}).get(e,n,s))),set:(e,n)=>r.set(e,n).catch((()=>a({caches:t}).set(e,n))),delete:e=>r.delete(e).catch((()=>a({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>a({caches:t}).clear()))}}function n(e={serializable:!0}){let t={};return{get(r,a,n={miss:()=>Promise.resolve()}){const s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);const o=a();return o.then((e=>n.miss(e))).then((()=>o))},set:(r,a)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const s=12e4;function o(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>s},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=s}}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class c extends Error{constructor(e,t){super(e),i(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends c{constructor(e,t,r){super(e,r),i(this,"stackTrace",void 0),this.stackTrace=t}}class l extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class p extends u{constructor(e,t,r){super(e,r,"ApiError"),i(this,"status",void 0),this.status=t}}class h extends c{constructor(e,t){super(e,"DeserializationError"),i(this,"response",void 0),this.response=t}}function d(e,t,r){const a=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${t(e[r])?JSON.stringify(e[r]):e[r]}`)).join("&")}(r);let n=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return a.length&&(n+=`?${a}`),n}function m(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:a,algoliaAgent:n,timeouts:s,requester:i,requestsCache:c,responsesCache:u}){async function f(c,u,f=!0){const g=[],y=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,u),P=function(e,t,r){const a={Accept:"application/json",...e,...t,...r},n={};return Object.keys(a).forEach((e=>{const t=a[e];n[e.toLowerCase()]=t})),n}(r,c.headers,u.headers),O="GET"===c.method?{...c.data,...u.data}:{},b={"x-algolia-agent":n.value,...a,...c.queryParameters,...O};if(u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?b[e]=u.queryParameters[e].toString():b[e]=u.queryParameters[e];let w=0;const v=async(e,r)=>{const a=e.pop();if(void 0===a)throw new l(function(e){return e.map((e=>m(e)))}(g));let n=u.timeout;void 0===n&&(n=f?s.read:s.write);const O={data:y,headers:P,method:c.method,url:d(a,c.path,b),connectTimeout:r(w,s.connect),responseTimeout:r(w,n)},q=t=>{const r={request:O,response:t,host:a,triesLeft:e.length};return g.push(r),r},T=await i.send(O);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(T)){const n=q(T);return T.isTimedOut&&w++,console.log("Retryable failure",m(n)),await t.set(a,o(a,T.isTimedOut?"timed out":"down")),v(e,r)}if(function({status:e}){return 2==~~(e/100)}(T))return function(e){try{return JSON.parse(e.content)}catch(t){throw new h(t.message,e)}}(T);throw q(T),function({content:e,status:t},r){let a=e;try{a=JSON.parse(e).message}catch(e){}return new p(a,t,r)}(T,g)},q=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),T=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(o(e))))))),a=r.filter((e=>e.isUp())),n=r.filter((e=>e.isTimedOut())),s=[...a,...n];return{hosts:s.length>0?s:e,getTimeout:(e,t)=>(0===n.length&&0===e?1:n.length+3+e)*t}}(q);return v([...T.hosts].reverse(),T.getTimeout)}return{hostsCache:t,requester:i,timeouts:s,algoliaAgent:n,baseHeaders:r,baseQueryParameters:a,hosts:e,request:function(e,t={}){const n=e.useReadTransporter||"GET"===e.method;if(!n)return f(e,t,n);const s=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return s();const o={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return u.get(o,(()=>c.get(o,(()=>c.set(o,s()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>u.set(o,e)})},requestsCache:c,responsesCache:u}}function g({algoliaAgents:e,client:t,version:r}){const a=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>a.add(e))),a}function y(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},s=Object.keys(e);for(a=0;a<s.length;a++)r=s[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)r=s[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var P=["appId","apiKey","authMode","algoliaAgents","region"];function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function b(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?O(Object(a),!0).forEach((function(r){t(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):O(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var w="5.0.0-alpha.7",v=["eu","us"];function q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}e.apiClientVersion=w,e.personalizationClient=function(e,s,o,i){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!s||"string"!=typeof s)throw new Error("`apiKey` is missing.");if(!o)throw new Error("`region` is missing.");if(o&&("string"!=typeof o||!v.includes(o)))throw new Error("`region` must be one of the following: ".concat(v.join(", ")));return function(e){var t,r=e.appId,a=e.apiKey,n=e.authMode,s=e.algoliaAgents,o=e.region,i=y(e,P),c=function(e,t,r="WithinHeaders"){const a={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?a:{},queryParameters:()=>"WithinQueryParameters"===r?a:{}}}(r,a,n),u=f(b(b({hosts:(t=o,[{url:"personalization.{region}.algolia.com".replace("{region}",t),accept:"readWrite",protocol:"https"}])},i),{},{algoliaAgent:g({algoliaAgents:s,client:"Personalization",version:w}),baseHeaders:b(b({"content-type":"text/plain"},c.headers()),i.baseHeaders),baseQueryParameters:b(b({},c.queryParameters()),i.baseQueryParameters)}));return{transporter:u,appId:r,clearCache:function(){return Promise.all([u.requestsCache.clear(),u.responsesCache.clear()]).then((function(){}))},get _ua(){return u.algoliaAgent.value},addAlgoliaAgent:function(e,t){u.algoliaAgent.add({segment:e,version:t})},del:function(e,t){var r=e.path,a=e.parameters;if(!r)throw new Error("Parameter `path` is required when calling `del`.");var n={method:"DELETE",path:"/1{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return u.request(n,t)},deleteUserProfile:function(e,t){var r=e.userToken;if(!r)throw new Error("Parameter `userToken` is required when calling `deleteUserProfile`.");var a={method:"DELETE",path:"/1/profiles/{userToken}".replace("{userToken}",encodeURIComponent(r)),queryParameters:{},headers:{}};return u.request(a,t)},get:function(e,t){var r=e.path,a=e.parameters;if(!r)throw new Error("Parameter `path` is required when calling `get`.");var n={method:"GET",path:"/1{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return u.request(n,t)},getPersonalizationStrategy:function(e){var t={method:"GET",path:"/1/strategies/personalization",queryParameters:{},headers:{}};return u.request(t,e)},getUserTokenProfile:function(e,t){var r=e.userToken;if(!r)throw new Error("Parameter `userToken` is required when calling `getUserTokenProfile`.");var a={method:"GET",path:"/1/profiles/personalization/{userToken}".replace("{userToken}",encodeURIComponent(r)),queryParameters:{},headers:{}};return u.request(a,t)},post:function(e,t){var r=e.path,a=e.parameters,n=e.body;if(!r)throw new Error("Parameter `path` is required when calling `post`.");var s={method:"POST",path:"/1{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:n||{}};return u.request(s,t)},put:function(e,t){var r=e.path,a=e.parameters,n=e.body;if(!r)throw new Error("Parameter `path` is required when calling `put`.");var s={method:"PUT",path:"/1{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:n||{}};return u.request(s,t)},setPersonalizationStrategy:function(e,t){if(!e)throw new Error("Parameter `personalizationStrategyParams` is required when calling `setPersonalizationStrategy`.");if(!e.eventScoring)throw new Error("Parameter `personalizationStrategyParams.eventScoring` is required when calling `setPersonalizationStrategy`.");if(!e.facetScoring)throw new Error("Parameter `personalizationStrategyParams.facetScoring` is required when calling `setPersonalizationStrategy`.");if(!e.personalizationImpact)throw new Error("Parameter `personalizationStrategyParams.personalizationImpact` is required when calling `setPersonalizationStrategy`.");var r={method:"POST",path:"/1/strategies/personalization",queryParameters:{},headers:{},data:e};return u.request(r,t)}}}(function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?q(Object(a),!0).forEach((function(r){t(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):q(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({appId:e,apiKey:s,region:o,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const a=(e,a)=>setTimeout((()=>{r.abort(),t({status:0,content:a,isTimedOut:!0})}),e),n=a(e.connectTimeout,"Connection timeout");let s;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===s&&(clearTimeout(n),s=a(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(n),clearTimeout(s),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(n),clearTimeout(s),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:n(),requestsCache:n({serializable:!1}),hostsCache:a({caches:[r({key:"".concat(w,"-").concat(e)}),n()]})},i))}}));
1
+ /*! client-personalization.umd.js | 5.0.0-alpha.71 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
2
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/client-personalization"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),s=a()[r];return Promise.all([s||t(),void 0!==s])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const o=a();return o[JSON.stringify(e)]=t,s().setItem(r,JSON.stringify(o)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,o={miss:()=>Promise.resolve()})=>s.get(e,a,o).catch((()=>r({caches:t}).get(e,a,o))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const o=JSON.stringify(r);if(o in t)return Promise.resolve(e.serializable?JSON.parse(t[o]):t[o]);const n=s();return n.then((e=>a.miss(e))).then((()=>n))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function o(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function n(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),n(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends i{constructor(e,t,r){super(e,r),n(this,"stackTrace",void 0),this.stackTrace=t}}class u extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class l extends c{constructor(e,t,r,s="ApiError"){super(e,r,s),n(this,"status",void 0),this.status=t}}class h extends i{constructor(e,t){super(e,"DeserializationError"),n(this,"response",void 0),this.response=t}}class d extends l{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),n(this,"error",void 0),this.error=r}}function m(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`)).join("&")}(r);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return s.length&&(a+=`?${s}`),a}function p(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function g({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:n,requester:i,requestsCache:c,responsesCache:g}){async function f(c,g,f=!0){const y=[],P=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,g),w=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,c.headers,g.headers),v="GET"===c.method?{...c.data,...g.data}:{},q={...s,...c.queryParameters,...v};if(a.value&&(q["x-algolia-agent"]=a.value),g&&g.queryParameters)for(const e of Object.keys(g.queryParameters))g.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(g.queryParameters[e])?q[e]=g.queryParameters[e].toString():q[e]=g.queryParameters[e];let T=0;const b=async(e,r)=>{const s=e.pop();if(void 0===s)throw new u(function(e){return e.map((e=>p(e)))}(y));let a=g.timeout;void 0===a&&(a=f?n.read:n.write);const v={data:P,headers:w,method:c.method,url:m(s,c.path,q),connectTimeout:r(T,n.connect),responseTimeout:r(T,a)},S=t=>{const r={request:v,response:t,host:s,triesLeft:e.length};return y.push(r),r},O=await i.send(v);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(O)){const a=S(O);return O.isTimedOut&&T++,console.log("Retryable failure",p(a)),await t.set(s,o(s,O.isTimedOut?"timed out":"down")),b(e,r)}if(function({status:e}){return 2==~~(e/100)}(O))return function(e){try{return JSON.parse(e.content)}catch(t){throw new h(t.message,e)}}(O);throw S(O),function({content:e,status:t},r){try{const s=JSON.parse(e);return"error"in s?new d(s.message,t,s.error,r):new l(s.message,t,r)}catch(e){}return new l(e,t,r)}(O,y)},S=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),O=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(o(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),n=[...s,...a];return{hosts:n.length>0?n:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(S);return b([...O.hosts].reverse(),O.getTimeout)}return{hostsCache:t,requester:i,timeouts:n,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return f(e,t,a);const o=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return o();const n={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return g.get(n,(()=>c.get(n,(()=>c.set(n,o()).then((e=>Promise.all([c.delete(n),e])),(e=>Promise.all([c.delete(n),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>g.set(n,e)})},requestsCache:c,responsesCache:g}}function f({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const y="5.0.0-alpha.71",P=["eu","us"];e.apiClientVersion=y,e.personalizationClient=function(e,a,o,n){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");if(!o||o&&("string"!=typeof o||!P.includes(o)))throw new Error(`\`region\` is required and must be one of the following: ${P.join(", ")}`);return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,region:a,...o}){const n=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(e,t,r),i=g({hosts:(c=a,[{url:"personalization.{region}.algolia.com".replace("{region}",c),accept:"readWrite",protocol:"https"}]),...o,algoliaAgent:f({algoliaAgents:s,client:"Personalization",version:y}),baseHeaders:{"content-type":"text/plain",...n.headers(),...o.baseHeaders},baseQueryParameters:{...n.queryParameters(),...o.baseQueryParameters}});var c;return{transporter:i,appId:e,clearCache:()=>Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then((()=>{})),get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,t){i.algoliaAgent.add({segment:e,version:t})},del({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `del`.");const s={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return i.request(s,r)},deleteUserProfile({userToken:e},t){if(!e)throw new Error("Parameter `userToken` is required when calling `deleteUserProfile`.");const r={method:"DELETE",path:"/1/profiles/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},get({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `get`.");const s={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return i.request(s,r)},getPersonalizationStrategy(e){const t={method:"GET",path:"/1/strategies/personalization",queryParameters:{},headers:{}};return i.request(t,e)},getUserTokenProfile({userToken:e},t){if(!e)throw new Error("Parameter `userToken` is required when calling `getUserTokenProfile`.");const r={method:"GET",path:"/1/profiles/personalization/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},post({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const a={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},put({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `put`.");const a={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},setPersonalizationStrategy(e,t){if(!e)throw new Error("Parameter `personalizationStrategyParams` is required when calling `setPersonalizationStrategy`.");if(!e.eventScoring)throw new Error("Parameter `personalizationStrategyParams.eventScoring` is required when calling `setPersonalizationStrategy`.");if(!e.facetScoring)throw new Error("Parameter `personalizationStrategyParams.facetScoring` is required when calling `setPersonalizationStrategy`.");if(!e.personalizationImpact)throw new Error("Parameter `personalizationStrategyParams.personalizationImpact` is required when calling `setPersonalizationStrategy`.");const r={method:"POST",path:"/1/strategies/personalization",queryParameters:{},headers:{},data:e};return i.request(r,t)}}}({appId:e,apiKey:a,region:o,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let o;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===o&&(clearTimeout(a),o=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(o),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(o),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:r({caches:[t({key:`${y}-${e}`}),s()]}),...n})}}));
@@ -1,79 +1,79 @@
1
- /**
2
- * Properties for the `del` method.
3
- */
4
- export declare type DelProps = {
5
- /**
6
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
7
- */
8
- path: string;
9
- /**
10
- * Query parameters to be applied to the current query.
11
- */
12
- parameters?: Record<string, any>;
13
- };
14
- /**
15
- * Properties for the `deleteUserProfile` method.
16
- */
17
- export declare type DeleteUserProfileProps = {
18
- /**
19
- * UserToken representing the user for which to fetch the Personalization profile.
20
- */
21
- userToken: string;
22
- };
23
- /**
24
- * Properties for the `get` method.
25
- */
26
- export declare type GetProps = {
27
- /**
28
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
29
- */
30
- path: string;
31
- /**
32
- * Query parameters to be applied to the current query.
33
- */
34
- parameters?: Record<string, any>;
35
- };
36
- /**
37
- * Properties for the `getUserTokenProfile` method.
38
- */
39
- export declare type GetUserTokenProfileProps = {
40
- /**
41
- * UserToken representing the user for which to fetch the Personalization profile.
42
- */
43
- userToken: string;
44
- };
45
- /**
46
- * Properties for the `post` method.
47
- */
48
- export declare type PostProps = {
49
- /**
50
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
51
- */
52
- path: string;
53
- /**
54
- * Query parameters to be applied to the current query.
55
- */
56
- parameters?: Record<string, any>;
57
- /**
58
- * The parameters to send with the custom request.
59
- */
60
- body?: Record<string, any>;
61
- };
62
- /**
63
- * Properties for the `put` method.
64
- */
65
- export declare type PutProps = {
66
- /**
67
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
68
- */
69
- path: string;
70
- /**
71
- * Query parameters to be applied to the current query.
72
- */
73
- parameters?: Record<string, any>;
74
- /**
75
- * The parameters to send with the custom request.
76
- */
77
- body?: Record<string, any>;
78
- };
1
+ /**
2
+ * Properties for the `del` method.
3
+ */
4
+ export type DelProps = {
5
+ /**
6
+ * The path of the API endpoint to target, anything after the /1 needs to be specified.
7
+ */
8
+ path: string;
9
+ /**
10
+ * Query parameters to be applied to the current query.
11
+ */
12
+ parameters?: Record<string, any>;
13
+ };
14
+ /**
15
+ * Properties for the `deleteUserProfile` method.
16
+ */
17
+ export type DeleteUserProfileProps = {
18
+ /**
19
+ * UserToken representing the user for which to fetch the Personalization profile.
20
+ */
21
+ userToken: string;
22
+ };
23
+ /**
24
+ * Properties for the `get` method.
25
+ */
26
+ export type GetProps = {
27
+ /**
28
+ * The path of the API endpoint to target, anything after the /1 needs to be specified.
29
+ */
30
+ path: string;
31
+ /**
32
+ * Query parameters to be applied to the current query.
33
+ */
34
+ parameters?: Record<string, any>;
35
+ };
36
+ /**
37
+ * Properties for the `getUserTokenProfile` method.
38
+ */
39
+ export type GetUserTokenProfileProps = {
40
+ /**
41
+ * UserToken representing the user for which to fetch the Personalization profile.
42
+ */
43
+ userToken: string;
44
+ };
45
+ /**
46
+ * Properties for the `post` method.
47
+ */
48
+ export type PostProps = {
49
+ /**
50
+ * The path of the API endpoint to target, anything after the /1 needs to be specified.
51
+ */
52
+ path: string;
53
+ /**
54
+ * Query parameters to be applied to the current query.
55
+ */
56
+ parameters?: Record<string, any>;
57
+ /**
58
+ * The parameters to send with the custom request.
59
+ */
60
+ body?: Record<string, any>;
61
+ };
62
+ /**
63
+ * Properties for the `put` method.
64
+ */
65
+ export type PutProps = {
66
+ /**
67
+ * The path of the API endpoint to target, anything after the /1 needs to be specified.
68
+ */
69
+ path: string;
70
+ /**
71
+ * Query parameters to be applied to the current query.
72
+ */
73
+ parameters?: Record<string, any>;
74
+ /**
75
+ * The parameters to send with the custom request.
76
+ */
77
+ body?: Record<string, any>;
78
+ };
79
79
  //# sourceMappingURL=clientMethodProps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../../../packages/client-personalization/model/clientMethodProps.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,oBAAY,sBAAsB,GAAG;IACnC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,oBAAY,wBAAwB,GAAG;IACrC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS,GAAG;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC"}
1
+ {"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC"}
@@ -1,11 +1,11 @@
1
- export declare type DeleteUserProfileResponse = {
2
- /**
3
- * UserToken representing the user for which to fetch the Personalization profile.
4
- */
5
- userToken: string;
6
- /**
7
- * A date until which the data can safely be considered as deleted for the given user. Any data received after the `deletedUntil` date will start building a new user profile.
8
- */
9
- deletedUntil: string;
10
- };
1
+ export type DeleteUserProfileResponse = {
2
+ /**
3
+ * UserToken representing the user for which to fetch the Personalization profile.
4
+ */
5
+ userToken: string;
6
+ /**
7
+ * A date until which the data can safely be considered as deleted for the given user. Any data received after the `deletedUntil` date will start building a new user profile.
8
+ */
9
+ deletedUntil: string;
10
+ };
11
11
  //# sourceMappingURL=deleteUserProfileResponse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deleteUserProfileResponse.d.ts","sourceRoot":"","sources":["../../../../packages/client-personalization/model/deleteUserProfileResponse.ts"],"names":[],"mappings":"AAEA,oBAAY,yBAAyB,GAAG;IACtC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"deleteUserProfileResponse.d.ts","sourceRoot":"","sources":["../../model/deleteUserProfileResponse.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -1,7 +1,7 @@
1
- /**
2
- * Error.
3
- */
4
- export declare type ErrorBase = Record<string, any> & {
5
- message?: string;
6
- };
1
+ /**
2
+ * Error.
3
+ */
4
+ export type ErrorBase = Record<string, any> & {
5
+ message?: string;
6
+ };
7
7
  //# sourceMappingURL=errorBase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errorBase.d.ts","sourceRoot":"","sources":["../../../../packages/client-personalization/model/errorBase.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
1
+ {"version":3,"file":"errorBase.d.ts","sourceRoot":"","sources":["../../model/errorBase.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -1,15 +1,15 @@
1
- export declare type EventScoring = {
2
- /**
3
- * The score for the event.
4
- */
5
- score: number;
6
- /**
7
- * The name of the event.
8
- */
9
- eventName: string;
10
- /**
11
- * The type of the event.
12
- */
13
- eventType: string;
14
- };
1
+ export type EventScoring = {
2
+ /**
3
+ * The score for the event.
4
+ */
5
+ score: number;
6
+ /**
7
+ * The name of the event.
8
+ */
9
+ eventName: string;
10
+ /**
11
+ * The type of the event.
12
+ */
13
+ eventType: string;
14
+ };
15
15
  //# sourceMappingURL=eventScoring.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eventScoring.d.ts","sourceRoot":"","sources":["../../../../packages/client-personalization/model/eventScoring.ts"],"names":[],"mappings":"AAEA,oBAAY,YAAY,GAAG;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
1
+ {"version":3,"file":"eventScoring.d.ts","sourceRoot":"","sources":["../../model/eventScoring.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
@@ -1,11 +1,11 @@
1
- export declare type FacetScoring = {
2
- /**
3
- * The score for the event.
4
- */
5
- score: number;
6
- /**
7
- * The name of the facet.
8
- */
9
- facetName: string;
10
- };
1
+ export type FacetScoring = {
2
+ /**
3
+ * The score for the event.
4
+ */
5
+ score: number;
6
+ /**
7
+ * The name of the facet.
8
+ */
9
+ facetName: string;
10
+ };
11
11
  //# sourceMappingURL=facetScoring.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"facetScoring.d.ts","sourceRoot":"","sources":["../../../../packages/client-personalization/model/facetScoring.ts"],"names":[],"mappings":"AAEA,oBAAY,YAAY,GAAG;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
1
+ {"version":3,"file":"facetScoring.d.ts","sourceRoot":"","sources":["../../model/facetScoring.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
@@ -1,15 +1,15 @@
1
- export declare type GetUserTokenResponse = {
2
- /**
3
- * UserToken representing the user for which to fetch the Personalization profile.
4
- */
5
- userToken: string;
6
- /**
7
- * Date of last event update. (ISO-8601 format).
8
- */
9
- lastEventAt: string;
10
- /**
11
- * The userToken scores.
12
- */
13
- scores: Record<string, any>;
14
- };
1
+ export type GetUserTokenResponse = {
2
+ /**
3
+ * UserToken representing the user for which to fetch the Personalization profile.
4
+ */
5
+ userToken: string;
6
+ /**
7
+ * Date of last event update. (ISO-8601 format).
8
+ */
9
+ lastEventAt: string;
10
+ /**
11
+ * The userToken scores.
12
+ */
13
+ scores: Record<string, any>;
14
+ };
15
15
  //# sourceMappingURL=getUserTokenResponse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getUserTokenResponse.d.ts","sourceRoot":"","sources":["../../../../packages/client-personalization/model/getUserTokenResponse.ts"],"names":[],"mappings":"AAEA,oBAAY,oBAAoB,GAAG;IACjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B,CAAC"}
1
+ {"version":3,"file":"getUserTokenResponse.d.ts","sourceRoot":"","sources":["../../model/getUserTokenResponse.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B,CAAC"}
@@ -1,9 +1,9 @@
1
- export * from './deleteUserProfileResponse';
2
- export * from './errorBase';
3
- export * from './eventScoring';
4
- export * from './facetScoring';
5
- export * from './getUserTokenResponse';
6
- export * from './personalizationStrategyParams';
7
- export * from './setPersonalizationStrategyResponse';
8
- export * from './clientMethodProps';
1
+ export * from './deleteUserProfileResponse';
2
+ export * from './errorBase';
3
+ export * from './eventScoring';
4
+ export * from './facetScoring';
5
+ export * from './getUserTokenResponse';
6
+ export * from './personalizationStrategyParams';
7
+ export * from './setPersonalizationStrategyResponse';
8
+ export * from './clientMethodProps';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/client-personalization/model/index.ts"],"names":[],"mappings":"AAEA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../model/index.ts"],"names":[],"mappings":"AAEA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qBAAqB,CAAC"}
@@ -1,17 +1,17 @@
1
- import type { EventScoring } from './eventScoring';
2
- import type { FacetScoring } from './facetScoring';
3
- export declare type PersonalizationStrategyParams = {
4
- /**
5
- * Scores associated with the events.
6
- */
7
- eventScoring: EventScoring[];
8
- /**
9
- * Scores associated with the facets.
10
- */
11
- facetScoring: FacetScoring[];
12
- /**
13
- * The impact that personalization has on search results: a number between 0 (personalization disabled) and 100 (personalization fully enabled).
14
- */
15
- personalizationImpact: number;
16
- };
1
+ import type { EventScoring } from './eventScoring';
2
+ import type { FacetScoring } from './facetScoring';
3
+ export type PersonalizationStrategyParams = {
4
+ /**
5
+ * Scores associated with the events.
6
+ */
7
+ eventScoring: EventScoring[];
8
+ /**
9
+ * Scores associated with the facets.
10
+ */
11
+ facetScoring: FacetScoring[];
12
+ /**
13
+ * The impact that personalization has on search results: a number between 0 (personalization disabled) and 100 (personalization fully enabled).
14
+ */
15
+ personalizationImpact: number;
16
+ };
17
17
  //# sourceMappingURL=personalizationStrategyParams.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"personalizationStrategyParams.d.ts","sourceRoot":"","sources":["../../../../packages/client-personalization/model/personalizationStrategyParams.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,oBAAY,6BAA6B,GAAG;IAC1C;;OAEG;IACH,YAAY,EAAE,YAAY,EAAE,CAAC;IAE7B;;OAEG;IACH,YAAY,EAAE,YAAY,EAAE,CAAC;IAE7B;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC"}
1
+ {"version":3,"file":"personalizationStrategyParams.d.ts","sourceRoot":"","sources":["../../model/personalizationStrategyParams.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,YAAY,EAAE,YAAY,EAAE,CAAC;IAE7B;;OAEG;IACH,YAAY,EAAE,YAAY,EAAE,CAAC;IAE7B;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC"}
@@ -1,7 +1,7 @@
1
- export declare type SetPersonalizationStrategyResponse = {
2
- /**
3
- * A message confirming the strategy update.
4
- */
5
- message: string;
6
- };
1
+ export type SetPersonalizationStrategyResponse = {
2
+ /**
3
+ * A message confirming the strategy update.
4
+ */
5
+ message: string;
6
+ };
7
7
  //# sourceMappingURL=setPersonalizationStrategyResponse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"setPersonalizationStrategyResponse.d.ts","sourceRoot":"","sources":["../../../../packages/client-personalization/model/setPersonalizationStrategyResponse.ts"],"names":[],"mappings":"AAEA,oBAAY,kCAAkC,GAAG;IAC/C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
1
+ {"version":3,"file":"setPersonalizationStrategyResponse.d.ts","sourceRoot":"","sources":["../../model/setPersonalizationStrategyResponse.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,kCAAkC,GAAG;IAC/C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}