Socket
Socket
Sign inDemoInstall

@algolia/client-abtesting

Package Overview
Dependencies
Maintainers
87
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@algolia/client-abtesting - npm Package Compare versions

Comparing version 5.0.0-alpha.111 to 5.0.0-alpha.112

dist/model/aBTestConfiguration.d.ts

29

dist/client-abtesting.esm.browser.js

@@ -452,6 +452,3 @@ function createAuth(appId, apiKey, authMode = 'WithinHeaders') {

}
let responseTimeout = requestOptions.timeout;
if (responseTimeout === undefined) {
responseTimeout = isRead ? timeouts.read : timeouts.write;
}
let responseTimeout = isRead ? requestOptions.timeouts?.read || timeouts.read : requestOptions.timeouts?.write || timeouts.write;
const payload = {

@@ -462,3 +459,3 @@ data,

url: serializeUrl(host, request.path, queryParameters),
connectTimeout: getTimeout(timeoutsCount, timeouts.connect),
connectTimeout: getTimeout(timeoutsCount, requestOptions.timeouts?.connect || timeouts.connect),
responseTimeout: getTimeout(timeoutsCount, responseTimeout)

@@ -691,3 +688,3 @@ };

// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
const apiClientVersion = '5.0.0-alpha.111';
const apiClientVersion = '5.0.0-alpha.112';
const REGIONS = ['de', 'us'];

@@ -752,3 +749,3 @@ function getDefaultHosts(region) {

/**
* Creates an A/B test.
* Creates a new A/B test.
*

@@ -883,3 +880,3 @@ * Required API Key ACLs:

/**
* Delete an A/B test. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
* Deletes an A/B test by its ID.
*

@@ -890,3 +887,3 @@ * Required API Key ACLs:

* @param deleteABTest - The deleteABTest object.
* @param deleteABTest.id - Unique A/B test ID.
* @param deleteABTest.id - Unique A/B test identifier.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -910,3 +907,3 @@ */

/**
* Get specific details for an A/B test. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
* Retrieves the details for an A/B test by its ID.
*

@@ -917,3 +914,3 @@ * Required API Key ACLs:

* @param getABTest - The getABTest object.
* @param getABTest.id - Unique A/B test ID.
* @param getABTest.id - Unique A/B test identifier.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -937,3 +934,3 @@ */

/**
* List all A/B tests.
* Lists all A/B tests you configured for this application.
*

@@ -946,4 +943,4 @@ * Required API Key ACLs:

* @param listABTests.limit - Number of items to return.
* @param listABTests.indexPrefix - Only return A/B tests for indices starting with this prefix.
* @param listABTests.indexSuffix - Only return A/B tests for indices ending with this suffix.
* @param listABTests.indexPrefix - Index name prefix. Only A/B tests for indices starting with this string are included in the response.
* @param listABTests.indexSuffix - Index name suffix. Only A/B tests for indices ending with this string are included in the response.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -976,3 +973,3 @@ */

/**
* If stopped, the test is over and can\'t be restarted. There is now only one index, receiving 100% of all search requests. The data gathered for stopped A/B tests is retained. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
* Stops an A/B test by its ID. You can\'t restart stopped A/B tests.
*

@@ -983,3 +980,3 @@ * Required API Key ACLs:

* @param stopABTest - The stopABTest object.
* @param stopABTest.id - Unique A/B test ID.
* @param stopABTest.id - Unique A/B test identifier.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -986,0 +983,0 @@ */

@@ -5,3 +5,3 @@ import { createAuth, createTransporter, getAlgoliaAgent, DEFAULT_CONNECT_TIMEOUT_NODE, DEFAULT_READ_TIMEOUT_NODE, DEFAULT_WRITE_TIMEOUT_NODE, createNullCache, createMemoryCache } from '@algolia/client-common';

// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
const apiClientVersion = '5.0.0-alpha.111';
const apiClientVersion = '5.0.0-alpha.112';
const REGIONS = ['de', 'us'];

@@ -66,3 +66,3 @@ function getDefaultHosts(region) {

/**
* Creates an A/B test.
* Creates a new A/B test.
*

@@ -197,3 +197,3 @@ * Required API Key ACLs:

/**
* Delete an A/B test. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
* Deletes an A/B test by its ID.
*

@@ -204,3 +204,3 @@ * Required API Key ACLs:

* @param deleteABTest - The deleteABTest object.
* @param deleteABTest.id - Unique A/B test ID.
* @param deleteABTest.id - Unique A/B test identifier.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -224,3 +224,3 @@ */

/**
* Get specific details for an A/B test. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
* Retrieves the details for an A/B test by its ID.
*

@@ -231,3 +231,3 @@ * Required API Key ACLs:

* @param getABTest - The getABTest object.
* @param getABTest.id - Unique A/B test ID.
* @param getABTest.id - Unique A/B test identifier.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -251,3 +251,3 @@ */

/**
* List all A/B tests.
* Lists all A/B tests you configured for this application.
*

@@ -260,4 +260,4 @@ * Required API Key ACLs:

* @param listABTests.limit - Number of items to return.
* @param listABTests.indexPrefix - Only return A/B tests for indices starting with this prefix.
* @param listABTests.indexSuffix - Only return A/B tests for indices ending with this suffix.
* @param listABTests.indexPrefix - Index name prefix. Only A/B tests for indices starting with this string are included in the response.
* @param listABTests.indexSuffix - Index name suffix. Only A/B tests for indices ending with this string are included in the response.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -290,3 +290,3 @@ */

/**
* If stopped, the test is over and can\'t be restarted. There is now only one index, receiving 100% of all search requests. The data gathered for stopped A/B tests is retained. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
* Stops an A/B test by its ID. You can\'t restart stopped A/B tests.
*

@@ -297,3 +297,3 @@ * Required API Key ACLs:

* @param stopABTest - The stopABTest object.
* @param stopABTest.id - Unique A/B test ID.
* @param stopABTest.id - Unique A/B test identifier.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -300,0 +300,0 @@ */

@@ -1,2 +0,2 @@

/*! client-abtesting.umd.js | 5.0.0-alpha.111 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
!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)||"{}")}function o(e){s().setItem(r,JSON.stringify(e))}return{get:(t,r,s={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=a(),s=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(o(s),!t)return;o(Object.fromEntries(Object.entries(s).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),a()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||s.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const o=a();return o[JSON.stringify(e)]={timestamp:(new Date).getTime(),value: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){var t=function(e,t){if("object"!=typeof e||!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:t+""}function i(e,t,r){return(t=n(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, please create a ticket at https://support.algolia.com/ sharing steps we can use to reproduce the issue.",e,"RetryError")}}class d extends u{constructor(e,t,r,s="ApiError"){super(e,r,s),i(this,"status",void 0),this.status=t}}class m extends c{constructor(e,t){super(e,"DeserializationError"),i(this,"response",void 0),this.response=t}}class h extends d{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),i(this,"error",void 0),this.error=r}}function p(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]).replaceAll("+","%20")}`)).join("&")}(r);let a=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return s.length&&(a+=`?${s}`),a}function f(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:u}){async function g(c,u,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,u),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,u.headers),v="GET"===c.method?{...c.data,...u.data}:{},T={...s,...c.queryParameters,...v};if(a.value&&(T["x-algolia-agent"]=a.value),u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?T[e]=u.queryParameters[e].toString():T[e]=u.queryParameters[e];let q=0;const b=async(e,r)=>{const s=e.pop();if(void 0===s)throw new l(function(e){return e.map((e=>f(e)))}(y));let a=u.timeout;void 0===a&&(a=g?n.read:n.write);const v={data:P,headers:w,method:c.method,url:p(s,c.path,T),connectTimeout:r(q,n.connect),responseTimeout:r(q,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&&!~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(A)){const a=O(A);return A.isTimedOut&&q++,console.log("Retryable failure",f(a)),await t.set(s,o(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 m(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 d(s.message,t,r)}catch(e){}return new d(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(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}}(O);return b([...A.hosts].reverse(),A.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 g(e,t,a);const o=()=>g(e,t);if(!0!==(t.cacheable||e.cacheable))return o();const n={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return u.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=>u.set(n,e)})},requestsCache:c,responsesCache:u}}function y({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 P="5.0.0-alpha.111",w=["de","us"];e.abtestingClient=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&&("string"!=typeof o||!w.includes(o)))throw new Error(`\`region\` must be one of the following: ${w.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:c?"analytics.{region}.algolia.com".replace("{region}",c):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...o,algoliaAgent:y({algoliaAgents:s,client:"Abtesting",version:P}),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})},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)},customDelete({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const s={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return i.request(s,r)},customGet({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const s={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return i.request(s,r)},customPost({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const a={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},customPut({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const a={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},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)},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 o={};void 0!==e&&(o.offset=e.toString()),void 0!==t&&(o.limit=t.toString()),void 0!==r&&(o.indexPrefix=r.toString()),void 0!==s&&(o.indexSuffix=s.toString());const n={method:"GET",path:"/2/abtests",queryParameters:o,headers:{}};return i.request(n,a)},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: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:`${P}-${e}`}),s()]}),...n})},e.apiClientVersion=P}));
/*! client-abtesting.umd.js | 5.0.0-alpha.112 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
!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)||"{}")}function o(e){s().setItem(r,JSON.stringify(e))}return{get:(t,r,s={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=a(),s=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(o(s),!t)return;o(Object.fromEntries(Object.entries(s).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),a()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||s.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const o=a();return o[JSON.stringify(e)]={timestamp:(new Date).getTime(),value: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){var t=function(e,t){if("object"!=typeof e||!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:t+""}function i(e,t,r){return(t=n(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, please create a ticket at https://support.algolia.com/ sharing steps we can use to reproduce the issue.",e,"RetryError")}}class d extends u{constructor(e,t,r,s="ApiError"){super(e,r,s),i(this,"status",void 0),this.status=t}}class m extends c{constructor(e,t){super(e,"DeserializationError"),i(this,"response",void 0),this.response=t}}class h extends d{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),i(this,"error",void 0),this.error=r}}function p(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]).replaceAll("+","%20")}`)).join("&")}(r);let a=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return s.length&&(a+=`?${s}`),a}function f(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:u}){async function g(c,u,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,u),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,u.headers),v="GET"===c.method?{...c.data,...u.data}:{},T={...s,...c.queryParameters,...v};if(a.value&&(T["x-algolia-agent"]=a.value),u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?T[e]=u.queryParameters[e].toString():T[e]=u.queryParameters[e];let q=0;const b=async(e,r)=>{const s=e.pop();if(void 0===s)throw new l(function(e){return e.map((e=>f(e)))}(y));let a=g?u.timeouts?.read||n.read:u.timeouts?.write||n.write;const v={data:P,headers:w,method:c.method,url:p(s,c.path,T),connectTimeout:r(q,u.timeouts?.connect||n.connect),responseTimeout:r(q,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&&!~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(A)){const a=O(A);return A.isTimedOut&&q++,console.log("Retryable failure",f(a)),await t.set(s,o(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 m(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 d(s.message,t,r)}catch(e){}return new d(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(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}}(O);return b([...A.hosts].reverse(),A.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 g(e,t,a);const o=()=>g(e,t);if(!0!==(t.cacheable||e.cacheable))return o();const n={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return u.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=>u.set(n,e)})},requestsCache:c,responsesCache:u}}function y({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 P="5.0.0-alpha.112",w=["de","us"];e.abtestingClient=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&&("string"!=typeof o||!w.includes(o)))throw new Error(`\`region\` must be one of the following: ${w.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:c?"analytics.{region}.algolia.com".replace("{region}",c):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...o,algoliaAgent:y({algoliaAgents:s,client:"Abtesting",version:P}),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})},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)},customDelete({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const s={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return i.request(s,r)},customGet({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const s={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return i.request(s,r)},customPost({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const a={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},customPut({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const a={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},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)},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 o={};void 0!==e&&(o.offset=e.toString()),void 0!==t&&(o.limit=t.toString()),void 0!==r&&(o.indexPrefix=r.toString()),void 0!==s&&(o.indexSuffix=s.toString());const n={method:"GET",path:"/2/abtests",queryParameters:o,headers:{}};return i.request(n,a)},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: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:`${P}-${e}`}),s()]}),...n})},e.apiClientVersion=P}));

@@ -0,37 +1,24 @@

import type { ABTestConfiguration } from './aBTestConfiguration';
import type { Status } from './status';
import type { Variant } from './variant';
export type ABTest = {
/**
* Unique A/B test ID.
* Unique A/B test identifier.
*/
abTestID: number;
/**
* [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_.
*/
clickSignificance: number | null;
/**
* [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_.
*/
conversionSignificance: number | null;
/**
* [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_.
*/
addToCartSignificance: number | null;
/**
* [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_.
*/
purchaseSignificance: number | null;
/**
* [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_.
*/
revenueSignificance: Record<string, number> | null;
/**
* Update date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the A/B test was last updated, in RFC 3339 format.
*/
updatedAt: string;
/**
* Creation date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the A/B test was created, in RFC 3339 format.
*/
createdAt: string;
/**
* End date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
* End date and time of the A/B test, in RFC 3339 format.
*/

@@ -43,11 +30,9 @@ endAt: string;

name: string;
status: Status;
/**
* A/B test status.
* A/B test variants. The first variant is your _control_ index, typically your production index. The second variant is an index with changed settings that you want to test against the control.
*/
status: string;
/**
* A/B test variants.
*/
variants: Variant[];
configuration?: ABTestConfiguration;
};
//# sourceMappingURL=aBTest.d.ts.map
export type ABTestResponse = {
/**
* A/B test index.
* Index name of the A/B test variant (case-sensitive).
*/
index: string;
/**
* Unique A/B test ID.
* Unique A/B test identifier.
*/

@@ -9,0 +9,0 @@ abTestID: number;

export type AbTestsVariant = {
/**
* A/B test index.
* Index name of the A/B test variant (case-sensitive).
*/
index: string;
/**
* A/B test traffic percentage.
* Percentage of search requests each variant receives.
*/
trafficPercentage: number;
/**
* A/B test description.
* Description for this variant.
*/

@@ -13,0 +13,0 @@ description?: string;

@@ -12,3 +12,3 @@ import type { AddABTestsVariant } from './addABTestsVariant';

/**
* End date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
* End date and time of the A/B test, in RFC 3339 format.
*/

@@ -15,0 +15,0 @@ endAt: string;

@@ -66,3 +66,3 @@ /**

/**
* Unique A/B test ID.
* Unique A/B test identifier.
*/

@@ -76,3 +76,3 @@ id: number;

/**
* Unique A/B test ID.
* Unique A/B test identifier.
*/

@@ -94,7 +94,7 @@ id: number;

/**
* Only return A/B tests for indices starting with this prefix.
* Index name prefix. Only A/B tests for indices starting with this string are included in the response.
*/
indexPrefix?: string;
/**
* Only return A/B tests for indices ending with this suffix.
* Index name suffix. Only A/B tests for indices ending with this string are included in the response.
*/

@@ -108,3 +108,3 @@ indexSuffix?: string;

/**
* Unique A/B test ID.
* Unique A/B test identifier.
*/

@@ -111,0 +111,0 @@ id: number;

/**
* 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.
* Search parameters to add to the test variant. Only use this parameter if the two variants use the same index.
*/

@@ -4,0 +4,0 @@ export type CustomSearchParams = {

export * from './aBTest';
export * from './aBTestConfiguration';
export * from './aBTestResponse';

@@ -9,2 +10,4 @@ export * from './abTestsVariant';

export * from './customSearchParams';
export * from './effect';
export * from './emptySearch';
export * from './errorBase';

@@ -15,4 +18,7 @@ export * from './filterEffects';

export * from './listABTestsResponse';
export * from './minimumDetectableEffect';
export * from './outliers';
export * from './status';
export * from './variant';
export * from './clientMethodProps';
//# sourceMappingURL=index.d.ts.map

@@ -8,3 +8,3 @@ import type { ABTest } from './aBTest';

/**
* Number of A/B tests implemented.
* Number of A/B tests.
*/

@@ -11,0 +11,0 @@ count: number;

@@ -9,7 +9,7 @@ import type { Currency } from './currency';

/**
* Variant\'s [add-to-cart rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#add-to-cart-rate).
* [Add-to-cart rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#add-to-cart-rate) for this variant.
*/
addToCartRate: number | null;
/**
* Variant\'s [average click position](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-position).
* [Average click position](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-position) for this variant.
*/

@@ -22,3 +22,3 @@ averageClickPosition: number | null;

/**
* Variant\'s [click-through rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate).
* [Click-through rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate) for this variant.
*/

@@ -31,3 +31,3 @@ clickThroughRate: number | null;

/**
* Variant\'s [conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate).
* [Conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate) for this variant.
*/

@@ -40,7 +40,7 @@ conversionRate: number | null;

/**
* A/B test description.
* Description for this variant.
*/
description: string;
/**
* The estimated number of searches that will need to be run to achieve the desired confidence level and statistical power. A `minimumDetectableEffect` must be set in the `configuration` object for this to be used.
* Estimated number of searches required to achieve the desired statistical significance. The A/B test configuration must include a `mininmumDetectableEffect` setting for this number to be included in the response.
*/

@@ -50,7 +50,7 @@ estimatedSampleSize?: number;

/**
* A/B test index.
* Index name of the A/B test variant (case-sensitive).
*/
index: string;
/**
* Number of [searches without results](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#searches-without-results) for that variant.
* Number of [searches without results](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#searches-without-results) for this variant.
*/

@@ -63,7 +63,7 @@ noResultCount: number | null;

/**
* Variant\'s [purchase rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#purchase-rate).
* [Purchase rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#purchase-rate) for this variant.
*/
purchaseRate: number | null;
/**
* Number of searches carried out during the A/B test.
* Number of searches for this variant.
*/

@@ -76,11 +76,11 @@ searchCount: number | null;

/**
* A/B test traffic percentage.
* Percentage of search requests each variant receives.
*/
trafficPercentage: number;
/**
* Number of users during the A/B test.
* Number of users that made searches to this variant.
*/
userCount: number | null;
/**
* Number of users that performed a tracked search during the A/B test.
* Number of users that made tracked searches to this variant.
*/

@@ -87,0 +87,0 @@ trackedUserCount: number | null;

@@ -7,3 +7,3 @@ import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';

import type { ListABTestsResponse } from '../model/listABTestsResponse';
export declare const apiClientVersion = "5.0.0-alpha.111";
export declare const apiClientVersion = "5.0.0-alpha.112";
export declare const REGIONS: readonly ["de", "us"];

@@ -35,3 +35,3 @@ export type Region = (typeof REGIONS)[number];

/**
* Creates an A/B test.
* Creates a new A/B test.
*

@@ -84,3 +84,3 @@ * Required API Key ACLs:

/**
* Delete an A/B test. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
* Deletes an A/B test by its ID.
*

@@ -91,3 +91,3 @@ * Required API Key ACLs:

* @param deleteABTest - The deleteABTest object.
* @param deleteABTest.id - Unique A/B test ID.
* @param deleteABTest.id - Unique A/B test identifier.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -97,3 +97,3 @@ */

/**
* Get specific details for an A/B test. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
* Retrieves the details for an A/B test by its ID.
*

@@ -104,3 +104,3 @@ * Required API Key ACLs:

* @param getABTest - The getABTest object.
* @param getABTest.id - Unique A/B test ID.
* @param getABTest.id - Unique A/B test identifier.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -110,3 +110,3 @@ */

/**
* List all A/B tests.
* Lists all A/B tests you configured for this application.
*

@@ -119,4 +119,4 @@ * Required API Key ACLs:

* @param listABTests.limit - Number of items to return.
* @param listABTests.indexPrefix - Only return A/B tests for indices starting with this prefix.
* @param listABTests.indexSuffix - Only return A/B tests for indices ending with this suffix.
* @param listABTests.indexPrefix - Index name prefix. Only A/B tests for indices starting with this string are included in the response.
* @param listABTests.indexSuffix - Index name suffix. Only A/B tests for indices ending with this string are included in the response.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -126,3 +126,3 @@ */

/**
* If stopped, the test is over and can\'t be restarted. There is now only one index, receiving 100% of all search requests. The data gathered for stopped A/B tests is retained. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
* Stops an A/B test by its ID. You can\'t restart stopped A/B tests.
*

@@ -133,3 +133,3 @@ * Required API Key ACLs:

* @param stopABTest - The stopABTest object.
* @param stopABTest.id - Unique A/B test ID.
* @param stopABTest.id - Unique A/B test identifier.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -136,0 +136,0 @@ */

// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
import type { ABTestConfiguration } from './aBTestConfiguration';
import type { Status } from './status';
import type { Variant } from './variant';

@@ -7,33 +9,18 @@

/**
* Unique A/B test ID.
* Unique A/B test identifier.
*/
abTestID: number;
/**
* [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_.
*/
clickSignificance: number | null;
/**
* [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_.
*/
conversionSignificance: number | null;
/**
* [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_.
*/
addToCartSignificance: number | null;
/**
* [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_.
*/
purchaseSignificance: number | null;
/**
* [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_.
*/
revenueSignificance: Record<string, number> | null;
/**
* Update date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the A/B test was last updated, in RFC 3339 format.
*/

@@ -43,3 +30,3 @@ updatedAt: string;

/**
* Creation date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the A/B test was created, in RFC 3339 format.
*/

@@ -49,3 +36,3 @@ createdAt: string;

/**
* End date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
* End date and time of the A/B test, in RFC 3339 format.
*/

@@ -59,11 +46,10 @@ endAt: string;

/**
* A/B test status.
*/
status: string;
status: Status;
/**
* A/B test variants.
* A/B test variants. The first variant is your _control_ index, typically your production index. The second variant is an index with changed settings that you want to test against the control.
*/
variants: Variant[];
configuration?: ABTestConfiguration;
};

@@ -5,3 +5,3 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.

/**
* A/B test index.
* Index name of the A/B test variant (case-sensitive).
*/

@@ -11,3 +11,3 @@ index: string;

/**
* Unique A/B test ID.
* Unique A/B test identifier.
*/

@@ -14,0 +14,0 @@ abTestID: number;

@@ -5,3 +5,3 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.

/**
* A/B test index.
* Index name of the A/B test variant (case-sensitive).
*/

@@ -11,3 +11,3 @@ index: string;

/**
* A/B test traffic percentage.
* Percentage of search requests each variant receives.
*/

@@ -17,5 +17,5 @@ trafficPercentage: number;

/**
* A/B test description.
* Description for this variant.
*/
description?: string;
};

@@ -17,5 +17,5 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.

/**
* End date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
* End date and time of the A/B test, in RFC 3339 format.
*/
endAt: string;
};

@@ -72,3 +72,3 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.

/**
* Unique A/B test ID.
* Unique A/B test identifier.
*/

@@ -83,3 +83,3 @@ id: number;

/**
* Unique A/B test ID.
* Unique A/B test identifier.
*/

@@ -102,7 +102,7 @@ id: number;

/**
* Only return A/B tests for indices starting with this prefix.
* Index name prefix. Only A/B tests for indices starting with this string are included in the response.
*/
indexPrefix?: string;
/**
* Only return A/B tests for indices ending with this suffix.
* Index name suffix. Only A/B tests for indices ending with this string are included in the response.
*/

@@ -117,5 +117,5 @@ indexSuffix?: string;

/**
* Unique A/B test ID.
* Unique A/B test identifier.
*/
id: number;
};
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
/**
* 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.
* Search parameters to add to the test variant. Only use this parameter if the two variants use the same index.
*/

@@ -6,0 +6,0 @@ export type CustomSearchParams = {

// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
export * from './aBTest';
export * from './aBTestConfiguration';
export * from './aBTestResponse';

@@ -11,2 +12,4 @@ export * from './abTestsVariant';

export * from './customSearchParams';
export * from './effect';
export * from './emptySearch';
export * from './errorBase';

@@ -17,3 +20,6 @@ export * from './filterEffects';

export * from './listABTestsResponse';
export * from './minimumDetectableEffect';
export * from './outliers';
export * from './status';
export * from './variant';
export * from './clientMethodProps';

@@ -12,3 +12,3 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.

/**
* Number of A/B tests implemented.
* Number of A/B tests.
*/

@@ -15,0 +15,0 @@ count: number;

@@ -13,3 +13,3 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.

/**
* Variant\'s [add-to-cart rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#add-to-cart-rate).
* [Add-to-cart rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#add-to-cart-rate) for this variant.
*/

@@ -19,3 +19,3 @@ addToCartRate: number | null;

/**
* Variant\'s [average click position](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-position).
* [Average click position](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-position) for this variant.
*/

@@ -30,3 +30,3 @@ averageClickPosition: number | null;

/**
* Variant\'s [click-through rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate).
* [Click-through rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate) for this variant.
*/

@@ -41,3 +41,3 @@ clickThroughRate: number | null;

/**
* Variant\'s [conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate).
* [Conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate) for this variant.
*/

@@ -52,3 +52,3 @@ conversionRate: number | null;

/**
* A/B test description.
* Description for this variant.
*/

@@ -58,3 +58,3 @@ description: string;

/**
* The estimated number of searches that will need to be run to achieve the desired confidence level and statistical power. A `minimumDetectableEffect` must be set in the `configuration` object for this to be used.
* Estimated number of searches required to achieve the desired statistical significance. The A/B test configuration must include a `mininmumDetectableEffect` setting for this number to be included in the response.
*/

@@ -66,3 +66,3 @@ estimatedSampleSize?: number;

/**
* A/B test index.
* Index name of the A/B test variant (case-sensitive).
*/

@@ -72,3 +72,3 @@ index: string;

/**
* Number of [searches without results](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#searches-without-results) for that variant.
* Number of [searches without results](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#searches-without-results) for this variant.
*/

@@ -83,3 +83,3 @@ noResultCount: number | null;

/**
* Variant\'s [purchase rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#purchase-rate).
* [Purchase rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#purchase-rate) for this variant.
*/

@@ -89,3 +89,3 @@ purchaseRate: number | null;

/**
* Number of searches carried out during the A/B test.
* Number of searches for this variant.
*/

@@ -100,3 +100,3 @@ searchCount: number | null;

/**
* A/B test traffic percentage.
* Percentage of search requests each variant receives.
*/

@@ -106,3 +106,3 @@ trafficPercentage: number;

/**
* Number of users during the A/B test.
* Number of users that made searches to this variant.
*/

@@ -112,5 +112,5 @@ userCount: number | null;

/**
* Number of users that performed a tracked search during the A/B test.
* Number of users that made tracked searches to this variant.
*/
trackedUserCount: number | null;
};
{
"name": "@algolia/client-abtesting",
"version": "5.0.0-alpha.111",
"version": "5.0.0-alpha.112",
"description": "JavaScript client for client-abtesting",

@@ -42,10 +42,10 @@ "repository": "algolia/algoliasearch-client-javascript",

"dependencies": {
"@algolia/client-common": "5.0.0-alpha.112",
"@algolia/requester-browser-xhr": "5.0.0-alpha.112",
"@algolia/requester-node-http": "5.0.0-alpha.112"
"@algolia/client-common": "5.0.0-alpha.113",
"@algolia/requester-browser-xhr": "5.0.0-alpha.113",
"@algolia/requester-node-http": "5.0.0-alpha.113"
},
"devDependencies": {
"@types/node": "20.12.5",
"rollup": "4.14.0",
"typescript": "5.4.4"
"@types/node": "20.12.7",
"rollup": "4.14.2",
"typescript": "5.4.5"
},

@@ -52,0 +52,0 @@ "engines": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc