@algolia/client-abtesting 5.0.0-alpha.53 → 5.0.0-alpha.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builds/browser.d.ts +5 -5
- package/dist/builds/node.d.ts +5 -5
- package/dist/client-abtesting.cjs.js +316 -316
- package/dist/client-abtesting.esm.browser.js +440 -440
- package/dist/client-abtesting.esm.node.js +316 -316
- package/dist/client-abtesting.umd.js +2 -2
- package/dist/model/aBTest.d.ts +39 -39
- package/dist/model/aBTestResponse.d.ts +14 -14
- package/dist/model/abTestsVariant.d.ts +14 -14
- package/dist/model/abTestsVariantSearchParams.d.ts +3 -3
- package/dist/model/addABTestsRequest.d.ts +15 -15
- package/dist/model/addABTestsVariant.d.ts +3 -3
- package/dist/model/clientMethodProps.d.ts +100 -100
- package/dist/model/customSearchParams.d.ts +3 -3
- package/dist/model/errorBase.d.ts +6 -6
- package/dist/model/index.d.ts +11 -11
- package/dist/model/listABTestsResponse.d.ts +15 -15
- package/dist/model/variant.d.ts +50 -50
- package/dist/src/abtestingClient.d.ts +124 -124
- package/package.json +6 -6
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! client-abtesting.umd.js | 5.0.0-alpha.
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/client-abtesting"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),s=a()[r];return Promise.all([s||t(),void 0!==s])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=a();return n[JSON.stringify(e)]=t,s().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,n={miss:()=>Promise.resolve()})=>s.get(e,a,n).catch((()=>r({caches:t}).get(e,a,n))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=s();return o.then((e=>a.miss(e))).then((()=>o))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function n(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),o(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends i{constructor(e,t,r){super(e,r),o(this,"stackTrace",void 0),this.stackTrace=t}}class u extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class l extends c{constructor(e,t,r,s="ApiError"){super(e,r,s),o(this,"status",void 0),this.status=t}}class d extends i{constructor(e,t){super(e,"DeserializationError"),o(this,"response",void 0),this.response=t}}class h extends l{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),o(this,"error",void 0),this.error=r}}function m(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`)).join("&")}(r);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return s.length&&(a+=`?${s}`),a}function p(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function g({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:o,requester:i,requestsCache:c,responsesCache:g}){async function f(c,g,f=!0){const y=[],w=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,g),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,g.headers),q="GET"===c.method?{...c.data,...g.data}:{},v={...s,...c.queryParameters,...q};if(a.value&&(v["x-algolia-agent"]=a.value),g&&g.queryParameters)for(const e of Object.keys(g.queryParameters))g.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(g.queryParameters[e])?v[e]=g.queryParameters[e].toString():v[e]=g.queryParameters[e];let T=0;const b=async(e,r)=>{const s=e.pop();if(void 0===s)throw new u(function(e){return e.map((e=>p(e)))}(y));let a=g.timeout;void 0===a&&(a=f?o.read:o.write);const q={data:w,headers:P,method:c.method,url:m(s,c.path,v),connectTimeout:r(T,o.connect),responseTimeout:r(T,a)},O=t=>{const r={request:q,response:t,host:s,triesLeft:e.length};return y.push(r),r},A=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(A)){const a=O(A);return A.isTimedOut&&T++,console.log("Retryable failure",p(a)),await t.set(s,n(s,A.isTimedOut?"timed out":"down")),b(e,r)}if(function({status:e}){return 2==~~(e/100)}(A))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(A);throw O(A),function({content:e,status:t},r){try{const s=JSON.parse(e);return"error"in s?new h(s.message,t,s.error,r):new l(s.message,t,r)}catch(e){}return new l(e,t,r)}(A,y)},O=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),A=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(n(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),o=[...s,...a];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(O);return b([...A.hosts].reverse(),A.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return 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 g.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=>g.set(o,e)})},requestsCache:c,responsesCache:g}}function f({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const y=1e3,w=2e3,P=3e4;const q="5.0.0-alpha.53",v=["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||!v.includes(n)))throw new Error(`\`region\` must be one of the following: ${v.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=g({hosts:(c=a,[{url:c?"analytics.{region}.algolia.com".replace("{region}",c):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...n,algoliaAgent:f({algoliaAgents:s,client:"Abtesting",version:q}),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=undefined){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:y,read:w,write:P},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:`${q}-${e}`}),s()]}),...o})},e.apiClientVersion=q}));
|
|
1
|
+
/*! client-abtesting.umd.js | 5.0.0-alpha.54 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/client-abtesting"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),s=a()[r];return Promise.all([s||t(),void 0!==s])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=a();return n[JSON.stringify(e)]=t,s().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,n={miss:()=>Promise.resolve()})=>s.get(e,a,n).catch((()=>r({caches:t}).get(e,a,n))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=s();return o.then((e=>a.miss(e))).then((()=>o))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function n(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),o(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends i{constructor(e,t,r){super(e,r),o(this,"stackTrace",void 0),this.stackTrace=t}}class u extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class l extends c{constructor(e,t,r,s="ApiError"){super(e,r,s),o(this,"status",void 0),this.status=t}}class d extends i{constructor(e,t){super(e,"DeserializationError"),o(this,"response",void 0),this.response=t}}class h extends l{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),o(this,"error",void 0),this.error=r}}function m(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`)).join("&")}(r);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return s.length&&(a+=`?${s}`),a}function p(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function g({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:o,requester:i,requestsCache:c,responsesCache:g}){async function f(c,g,f=!0){const y=[],w=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,g),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,g.headers),q="GET"===c.method?{...c.data,...g.data}:{},v={...s,...c.queryParameters,...q};if(a.value&&(v["x-algolia-agent"]=a.value),g&&g.queryParameters)for(const e of Object.keys(g.queryParameters))g.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(g.queryParameters[e])?v[e]=g.queryParameters[e].toString():v[e]=g.queryParameters[e];let T=0;const b=async(e,r)=>{const s=e.pop();if(void 0===s)throw new u(function(e){return e.map((e=>p(e)))}(y));let a=g.timeout;void 0===a&&(a=f?o.read:o.write);const q={data:w,headers:P,method:c.method,url:m(s,c.path,v),connectTimeout:r(T,o.connect),responseTimeout:r(T,a)},O=t=>{const r={request:q,response:t,host:s,triesLeft:e.length};return y.push(r),r},A=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(A)){const a=O(A);return A.isTimedOut&&T++,console.log("Retryable failure",p(a)),await t.set(s,n(s,A.isTimedOut?"timed out":"down")),b(e,r)}if(function({status:e}){return 2==~~(e/100)}(A))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(A);throw O(A),function({content:e,status:t},r){try{const s=JSON.parse(e);return"error"in s?new h(s.message,t,s.error,r):new l(s.message,t,r)}catch(e){}return new l(e,t,r)}(A,y)},O=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),A=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(n(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),o=[...s,...a];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(O);return b([...A.hosts].reverse(),A.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return 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 g.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=>g.set(o,e)})},requestsCache:c,responsesCache:g}}function f({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const y=1e3,w=2e3,P=3e4;const q="5.0.0-alpha.54",v=["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||!v.includes(n)))throw new Error(`\`region\` must be one of the following: ${v.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=g({hosts:(c=a,[{url:c?"analytics.{region}.algolia.com".replace("{region}",c):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...n,algoliaAgent:f({algoliaAgents:s,client:"Abtesting",version:q}),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=undefined){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:y,read:w,write:P},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:`${q}-${e}`}),s()]}),...o})},e.apiClientVersion=q}));
|
package/dist/model/aBTest.d.ts
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import type { Variant } from './variant';
|
|
2
|
-
export type ABTest = {
|
|
3
|
-
/**
|
|
4
|
-
* The A/B test ID.
|
|
5
|
-
*/
|
|
6
|
-
abTestID: number;
|
|
7
|
-
/**
|
|
8
|
-
* A/B test significance based on click data. Should be > 0.95 to be considered significant (no matter which variant is winning).
|
|
9
|
-
*/
|
|
10
|
-
clickSignificance: number;
|
|
11
|
-
/**
|
|
12
|
-
* A/B test significance based on conversion data. Should be > 0.95 to be considered significant (no matter which variant is winning).
|
|
13
|
-
*/
|
|
14
|
-
conversionSignificance: number;
|
|
15
|
-
/**
|
|
16
|
-
* End date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ.
|
|
17
|
-
*/
|
|
18
|
-
endAt: string;
|
|
19
|
-
/**
|
|
20
|
-
* Update date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ.
|
|
21
|
-
*/
|
|
22
|
-
updatedAt: string;
|
|
23
|
-
/**
|
|
24
|
-
* Creation date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ.
|
|
25
|
-
*/
|
|
26
|
-
createdAt: string;
|
|
27
|
-
/**
|
|
28
|
-
* A/B test name.
|
|
29
|
-
*/
|
|
30
|
-
name: string;
|
|
31
|
-
/**
|
|
32
|
-
* Status of the A/B test.
|
|
33
|
-
*/
|
|
34
|
-
status: string;
|
|
35
|
-
/**
|
|
36
|
-
* List of A/B test variant.
|
|
37
|
-
*/
|
|
38
|
-
variants: Variant[];
|
|
39
|
-
};
|
|
1
|
+
import type { Variant } from './variant';
|
|
2
|
+
export type ABTest = {
|
|
3
|
+
/**
|
|
4
|
+
* The A/B test ID.
|
|
5
|
+
*/
|
|
6
|
+
abTestID: number;
|
|
7
|
+
/**
|
|
8
|
+
* A/B test significance based on click data. Should be > 0.95 to be considered significant (no matter which variant is winning).
|
|
9
|
+
*/
|
|
10
|
+
clickSignificance: number;
|
|
11
|
+
/**
|
|
12
|
+
* A/B test significance based on conversion data. Should be > 0.95 to be considered significant (no matter which variant is winning).
|
|
13
|
+
*/
|
|
14
|
+
conversionSignificance: number;
|
|
15
|
+
/**
|
|
16
|
+
* End date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ.
|
|
17
|
+
*/
|
|
18
|
+
endAt: string;
|
|
19
|
+
/**
|
|
20
|
+
* Update date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ.
|
|
21
|
+
*/
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
/**
|
|
24
|
+
* Creation date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ.
|
|
25
|
+
*/
|
|
26
|
+
createdAt: string;
|
|
27
|
+
/**
|
|
28
|
+
* A/B test name.
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
/**
|
|
32
|
+
* Status of the A/B test.
|
|
33
|
+
*/
|
|
34
|
+
status: string;
|
|
35
|
+
/**
|
|
36
|
+
* List of A/B test variant.
|
|
37
|
+
*/
|
|
38
|
+
variants: Variant[];
|
|
39
|
+
};
|
|
40
40
|
//# sourceMappingURL=aBTest.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export type ABTestResponse = {
|
|
2
|
-
/**
|
|
3
|
-
* The index performing the A/B test.
|
|
4
|
-
*/
|
|
5
|
-
index: string;
|
|
6
|
-
/**
|
|
7
|
-
* The A/B test ID.
|
|
8
|
-
*/
|
|
9
|
-
abTestID: number;
|
|
10
|
-
/**
|
|
11
|
-
* TaskID of the task to wait for.
|
|
12
|
-
*/
|
|
13
|
-
taskID: number;
|
|
14
|
-
};
|
|
1
|
+
export type ABTestResponse = {
|
|
2
|
+
/**
|
|
3
|
+
* The index performing the A/B test.
|
|
4
|
+
*/
|
|
5
|
+
index: string;
|
|
6
|
+
/**
|
|
7
|
+
* The A/B test ID.
|
|
8
|
+
*/
|
|
9
|
+
abTestID: number;
|
|
10
|
+
/**
|
|
11
|
+
* TaskID of the task to wait for.
|
|
12
|
+
*/
|
|
13
|
+
taskID: number;
|
|
14
|
+
};
|
|
15
15
|
//# sourceMappingURL=aBTestResponse.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export type AbTestsVariant = {
|
|
2
|
-
/**
|
|
3
|
-
* The index performing the A/B test.
|
|
4
|
-
*/
|
|
5
|
-
index: string;
|
|
6
|
-
/**
|
|
7
|
-
* The traffic percentage for the A/B test.
|
|
8
|
-
*/
|
|
9
|
-
trafficPercentage: number;
|
|
10
|
-
/**
|
|
11
|
-
* The A/B test description.
|
|
12
|
-
*/
|
|
13
|
-
description?: string;
|
|
14
|
-
};
|
|
1
|
+
export type AbTestsVariant = {
|
|
2
|
+
/**
|
|
3
|
+
* The index performing the A/B test.
|
|
4
|
+
*/
|
|
5
|
+
index: string;
|
|
6
|
+
/**
|
|
7
|
+
* The traffic percentage for the A/B test.
|
|
8
|
+
*/
|
|
9
|
+
trafficPercentage: number;
|
|
10
|
+
/**
|
|
11
|
+
* The A/B test description.
|
|
12
|
+
*/
|
|
13
|
+
description?: string;
|
|
14
|
+
};
|
|
15
15
|
//# sourceMappingURL=abTestsVariant.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AbTestsVariant } from './abTestsVariant';
|
|
2
|
-
import type { CustomSearchParams } from './customSearchParams';
|
|
3
|
-
export type AbTestsVariantSearchParams = AbTestsVariant & CustomSearchParams;
|
|
1
|
+
import type { AbTestsVariant } from './abTestsVariant';
|
|
2
|
+
import type { CustomSearchParams } from './customSearchParams';
|
|
3
|
+
export type AbTestsVariantSearchParams = AbTestsVariant & CustomSearchParams;
|
|
4
4
|
//# sourceMappingURL=abTestsVariantSearchParams.d.ts.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { AddABTestsVariant } from './addABTestsVariant';
|
|
2
|
-
export type AddABTestsRequest = {
|
|
3
|
-
/**
|
|
4
|
-
* A/B test name.
|
|
5
|
-
*/
|
|
6
|
-
name: string;
|
|
7
|
-
/**
|
|
8
|
-
* List of 2 variants for the A/B test.
|
|
9
|
-
*/
|
|
10
|
-
variant: AddABTestsVariant[];
|
|
11
|
-
/**
|
|
12
|
-
* End date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ.
|
|
13
|
-
*/
|
|
14
|
-
endAt: string;
|
|
15
|
-
};
|
|
1
|
+
import type { AddABTestsVariant } from './addABTestsVariant';
|
|
2
|
+
export type AddABTestsRequest = {
|
|
3
|
+
/**
|
|
4
|
+
* A/B test name.
|
|
5
|
+
*/
|
|
6
|
+
name: string;
|
|
7
|
+
/**
|
|
8
|
+
* List of 2 variants for the A/B test.
|
|
9
|
+
*/
|
|
10
|
+
variant: AddABTestsVariant[];
|
|
11
|
+
/**
|
|
12
|
+
* End date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ.
|
|
13
|
+
*/
|
|
14
|
+
endAt: string;
|
|
15
|
+
};
|
|
16
16
|
//# sourceMappingURL=addABTestsRequest.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AbTestsVariant } from './abTestsVariant';
|
|
2
|
-
import type { AbTestsVariantSearchParams } from './abTestsVariantSearchParams';
|
|
3
|
-
export type AddABTestsVariant = AbTestsVariant | AbTestsVariantSearchParams;
|
|
1
|
+
import type { AbTestsVariant } from './abTestsVariant';
|
|
2
|
+
import type { AbTestsVariantSearchParams } from './abTestsVariantSearchParams';
|
|
3
|
+
export type AddABTestsVariant = AbTestsVariant | AbTestsVariantSearchParams;
|
|
4
4
|
//# sourceMappingURL=addABTestsVariant.d.ts.map
|
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Properties for the `del` method.
|
|
3
|
-
*/
|
|
4
|
-
export type DelProps = {
|
|
5
|
-
/**
|
|
6
|
-
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
7
|
-
*/
|
|
8
|
-
path: string;
|
|
9
|
-
/**
|
|
10
|
-
* Query parameters to be applied to the current query.
|
|
11
|
-
*/
|
|
12
|
-
parameters?: Record<string, any>;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Properties for the `deleteABTest` method.
|
|
16
|
-
*/
|
|
17
|
-
export type DeleteABTestProps = {
|
|
18
|
-
/**
|
|
19
|
-
* The A/B test ID.
|
|
20
|
-
*/
|
|
21
|
-
id: number;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Properties for the `get` method.
|
|
25
|
-
*/
|
|
26
|
-
export type GetProps = {
|
|
27
|
-
/**
|
|
28
|
-
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
29
|
-
*/
|
|
30
|
-
path: string;
|
|
31
|
-
/**
|
|
32
|
-
* Query parameters to be applied to the current query.
|
|
33
|
-
*/
|
|
34
|
-
parameters?: Record<string, any>;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Properties for the `getABTest` method.
|
|
38
|
-
*/
|
|
39
|
-
export type GetABTestProps = {
|
|
40
|
-
/**
|
|
41
|
-
* The A/B test ID.
|
|
42
|
-
*/
|
|
43
|
-
id: number;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* Properties for the `listABTests` method.
|
|
47
|
-
*/
|
|
48
|
-
export type ListABTestsProps = {
|
|
49
|
-
/**
|
|
50
|
-
* Position of the starting record. Used for paging. 0 is the first record.
|
|
51
|
-
*/
|
|
52
|
-
offset?: number;
|
|
53
|
-
/**
|
|
54
|
-
* Number of records to return. Limit is the size of the page.
|
|
55
|
-
*/
|
|
56
|
-
limit?: number;
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Properties for the `post` method.
|
|
60
|
-
*/
|
|
61
|
-
export type PostProps = {
|
|
62
|
-
/**
|
|
63
|
-
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
64
|
-
*/
|
|
65
|
-
path: string;
|
|
66
|
-
/**
|
|
67
|
-
* Query parameters to be applied to the current query.
|
|
68
|
-
*/
|
|
69
|
-
parameters?: Record<string, any>;
|
|
70
|
-
/**
|
|
71
|
-
* The parameters to send with the custom request.
|
|
72
|
-
*/
|
|
73
|
-
body?: Record<string, any>;
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* Properties for the `put` method.
|
|
77
|
-
*/
|
|
78
|
-
export type PutProps = {
|
|
79
|
-
/**
|
|
80
|
-
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
81
|
-
*/
|
|
82
|
-
path: string;
|
|
83
|
-
/**
|
|
84
|
-
* Query parameters to be applied to the current query.
|
|
85
|
-
*/
|
|
86
|
-
parameters?: Record<string, any>;
|
|
87
|
-
/**
|
|
88
|
-
* The parameters to send with the custom request.
|
|
89
|
-
*/
|
|
90
|
-
body?: Record<string, any>;
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* Properties for the `stopABTest` method.
|
|
94
|
-
*/
|
|
95
|
-
export type StopABTestProps = {
|
|
96
|
-
/**
|
|
97
|
-
* The A/B test ID.
|
|
98
|
-
*/
|
|
99
|
-
id: number;
|
|
100
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Properties for the `del` method.
|
|
3
|
+
*/
|
|
4
|
+
export type DelProps = {
|
|
5
|
+
/**
|
|
6
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
7
|
+
*/
|
|
8
|
+
path: string;
|
|
9
|
+
/**
|
|
10
|
+
* Query parameters to be applied to the current query.
|
|
11
|
+
*/
|
|
12
|
+
parameters?: Record<string, any>;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Properties for the `deleteABTest` method.
|
|
16
|
+
*/
|
|
17
|
+
export type DeleteABTestProps = {
|
|
18
|
+
/**
|
|
19
|
+
* The A/B test ID.
|
|
20
|
+
*/
|
|
21
|
+
id: number;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Properties for the `get` method.
|
|
25
|
+
*/
|
|
26
|
+
export type GetProps = {
|
|
27
|
+
/**
|
|
28
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
29
|
+
*/
|
|
30
|
+
path: string;
|
|
31
|
+
/**
|
|
32
|
+
* Query parameters to be applied to the current query.
|
|
33
|
+
*/
|
|
34
|
+
parameters?: Record<string, any>;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Properties for the `getABTest` method.
|
|
38
|
+
*/
|
|
39
|
+
export type GetABTestProps = {
|
|
40
|
+
/**
|
|
41
|
+
* The A/B test ID.
|
|
42
|
+
*/
|
|
43
|
+
id: number;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Properties for the `listABTests` method.
|
|
47
|
+
*/
|
|
48
|
+
export type ListABTestsProps = {
|
|
49
|
+
/**
|
|
50
|
+
* Position of the starting record. Used for paging. 0 is the first record.
|
|
51
|
+
*/
|
|
52
|
+
offset?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Number of records to return. Limit is the size of the page.
|
|
55
|
+
*/
|
|
56
|
+
limit?: number;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Properties for the `post` method.
|
|
60
|
+
*/
|
|
61
|
+
export type PostProps = {
|
|
62
|
+
/**
|
|
63
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
64
|
+
*/
|
|
65
|
+
path: string;
|
|
66
|
+
/**
|
|
67
|
+
* Query parameters to be applied to the current query.
|
|
68
|
+
*/
|
|
69
|
+
parameters?: Record<string, any>;
|
|
70
|
+
/**
|
|
71
|
+
* The parameters to send with the custom request.
|
|
72
|
+
*/
|
|
73
|
+
body?: Record<string, any>;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Properties for the `put` method.
|
|
77
|
+
*/
|
|
78
|
+
export type PutProps = {
|
|
79
|
+
/**
|
|
80
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
81
|
+
*/
|
|
82
|
+
path: string;
|
|
83
|
+
/**
|
|
84
|
+
* Query parameters to be applied to the current query.
|
|
85
|
+
*/
|
|
86
|
+
parameters?: Record<string, any>;
|
|
87
|
+
/**
|
|
88
|
+
* The parameters to send with the custom request.
|
|
89
|
+
*/
|
|
90
|
+
body?: Record<string, any>;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Properties for the `stopABTest` method.
|
|
94
|
+
*/
|
|
95
|
+
export type StopABTestProps = {
|
|
96
|
+
/**
|
|
97
|
+
* The A/B test ID.
|
|
98
|
+
*/
|
|
99
|
+
id: number;
|
|
100
|
+
};
|
|
101
101
|
//# sourceMappingURL=clientMethodProps.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type CustomSearchParams = {
|
|
2
|
-
customSearchParameters: Record<string, any>;
|
|
3
|
-
};
|
|
1
|
+
export type CustomSearchParams = {
|
|
2
|
+
customSearchParameters: Record<string, any>;
|
|
3
|
+
};
|
|
4
4
|
//# sourceMappingURL=customSearchParams.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Error.
|
|
3
|
-
*/
|
|
4
|
-
export type ErrorBase = Record<string, any> & {
|
|
5
|
-
message?: string;
|
|
6
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Error.
|
|
3
|
+
*/
|
|
4
|
+
export type ErrorBase = Record<string, any> & {
|
|
5
|
+
message?: string;
|
|
6
|
+
};
|
|
7
7
|
//# sourceMappingURL=errorBase.d.ts.map
|
package/dist/model/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export * from './aBTest';
|
|
2
|
-
export * from './aBTestResponse';
|
|
3
|
-
export * from './abTestsVariant';
|
|
4
|
-
export * from './abTestsVariantSearchParams';
|
|
5
|
-
export * from './addABTestsRequest';
|
|
6
|
-
export * from './addABTestsVariant';
|
|
7
|
-
export * from './customSearchParams';
|
|
8
|
-
export * from './errorBase';
|
|
9
|
-
export * from './listABTestsResponse';
|
|
10
|
-
export * from './variant';
|
|
11
|
-
export * from './clientMethodProps';
|
|
1
|
+
export * from './aBTest';
|
|
2
|
+
export * from './aBTestResponse';
|
|
3
|
+
export * from './abTestsVariant';
|
|
4
|
+
export * from './abTestsVariantSearchParams';
|
|
5
|
+
export * from './addABTestsRequest';
|
|
6
|
+
export * from './addABTestsVariant';
|
|
7
|
+
export * from './customSearchParams';
|
|
8
|
+
export * from './errorBase';
|
|
9
|
+
export * from './listABTestsResponse';
|
|
10
|
+
export * from './variant';
|
|
11
|
+
export * from './clientMethodProps';
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { ABTest } from './aBTest';
|
|
2
|
-
export type ListABTestsResponse = {
|
|
3
|
-
/**
|
|
4
|
-
* List of A/B tests.
|
|
5
|
-
*/
|
|
6
|
-
abtests: ABTest[];
|
|
7
|
-
/**
|
|
8
|
-
* Number of A/B tests found for the app.
|
|
9
|
-
*/
|
|
10
|
-
count: number;
|
|
11
|
-
/**
|
|
12
|
-
* Number of A/B tests retrievable.
|
|
13
|
-
*/
|
|
14
|
-
total: number;
|
|
15
|
-
};
|
|
1
|
+
import type { ABTest } from './aBTest';
|
|
2
|
+
export type ListABTestsResponse = {
|
|
3
|
+
/**
|
|
4
|
+
* List of A/B tests.
|
|
5
|
+
*/
|
|
6
|
+
abtests: ABTest[];
|
|
7
|
+
/**
|
|
8
|
+
* Number of A/B tests found for the app.
|
|
9
|
+
*/
|
|
10
|
+
count: number;
|
|
11
|
+
/**
|
|
12
|
+
* Number of A/B tests retrievable.
|
|
13
|
+
*/
|
|
14
|
+
total: number;
|
|
15
|
+
};
|
|
16
16
|
//# sourceMappingURL=listABTestsResponse.d.ts.map
|
package/dist/model/variant.d.ts
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
export type Variant = {
|
|
2
|
-
/**
|
|
3
|
-
* Average click position for the variant.
|
|
4
|
-
*/
|
|
5
|
-
averageClickPosition: number;
|
|
6
|
-
/**
|
|
7
|
-
* Distinct click count for the variant.
|
|
8
|
-
*/
|
|
9
|
-
clickCount: number;
|
|
10
|
-
/**
|
|
11
|
-
* Click through rate for the variant.
|
|
12
|
-
*/
|
|
13
|
-
clickThroughRate: number;
|
|
14
|
-
/**
|
|
15
|
-
* Distinct conversion count for the variant.
|
|
16
|
-
*/
|
|
17
|
-
conversionCount: number;
|
|
18
|
-
/**
|
|
19
|
-
* Conversion rate for the variant.
|
|
20
|
-
*/
|
|
21
|
-
conversionRate: number;
|
|
22
|
-
/**
|
|
23
|
-
* The A/B test description.
|
|
24
|
-
*/
|
|
25
|
-
description: string;
|
|
26
|
-
/**
|
|
27
|
-
* The index performing the A/B test.
|
|
28
|
-
*/
|
|
29
|
-
index: string;
|
|
30
|
-
/**
|
|
31
|
-
* The number of occurrences.
|
|
32
|
-
*/
|
|
33
|
-
noResultCount: number;
|
|
34
|
-
/**
|
|
35
|
-
* The number of search during the A/B test.
|
|
36
|
-
*/
|
|
37
|
-
searchCount: number;
|
|
38
|
-
/**
|
|
39
|
-
* The number of tracked search click.
|
|
40
|
-
*/
|
|
41
|
-
trackedSearchCount: number;
|
|
42
|
-
/**
|
|
43
|
-
* The traffic percentage for the A/B test.
|
|
44
|
-
*/
|
|
45
|
-
trafficPercentage: number;
|
|
46
|
-
/**
|
|
47
|
-
* The number of user during the A/B test.
|
|
48
|
-
*/
|
|
49
|
-
userCount: number;
|
|
50
|
-
};
|
|
1
|
+
export type Variant = {
|
|
2
|
+
/**
|
|
3
|
+
* Average click position for the variant.
|
|
4
|
+
*/
|
|
5
|
+
averageClickPosition: number;
|
|
6
|
+
/**
|
|
7
|
+
* Distinct click count for the variant.
|
|
8
|
+
*/
|
|
9
|
+
clickCount: number;
|
|
10
|
+
/**
|
|
11
|
+
* Click through rate for the variant.
|
|
12
|
+
*/
|
|
13
|
+
clickThroughRate: number;
|
|
14
|
+
/**
|
|
15
|
+
* Distinct conversion count for the variant.
|
|
16
|
+
*/
|
|
17
|
+
conversionCount: number;
|
|
18
|
+
/**
|
|
19
|
+
* Conversion rate for the variant.
|
|
20
|
+
*/
|
|
21
|
+
conversionRate: number;
|
|
22
|
+
/**
|
|
23
|
+
* The A/B test description.
|
|
24
|
+
*/
|
|
25
|
+
description: string;
|
|
26
|
+
/**
|
|
27
|
+
* The index performing the A/B test.
|
|
28
|
+
*/
|
|
29
|
+
index: string;
|
|
30
|
+
/**
|
|
31
|
+
* The number of occurrences.
|
|
32
|
+
*/
|
|
33
|
+
noResultCount: number;
|
|
34
|
+
/**
|
|
35
|
+
* The number of search during the A/B test.
|
|
36
|
+
*/
|
|
37
|
+
searchCount: number;
|
|
38
|
+
/**
|
|
39
|
+
* The number of tracked search click.
|
|
40
|
+
*/
|
|
41
|
+
trackedSearchCount: number;
|
|
42
|
+
/**
|
|
43
|
+
* The traffic percentage for the A/B test.
|
|
44
|
+
*/
|
|
45
|
+
trafficPercentage: number;
|
|
46
|
+
/**
|
|
47
|
+
* The number of user during the A/B test.
|
|
48
|
+
*/
|
|
49
|
+
userCount: number;
|
|
50
|
+
};
|
|
51
51
|
//# sourceMappingURL=variant.d.ts.map
|