@algolia/client-abtesting 5.0.0-alpha.2 → 5.0.0-alpha.21

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.
@@ -1,6 +1,6 @@
1
- import type { InitClientOptions } from '@algolia/client-common';
1
+ import type { ClientOptions } from '@algolia/client-common';
2
2
  import type { AbtestingClient, Region } from '../src/abtestingClient';
3
- export { apiClientVersion, AbtestingClient } from '../src/abtestingClient';
3
+ export { apiClientVersion, AbtestingClient, Region, } from '../src/abtestingClient';
4
4
  export * from '../model';
5
- export declare function abtestingClient(appId: string, apiKey: string, region?: Region, options?: InitClientOptions): AbtestingClient;
5
+ export declare function abtestingClient(appId: string, apiKey: string, region?: Region, options?: ClientOptions): AbtestingClient;
6
6
  //# sourceMappingURL=browser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../../packages/client-abtesting/builds/browser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAWhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAOtE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC3E,cAAc,UAAU,CAAC;AAEzB,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,iBAAiB,GAC1B,eAAe,CAqCjB"}
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../builds/browser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAW5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAOtE,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,MAAM,GACP,MAAM,wBAAwB,CAAC;AAChC,cAAc,UAAU,CAAC;AAEzB,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,aAAa,GACtB,eAAe,CAqCjB"}
@@ -1,6 +1,6 @@
1
- import type { InitClientOptions } from '@algolia/client-common';
1
+ import type { ClientOptions } from '@algolia/client-common';
2
2
  import type { AbtestingClient, Region } from '../src/abtestingClient';
3
- export { apiClientVersion, AbtestingClient } from '../src/abtestingClient';
3
+ export { apiClientVersion, AbtestingClient, Region, } from '../src/abtestingClient';
4
4
  export * from '../model';
5
- export declare function abtestingClient(appId: string, apiKey: string, region?: Region, options?: InitClientOptions): AbtestingClient;
5
+ export declare function abtestingClient(appId: string, apiKey: string, region?: Region, options?: ClientOptions): AbtestingClient;
6
6
  //# sourceMappingURL=node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../../packages/client-abtesting/builds/node.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAUhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGtE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC3E,cAAc,UAAU,CAAC;AAEzB,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,iBAAiB,GAC1B,eAAe,CA+BjB"}
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../builds/node.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAU5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGtE,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,MAAM,GACP,MAAM,wBAAwB,CAAC;AAChC,cAAc,UAAU,CAAC;AAEzB,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,aAAa,GACtB,eAAe,CA+BjB"}
@@ -6,7 +6,7 @@ var clientCommon = require('@algolia/client-common');
6
6
  var requesterNodeHttp = require('@algolia/requester-node-http');
7
7
 
8
8
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
9
- const apiClientVersion = '5.0.0-alpha.2';
9
+ const apiClientVersion = '5.0.0-alpha.21';
10
10
  const REGIONS = ['de', 'us'];
11
11
  function getDefaultHosts(region) {
12
12
  const url = !region
@@ -37,6 +37,19 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
37
37
  });
38
38
  return {
39
39
  transporter,
40
+ /**
41
+ * The `appId` currently in use.
42
+ */
43
+ appId: appIdOption,
44
+ /**
45
+ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
46
+ */
47
+ clearCache() {
48
+ return Promise.all([
49
+ transporter.requestsCache.clear(),
50
+ transporter.responsesCache.clear(),
51
+ ]).then(() => undefined);
52
+ },
40
53
  /**
41
54
  * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
42
55
  */
@@ -187,7 +200,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
187
200
  * @param listABTests.limit - Number of records to return. Limit is the size of the page.
188
201
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
189
202
  */
190
- listABTests({ offset, limit }, requestOptions) {
203
+ listABTests({ offset, limit } = {}, requestOptions = undefined) {
191
204
  const requestPath = '/2/abtests';
192
205
  const headers = {};
193
206
  const queryParameters = {};
@@ -275,7 +275,7 @@ function serializeUrl(host, path, queryParameters) {
275
275
  function serializeQueryParameters(parameters) {
276
276
  const isObjectOrArray = value => Object.prototype.toString.call(value) === '[object Object]' || Object.prototype.toString.call(value) === '[object Array]';
277
277
 
278
- return Object.keys(parameters).map(key => `${key}=${isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key]}`).join('&');
278
+ return Object.keys(parameters).map(key => `${key}=${encodeURIComponent(isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key])}`).join('&');
279
279
  }
280
280
  function serializeData(request, requestOptions) {
281
281
  if (request.method === 'GET' || request.data === undefined && requestOptions.data === undefined) {
@@ -710,7 +710,7 @@ function createXhrRequester() {
710
710
  }
711
711
 
712
712
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
713
- const apiClientVersion = '5.0.0-alpha.2';
713
+ const apiClientVersion = '5.0.0-alpha.21';
714
714
  const REGIONS = ['de', 'us'];
715
715
  function getDefaultHosts(region) {
716
716
  const url = !region
@@ -741,6 +741,19 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
741
741
  });
742
742
  return {
743
743
  transporter,
744
+ /**
745
+ * The `appId` currently in use.
746
+ */
747
+ appId: appIdOption,
748
+ /**
749
+ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
750
+ */
751
+ clearCache() {
752
+ return Promise.all([
753
+ transporter.requestsCache.clear(),
754
+ transporter.responsesCache.clear(),
755
+ ]).then(() => undefined);
756
+ },
744
757
  /**
745
758
  * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
746
759
  */
@@ -891,7 +904,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
891
904
  * @param listABTests.limit - Number of records to return. Limit is the size of the page.
892
905
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
893
906
  */
894
- listABTests({ offset, limit }, requestOptions) {
907
+ listABTests({ offset, limit } = {}, requestOptions = undefined) {
895
908
  const requestPath = '/2/abtests';
896
909
  const headers = {};
897
910
  const queryParameters = {};
@@ -2,7 +2,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, DEFAULT_CONNECT_TIMEOUT
2
2
  import { createHttpRequester } from '@algolia/requester-node-http';
3
3
 
4
4
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
5
- const apiClientVersion = '5.0.0-alpha.2';
5
+ const apiClientVersion = '5.0.0-alpha.21';
6
6
  const REGIONS = ['de', 'us'];
7
7
  function getDefaultHosts(region) {
8
8
  const url = !region
@@ -33,6 +33,19 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
33
33
  });
34
34
  return {
35
35
  transporter,
36
+ /**
37
+ * The `appId` currently in use.
38
+ */
39
+ appId: appIdOption,
40
+ /**
41
+ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
42
+ */
43
+ clearCache() {
44
+ return Promise.all([
45
+ transporter.requestsCache.clear(),
46
+ transporter.responsesCache.clear(),
47
+ ]).then(() => undefined);
48
+ },
36
49
  /**
37
50
  * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
38
51
  */
@@ -183,7 +196,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
183
196
  * @param listABTests.limit - Number of records to return. Limit is the size of the page.
184
197
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
185
198
  */
186
- listABTests({ offset, limit }, requestOptions) {
199
+ listABTests({ offset, limit } = {}, requestOptions = undefined) {
187
200
  const requestPath = '/2/abtests';
188
201
  const headers = {};
189
202
  const queryParameters = {};
@@ -1,2 +1,2 @@
1
- /*! client-abtesting.umd.js | 5.0.0-alpha.2 | © 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,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),s=a()[r];return Promise.all([s||t(),void 0!==s])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=a();return n[JSON.stringify(e)]=t,s().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function s(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,n={miss:()=>Promise.resolve()})=>r.get(e,a,n).catch((()=>s({caches:t}).get(e,a,n))),set:(e,a)=>r.set(e,a).catch((()=>s({caches:t}).set(e,a))),delete:e=>r.delete(e).catch((()=>s({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>s({caches:t}).clear()))}}function a(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 n=12e4;function o(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>n},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=n}}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class c extends Error{constructor(e,t){super(e),i(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends c{constructor(e,t,r){super(e,r),i(this,"stackTrace",void 0),this.stackTrace=t}}class l extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class d extends u{constructor(e,t,r){super(e,r,"ApiError"),i(this,"status",void 0),this.status=t}}class h extends c{constructor(e,t){super(e,"DeserializationError"),i(this,"response",void 0),this.response=t}}function 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}=${t(e[r])?JSON.stringify(e[r]):e[r]}`)).join("&")}(r);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return s.length&&(a+=`?${s}`),a}function m(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:n,requester:i,requestsCache:c,responsesCache:u}){async function f(c,u,f=!0){const g=[],y=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,u),b=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),P="GET"===c.method?{...c.data,...u.data}:{},O={"x-algolia-agent":a.value,...s,...c.queryParameters,...P};if(u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?O[e]=u.queryParameters[e].toString():O[e]=u.queryParameters[e];let v=0;const w=async(e,r)=>{const s=e.pop();if(void 0===s)throw new l(function(e){return e.map((e=>m(e)))}(g));let a=u.timeout;void 0===a&&(a=f?n.read:n.write);const P={data:y,headers:b,method:c.method,url:p(s,c.path,O),connectTimeout:r(v,n.connect),responseTimeout:r(v,a)},q=t=>{const r={request:P,response:t,host:s,triesLeft:e.length};return g.push(r),r},T=await i.send(P);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(T)){const a=q(T);return T.isTimedOut&&v++,console.log("Retryable failure",m(a)),await t.set(s,o(s,T.isTimedOut?"timed out":"down")),w(e,r)}if(function({status:e}){return 2==~~(e/100)}(T))return function(e){try{return JSON.parse(e.content)}catch(t){throw new h(t.message,e)}}(T);throw q(T),function({content:e,status:t},r){let s=e;try{s=JSON.parse(e).message}catch(e){}return new d(s,t,r)}(T,g)},q=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),T=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(o(e))))))),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}}(q);return w([...T.hosts].reverse(),T.getTimeout)}return{hostsCache:t,requester:i,timeouts:n,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return f(e,t,a);const n=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return u.get(o,(()=>c.get(o,(()=>c.set(o,n()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>u.set(o,e)})},requestsCache:c,responsesCache:u}}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}function y(e,t){if(null==e)return{};var r,s,a=function(e,t){if(null==e)return{};var r,s,a={},n=Object.keys(e);for(s=0;s<n.length;s++)r=n[s],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(s=0;s<n.length;s++)r=n[s],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var b=["appId","apiKey","authMode","algoliaAgents","region"];function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function O(e){for(var r=1;r<arguments.length;r++){var s=null!=arguments[r]?arguments[r]:{};r%2?P(Object(s),!0).forEach((function(r){t(e,r,s[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):P(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var v="5.0.0-alpha.2",w=["de","us"];function q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}e.abtestingClient=function(e,n,o,i){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!n||"string"!=typeof n)throw new Error("`apiKey` is missing.");if(o&&("string"!=typeof o||!w.includes(o)))throw new Error("`region` must be one of the following: ".concat(w.join(", ")));return function(e){var t,r=e.appId,s=e.apiKey,a=e.authMode,n=e.algoliaAgents,o=e.region,i=y(e,b),c=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:{}}}(r,s,a),u=f(O(O({hosts:(t=o,[{url:t?"analytics.{region}.algolia.com".replace("{region}",t):"analytics.algolia.com",accept:"readWrite",protocol:"https"}])},i),{},{algoliaAgent:g({algoliaAgents:n,client:"Abtesting",version:v}),baseHeaders:O(O({"content-type":"text/plain"},c.headers()),i.baseHeaders),baseQueryParameters:O(O({},c.queryParameters()),i.baseQueryParameters)}));return{transporter:u,get _ua(){return u.algoliaAgent.value},addAlgoliaAgent:function(e,t){u.algoliaAgent.add({segment:e,version:t})},addABTests:function(e,t){if(!e)throw new Error("Parameter `addABTestsRequest` is required when calling `addABTests`.");if(!e.name)throw new Error("Parameter `addABTestsRequest.name` is required when calling `addABTests`.");if(!e.variant)throw new Error("Parameter `addABTestsRequest.variant` is required when calling `addABTests`.");if(!e.endAt)throw new Error("Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.");var r={method:"POST",path:"/2/abtests",queryParameters:{},headers:{},data:e};return u.request(r,t)},del:function(e,t){var r=e.path,s=e.parameters;if(!r)throw new Error("Parameter `path` is required when calling `del`.");var a={method:"DELETE",path:"/1{path}".replace("{path}",r),queryParameters:s||{},headers:{}};return u.request(a,t)},deleteABTest:function(e,t){var r=e.id;if(!r)throw new Error("Parameter `id` is required when calling `deleteABTest`.");var s={method:"DELETE",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(r)),queryParameters:{},headers:{}};return u.request(s,t)},get:function(e,t){var r=e.path,s=e.parameters;if(!r)throw new Error("Parameter `path` is required when calling `get`.");var a={method:"GET",path:"/1{path}".replace("{path}",r),queryParameters:s||{},headers:{}};return u.request(a,t)},getABTest:function(e,t){var r=e.id;if(!r)throw new Error("Parameter `id` is required when calling `getABTest`.");var s={method:"GET",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(r)),queryParameters:{},headers:{}};return u.request(s,t)},listABTests:function(e,t){var r=e.offset,s=e.limit,a={};void 0!==r&&(a.offset=r.toString()),void 0!==s&&(a.limit=s.toString());var n={method:"GET",path:"/2/abtests",queryParameters:a,headers:{}};return u.request(n,t)},post:function(e,t){var r=e.path,s=e.parameters,a=e.body;if(!r)throw new Error("Parameter `path` is required when calling `post`.");var n={method:"POST",path:"/1{path}".replace("{path}",r),queryParameters:s||{},headers:{},data:a||{}};return u.request(n,t)},put:function(e,t){var r=e.path,s=e.parameters,a=e.body;if(!r)throw new Error("Parameter `path` is required when calling `put`.");var n={method:"PUT",path:"/1{path}".replace("{path}",r),queryParameters:s||{},headers:{},data:a||{}};return u.request(n,t)},stopABTest:function(e,t){var r=e.id;if(!r)throw new Error("Parameter `id` is required when calling `stopABTest`.");var s={method:"POST",path:"/2/abtests/{id}/stop".replace("{id}",encodeURIComponent(r)),queryParameters:{},headers:{}};return u.request(s,t)}}}(function(e){for(var r=1;r<arguments.length;r++){var s=null!=arguments[r]?arguments[r]:{};r%2?q(Object(s),!0).forEach((function(r){t(e,r,s[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):q(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}({appId:e,apiKey:n,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 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:a(),requestsCache:a({serializable:!1}),hostsCache:s({caches:[r({key:"".concat(v,"-").concat(e)}),a()]})},i))},e.apiClientVersion=v}));
1
+ /*! client-abtesting.umd.js | 5.0.0-alpha.21 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
2
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/client-abtesting"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),s=a()[r];return Promise.all([s||t(),void 0!==s])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=a();return n[JSON.stringify(e)]=t,s().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,n={miss:()=>Promise.resolve()})=>s.get(e,a,n).catch((()=>r({caches:t}).get(e,a,n))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=s();return o.then((e=>a.miss(e))).then((()=>o))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function n(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),o(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends i{constructor(e,t,r){super(e,r),o(this,"stackTrace",void 0),this.stackTrace=t}}class u extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class l extends c{constructor(e,t,r){super(e,r,"ApiError"),o(this,"status",void 0),this.status=t}}class d extends i{constructor(e,t){super(e,"DeserializationError"),o(this,"response",void 0),this.response=t}}function h(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`)).join("&")}(r);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return s.length&&(a+=`?${s}`),a}function m(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function p({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:o,requester:i,requestsCache:c,responsesCache:p}){async function g(c,p,g=!0){const f=[],y=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,p),P=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,c.headers,p.headers),w="GET"===c.method?{...c.data,...p.data}:{},q={"x-algolia-agent":a.value,...s,...c.queryParameters,...w};if(p&&p.queryParameters)for(const e of Object.keys(p.queryParameters))p.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(p.queryParameters[e])?q[e]=p.queryParameters[e].toString():q[e]=p.queryParameters[e];let T=0;const b=async(e,r)=>{const s=e.pop();if(void 0===s)throw new u(function(e){return e.map((e=>m(e)))}(f));let a=p.timeout;void 0===a&&(a=g?o.read:o.write);const w={data:y,headers:P,method:c.method,url:h(s,c.path,q),connectTimeout:r(T,o.connect),responseTimeout:r(T,a)},v=t=>{const r={request:w,response:t,host:s,triesLeft:e.length};return f.push(r),r},O=await i.send(w);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(O)){const a=v(O);return O.isTimedOut&&T++,console.log("Retryable failure",m(a)),await t.set(s,n(s,O.isTimedOut?"timed out":"down")),b(e,r)}if(function({status:e}){return 2==~~(e/100)}(O))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(O);throw v(O),function({content:e,status:t},r){let s=e;try{s=JSON.parse(e).message}catch(e){}return new l(s,t,r)}(O,f)},v=e.filter((e=>"readWrite"===e.accept||(g?"read"===e.accept:"write"===e.accept))),O=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(n(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),o=[...s,...a];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(v);return b([...O.hosts].reverse(),O.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return g(e,t,a);const n=()=>g(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return p.get(o,(()=>c.get(o,(()=>c.set(o,n()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>p.set(o,e)})},requestsCache:c,responsesCache:p}}function g({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const f="5.0.0-alpha.21",y=["de","us"];e.abtestingClient=function(e,a,n,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");if(n&&("string"!=typeof n||!y.includes(n)))throw new Error(`\`region\` must be one of the following: ${y.join(", ")}`);return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,region:a,...n}){const o=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(e,t,r),i=p({hosts:(c=a,[{url:c?"analytics.{region}.algolia.com".replace("{region}",c):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...n,algoliaAgent:g({algoliaAgents:s,client:"Abtesting",version:f}),baseHeaders:{"content-type":"text/plain",...o.headers(),...n.baseHeaders},baseQueryParameters:{...o.queryParameters(),...n.baseQueryParameters}});var c;return{transporter:i,appId:e,clearCache:()=>Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then((()=>{})),get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,t){i.algoliaAgent.add({segment:e,version:t})},addABTests(e,t){if(!e)throw new Error("Parameter `addABTestsRequest` is required when calling `addABTests`.");if(!e.name)throw new Error("Parameter `addABTestsRequest.name` is required when calling `addABTests`.");if(!e.variant)throw new Error("Parameter `addABTestsRequest.variant` is required when calling `addABTests`.");if(!e.endAt)throw new Error("Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.");const r={method:"POST",path:"/2/abtests",queryParameters:{},headers:{},data:e};return i.request(r,t)},del({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `del`.");const s={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return i.request(s,r)},deleteABTest({id:e},t){if(!e)throw new Error("Parameter `id` is required when calling `deleteABTest`.");const r={method:"DELETE",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},get({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `get`.");const s={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return i.request(s,r)},getABTest({id:e},t){if(!e)throw new Error("Parameter `id` is required when calling `getABTest`.");const r={method:"GET",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},listABTests({offset:e,limit:t}={},r){const s={};void 0!==e&&(s.offset=e.toString()),void 0!==t&&(s.limit=t.toString());const a={method:"GET",path:"/2/abtests",queryParameters:s,headers:{}};return i.request(a,r)},post({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const a={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},put({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `put`.");const a={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},stopABTest({id:e},t){if(!e)throw new Error("Parameter `id` is required when calling `stopABTest`.");const r={method:"POST",path:"/2/abtests/{id}/stop".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)}}}({appId:e,apiKey:a,region:n,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:r({caches:[t({key:`5.0.0-alpha.21-${e}`}),s()]}),...o})},e.apiClientVersion=f}));
@@ -1 +1 @@
1
- {"version":3,"file":"aBTest.d.ts","sourceRoot":"","sources":["../../../../packages/client-abtesting/model/aBTest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,oBAAY,MAAM,GAAG;IACnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB,CAAC"}
1
+ {"version":3,"file":"aBTest.d.ts","sourceRoot":"","sources":["../../model/aBTest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,oBAAY,MAAM,GAAG;IACnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"aBTestResponse.d.ts","sourceRoot":"","sources":["../../../../packages/client-abtesting/model/aBTestResponse.ts"],"names":[],"mappings":"AAEA,oBAAY,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
1
+ {"version":3,"file":"aBTestResponse.d.ts","sourceRoot":"","sources":["../../model/aBTestResponse.ts"],"names":[],"mappings":"AAEA,oBAAY,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"abTestsVariant.d.ts","sourceRoot":"","sources":["../../../../packages/client-abtesting/model/abTestsVariant.ts"],"names":[],"mappings":"AAEA,oBAAY,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"abTestsVariant.d.ts","sourceRoot":"","sources":["../../model/abTestsVariant.ts"],"names":[],"mappings":"AAEA,oBAAY,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"abTestsVariantSearchParams.d.ts","sourceRoot":"","sources":["../../../../packages/client-abtesting/model/abTestsVariantSearchParams.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,oBAAY,0BAA0B,GAAG,cAAc,GAAG,kBAAkB,CAAC"}
1
+ {"version":3,"file":"abTestsVariantSearchParams.d.ts","sourceRoot":"","sources":["../../model/abTestsVariantSearchParams.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,oBAAY,0BAA0B,GAAG,cAAc,GAAG,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"addABTestsRequest.d.ts","sourceRoot":"","sources":["../../../../packages/client-abtesting/model/addABTestsRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,oBAAY,iBAAiB,GAAG;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
1
+ {"version":3,"file":"addABTestsRequest.d.ts","sourceRoot":"","sources":["../../model/addABTestsRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,oBAAY,iBAAiB,GAAG;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAE7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"addABTestsVariant.d.ts","sourceRoot":"","sources":["../../../../packages/client-abtesting/model/addABTestsVariant.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE/E,oBAAY,iBAAiB,GAAG,cAAc,GAAG,0BAA0B,CAAC"}
1
+ {"version":3,"file":"addABTestsVariant.d.ts","sourceRoot":"","sources":["../../model/addABTestsVariant.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE/E,oBAAY,iBAAiB,GAAG,cAAc,GAAG,0BAA0B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../../../packages/client-abtesting/model/clientMethodProps.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAA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,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"customSearchParams.d.ts","sourceRoot":"","sources":["../../../../packages/client-abtesting/model/customSearchParams.ts"],"names":[],"mappings":"AAEA,oBAAY,kBAAkB,GAAG;IAC/B,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7C,CAAC"}
1
+ {"version":3,"file":"customSearchParams.d.ts","sourceRoot":"","sources":["../../model/customSearchParams.ts"],"names":[],"mappings":"AAEA,oBAAY,kBAAkB,GAAG;IAC/B,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"errorBase.d.ts","sourceRoot":"","sources":["../../../../packages/client-abtesting/model/errorBase.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
1
+ {"version":3,"file":"errorBase.d.ts","sourceRoot":"","sources":["../../model/errorBase.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/client-abtesting/model/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../model/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"listABTestsResponse.d.ts","sourceRoot":"","sources":["../../../../packages/client-abtesting/model/listABTestsResponse.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,oBAAY,mBAAmB,GAAG;IAChC;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
1
+ {"version":3,"file":"listABTestsResponse.d.ts","sourceRoot":"","sources":["../../model/listABTestsResponse.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,oBAAY,mBAAmB,GAAG;IAChC;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"variant.d.ts","sourceRoot":"","sources":["../../../../packages/client-abtesting/model/variant.ts"],"names":[],"mappings":"AAEA,oBAAY,OAAO,GAAG;IACpB;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
1
+ {"version":3,"file":"variant.d.ts","sourceRoot":"","sources":["../../model/variant.ts"],"names":[],"mappings":"AAEA,oBAAY,OAAO,GAAG;IACpB;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
@@ -4,13 +4,21 @@ import type { ABTestResponse } from '../model/aBTestResponse';
4
4
  import type { AddABTestsRequest } from '../model/addABTestsRequest';
5
5
  import type { DelProps, DeleteABTestProps, GetProps, GetABTestProps, ListABTestsProps, PostProps, PutProps, StopABTestProps } from '../model/clientMethodProps';
6
6
  import type { ListABTestsResponse } from '../model/listABTestsResponse';
7
- export declare const apiClientVersion = "5.0.0-alpha.2";
7
+ export declare const apiClientVersion = "5.0.0-alpha.21";
8
8
  export declare const REGIONS: readonly ["de", "us"];
9
9
  export declare type Region = typeof REGIONS[number];
10
10
  export declare function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
11
11
  region?: Region;
12
12
  }): {
13
13
  transporter: import("@algolia/client-common").Transporter;
14
+ /**
15
+ * The `appId` currently in use.
16
+ */
17
+ appId: string;
18
+ /**
19
+ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
20
+ */
21
+ clearCache(): Promise<void>;
14
22
  /**
15
23
  * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
16
24
  */
@@ -77,7 +85,7 @@ export declare function createAbtestingClient({ appId: appIdOption, apiKey: apiK
77
85
  * @param listABTests.limit - Number of records to return. Limit is the size of the page.
78
86
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
79
87
  */
80
- listABTests({ offset, limit }: ListABTestsProps, requestOptions?: RequestOptions): Promise<ListABTestsResponse>;
88
+ listABTests({ offset, limit }?: ListABTestsProps, requestOptions?: RequestOptions | undefined): Promise<ListABTestsResponse>;
81
89
  /**
82
90
  * This method allow you to send requests to the Algolia REST API.
83
91
  *
@@ -1 +1 @@
1
- {"version":3,"file":"abtestingClient.d.ts","sourceRoot":"","sources":["../../../../packages/client-abtesting/src/abtestingClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MA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;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;OAMG;kCAEkB,iBAAiB,mBACnB,cAAc,GAC9B,QAAQ,cAAc,CAAC;IAsC1B;;;;;;;;OAQG;8BAEqB,QAAQ,mBACb,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAmB/B;;;;;;;OAOG;yBAEO,iBAAiB,mBACR,cAAc,GAC9B,QAAQ,cAAc,CAAC;IAwB1B;;;;;;;;OAQG;8BAEqB,QAAQ,mBACb,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAmB/B;;;;;;;OAOG;sBAEO,cAAc,mBACL,cAAc,GAC9B,QAAQ,MAAM,CAAC;IAsBlB;;;;;;;;OAQG;oCAEkB,gBAAgB,mBACnB,cAAc,GAAG,SAAS,GACzC,QAAQ,mBAAmB,CAAC;IAuB/B;;;;;;;;;OASG;qCAE2B,SAAS,mBACpB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAoB/B;;;;;;;;;OASG;oCAE2B,QAAQ,mBACnB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAoB/B;;;;;;;OAOG;uBAEO,eAAe,mBACN,cAAc,GAC9B,QAAQ,cAAc,CAAC;EAwB7B;AAED;;GAEG;AACH,oBAAY,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
package/model/aBTest.ts CHANGED
@@ -7,34 +7,42 @@ export type ABTest = {
7
7
  * The A/B test ID.
8
8
  */
9
9
  abTestID: number;
10
+
10
11
  /**
11
12
  * A/B test significance based on click data. Should be > 0.95 to be considered significant (no matter which variant is winning).
12
13
  */
13
14
  clickSignificance: number;
15
+
14
16
  /**
15
17
  * A/B test significance based on conversion data. Should be > 0.95 to be considered significant (no matter which variant is winning).
16
18
  */
17
19
  conversionSignificance: number;
20
+
18
21
  /**
19
22
  * End date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ.
20
23
  */
21
24
  endAt: string;
25
+
22
26
  /**
23
27
  * Update date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ.
24
28
  */
25
29
  updatedAt: string;
30
+
26
31
  /**
27
32
  * Creation date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ.
28
33
  */
29
34
  createdAt: string;
35
+
30
36
  /**
31
37
  * A/B test name.
32
38
  */
33
39
  name: string;
40
+
34
41
  /**
35
42
  * Status of the A/B test.
36
43
  */
37
44
  status: string;
45
+
38
46
  /**
39
47
  * List of A/B test variant.
40
48
  */
@@ -5,10 +5,12 @@ export type ABTestResponse = {
5
5
  * The index performing the A/B test.
6
6
  */
7
7
  index: string;
8
+
8
9
  /**
9
10
  * The A/B test ID.
10
11
  */
11
12
  abTestID: number;
13
+
12
14
  /**
13
15
  * TaskID of the task to wait for.
14
16
  */
@@ -5,10 +5,12 @@ export type AbTestsVariant = {
5
5
  * The index performing the A/B test.
6
6
  */
7
7
  index: string;
8
+
8
9
  /**
9
10
  * The traffic percentage for the A/B test.
10
11
  */
11
12
  trafficPercentage: number;
13
+
12
14
  /**
13
15
  * The A/B test description.
14
16
  */
@@ -7,10 +7,12 @@ export type AddABTestsRequest = {
7
7
  * A/B test name.
8
8
  */
9
9
  name: string;
10
+
10
11
  /**
11
12
  * List of 2 variants for the A/B test.
12
13
  */
13
14
  variant: AddABTestsVariant[];
15
+
14
16
  /**
15
17
  * End date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ.
16
18
  */
@@ -7,10 +7,12 @@ export type ListABTestsResponse = {
7
7
  * List of A/B tests.
8
8
  */
9
9
  abtests: ABTest[];
10
+
10
11
  /**
11
12
  * Number of A/B tests found for the app.
12
13
  */
13
14
  count: number;
15
+
14
16
  /**
15
17
  * Number of A/B tests retrievable.
16
18
  */
package/model/variant.ts CHANGED
@@ -5,46 +5,57 @@ export type Variant = {
5
5
  * Average click position for the variant.
6
6
  */
7
7
  averageClickPosition: number;
8
+
8
9
  /**
9
10
  * Distinct click count for the variant.
10
11
  */
11
12
  clickCount: number;
13
+
12
14
  /**
13
15
  * Click through rate for the variant.
14
16
  */
15
17
  clickThroughRate: number;
18
+
16
19
  /**
17
20
  * Distinct conversion count for the variant.
18
21
  */
19
22
  conversionCount: number;
23
+
20
24
  /**
21
25
  * Conversion rate for the variant.
22
26
  */
23
27
  conversionRate: number;
28
+
24
29
  /**
25
30
  * The A/B test description.
26
31
  */
27
32
  description: string;
33
+
28
34
  /**
29
35
  * The index performing the A/B test.
30
36
  */
31
37
  index: string;
38
+
32
39
  /**
33
40
  * The number of occurrences.
34
41
  */
35
42
  noResultCount: number;
43
+
36
44
  /**
37
45
  * The number of search during the A/B test.
38
46
  */
39
47
  searchCount: number;
48
+
40
49
  /**
41
50
  * The number of tracked search click.
42
51
  */
43
52
  trackedSearchCount: number;
53
+
44
54
  /**
45
55
  * The traffic percentage for the A/B test.
46
56
  */
47
57
  trafficPercentage: number;
58
+
48
59
  /**
49
60
  * The number of user during the A/B test.
50
61
  */
package/package.json CHANGED
@@ -1,16 +1,32 @@
1
1
  {
2
2
  "name": "@algolia/client-abtesting",
3
- "version": "5.0.0-alpha.2",
3
+ "version": "5.0.0-alpha.21",
4
4
  "description": "JavaScript client for client-abtesting",
5
5
  "repository": "algolia/algoliasearch-client-javascript",
6
6
  "license": "MIT",
7
7
  "author": "Algolia",
8
- "main": "index.js",
9
- "jsdelivr": "dist/client-abtesting.umd.js",
10
- "unpkg": "dist/client-abtesting.umd.js",
11
- "module": "dist/client-abtesting.esm.node.js",
12
- "browser": "dist/client-abtesting.umd.js",
13
- "types": "index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "node": {
11
+ "import": "./dist/client-abtesting.esm.node.js",
12
+ "module": "./dist/client-abtesting.esm.node.js",
13
+ "require": "./dist/client-abtesting.cjs.js",
14
+ "default": "./dist/client-abtesting.cjs.js"
15
+ },
16
+ "default": {
17
+ "umd": "./dist/client-abtesting.umd.js",
18
+ "module": "./dist/client-abtesting.esm.browser.js",
19
+ "import": "./dist/client-abtesting.esm.browser.js",
20
+ "default": "./dist/client-abtesting.umd.js"
21
+ }
22
+ },
23
+ "./src/*": "./src/*.ts",
24
+ "./model": "./model/index.ts"
25
+ },
26
+ "jsdelivr": "./dist/client-abtesting.umd.js",
27
+ "unpkg": "./dist/client-abtesting.umd.js",
28
+ "browser": "./dist/client-abtesting.umd.js",
29
+ "types": "./index.d.ts",
14
30
  "files": [
15
31
  "dist",
16
32
  "model",
@@ -18,16 +34,18 @@
18
34
  "index.d.ts"
19
35
  ],
20
36
  "scripts": {
21
- "clean": "rm -rf ./dist"
37
+ "build": "yarn clean && rollup --config",
38
+ "clean": "rm -rf ./dist || true"
22
39
  },
23
40
  "dependencies": {
24
- "@algolia/client-common": "5.0.0-alpha.2",
25
- "@algolia/requester-browser-xhr": "5.0.0-alpha.2",
26
- "@algolia/requester-node-http": "5.0.0-alpha.2"
41
+ "@algolia/client-common": "5.0.0-alpha.21",
42
+ "@algolia/requester-browser-xhr": "5.0.0-alpha.21",
43
+ "@algolia/requester-node-http": "5.0.0-alpha.21"
27
44
  },
28
45
  "devDependencies": {
29
- "@types/node": "16.11.45",
30
- "typescript": "4.7.4"
46
+ "@types/node": "16.11.59",
47
+ "rollup": "2.79.0",
48
+ "typescript": "4.8.3"
31
49
  },
32
50
  "engines": {
33
51
  "node": ">= 14.0.0"