@kentico/kontent-core
Advanced tools
Comparing version 2.0.0 to 3.0.0
import { AxiosInstance, AxiosResponse } from 'axios'; | ||
import { IHeader, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions, IHttpRequestConfig, IHttpRequestResponse, IHttpRequestResult } from './http.models'; | ||
import { IHeader, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPatchQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions, IHttpRequestConfig, IHttpRequestResponse, IHttpRequestResult } from './http.models'; | ||
export declare function registerResponseInterceptor(instance: AxiosInstance, interceptor: (response: IHttpRequestResponse) => IHttpRequestResponse): void; | ||
@@ -7,2 +7,3 @@ export declare function registerRequestInterceptor(instance: AxiosInstance, interceptor: (config: IHttpRequestConfig) => IHttpRequestConfig): void; | ||
export declare function putCallback<TError>(instance: AxiosInstance, call: IHttpPutQueryCall<TError>, options: IHttpQueryOptions | undefined, callback: (response: IHttpRequestResult<AxiosResponse>) => void): void; | ||
export declare function patchCallback<TError>(instance: AxiosInstance, call: IHttpPatchQueryCall<TError>, options: IHttpQueryOptions | undefined, callback: (response: IHttpRequestResult<AxiosResponse>) => void): void; | ||
export declare function deleteCallback<TError>(instance: AxiosInstance, call: IHttpDeleteQueryCall<TError>, options: IHttpQueryOptions | undefined, callback: (response: IHttpRequestResult<AxiosResponse>) => void): void; | ||
@@ -9,0 +10,0 @@ export declare function postCallback<TError>(instance: AxiosInstance, call: IHttpPostQueryCall<TError>, options: IHttpQueryOptions | undefined, callback: (response: IHttpRequestResult<AxiosResponse>) => void): void; |
export interface IBaseResponse<TRawData> { | ||
data: TRawData; | ||
headers: IHeader[]; | ||
response: any; | ||
status: number; | ||
} | ||
@@ -19,2 +21,5 @@ export interface IBaseResponseError<TError extends any> { | ||
} | ||
export interface IHttpPatchQueryCall<TError extends any> extends IHttpQueryCall<TError> { | ||
body: any; | ||
} | ||
export interface IHttpDeleteQueryCall<TError extends any> extends IHttpQueryCall<TError> { | ||
@@ -21,0 +26,0 @@ } |
import { Observable } from 'rxjs'; | ||
import { IBaseResponse, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions, IHttpRequestConfig, IHttpRequestResponse } from './http.models'; | ||
import { IBaseResponse, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions, IHttpRequestConfig, IHttpRequestResponse, IHttpPatchQueryCall } from './http.models'; | ||
import { IHttpService } from './ihttp.service'; | ||
@@ -22,6 +22,8 @@ export declare class HttpService implements IHttpService { | ||
put<TError extends any, TRawData extends any>(call: IHttpPutQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
patch<TError extends any, TRawData extends any>(call: IHttpPatchQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
delete<TError extends any, TRawData extends any>(call: IHttpDeleteQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
private mapAxiosObservable; | ||
private mapResult; | ||
private extractHeadersFromAxiosResponse; | ||
private promiseRetryWait; | ||
} |
import { Observable } from 'rxjs'; | ||
import { IBaseResponse, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions } from './http.models'; | ||
import { IBaseResponse, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions, IHttpPatchQueryCall } from './http.models'; | ||
export interface IHttpService { | ||
@@ -11,3 +11,4 @@ retryPromise<T>(promise: Promise<T>, options: { | ||
put<TError extends any, TRawData extends any>(call: IHttpPutQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
patch<TError extends any, TRawData extends any>(call: IHttpPatchQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
delete<TError extends any, TRawData extends any>(call: IHttpDeleteQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
} |
import { Observable } from 'rxjs'; | ||
import { IBaseResponse, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions } from './http.models'; | ||
import { IBaseResponse, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPatchQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions } from './http.models'; | ||
import { IHttpService } from './ihttp.service'; | ||
@@ -21,3 +21,4 @@ export declare class TestHttpService implements IHttpService { | ||
put<TError extends any, TRawData extends any>(call: IHttpPutQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
patch<TError extends any, TRawData extends any>(call: IHttpPatchQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
delete<TError extends any, TRawData extends any>(call: IHttpDeleteQueryCall<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("kontentCore",["rxjs","rxjs/operators"],t):"object"==typeof exports?exports.kontentCore=t(require("rxjs"),require("rxjs/operators")):e.kontentCore=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=16)}([function(e,t,r){"use strict";var n=r(5),o=r(27),s=Object.prototype.toString;function i(e){return"[object Array]"===s.call(e)}function u(e){return null!==e&&"object"==typeof e}function a(e){return"[object Function]"===s.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(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:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===s.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]"===s.call(e)},isFile:function(e){return"[object File]"===s.call(e)},isBlob:function(e){return"[object Blob]"===s.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&&"NativeScript"!==navigator.product&&"NS"!==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},deepMerge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]="object"==typeof r?e({},r):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";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(4),s=r(2),i=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 i=0;if(t&&t.originalError&&t.originalError.response&&t.originalError.response.status&&(i=t.originalError.response.status),!e.useRetryForResponseCodes.find(function(e){return e===i}))return n.throwError(t);var u=s.retryService.getRetryTimeout(o);return s.retryService.debugLogAttempt(o,u),n.timer(u)}))}}};t.RetryStrategy=i,t.retryStrategy=new i},function(e,r){e.exports=t},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);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 s;if(r)s=r(t);else if(n.isURLSearchParams(t))s=t.toString();else{var i=[];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)),i.push(o(t)+"="+o(e))}))}),s=i.join("&")}if(s){var u=e.indexOf("#");-1!==u&&(e=e.slice(0,u)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";(function(t){var n=r(0),o=r(33),s={"Content-Type":"application/x-www-form-urlencoded"};function i(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,a={adapter:(void 0!==t&&"[object process]"===Object.prototype.toString.call(t)?u=r(9):"undefined"!=typeof XMLHttpRequest&&(u=r(9)),u),transformRequest:[function(e,t){return o(t,"Accept"),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)?(i(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(i(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(s)}),e.exports=a}).call(this,r(32))},function(e,t,r){"use strict";var n=r(0),o=r(34),s=r(6),i=r(36),u=r(37),a=r(10);e.exports=function(e){return new Promise(function(t,c){var f=e.data,p=e.headers;n.isFormData(f)&&delete p["Content-Type"];var l=new XMLHttpRequest;if(e.auth){var d=e.auth.username||"",h=e.auth.password||"";p.Authorization="Basic "+btoa(d+":"+h)}if(l.open(e.method.toUpperCase(),s(e.url,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in l?i(l.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l};o(t,c,n),l=null}},l.onabort=function(){l&&(c(a("Request aborted",e,"ECONNABORTED",l)),l=null)},l.onerror=function(){c(a("Network Error",e,null,l)),l=null},l.ontimeout=function(){c(a("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",l)),l=null},n.isStandardBrowserEnv()){var m=r(38),y=(e.withCredentials||u(e.url))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;y&&(p[e.xsrfHeaderName]=y)}if("setRequestHeader"in l&&n.forEach(p,function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete p[t]:l.setRequestHeader(t,e)}),e.withCredentials&&(l.withCredentials=!0),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){l&&(l.abort(),c(e),l=null)}),void 0===f&&(f=null),l.send(f)})}},function(e,t,r){"use strict";var n=r(35);e.exports=function(e,t,r,o,s){var i=new Error(e);return n(i,t,r,o,s)}},function(e,t,r){"use strict";var n=r(0);e.exports=function(e,t){t=t||{};var r={};return n.forEach(["url","method","params","data"],function(e){void 0!==t[e]&&(r[e]=t[e])}),n.forEach(["headers","auth","proxy"],function(o){n.isObject(t[o])?r[o]=n.deepMerge(e[o],t[o]):void 0!==t[o]?r[o]=t[o]:n.isObject(e[o])?r[o]=n.deepMerge(e[o]):void 0!==e[o]&&(r[o]=e[o])}),n.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])}),r}},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=r(14);function o(e,t){var r={};(e.forEach(function(e){r[e.header]=e.value}),t)&&(e.find(function(e){return e.header.toLowerCase()==="Content-Type".toLowerCase()})||(r["Content-Type"]="application/json"));return r}t.registerResponseInterceptor=function(e,t){e.interceptors.response.use(function(e){return t(e)},function(e){return Promise.reject(e)})},t.registerRequestInterceptor=function(e,t){e.interceptors.request.use(function(e){return t(e)},function(e){return Promise.reject(e)})},t.getCallback=function(e,t,r,s){n.httpDebugger.debugStartHttpRequest(),e.get(t.url,{headers:o(r&&r.headers?r.headers:[],!1),responseType:r&&r.responseType?r.responseType:void 0}).then(function(e){n.httpDebugger.debugResolveHttpRequest(),s({response:e})},function(e){n.httpDebugger.debugFailedHttpRequest(),s({error:e})})},t.putCallback=function(e,t,r,s){n.httpDebugger.debugStartHttpRequest(),e.put(t.url,t.body,{headers:o(r&&r.headers?r.headers:[],!0),responseType:r&&r.responseType?r.responseType:void 0}).then(function(e){n.httpDebugger.debugResolveHttpRequest(),s({response:e})},function(e){n.httpDebugger.debugFailedHttpRequest(),s({error:e})})},t.deleteCallback=function(e,t,r,s){n.httpDebugger.debugStartHttpRequest(),e.delete(t.url,{headers:o(r&&r.headers?r.headers:[],!0),responseType:r&&r.responseType?r.responseType:void 0}).then(function(e){n.httpDebugger.debugResolveHttpRequest(),s({response:e})},function(e){n.httpDebugger.debugFailedHttpRequest(),s({error:e})})},t.postCallback=function(e,t,r,s){n.httpDebugger.debugStartHttpRequest(),e.post(t.url,t.body,{headers:o(r&&r.headers?r.headers:[],!0),responseType:r&&r.responseType?r.responseType:void 0}).then(function(e){n.httpDebugger.debugResolveHttpRequest(),s({response:e})},function(e){n.httpDebugger.debugFailedHttpRequest(),s({error:e})})},t.getHeadersJson=o},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(e){Object.assign(this,e)};t.BaseKontentError=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(17)),n(r(21)),n(r(23)),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(18)),n(r(19)),n(r(20))},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(22))},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(3)),n(r(24)),n(r(43)),n(r(13)),n(r(14)),n(r(44)),n(r(2))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(25),o=r(1),s=r(4),i=r(13),u=r(2),a=r(3),c=function(){function e(e){this.axiosInstance=n.default.create(),e&&(e.requestInterceptor&&i.registerRequestInterceptor(this.axiosInstance,e.requestInterceptor),e.responseInterceptor&&i.registerResponseInterceptor(this.axiosInstance,e.responseInterceptor))}return e.prototype.retryPromise=function(e,t,r){var n=this;return void 0===r&&(r=1),new Promise(function(o,s){return e.then(function(e){o(e)}).catch(function(i){var a=0;i&&i.originalError&&i.originalError.request&&(a=i.originalError.request.status);var c=t.useRetryForResponseCodes.find(function(e){return e===a});if(!c&&0!==c)return s(i);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 s(e)}):s(i)})})},e.prototype.get=function(e,t){var r=o.bindCallback(i.getCallback);return this.mapAxiosObservable(this.axiosInstance,r,e,t)},e.prototype.post=function(e,t){var r=o.bindCallback(i.postCallback);return this.mapAxiosObservable(this.axiosInstance,r,e,t)},e.prototype.put=function(e,t){var r=o.bindCallback(i.putCallback);return this.mapAxiosObservable(this.axiosInstance,r,e,t)},e.prototype.delete=function(e,t){var r=o.bindCallback(i.deleteCallback);return this.mapAxiosObservable(this.axiosInstance,r,e,t)},e.prototype.mapAxiosObservable=function(e,t,r,n){var i=this;return t(e,r,n).pipe(s.retryWhen(a.retryStrategy.strategy({maxRetryAttempts:n&&n.maxRetryAttempts?n.maxRetryAttempts:0,useRetryForResponseCodes:n&&n.useRetryForResponseCodes?n.useRetryForResponseCodes:[]})),s.map(function(e){return i.mapResult(e)}),s.catchError(function(e){return n&&n.logErrorToConsole&&console.warn("Kentico Kontent SDK encountered an error: ",e),o.throwError({originalError:e,mappedError:r.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=c},function(e,t,r){e.exports=r(26)},function(e,t,r){"use strict";var n=r(0),o=r(5),s=r(28),i=r(11);function u(e){var t=new s(e),r=o(s.prototype.request,t);return n.extend(r,s.prototype,t),n.extend(r,t),r}var a=u(r(8));a.Axios=s,a.create=function(e){return u(i(a.defaults,e))},a.Cancel=r(12),a.CancelToken=r(41),a.isCancel=r(7),a.all=function(e){return Promise.all(e)},a.spread=r(42),e.exports=a,e.exports.default=a},function(e,t){ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("kontentCore",["rxjs","rxjs/operators"],t):"object"==typeof exports?exports.kontentCore=t(require("rxjs"),require("rxjs/operators")):e.kontentCore=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=16)}([function(e,t,r){"use strict";var n=r(5),o=r(27),s=Object.prototype.toString;function i(e){return"[object Array]"===s.call(e)}function u(e){return null!==e&&"object"==typeof e}function a(e){return"[object Function]"===s.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(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:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===s.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]"===s.call(e)},isFile:function(e){return"[object File]"===s.call(e)},isBlob:function(e){return"[object Blob]"===s.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&&"NativeScript"!==navigator.product&&"NS"!==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},deepMerge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]="object"==typeof r?e({},r):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";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(4),s=r(2),i=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 i=0;if(t&&t.originalError&&t.originalError.response&&t.originalError.response.status&&(i=t.originalError.response.status),!e.useRetryForResponseCodes.find((function(e){return e===i})))return n.throwError(t);var u=s.retryService.getRetryTimeout(o);return s.retryService.debugLogAttempt(o,u),n.timer(u)})))}}};t.RetryStrategy=i,t.retryStrategy=new i},function(e,r){e.exports=t},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);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 s;if(r)s=r(t);else if(n.isURLSearchParams(t))s=t.toString();else{var i=[];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)),i.push(o(t)+"="+o(e))})))})),s=i.join("&")}if(s){var u=e.indexOf("#");-1!==u&&(e=e.slice(0,u)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";(function(t){var n=r(0),o=r(33),s={"Content-Type":"application/x-www-form-urlencoded"};function i(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,a={adapter:(void 0!==t&&"[object process]"===Object.prototype.toString.call(t)?u=r(9):"undefined"!=typeof XMLHttpRequest&&(u=r(9)),u),transformRequest:[function(e,t){return o(t,"Accept"),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)?(i(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(i(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(s)})),e.exports=a}).call(this,r(32))},function(e,t,r){"use strict";var n=r(0),o=r(34),s=r(6),i=r(36),u=r(37),a=r(10);e.exports=function(e){return new Promise((function(t,c){var p=e.data,f=e.headers;n.isFormData(p)&&delete f["Content-Type"];var l=new XMLHttpRequest;if(e.auth){var d=e.auth.username||"",h=e.auth.password||"";f.Authorization="Basic "+btoa(d+":"+h)}if(l.open(e.method.toUpperCase(),s(e.url,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in l?i(l.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l};o(t,c,n),l=null}},l.onabort=function(){l&&(c(a("Request aborted",e,"ECONNABORTED",l)),l=null)},l.onerror=function(){c(a("Network Error",e,null,l)),l=null},l.ontimeout=function(){c(a("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",l)),l=null},n.isStandardBrowserEnv()){var m=r(38),y=(e.withCredentials||u(e.url))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;y&&(f[e.xsrfHeaderName]=y)}if("setRequestHeader"in l&&n.forEach(f,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete f[t]:l.setRequestHeader(t,e)})),e.withCredentials&&(l.withCredentials=!0),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){l&&(l.abort(),c(e),l=null)})),void 0===p&&(p=null),l.send(p)}))}},function(e,t,r){"use strict";var n=r(35);e.exports=function(e,t,r,o,s){var i=new Error(e);return n(i,t,r,o,s)}},function(e,t,r){"use strict";var n=r(0);e.exports=function(e,t){t=t||{};var r={};return n.forEach(["url","method","params","data"],(function(e){void 0!==t[e]&&(r[e]=t[e])})),n.forEach(["headers","auth","proxy"],(function(o){n.isObject(t[o])?r[o]=n.deepMerge(e[o],t[o]):void 0!==t[o]?r[o]=t[o]:n.isObject(e[o])?r[o]=n.deepMerge(e[o]):void 0!==e[o]&&(r[o]=e[o])})),n.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],(function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])})),r}},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=r(14);function o(e,t){var r={};(e.forEach((function(e){r[e.header]=e.value})),t)&&(e.find((function(e){return e.header.toLowerCase()==="Content-Type".toLowerCase()}))||(r["Content-Type"]="application/json"));return r}t.registerResponseInterceptor=function(e,t){e.interceptors.response.use((function(e){return t(e)}),(function(e){return Promise.reject(e)}))},t.registerRequestInterceptor=function(e,t){e.interceptors.request.use((function(e){return t(e)}),(function(e){return Promise.reject(e)}))},t.getCallback=function(e,t,r,s){n.httpDebugger.debugStartHttpRequest(),e.get(t.url,{headers:o(r&&r.headers?r.headers:[],!1),responseType:r&&r.responseType?r.responseType:void 0}).then((function(e){n.httpDebugger.debugResolveHttpRequest(),s({response:e})}),(function(e){n.httpDebugger.debugFailedHttpRequest(),s({error:e})}))},t.putCallback=function(e,t,r,s){n.httpDebugger.debugStartHttpRequest(),e.put(t.url,t.body,{headers:o(r&&r.headers?r.headers:[],!0),responseType:r&&r.responseType?r.responseType:void 0}).then((function(e){n.httpDebugger.debugResolveHttpRequest(),s({response:e})}),(function(e){n.httpDebugger.debugFailedHttpRequest(),s({error:e})}))},t.patchCallback=function(e,t,r,s){n.httpDebugger.debugStartHttpRequest(),e.patch(t.url,t.body,{headers:o(r&&r.headers?r.headers:[],!0),responseType:r&&r.responseType?r.responseType:void 0}).then((function(e){n.httpDebugger.debugResolveHttpRequest(),s({response:e})}),(function(e){n.httpDebugger.debugFailedHttpRequest(),s({error:e})}))},t.deleteCallback=function(e,t,r,s){n.httpDebugger.debugStartHttpRequest(),e.delete(t.url,{headers:o(r&&r.headers?r.headers:[],!0),responseType:r&&r.responseType?r.responseType:void 0}).then((function(e){n.httpDebugger.debugResolveHttpRequest(),s({response:e})}),(function(e){n.httpDebugger.debugFailedHttpRequest(),s({error:e})}))},t.postCallback=function(e,t,r,s){n.httpDebugger.debugStartHttpRequest(),e.post(t.url,t.body,{headers:o(r&&r.headers?r.headers:[],!0),responseType:r&&r.responseType?r.responseType:void 0}).then((function(e){n.httpDebugger.debugResolveHttpRequest(),s({response:e})}),(function(e){n.httpDebugger.debugFailedHttpRequest(),s({error:e})}))},t.getHeadersJson=o},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(e){Object.assign(this,e)};t.BaseKontentError=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(17)),n(r(21)),n(r(23)),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(18)),n(r(19)),n(r(20))},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(22))},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(3)),n(r(24)),n(r(43)),n(r(13)),n(r(14)),n(r(44)),n(r(2))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(25),o=r(1),s=r(4),i=r(13),u=r(2),a=r(3),c=function(){function e(e){this.axiosInstance=n.default.create(),e&&(e.requestInterceptor&&i.registerRequestInterceptor(this.axiosInstance,e.requestInterceptor),e.responseInterceptor&&i.registerResponseInterceptor(this.axiosInstance,e.responseInterceptor))}return e.prototype.retryPromise=function(e,t,r){var n=this;return void 0===r&&(r=1),new Promise((function(o,s){return e.then((function(e){o(e)})).catch((function(i){var a=0;i&&i.originalError&&i.originalError.request&&(a=i.originalError.request.status);var c=t.useRetryForResponseCodes.find((function(e){return e===a}));if(!c&&0!==c)return s(i);var p=u.retryService.getRetryTimeout(r);return r<=t.maxRetryAttempts?n.promiseRetryWait(p).then((function(){return u.retryService.debugLogAttempt(r,p),n.retryPromise(e,t,r+1)})).then((function(e){return o(e)})).catch((function(e){return s(e)})):s(i)}))}))},e.prototype.get=function(e,t){var r=o.bindCallback(i.getCallback);return this.mapAxiosObservable(this.axiosInstance,r,e,t)},e.prototype.post=function(e,t){var r=o.bindCallback(i.postCallback);return this.mapAxiosObservable(this.axiosInstance,r,e,t)},e.prototype.put=function(e,t){var r=o.bindCallback(i.putCallback);return this.mapAxiosObservable(this.axiosInstance,r,e,t)},e.prototype.patch=function(e,t){var r=o.bindCallback(i.putCallback);return this.mapAxiosObservable(this.axiosInstance,r,e,t)},e.prototype.delete=function(e,t){var r=o.bindCallback(i.deleteCallback);return this.mapAxiosObservable(this.axiosInstance,r,e,t)},e.prototype.mapAxiosObservable=function(e,t,r,n){var i=this;return t(e,r,n).pipe(s.retryWhen(a.retryStrategy.strategy({maxRetryAttempts:n&&n.maxRetryAttempts?n.maxRetryAttempts:0,useRetryForResponseCodes:n&&n.useRetryForResponseCodes?n.useRetryForResponseCodes:[]})),s.map((function(e){return i.mapResult(e)})),s.catchError((function(e){return n&&n.logErrorToConsole&&console.error("Kentico Kontent Core SDK encountered an error: ",e),o.throwError({originalError:e,mappedError:r.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,headers:this.extractHeadersFromAxiosResponse(e.response),status:e.response.status}},e.prototype.extractHeadersFromAxiosResponse=function(e){for(var t=[],r=0,n=Object.keys(e.headers);r<n.length;r++){var o=n[r];t.push({header:o,value:e.headers[o]})}return t},e.prototype.promiseRetryWait=function(e){return new Promise((function(t){return setTimeout(t,e)}))},e}();t.HttpService=c},function(e,t,r){e.exports=r(26)},function(e,t,r){"use strict";var n=r(0),o=r(5),s=r(28),i=r(11);function u(e){var t=new s(e),r=o(s.prototype.request,t);return n.extend(r,s.prototype,t),n.extend(r,t),r}var a=u(r(8));a.Axios=s,a.create=function(e){return u(i(a.defaults,e))},a.Cancel=r(12),a.CancelToken=r(41),a.isCancel=r(7),a.all=function(e){return Promise.all(e)},a.spread=r(42),e.exports=a,e.exports.default=a},function(e,t){ | ||
/*! | ||
@@ -8,3 +8,3 @@ * Determine if an object is a Buffer | ||
*/ | ||
e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,r){"use strict";var n=r(0),o=r(6),s=r(29),i=r(30),u=r(11);function a(e){this.defaults=e,this.interceptors={request:new s,response:new s}}a.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=u(this.defaults,e)).method=e.method?e.method.toLowerCase():"get";var t=[i,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},a.prototype.getUri=function(e){return e=u(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],function(e){a.prototype[e]=function(t,r){return this.request(n.merge(r||{},{method:e,url:t}))}}),n.forEach(["post","put","patch"],function(e){a.prototype[e]=function(t,r,o){return this.request(n.merge(o||{},{method:e,url:t,data:r}))}}),e.exports=a},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(31),s=r(7),i=r(8),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||i.adapter)(e).then(function(t){return c(e),t.data=o(t.data,t.headers,e.transformResponse),t},function(t){return s(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){var r,n,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===s||!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:s}catch(e){r=s}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();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===i||!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(10);e.exports=function(e,t,r){var o=r.config.validateStatus;!o||o(r.status)?e(r):t(n("Request failed with status code "+r.status,r.config,null,r.request,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.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},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,s,i={};return e?(n.forEach(e.split("\n"),function(e){if(s=e.indexOf(":"),t=n.trim(e.substr(0,s)).toLowerCase(),r=n.trim(e.substr(s+1)),t){if(i[t]&&o.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([r]):i[t]?i[t]+", "+r:r}}),i):i}},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=r(0);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,s,i){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(s)&&u.push("domain="+s),!0===i&&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";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(12);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(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.throwError=!1,this.fakeResponseJson=void 0,this.errorJson=void 0,Object.assign(this,e)}return e.prototype.retryPromise=function(e,t){return console.log("Retry is not implemented in test service. Returning original Promise"),e},e.prototype.get=function(e,t){if(this.throwError){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.throwError){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.throwError){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.throwError){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(15)),n(r(46))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(15),o={errorCode:"error_code",message:"message",requestId:"request_id",specificCode:"specific_code"};t.mapBaseKontentError=function(e){if(e.response&&e.response.data&&e.response.data[o.requestId]){var t=e.response.data;return new n.BaseKontentError({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,originalError:e})}return e.request,e}}])}); | ||
e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,r){"use strict";var n=r(0),o=r(6),s=r(29),i=r(30),u=r(11);function a(e){this.defaults=e,this.interceptors={request:new s,response:new s}}a.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=u(this.defaults,e)).method=e.method?e.method.toLowerCase():"get";var t=[i,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},a.prototype.getUri=function(e){return e=u(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){a.prototype[e]=function(t,r){return this.request(n.merge(r||{},{method:e,url:t}))}})),n.forEach(["post","put","patch"],(function(e){a.prototype[e]=function(t,r,o){return this.request(n.merge(o||{},{method:e,url:t,data:r}))}})),e.exports=a},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(31),s=r(7),i=r(8),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||i.adapter)(e).then((function(t){return c(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return s(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){var r,n,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===s||!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:s}catch(e){r=s}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var a,c=[],p=!1,f=-1;function l(){p&&a&&(p=!1,a.length?c=a.concat(c):f=-1,c.length&&d())}function d(){if(!p){var e=u(l);p=!0;for(var t=c.length;t;){for(a=c,c=[];++f<t;)a&&a[f].run();f=-1,t=c.length}a=null,p=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!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||p||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(10);e.exports=function(e,t,r){var o=r.config.validateStatus;!o||o(r.status)?e(r):t(n("Request failed with status code "+r.status,r.config,null,r.request,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.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},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,s,i={};return e?(n.forEach(e.split("\n"),(function(e){if(s=e.indexOf(":"),t=n.trim(e.substr(0,s)).toLowerCase(),r=n.trim(e.substr(s+1)),t){if(i[t]&&o.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([r]):i[t]?i[t]+", "+r:r}})),i):i}},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=r(0);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,s,i){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(s)&&u.push("domain="+s),!0===i&&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";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(12);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(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.throwError=!1,this.fakeResponseJson=void 0,this.errorJson=void 0,Object.assign(this,e)}return e.prototype.retryPromise=function(e,t){return console.log("Retry is not implemented in test service. Returning original Promise"),e},e.prototype.get=function(e,t){if(this.throwError){var r={response:{data:this.errorJson}};return n.throwError({originalError:r,mappedError:e.mapError(r),headers:[],status:200})}return n.of({data:this.fakeResponseJson,response:void 0,headers:[],status:200})},e.prototype.post=function(e,t){if(this.throwError){var r={response:{data:this.errorJson}};return n.throwError({originalError:r,mappedError:e.mapError(r)})}return n.of({data:this.fakeResponseJson,response:void 0,headers:[],status:200})},e.prototype.put=function(e,t){if(this.throwError){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.patch=function(e,t){if(this.throwError){var r={response:{data:this.errorJson}};return n.throwError({originalError:r,mappedError:e.mapError(r)})}return n.of({data:this.fakeResponseJson,response:void 0,headers:[],status:200})},e.prototype.delete=function(e,t){if(this.throwError){var r={response:{data:this.errorJson}};return n.throwError({originalError:r,mappedError:e.mapError(r)})}return n.of({data:this.fakeResponseJson,response:void 0,headers:[],status:200})},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(15)),n(r(46))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(15),o={errorCode:"error_code",message:"message",requestId:"request_id",specificCode:"specific_code"};t.mapBaseKontentError=function(e){if(e.response&&e.response.data&&e.response.data[o.requestId]){var t=e.response.data;return new n.BaseKontentError({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,originalError:e})}return e.request,e}}])})); | ||
//# sourceMappingURL=kontent-core.umd.min.js.map |
import { AxiosInstance, AxiosResponse } from 'axios'; | ||
import { IHeader, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions, IHttpRequestConfig, IHttpRequestResponse, IHttpRequestResult } from './http.models'; | ||
import { IHeader, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPatchQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions, IHttpRequestConfig, IHttpRequestResponse, IHttpRequestResult } from './http.models'; | ||
export declare function registerResponseInterceptor(instance: AxiosInstance, interceptor: (response: IHttpRequestResponse) => IHttpRequestResponse): void; | ||
@@ -7,2 +7,3 @@ export declare function registerRequestInterceptor(instance: AxiosInstance, interceptor: (config: IHttpRequestConfig) => IHttpRequestConfig): void; | ||
export declare function putCallback<TError>(instance: AxiosInstance, call: IHttpPutQueryCall<TError>, options: IHttpQueryOptions | undefined, callback: (response: IHttpRequestResult<AxiosResponse>) => void): void; | ||
export declare function patchCallback<TError>(instance: AxiosInstance, call: IHttpPatchQueryCall<TError>, options: IHttpQueryOptions | undefined, callback: (response: IHttpRequestResult<AxiosResponse>) => void): void; | ||
export declare function deleteCallback<TError>(instance: AxiosInstance, call: IHttpDeleteQueryCall<TError>, options: IHttpQueryOptions | undefined, callback: (response: IHttpRequestResult<AxiosResponse>) => void): void; | ||
@@ -9,0 +10,0 @@ export declare function postCallback<TError>(instance: AxiosInstance, call: IHttpPostQueryCall<TError>, options: IHttpQueryOptions | undefined, callback: (response: IHttpRequestResult<AxiosResponse>) => void): void; |
@@ -59,2 +59,21 @@ "use strict"; | ||
exports.putCallback = putCallback; | ||
function patchCallback(instance, call, options, callback) { | ||
http_debugger_1.httpDebugger.debugStartHttpRequest(); | ||
var axiosPromise = instance.patch(call.url, call.body, { | ||
headers: getHeadersJson(options && options.headers ? options.headers : [], true), | ||
responseType: options && options.responseType ? options.responseType : undefined | ||
}); | ||
axiosPromise.then(function (response) { | ||
http_debugger_1.httpDebugger.debugResolveHttpRequest(); | ||
callback({ | ||
response: response | ||
}); | ||
}, function (error) { | ||
http_debugger_1.httpDebugger.debugFailedHttpRequest(); | ||
callback({ | ||
error: error | ||
}); | ||
}); | ||
} | ||
exports.patchCallback = patchCallback; | ||
function deleteCallback(instance, call, options, callback) { | ||
@@ -61,0 +80,0 @@ http_debugger_1.httpDebugger.debugStartHttpRequest(); |
export interface IBaseResponse<TRawData> { | ||
data: TRawData; | ||
headers: IHeader[]; | ||
response: any; | ||
status: number; | ||
} | ||
@@ -19,2 +21,5 @@ export interface IBaseResponseError<TError extends any> { | ||
} | ||
export interface IHttpPatchQueryCall<TError extends any> extends IHttpQueryCall<TError> { | ||
body: any; | ||
} | ||
export interface IHttpDeleteQueryCall<TError extends any> extends IHttpQueryCall<TError> { | ||
@@ -21,0 +26,0 @@ } |
import { Observable } from 'rxjs'; | ||
import { IBaseResponse, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions, IHttpRequestConfig, IHttpRequestResponse } from './http.models'; | ||
import { IBaseResponse, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions, IHttpRequestConfig, IHttpRequestResponse, IHttpPatchQueryCall } from './http.models'; | ||
import { IHttpService } from './ihttp.service'; | ||
@@ -22,6 +22,8 @@ export declare class HttpService implements IHttpService { | ||
put<TError extends any, TRawData extends any>(call: IHttpPutQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
patch<TError extends any, TRawData extends any>(call: IHttpPatchQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
delete<TError extends any, TRawData extends any>(call: IHttpDeleteQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
private mapAxiosObservable; | ||
private mapResult; | ||
private extractHeadersFromAxiosResponse; | ||
private promiseRetryWait; | ||
} |
@@ -73,2 +73,8 @@ "use strict"; | ||
}; | ||
HttpService.prototype.patch = function (call, options) { | ||
// bind callback from axios promise | ||
var axiosObservable = rxjs_1.bindCallback(HttpFunctions.putCallback); | ||
// map axios observable | ||
return this.mapAxiosObservable(this.axiosInstance, axiosObservable, call, options); | ||
}; | ||
HttpService.prototype.delete = function (call, options) { | ||
@@ -90,3 +96,3 @@ // bind callback from axios promise | ||
if (options && options.logErrorToConsole) { | ||
console.warn("Kentico Kontent SDK encountered an error: ", error); | ||
console.error("Kentico Kontent Core SDK encountered an error: ", error); | ||
} | ||
@@ -110,5 +116,18 @@ return rxjs_1.throwError({ | ||
data: result.response.data, | ||
response: result.response | ||
response: result.response, | ||
headers: this.extractHeadersFromAxiosResponse(result.response), | ||
status: result.response.status | ||
}; | ||
}; | ||
HttpService.prototype.extractHeadersFromAxiosResponse = function (response) { | ||
var headers = []; | ||
for (var _i = 0, _a = Object.keys(response.headers); _i < _a.length; _i++) { | ||
var headerKey = _a[_i]; | ||
headers.push({ | ||
header: headerKey, | ||
value: response.headers[headerKey] | ||
}); | ||
} | ||
return headers; | ||
}; | ||
HttpService.prototype.promiseRetryWait = function (ms) { | ||
@@ -115,0 +134,0 @@ return new Promise(function (r) { return setTimeout(r, ms); }); |
import { Observable } from 'rxjs'; | ||
import { IBaseResponse, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions } from './http.models'; | ||
import { IBaseResponse, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions, IHttpPatchQueryCall } from './http.models'; | ||
export interface IHttpService { | ||
@@ -11,3 +11,4 @@ retryPromise<T>(promise: Promise<T>, options: { | ||
put<TError extends any, TRawData extends any>(call: IHttpPutQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
patch<TError extends any, TRawData extends any>(call: IHttpPatchQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
delete<TError extends any, TRawData extends any>(call: IHttpDeleteQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
} |
import { Observable } from 'rxjs'; | ||
import { IBaseResponse, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions } from './http.models'; | ||
import { IBaseResponse, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPatchQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions } from './http.models'; | ||
import { IHttpService } from './ihttp.service'; | ||
@@ -21,3 +21,4 @@ export declare class TestHttpService implements IHttpService { | ||
put<TError extends any, TRawData extends any>(call: IHttpPutQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
patch<TError extends any, TRawData extends any>(call: IHttpPatchQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
delete<TError extends any, TRawData extends any>(call: IHttpDeleteQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
} |
@@ -25,3 +25,5 @@ "use strict"; | ||
originalError: fakeError, | ||
mappedError: call.mapError(fakeError) | ||
mappedError: call.mapError(fakeError), | ||
headers: [], | ||
status: 200 | ||
}); | ||
@@ -32,3 +34,5 @@ } | ||
data: this.fakeResponseJson, | ||
response: undefined | ||
response: undefined, | ||
headers: [], | ||
status: 200 | ||
}); | ||
@@ -52,3 +56,5 @@ }; | ||
data: this.fakeResponseJson, | ||
response: undefined | ||
response: undefined, | ||
headers: [], | ||
status: 200 | ||
}); | ||
@@ -61,3 +67,3 @@ }; | ||
response: { | ||
data: this.errorJson | ||
data: this.errorJson, | ||
} | ||
@@ -76,2 +82,23 @@ }; | ||
}; | ||
TestHttpService.prototype.patch = function (call, options) { | ||
// throw kontent error | ||
if (this.throwError) { | ||
var fakeError = { | ||
response: { | ||
data: this.errorJson | ||
} | ||
}; | ||
return rxjs_1.throwError({ | ||
originalError: fakeError, | ||
mappedError: call.mapError(fakeError) | ||
}); | ||
} | ||
// return fake response | ||
return rxjs_1.of({ | ||
data: this.fakeResponseJson, | ||
response: undefined, | ||
headers: [], | ||
status: 200 | ||
}); | ||
}; | ||
TestHttpService.prototype.delete = function (call, options) { | ||
@@ -93,3 +120,5 @@ // throw kontent error | ||
data: this.fakeResponseJson, | ||
response: undefined | ||
response: undefined, | ||
headers: [], | ||
status: 200 | ||
}); | ||
@@ -96,0 +125,0 @@ }; |
@@ -5,5 +5,5 @@ "use strict"; | ||
host: 'npmjs.com', | ||
version: '2.0.0', | ||
version: '3.0.0', | ||
name: '@kentico/kontent-core' | ||
}; | ||
//# sourceMappingURL=sdk-info.generated.js.map |
import { AxiosInstance, AxiosResponse } from 'axios'; | ||
import { IHeader, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions, IHttpRequestConfig, IHttpRequestResponse, IHttpRequestResult } from './http.models'; | ||
import { IHeader, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPatchQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions, IHttpRequestConfig, IHttpRequestResponse, IHttpRequestResult } from './http.models'; | ||
export declare function registerResponseInterceptor(instance: AxiosInstance, interceptor: (response: IHttpRequestResponse) => IHttpRequestResponse): void; | ||
@@ -7,2 +7,3 @@ export declare function registerRequestInterceptor(instance: AxiosInstance, interceptor: (config: IHttpRequestConfig) => IHttpRequestConfig): void; | ||
export declare function putCallback<TError>(instance: AxiosInstance, call: IHttpPutQueryCall<TError>, options: IHttpQueryOptions | undefined, callback: (response: IHttpRequestResult<AxiosResponse>) => void): void; | ||
export declare function patchCallback<TError>(instance: AxiosInstance, call: IHttpPatchQueryCall<TError>, options: IHttpQueryOptions | undefined, callback: (response: IHttpRequestResult<AxiosResponse>) => void): void; | ||
export declare function deleteCallback<TError>(instance: AxiosInstance, call: IHttpDeleteQueryCall<TError>, options: IHttpQueryOptions | undefined, callback: (response: IHttpRequestResult<AxiosResponse>) => void): void; | ||
@@ -9,0 +10,0 @@ export declare function postCallback<TError>(instance: AxiosInstance, call: IHttpPostQueryCall<TError>, options: IHttpQueryOptions | undefined, callback: (response: IHttpRequestResult<AxiosResponse>) => void): void; |
@@ -53,2 +53,20 @@ import { httpDebugger } from './http.debugger'; | ||
} | ||
export function patchCallback(instance, call, options, callback) { | ||
httpDebugger.debugStartHttpRequest(); | ||
var axiosPromise = instance.patch(call.url, call.body, { | ||
headers: getHeadersJson(options && options.headers ? options.headers : [], true), | ||
responseType: options && options.responseType ? options.responseType : undefined | ||
}); | ||
axiosPromise.then(function (response) { | ||
httpDebugger.debugResolveHttpRequest(); | ||
callback({ | ||
response: response | ||
}); | ||
}, function (error) { | ||
httpDebugger.debugFailedHttpRequest(); | ||
callback({ | ||
error: error | ||
}); | ||
}); | ||
} | ||
export function deleteCallback(instance, call, options, callback) { | ||
@@ -55,0 +73,0 @@ httpDebugger.debugStartHttpRequest(); |
export interface IBaseResponse<TRawData> { | ||
data: TRawData; | ||
headers: IHeader[]; | ||
response: any; | ||
status: number; | ||
} | ||
@@ -19,2 +21,5 @@ export interface IBaseResponseError<TError extends any> { | ||
} | ||
export interface IHttpPatchQueryCall<TError extends any> extends IHttpQueryCall<TError> { | ||
body: any; | ||
} | ||
export interface IHttpDeleteQueryCall<TError extends any> extends IHttpQueryCall<TError> { | ||
@@ -21,0 +26,0 @@ } |
import { Observable } from 'rxjs'; | ||
import { IBaseResponse, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions, IHttpRequestConfig, IHttpRequestResponse } from './http.models'; | ||
import { IBaseResponse, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions, IHttpRequestConfig, IHttpRequestResponse, IHttpPatchQueryCall } from './http.models'; | ||
import { IHttpService } from './ihttp.service'; | ||
@@ -22,6 +22,8 @@ export declare class HttpService implements IHttpService { | ||
put<TError extends any, TRawData extends any>(call: IHttpPutQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
patch<TError extends any, TRawData extends any>(call: IHttpPatchQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
delete<TError extends any, TRawData extends any>(call: IHttpDeleteQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
private mapAxiosObservable; | ||
private mapResult; | ||
private extractHeadersFromAxiosResponse; | ||
private promiseRetryWait; | ||
} |
@@ -71,2 +71,8 @@ import axios from 'axios'; | ||
}; | ||
HttpService.prototype.patch = function (call, options) { | ||
// bind callback from axios promise | ||
var axiosObservable = bindCallback(HttpFunctions.putCallback); | ||
// map axios observable | ||
return this.mapAxiosObservable(this.axiosInstance, axiosObservable, call, options); | ||
}; | ||
HttpService.prototype.delete = function (call, options) { | ||
@@ -88,3 +94,3 @@ // bind callback from axios promise | ||
if (options && options.logErrorToConsole) { | ||
console.warn("Kentico Kontent SDK encountered an error: ", error); | ||
console.error("Kentico Kontent Core SDK encountered an error: ", error); | ||
} | ||
@@ -108,5 +114,18 @@ return throwError({ | ||
data: result.response.data, | ||
response: result.response | ||
response: result.response, | ||
headers: this.extractHeadersFromAxiosResponse(result.response), | ||
status: result.response.status | ||
}; | ||
}; | ||
HttpService.prototype.extractHeadersFromAxiosResponse = function (response) { | ||
var headers = []; | ||
for (var _i = 0, _a = Object.keys(response.headers); _i < _a.length; _i++) { | ||
var headerKey = _a[_i]; | ||
headers.push({ | ||
header: headerKey, | ||
value: response.headers[headerKey] | ||
}); | ||
} | ||
return headers; | ||
}; | ||
HttpService.prototype.promiseRetryWait = function (ms) { | ||
@@ -113,0 +132,0 @@ return new Promise(function (r) { return setTimeout(r, ms); }); |
import { Observable } from 'rxjs'; | ||
import { IBaseResponse, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions } from './http.models'; | ||
import { IBaseResponse, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions, IHttpPatchQueryCall } from './http.models'; | ||
export interface IHttpService { | ||
@@ -11,3 +11,4 @@ retryPromise<T>(promise: Promise<T>, options: { | ||
put<TError extends any, TRawData extends any>(call: IHttpPutQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
patch<TError extends any, TRawData extends any>(call: IHttpPatchQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
delete<TError extends any, TRawData extends any>(call: IHttpDeleteQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
} |
import { Observable } from 'rxjs'; | ||
import { IBaseResponse, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions } from './http.models'; | ||
import { IBaseResponse, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPatchQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions } from './http.models'; | ||
import { IHttpService } from './ihttp.service'; | ||
@@ -21,3 +21,4 @@ export declare class TestHttpService implements IHttpService { | ||
put<TError extends any, TRawData extends any>(call: IHttpPutQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
patch<TError extends any, TRawData extends any>(call: IHttpPatchQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
delete<TError extends any, TRawData extends any>(call: IHttpDeleteQueryCall<TError>, options?: IHttpQueryOptions): Observable<IBaseResponse<TRawData>>; | ||
} |
@@ -23,3 +23,5 @@ import { of, throwError } from 'rxjs'; | ||
originalError: fakeError, | ||
mappedError: call.mapError(fakeError) | ||
mappedError: call.mapError(fakeError), | ||
headers: [], | ||
status: 200 | ||
}); | ||
@@ -30,3 +32,5 @@ } | ||
data: this.fakeResponseJson, | ||
response: undefined | ||
response: undefined, | ||
headers: [], | ||
status: 200 | ||
}); | ||
@@ -50,3 +54,5 @@ }; | ||
data: this.fakeResponseJson, | ||
response: undefined | ||
response: undefined, | ||
headers: [], | ||
status: 200 | ||
}); | ||
@@ -59,3 +65,3 @@ }; | ||
response: { | ||
data: this.errorJson | ||
data: this.errorJson, | ||
} | ||
@@ -74,2 +80,23 @@ }; | ||
}; | ||
TestHttpService.prototype.patch = function (call, options) { | ||
// throw kontent error | ||
if (this.throwError) { | ||
var fakeError = { | ||
response: { | ||
data: this.errorJson | ||
} | ||
}; | ||
return throwError({ | ||
originalError: fakeError, | ||
mappedError: call.mapError(fakeError) | ||
}); | ||
} | ||
// return fake response | ||
return of({ | ||
data: this.fakeResponseJson, | ||
response: undefined, | ||
headers: [], | ||
status: 200 | ||
}); | ||
}; | ||
TestHttpService.prototype.delete = function (call, options) { | ||
@@ -91,3 +118,5 @@ // throw kontent error | ||
data: this.fakeResponseJson, | ||
response: undefined | ||
response: undefined, | ||
headers: [], | ||
status: 200 | ||
}); | ||
@@ -94,0 +123,0 @@ }; |
export var sdkInfo = { | ||
host: 'npmjs.com', | ||
version: '2.0.0', | ||
version: '3.0.0', | ||
name: '@kentico/kontent-core' | ||
}; | ||
//# sourceMappingURL=sdk-info.generated.js.map |
@@ -1,62 +0,5 @@ | ||
## 1.7.1 (2019-08-06) | ||
# Changelog | ||
#### :rocket: Enhancement | ||
* [#230](https://github.com/Kentico/kentico-kontent-js/pull/230) Implements retryPromise method in TestHttpService to not throw exceptions if used externally ([@Enngage](https://github.com/Enngage)) | ||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. | ||
## 1.7.0 (2019-07-12) | ||
#### :rocket: Enhancement | ||
* [#198](https://github.com/Kentico/kentico-kontent-js/pull/198) Legacy browser support ([@Enngage](https://github.com/Enngage)) | ||
* Removes `Content-Type` header from `GET` requests (https://github.com/Kentico/kentico-kontent-js/commit/6544c88ea88c78be4390f9b194ca390e66c16df3) | ||
## 1.6.0 (2019-06-04) | ||
#### :rocket: Enhancement | ||
* [#196](https://github.com/Kentico/kentico-kontent-js/pull/196) Axios security update + dev dependency update + version patch ([@Enngage](https://github.com/Enngage)) | ||
#### Committers: 1 | ||
- Richard Sustek ([@Enngage](https://github.com/Enngage)) | ||
## delivery@6.0.0-beta.9 (2019-05-27) | ||
#### :rocket: Enhancement | ||
* `delivery` | ||
* [#188](https://github.com/Kentico/kentico-kontent-js/pull/188) Makes configuration of global headers function instead of static array ([@Enngage](https://github.com/Enngage)) | ||
## 1.5.0 (2019-05-27) | ||
#### :rocket: Enhancement | ||
* [#187](https://github.com/Kentico/kentico-kontent-js/pull/187) Isolates axios instance and implements http interceptors ([@Enngage](https://github.com/Enngage)) | ||
* [#185](https://github.com/Kentico/kentico-kontent-js/pull/185) updates dependencies ([@Enngage](https://github.com/Enngage)) | ||
## 1.4.5 (2019-04-04) | ||
#### :house: Internal | ||
* [#160](https://github.com/Kentico/kentico-kontent-js/pull/160) Adds ability to specify response type of HTTP call ([@Enngage](https://github.com/Enngage)) | ||
## 1.4.4 (2019-03-26) | ||
#### :rocket: Enhancement | ||
* [#151](https://github.com/Kentico/kentico-kontent-js/pull/151) Preserves original error when mapping to BaseKontentError ([@Enngage](https://github.com/Enngage)) | ||
## 1.4.3 (2019-02-26) | ||
#### :bug: Bug Fix | ||
* [#126](https://github.com/Kentico/kentico-kontent-js/pull/126) Stores current retry attempt to ensure correct timeout is used for retrying additional requests ([@Enngage](https://github.com/Enngage)) | ||
## 1.4.2 (2019-02-26) | ||
#### :bug: Bug Fix | ||
* [#123](https://github.com/Kentico/kentico-kontent-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-kontent-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-kontent-js/pull/121) Adds support for retrying Promises ([@Enngage](https://github.com/Enngage)) | ||
* [#112](https://github.com/Kentico/kentico-kontent-js/pull/112) Link test http service mention to the docs ([@Simply007](https://github.com/Simply007)) | ||
## [3.0.0](https://github.com///compare/v2.0.0...v3.0.0) (2019-10-14) |
{ | ||
"name": "@kentico/kontent-core", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Kentico/kentico-kontent-js/tree/master/packages/core" | ||
"url": "https://github.com/Kentico/kontent-core-js/tree/master" | ||
}, | ||
@@ -22,2 +22,3 @@ "private": false, | ||
"scripts": { | ||
"release": "npm run set-sdk-version && standard-version", | ||
"tsc-local": "./node_modules/.bin/tsc", | ||
@@ -58,29 +59,32 @@ "webpack-local": "./node_modules/.bin/webpack", | ||
"devDependencies": { | ||
"typescript": "3.5.3", | ||
"@types/jasmine": "3.3.13", | ||
"@types/node": "12.6.2", | ||
"rxjs": "6.5.2", | ||
"standard-version": "7.0.0", | ||
"typescript": "3.6.3", | ||
"@types/jasmine": "3.4.0", | ||
"@types/node": "12.7.5", | ||
"rxjs": "6.5.3", | ||
"colors": "1.3.3", | ||
"core-js": "3.1.4", | ||
"core-js": "3.2.1", | ||
"jasmine-core": "3.4.0", | ||
"jasmine-spec-reporter": "4.2.1", | ||
"karma": "4.2.0", | ||
"karma": "4.3.0", | ||
"karma-cli": "2.0.0", | ||
"karma-coverage": "1.1.2", | ||
"karma-coverage-istanbul-reporter": "2.0.5", | ||
"karma-typescript": "4.1.1", | ||
"karma-typescript-es6-transform": "4.1.1", | ||
"karma-coverage-istanbul-reporter": "2.1.0", | ||
"karma-jasmine": "2.0.1", | ||
"follow-redirects": "1.9.0", | ||
"karma-jasmine-html-reporter": "1.4.2", | ||
"karma-sourcemap-loader": "0.3.7", | ||
"karma-chrome-launcher": "3.0.0", | ||
"karma-chrome-launcher": "3.1.0", | ||
"karma-webpack": "4.0.2", | ||
"lcov-parse": "1.0.0", | ||
"mocha": "6.1.4", | ||
"ts-loader": "6.0.4", | ||
"ts-node": "8.3.0", | ||
"tslint": "5.18.0", | ||
"mocha": "6.2.0", | ||
"ts-loader": "6.1.0", | ||
"ts-node": "8.4.1", | ||
"tslint": "5.20.0", | ||
"url-parse": "1.4.7", | ||
"webpack": "4.35.3", | ||
"webpack-cli": "3.3.6", | ||
"webpack-bundle-analyzer": "3.3.2" | ||
"webpack": "4.40.2", | ||
"webpack-cli": "3.3.9", | ||
"webpack-bundle-analyzer": "3.5.0" | ||
} | ||
} |
[![CircleCI](https://circleci.com/gh/Kentico/kentico-kontent-js/tree/master.svg?style=svg)](https://circleci.com/gh/Kentico/kentico-kontent-js/tree/master) | ||
[![npm version](https://badge.fury.io/js/%40kentico%2Fkontent-core.svg)](https://badge.fury.io/js/%40kentico%2Fkontent-core) | ||
[![Build Status](https://api.travis-ci.com/Kentico/kontent-core-js.svg?branch=master)](https://travis-ci.com/Kentico/kontent-core-js) | ||
[![CircleCI](https://circleci.com/gh/Kentico/kontent-core-js/tree/master.svg?style=svg)](https://circleci.com/gh/Kentico/kontent-core-js/tree/master) | ||
[![npm](https://img.shields.io/npm/dt/@kentico/kontent-core.svg)](https://www.npmjs.com/package/@kentico/kontent-core) | ||
[![Known Vulnerabilities](https://snyk.io/test/github/Kentico/kontent-core-js/badge.svg)](https://snyk.io/test/github/kentico/kontent-core-js) | ||
[![GitHub license](https://img.shields.io/github/license/Kentico/kontent-core-js.svg)](https://github.com/Kentico/kontent-core-js) | ||
[![](https://data.jsdelivr.com/v1/package/npm/@kentico/kontent-core/badge)](https://www.jsdelivr.com/package/npm/@kentico/kontent-core) | ||
# Core package | ||
@@ -5,0 +12,0 @@ |
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
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 not supported yet
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 not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
889262
165
12200
21
29