Repository URL to install this package:
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("web-console-core"),require("@angular/core"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("@wa-motif-open-api/log-service",["exports","web-console-core","@angular/core","@angular/common/http"],e):e((t["wa-motif-open-api"]=t["wa-motif-open-api"]||{},t["wa-motif-open-api"]["log-service"]={}),t.WebConsoleCore,t.ng.core,t.ng.common.http)}(this,function(t,e,o,a){"use strict";var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)};var i,c=(function v(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}(r,i=a.HttpUrlEncodingCodec),r.prototype.encodeKey=function(t){return(t=i.prototype.encodeKey.call(this,t)).replace(/\+/gi,"%2B")},r.prototype.encodeValue=function(t){return(t=i.prototype.encodeValue.call(this,t)).replace(/\+/gi,"%2B")},r);function r(){return null!==i&&i.apply(this,arguments)||this}var s=(u.prototype.selectHeaderContentType=function(t){var e=this;if(0===t.length)return undefined;var o=t.find(function(t){return e.isJsonMime(t)});return o===undefined?t[0]:o},u.prototype.selectHeaderAccept=function(t){var e=this;if(0===t.length)return undefined;var o=t.find(function(t){return e.isJsonMime(t)});return o===undefined?t[0]:o},u.prototype.isJsonMime=function(t){var e=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==t&&(e.test(t)||"application/json-patch+json"===t.toLowerCase())},u);function u(t){void 0===t&&(t={}),this.apiKeys=t.apiKeys,this.username=t.username,this.password=t.password,this.accessToken=t.accessToken,this.basePath=t.basePath,this.withCredentials=t.withCredentials}var p=(f.prototype.canConsumeForm=function(t){var e,o;try{for(var n=function r(t){var e="function"==typeof Symbol&&t[Symbol.iterator],o=0;return e?e.call(t):{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}}}(t),i=n.next();!i.done;i=n.next())if("multipart/form-data"===i.value)return!0}catch(s){e={error:s}}finally{try{i&&!i.done&&(o=n["return"])&&o.call(n)}finally{if(e)throw e.error}}return!1},f.prototype.downloadCurrentLog=function(t,e){void 0===t&&(t="body"),void 0===e&&(e=!1);var o=this.defaultHeaders;if((this.configuration.username||this.configuration.password)&&(o=o.set("Authorization","Basic "+btoa(this.configuration.username+":"+this.configuration.password))),this.configuration.accessToken){var n="function"==typeof this.configuration.accessToken?this.configuration.accessToken():this.configuration.accessToken;o=o.set("Authorization","Bearer "+n)}var i=this.configuration.selectHeaderAccept(["application/zip","application/json"]);return i!==undefined&&(o=o.set("Accept",i)),this.httpClient.get(this.configuration.basePath+"/logs/current",{responseType:"blob",withCredentials:this.configuration.withCredentials,headers:o,observe:t,reportProgress:e})},f.prototype.getComponentLogLevel=function(t,e,o){if(void 0===e&&(e="body"),void 0===o&&(o=!1),null===t||t===undefined)throw new Error("Required parameter component was null or undefined when calling getComponentLogLevel.");var n=this.defaultHeaders;if((this.configuration.username||this.configuration.password)&&(n=n.set("Authorization","Basic "+btoa(this.configuration.username+":"+this.configuration.password))),this.configuration.accessToken){var i="function"==typeof this.configuration.accessToken?this.configuration.accessToken():this.configuration.accessToken;n=n.set("Authorization","Bearer "+i)}var r=this.configuration.selectHeaderAccept(["application/json"]);return r!==undefined&&(n=n.set("Accept",r)),this.httpClient.get(this.configuration.basePath+"/logs/components/"+encodeURIComponent(String(t))+"/level",{withCredentials:this.configuration.withCredentials,headers:n,observe:e,reportProgress:o})},f.prototype.getDefaultComponentLogLevel=function(t,e){void 0===t&&(t="body"),void 0===e&&(e=!1);var o=this.defaultHeaders;if((this.configuration.username||this.configuration.password)&&(o=o.set("Authorization","Basic "+btoa(this.configuration.username+":"+this.configuration.password))),this.configuration.accessToken){var n="function"==typeof this.configuration.accessToken?this.configuration.accessToken():this.configuration.accessToken;o=o.set("Authorization","Bearer "+n)}var i=this.configuration.selectHeaderAccept(["application/json"]);return i!==undefined&&(o=o.set("Accept",i)),this.httpClient.get(this.configuration.basePath+"/logs/components/level",{withCredentials:this.configuration.withCredentials,headers:o,observe:t,reportProgress:e})},f.prototype.getRootLogLevel=function(t,e){void 0===t&&(t="body"),void 0===e&&(e=!1);var o=this.defaultHeaders;if((this.configuration.username||this.configuration.password)&&(o=o.set("Authorization","Basic "+btoa(this.configuration.username+":"+this.configuration.password))),this.configuration.accessToken){var n="function"==typeof this.configuration.accessToken?this.configuration.accessToken():this.configuration.accessToken;o=o.set("Authorization","Bearer "+n)}var i=this.configuration.selectHeaderAccept(["application/json"]);return i!==undefined&&(o=o.set("Accept",i)),this.httpClient.get(this.configuration.basePath+"/logs/root/level",{withCredentials:this.configuration.withCredentials,headers:o,observe:t,reportProgress:e})},f.prototype.setComponentLogLevel=function(t,e,o,n){if(void 0===o&&(o="body"),void 0===n&&(n=!1),null===t||t===undefined)throw new Error("Required parameter component was null or undefined when calling setComponentLogLevel.");var i=this.defaultHeaders;if((this.configuration.username||this.configuration.password)&&(i=i.set("Authorization","Basic "+btoa(this.configuration.username+":"+this.configuration.password))),this.configuration.accessToken){var r="function"==typeof this.configuration.accessToken?this.configuration.accessToken():this.configuration.accessToken;i=i.set("Authorization","Bearer "+r)}var s=this.configuration.selectHeaderAccept(["application/json"]);s!==undefined&&(i=i.set("Accept",s));var a=this.configuration.selectHeaderContentType(["application/json"]);return a!==undefined&&(i=i.set("Content-Type",a)),this.httpClient.put(this.configuration.basePath+"/logs/components/"+encodeURIComponent(String(t))+"/level",e,{withCredentials:this.configuration.withCredentials,headers:i,observe:o,reportProgress:n})},f.prototype.setDefaultComponentLogLevel=function(t,e,o){void 0===e&&(e="body"),void 0===o&&(o=!1);var n=this.defaultHeaders;if((this.configuration.username||this.configuration.password)&&(n=n.set("Authorization","Basic "+btoa(this.configuration.username+":"+this.configuration.password))),this.configuration.accessToken){var i="function"==typeof this.configuration.accessToken?this.configuration.accessToken():this.configuration.accessToken;n=n.set("Authorization","Bearer "+i)}var r=this.configuration.selectHeaderAccept(["application/json"]);r!==undefined&&(n=n.set("Accept",r));var s=this.configuration.selectHeaderContentType(["application/json"]);return s!==undefined&&(n=n.set("Content-Type",s)),this.httpClient.put(this.configuration.basePath+"/logs/components/level",t,{withCredentials:this.configuration.withCredentials,headers:n,observe:e,reportProgress:o})},f.prototype.setRootLogLevel=function(t,e,o){void 0===e&&(e="body"),void 0===o&&(o=!1);var n=this.defaultHeaders;if((this.configuration.username||this.configuration.password)&&(n=n.set("Authorization","Basic "+btoa(this.configuration.username+":"+this.configuration.password))),this.configuration.accessToken){var i="function"==typeof this.configuration.accessToken?this.configuration.accessToken():this.configuration.accessToken;n=n.set("Authorization","Bearer "+i)}var r=this.configuration.selectHeaderAccept(["application/json"]);r!==undefined&&(n=n.set("Accept",r));var s=this.configuration.selectHeaderContentType(["application/json"]);return s!==undefined&&(n=n.set("Content-Type",s)),this.httpClient.put(this.configuration.basePath+"/logs/root/level",t,{withCredentials:this.configuration.withCredentials,headers:n,observe:e,reportProgress:o})},f.prototype.tailCurrentLog=function(t,e,o){if(void 0===e&&(e="body"),void 0===o&&(o=!1),null===t||t===undefined)throw new Error("Required parameter lines was null or undefined when calling tailCurrentLog.");var n=new a.HttpParams({encoder:new c});t!==undefined&&null!==t&&(n=n.set("lines",t));var i=this.defaultHeaders;if((this.configuration.username||this.configuration.password)&&(i=i.set("Authorization","Basic "+btoa(this.configuration.username+":"+this.configuration.password))),this.configuration.accessToken){var r="function"==typeof this.configuration.accessToken?this.configuration.accessToken():this.configuration.accessToken;i=i.set("Authorization","Bearer "+r)}var s=this.configuration.selectHeaderAccept(["application/json"]);return s!==undefined&&(i=i.set("Accept",s)),this.httpClient.get(this.configuration.basePath+"/logs/current/tail",{params:n,withCredentials:this.configuration.withCredentials,headers:i,observe:e,reportProgress:o})},f.decorators=[{type:o.Injectable,args:[{providedIn:"root"}]}],f.ctorParameters=function(){return[{type:a.HttpClient},{type:String,decorators:[{type:o.Optional},{type:o.Inject,args:[e.WC_API_BASE_PATH]}]},{type:s,decorators:[{type:o.Optional}]}]},f.ngInjectableDef=o.defineInjectable({factory:function(){return new f(o.inject(a.HttpClient),o.inject(e.WC_API_BASE_PATH,8),o.inject(s,8))},token:f,providedIn:"root"}),f);function f(t,e,o){this.httpClient=t,this.basePath="http://localhost:8080/rest/v2",this.defaultHeaders=new a.HttpHeaders,this.configuration=new s,o?(this.configuration=o,this.configuration.basePath=o.basePath||e||this.basePath):this.configuration.basePath=e||this.basePath}var h=[p],d=new o.InjectionToken("basePath"),l=(g.forRoot=function(t){return{ngModule:g,providers:[{provide:s,useFactory:t}]}},g.decorators=[{type:o.NgModule,args:[{imports:[],declarations:[],exports:[],providers:[p]}]}],g.ctorParameters=function(){return[{type:g,decorators:[{type:o.Optional},{type:o.SkipSelf}]},{type:a.HttpClient,decorators:[{type:o.Optional}]}]},g);function g(t,e){if(t)throw new Error("LogServiceModule is already loaded. Import in your base AppModule only.");if(!e)throw new Error("You need to import the HttpClientModule in your AppModule! \nSee also https://github.com/angular/angular/issues/20575")}t.APIS=h,t.LogService=p,t.BASE_PATH=d,t.COLLECTION_FORMATS={csv:",",tsv:" ",ssv:" ",pipes:"|"},t.Configuration=s,t.LogServiceModule=l,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=wa-motif-open-api-log-service.umd.min.js.map