@aurigma/ng-backoffice-api-client
Version:
Angular API Client for BackOffice API service of Customer's Canvas web-to-print system.
1 lines • 94.5 kB
JavaScript
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@angular/core"),require("rxjs/operators"),require("rxjs"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("@aurigma/ng-backoffice-api-client",["exports","@angular/core","rxjs/operators","rxjs","@angular/common/http"],r):r(((e="undefined"!=typeof globalThis?globalThis:e||self).aurigma=e.aurigma||{},e.aurigma["ng-backoffice-api-client"]={}),e.ng.core,e.rxjs.operators,e.rxjs,e.ng.common.http)}(this,(function(e,r,n,t,o){"use strict";var p=function(e,r){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])})(e,r)};function a(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}p(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}function i(e,r,n,t){return new(n||(n=Promise))((function(o,p){function a(e){try{s(t.next(e))}catch(e){p(e)}}function i(e){try{s(t.throw(e))}catch(e){p(e)}}function s(e){var r;e.done?o(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(a,i)}s((t=t.apply(e,r||[])).next())}))}function s(e,r){var n,t,o,p={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=i(0),a.throw=i(1),a.return=i(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,i[0]&&(p=0)),p;)try{if(n=1,t&&(o=2&i[0]?t.return:i[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,i[1])).done)return o;switch(t=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return p.label++,{value:i[1],done:!1};case 5:p.label++,t=i[1],i=[0];continue;case 7:i=p.ops.pop(),p.trys.pop();continue;default:if(!(o=p.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){p=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){p.label=i[1];break}if(6===i[0]&&p.label<o[1]){p.label=o[1],o=i;break}if(o&&p.label<o[2]){p.label=o[2],p.ops.push(i);break}o[2]&&p.ops.pop(),p.trys.pop();continue}i=r.call(e,p)}catch(e){i=[6,e],t=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function u(e){var r="function"==typeof Symbol&&Symbol.iterator,n=r&&e[r],t=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;"function"==typeof SuppressedError&&SuppressedError;var c=new r.InjectionToken("API_BASE_URL"),f=function(){function e(){this.apiKey="ApiKey",this.authorizationToken=null}return e.prototype.getAuthorizationToken=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.authorizationToken]}))}))},e.prototype.setAuthorizationToken=function(e){this.authorizationToken=e},e}(),l=function(){function e(e){this.configuration=e}return e.prototype.transformOptions=function(e){return i(this,void 0,void 0,(function(){var r;return s(this,(function(n){switch(n.label){case 0:return[4,this.configuration.getAuthorizationToken()];case 1:return r=n.sent(),e.headers=null!=r?e.headers.append("authorization","Bearer "+r):e.headers.append("X-API-Key",this.configuration.apiKey),[2,e]}}))}))},e.prototype.getBaseUrl=function(e){return this.configuration.apiUrl},e.prototype.transformResult=function(e,r,n){return n(r)},e}(),d=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return a(r,e),r.prototype.headInfo=function(){var e=this,r=this.baseUrl+"/api/backoffice/v1/info";r=r.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return t.from(this.transformOptions(p)).pipe(n.mergeMap((function(n){return e.http.request("head",r,n)}))).pipe(n.mergeMap((function(n){return e.transformResult(r,n,(function(r){return e.processHeadInfo(r)}))}))).pipe(n.catchError((function(n){if(!(n instanceof o.HttpResponseBase))return t.throwError(n);try{return e.transformResult(r,n,(function(r){return e.processHeadInfo(r)}))}catch(e){return t.throwError(e)}})))},r.prototype.processHeadInfo=function(e){var r,p,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,s={};if(e.headers)try{for(var c=u(e.headers.keys()),f=c.next();!f.done;f=c.next()){var l=f.value;s[l]=e.headers.get(l)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=c.return)&&p.call(c)}finally{if(r)throw r.error}}return 200===a?E(i).pipe(n.mergeMap((function(e){return t.of(null)}))):200!==a&&204!==a?E(i).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",a,e,s)}))):t.of(null)},r.prototype.getInfo=function(){var e=this,r=this.baseUrl+"/api/backoffice/v1/info";r=r.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(p)).pipe(n.mergeMap((function(n){return e.http.request("get",r,n)}))).pipe(n.mergeMap((function(n){return e.transformResult(r,n,(function(r){return e.processGetInfo(r)}))}))).pipe(n.catchError((function(n){if(!(n instanceof o.HttpResponseBase))return t.throwError(n);try{return e.transformResult(r,n,(function(r){return e.processGetInfo(r)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetInfo=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),t.of(r)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r}(l);d.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new d(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:d,providedIn:"root"}),d.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],d.ctorParameters=function(){return[{type:f,decorators:[{type:r.Inject,args:[f]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var m=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return a(r,e),r.prototype.getAll=function(e,r,p,a,i,s,u,c,f,l,d,m,h){var v=this,y=this.baseUrl+"/api/backoffice/v1/product-references?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");y+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(y+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=a&&(y+="productId="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="productLinkId="+encodeURIComponent(""+i)+"&"),null!=s&&(y+="skip="+encodeURIComponent(""+s)+"&"),null!=u&&(y+="take="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="sorting="+encodeURIComponent(""+c)+"&"),null!=f&&(y+="search="+encodeURIComponent(""+f)+"&"),null!=l&&(y+="sku="+encodeURIComponent(""+l)+"&"),null!=d&&d&&d.forEach((function(e){y+="tags="+encodeURIComponent(""+e)+"&"})),null!=m&&(y+="customFields="+encodeURIComponent(""+m)+"&"),null!=h&&(y+="tenantId="+encodeURIComponent(""+h)+"&"),y=y.replace(/[?&]$/,"");var g={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(g)).pipe(n.mergeMap((function(e){return v.http.request("get",y,e)}))).pipe(n.mergeMap((function(e){return v.transformResult(y,e,(function(e){return v.processGetAll(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return v.transformResult(y,e,(function(e){return v.processGetAll(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),t.of(r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.create=function(e,r,p){var a=this,i=this.baseUrl+"/api/backoffice/v1/product-references?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");i+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(i+="tenantId="+encodeURIComponent(""+r)+"&"),i=i.replace(/[?&]$/,"");var s={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return a.http.request("post",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processCreate(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processCreate(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processCreate=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 201===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),t.of(r)}))):404===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Not Found",i,e,c,r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.get=function(e,r,p){var a=this,i=this.baseUrl+"/api/backoffice/v1/product-references/{reference}?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(i=i.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");i+="storefrontId="+encodeURIComponent(""+r)+"&",null!=p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return a.http.request("get",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processGet(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processGet(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGet=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),t.of(r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):404===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Not Found",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.delete=function(e,r,p){var a=this,i=this.baseUrl+"/api/backoffice/v1/product-references/{reference}?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(i=i.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");i+="storefrontId="+encodeURIComponent(""+r)+"&",null!=p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return a.http.request("delete",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processDelete(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processDelete(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processDelete=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),t.of(r)}))):404===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Not Found",i,e,c,r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r}(l);m.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new m(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:m,providedIn:"root"}),m.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],m.ctorParameters=function(){return[{type:f,decorators:[{type:r.Inject,args:[f]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var h=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return a(r,e),r.prototype.getAllProducts=function(e,r,p,a,i,s,u,c){var f=this,l=this.baseUrl+"/api/backoffice/v1/products?";null!=e&&(l+="skip="+encodeURIComponent(""+e)+"&"),null!=r&&(l+="take="+encodeURIComponent(""+r)+"&"),null!=p&&(l+="sorting="+encodeURIComponent(""+p)+"&"),null!=a&&(l+="search="+encodeURIComponent(""+a)+"&"),null!=i&&(l+="sku="+encodeURIComponent(""+i)+"&"),null!=s&&s&&s.forEach((function(e){l+="tags="+encodeURIComponent(""+e)+"&"})),null!=u&&(l+="customFields="+encodeURIComponent(""+u)+"&"),null!=c&&(l+="tenantId="+encodeURIComponent(""+c)+"&"),l=l.replace(/[?&]$/,"");var d={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(d)).pipe(n.mergeMap((function(e){return f.http.request("get",l,e)}))).pipe(n.mergeMap((function(e){return f.transformResult(l,e,(function(e){return f.processGetAllProducts(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return f.transformResult(l,e,(function(e){return f.processGetAllProducts(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProducts=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),t.of(r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.createProduct=function(e,r){var p=this,a=this.baseUrl+"/api/backoffice/v1/products?";null!=e&&(a+="tenantId="+encodeURIComponent(""+e)+"&"),a=a.replace(/[?&]$/,"");var i={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processCreateProduct(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processCreateProduct(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processCreateProduct=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),t.of(r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.getProduct=function(e,r,p){var a=this,i=this.baseUrl+"/api/backoffice/v1/products/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return a.http.request("get",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processGetProduct(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processGetProduct(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProduct=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),t.of(r)}))):404===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Not Found",i,e,c,r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.deleteProduct=function(e,r){var p=this,a=this.baseUrl+"/api/backoffice/v1/products/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return p.http.request("delete",a,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processDeleteProduct(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processDeleteProduct(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processDeleteProduct=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){return t.of(null)}))):404===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Not Found",i,e,c,r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.getProductOptions=function(e,r,p){var a=this,i=this.baseUrl+"/api/backoffice/v1/products/{id}/options?";if(null==e)throw new Error("The parameter 'id' must be defined.");i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return a.http.request("get",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processGetProductOptions(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processGetProductOptions(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductOptions=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),t.of(r)}))):404===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Not Found",i,e,c,r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.getProductVariants=function(e,r,p,a,i,s,u,c,f){var l=this,d=this.baseUrl+"/api/backoffice/v1/products/{id}/variants?";if(null==e)throw new Error("The parameter 'id' must be defined.");d=d.replace("{id}",encodeURIComponent(""+e)),null!=r&&(d+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(d+="skip="+encodeURIComponent(""+p)+"&"),null!=a&&(d+="take="+encodeURIComponent(""+a)+"&"),null!=i&&(d+="options="+encodeURIComponent(""+i)+"&"),null!=s&&(d+="productFilterId="+encodeURIComponent(""+s)+"&"),null!=u&&(d+="takeAvailableOnly="+encodeURIComponent(""+u)+"&"),null!=c&&(d+="sku="+encodeURIComponent(""+c)+"&"),null!=f&&(d+="tenantId="+encodeURIComponent(""+f)+"&"),d=d.replace(/[?&]$/,"");var m={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(m)).pipe(n.mergeMap((function(e){return l.http.request("get",d,e)}))).pipe(n.mergeMap((function(e){return l.transformResult(d,e,(function(e){return l.processGetProductVariants(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return l.transformResult(d,e,(function(e){return l.processGetProductVariants(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductVariants=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),t.of(r)}))):404===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Not Found",i,e,c,r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.getProductVariant=function(e,r,p,a){var i=this,s=this.baseUrl+"/api/backoffice/v1/products/{id}/variants/{productVariantId}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'productVariantId' must be defined.");s=s.replace("{productVariantId}",encodeURIComponent(""+r)),null!=p&&(s+="productVersionId="+encodeURIComponent(""+p)+"&"),null!=a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(u)).pipe(n.mergeMap((function(e){return i.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return i.transformResult(s,e,(function(e){return i.processGetProductVariant(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return i.transformResult(s,e,(function(e){return i.processGetProductVariant(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductVariant=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),t.of(r)}))):404===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Not Found",i,e,c,r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.getProductVariantDesigns=function(e,r,p,a,i,s,u,c,f,l,d,m,h){var v=this,y=this.baseUrl+"/api/backoffice/v1/products/{id}/variant-designs?";if(null==e)throw new Error("The parameter 'id' must be defined.");y=y.replace("{id}",encodeURIComponent(""+e)),null!=r&&(y+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="productVariantId="+encodeURIComponent(""+p)+"&"),null!=a&&(y+="search="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="designCustomFields="+encodeURIComponent(""+i)+"&"),null!=s&&(y+="designPath="+encodeURIComponent(""+s)+"&"),null!=u&&(y+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="take="+encodeURIComponent(""+c)+"&"),null!=f&&(y+="options="+encodeURIComponent(""+f)+"&"),null!=l&&(y+="productFilterId="+encodeURIComponent(""+l)+"&"),null!=d&&(y+="takeAvailableOnly="+encodeURIComponent(""+d)+"&"),null!=m&&(y+="sku="+encodeURIComponent(""+m)+"&"),null!=h&&(y+="tenantId="+encodeURIComponent(""+h)+"&"),y=y.replace(/[?&]$/,"");var g={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(g)).pipe(n.mergeMap((function(e){return v.http.request("get",y,e)}))).pipe(n.mergeMap((function(e){return v.transformResult(y,e,(function(e){return v.processGetProductVariantDesigns(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return v.transformResult(y,e,(function(e){return v.processGetProductVariantDesigns(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductVariantDesigns=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),t.of(r)}))):404===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Not Found",i,e,c,r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.getProductVariantMockups=function(e,r,p,a,i,s,u,c,f,l,d,m,h){var v=this,y=this.baseUrl+"/api/backoffice/v1/products/{id}/variant-mockups?";if(null==e)throw new Error("The parameter 'id' must be defined.");y=y.replace("{id}",encodeURIComponent(""+e)),null!=r&&(y+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="productVariantId="+encodeURIComponent(""+p)+"&"),null!=a&&(y+="search="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="mockupCustomFields="+encodeURIComponent(""+i)+"&"),null!=s&&(y+="mockupPath="+encodeURIComponent(""+s)+"&"),null!=u&&(y+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="take="+encodeURIComponent(""+c)+"&"),null!=f&&(y+="options="+encodeURIComponent(""+f)+"&"),null!=l&&(y+="productFilterId="+encodeURIComponent(""+l)+"&"),null!=d&&(y+="takeAvailableOnly="+encodeURIComponent(""+d)+"&"),null!=m&&(y+="sku="+encodeURIComponent(""+m)+"&"),null!=h&&(y+="tenantId="+encodeURIComponent(""+h)+"&"),y=y.replace(/[?&]$/,"");var g={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(g)).pipe(n.mergeMap((function(e){return v.http.request("get",y,e)}))).pipe(n.mergeMap((function(e){return v.transformResult(y,e,(function(e){return v.processGetProductVariantMockups(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return v.transformResult(y,e,(function(e){return v.processGetProductVariantMockups(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductVariantMockups=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),t.of(r)}))):404===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Not Found",i,e,c,r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.getProductVariantDocuments=function(e,r,p,a,i,s,u,c,f,l,d,m,h){var v=this,y=this.baseUrl+"/api/backoffice/v1/products/{id}/variant-documents?";if(null==e)throw new Error("The parameter 'id' must be defined.");y=y.replace("{id}",encodeURIComponent(""+e)),null!=r&&(y+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="productVariantId="+encodeURIComponent(""+p)+"&"),null!=a&&(y+="search="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="documentCustomFields="+encodeURIComponent(""+i)+"&"),null!=s&&(y+="documentPath="+encodeURIComponent(""+s)+"&"),null!=u&&(y+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="take="+encodeURIComponent(""+c)+"&"),null!=f&&(y+="options="+encodeURIComponent(""+f)+"&"),null!=l&&(y+="productFilterId="+encodeURIComponent(""+l)+"&"),null!=d&&(y+="takeAvailableOnly="+encodeURIComponent(""+d)+"&"),null!=m&&(y+="sku="+encodeURIComponent(""+m)+"&"),null!=h&&(y+="tenantId="+encodeURIComponent(""+h)+"&"),y=y.replace(/[?&]$/,"");var g={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(g)).pipe(n.mergeMap((function(e){return v.http.request("get",y,e)}))).pipe(n.mergeMap((function(e){return v.transformResult(y,e,(function(e){return v.processGetProductVariantDocuments(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return v.transformResult(y,e,(function(e){return v.processGetProductVariantDocuments(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductVariantDocuments=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),t.of(r)}))):404===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Not Found",i,e,c,r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.setProductVariantPrice=function(e,r,p){var a=this,i=this.baseUrl+"/api/backoffice/v1/products/{id}/set-variant-price?";if(null==e)throw new Error("The parameter 'id' must be defined.");i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="tenantId="+encodeURIComponent(""+r)+"&"),i=i.replace(/[?&]$/,"");var s={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return a.http.request("post",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processSetProductVariantPrice(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processSetProductVariantPrice(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processSetProductVariantPrice=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){return t.of(null)}))):404===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Not Found",i,e,c,r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.setProductVariantAvailability=function(e,r,p){var a=this,i=this.baseUrl+"/api/backoffice/v1/products/{id}/set-variant-availability?";if(null==e)throw new Error("The parameter 'id' must be defined.");i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="tenantId="+encodeURIComponent(""+r)+"&"),i=i.replace(/[?&]$/,"");var s={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return a.http.request("post",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processSetProductVariantAvailability(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processSetProductVariantAvailability(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processSetProductVariantAvailability=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){return t.of(null)}))):404===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Not Found",i,e,c,r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.setProductVariantSku=function(e,r,p){var a=this,i=this.baseUrl+"/api/backoffice/v1/products/{id}/set-variant-sku?";if(null==e)throw new Error("The parameter 'id' must be defined.");i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="tenantId="+encodeURIComponent(""+r)+"&"),i=i.replace(/[?&]$/,"");var s={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return a.http.request("post",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processSetProductVariantSku(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processSetProductVariantSku(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processSetProductVariantSku=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){return t.of(null)}))):404===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Not Found",i,e,c,r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.importProducts=function(e,r){var p=this,a=this.baseUrl+"/api/backoffice/v1/products/import?";null!=e&&(a+="tenantId="+encodeURIComponent(""+e)+"&"),a=a.replace(/[?&]$/,"");var i=new FormData;null!=r&&i.append("file",r.data,r.fileName?r.fileName:"file");var s={body:i,observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processImportProducts(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processImportProducts(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processImportProducts=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),t.of(r)}))):400===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Bad Request",i,e,c,r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.createDesignsConnections=function(e,r,p){var a=this,i=this.baseUrl+"/api/backoffice/v1/products/{id}/design-connections?";if(null==e)throw new Error("The parameter 'id' must be defined.");i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="tenantId="+encodeURIComponent(""+r)+"&"),i=i.replace(/[?&]$/,"");var s={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return a.http.request("post",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processCreateDesignsConnections(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processCreateDesignsConnections(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processCreateDesignsConnections=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){return t.of(null)}))):404===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Not Found",i,e,c,r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.removeDesignsConnections=function(e,r,p){var a=this,i=this.baseUrl+"/api/backoffice/v1/products/{id}/design-connections?";if(null==e)throw new Error("The parameter 'id' must be defined.");i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="tenantId="+encodeURIComponent(""+r)+"&"),i=i.replace(/[?&]$/,"");var s={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return a.http.request("delete",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processRemoveDesignsConnections(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processRemoveDesignsConnections(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processRemoveDesignsConnections=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){return t.of(null)}))):404===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Not Found",i,e,c,r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.createMockupsConnections=function(e,r,p){var a=this,i=this.baseUrl+"/api/backoffice/v1/products/{id}/mockup-connections?";if(null==e)throw new Error("The parameter 'id' must be defined.");i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="tenantId="+encodeURIComponent(""+r)+"&"),i=i.replace(/[?&]$/,"");var s={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return a.http.request("post",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processCreateMockupsConnections(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processCreateMockupsConnections(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processCreateMockupsConnections=function(e){var r,p,a=this,i=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=f.return)&&p.call(f)}finally{if(r)throw r.error}}return 200===i?E(s).pipe(n.mergeMap((function(e){return t.of(null)}))):404===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Not Found",i,e,c,r)}))):409===i?E(s).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),H("Conflict",i,e,c,r)}))):401===i?E(s).pipe(n.mergeMap((function(e){return H("Unauthorized",i,e,c)}))):403===i?E(s).pipe(n.mergeMap((function(e){return H("Forbidden",i,e,c)}))):200!==i&&204!==i?E(s).pipe(n.mergeMap((function(e){return H("An unexpected server error occurred.",i,e,c)}))):t.of(null)},r.prototype.removeMockupsConnections=function(e,r,p){var a=this,i=this.baseUrl+"/api/backoffice/v1/products/{id}/mockup-connections?";if(null==e)th