/**
 * Minified by jsDelivr using Terser v5.48.0.
 * Original file: /npm/@aurigma/axios-storefront-api-client@2.66.6/dist/cjs/storefront-api-client.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ApiException=exports.StorefrontStatus=exports.StorefrontType=exports.OrderDataItemValueType=exports.RenderHiResScenarioOutputRotateMode=exports.RenderHiResScenarioOutputFlipMode=exports.RenderHiResScenarioOutputColorSpace=exports.RenderHiResScenarioOutputFormat=exports.ProjectItemProductType=exports.ProjectItemResourceType=exports.ProjectProcessingStatus=exports.DatePeriod=exports.SurfaceUsageType=exports.ProductVariantMockupType=exports.ProductVariantResourceType=exports.ProductReferenceType=exports.OptionType=exports.ProductLinkResourceType=exports.AppearanceDataType=exports.WorkflowType=exports.ProductType=exports.ConflictType=exports.ProductBundleResourceType=exports.TenantInfoApiClient=exports.StorefrontUsersApiClient=exports.StorefrontsApiClient=exports.ProjectsApiClient=exports.ProductSpecificationsApiClient=exports.ProductsApiClient=exports.ProductReferencesApiClient=exports.ProductLinksApiClient=exports.ProductBundlesApiClient=exports.ProcessingPipelinesApiClient=exports.BuildInfoApiClient=exports.ApiClientBase=exports.ApiClientConfiguration=void 0;const axios_1=require("axios");class ApiClientConfiguration{apiUrl;apiKey="";authorizationToken=null;async getAuthorizationToken(){return this.authorizationToken}setAuthorizationToken(e){this.authorizationToken=e}}exports.ApiClientConfiguration=ApiClientConfiguration;class ApiClientBase{configuration;constructor(e){this.configuration=e}async transformOptions(e){const t=await this.configuration.getAuthorizationToken();return e.headers=null!=t?{...e.headers,authorization:" Bearer "+t}:{...e.headers,"X-API-Key":this.configuration.apiKey},(e={...e,transformResponse:e=>e}).responseType||(e.responseType="json"),"blob"==e.responseType&&(e.responseType="arraybuffer"),e}getBaseUrl(e){return this.configuration.apiUrl.endsWith("/")?this.configuration.apiUrl.slice(0,-1):this.configuration.apiUrl}transformResult(e,t,r){return r(t)}}exports.ApiClientBase=ApiClientBase;class BuildInfoApiClient extends ApiClientBase{instance;baseUrl;jsonParseReviver=void 0;constructor(e,t,r){super(e),this.instance=r||axios_1.create(),this.baseUrl=null!=t?t:this.getBaseUrl("")}headInfo(e){let t=this.baseUrl+"/api/storefront/v1/info";t=t.replace(/[?&]$/,"");let r={method:"HEAD",url:t,headers:{},cancelToken:e};return this.transformOptions(r).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(t,e,e=>this.processHeadInfo(e)))}processHeadInfo(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){e.data;return Promise.resolve(null)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getInfo(e){let t=this.baseUrl+"/api/storefront/v1/info";t=t.replace(/[?&]$/,"");let r={method:"GET",url:t,headers:{Accept:"application/json"},cancelToken:e};return this.transformOptions(r).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(t,e,e=>this.processGetInfo(e)))}processGetInfo(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}}exports.BuildInfoApiClient=BuildInfoApiClient;class ProcessingPipelinesApiClient extends ApiClientBase{instance;baseUrl;jsonParseReviver=void 0;constructor(e,t,r){super(e),this.instance=r||axios_1.create(),this.baseUrl=null!=t?t:this.getBaseUrl("")}getAll(e,t,r,n,o){let s=this.baseUrl+"/api/storefront/v1/processing-pipelines?";null!=e&&(s+="skip="+encodeURIComponent(""+e)+"&"),null!=t&&(s+="take="+encodeURIComponent(""+t)+"&"),null!=r&&(s+="search="+encodeURIComponent(""+r)+"&"),null!=n&&(s+="tenantId="+encodeURIComponent(""+n)+"&"),s=s.replace(/[?&]$/,"");let a={method:"GET",url:s,headers:{Accept:"application/json"},cancelToken:o};return this.transformOptions(a).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(s,e,e=>this.processGetAll(e)))}processGetAll(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}get(e,t,r){let n=this.baseUrl+"/api/storefront/v1/processing-pipelines/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");n=n.replace("{id}",encodeURIComponent(""+e)),null!=t&&(n+="tenantId="+encodeURIComponent(""+t)+"&"),n=n.replace(/[?&]$/,"");let o={method:"GET",url:n,headers:{Accept:"application/json"},cancelToken:r};return this.transformOptions(o).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(n,e,e=>this.processGet(e)))}processGet(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}}exports.ProcessingPipelinesApiClient=ProcessingPipelinesApiClient;class ProductBundlesApiClient extends ApiClientBase{instance;baseUrl;jsonParseReviver=void 0;constructor(e,t,r){super(e),this.instance=r||axios_1.create(),this.baseUrl=null!=t?t:this.getBaseUrl("")}getAllProductBundles(e,t,r,n,o,s,a){let i=this.baseUrl+"/api/storefront/v1/product-bundles?";null!=e&&(i+="skip="+encodeURIComponent(""+e)+"&"),null!=t&&(i+="take="+encodeURIComponent(""+t)+"&"),null!=r&&(i+="sorting="+encodeURIComponent(""+r)+"&"),null!=n&&(i+="search="+encodeURIComponent(""+n)+"&"),null!=o&&(i+="customFields="+encodeURIComponent(""+o)+"&"),null!=s&&(i+="tenantId="+encodeURIComponent(""+s)+"&"),i=i.replace(/[?&]$/,"");let l={method:"GET",url:i,headers:{Accept:"application/json"},cancelToken:a};return this.transformOptions(l).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(i,e,e=>this.processGetAllProductBundles(e)))}processGetAllProductBundles(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductBundle(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-bundles/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");o=o.replace("{id}",encodeURIComponent(""+e)),null!=t&&(o+="productBundleVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processGetProductBundle(e)))}processGetProductBundle(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductBundlePersonalizationParameters(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-bundles/{id}/personalization-parameters?";if(null==e)throw new Error("The parameter 'id' must be defined.");o=o.replace("{id}",encodeURIComponent(""+e)),null!=t&&(o+="productBundleVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processGetProductBundlePersonalizationParameters(e)))}processGetProductBundlePersonalizationParameters(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductSummary(e,t,r,n,o,s){let a=this.baseUrl+"/api/storefront/v1/product-bundles/{id}/summary?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=t&&(a+="productBundleVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(a+="productVariantId="+encodeURIComponent(""+r)+"&"),null!=n&&(a+="sku="+encodeURIComponent(""+n)+"&"),null!=o&&(a+="tenantId="+encodeURIComponent(""+o)+"&"),a=a.replace(/[?&]$/,"");let i={method:"GET",url:a,headers:{Accept:"application/json"},cancelToken:s};return this.transformOptions(i).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(a,e,e=>this.processGetProductSummary(e)))}processGetProductSummary(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getPersonalizationWorkflow(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-bundles/{id}/personalization-workflow?";if(null==e)throw new Error("The parameter 'id' must be defined.");o=o.replace("{id}",encodeURIComponent(""+e)),null!=t&&(o+="productBundleVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processGetPersonalizationWorkflow(e)))}processGetPersonalizationWorkflow(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}}exports.ProductBundlesApiClient=ProductBundlesApiClient;class ProductLinksApiClient extends ApiClientBase{instance;baseUrl;jsonParseReviver=void 0;constructor(e,t,r){super(e),this.instance=r||axios_1.create(),this.baseUrl=null!=t?t:this.getBaseUrl("")}getAllProductLinks(e,t,r,n,o,s){let a=this.baseUrl+"/api/storefront/v1/product-links?";null!=e&&(a+="skip="+encodeURIComponent(""+e)+"&"),null!=t&&(a+="take="+encodeURIComponent(""+t)+"&"),null!=r&&(a+="sorting="+encodeURIComponent(""+r)+"&"),null!=n&&(a+="search="+encodeURIComponent(""+n)+"&"),null!=o&&(a+="tenantId="+encodeURIComponent(""+o)+"&"),a=a.replace(/[?&]$/,"");let i={method:"GET",url:a,headers:{Accept:"application/json"},cancelToken:s};return this.transformOptions(i).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(a,e,e=>this.processGetAllProductLinks(e)))}processGetAllProductLinks(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductLink(e,t,r,n,o){let s=this.baseUrl+"/api/storefront/v1/product-links/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=t&&(s+="productLinkVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(s+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=n&&(s+="tenantId="+encodeURIComponent(""+n)+"&"),s=s.replace(/[?&]$/,"");let a={method:"GET",url:s,headers:{Accept:"application/json"},cancelToken:o};return this.transformOptions(a).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(s,e,e=>this.processGetProductLink(e)))}processGetProductLink(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductLinkPersonalizationParameters(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-links/{id}/personalization-parameters?";if(null==e)throw new Error("The parameter 'id' must be defined.");o=o.replace("{id}",encodeURIComponent(""+e)),null!=t&&(o+="productLinkVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processGetProductLinkPersonalizationParameters(e)))}processGetProductLinkPersonalizationParameters(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductSummary(e,t,r,n,o,s,a){let i=this.baseUrl+"/api/storefront/v1/product-links/{id}/summary?";if(null==e)throw new Error("The parameter 'id' must be defined.");i=i.replace("{id}",encodeURIComponent(""+e)),null!=t&&(i+="productLinkVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(i+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=n&&(i+="productVariantId="+encodeURIComponent(""+n)+"&"),null!=o&&(i+="sku="+encodeURIComponent(""+o)+"&"),null!=s&&(i+="tenantId="+encodeURIComponent(""+s)+"&"),i=i.replace(/[?&]$/,"");let l={method:"GET",url:i,headers:{Accept:"application/json"},cancelToken:a};return this.transformOptions(l).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(i,e,e=>this.processGetProductSummary(e)))}processGetProductSummary(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getPersonalizationWorkflow(e,t,r,n,o,s){let a=this.baseUrl+"/api/storefront/v1/product-links/{id}/personalization-workflow?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=t&&(a+="productLinkVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(a+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=n&&(a+="productFilterId="+encodeURIComponent(""+n)+"&"),null!=o&&(a+="tenantId="+encodeURIComponent(""+o)+"&"),a=a.replace(/[?&]$/,"");let i={method:"GET",url:a,headers:{Accept:"application/json"},cancelToken:s};return this.transformOptions(i).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(a,e,e=>this.processGetPersonalizationWorkflow(e)))}processGetPersonalizationWorkflow(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}}exports.ProductLinksApiClient=ProductLinksApiClient;class ProductReferencesApiClient extends ApiClientBase{instance;baseUrl;jsonParseReviver=void 0;constructor(e,t,r){super(e),this.instance=r||axios_1.create(),this.baseUrl=null!=t?t:this.getBaseUrl("")}getAll(e,t,r,n,o,s,a,i,l,c,d,p,u,h,f){let m=this.baseUrl+"/api/storefront/v1/product-references?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");m+="storefrontId="+encodeURIComponent(""+e)+"&",null!=t&&(m+="productReference="+encodeURIComponent(""+t)+"&"),null!=r&&(m+="productSpecificationId="+encodeURIComponent(""+r)+"&"),null!=n&&(m+="productId="+encodeURIComponent(""+n)+"&"),null!=o&&(m+="productLinkId="+encodeURIComponent(""+o)+"&"),null!=s&&(m+="productBundleId="+encodeURIComponent(""+s)+"&"),null!=a&&(m+="skip="+encodeURIComponent(""+a)+"&"),null!=i&&(m+="take="+encodeURIComponent(""+i)+"&"),null!=l&&(m+="sorting="+encodeURIComponent(""+l)+"&"),null!=c&&(m+="search="+encodeURIComponent(""+c)+"&"),null!=d&&(m+="sku="+encodeURIComponent(""+d)+"&"),null!=p&&p&&p.forEach(e=>{m+="tags="+encodeURIComponent(""+e)+"&"}),null!=u&&(m+="customFields="+encodeURIComponent(""+u)+"&"),null!=h&&(m+="tenantId="+encodeURIComponent(""+h)+"&"),m=m.replace(/[?&]$/,"");let w={method:"GET",url:m,headers:{Accept:"application/json"},cancelToken:f};return this.transformOptions(w).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(m,e,e=>this.processGetAll(e)))}processGetAll(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getAllProductSpecifications(e,t,r,n,o,s,a,i,l,c,d,p,u,h,f){let m=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.");m+="storefrontId="+encodeURIComponent(""+e)+"&",null!=t&&(m+="productReference="+encodeURIComponent(""+t)+"&"),null!=r&&(m+="productSpecificationId="+encodeURIComponent(""+r)+"&"),null!=n&&(m+="productId="+encodeURIComponent(""+n)+"&"),null!=o&&(m+="productLinkId="+encodeURIComponent(""+o)+"&"),null!=s&&(m+="productBundleId="+encodeURIComponent(""+s)+"&"),null!=a&&(m+="skip="+encodeURIComponent(""+a)+"&"),null!=i&&(m+="take="+encodeURIComponent(""+i)+"&"),null!=l&&(m+="sorting="+encodeURIComponent(""+l)+"&"),null!=c&&(m+="search="+encodeURIComponent(""+c)+"&"),null!=d&&(m+="sku="+encodeURIComponent(""+d)+"&"),null!=p&&p&&p.forEach(e=>{m+="tags="+encodeURIComponent(""+e)+"&"}),null!=u&&(m+="customFields="+encodeURIComponent(""+u)+"&"),null!=h&&(m+="tenantId="+encodeURIComponent(""+h)+"&"),m=m.replace(/[?&]$/,"");let w={method:"GET",url:m,headers:{Accept:"application/json"},cancelToken:f};return this.transformOptions(w).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(m,e,e=>this.processGetAllProductSpecifications(e)))}processGetAllProductSpecifications(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getAllProducts(e,t,r,n,o,s,a,i,l,c,d,p,u,h,f){let m=this.baseUrl+"/api/storefront/v1/product-references/products?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");m+="storefrontId="+encodeURIComponent(""+e)+"&",null!=t&&(m+="productReference="+encodeURIComponent(""+t)+"&"),null!=r&&(m+="productSpecificationId="+encodeURIComponent(""+r)+"&"),null!=n&&(m+="productId="+encodeURIComponent(""+n)+"&"),null!=o&&(m+="productLinkId="+encodeURIComponent(""+o)+"&"),null!=s&&(m+="productBundleId="+encodeURIComponent(""+s)+"&"),null!=a&&(m+="skip="+encodeURIComponent(""+a)+"&"),null!=i&&(m+="take="+encodeURIComponent(""+i)+"&"),null!=l&&(m+="sorting="+encodeURIComponent(""+l)+"&"),null!=c&&(m+="search="+encodeURIComponent(""+c)+"&"),null!=d&&(m+="sku="+encodeURIComponent(""+d)+"&"),null!=p&&p&&p.forEach(e=>{m+="tags="+encodeURIComponent(""+e)+"&"}),null!=u&&(m+="customFields="+encodeURIComponent(""+u)+"&"),null!=h&&(m+="tenantId="+encodeURIComponent(""+h)+"&"),m=m.replace(/[?&]$/,"");let w={method:"GET",url:m,headers:{Accept:"application/json"},cancelToken:f};return this.transformOptions(w).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(m,e,e=>this.processGetAllProducts(e)))}processGetAllProducts(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getAllProductLinks(e,t,r,n,o,s,a,i,l,c,d,p,u,h,f){let m=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.");m+="storefrontId="+encodeURIComponent(""+e)+"&",null!=t&&(m+="productReference="+encodeURIComponent(""+t)+"&"),null!=r&&(m+="productSpecificationId="+encodeURIComponent(""+r)+"&"),null!=n&&(m+="productId="+encodeURIComponent(""+n)+"&"),null!=o&&(m+="productLinkId="+encodeURIComponent(""+o)+"&"),null!=s&&(m+="productBundleId="+encodeURIComponent(""+s)+"&"),null!=a&&(m+="skip="+encodeURIComponent(""+a)+"&"),null!=i&&(m+="take="+encodeURIComponent(""+i)+"&"),null!=l&&(m+="sorting="+encodeURIComponent(""+l)+"&"),null!=c&&(m+="search="+encodeURIComponent(""+c)+"&"),null!=d&&(m+="sku="+encodeURIComponent(""+d)+"&"),null!=p&&p&&p.forEach(e=>{m+="tags="+encodeURIComponent(""+e)+"&"}),null!=u&&(m+="customFields="+encodeURIComponent(""+u)+"&"),null!=h&&(m+="tenantId="+encodeURIComponent(""+h)+"&"),m=m.replace(/[?&]$/,"");let w={method:"GET",url:m,headers:{Accept:"application/json"},cancelToken:f};return this.transformOptions(w).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(m,e,e=>this.processGetAllProductLinks(e)))}processGetAllProductLinks(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getAllProductBundles(e,t,r,n,o,s,a,i,l,c,d,p,u,h,f){let m=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.");m+="storefrontId="+encodeURIComponent(""+e)+"&",null!=t&&(m+="productReference="+encodeURIComponent(""+t)+"&"),null!=r&&(m+="productSpecificationId="+encodeURIComponent(""+r)+"&"),null!=n&&(m+="productId="+encodeURIComponent(""+n)+"&"),null!=o&&(m+="productLinkId="+encodeURIComponent(""+o)+"&"),null!=s&&(m+="productBundleId="+encodeURIComponent(""+s)+"&"),null!=a&&(m+="skip="+encodeURIComponent(""+a)+"&"),null!=i&&(m+="take="+encodeURIComponent(""+i)+"&"),null!=l&&(m+="sorting="+encodeURIComponent(""+l)+"&"),null!=c&&(m+="search="+encodeURIComponent(""+c)+"&"),null!=d&&(m+="sku="+encodeURIComponent(""+d)+"&"),null!=p&&p&&p.forEach(e=>{m+="tags="+encodeURIComponent(""+e)+"&"}),null!=u&&(m+="customFields="+encodeURIComponent(""+u)+"&"),null!=h&&(m+="tenantId="+encodeURIComponent(""+h)+"&"),m=m.replace(/[?&]$/,"");let w={method:"GET",url:m,headers:{Accept:"application/json"},cancelToken:f};return this.transformOptions(w).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(m,e,e=>this.processGetAllProductBundles(e)))}processGetAllProductBundles(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}get(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-references/{reference}?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(o=o.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processGet(e)))}processGet(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getPersonalizationParameters(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-references/{reference}/personalization-parameters?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(o=o.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processGetPersonalizationParameters(e)))}processGetPersonalizationParameters(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductSpecification(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-specification?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(o=o.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processGetProductSpecification(e)))}processGetProductSpecification(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProduct(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(o=o.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processGetProduct(e)))}processGetProduct(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductSummary(e,t,r,n,o,s){let a=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-summary?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(a=a.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(a+="productVariantId="+encodeURIComponent(""+r)+"&"),null!=n&&(a+="sku="+encodeURIComponent(""+n)+"&"),null!=o&&(a+="tenantId="+encodeURIComponent(""+o)+"&"),a=a.replace(/[?&]$/,"");let i={method:"GET",url:a,headers:{Accept:"application/json"},cancelToken:s};return this.transformOptions(i).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(a,e,e=>this.processGetProductSummary(e)))}processGetProductSummary(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductLink(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-link?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(o=o.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processGetProductLink(e)))}processGetProductLink(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductBundle(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-bundle?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(o=o.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processGetProductBundle(e)))}processGetProductBundle(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductCostDetails(e,t,r,n,o,s,a,i){let l=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-cost-details?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(l=l.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'sku' must be defined and cannot be null.");if(l+="sku="+encodeURIComponent(""+t)+"&",null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");if(l+="storefrontId="+encodeURIComponent(""+r)+"&",null!=n&&(l+="storefrontUserId="+encodeURIComponent(""+n)+"&"),null!=o&&(l+="currencyCode="+encodeURIComponent(""+o)+"&"),null===s)throw new Error("The parameter 'quantity' cannot be null.");void 0!==s&&(l+="quantity="+encodeURIComponent(""+s)+"&"),null!=a&&(l+="tenantId="+encodeURIComponent(""+a)+"&"),l=l.replace(/[?&]$/,"");let c={method:"GET",url:l,headers:{Accept:"application/json"},cancelToken:i};return this.transformOptions(c).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(l,e,e=>this.processGetProductCostDetails(e)))}processGetProductCostDetails(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getPersonalizationWorkflow(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-references/{reference}/personalization-workflow?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(o=o.replace("{reference}",encodeURIComponent(""+e)),null===t)throw new Error("The parameter 'storefrontId' cannot be null.");void 0!==t&&(o+="storefrontId="+encodeURIComponent(""+t)+"&"),null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processGetPersonalizationWorkflow(e)))}processGetPersonalizationWorkflow(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}}exports.ProductReferencesApiClient=ProductReferencesApiClient;class ProductsApiClient extends ApiClientBase{instance;baseUrl;jsonParseReviver=void 0;constructor(e,t,r){super(e),this.instance=r||axios_1.create(),this.baseUrl=null!=t?t:this.getBaseUrl("")}getAllProducts(e,t,r,n,o,s,a,i,l){let c=this.baseUrl+"/api/storefront/v1/products?";null!=e&&(c+="skip="+encodeURIComponent(""+e)+"&"),null!=t&&(c+="take="+encodeURIComponent(""+t)+"&"),null!=r&&(c+="sorting="+encodeURIComponent(""+r)+"&"),null!=n&&(c+="search="+encodeURIComponent(""+n)+"&"),null!=o&&(c+="sku="+encodeURIComponent(""+o)+"&"),null!=s&&s&&s.forEach(e=>{c+="tags="+encodeURIComponent(""+e)+"&"}),null!=a&&(c+="customFields="+encodeURIComponent(""+a)+"&"),null!=i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");let d={method:"GET",url:c,headers:{Accept:"application/json"},cancelToken:l};return this.transformOptions(d).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(c,e,e=>this.processGetAllProducts(e)))}processGetAllProducts(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProduct(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/products/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");o=o.replace("{id}",encodeURIComponent(""+e)),null!=t&&(o+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processGetProduct(e)))}processGetProduct(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getPersonalizationParameters(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/products/{id}/personalization-parameters?";if(null==e)throw new Error("The parameter 'id' must be defined.");o=o.replace("{id}",encodeURIComponent(""+e)),null!=t&&(o+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processGetPersonalizationParameters(e)))}processGetPersonalizationParameters(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductSummary(e,t,r,n,o,s,a){let i=this.baseUrl+"/api/storefront/v1/products/{id}/summary?";if(null==e)throw new Error("The parameter 'id' must be defined.");i=i.replace("{id}",encodeURIComponent(""+e)),null!=t&&(i+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(i+="productLinkId="+encodeURIComponent(""+r)+"&"),null!=n&&(i+="productVariantId="+encodeURIComponent(""+n)+"&"),null!=o&&(i+="sku="+encodeURIComponent(""+o)+"&"),null!=s&&(i+="tenantId="+encodeURIComponent(""+s)+"&"),i=i.replace(/[?&]$/,"");let l={method:"GET",url:i,headers:{Accept:"application/json"},cancelToken:a};return this.transformOptions(l).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(i,e,e=>this.processGetProductSummary(e)))}processGetProductSummary(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductOptions(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/products/{id}/options?";if(null==e)throw new Error("The parameter 'id' must be defined.");o=o.replace("{id}",encodeURIComponent(""+e)),null!=t&&(o+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processGetProductOptions(e)))}processGetProductOptions(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getAllProductOptions(e,t){let r=this.baseUrl+"/api/storefront/v1/products/options?";null!=e&&(r+="tenantId="+encodeURIComponent(""+e)+"&"),r=r.replace(/[?&]$/,"");let n={method:"GET",url:r,headers:{Accept:"application/json"},cancelToken:t};return this.transformOptions(n).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(r,e,e=>this.processGetAllProductOptions(e)))}processGetAllProductOptions(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductLinks(e,t,r,n,o,s,a,i){let l=this.baseUrl+"/api/storefront/v1/products/{id}/links?";if(null==e)throw new Error("The parameter 'id' must be defined.");l=l.replace("{id}",encodeURIComponent(""+e)),null!=t&&(l+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(l+="skip="+encodeURIComponent(""+r)+"&"),null!=n&&(l+="take="+encodeURIComponent(""+n)+"&"),null!=o&&(l+="sorting="+encodeURIComponent(""+o)+"&"),null!=s&&(l+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(l+="tenantId="+encodeURIComponent(""+a)+"&"),l=l.replace(/[?&]$/,"");let c={method:"GET",url:l,headers:{Accept:"application/json"},cancelToken:i};return this.transformOptions(c).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(l,e,e=>this.processGetProductLinks(e)))}processGetProductLinks(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductLink(e,t,r,n,o){let s=this.baseUrl+"/api/storefront/v1/products/{id}/links/{productLinkId}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'productLinkId' must be defined.");s=s.replace("{productLinkId}",encodeURIComponent(""+t)),null!=r&&(s+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=n&&(s+="tenantId="+encodeURIComponent(""+n)+"&"),s=s.replace(/[?&]$/,"");let a={method:"GET",url:s,headers:{Accept:"application/json"},cancelToken:o};return this.transformOptions(a).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(s,e,e=>this.processGetProductLink(e)))}processGetProductLink(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductVariants(e,t,r,n,o,s,a,i,l,c){let d=this.baseUrl+"/api/storefront/v1/products/{id}/variants?";if(null==e)throw new Error("The parameter 'id' must be defined.");d=d.replace("{id}",encodeURIComponent(""+e)),null!=t&&(d+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(d+="skip="+encodeURIComponent(""+r)+"&"),null!=n&&(d+="take="+encodeURIComponent(""+n)+"&"),null!=o&&(d+="options="+encodeURIComponent(""+o)+"&"),null!=s&&(d+="productFilterId="+encodeURIComponent(""+s)+"&"),null!=a&&(d+="takeAvailableOnly="+encodeURIComponent(""+a)+"&"),null!=i&&(d+="sku="+encodeURIComponent(""+i)+"&"),null!=l&&(d+="tenantId="+encodeURIComponent(""+l)+"&"),d=d.replace(/[?&]$/,"");let p={method:"GET",url:d,headers:{Accept:"application/json"},cancelToken:c};return this.transformOptions(p).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(d,e,e=>this.processGetProductVariants(e)))}processGetProductVariants(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductVariant(e,t,r,n,o){let s=this.baseUrl+"/api/storefront/v1/products/{id}/variants/{productVariantId}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'productVariantId' must be defined.");s=s.replace("{productVariantId}",encodeURIComponent(""+t)),null!=r&&(s+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=n&&(s+="tenantId="+encodeURIComponent(""+n)+"&"),s=s.replace(/[?&]$/,"");let a={method:"GET",url:s,headers:{Accept:"application/json"},cancelToken:o};return this.transformOptions(a).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(s,e,e=>this.processGetProductVariant(e)))}processGetProductVariant(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductVariantDesigns(e,t,r,n,o,s,a,i,l,c,d,p,u,h){let f=this.baseUrl+"/api/storefront/v1/products/{id}/variant-designs?";if(null==e)throw new Error("The parameter 'id' must be defined.");f=f.replace("{id}",encodeURIComponent(""+e)),null!=t&&(f+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(f+="productVariantId="+encodeURIComponent(""+r)+"&"),null!=n&&(f+="search="+encodeURIComponent(""+n)+"&"),null!=o&&(f+="designCustomFields="+encodeURIComponent(""+o)+"&"),null!=s&&(f+="designPath="+encodeURIComponent(""+s)+"&"),null!=a&&(f+="skip="+encodeURIComponent(""+a)+"&"),null!=i&&(f+="take="+encodeURIComponent(""+i)+"&"),null!=l&&(f+="options="+encodeURIComponent(""+l)+"&"),null!=c&&(f+="productFilterId="+encodeURIComponent(""+c)+"&"),null!=d&&(f+="takeAvailableOnly="+encodeURIComponent(""+d)+"&"),null!=p&&(f+="sku="+encodeURIComponent(""+p)+"&"),null!=u&&(f+="tenantId="+encodeURIComponent(""+u)+"&"),f=f.replace(/[?&]$/,"");let m={method:"GET",url:f,headers:{Accept:"application/json"},cancelToken:h};return this.transformOptions(m).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(f,e,e=>this.processGetProductVariantDesigns(e)))}processGetProductVariantDesigns(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductVariantMockups(e,t,r,n,o,s,a,i,l,c,d,p,u,h){let f=this.baseUrl+"/api/storefront/v1/products/{id}/variant-mockups?";if(null==e)throw new Error("The parameter 'id' must be defined.");f=f.replace("{id}",encodeURIComponent(""+e)),null!=t&&(f+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(f+="productVariantId="+encodeURIComponent(""+r)+"&"),null!=n&&(f+="search="+encodeURIComponent(""+n)+"&"),null!=o&&(f+="mockupCustomFields="+encodeURIComponent(""+o)+"&"),null!=s&&(f+="mockupPath="+encodeURIComponent(""+s)+"&"),null!=a&&(f+="skip="+encodeURIComponent(""+a)+"&"),null!=i&&(f+="take="+encodeURIComponent(""+i)+"&"),null!=l&&(f+="options="+encodeURIComponent(""+l)+"&"),null!=c&&(f+="productFilterId="+encodeURIComponent(""+c)+"&"),null!=d&&(f+="takeAvailableOnly="+encodeURIComponent(""+d)+"&"),null!=p&&(f+="sku="+encodeURIComponent(""+p)+"&"),null!=u&&(f+="tenantId="+encodeURIComponent(""+u)+"&"),f=f.replace(/[?&]$/,"");let m={method:"GET",url:f,headers:{Accept:"application/json"},cancelToken:h};return this.transformOptions(m).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(f,e,e=>this.processGetProductVariantMockups(e)))}processGetProductVariantMockups(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductVariantDocuments(e,t,r,n,o,s,a,i,l,c,d,p,u,h){let f=this.baseUrl+"/api/storefront/v1/products/{id}/variant-documents?";if(null==e)throw new Error("The parameter 'id' must be defined.");f=f.replace("{id}",encodeURIComponent(""+e)),null!=t&&(f+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(f+="productVariantId="+encodeURIComponent(""+r)+"&"),null!=n&&(f+="search="+encodeURIComponent(""+n)+"&"),null!=o&&(f+="documentCustomFields="+encodeURIComponent(""+o)+"&"),null!=s&&(f+="documentPath="+encodeURIComponent(""+s)+"&"),null!=a&&(f+="skip="+encodeURIComponent(""+a)+"&"),null!=i&&(f+="take="+encodeURIComponent(""+i)+"&"),null!=l&&(f+="options="+encodeURIComponent(""+l)+"&"),null!=c&&(f+="productFilterId="+encodeURIComponent(""+c)+"&"),null!=d&&(f+="takeAvailableOnly="+encodeURIComponent(""+d)+"&"),null!=p&&(f+="sku="+encodeURIComponent(""+p)+"&"),null!=u&&(f+="tenantId="+encodeURIComponent(""+u)+"&"),f=f.replace(/[?&]$/,"");let m={method:"GET",url:f,headers:{Accept:"application/json"},cancelToken:h};return this.transformOptions(m).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(f,e,e=>this.processGetProductVariantDocuments(e)))}processGetProductVariantDocuments(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}updateProductVariantResources(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/products/{id}/update-variant-resources?";if(null==e)throw new Error("The parameter 'id' must be defined.");o=o.replace("{id}",encodeURIComponent(""+e)),null!=t&&(o+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"POST",url:o,headers:{},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processUpdateProductVariantResources(e)))}processUpdateProductVariantResources(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){e.data;return Promise.resolve(null)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getAvailableProductTags(e,t,r){let n=this.baseUrl+"/api/storefront/v1/products/available-tags?";null!=e&&(n+="search="+encodeURIComponent(""+e)+"&"),null!=t&&(n+="tenantId="+encodeURIComponent(""+t)+"&"),n=n.replace(/[?&]$/,"");let o={method:"GET",url:n,headers:{Accept:"application/json"},cancelToken:r};return this.transformOptions(o).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(n,e,e=>this.processGetAvailableProductTags(e)))}processGetAvailableProductTags(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getPersonalizationWorkflow(e,t,r,n,o,s){let a=this.baseUrl+"/api/storefront/v1/products/{id}/personalization-workflow?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=t&&(a+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(a+="productLinkId="+encodeURIComponent(""+r)+"&"),null!=n&&(a+="productFilterId="+encodeURIComponent(""+n)+"&"),null!=o&&(a+="tenantId="+encodeURIComponent(""+o)+"&"),a=a.replace(/[?&]$/,"");let i={method:"GET",url:a,headers:{Accept:"application/json"},cancelToken:s};return this.transformOptions(i).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(a,e,e=>this.processGetPersonalizationWorkflow(e)))}processGetPersonalizationWorkflow(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}}exports.ProductsApiClient=ProductsApiClient;class ProductSpecificationsApiClient extends ApiClientBase{instance;baseUrl;jsonParseReviver=void 0;constructor(e,t,r){super(e),this.instance=r||axios_1.create(),this.baseUrl=null!=t?t:this.getBaseUrl("")}getAll(e,t,r,n,o,s){let a=this.baseUrl+"/api/storefront/v1/product-specifications?";null!=e&&(a+="skip="+encodeURIComponent(""+e)+"&"),null!=t&&(a+="take="+encodeURIComponent(""+t)+"&"),null!=r&&(a+="sorting="+encodeURIComponent(""+r)+"&"),null!=n&&(a+="search="+encodeURIComponent(""+n)+"&"),null!=o&&(a+="tenantId="+encodeURIComponent(""+o)+"&"),a=a.replace(/[?&]$/,"");let i={method:"GET",url:a,headers:{Accept:"application/json"},cancelToken:s};return this.transformOptions(i).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(a,e,e=>this.processGetAll(e)))}processGetAll(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}get(e,t,r){let n=this.baseUrl+"/api/storefront/v1/product-specifications/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");n=n.replace("{id}",encodeURIComponent(""+e)),null!=t&&(n+="tenantId="+encodeURIComponent(""+t)+"&"),n=n.replace(/[?&]$/,"");let o={method:"GET",url:n,headers:{Accept:"application/json"},cancelToken:r};return this.transformOptions(o).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(n,e,e=>this.processGet(e)))}processGet(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProductSpecificationSummary(e,t,r){let n=this.baseUrl+"/api/storefront/v1/product-specifications/{id}/personalization-parameters?";if(null==e)throw new Error("The parameter 'id' must be defined.");n=n.replace("{id}",encodeURIComponent(""+e)),null!=t&&(n+="tenantId="+encodeURIComponent(""+t)+"&"),n=n.replace(/[?&]$/,"");let o={method:"GET",url:n,headers:{Accept:"application/json"},cancelToken:r};return this.transformOptions(o).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(n,e,e=>this.processGetProductSpecificationSummary(e)))}processGetProductSpecificationSummary(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getPersonalizationWorkflow(e,t,r){let n=this.baseUrl+"/api/storefront/v1/product-specifications/{id}/personalization-workflow?";if(null==e)throw new Error("The parameter 'id' must be defined.");n=n.replace("{id}",encodeURIComponent(""+e)),null!=t&&(n+="tenantId="+encodeURIComponent(""+t)+"&"),n=n.replace(/[?&]$/,"");let o={method:"GET",url:n,headers:{Accept:"application/json"},cancelToken:r};return this.transformOptions(o).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(n,e,e=>this.processGetPersonalizationWorkflow(e)))}processGetPersonalizationWorkflow(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}}exports.ProductSpecificationsApiClient=ProductSpecificationsApiClient;class ProjectsApiClient extends ApiClientBase{instance;baseUrl;jsonParseReviver=void 0;constructor(e,t,r){super(e),this.instance=r||axios_1.create(),this.baseUrl=null!=t?t:this.getBaseUrl("")}getAll(e,t,r,n,o,s,a,i,l,c,d,p,u,h){let f=this.baseUrl+"/api/storefront/v1/projects?";if(null!=e&&(f+="ownerId="+encodeURIComponent(""+e)+"&"),null!=t&&(f+="productReference="+encodeURIComponent(""+t)+"&"),null!=r&&(f+="status="+encodeURIComponent(""+r)+"&"),null===n)throw new Error("The parameter 'datePeriod' cannot be null.");if(void 0!==n&&(f+="datePeriod="+encodeURIComponent(""+n)+"&"),null!=o&&(f+="skip="+encodeURIComponent(""+o)+"&"),null!=s&&(f+="take="+encodeURIComponent(""+s)+"&"),null!=a&&(f+="sorting="+encodeURIComponent(""+a)+"&"),null!=i&&(f+="search="+encodeURIComponent(""+i)+"&"),null!=l&&(f+="orderId="+encodeURIComponent(""+l)+"&"),null!=c&&(f+="processingStatus="+encodeURIComponent(""+c)+"&"),null===d)throw new Error("The parameter 'includeObsolete' cannot be null.");void 0!==d&&(f+="includeObsolete="+encodeURIComponent(""+d)+"&"),null!=p&&(f+="storefrontId="+encodeURIComponent(""+p)+"&"),null!=u&&(f+="tenantId="+encodeURIComponent(""+u)+"&"),f=f.replace(/[?&]$/,"");let m={method:"GET",url:f,headers:{Accept:"application/json"},cancelToken:h};return this.transformOptions(m).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(f,e,e=>this.processGetAll(e)))}processGetAll(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}get(e,t,r){let n=this.baseUrl+"/api/storefront/v1/projects/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");n=n.replace("{id}",encodeURIComponent(""+e)),null!=t&&(n+="tenantId="+encodeURIComponent(""+t)+"&"),n=n.replace(/[?&]$/,"");let o={method:"GET",url:n,headers:{Accept:"application/json"},cancelToken:r};return this.transformOptions(o).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(n,e,e=>this.processGet(e)))}processGet(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}delete(e,t,r){let n=this.baseUrl+"/api/storefront/v1/projects/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");n=n.replace("{id}",encodeURIComponent(""+e)),null!=t&&(n+="tenantId="+encodeURIComponent(""+t)+"&"),n=n.replace(/[?&]$/,"");let o={method:"DELETE",url:n,headers:{},cancelToken:r};return this.transformOptions(o).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(n,e,e=>this.processDelete(e)))}processDelete(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){e.data;return Promise.resolve(null)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getPreview(e,t,r){let n=this.baseUrl+"/api/storefront/v1/projects/{id}/preview?";if(null==e)throw new Error("The parameter 'id' must be defined.");n=n.replace("{id}",encodeURIComponent(""+e)),null!=t&&(n+="tenantId="+encodeURIComponent(""+t)+"&"),n=n.replace(/[?&]$/,"");let o={responseType:"blob",method:"GET",url:n,headers:{Accept:"application/octet-stream"},cancelToken:r};return this.transformOptions(o).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(n,e,e=>this.processGetPreview(e)))}processGetPreview(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t||206===t){const n=e.headers?e.headers["content-disposition"]:void 0,o=n?/filename="?([^"]*?)"?(;|$)/g.exec(n):void 0,s=o&&o.length>1?o[1]:void 0;return Promise.resolve({fileName:s,status:t,data:new Blob([e.data]),headers:r})}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getPreviewUrl(e,t,r){let n=this.baseUrl+"/api/storefront/v1/projects/{id}/preview-url?";if(null==e)throw new Error("The parameter 'id' must be defined.");n=n.replace("{id}",encodeURIComponent(""+e)),null!=t&&(n+="tenantId="+encodeURIComponent(""+t)+"&"),n=n.replace(/[?&]$/,"");let o={method:"GET",url:n,headers:{Accept:"text/plain"},cancelToken:r};return this.transformOptions(o).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(n,e,e=>this.processGetPreviewUrl(e)))}processGetPreviewUrl(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null;return t=e.data,Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}createWithSingleItem(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/projects/with-single-item?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+e)+"&",null!=t&&(o+="tenantId="+encodeURIComponent(""+t)+"&"),o=o.replace(/[?&]$/,"");let s={data:JSON.stringify(r),method:"POST",url:o,headers:{"Content-Type":"application/json",Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processCreateWithSingleItem(e)))}processCreateWithSingleItem(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(201===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(400===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Bad Request",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}createWithMultipleItems(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/projects/with-multiple-items?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+e)+"&",null!=t&&(o+="tenantId="+encodeURIComponent(""+t)+"&"),o=o.replace(/[?&]$/,"");let s={data:JSON.stringify(r),method:"POST",url:o,headers:{"Content-Type":"application/json",Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processCreateWithMultipleItems(e)))}processCreateWithMultipleItems(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(201===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(400===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Bad Request",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}createByRenderHiResScenario(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/projects/by-scenario/render-hires?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+e)+"&",null!=t&&(o+="tenantId="+encodeURIComponent(""+t)+"&"),o=o.replace(/[?&]$/,"");let s={data:JSON.stringify(r),method:"POST",url:o,headers:{"Content-Type":"application/json",Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processCreateByRenderHiResScenario(e)))}processCreateByRenderHiResScenario(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(201===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(400===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Bad Request",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}createBySpecificPipelineScenario(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/projects/by-scenario/specific-pipeline?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+e)+"&",null!=t&&(o+="tenantId="+encodeURIComponent(""+t)+"&"),o=o.replace(/[?&]$/,"");let s={data:JSON.stringify(r),method:"POST",url:o,headers:{"Content-Type":"application/json",Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processCreateBySpecificPipelineScenario(e)))}processCreateBySpecificPipelineScenario(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(201===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(400===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Bad Request",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getAvailableTransitions(e,t,r){let n=this.baseUrl+"/api/storefront/v1/projects/{id}/transitions?";if(null==e)throw new Error("The parameter 'id' must be defined.");n=n.replace("{id}",encodeURIComponent(""+e)),null!=t&&(n+="tenantId="+encodeURIComponent(""+t)+"&"),n=n.replace(/[?&]$/,"");let o={method:"GET",url:n,headers:{Accept:"application/json"},cancelToken:r};return this.transformOptions(o).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(n,e,e=>this.processGetAvailableTransitions(e)))}processGetAvailableTransitions(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(400===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Bad Request",t,n,r,o)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}changeStatus(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/projects/{id}/transitions/{transition}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(o=o.replace("{id}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'transition' must be defined.");o=o.replace("{transition}",encodeURIComponent(""+t)),null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"POST",url:o,headers:{Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processChangeStatus(e)))}processChangeStatus(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(400===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Bad Request",t,n,r,o)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}forceStatus(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/projects/{id}/statuses/{status}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(o=o.replace("{id}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'status' must be defined.");o=o.replace("{status}",encodeURIComponent(""+t)),null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"POST",url:o,headers:{Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processForceStatus(e)))}processForceStatus(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(400===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Bad Request",t,n,r,o)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}batchDelete(e,t,r){let n=this.baseUrl+"/api/storefront/v1/projects/batch-delete?";null!=e&&(n+="tenantId="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let o={data:JSON.stringify(t),method:"DELETE",url:n,headers:{"Content-Type":"application/json",Accept:"application/json"},cancelToken:r};return this.transformOptions(o).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(n,e,e=>this.processBatchDelete(e)))}processBatchDelete(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getAllStatuses(e,t){let r=this.baseUrl+"/api/storefront/v1/projects/statuses?";null!=e&&(r+="tenantId="+encodeURIComponent(""+e)+"&"),r=r.replace(/[?&]$/,"");let n={method:"GET",url:r,headers:{Accept:"application/json"},cancelToken:t};return this.transformOptions(n).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(r,e,e=>this.processGetAllStatuses(e)))}processGetAllStatuses(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getAllTransitions(e,t){let r=this.baseUrl+"/api/storefront/v1/projects/transitions?";null!=e&&(r+="tenantId="+encodeURIComponent(""+e)+"&"),r=r.replace(/[?&]$/,"");let n={method:"GET",url:r,headers:{Accept:"application/json"},cancelToken:t};return this.transformOptions(n).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(r,e,e=>this.processGetAllTransitions(e)))}processGetAllTransitions(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProjectProcessingResults(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/projects/{id}/processing-results?";if(null==e)throw new Error("The parameter 'id' must be defined.");o=o.replace("{id}",encodeURIComponent(""+e)),null!=t&&(o+="itemId="+encodeURIComponent(""+t)+"&"),null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processGetProjectProcessingResults(e)))}processGetProjectProcessingResults(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}resumeProjectProcessing(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/projects/{id}/resume-processing?";if(null==e)throw new Error("The parameter 'id' must be defined.");o=o.replace("{id}",encodeURIComponent(""+e)),null!=t&&(o+="itemId="+encodeURIComponent(""+t)+"&"),null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"POST",url:o,headers:{},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processResumeProjectProcessing(e)))}processResumeProjectProcessing(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(204===t){e.data;return Promise.resolve(null)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}restartProjectProcessing(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/projects/{id}/restart-processing?";if(null==e)throw new Error("The parameter 'id' must be defined.");o=o.replace("{id}",encodeURIComponent(""+e)),null!=t&&(o+="itemId="+encodeURIComponent(""+t)+"&"),null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"POST",url:o,headers:{},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processRestartProjectProcessing(e)))}processRestartProjectProcessing(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(204===t){e.data;return Promise.resolve(null)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getProjectOrder(e,t,r){let n=this.baseUrl+"/api/storefront/v1/projects/{id}/order?";if(null==e)throw new Error("The parameter 'id' must be defined.");n=n.replace("{id}",encodeURIComponent(""+e)),null!=t&&(n+="tenantId="+encodeURIComponent(""+t)+"&"),n=n.replace(/[?&]$/,"");let o={method:"GET",url:n,headers:{Accept:"application/json"},cancelToken:r};return this.transformOptions(o).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(n,e,e=>this.processGetProjectOrder(e)))}processGetProjectOrder(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}attachDataToProjectOrder(e,t,r,n,o){let s=this.baseUrl+"/api/storefront/v1/projects/{id}/order-data?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=t&&(s+="itemId="+encodeURIComponent(""+t)+"&"),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");let a={data:JSON.stringify(n),method:"POST",url:s,headers:{"Content-Type":"application/json"},cancelToken:o};return this.transformOptions(a).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(s,e,e=>this.processAttachDataToProjectOrder(e)))}processAttachDataToProjectOrder(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(204===t){e.data;return Promise.resolve(null)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}}exports.ProjectsApiClient=ProjectsApiClient;class StorefrontsApiClient extends ApiClientBase{instance;baseUrl;jsonParseReviver=void 0;constructor(e,t,r){super(e),this.instance=r||axios_1.create(),this.baseUrl=null!=t?t:this.getBaseUrl("")}getAll(e,t,r,n,o,s,a,i){let l=this.baseUrl+"/api/storefront/v1/storefronts?";null!=e&&e&&e.forEach(e=>{l+="types="+encodeURIComponent(""+e)+"&"}),null!=t&&(l+="skip="+encodeURIComponent(""+t)+"&"),null!=r&&(l+="take="+encodeURIComponent(""+r)+"&"),null!=n&&(l+="sorting="+encodeURIComponent(""+n)+"&"),null!=o&&(l+="search="+encodeURIComponent(""+o)+"&"),null!=s&&(l+="status="+encodeURIComponent(""+s)+"&"),null!=a&&(l+="tenantId="+encodeURIComponent(""+a)+"&"),l=l.replace(/[?&]$/,"");let c={method:"GET",url:l,headers:{Accept:"application/json"},cancelToken:i};return this.transformOptions(c).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(l,e,e=>this.processGetAll(e)))}processGetAll(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}get(e,t,r){let n=this.baseUrl+"/api/storefront/v1/storefronts/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");n=n.replace("{id}",encodeURIComponent(""+e)),null!=t&&(n+="tenantId="+encodeURIComponent(""+t)+"&"),n=n.replace(/[?&]$/,"");let o={method:"GET",url:n,headers:{Accept:"application/json"},cancelToken:r};return this.transformOptions(o).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(n,e,e=>this.processGet(e)))}processGet(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}}exports.StorefrontsApiClient=StorefrontsApiClient;class StorefrontUsersApiClient extends ApiClientBase{instance;baseUrl;jsonParseReviver=void 0;constructor(e,t,r){super(e),this.instance=r||axios_1.create(),this.baseUrl=null!=t?t:this.getBaseUrl("")}getAll(e,t,r,n,o,s,a,i,l){let c=this.baseUrl+"/api/storefront/v1/storefront-users?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");c+="storefrontId="+encodeURIComponent(""+e)+"&",null!=t&&(c+="storefrontUserId="+encodeURIComponent(""+t)+"&"),null!=r&&(c+="skip="+encodeURIComponent(""+r)+"&"),null!=n&&(c+="take="+encodeURIComponent(""+n)+"&"),null!=o&&(c+="sorting="+encodeURIComponent(""+o)+"&"),null!=s&&(c+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(c+="includeAnonymous="+encodeURIComponent(""+a)+"&"),null!=i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");let d={method:"GET",url:c,headers:{Accept:"application/json"},cancelToken:l};return this.transformOptions(d).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(c,e,e=>this.processGetAll(e)))}processGetAll(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}create(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/storefront-users?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+e)+"&",null!=t&&(o+="tenantId="+encodeURIComponent(""+t)+"&"),o=o.replace(/[?&]$/,"");let s={data:JSON.stringify(r),method:"POST",url:o,headers:{"Content-Type":"application/json",Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processCreate(e)))}processCreate(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(201===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}get(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/storefront-users/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(o=o.replace("{id}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processGet(e)))}processGet(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}register(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/storefront-users/register?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+e)+"&",null!=t&&(o+="tenantId="+encodeURIComponent(""+t)+"&"),o=o.replace(/[?&]$/,"");let s={data:JSON.stringify(r),method:"POST",url:o,headers:{"Content-Type":"application/json",Accept:"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processRegister(e)))}processRegister(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}mergeAnonymous(e,t,r,n){let o=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.");o+="storefrontId="+encodeURIComponent(""+e)+"&",null!=t&&(o+="tenantId="+encodeURIComponent(""+t)+"&"),o=o.replace(/[?&]$/,"");let s={data:JSON.stringify(r),method:"POST",url:o,headers:{"Content-Type":"application/json"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processMergeAnonymous(e)))}processMergeAnonymous(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){e.data;return Promise.resolve(null)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getToken(e,t,r,n){let o=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(o+="storefrontUserId="+encodeURIComponent(""+e)+"&",null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"text/plain"},cancelToken:n};return this.transformOptions(s).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(o,e,e=>this.processGetToken(e)))}processGetToken(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null;return t=e.data,Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Not Found",t,n,r,o)}if(409===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),throwException("Conflict",t,n,r,o)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}}exports.StorefrontUsersApiClient=StorefrontUsersApiClient;class TenantInfoApiClient extends ApiClientBase{instance;baseUrl;jsonParseReviver=void 0;constructor(e,t,r){super(e),this.instance=r||axios_1.create(),this.baseUrl=null!=t?t:this.getBaseUrl("")}getApplicationsInfo(e,t){let r=this.baseUrl+"/api/storefront/v1/tenant-info/applications?";null!=e&&(r+="tenantId="+encodeURIComponent(""+e)+"&"),r=r.replace(/[?&]$/,"");let n={method:"GET",url:r,headers:{Accept:"application/json"},cancelToken:t};return this.transformOptions(n).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(r,e,e=>this.processGetApplicationsInfo(e)))}processGetApplicationsInfo(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getInfo(e,t){let r=this.baseUrl+"/api/storefront/v1/tenant-info?";null!=e&&(r+="tenantId="+encodeURIComponent(""+e)+"&"),r=r.replace(/[?&]$/,"");let n={method:"GET",url:r,headers:{Accept:"application/json"},cancelToken:t};return this.transformOptions(n).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(r,e,e=>this.processGetInfo(e)))}processGetInfo(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getMeasureUnitsInfo(e,t){let r=this.baseUrl+"/api/storefront/v1/tenant-info/measure-units?";null!=e&&(r+="tenantId="+encodeURIComponent(""+e)+"&"),r=r.replace(/[?&]$/,"");let n={method:"GET",url:r,headers:{Accept:"application/json"},cancelToken:t};return this.transformOptions(n).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(r,e,e=>this.processGetMeasureUnitsInfo(e)))}processGetMeasureUnitsInfo(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}getUsersInfo(e,t){let r=this.baseUrl+"/api/storefront/v1/tenant-info/users?";null!=e&&(r+="tenantId="+encodeURIComponent(""+e)+"&"),r=r.replace(/[?&]$/,"");let n={method:"GET",url:r,headers:{Accept:"application/json"},cancelToken:t};return this.transformOptions(n).then(e=>this.instance.request(e)).catch(e=>{if(isAxiosError(e)&&e.response)return e.response;throw e}).then(e=>this.transformResult(r,e,e=>this.processGetUsersInfo(e)))}processGetUsersInfo(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let t in e.headers)e.headers.hasOwnProperty(t)&&(r[t]=e.headers[t]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(401===t){return throwException("Unauthorized",t,e.data,r)}if(403===t){return throwException("Forbidden",t,e.data,r)}if(200!==t&&204!==t){return throwException("An unexpected server error occurred.",t,e.data,r)}return Promise.resolve(null)}}var ProductBundleResourceType,ConflictType,ProductType,WorkflowType,AppearanceDataType,ProductLinkResourceType,OptionType,ProductReferenceType,ProductVariantResourceType,ProductVariantMockupType,SurfaceUsageType,DatePeriod,ProjectProcessingStatus,ProjectItemResourceType,ProjectItemProductType,RenderHiResScenarioOutputFormat,RenderHiResScenarioOutputColorSpace,RenderHiResScenarioOutputFlipMode,RenderHiResScenarioOutputRotateMode,OrderDataItemValueType,StorefrontType,StorefrontStatus;exports.TenantInfoApiClient=TenantInfoApiClient,function(e){e.Custom="Custom",e.Preview="Preview"}(ProductBundleResourceType=exports.ProductBundleResourceType||(exports.ProductBundleResourceType={})),function(e){e.NameConflict="NameConflict",e.FolderOverwriteConflict="FolderOverwriteConflict",e.IdConflict="IdConflict",e.GeneralConflict="GeneralConflict"}(ConflictType=exports.ConflictType||(exports.ConflictType={})),function(e){e.ProductSpecification="ProductSpecification",e.Product="Product",e.ProductLink="ProductLink",e.ProductBundle="ProductBundle"}(ProductType=exports.ProductType||(exports.ProductType={})),function(e){e.UIFramework="UIFramework",e.SimpleEditor="SimpleEditor",e.DesignEditor="DesignEditor",e.WorkflowElements="WorkflowElements"}(WorkflowType=exports.WorkflowType||(exports.WorkflowType={})),function(e){e.Radio="Radio",e.Dropdown="Dropdown",e.Chips="Chips",e.ColorGrid="ColorGrid",e.ColorList="ColorList",e.ImageGrid="ImageGrid",e.ImageList="ImageList"}(AppearanceDataType=exports.AppearanceDataType||(exports.AppearanceDataType={})),function(e){e.Preview="Preview",e.Custom="Custom"}(ProductLinkResourceType=exports.ProductLinkResourceType||(exports.ProductLinkResourceType={})),function(e){e.Simple="Simple",e.Size="Size",e.PageCount="PageCount"}(OptionType=exports.OptionType||(exports.OptionType={})),function(e){e.ProductSpecification="ProductSpecification",e.Product="Product",e.ProductLink="ProductLink",e.ProductBundle="ProductBundle"}(ProductReferenceType=exports.ProductReferenceType||(exports.ProductReferenceType={})),function(e){e.Preview="Preview",e.EditorModel="EditorModel",e.Custom="Custom"}(ProductVariantResourceType=exports.ProductVariantResourceType||(exports.ProductVariantResourceType={})),function(e){e.Thumbnail="Thumbnail",e.Editor="Editor",e.Preview="Preview"}(ProductVariantMockupType=exports.ProductVariantMockupType||(exports.ProductVariantMockupType={})),function(e){e.Individual="Individual",e.Custom="Custom",e.All="All"}(SurfaceUsageType=exports.SurfaceUsageType||(exports.SurfaceUsageType={})),function(e){e.All="All",e.Today="Today",e.Last7Days="Last7Days",e.Last30Days="Last30Days"}(DatePeriod=exports.DatePeriod||(exports.DatePeriod={})),function(e){e.Pending="Pending",e.InProgress="InProgress",e.Completed="Completed",e.Failed="Failed"}(ProjectProcessingStatus=exports.ProjectProcessingStatus||(exports.ProjectProcessingStatus={})),function(e){e.General="General",e.Preview="Preview",e.Hires="Hires"}(ProjectItemResourceType=exports.ProjectItemResourceType||(exports.ProjectItemResourceType={})),function(e){e.ProductSpecification="ProductSpecification",e.Product="Product",e.ProductLink="ProductLink"}(ProjectItemProductType=exports.ProjectItemProductType||(exports.ProjectItemProductType={})),function(e){e.Pdf="Pdf",e.Jpeg="Jpeg",e.Png="Png",e.Tiff="Tiff",e.Bmp="Bmp"}(RenderHiResScenarioOutputFormat=exports.RenderHiResScenarioOutputFormat||(exports.RenderHiResScenarioOutputFormat={})),function(e){e.Rgb="Rgb",e.Grayscale="Grayscale",e.Cmyk="Cmyk"}(RenderHiResScenarioOutputColorSpace=exports.RenderHiResScenarioOutputColorSpace||(exports.RenderHiResScenarioOutputColorSpace={})),function(e){e.None="None",e.Horizontal="Horizontal",e.Vertical="Vertical",e.Both="Both"}(RenderHiResScenarioOutputFlipMode=exports.RenderHiResScenarioOutputFlipMode||(exports.RenderHiResScenarioOutputFlipMode={})),function(e){e.None="None",e.Rotate90="Rotate90",e.Rotate180="Rotate180",e.Rotate270="Rotate270",e.Auto="Auto"}(RenderHiResScenarioOutputRotateMode=exports.RenderHiResScenarioOutputRotateMode||(exports.RenderHiResScenarioOutputRotateMode={})),function(e){e.PlainText="PlainText",e.CommaSeparatedList="CommaSeparatedList",e.SerializedJson="SerializedJson"}(OrderDataItemValueType=exports.OrderDataItemValueType||(exports.OrderDataItemValueType={})),function(e){e.Custom="Custom",e.ShopifyLegacy="ShopifyLegacy",e.DocketManager="DocketManager",e.CustomSaml="CustomSaml",e.NopCommerce="NopCommerce",e.WooCommerce="WooCommerce",e.Magento="Magento",e.BigCommerce="BigCommerce",e.Shopify="Shopify",e.ShopifyCustom="ShopifyCustom"}(StorefrontType=exports.StorefrontType||(exports.StorefrontType={})),function(e){e.Dev="Dev",e.Prod="Prod"}(StorefrontStatus=exports.StorefrontStatus||(exports.StorefrontStatus={}));class ApiException extends Error{message;status;response;headers;result;constructor(e,t,r,n,o){super(),this.message=e,this.status=t,this.response=r,this.headers=n,this.result=o}isApiException=!0;static isApiException(e){return!0===e.isApiException}}function throwException(e,t,r,n,o){throw new ApiException(e,t,r,n,o)}function isAxiosError(e){return e&&!0===e.isAxiosError}exports.ApiException=ApiException;
//# sourceMappingURL=/sm/f88d4145de98366282144d41b8d74b4a95a0ff0306e35fa681063f97ae8a2190.map