'use strict';var R=require('axios');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var R__default=/*#__PURE__*/_interopDefault(R);var q=Object.defineProperty;var w=(s,e)=>{for(var t in e)q(s,t,{get:e[t],enumerable:!0});};var I={};w(I,{Configuration:()=>C,PortfoliosPricePostRequestPeriodEnum:()=>G,SDKApi:()=>b,SDKApiAxiosParamCreator:()=>S,SDKApiFactory:()=>T,SDKApiFp:()=>P});var l="http://localhost:3003".replace(/\/+$/,"");var x=class{constructor(e,t=l,o=R__default.default){this.basePath=t;this.axios=o;e&&(this.configuration=e,this.basePath=e.basePath??t);}configuration},h=class extends Error{constructor(t,o){super(o);this.field=t;this.name="RequiredError";}},d={};var u="https://example.com",A=function(s,e,t){if(t==null)throw new h(e,`Required parameter ${e} was null or undefined when calling ${s}.`)};function O(s,e,t=""){e!=null&&(typeof e=="object"?Array.isArray(e)?e.forEach(o=>O(s,o,t)):Object.keys(e).forEach(o=>O(s,e[o],`${t}${t!==""?".":""}${o}`)):s.has(t)?s.append(t,e):s.set(t,e));}var g=function(s,...e){let t=new URLSearchParams(s.search);O(t,e),s.search=t.toString();},y=function(s,e,t){let o=typeof s!="string";return (o&&t&&t.isJsonMime?t.isJsonMime(e.headers["Content-Type"]):o)?JSON.stringify(s!==void 0?s:{}):s||""},f=function(s){return s.pathname+s.search+s.hash},m=function(s,e,t,o){return (n=e,r=t)=>{let i={...s.options,url:(n.defaults.baseURL?"":o?.basePath??r)+s.url};return n.request(i)}};var G={_24h:"24h",_7d:"7d",_30d:"30d",All:"all"},S=function(s){return {ordersCreatePost:async(e,t={})=>{let o="/orders/create",n=new URL(o,u),r;s&&(r=s.baseOptions);let i={method:"POST",...r,...t},a={},p={};a["Content-Type"]="application/json",g(n,p);let c=r&&r.headers?r.headers:{};return i.headers={...a,...c,...t.headers},i.data=y(e,i,s),{url:f(n),options:i}},ordersSubmitPost:async(e,t={})=>{A("ordersSubmitPost","ordersSubmitPostRequest",e);let o="/orders/submit",n=new URL(o,u),r;s&&(r=s.baseOptions);let i={method:"POST",...r,...t},a={},p={};a["Content-Type"]="application/json",g(n,p);let c=r&&r.headers?r.headers:{};return i.headers={...a,...c,...t.headers},i.data=y(e,i,s),{url:f(n),options:i}},portfoliosGet:async(e={})=>{let t="/portfolios",o=new URL(t,u),n;s&&(n=s.baseOptions);let r={method:"GET",...n,...e},i={};g(o,{});let p=n&&n.headers?n.headers:{};return r.headers={...i,...p,...e.headers},{url:f(o),options:r}},portfoliosPricePost:async(e,t={})=>{A("portfoliosPricePost","portfoliosPricePostRequest",e);let o="/portfolios/price",n=new URL(o,u),r;s&&(r=s.baseOptions);let i={method:"POST",...r,...t},a={},p={};a["Content-Type"]="application/json",g(n,p);let c=r&&r.headers?r.headers:{};return i.headers={...a,...c,...t.headers},i.data=y(e,i,s),{url:f(n),options:i}},portfoliosStateIdGet:async(e,t={})=>{A("portfoliosStateIdGet","id",e);let o="/portfolios/state/{id}".replace("{id}",encodeURIComponent(String(e))),n=new URL(o,u),r;s&&(r=s.baseOptions);let i={method:"GET",...r,...t},a={};g(n,{});let c=r&&r.headers?r.headers:{};return i.headers={...a,...c,...t.headers},{url:f(n),options:i}}}},P=function(s){let e=S(s);return {async ordersCreatePost(t,o){let n=await e.ordersCreatePost(t,o),r=s?.serverIndex??0,i=d["SDKApi.ordersCreatePost"]?.[r]?.url;return (a,p)=>m(n,R__default.default,l,s)(a,i||p)},async ordersSubmitPost(t,o){let n=await e.ordersSubmitPost(t,o),r=s?.serverIndex??0,i=d["SDKApi.ordersSubmitPost"]?.[r]?.url;return (a,p)=>m(n,R__default.default,l,s)(a,i||p)},async portfoliosGet(t){let o=await e.portfoliosGet(t),n=s?.serverIndex??0,r=d["SDKApi.portfoliosGet"]?.[n]?.url;return (i,a)=>m(o,R__default.default,l,s)(i,r||a)},async portfoliosPricePost(t,o){let n=await e.portfoliosPricePost(t,o),r=s?.serverIndex??0,i=d["SDKApi.portfoliosPricePost"]?.[r]?.url;return (a,p)=>m(n,R__default.default,l,s)(a,i||p)},async portfoliosStateIdGet(t,o){let n=await e.portfoliosStateIdGet(t,o),r=s?.serverIndex??0,i=d["SDKApi.portfoliosStateIdGet"]?.[r]?.url;return (a,p)=>m(n,R__default.default,l,s)(a,i||p)}}},T=function(s,e,t){let o=P(s);return {ordersCreatePost(n,r){return o.ordersCreatePost(n,r).then(i=>i(t,e))},ordersSubmitPost(n,r){return o.ordersSubmitPost(n,r).then(i=>i(t,e))},portfoliosGet(n){return o.portfoliosGet(n).then(r=>r(t,e))},portfoliosPricePost(n,r){return o.portfoliosPricePost(n,r).then(i=>i(t,e))},portfoliosStateIdGet(n,r){return o.portfoliosStateIdGet(n,r).then(i=>i(t,e))}}},b=class extends x{ordersCreatePost(e,t){return P(this.configuration).ordersCreatePost(e,t).then(o=>o(this.axios,this.basePath))}ordersSubmitPost(e,t){return P(this.configuration).ordersSubmitPost(e,t).then(o=>o(this.axios,this.basePath))}portfoliosGet(e){return P(this.configuration).portfoliosGet(e).then(t=>t(this.axios,this.basePath))}portfoliosPricePost(e,t){return P(this.configuration).portfoliosPricePost(e,t).then(o=>o(this.axios,this.basePath))}portfoliosStateIdGet(e,t){return P(this.configuration).portfoliosStateIdGet(e,t).then(o=>o(this.axios,this.basePath))}};var C=class{apiKey;username;password;accessToken;basePath;serverIndex;baseOptions;formDataCtor;constructor(e={}){this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.serverIndex=e.serverIndex,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor;}isJsonMime(e){let t=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return e!==null&&(t.test(e)||e.toLowerCase()==="application/json-patch+json")}}; exports.api=I;//# sourceMappingURL=index.cjs.map //# sourceMappingURL=index.cjs.map