@aurigma/ng-storefront-api-client
Version:
Angular API Client for Storefront API service of Customer's Canvas web-to-print system.
15 lines (13 loc) • 161 kB
JavaScript
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@angular/core"),require("rxjs/operators"),require("rxjs"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("@aurigma/ng-storefront-api-client",["exports","@angular/core","rxjs/operators","rxjs","@angular/common/http"],r):r(((e="undefined"!=typeof globalThis?globalThis:e||self).aurigma=e.aurigma||{},e.aurigma["ng-storefront-api-client"]={}),e.ng.core,e.rxjs.operators,e.rxjs,e.ng.common.http)}(this,(function(e,r,n,t,o){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var p=function(e,r){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])})(e,r)};function s(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}p(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}function a(e,r,n,t){return new(n||(n=Promise))((function(o,p){function s(e){try{i(t.next(e))}catch(e){p(e)}}function a(e){try{i(t.throw(e))}catch(e){p(e)}}function i(e){var r;e.done?o(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(s,a)}i((t=t.apply(e,r||[])).next())}))}function i(e,r){var n,t,o,p,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return p={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(p[Symbol.iterator]=function(){return this}),p;function a(p){return function(a){return function(p){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,t&&(o=2&p[0]?t.return:p[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,p[1])).done)return o;switch(t=0,o&&(p=[2&p[0],o.value]),p[0]){case 0:case 1:o=p;break;case 4:return s.label++,{value:p[1],done:!1};case 5:s.label++,t=p[1],p=[0];continue;case 7:p=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==p[0]&&2!==p[0])){s=0;continue}if(3===p[0]&&(!o||p[1]>o[0]&&p[1]<o[3])){s.label=p[1];break}if(6===p[0]&&s.label<o[1]){s.label=o[1],o=p;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(p);break}o[2]&&s.ops.pop(),s.trys.pop();continue}p=r.call(e,s)}catch(e){p=[6,e],t=0}finally{n=o=0}if(5&p[0])throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}([p,a])}}}Object.create;function u(e){var r="function"==typeof Symbol&&Symbol.iterator,n=r&&e[r],t=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;var c=new r.InjectionToken("API_BASE_URL"),l=function(){function e(){this.apiKey="",this.authorizationToken=null}return e.prototype.getAuthorizationToken=function(){return a(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.authorizationToken]}))}))},e.prototype.setAuthorizationToken=function(e){this.authorizationToken=e},e}(),f=function(){function e(e){this.configuration=e}return e.prototype.transformOptions=function(e){return a(this,void 0,void 0,(function(){var r;return i(this,(function(n){switch(n.label){case 0:return[4,this.configuration.getAuthorizationToken()];case 1:return r=n.sent(),e.headers=null!=r?e.headers.append("authorization","Bearer "+r):e.headers.append("X-API-Key",this.configuration.apiKey),[2,e]}}))}))},e.prototype.getBaseUrl=function(e){return this.configuration.apiUrl.endsWith("/")?this.configuration.apiUrl.slice(0,-1):this.configuration.apiUrl},e.prototype.transformResult=function(e,r,n){return n(r)},e}(),d=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.headInfo=function(){var e=this,r=this.baseUrl+"/api/storefront/v1/info";r=r.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return t.from(this.transformOptions(p)).pipe(n.mergeMap((function(n){return e.http.request("head",r,n)}))).pipe(n.mergeMap((function(n){return e.transformResult(r,n,(function(r){return e.processHeadInfo(r)}))}))).pipe(n.catchError((function(n){if(!(n instanceof o.HttpResponseBase))return t.throwError(n);try{return e.transformResult(r,n,(function(r){return e.processHeadInfo(r)}))}catch(e){return t.throwError(e)}})))},r.prototype.processHeadInfo=function(e){var r,p,s=e.status,a=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),l=c.next();!l.done;l=c.next()){var f=l.value;i[f]=e.headers.get(f)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=c.return)&&p.call(c)}finally{if(r)throw r.error}}return 200===s?D(a).pipe(n.mergeMap((function(e){return t.of(null)}))):200!==s&&204!==s?D(a).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",s,e,i)}))):t.of(null)},r.prototype.getInfo=function(){var e=this,r=this.baseUrl+"/api/storefront/v1/info";r=r.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(p)).pipe(n.mergeMap((function(n){return e.http.request("get",r,n)}))).pipe(n.mergeMap((function(n){return e.transformResult(r,n,(function(r){return e.processGetInfo(r)}))}))).pipe(n.catchError((function(n){if(!(n instanceof o.HttpResponseBase))return t.throwError(n);try{return e.transformResult(r,n,(function(r){return e.processGetInfo(r)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetInfo=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);d.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new d(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:d,providedIn:"root"}),d.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],d.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var m=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAll=function(e,r,p,s){var a=this,i=this.baseUrl+"/api/storefront/v1/processing-pipelines?";null!=e&&(i+="skip="+encodeURIComponent(""+e)+"&"),null!=r&&(i+="take="+encodeURIComponent(""+r)+"&"),null!=p&&(i+="search="+encodeURIComponent(""+p)+"&"),null!=s&&(i+="tenantId="+encodeURIComponent(""+s)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(u)).pipe(n.mergeMap((function(e){return a.http.request("get",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processGetAll(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processGetAll(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.get=function(e,r){var p=this,s=this.baseUrl+"/api/storefront/v1/processing-pipelines/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(a)).pipe(n.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(n.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGet(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGet(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGet=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);m.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new m(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:m,providedIn:"root"}),m.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],m.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var h=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAllProductBundles=function(e,r,p,s,a,i){var u=this,c=this.baseUrl+"/api/storefront/v1/product-bundles?";null!=e&&(c+="skip="+encodeURIComponent(""+e)+"&"),null!=r&&(c+="take="+encodeURIComponent(""+r)+"&"),null!=p&&(c+="sorting="+encodeURIComponent(""+p)+"&"),null!=s&&(c+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(c+="customFields="+encodeURIComponent(""+a)+"&"),null!=i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(l)).pipe(n.mergeMap((function(e){return u.http.request("get",c,e)}))).pipe(n.mergeMap((function(e){return u.transformResult(c,e,(function(e){return u.processGetAllProductBundles(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return u.transformResult(c,e,(function(e){return u.processGetAllProductBundles(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProductBundles=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductBundle=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-bundles/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="productBundleVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProductBundle(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProductBundle(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductBundle=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductSummary=function(e,r,p,s,a){var i=this,u=this.baseUrl+"/api/storefront/v1/product-bundles/{id}/summary?";if(null==e)throw new Error("The parameter 'id' must be defined.");u=u.replace("{id}",encodeURIComponent(""+e)),null!=r&&(u+="productBundleVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(u+="productVariantId="+encodeURIComponent(""+p)+"&"),null!=s&&(u+="sku="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(c)).pipe(n.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(n.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetProductSummary(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetProductSummary(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductSummary=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getPersonalizationWorkflow=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-bundles/{id}/personalization-workflow?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=r&&(a+="productBundleVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetPersonalizationWorkflow(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetPersonalizationWorkflow(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetPersonalizationWorkflow=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);h.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new h(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:h,providedIn:"root"}),h.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],h.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var v=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAllProductLinks=function(e,r,p,s,a){var i=this,u=this.baseUrl+"/api/storefront/v1/product-links?";null!=e&&(u+="skip="+encodeURIComponent(""+e)+"&"),null!=r&&(u+="take="+encodeURIComponent(""+r)+"&"),null!=p&&(u+="sorting="+encodeURIComponent(""+p)+"&"),null!=s&&(u+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(c)).pipe(n.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(n.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetAllProductLinks(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetAllProductLinks(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProductLinks=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductLink=function(e,r,p,s){var a=this,i=this.baseUrl+"/api/storefront/v1/product-links/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="productLinkVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(i+="productVersionId="+encodeURIComponent(""+p)+"&"),null!=s&&(i+="tenantId="+encodeURIComponent(""+s)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(u)).pipe(n.mergeMap((function(e){return a.http.request("get",i,e)}))).pipe(n.mergeMap((function(e){return a.transformResult(i,e,(function(e){return a.processGetProductLink(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return a.transformResult(i,e,(function(e){return a.processGetProductLink(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductLink=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductSummary=function(e,r,p,s,a,i){var u=this,c=this.baseUrl+"/api/storefront/v1/product-links/{id}/summary?";if(null==e)throw new Error("The parameter 'id' must be defined.");c=c.replace("{id}",encodeURIComponent(""+e)),null!=r&&(c+="productLinkVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(c+="productVersionId="+encodeURIComponent(""+p)+"&"),null!=s&&(c+="productVariantId="+encodeURIComponent(""+s)+"&"),null!=a&&(c+="sku="+encodeURIComponent(""+a)+"&"),null!=i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(l)).pipe(n.mergeMap((function(e){return u.http.request("get",c,e)}))).pipe(n.mergeMap((function(e){return u.transformResult(c,e,(function(e){return u.processGetProductSummary(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return u.transformResult(c,e,(function(e){return u.processGetProductSummary(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductSummary=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getPersonalizationWorkflow=function(e,r,p,s,a){var i=this,u=this.baseUrl+"/api/storefront/v1/product-links/{id}/personalization-workflow?";if(null==e)throw new Error("The parameter 'id' must be defined.");u=u.replace("{id}",encodeURIComponent(""+e)),null!=r&&(u+="productLinkVersionId="+encodeURIComponent(""+r)+"&"),null!=p&&(u+="productVersionId="+encodeURIComponent(""+p)+"&"),null!=s&&(u+="productFilterId="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(c)).pipe(n.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(n.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetPersonalizationWorkflow(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetPersonalizationWorkflow(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetPersonalizationWorkflow=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r}(f);v.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new v(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:v,providedIn:"root"}),v.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],v.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var y=function(e){function r(r,n,t){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=n,o.baseUrl=null!=t?t:o.getBaseUrl(""),o}return s(r,e),r.prototype.getAll=function(e,r,p,s,a,i,u,c,l,f,d,m,h,v){var y=this,g=this.baseUrl+"/api/storefront/v1/product-references?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");g+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(g+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(g+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(g+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(g+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(g+="productBundleId="+encodeURIComponent(""+i)+"&"),null!=u&&(g+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(g+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(g+="sorting="+encodeURIComponent(""+l)+"&"),null!=f&&(g+="search="+encodeURIComponent(""+f)+"&"),null!=d&&(g+="sku="+encodeURIComponent(""+d)+"&"),null!=m&&m&&m.forEach((function(e){g+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(g+="customFields="+encodeURIComponent(""+h)+"&"),null!=v&&(g+="tenantId="+encodeURIComponent(""+v)+"&"),g=g.replace(/[?&]$/,"");var R={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(R)).pipe(n.mergeMap((function(e){return y.http.request("get",g,e)}))).pipe(n.mergeMap((function(e){return y.transformResult(g,e,(function(e){return y.processGetAll(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return y.transformResult(g,e,(function(e){return y.processGetAll(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAll=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAllProductSpecifications=function(e,r,p,s,a,i,u,c,l,f,d,m,h,v){var y=this,g=this.baseUrl+"/api/storefront/v1/product-references/product-specifications?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");g+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(g+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(g+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(g+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(g+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(g+="productBundleId="+encodeURIComponent(""+i)+"&"),null!=u&&(g+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(g+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(g+="sorting="+encodeURIComponent(""+l)+"&"),null!=f&&(g+="search="+encodeURIComponent(""+f)+"&"),null!=d&&(g+="sku="+encodeURIComponent(""+d)+"&"),null!=m&&m&&m.forEach((function(e){g+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(g+="customFields="+encodeURIComponent(""+h)+"&"),null!=v&&(g+="tenantId="+encodeURIComponent(""+v)+"&"),g=g.replace(/[?&]$/,"");var R={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(R)).pipe(n.mergeMap((function(e){return y.http.request("get",g,e)}))).pipe(n.mergeMap((function(e){return y.transformResult(g,e,(function(e){return y.processGetAllProductSpecifications(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return y.transformResult(g,e,(function(e){return y.processGetAllProductSpecifications(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProductSpecifications=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAllProducts=function(e,r,p,s,a,i,u,c,l,f,d,m,h,v){var y=this,g=this.baseUrl+"/api/storefront/v1/product-references/products?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");g+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(g+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(g+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(g+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(g+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(g+="productBundleId="+encodeURIComponent(""+i)+"&"),null!=u&&(g+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(g+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(g+="sorting="+encodeURIComponent(""+l)+"&"),null!=f&&(g+="search="+encodeURIComponent(""+f)+"&"),null!=d&&(g+="sku="+encodeURIComponent(""+d)+"&"),null!=m&&m&&m.forEach((function(e){g+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(g+="customFields="+encodeURIComponent(""+h)+"&"),null!=v&&(g+="tenantId="+encodeURIComponent(""+v)+"&"),g=g.replace(/[?&]$/,"");var R={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(R)).pipe(n.mergeMap((function(e){return y.http.request("get",g,e)}))).pipe(n.mergeMap((function(e){return y.transformResult(g,e,(function(e){return y.processGetAllProducts(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return y.transformResult(g,e,(function(e){return y.processGetAllProducts(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProducts=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAllProductLinks=function(e,r,p,s,a,i,u,c,l,f,d,m,h,v){var y=this,g=this.baseUrl+"/api/storefront/v1/product-references/product-links?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");g+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(g+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(g+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(g+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(g+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(g+="productBundleId="+encodeURIComponent(""+i)+"&"),null!=u&&(g+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(g+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(g+="sorting="+encodeURIComponent(""+l)+"&"),null!=f&&(g+="search="+encodeURIComponent(""+f)+"&"),null!=d&&(g+="sku="+encodeURIComponent(""+d)+"&"),null!=m&&m&&m.forEach((function(e){g+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(g+="customFields="+encodeURIComponent(""+h)+"&"),null!=v&&(g+="tenantId="+encodeURIComponent(""+v)+"&"),g=g.replace(/[?&]$/,"");var R={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(R)).pipe(n.mergeMap((function(e){return y.http.request("get",g,e)}))).pipe(n.mergeMap((function(e){return y.transformResult(g,e,(function(e){return y.processGetAllProductLinks(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return y.transformResult(g,e,(function(e){return y.processGetAllProductLinks(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProductLinks=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getAllProductBundles=function(e,r,p,s,a,i,u,c,l,f,d,m,h,v){var y=this,g=this.baseUrl+"/api/storefront/v1/product-references/product-bundles?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");g+="storefrontId="+encodeURIComponent(""+e)+"&",null!=r&&(g+="productReference="+encodeURIComponent(""+r)+"&"),null!=p&&(g+="productSpecificationId="+encodeURIComponent(""+p)+"&"),null!=s&&(g+="productId="+encodeURIComponent(""+s)+"&"),null!=a&&(g+="productLinkId="+encodeURIComponent(""+a)+"&"),null!=i&&(g+="productBundleId="+encodeURIComponent(""+i)+"&"),null!=u&&(g+="skip="+encodeURIComponent(""+u)+"&"),null!=c&&(g+="take="+encodeURIComponent(""+c)+"&"),null!=l&&(g+="sorting="+encodeURIComponent(""+l)+"&"),null!=f&&(g+="search="+encodeURIComponent(""+f)+"&"),null!=d&&(g+="sku="+encodeURIComponent(""+d)+"&"),null!=m&&m&&m.forEach((function(e){g+="tags="+encodeURIComponent(""+e)+"&"})),null!=h&&(g+="customFields="+encodeURIComponent(""+h)+"&"),null!=v&&(g+="tenantId="+encodeURIComponent(""+v)+"&"),g=g.replace(/[?&]$/,"");var R={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(R)).pipe(n.mergeMap((function(e){return y.http.request("get",g,e)}))).pipe(n.mergeMap((function(e){return y.transformResult(g,e,(function(e){return y.processGetAllProductBundles(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return y.transformResult(g,e,(function(e){return y.processGetAllProductBundles(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetAllProductBundles=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.get=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(a=a.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+r)+"&",null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGet(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGet(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGet=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductSpecification=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-specification?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(a=a.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+r)+"&",null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProductSpecification(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProductSpecification(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductSpecification=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProduct=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(a=a.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+r)+"&",null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProduct(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return s.transformResult(a,e,(function(e){return s.processGetProduct(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProduct=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductSummary=function(e,r,p,s,a){var i=this,u=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-summary?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(u=u.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");u+="storefrontId="+encodeURIComponent(""+r)+"&",null!=p&&(u+="productVariantId="+encodeURIComponent(""+p)+"&"),null!=s&&(u+="sku="+encodeURIComponent(""+s)+"&"),null!=a&&(u+="tenantId="+encodeURIComponent(""+a)+"&"),u=u.replace(/[?&]$/,"");var c={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(c)).pipe(n.mergeMap((function(e){return i.http.request("get",u,e)}))).pipe(n.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processGetProductSummary(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return t.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processGetProductSummary(e)}))}catch(e){return t.throwError(e)}})))},r.prototype.processGetProductSummary=function(e){var r,p,s=this,a=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(p=l.return)&&p.call(l)}finally{if(r)throw r.error}}return 200===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),t.of(r)}))):404===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Not Found",a,e,c,r)}))):409===a?D(i).pipe(n.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,s.jsonParseReviver),L("Conflict",a,e,c,r)}))):401===a?D(i).pipe(n.mergeMap((function(e){return L("Unauthorized",a,e,c)}))):403===a?D(i).pipe(n.mergeMap((function(e){return L("Forbidden",a,e,c)}))):200!==a&&204!==a?D(i).pipe(n.mergeMap((function(e){return L("An unexpected server error occurred.",a,e,c)}))):t.of(null)},r.prototype.getProductLink=function(e,r,p){var s=this,a=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-link?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(a=a.replace("{reference}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+r)+"&",null!=p&&(a+="tenantId="+encodeURIComponent(""+p)+"&"),a=a.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return t.from(this.transformOptions(i)).pipe(n.mergeMap((function(e){return s.http.request("get",a,e)}))).pipe(n.mergeMap((function(e){return s.transformResult(a,e,(function(e){return s.processGetProductLink(e)}))}))).pipe(n.catchError((function(e){if(!(e instanceof o.HttpResponseBase))retu