@aurigma/ng-storefront-api-client 2.54.19 → 2.55.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/aurigma-ng-storefront-api-client.metadata.json +1 -1
- package/bundles/aurigma-ng-storefront-api-client.umd.js +302 -1026
- package/bundles/aurigma-ng-storefront-api-client.umd.js.map +1 -1
- package/bundles/aurigma-ng-storefront-api-client.umd.min.js +1 -1
- package/bundles/aurigma-ng-storefront-api-client.umd.min.js.map +1 -1
- package/esm2015/lib/storefront-api-client.js +18 -651
- package/fesm2015/aurigma-ng-storefront-api-client.js +17 -650
- package/fesm2015/aurigma-ng-storefront-api-client.js.map +1 -1
- package/lib/storefront-api-client.d.ts +12 -186
- package/package.json +1 -1
|
@@ -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?q(a).pipe(n.mergeMap((function(e){return t.of(null)}))):200!==s&&204!==s?q(a).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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 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.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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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 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.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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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 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.getAll=function(e,r,p,s,a,i,u,c,l,f,d,h,m){var v=this,y=this.baseUrl+"/api/storefront/v1/product-references?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");y+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(y+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(y+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(y+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="skip="+encodeURIComponent(""+i)+"&"),null!=u&&(y+="take="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="sorting="+encodeURIComponent(""+c)+"&"),null!=l&&(y+="search="+encodeURIComponent(""+l)+"&"),null!=f&&(y+="sku="+encodeURIComponent(""+f)+"&"),null!=d&&d&&d.forEach((function(e){y+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(y+="customFields="+encodeURIComponent(""+h)+"&"),null!=m&&(y+="tenantId="+encodeURIComponent(""+m)+"&"),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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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/product-references?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var i={body:JSON.stringify(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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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,h,m){var v=this,y=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.");y+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(y+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(y+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(y+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="skip="+encodeURIComponent(""+i)+"&"),null!=u&&(y+="take="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="sorting="+encodeURIComponent(""+c)+"&"),null!=l&&(y+="search="+encodeURIComponent(""+l)+"&"),null!=f&&(y+="sku="+encodeURIComponent(""+f)+"&"),null!=d&&d&&d.forEach((function(e){y+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(y+="customFields="+encodeURIComponent(""+h)+"&"),null!=m&&(y+="tenantId="+encodeURIComponent(""+m)+"&"),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.processGetAllProductSpecifications(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.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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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,h,m){var v=this,y=this.baseUrl+"/api/storefront/v1/product-references/products?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");y+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(y+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(y+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(y+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="skip="+encodeURIComponent(""+i)+"&"),null!=u&&(y+="take="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="sorting="+encodeURIComponent(""+c)+"&"),null!=l&&(y+="search="+encodeURIComponent(""+l)+"&"),null!=f&&(y+="sku="+encodeURIComponent(""+f)+"&"),null!=d&&d&&d.forEach((function(e){y+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(y+="customFields="+encodeURIComponent(""+h)+"&"),null!=m&&(y+="tenantId="+encodeURIComponent(""+m)+"&"),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.processGetAllProducts(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.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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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,h,m){var v=this,y=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.");y+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(y+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(y+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(y+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="skip="+encodeURIComponent(""+i)+"&"),null!=u&&(y+="take="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="sorting="+encodeURIComponent(""+c)+"&"),null!=l&&(y+="search="+encodeURIComponent(""+l)+"&"),null!=f&&(y+="sku="+encodeURIComponent(""+f)+"&"),null!=d&&d&&d.forEach((function(e){y+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(y+="customFields="+encodeURIComponent(""+h)+"&"),null!=m&&(y+="tenantId="+encodeURIComponent(""+m)+"&"),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.processGetAllProductLinks(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.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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.delete=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("delete",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processDelete(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.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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductConfig=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-config?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(a=a.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+r)+"&",null!=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.processGetProductConfig(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.processGetProductConfig(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductConfig=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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:e,t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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.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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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 h={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(h)).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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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,h,m){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!=h&&(y+="sku="+encodeURIComponent(""+h)+"&"),null!=m&&(y+="tenantId="+encodeURIComponent(""+m)+"&"),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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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,h,m){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!=h&&(y+="sku="+encodeURIComponent(""+h)+"&"),null!=m&&(y+="tenantId="+encodeURIComponent(""+m)+"&"),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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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,h,m){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!=h&&(y+="sku="+encodeURIComponent(""+h)+"&"),null!=m&&(y+="tenantId="+encodeURIComponent(""+m)+"&"),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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.setProductVariantPrice=function(e,r,p,s){var a=this,i=this.baseUrl+"/api/storefront/v1/products/{id}/set-variant-price?";if(null==e)throw new Error("The parameter 'id' must be defined.");i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="productVersionId="+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.processSetProductVariantPrice(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processSetProductVariantPrice(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processSetProductVariantPrice=function(e){var r,p,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?q(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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.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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getConfiguration=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/product-specifications/{id}/config?";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.processGetConfiguration(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.processGetConfiguration(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetConfiguration=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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:e,t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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,i,u,c,l,f,d,h,m){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!=h&&(y+="storefrontId="+encodeURIComponent(""+h)+"&"),null!=m&&(y+="tenantId="+encodeURIComponent(""+m)+"&"),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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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 h=e.headers?e.headers.get("content-disposition"):void 0,m=h?/filename="?([^"]*?)"?(;|$)/g.exec(h):void 0,v=m&&m.length>1?m[1]:void 0;return t.of({fileName:v,data:i,status:a,headers:c})}return 404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:e,t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Bad Request",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Bad Request",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Bad Request",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Bad Request",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Bad Request",a,e,c,r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Bad Request",a,e,c,r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Bad Request",a,e,c,r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProjectPdfUrl=function(e,r,p,s){var a=this,i=this.baseUrl+"/api/storefront/v1/projects/{id}/project-pdf?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'designUserId' must be defined and cannot be null.");if(i+="designUserId="+encodeURIComponent(""+r)+"&",null==p)throw new Error("The parameter 'designId' must be defined and cannot be null.");i+="designId="+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.processGetProjectPdfUrl(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.processGetProjectPdfUrl(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProjectPdfUrl=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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProjectPdfZip=function(e,r,p,s,a){var i=this,u=this.baseUrl+"/api/storefront/v1/projects/{id}/project-pdf-zip?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'designUserId' must be defined and cannot be null.");if(u+="designUserId="+encodeURIComponent(""+r)+"&",null==p)throw new Error("The parameter 'designId' must be defined and cannot be null.");u+="designId="+encodeURIComponent(""+p)+"&",null!=s&&(u+="attachment="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};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.processGetProjectPdfZip(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.processGetProjectPdfZip(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProjectPdfZip=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 h=e.headers?e.headers.get("content-disposition"):void 0,m=h?/filename="?([^"]*?)"?(;|$)/g.exec(h):void 0,v=m&&m.length>1?m[1]:void 0;return t.of({fileName:v,data:i,status:a,headers:c})}return 404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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){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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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,u){var c=this,l=this.baseUrl+"/api/storefront/v1/storefront-users?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");l+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(l+="storefrontUserId="+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.processGetAll(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.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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:e,t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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,w,U,C,P,j,H,E,O,S,A,x,N,k,T,B,J,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.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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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]}]}]},(M=e.OptionType||(e.OptionType={})).Simple="Simple",M.Size="Size",M.PageCount="PageCount",(w=e.ConflictType||(e.ConflictType={})).NameConflict="NameConflict",w.FolderOverwriteConflict="FolderOverwriteConflict",w.IdConflict="IdConflict",w.GeneralConflict="GeneralConflict",(U=e.AppearanceDataType||(e.AppearanceDataType={})).Radio="Radio",U.Dropdown="Dropdown",U.Chips="Chips",U.ColorGrid="ColorGrid",U.ColorList="ColorList",U.ImageGrid="ImageGrid",U.ImageList="ImageList",(C=e.WorkflowType||(e.WorkflowType={})).UIFramework="UIFramework",C.SimpleEditor="SimpleEditor",C.DesignEditor="DesignEditor",C.WorkflowElements="WorkflowElements",(P=e.ProductReferenceType||(e.ProductReferenceType={})).ProductSpecification="ProductSpecification",P.Product="Product",P.ProductLink="ProductLink",(j=e.ProductVariantResourceType||(e.ProductVariantResourceType={})).Preview="Preview",j.EditorModel="EditorModel",j.Custom="Custom",(H=e.ProductVariantMockupType||(e.ProductVariantMockupType={})).Thumbnail="Thumbnail",H.Editor="Editor",H.Preview="Preview",(E=e.SurfaceUsageType||(e.SurfaceUsageType={})).Individual="Individual",E.Custom="Custom",E.All="All",(O=e.DatePeriod||(e.DatePeriod={})).All="All",O.Today="Today",O.Last7Days="Last7Days",O.Last30Days="Last30Days",(S=e.ProjectProcessingStatus||(e.ProjectProcessingStatus={})).Pending="Pending",S.InProgress="InProgress",S.Completed="Completed",S.Failed="Failed",(A=e.ProjectItemResourceType||(e.ProjectItemResourceType={})).General="General",A.Preview="Preview",A.Hires="Hires",(x=e.RenderHiResScenarioOutputFormat||(e.RenderHiResScenarioOutputFormat={})).Pdf="Pdf",x.Jpeg="Jpeg",x.Png="Png",x.Tiff="Tiff",x.Bmp="Bmp",(N=e.RenderHiResScenarioOutputColorSpace||(e.RenderHiResScenarioOutputColorSpace={})).Rgb="Rgb",N.Grayscale="Grayscale",N.Cmyk="Cmyk",(k=e.RenderHiResScenarioOutputFlipMode||(e.RenderHiResScenarioOutputFlipMode={})).None="None",k.Horizontal="Horizontal",k.Vertical="Vertical",k.Both="Both",(T=e.RenderHiResScenarioOutputRotateMode||(e.RenderHiResScenarioOutputRotateMode={})).None="None",T.Rotate90="Rotate90",T.Rotate180="Rotate180",T.Rotate270="Rotate270",T.Auto="Auto",(B=e.OrderDataItemValueType||(e.OrderDataItemValueType={})).PlainText="PlainText",B.CommaSeparatedList="CommaSeparatedList",B.SerializedJson="SerializedJson",(J=e.StorefrontType||(e.StorefrontType={})).Custom="Custom",J.ShopifyLegacy="ShopifyLegacy",J.DocketManager="DocketManager",J.CustomSaml="CustomSaml",J.NopCommerce="NopCommerce",J.WooCommerce="WooCommerce",J.Magento="Magento",J.BigCommerce="BigCommerce",J.Shopify="Shopify",J.ShopifyCustom="ShopifyCustom";var F=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 z(e,r,n,o,p){return null!=p?t.throwError(p):t.throwError(new F(e,r,n,o,null))}function q(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 V=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}();V.decorators=[{type:r.NgModule,args:[{declarations:[],imports:[],exports:[]}]}],e.API_BASE_URL=c,e.ApiClientBase=f,e.ApiClientConfiguration=l,e.ApiException=F,e.BuildInfoApiClient=d,e.CreateApiClientConfiguration=$,e.ProcessingPipelinesApiClient=h,e.ProductLinksApiClient=m,e.ProductReferencesApiClient=v,e.ProductSpecificationsApiClient=g,e.ProductsApiClient=y,e.ProjectsApiClient=R,e.StorefrontModule=V,e.StorefrontUsersApiClient=I,e.StorefrontsApiClient=b,e.TenantInfoApiClient=G,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?q(a).pipe(n.mergeMap((function(e){return t.of(null)}))):200!==s&&204!==s?q(a).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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 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.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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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 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.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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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 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.getAll=function(e,r,p,s,a,i,u,c,l,f,d,h,m){var v=this,y=this.baseUrl+"/api/storefront/v1/product-references?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");y+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(y+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(y+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(y+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="skip="+encodeURIComponent(""+i)+"&"),null!=u&&(y+="take="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="sorting="+encodeURIComponent(""+c)+"&"),null!=l&&(y+="search="+encodeURIComponent(""+l)+"&"),null!=f&&(y+="sku="+encodeURIComponent(""+f)+"&"),null!=d&&d&&d.forEach((function(e){y+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(y+="customFields="+encodeURIComponent(""+h)+"&"),null!=m&&(y+="tenantId="+encodeURIComponent(""+m)+"&"),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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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,h,m){var v=this,y=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.");y+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(y+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(y+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(y+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="skip="+encodeURIComponent(""+i)+"&"),null!=u&&(y+="take="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="sorting="+encodeURIComponent(""+c)+"&"),null!=l&&(y+="search="+encodeURIComponent(""+l)+"&"),null!=f&&(y+="sku="+encodeURIComponent(""+f)+"&"),null!=d&&d&&d.forEach((function(e){y+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(y+="customFields="+encodeURIComponent(""+h)+"&"),null!=m&&(y+="tenantId="+encodeURIComponent(""+m)+"&"),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.processGetAllProductSpecifications(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.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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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,h,m){var v=this,y=this.baseUrl+"/api/storefront/v1/product-references/products?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");y+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(y+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(y+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(y+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="skip="+encodeURIComponent(""+i)+"&"),null!=u&&(y+="take="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="sorting="+encodeURIComponent(""+c)+"&"),null!=l&&(y+="search="+encodeURIComponent(""+l)+"&"),null!=f&&(y+="sku="+encodeURIComponent(""+f)+"&"),null!=d&&d&&d.forEach((function(e){y+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(y+="customFields="+encodeURIComponent(""+h)+"&"),null!=m&&(y+="tenantId="+encodeURIComponent(""+m)+"&"),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.processGetAllProducts(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.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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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,h,m){var v=this,y=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.");y+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(y+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(y+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(y+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(y+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(y+="skip="+encodeURIComponent(""+i)+"&"),null!=u&&(y+="take="+encodeURIComponent(""+u)+"&"),null!=c&&(y+="sorting="+encodeURIComponent(""+c)+"&"),null!=l&&(y+="search="+encodeURIComponent(""+l)+"&"),null!=f&&(y+="sku="+encodeURIComponent(""+f)+"&"),null!=d&&d&&d.forEach((function(e){y+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(y+="customFields="+encodeURIComponent(""+h)+"&"),null!=m&&(y+="tenantId="+encodeURIComponent(""+m)+"&"),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.processGetAllProductLinks(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.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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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.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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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 h={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(h)).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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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,h,m){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!=h&&(y+="sku="+encodeURIComponent(""+h)+"&"),null!=m&&(y+="tenantId="+encodeURIComponent(""+m)+"&"),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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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,h,m){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!=h&&(y+="sku="+encodeURIComponent(""+h)+"&"),null!=m&&(y+="tenantId="+encodeURIComponent(""+m)+"&"),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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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,h,m){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!=h&&(y+="sku="+encodeURIComponent(""+h)+"&"),null!=m&&(y+="tenantId="+encodeURIComponent(""+m)+"&"),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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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.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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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,i,u,c,l,f,d,h,m){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!=h&&(y+="storefrontId="+encodeURIComponent(""+h)+"&"),null!=m&&(y+="tenantId="+encodeURIComponent(""+m)+"&"),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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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 h=e.headers?e.headers.get("content-disposition"):void 0,m=h?/filename="?([^"]*?)"?(;|$)/g.exec(h):void 0,v=m&&m.length>1?m[1]:void 0;return t.of({fileName:v,data:i,status:a,headers:c})}return 404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:e,t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Bad Request",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Bad Request",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Bad Request",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Bad Request",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Bad Request",a,e,c,r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Bad Request",a,e,c,r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):400===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Bad Request",a,e,c,r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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){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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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,u){var c=this,l=this.baseUrl+"/api/storefront/v1/storefront-users?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");l+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(l+="storefrontUserId="+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.processGetAll(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.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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){return t.of(null)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:e,t.of(r)}))):404===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Not Found",a,e,c,r)}))):409===a?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),z("Conflict",a,e,c,r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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,w,U,C,P,j,H,E,O,S,A,x,k,N,T,B,G,J=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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("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?q(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?q(i).pipe(n.mergeMap((function(e){return z("Unauthorized",a,e,c)}))):403===a?q(i).pipe(n.mergeMap((function(e){return z("Forbidden",a,e,c)}))):200!==a&&204!==a?q(i).pipe(n.mergeMap((function(e){return z("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);J.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new J(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:J,providedIn:"root"}),J.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],J.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]}]}]},(M=e.OptionType||(e.OptionType={})).Simple="Simple",M.Size="Size",M.PageCount="PageCount",(w=e.ConflictType||(e.ConflictType={})).NameConflict="NameConflict",w.FolderOverwriteConflict="FolderOverwriteConflict",w.IdConflict="IdConflict",w.GeneralConflict="GeneralConflict",(U=e.AppearanceDataType||(e.AppearanceDataType={})).Radio="Radio",U.Dropdown="Dropdown",U.Chips="Chips",U.ColorGrid="ColorGrid",U.ColorList="ColorList",U.ImageGrid="ImageGrid",U.ImageList="ImageList",(C=e.WorkflowType||(e.WorkflowType={})).UIFramework="UIFramework",C.SimpleEditor="SimpleEditor",C.DesignEditor="DesignEditor",C.WorkflowElements="WorkflowElements",(P=e.ProductReferenceType||(e.ProductReferenceType={})).ProductSpecification="ProductSpecification",P.Product="Product",P.ProductLink="ProductLink",(j=e.ProductVariantResourceType||(e.ProductVariantResourceType={})).Preview="Preview",j.EditorModel="EditorModel",j.Custom="Custom",(H=e.ProductVariantMockupType||(e.ProductVariantMockupType={})).Thumbnail="Thumbnail",H.Editor="Editor",H.Preview="Preview",(E=e.SurfaceUsageType||(e.SurfaceUsageType={})).Individual="Individual",E.Custom="Custom",E.All="All",(O=e.DatePeriod||(e.DatePeriod={})).All="All",O.Today="Today",O.Last7Days="Last7Days",O.Last30Days="Last30Days",(S=e.ProjectProcessingStatus||(e.ProjectProcessingStatus={})).Pending="Pending",S.InProgress="InProgress",S.Completed="Completed",S.Failed="Failed",(A=e.ProjectItemResourceType||(e.ProjectItemResourceType={})).General="General",A.Preview="Preview",A.Hires="Hires",(x=e.RenderHiResScenarioOutputFormat||(e.RenderHiResScenarioOutputFormat={})).Pdf="Pdf",x.Jpeg="Jpeg",x.Png="Png",x.Tiff="Tiff",x.Bmp="Bmp",(k=e.RenderHiResScenarioOutputColorSpace||(e.RenderHiResScenarioOutputColorSpace={})).Rgb="Rgb",k.Grayscale="Grayscale",k.Cmyk="Cmyk",(N=e.RenderHiResScenarioOutputFlipMode||(e.RenderHiResScenarioOutputFlipMode={})).None="None",N.Horizontal="Horizontal",N.Vertical="Vertical",N.Both="Both",(T=e.RenderHiResScenarioOutputRotateMode||(e.RenderHiResScenarioOutputRotateMode={})).None="None",T.Rotate90="Rotate90",T.Rotate180="Rotate180",T.Rotate270="Rotate270",T.Auto="Auto",(B=e.OrderDataItemValueType||(e.OrderDataItemValueType={})).PlainText="PlainText",B.CommaSeparatedList="CommaSeparatedList",B.SerializedJson="SerializedJson",(G=e.StorefrontType||(e.StorefrontType={})).Custom="Custom",G.ShopifyLegacy="ShopifyLegacy",G.DocketManager="DocketManager",G.CustomSaml="CustomSaml",G.NopCommerce="NopCommerce",G.WooCommerce="WooCommerce",G.Magento="Magento",G.BigCommerce="BigCommerce",G.Shopify="Shopify",G.ShopifyCustom="ShopifyCustom";var F=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 z(e,r,n,o,p){return null!=p?t.throwError(p):t.throwError(new F(e,r,n,o,null))}function q(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 V=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}();V.decorators=[{type:r.NgModule,args:[{declarations:[],imports:[],exports:[]}]}],e.API_BASE_URL=c,e.ApiClientBase=f,e.ApiClientConfiguration=l,e.ApiException=F,e.BuildInfoApiClient=d,e.CreateApiClientConfiguration=$,e.ProcessingPipelinesApiClient=h,e.ProductLinksApiClient=m,e.ProductReferencesApiClient=v,e.ProductSpecificationsApiClient=g,e.ProductsApiClient=y,e.ProjectsApiClient=R,e.StorefrontModule=V,e.StorefrontUsersApiClient=I,e.StorefrontsApiClient=b,e.TenantInfoApiClient=J,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
16
16
|
//# sourceMappingURL=aurigma-ng-storefront-api-client.umd.min.js.map
|