@algolia/client-abtesting 5.0.0-alpha.9 → 5.0.0-alpha.91
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.
- package/dist/builds/browser.d.ts +5 -5
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +5 -5
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/{client-abtesting.cjs.js → client-abtesting.cjs} +324 -318
- package/dist/client-abtesting.esm.browser.js +506 -548
- package/dist/client-abtesting.esm.node.js +324 -316
- package/dist/client-abtesting.umd.js +2 -2
- package/dist/model/aBTest.d.ts +51 -39
- package/dist/model/aBTest.d.ts.map +1 -1
- package/dist/model/aBTestResponse.d.ts +14 -14
- package/dist/model/aBTestResponse.d.ts.map +1 -1
- package/dist/model/abTestsVariant.d.ts +14 -14
- package/dist/model/abTestsVariant.d.ts.map +1 -1
- package/dist/model/abTestsVariantSearchParams.d.ts +3 -3
- package/dist/model/abTestsVariantSearchParams.d.ts.map +1 -1
- package/dist/model/addABTestsRequest.d.ts +15 -15
- package/dist/model/addABTestsRequest.d.ts.map +1 -1
- package/dist/model/addABTestsVariant.d.ts +3 -3
- package/dist/model/addABTestsVariant.d.ts.map +1 -1
- package/dist/model/clientMethodProps.d.ts +108 -100
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/currenciesValue.d.ts +19 -0
- package/dist/model/currenciesValue.d.ts.map +1 -0
- package/dist/model/customSearchParams.d.ts +6 -3
- package/dist/model/customSearchParams.d.ts.map +1 -1
- package/dist/model/errorBase.d.ts +6 -6
- package/dist/model/errorBase.d.ts.map +1 -1
- package/dist/model/filterEffects.d.ts +10 -0
- package/dist/model/filterEffects.d.ts.map +1 -0
- package/dist/model/filterEffectsEmptySearch.d.ts +14 -0
- package/dist/model/filterEffectsEmptySearch.d.ts.map +1 -0
- package/dist/model/filterEffectsOutliers.d.ts +14 -0
- package/dist/model/filterEffectsOutliers.d.ts.map +1 -0
- package/dist/model/index.d.ts +15 -11
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/listABTestsResponse.d.ts +15 -15
- package/dist/model/listABTestsResponse.d.ts.map +1 -1
- package/dist/model/variant.d.ts +73 -50
- package/dist/model/variant.d.ts.map +1 -1
- package/dist/src/abtestingClient.d.ts +126 -124
- package/dist/src/abtestingClient.d.ts.map +1 -1
- package/index.js +1 -1
- package/model/aBTest.ts +25 -10
- package/model/aBTestResponse.ts +4 -4
- package/model/abTestsVariant.ts +4 -4
- package/model/abTestsVariantSearchParams.ts +1 -1
- package/model/addABTestsRequest.ts +4 -4
- package/model/addABTestsVariant.ts +1 -1
- package/model/clientMethodProps.ts +23 -15
- package/model/currenciesValue.ts +23 -0
- package/model/customSearchParams.ts +4 -1
- package/model/errorBase.ts +1 -1
- package/model/filterEffects.ts +13 -0
- package/model/filterEffectsEmptySearch.ts +16 -0
- package/model/filterEffectsOutliers.ts +16 -0
- package/model/index.ts +5 -1
- package/model/listABTestsResponse.ts +4 -4
- package/model/variant.ts +43 -13
- package/package.json +30 -13
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! client-abtesting.umd.js | 5.0.0-alpha.
|
|
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-abtesting"]={})}(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 n=a();return n[JSON.stringify(e)]=t,s().setItem(r,JSON.stringify(n)),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,n={miss:()=>Promise.resolve()})=>s.get(e,a,n).catch((()=>r({caches:t}).get(e,a,n))),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 n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=s();return o.then((e=>a.miss(e))).then((()=>o))},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 n(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 o(e,t,r){return 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),o(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends i{constructor(e,t,r){super(e,r),o(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){super(e,r,"ApiError"),o(this,"status",void 0),this.status=t}}class d extends i{constructor(e,t){super(e,"DeserializationError"),o(this,"response",void 0),this.response=t}}function h(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}=${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 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 p({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:o,requester:i,requestsCache:c,responsesCache:p}){async function g(c,p,g=!0){const f=[],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,p),P=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,p.headers),w="GET"===c.method?{...c.data,...p.data}:{},q={...s,...c.queryParameters,...w};if(a.value&&(q["x-algolia-agent"]=a.value),p&&p.queryParameters)for(const e of Object.keys(p.queryParameters))p.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(p.queryParameters[e])?q[e]=p.queryParameters[e].toString():q[e]=p.queryParameters[e];let T=0;const v=async(e,r)=>{const s=e.pop();if(void 0===s)throw new u(function(e){return e.map((e=>m(e)))}(f));let a=p.timeout;void 0===a&&(a=g?o.read:o.write);const w={data:y,headers:P,method:c.method,url:h(s,c.path,q),connectTimeout:r(T,o.connect),responseTimeout:r(T,a)},b=t=>{const r={request:w,response:t,host:s,triesLeft:e.length};return f.push(r),r},O=await i.send(w);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=b(O);return O.isTimedOut&&T++,console.log("Retryable failure",m(a)),await t.set(s,n(s,O.isTimedOut?"timed out":"down")),v(e,r)}if(function({status:e}){return 2==~~(e/100)}(O))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(O);throw b(O),function({content:e,status:t},r){let s=e;try{s=JSON.parse(e).message}catch(e){}return new l(s,t,r)}(O,f)},b=e.filter((e=>"readWrite"===e.accept||(g?"read"===e.accept:"write"===e.accept))),O=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(n(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),o=[...s,...a];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(b);return v([...O.hosts].reverse(),O.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return g(e,t,a);const n=()=>g(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return p.get(o,(()=>c.get(o,(()=>c.set(o,n()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>p.set(o,e)})},requestsCache:c,responsesCache:p}}function g({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 f="5.0.0-alpha.9",y=["de","us"];e.abtestingClient=function(e,a,n,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");if(n&&("string"!=typeof n||!y.includes(n)))throw new Error(`\`region\` must be one of the following: ${y.join(", ")}`);return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,region:a,...n}){const o=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=p({hosts:(c=a,[{url:c?"analytics.{region}.algolia.com".replace("{region}",c):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...n,algoliaAgent:g({algoliaAgents:s,client:"Abtesting",version:f}),baseHeaders:{"content-type":"text/plain",...o.headers(),...n.baseHeaders},baseQueryParameters:{...o.queryParameters(),...n.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})},addABTests(e,t){if(!e)throw new Error("Parameter `addABTestsRequest` is required when calling `addABTests`.");if(!e.name)throw new Error("Parameter `addABTestsRequest.name` is required when calling `addABTests`.");if(!e.variant)throw new Error("Parameter `addABTestsRequest.variant` is required when calling `addABTests`.");if(!e.endAt)throw new Error("Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.");const r={method:"POST",path:"/2/abtests",queryParameters:{},headers:{},data:e};return i.request(r,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)},deleteABTest({id:e},t){if(!e)throw new Error("Parameter `id` is required when calling `deleteABTest`.");const r={method:"DELETE",path:"/2/abtests/{id}".replace("{id}",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)},getABTest({id:e},t){if(!e)throw new Error("Parameter `id` is required when calling `getABTest`.");const r={method:"GET",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},listABTests({offset:e,limit:t},r){const s={};void 0!==e&&(s.offset=e.toString()),void 0!==t&&(s.limit=t.toString());const a={method:"GET",path:"/2/abtests",queryParameters:s,headers:{}};return i.request(a,r)},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)},stopABTest({id:e},t){if(!e)throw new Error("Parameter `id` is required when calling `stopABTest`.");const r={method:"POST",path:"/2/abtests/{id}/stop".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)}}}({appId:e,apiKey:a,region:n,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 n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(n),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:`5.0.0-alpha.9-${e}`}),s()]}),...o})},e.apiClientVersion=f}));
|
|
1
|
+
/*! client-abtesting.umd.js | 5.0.0-alpha.91 | © 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-abtesting"]={})}(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 n=a();return n[JSON.stringify(e)]=t,s().setItem(r,JSON.stringify(n)),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,n={miss:()=>Promise.resolve()})=>s.get(e,a,n).catch((()=>r({caches:t}).get(e,a,n))),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 n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=s();return o.then((e=>a.miss(e))).then((()=>o))},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 n(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 o(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),o(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends i{constructor(e,t,r){super(e,r),o(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),o(this,"status",void 0),this.status=t}}class d extends i{constructor(e,t){super(e,"DeserializationError"),o(this,"response",void 0),this.response=t}}class h extends l{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),o(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 f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:o,requester:i,requestsCache:c,responsesCache:f}){async function g(c,f,g=!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,f),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,f.headers),v="GET"===c.method?{...c.data,...f.data}:{},q={...s,...c.queryParameters,...v};if(a.value&&(q["x-algolia-agent"]=a.value),f&&f.queryParameters)for(const e of Object.keys(f.queryParameters))f.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(f.queryParameters[e])?q[e]=f.queryParameters[e].toString():q[e]=f.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=f.timeout;void 0===a&&(a=g?o.read:o.write);const v={data:P,headers:w,method:c.method,url:m(s,c.path,q),connectTimeout:r(T,o.connect),responseTimeout:r(T,a)},O=t=>{const r={request:v,response:t,host:s,triesLeft:e.length};return y.push(r),r},A=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)}(A)){const a=O(A);return A.isTimedOut&&T++,console.log("Retryable failure",p(a)),await t.set(s,n(s,A.isTimedOut?"timed out":"down")),b(e,r)}if(function({status:e}){return 2==~~(e/100)}(A))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(A);throw O(A),function({content:e,status:t},r){try{const s=JSON.parse(e);return"error"in s?new h(s.message,t,s.error,r):new l(s.message,t,r)}catch(e){}return new l(e,t,r)}(A,y)},O=e.filter((e=>"readWrite"===e.accept||(g?"read"===e.accept:"write"===e.accept))),A=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(n(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),o=[...s,...a];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(O);return b([...A.hosts].reverse(),A.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return g(e,t,a);const n=()=>g(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return f.get(o,(()=>c.get(o,(()=>c.set(o,n()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.set(o,e)})},requestsCache:c,responsesCache:f}}function g({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.91",P=["de","us"];e.abtestingClient=function(e,a,n,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");if(n&&("string"!=typeof n||!P.includes(n)))throw new Error(`\`region\` must be one of the following: ${P.join(", ")}`);return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,region:a,...n}){const o=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=f({hosts:(c=a,[{url:c?"analytics.{region}.algolia.com".replace("{region}",c):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...n,algoliaAgent:g({algoliaAgents:s,client:"Abtesting",version:y}),baseHeaders:{"content-type":"text/plain",...o.headers(),...n.baseHeaders},baseQueryParameters:{...o.queryParameters(),...n.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})},addABTests(e,t){if(!e)throw new Error("Parameter `addABTestsRequest` is required when calling `addABTests`.");if(!e.name)throw new Error("Parameter `addABTestsRequest.name` is required when calling `addABTests`.");if(!e.variants)throw new Error("Parameter `addABTestsRequest.variants` is required when calling `addABTests`.");if(!e.endAt)throw new Error("Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.");const r={method:"POST",path:"/2/abtests",queryParameters:{},headers:{},data:e};return i.request(r,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)},deleteABTest({id:e},t){if(!e)throw new Error("Parameter `id` is required when calling `deleteABTest`.");const r={method:"DELETE",path:"/2/abtests/{id}".replace("{id}",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)},getABTest({id:e},t){if(!e)throw new Error("Parameter `id` is required when calling `getABTest`.");const r={method:"GET",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},listABTests({offset:e,limit:t,indexPrefix:r,indexSuffix:s}={},a=void 0){const n={};void 0!==e&&(n.offset=e.toString()),void 0!==t&&(n.limit=t.toString()),void 0!==r&&(n.indexPrefix=r.toString()),void 0!==s&&(n.indexSuffix=s.toString());const o={method:"GET",path:"/2/abtests",queryParameters:n,headers:{}};return i.request(o,a)},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)},stopABTest({id:e},t){if(!e)throw new Error("Parameter `id` is required when calling `stopABTest`.");const r={method:"POST",path:"/2/abtests/{id}/stop".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)}}}({appId:e,apiKey:a,region:n,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 n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(n),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()]}),...o})},e.apiClientVersion=y}));
|
package/dist/model/aBTest.d.ts
CHANGED
|
@@ -1,40 +1,52 @@
|
|
|
1
|
-
import type { Variant } from './variant';
|
|
2
|
-
export
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
abTestID: number;
|
|
7
|
-
/**
|
|
8
|
-
* A/B test significance based on click data.
|
|
9
|
-
*/
|
|
10
|
-
clickSignificance: number;
|
|
11
|
-
/**
|
|
12
|
-
* A/B test significance based on conversion
|
|
13
|
-
*/
|
|
14
|
-
conversionSignificance: number;
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
import type { Variant } from './variant';
|
|
2
|
+
export type ABTest = {
|
|
3
|
+
/**
|
|
4
|
+
* Unique A/B test ID.
|
|
5
|
+
*/
|
|
6
|
+
abTestID: number;
|
|
7
|
+
/**
|
|
8
|
+
* [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on click data. A value of 0.95 or over is considered to be _significant_.
|
|
9
|
+
*/
|
|
10
|
+
clickSignificance: number;
|
|
11
|
+
/**
|
|
12
|
+
* [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on conversion. A value of 0.95 or over is considered to be _significant_.
|
|
13
|
+
*/
|
|
14
|
+
conversionSignificance: number;
|
|
15
|
+
/**
|
|
16
|
+
* [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on add-to-cart data. A value of 0.95 or over is considered to be _significant_.
|
|
17
|
+
*/
|
|
18
|
+
addToCartSignificance: number;
|
|
19
|
+
/**
|
|
20
|
+
* [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on purchase data. A value of 0.95 or over is considered to be _significant_.
|
|
21
|
+
*/
|
|
22
|
+
purchaseSignificance: number;
|
|
23
|
+
/**
|
|
24
|
+
* [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on revenue data. A value of 0.95 or over is considered to be _significant_.
|
|
25
|
+
*/
|
|
26
|
+
revenueSignificance: Record<string, number>;
|
|
27
|
+
/**
|
|
28
|
+
* Update date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
|
|
29
|
+
*/
|
|
30
|
+
updatedAt: string;
|
|
31
|
+
/**
|
|
32
|
+
* Creation date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
|
|
33
|
+
*/
|
|
34
|
+
createdAt: string;
|
|
35
|
+
/**
|
|
36
|
+
* End date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
|
|
37
|
+
*/
|
|
38
|
+
endAt: string;
|
|
39
|
+
/**
|
|
40
|
+
* A/B test name.
|
|
41
|
+
*/
|
|
42
|
+
name: string;
|
|
43
|
+
/**
|
|
44
|
+
* A/B test status.
|
|
45
|
+
*/
|
|
46
|
+
status: string;
|
|
47
|
+
/**
|
|
48
|
+
* A/B test variants.
|
|
49
|
+
*/
|
|
50
|
+
variants: Variant[];
|
|
51
|
+
};
|
|
40
52
|
//# sourceMappingURL=aBTest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aBTest.d.ts","sourceRoot":"","sources":["../../model/aBTest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,
|
|
1
|
+
{"version":3,"file":"aBTest.d.ts","sourceRoot":"","sources":["../../model/aBTest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,MAAM,MAAM,GAAG;IACnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE5C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
*/
|
|
5
|
-
index: string;
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
abTestID: number;
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
taskID: number;
|
|
14
|
-
};
|
|
1
|
+
export type ABTestResponse = {
|
|
2
|
+
/**
|
|
3
|
+
* A/B test index.
|
|
4
|
+
*/
|
|
5
|
+
index: string;
|
|
6
|
+
/**
|
|
7
|
+
* Unique A/B test ID.
|
|
8
|
+
*/
|
|
9
|
+
abTestID: number;
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the `task` operation and this `taskID`.
|
|
12
|
+
*/
|
|
13
|
+
taskID: number;
|
|
14
|
+
};
|
|
15
15
|
//# sourceMappingURL=aBTestResponse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aBTestResponse.d.ts","sourceRoot":"","sources":["../../model/aBTestResponse.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"aBTestResponse.d.ts","sourceRoot":"","sources":["../../model/aBTestResponse.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
*/
|
|
5
|
-
index: string;
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
trafficPercentage: number;
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
description?: string;
|
|
14
|
-
};
|
|
1
|
+
export type AbTestsVariant = {
|
|
2
|
+
/**
|
|
3
|
+
* A/B test index.
|
|
4
|
+
*/
|
|
5
|
+
index: string;
|
|
6
|
+
/**
|
|
7
|
+
* A/B test traffic percentage.
|
|
8
|
+
*/
|
|
9
|
+
trafficPercentage: number;
|
|
10
|
+
/**
|
|
11
|
+
* A/B test description.
|
|
12
|
+
*/
|
|
13
|
+
description?: string;
|
|
14
|
+
};
|
|
15
15
|
//# sourceMappingURL=abTestsVariant.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abTestsVariant.d.ts","sourceRoot":"","sources":["../../model/abTestsVariant.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"abTestsVariant.d.ts","sourceRoot":"","sources":["../../model/abTestsVariant.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AbTestsVariant } from './abTestsVariant';
|
|
2
|
-
import type { CustomSearchParams } from './customSearchParams';
|
|
3
|
-
export
|
|
1
|
+
import type { AbTestsVariant } from './abTestsVariant';
|
|
2
|
+
import type { CustomSearchParams } from './customSearchParams';
|
|
3
|
+
export type AbTestsVariantSearchParams = AbTestsVariant & CustomSearchParams;
|
|
4
4
|
//# sourceMappingURL=abTestsVariantSearchParams.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abTestsVariantSearchParams.d.ts","sourceRoot":"","sources":["../../model/abTestsVariantSearchParams.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,
|
|
1
|
+
{"version":3,"file":"abTestsVariantSearchParams.d.ts","sourceRoot":"","sources":["../../model/abTestsVariantSearchParams.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,MAAM,0BAA0B,GAAG,cAAc,GAAG,kBAAkB,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { AddABTestsVariant } from './addABTestsVariant';
|
|
2
|
-
export
|
|
3
|
-
/**
|
|
4
|
-
* A/B test name.
|
|
5
|
-
*/
|
|
6
|
-
name: string;
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* End date
|
|
13
|
-
*/
|
|
14
|
-
endAt: string;
|
|
15
|
-
};
|
|
1
|
+
import type { AddABTestsVariant } from './addABTestsVariant';
|
|
2
|
+
export type AddABTestsRequest = {
|
|
3
|
+
/**
|
|
4
|
+
* A/B test name.
|
|
5
|
+
*/
|
|
6
|
+
name: string;
|
|
7
|
+
/**
|
|
8
|
+
* A/B test variants.
|
|
9
|
+
*/
|
|
10
|
+
variants: AddABTestsVariant[];
|
|
11
|
+
/**
|
|
12
|
+
* End date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
|
|
13
|
+
*/
|
|
14
|
+
endAt: string;
|
|
15
|
+
};
|
|
16
16
|
//# sourceMappingURL=addABTestsRequest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addABTestsRequest.d.ts","sourceRoot":"","sources":["../../model/addABTestsRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,
|
|
1
|
+
{"version":3,"file":"addABTestsRequest.d.ts","sourceRoot":"","sources":["../../model/addABTestsRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAE9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AbTestsVariant } from './abTestsVariant';
|
|
2
|
-
import type { AbTestsVariantSearchParams } from './abTestsVariantSearchParams';
|
|
3
|
-
export
|
|
1
|
+
import type { AbTestsVariant } from './abTestsVariant';
|
|
2
|
+
import type { AbTestsVariantSearchParams } from './abTestsVariantSearchParams';
|
|
3
|
+
export type AddABTestsVariant = AbTestsVariant | AbTestsVariantSearchParams;
|
|
4
4
|
//# sourceMappingURL=addABTestsVariant.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addABTestsVariant.d.ts","sourceRoot":"","sources":["../../model/addABTestsVariant.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE/E,
|
|
1
|
+
{"version":3,"file":"addABTestsVariant.d.ts","sourceRoot":"","sources":["../../model/addABTestsVariant.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE/E,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG,0BAA0B,CAAC"}
|
|
@@ -1,101 +1,109 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Properties for the `del` method.
|
|
3
|
-
*/
|
|
4
|
-
export
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
path: string;
|
|
9
|
-
/**
|
|
10
|
-
* Query parameters to
|
|
11
|
-
*/
|
|
12
|
-
parameters?: Record<string, any>;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Properties for the `deleteABTest` method.
|
|
16
|
-
*/
|
|
17
|
-
export
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
*/
|
|
21
|
-
id: number;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Properties for the `get` method.
|
|
25
|
-
*/
|
|
26
|
-
export
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
path: string;
|
|
31
|
-
/**
|
|
32
|
-
* Query parameters to
|
|
33
|
-
*/
|
|
34
|
-
parameters?: Record<string, any>;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Properties for the `getABTest` method.
|
|
38
|
-
*/
|
|
39
|
-
export
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
*/
|
|
43
|
-
id: number;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* Properties for the `listABTests` method.
|
|
47
|
-
*/
|
|
48
|
-
export
|
|
49
|
-
/**
|
|
50
|
-
* Position of the starting record. Used for paging. 0 is the first record.
|
|
51
|
-
*/
|
|
52
|
-
offset?: number;
|
|
53
|
-
/**
|
|
54
|
-
* Number of records to return
|
|
55
|
-
*/
|
|
56
|
-
limit?: number;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
*
|
|
89
|
-
*/
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Properties for the `del` method.
|
|
3
|
+
*/
|
|
4
|
+
export type DelProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
7
|
+
*/
|
|
8
|
+
path: string;
|
|
9
|
+
/**
|
|
10
|
+
* Query parameters to apply to the current query.
|
|
11
|
+
*/
|
|
12
|
+
parameters?: Record<string, any>;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Properties for the `deleteABTest` method.
|
|
16
|
+
*/
|
|
17
|
+
export type DeleteABTestProps = {
|
|
18
|
+
/**
|
|
19
|
+
* Unique A/B test ID.
|
|
20
|
+
*/
|
|
21
|
+
id: number;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Properties for the `get` method.
|
|
25
|
+
*/
|
|
26
|
+
export type GetProps = {
|
|
27
|
+
/**
|
|
28
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
29
|
+
*/
|
|
30
|
+
path: string;
|
|
31
|
+
/**
|
|
32
|
+
* Query parameters to apply to the current query.
|
|
33
|
+
*/
|
|
34
|
+
parameters?: Record<string, any>;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Properties for the `getABTest` method.
|
|
38
|
+
*/
|
|
39
|
+
export type GetABTestProps = {
|
|
40
|
+
/**
|
|
41
|
+
* Unique A/B test ID.
|
|
42
|
+
*/
|
|
43
|
+
id: number;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Properties for the `listABTests` method.
|
|
47
|
+
*/
|
|
48
|
+
export type ListABTestsProps = {
|
|
49
|
+
/**
|
|
50
|
+
* Position of the starting record. Used for paging. 0 is the first record.
|
|
51
|
+
*/
|
|
52
|
+
offset?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Number of records to return (page size).
|
|
55
|
+
*/
|
|
56
|
+
limit?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Only return A/B tests for indices starting with this prefix.
|
|
59
|
+
*/
|
|
60
|
+
indexPrefix?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Only return A/B tests for indices ending with this suffix.
|
|
63
|
+
*/
|
|
64
|
+
indexSuffix?: string;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Properties for the `post` method.
|
|
68
|
+
*/
|
|
69
|
+
export type PostProps = {
|
|
70
|
+
/**
|
|
71
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
72
|
+
*/
|
|
73
|
+
path: string;
|
|
74
|
+
/**
|
|
75
|
+
* Query parameters to apply to the current query.
|
|
76
|
+
*/
|
|
77
|
+
parameters?: Record<string, any>;
|
|
78
|
+
/**
|
|
79
|
+
* Parameters to send with the custom request.
|
|
80
|
+
*/
|
|
81
|
+
body?: Record<string, any>;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Properties for the `put` method.
|
|
85
|
+
*/
|
|
86
|
+
export type PutProps = {
|
|
87
|
+
/**
|
|
88
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
89
|
+
*/
|
|
90
|
+
path: string;
|
|
91
|
+
/**
|
|
92
|
+
* Query parameters to apply to the current query.
|
|
93
|
+
*/
|
|
94
|
+
parameters?: Record<string, any>;
|
|
95
|
+
/**
|
|
96
|
+
* Parameters to send with the custom request.
|
|
97
|
+
*/
|
|
98
|
+
body?: Record<string, any>;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Properties for the `stopABTest` method.
|
|
102
|
+
*/
|
|
103
|
+
export type StopABTestProps = {
|
|
104
|
+
/**
|
|
105
|
+
* Unique A/B test ID.
|
|
106
|
+
*/
|
|
107
|
+
id: number;
|
|
108
|
+
};
|
|
101
109
|
//# sourceMappingURL=clientMethodProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,
|
|
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,iBAAiB,GAAG;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ,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,cAAc,GAAG;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,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;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type CurrenciesValue = {
|
|
2
|
+
/**
|
|
3
|
+
* Currency code.
|
|
4
|
+
*/
|
|
5
|
+
currency?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Revenue for this currency.
|
|
8
|
+
*/
|
|
9
|
+
revenue?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Mean for this currency.
|
|
12
|
+
*/
|
|
13
|
+
mean?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Standard deviation for this currency.
|
|
16
|
+
*/
|
|
17
|
+
standardDeviation?: number;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=currenciesValue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currenciesValue.d.ts","sourceRoot":"","sources":["../../model/currenciesValue.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Applies search parameters from [a restricted set of options](https://www.algolia.com/doc/api-reference/api-methods/add-ab-test/#method-param-customsearchparameters). Only use this parameter if the two variants use the same index.
|
|
3
|
+
*/
|
|
4
|
+
export type CustomSearchParams = {
|
|
5
|
+
customSearchParameters: Record<string, any>;
|
|
6
|
+
};
|
|
4
7
|
//# sourceMappingURL=customSearchParams.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customSearchParams.d.ts","sourceRoot":"","sources":["../../model/customSearchParams.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"customSearchParams.d.ts","sourceRoot":"","sources":["../../model/customSearchParams.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7C,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Error.
|
|
3
|
-
*/
|
|
4
|
-
export
|
|
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":["../../model/errorBase.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,
|
|
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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FilterEffectsEmptySearch } from './filterEffectsEmptySearch';
|
|
2
|
+
import type { FilterEffectsOutliers } from './filterEffectsOutliers';
|
|
3
|
+
/**
|
|
4
|
+
* A/B test filter effects resulting from configuration settings.
|
|
5
|
+
*/
|
|
6
|
+
export type FilterEffects = {
|
|
7
|
+
outliers?: FilterEffectsOutliers;
|
|
8
|
+
emptySearch?: FilterEffectsEmptySearch;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=filterEffects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterEffects.d.ts","sourceRoot":"","sources":["../../model/filterEffects.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IAEjC,WAAW,CAAC,EAAE,wBAAwB,CAAC;CACxC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Empty searches removed from the A/B test as a result of configuration settings.
|
|
3
|
+
*/
|
|
4
|
+
export type FilterEffectsEmptySearch = {
|
|
5
|
+
/**
|
|
6
|
+
* Number of users removed from the A/B test.
|
|
7
|
+
*/
|
|
8
|
+
usersCount?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Number of tracked searches removed from the A/B test.
|
|
11
|
+
*/
|
|
12
|
+
trackedSearchesCount?: number;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=filterEffectsEmptySearch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterEffectsEmptySearch.d.ts","sourceRoot":"","sources":["../../model/filterEffectsEmptySearch.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Outliers removed from the A/B test as a result of configuration settings.
|
|
3
|
+
*/
|
|
4
|
+
export type FilterEffectsOutliers = {
|
|
5
|
+
/**
|
|
6
|
+
* Number of users removed from the A/B test.
|
|
7
|
+
*/
|
|
8
|
+
usersCount?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Number of tracked searches removed from the A/B test.
|
|
11
|
+
*/
|
|
12
|
+
trackedSearchesCount?: number;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=filterEffectsOutliers.d.ts.map
|