@aurigma/ng-storefront-api-client 2.50.1 → 2.51.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,5 +12,5 @@
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var s=function(e,r){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])})(e,r)};function p(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function t(){this.constructor=e}s(e,r),e.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t)}function a(e,r,t,n){return new(t||(t=Promise))((function(o,s){function p(e){try{i(n.next(e))}catch(e){s(e)}}function a(e){try{i(n.throw(e))}catch(e){s(e)}}function i(e){var r;e.done?o(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(p,a)}i((n=n.apply(e,r||[])).next())}))}function i(e,r){var t,n,o,s,p={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;p;)try{if(t=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return p.label++,{value:s[1],done:!1};case 5:p.label++,n=s[1],s=[0];continue;case 7:s=p.ops.pop(),p.trys.pop();continue;default:if(!(o=p.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){p=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){p.label=s[1];break}if(6===s[0]&&p.label<o[1]){p.label=o[1],o=s;break}if(o&&p.label<o[2]){p.label=o[2],p.ops.push(s);break}o[2]&&p.ops.pop(),p.trys.pop();continue}s=r.call(e,p)}catch(e){s=[6,e],n=0}finally{t=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}Object.create;function u(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;var c=new r.InjectionToken("API_BASE_URL"),f=function(){function e(){this.apiKey="",this.authorizationToken=null}return e.prototype.getAuthorizationToken=function(){return a(this,void 0,void 0,(function(){return i(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 a(this,void 0,void 0,(function(){var r;return i(this,(function(t){switch(t.label){case 0:return[4,this.configuration.getAuthorizationToken()];case 1:return r=t.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.endsWith("/")?this.configuration.apiUrl.slice(0,-1):this.configuration.apiUrl},e.prototype.transformResult=function(e,r,t){return t(r)},e}(),d=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.headInfo=function(){var e=this,r=this.baseUrl+"/api/storefront/v1/info";r=r.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(t){return e.http.request("head",r,t)}))).pipe(t.mergeMap((function(t){return e.transformResult(r,t,(function(r){return e.processHeadInfo(r)}))}))).pipe(t.catchError((function(t){if(!(t instanceof o.HttpResponseBase))return n.throwError(t);try{return e.transformResult(r,t,(function(r){return e.processHeadInfo(r)}))}catch(e){return n.throwError(e)}})))},r.prototype.processHeadInfo=function(e){var r,s,p=e.status,a=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),f=c.next();!f.done;f=c.next()){var l=f.value;i[l]=e.headers.get(l)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(s=c.return)&&s.call(c)}finally{if(r)throw r.error}}return 200===p?A(a).pipe(t.mergeMap((function(e){return n.of(null)}))):200!==p&&204!==p?A(a).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r.prototype.getInfo=function(){var e=this,r=this.baseUrl+"/api/storefront/v1/info";r=r.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(t){return e.http.request("get",r,t)}))).pipe(t.mergeMap((function(t){return e.transformResult(r,t,(function(r){return e.processGetInfo(r)}))}))).pipe(t.catchError((function(t){if(!(t instanceof o.HttpResponseBase))return n.throwError(t);try{return e.transformResult(r,t,(function(r){return e.processGetInfo(r)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetInfo=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.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 h=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.getAll=function(e,r,s,p){var a=this,i=this.baseUrl+"/api/storefront/v1/processing-pipelines?";null!=e&&(i+="skip="+encodeURIComponent(""+e)+"&"),null!=r&&(i+="take="+encodeURIComponent(""+r)+"&"),null!=s&&(i+="search="+encodeURIComponent(""+s)+"&"),null!=p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return a.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.get=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/processing-pipelines/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r}(l);h.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new h(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:h,providedIn:"root"}),h.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],h.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,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.getAll=function(e,r,s,p,a,i,u,c){var f=this,l=this.baseUrl+"/api/storefront/v1/product-references?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");l+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(l+="productReference="+encodeURIComponent(""+r)+"&"),null!=s&&(l+="productSpecificationId="+encodeURIComponent(""+s)+"&"),null!=p&&(l+="skip="+encodeURIComponent(""+p)+"&"),null!=a&&(l+="take="+encodeURIComponent(""+a)+"&"),null!=i&&(l+="sorting="+encodeURIComponent(""+i)+"&"),null!=u&&(l+="search="+encodeURIComponent(""+u)+"&"),null!=c&&(l+="tenantId="+encodeURIComponent(""+c)+"&"),l=l.replace(/[?&]$/,"");var d={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(d)).pipe(t.mergeMap((function(e){return f.http.request("get",l,e)}))).pipe(t.mergeMap((function(e){return f.transformResult(l,e,(function(e){return f.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return f.transformResult(l,e,(function(e){return f.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.create=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/product-references?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processCreate(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processCreate(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreate=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.get=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(a=a.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.delete=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(a=a.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("delete",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processDelete(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processDelete(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processDelete=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getProductSpecification=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-specification?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(a=a.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processGetProductSpecification(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processGetProductSpecification(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProductSpecification=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getProductCostDetails=function(e,r,s,p,a,i,u){var c=this,f=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-cost-details?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(f=f.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'sku' must be defined and cannot be null.");if(f+="sku="+encodeURIComponent(""+r)+"&",null==s)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");if(f+="storefrontId="+encodeURIComponent(""+s)+"&",null!=p&&(f+="storefrontUserId="+encodeURIComponent(""+p)+"&"),null!=a&&(f+="currencyCode="+encodeURIComponent(""+a)+"&"),null===i)throw new Error("The parameter 'quantity' cannot be null.");void 0!==i&&(f+="quantity="+encodeURIComponent(""+i)+"&"),null!=u&&(f+="tenantId="+encodeURIComponent(""+u)+"&"),f=f.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(l)).pipe(t.mergeMap((function(e){return c.http.request("get",f,e)}))).pipe(t.mergeMap((function(e){return c.transformResult(f,e,(function(e){return c.processGetProductCostDetails(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return c.transformResult(f,e,(function(e){return c.processGetProductCostDetails(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProductCostDetails=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getPersonalizationWorkflow=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}/personalization-workflow?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(a=a.replace("{reference}",encodeURIComponent(""+e)),null===r)throw new Error("The parameter 'storefrontId' cannot be null.");void 0!==r&&(a+="storefrontId="+encodeURIComponent(""+r)+"&"),null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processGetPersonalizationWorkflow(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processGetPersonalizationWorkflow(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetPersonalizationWorkflow=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getProductConfig=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-config?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(a=a.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processGetProductConfig(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processGetProductConfig(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProductConfig=function(e){var r,s,p=e.status,a=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),f=c.next();!f.done;f=c.next()){var l=f.value;i[l]=e.headers.get(l)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(s=c.return)&&s.call(c)}finally{if(r)throw r.error}}return 200===p?A(a).pipe(t.mergeMap((function(e){var r;return r=""===e?null:e,n.of(r)}))):404===p?A(a).pipe(t.mergeMap((function(e){return O("Not Found",p,e,i,""===e?null:e)}))):401===p?A(a).pipe(t.mergeMap((function(e){return O("Unauthorized",p,e,i)}))):403===p?A(a).pipe(t.mergeMap((function(e){return O("Forbidden",p,e,i)}))):200!==p&&204!==p?A(a).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",p,e,i)}))):n.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 v=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.getAll=function(e,r,s,p,a){var i=this,u=this.baseUrl+"/api/storefront/v1/product-specifications?";null!=e&&(u+="skip="+encodeURIComponent(""+e)+"&"),null!=r&&(u+="take="+encodeURIComponent(""+r)+"&"),null!=s&&(u+="sorting="+encodeURIComponent(""+s)+"&"),null!=p&&(u+="search="+encodeURIComponent(""+p)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.get=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/product-specifications/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getPersonalizationWorkflow=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/product-specifications/{id}/personalization-workflow?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGetPersonalizationWorkflow(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGetPersonalizationWorkflow(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetPersonalizationWorkflow=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getConfiguration=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/product-specifications/{id}/config?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGetConfiguration(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGetConfiguration(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetConfiguration=function(e){var r,s,p=e.status,a=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),f=c.next();!f.done;f=c.next()){var l=f.value;i[l]=e.headers.get(l)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(s=c.return)&&s.call(c)}finally{if(r)throw r.error}}return 200===p?A(a).pipe(t.mergeMap((function(e){var r;return r=""===e?null:e,n.of(r)}))):404===p?A(a).pipe(t.mergeMap((function(e){return O("Not Found",p,e,i,""===e?null:e)}))):401===p?A(a).pipe(t.mergeMap((function(e){return O("Unauthorized",p,e,i)}))):403===p?A(a).pipe(t.mergeMap((function(e){return O("Forbidden",p,e,i)}))):200!==p&&204!==p?A(a).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r}(l);v.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new v(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:v,providedIn:"root"}),v.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],v.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 y=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.getAll=function(e,r,s,p,a,i,u,c,f,l,d,h){var m=this,v=this.baseUrl+"/api/storefront/v1/projects?";if(null!=e&&(v+="ownerId="+encodeURIComponent(""+e)+"&"),null!=r&&(v+="productReference="+encodeURIComponent(""+r)+"&"),null!=s&&(v+="status="+encodeURIComponent(""+s)+"&"),null===p)throw new Error("The parameter 'datePeriod' cannot be null.");void 0!==p&&(v+="datePeriod="+encodeURIComponent(""+p)+"&"),null!=a&&(v+="skip="+encodeURIComponent(""+a)+"&"),null!=i&&(v+="take="+encodeURIComponent(""+i)+"&"),null!=u&&(v+="sorting="+encodeURIComponent(""+u)+"&"),null!=c&&(v+="search="+encodeURIComponent(""+c)+"&"),null!=f&&(v+="orderId="+encodeURIComponent(""+f)+"&"),null!=l&&(v+="processingStatus="+encodeURIComponent(""+l)+"&"),null!=d&&(v+="storefrontId="+encodeURIComponent(""+d)+"&"),null!=h&&(v+="tenantId="+encodeURIComponent(""+h)+"&"),v=v.replace(/[?&]$/,"");var y={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(y)).pipe(t.mergeMap((function(e){return m.http.request("get",v,e)}))).pipe(t.mergeMap((function(e){return m.transformResult(v,e,(function(e){return m.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return m.transformResult(v,e,(function(e){return m.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.get=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/projects/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.delete=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/projects/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("delete",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processDelete(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processDelete(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processDelete=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getPreview=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/projects/{id}/preview?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGetPreview(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGetPreview(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetPreview=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}if(200===a||206===a){var h=e.headers?e.headers.get("content-disposition"):void 0,m=h?/filename="?([^"]*?)"?(;|$)/g.exec(h):void 0,v=m&&m.length>1?m[1]:void 0;return n.of({fileName:v,data:i,status:a,headers:c})}return 404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getPreviewUrl=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/projects/{id}/preview-url?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGetPreviewUrl(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGetPreviewUrl(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetPreviewUrl=function(e){var r,s,p=e.status,a=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),f=c.next();!f.done;f=c.next()){var l=f.value;i[l]=e.headers.get(l)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(s=c.return)&&s.call(c)}finally{if(r)throw r.error}}return 200===p?A(a).pipe(t.mergeMap((function(e){var r;return r=""===e?null:e,n.of(r)}))):404===p?A(a).pipe(t.mergeMap((function(e){return O("Not Found",p,e,i,""===e?null:e)}))):401===p?A(a).pipe(t.mergeMap((function(e){return O("Unauthorized",p,e,i)}))):403===p?A(a).pipe(t.mergeMap((function(e){return O("Forbidden",p,e,i)}))):200!==p&&204!==p?A(a).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r.prototype.createWithSingleItem=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/projects/with-single-item?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processCreateWithSingleItem(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processCreateWithSingleItem(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreateWithSingleItem=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Bad Request",a,e,c,r)}))):409===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Conflict",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.createWithMultipleItems=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/projects/with-multiple-items?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processCreateWithMultipleItems(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processCreateWithMultipleItems(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreateWithMultipleItems=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Bad Request",a,e,c,r)}))):409===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Conflict",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.createByRenderHiResScenario=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/projects/by-scenario/render-hires?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processCreateByRenderHiResScenario(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processCreateByRenderHiResScenario(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreateByRenderHiResScenario=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Bad Request",a,e,c,r)}))):409===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Conflict",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.createBySpecificPipelineScenario=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/projects/by-scenario/specific-pipeline?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processCreateBySpecificPipelineScenario(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processCreateBySpecificPipelineScenario(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreateBySpecificPipelineScenario=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Bad Request",a,e,c,r)}))):409===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Conflict",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getAvailableTransitions=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/projects/{id}/transitions?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGetAvailableTransitions(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGetAvailableTransitions(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAvailableTransitions=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Bad Request",a,e,c,r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):409===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Conflict",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.changeStatus=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/projects/{id}/transitions/{transition}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(a=a.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'transition' must be defined.");a=a.replace("{transition}",encodeURIComponent(""+r)),null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processChangeStatus(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processChangeStatus(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processChangeStatus=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Bad Request",a,e,c,r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):409===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Conflict",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.forceStatus=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/projects/{id}/statuses/{status}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(a=a.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'status' must be defined.");a=a.replace("{status}",encodeURIComponent(""+r)),null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processForceStatus(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processForceStatus(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processForceStatus=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Bad Request",a,e,c,r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getAllStatuses=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/projects/statuses?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetAllStatuses(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetAllStatuses(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAllStatuses=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getAllTransitions=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/projects/transitions?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetAllTransitions(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetAllTransitions(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAllTransitions=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getProjectPdfUrl=function(e,r,s,p){var a=this,i=this.baseUrl+"/api/storefront/v1/projects/{id}/project-pdf?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'designUserId' must be defined and cannot be null.");if(i+="designUserId="+encodeURIComponent(""+r)+"&",null==s)throw new Error("The parameter 'designId' must be defined and cannot be null.");i+="designId="+encodeURIComponent(""+s)+"&",null!=p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return a.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processGetProjectPdfUrl(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processGetProjectPdfUrl(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProjectPdfUrl=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getProjectPdfZip=function(e,r,s,p,a){var i=this,u=this.baseUrl+"/api/storefront/v1/projects/{id}/project-pdf-zip?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'designUserId' must be defined and cannot be null.");if(u+="designUserId="+encodeURIComponent(""+r)+"&",null==s)throw new Error("The parameter 'designId' must be defined and cannot be null.");u+="designId="+encodeURIComponent(""+s)+"&",null!=p&&(u+="attachment="+encodeURIComponent(""+p)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetProjectPdfZip(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetProjectPdfZip(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProjectPdfZip=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}if(200===a||206===a){var h=e.headers?e.headers.get("content-disposition"):void 0,m=h?/filename="?([^"]*?)"?(;|$)/g.exec(h):void 0,v=m&&m.length>1?m[1]:void 0;return n.of({fileName:v,data:i,status:a,headers:c})}return 404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getProjectProcessingResults=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/projects/{id}/processing-results?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="itemId="+encodeURIComponent(""+r)+"&"),null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processGetProjectProcessingResults(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processGetProjectProcessingResults(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProjectProcessingResults=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.resumeProjectProcessing=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/projects/{id}/resume-processing?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="itemId="+encodeURIComponent(""+r)+"&"),null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processResumeProjectProcessing(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processResumeProjectProcessing(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processResumeProjectProcessing=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 204===a?A(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.restartProjectProcessing=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/projects/{id}/restart-processing?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="itemId="+encodeURIComponent(""+r)+"&"),null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processRestartProjectProcessing(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processRestartProjectProcessing(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRestartProjectProcessing=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 204===a?A(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getProjectOrder=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/projects/{id}/order?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGetProjectOrder(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGetProjectOrder(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProjectOrder=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.attachDataToProjectOrder=function(e,r,s,p){var a=this,i=this.baseUrl+"/api/storefront/v1/projects/{id}/order-data?";if(null==e)throw new Error("The parameter 'id' must be defined.");i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="itemId="+encodeURIComponent(""+r)+"&"),null!=s&&(i+="tenantId="+encodeURIComponent(""+s)+"&"),i=i.replace(/[?&]$/,"");var u={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return a.http.request("post",i,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processAttachDataToProjectOrder(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processAttachDataToProjectOrder(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processAttachDataToProjectOrder=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 204===a?A(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r}(l);y.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new y(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:y,providedIn:"root"}),y.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],y.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 g=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.getAll=function(e,r,s,p,a,i){var u=this,c=this.baseUrl+"/api/storefront/v1/storefronts?";null!=e&&e&&e.forEach((function(e){c+="types="+encodeURIComponent(""+e)+"&"})),null!=r&&(c+="skip="+encodeURIComponent(""+r)+"&"),null!=s&&(c+="take="+encodeURIComponent(""+s)+"&"),null!=p&&(c+="sorting="+encodeURIComponent(""+p)+"&"),null!=a&&(c+="search="+encodeURIComponent(""+a)+"&"),null!=i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");var f={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(f)).pipe(t.mergeMap((function(e){return u.http.request("get",c,e)}))).pipe(t.mergeMap((function(e){return u.transformResult(c,e,(function(e){return u.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return u.transformResult(c,e,(function(e){return u.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.get=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/storefronts/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r}(l);g.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new g(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:g,providedIn:"root"}),g.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],g.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 b=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.getAll=function(e,r,s,p,a,i,u){var c=this,f=this.baseUrl+"/api/storefront/v1/storefront-users?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");f+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(f+="storefrontUserId="+encodeURIComponent(""+r)+"&"),null!=s&&(f+="skip="+encodeURIComponent(""+s)+"&"),null!=p&&(f+="take="+encodeURIComponent(""+p)+"&"),null!=a&&(f+="sorting="+encodeURIComponent(""+a)+"&"),null!=i&&(f+="search="+encodeURIComponent(""+i)+"&"),null!=u&&(f+="tenantId="+encodeURIComponent(""+u)+"&"),f=f.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(l)).pipe(t.mergeMap((function(e){return c.http.request("get",f,e)}))).pipe(t.mergeMap((function(e){return c.transformResult(f,e,(function(e){return c.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return c.transformResult(f,e,(function(e){return c.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.create=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/storefront-users?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processCreate(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processCreate(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreate=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):409===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Conflict",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.get=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/storefront-users/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(a=a.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.register=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/storefront-users/register?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processRegister(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processRegister(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRegister=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):409===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Conflict",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.mergeAnonymous=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/storefront-users/merge-anonymous?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processMergeAnonymous(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processMergeAnonymous(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processMergeAnonymous=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):409===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Conflict",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getToken=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/storefront-users/token?";if(null==e)throw new Error("The parameter 'storefrontUserId' must be defined and cannot be null.");if(a+="storefrontUserId="+encodeURIComponent(""+e)+"&",null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processGetToken(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processGetToken(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetToken=function(e){var r,s,p=e.status,a=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),f=c.next();!f.done;f=c.next()){var l=f.value;i[l]=e.headers.get(l)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(s=c.return)&&s.call(c)}finally{if(r)throw r.error}}return 200===p?A(a).pipe(t.mergeMap((function(e){var r;return r=""===e?null:e,n.of(r)}))):404===p?A(a).pipe(t.mergeMap((function(e){return O("Not Found",p,e,i,""===e?null:e)}))):409===p?A(a).pipe(t.mergeMap((function(e){return O("Conflict",p,e,i,""===e?null:e)}))):401===p?A(a).pipe(t.mergeMap((function(e){return O("Unauthorized",p,e,i)}))):403===p?A(a).pipe(t.mergeMap((function(e){return O("Forbidden",p,e,i)}))):200!==p&&204!==p?A(a).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r}(l);b.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new b(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:b,providedIn:"root"}),b.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],b.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 R,w,M,I,U,C,j,H,E,x=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.getApplicationsInfo=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/tenant-info/applications?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetApplicationsInfo(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetApplicationsInfo(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetApplicationsInfo=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getInfo=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/tenant-info?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetInfo(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetInfo(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetInfo=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getMeasureUnitsInfo=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/tenant-info/measure-units?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetMeasureUnitsInfo(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetMeasureUnitsInfo(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetMeasureUnitsInfo=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getUsersInfo=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/tenant-info/users?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetUsersInfo(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetUsersInfo(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetUsersInfo=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r}(l);x.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new x(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:x,providedIn:"root"}),x.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],x.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]}]}]},(R=e.WorkflowType||(e.WorkflowType={})).UIFramework="UIFramework",R.SimpleEditor="SimpleEditor",R.DesignEditor="DesignEditor",R.WorkflowElements="WorkflowElements",(w=e.DatePeriod||(e.DatePeriod={})).All="All",w.Today="Today",w.Last7Days="Last7Days",w.Last30Days="Last30Days",(M=e.ProjectProcessingStatus||(e.ProjectProcessingStatus={})).Pending="Pending",M.InProgress="InProgress",M.Completed="Completed",M.Failed="Failed",(I=e.ProjectItemResourceType||(e.ProjectItemResourceType={})).General="General",I.Preview="Preview",I.Hires="Hires",(U=e.RenderHiResScenarioOutputFormat||(e.RenderHiResScenarioOutputFormat={})).Pdf="Pdf",U.Jpeg="Jpeg",U.Png="Png",U.Tiff="Tiff",(C=e.RenderHiResScenarioOutputColorSpace||(e.RenderHiResScenarioOutputColorSpace={})).Rgb="Rgb",C.Grayscale="Grayscale",C.Cmyk="Cmyk",(j=e.RenderHiResScenarioOutputFlipMode||(e.RenderHiResScenarioOutputFlipMode={})).None="None",j.Horizontal="Horizontal",j.Vertical="Vertical",j.Both="Both",(H=e.OrderDataItemValueType||(e.OrderDataItemValueType={})).PlainText="PlainText",H.CommaSeparatedList="CommaSeparatedList",H.SerializedJson="SerializedJson",(E=e.StorefrontType||(e.StorefrontType={})).Custom="Custom",E.ShopifyLegacy="ShopifyLegacy",E.DocketManager="DocketManager",E.CustomSaml="CustomSaml",E.NopCommerce="NopCommerce",E.WooCommerce="WooCommerce",E.Magento="Magento",E.BigCommerce="BigCommerce",E.Shopify="Shopify",E.ShopifyCustom="ShopifyCustom";var P=function(e){function r(r,t,n,o,s){var p=e.call(this)||this;return p.isApiException=!0,p.message=r,p.status=t,p.response=n,p.headers=o,p.result=s,p}return p(r,e),r.isApiException=function(e){return!0===e.isApiException},r}(Error);function O(e,r,t,o,s){return null!=s?n.throwError(s):n.throwError(new P(e,r,t,o,null))}function A(e){return new n.Observable((function(r){if(e){var t=new FileReader;t.onload=function(e){r.next(e.target.result),r.complete()},t.readAsText(e)}else r.next(""),r.complete()}))}function S(e,r,t){void 0===t&&(t="ApiKey");var n=new f;return n.apiKey=t,n.apiUrl=r,n.setAuthorizationToken(e),n}var T=function(){function e(){}return e.forRoot=function(r,t,n){return void 0===n&&(n="ApiKey"),{ngModule:e,providers:[{provide:c,useValue:t},{provide:f,useFactory:S.bind(this,r,t,n)}]}},e}();T.decorators=[{type:r.NgModule,args:[{declarations:[],imports:[],exports:[]}]}],e.API_BASE_URL=c,e.ApiClientBase=l,e.ApiClientConfiguration=f,e.ApiException=P,e.BuildInfoApiClient=d,e.CreateApiClientConfiguration=S,e.ProcessingPipelinesApiClient=h,e.ProductReferencesApiClient=m,e.ProductSpecificationsApiClient=v,e.ProjectsApiClient=y,e.StorefrontModule=T,e.StorefrontUsersApiClient=b,e.StorefrontsApiClient=g,e.TenantInfoApiClient=x,Object.defineProperty(e,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var s=function(e,r){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])})(e,r)};function p(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function t(){this.constructor=e}s(e,r),e.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t)}function a(e,r,t,n){return new(t||(t=Promise))((function(o,s){function p(e){try{i(n.next(e))}catch(e){s(e)}}function a(e){try{i(n.throw(e))}catch(e){s(e)}}function i(e){var r;e.done?o(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(p,a)}i((n=n.apply(e,r||[])).next())}))}function i(e,r){var t,n,o,s,p={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;p;)try{if(t=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return p.label++,{value:s[1],done:!1};case 5:p.label++,n=s[1],s=[0];continue;case 7:s=p.ops.pop(),p.trys.pop();continue;default:if(!(o=p.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){p=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){p.label=s[1];break}if(6===s[0]&&p.label<o[1]){p.label=o[1],o=s;break}if(o&&p.label<o[2]){p.label=o[2],p.ops.push(s);break}o[2]&&p.ops.pop(),p.trys.pop();continue}s=r.call(e,p)}catch(e){s=[6,e],n=0}finally{t=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}Object.create;function u(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;var c=new r.InjectionToken("API_BASE_URL"),f=function(){function e(){this.apiKey="",this.authorizationToken=null}return e.prototype.getAuthorizationToken=function(){return a(this,void 0,void 0,(function(){return i(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 a(this,void 0,void 0,(function(){var r;return i(this,(function(t){switch(t.label){case 0:return[4,this.configuration.getAuthorizationToken()];case 1:return r=t.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.endsWith("/")?this.configuration.apiUrl.slice(0,-1):this.configuration.apiUrl},e.prototype.transformResult=function(e,r,t){return t(r)},e}(),d=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.headInfo=function(){var e=this,r=this.baseUrl+"/api/storefront/v1/info";r=r.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(t){return e.http.request("head",r,t)}))).pipe(t.mergeMap((function(t){return e.transformResult(r,t,(function(r){return e.processHeadInfo(r)}))}))).pipe(t.catchError((function(t){if(!(t instanceof o.HttpResponseBase))return n.throwError(t);try{return e.transformResult(r,t,(function(r){return e.processHeadInfo(r)}))}catch(e){return n.throwError(e)}})))},r.prototype.processHeadInfo=function(e){var r,s,p=e.status,a=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),f=c.next();!f.done;f=c.next()){var l=f.value;i[l]=e.headers.get(l)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(s=c.return)&&s.call(c)}finally{if(r)throw r.error}}return 200===p?A(a).pipe(t.mergeMap((function(e){return n.of(null)}))):200!==p&&204!==p?A(a).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r.prototype.getInfo=function(){var e=this,r=this.baseUrl+"/api/storefront/v1/info";r=r.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(t){return e.http.request("get",r,t)}))).pipe(t.mergeMap((function(t){return e.transformResult(r,t,(function(r){return e.processGetInfo(r)}))}))).pipe(t.catchError((function(t){if(!(t instanceof o.HttpResponseBase))return n.throwError(t);try{return e.transformResult(r,t,(function(r){return e.processGetInfo(r)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetInfo=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.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 h=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.getAll=function(e,r,s,p){var a=this,i=this.baseUrl+"/api/storefront/v1/processing-pipelines?";null!=e&&(i+="skip="+encodeURIComponent(""+e)+"&"),null!=r&&(i+="take="+encodeURIComponent(""+r)+"&"),null!=s&&(i+="search="+encodeURIComponent(""+s)+"&"),null!=p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return a.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.get=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/processing-pipelines/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r}(l);h.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new h(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:h,providedIn:"root"}),h.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],h.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,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.getAll=function(e,r,s,p,a,i,u,c){var f=this,l=this.baseUrl+"/api/storefront/v1/product-references?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");l+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(l+="productReference="+encodeURIComponent(""+r)+"&"),null!=s&&(l+="productSpecificationId="+encodeURIComponent(""+s)+"&"),null!=p&&(l+="skip="+encodeURIComponent(""+p)+"&"),null!=a&&(l+="take="+encodeURIComponent(""+a)+"&"),null!=i&&(l+="sorting="+encodeURIComponent(""+i)+"&"),null!=u&&(l+="search="+encodeURIComponent(""+u)+"&"),null!=c&&(l+="tenantId="+encodeURIComponent(""+c)+"&"),l=l.replace(/[?&]$/,"");var d={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(d)).pipe(t.mergeMap((function(e){return f.http.request("get",l,e)}))).pipe(t.mergeMap((function(e){return f.transformResult(l,e,(function(e){return f.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return f.transformResult(l,e,(function(e){return f.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.create=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/product-references?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processCreate(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processCreate(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreate=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.get=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(a=a.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.delete=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(a=a.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("delete",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processDelete(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processDelete(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processDelete=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getProductSpecification=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-specification?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(a=a.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processGetProductSpecification(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processGetProductSpecification(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProductSpecification=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getProductCostDetails=function(e,r,s,p,a,i,u){var c=this,f=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-cost-details?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(f=f.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'sku' must be defined and cannot be null.");if(f+="sku="+encodeURIComponent(""+r)+"&",null==s)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");if(f+="storefrontId="+encodeURIComponent(""+s)+"&",null!=p&&(f+="storefrontUserId="+encodeURIComponent(""+p)+"&"),null!=a&&(f+="currencyCode="+encodeURIComponent(""+a)+"&"),null===i)throw new Error("The parameter 'quantity' cannot be null.");void 0!==i&&(f+="quantity="+encodeURIComponent(""+i)+"&"),null!=u&&(f+="tenantId="+encodeURIComponent(""+u)+"&"),f=f.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(l)).pipe(t.mergeMap((function(e){return c.http.request("get",f,e)}))).pipe(t.mergeMap((function(e){return c.transformResult(f,e,(function(e){return c.processGetProductCostDetails(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return c.transformResult(f,e,(function(e){return c.processGetProductCostDetails(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProductCostDetails=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getPersonalizationWorkflow=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}/personalization-workflow?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(a=a.replace("{reference}",encodeURIComponent(""+e)),null===r)throw new Error("The parameter 'storefrontId' cannot be null.");void 0!==r&&(a+="storefrontId="+encodeURIComponent(""+r)+"&"),null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processGetPersonalizationWorkflow(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processGetPersonalizationWorkflow(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetPersonalizationWorkflow=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getProductConfig=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-config?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(a=a.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processGetProductConfig(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processGetProductConfig(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProductConfig=function(e){var r,s,p=e.status,a=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),f=c.next();!f.done;f=c.next()){var l=f.value;i[l]=e.headers.get(l)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(s=c.return)&&s.call(c)}finally{if(r)throw r.error}}return 200===p?A(a).pipe(t.mergeMap((function(e){var r;return r=""===e?null:e,n.of(r)}))):404===p?A(a).pipe(t.mergeMap((function(e){return O("Not Found",p,e,i,""===e?null:e)}))):401===p?A(a).pipe(t.mergeMap((function(e){return O("Unauthorized",p,e,i)}))):403===p?A(a).pipe(t.mergeMap((function(e){return O("Forbidden",p,e,i)}))):200!==p&&204!==p?A(a).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",p,e,i)}))):n.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 v=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.getAll=function(e,r,s,p,a){var i=this,u=this.baseUrl+"/api/storefront/v1/product-specifications?";null!=e&&(u+="skip="+encodeURIComponent(""+e)+"&"),null!=r&&(u+="take="+encodeURIComponent(""+r)+"&"),null!=s&&(u+="sorting="+encodeURIComponent(""+s)+"&"),null!=p&&(u+="search="+encodeURIComponent(""+p)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.get=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/product-specifications/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getPersonalizationWorkflow=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/product-specifications/{id}/personalization-workflow?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGetPersonalizationWorkflow(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGetPersonalizationWorkflow(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetPersonalizationWorkflow=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getConfiguration=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/product-specifications/{id}/config?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGetConfiguration(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGetConfiguration(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetConfiguration=function(e){var r,s,p=e.status,a=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),f=c.next();!f.done;f=c.next()){var l=f.value;i[l]=e.headers.get(l)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(s=c.return)&&s.call(c)}finally{if(r)throw r.error}}return 200===p?A(a).pipe(t.mergeMap((function(e){var r;return r=""===e?null:e,n.of(r)}))):404===p?A(a).pipe(t.mergeMap((function(e){return O("Not Found",p,e,i,""===e?null:e)}))):401===p?A(a).pipe(t.mergeMap((function(e){return O("Unauthorized",p,e,i)}))):403===p?A(a).pipe(t.mergeMap((function(e){return O("Forbidden",p,e,i)}))):200!==p&&204!==p?A(a).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r}(l);v.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new v(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:v,providedIn:"root"}),v.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],v.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 y=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.getAll=function(e,r,s,p,a,i,u,c,f,l,d,h){var m=this,v=this.baseUrl+"/api/storefront/v1/projects?";if(null!=e&&(v+="ownerId="+encodeURIComponent(""+e)+"&"),null!=r&&(v+="productReference="+encodeURIComponent(""+r)+"&"),null!=s&&(v+="status="+encodeURIComponent(""+s)+"&"),null===p)throw new Error("The parameter 'datePeriod' cannot be null.");void 0!==p&&(v+="datePeriod="+encodeURIComponent(""+p)+"&"),null!=a&&(v+="skip="+encodeURIComponent(""+a)+"&"),null!=i&&(v+="take="+encodeURIComponent(""+i)+"&"),null!=u&&(v+="sorting="+encodeURIComponent(""+u)+"&"),null!=c&&(v+="search="+encodeURIComponent(""+c)+"&"),null!=f&&(v+="orderId="+encodeURIComponent(""+f)+"&"),null!=l&&(v+="processingStatus="+encodeURIComponent(""+l)+"&"),null!=d&&(v+="storefrontId="+encodeURIComponent(""+d)+"&"),null!=h&&(v+="tenantId="+encodeURIComponent(""+h)+"&"),v=v.replace(/[?&]$/,"");var y={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(y)).pipe(t.mergeMap((function(e){return m.http.request("get",v,e)}))).pipe(t.mergeMap((function(e){return m.transformResult(v,e,(function(e){return m.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return m.transformResult(v,e,(function(e){return m.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.get=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/projects/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.delete=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/projects/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("delete",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processDelete(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processDelete(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processDelete=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getPreview=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/projects/{id}/preview?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGetPreview(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGetPreview(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetPreview=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}if(200===a||206===a){var h=e.headers?e.headers.get("content-disposition"):void 0,m=h?/filename="?([^"]*?)"?(;|$)/g.exec(h):void 0,v=m&&m.length>1?m[1]:void 0;return n.of({fileName:v,data:i,status:a,headers:c})}return 404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getPreviewUrl=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/projects/{id}/preview-url?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGetPreviewUrl(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGetPreviewUrl(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetPreviewUrl=function(e){var r,s,p=e.status,a=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),f=c.next();!f.done;f=c.next()){var l=f.value;i[l]=e.headers.get(l)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(s=c.return)&&s.call(c)}finally{if(r)throw r.error}}return 200===p?A(a).pipe(t.mergeMap((function(e){var r;return r=""===e?null:e,n.of(r)}))):404===p?A(a).pipe(t.mergeMap((function(e){return O("Not Found",p,e,i,""===e?null:e)}))):401===p?A(a).pipe(t.mergeMap((function(e){return O("Unauthorized",p,e,i)}))):403===p?A(a).pipe(t.mergeMap((function(e){return O("Forbidden",p,e,i)}))):200!==p&&204!==p?A(a).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r.prototype.createWithSingleItem=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/projects/with-single-item?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processCreateWithSingleItem(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processCreateWithSingleItem(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreateWithSingleItem=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Bad Request",a,e,c,r)}))):409===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Conflict",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.createWithMultipleItems=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/projects/with-multiple-items?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processCreateWithMultipleItems(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processCreateWithMultipleItems(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreateWithMultipleItems=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Bad Request",a,e,c,r)}))):409===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Conflict",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.createByRenderHiResScenario=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/projects/by-scenario/render-hires?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processCreateByRenderHiResScenario(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processCreateByRenderHiResScenario(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreateByRenderHiResScenario=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Bad Request",a,e,c,r)}))):409===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Conflict",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.createBySpecificPipelineScenario=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/projects/by-scenario/specific-pipeline?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processCreateBySpecificPipelineScenario(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processCreateBySpecificPipelineScenario(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreateBySpecificPipelineScenario=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Bad Request",a,e,c,r)}))):409===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Conflict",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getAvailableTransitions=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/projects/{id}/transitions?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGetAvailableTransitions(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGetAvailableTransitions(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAvailableTransitions=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Bad Request",a,e,c,r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):409===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Conflict",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.changeStatus=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/projects/{id}/transitions/{transition}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(a=a.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'transition' must be defined.");a=a.replace("{transition}",encodeURIComponent(""+r)),null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processChangeStatus(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processChangeStatus(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processChangeStatus=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Bad Request",a,e,c,r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):409===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Conflict",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.forceStatus=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/projects/{id}/statuses/{status}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(a=a.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'status' must be defined.");a=a.replace("{status}",encodeURIComponent(""+r)),null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processForceStatus(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processForceStatus(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processForceStatus=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Bad Request",a,e,c,r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getAllStatuses=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/projects/statuses?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetAllStatuses(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetAllStatuses(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAllStatuses=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getAllTransitions=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/projects/transitions?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetAllTransitions(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetAllTransitions(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAllTransitions=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getProjectPdfUrl=function(e,r,s,p){var a=this,i=this.baseUrl+"/api/storefront/v1/projects/{id}/project-pdf?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'designUserId' must be defined and cannot be null.");if(i+="designUserId="+encodeURIComponent(""+r)+"&",null==s)throw new Error("The parameter 'designId' must be defined and cannot be null.");i+="designId="+encodeURIComponent(""+s)+"&",null!=p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return a.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processGetProjectPdfUrl(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processGetProjectPdfUrl(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProjectPdfUrl=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getProjectPdfZip=function(e,r,s,p,a){var i=this,u=this.baseUrl+"/api/storefront/v1/projects/{id}/project-pdf-zip?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'designUserId' must be defined and cannot be null.");if(u+="designUserId="+encodeURIComponent(""+r)+"&",null==s)throw new Error("The parameter 'designId' must be defined and cannot be null.");u+="designId="+encodeURIComponent(""+s)+"&",null!=p&&(u+="attachment="+encodeURIComponent(""+p)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetProjectPdfZip(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetProjectPdfZip(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProjectPdfZip=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}if(200===a||206===a){var h=e.headers?e.headers.get("content-disposition"):void 0,m=h?/filename="?([^"]*?)"?(;|$)/g.exec(h):void 0,v=m&&m.length>1?m[1]:void 0;return n.of({fileName:v,data:i,status:a,headers:c})}return 404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getProjectProcessingResults=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/projects/{id}/processing-results?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="itemId="+encodeURIComponent(""+r)+"&"),null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processGetProjectProcessingResults(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processGetProjectProcessingResults(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProjectProcessingResults=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.resumeProjectProcessing=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/projects/{id}/resume-processing?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="itemId="+encodeURIComponent(""+r)+"&"),null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processResumeProjectProcessing(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processResumeProjectProcessing(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processResumeProjectProcessing=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 204===a?A(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.restartProjectProcessing=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/projects/{id}/restart-processing?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="itemId="+encodeURIComponent(""+r)+"&"),null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processRestartProjectProcessing(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processRestartProjectProcessing(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRestartProjectProcessing=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 204===a?A(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getProjectOrder=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/projects/{id}/order?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGetProjectOrder(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGetProjectOrder(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProjectOrder=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.attachDataToProjectOrder=function(e,r,s,p){var a=this,i=this.baseUrl+"/api/storefront/v1/projects/{id}/order-data?";if(null==e)throw new Error("The parameter 'id' must be defined.");i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="itemId="+encodeURIComponent(""+r)+"&"),null!=s&&(i+="tenantId="+encodeURIComponent(""+s)+"&"),i=i.replace(/[?&]$/,"");var u={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return a.http.request("post",i,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processAttachDataToProjectOrder(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processAttachDataToProjectOrder(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processAttachDataToProjectOrder=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 204===a?A(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r}(l);y.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new y(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:y,providedIn:"root"}),y.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],y.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 g=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.getAll=function(e,r,s,p,a,i){var u=this,c=this.baseUrl+"/api/storefront/v1/storefronts?";null!=e&&e&&e.forEach((function(e){c+="types="+encodeURIComponent(""+e)+"&"})),null!=r&&(c+="skip="+encodeURIComponent(""+r)+"&"),null!=s&&(c+="take="+encodeURIComponent(""+s)+"&"),null!=p&&(c+="sorting="+encodeURIComponent(""+p)+"&"),null!=a&&(c+="search="+encodeURIComponent(""+a)+"&"),null!=i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");var f={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(f)).pipe(t.mergeMap((function(e){return u.http.request("get",c,e)}))).pipe(t.mergeMap((function(e){return u.transformResult(c,e,(function(e){return u.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return u.transformResult(c,e,(function(e){return u.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.get=function(e,r){var s=this,p=this.baseUrl+"/api/storefront/v1/storefronts/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");p=p.replace("{id}",encodeURIComponent(""+e)),null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return s.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(p,e,(function(e){return s.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(p,e,(function(e){return s.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r}(l);g.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new g(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:g,providedIn:"root"}),g.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],g.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 b=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.getAll=function(e,r,s,p,a,i,u){var c=this,f=this.baseUrl+"/api/storefront/v1/storefront-users?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");f+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(f+="storefrontUserId="+encodeURIComponent(""+r)+"&"),null!=s&&(f+="skip="+encodeURIComponent(""+s)+"&"),null!=p&&(f+="take="+encodeURIComponent(""+p)+"&"),null!=a&&(f+="sorting="+encodeURIComponent(""+a)+"&"),null!=i&&(f+="search="+encodeURIComponent(""+i)+"&"),null!=u&&(f+="tenantId="+encodeURIComponent(""+u)+"&"),f=f.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(l)).pipe(t.mergeMap((function(e){return c.http.request("get",f,e)}))).pipe(t.mergeMap((function(e){return c.transformResult(f,e,(function(e){return c.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return c.transformResult(f,e,(function(e){return c.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.create=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/storefront-users?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processCreate(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processCreate(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreate=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):409===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Conflict",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.get=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/storefront-users/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(a=a.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.register=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/storefront-users/register?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processRegister(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processRegister(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRegister=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):409===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Conflict",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.mergeAnonymous=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/storefront-users/merge-anonymous?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processMergeAnonymous(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processMergeAnonymous(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processMergeAnonymous=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Not Found",a,e,c,r)}))):409===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),O("Conflict",a,e,c,r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getToken=function(e,r,s){var p=this,a=this.baseUrl+"/api/storefront/v1/storefront-users/token?";if(null==e)throw new Error("The parameter 'storefrontUserId' must be defined and cannot be null.");if(a+="storefrontUserId="+encodeURIComponent(""+e)+"&",null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(a+="tenantId="+encodeURIComponent(""+s)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(a,e,(function(e){return p.processGetToken(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(a,e,(function(e){return p.processGetToken(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetToken=function(e){var r,s,p=e.status,a=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),f=c.next();!f.done;f=c.next()){var l=f.value;i[l]=e.headers.get(l)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(s=c.return)&&s.call(c)}finally{if(r)throw r.error}}return 200===p?A(a).pipe(t.mergeMap((function(e){var r;return r=""===e?null:e,n.of(r)}))):404===p?A(a).pipe(t.mergeMap((function(e){return O("Not Found",p,e,i,""===e?null:e)}))):409===p?A(a).pipe(t.mergeMap((function(e){return O("Conflict",p,e,i,""===e?null:e)}))):401===p?A(a).pipe(t.mergeMap((function(e){return O("Unauthorized",p,e,i)}))):403===p?A(a).pipe(t.mergeMap((function(e){return O("Forbidden",p,e,i)}))):200!==p&&204!==p?A(a).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r}(l);b.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new b(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:b,providedIn:"root"}),b.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],b.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 R,w,M,I,U,C,j,H,E,x=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.getApplicationsInfo=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/tenant-info/applications?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetApplicationsInfo(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetApplicationsInfo(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetApplicationsInfo=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getInfo=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/tenant-info?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetInfo(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetInfo(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetInfo=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getMeasureUnitsInfo=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/tenant-info/measure-units?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetMeasureUnitsInfo(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetMeasureUnitsInfo(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetMeasureUnitsInfo=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r.prototype.getUsersInfo=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/tenant-info/users?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetUsersInfo(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetUsersInfo(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetUsersInfo=function(e){var r,s,p=this,a=e.status,i=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&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===a?A(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===a?A(i).pipe(t.mergeMap((function(e){return O("Unauthorized",a,e,c)}))):403===a?A(i).pipe(t.mergeMap((function(e){return O("Forbidden",a,e,c)}))):200!==a&&204!==a?A(i).pipe(t.mergeMap((function(e){return O("An unexpected server error occurred.",a,e,c)}))):n.of(null)},r}(l);x.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new x(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:x,providedIn:"root"}),x.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],x.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]}]}]},(R=e.WorkflowType||(e.WorkflowType={})).UIFramework="UIFramework",R.SimpleEditor="SimpleEditor",R.DesignEditor="DesignEditor",R.WorkflowElements="WorkflowElements",(w=e.DatePeriod||(e.DatePeriod={})).All="All",w.Today="Today",w.Last7Days="Last7Days",w.Last30Days="Last30Days",(M=e.ProjectProcessingStatus||(e.ProjectProcessingStatus={})).Pending="Pending",M.InProgress="InProgress",M.Completed="Completed",M.Failed="Failed",(I=e.ProjectItemResourceType||(e.ProjectItemResourceType={})).General="General",I.Preview="Preview",I.Hires="Hires",(U=e.RenderHiResScenarioOutputFormat||(e.RenderHiResScenarioOutputFormat={})).Pdf="Pdf",U.Jpeg="Jpeg",U.Png="Png",U.Tiff="Tiff",U.Bmp="Bmp",(C=e.RenderHiResScenarioOutputColorSpace||(e.RenderHiResScenarioOutputColorSpace={})).Rgb="Rgb",C.Grayscale="Grayscale",C.Cmyk="Cmyk",(j=e.RenderHiResScenarioOutputFlipMode||(e.RenderHiResScenarioOutputFlipMode={})).None="None",j.Horizontal="Horizontal",j.Vertical="Vertical",j.Both="Both",(H=e.OrderDataItemValueType||(e.OrderDataItemValueType={})).PlainText="PlainText",H.CommaSeparatedList="CommaSeparatedList",H.SerializedJson="SerializedJson",(E=e.StorefrontType||(e.StorefrontType={})).Custom="Custom",E.ShopifyLegacy="ShopifyLegacy",E.DocketManager="DocketManager",E.CustomSaml="CustomSaml",E.NopCommerce="NopCommerce",E.WooCommerce="WooCommerce",E.Magento="Magento",E.BigCommerce="BigCommerce",E.Shopify="Shopify",E.ShopifyCustom="ShopifyCustom";var P=function(e){function r(r,t,n,o,s){var p=e.call(this)||this;return p.isApiException=!0,p.message=r,p.status=t,p.response=n,p.headers=o,p.result=s,p}return p(r,e),r.isApiException=function(e){return!0===e.isApiException},r}(Error);function O(e,r,t,o,s){return null!=s?n.throwError(s):n.throwError(new P(e,r,t,o,null))}function A(e){return new n.Observable((function(r){if(e){var t=new FileReader;t.onload=function(e){r.next(e.target.result),r.complete()},t.readAsText(e)}else r.next(""),r.complete()}))}function S(e,r,t){void 0===t&&(t="ApiKey");var n=new f;return n.apiKey=t,n.apiUrl=r,n.setAuthorizationToken(e),n}var T=function(){function e(){}return e.forRoot=function(r,t,n){return void 0===n&&(n="ApiKey"),{ngModule:e,providers:[{provide:c,useValue:t},{provide:f,useFactory:S.bind(this,r,t,n)}]}},e}();T.decorators=[{type:r.NgModule,args:[{declarations:[],imports:[],exports:[]}]}],e.API_BASE_URL=c,e.ApiClientBase=l,e.ApiClientConfiguration=f,e.ApiException=P,e.BuildInfoApiClient=d,e.CreateApiClientConfiguration=S,e.ProcessingPipelinesApiClient=h,e.ProductReferencesApiClient=m,e.ProductSpecificationsApiClient=v,e.ProjectsApiClient=y,e.StorefrontModule=T,e.StorefrontUsersApiClient=b,e.StorefrontsApiClient=g,e.TenantInfoApiClient=x,Object.defineProperty(e,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=aurigma-ng-storefront-api-client.umd.min.js.map