Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

kentico-cloud-core

Package Overview
Dependencies
Maintainers
4
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kentico-cloud-core - npm Package Compare versions

Comparing version 1.4.2 to 1.4.3

2

_bundles/http/http.service.d.ts

@@ -13,3 +13,3 @@ import { Observable } from 'rxjs';

useRetryForResponseCodes: number[];
}): Promise<T>;
}, currentAttempt?: number): Promise<T>;
get<TError extends any, TRawData extends any>(call: IHttpGetQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>;

@@ -16,0 +16,0 @@ post<TError extends any, TRawData extends any>(call: IHttpPostQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>;

@@ -7,3 +7,3 @@ import { Observable } from 'rxjs';

useRetryForResponseCodes: number[];
}): Promise<T>;
}, currentAttempt: number): Promise<T>;
post<TError extends any, TRawData extends any>(call: IHttpPostQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>;

@@ -10,0 +10,0 @@ get<TError extends any, TRawData extends any>(call: IHttpGetQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>;

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("kenticoCloudCore",["rxjs","rxjs/operators"],t):"object"==typeof exports?exports.kenticoCloudCore=t(require("rxjs"),require("rxjs/operators")):e.kenticoCloudCore=t(e.rxjs,e.rxjs.operators)}(window,function(e,t){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=14)}([function(e,t,r){"use strict";var n=r(7),o=r(25),i=Object.prototype.toString;function s(e){return"[object Array]"===i.call(e)}function u(e){return null!==e&&"object"==typeof e}function a(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:o,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:u,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:a,isStream:function(e){return u(e)&&a(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]=r}for(var n=0,o=arguments.length;n<o;n++)c(arguments[n],r);return t},extend:function(e,t,r){return c(t,function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(t,r){t.exports=e},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.getRetryTimeout=function(e){return 100*Math.pow(2,e)},e.prototype.debugLogAttempt=function(e,t){console.warn("Attempt "+e+": retrying in "+t+"ms")},e}();t.RetryService=n,t.retryService=new n},function(e,t,r){"use strict";(function(t){var n=r(0),o=r(28),i={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,a={adapter:("undefined"!=typeof XMLHttpRequest?u=r(8):void 0!==t&&(u=r(8)),u),transformRequest:[function(e,t){return o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(e){a.headers[e]={}}),n.forEach(["post","put","patch"],function(e){a.headers[e]=n.merge(i)}),e.exports=a}).call(this,r(27))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(5),i=r(2),s=function(){return function(){this.strategy=function(e){return function(t){return t.pipe(o.mergeMap(function(t,r){var o=r+1;if(o>e.maxRetryAttempts)return n.throwError(t);var s=0;if(t&&t.originalError&&t.originalError.response&&t.originalError.response.status&&(s=t.originalError.response.status),!e.useRetryForResponseCodes.find(function(e){return e===s}))return n.throwError(t);var u=i.retryService.getRetryTimeout(o);return i.retryService.debugLogAttempt(o,u),n.timer(u)}))}}}}();t.RetryStrategy=s,t.retryStrategy=new s},function(e,r){e.exports=t},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(23),o=r(12);function i(e){var t={};return e.forEach(function(e){t[e.header]=e.value}),e.find(function(e){return e.header.toLowerCase()==="Content-Type".toLowerCase()})||(t["Content-Type"]="application/json"),t}t.getCallback=function(e,t,r){o.httpDebugger.debugStartHttpRequest(),n.default.get(e.url,{headers:i(t&&t.headers?t.headers:[])}).then(function(e){o.httpDebugger.debugResolveHttpRequest(),r({response:e})},function(e){o.httpDebugger.debugFailedHttpRequest(),r({error:e})})},t.putCallback=function(e,t,r){o.httpDebugger.debugStartHttpRequest(),n.default.put(e.url,e.body,{headers:i(t&&t.headers?t.headers:[])}).then(function(e){o.httpDebugger.debugResolveHttpRequest(),r({response:e})},function(e){o.httpDebugger.debugFailedHttpRequest(),r({error:e})})},t.deleteCallback=function(e,t,r){o.httpDebugger.debugStartHttpRequest(),n.default.delete(e.url,{headers:i(t&&t.headers?t.headers:[])}).then(function(e){o.httpDebugger.debugResolveHttpRequest(),r({response:e})},function(e){o.httpDebugger.debugFailedHttpRequest(),r({error:e})})},t.postCallback=function(e,t,r){o.httpDebugger.debugStartHttpRequest(),n.default.post(e.url,e.body,{headers:i(t&&t.headers?t.headers:[])}).then(function(e){o.httpDebugger.debugResolveHttpRequest(),r({response:e})},function(e){o.httpDebugger.debugFailedHttpRequest(),r({error:e})})},t.getHeadersJson=i},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},function(e,t,r){"use strict";var n=r(0),o=r(29),i=r(31),s=r(32),u=r(33),a=r(9),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||r(34);e.exports=function(e){return new Promise(function(t,f){var p=e.data,l=e.headers;n.isFormData(p)&&delete l["Content-Type"];var d=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in d||u(e.url)||(d=new window.XDomainRequest,h="onload",m=!0,d.onprogress=function(){},d.ontimeout=function(){}),e.auth){var y=e.auth.username||"",g=e.auth.password||"";l.Authorization="Basic "+c(y+":"+g)}if(d.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d[h]=function(){if(d&&(4===d.readyState||m)&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in d?s(d.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?d.response:d.responseText,status:1223===d.status?204:d.status,statusText:1223===d.status?"No Content":d.statusText,headers:r,config:e,request:d};o(t,f,n),d=null}},d.onerror=function(){f(a("Network Error",e,null,d)),d=null},d.ontimeout=function(){f(a("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",d)),d=null},n.isStandardBrowserEnv()){var v=r(35),b=(e.withCredentials||u(e.url))&&e.xsrfCookieName?v.read(e.xsrfCookieName):void 0;b&&(l[e.xsrfHeaderName]=b)}if("setRequestHeader"in d&&n.forEach(l,function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete l[t]:d.setRequestHeader(t,e)}),e.withCredentials&&(d.withCredentials=!0),e.responseType)try{d.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){d&&(d.abort(),f(e),d=null)}),void 0===p&&(p=null),d.send(p)})}},function(e,t,r){"use strict";var n=r(30);e.exports=function(e,t,r,o,i){var s=new Error(e);return n(s,t,r,o,i)}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.debugStartHttpRequest=function(){},e.prototype.debugResolveHttpRequest=function(){},e.prototype.debugFailedHttpRequest=function(){},e}();t.HttpDebugger=n,t.httpDebugger=new n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e){Object.assign(this,e)}}();t.CloudError=n},function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),n(r(15)),n(r(19)),n(r(21)),n(r(45))},function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),n(r(16)),n(r(17)),n(r(18))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.addOptionsToUrl=function(e,t){return t&&t.forEach(function(t){e=e.indexOf("?")>-1?e+"&"+t.getParam()+"="+t.getParamValue():e+"?"+t.getParam()+"="+t.getParamValue()}),e},e}();t.UrlHelper=n,t.urlHelper=new n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.sdkVersionHeader="X-KC-SDKID"}return e.prototype.getSdkIdHeader=function(e){return{header:this.sdkVersionHeader,value:e.host+";"+e.name+";"+e.version}},e}();t.HeaderHelper=n,t.headerHelper=new n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.getAllNames=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t},e.prototype.getAllValues=function(e){return Object.keys(e).map(function(t){return e[t]})},e.prototype.getEnumFromValue=function(e,t){try{if(!t)return;if(this.isNumeric(t))return e[t];var r=this.getAllValues(e).find(function(e){return e.toLowerCase()===t.toString().toLowerCase()});if(!r)return;return r}catch(e){return}},e.prototype.getEnumFromName=function(e,t){for(var r=0,n=this.getAllNames(e);r<n.length;r++){var o=n[r];if(o.toLowerCase()===t.toLowerCase())return e[o]}},e.prototype.isNumeric=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},e}();t.EnumHelper=n,t.enumHelper=new n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(20))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){var t=function(){function e(e,t){if(this.name=e,this.value=t,!e)throw Error("Name of the custom parameter is not specified")}return e.prototype.getParam=function(){return this.name},e.prototype.getParamValue=function(){return this.value},e}();e.CustomParameter=t}(t.Parameters||(t.Parameters={}))},function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),n(r(4)),n(r(22)),n(r(43)),n(r(6)),n(r(12)),n(r(44)),n(r(2))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(5),i=r(6),s=r(2),u=r(4),a=function(){function e(){}return e.prototype.retryPromise=function(e,t){var r=this;return new Promise(function(n,o){return e.then(function(e){n(e)}).catch(function(i){var u=0;if(i&&i.originalError&&i.originalError.request){u=i.originalError.request.status;var a=t.useRetryForResponseCodes.find(function(e){return e===u});if(!a&&0!==a)return o(i)}var c=t.maxRetryAttempts-1,f=s.retryService.getRetryTimeout(c);return s.retryService.debugLogAttempt(c,f),t.maxRetryAttempts-1>0?r.promiseRetryWait(f).then(function(){return r.retryPromise(e,{maxRetryAttempts:c,useRetryForResponseCodes:t.useRetryForResponseCodes})}).then(function(e){return n(e)}).catch(function(){return o(i)}):o(i)})})},e.prototype.get=function(e,t){var r=n.bindCallback(i.getCallback);return this.mapAxiosObservable(r,e,t)},e.prototype.post=function(e,t){var r=n.bindCallback(i.postCallback);return this.mapAxiosObservable(r,e,t)},e.prototype.put=function(e,t){var r=n.bindCallback(i.putCallback);return this.mapAxiosObservable(r,e,t)},e.prototype.delete=function(e,t){var r=n.bindCallback(i.deleteCallback);return this.mapAxiosObservable(r,e,t)},e.prototype.mapAxiosObservable=function(e,t,r){var i=this;return e(t,r).pipe(o.retryWhen(u.retryStrategy.strategy({maxRetryAttempts:r&&r.maxRetryAttempts?r.maxRetryAttempts:0,useRetryForResponseCodes:r&&r.useRetryForResponseCodes?r.useRetryForResponseCodes:[]})),o.map(function(e){return i.mapResult(e)}),o.catchError(function(e){return r&&r.logErrorToConsole&&console.warn("Kentico Cloud SDK encountered an error posting data: ",e),n.throwError({originalError:e,mappedError:t.mapError(e)})}))},e.prototype.mapResult=function(e){if(e.error)throw e.error;if(!e.response)throw Error("Response is not set and no error was thrown");return{data:e.response.data,response:e.response}},e.prototype.promiseRetryWait=function(e){return new Promise(function(t){return setTimeout(t,e)})},e}();t.HttpService=a},function(e,t,r){e.exports=r(24)},function(e,t,r){"use strict";var n=r(0),o=r(7),i=r(26),s=r(3);function u(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var a=u(s);a.Axios=i,a.create=function(e){return u(n.merge(s,e))},a.Cancel=r(11),a.CancelToken=r(41),a.isCancel=r(10),a.all=function(e){return Promise.all(e)},a.spread=r(42),e.exports=a,e.exports.default=a},function(e,t){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("kenticoCloudCore",["rxjs","rxjs/operators"],t):"object"==typeof exports?exports.kenticoCloudCore=t(require("rxjs"),require("rxjs/operators")):e.kenticoCloudCore=t(e.rxjs,e.rxjs.operators)}(window,function(e,t){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=14)}([function(e,t,r){"use strict";var n=r(7),o=r(25),i=Object.prototype.toString;function u(e){return"[object Array]"===i.call(e)}function s(e){return null!==e&&"object"==typeof e}function a(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),u(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:u,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:o,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:a,isStream:function(e){return s(e)&&a(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]=r}for(var n=0,o=arguments.length;n<o;n++)c(arguments[n],r);return t},extend:function(e,t,r){return c(t,function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(t,r){t.exports=e},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.getRetryTimeout=function(e){return 100*Math.pow(2,e)},e.prototype.debugLogAttempt=function(e,t){console.warn("Attempt "+e+": retrying in "+t+"ms")},e}();t.RetryService=n,t.retryService=new n},function(e,t,r){"use strict";(function(t){var n=r(0),o=r(28),i={"Content-Type":"application/x-www-form-urlencoded"};function u(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,a={adapter:("undefined"!=typeof XMLHttpRequest?s=r(8):void 0!==t&&(s=r(8)),s),transformRequest:[function(e,t){return o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(u(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(u(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(e){a.headers[e]={}}),n.forEach(["post","put","patch"],function(e){a.headers[e]=n.merge(i)}),e.exports=a}).call(this,r(27))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(5),i=r(2),u=function(){return function(){this.strategy=function(e){return function(t){return t.pipe(o.mergeMap(function(t,r){var o=r+1;if(o>e.maxRetryAttempts)return n.throwError(t);var u=0;if(t&&t.originalError&&t.originalError.response&&t.originalError.response.status&&(u=t.originalError.response.status),!e.useRetryForResponseCodes.find(function(e){return e===u}))return n.throwError(t);var s=i.retryService.getRetryTimeout(o);return i.retryService.debugLogAttempt(o,s),n.timer(s)}))}}}}();t.RetryStrategy=u,t.retryStrategy=new u},function(e,r){e.exports=t},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(23),o=r(12);function i(e){var t={};return e.forEach(function(e){t[e.header]=e.value}),e.find(function(e){return e.header.toLowerCase()==="Content-Type".toLowerCase()})||(t["Content-Type"]="application/json"),t}t.getCallback=function(e,t,r){o.httpDebugger.debugStartHttpRequest(),n.default.get(e.url,{headers:i(t&&t.headers?t.headers:[])}).then(function(e){o.httpDebugger.debugResolveHttpRequest(),r({response:e})},function(e){o.httpDebugger.debugFailedHttpRequest(),r({error:e})})},t.putCallback=function(e,t,r){o.httpDebugger.debugStartHttpRequest(),n.default.put(e.url,e.body,{headers:i(t&&t.headers?t.headers:[])}).then(function(e){o.httpDebugger.debugResolveHttpRequest(),r({response:e})},function(e){o.httpDebugger.debugFailedHttpRequest(),r({error:e})})},t.deleteCallback=function(e,t,r){o.httpDebugger.debugStartHttpRequest(),n.default.delete(e.url,{headers:i(t&&t.headers?t.headers:[])}).then(function(e){o.httpDebugger.debugResolveHttpRequest(),r({response:e})},function(e){o.httpDebugger.debugFailedHttpRequest(),r({error:e})})},t.postCallback=function(e,t,r){o.httpDebugger.debugStartHttpRequest(),n.default.post(e.url,e.body,{headers:i(t&&t.headers?t.headers:[])}).then(function(e){o.httpDebugger.debugResolveHttpRequest(),r({response:e})},function(e){o.httpDebugger.debugFailedHttpRequest(),r({error:e})})},t.getHeadersJson=i},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},function(e,t,r){"use strict";var n=r(0),o=r(29),i=r(31),u=r(32),s=r(33),a=r(9),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||r(34);e.exports=function(e){return new Promise(function(t,f){var p=e.data,l=e.headers;n.isFormData(p)&&delete l["Content-Type"];var d=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in d||s(e.url)||(d=new window.XDomainRequest,h="onload",m=!0,d.onprogress=function(){},d.ontimeout=function(){}),e.auth){var y=e.auth.username||"",g=e.auth.password||"";l.Authorization="Basic "+c(y+":"+g)}if(d.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d[h]=function(){if(d&&(4===d.readyState||m)&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in d?u(d.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?d.response:d.responseText,status:1223===d.status?204:d.status,statusText:1223===d.status?"No Content":d.statusText,headers:r,config:e,request:d};o(t,f,n),d=null}},d.onerror=function(){f(a("Network Error",e,null,d)),d=null},d.ontimeout=function(){f(a("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",d)),d=null},n.isStandardBrowserEnv()){var v=r(35),b=(e.withCredentials||s(e.url))&&e.xsrfCookieName?v.read(e.xsrfCookieName):void 0;b&&(l[e.xsrfHeaderName]=b)}if("setRequestHeader"in d&&n.forEach(l,function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete l[t]:d.setRequestHeader(t,e)}),e.withCredentials&&(d.withCredentials=!0),e.responseType)try{d.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){d&&(d.abort(),f(e),d=null)}),void 0===p&&(p=null),d.send(p)})}},function(e,t,r){"use strict";var n=r(30);e.exports=function(e,t,r,o,i){var u=new Error(e);return n(u,t,r,o,i)}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.debugStartHttpRequest=function(){},e.prototype.debugResolveHttpRequest=function(){},e.prototype.debugFailedHttpRequest=function(){},e}();t.HttpDebugger=n,t.httpDebugger=new n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e){Object.assign(this,e)}}();t.CloudError=n},function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),n(r(15)),n(r(19)),n(r(21)),n(r(45))},function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),n(r(16)),n(r(17)),n(r(18))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.addOptionsToUrl=function(e,t){return t&&t.forEach(function(t){e=e.indexOf("?")>-1?e+"&"+t.getParam()+"="+t.getParamValue():e+"?"+t.getParam()+"="+t.getParamValue()}),e},e}();t.UrlHelper=n,t.urlHelper=new n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.sdkVersionHeader="X-KC-SDKID"}return e.prototype.getSdkIdHeader=function(e){return{header:this.sdkVersionHeader,value:e.host+";"+e.name+";"+e.version}},e}();t.HeaderHelper=n,t.headerHelper=new n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.getAllNames=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t},e.prototype.getAllValues=function(e){return Object.keys(e).map(function(t){return e[t]})},e.prototype.getEnumFromValue=function(e,t){try{if(!t)return;if(this.isNumeric(t))return e[t];var r=this.getAllValues(e).find(function(e){return e.toLowerCase()===t.toString().toLowerCase()});if(!r)return;return r}catch(e){return}},e.prototype.getEnumFromName=function(e,t){for(var r=0,n=this.getAllNames(e);r<n.length;r++){var o=n[r];if(o.toLowerCase()===t.toLowerCase())return e[o]}},e.prototype.isNumeric=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},e}();t.EnumHelper=n,t.enumHelper=new n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(20))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){var t=function(){function e(e,t){if(this.name=e,this.value=t,!e)throw Error("Name of the custom parameter is not specified")}return e.prototype.getParam=function(){return this.name},e.prototype.getParamValue=function(){return this.value},e}();e.CustomParameter=t}(t.Parameters||(t.Parameters={}))},function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),n(r(4)),n(r(22)),n(r(43)),n(r(6)),n(r(12)),n(r(44)),n(r(2))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(5),i=r(6),u=r(2),s=r(4),a=function(){function e(){}return e.prototype.retryPromise=function(e,t,r){var n=this;return void 0===r&&(r=1),new Promise(function(o,i){return e.then(function(e){o(e)}).catch(function(s){var a=0;s&&s.originalError&&s.originalError.request&&(a=s.originalError.request.status);var c=t.useRetryForResponseCodes.find(function(e){return e===a});if(!c&&0!==c)return i(s);var f=u.retryService.getRetryTimeout(r);return r<=t.maxRetryAttempts?n.promiseRetryWait(f).then(function(){return u.retryService.debugLogAttempt(r,f),n.retryPromise(e,t,r+1)}).then(function(e){return o(e)}).catch(function(e){return i(e)}):i(s)})})},e.prototype.get=function(e,t){var r=n.bindCallback(i.getCallback);return this.mapAxiosObservable(r,e,t)},e.prototype.post=function(e,t){var r=n.bindCallback(i.postCallback);return this.mapAxiosObservable(r,e,t)},e.prototype.put=function(e,t){var r=n.bindCallback(i.putCallback);return this.mapAxiosObservable(r,e,t)},e.prototype.delete=function(e,t){var r=n.bindCallback(i.deleteCallback);return this.mapAxiosObservable(r,e,t)},e.prototype.mapAxiosObservable=function(e,t,r){var i=this;return e(t,r).pipe(o.retryWhen(s.retryStrategy.strategy({maxRetryAttempts:r&&r.maxRetryAttempts?r.maxRetryAttempts:0,useRetryForResponseCodes:r&&r.useRetryForResponseCodes?r.useRetryForResponseCodes:[]})),o.map(function(e){return i.mapResult(e)}),o.catchError(function(e){return r&&r.logErrorToConsole&&console.warn("Kentico Cloud SDK encountered an error posting data: ",e),n.throwError({originalError:e,mappedError:t.mapError(e)})}))},e.prototype.mapResult=function(e){if(e.error)throw e.error;if(!e.response)throw Error("Response is not set and no error was thrown");return{data:e.response.data,response:e.response}},e.prototype.promiseRetryWait=function(e){return new Promise(function(t){return setTimeout(t,e)})},e}();t.HttpService=a},function(e,t,r){e.exports=r(24)},function(e,t,r){"use strict";var n=r(0),o=r(7),i=r(26),u=r(3);function s(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var a=s(u);a.Axios=i,a.create=function(e){return s(n.merge(u,e))},a.Cancel=r(11),a.CancelToken=r(41),a.isCancel=r(10),a.all=function(e){return Promise.all(e)},a.spread=r(42),e.exports=a,e.exports.default=a},function(e,t){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
/*!

@@ -8,3 +8,3 @@ * Determine if an object is a Buffer

*/
e.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,r){"use strict";var n=r(3),o=r(0),i=r(36),s=r(37);function u(e){this.defaults=e,this.interceptors={request:new i,response:new i}}u.prototype.request=function(e){"string"==typeof e&&(e=o.merge({url:arguments[0]},arguments[1])),(e=o.merge(n,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[s,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r},o.forEach(["delete","get","head","options"],function(e){u.prototype[e]=function(t,r){return this.request(o.merge(r||{},{method:e,url:t}))}}),o.forEach(["post","put","patch"],function(e){u.prototype[e]=function(t,r,n){return this.request(o.merge(n||{},{method:e,url:t,data:r}))}}),e.exports=u},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var a,c=[],f=!1,p=-1;function l(){f&&a&&(f=!1,a.length?c=a.concat(c):p=-1,c.length&&d())}function d(){if(!f){var e=u(l);f=!0;for(var t=c.length;t;){for(a=c,c=[];++p<t;)a&&a[p].run();p=-1,t=c.length}a=null,f=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new h(e,t)),1!==c.length||f||u(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){"use strict";var n=r(0);e.exports=function(e,t){n.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}},function(e,t,r){"use strict";var n=r(9);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e}},function(e,t,r){"use strict";var n=r(0);function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var s=[];n.forEach(t,function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))}))}),i=s.join("&")}return i&&(e+=(-1===e.indexOf("?")?"?":"&")+i),e}},function(e,t,r){"use strict";var n=r(0),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,s={};return e?(n.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}}),s):s}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function o(){this.message="String contains an invalid character"}o.prototype=new Error,o.prototype.code=5,o.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,r,i=String(e),s="",u=0,a=n;i.charAt(0|u)||(a="=",u%1);s+=a.charAt(63&t>>8-u%1*8)){if((r=i.charCodeAt(u+=.75))>255)throw new o;t=t<<8|r}return s}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,s){var u=[];u.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),n.isString(o)&&u.push("path="+o),n.isString(i)&&u.push("domain="+i),!0===s&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n=r(0);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=o},function(e,t,r){"use strict";var n=r(0),o=r(38),i=r(10),s=r(3),u=r(39),a=r(40);function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return c(e),e.baseURL&&!u(e.url)&&(e.url=a(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return c(e),t.data=o(t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(c(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,r){"use strict";var n=r(0);e.exports=function(e,t,r){return n.forEach(r,function(r){e=r(e,t)}),e}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var n=r(11);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new n(e),t(r.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o(function(t){e=t}),cancel:e}},e.exports=o},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e,t){this.response=e,this.error=t}}();t.IHttpRequestResult=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=function(){function e(e){this.throwCloudError=!1,this.fakeResponseJson=void 0,this.errorJson=void 0,Object.assign(this,e)}return e.prototype.retryPromise=function(e,t){throw new Error("Not implemented")},e.prototype.get=function(e,t){if(this.throwCloudError){var r={response:{data:this.errorJson}};return n.throwError({originalError:r,mappedError:e.mapError(r)})}return n.of({data:this.fakeResponseJson,response:void 0})},e.prototype.post=function(e,t){if(this.throwCloudError){var r={response:{data:this.errorJson}};return n.throwError({originalError:r,mappedError:e.mapError(r)})}return n.of({data:this.fakeResponseJson,response:void 0})},e.prototype.put=function(e,t){if(this.throwCloudError){var r={response:{data:this.errorJson}};return n.throwError({originalError:r,mappedError:e.mapError(r)})}return n.of({data:this.fakeResponseJson,response:void 0})},e.prototype.delete=function(e,t){if(this.throwCloudError){var r={response:{data:this.errorJson}};return n.throwError({originalError:r,mappedError:e.mapError(r)})}return n.of({data:this.fakeResponseJson,response:void 0})},e}();t.TestHttpService=o},function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),n(r(13)),n(r(46))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(13),o={errorCode:"error_code",message:"message",requestId:"request_id",specificCode:"specific_code"};t.mapCloudError=function(e){if(e.response&&e.response.data&&e.response.data[o.requestId]){var t=e.response.data;return new n.CloudError({requestId:t[o.requestId],message:t[o.message]?t[o.message]:"",errorCode:t[o.errorCode]?t[o.errorCode]:0,specificCode:t[o.specificCode]?t[o.specificCode]:0})}return e.request,e}}])});
e.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,r){"use strict";var n=r(3),o=r(0),i=r(36),u=r(37);function s(e){this.defaults=e,this.interceptors={request:new i,response:new i}}s.prototype.request=function(e){"string"==typeof e&&(e=o.merge({url:arguments[0]},arguments[1])),(e=o.merge(n,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[u,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r},o.forEach(["delete","get","head","options"],function(e){s.prototype[e]=function(t,r){return this.request(o.merge(r||{},{method:e,url:t}))}}),o.forEach(["post","put","patch"],function(e){s.prototype[e]=function(t,r,n){return this.request(o.merge(n||{},{method:e,url:t,data:r}))}}),e.exports=s},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:u}catch(e){n=u}}();var a,c=[],f=!1,p=-1;function l(){f&&a&&(f=!1,a.length?c=a.concat(c):p=-1,c.length&&d())}function d(){if(!f){var e=s(l);f=!0;for(var t=c.length;t;){for(a=c,c=[];++p<t;)a&&a[p].run();p=-1,t=c.length}a=null,f=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===u||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new h(e,t)),1!==c.length||f||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){"use strict";var n=r(0);e.exports=function(e,t){n.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}},function(e,t,r){"use strict";var n=r(9);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e}},function(e,t,r){"use strict";var n=r(0);function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var u=[];n.forEach(t,function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),u.push(o(t)+"="+o(e))}))}),i=u.join("&")}return i&&(e+=(-1===e.indexOf("?")?"?":"&")+i),e}},function(e,t,r){"use strict";var n=r(0),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,u={};return e?(n.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(u[t]&&o.indexOf(t)>=0)return;u[t]="set-cookie"===t?(u[t]?u[t]:[]).concat([r]):u[t]?u[t]+", "+r:r}}),u):u}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function o(){this.message="String contains an invalid character"}o.prototype=new Error,o.prototype.code=5,o.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,r,i=String(e),u="",s=0,a=n;i.charAt(0|s)||(a="=",s%1);u+=a.charAt(63&t>>8-s%1*8)){if((r=i.charCodeAt(s+=.75))>255)throw new o;t=t<<8|r}return u}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,u){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===u&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n=r(0);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=o},function(e,t,r){"use strict";var n=r(0),o=r(38),i=r(10),u=r(3),s=r(39),a=r(40);function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return c(e),e.baseURL&&!s(e.url)&&(e.url=a(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||u.adapter)(e).then(function(t){return c(e),t.data=o(t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(c(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,r){"use strict";var n=r(0);e.exports=function(e,t,r){return n.forEach(r,function(r){e=r(e,t)}),e}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var n=r(11);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new n(e),t(r.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o(function(t){e=t}),cancel:e}},e.exports=o},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e,t){this.response=e,this.error=t}}();t.IHttpRequestResult=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=function(){function e(e){this.throwCloudError=!1,this.fakeResponseJson=void 0,this.errorJson=void 0,Object.assign(this,e)}return e.prototype.retryPromise=function(e,t){throw new Error("Not implemented")},e.prototype.get=function(e,t){if(this.throwCloudError){var r={response:{data:this.errorJson}};return n.throwError({originalError:r,mappedError:e.mapError(r)})}return n.of({data:this.fakeResponseJson,response:void 0})},e.prototype.post=function(e,t){if(this.throwCloudError){var r={response:{data:this.errorJson}};return n.throwError({originalError:r,mappedError:e.mapError(r)})}return n.of({data:this.fakeResponseJson,response:void 0})},e.prototype.put=function(e,t){if(this.throwCloudError){var r={response:{data:this.errorJson}};return n.throwError({originalError:r,mappedError:e.mapError(r)})}return n.of({data:this.fakeResponseJson,response:void 0})},e.prototype.delete=function(e,t){if(this.throwCloudError){var r={response:{data:this.errorJson}};return n.throwError({originalError:r,mappedError:e.mapError(r)})}return n.of({data:this.fakeResponseJson,response:void 0})},e}();t.TestHttpService=o},function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),n(r(13)),n(r(46))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(13),o={errorCode:"error_code",message:"message",requestId:"request_id",specificCode:"specific_code"};t.mapCloudError=function(e){if(e.response&&e.response.data&&e.response.data[o.requestId]){var t=e.response.data;return new n.CloudError({requestId:t[o.requestId],message:t[o.message]?t[o.message]:"",errorCode:t[o.errorCode]?t[o.errorCode]:0,specificCode:t[o.specificCode]?t[o.specificCode]:0})}return e.request,e}}])});
//# sourceMappingURL=kentico-cloud-core-sdk.umd.min.js.map

@@ -13,3 +13,3 @@ import { Observable } from 'rxjs';

useRetryForResponseCodes: number[];
}): Promise<T>;
}, currentAttempt?: number): Promise<T>;
get<TError extends any, TRawData extends any>(call: IHttpGetQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>;

@@ -16,0 +16,0 @@ post<TError extends any, TRawData extends any>(call: IHttpPostQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>;

@@ -16,4 +16,5 @@ "use strict";

*/
HttpService.prototype.retryPromise = function (promise, options) {
HttpService.prototype.retryPromise = function (promise, options, currentAttempt) {
var _this = this;
if (currentAttempt === void 0) { currentAttempt = 1; }
return new Promise(function (resolve, reject) { return promise

@@ -27,20 +28,16 @@ .then(function (response) {

statusCode = reason.originalError.request.status;
var retryCode = options.useRetryForResponseCodes.find(function (m) { return m === statusCode; });
if (!retryCode && retryCode !== 0) {
return reject(reason);
}
}
var newRetryAttempts = options.maxRetryAttempts - 1;
var retryTimeout = retry_service_1.retryService.getRetryTimeout(newRetryAttempts);
retry_service_1.retryService.debugLogAttempt(newRetryAttempts, retryTimeout);
if (options.maxRetryAttempts - 1 > 0) {
var retryCode = options.useRetryForResponseCodes.find(function (m) { return m === statusCode; });
if (!retryCode && retryCode !== 0) {
return reject(reason);
}
var retryTimeout = retry_service_1.retryService.getRetryTimeout(currentAttempt);
if (currentAttempt <= options.maxRetryAttempts) {
return _this.promiseRetryWait(retryTimeout)
.then(function () {
return _this.retryPromise(promise, {
maxRetryAttempts: newRetryAttempts,
useRetryForResponseCodes: options.useRetryForResponseCodes
});
retry_service_1.retryService.debugLogAttempt(currentAttempt, retryTimeout);
return _this.retryPromise(promise, options, currentAttempt + 1);
})
.then(function (response) { return resolve(response); })
.catch(function () { return reject(reason); });
.catch(function (error) { return reject(error); });
}

@@ -47,0 +44,0 @@ return reject(reason);

@@ -7,3 +7,3 @@ import { Observable } from 'rxjs';

useRetryForResponseCodes: number[];
}): Promise<T>;
}, currentAttempt: number): Promise<T>;
post<TError extends any, TRawData extends any>(call: IHttpPostQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>;

@@ -10,0 +10,0 @@ get<TError extends any, TRawData extends any>(call: IHttpGetQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>;

@@ -5,5 +5,5 @@ "use strict";

host: 'npmjs.com',
version: '1.4.2',
version: '1.4.3',
name: 'kentico-cloud-core'
};
//# sourceMappingURL=sdk-info.generated.js.map

@@ -13,3 +13,3 @@ import { Observable } from 'rxjs';

useRetryForResponseCodes: number[];
}): Promise<T>;
}, currentAttempt?: number): Promise<T>;
get<TError extends any, TRawData extends any>(call: IHttpGetQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>;

@@ -16,0 +16,0 @@ post<TError extends any, TRawData extends any>(call: IHttpPostQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>;

@@ -14,4 +14,5 @@ import { bindCallback, throwError } from 'rxjs';

*/
HttpService.prototype.retryPromise = function (promise, options) {
HttpService.prototype.retryPromise = function (promise, options, currentAttempt) {
var _this = this;
if (currentAttempt === void 0) { currentAttempt = 1; }
return new Promise(function (resolve, reject) { return promise

@@ -25,20 +26,16 @@ .then(function (response) {

statusCode = reason.originalError.request.status;
var retryCode = options.useRetryForResponseCodes.find(function (m) { return m === statusCode; });
if (!retryCode && retryCode !== 0) {
return reject(reason);
}
}
var newRetryAttempts = options.maxRetryAttempts - 1;
var retryTimeout = retryService.getRetryTimeout(newRetryAttempts);
retryService.debugLogAttempt(newRetryAttempts, retryTimeout);
if (options.maxRetryAttempts - 1 > 0) {
var retryCode = options.useRetryForResponseCodes.find(function (m) { return m === statusCode; });
if (!retryCode && retryCode !== 0) {
return reject(reason);
}
var retryTimeout = retryService.getRetryTimeout(currentAttempt);
if (currentAttempt <= options.maxRetryAttempts) {
return _this.promiseRetryWait(retryTimeout)
.then(function () {
return _this.retryPromise(promise, {
maxRetryAttempts: newRetryAttempts,
useRetryForResponseCodes: options.useRetryForResponseCodes
});
retryService.debugLogAttempt(currentAttempt, retryTimeout);
return _this.retryPromise(promise, options, currentAttempt + 1);
})
.then(function (response) { return resolve(response); })
.catch(function () { return reject(reason); });
.catch(function (error) { return reject(error); });
}

@@ -45,0 +42,0 @@ return reject(reason);

@@ -7,3 +7,3 @@ import { Observable } from 'rxjs';

useRetryForResponseCodes: number[];
}): Promise<T>;
}, currentAttempt: number): Promise<T>;
post<TError extends any, TRawData extends any>(call: IHttpPostQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>;

@@ -10,0 +10,0 @@ get<TError extends any, TRawData extends any>(call: IHttpGetQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>;

export var sdkInfo = {
host: 'npmjs.com',
version: '1.4.2',
version: '1.4.3',
name: 'kentico-cloud-core'
};
//# sourceMappingURL=sdk-info.generated.js.map

@@ -0,1 +1,15 @@

## 1.4.2 (2019-02-26)
#### :bug: Bug Fix
* [#123](https://github.com/Kentico/kentico-cloud-js/pull/123) Fix response mapping if request is successful for the first time ([@Enngage](https://github.com/Enngage))
## 1.4.1 (2019-02-26)
#### :bug: Bug Fix
* [#122](https://github.com/Kentico/kentico-cloud-js/pull/122) Fixes mapping of Promise response ([@Enngage](https://github.com/Enngage))
## 1.4.0 (2019-02-26)
#### :rocket: Enhancement
* [#121](https://github.com/Kentico/kentico-cloud-js/pull/121) Adds support for retrying Promises ([@Enngage](https://github.com/Enngage))
* [#112](https://github.com/Kentico/kentico-cloud-js/pull/112) Link test http service mention to the docs ([@Simply007](https://github.com/Simply007))
{
"name": "kentico-cloud-core",
"version": "1.4.2",
"version": "1.4.3",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc