@algolia/client-abtesting 5.0.0-alpha.6 → 5.0.0-alpha.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builds/browser.d.ts +5 -5
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +5 -5
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/client-abtesting.cjs.js +324 -316
- package/dist/client-abtesting.esm.browser.js +507 -547
- package/dist/client-abtesting.esm.node.js +324 -316
- package/dist/client-abtesting.umd.js +2 -2
- package/dist/model/aBTest.d.ts +39 -39
- package/dist/model/aBTest.d.ts.map +1 -1
- package/dist/model/aBTestResponse.d.ts +14 -14
- package/dist/model/aBTestResponse.d.ts.map +1 -1
- package/dist/model/abTestsVariant.d.ts +14 -14
- package/dist/model/abTestsVariant.d.ts.map +1 -1
- package/dist/model/abTestsVariantSearchParams.d.ts +3 -3
- package/dist/model/abTestsVariantSearchParams.d.ts.map +1 -1
- package/dist/model/addABTestsRequest.d.ts +15 -15
- package/dist/model/addABTestsRequest.d.ts.map +1 -1
- package/dist/model/addABTestsVariant.d.ts +3 -3
- package/dist/model/addABTestsVariant.d.ts.map +1 -1
- package/dist/model/clientMethodProps.d.ts +108 -100
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/customSearchParams.d.ts +3 -3
- package/dist/model/customSearchParams.d.ts.map +1 -1
- package/dist/model/errorBase.d.ts +6 -6
- package/dist/model/errorBase.d.ts.map +1 -1
- package/dist/model/index.d.ts +11 -11
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/listABTestsResponse.d.ts +15 -15
- package/dist/model/listABTestsResponse.d.ts.map +1 -1
- package/dist/model/variant.d.ts +50 -50
- package/dist/model/variant.d.ts.map +1 -1
- package/dist/src/abtestingClient.d.ts +126 -124
- package/dist/src/abtestingClient.d.ts.map +1 -1
- package/model/aBTest.ts +1 -1
- package/model/aBTestResponse.ts +1 -1
- package/model/abTestsVariant.ts +1 -1
- package/model/abTestsVariantSearchParams.ts +1 -1
- package/model/addABTestsRequest.ts +1 -1
- package/model/addABTestsVariant.ts +1 -1
- package/model/clientMethodProps.ts +9 -1
- package/model/customSearchParams.ts +1 -1
- package/model/errorBase.ts +1 -1
- package/model/index.ts +1 -1
- package/model/listABTestsResponse.ts +1 -1
- package/model/variant.ts +1 -1
- package/package.json +31 -13
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! client-abtesting.umd.js | 5.0.0-alpha.
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/client-abtesting"]={})}(this,(function(e){"use strict";function t(e,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.6",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,appId:r,clearCache:function(){return Promise.all([u.requestsCache.clear(),u.responsesCache.clear()]).then((function(){}))},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.61 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/client-abtesting"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),s=a()[r];return Promise.all([s||t(),void 0!==s])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=a();return n[JSON.stringify(e)]=t,s().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,n={miss:()=>Promise.resolve()})=>s.get(e,a,n).catch((()=>r({caches:t}).get(e,a,n))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=s();return o.then((e=>a.miss(e))).then((()=>o))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function n(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),o(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends i{constructor(e,t,r){super(e,r),o(this,"stackTrace",void 0),this.stackTrace=t}}class u extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class l extends c{constructor(e,t,r,s="ApiError"){super(e,r,s),o(this,"status",void 0),this.status=t}}class d extends i{constructor(e,t){super(e,"DeserializationError"),o(this,"response",void 0),this.response=t}}class h extends l{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),o(this,"error",void 0),this.error=r}}function m(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`)).join("&")}(r);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return s.length&&(a+=`?${s}`),a}function p(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:o,requester:i,requestsCache:c,responsesCache:f}){async function g(c,f,g=!0){const y=[],P=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,f),w=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,c.headers,f.headers),q="GET"===c.method?{...c.data,...f.data}:{},v={...s,...c.queryParameters,...q};if(a.value&&(v["x-algolia-agent"]=a.value),f&&f.queryParameters)for(const e of Object.keys(f.queryParameters))f.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(f.queryParameters[e])?v[e]=f.queryParameters[e].toString():v[e]=f.queryParameters[e];let T=0;const b=async(e,r)=>{const s=e.pop();if(void 0===s)throw new u(function(e){return e.map((e=>p(e)))}(y));let a=f.timeout;void 0===a&&(a=g?o.read:o.write);const q={data:P,headers:w,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||(g?"read"===e.accept:"write"===e.accept))),A=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(n(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),o=[...s,...a];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(O);return b([...A.hosts].reverse(),A.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return g(e,t,a);const n=()=>g(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return f.get(o,(()=>c.get(o,(()=>c.set(o,n()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.set(o,e)})},requestsCache:c,responsesCache:f}}function g({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const y="5.0.0-alpha.61",P=["de","us"];e.abtestingClient=function(e,a,n,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");if(n&&("string"!=typeof n||!P.includes(n)))throw new Error(`\`region\` must be one of the following: ${P.join(", ")}`);return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,region:a,...n}){const o=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(e,t,r),i=f({hosts:(c=a,[{url:c?"analytics.{region}.algolia.com".replace("{region}",c):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...n,algoliaAgent:g({algoliaAgents:s,client:"Abtesting",version:y}),baseHeaders:{"content-type":"text/plain",...o.headers(),...n.baseHeaders},baseQueryParameters:{...o.queryParameters(),...n.baseQueryParameters}});var c;return{transporter:i,appId:e,clearCache:()=>Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then((()=>{})),get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,t){i.algoliaAgent.add({segment:e,version:t})},addABTests(e,t){if(!e)throw new Error("Parameter `addABTestsRequest` is required when calling `addABTests`.");if(!e.name)throw new Error("Parameter `addABTestsRequest.name` is required when calling `addABTests`.");if(!e.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,indexPrefix:r,indexSuffix:s}={},a=undefined){const n={};void 0!==e&&(n.offset=e.toString()),void 0!==t&&(n.limit=t.toString()),void 0!==r&&(n.indexPrefix=r.toString()),void 0!==s&&(n.indexSuffix=s.toString());const o={method:"GET",path:"/2/abtests",queryParameters:n,headers:{}};return i.request(o,a)},post({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const a={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},put({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `put`.");const a={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},stopABTest({id:e},t){if(!e)throw new Error("Parameter `id` is required when calling `stopABTest`.");const r={method:"POST",path:"/2/abtests/{id}/stop".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)}}}({appId:e,apiKey:a,region:n,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:r({caches:[t({key:`${y}-${e}`}),s()]}),...o})},e.apiClientVersion=y}));
|
package/dist/model/aBTest.d.ts
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import type { Variant } from './variant';
|
|
2
|
-
export
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aBTest.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"aBTest.d.ts","sourceRoot":"","sources":["../../model/aBTest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,MAAM,MAAM,GAAG;IACnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,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,15 +1,15 @@
|
|
|
1
|
-
export
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aBTestResponse.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"aBTestResponse.d.ts","sourceRoot":"","sources":["../../model/aBTestResponse.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export
|
|
2
|
-
/**
|
|
3
|
-
* 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abTestsVariant.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"abTestsVariant.d.ts","sourceRoot":"","sources":["../../model/abTestsVariant.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AbTestsVariant } from './abTestsVariant';
|
|
2
|
-
import type { CustomSearchParams } from './customSearchParams';
|
|
3
|
-
export
|
|
1
|
+
import type { AbTestsVariant } from './abTestsVariant';
|
|
2
|
+
import type { CustomSearchParams } from './customSearchParams';
|
|
3
|
+
export type AbTestsVariantSearchParams = AbTestsVariant & CustomSearchParams;
|
|
4
4
|
//# sourceMappingURL=abTestsVariantSearchParams.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abTestsVariantSearchParams.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"abTestsVariantSearchParams.d.ts","sourceRoot":"","sources":["../../model/abTestsVariantSearchParams.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,MAAM,0BAA0B,GAAG,cAAc,GAAG,kBAAkB,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { AddABTestsVariant } from './addABTestsVariant';
|
|
2
|
-
export
|
|
3
|
-
/**
|
|
4
|
-
* A/B test name.
|
|
5
|
-
*/
|
|
6
|
-
name: string;
|
|
7
|
-
/**
|
|
8
|
-
* 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addABTestsRequest.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"addABTestsRequest.d.ts","sourceRoot":"","sources":["../../model/addABTestsRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAE7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AbTestsVariant } from './abTestsVariant';
|
|
2
|
-
import type { AbTestsVariantSearchParams } from './abTestsVariantSearchParams';
|
|
3
|
-
export
|
|
1
|
+
import type { AbTestsVariant } from './abTestsVariant';
|
|
2
|
+
import type { AbTestsVariantSearchParams } from './abTestsVariantSearchParams';
|
|
3
|
+
export type AddABTestsVariant = AbTestsVariant | AbTestsVariantSearchParams;
|
|
4
4
|
//# sourceMappingURL=addABTestsVariant.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addABTestsVariant.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"addABTestsVariant.d.ts","sourceRoot":"","sources":["../../model/addABTestsVariant.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE/E,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG,0BAA0B,CAAC"}
|
|
@@ -1,101 +1,109 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Properties for the `del` method.
|
|
3
|
-
*/
|
|
4
|
-
export
|
|
5
|
-
/**
|
|
6
|
-
* 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
|
|
18
|
-
/**
|
|
19
|
-
* The A/B test ID.
|
|
20
|
-
*/
|
|
21
|
-
id: number;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Properties for the `get` method.
|
|
25
|
-
*/
|
|
26
|
-
export
|
|
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
|
|
40
|
-
/**
|
|
41
|
-
* The A/B test ID.
|
|
42
|
-
*/
|
|
43
|
-
id: number;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* Properties for the `listABTests` method.
|
|
47
|
-
*/
|
|
48
|
-
export
|
|
49
|
-
/**
|
|
50
|
-
* Position of the starting record. Used for paging. 0 is the first record.
|
|
51
|
-
*/
|
|
52
|
-
offset?: number;
|
|
53
|
-
/**
|
|
54
|
-
* Number of records to return. Limit is the size of the page.
|
|
55
|
-
*/
|
|
56
|
-
limit?: number;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* The
|
|
72
|
-
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* The
|
|
89
|
-
*/
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Properties for the `del` method.
|
|
3
|
+
*/
|
|
4
|
+
export type DelProps = {
|
|
5
|
+
/**
|
|
6
|
+
* 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
|
+
* Filters the returned ab tests by any indices starting with the provided prefix that are assigned to either variant of an ab test.
|
|
59
|
+
*/
|
|
60
|
+
indexPrefix?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Filters the returned ab tests by any indices ending with the provided suffix that are assigned to either variant of an ab test.
|
|
63
|
+
*/
|
|
64
|
+
indexSuffix?: string;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Properties for the `post` method.
|
|
68
|
+
*/
|
|
69
|
+
export type PostProps = {
|
|
70
|
+
/**
|
|
71
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
72
|
+
*/
|
|
73
|
+
path: string;
|
|
74
|
+
/**
|
|
75
|
+
* Query parameters to be applied to the current query.
|
|
76
|
+
*/
|
|
77
|
+
parameters?: Record<string, any>;
|
|
78
|
+
/**
|
|
79
|
+
* The parameters to send with the custom request.
|
|
80
|
+
*/
|
|
81
|
+
body?: Record<string, any>;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Properties for the `put` method.
|
|
85
|
+
*/
|
|
86
|
+
export type PutProps = {
|
|
87
|
+
/**
|
|
88
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
89
|
+
*/
|
|
90
|
+
path: string;
|
|
91
|
+
/**
|
|
92
|
+
* Query parameters to be applied to the current query.
|
|
93
|
+
*/
|
|
94
|
+
parameters?: Record<string, any>;
|
|
95
|
+
/**
|
|
96
|
+
* The parameters to send with the custom request.
|
|
97
|
+
*/
|
|
98
|
+
body?: Record<string, any>;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Properties for the `stopABTest` method.
|
|
102
|
+
*/
|
|
103
|
+
export type StopABTestProps = {
|
|
104
|
+
/**
|
|
105
|
+
* The A/B test ID.
|
|
106
|
+
*/
|
|
107
|
+
id: number;
|
|
108
|
+
};
|
|
101
109
|
//# sourceMappingURL=clientMethodProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
customSearchParameters: Record<string, any>;
|
|
3
|
-
};
|
|
1
|
+
export type CustomSearchParams = {
|
|
2
|
+
customSearchParameters: Record<string, any>;
|
|
3
|
+
};
|
|
4
4
|
//# sourceMappingURL=customSearchParams.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customSearchParams.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"customSearchParams.d.ts","sourceRoot":"","sources":["../../model/customSearchParams.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7C,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Error.
|
|
3
|
-
*/
|
|
4
|
-
export
|
|
5
|
-
message?: string;
|
|
6
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Error.
|
|
3
|
+
*/
|
|
4
|
+
export type ErrorBase = Record<string, any> & {
|
|
5
|
+
message?: string;
|
|
6
|
+
};
|
|
7
7
|
//# sourceMappingURL=errorBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorBase.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"errorBase.d.ts","sourceRoot":"","sources":["../../model/errorBase.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
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,16 +1,16 @@
|
|
|
1
|
-
import type { ABTest } from './aBTest';
|
|
2
|
-
export
|
|
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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listABTestsResponse.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"listABTestsResponse.d.ts","sourceRoot":"","sources":["../../model/listABTestsResponse.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,MAAM,MAAM,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"}
|