@algolia/client-abtesting 5.1.0 → 5.1.1
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/README.md +2 -2
- package/dist/client-abtesting.cjs +1 -1
- package/dist/client-abtesting.esm.browser.js +1 -1
- package/dist/client-abtesting.esm.node.js +1 -1
- package/dist/client-abtesting.umd.js +2 -2
- package/dist/model/aBTest.d.ts +5 -5
- package/dist/model/aBTest.d.ts.map +1 -1
- package/dist/model/variant.d.ts +5 -5
- package/dist/model/variant.d.ts.map +1 -1
- package/dist/src/abtestingClient.d.ts +1 -1
- package/model/aBTest.ts +5 -5
- package/model/variant.ts +5 -5
- package/package.json +8 -6
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
17
|
-
<a href="https://www.algolia.com/doc/
|
|
17
|
+
<a href="https://www.algolia.com/doc/libraries/javascript/" target="_blank">Documentation</a> •
|
|
18
18
|
<a href="https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/" target="_blank">InstantSearch</a> •
|
|
19
19
|
<a href="https://discourse.algolia.com" target="_blank">Community Forum</a> •
|
|
20
20
|
<a href="http://stackoverflow.com/questions/tagged/algolia" target="_blank">Stack Overflow</a> •
|
|
@@ -58,7 +58,7 @@ import { abtestingClient } from '@algolia/client-abtesting';
|
|
|
58
58
|
const client = abtestingClient('YOUR_APP_ID', 'YOUR_API_KEY');
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
For full documentation, visit the **[Algolia JavaScript API Client](https://www.algolia.com/doc/
|
|
61
|
+
For full documentation, visit the **[Algolia JavaScript API Client](https://www.algolia.com/doc/libraries/javascript/)**.
|
|
62
62
|
|
|
63
63
|
## ❓ Troubleshooting
|
|
64
64
|
|
|
@@ -4,7 +4,7 @@ var clientCommon = require('@algolia/client-common');
|
|
|
4
4
|
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
5
5
|
|
|
6
6
|
// 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.
|
|
7
|
-
const apiClientVersion = '5.1.
|
|
7
|
+
const apiClientVersion = '5.1.1';
|
|
8
8
|
const REGIONS = ['de', 'us'];
|
|
9
9
|
function getDefaultHosts(region) {
|
|
10
10
|
const url = !region
|
|
@@ -676,7 +676,7 @@ function createXhrRequester() {
|
|
|
676
676
|
}
|
|
677
677
|
|
|
678
678
|
// 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.
|
|
679
|
-
const apiClientVersion = '5.1.
|
|
679
|
+
const apiClientVersion = '5.1.1';
|
|
680
680
|
const REGIONS = ['de', 'us'];
|
|
681
681
|
function getDefaultHosts(region) {
|
|
682
682
|
const url = !region
|
|
@@ -2,7 +2,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, DEFAULT_CONNECT_TIMEOUT
|
|
|
2
2
|
import { createHttpRequester } from '@algolia/requester-node-http';
|
|
3
3
|
|
|
4
4
|
// 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.
|
|
5
|
-
const apiClientVersion = '5.1.
|
|
5
|
+
const apiClientVersion = '5.1.1';
|
|
6
6
|
const REGIONS = ['de', 'us'];
|
|
7
7
|
function getDefaultHosts(region) {
|
|
8
8
|
const url = !region
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! client-abtesting.umd.js | 5.1.
|
|
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)||"{}")}function n(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(n(s),!t)return;n(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 n=a();return n[JSON.stringify(e)]={timestamp:(new Date).getTime(),value: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||!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+""}(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 u extends i{constructor(e,t,r){super(e,r),o(this,"stackTrace",void 0),this.stackTrace=t}}class c extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",e,"RetryError")}}class l extends u{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=(a=r,Object.keys(a).filter((e=>void 0!==a[e])).sort().map((e=>`${e}=${encodeURIComponent("[object Array]"===Object.prototype.toString.call(a[e])?a[e].join(","):a[e]).replaceAll("+","%20")}`)).join("&"));var a;let n=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return s.length&&(n+=`?${s}`),n}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:u,responsesCache:f}){async function g(u,f,g=!0){const w=[],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)}(u,f),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,u.headers,f.headers),T="GET"===u.method?{...u.data,...f.data}:{},q={...s,...u.queryParameters,...T};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 v=0;const b=async(e,r)=>{const s=e.pop();if(void 0===s)throw new c(function(e){return e.map((e=>p(e)))}(w));let a=g?f.timeouts?.read||o.read:f.timeouts?.write||o.write;const T={data:y,headers:P,method:u.method,url:m(s,u.path,q),connectTimeout:r(v,f.timeouts?.connect||o.connect),responseTimeout:r(v,a)},A=t=>{const r={request:T,response:t,host:s,triesLeft:e.length};return w.push(r),r},E=await i.send(T);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)}(E)){const a=A(E);return E.isTimedOut&&v++,console.log("Retryable failure",p(a)),await t.set(s,n(s,E.isTimedOut?"timed out":"down")),b(e,r)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(E);throw A(E),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)}(E,w)},A=e.filter((e=>"readWrite"===e.accept||(g?"read"===e.accept:"write"===e.accept))),E=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}}(A);return b([...E.hosts].reverse(),E.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,(()=>u.get(o,(()=>u.set(o,n()).then((e=>Promise.all([u.delete(o),e])),(e=>Promise.all([u.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.set(o,e)})},requestsCache:u,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 w="5.1.0",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=f({hosts:(u=a,[{url:u?"analytics.{region}.algolia.com".replace("{region}",u):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...n,algoliaAgent:g({algoliaAgents:s,client:"Abtesting",version:w}),baseHeaders:{"content-type":"text/plain",...o.headers(),...n.baseHeaders},baseQueryParameters:{...o.queryParameters(),...n.baseQueryParameters}});var u;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 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)},scheduleABTest(e,t){if(!e)throw new Error("Parameter `scheduleABTestsRequest` is required when calling `scheduleABTest`.");if(!e.name)throw new Error("Parameter `scheduleABTestsRequest.name` is required when calling `scheduleABTest`.");if(!e.variants)throw new Error("Parameter `scheduleABTestsRequest.variants` is required when calling `scheduleABTest`.");if(!e.scheduledAt)throw new Error("Parameter `scheduleABTestsRequest.scheduledAt` is required when calling `scheduleABTest`.");if(!e.endAt)throw new Error("Parameter `scheduleABTestsRequest.endAt` is required when calling `scheduleABTest`.");const r={method:"POST",path:"/2/abtests/schedule",queryParameters:{},headers:{},data:e};return i.request(r,t)},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:`${w}-${e}`}),s()]}),...o})},e.apiClientVersion=w}));
|
|
1
|
+
/*! client-abtesting.umd.js | 5.1.1 | © 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)||"{}")}function n(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(n(s),!t)return;n(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 n=a();return n[JSON.stringify(e)]={timestamp:(new Date).getTime(),value: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||!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+""}(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 u extends i{constructor(e,t,r){super(e,r),o(this,"stackTrace",void 0),this.stackTrace=t}}class c extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",e,"RetryError")}}class l extends u{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=(a=r,Object.keys(a).filter((e=>void 0!==a[e])).sort().map((e=>`${e}=${encodeURIComponent("[object Array]"===Object.prototype.toString.call(a[e])?a[e].join(","):a[e]).replaceAll("+","%20")}`)).join("&"));var a;let n=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return s.length&&(n+=`?${s}`),n}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:u,responsesCache:f}){async function g(u,f,g=!0){const w=[],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)}(u,f),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,u.headers,f.headers),T="GET"===u.method?{...u.data,...f.data}:{},q={...s,...u.queryParameters,...T};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 v=0;const b=async(e,r)=>{const s=e.pop();if(void 0===s)throw new c(function(e){return e.map((e=>p(e)))}(w));let a=g?f.timeouts?.read||o.read:f.timeouts?.write||o.write;const T={data:y,headers:P,method:u.method,url:m(s,u.path,q),connectTimeout:r(v,f.timeouts?.connect||o.connect),responseTimeout:r(v,a)},A=t=>{const r={request:T,response:t,host:s,triesLeft:e.length};return w.push(r),r},E=await i.send(T);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)}(E)){const a=A(E);return E.isTimedOut&&v++,console.log("Retryable failure",p(a)),await t.set(s,n(s,E.isTimedOut?"timed out":"down")),b(e,r)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(E);throw A(E),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)}(E,w)},A=e.filter((e=>"readWrite"===e.accept||(g?"read"===e.accept:"write"===e.accept))),E=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}}(A);return b([...E.hosts].reverse(),E.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,(()=>u.get(o,(()=>u.set(o,n()).then((e=>Promise.all([u.delete(o),e])),(e=>Promise.all([u.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.set(o,e)})},requestsCache:u,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 w="5.1.1",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=f({hosts:(u=a,[{url:u?"analytics.{region}.algolia.com".replace("{region}",u):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...n,algoliaAgent:g({algoliaAgents:s,client:"Abtesting",version:w}),baseHeaders:{"content-type":"text/plain",...o.headers(),...n.baseHeaders},baseQueryParameters:{...o.queryParameters(),...n.baseQueryParameters}});var u;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 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)},scheduleABTest(e,t){if(!e)throw new Error("Parameter `scheduleABTestsRequest` is required when calling `scheduleABTest`.");if(!e.name)throw new Error("Parameter `scheduleABTestsRequest.name` is required when calling `scheduleABTest`.");if(!e.variants)throw new Error("Parameter `scheduleABTestsRequest.variants` is required when calling `scheduleABTest`.");if(!e.scheduledAt)throw new Error("Parameter `scheduleABTestsRequest.scheduledAt` is required when calling `scheduleABTest`.");if(!e.endAt)throw new Error("Parameter `scheduleABTestsRequest.endAt` is required when calling `scheduleABTest`.");const r={method:"POST",path:"/2/abtests/schedule",queryParameters:{},headers:{},data:e};return i.request(r,t)},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:`${w}-${e}`}),s()]}),...o})},e.apiClientVersion=w}));
|
package/dist/model/aBTest.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ export type ABTest = {
|
|
|
6
6
|
* Unique A/B test identifier.
|
|
7
7
|
*/
|
|
8
8
|
abTestID: number;
|
|
9
|
-
clickSignificance
|
|
10
|
-
conversionSignificance
|
|
11
|
-
addToCartSignificance
|
|
12
|
-
purchaseSignificance
|
|
13
|
-
revenueSignificance
|
|
9
|
+
clickSignificance?: number | null;
|
|
10
|
+
conversionSignificance?: number | null;
|
|
11
|
+
addToCartSignificance?: number | null;
|
|
12
|
+
purchaseSignificance?: number | null;
|
|
13
|
+
revenueSignificance?: Record<string, number> | null;
|
|
14
14
|
/**
|
|
15
15
|
* Date and time when the A/B test was last updated, in RFC 3339 format.
|
|
16
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aBTest.d.ts","sourceRoot":"","sources":["../../model/aBTest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,MAAM,MAAM,GAAG;IACnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"aBTest.d.ts","sourceRoot":"","sources":["../../model/aBTest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,MAAM,MAAM,GAAG;IACnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAElC,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvC,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAEpD;;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,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAC;IAEpB,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACrC,CAAC"}
|
package/dist/model/variant.d.ts
CHANGED
|
@@ -8,11 +8,11 @@ export type Variant = {
|
|
|
8
8
|
/**
|
|
9
9
|
* [Add-to-cart rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#add-to-cart-rate) for this variant.
|
|
10
10
|
*/
|
|
11
|
-
addToCartRate
|
|
11
|
+
addToCartRate?: number | null;
|
|
12
12
|
/**
|
|
13
13
|
* [Average click position](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-position) for this variant.
|
|
14
14
|
*/
|
|
15
|
-
averageClickPosition
|
|
15
|
+
averageClickPosition?: number | null;
|
|
16
16
|
/**
|
|
17
17
|
* Number of click events for this variant.
|
|
18
18
|
*/
|
|
@@ -20,7 +20,7 @@ export type Variant = {
|
|
|
20
20
|
/**
|
|
21
21
|
* [Click-through rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate) for this variant.
|
|
22
22
|
*/
|
|
23
|
-
clickThroughRate
|
|
23
|
+
clickThroughRate?: number | null;
|
|
24
24
|
/**
|
|
25
25
|
* Number of click events for this variant.
|
|
26
26
|
*/
|
|
@@ -28,7 +28,7 @@ export type Variant = {
|
|
|
28
28
|
/**
|
|
29
29
|
* [Conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate) for this variant.
|
|
30
30
|
*/
|
|
31
|
-
conversionRate
|
|
31
|
+
conversionRate?: number | null;
|
|
32
32
|
/**
|
|
33
33
|
* A/B test currencies.
|
|
34
34
|
*/
|
|
@@ -57,7 +57,7 @@ export type Variant = {
|
|
|
57
57
|
/**
|
|
58
58
|
* [Purchase rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#purchase-rate) for this variant.
|
|
59
59
|
*/
|
|
60
|
-
purchaseRate
|
|
60
|
+
purchaseRate?: number | null;
|
|
61
61
|
/**
|
|
62
62
|
* Number of searches for this variant.
|
|
63
63
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variant.d.ts","sourceRoot":"","sources":["../../model/variant.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,MAAM,OAAO,GAAG;IACpB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"variant.d.ts","sourceRoot":"","sources":["../../model/variant.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,MAAM,OAAO,GAAG;IACpB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAEtC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;OAEG;IACH,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC,CAAC"}
|
|
@@ -6,7 +6,7 @@ import type { CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps
|
|
|
6
6
|
import type { ListABTestsResponse } from '../model/listABTestsResponse';
|
|
7
7
|
import type { ScheduleABTestResponse } from '../model/scheduleABTestResponse';
|
|
8
8
|
import type { ScheduleABTestsRequest } from '../model/scheduleABTestsRequest';
|
|
9
|
-
export declare const apiClientVersion = "5.1.
|
|
9
|
+
export declare const apiClientVersion = "5.1.1";
|
|
10
10
|
export declare const REGIONS: readonly ["de", "us"];
|
|
11
11
|
export type Region = (typeof REGIONS)[number];
|
|
12
12
|
export declare function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
|
package/model/aBTest.ts
CHANGED
|
@@ -10,15 +10,15 @@ export type ABTest = {
|
|
|
10
10
|
*/
|
|
11
11
|
abTestID: number;
|
|
12
12
|
|
|
13
|
-
clickSignificance
|
|
13
|
+
clickSignificance?: number | null;
|
|
14
14
|
|
|
15
|
-
conversionSignificance
|
|
15
|
+
conversionSignificance?: number | null;
|
|
16
16
|
|
|
17
|
-
addToCartSignificance
|
|
17
|
+
addToCartSignificance?: number | null;
|
|
18
18
|
|
|
19
|
-
purchaseSignificance
|
|
19
|
+
purchaseSignificance?: number | null;
|
|
20
20
|
|
|
21
|
-
revenueSignificance
|
|
21
|
+
revenueSignificance?: Record<string, number> | null;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Date and time when the A/B test was last updated, in RFC 3339 format.
|
package/model/variant.ts
CHANGED
|
@@ -12,12 +12,12 @@ export type Variant = {
|
|
|
12
12
|
/**
|
|
13
13
|
* [Add-to-cart rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#add-to-cart-rate) for this variant.
|
|
14
14
|
*/
|
|
15
|
-
addToCartRate
|
|
15
|
+
addToCartRate?: number | null;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* [Average click position](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-position) for this variant.
|
|
19
19
|
*/
|
|
20
|
-
averageClickPosition
|
|
20
|
+
averageClickPosition?: number | null;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Number of click events for this variant.
|
|
@@ -27,7 +27,7 @@ export type Variant = {
|
|
|
27
27
|
/**
|
|
28
28
|
* [Click-through rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate) for this variant.
|
|
29
29
|
*/
|
|
30
|
-
clickThroughRate
|
|
30
|
+
clickThroughRate?: number | null;
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Number of click events for this variant.
|
|
@@ -37,7 +37,7 @@ export type Variant = {
|
|
|
37
37
|
/**
|
|
38
38
|
* [Conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate) for this variant.
|
|
39
39
|
*/
|
|
40
|
-
conversionRate
|
|
40
|
+
conversionRate?: number | null;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* A/B test currencies.
|
|
@@ -74,7 +74,7 @@ export type Variant = {
|
|
|
74
74
|
/**
|
|
75
75
|
* [Purchase rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#purchase-rate) for this variant.
|
|
76
76
|
*/
|
|
77
|
-
purchaseRate
|
|
77
|
+
purchaseRate?: number | null;
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* Number of searches for this variant.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@algolia/client-abtesting",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"description": "JavaScript client for client-abtesting",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,13 +15,15 @@
|
|
|
15
15
|
"import": "./dist/client-abtesting.esm.node.js",
|
|
16
16
|
"module": "./dist/client-abtesting.esm.node.js",
|
|
17
17
|
"require": "./dist/client-abtesting.cjs",
|
|
18
|
-
"default": "./dist/client-abtesting.cjs"
|
|
18
|
+
"default": "./dist/client-abtesting.cjs",
|
|
19
|
+
"types": "./dist/builds/node.d.ts"
|
|
19
20
|
},
|
|
20
21
|
"default": {
|
|
21
22
|
"umd": "./dist/client-abtesting.umd.js",
|
|
22
23
|
"module": "./dist/client-abtesting.esm.browser.js",
|
|
23
24
|
"import": "./dist/client-abtesting.esm.browser.js",
|
|
24
|
-
"default": "./dist/client-abtesting.umd.js"
|
|
25
|
+
"default": "./dist/client-abtesting.umd.js",
|
|
26
|
+
"types": "./dist/builds/browser.d.ts"
|
|
25
27
|
}
|
|
26
28
|
},
|
|
27
29
|
"./src/*": "./src/*.ts",
|
|
@@ -42,9 +44,9 @@
|
|
|
42
44
|
"clean": "rm -rf ./dist || true"
|
|
43
45
|
},
|
|
44
46
|
"dependencies": {
|
|
45
|
-
"@algolia/client-common": "5.1.
|
|
46
|
-
"@algolia/requester-browser-xhr": "5.1.
|
|
47
|
-
"@algolia/requester-node-http": "5.1.
|
|
47
|
+
"@algolia/client-common": "5.1.1",
|
|
48
|
+
"@algolia/requester-browser-xhr": "5.1.1",
|
|
49
|
+
"@algolia/requester-node-http": "5.1.1"
|
|
48
50
|
},
|
|
49
51
|
"devDependencies": {
|
|
50
52
|
"@types/node": "22.2.0",
|