@aurigma/ng-storefront-api-client 2.60.2 → 2.63.14

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 p=function(e,r){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])})(e,r)};function s(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}p(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}function a(e,r,n,t){return new(n||(n=Promise))((function(o,p){function s(e){try{i(t.next(e))}catch(e){p(e)}}function a(e){try{i(t.throw(e))}catch(e){p(e)}}function i(e){var r;e.done?o(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(s,a)}i((t=t.apply(e,r||[])).next())}))}function i(e,r){var n,t,o,p,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return p={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(p[Symbol.iterator]=function(){return this}),p;function a(p){return function(a){return function(p){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,t&&(o=2&p[0]?t.return:p[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,p[1])).done)return o;switch(t=0,o&&(p=[2&p[0],o.value]),p[0]){case 0:case 1:o=p;break;case 4:return s.label++,{value:p[1],done:!1};case 5:s.label++,t=p[1],p=[0];continue;case 7:p=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==p[0]&&2!==p[0])){s=0;continue}if(3===p[0]&&(!o||p[1]>o[0]&&p[1]<o[3])){s.label=p[1];break}if(6===p[0]&&s.label<o[1]){s.label=o[1],o=p;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(p);break}o[2]&&s.ops.pop(),s.trys.pop();continue}p=r.call(e,s)}catch(e){p=[6,e],t=0}finally{n=o=0}if(5&p[0])throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}([p,a])}}}Object.create;function u(e){var r="function"==typeof Symbol&&Symbol.iterator,n=r&&e[r],t=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;var c=new r.InjectionToken("API_BASE_URL"),l=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}(),f=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(n){switch(n.label){case 0:return[4,this.configuration.getAuthorizationToken()];case 1:return r=n.sent(),e.headers=null!=r?e.headers.append("authorization","Bearer "+r):e.headers.append("X-API-Key",this.configuration.apiKey),[2,e]}}))}))},e.prototype.getBaseUrl=function(e){return this.configuration.apiUrl.endsWith("/")?this.configuration.apiUrl.slice(0,-1):this.configuration.apiUrl},e.prototype.transformResult=function(e,r,n){return n(r)},e}(),d=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.headInfo=function(){var e=this,r=this.baseUrl+"/api/storefront/v1/info";r=r.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return t.from(this.transformOptions(p)).pipe(n.mergeMap((function(n){return e.http.request("head",r,n)}))).pipe(n.mergeMap((function(n){return e.transformResult(r,n,(function(r){return e.processHeadInfo(r)}))}))).pipe(n.catchError((function(n){if(!(n instanceof o.HttpResponseBase))return t.throwError(n);try{return e.transformResult(r,n,(function(r){return e.processHeadInfo(r)}))}catch(e){return t.throwError(e)}})))},r.prototype.processHeadInfo=function(e){var r,p,s=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()),l=c.next();!l.done;l=c.next()){var f=l.value;i[f]=e.headers.get(f)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=c.return)&&p.call(c)}finally{if(r)throw r.error}}return 200===s?D(a).pipe(n.mergeMap((function(e){return t.of(null)}))):200!==s&&204!==s?D(a).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",s,e,i)}))):t.of(null)},r.prototype.getInfo=function(){var e=this,r=this.baseUrl+"/api/storefront/v1/info";r=r.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(p)).pipe(n.mergeMap((function(n){return e.http.request("get",r,n)}))).pipe(n.mergeMap((function(n){return e.transformResult(r,n,(function(r){return e.processGetInfo(r)}))}))).pipe(n.catchError((function(n){if(!(n instanceof o.HttpResponseBase))return t.throwError(n);try{return e.transformResult(r,n,(function(r){return e.processGetInfo(r)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetInfo=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);d.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new d(r.ɵɵinject(l),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:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var m=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAll=function(e,r,p,s){var a=this,i=this.baseUrl+"/api/storefront/v1/processing-pipelines?";null!=e&&(i+="skip="+encodeURIComponent(""+e)+"&"),null!=r&&(i+="take="+encodeURIComponent(""+r)+"&"),null!=p&&(i+="search="+encodeURIComponent(""+p)+"&"),null!=s&&(i+="tenantId="+encodeURIComponent(""+s)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(u)).pipe(n.mergeMap((function(e){return a.http.request("get",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processGetAll(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processGetAll(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.get=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/processing-pipelines/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGet(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGet(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGet=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);m.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new m(r.ɵɵinject(l),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:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var h=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAllProductBundles=function(e,r,p,s,a,i){var u=this,c=this.baseUrl+"/api/storefront/v1/product-bundles?";null!=e&&(c+="skip="+encodeURIComponent(""+e)+"&"),null!=r&&(c+="take="+encodeURIComponent(""+r)+"&"),null!=p&&(c+="sorting="+encodeURIComponent(""+p)+"&"),null!=s&&(c+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(c+="customFields="+encodeURIComponent(""+a)+"&"),null!=i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(l)).pipe(n.mergeMap((function(e){return u.http.request("get",c,e)}))).pipe(n.mergeMap((function(e){return u.transformResult(c,e,(function(e){return u.processGetAllProductBundles(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return u.transformResult(c,e,(function(e){return u.processGetAllProductBundles(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProductBundles=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductBundle=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-bundles/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="productBundleVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProductBundle(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProductBundle(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductBundle=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductSummary=function(e,r,p,s,a){var i=this,u=this.baseUrl+"/api/storefront/v1/product-bundles/{id}/summary?";if(null==e)throw new Error("The parameter 'id' must be defined.");u=u.replace("{id}",encodeURIComponent(""+e)),null!=r&&(u+="productBundleVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(u+="productVariantId="+encodeURIComponent(""+p)+"&"),null!=s&&(u+="sku="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(c)).pipe(n.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(n.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetProductSummary(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetProductSummary(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductSummary=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getPersonalizationWorkflow=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-bundles/{id}/personalization-workflow?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="productBundleVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetPersonalizationWorkflow(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetPersonalizationWorkflow(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetPersonalizationWorkflow=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);h.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new h(r.ɵɵinject(l),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:l,decorators:[{type:r.Inject,args:[l]}]},{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,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAllProductLinks=function(e,r,p,s,a){var i=this,u=this.baseUrl+"/api/storefront/v1/product-links?";null!=e&&(u+="skip="+encodeURIComponent(""+e)+"&"),null!=r&&(u+="take="+encodeURIComponent(""+r)+"&"),null!=p&&(u+="sorting="+encodeURIComponent(""+p)+"&"),null!=s&&(u+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(c)).pipe(n.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(n.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetAllProductLinks(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetAllProductLinks(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProductLinks=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductLink=function(e,r,p,s){var a=this,i=this.baseUrl+"/api/storefront/v1/product-links/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="productLinkVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(i+="productVersionId="+encodeURIComponent(""+p)+"&"),null!=s&&(i+="tenantId="+encodeURIComponent(""+s)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(u)).pipe(n.mergeMap((function(e){return a.http.request("get",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processGetProductLink(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processGetProductLink(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductLink=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductSummary=function(e,r,p,s,a,i){var u=this,c=this.baseUrl+"/api/storefront/v1/product-links/{id}/summary?";if(null==e)throw new Error("The parameter 'id' must be defined.");c=c.replace("{id}",encodeURIComponent(""+e)),null!=r&&(c+="productLinkVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(c+="productVersionId="+encodeURIComponent(""+p)+"&"),null!=s&&(c+="productVariantId="+encodeURIComponent(""+s)+"&"),null!=a&&(c+="sku="+encodeURIComponent(""+a)+"&"),null!=i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(l)).pipe(n.mergeMap((function(e){return u.http.request("get",c,e)}))).pipe(n.mergeMap((function(e){return u.transformResult(c,e,(function(e){return u.processGetProductSummary(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return u.transformResult(c,e,(function(e){return u.processGetProductSummary(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductSummary=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getPersonalizationWorkflow=function(e,r,p,s,a){var i=this,u=this.baseUrl+"/api/storefront/v1/product-links/{id}/personalization-workflow?";if(null==e)throw new Error("The parameter 'id' must be defined.");u=u.replace("{id}",encodeURIComponent(""+e)),null!=r&&(u+="productLinkVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(u+="productVersionId="+encodeURIComponent(""+p)+"&"),null!=s&&(u+="productFilterId="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(c)).pipe(n.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(n.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetPersonalizationWorkflow(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetPersonalizationWorkflow(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetPersonalizationWorkflow=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);v.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new v(r.ɵɵinject(l),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:l,decorators:[{type:r.Inject,args:[l]}]},{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,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAll=function(e,r,p,s,a,i,u,c,l,f,d,m,h,v){var y=this,g=this.baseUrl+"/api/storefront/v1/product-references?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");g+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(g+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(g+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(g+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(g+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(g+="productBundleId="+encodeURIComponent(""+i)+"&"),null!=u&&(g+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(g+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(g+="sorting="+encodeURIComponent(""+l)+"&"),null!=f&&(g+="search="+encodeURIComponent(""+f)+"&"),null!=d&&(g+="sku="+encodeURIComponent(""+d)+"&"),null!=m&&m&&m.forEach((function(e){g+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(g+="customFields="+encodeURIComponent(""+h)+"&"),null!=v&&(g+="tenantId="+encodeURIComponent(""+v)+"&"),g=g.replace(/[?&]$/,"");var R={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(R)).pipe(n.mergeMap((function(e){return y.http.request("get",g,e)}))).pipe(n.mergeMap((function(e){return y.transformResult(g,e,(function(e){return y.processGetAll(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return y.transformResult(g,e,(function(e){return y.processGetAll(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAllProductSpecifications=function(e,r,p,s,a,i,u,c,l,f,d,m,h,v){var y=this,g=this.baseUrl+"/api/storefront/v1/product-references/product-specifications?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");g+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(g+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(g+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(g+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(g+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(g+="productBundleId="+encodeURIComponent(""+i)+"&"),null!=u&&(g+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(g+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(g+="sorting="+encodeURIComponent(""+l)+"&"),null!=f&&(g+="search="+encodeURIComponent(""+f)+"&"),null!=d&&(g+="sku="+encodeURIComponent(""+d)+"&"),null!=m&&m&&m.forEach((function(e){g+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(g+="customFields="+encodeURIComponent(""+h)+"&"),null!=v&&(g+="tenantId="+encodeURIComponent(""+v)+"&"),g=g.replace(/[?&]$/,"");var R={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(R)).pipe(n.mergeMap((function(e){return y.http.request("get",g,e)}))).pipe(n.mergeMap((function(e){return y.transformResult(g,e,(function(e){return y.processGetAllProductSpecifications(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return y.transformResult(g,e,(function(e){return y.processGetAllProductSpecifications(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProductSpecifications=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAllProducts=function(e,r,p,s,a,i,u,c,l,f,d,m,h,v){var y=this,g=this.baseUrl+"/api/storefront/v1/product-references/products?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");g+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(g+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(g+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(g+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(g+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(g+="productBundleId="+encodeURIComponent(""+i)+"&"),null!=u&&(g+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(g+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(g+="sorting="+encodeURIComponent(""+l)+"&"),null!=f&&(g+="search="+encodeURIComponent(""+f)+"&"),null!=d&&(g+="sku="+encodeURIComponent(""+d)+"&"),null!=m&&m&&m.forEach((function(e){g+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(g+="customFields="+encodeURIComponent(""+h)+"&"),null!=v&&(g+="tenantId="+encodeURIComponent(""+v)+"&"),g=g.replace(/[?&]$/,"");var R={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(R)).pipe(n.mergeMap((function(e){return y.http.request("get",g,e)}))).pipe(n.mergeMap((function(e){return y.transformResult(g,e,(function(e){return y.processGetAllProducts(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return y.transformResult(g,e,(function(e){return y.processGetAllProducts(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProducts=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAllProductLinks=function(e,r,p,s,a,i,u,c,l,f,d,m,h,v){var y=this,g=this.baseUrl+"/api/storefront/v1/product-references/product-links?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");g+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(g+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(g+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(g+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(g+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(g+="productBundleId="+encodeURIComponent(""+i)+"&"),null!=u&&(g+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(g+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(g+="sorting="+encodeURIComponent(""+l)+"&"),null!=f&&(g+="search="+encodeURIComponent(""+f)+"&"),null!=d&&(g+="sku="+encodeURIComponent(""+d)+"&"),null!=m&&m&&m.forEach((function(e){g+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(g+="customFields="+encodeURIComponent(""+h)+"&"),null!=v&&(g+="tenantId="+encodeURIComponent(""+v)+"&"),g=g.replace(/[?&]$/,"");var R={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(R)).pipe(n.mergeMap((function(e){return y.http.request("get",g,e)}))).pipe(n.mergeMap((function(e){return y.transformResult(g,e,(function(e){return y.processGetAllProductLinks(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return y.transformResult(g,e,(function(e){return y.processGetAllProductLinks(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProductLinks=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAllProductBundles=function(e,r,p,s,a,i,u,c,l,f,d,m,h,v){var y=this,g=this.baseUrl+"/api/storefront/v1/product-references/product-bundles?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");g+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(g+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(g+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(g+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(g+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(g+="productBundleId="+encodeURIComponent(""+i)+"&"),null!=u&&(g+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(g+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(g+="sorting="+encodeURIComponent(""+l)+"&"),null!=f&&(g+="search="+encodeURIComponent(""+f)+"&"),null!=d&&(g+="sku="+encodeURIComponent(""+d)+"&"),null!=m&&m&&m.forEach((function(e){g+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(g+="customFields="+encodeURIComponent(""+h)+"&"),null!=v&&(g+="tenantId="+encodeURIComponent(""+v)+"&"),g=g.replace(/[?&]$/,"");var R={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(R)).pipe(n.mergeMap((function(e){return y.http.request("get",g,e)}))).pipe(n.mergeMap((function(e){return y.transformResult(g,e,(function(e){return y.processGetAllProductBundles(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return y.transformResult(g,e,(function(e){return y.processGetAllProductBundles(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProductBundles=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.get=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGet(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGet(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGet=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductSpecification=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProductSpecification(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProductSpecification(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductSpecification=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProduct=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product?";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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProduct(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProduct(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProduct=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductSummary=function(e,r,p,s,a){var i=this,u=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-summary?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(u=u.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");u+="storefrontId="+encodeURIComponent(""+r)+"&",null!=p&&(u+="productVariantId="+encodeURIComponent(""+p)+"&"),null!=s&&(u+="sku="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(c)).pipe(n.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(n.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetProductSummary(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetProductSummary(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductSummary=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductLink=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-link?";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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProductLink(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProductLink(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductLink=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductBundle=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-bundle?";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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProductBundle(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProductBundle(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductBundle=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductCostDetails=function(e,r,p,s,a,i,u){var c=this,l=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-cost-details?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(l=l.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'sku' must be defined and cannot be null.");if(l+="sku="+encodeURIComponent(""+r)+"&",null==p)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");if(l+="storefrontId="+encodeURIComponent(""+p)+"&",null!=s&&(l+="storefrontUserId="+encodeURIComponent(""+s)+"&"),null!=a&&(l+="currencyCode="+encodeURIComponent(""+a)+"&"),null===i)throw new Error("The parameter 'quantity' cannot be null.");void 0!==i&&(l+="quantity="+encodeURIComponent(""+i)+"&"),null!=u&&(l+="tenantId="+encodeURIComponent(""+u)+"&"),l=l.replace(/[?&]$/,"");var f={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(f)).pipe(n.mergeMap((function(e){return c.http.request("get",l,e)}))).pipe(n.mergeMap((function(e){return c.transformResult(l,e,(function(e){return c.processGetProductCostDetails(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return c.transformResult(l,e,(function(e){return c.processGetProductCostDetails(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductCostDetails=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getPersonalizationWorkflow=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetPersonalizationWorkflow(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetPersonalizationWorkflow(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetPersonalizationWorkflow=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);y.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new y(r.ɵɵinject(l),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:l,decorators:[{type:r.Inject,args:[l]}]},{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,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAllProducts=function(e,r,p,s,a,i,u,c){var l=this,f=this.baseUrl+"/api/storefront/v1/products?";null!=e&&(f+="skip="+encodeURIComponent(""+e)+"&"),null!=r&&(f+="take="+encodeURIComponent(""+r)+"&"),null!=p&&(f+="sorting="+encodeURIComponent(""+p)+"&"),null!=s&&(f+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(f+="sku="+encodeURIComponent(""+a)+"&"),null!=i&&i&&i.forEach((function(e){f+="tags="+encodeURIComponent(""+e)+"&"})),null!=u&&(f+="customFields="+encodeURIComponent(""+u)+"&"),null!=c&&(f+="tenantId="+encodeURIComponent(""+c)+"&"),f=f.replace(/[?&]$/,"");var d={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(d)).pipe(n.mergeMap((function(e){return l.http.request("get",f,e)}))).pipe(n.mergeMap((function(e){return l.transformResult(f,e,(function(e){return l.processGetAllProducts(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return l.transformResult(f,e,(function(e){return l.processGetAllProducts(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProducts=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProduct=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/products/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProduct(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProduct(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProduct=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductSummary=function(e,r,p,s,a,i){var u=this,c=this.baseUrl+"/api/storefront/v1/products/{id}/summary?";if(null==e)throw new Error("The parameter 'id' must be defined.");c=c.replace("{id}",encodeURIComponent(""+e)),null!=r&&(c+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(c+="productLinkId="+encodeURIComponent(""+p)+"&"),null!=s&&(c+="productVariantId="+encodeURIComponent(""+s)+"&"),null!=a&&(c+="sku="+encodeURIComponent(""+a)+"&"),null!=i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(l)).pipe(n.mergeMap((function(e){return u.http.request("get",c,e)}))).pipe(n.mergeMap((function(e){return u.transformResult(c,e,(function(e){return u.processGetProductSummary(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return u.transformResult(c,e,(function(e){return u.processGetProductSummary(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductSummary=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductOptions=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/products/{id}/options?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProductOptions(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProductOptions(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductOptions=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAllProductOptions=function(e){var r=this,p=this.baseUrl+"/api/storefront/v1/products/options?";null!=e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return r.http.request("get",p,e)}))).pipe(n.mergeMap((function(e){return r.transformResult(p,e,(function(e){return r.processGetAllProductOptions(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return r.transformResult(p,e,(function(e){return r.processGetAllProductOptions(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProductOptions=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductLinks=function(e,r,p,s,a,i,u){var c=this,l=this.baseUrl+"/api/storefront/v1/products/{id}/links?";if(null==e)throw new Error("The parameter 'id' must be defined.");l=l.replace("{id}",encodeURIComponent(""+e)),null!=r&&(l+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(l+="skip="+encodeURIComponent(""+p)+"&"),null!=s&&(l+="take="+encodeURIComponent(""+s)+"&"),null!=a&&(l+="sorting="+encodeURIComponent(""+a)+"&"),null!=i&&(l+="search="+encodeURIComponent(""+i)+"&"),null!=u&&(l+="tenantId="+encodeURIComponent(""+u)+"&"),l=l.replace(/[?&]$/,"");var f={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(f)).pipe(n.mergeMap((function(e){return c.http.request("get",l,e)}))).pipe(n.mergeMap((function(e){return c.transformResult(l,e,(function(e){return c.processGetProductLinks(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return c.transformResult(l,e,(function(e){return c.processGetProductLinks(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductLinks=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductLink=function(e,r,p,s){var a=this,i=this.baseUrl+"/api/storefront/v1/products/{id}/links/{productLinkId}?";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 'productLinkId' must be defined.");i=i.replace("{productLinkId}",encodeURIComponent(""+r)),null!=p&&(i+="productVersionId="+encodeURIComponent(""+p)+"&"),null!=s&&(i+="tenantId="+encodeURIComponent(""+s)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(u)).pipe(n.mergeMap((function(e){return a.http.request("get",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processGetProductLink(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processGetProductLink(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductLink=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductVariants=function(e,r,p,s,a,i,u,c,l){var f=this,d=this.baseUrl+"/api/storefront/v1/products/{id}/variants?";if(null==e)throw new Error("The parameter 'id' must be defined.");d=d.replace("{id}",encodeURIComponent(""+e)),null!=r&&(d+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(d+="skip="+encodeURIComponent(""+p)+"&"),null!=s&&(d+="take="+encodeURIComponent(""+s)+"&"),null!=a&&(d+="options="+encodeURIComponent(""+a)+"&"),null!=i&&(d+="productFilterId="+encodeURIComponent(""+i)+"&"),null!=u&&(d+="takeAvailableOnly="+encodeURIComponent(""+u)+"&"),null!=c&&(d+="sku="+encodeURIComponent(""+c)+"&"),null!=l&&(d+="tenantId="+encodeURIComponent(""+l)+"&"),d=d.replace(/[?&]$/,"");var m={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(m)).pipe(n.mergeMap((function(e){return f.http.request("get",d,e)}))).pipe(n.mergeMap((function(e){return f.transformResult(d,e,(function(e){return f.processGetProductVariants(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return f.transformResult(d,e,(function(e){return f.processGetProductVariants(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductVariants=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductVariant=function(e,r,p,s){var a=this,i=this.baseUrl+"/api/storefront/v1/products/{id}/variants/{productVariantId}?";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 'productVariantId' must be defined.");i=i.replace("{productVariantId}",encodeURIComponent(""+r)),null!=p&&(i+="productVersionId="+encodeURIComponent(""+p)+"&"),null!=s&&(i+="tenantId="+encodeURIComponent(""+s)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(u)).pipe(n.mergeMap((function(e){return a.http.request("get",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processGetProductVariant(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processGetProductVariant(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductVariant=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductVariantDesigns=function(e,r,p,s,a,i,u,c,l,f,d,m,h){var v=this,y=this.baseUrl+"/api/storefront/v1/products/{id}/variant-designs?";if(null==e)throw new Error("The parameter 'id' must be defined.");y=y.replace("{id}",encodeURIComponent(""+e)),null!=r&&(y+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="productVariantId="+encodeURIComponent(""+p)+"&"),null!=s&&(y+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(y+="designCustomFields="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="designPath="+encodeURIComponent(""+i)+"&"),null!=u&&(y+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(y+="options="+encodeURIComponent(""+l)+"&"),null!=f&&(y+="productFilterId="+encodeURIComponent(""+f)+"&"),null!=d&&(y+="takeAvailableOnly="+encodeURIComponent(""+d)+"&"),null!=m&&(y+="sku="+encodeURIComponent(""+m)+"&"),null!=h&&(y+="tenantId="+encodeURIComponent(""+h)+"&"),y=y.replace(/[?&]$/,"");var g={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(g)).pipe(n.mergeMap((function(e){return v.http.request("get",y,e)}))).pipe(n.mergeMap((function(e){return v.transformResult(y,e,(function(e){return v.processGetProductVariantDesigns(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return v.transformResult(y,e,(function(e){return v.processGetProductVariantDesigns(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductVariantDesigns=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductVariantMockups=function(e,r,p,s,a,i,u,c,l,f,d,m,h){var v=this,y=this.baseUrl+"/api/storefront/v1/products/{id}/variant-mockups?";if(null==e)throw new Error("The parameter 'id' must be defined.");y=y.replace("{id}",encodeURIComponent(""+e)),null!=r&&(y+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="productVariantId="+encodeURIComponent(""+p)+"&"),null!=s&&(y+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(y+="mockupCustomFields="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="mockupPath="+encodeURIComponent(""+i)+"&"),null!=u&&(y+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(y+="options="+encodeURIComponent(""+l)+"&"),null!=f&&(y+="productFilterId="+encodeURIComponent(""+f)+"&"),null!=d&&(y+="takeAvailableOnly="+encodeURIComponent(""+d)+"&"),null!=m&&(y+="sku="+encodeURIComponent(""+m)+"&"),null!=h&&(y+="tenantId="+encodeURIComponent(""+h)+"&"),y=y.replace(/[?&]$/,"");var g={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(g)).pipe(n.mergeMap((function(e){return v.http.request("get",y,e)}))).pipe(n.mergeMap((function(e){return v.transformResult(y,e,(function(e){return v.processGetProductVariantMockups(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return v.transformResult(y,e,(function(e){return v.processGetProductVariantMockups(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductVariantMockups=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductVariantDocuments=function(e,r,p,s,a,i,u,c,l,f,d,m,h){var v=this,y=this.baseUrl+"/api/storefront/v1/products/{id}/variant-documents?";if(null==e)throw new Error("The parameter 'id' must be defined.");y=y.replace("{id}",encodeURIComponent(""+e)),null!=r&&(y+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="productVariantId="+encodeURIComponent(""+p)+"&"),null!=s&&(y+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(y+="documentCustomFields="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="documentPath="+encodeURIComponent(""+i)+"&"),null!=u&&(y+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(y+="options="+encodeURIComponent(""+l)+"&"),null!=f&&(y+="productFilterId="+encodeURIComponent(""+f)+"&"),null!=d&&(y+="takeAvailableOnly="+encodeURIComponent(""+d)+"&"),null!=m&&(y+="sku="+encodeURIComponent(""+m)+"&"),null!=h&&(y+="tenantId="+encodeURIComponent(""+h)+"&"),y=y.replace(/[?&]$/,"");var g={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(g)).pipe(n.mergeMap((function(e){return v.http.request("get",y,e)}))).pipe(n.mergeMap((function(e){return v.transformResult(y,e,(function(e){return v.processGetProductVariantDocuments(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return v.transformResult(y,e,(function(e){return v.processGetProductVariantDocuments(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductVariantDocuments=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.updateProductVariantResources=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/products/{id}/update-variant-resources?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processUpdateProductVariantResources(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processUpdateProductVariantResources(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processUpdateProductVariantResources=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAvailableProductTags=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/products/available-tags?";null!=e&&(s+="search="+encodeURIComponent(""+e)+"&"),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetAvailableProductTags(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetAvailableProductTags(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAvailableProductTags=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getPersonalizationWorkflow=function(e,r,p,s,a){var i=this,u=this.baseUrl+"/api/storefront/v1/products/{id}/personalization-workflow?";if(null==e)throw new Error("The parameter 'id' must be defined.");u=u.replace("{id}",encodeURIComponent(""+e)),null!=r&&(u+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(u+="productLinkId="+encodeURIComponent(""+p)+"&"),null!=s&&(u+="productFilterId="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(c)).pipe(n.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(n.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetPersonalizationWorkflow(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetPersonalizationWorkflow(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetPersonalizationWorkflow=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);g.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new g(r.ɵɵinject(l),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:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var R=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAll=function(e,r,p,s,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!=p&&(u+="sorting="+encodeURIComponent(""+p)+"&"),null!=s&&(u+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(c)).pipe(n.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(n.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetAll(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetAll(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.get=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/product-specifications/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGet(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGet(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGet=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getPersonalizationWorkflow=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/product-specifications/{id}/personalization-workflow?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetPersonalizationWorkflow(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetPersonalizationWorkflow(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetPersonalizationWorkflow=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);R.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new R(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:R,providedIn:"root"}),R.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],R.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{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,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAll=function(e,r,p,s,a,i,u,c,l,f,d,m,h){var v=this,y=this.baseUrl+"/api/storefront/v1/projects?";if(null!=e&&(y+="ownerId="+encodeURIComponent(""+e)+"&"),null!=r&&(y+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="status="+encodeURIComponent(""+p)+"&"),null===s)throw new Error("The parameter 'datePeriod' cannot be null.");if(void 0!==s&&(y+="datePeriod="+encodeURIComponent(""+s)+"&"),null!=a&&(y+="skip="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="take="+encodeURIComponent(""+i)+"&"),null!=u&&(y+="sorting="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="search="+encodeURIComponent(""+c)+"&"),null!=l&&(y+="orderId="+encodeURIComponent(""+l)+"&"),null!=f&&(y+="processingStatus="+encodeURIComponent(""+f)+"&"),null===d)throw new Error("The parameter 'includeObsolete' cannot be null.");void 0!==d&&(y+="includeObsolete="+encodeURIComponent(""+d)+"&"),null!=m&&(y+="storefrontId="+encodeURIComponent(""+m)+"&"),null!=h&&(y+="tenantId="+encodeURIComponent(""+h)+"&"),y=y.replace(/[?&]$/,"");var g={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(g)).pipe(n.mergeMap((function(e){return v.http.request("get",y,e)}))).pipe(n.mergeMap((function(e){return v.transformResult(y,e,(function(e){return v.processGetAll(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return v.transformResult(y,e,(function(e){return v.processGetAll(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.get=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/projects/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGet(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGet(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGet=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.delete=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/projects/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("delete",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processDelete(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processDelete(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processDelete=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getPreview=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/projects/{id}/preview?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetPreview(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetPreview(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetPreview=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}if(200===a||206===a){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return t.of({fileName:v,data:i,status:a,headers:c})}return 404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getPreviewUrl=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/projects/{id}/preview-url?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetPreviewUrl(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetPreviewUrl(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetPreviewUrl=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:e,t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.createWithSingleItem=function(e,r,p){var s=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(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processCreateWithSingleItem(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processCreateWithSingleItem(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processCreateWithSingleItem=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 201===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Bad Request",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.createWithMultipleItems=function(e,r,p){var s=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(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processCreateWithMultipleItems(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processCreateWithMultipleItems(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processCreateWithMultipleItems=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 201===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Bad Request",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.createByRenderHiResScenario=function(e,r,p){var s=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(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processCreateByRenderHiResScenario(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processCreateByRenderHiResScenario(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processCreateByRenderHiResScenario=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 201===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Bad Request",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.createBySpecificPipelineScenario=function(e,r,p){var s=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(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processCreateBySpecificPipelineScenario(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processCreateBySpecificPipelineScenario(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processCreateBySpecificPipelineScenario=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 201===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Bad Request",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAvailableTransitions=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/projects/{id}/transitions?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetAvailableTransitions(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetAvailableTransitions(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAvailableTransitions=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Bad Request",a,e,c,r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.changeStatus=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processChangeStatus(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processChangeStatus(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processChangeStatus=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Bad Request",a,e,c,r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.forceStatus=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processForceStatus(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processForceStatus(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processForceStatus=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Bad Request",a,e,c,r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.batchDelete=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/projects/batch-delete?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var a={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("delete",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processBatchDelete(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processBatchDelete(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processBatchDelete=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAllStatuses=function(e){var r=this,p=this.baseUrl+"/api/storefront/v1/projects/statuses?";null!=e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return r.http.request("get",p,e)}))).pipe(n.mergeMap((function(e){return r.transformResult(p,e,(function(e){return r.processGetAllStatuses(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return r.transformResult(p,e,(function(e){return r.processGetAllStatuses(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllStatuses=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAllTransitions=function(e){var r=this,p=this.baseUrl+"/api/storefront/v1/projects/transitions?";null!=e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return r.http.request("get",p,e)}))).pipe(n.mergeMap((function(e){return r.transformResult(p,e,(function(e){return r.processGetAllTransitions(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return r.transformResult(p,e,(function(e){return r.processGetAllTransitions(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllTransitions=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProjectProcessingResults=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProjectProcessingResults(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProjectProcessingResults(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProjectProcessingResults=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.resumeProjectProcessing=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processResumeProjectProcessing(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processResumeProjectProcessing(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processResumeProjectProcessing=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 204===a?D(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.restartProjectProcessing=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processRestartProjectProcessing(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processRestartProjectProcessing(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processRestartProjectProcessing=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 204===a?D(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProjectOrder=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/projects/{id}/order?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetProjectOrder(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetProjectOrder(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProjectOrder=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.attachDataToProjectOrder=function(e,r,p,s){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!=p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return t.from(this.transformOptions(u)).pipe(n.mergeMap((function(e){return a.http.request("post",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processAttachDataToProjectOrder(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processAttachDataToProjectOrder(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processAttachDataToProjectOrder=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 204===a?D(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);b.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new b(r.ɵɵinject(l),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:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var I=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAll=function(e,r,p,s,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!=p&&(c+="take="+encodeURIComponent(""+p)+"&"),null!=s&&(c+="sorting="+encodeURIComponent(""+s)+"&"),null!=a&&(c+="search="+encodeURIComponent(""+a)+"&"),null!=i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(l)).pipe(n.mergeMap((function(e){return u.http.request("get",c,e)}))).pipe(n.mergeMap((function(e){return u.transformResult(c,e,(function(e){return u.processGetAll(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return u.transformResult(c,e,(function(e){return u.processGetAll(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.get=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/storefronts/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGet(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGet(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGet=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);I.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new I(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:I,providedIn:"root"}),I.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],I.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var M=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAll=function(e,r,p,s,a,i,u,c){var l=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!=p&&(f+="skip="+encodeURIComponent(""+p)+"&"),null!=s&&(f+="take="+encodeURIComponent(""+s)+"&"),null!=a&&(f+="sorting="+encodeURIComponent(""+a)+"&"),null!=i&&(f+="search="+encodeURIComponent(""+i)+"&"),null!=u&&(f+="includeAnonymous="+encodeURIComponent(""+u)+"&"),null!=c&&(f+="tenantId="+encodeURIComponent(""+c)+"&"),f=f.replace(/[?&]$/,"");var d={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(d)).pipe(n.mergeMap((function(e){return l.http.request("get",f,e)}))).pipe(n.mergeMap((function(e){return l.transformResult(f,e,(function(e){return l.processGetAll(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return l.transformResult(f,e,(function(e){return l.processGetAll(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.create=function(e,r,p){var s=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(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processCreate(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processCreate(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processCreate=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 201===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.get=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGet(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGet(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGet=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.register=function(e,r,p){var s=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(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processRegister(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processRegister(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processRegister=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.mergeAnonymous=function(e,r,p){var s=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(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processMergeAnonymous(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processMergeAnonymous(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processMergeAnonymous=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getToken=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetToken(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetToken(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetToken=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:e,t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);M.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new M(r.ɵɵinject(l),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:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var w,U,C,P,j,H,E,O,S,A,k,x,N,T,B,G,J,F,z,q,$=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getApplicationsInfo=function(e){var r=this,p=this.baseUrl+"/api/storefront/v1/tenant-info/applications?";null!=e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return r.http.request("get",p,e)}))).pipe(n.mergeMap((function(e){return r.transformResult(p,e,(function(e){return r.processGetApplicationsInfo(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return r.transformResult(p,e,(function(e){return r.processGetApplicationsInfo(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetApplicationsInfo=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getInfo=function(e){var r=this,p=this.baseUrl+"/api/storefront/v1/tenant-info?";null!=e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return r.http.request("get",p,e)}))).pipe(n.mergeMap((function(e){return r.transformResult(p,e,(function(e){return r.processGetInfo(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return r.transformResult(p,e,(function(e){return r.processGetInfo(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetInfo=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getMeasureUnitsInfo=function(e){var r=this,p=this.baseUrl+"/api/storefront/v1/tenant-info/measure-units?";null!=e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return r.http.request("get",p,e)}))).pipe(n.mergeMap((function(e){return r.transformResult(p,e,(function(e){return r.processGetMeasureUnitsInfo(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return r.transformResult(p,e,(function(e){return r.processGetMeasureUnitsInfo(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetMeasureUnitsInfo=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getUsersInfo=function(e){var r=this,p=this.baseUrl+"/api/storefront/v1/tenant-info/users?";null!=e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return r.http.request("get",p,e)}))).pipe(n.mergeMap((function(e){return r.transformResult(p,e,(function(e){return r.processGetUsersInfo(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return r.transformResult(p,e,(function(e){return r.processGetUsersInfo(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetUsersInfo=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);$.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new $(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:$,providedIn:"root"}),$.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],$.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]},(w=e.ProductBundleResourceType||(e.ProductBundleResourceType={})).Custom="Custom",w.Preview="Preview",(U=e.ConflictType||(e.ConflictType={})).NameConflict="NameConflict",U.FolderOverwriteConflict="FolderOverwriteConflict",U.IdConflict="IdConflict",U.GeneralConflict="GeneralConflict",(C=e.AppearanceDataType||(e.AppearanceDataType={})).Radio="Radio",C.Dropdown="Dropdown",C.Chips="Chips",C.ColorGrid="ColorGrid",C.ColorList="ColorList",C.ImageGrid="ImageGrid",C.ImageList="ImageList",(P=e.WorkflowType||(e.WorkflowType={})).UIFramework="UIFramework",P.SimpleEditor="SimpleEditor",P.DesignEditor="DesignEditor",P.WorkflowElements="WorkflowElements",(j=e.ProductLinkResourceType||(e.ProductLinkResourceType={})).Preview="Preview",j.Custom="Custom",(H=e.OptionType||(e.OptionType={})).Simple="Simple",H.Size="Size",H.PageCount="PageCount",(E=e.ProductReferenceType||(e.ProductReferenceType={})).ProductSpecification="ProductSpecification",E.Product="Product",E.ProductLink="ProductLink",E.ProductBundle="ProductBundle",(O=e.ProductVariantResourceType||(e.ProductVariantResourceType={})).Preview="Preview",O.EditorModel="EditorModel",O.Custom="Custom",(S=e.ProductVariantMockupType||(e.ProductVariantMockupType={})).Thumbnail="Thumbnail",S.Editor="Editor",S.Preview="Preview",(A=e.SurfaceUsageType||(e.SurfaceUsageType={})).Individual="Individual",A.Custom="Custom",A.All="All",(k=e.DatePeriod||(e.DatePeriod={})).All="All",k.Today="Today",k.Last7Days="Last7Days",k.Last30Days="Last30Days",(x=e.ProjectProcessingStatus||(e.ProjectProcessingStatus={})).Pending="Pending",x.InProgress="InProgress",x.Completed="Completed",x.Failed="Failed",(N=e.ProjectItemResourceType||(e.ProjectItemResourceType={})).General="General",N.Preview="Preview",N.Hires="Hires",(T=e.ProjectItemProductType||(e.ProjectItemProductType={})).ProductSpecification="ProductSpecification",T.Product="Product",T.ProductLink="ProductLink",(B=e.RenderHiResScenarioOutputFormat||(e.RenderHiResScenarioOutputFormat={})).Pdf="Pdf",B.Jpeg="Jpeg",B.Png="Png",B.Tiff="Tiff",B.Bmp="Bmp",(G=e.RenderHiResScenarioOutputColorSpace||(e.RenderHiResScenarioOutputColorSpace={})).Rgb="Rgb",G.Grayscale="Grayscale",G.Cmyk="Cmyk",(J=e.RenderHiResScenarioOutputFlipMode||(e.RenderHiResScenarioOutputFlipMode={})).None="None",J.Horizontal="Horizontal",J.Vertical="Vertical",J.Both="Both",(F=e.RenderHiResScenarioOutputRotateMode||(e.RenderHiResScenarioOutputRotateMode={})).None="None",F.Rotate90="Rotate90",F.Rotate180="Rotate180",F.Rotate270="Rotate270",F.Auto="Auto",(z=e.OrderDataItemValueType||(e.OrderDataItemValueType={})).PlainText="PlainText",z.CommaSeparatedList="CommaSeparatedList",z.SerializedJson="SerializedJson",(q=e.StorefrontType||(e.StorefrontType={})).Custom="Custom",q.ShopifyLegacy="ShopifyLegacy",q.DocketManager="DocketManager",q.CustomSaml="CustomSaml",q.NopCommerce="NopCommerce",q.WooCommerce="WooCommerce",q.Magento="Magento",q.BigCommerce="BigCommerce",q.Shopify="Shopify",q.ShopifyCustom="ShopifyCustom";var V=function(e){function r(r,n,t,o,p){var s=e.call(this)||this;return s.isApiException=!0,s.message=r,s.status=n,s.response=t,s.headers=o,s.result=p,s}return s(r,e),r.isApiException=function(e){return!0===e.isApiException},r}(Error);function L(e,r,n,o,p){return t.throwError(new V(e,r,n,o,p))}function D(e){return new t.Observable((function(r){if(e){var n=new FileReader;n.onload=function(e){r.next(e.target.result),r.complete()},n.readAsText(e)}else r.next(""),r.complete()}))}function W(e,r,n){void 0===n&&(n="ApiKey");var t=new l;return t.apiKey=n,t.apiUrl=r,t.setAuthorizationToken(e),t}var _=function(){function e(){}return e.forRoot=function(r,n,t){return void 0===t&&(t="ApiKey"),{ngModule:e,providers:[{provide:c,useValue:n},{provide:l,useFactory:W.bind(this,r,n,t)}]}},e}();_.decorators=[{type:r.NgModule,args:[{declarations:[],imports:[],exports:[]}]}],e.API_BASE_URL=c,e.ApiClientBase=f,e.ApiClientConfiguration=l,e.ApiException=V,e.BuildInfoApiClient=d,e.CreateApiClientConfiguration=W,e.ProcessingPipelinesApiClient=m,e.ProductBundlesApiClient=h,e.ProductLinksApiClient=v,e.ProductReferencesApiClient=y,e.ProductSpecificationsApiClient=R,e.ProductsApiClient=g,e.ProjectsApiClient=b,e.StorefrontModule=_,e.StorefrontUsersApiClient=M,e.StorefrontsApiClient=I,e.TenantInfoApiClient=$,Object.defineProperty(e,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var p=function(e,r){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])})(e,r)};function s(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}p(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}function a(e,r,n,t){return new(n||(n=Promise))((function(o,p){function s(e){try{i(t.next(e))}catch(e){p(e)}}function a(e){try{i(t.throw(e))}catch(e){p(e)}}function i(e){var r;e.done?o(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(s,a)}i((t=t.apply(e,r||[])).next())}))}function i(e,r){var n,t,o,p,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return p={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(p[Symbol.iterator]=function(){return this}),p;function a(p){return function(a){return function(p){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,t&&(o=2&p[0]?t.return:p[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,p[1])).done)return o;switch(t=0,o&&(p=[2&p[0],o.value]),p[0]){case 0:case 1:o=p;break;case 4:return s.label++,{value:p[1],done:!1};case 5:s.label++,t=p[1],p=[0];continue;case 7:p=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==p[0]&&2!==p[0])){s=0;continue}if(3===p[0]&&(!o||p[1]>o[0]&&p[1]<o[3])){s.label=p[1];break}if(6===p[0]&&s.label<o[1]){s.label=o[1],o=p;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(p);break}o[2]&&s.ops.pop(),s.trys.pop();continue}p=r.call(e,s)}catch(e){p=[6,e],t=0}finally{n=o=0}if(5&p[0])throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}([p,a])}}}Object.create;function u(e){var r="function"==typeof Symbol&&Symbol.iterator,n=r&&e[r],t=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;var c=new r.InjectionToken("API_BASE_URL"),l=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}(),f=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(n){switch(n.label){case 0:return[4,this.configuration.getAuthorizationToken()];case 1:return r=n.sent(),e.headers=null!=r?e.headers.append("authorization","Bearer "+r):e.headers.append("X-API-Key",this.configuration.apiKey),[2,e]}}))}))},e.prototype.getBaseUrl=function(e){return this.configuration.apiUrl.endsWith("/")?this.configuration.apiUrl.slice(0,-1):this.configuration.apiUrl},e.prototype.transformResult=function(e,r,n){return n(r)},e}(),d=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.headInfo=function(){var e=this,r=this.baseUrl+"/api/storefront/v1/info";r=r.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return t.from(this.transformOptions(p)).pipe(n.mergeMap((function(n){return e.http.request("head",r,n)}))).pipe(n.mergeMap((function(n){return e.transformResult(r,n,(function(r){return e.processHeadInfo(r)}))}))).pipe(n.catchError((function(n){if(!(n instanceof o.HttpResponseBase))return t.throwError(n);try{return e.transformResult(r,n,(function(r){return e.processHeadInfo(r)}))}catch(e){return t.throwError(e)}})))},r.prototype.processHeadInfo=function(e){var r,p,s=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()),l=c.next();!l.done;l=c.next()){var f=l.value;i[f]=e.headers.get(f)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=c.return)&&p.call(c)}finally{if(r)throw r.error}}return 200===s?W(a).pipe(n.mergeMap((function(e){return t.of(null)}))):200!==s&&204!==s?W(a).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",s,e,i)}))):t.of(null)},r.prototype.getInfo=function(){var e=this,r=this.baseUrl+"/api/storefront/v1/info";r=r.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(p)).pipe(n.mergeMap((function(n){return e.http.request("get",r,n)}))).pipe(n.mergeMap((function(n){return e.transformResult(r,n,(function(r){return e.processGetInfo(r)}))}))).pipe(n.catchError((function(n){if(!(n instanceof o.HttpResponseBase))return t.throwError(n);try{return e.transformResult(r,n,(function(r){return e.processGetInfo(r)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetInfo=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);d.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new d(r.ɵɵinject(l),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:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var m=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAll=function(e,r,p,s){var a=this,i=this.baseUrl+"/api/storefront/v1/processing-pipelines?";null!=e&&(i+="skip="+encodeURIComponent(""+e)+"&"),null!=r&&(i+="take="+encodeURIComponent(""+r)+"&"),null!=p&&(i+="search="+encodeURIComponent(""+p)+"&"),null!=s&&(i+="tenantId="+encodeURIComponent(""+s)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(u)).pipe(n.mergeMap((function(e){return a.http.request("get",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processGetAll(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processGetAll(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.get=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/processing-pipelines/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGet(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGet(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGet=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);m.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new m(r.ɵɵinject(l),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:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var h=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAllProductBundles=function(e,r,p,s,a,i){var u=this,c=this.baseUrl+"/api/storefront/v1/product-bundles?";null!=e&&(c+="skip="+encodeURIComponent(""+e)+"&"),null!=r&&(c+="take="+encodeURIComponent(""+r)+"&"),null!=p&&(c+="sorting="+encodeURIComponent(""+p)+"&"),null!=s&&(c+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(c+="customFields="+encodeURIComponent(""+a)+"&"),null!=i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(l)).pipe(n.mergeMap((function(e){return u.http.request("get",c,e)}))).pipe(n.mergeMap((function(e){return u.transformResult(c,e,(function(e){return u.processGetAllProductBundles(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return u.transformResult(c,e,(function(e){return u.processGetAllProductBundles(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProductBundles=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductBundle=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-bundles/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="productBundleVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProductBundle(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProductBundle(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductBundle=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductBundlePersonalizationParameters=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-bundles/{id}/personalization-parameters?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="productBundleVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProductBundlePersonalizationParameters(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProductBundlePersonalizationParameters(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductBundlePersonalizationParameters=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductSummary=function(e,r,p,s,a){var i=this,u=this.baseUrl+"/api/storefront/v1/product-bundles/{id}/summary?";if(null==e)throw new Error("The parameter 'id' must be defined.");u=u.replace("{id}",encodeURIComponent(""+e)),null!=r&&(u+="productBundleVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(u+="productVariantId="+encodeURIComponent(""+p)+"&"),null!=s&&(u+="sku="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(c)).pipe(n.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(n.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetProductSummary(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetProductSummary(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductSummary=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getPersonalizationWorkflow=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-bundles/{id}/personalization-workflow?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="productBundleVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetPersonalizationWorkflow(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetPersonalizationWorkflow(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetPersonalizationWorkflow=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);h.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new h(r.ɵɵinject(l),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:l,decorators:[{type:r.Inject,args:[l]}]},{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,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAllProductLinks=function(e,r,p,s,a){var i=this,u=this.baseUrl+"/api/storefront/v1/product-links?";null!=e&&(u+="skip="+encodeURIComponent(""+e)+"&"),null!=r&&(u+="take="+encodeURIComponent(""+r)+"&"),null!=p&&(u+="sorting="+encodeURIComponent(""+p)+"&"),null!=s&&(u+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(c)).pipe(n.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(n.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetAllProductLinks(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetAllProductLinks(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProductLinks=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductLink=function(e,r,p,s){var a=this,i=this.baseUrl+"/api/storefront/v1/product-links/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="productLinkVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(i+="productVersionId="+encodeURIComponent(""+p)+"&"),null!=s&&(i+="tenantId="+encodeURIComponent(""+s)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(u)).pipe(n.mergeMap((function(e){return a.http.request("get",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processGetProductLink(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processGetProductLink(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductLink=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductLinkPersonalizationParameters=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-links/{id}/personalization-parameters?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="productLinkVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProductLinkPersonalizationParameters(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProductLinkPersonalizationParameters(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductLinkPersonalizationParameters=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductSummary=function(e,r,p,s,a,i){var u=this,c=this.baseUrl+"/api/storefront/v1/product-links/{id}/summary?";if(null==e)throw new Error("The parameter 'id' must be defined.");c=c.replace("{id}",encodeURIComponent(""+e)),null!=r&&(c+="productLinkVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(c+="productVersionId="+encodeURIComponent(""+p)+"&"),null!=s&&(c+="productVariantId="+encodeURIComponent(""+s)+"&"),null!=a&&(c+="sku="+encodeURIComponent(""+a)+"&"),null!=i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(l)).pipe(n.mergeMap((function(e){return u.http.request("get",c,e)}))).pipe(n.mergeMap((function(e){return u.transformResult(c,e,(function(e){return u.processGetProductSummary(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return u.transformResult(c,e,(function(e){return u.processGetProductSummary(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductSummary=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getPersonalizationWorkflow=function(e,r,p,s,a){var i=this,u=this.baseUrl+"/api/storefront/v1/product-links/{id}/personalization-workflow?";if(null==e)throw new Error("The parameter 'id' must be defined.");u=u.replace("{id}",encodeURIComponent(""+e)),null!=r&&(u+="productLinkVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(u+="productVersionId="+encodeURIComponent(""+p)+"&"),null!=s&&(u+="productFilterId="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(c)).pipe(n.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(n.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetPersonalizationWorkflow(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetPersonalizationWorkflow(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetPersonalizationWorkflow=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);v.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new v(r.ɵɵinject(l),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:l,decorators:[{type:r.Inject,args:[l]}]},{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,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAll=function(e,r,p,s,a,i,u,c,l,f,d,m,h,v){var y=this,g=this.baseUrl+"/api/storefront/v1/product-references?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");g+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(g+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(g+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(g+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(g+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(g+="productBundleId="+encodeURIComponent(""+i)+"&"),null!=u&&(g+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(g+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(g+="sorting="+encodeURIComponent(""+l)+"&"),null!=f&&(g+="search="+encodeURIComponent(""+f)+"&"),null!=d&&(g+="sku="+encodeURIComponent(""+d)+"&"),null!=m&&m&&m.forEach((function(e){g+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(g+="customFields="+encodeURIComponent(""+h)+"&"),null!=v&&(g+="tenantId="+encodeURIComponent(""+v)+"&"),g=g.replace(/[?&]$/,"");var R={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(R)).pipe(n.mergeMap((function(e){return y.http.request("get",g,e)}))).pipe(n.mergeMap((function(e){return y.transformResult(g,e,(function(e){return y.processGetAll(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return y.transformResult(g,e,(function(e){return y.processGetAll(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAllProductSpecifications=function(e,r,p,s,a,i,u,c,l,f,d,m,h,v){var y=this,g=this.baseUrl+"/api/storefront/v1/product-references/product-specifications?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");g+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(g+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(g+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(g+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(g+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(g+="productBundleId="+encodeURIComponent(""+i)+"&"),null!=u&&(g+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(g+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(g+="sorting="+encodeURIComponent(""+l)+"&"),null!=f&&(g+="search="+encodeURIComponent(""+f)+"&"),null!=d&&(g+="sku="+encodeURIComponent(""+d)+"&"),null!=m&&m&&m.forEach((function(e){g+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(g+="customFields="+encodeURIComponent(""+h)+"&"),null!=v&&(g+="tenantId="+encodeURIComponent(""+v)+"&"),g=g.replace(/[?&]$/,"");var R={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(R)).pipe(n.mergeMap((function(e){return y.http.request("get",g,e)}))).pipe(n.mergeMap((function(e){return y.transformResult(g,e,(function(e){return y.processGetAllProductSpecifications(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return y.transformResult(g,e,(function(e){return y.processGetAllProductSpecifications(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProductSpecifications=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAllProducts=function(e,r,p,s,a,i,u,c,l,f,d,m,h,v){var y=this,g=this.baseUrl+"/api/storefront/v1/product-references/products?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");g+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(g+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(g+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(g+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(g+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(g+="productBundleId="+encodeURIComponent(""+i)+"&"),null!=u&&(g+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(g+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(g+="sorting="+encodeURIComponent(""+l)+"&"),null!=f&&(g+="search="+encodeURIComponent(""+f)+"&"),null!=d&&(g+="sku="+encodeURIComponent(""+d)+"&"),null!=m&&m&&m.forEach((function(e){g+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(g+="customFields="+encodeURIComponent(""+h)+"&"),null!=v&&(g+="tenantId="+encodeURIComponent(""+v)+"&"),g=g.replace(/[?&]$/,"");var R={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(R)).pipe(n.mergeMap((function(e){return y.http.request("get",g,e)}))).pipe(n.mergeMap((function(e){return y.transformResult(g,e,(function(e){return y.processGetAllProducts(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return y.transformResult(g,e,(function(e){return y.processGetAllProducts(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProducts=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAllProductLinks=function(e,r,p,s,a,i,u,c,l,f,d,m,h,v){var y=this,g=this.baseUrl+"/api/storefront/v1/product-references/product-links?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");g+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(g+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(g+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(g+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(g+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(g+="productBundleId="+encodeURIComponent(""+i)+"&"),null!=u&&(g+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(g+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(g+="sorting="+encodeURIComponent(""+l)+"&"),null!=f&&(g+="search="+encodeURIComponent(""+f)+"&"),null!=d&&(g+="sku="+encodeURIComponent(""+d)+"&"),null!=m&&m&&m.forEach((function(e){g+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(g+="customFields="+encodeURIComponent(""+h)+"&"),null!=v&&(g+="tenantId="+encodeURIComponent(""+v)+"&"),g=g.replace(/[?&]$/,"");var R={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(R)).pipe(n.mergeMap((function(e){return y.http.request("get",g,e)}))).pipe(n.mergeMap((function(e){return y.transformResult(g,e,(function(e){return y.processGetAllProductLinks(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return y.transformResult(g,e,(function(e){return y.processGetAllProductLinks(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProductLinks=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAllProductBundles=function(e,r,p,s,a,i,u,c,l,f,d,m,h,v){var y=this,g=this.baseUrl+"/api/storefront/v1/product-references/product-bundles?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");g+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(g+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(g+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(g+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(g+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(g+="productBundleId="+encodeURIComponent(""+i)+"&"),null!=u&&(g+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(g+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(g+="sorting="+encodeURIComponent(""+l)+"&"),null!=f&&(g+="search="+encodeURIComponent(""+f)+"&"),null!=d&&(g+="sku="+encodeURIComponent(""+d)+"&"),null!=m&&m&&m.forEach((function(e){g+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(g+="customFields="+encodeURIComponent(""+h)+"&"),null!=v&&(g+="tenantId="+encodeURIComponent(""+v)+"&"),g=g.replace(/[?&]$/,"");var R={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(R)).pipe(n.mergeMap((function(e){return y.http.request("get",g,e)}))).pipe(n.mergeMap((function(e){return y.transformResult(g,e,(function(e){return y.processGetAllProductBundles(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return y.transformResult(g,e,(function(e){return y.processGetAllProductBundles(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProductBundles=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.get=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGet(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGet(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGet=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getPersonalizationParameters=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}/personalization-parameters?";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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetPersonalizationParameters(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetPersonalizationParameters(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetPersonalizationParameters=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductSpecification=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProductSpecification(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProductSpecification(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductSpecification=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProduct=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product?";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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProduct(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProduct(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProduct=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductSummary=function(e,r,p,s,a){var i=this,u=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-summary?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(u=u.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");u+="storefrontId="+encodeURIComponent(""+r)+"&",null!=p&&(u+="productVariantId="+encodeURIComponent(""+p)+"&"),null!=s&&(u+="sku="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(c)).pipe(n.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(n.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetProductSummary(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetProductSummary(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductSummary=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductLink=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-link?";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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProductLink(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProductLink(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductLink=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductBundle=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-bundle?";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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProductBundle(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProductBundle(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductBundle=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductCostDetails=function(e,r,p,s,a,i,u){var c=this,l=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-cost-details?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(l=l.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'sku' must be defined and cannot be null.");if(l+="sku="+encodeURIComponent(""+r)+"&",null==p)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");if(l+="storefrontId="+encodeURIComponent(""+p)+"&",null!=s&&(l+="storefrontUserId="+encodeURIComponent(""+s)+"&"),null!=a&&(l+="currencyCode="+encodeURIComponent(""+a)+"&"),null===i)throw new Error("The parameter 'quantity' cannot be null.");void 0!==i&&(l+="quantity="+encodeURIComponent(""+i)+"&"),null!=u&&(l+="tenantId="+encodeURIComponent(""+u)+"&"),l=l.replace(/[?&]$/,"");var f={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(f)).pipe(n.mergeMap((function(e){return c.http.request("get",l,e)}))).pipe(n.mergeMap((function(e){return c.transformResult(l,e,(function(e){return c.processGetProductCostDetails(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return c.transformResult(l,e,(function(e){return c.processGetProductCostDetails(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductCostDetails=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getPersonalizationWorkflow=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetPersonalizationWorkflow(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetPersonalizationWorkflow(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetPersonalizationWorkflow=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);y.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new y(r.ɵɵinject(l),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:l,decorators:[{type:r.Inject,args:[l]}]},{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,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAllProducts=function(e,r,p,s,a,i,u,c){var l=this,f=this.baseUrl+"/api/storefront/v1/products?";null!=e&&(f+="skip="+encodeURIComponent(""+e)+"&"),null!=r&&(f+="take="+encodeURIComponent(""+r)+"&"),null!=p&&(f+="sorting="+encodeURIComponent(""+p)+"&"),null!=s&&(f+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(f+="sku="+encodeURIComponent(""+a)+"&"),null!=i&&i&&i.forEach((function(e){f+="tags="+encodeURIComponent(""+e)+"&"})),null!=u&&(f+="customFields="+encodeURIComponent(""+u)+"&"),null!=c&&(f+="tenantId="+encodeURIComponent(""+c)+"&"),f=f.replace(/[?&]$/,"");var d={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(d)).pipe(n.mergeMap((function(e){return l.http.request("get",f,e)}))).pipe(n.mergeMap((function(e){return l.transformResult(f,e,(function(e){return l.processGetAllProducts(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return l.transformResult(f,e,(function(e){return l.processGetAllProducts(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProducts=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProduct=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/products/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProduct(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProduct(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProduct=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductSummary=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/products/{id}/personalization-parameters?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProductSummary(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProductSummary(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductSummary=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductSummary2=function(e,r,p,s,a,i){var u=this,c=this.baseUrl+"/api/storefront/v1/products/{id}/summary?";if(null==e)throw new Error("The parameter 'id' must be defined.");c=c.replace("{id}",encodeURIComponent(""+e)),null!=r&&(c+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(c+="productLinkId="+encodeURIComponent(""+p)+"&"),null!=s&&(c+="productVariantId="+encodeURIComponent(""+s)+"&"),null!=a&&(c+="sku="+encodeURIComponent(""+a)+"&"),null!=i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(l)).pipe(n.mergeMap((function(e){return u.http.request("get",c,e)}))).pipe(n.mergeMap((function(e){return u.transformResult(c,e,(function(e){return u.processGetProductSummary2(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return u.transformResult(c,e,(function(e){return u.processGetProductSummary2(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductSummary2=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductOptions=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/products/{id}/options?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProductOptions(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProductOptions(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductOptions=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAllProductOptions=function(e){var r=this,p=this.baseUrl+"/api/storefront/v1/products/options?";null!=e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return r.http.request("get",p,e)}))).pipe(n.mergeMap((function(e){return r.transformResult(p,e,(function(e){return r.processGetAllProductOptions(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return r.transformResult(p,e,(function(e){return r.processGetAllProductOptions(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProductOptions=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductLinks=function(e,r,p,s,a,i,u){var c=this,l=this.baseUrl+"/api/storefront/v1/products/{id}/links?";if(null==e)throw new Error("The parameter 'id' must be defined.");l=l.replace("{id}",encodeURIComponent(""+e)),null!=r&&(l+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(l+="skip="+encodeURIComponent(""+p)+"&"),null!=s&&(l+="take="+encodeURIComponent(""+s)+"&"),null!=a&&(l+="sorting="+encodeURIComponent(""+a)+"&"),null!=i&&(l+="search="+encodeURIComponent(""+i)+"&"),null!=u&&(l+="tenantId="+encodeURIComponent(""+u)+"&"),l=l.replace(/[?&]$/,"");var f={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(f)).pipe(n.mergeMap((function(e){return c.http.request("get",l,e)}))).pipe(n.mergeMap((function(e){return c.transformResult(l,e,(function(e){return c.processGetProductLinks(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return c.transformResult(l,e,(function(e){return c.processGetProductLinks(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductLinks=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductLink=function(e,r,p,s){var a=this,i=this.baseUrl+"/api/storefront/v1/products/{id}/links/{productLinkId}?";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 'productLinkId' must be defined.");i=i.replace("{productLinkId}",encodeURIComponent(""+r)),null!=p&&(i+="productVersionId="+encodeURIComponent(""+p)+"&"),null!=s&&(i+="tenantId="+encodeURIComponent(""+s)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(u)).pipe(n.mergeMap((function(e){return a.http.request("get",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processGetProductLink(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processGetProductLink(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductLink=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductVariants=function(e,r,p,s,a,i,u,c,l){var f=this,d=this.baseUrl+"/api/storefront/v1/products/{id}/variants?";if(null==e)throw new Error("The parameter 'id' must be defined.");d=d.replace("{id}",encodeURIComponent(""+e)),null!=r&&(d+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(d+="skip="+encodeURIComponent(""+p)+"&"),null!=s&&(d+="take="+encodeURIComponent(""+s)+"&"),null!=a&&(d+="options="+encodeURIComponent(""+a)+"&"),null!=i&&(d+="productFilterId="+encodeURIComponent(""+i)+"&"),null!=u&&(d+="takeAvailableOnly="+encodeURIComponent(""+u)+"&"),null!=c&&(d+="sku="+encodeURIComponent(""+c)+"&"),null!=l&&(d+="tenantId="+encodeURIComponent(""+l)+"&"),d=d.replace(/[?&]$/,"");var m={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(m)).pipe(n.mergeMap((function(e){return f.http.request("get",d,e)}))).pipe(n.mergeMap((function(e){return f.transformResult(d,e,(function(e){return f.processGetProductVariants(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return f.transformResult(d,e,(function(e){return f.processGetProductVariants(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductVariants=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductVariant=function(e,r,p,s){var a=this,i=this.baseUrl+"/api/storefront/v1/products/{id}/variants/{productVariantId}?";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 'productVariantId' must be defined.");i=i.replace("{productVariantId}",encodeURIComponent(""+r)),null!=p&&(i+="productVersionId="+encodeURIComponent(""+p)+"&"),null!=s&&(i+="tenantId="+encodeURIComponent(""+s)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(u)).pipe(n.mergeMap((function(e){return a.http.request("get",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processGetProductVariant(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processGetProductVariant(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductVariant=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductVariantDesigns=function(e,r,p,s,a,i,u,c,l,f,d,m,h){var v=this,y=this.baseUrl+"/api/storefront/v1/products/{id}/variant-designs?";if(null==e)throw new Error("The parameter 'id' must be defined.");y=y.replace("{id}",encodeURIComponent(""+e)),null!=r&&(y+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="productVariantId="+encodeURIComponent(""+p)+"&"),null!=s&&(y+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(y+="designCustomFields="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="designPath="+encodeURIComponent(""+i)+"&"),null!=u&&(y+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(y+="options="+encodeURIComponent(""+l)+"&"),null!=f&&(y+="productFilterId="+encodeURIComponent(""+f)+"&"),null!=d&&(y+="takeAvailableOnly="+encodeURIComponent(""+d)+"&"),null!=m&&(y+="sku="+encodeURIComponent(""+m)+"&"),null!=h&&(y+="tenantId="+encodeURIComponent(""+h)+"&"),y=y.replace(/[?&]$/,"");var g={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(g)).pipe(n.mergeMap((function(e){return v.http.request("get",y,e)}))).pipe(n.mergeMap((function(e){return v.transformResult(y,e,(function(e){return v.processGetProductVariantDesigns(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return v.transformResult(y,e,(function(e){return v.processGetProductVariantDesigns(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductVariantDesigns=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductVariantMockups=function(e,r,p,s,a,i,u,c,l,f,d,m,h){var v=this,y=this.baseUrl+"/api/storefront/v1/products/{id}/variant-mockups?";if(null==e)throw new Error("The parameter 'id' must be defined.");y=y.replace("{id}",encodeURIComponent(""+e)),null!=r&&(y+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="productVariantId="+encodeURIComponent(""+p)+"&"),null!=s&&(y+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(y+="mockupCustomFields="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="mockupPath="+encodeURIComponent(""+i)+"&"),null!=u&&(y+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(y+="options="+encodeURIComponent(""+l)+"&"),null!=f&&(y+="productFilterId="+encodeURIComponent(""+f)+"&"),null!=d&&(y+="takeAvailableOnly="+encodeURIComponent(""+d)+"&"),null!=m&&(y+="sku="+encodeURIComponent(""+m)+"&"),null!=h&&(y+="tenantId="+encodeURIComponent(""+h)+"&"),y=y.replace(/[?&]$/,"");var g={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(g)).pipe(n.mergeMap((function(e){return v.http.request("get",y,e)}))).pipe(n.mergeMap((function(e){return v.transformResult(y,e,(function(e){return v.processGetProductVariantMockups(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return v.transformResult(y,e,(function(e){return v.processGetProductVariantMockups(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductVariantMockups=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductVariantDocuments=function(e,r,p,s,a,i,u,c,l,f,d,m,h){var v=this,y=this.baseUrl+"/api/storefront/v1/products/{id}/variant-documents?";if(null==e)throw new Error("The parameter 'id' must be defined.");y=y.replace("{id}",encodeURIComponent(""+e)),null!=r&&(y+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="productVariantId="+encodeURIComponent(""+p)+"&"),null!=s&&(y+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(y+="documentCustomFields="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="documentPath="+encodeURIComponent(""+i)+"&"),null!=u&&(y+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(y+="options="+encodeURIComponent(""+l)+"&"),null!=f&&(y+="productFilterId="+encodeURIComponent(""+f)+"&"),null!=d&&(y+="takeAvailableOnly="+encodeURIComponent(""+d)+"&"),null!=m&&(y+="sku="+encodeURIComponent(""+m)+"&"),null!=h&&(y+="tenantId="+encodeURIComponent(""+h)+"&"),y=y.replace(/[?&]$/,"");var g={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(g)).pipe(n.mergeMap((function(e){return v.http.request("get",y,e)}))).pipe(n.mergeMap((function(e){return v.transformResult(y,e,(function(e){return v.processGetProductVariantDocuments(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return v.transformResult(y,e,(function(e){return v.processGetProductVariantDocuments(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductVariantDocuments=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.updateProductVariantResources=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/products/{id}/update-variant-resources?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processUpdateProductVariantResources(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processUpdateProductVariantResources(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processUpdateProductVariantResources=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAvailableProductTags=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/products/available-tags?";null!=e&&(s+="search="+encodeURIComponent(""+e)+"&"),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetAvailableProductTags(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetAvailableProductTags(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAvailableProductTags=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getPersonalizationWorkflow=function(e,r,p,s,a){var i=this,u=this.baseUrl+"/api/storefront/v1/products/{id}/personalization-workflow?";if(null==e)throw new Error("The parameter 'id' must be defined.");u=u.replace("{id}",encodeURIComponent(""+e)),null!=r&&(u+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(u+="productLinkId="+encodeURIComponent(""+p)+"&"),null!=s&&(u+="productFilterId="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(c)).pipe(n.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(n.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetPersonalizationWorkflow(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetPersonalizationWorkflow(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetPersonalizationWorkflow=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);g.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new g(r.ɵɵinject(l),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:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var R=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAll=function(e,r,p,s,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!=p&&(u+="sorting="+encodeURIComponent(""+p)+"&"),null!=s&&(u+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(c)).pipe(n.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(n.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetAll(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetAll(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.get=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/product-specifications/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGet(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGet(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGet=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductSpecificationSummary=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/product-specifications/{id}/personalization-parameters?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetProductSpecificationSummary(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetProductSpecificationSummary(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductSpecificationSummary=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getPersonalizationWorkflow=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/product-specifications/{id}/personalization-workflow?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetPersonalizationWorkflow(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetPersonalizationWorkflow(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetPersonalizationWorkflow=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);R.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new R(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:R,providedIn:"root"}),R.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],R.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{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,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAll=function(e,r,p,s,a,i,u,c,l,f,d,m,h){var v=this,y=this.baseUrl+"/api/storefront/v1/projects?";if(null!=e&&(y+="ownerId="+encodeURIComponent(""+e)+"&"),null!=r&&(y+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="status="+encodeURIComponent(""+p)+"&"),null===s)throw new Error("The parameter 'datePeriod' cannot be null.");if(void 0!==s&&(y+="datePeriod="+encodeURIComponent(""+s)+"&"),null!=a&&(y+="skip="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="take="+encodeURIComponent(""+i)+"&"),null!=u&&(y+="sorting="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="search="+encodeURIComponent(""+c)+"&"),null!=l&&(y+="orderId="+encodeURIComponent(""+l)+"&"),null!=f&&(y+="processingStatus="+encodeURIComponent(""+f)+"&"),null===d)throw new Error("The parameter 'includeObsolete' cannot be null.");void 0!==d&&(y+="includeObsolete="+encodeURIComponent(""+d)+"&"),null!=m&&(y+="storefrontId="+encodeURIComponent(""+m)+"&"),null!=h&&(y+="tenantId="+encodeURIComponent(""+h)+"&"),y=y.replace(/[?&]$/,"");var g={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(g)).pipe(n.mergeMap((function(e){return v.http.request("get",y,e)}))).pipe(n.mergeMap((function(e){return v.transformResult(y,e,(function(e){return v.processGetAll(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return v.transformResult(y,e,(function(e){return v.processGetAll(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.get=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/projects/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGet(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGet(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGet=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.delete=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/projects/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("delete",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processDelete(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processDelete(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processDelete=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getPreview=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/projects/{id}/preview?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetPreview(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetPreview(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetPreview=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}if(200===a||206===a){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return t.of({fileName:v,data:i,status:a,headers:c})}return 404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getPreviewUrl=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/projects/{id}/preview-url?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetPreviewUrl(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetPreviewUrl(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetPreviewUrl=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:e,t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.createWithSingleItem=function(e,r,p){var s=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(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processCreateWithSingleItem(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processCreateWithSingleItem(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processCreateWithSingleItem=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 201===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Bad Request",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.createWithMultipleItems=function(e,r,p){var s=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(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processCreateWithMultipleItems(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processCreateWithMultipleItems(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processCreateWithMultipleItems=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 201===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Bad Request",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.createByRenderHiResScenario=function(e,r,p){var s=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(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processCreateByRenderHiResScenario(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processCreateByRenderHiResScenario(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processCreateByRenderHiResScenario=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 201===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Bad Request",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.createBySpecificPipelineScenario=function(e,r,p){var s=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(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processCreateBySpecificPipelineScenario(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processCreateBySpecificPipelineScenario(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processCreateBySpecificPipelineScenario=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 201===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Bad Request",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAvailableTransitions=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/projects/{id}/transitions?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetAvailableTransitions(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetAvailableTransitions(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAvailableTransitions=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Bad Request",a,e,c,r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.changeStatus=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processChangeStatus(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processChangeStatus(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processChangeStatus=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Bad Request",a,e,c,r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.forceStatus=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processForceStatus(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processForceStatus(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processForceStatus=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Bad Request",a,e,c,r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.batchDelete=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/projects/batch-delete?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var a={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("delete",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processBatchDelete(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processBatchDelete(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processBatchDelete=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAllStatuses=function(e){var r=this,p=this.baseUrl+"/api/storefront/v1/projects/statuses?";null!=e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return r.http.request("get",p,e)}))).pipe(n.mergeMap((function(e){return r.transformResult(p,e,(function(e){return r.processGetAllStatuses(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return r.transformResult(p,e,(function(e){return r.processGetAllStatuses(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllStatuses=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAllTransitions=function(e){var r=this,p=this.baseUrl+"/api/storefront/v1/projects/transitions?";null!=e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return r.http.request("get",p,e)}))).pipe(n.mergeMap((function(e){return r.transformResult(p,e,(function(e){return r.processGetAllTransitions(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return r.transformResult(p,e,(function(e){return r.processGetAllTransitions(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllTransitions=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProjectProcessingResults=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProjectProcessingResults(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProjectProcessingResults(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProjectProcessingResults=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.resumeProjectProcessing=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processResumeProjectProcessing(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processResumeProjectProcessing(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processResumeProjectProcessing=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 204===a?W(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.restartProjectProcessing=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processRestartProjectProcessing(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processRestartProjectProcessing(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processRestartProjectProcessing=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 204===a?W(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProjectOrder=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/projects/{id}/order?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetProjectOrder(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetProjectOrder(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProjectOrder=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.attachDataToProjectOrder=function(e,r,p,s){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!=p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return t.from(this.transformOptions(u)).pipe(n.mergeMap((function(e){return a.http.request("post",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processAttachDataToProjectOrder(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processAttachDataToProjectOrder(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processAttachDataToProjectOrder=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 204===a?W(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);b.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new b(r.ɵɵinject(l),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:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var I=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAll=function(e,r,p,s,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!=p&&(c+="take="+encodeURIComponent(""+p)+"&"),null!=s&&(c+="sorting="+encodeURIComponent(""+s)+"&"),null!=a&&(c+="search="+encodeURIComponent(""+a)+"&"),null!=i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(l)).pipe(n.mergeMap((function(e){return u.http.request("get",c,e)}))).pipe(n.mergeMap((function(e){return u.transformResult(c,e,(function(e){return u.processGetAll(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return u.transformResult(c,e,(function(e){return u.processGetAll(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.get=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/storefronts/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGet(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGet(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGet=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);I.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new I(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:I,providedIn:"root"}),I.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],I.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var M=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAll=function(e,r,p,s,a,i,u,c){var l=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!=p&&(f+="skip="+encodeURIComponent(""+p)+"&"),null!=s&&(f+="take="+encodeURIComponent(""+s)+"&"),null!=a&&(f+="sorting="+encodeURIComponent(""+a)+"&"),null!=i&&(f+="search="+encodeURIComponent(""+i)+"&"),null!=u&&(f+="includeAnonymous="+encodeURIComponent(""+u)+"&"),null!=c&&(f+="tenantId="+encodeURIComponent(""+c)+"&"),f=f.replace(/[?&]$/,"");var d={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(d)).pipe(n.mergeMap((function(e){return l.http.request("get",f,e)}))).pipe(n.mergeMap((function(e){return l.transformResult(f,e,(function(e){return l.processGetAll(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return l.transformResult(f,e,(function(e){return l.processGetAll(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.create=function(e,r,p){var s=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(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processCreate(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processCreate(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processCreate=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 201===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.get=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGet(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGet(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGet=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.register=function(e,r,p){var s=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(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processRegister(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processRegister(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processRegister=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.mergeAnonymous=function(e,r,p){var s=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(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("post",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processMergeAnonymous(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processMergeAnonymous(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processMergeAnonymous=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getToken=function(e,r,p){var s=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!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetToken(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetToken(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetToken=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:e,t.of(r)}))):404===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Not Found",a,e,c,r)}))):409===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),D("Conflict",a,e,c,r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);M.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new M(r.ɵɵinject(l),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:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var w,U,C,P,j,H,E,O,S,A,x,k,N,T,B,G,J,F,z,q,$,V=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getApplicationsInfo=function(e){var r=this,p=this.baseUrl+"/api/storefront/v1/tenant-info/applications?";null!=e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return r.http.request("get",p,e)}))).pipe(n.mergeMap((function(e){return r.transformResult(p,e,(function(e){return r.processGetApplicationsInfo(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return r.transformResult(p,e,(function(e){return r.processGetApplicationsInfo(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetApplicationsInfo=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getInfo=function(e){var r=this,p=this.baseUrl+"/api/storefront/v1/tenant-info?";null!=e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return r.http.request("get",p,e)}))).pipe(n.mergeMap((function(e){return r.transformResult(p,e,(function(e){return r.processGetInfo(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return r.transformResult(p,e,(function(e){return r.processGetInfo(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetInfo=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getMeasureUnitsInfo=function(e){var r=this,p=this.baseUrl+"/api/storefront/v1/tenant-info/measure-units?";null!=e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return r.http.request("get",p,e)}))).pipe(n.mergeMap((function(e){return r.transformResult(p,e,(function(e){return r.processGetMeasureUnitsInfo(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return r.transformResult(p,e,(function(e){return r.processGetMeasureUnitsInfo(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetMeasureUnitsInfo=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getUsersInfo=function(e){var r=this,p=this.baseUrl+"/api/storefront/v1/tenant-info/users?";null!=e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(s)).pipe(n.mergeMap((function(e){return r.http.request("get",p,e)}))).pipe(n.mergeMap((function(e){return r.transformResult(p,e,(function(e){return r.processGetUsersInfo(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return r.transformResult(p,e,(function(e){return r.processGetUsersInfo(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetUsersInfo=function(e){var r,p,s=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 l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?W(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?W(i).pipe(n.mergeMap((function(e){return D("Unauthorized",a,e,c)}))):403===a?W(i).pipe(n.mergeMap((function(e){return D("Forbidden",a,e,c)}))):200!==a&&204!==a?W(i).pipe(n.mergeMap((function(e){return D("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);V.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new V(r.ɵɵinject(l),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:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]},(w=e.ProductBundleResourceType||(e.ProductBundleResourceType={})).Custom="Custom",w.Preview="Preview",(U=e.ConflictType||(e.ConflictType={})).NameConflict="NameConflict",U.FolderOverwriteConflict="FolderOverwriteConflict",U.IdConflict="IdConflict",U.GeneralConflict="GeneralConflict",(C=e.ProductType||(e.ProductType={})).ProductSpecification="ProductSpecification",C.Product="Product",C.ProductLink="ProductLink",C.ProductBundle="ProductBundle",(P=e.WorkflowType||(e.WorkflowType={})).UIFramework="UIFramework",P.SimpleEditor="SimpleEditor",P.DesignEditor="DesignEditor",P.WorkflowElements="WorkflowElements",(j=e.AppearanceDataType||(e.AppearanceDataType={})).Radio="Radio",j.Dropdown="Dropdown",j.Chips="Chips",j.ColorGrid="ColorGrid",j.ColorList="ColorList",j.ImageGrid="ImageGrid",j.ImageList="ImageList",(H=e.ProductLinkResourceType||(e.ProductLinkResourceType={})).Preview="Preview",H.Custom="Custom",(E=e.OptionType||(e.OptionType={})).Simple="Simple",E.Size="Size",E.PageCount="PageCount",(O=e.ProductReferenceType||(e.ProductReferenceType={})).ProductSpecification="ProductSpecification",O.Product="Product",O.ProductLink="ProductLink",O.ProductBundle="ProductBundle",(S=e.ProductVariantResourceType||(e.ProductVariantResourceType={})).Preview="Preview",S.EditorModel="EditorModel",S.Custom="Custom",(A=e.ProductVariantMockupType||(e.ProductVariantMockupType={})).Thumbnail="Thumbnail",A.Editor="Editor",A.Preview="Preview",(x=e.SurfaceUsageType||(e.SurfaceUsageType={})).Individual="Individual",x.Custom="Custom",x.All="All",(k=e.DatePeriod||(e.DatePeriod={})).All="All",k.Today="Today",k.Last7Days="Last7Days",k.Last30Days="Last30Days",(N=e.ProjectProcessingStatus||(e.ProjectProcessingStatus={})).Pending="Pending",N.InProgress="InProgress",N.Completed="Completed",N.Failed="Failed",(T=e.ProjectItemResourceType||(e.ProjectItemResourceType={})).General="General",T.Preview="Preview",T.Hires="Hires",(B=e.ProjectItemProductType||(e.ProjectItemProductType={})).ProductSpecification="ProductSpecification",B.Product="Product",B.ProductLink="ProductLink",(G=e.RenderHiResScenarioOutputFormat||(e.RenderHiResScenarioOutputFormat={})).Pdf="Pdf",G.Jpeg="Jpeg",G.Png="Png",G.Tiff="Tiff",G.Bmp="Bmp",(J=e.RenderHiResScenarioOutputColorSpace||(e.RenderHiResScenarioOutputColorSpace={})).Rgb="Rgb",J.Grayscale="Grayscale",J.Cmyk="Cmyk",(F=e.RenderHiResScenarioOutputFlipMode||(e.RenderHiResScenarioOutputFlipMode={})).None="None",F.Horizontal="Horizontal",F.Vertical="Vertical",F.Both="Both",(z=e.RenderHiResScenarioOutputRotateMode||(e.RenderHiResScenarioOutputRotateMode={})).None="None",z.Rotate90="Rotate90",z.Rotate180="Rotate180",z.Rotate270="Rotate270",z.Auto="Auto",(q=e.OrderDataItemValueType||(e.OrderDataItemValueType={})).PlainText="PlainText",q.CommaSeparatedList="CommaSeparatedList",q.SerializedJson="SerializedJson",($=e.StorefrontType||(e.StorefrontType={})).Custom="Custom",$.ShopifyLegacy="ShopifyLegacy",$.DocketManager="DocketManager",$.CustomSaml="CustomSaml",$.NopCommerce="NopCommerce",$.WooCommerce="WooCommerce",$.Magento="Magento",$.BigCommerce="BigCommerce",$.Shopify="Shopify",$.ShopifyCustom="ShopifyCustom";var L=function(e){function r(r,n,t,o,p){var s=e.call(this)||this;return s.isApiException=!0,s.message=r,s.status=n,s.response=t,s.headers=o,s.result=p,s}return s(r,e),r.isApiException=function(e){return!0===e.isApiException},r}(Error);function D(e,r,n,o,p){return t.throwError(new L(e,r,n,o,p))}function W(e){return new t.Observable((function(r){if(e){var n=new FileReader;n.onload=function(e){r.next(e.target.result),r.complete()},n.readAsText(e)}else r.next(""),r.complete()}))}function _(e,r,n){void 0===n&&(n="ApiKey");var t=new l;return t.apiKey=n,t.apiUrl=r,t.setAuthorizationToken(e),t}var K=function(){function e(){}return e.forRoot=function(r,n,t){return void 0===t&&(t="ApiKey"),{ngModule:e,providers:[{provide:c,useValue:n},{provide:l,useFactory:_.bind(this,r,n,t)}]}},e}();K.decorators=[{type:r.NgModule,args:[{declarations:[],imports:[],exports:[]}]}],e.API_BASE_URL=c,e.ApiClientBase=f,e.ApiClientConfiguration=l,e.ApiException=L,e.BuildInfoApiClient=d,e.CreateApiClientConfiguration=_,e.ProcessingPipelinesApiClient=m,e.ProductBundlesApiClient=h,e.ProductLinksApiClient=v,e.ProductReferencesApiClient=y,e.ProductSpecificationsApiClient=R,e.ProductsApiClient=g,e.ProjectsApiClient=b,e.StorefrontModule=K,e.StorefrontUsersApiClient=M,e.StorefrontsApiClient=I,e.TenantInfoApiClient=V,Object.defineProperty(e,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=aurigma-ng-storefront-api-client.umd.min.js.map