Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

vipera-npm-registry / @wa-motif-open-api/backend-controller-service   js

Repository URL to install this package:

Version: 0.6.0 

/ bundles / wa-motif-open-api-backend-controller-service.umd.min.js

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("web-console-core"),require("@angular/core"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("@wa-motif-open-api/backend-controller-service",["exports","web-console-core","@angular/core","@angular/common/http"],t):t((e["wa-motif-open-api"]=e["wa-motif-open-api"]||{},e["wa-motif-open-api"]["backend-controller-service"]={}),e.WebConsoleCore,e.ng.core,e.ng.common.http)}(this,function(e,t,n,o){"use strict";var i=(r.prototype.selectHeaderContentType=function(e){var t=this;if(0===e.length)return undefined;var n=e.find(function(e){return t.isJsonMime(e)});return n===undefined?e[0]:n},r.prototype.selectHeaderAccept=function(e){var t=this;if(0===e.length)return undefined;var n=e.find(function(e){return t.isJsonMime(e)});return n===undefined?e[0]:n},r.prototype.isJsonMime=function(e){var t=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==e&&(t.test(e)||"application/json-patch+json"===e.toLowerCase())},r);function r(e){void 0===e&&(e={}),this.apiKeys=e.apiKeys,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.withCredentials=e.withCredentials}var a=(s.prototype.canConsumeForm=function(e){var t,n;try{for(var o=function r(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}(e),i=o.next();!i.done;i=o.next())if("multipart/form-data"===i.value)return!0}catch(a){t={error:a}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(t)throw t.error}}return!1},s.prototype.blockUser=function(e,t,n,o){if(void 0===n&&(n="body"),void 0===o&&(o=!1),null===e||e===undefined)throw new Error("Required parameter domain was null or undefined when calling blockUser.");if(null===t||t===undefined)throw new Error("Required parameter userId was null or undefined when calling blockUser.");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 a=this.configuration.selectHeaderAccept(["application/json"]);return a!==undefined&&(i=i.set("Accept",a)),this.httpClient.post(this.configuration.basePath+"/bectrl/domains/"+encodeURIComponent(String(e))+"/users/"+encodeURIComponent(String(t))+"/block",null,{withCredentials:this.configuration.withCredentials,headers:i,observe:n,reportProgress:o})},s.prototype.createUser=function(e,t,n,o){if(void 0===n&&(n="body"),void 0===o&&(o=!1),null===e||e===undefined)throw new Error("Required parameter domain was null or undefined when calling createUser.");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 a=this.configuration.selectHeaderAccept(["application/json"]);a!==undefined&&(i=i.set("Accept",a));var s=this.configuration.selectHeaderContentType(["application/json"]);return s!==undefined&&(i=i.set("Content-Type",s)),this.httpClient.post(this.configuration.basePath+"/bectrl/domains/"+encodeURIComponent(String(e))+"/users",t,{withCredentials:this.configuration.withCredentials,headers:i,observe:n,reportProgress:o})},s.prototype.reactivateUser=function(e,t,n,o){if(void 0===n&&(n="body"),void 0===o&&(o=!1),null===e||e===undefined)throw new Error("Required parameter domain was null or undefined when calling reactivateUser.");if(null===t||t===undefined)throw new Error("Required parameter userId was null or undefined when calling reactivateUser.");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 a=this.configuration.selectHeaderAccept(["application/json"]);return a!==undefined&&(i=i.set("Accept",a)),this.httpClient.post(this.configuration.basePath+"/bectrl/domains/"+encodeURIComponent(String(e))+"/users/"+encodeURIComponent(String(t))+"/reactivate",null,{withCredentials:this.configuration.withCredentials,headers:i,observe:n,reportProgress:o})},s.prototype.updateUser=function(e,t,n,o,i){if(void 0===o&&(o="body"),void 0===i&&(i=!1),null===e||e===undefined)throw new Error("Required parameter domain was null or undefined when calling updateUser.");if(null===t||t===undefined)throw new Error("Required parameter userId was null or undefined when calling updateUser.");var r=this.defaultHeaders;if((this.configuration.username||this.configuration.password)&&(r=r.set("Authorization","Basic "+btoa(this.configuration.username+":"+this.configuration.password))),this.configuration.accessToken){var a="function"==typeof this.configuration.accessToken?this.configuration.accessToken():this.configuration.accessToken;r=r.set("Authorization","Bearer "+a)}var s=this.configuration.selectHeaderAccept(["application/json"]);s!==undefined&&(r=r.set("Accept",s));var c=this.configuration.selectHeaderContentType(["application/json"]);return c!==undefined&&(r=r.set("Content-Type",c)),this.httpClient.put(this.configuration.basePath+"/bectrl/domains/"+encodeURIComponent(String(e))+"/users/"+encodeURIComponent(String(t)),n,{withCredentials:this.configuration.withCredentials,headers:r,observe:o,reportProgress:i})},s.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],s.ctorParameters=function(){return[{type:o.HttpClient},{type:String,decorators:[{type:n.Optional},{type:n.Inject,args:[t.WC_API_BASE_PATH]}]},{type:i,decorators:[{type:n.Optional}]}]},s.ngInjectableDef=n.defineInjectable({factory:function(){return new s(n.inject(o.HttpClient),n.inject(t.WC_API_BASE_PATH,8),n.inject(i,8))},token:s,providedIn:"root"}),s);function s(e,t,n){this.httpClient=e,this.basePath="http://localhost:8080/rest/v2",this.defaultHeaders=new o.HttpHeaders,this.configuration=new i,n?(this.configuration=n,this.configuration.basePath=n.basePath||t||this.basePath):this.configuration.basePath=t||this.basePath}var c=[a],u=new n.InjectionToken("basePath"),d=(l.forRoot=function(e){return{ngModule:l,providers:[{provide:i,useFactory:e}]}},l.decorators=[{type:n.NgModule,args:[{imports:[],declarations:[],exports:[],providers:[a]}]}],l.ctorParameters=function(){return[{type:l,decorators:[{type:n.Optional},{type:n.SkipSelf}]},{type:o.HttpClient,decorators:[{type:n.Optional}]}]},l);function l(e,t){if(e)throw new Error("BackendControllerServiceModule is already loaded. Import in your base AppModule only.");if(!t)throw new Error("You need to import the HttpClientModule in your AppModule! \nSee also https://github.com/angular/angular/issues/20575")}e.APIS=c,e.BackendctrlService=a,e.BASE_PATH=u,e.COLLECTION_FORMATS={csv:",",tsv:"   ",ssv:" ",pipes:"|"},e.Configuration=i,e.BackendControllerServiceModule=d,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=wa-motif-open-api-backend-controller-service.umd.min.js.map