@aurigma/ng-storefront-api-client 2.16.1 → 2.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,5 +12,5 @@
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var s=function(e,r){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])})(e,r)};function a(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function t(){this.constructor=e}s(e,r),e.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t)}function p(e,r,t,n){return new(t||(t=Promise))((function(o,s){function a(e){try{i(n.next(e))}catch(e){s(e)}}function p(e){try{i(n.throw(e))}catch(e){s(e)}}function i(e){var r;e.done?o(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(a,p)}i((n=n.apply(e,r||[])).next())}))}function i(e,r){var t,n,o,s,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:p(0),throw:p(1),return:p(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function p(s){return function(p){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=r.call(e,a)}catch(e){s=[6,e],n=0}finally{t=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,p])}}}Object.create;function u(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;var c=new r.InjectionToken("API_BASE_URL"),f=function(){function e(){this.apiKey="ApiKey",this.authorizationToken=null}return e.prototype.getAuthorizationToken=function(){return p(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.authorizationToken]}))}))},e.prototype.setAuthorizationToken=function(e){this.authorizationToken=e},e}(),l=function(){function e(e){this.configuration=e}return e.prototype.transformOptions=function(e){return p(this,void 0,void 0,(function(){var r;return i(this,(function(t){switch(t.label){case 0:return[4,this.configuration.getAuthorizationToken()];case 1:return r=t.sent(),e.headers=null!=r?e.headers.append("authorization","Bearer "+r):e.headers.append("X-API-Key",this.configuration.apiKey),[2,e]}}))}))},e.prototype.getBaseUrl=function(e){return this.configuration.apiUrl},e.prototype.transformResult=function(e,r,t){return t(r)},e}(),d=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return a(r,e),r.prototype.headInfo=function(){var e=this,r=this.baseUrl+"/api/storefront/v1/info";r=r.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(t){return e.http.request("head",r,t)}))).pipe(t.mergeMap((function(t){return e.transformResult(r,t,(function(r){return e.processHeadInfo(r)}))}))).pipe(t.catchError((function(t){if(!(t instanceof o.HttpResponseBase))return n.throwError(t);try{return e.transformResult(r,t,(function(r){return e.processHeadInfo(r)}))}catch(e){return n.throwError(e)}})))},r.prototype.processHeadInfo=function(e){var r,s,a=e.status,p=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),f=c.next();!f.done;f=c.next()){var l=f.value;i[l]=e.headers.get(l)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(s=c.return)&&s.call(c)}finally{if(r)throw r.error}}return 200===a?U(p).pipe(t.mergeMap((function(e){return n.of(null)}))):200!==a&&204!==a?U(p).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",a,e,i)}))):n.of(null)},r.prototype.getInfo=function(){var e=this,r=this.baseUrl+"/api/storefront/v1/info";r=r.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(t){return e.http.request("get",r,t)}))).pipe(t.mergeMap((function(t){return e.transformResult(r,t,(function(r){return e.processGetInfo(r)}))}))).pipe(t.catchError((function(t){if(!(t instanceof o.HttpResponseBase))return n.throwError(t);try{return e.transformResult(r,t,(function(r){return e.processGetInfo(r)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetInfo=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r}(l);d.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new d(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:d,providedIn:"root"}),d.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],d.ctorParameters=function(){return[{type:f,decorators:[{type:r.Inject,args:[f]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var h=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return a(r,e),r.prototype.getAll=function(e,r,s,a,p,i,u,c){var f=this,l=this.baseUrl+"/api/storefront/v1/product-references?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");l+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(l+="productReference="+encodeURIComponent(""+r)+"&"),null!=s&&(l+="productSpecificationId="+encodeURIComponent(""+s)+"&"),null!=a&&(l+="skip="+encodeURIComponent(""+a)+"&"),null!=p&&(l+="take="+encodeURIComponent(""+p)+"&"),null!=i&&(l+="sorting="+encodeURIComponent(""+i)+"&"),null!=u&&(l+="search="+encodeURIComponent(""+u)+"&"),null!=c&&(l+="tenantId="+encodeURIComponent(""+c)+"&"),l=l.replace(/[?&]$/,"");var d={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(d)).pipe(t.mergeMap((function(e){return f.http.request("get",l,e)}))).pipe(t.mergeMap((function(e){return f.transformResult(l,e,(function(e){return f.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return f.transformResult(l,e,(function(e){return f.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.create=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/product-references?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processCreate(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processCreate(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreate=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Not Found",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.get=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/product-references/{reference}?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(p=p.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(p+="tenantId="+encodeURIComponent(""+s)+"&"),p=p.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Not Found",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.delete=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/product-references/{reference}?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(p=p.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(p+="tenantId="+encodeURIComponent(""+s)+"&"),p=p.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("delete",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processDelete(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processDelete(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processDelete=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Not Found",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getProductSpecification=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-specification?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(p=p.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(p+="tenantId="+encodeURIComponent(""+s)+"&"),p=p.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetProductSpecification(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetProductSpecification(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProductSpecification=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Not Found",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getProductConfig=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-config?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(p=p.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(p+="tenantId="+encodeURIComponent(""+s)+"&"),p=p.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetProductConfig(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetProductConfig(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProductConfig=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Not Found",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r}(l);h.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new h(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:h,providedIn:"root"}),h.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],h.ctorParameters=function(){return[{type:f,decorators:[{type:r.Inject,args:[f]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var v=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return a(r,e),r.prototype.getAll=function(e,r,s,a,p){var i=this,u=this.baseUrl+"/api/storefront/v1/product-specifications?";null!=e&&(u+="skip="+encodeURIComponent(""+e)+"&"),null!=r&&(u+="take="+encodeURIComponent(""+r)+"&"),null!=s&&(u+="sorting="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="search="+encodeURIComponent(""+a)+"&"),null!=p&&(u+="tenantId="+encodeURIComponent(""+p)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.get=function(e,r){var s=this,a=this.baseUrl+"/api/storefront/v1/product-specifications/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Not Found",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getConfiguration=function(e,r){var s=this,a=this.baseUrl+"/api/storefront/v1/product-specifications/{id}/config?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetConfiguration(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetConfiguration(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetConfiguration=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Not Found",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r}(l);v.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new v(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:v,providedIn:"root"}),v.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],v.ctorParameters=function(){return[{type:f,decorators:[{type:r.Inject,args:[f]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var m=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return a(r,e),r.prototype.getAll=function(e,r,s,a,p,i,u,c,f,l){var d=this,h=this.baseUrl+"/api/storefront/v1/projects?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");if(h+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(h+="ownerId="+encodeURIComponent(""+r)+"&"),null!=s&&(h+="productReference="+encodeURIComponent(""+s)+"&"),null!=a&&(h+="status="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'datePeriod' cannot be null.");void 0!==p&&(h+="datePeriod="+encodeURIComponent(""+p)+"&"),null!=i&&(h+="skip="+encodeURIComponent(""+i)+"&"),null!=u&&(h+="take="+encodeURIComponent(""+u)+"&"),null!=c&&(h+="sorting="+encodeURIComponent(""+c)+"&"),null!=f&&(h+="search="+encodeURIComponent(""+f)+"&"),null!=l&&(h+="tenantId="+encodeURIComponent(""+l)+"&"),h=h.replace(/[?&]$/,"");var v={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(v)).pipe(t.mergeMap((function(e){return d.http.request("get",h,e)}))).pipe(t.mergeMap((function(e){return d.transformResult(h,e,(function(e){return d.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return d.transformResult(h,e,(function(e){return d.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.create=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/projects?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processCreate(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processCreate(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreate=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):409===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Conflict",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.get=function(e,r){var s=this,a=this.baseUrl+"/api/storefront/v1/projects/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Not Found",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getAvailableTransitions=function(e,r){var s=this,a=this.baseUrl+"/api/storefront/v1/projects/{id}/transitions?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetAvailableTransitions(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetAvailableTransitions(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAvailableTransitions=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):400===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Bad Request",p,e,c,r)}))):404===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Not Found",p,e,c,r)}))):409===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Conflict",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.changeStatus=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/projects/{id}/transitions/{transition}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(p=p.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'transition' must be defined.");p=p.replace("{transition}",encodeURIComponent(""+r)),null!=s&&(p+="tenantId="+encodeURIComponent(""+s)+"&"),p=p.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processChangeStatus(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processChangeStatus(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processChangeStatus=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):400===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Bad Request",p,e,c,r)}))):404===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Not Found",p,e,c,r)}))):409===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Conflict",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.forceStatus=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/projects/{id}/statuses/{status}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(p=p.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'status' must be defined.");p=p.replace("{status}",encodeURIComponent(""+r)),null!=s&&(p+="tenantId="+encodeURIComponent(""+s)+"&"),p=p.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processForceStatus(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processForceStatus(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processForceStatus=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):400===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Bad Request",p,e,c,r)}))):404===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Not Found",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getAllStatuses=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/projects/statuses?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetAllStatuses(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetAllStatuses(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAllStatuses=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getAllTransitions=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/projects/transitions?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetAllTransitions(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetAllTransitions(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAllTransitions=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getProjectPdfUrl=function(e,r,s,a){var p=this,i=this.baseUrl+"/api/storefront/v1/projects/{id}/project-pdf?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'designUserId' must be defined and cannot be null.");if(i+="designUserId="+encodeURIComponent(""+r)+"&",null==s)throw new Error("The parameter 'designId' must be defined and cannot be null.");i+="designId="+encodeURIComponent(""+s)+"&",null!=a&&(i+="tenantId="+encodeURIComponent(""+a)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return p.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(i,e,(function(e){return p.processGetProjectPdfUrl(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(i,e,(function(e){return p.processGetProjectPdfUrl(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProjectPdfUrl=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getProjectPdfZip=function(e,r,s,a,p){var i=this,u=this.baseUrl+"/api/storefront/v1/projects/{id}/project-pdf-zip?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'designUserId' must be defined and cannot be null.");if(u+="designUserId="+encodeURIComponent(""+r)+"&",null==s)throw new Error("The parameter 'designId' must be defined and cannot be null.");u+="designId="+encodeURIComponent(""+s)+"&",null!=a&&(u+="attachment="+encodeURIComponent(""+a)+"&"),null!=p&&(u+="tenantId="+encodeURIComponent(""+p)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetProjectPdfZip(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetProjectPdfZip(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProjectPdfZip=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}if(200===p||206===p){var h=e.headers?e.headers.get("content-disposition"):void 0,v=h?/filename="?([^"]*?)"?(;|$)/g.exec(h):void 0,m=v&&v.length>1?v[1]:void 0;return n.of({fileName:m,data:i,status:p,headers:c})}return 404===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Not Found",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getProjectOrder=function(e,r){var s=this,a=this.baseUrl+"/api/storefront/v1/projects/{id}/order?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProjectOrder(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProjectOrder(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProjectOrder=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Not Found",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r}(l);m.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new m(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:m,providedIn:"root"}),m.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],m.ctorParameters=function(){return[{type:f,decorators:[{type:r.Inject,args:[f]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var y=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return a(r,e),r.prototype.getAll=function(e,r,s,a,p,i){var u=this,c=this.baseUrl+"/api/storefront/v1/storefronts?";null!=e&&e&&e.forEach((function(e){c+="types="+encodeURIComponent(""+e)+"&"})),null!=r&&(c+="skip="+encodeURIComponent(""+r)+"&"),null!=s&&(c+="take="+encodeURIComponent(""+s)+"&"),null!=a&&(c+="sorting="+encodeURIComponent(""+a)+"&"),null!=p&&(c+="search="+encodeURIComponent(""+p)+"&"),null!=i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");var f={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(f)).pipe(t.mergeMap((function(e){return u.http.request("get",c,e)}))).pipe(t.mergeMap((function(e){return u.transformResult(c,e,(function(e){return u.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return u.transformResult(c,e,(function(e){return u.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.get=function(e,r){var s=this,a=this.baseUrl+"/api/storefront/v1/storefronts/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Not Found",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r}(l);y.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new y(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:y,providedIn:"root"}),y.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],y.ctorParameters=function(){return[{type:f,decorators:[{type:r.Inject,args:[f]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var g=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return a(r,e),r.prototype.getAll=function(e,r,s,a,p,i,u){var c=this,f=this.baseUrl+"/api/storefront/v1/storefront-users?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");f+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(f+="storefrontUserId="+encodeURIComponent(""+r)+"&"),null!=s&&(f+="skip="+encodeURIComponent(""+s)+"&"),null!=a&&(f+="take="+encodeURIComponent(""+a)+"&"),null!=p&&(f+="sorting="+encodeURIComponent(""+p)+"&"),null!=i&&(f+="search="+encodeURIComponent(""+i)+"&"),null!=u&&(f+="tenantId="+encodeURIComponent(""+u)+"&"),f=f.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(l)).pipe(t.mergeMap((function(e){return c.http.request("get",f,e)}))).pipe(t.mergeMap((function(e){return c.transformResult(f,e,(function(e){return c.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return c.transformResult(f,e,(function(e){return c.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.create=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/storefront-users?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processCreate(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processCreate(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreate=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):409===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Conflict",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.get=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/storefront-users/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(p=p.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(p+="tenantId="+encodeURIComponent(""+s)+"&"),p=p.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Not Found",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.register=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/storefront-users/register?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processRegister(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processRegister(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRegister=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):409===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Conflict",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.mergeAnonymous=function(e,r,s){var a=this,p=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.");p+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processMergeAnonymous(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processMergeAnonymous(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processMergeAnonymous=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Not Found",p,e,c,r)}))):409===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Conflict",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getToken=function(e,r,s){var a=this,p=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(p+="storefrontUserId="+encodeURIComponent(""+e)+"&",null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(p+="tenantId="+encodeURIComponent(""+s)+"&"),p=p.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetToken(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetToken(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetToken=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Not Found",p,e,c,r)}))):409===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),M("Conflict",p,e,c,r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r}(l);g.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new g(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:g,providedIn:"root"}),g.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],g.ctorParameters=function(){return[{type:f,decorators:[{type:r.Inject,args:[f]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var b,R,I=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return a(r,e),r.prototype.getApplicationsInfo=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/tenant-info/applications?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetApplicationsInfo(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetApplicationsInfo(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetApplicationsInfo=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getInfo=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/tenant-info?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetInfo(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetInfo(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetInfo=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getUsersInfo=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/tenant-info/users?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetUsersInfo(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetUsersInfo(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetUsersInfo=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?U(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?U(i).pipe(t.mergeMap((function(e){return M("Unauthorized",p,e,c)}))):403===p?U(i).pipe(t.mergeMap((function(e){return M("Forbidden",p,e,c)}))):200!==p&&204!==p?U(i).pipe(t.mergeMap((function(e){return M("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r}(l);I.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new I(r.ɵɵinject(f),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:f,decorators:[{type:r.Inject,args:[f]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]},(b=e.DatePeriod||(e.DatePeriod={})).All="All",b.Today="Today",b.Last7Days="Last7Days",b.Last30Days="Last30Days",(R=e.StorefrontType||(e.StorefrontType={})).Custom="Custom",R.Shopify="Shopify",R.DocketManager="DocketManager",R.Auth0Saml="Auth0Saml";var w=function(e){function r(r,t,n,o,s){var a=e.call(this)||this;return a.isApiException=!0,a.message=r,a.status=t,a.response=n,a.headers=o,a.result=s,a}return a(r,e),r.isApiException=function(e){return!0===e.isApiException},r}(Error);function M(e,r,t,o,s){return null!=s?n.throwError(s):n.throwError(new w(e,r,t,o,null))}function U(e){return new n.Observable((function(r){if(e){var t=new FileReader;t.onload=function(e){r.next(e.target.result),r.complete()},t.readAsText(e)}else r.next(""),r.complete()}))}function j(e,r,t){void 0===t&&(t="ApiKey");var n=new f;return n.apiKey=t,n.apiUrl=r,n.setAuthorizationToken(e),n}var C=function(){function e(){}return e.forRoot=function(r,t,n){return void 0===n&&(n="ApiKey"),{ngModule:e,providers:[{provide:c,useValue:t},{provide:f,useFactory:j.bind(this,r,t,n)}]}},e}();C.decorators=[{type:r.NgModule,args:[{declarations:[],imports:[],exports:[]}]}],e.API_BASE_URL=c,e.ApiClientBase=l,e.ApiClientConfiguration=f,e.ApiException=w,e.BuildInfoApiClient=d,e.CreateApiClientConfiguration=j,e.ProductReferencesApiClient=h,e.ProductSpecificationsApiClient=v,e.ProjectsApiClient=m,e.StorefrontModule=C,e.StorefrontUsersApiClient=g,e.StorefrontsApiClient=y,e.TenantInfoApiClient=I,Object.defineProperty(e,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var s=function(e,r){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])})(e,r)};function a(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function t(){this.constructor=e}s(e,r),e.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t)}function p(e,r,t,n){return new(t||(t=Promise))((function(o,s){function a(e){try{i(n.next(e))}catch(e){s(e)}}function p(e){try{i(n.throw(e))}catch(e){s(e)}}function i(e){var r;e.done?o(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(a,p)}i((n=n.apply(e,r||[])).next())}))}function i(e,r){var t,n,o,s,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:p(0),throw:p(1),return:p(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function p(s){return function(p){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=r.call(e,a)}catch(e){s=[6,e],n=0}finally{t=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,p])}}}Object.create;function u(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;var c=new r.InjectionToken("API_BASE_URL"),f=function(){function e(){this.apiKey="ApiKey",this.authorizationToken=null}return e.prototype.getAuthorizationToken=function(){return p(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.authorizationToken]}))}))},e.prototype.setAuthorizationToken=function(e){this.authorizationToken=e},e}(),l=function(){function e(e){this.configuration=e}return e.prototype.transformOptions=function(e){return p(this,void 0,void 0,(function(){var r;return i(this,(function(t){switch(t.label){case 0:return[4,this.configuration.getAuthorizationToken()];case 1:return r=t.sent(),e.headers=null!=r?e.headers.append("authorization","Bearer "+r):e.headers.append("X-API-Key",this.configuration.apiKey),[2,e]}}))}))},e.prototype.getBaseUrl=function(e){return this.configuration.apiUrl},e.prototype.transformResult=function(e,r,t){return t(r)},e}(),d=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return a(r,e),r.prototype.headInfo=function(){var e=this,r=this.baseUrl+"/api/storefront/v1/info";r=r.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(t){return e.http.request("head",r,t)}))).pipe(t.mergeMap((function(t){return e.transformResult(r,t,(function(r){return e.processHeadInfo(r)}))}))).pipe(t.catchError((function(t){if(!(t instanceof o.HttpResponseBase))return n.throwError(t);try{return e.transformResult(r,t,(function(r){return e.processHeadInfo(r)}))}catch(e){return n.throwError(e)}})))},r.prototype.processHeadInfo=function(e){var r,s,a=e.status,p=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),f=c.next();!f.done;f=c.next()){var l=f.value;i[l]=e.headers.get(l)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(s=c.return)&&s.call(c)}finally{if(r)throw r.error}}return 200===a?C(p).pipe(t.mergeMap((function(e){return n.of(null)}))):200!==a&&204!==a?C(p).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",a,e,i)}))):n.of(null)},r.prototype.getInfo=function(){var e=this,r=this.baseUrl+"/api/storefront/v1/info";r=r.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(t){return e.http.request("get",r,t)}))).pipe(t.mergeMap((function(t){return e.transformResult(r,t,(function(r){return e.processGetInfo(r)}))}))).pipe(t.catchError((function(t){if(!(t instanceof o.HttpResponseBase))return n.throwError(t);try{return e.transformResult(r,t,(function(r){return e.processGetInfo(r)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetInfo=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r}(l);d.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new d(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:d,providedIn:"root"}),d.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],d.ctorParameters=function(){return[{type:f,decorators:[{type:r.Inject,args:[f]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var h=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return a(r,e),r.prototype.getAll=function(e,r,s,a,p,i,u,c){var f=this,l=this.baseUrl+"/api/storefront/v1/product-references?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");l+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(l+="productReference="+encodeURIComponent(""+r)+"&"),null!=s&&(l+="productSpecificationId="+encodeURIComponent(""+s)+"&"),null!=a&&(l+="skip="+encodeURIComponent(""+a)+"&"),null!=p&&(l+="take="+encodeURIComponent(""+p)+"&"),null!=i&&(l+="sorting="+encodeURIComponent(""+i)+"&"),null!=u&&(l+="search="+encodeURIComponent(""+u)+"&"),null!=c&&(l+="tenantId="+encodeURIComponent(""+c)+"&"),l=l.replace(/[?&]$/,"");var d={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(d)).pipe(t.mergeMap((function(e){return f.http.request("get",l,e)}))).pipe(t.mergeMap((function(e){return f.transformResult(l,e,(function(e){return f.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return f.transformResult(l,e,(function(e){return f.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.create=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/product-references?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processCreate(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processCreate(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreate=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Not Found",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.get=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/product-references/{reference}?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(p=p.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(p+="tenantId="+encodeURIComponent(""+s)+"&"),p=p.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Not Found",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.delete=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/product-references/{reference}?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(p=p.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(p+="tenantId="+encodeURIComponent(""+s)+"&"),p=p.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("delete",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processDelete(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processDelete(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processDelete=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Not Found",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getProductSpecification=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-specification?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(p=p.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(p+="tenantId="+encodeURIComponent(""+s)+"&"),p=p.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetProductSpecification(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetProductSpecification(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProductSpecification=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Not Found",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getProductConfig=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-config?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(p=p.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(p+="tenantId="+encodeURIComponent(""+s)+"&"),p=p.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetProductConfig(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetProductConfig(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProductConfig=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Not Found",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getProductCostDetails=function(e,r,s,a,p,i,u){var c=this,f=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-cost-details?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(f=f.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'sku' must be defined and cannot be null.");if(f+="sku="+encodeURIComponent(""+r)+"&",null==s)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");if(f+="storefrontId="+encodeURIComponent(""+s)+"&",null!=a&&(f+="storefrontUserId="+encodeURIComponent(""+a)+"&"),null!=p&&(f+="currencyCode="+encodeURIComponent(""+p)+"&"),null===i)throw new Error("The parameter 'quantity' cannot be null.");void 0!==i&&(f+="quantity="+encodeURIComponent(""+i)+"&"),null!=u&&(f+="tenantId="+encodeURIComponent(""+u)+"&"),f=f.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(l)).pipe(t.mergeMap((function(e){return c.http.request("get",f,e)}))).pipe(t.mergeMap((function(e){return c.transformResult(f,e,(function(e){return c.processGetProductCostDetails(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return c.transformResult(f,e,(function(e){return c.processGetProductCostDetails(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProductCostDetails=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Not Found",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r}(l);h.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new h(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:h,providedIn:"root"}),h.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],h.ctorParameters=function(){return[{type:f,decorators:[{type:r.Inject,args:[f]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var v=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return a(r,e),r.prototype.getAll=function(e,r,s,a,p){var i=this,u=this.baseUrl+"/api/storefront/v1/product-specifications?";null!=e&&(u+="skip="+encodeURIComponent(""+e)+"&"),null!=r&&(u+="take="+encodeURIComponent(""+r)+"&"),null!=s&&(u+="sorting="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="search="+encodeURIComponent(""+a)+"&"),null!=p&&(u+="tenantId="+encodeURIComponent(""+p)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.get=function(e,r){var s=this,a=this.baseUrl+"/api/storefront/v1/product-specifications/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Not Found",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getConfiguration=function(e,r){var s=this,a=this.baseUrl+"/api/storefront/v1/product-specifications/{id}/config?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetConfiguration(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetConfiguration(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetConfiguration=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Not Found",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r}(l);v.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new v(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:v,providedIn:"root"}),v.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],v.ctorParameters=function(){return[{type:f,decorators:[{type:r.Inject,args:[f]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var m=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return a(r,e),r.prototype.getAll=function(e,r,s,a,p,i,u,c,f,l){var d=this,h=this.baseUrl+"/api/storefront/v1/projects?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");if(h+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(h+="ownerId="+encodeURIComponent(""+r)+"&"),null!=s&&(h+="productReference="+encodeURIComponent(""+s)+"&"),null!=a&&(h+="status="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'datePeriod' cannot be null.");void 0!==p&&(h+="datePeriod="+encodeURIComponent(""+p)+"&"),null!=i&&(h+="skip="+encodeURIComponent(""+i)+"&"),null!=u&&(h+="take="+encodeURIComponent(""+u)+"&"),null!=c&&(h+="sorting="+encodeURIComponent(""+c)+"&"),null!=f&&(h+="search="+encodeURIComponent(""+f)+"&"),null!=l&&(h+="tenantId="+encodeURIComponent(""+l)+"&"),h=h.replace(/[?&]$/,"");var v={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(v)).pipe(t.mergeMap((function(e){return d.http.request("get",h,e)}))).pipe(t.mergeMap((function(e){return d.transformResult(h,e,(function(e){return d.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return d.transformResult(h,e,(function(e){return d.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.create=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/projects?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processCreate(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processCreate(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreate=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):409===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Conflict",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.get=function(e,r){var s=this,a=this.baseUrl+"/api/storefront/v1/projects/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Not Found",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getAvailableTransitions=function(e,r){var s=this,a=this.baseUrl+"/api/storefront/v1/projects/{id}/transitions?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetAvailableTransitions(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetAvailableTransitions(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAvailableTransitions=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):400===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Bad Request",p,e,c,r)}))):404===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Not Found",p,e,c,r)}))):409===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Conflict",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.changeStatus=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/projects/{id}/transitions/{transition}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(p=p.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'transition' must be defined.");p=p.replace("{transition}",encodeURIComponent(""+r)),null!=s&&(p+="tenantId="+encodeURIComponent(""+s)+"&"),p=p.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processChangeStatus(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processChangeStatus(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processChangeStatus=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):400===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Bad Request",p,e,c,r)}))):404===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Not Found",p,e,c,r)}))):409===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Conflict",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.forceStatus=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/projects/{id}/statuses/{status}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(p=p.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'status' must be defined.");p=p.replace("{status}",encodeURIComponent(""+r)),null!=s&&(p+="tenantId="+encodeURIComponent(""+s)+"&"),p=p.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processForceStatus(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processForceStatus(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processForceStatus=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):400===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Bad Request",p,e,c,r)}))):404===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Not Found",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getAllStatuses=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/projects/statuses?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetAllStatuses(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetAllStatuses(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAllStatuses=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getAllTransitions=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/projects/transitions?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetAllTransitions(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetAllTransitions(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAllTransitions=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getProjectPdfUrl=function(e,r,s,a){var p=this,i=this.baseUrl+"/api/storefront/v1/projects/{id}/project-pdf?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'designUserId' must be defined and cannot be null.");if(i+="designUserId="+encodeURIComponent(""+r)+"&",null==s)throw new Error("The parameter 'designId' must be defined and cannot be null.");i+="designId="+encodeURIComponent(""+s)+"&",null!=a&&(i+="tenantId="+encodeURIComponent(""+a)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return p.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(i,e,(function(e){return p.processGetProjectPdfUrl(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(i,e,(function(e){return p.processGetProjectPdfUrl(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProjectPdfUrl=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getProjectPdfZip=function(e,r,s,a,p){var i=this,u=this.baseUrl+"/api/storefront/v1/projects/{id}/project-pdf-zip?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'designUserId' must be defined and cannot be null.");if(u+="designUserId="+encodeURIComponent(""+r)+"&",null==s)throw new Error("The parameter 'designId' must be defined and cannot be null.");u+="designId="+encodeURIComponent(""+s)+"&",null!=a&&(u+="attachment="+encodeURIComponent(""+a)+"&"),null!=p&&(u+="tenantId="+encodeURIComponent(""+p)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetProjectPdfZip(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetProjectPdfZip(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProjectPdfZip=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}if(200===p||206===p){var h=e.headers?e.headers.get("content-disposition"):void 0,v=h?/filename="?([^"]*?)"?(;|$)/g.exec(h):void 0,m=v&&v.length>1?v[1]:void 0;return n.of({fileName:m,data:i,status:p,headers:c})}return 404===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Not Found",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getProjectOrder=function(e,r){var s=this,a=this.baseUrl+"/api/storefront/v1/projects/{id}/order?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProjectOrder(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProjectOrder(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetProjectOrder=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Not Found",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r}(l);m.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new m(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:m,providedIn:"root"}),m.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],m.ctorParameters=function(){return[{type:f,decorators:[{type:r.Inject,args:[f]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var y=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return a(r,e),r.prototype.getAll=function(e,r,s,a,p,i){var u=this,c=this.baseUrl+"/api/storefront/v1/storefronts?";null!=e&&e&&e.forEach((function(e){c+="types="+encodeURIComponent(""+e)+"&"})),null!=r&&(c+="skip="+encodeURIComponent(""+r)+"&"),null!=s&&(c+="take="+encodeURIComponent(""+s)+"&"),null!=a&&(c+="sorting="+encodeURIComponent(""+a)+"&"),null!=p&&(c+="search="+encodeURIComponent(""+p)+"&"),null!=i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");var f={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(f)).pipe(t.mergeMap((function(e){return u.http.request("get",c,e)}))).pipe(t.mergeMap((function(e){return u.transformResult(c,e,(function(e){return u.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return u.transformResult(c,e,(function(e){return u.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.get=function(e,r){var s=this,a=this.baseUrl+"/api/storefront/v1/storefronts/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="tenantId="+encodeURIComponent(""+r)+"&"),a=a.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Not Found",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r}(l);y.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new y(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:y,providedIn:"root"}),y.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],y.ctorParameters=function(){return[{type:f,decorators:[{type:r.Inject,args:[f]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var g=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return a(r,e),r.prototype.getAll=function(e,r,s,a,p,i,u){var c=this,f=this.baseUrl+"/api/storefront/v1/storefront-users?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");f+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(f+="storefrontUserId="+encodeURIComponent(""+r)+"&"),null!=s&&(f+="skip="+encodeURIComponent(""+s)+"&"),null!=a&&(f+="take="+encodeURIComponent(""+a)+"&"),null!=p&&(f+="sorting="+encodeURIComponent(""+p)+"&"),null!=i&&(f+="search="+encodeURIComponent(""+i)+"&"),null!=u&&(f+="tenantId="+encodeURIComponent(""+u)+"&"),f=f.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(l)).pipe(t.mergeMap((function(e){return c.http.request("get",f,e)}))).pipe(t.mergeMap((function(e){return c.transformResult(f,e,(function(e){return c.processGetAll(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return c.transformResult(f,e,(function(e){return c.processGetAll(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.create=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/storefront-users?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processCreate(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processCreate(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreate=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):409===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Conflict",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.get=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/storefront-users/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(p=p.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(p+="tenantId="+encodeURIComponent(""+s)+"&"),p=p.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGet=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Not Found",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.register=function(e,r,s){var a=this,p=this.baseUrl+"/api/storefront/v1/storefront-users/register?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json",Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processRegister(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processRegister(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRegister=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):409===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Conflict",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.mergeAnonymous=function(e,r,s){var a=this,p=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.");p+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var i={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json-patch+json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processMergeAnonymous(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processMergeAnonymous(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processMergeAnonymous=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Not Found",p,e,c,r)}))):409===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Conflict",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getToken=function(e,r,s){var a=this,p=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(p+="storefrontUserId="+encodeURIComponent(""+e)+"&",null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");p+="storefrontId="+encodeURIComponent(""+r)+"&",null!=s&&(p+="tenantId="+encodeURIComponent(""+s)+"&"),p=p.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetToken(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetToken(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetToken=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 201===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):404===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Not Found",p,e,c,r)}))):409===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),U("Conflict",p,e,c,r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r}(l);g.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new g(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:g,providedIn:"root"}),g.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],g.ctorParameters=function(){return[{type:f,decorators:[{type:r.Inject,args:[f]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var b,R,I,w=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return a(r,e),r.prototype.getApplicationsInfo=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/tenant-info/applications?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetApplicationsInfo(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetApplicationsInfo(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetApplicationsInfo=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getInfo=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/tenant-info?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetInfo(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetInfo(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetInfo=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r.prototype.getUsersInfo=function(e){var r=this,s=this.baseUrl+"/api/storefront/v1/tenant-info/users?";null!=e&&(s+="tenantId="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"text/plain"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(e){return r.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(s,e,(function(e){return r.processGetUsersInfo(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(s,e,(function(e){return r.processGetUsersInfo(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetUsersInfo=function(e){var r,s,a=this,p=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var f=u(e.headers.keys()),l=f.next();!l.done;l=f.next()){var d=l.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}return 200===p?C(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,a.jsonParseReviver),n.of(r)}))):401===p?C(i).pipe(t.mergeMap((function(e){return U("Unauthorized",p,e,c)}))):403===p?C(i).pipe(t.mergeMap((function(e){return U("Forbidden",p,e,c)}))):200!==p&&204!==p?C(i).pipe(t.mergeMap((function(e){return U("An unexpected server error occurred.",p,e,c)}))):n.of(null)},r}(l);w.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new w(r.ɵɵinject(f),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:w,providedIn:"root"}),w.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],w.ctorParameters=function(){return[{type:f,decorators:[{type:r.Inject,args:[f]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]},(b=e.DatePeriod||(e.DatePeriod={})).All="All",b.Today="Today",b.Last7Days="Last7Days",b.Last30Days="Last30Days",(R=e.ProjectProductResourceType||(e.ProjectProductResourceType={}))[R._0=0]="_0",R[R._1=1]="_1",R[R._2=2]="_2",(I=e.StorefrontType||(e.StorefrontType={})).Custom="Custom",I.Shopify="Shopify",I.DocketManager="DocketManager",I.Auth0Saml="Auth0Saml";var M=function(e){function r(r,t,n,o,s){var a=e.call(this)||this;return a.isApiException=!0,a.message=r,a.status=t,a.response=n,a.headers=o,a.result=s,a}return a(r,e),r.isApiException=function(e){return!0===e.isApiException},r}(Error);function U(e,r,t,o,s){return null!=s?n.throwError(s):n.throwError(new M(e,r,t,o,null))}function C(e){return new n.Observable((function(r){if(e){var t=new FileReader;t.onload=function(e){r.next(e.target.result),r.complete()},t.readAsText(e)}else r.next(""),r.complete()}))}function j(e,r,t){void 0===t&&(t="ApiKey");var n=new f;return n.apiKey=t,n.apiUrl=r,n.setAuthorizationToken(e),n}var H=function(){function e(){}return e.forRoot=function(r,t,n){return void 0===n&&(n="ApiKey"),{ngModule:e,providers:[{provide:c,useValue:t},{provide:f,useFactory:j.bind(this,r,t,n)}]}},e}();H.decorators=[{type:r.NgModule,args:[{declarations:[],imports:[],exports:[]}]}],e.API_BASE_URL=c,e.ApiClientBase=l,e.ApiClientConfiguration=f,e.ApiException=M,e.BuildInfoApiClient=d,e.CreateApiClientConfiguration=j,e.ProductReferencesApiClient=h,e.ProductSpecificationsApiClient=v,e.ProjectsApiClient=m,e.StorefrontModule=H,e.StorefrontUsersApiClient=g,e.StorefrontsApiClient=y,e.TenantInfoApiClient=w,Object.defineProperty(e,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=aurigma-ng-storefront-api-client.umd.min.js.map