UNPKG

@busmarket/bmapi-js

Version:

BmApiJS | BusMarket API JS client

1 lines 55.9 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.BmApi=e():t.BmApi=e()}(window,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=10)}([function(t,e,r){"use strict";t.exports={token:"\n\n🚨️️ BmApi. Authorization token is not defined!\n \n🔗 https://developer.bm.parts/api/v2/overview.html#api\n\n",BmApiMethodError:function(t,e){return"\n\n🚨️️ BmApi.There is an error in the '".concat(t,"' method! Check documentation!\n 🔗 https://developer.bm.parts/api/v2").concat(e||"/"," \n\n")},BmApiError:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{inputOptions:{},requireParameters:null,url:{base:"",hash:""}},e=Object.keys(t.inputOptions),r=t.requireParameters,n="".concat(t.url.base,".html#").concat(t.url.hash||""),i=r.some(function(t){return!e.includes(t)});if(i)throw Error("\n\n\t🚨️️ BmApi.".concat(r.length>1?"One or more r":"R","equired parameter").concat(r.length>1?"s":""," { ").concat(r.join(", ")," } ").concat(r.length>1?"are":"is"," not defined! \n\t🔗 https://developer.bm.parts/api/v2").concat(n||"/"," \n\n"))}}},function(t,e,r){"use strict";var n=r(2),i=r(14),o=Object.prototype.toString;function s(t){return"[object Array]"===o.call(t)}function a(t){return null!==t&&"object"==typeof t}function u(t){return"[object Function]"===o.call(t)}function c(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),s(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:s,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:i,isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:a,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:u,isStream:function(t){return a(t)&&u(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function t(){var e={};function r(r,n){"object"==typeof e[n]&&"object"==typeof r?e[n]=t(e[n],r):e[n]=r}for(var n=0,i=arguments.length;n<i;n++)c(arguments[n],r);return e},deepMerge:function t(){var e={};function r(r,n){"object"==typeof e[n]&&"object"==typeof r?e[n]=t(e[n],r):e[n]="object"==typeof r?t({},r):r}for(var n=0,i=arguments.length;n<i;n++)c(arguments[n],r);return e},extend:function(t,e,r){return c(e,function(e,i){t[i]=r&&"function"==typeof e?n(e,r):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(t,e,r){"use strict";t.exports=function(t,e){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return t.apply(e,r)}}},function(t,e,r){"use strict";var n=r(1);function i(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,r){if(!e)return t;var o;if(r)o=r(e);else if(n.isURLSearchParams(e))o=e.toString();else{var s=[];n.forEach(e,function(t,e){null!=t&&(n.isArray(t)?e+="[]":t=[t],n.forEach(t,function(t){n.isDate(t)?t=t.toISOString():n.isObject(t)&&(t=JSON.stringify(t)),s.push(i(e)+"="+i(t))}))}),o=s.join("&")}if(o){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},function(t,e,r){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,r){"use strict";(function(e){var n=r(1),i=r(20),o={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!n.isUndefined(t)&&n.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var a,u={adapter:(void 0!==e&&"[object process]"===Object.prototype.toString.call(e)?a=r(6):"undefined"!=typeof XMLHttpRequest&&(a=r(6)),a),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),n.isFormData(t)||n.isArrayBuffer(t)||n.isBuffer(t)||n.isStream(t)||n.isFile(t)||n.isBlob(t)?t:n.isArrayBufferView(t)?t.buffer:n.isURLSearchParams(t)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):n.isObject(t)?(s(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],function(t){u.headers[t]={}}),n.forEach(["post","put","patch"],function(t){u.headers[t]=n.merge(o)}),t.exports=u}).call(this,r(19))},function(t,e,r){"use strict";var n=r(1),i=r(21),o=r(3),s=r(23),a=r(24),u=r(7);t.exports=function(t){return new Promise(function(e,c){var p=t.data,f=t.headers;n.isFormData(p)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(t.auth){var l=t.auth.username||"",d=t.auth.password||"";f.Authorization="Basic "+btoa(l+":"+d)}if(h.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),h.timeout=t.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in h?s(h.getAllResponseHeaders()):null,n={data:t.responseType&&"text"!==t.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:t,request:h};i(e,c,n),h=null}},h.onabort=function(){h&&(c(u("Request aborted",t,"ECONNABORTED",h)),h=null)},h.onerror=function(){c(u("Network Error",t,null,h)),h=null},h.ontimeout=function(){c(u("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",h)),h=null},n.isStandardBrowserEnv()){var g=r(25),v=(t.withCredentials||a(t.url))&&t.xsrfCookieName?g.read(t.xsrfCookieName):void 0;v&&(f[t.xsrfHeaderName]=v)}if("setRequestHeader"in h&&n.forEach(f,function(t,e){void 0===p&&"content-type"===e.toLowerCase()?delete f[e]:h.setRequestHeader(e,t)}),t.withCredentials&&(h.withCredentials=!0),t.responseType)try{h.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&h.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){h&&(h.abort(),c(t),h=null)}),void 0===p&&(p=null),h.send(p)})}},function(t,e,r){"use strict";var n=r(22);t.exports=function(t,e,r,i,o){var s=new Error(t);return n(s,e,r,i,o)}},function(t,e,r){"use strict";var n=r(1);t.exports=function(t,e){e=e||{};var r={};return n.forEach(["url","method","params","data"],function(t){void 0!==e[t]&&(r[t]=e[t])}),n.forEach(["headers","auth","proxy"],function(i){n.isObject(e[i])?r[i]=n.deepMerge(t[i],e[i]):void 0!==e[i]?r[i]=e[i]:n.isObject(t[i])?r[i]=n.deepMerge(t[i]):void 0!==t[i]&&(r[i]=t[i])}),n.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],function(n){void 0!==e[n]?r[n]=e[n]:void 0!==t[n]&&(r[n]=t[n])}),r}},function(t,e,r){"use strict";function n(t){this.message=t}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(r,!0).forEach(function(e){o(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(11),a=r(0),u={profile:r(30),claims:r(31),product:r(32),catalog:r(33),documents:r(34),finance:r(35),delivery:r(36),shopping:r(37),company:r(38),aggregations:r(39),search:r(40),news:r(41),reports:r(42),processing:r(43),returns:r(44),advertising:r(45),trainings:r(46),garage:r(47)};function c(t){if(!(this instanceof c))return new c(t);if(!t)throw Error(a.token);var e=this._apiClient(t);this._apiResources(e)}c.prototype={_apiResources:function(t){for(var e in u)this[e]=new u[e](t)},_apiClient:function(t){return{get:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(t).get(encodeURI(e),{params:r}).catch(function(t){return t.response})},post:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(t).post(encodeURI(e),i({},r)).catch(function(t){return t.response})},put:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(t).put(encodeURI(e),i({},r)).catch(function(t){return t.response})},delete:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(t).delete(encodeURI(e),{params:r}).catch(function(t){return t.response})}}}},t.exports=c},function(t,e,r){"use strict";var n=r(12);t.exports=function(t){return n.create({baseURL:"https://api.bm.parts",headers:{Authorization:t}})}},function(t,e,r){t.exports=r(13)},function(t,e,r){"use strict";var n=r(1),i=r(2),o=r(15),s=r(8);function a(t){var e=new o(t),r=i(o.prototype.request,e);return n.extend(r,o.prototype,e),n.extend(r,e),r}var u=a(r(5));u.Axios=o,u.create=function(t){return a(s(u.defaults,t))},u.Cancel=r(9),u.CancelToken=r(28),u.isCancel=r(4),u.all=function(t){return Promise.all(t)},u.spread=r(29),t.exports=u,t.exports.default=u},function(t,e){t.exports=function(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}},function(t,e,r){"use strict";var n=r(1),i=r(3),o=r(16),s=r(17),a=r(8);function u(t){this.defaults=t,this.interceptors={request:new o,response:new o}}u.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=a(this.defaults,t)).method=t.method?t.method.toLowerCase():"get";var e=[s,void 0],r=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)r=r.then(e.shift(),e.shift());return r},u.prototype.getUri=function(t){return t=a(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],function(t){u.prototype[t]=function(e,r){return this.request(n.merge(r||{},{method:t,url:e}))}}),n.forEach(["post","put","patch"],function(t){u.prototype[t]=function(e,r,i){return this.request(n.merge(i||{},{method:t,url:e,data:r}))}}),t.exports=u},function(t,e,r){"use strict";var n=r(1);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){n.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=i},function(t,e,r){"use strict";var n=r(1),i=r(18),o=r(4),s=r(5),a=r(26),u=r(27);function c(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return c(t),t.baseURL&&!a(t.url)&&(t.url=u(t.baseURL,t.url)),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||s.adapter)(t).then(function(e){return c(t),e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return o(e)||(c(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,r){"use strict";var n=r(1);t.exports=function(t,e,r){return n.forEach(r,function(r){t=r(t,e)}),t}},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var u,c=[],p=!1,f=-1;function h(){p&&u&&(p=!1,u.length?c=u.concat(c):f=-1,c.length&&l())}function l(){if(!p){var t=a(h);p=!0;for(var e=c.length;e;){for(u=c,c=[];++f<e;)u&&u[f].run();f=-1,e=c.length}u=null,p=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function g(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new d(t,e)),1!==c.length||p||a(l)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,r){"use strict";var n=r(1);t.exports=function(t,e){n.forEach(t,function(r,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[n])})}},function(t,e,r){"use strict";var n=r(7);t.exports=function(t,e,r){var i=r.config.validateStatus;!i||i(r.status)?t(r):e(n("Request failed with status code "+r.status,r.config,null,r.request,r))}},function(t,e,r){"use strict";t.exports=function(t,e,r,n,i){return t.config=e,r&&(t.code=r),t.request=n,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,r){"use strict";var n=r(1),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,r,o,s={};return t?(n.forEach(t.split("\n"),function(t){if(o=t.indexOf(":"),e=n.trim(t.substr(0,o)).toLowerCase(),r=n.trim(t.substr(o+1)),e){if(s[e]&&i.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([r]):s[e]?s[e]+", "+r:r}}),s):s}},function(t,e,r){"use strict";var n=r(1);t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(t){var n=t;return e&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=i(window.location.href),function(e){var r=n.isString(e)?i(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},function(t,e,r){"use strict";var n=r(1);t.exports=n.isStandardBrowserEnv()?{write:function(t,e,r,i,o,s){var a=[];a.push(t+"="+encodeURIComponent(e)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(i)&&a.push("path="+i),n.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,r){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,r){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,r){"use strict";var n=r(9);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var r=this;t(function(t){r.reason||(r.reason=new n(t),e(r.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i(function(e){t=e}),cancel:t}},t.exports=i},function(t,e,r){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(r,!0).forEach(function(e){o(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(0),a=s.BmApiError;function u(t){for(var e=0,r=["get","post","put","delete"];e<r.length;e++){var n=r[e];this[n]=t[n]}}var c="/profile";u.prototype={changeWarehouse:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a({inputOptions:t,requireParameters:["warehouse_uuid"],url:{base:c,hash:"post-profile-change-warehouse"}}))return this.post("".concat(c,"/change_warehouse"),t)},getBoundClients:function(t){return this.get("".concat(c,"/bound_clients"),i({client_as:"obj"},t))},getMailing:function(){return this.get("".concat(c,"/mailing"))},saveMailing:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Reflect.ownKeys(t).length)return this.post("".concat(c,"/mailing"),t);throw Error(s.profile.mailing_save)},history:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("".concat(c,"/history"),t)},profileMasq:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a({inputOptions:t,requireParameters:["client_uuid"],url:{base:c,hash:"post-profile-masq"}}))return this.post("".concat(c,"/masq"),t)},me:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a({inputOptions:t,requireParameters:["clients_as"],url:{base:c,hash:"get-profile-me"}}))return this.get("".concat(c,"/me"),i({clients_as:"obj"},t))},updateApp:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a({inputOptions:t,requireParameters:["app_name"],url:{base:c,hash:"post-profile-settings-string-app-name-update"}}))return this.post("/".concat(c,"/settings/").concat(t.app_name,"/update"))},settingsGet:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a({inputOptions:t,requireParameters:["app_name"],url:{base:c,hash:"get-profile-settings-string-app-name"}}))return this.get("/".concat(c,"/settings/").concat(t.app_name))},settingsSave:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a({inputOptions:t,requireParameters:["app_name","settings"],url:{base:c,hash:"post-garage-car-string-car-uuid"}}))return this.post("".concat(c,"/settings/").concat(t.app_name))},settingsCreate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a({inputOptions:t,requireParameters:["app_name","settings"],url:{base:c,hash:"post-garage-car-string-car-uuid"}}))return this.post("".concat(c,"/settings/").concat(t.app_name))},settingsDelete:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a({inputOptions:t,requireParameters:["app_name"],url:{base:c,hash:"delete-profile-settings-string-app-name"}}))return this.delete("".concat(c,"/settings/").concat(t.app_name),t)}},t.exports=u},function(t,e,r){"use strict";var n=r(0),i=n.BmApiError,o=n.BmApiMethodError;function s(t){var e=this;["get","post","put","delete"].map(function(r){e[r]=t[r]})}var a="/claims";s.prototype={types:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("/claims/issues/types",t)},getIssues:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("/claims/issues",t)},setIssues:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i({inputOptions:t,requireParameters:["summary","description","issue_type"],url:{base:a,hash:"post-claims-issues"}}))return this.post("/claims/issues",t)},attachments:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i({inputOptions:t,requireParameters:["issue_id"],url:{base:a,hash:"get-claims-issue-string-issue-id-attachments"}}))return this.get("/claims/issue/".concat(t.issue_id,"/attachments"),t)},claimAttachments:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i({inputOptions:t,requireParameters:["issue_id","attach_id","attach_name"],url:{base:a,hash:"get-claims-issue-string-issue-id-attachment-string-attach-id-path-attach-name"}}))return this.get("".concat(a,"/issue/").concat(t.issue_id,"/attachment/").concat(t.attach_id,"/").concat(t.attach_name))},addAttachment:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i({inputOptions:t,requireParameters:["attachment","issue_id"],url:{base:a,hash:"get-claims-issue-string-issue-id-attachments"}})&&t.attachment instanceof FormData)return this.post("/claims/issue/".concat(t.issue_id,"/attachment"),t);!t.attachment instanceof FormData&&o("attachment","get-claims-issue-string-issue-id-attachments")},getIssueComments:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i({inputOptions:t,requireParameters:["issue_id"],url:{base:a,hash:"get-claims-issue-string-issue-id-comments"}}))return this.get("/claims/issue/".concat(t.issue_id,"/comments"),t)},setIssueComment:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i({inputOptions:t,requireParameters:["issue_id","comment"],url:{base:a,hash:"post-claims-issue-string-issue-id-comment"}}))return this.post("/claims/issue/".concat(t.issue_id,"/comment/"),t)}},t.exports=s},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(0).BmApiError;function s(t){this.get=t.get}var a="/product";s.prototype={inWaiting:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!o({inputOptions:t,requireParameters:["product_uuid"],url:{base:a,hash:"get-product-product-uuid-in-waiting"}}))return this.get("".concat(a,"/").concat(t.product_uuid,"/in_waiting"))},inStocks:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!o({inputOptions:t,requireParameters:["product_uuid"],url:{base:a,hash:"get-product-product-uuid-in-stocks"}}))return this.get("".concat(a,"/").concat(t.product_uuid,"/in_stocks"))},prices:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!o({inputOptions:t,requireParameters:["product_uuid"],url:{base:a,hash:"get-product-product-uuid-prices"}}))return this.get("".concat(a,"/").concat(t.product_uuid,"/prices"))},curPrice:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!o({inputOptions:t,requireParameters:["product_uuid"],url:{base:a,hash:"get-product-product-uuid-price"}}))return this.get("".concat(a,"/").concat(t.product_uuid,"/price"),t)},details:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!o({inputOptions:t,requireParameters:["product_uuid"],url:{base:a,hash:"get-product-string-product-uuid"}}))return this.get("".concat(a,"/").concat(t.product_uuid),function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(r,!0).forEach(function(e){i(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({},{products_as:"obj"},{},t))}},t.exports=s},function(t,e,r){"use strict";var n=r(0).BmApiError,i="/catalog";function o(t){this.get=t.get}o.prototype={newArrivals:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("".concat(i,"/new_arrivals"))},brands:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("".concat(i,"/brands"),t)},enginesByModel:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n({inputOptions:t,requireParameters:["car_brand","car_model"],url:{base:i,hash:"get-catalog-cars-brand-string-car-brand-model-string-car-model-engines"}}))return this.get("".concat(i,"/cars/brand/").concat(t.car_brand,"/model/").concat(t.car_model,"/engines/"))},carNodesPath:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n({inputOptions:t,requireParameters:[],url:{base:i,hash:"get-catalog-nodes-path"}}))return this.get("".concat(i,"/nodes/path").concat(t.parent_path?"/"+t.parent_path:""))},carNodes:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n({inputOptions:t,requireParameters:[],url:{base:i,hash:"get-catalog-nodes"}}))return this.get("".concat(i,"/nodes").concat(t.parent_uuid?"/"+t.parent_uuid:""))}},t.exports=o},function(t,e,r){"use strict";var n=r(0).BmApiError,i="/documents";function o(t){this.get=t.get}o.prototype={filterGroups:function(){return this.get("".concat(i,"/filters/groups"))},filterTypes:function(){return this.get("".concat(i,"/filters/types"))},filterDates:function(){return this.get("".concat(i,"/filters/dates"))},filterGrouped:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("/documents/grouped",t)},listDocuments:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("/documents/list",t)},reclamationStatus:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n({inputOptions:t,requireParameters:["act_uuid"],url:{base:i,hash:"get-trainings-list"}}))return this.get("".concat(i,"/reclamation/").concat(t.act_uuid))},downloadDocument:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n({inputOptions:t,requireParameters:["type","uuid","file_type"],url:{base:i,hash:"get-documents-download-string-type-string-uuid-string-file-type"}}))return this.get("".concat(i,"/download/").concat(t.type,"/").concat(t.uuid,"/").concat(t.file_type))},getDocument:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n({inputOptions:t,requireParameters:["type","uuid"],url:{base:i,hash:"get-documents-string-type-string-uuid"}}))return this.get("".concat(i,"/").concat(t.type).concat(t.uuid,"/"))}},t.exports=o},function(t,e,r){"use strict";var n=r(0).BmApiError;function i(t){this.get=t.get}var o="/finance";i.prototype={historyRates:function(){return this.get("".concat(o,"/currencies/rates/history"))},currenciesRates:function(){return this.get("".concat(o,"/currencies/rates"))},currenciesList:function(){return this.get("".concat(o,"/currencies/list"))},contractsList:function(){return this.get("".concat(o,"/contracts/list"))},contracts:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n({inputOptions:t,requireParameters:["contract_uuid"],url:{base:o,hash:"get-finance-contracts-list"}}))return this.get("".concat(o,"/contract/").concat(t.contract_uuid))}},t.exports=i},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(r,!0).forEach(function(e){o(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(0).BmApiError;function a(t){for(var e=0,r=["get","post","put","delete"];e<r.length;e++){var n=r[e];this[n]=t[n]}}var u="/delivery";a.prototype={carriersWarehouses:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["city","carrier"],url:{base:u,hash:"get-delivery-carriers-warehouses"}}))return this.get("".concat(u,"/carriers/warehouses"))},carriersCities:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["region","carrier"],url:{base:u,hash:"get-delivery-carrier-cities"}}))return this.get("".concat(u,"/carrier/cities"),i({is_address:!1},t))},configConfirm:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["code"],url:{base:u,hash:"post-delivery-config-confirm"}}))return this.post("".concat(u,"/config/confirm"),i({},t))},configDefault:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["config_uuid"],url:{base:u,hash:"post-delivery-config-default"}}))return this.post("".concat(u,"/config/default"),i({},t))},cityStreets:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["city"],url:{base:u,hash:"get-delivery-city-streets"}}))return this.get("".concat(u,"/city/streets"),i({},t))},deliveryDepartures:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["warehouse","city"],url:{base:u,hash:"get-delivery-departures"}}))return this.get("".concat(u,"/departures"),i({},t))},deliveryReceivers:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("".concat(u,"/receivers"),i({},t))},deliveryReceiversAdd:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["surname","name","middle_name","phone"],url:{base:u,hash:"post-delivery-receivers"}}))return this.post("".concat(u,"/receivers"),i({},t))},deliveryCarriers:function(){return this.get("".concat(u,"/carriers"))},deliveryRegions:function(){return this.get("".concat(u,"/regions"))},deliveryConfigs:function(){return this.get("".concat(u,"/configs"))},deliveryCreateConfigs:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["receiver","city","carrier","carrier_warehouse","is_default","address"],url:{base:u,hash:"post-delivery-configs"}}))return this.post("".concat(u,"/configs"),i({full_insurance:!1},t))},deliveryTrack:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["tracking_number"],url:{base:u,hash:"get-delivery-track"}}))return this.get("".concat(u,"/track"),i({},t))},deliveryRegionCities:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["region_uuid"],url:{base:u,hash:"get-delivery-region-string-region-uuid-cities"}}))return this.get("".concat(u,"/region/").concat(t.region_uuid,"/cities"),i({},t))},deliveryDeleteReceiver:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["receiver_uuid"],url:{base:u,hash:"delete-delivery-receiver-string-receiver-uuid"}}))return this.delete("".concat(u,"/receiver/").concat(t.receiver_uuid))},deliveryCarrier:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["carrier_uuid"],url:{base:u,hash:"get-delivery-carrier-string-carrier-uuid"}}))return this.get("".concat(u,"/carrier/").concat(t.carrier_uuid),i({},t))},deliveryDeleteConfig:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["config_uuid"],url:{base:u,hash:"delete-delivery-config-string-config-uuid"}}))return this.delete("".concat(u,"/config/").concat(t.config_uuid),i({},t))}},t.exports=a},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(r,!0).forEach(function(e){o(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(0).BmApiError;function a(t){for(var e=0,r=["get","post","put","delete"];e<r.length;e++){var n=r[e];this[n]=t[n]}}var u="/shopping";a.prototype={getReservedProductsDetails:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["reserves_uuid"],url:{base:u,hash:"post-shopping-reserve-products-detailed"}}))return this.post("".concat(u,"/reserve/products/detailed"),t)},downloadUnreservedExcel:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("".concat(u,"/download/unreserved"),t)},getReserveDetails:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["reserves_uuid"],url:{base:u,hash:"post-shopping-reserve-products"}}))return this.post("".concat(u,"/reserve/products"),t)},createReserveProcess:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["order_uuid","comment","warehouse_uuid"],url:{base:u,hash:"post-shopping-reserve-process"}}))return this.post("".concat(u,"/reserve/process"),t)},createUnshipped:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["products","cart_name"],url:{base:u,hash:"post-trainings-register"}}))return this.post("".concat(u,"/create/unshipped"),t)},importTemplate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("".concat(u,"/import/template"),t)},importSettings:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("".concat(u,"/import/settings"))},setImportSettings:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["import_type"],url:{base:u,hash:"post-shopping-import-settings"}}))return this.post("".concat(u,"/import/settings"),i({},t))},deleteImportSettings:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["setting_uuid"],url:{base:u,hash:"delete-shopping-import-settings"}}))return this.delete("".concat(u,"/import/settings"),i({},t))},getFileWithErrors:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("".concat(u,"/table/err_file"),i({type:"xls"},t))},tablePreloadFile:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["file","extension"],url:{base:u,hash:"get-shopping-table-err-file"}}))return this.post("".concat(u,"/table/preload"),i({},t))},tableImportFile:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["import_type","article_column","brand_column","code_column","quantity_column","uuid_column","cart_uuid","name","file"],url:{base:u,hash:"excel-csv"}}))return this.post("".concat(u,"/table/import"),i({},t))},getCartsCount:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("".concat(u,"/carts/count"))},cartsUnion:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["carts_array"],url:{base:u,hash:"post-shopping-carts-union"}}))return this.post("".concat(u,"/carts/union"),i({},t))},getCartProducts:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["cart_uuid","warehouse"],url:{base:u,hash:"get-shopping-cart-products"}}))return this.get("".concat(u,"/cart_products"),i({},t))},changeCartOwner:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["cart_uuid","client_uuid"],url:{base:u,hash:"get-shopping-cart-products"}}))return this.post("".concat(u,"/change_owner"),i({},t))},getReservesList:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("".concat(u,"/reserves"))},deleteReserves:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["orders"],url:{base:u,hash:"delete-shopping-reserves"}}))return this.delete("".concat(u,"/reserves"),i({},t))},getCartsList:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("".concat(u,"/carts"))},createCart:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["name"],url:{base:u,hash:"post-shopping-carts"}}))return this.post("".concat(u,"/carts"),i({},t))},addProductsToCart:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["cart_uuid","product_uuid","quantity"],url:{base:u,hash:"post-shopping-cart-string-cart-uuid-product-string-product-uuid-int-quantity"}}))return this.post("".concat(u,"/cart/").concat(t.cart_uuid,"/product/").concat(t.product_uuid,"/").concat(t.quantity),i({},t))},updateProductsQuantityInCart:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["cart_uuid","product_uuid","quantity"],url:{base:u,hash:"put-shopping-cart-string-cart-uuid-product-string-product-uuid-int-quantity"}}))return this.put("".concat(u,"/cart/").concat(t.cart_uuid,"/product/").concat(t.product_uuid,"/").concat(t.quantity),i({},t))},deleteProductFromCart:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["cart_uuid","product_uuid"],url:{base:u,hash:"delete-shopping-cart-string-cart-uuid-product-string-product-uuid"}}))return this.delete("".concat(u,"/cart/").concat(t.cart_uuid,"/product/").concat(t.product_uuid),i({},t))},deleteCart:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["cart_uuid"],url:{base:u,hash:"delete-shopping-cart-string-cart-uuid"}}))return this.delete("".concat(u,"/cart/").concat(t.cart_uuid))},getCart:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["cart_uuid"],url:{base:u,hash:"get-shopping-cart-string-cart-uuid"}}))return this.get("".concat(u,"/cart/").concat(t.cart_uuid))},changeCartContagent:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["name","owner_uuid"],url:{base:u,hash:"post-shopping-cart-string-cart-uuid"}}))return this.post("".concat(u,"/cart/").concat(t.cart_uuid))}},t.exports=a},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(0).BmApiError;function s(t){this.post=t.post,this.get=t.get}var a="/company";s.prototype={managerNotify:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!o({inputOptions:t,requireParameters:["text"],url:{base:a,hash:"post-company-manager-notify"}}))return this.post("".concat(a,"/manager/notify"),function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(r,!0).forEach(function(e){i(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({},t))},getContacts:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("".concat(a,"/contact_info"))},getWarehouses:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("".concat(a,"/warehouses"))},callBack:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("".concat(a,"/callback"))},managerInfo:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("".concat(a,"/manager"))}},t.exports=s},function(t,e,r){"use strict";var n=r(0).BmApiError;function i(t){this.get=t.get}var o="search/products/aggregations";i.prototype={advertisements:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("".concat(o,"/advertisements"),t)},brands:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("".concat(o,"/brands"),t)},nodes:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("".concat(o,"/nodes"),t)},cars:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("".concat(o,"/cars"),t)},models:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n({inputOptions:t,requireParameters:["car_name"],url:{base:"search_products",hash:"post-trainings-register"}}))return this.get("".concat(o,"/car/").concat(t.car_name,"/models"),t)},engines:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n({inputOptions:t,requireParameters:["car_name","model_name"],url:{base:"search_products",hash:"get-search-products-aggregations-car-string-car-name-model-string-model-name"}}))return this.get("search/products/aggregations/car/".concat(t.car_name,"/model/").concat(t.model_name))}},t.exports=i},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(r,!0).forEach(function(e){o(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(0).BmApiError;function a(t){this.get=t.get}var u="/search";a.prototype={history:function(){return this.get("".concat(u,"/products/history"))},suggestProducts:function(t){if(!s({inputOptions:t,requireParameters:["q"],url:{base:"search_products",hash:"get-search-products-suggest"}}))return this.get("".concat(u,"/products/suggest"),i({products_as:"obj"},t))},searchSuggests:function(t){if(!s({inputOptions:t,requireParameters:["q"],url:{base:"search_products",hash:"get-search-suggests"}}))return this.get("".concat(u,"/suggests"),i({products_as:"obj"},t))},products:function(t){return this.get("".concat(u,"/products"),i({},t))}},t.exports=a},function(t,e,r){"use strict";var n=r(0).BmApiError;function i(t){this.get=t.get}i.prototype={list:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("".concat("/news","/list"),t)},article:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n({inputOptions:t,requireParameters:["news_uuid"],url:{base:"/news",hash:"uuid"}}))return this.get("".concat("/news","/").concat(t.news_uuid))}},t.exports=i},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(r,!0).forEach(function(e){o(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(0).BmApiError;function a(t){this.get=t.get}var u="/reports";a.prototype={brandsTurnover:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{period:"month"};if(!s({inputOptions:t,requireParameters:["period"],url:{base:u,hash:"get-reports-brands-turnover"}}))return this.get("".concat(u,"/brands_turnover"),i({period:"month"},t))},reconciliation:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{period:"month"};if(!s({inputOptions:t,requireParameters:["period"],url:{base:u,hash:"get-reports-reconciliation"}}))return this.get("".concat(u,"/reconciliation"),i({period:"month"},t))},terms:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{at_date:new Date};if(!s({inputOptions:t,requireParameters:["at_date"],url:{base:u,hash:"get-reports-reconciliation"}}))return this.get("reports/terms",t)},reconciliationFile:function(t){if(!s({inputOptions:t,requireParameters:["period","file_type"],url:{base:u,hash:"get-reports-reconciliation"}}))return this.get("reports/download/reconciliation/".concat(t.file_type),t)}},t.exports=a},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(r,!0).forEach(function(e){o(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(0).BmApiError;function a(t){this.get=t.get,this.post=t.post}var u="/processing";a.prototype={reserveProcess:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["orders_array","delivery_config","warehouse","key","key","expired_at","route_code","route_at","departure_at","comment"],url:{base:u,hash:"post-processing-reserve-process"}}))return this.post("".concat(u,"/reserve/process"),i({},t))},getDepartures:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["delivery_config","warehouse"],url:{base:u,hash:"post-processing-reserve-process"}}))return this.get("".concat(u,"/departures"),t)},processSync:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:t,requireParameters:["cart","delivery_config","warehouse","key","key","expired_at","route_code","route_at","departure_at","comment"