@orbis-systems/orbis-api-clients 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2308 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +97 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e,t,s,r,n,i,o,a,E,u,l,R,T,_,p,c,d,h,O,I,S,C,N=require("auto-bind"),A=require("jsonwebtoken"),y=require("lodash"),m=require("axios"),P=require("axios-better-stacktrace");function L(e,t){return Object.keys(t).forEach(function(s){"default"===s||"__esModule"===s||Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[s]}})}),e}function D(e,t,s,r){Object.defineProperty(e,t,{get:s,set:r,enumerable:!0,configurable:!0})}function g(e){return e&&e.__esModule?e.default:e}var U={},v={};D(v,"MiddlewareApi",()=>Z);class M{constructor(e){this.apiClient=e,g(N)(this)}getApiClient(){return this.apiClient}}(e=R||(R={})).Json="application/json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain";class b{constructor(e){this.config=e,g(N)(this),this.storage=e.storage??sessionStorage,this.axiosInstance=g(m).create({baseURL:e.baseUrl,headers:{"Content-Type":"application/json",...e.defaultHeaders}}),g(P)(this.axiosInstance)}stringifyFormItem(e){return"object"==typeof e&&null!==e?JSON.stringify(e):`${e}`}createFormData(e){return e instanceof FormData?e:Object.keys(e||{}).reduce((t,s)=>{let r=e[s];for(let e of r instanceof Array?r:[r]){let r=e instanceof Blob||e instanceof File;t.append(s,r?e:this.stringifyFormItem(e))}return t},new FormData)}async request(e){let{contentType:t,data:s}=e;(0,y.isNil)(s)||("multipart/form-data"===t&&"object"==typeof s&&(e.data=this.createFormData(s)),"text/plain"===t&&"string"!=typeof s&&(e.data=JSON.stringify(s)));let r=(0,y.merge)(e.secure?this.prepareAuthRequestConfig():{},t?{header:{"Content-Type":t}}:{},e);try{let{data:e,status:t,statusText:s}=await this.axiosInstance.request(r);return{success:!0,data:e,status:t,statusText:s}}catch(t){if(!this.config.errorHandling)throw t;let e={success:!1,status:-1,statusText:String(t),error:t};return(0,m.isAxiosError)(t)&&(this.config.onAxiosError?.(t),e.data=t.response?.data,e.status=t.response?.status??e.status,e.statusText=t.response?.statusText??e.statusText),this.config.onError?.(t),e}}get(e,t){return this.request({...t,method:"GET",url:e})}delete(e,t){return this.request({...t,method:"DELETE",url:e})}head(e,t){return this.request({...t,method:"HEAD",url:e})}options(e,t){return this.request({...t,method:"OPTIONS",url:e})}post(e,t,s){return this.request({...s,method:"POST",url:e,data:t})}put(e,t,s){return this.request({...s,method:"PUT",url:e,data:t})}patch(e,t,s){return this.request({...s,method:"PATCH",url:e,data:t})}getAxios(){return this.axiosInstance}setAuthData(e){this.storage.setItem(this.config.authDataStorageKey||"auth",JSON.stringify(e))}getAuthData(){let e=this.storage.getItem(this.config.authDataStorageKey||"auth");return e?JSON.parse(e):null}getConfig(){return this.config}}class f extends b{constructor(e){super(e),this.config=e}getConfig(){return super.getConfig()}prepareAuthRequestConfig(){let{accessToken:e}=this.getAuthData()||{};return e?{headers:{Authorization:`${this.config.authSchema??"Bearer"} ${e}`}}:(console.warn("No access token found. Please set auth data after authorization."),{})}scheduleTokenRenewal(e){this.cancelTokenRenewal();let t=this.getAuthData(),s=(0,A.decode)(t?.accessToken||"");if(!s||(0,y.isString)(s)||!s.exp){console.warn("Could not schedule token renewal: invalid expiration time.");return}let r=1e3*s.exp-Date.now();this.tokenRenewalTimeout=setTimeout(async()=>{let t=await e();this.setAuthData(t),this.scheduleTokenRenewal(e)},r-6e4)}cancelTokenRenewal(){clearTimeout(this.tokenRenewalTimeout)}}var q={},w={};D(w,"AttributeApi",()=>B);class B{constructor(e){this.apiClient=e,g(N)(this)}getAttributeValues(e){return this.apiClient.request({...e,url:"/v1/attributes",method:"GET",secure:!0,responseType:"json"})}getPublicAttributeValue(e,t){return this.apiClient.request({...t,url:`/v1/attributes/${e}`,method:"GET",secure:!0,responseType:"json"})}}var G={};D(G,"AuthenticationApi",()=>k);class k{constructor(e){this.apiClient=e,g(N)(this)}authenticate(e,t){return this.apiClient.request({...t,url:"/v1/authenticate",method:"POST",headers:e,responseType:"json"})}refresh(e){return this.apiClient.request({...e,url:"/v1/refresh",method:"POST",secure:!0,responseType:"json"})}invalidate(e){return this.apiClient.request({...e,url:"/v1/invalidate",method:"POST",secure:!0})}}var F={};D(F,"AvatarApi",()=>j);class j{constructor(e){this.apiClient=e,g(N)(this)}getUserAvatar(e,t){return this.apiClient.request({...t,url:`/v1/avatars/users/${e}`,method:"GET",secure:!0,responseType:"blob"})}uploadUserAvatar(e,t,s){return this.apiClient.request({...s,url:`/v1/avatars/users/${e}`,method:"POST",data:t,secure:!0,contentType:R.FormData})}deleteUserAvatar(e,t){return this.apiClient.request({...t,url:`/v1/avatars/users/${e}`,method:"DELETE",secure:!0})}getAccountAvatar(e,t){return this.apiClient.request({...t,url:`/v1/avatars/accounts/${e}`,method:"GET",secure:!0,responseType:"blob"})}uploadAccountAvatar(e,t,s){return this.apiClient.request({...s,url:`/v1/avatars/accounts/${e}`,method:"POST",data:t,secure:!0,contentType:R.FormData})}deleteAccountAvatar(e,t){return this.apiClient.request({...t,url:`/v1/avatars/accounts/${e}`,method:"DELETE",secure:!0})}}var J={};D(J,"ChartApi",()=>Y);class Y{constructor(e){this.apiClient=e,g(N)(this)}getChartLayouts(e){return this.apiClient.request({...e,url:"/v1/charts/layouts",method:"GET",secure:!0,responseType:"json"})}updateChartLayout(e,t){return this.apiClient.request({...t,url:"/v1/charts/layouts",method:"PUT",data:e,secure:!0,contentType:R.Json,responseType:"json"})}getChartLayoutDetails(e,t){return this.apiClient.request({...t,url:`/v1/charts/layouts/${e}`,method:"GET",secure:!0,responseType:"json"})}deleteChartLayout(e,t){return this.apiClient.request({...t,url:`/v1/charts/layouts/${e}`,method:"DELETE",secure:!0})}getIndicatorTemplates(e){return this.apiClient.request({...e,url:"/v1/charts/indicator-templates",method:"GET",secure:!0,responseType:"json"})}updateIndicatorTemplate(e,t){return this.apiClient.request({...t,url:"/v1/charts/indicator-templates",method:"PUT",data:e,secure:!0,contentType:R.Json,responseType:"json"})}getIndicatorTemplateDetails(e,t){return this.apiClient.request({...t,url:`/v1/charts/indicator-templates/${e}`,method:"GET",secure:!0,responseType:"json"})}deleteIndicatorTemplate(e,t){return this.apiClient.request({...t,url:`/v1/charts/indicator-templates/${e}`,method:"DELETE",secure:!0})}getChartTemplates(e){return this.apiClient.request({...e,url:"/v1/charts/templates",method:"GET",secure:!0,responseType:"json"})}updateChartTemplate(e,t){return this.apiClient.request({...t,url:"/v1/charts/templates",method:"PUT",data:e,secure:!0,contentType:R.Json,responseType:"json"})}getChartTemplateDetails(e,t){return this.apiClient.request({...t,url:`/v1/charts/templates/${e}`,method:"GET",secure:!0,responseType:"json"})}deleteChartTemplate(e,t){return this.apiClient.request({...t,url:`/v1/charts/templates/${e}`,method:"DELETE",secure:!0})}}var V={};D(V,"MessageApi",()=>H);class H{constructor(e){this.apiClient=e,g(N)(this)}getMessages(e,t){return this.apiClient.request({...t,url:"/v1/messages",method:"GET",params:e,secure:!0,responseType:"json"})}}var W={};D(W,"PreferenceApi",()=>x);class x{constructor(e){this.apiClient=e,g(N)(this)}getPreferences(e){return this.apiClient.request({...e,url:"/v1/preferences",method:"GET",secure:!0,responseType:"json"})}savePreferences(e){return this.apiClient.request({...e,url:"/v1/preferences",method:"POST",secure:!0,responseType:"json"})}}var K={};D(K,"VersioningApi",()=>$);class ${constructor(e){this.apiClient=e,g(N)(this)}getAppVersion(e,t){return this.apiClient.request({...t,url:`/versioning/${e}`,method:"GET",responseType:"json"})}updateAppVersion(e,t,s){return this.apiClient.request({...s,url:`/versioning/${e}`,method:"POST",data:t,contentType:R.Json})}}var Q={};D(Q,"WatchlistApi",()=>X);class X{constructor(e){this.apiClient=e,g(N)(this)}getAllWatchlists(e){return this.apiClient.request({...e,url:"/v1/watchlists",method:"GET",secure:!0,responseType:"json"})}createWatchlist(e,t){return this.apiClient.request({...t,url:"/v1/watchlists",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}getWatchlist(e,t){return this.apiClient.request({...t,url:`/v1/watchlists/${e}`,method:"GET",secure:!0,responseType:"json"})}updateWatchlist(e,t,s){return this.apiClient.request({...s,url:`/v1/watchlists/${e}`,method:"PUT",data:t,secure:!0,contentType:R.Json,responseType:"json"})}deleteWatchlist(e,t){return this.apiClient.request({...t,url:`/v1/watchlists/${e}`,method:"DELETE",secure:!0})}addWatchlistEntries(e,t,s){return this.apiClient.request({...s,url:`/v1/watchlists/${e}/entries`,method:"POST",data:t,secure:!0,contentType:R.Json,responseType:"json"})}removeWatchlistEntries(e,t,s){return this.apiClient.request({...s,url:`/v1/watchlists/${e}/entries`,method:"DELETE",data:t,secure:!0,contentType:R.Json,responseType:"json"})}updateWatchlistEntries(e,t,s){return this.apiClient.request({...s,url:`/v1/watchlists/${e}/entries`,method:"PUT",data:t,secure:!0,contentType:R.Json,responseType:"json"})}updateWatchlistOrders(e,t){return this.apiClient.request({...t,url:"/v1/watchlists/orders",method:"POST",data:e,secure:!0,contentType:R.Json})}importWatchmenWatchlists(e){return this.apiClient.request({...e,url:"/v1/watchlists/import",method:"POST",secure:!0})}}L(q,w),L(q,G),L(q,F),L(q,J),L(q,V),L(q,W),L(q,{}),L(q,K),L(q,Q);class z extends k{async authenticate(e,t){let s=await super.authenticate(e,t);return s.success&&(this.apiClient.setAuthData(s.data),this.apiClient.scheduleTokenRenewal(this.renewToken)),s}async renewToken(){let e=this.apiClient.getAuthData()?.refreshToken;if(!e)throw Error("Refresh token not found");let t=await this.refresh({headers:{Authorization:`${this.apiClient.getConfig().authSchema??"Bearer"} ${e}`}});if(t.success)return{accessToken:t.data.accessToken,refreshToken:t.data.refreshToken};throw Error(`Could not renew token: ${String(t.error)}`)}}class Z extends M{constructor(e){super(new f(e)),this.config=e,this.attribute=new B(this.apiClient),this.authentication=new z(this.apiClient),this.avatar=new j(this.apiClient),this.chart=new Y(this.apiClient),this.message=new H(this.apiClient),this.preference=new x(this.apiClient),this.versioning=new $(this.apiClient),this.watchlist=new X(this.apiClient)}}L(U,v),L(U,q);var ee={},et={};D(et,"OrbisApi",()=>en);var es={};es=JSON.parse('{"ERR_UNKNOWN_ERROR":"Unknown Error","ERR_ESIGNATURE_REQUIRED":"E-Signature Required","ERR_ACH_NOT_ALLOWED":"Ach Not Allowed","ERR_ACH_WITHDRAWAL_NOT_ALLOWED":"Ach Withdrawal Not Allowed","ERR_ACH_DEPOSITS_NOT_ALLOWED":"Ach Deposits Not Allowed","ERR_WIRE_WITHDRAWAL_NOT_ALLOWED":"Wire Withdrawal Not Allowed","ERR_PLAID_ERROR":"Plaid Error","ERR_IDENTITIES_NOT_AVAILABLE":"Identities Not Available","ERR_NAMES_NOT_AVAILABLE":"Names Not Available","ERR_INSUFFICIENT_SHARES":"Insufficient Shares","ERR_INSUFFICIENT_FUNDS":"Insufficient Funds","ERR_INSUFFICIENT_CASH":"Insufficient Cash","ERR_MARGIN_ACCOUNT_ONLY":"Margin Account Only","ERR_NOT_SHORTABLE":"Not Shortable","ERR_SHORTABLE_LIMIT_EXCEEDED":"Shortable Limit Exceeded","ERR_NO_QUOTE":"No Quote","ERR_PURPOSE_NOT_SUPPORTED":"Purpose Not Supported","ERR_OPTION_EXPIRED":"Option Expired","ERR_CANNOT_BUY_TO_OPEN":"Cannot Buy To Open","ERR_CANNOT_SELL_TO_CLOSE":"Cannot Sell To Close","ERR_CANNOT_NAKED_SELL_TO_OPEN":"Cannot sell to open without spread","ERR_CANNOT_BUY_TO_CLOSE":"Cannot Buy To close","ERR_BUY_OPEN_SELL_OPEN":"Cannot Buy to Open and Sell to Open at same time","ERR_BUY_STRIKE_MORE_SELL_STRIKE":"Buy Strike higher than Sell Strike Price","ERR_QUANTITIES_NOT_EQUAL":"Spread Quantities are not Equal","ERR_MUST_BE_CALLS":"Must Be Calls","ERR_MUST_BE_PUTS":"Must Be Puts","ERR_MUST_BE_CREDIT":"Must Be Credit","ERR_SAME_UNDERLYING":"Same Underlying","ERR_MUST_ENTER_DEBIT_PRICE":"Debit price must be entered","ERR_MUST_ENTER_CREDIT_PRICE":"Credit price must be entered","ERR_MUST_BE_DEBIT":"Transaction must be Debit","ERR_SAME_EXPIRATION_MONTH":"Same expiration month","ERR_OPTIONS_NOT_PERMITTED":"Options not permitted","ERR_MUST_MARGIN_ACCOUNT":"Margin account is required to complete this transaction","ERR_NO_ILM_ACCOUNT":"No Ilm Account","ERR_NO_OTCBB":"Cannot short sell an OTC stock","ERR_LIMIT_ONLY":"Limit orders only","ERR_OUTSIDE_MARKET_HOURS":"Cannot trade outside market hours","ERR_MARKET_CLOSED":"Market is closed","ERR_BUY_STRIKE_LESS_SELL_STRIKE":"Buy Strike is less than Sell strike price","ERR_BUY_STRIKE_EQUAL_SELL_STRIKE":"Buy strike is equal to Sell strike price","ERR_BUY_EXPIRATION_LONGER":"Buy Expiration Longer","ERR_BUY_EXPIRATION_SHORTER":"Buy Expiration Shorter","ERR_BUY_OPTION_PRICE_GREATER_SELL_OPTION_PRICE":"Buy Option Price Greater Sell Option Price","ERR_BUY_OPTION_PRICE_LESSER_SELL_OPTION_PRICE":"Buy Option Price Lesser Sell Option Price","ERR_SELL_RESTRICTED":"Sell orders for this security are not allowed","ERR_BUY_RESTRICTED":"Buy orders for this security are not allowed","ERR_NEW_ORDERS_ARE_RESTRICTED":"New Orders Are Restricted","ERR_INVALID_BLOCK_SIZE":"Invalid Block Size","ERR_TRADING_RESTRICTED":"Trading Restricted","ERR_SELL_CLOSE_BUY_CLOSE":"Cannot Sell to Close and Buy to Close same position","ERR_LESS_OR_NO_SELL_TO_OPEN_POSN":"Less Or No Sell To Open Position","ERR_LESS_OR_NO_BUY_TO_OPEN_POSN":"Less Or No Buy To Open Position","ERR_STOP_GREATER_LAST":"Stop price must be less than the last price","ERR_STOP_LESS_LAST":"Stop price cannot be less than last price","ERR_TRADING_HALTED":"Trading has been halted temporarily","ERR_EXCHANGE_RESTRICTION":"Trading on this security has been restricted","ERR_SYMBOL_NOT_TRADABLE":"Symbol is not tradable","ERR_MISSING_RULE_5030_5131":"Missing Rule 50305131","ERR_DUPLICATE_ORDER_REFERENCE":"Duplicate order reference","ERR_LIMIT_LESS_STOP":"Limit price must be greater than the stop price","ERR_ORDER_TYPE_NOT_TRADABLE":"Cannot place market orders at this time","ERR_ORDER_TYPE_NOT_PERMITTED":"Order Type not permitted","ERR_ACCOUNT_NOT_TRADABLE":"Account is currently not tradable","ERR_INVALID_EXPECTED_VALUE":"Invalid expected value","ERR_LIMIT_GREATER_STOP":"Limit price must be less than the stop price","ERR_ORDER_NOT_FOUND":"Order not found","ERR_NO_SHARES_AVAILABLE":"No shares available","ERR_NO_CHANGES":"No changes","ERR_SHARES_LESS_EXECUTED":"Shares less executed","ERR_REQUEST_IN_PROGRESS":"Request in progress","ERR_REPLACE_IN_PROGRESS":"Replace in progress","ERR_TRANSACTION_NOT_SUPPORTED":"Transaction is not supported for this order type","ERR_START_TIME_BEFORE_END_TIME":"Start time before end time","ERR_ALGO_STRATEGY_NOT_SUPPORTED":"Algo Strategy not supported","ERR_DUPLICATE_ORDER_SUBMISSION":"Duplicate order. Please resubmit in at least 30 seconds","ERR_UNKNOWN_ORDER_TYPE":"Unknown Order Type","ERR_MAX_FLOOR_GREATER_THAN_QUANTITY":"Max Floor Greater than Quantity","ERR_MAX_FLOOR_NOT_ODD_LOT":"Max Floor Not Odd Lot","ERR_CANNOT_SELL_TO_OPEN":"Cannot Sell To Open","ERR_NO_GTC_ON_INET":"GTC orders are not allowed on ECN","ERR_NO_GTD_PERMITTED":"GTD Orders not Permitted","ERR_TOO_MANY_DECIMAL_PLACES":"Too many decimal places","ERR_LIQUIDATION_ONLY":"Liquidation only","ERR_INSUFFICIENT_EQUITY":"Insufficient Equity","ERR_MUST_BE_EVEN":"Must Be Even","ERR_ODD_LOT_ONLY":"This security trades in odd lots only","ERR_TOO_LATE_TO_ENTER":"Too late to enter","ERR_OPTION_TRADING_RESTRICTED":"Option trading restricted","ERR_TOO_EARLY_TO_ENTER":"Too early to enter","ERR_VOLUME_CONSTRAINT_NOT_NEEDED":"Volume Constraint not needed","ERR_VOLUME_CONSTRAINT_NEEDED":"Volume constraint needed","ERR_CANNOT_DO_SPREADS":"Spread trading is not available","ERR_OCO_NEED_SAME_SECURITY":"OCO Need same security","ERR_OCO_NEED_SAME_SIZE":"OCO needs same size","ERR_OCO_MUST_BE_STOP":"OCO must be stop","ERR_OCO_LIMIT_BELOW_STOP":"OCO limit below stop","ERR_OCO_MUST_BE_LIMIT":"OCO must be limit","ERR_OCO_STOP_BELOW_LIMIT":"OCO stop below limit","ERR_OCO_NEED_DIFFERENT_SECURITY":"OCO needs different security","ERR_OCO_VALUE_MUST_BE_EQUAL":"OCO value must be equal","ERR_NEGATIVE_MARKUP":"Markup cannot be negative","ERR_MARKUP_TOO_BIG":"Markup too big","ERR_DIMES_ONLY":"This option is traded in dimes (10c increments) only","ERR_NICKELS_ONLY":"Price must be in 5 cent spread","ERR_OCO_STOP_TOO_CLOSE":"Oco stop too close","ERR_CREATING_NAKED_POSITION":"This transaction will create a naked position your account is not allowed to have","ERR_INSUFFICIENT_SHORT_SHARES":"Insufficient short shares","ERR_OCO_INVALID_ORDER_TYPE":"OCO invalid order type","ERR_ORDER_NOT_FOUND_BUY_LEG":"Order cannot find BUY leg of spread","ERR_ORDER_NOT_FOUND_SELL_LEG":"Order cannot find SELL leg of spread","ERR_STATUS_NOT_IN_W_E_B":"Status Not In WEB","ERR_INSERT_REPLACE_BUY_LEG":"INSERT Replace buy leg","ERR_INSERT_REPLACE_SELL_LEG":"INSERT Replace sell leg","ERR_INSERT_REPLACE_HIST":"INSERT replace history","ERR_UPDATE_REPLACE_BUY_LEG":"UPDATE Replace buy leg","ERR_UPDATE_REPLACE_SELL_LEG":"UPDATE Replace sell leg","ERR_INSERT_G_EVENT_BUY_LEG":"Insert G-Event for SELL leg","ERR_INSERT_G_EVENT_SELL_LEG":"Insert G-Event for BUY leg","ERR_INSERT_V_EVENT_BUY_LEG":"Insert V-Event for BUY leg","ERR_INSERT_V_EVENT_SELL_LEG":"Insert V-Event for SELL leg","ERR_INSERT_REPLACE_SUCCESS_HIST":"INSERT Replace success history","ERR_REPLACE_ACTIVE_ZERO":"Replace active zero","ERR_UPDATE_STATUS_G":"Update status G","ERR_INVALID_USER":"Invalid user","ERR_INVALID_ACCOUNT":"Invalid account","ERR_INSUFFICIEND_LONG_TO_COVER":"Insufficiend long to cover","ERR_QUOTE_COUNTRY_NOT_SUPPORTED":"Quote country not supported","ERR_TRADING_LIMIT":"Trading limit error","ERR_STOP_AON":"Stop All-Or-None","ERR_AON_NOT_SUPPORTED":"All-Or-None not supported","ERR_INVALID_TRADING_PASSWORD":"Invalid trading password","ERR_EIP_BUYS_MIS":"This security cannot be acquired due to an SIP classification","ERR_ORDER_EXCEEDS_SHARE_LIMIT":"Order exceeds share limit","ERR_ORDER_EXCEEDS_VALUE_LIMIT":"Order exceeds value limit","ERR_ORDER_VALUE_TOO_SMALL":"Order value too small","ERR_ORDER_EXCEEDS_THRESHOLD":"Order exceeds threshold","ERR_WASH_TRADE":"Cannot place an order while order is open","ERR_POSITION_LOADER_NOT_AVAILABLE":"Position Loader not available","ERR_BALANCE_LOADER_NOT_AVAILABLE":"Balance Loader not available","ERR_NO_OTCBB_ON_PREPOST":"No OTCBB for pre and post market","ERR_LIMIT_MARKET_ONLY":"Only limit and market orders are supported","ERR_TOO_SMALL_FOR_AON":"Quantity too small of All-Or-None","ERR_MISSING_LIMIT":"Missing limit","ERR_MISSING_STOP":"Missing stop","ERR_PRICE_TOO_SMALL":"Price too small","ERR_GTC_NOT_ALLOWED":"GTC orders are not allowed","ERR_PRE_IPO":"Market orders are not allowed on pre-IPO stocks","ERR_UNKNOWN_STRATEGY":"Unknown Strategy","ERR_ESS":"ESS Error","ERR_UNREALISTIC_CREDIT_DEBIT":"Unrealistic credit debit","ERR_UNREALISTIC_CREDIT":"Unrealistic credit","ERR_ESTABLISHING_SHORT_ON_NONINTERMEDIARY_WTH_LONG":"Establishing Short on Non-Intermediary with Long","ERR_ESTABLISHING_LONG_ON_NONINTERMEDIARY_WTH_SHORT":"Establishing Long on Non-Intermediary with Short","ERR_DIFFERENT_STRIKE_DISTANCE":"Different strike distance","ERR_POSITION_NOT_FOUND":"Position not found","ERR_NAKED_PUTS_NOT_PERMITTED":"Naked Put Positions not Permitted","ERR_NAKED_CALLS_NOT_PERMITTED":"Naked Call Positions not Permitted","ERR_SHORT_SPREADS_NOT_PERMITTED":"Short Spreadsn not permitted","ERR_MICRO_CAP_THRESHOLD":"Micro cap threshold","ERR_INVALID_PEG_TYPE":"Invalid peg type","ERR_INVALID_PEG":"Invalid peg","ERR_ETH_NOT_SUPPORTED":"ETH not supported","ERR_TOO_MANY_REQUESTS":"Too many requests","ERR_TOO_MANY_IDENTICAL_REQUESTS":"Too many identical requests","ERR_OTC_PRICE_THRESHOLD":"OTC price threshold","ERR_BNP_OTC_THRESHOLD":"BNP OTC threshold","ERR_ORDER_TOO_LARGE":"Order too large","ERR_TOO_MANY_SHARES":"Too many shares","ERR_PRICE_MOVEMENT_THRESHOLD":"Price movement threshold","ERR_MISSING_QUANTITY":"Quantity missing from Order","ERR_CONTRACT_SIZE_UNAVAILABLE":"Contract size unavailable","ERR_OPERATION_NOT_SUPPORTED":"Operation not supported","ERR_ACCOUNT_UNDEFINED":"Account undefined","ERR_POLICY_UPDATE_NOT_SUPPORTED":"Policy Update not supported","ERR_UNREALISTIC_PERCENTAGE":"Unrealistic percentage","ERR_UNREALISTIC_TOTAL":"Unrealistic total","ERR_MISSING_ORDERS":"Missing orders","ERR_ORDER_MISMATCH":"Order mismatch","ERR_MULTIPLE_MODELS":"Multiple models","ERR_MULTIPLE_TRANSACTIONS":"Multiple transactions","ERR_MULTIPLE_SECURITIES":"Multiple securities","ERR_MULTIPLE_ACCOUNT_TYPES":"Multiple account types","ERR_MULTIPLE_CURRENCIES":"Multiple currencies","ERR_MULTIPLE_SIDES":"Multiple sides","ERR_UNALLOCATED_ORDERS":"Unallocated orders","ERR_INVENTORY_NOT_ALLOWED":"Inventory not Allowed","ERR_INSUFFICIENT_ARGUMENTS":"Insufficient arguments","ERR_MODEL_HAS_ACCOUNTS":"Model has accounts","ERR_MODEL_NOT_DEFINED":"Model not defined","ERR_VALIDATOR_NOT_AVAILABLE":"Validator not available","ERR_LESS_THAN_MINIMUM_QUANTITIES":"Quantity Less than Allowable Minimum","ERR_GREATER_THAN_MAXIMUM_QUANTITIES":"Quantity Greater than Allowable Maximum","ERR_QUANTITIES_INVALID_INCREMENT":"Invalid Qunatity Increment","ERR_ROUTES_NOT_AVAILABLE":"Routes not available","ERR_MISSING_VALUE":"Value missing","ERR_DOES_NOT_MEET_MINIMUM":"Does not meet minimum","ERR_ORDER_TIME_RESTRICTED":"Order Time restricted","ERR_FRACTIONAL_QUANTITY_NOT_SUPPORTED":"Fractional quantity not supported","ERR_QUANTITY_NOT_SUPPORTED":"Quantity not supported","ERR_DUPLICATE_QUANTTY":"Duplicate Quantty","ERR_FRACTIONAL_NOT_ALLOWED":"Fractional Not Allowed","ERR_FRACTIONAL_LIMITS_NOT_ALLOWED":"Fractional Limits Not Allowed","ERR_INVENTORY_NOT_DEFINED":"Inventory Not Defined","ERR_NOTIONAL_EXPECTED":"Notional expected","ERR_UNREALISTIC_VALUE":"Unrealistic value","ERR_MISSING_ORDER_TYPE":"Missing order type","ERR_TOO_MANY_DEPOSITS":"Too many deposits","ERR_TOO_MANY_WITHDRAWALS":"Too many withdrawals","ERR_TRANSFER_METHOD_NOT_SUPPORTED":"Transfer Method not supported","ERR_TRANSFER_REJECTED":"Transfer rejected","ERR_RESTRICTED_ITEM":"Restricted item","ERR_FEATURE_NOT_AVAILABLE":"Feature not available","ERR_INVALID_RELATIONSHIP":"Invalid relationship","ERR_MISSING_ID":"Missing ID","ERR_MISSING_CONTRIBUTION_YEAR":"Missing Contribution Year","ERR_MISSING_CONTRIBUTION_TYPE":"Missing Contribution Type","ERR_MISSING_DISTRIBUTION_REASON":"Missing Distribution Reason","ERR_MISSING_DISTRIBUTION_INSTITUTION":"Missing Distribution Institution","ERR_MISSING_VALUE_TYPE":"Missing Value Type","ERR_MISSING_TRANSFER_ID":"Missing Transfer Id","ERR_MISSING_TOKEN":"Missing Token","ERR_NAME_MISMATCH":"Name mismatch","ERR_BANK_RELATIONSHIP_CREATION_FAILURE":"Bank Relationship Creation Failure","ERR_BANK_RELATIONSHIP_DUPLICATE_NICKNAME":"Bank Relationship Duplicate Nickname","ERR_BANK_RELATIONSHIP_DUPLICATE_BENEFICIARY":"Bank Relationship Duplicate Beneficiary","ERR_BANK_RELATIONSHIP_NOT_SUPPORTED":"Bank Relationship Not Supported","ERR_BANK_RELATIONSHIP_NOT_APPROVED":"Bank Relationship Not Approved","ERR_BANK_ACCOUNT_TYPE_NOT_SUPPORTED":"Bank Account Type Not Supported","ERR_MISSING_NICKNAME":"Missing Nickname","ERR_BANK_RELATIONSHIP_LIMIT":"Bank Relationship Limit","ERR_INVALID_DISBURSEMENT_TYPE":"Invalid Disbursement Type","ERR_RECIPIENT_BANK_MISSING":"Recipient Bank Missing","ERR_RECIPIENT_BANK_PRESENT":"Recipient Bank Present","ERR_INVALID_IDENTIFIER_TYPE":"Invalid Identifier Type","ERR_IDENTIFIER_MISSING":"Identifier Missing","ERR_ACCOUNT_TYPE_MISSING":"Account Type Missing","ERR_BENEFICIARY_MISSING":"Beneficiary Missing","ERR_BENEFICIARY_PRESENT":"Beneficiary Present","ERR_INVALID_ABA_NUMBER":"Invalid Aba Number","ERR_MUTUAL_FUND_TRADING_RESTRICTED":"This fund is not allowed to be purchased in the account owner\'s US State","ERR_MUTUAL_FUND_NOT_ALLOWED":"This fund is not on the list of approved funds","ERR_THIRD_PARTY_XFER_RESTRICTED":"Third-Party Transfers restricted","ERR_MUTUAL_FUND_SUBSTITUTE_LIQUIDATION_NOT_SUPPORTED":"Mutual Fund Substitute Liquidation not supported","ERR_MUTUAL_FUND_SUBSTITUTE_VALUE":"Mutual Fund Substitute Value","ERR_MUTUAL_FUND_NOT_ALLOWED_TO_CANCEL":"Mutual Fund not allowed to cancel","ERR_MUTUAL_FUND_TIME_EXCEEDS_ORDER_CUTOFF":"Mutual Fund Time exceeds Order cutoff","ERR_LIQUIDATION_WITH_EXISTING_OPEN_SELL_ORDER":"Liquidation with existing Open Sell Order","ERR_TRANSFER_NOT_FOUND":"Transfer Not Found","ERR_ACCOUNT_NOT_ACTIVE":"Account Not Active","ERR_MUST_BE_OPTION":"Must Be Option","ERR_UNEVEN_BREADTH":"Uneven Breadth","ERR_PAST_DELIVERY_DATE":"Past Delivery Date","ERR_MISSING_LOA":"Missing Loa","ERR_JOURNAL_REQUEST_FAILED":"Journal Request Failed","ERR_UNEXPECTED_ERROR":"Unexpected Error","ERR_UNKNOWN_KEY_FOR_USER":"Unknown Key For User","ERR_UNKNOWN_PARAMETER_FOR_USER":"Unknown Parameter For User","ERR_NO_BANK_ACCOUNT_WITH_SAME_NAME":"No Bank Account With Same Name","ERR_OPEN_TRANSFERS":"Open Transfers","ERR_BANK_RELATIONSHIP_NOT_FOUND":"Bank Relationship Not Found","ERR_NO_BANK_ACCOUNT_FOUND":"No Bank Account Found","ERR_CFR_275_206_RESTRICTED":"Cfr 275206 Restricted","ERR_RECONFIRM_NOT_REQUESTED":"Reconfirm Not Requested","ERR_ACQUISITION_OF_CORP_ACT_OPTION":"Acquisition Of Corp Act Option","ERR_ENCRYPTION_FAILED":"Encryption Failed","ERR_MUTUAL_FUND_NO_NEW_INVESTORS_ALLOWED":"Mutual Fund No New Investors Allowed","ERR_LARGE_ORDER_REJECTION":"Large Order Rejection","ERR_CANCEL_FAILED":"Cancel Failed","ERR_TRIGGER_FAILURE":"Trigger Failure","ERR_ACAT_FAILURE":"Acat Failure","ERR_MULTIPLE_ACCOUNTS":"Multiple Accounts","ERR_ACAT_ASSETS_UNDEFINED":"Acat Assets Undefined","ERR_MISSING_CONTRA_ACCOUNT":"Missing Contra Account","ERR_MISSING_CONTRA_ACCOUNT_TYPE":"Missing Contra Account Type","ERR_MISSING_CONTRA_ACCOUNT_TITLE":"Missing Contra Account Title","ERR_MISSING_PRIMARY_TAX_ID":"Missing Primary Tax Id","ERR_MISSING_REMOTE_IP":"Missing Remote Ip","ERR_MISSING_REMOTE_DEVICE":"Missing Remote Device","ERR_STATE_RESTRICTED":"State Restricted","ERR_OPEN_ORDER_LIMIT":"Open Order Limit","ERR_EXCEEDED_NOTIONAL_LIMIT":"Exceeded Notional Limit","ERR_MINIMUM_ORDER_LIMIT":"Minimum Order Limit","ERR_ACAT_IN_PROGRESS":"Acat In Progress","ERR_ATTEMPTED_TRADE":"Attempted Trade","ERR_NO_VALUE":"No Value","ERR_MISSING_CONTROL_TRANSFER_ID":"Missing Control Transfer Id","ERR_MISSING_CONTROL_SOURCE":"Missing Control Source","ERR_MISSING_CONTROL_RESOLUTION":"Missing Control Resolution","ERR_MISSING_DIVIDENDS_INDICATOR":"Missing Dividends Indicator","ERR_MISSING_CAPITAL_GAINS_INDICATOR":"Missing Capital Gains Indicator","ERR_MISSING_BANK_NAME":"Missing Bank Name","ERR_MISSING_BANK_CITY":"Missing Bank City","ERR_MISSING_BANK_STATE_PROVINCE":"Missing Bank State Province","ERR_MISSING_BANK_COUNTRY":"Missing Bank Country","ERR_INVALID_BANK_COUNTRY":"Invalid Bank Country","ERR_MISSING_BANK_POSTAL_CODE":"Missing Bank Postal Code","ERR_INSTANT_DEPOSIT_DENIED":"Instant Deposit Denied","ERR_IDENTITY_ID_MISSING":"Identity Id Missing","ERR_DOMESTIC_NOT_SUPPORTED":"Domestic Not Supported","ERR_MISSING_BANK_CODE":"Missing Bank Code","ERR_MISSING_BANK_BRANCH":"Missing Bank Branch","ERR_INVALID_BANK_BRANCH":"Invalid Bank Branch","ERR_INVALID_BANK_ACCOUNT":"Invalid Bank Account","ERR_MISSING_ADDRESS":"Missing Address","ERR_MISSING_PAYMENT_METHOD":"Missing Payment Method","ERR_GIFT_MUST_HAVE_PURPOSE":"Gift Must Have Purpose","ERR_INVALID_STREET":"Invalid Street","ERR_INVALID_STREET_MATCH":"Invalid Street Match","ERR_INVALID_COUNTRY":"Invalid Country","ERR_INVALID_CITY":"Invalid City","ERR_PAYMENT_METHODS_NOT_AVAILABLE":"Payment Methods Not Available","ERR_PAYMENT_METHODS_NOT_SUPPORTED":"Payment Methods Not Supported","ERR_ACCOUNT_TRADING_HALTED":"Account Trading Halted","ERR_ADJUSTMENT_FAILURE":"Adjustment Failure","ERR_CRYPTO_NOT_ENABLED":"Crypto Not Enabled","ERR_CRYPTO_NOT_ALLOWED":"Crypto Not Allowed","ERR_INVALID_DOCUMENT_ID":"Invalid Document Id","ERR_MISSING_BANK_ACCOUNT":"Missing Bank Account","ERR_MARKET_ORDER_PRIOR_MARKET_OPEN_RESTRICTED":"Market Order Prior Market Open Restricted","ERR_LEGAL_NOT_SUPPORTED":"Legal Not Supported","ERR_DOCUMENT_CALL_NOT_SUPPORTED":"Document Call Not Supported","ERR_FEATURE_NOT_SUPPORTED":"Feature Not Supported","ERR_CRYPTO_SIGNUP_NOT_SUPPORTED":"Crypto Signup Not Supported","ERR_NOT_ACH":"Not Ach","ERR_AMOUNT_MUST_BE_GREATER_THAN_ZERO":"Amount Must Be Greater Than Zero","ERR_NOT_MICRODEPOSIT":"Not Microdeposit","ERR_LINK_IN_INVALID_STATUS":"Link In Invalid Status","ERR_OCT_CLOSING_PRICE_THRESHOLD":"Oct Closing Price Threshold","ERR_OTC_MARKET_CAP_THRESHOLD":"Otc Market Cap Threshold","ERR_FILE_UPLOAD_FAILED":"File Upload Failed","ERR_MISSING_CONTRIBUTION":"Missing Contribution","ERR_MISSING_DISTRIBUTION":"Missing Distribution","ERR_NON_CORE_DISALLOWED":"Non Core Disallowed","ERR_PRE_CORE_DISALLOWED":"Pre Core Disallowed","ERR_ALL_DISALLOWED":"All Disallowed","ERR_CORE_POST_DISALLOWED":"Core Post Disallowed","ERR_INVALID_2FA":"Invalid 2 Fa","ERR_PASSPHRASE_NOT_SUPPORTED":"Passphrase not supported","ERR_PASSWORD_TOO_SHORT":"Password is too short","ERR_PASSWORD_CONTAINS_USERNAME":"Password contains username","ERR_PASSWORD_INSUFFICIENT_DIGITS":"Password has insufficient digits","ERR_PASSWORD_DIGITS_ONLY":"Password cannot only contain digits","ERR_PASSWORD_NEEDS_MULTICASE":"Password needs multicase characters","ERR_PASSWORD_CONTAINS_SEQUENCE":"Password contains sequenced characters","ERR_PASSWORD_CONTAINS_SUBSEQUENCE":"Password cannot have a sequence of consecutive characters/numbers","ERR_PASSWORD_RECENTLY_USED":"Password was recently used","ERR_PASSWORD_COMMONLY_USED":"Password commonly used","ERR_PASSWORD_INVALID":"Incorrect old password"}');class er extends f{parseOrbisError(e){let t=e?e.error||e.errors:void 0;if(t){let e=JSON.stringify(t);for(let t of Object.keys(/*@__PURE__*/g(es)))if(e.toUpperCase().includes(t))return{orbisErrorCode:t,orbisErrorMessage:/*@__PURE__*/g(es)[t]}}return{orbisErrorCode:null,orbisErrorMessage:null}}async request(e){try{let t=await super.request(e);return Object.assign(t,this.parseOrbisError(t.data)),t.success||this.handleAxiosError(t.error),t}catch(e){throw(0,m.isAxiosError)(e)&&(Object.assign(e,this.parseOrbisError(e.response?.data)),this.handleAxiosError(e)),e}}handleAxiosError(e){(0,m.isAxiosError)(e)&&(e.status===m.HttpStatusCode.Unauthorized&&this.config.onUnauthorized?.(),440===e.status&&this.config.onLoginTimeout?.())}}class en extends M{constructor(e){super(new er({...e,authSchema:"SessionId"}))}async login(e,t){let s=await this.apiClient.post("auth/v2/login",{username:e,password:t});return s.success&&await this.saveTokenAndScheduleRenewal(s.data.sessionId),s}async sso(e,t){let s=await this.apiClient.post("auth/v1/sso/platform",{token:e,platform:t});return s.success&&await this.saveTokenAndScheduleRenewal(s.data.sessionId),s}async logout(){await this.apiClient.post("auth/logout"),this.apiClient.setAuthData(null),this.apiClient.cancelTokenRenewal()}async saveTokenAndScheduleRenewal(e){this.apiClient.setAuthData({accessToken:e,refreshToken:e}),this.apiClient.scheduleTokenRenewal(this.renewToken)}async renewToken(){let e=await this.apiClient.post("auth/v2/renew");if(e.success)return{accessToken:e.data.sessionId,refreshToken:e.data.sessionId};throw Error(`Could not renew token: ${String(e.error)}`)}}L(ee,et);var ei={},eo={};D(eo,"UmaApi",()=>ta);var ea={},eE={};D(eE,"ActionLogs",()=>eu);class eu{constructor(e){this.apiClient=e,g(N)(this)}getActionLogs(e,t){return this.apiClient.request({...t,url:"/v1/action-logs/list",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}}var el={};D(el,"ApiKeys",()=>eR);class eR{constructor(e){this.apiClient=e,g(N)(this)}deleteMany(e,t){return this.apiClient.request({...t,url:"/v1/b2b/api-keys",method:"DELETE",data:e,secure:!0,contentType:R.Json})}getById(e,t){return this.apiClient.request({...t,url:`/v1/b2b/api-keys/${e}`,method:"GET",secure:!0,responseType:"json"})}create(e,t){return this.apiClient.request({...t,url:"/v2/b2b/api-keys",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}get(e,t){return this.apiClient.request({...t,url:"/v2/b2b/api-keys/list",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}update(e,t,s){return this.apiClient.request({...s,url:`/v2/b2b/api-keys/${e}`,method:"PUT",data:t,secure:!0,contentType:R.Json,responseType:"json"})}}var eT={};D(eT,"AuthApps",()=>e_);class e_{constructor(e){this.apiClient=e,g(N)(this)}get(e){return this.apiClient.request({...e,url:"/v1/auth-apps",method:"GET",secure:!0,responseType:"json"})}deleteMany(e,t){return this.apiClient.request({...t,url:"/v1/auth-apps",method:"DELETE",data:e,secure:!0,contentType:R.Json})}getRegistrationQr(e,t){return this.apiClient.request({...t,url:"/v1/auth-apps/totp/registration/qr",method:"POST",data:e,secure:!0,contentType:R.Json})}finishRegistration(e,t){return this.apiClient.request({...t,url:"/v1/auth-apps/totp/registration/response",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}getLoginChallenge(e,t){return this.apiClient.request({...t,url:"/v1/auth-apps/webauthn/login/request",method:"POST",data:e,contentType:R.Json,responseType:"json"})}getRegisterChallenge(e){return this.apiClient.request({...e,url:"/v1/auth-apps/webauthn/registration/request",method:"POST",secure:!0,responseType:"json"})}finishCredentialRegistration(e,t){return this.apiClient.request({...t,url:"/v1/auth-apps/webauthn/registration/response",method:"POST",data:e,secure:!0,contentType:R.Json})}register(e,t){return this.apiClient.request({...t,url:"/v1/auth-apps/yubico/otp/registration",method:"POST",data:e,secure:!0,contentType:R.Json})}update(e,t,s){return this.apiClient.request({...s,url:`/v1/auth-apps/${e}`,method:"PUT",data:t,secure:!0,contentType:R.Json,responseType:"json"})}}var ep={};D(ep,"AuthForms",()=>ec);class ec{constructor(e){this.apiClient=e,g(N)(this)}create(e,t){return this.apiClient.request({...t,url:"/v1/auth-forms",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}deleteMany(e,t){return this.apiClient.request({...t,url:"/v1/auth-forms",method:"DELETE",data:e,secure:!0,contentType:R.Json})}get(e,t){return this.apiClient.request({...t,url:"/v1/auth-forms/list",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}getBySlug(e,t){return this.apiClient.request({...t,url:`/v1/auth-forms/public/${e}`,method:"GET",responseType:"json"})}getById(e,t){return this.apiClient.request({...t,url:`/v1/auth-forms/${e}`,method:"GET",secure:!0,responseType:"json"})}update(e,t,s){return this.apiClient.request({...s,url:`/v1/auth-forms/${e}`,method:"PUT",data:t,secure:!0,contentType:R.Json,responseType:"json"})}}var ed={};D(ed,"B2BAuth",()=>eh);class eh{constructor(e){this.apiClient=e,g(N)(this)}getCurrent(e){return this.apiClient.request({...e,url:"/v1/auth/b2b/current",method:"GET",secure:!0,responseType:"json"})}apiKeysLogin(e,t){return this.apiClient.request({...t,url:"/v1/auth/b2b/login/api-keys",method:"POST",data:e,contentType:R.Json,responseType:"json"})}basicLogin(e,t,s){return this.apiClient.request({...s,url:"/v1/auth/b2b/login/basic",method:"POST",data:e,headers:t,contentType:R.Json,responseType:"json"})}logout(e,t){return this.apiClient.request({...t,url:"/v1/auth/b2b/logout",method:"DELETE",data:e,contentType:R.Json})}refreshTokens(e,t){return this.apiClient.request({...t,url:"/v1/auth/b2b/refresh",method:"POST",data:e,contentType:R.Json,responseType:"json"})}resetPassword(e,t,s){return this.apiClient.request({...s,url:"/v1/auth/b2b/reset-password",method:"PUT",data:e,headers:t,contentType:R.Json,responseType:"json"})}sendMfaCode(e,t){return this.apiClient.request({...t,url:"/v1/auth/b2b/send-mfa-code",method:"PUT",data:e,contentType:R.Json})}sendResetPasswordCode(e,t){return this.apiClient.request({...t,url:"/v1/auth/b2b/send-reset-password-code",method:"PUT",data:e,contentType:R.Json})}}var eO={};D(eO,"B2BUsers",()=>eI);class eI{constructor(e){this.apiClient=e,g(N)(this)}deleteMany(e,t){return this.apiClient.request({...t,url:"/v1/users/b2b",method:"DELETE",data:e,secure:!0,contentType:R.Json})}getById(e,t){return this.apiClient.request({...t,url:`/v1/users/b2b/${e}`,method:"GET",secure:!0,responseType:"json"})}create(e,t){return this.apiClient.request({...t,url:"/v2/users/b2b",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}get(e,t){return this.apiClient.request({...t,url:"/v2/users/b2b/list",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}update(e,t,s){return this.apiClient.request({...s,url:`/v2/users/b2b/${e}`,method:"PUT",data:t,secure:!0,contentType:R.Json,responseType:"json"})}}var eS={};D(eS,"B2BUserSettings",()=>eC);class eC{constructor(e){this.apiClient=e,g(N)(this)}setUserSettings(e,t,s){return this.apiClient.request({...s,url:"/v1/b2b/settings",method:"PUT",data:e,secure:!0,headers:t,contentType:R.Json,responseType:"json"})}uploadAvatar(e,t){return this.apiClient.request({...t,url:"/v1/b2b/settings/avatar",method:"PUT",data:e,secure:!0,contentType:R.FormData})}sendContactChangeCode(e,t,s){return this.apiClient.request({...s,url:"/v1/b2b/settings/codes",method:"POST",data:e,secure:!0,headers:t,contentType:R.Json})}}var eN={};D(eN,"B2CAuth",()=>eA);class eA{constructor(e){this.apiClient=e,g(N)(this)}getCurrent(e){return this.apiClient.request({...e,url:"/v1/auth/b2c/current",method:"GET",secure:!0,responseType:"json"})}initAppleLogin(e,t,s){return this.apiClient.request({...s,url:"/v1/auth/b2c/login/apple",method:"POST",data:e,headers:t,responseType:"json"})}finishAppleLogin(e,t){return this.apiClient.request({...t,url:"/v1/auth/b2c/login/apple/callback",method:"POST",data:e,responseType:"json"})}basicLogin(e,t,s){return this.apiClient.request({...s,url:"/v1/auth/b2c/login/basic",method:"POST",data:e,headers:t,contentType:R.Json,responseType:"json"})}initGoogleLogin(e,t,s){return this.apiClient.request({...s,url:"/v1/auth/b2c/login/google",method:"POST",data:e,headers:t,responseType:"json"})}finishGoogleLogin(e,t){return this.apiClient.request({...t,url:"/v1/auth/b2c/login/google/callback",method:"POST",data:e,responseType:"json"})}logout(e,t){return this.apiClient.request({...t,url:"/v1/auth/b2c/logout",method:"DELETE",data:e,contentType:R.Json})}refreshTokens(e,t,s){return this.apiClient.request({...s,url:"/v1/auth/b2c/refresh",method:"POST",data:e,headers:t,contentType:R.Json,responseType:"json"})}register(e,t,s){return this.apiClient.request({...s,url:"/v1/auth/b2c/register",method:"POST",data:e,headers:t,contentType:R.Json,responseType:"json"})}resetPassword(e,t,s){return this.apiClient.request({...s,url:"/v1/auth/b2c/reset-password",method:"PUT",data:e,headers:t,contentType:R.Json})}sendMfaCode(e,t,s){return this.apiClient.request({...s,url:"/v1/auth/b2c/send-mfa-code",method:"PUT",data:e,headers:t,contentType:R.Json})}sendResetPasswordCode(e,t){return this.apiClient.request({...t,url:"/v1/auth/b2c/send-reset-password-code",method:"PUT",data:e,contentType:R.Json})}sendVerificationCode(e,t,s){return this.apiClient.request({...s,url:"/v1/auth/b2c/send-verification-code",method:"PUT",data:e,headers:t,contentType:R.Json})}verifyContact(e,t,s){return this.apiClient.request({...s,url:"/v1/auth/b2c/verify",method:"PUT",data:e,headers:t,contentType:R.Json})}}var ey={};D(ey,"B2CUsers",()=>em);class em{constructor(e){this.apiClient=e,g(N)(this)}create(e,t){return this.apiClient.request({...t,url:"/v1/users/b2c",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}deleteMany(e,t){return this.apiClient.request({...t,url:"/v1/users/b2c",method:"DELETE",data:e,secure:!0,contentType:R.Json})}getById(e,t){return this.apiClient.request({...t,url:`/v1/users/b2c/${e}`,method:"GET",secure:!0,responseType:"json"})}update(e,t,s){return this.apiClient.request({...s,url:`/v1/users/b2c/${e}`,method:"PUT",data:t,secure:!0,contentType:R.Json,responseType:"json"})}get(e,t){return this.apiClient.request({...t,url:"/v2/users/b2c/list",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}}var eP={};D(eP,"B2CUserSettings",()=>eL);class eL{constructor(e){this.apiClient=e,g(N)(this)}setUserSettings(e,t,s){return this.apiClient.request({...s,url:"/v1/b2c/settings",method:"PUT",data:e,secure:!0,headers:t,contentType:R.Json,responseType:"json"})}sendContactChangeCode(e,t,s){return this.apiClient.request({...s,url:"/v1/b2c/settings/codes",method:"POST",data:e,secure:!0,headers:t,contentType:R.Json})}availableMfaOptions(e,t){return this.apiClient.request({...t,url:"/v1/b2c/settings/mfa-options",method:"GET",secure:!0,headers:e,responseType:"json"})}deleteManyOAuthBindings(e,t){return this.apiClient.request({...t,url:"/v1/b2c/settings/oauth-links",method:"DELETE",data:e,secure:!0,contentType:R.Json})}finishAppleProfileLinking(e,t){return this.apiClient.request({...t,url:"/v1/b2c/settings/oauth-links/apple/finish",method:"POST",data:e,contentType:R.Json})}initAppleProfileLinking(e,t){return this.apiClient.request({...t,url:"/v1/b2c/settings/oauth-links/apple/start",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}finishGoogleProfileLinking(e,t){return this.apiClient.request({...t,url:"/v1/b2c/settings/oauth-links/google/finish",method:"POST",data:e,contentType:R.Json})}initGoogleProfileLinking(e,t){return this.apiClient.request({...t,url:"/v1/b2c/settings/oauth-links/google/start",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}getOAuthBindings(e,t){return this.apiClient.request({...t,url:"/v1/b2c/settings/oauth-links/list",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}}var eD={};D(eD,"Branches",()=>eg);class eg{constructor(e){this.apiClient=e,g(N)(this)}create(e,t){return this.apiClient.request({...t,url:"/v1/branches",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}deleteMany(e,t){return this.apiClient.request({...t,url:"/v1/branches",method:"DELETE",data:e,secure:!0,contentType:R.Json})}getById(e,t){return this.apiClient.request({...t,url:`/v1/branches/${e}`,method:"GET",secure:!0,responseType:"json"})}update(e,t,s){return this.apiClient.request({...s,url:`/v1/branches/${e}`,method:"PUT",data:t,secure:!0,contentType:R.Json,responseType:"json"})}get(e,t){return this.apiClient.request({...t,url:"/v2/branches/list",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}}var eU={};D(eU,"Countries",()=>ev);class ev{constructor(e){this.apiClient=e,g(N)(this)}get(e){return this.apiClient.request({...e,url:"/v1/countries",method:"GET",responseType:"json"})}}var eM={};D(eM,"Endpoints",()=>eb);class eb{constructor(e){this.apiClient=e,g(N)(this)}create(e,t){return this.apiClient.request({...t,url:"/v1/b2b/endpoints",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}deleteMany(e,t){return this.apiClient.request({...t,url:"/v1/b2b/endpoints",method:"DELETE",data:e,secure:!0,contentType:R.Json})}getById(e,t){return this.apiClient.request({...t,url:`/v1/b2b/endpoints/${e}`,method:"GET",secure:!0,responseType:"json"})}update(e,t,s){return this.apiClient.request({...s,url:`/v1/b2b/endpoints/${e}`,method:"PUT",data:t,secure:!0,contentType:R.Json,responseType:"json"})}get(e,t){return this.apiClient.request({...t,url:"/v2/b2b/endpoints/list",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}}var ef={};D(ef,"Firms",()=>eq);class eq{constructor(e){this.apiClient=e,g(N)(this)}create(e,t){return this.apiClient.request({...t,url:"/v1/firms",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}deleteMany(e,t){return this.apiClient.request({...t,url:"/v1/firms",method:"DELETE",data:e,secure:!0,contentType:R.Json})}getById(e,t){return this.apiClient.request({...t,url:`/v1/firms/${e}`,method:"GET",secure:!0,responseType:"json"})}update(e,t,s){return this.apiClient.request({...s,url:`/v1/firms/${e}`,method:"PUT",data:t,secure:!0,contentType:R.Json,responseType:"json"})}get(e,t){return this.apiClient.request({...t,url:"/v2/firms/list",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}}var ew={};D(ew,"IdentityProviders",()=>eB);class eB{constructor(e){this.apiClient=e,g(N)(this)}create(e,t){return this.apiClient.request({...t,url:"/v1/b2b/identity-providers",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}deleteMany(e,t){return this.apiClient.request({...t,url:"/v1/b2b/identity-providers",method:"DELETE",data:e,secure:!0,contentType:R.Json})}getById(e,t){return this.apiClient.request({...t,url:`/v1/b2b/identity-providers/${e}`,method:"GET",secure:!0,responseType:"json"})}update(e,t,s){return this.apiClient.request({...s,url:`/v1/b2b/identity-providers/${e}`,method:"PUT",data:t,secure:!0,contentType:R.Json,responseType:"json"})}get(e,t){return this.apiClient.request({...t,url:"/v2/b2b/identity-providers/list",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}}var eG={};D(eG,"Locales",()=>ek);class ek{constructor(e){this.apiClient=e,g(N)(this)}get(e){return this.apiClient.request({...e,url:"/v1/locales",method:"GET",responseType:"json"})}}var eF={};D(eF,"Microservices",()=>ej);class ej{constructor(e){this.apiClient=e,g(N)(this)}create(e,t){return this.apiClient.request({...t,url:"/v1/b2b/microservices",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}deleteMany(e,t){return this.apiClient.request({...t,url:"/v1/b2b/microservices",method:"DELETE",data:e,secure:!0,contentType:R.Json})}getById(e,t){return this.apiClient.request({...t,url:`/v1/b2b/microservices/${e}`,method:"GET",secure:!0,responseType:"json"})}update(e,t,s){return this.apiClient.request({...s,url:`/v1/b2b/microservices/${e}`,method:"PUT",data:t,secure:!0,contentType:R.Json,responseType:"json"})}get(e,t){return this.apiClient.request({...t,url:"/v2/b2b/microservices/list",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}}var eJ={};D(eJ,"MigrationUtils",()=>eY);class eY{constructor(e){this.apiClient=e,g(N)(this)}usersUpsertCreate(e,t){return this.apiClient.request({...t,url:"/v1/migration-utils/users/upsert",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}}var eV={};D(eV,"Permissions",()=>eH);class eH{constructor(e){this.apiClient=e,g(N)(this)}create(e,t){return this.apiClient.request({...t,url:"/v1/permissions",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}deleteMany(e,t){return this.apiClient.request({...t,url:"/v1/permissions",method:"DELETE",data:e,secure:!0,contentType:R.Json})}getById(e,t){return this.apiClient.request({...t,url:`/v1/permissions/${e}`,method:"GET",secure:!0,responseType:"json"})}update(e,t,s){return this.apiClient.request({...s,url:`/v1/permissions/${e}`,method:"PUT",data:t,secure:!0,contentType:R.Json,responseType:"json"})}get(e,t){return this.apiClient.request({...t,url:"/v2/permissions/list",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}}var eW={};D(eW,"PublicSettings",()=>ex);class ex{constructor(e){this.apiClient=e,g(N)(this)}get(e){return this.apiClient.request({...e,url:"/v1/public-settings",method:"GET",responseType:"json"})}}var eK={};D(eK,"Roles",()=>e$);class e${constructor(e){this.apiClient=e,g(N)(this)}create(e,t){return this.apiClient.request({...t,url:"/v1/roles",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}deleteMany(e,t){return this.apiClient.request({...t,url:"/v1/roles",method:"DELETE",data:e,secure:!0,contentType:R.Json})}getById(e,t){return this.apiClient.request({...t,url:`/v1/roles/${e}`,method:"GET",secure:!0,responseType:"json"})}update(e,t,s){return this.apiClient.request({...s,url:`/v1/roles/${e}`,method:"PUT",data:t,secure:!0,contentType:R.Json,responseType:"json"})}get(e,t){return this.apiClient.request({...t,url:"/v2/roles/list",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}}var eQ={};D(eQ,"RoleTypes",()=>eX);class eX{constructor(e){this.apiClient=e,g(N)(this)}create(e,t){return this.apiClient.request({...t,url:"/v1/b2b/role-types",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}deleteMany(e,t){return this.apiClient.request({...t,url:"/v1/b2b/role-types",method:"DELETE",data:e,secure:!0,contentType:R.Json})}getById(e,t){return this.apiClient.request({...t,url:`/v1/b2b/role-types/${e}`,method:"GET",secure:!0,responseType:"json"})}update(e,t,s){return this.apiClient.request({...s,url:`/v1/b2b/role-types/${e}`,method:"PUT",data:t,secure:!0,contentType:R.Json,responseType:"json"})}get(e,t){return this.apiClient.request({...t,url:"/v2/b2b/role-types/list",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}}var ez={};D(ez,"SecretNotes",()=>eZ);class eZ{constructor(e){this.apiClient=e,g(N)(this)}create(e,t){return this.apiClient.request({...t,url:"/v1/secret-notes",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}getOne(e,t){return this.apiClient.request({...t,url:"/v1/secret-notes/fetch",method:"POST",data:e,contentType:R.Json,responseType:"json"})}sendVerificationCode(e,t){return this.apiClient.request({...t,url:"/v1/secret-notes/verification",method:"PUT",data:e,contentType:R.Json})}}var e0={};D(e0,"Sessions",()=>e1);class e1{constructor(e){this.apiClient=e,g(N)(this)}getCurrentUserSessions(e){return this.apiClient.request({...e,url:"/v1/auth/sessions",method:"GET",secure:!0,responseType:"json"})}deleteCurrentUserSessions(e,t){return this.apiClient.request({...t,url:"/v1/auth/sessions",method:"DELETE",data:e,secure:!0,contentType:R.Json})}}var e2={};D(e2,"TablePresets",()=>e4);class e4{constructor(e){this.apiClient=e,g(N)(this)}getUserPresets(e){return this.apiClient.request({...e,url:"/v1/b2b/table-presets",method:"GET",secure:!0,responseType:"json"})}upsert(e,t){return this.apiClient.request({...t,url:"/v1/b2b/table-presets",method:"PUT",data:e,secure:!0,contentType:R.Json,responseType:"json"})}}var e3={};D(e3,"Tags",()=>e5);class e5{constructor(e){this.apiClient=e,g(N)(this)}create(e,t){return this.apiClient.request({...t,url:"/v1/tags",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}deleteMany(e,t){return this.apiClient.request({...t,url:"/v1/tags",method:"DELETE",data:e,secure:!0,contentType:R.Json})}get(e,t){return this.apiClient.request({...t,url:"/v1/tags/list",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}getById(e,t){return this.apiClient.request({...t,url:`/v1/tags/${e}`,method:"GET",secure:!0,responseType:"json"})}update(e,t,s){return this.apiClient.request({...s,url:`/v1/tags/${e}`,method:"PUT",data:t,secure:!0,contentType:R.Json,responseType:"json"})}}var e6={};D(e6,"CommontypesAuthAppType",()=>T),D(e6,"CommontypesAuthUserType",()=>_),D(e6,"CommontypesResetPasswordType",()=>p),D(e6,"HttperrorsErrorCode",()=>c),D(e6,"MfaOption",()=>d),D(e6,"PgmodelsAuthProviderAppType",()=>h),D(e6,"PgmodelsEndpointType",()=>O),D(e6,"PgmodelsEntityAccessType",()=>I),D(e6,"PgmodelsPermissionAG",()=>S),D(e6,"TypesTenantSettingLabel",()=>C),(t=T||(T={})).EmailCodeAuthAppType="email_code",t.SmsCodeAuthAppType="sms_code",t.YubicoOTPAuthAppType="yubico_otp",t.WebAuthnAuthAppType="webauthn",t.TOTPAuthAppType="totp",(s=_||(_={})).AllAuthUserType="all",s.B2BAuthUserType="b2b",s.B2CAuthUserType="b2c",(r=p||(p={})).PasswordResetByContactCode="by_contact_code",r.PasswordResetByEmailLink="by_email_link",(n=c||(c={}))[n.JSONValidationErr=4e3]="JSONValidationErr",n[n.JSONReadErr=4001]="JSONReadErr",n[n.JSONParseErr=4002]="JSONParseErr",n[n.ForbiddenErr=4003]="ForbiddenErr",n[n.ForbiddenDueLimit=4030]="ForbiddenDueLimit",n[n.RecordNotFoundErr=4004]="RecordNotFoundErr",n[n.RecordAlreadyExistsErr=4005]="RecordAlreadyExistsErr",n[n.ImageValidationErr=4006]="ImageValidationErr",n[n.InappropriateImageErr=4007]="InappropriateImageErr",n[n.FaceNotFoundOnImageErr=4008]="FaceNotFoundOnImageErr",n[n.UnauthorizedErr=4010]="UnauthorizedErr",n[n.TokenRevokedErr=4012]="TokenRevokedErr",n[n.TokenNotActiveErr=4013]="TokenNotActiveErr",n[n.EmailNotVerifiedErr=4015]="EmailNotVerifiedErr",n[n.TokenParsingErr=4016]="TokenParsingErr",n[n.PhoneNotVerifiedErr=4017]="PhoneNotVerifiedErr",n[n.UUIDParseErr=4026]="UUIDParseErr",n[n.InvalidEmailOrPasswordOrTypeErr=4028]="InvalidEmailOrPasswordOrTypeErr",n[n.InvalidMfaCodeErr=4128]="InvalidMfaCodeErr",n[n.MfaRequiredErr=4228]="MfaRequiredErr",n[n.TokenVerificationErr=4328]="TokenVerificationErr",n[n.InvalidAPIKeyOrSecretErr=4428]="InvalidAPIKeyOrSecretErr",n[n.MfaAddingNotAllowedErr=4528]="MfaAddingNotAllowedErr",n[n.BranchRequestNotAllowed=4103]="BranchRequestNotAllowed",n[n.ForbiddenForUserTypeErr=4203]="ForbiddenForUserTypeErr",n[n.SecondForbiddenErr=4031]="SecondForbiddenErr",n[n.ThirdForbiddenErr=4032]="ThirdForbiddenErr",n[n.EntitiesChoiceNotAllowed=4303]="EntitiesChoiceNotAllowed",n[n.RecaptchaErr=4403]="RecaptchaErr",n[n.UpdateOfOldEntityStateErr=4503]="UpdateOfOldEntityStateErr",n[n.ChiefadminMutationErr=4603]="ChiefadminMutationErr",n[n.ChildEntitiesExistErr=4703]="ChildEntitiesExistErr",n[n.TenantActionForbiddenErr=4803]="TenantActionForbiddenErr",n[n.RBACManipulationErr=4903]="RBACManipulationErr",n[n.YubicoMaxKeysLimitReachedErr=4113]="YubicoMaxKeysLimitReachedErr",n[n.ConflictErr=4090]="ConflictErr",n[n.SecondFieldConflictErr=4091]="SecondFieldConflictErr",n[n.ThirdFieldConflictErr=4092]="ThirdFieldConflictErr",n[n.FourthFieldConflictErr=4093]="FourthFieldConflictErr",n[n.FifthFieldConflictErr=4094]="FifthFieldConflictErr",n[n.SixthFieldConflictErr=4095]="SixthFieldConflictErr",n[n.GoneErr=4100]="GoneErr",n[n.SecondGoneErr=4101]="SecondGoneErr",n[n.UnprocessableEntity=4222]="UnprocessableEntity",n[n.TooEarlyDuplicateRequest=4250]="TooEarlyDuplicateRequest",n[n.RateLimitErr=4291]="RateLimitErr",n[n.ForbiddenByFirmsStatusErr=4292]="ForbiddenByFirmsStatusErr",n[n.NotAcceptableError=4600]="NotAcceptableError",n[n.InternalServerErr=5e3]="InternalServerErr",n[n.InvalidRequest=6e3]="InvalidRequest",(i=d||(d={})).SmsMfaOption="sms",i.EmailMfaOption="email",i.VoiceMfaOption="voice",i.WebAuthnMfaOption="webauthn",i.YubicoOTPMfaOption="yubico_otp",i.TOTPMfaOption="totp",(o=h||(h={})).GoogleOAuth2Provider="google-oauth2",o.AppleIDOAuth2Provider="apple-id",(a=O||(O={})).RegularEndpoint="regular",a.DisplayOnlyEndpoint="display_only",(E=I||(I={})).GranularEntityAccessType="granular",E.HighLevelEntityAccessType="high-level",(u=S||(S={})).ChiefadminPermissionAG="chiefadmin",u.SuperadminPermissionAG="superadmin",u.B2BOnlyPermissionAG="b2b_only",u.RegularPermissionAG="regular",(l=C||(C={})).StorePasswordHistoryForDays="store_password_history_for_days",l.ResetPasswordIfUserInactiveForDays="reset_password_if_user_inactive_for_days",l.PeriodicallyResetPasswordAfterDays="periodically_reset_password_after_days";var e9={};D(e9,"UserDetails",()=>e8);class e8{constructor(e){this.apiClient=e,g(N)(this)}getUserDetails(e,t){return this.apiClient.request({...t,url:"/v1/users/details/show",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}revokeSessions(e,t){return this.apiClient.request({...t,url:"/v1/users/revoke-sessions",method:"POST",data:e,secure:!0,contentType:R.Json})}}var e7={};D(e7,"UsersCommon",()=>te);class te{constructor(e){this.apiClient=e,g(N)(this)}linkWatchmenUsersToUma(e,t){return this.apiClient.request({...t,url:"/v1/users/watchmen/link",method:"POST",data:e,secure:!0,contentType:R.Json})}}var tt={};D(tt,"WatchmenAuth",()=>ts);class ts{constructor(e){this.apiClient=e,g(N)(this)}generateWatchmenAuthToken(e){return this.apiClient.request({...e,url:"/v1/auth/watchmen/authentication-tokens",method:"POST",secure:!0,responseType:"json"})}verifyWatchmenAuthToken(e,t){return this.apiClient.request({...t,url:"/v1/auth/watchmen/authentication-tokens/verify",method:"PUT",data:e,secure:!0,contentType:R.Json,responseType:"json"})}}var tr={};D(tr,"WatchmenInstances",()=>tn);class tn{constructor(e){this.apiClient=e,g(N)(this)}create(e,t){return this.apiClient.request({...t,url:"/v1/watchmen-instances",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}deleteMany(e,t){return this.apiClient.request({...t,url:"/v1/watchmen-instances",method:"DELETE",data:e,secure:!0,contentType:R.Json})}getMany(e,t){return this.apiClient.request({...t,url:"/v1/watchmen-instances/list",method:"POST",data:e,secure:!0,contentType:R.Json,responseType:"json"})}getById(e,t){return this.apiClient.request({...t,url:`/v1/watchmen-instances/${e}`,method:"GET",secure:!0,responseType:"json"})}update(e,t,s){return this.apiClient.request({...s,url:`/v1/watchmen-instances/${e}`,method:"PUT",data:t,secure:!0,contentType:R.Json,responseType:"json"})}}L(ea,eE),L(ea,el),L(ea,eT),L(ea,ep),L(ea,ed),L(ea,eO),L(ea,eS),L(ea,eN),L(ea,ey),L(ea,eP),L(ea,eD),L(ea,eU),L(ea,eM),L(ea,ef),L(ea,ew),L(ea,eG),L(ea,eF),L(ea,eJ),L(ea,eV),L(ea,eW),L(ea,eK),L(ea,eQ),L(ea,ez),L(ea,e0),L(ea,e2),L(ea,e3),L(ea,e6),L(ea,e9),L(ea,e7),L(ea,tt),L(ea,tr);class ti extends eh{async basicLogin(e,t,s){let r=await super.basicLogin(e,t,s);return r.success&&(this.apiClient.setAuthData({accessToken:r.data.login_basic?.tokens?.access_token??"",refreshToken:r.data.login_basic?.tokens?.refresh_token??""}),this.apiClient.scheduleTokenRenewal(this.renewToken)),r}async renewToken(){let e=this.apiClient.getAuthData()?.refreshToken;if(!e)throw Error("Refresh token not found");let t=await this.refreshTokens({refresh_token:e});if(t.success)return{accessToken:t.data.login_basic?.tokens?.access_token??"",refreshToken:t.data.login_basic?.tokens?.refresh_token??""};throw Error(`Could not renew token: ${String(t.error)}`)}}class to extends eA{async basicLogin(e,t,s){let r=await super.basicLogin(e,t,s);return r.success&&(this.apiClient.setAuthData({accessToken:r.data.login_basic?.tokens?.access_token??"",refreshToken:r.data.login_basic?.tokens?.refresh_token??""}),this.apiClient.scheduleTokenRenewal(this.renewToken)),r}async renewToken(){let e=this.apiClient.getAuthData()?.refreshToken;if(!e)throw Error("Refresh token not found");let t=await this.refreshTokens({refresh_token:e,auth_form_slug:this.apiClient.getConfig().authFormSlug});if(t.success)return{accessToken:t.data.login_basic?.tokens?.access_token??"",refreshToken:t.data.login_basic?.tokens?.refresh_token??""};throw Error(`Could not renew token: ${String(t.error)}`)}}class ta extends M{constructor(e){super(new f(e)),this.actionLog=new eu(this.apiClient),this.apiKeys=new eR(this.apiClient),this.authApps=new e_(this.apiClient),this.authForms=new ec(this.apiClient),this.b2bAuth=new ti(this.apiClient),this.b2bUsers=new eI(this.apiClient),this.b2bUserSettings=new eC(this.apiClient),this.b2cAuth=new to(this.apiClient),this.b2cUsers=new em(this.apiClient),this.b2cUserSettings=new eL(this.apiClient),this.branches=new eg(this.apiClient),this.countries=new ev(this.apiClient),this.endpoints=new eb(this.apiClient),this.fims=new eq(this.apiClient),this.identityProviders=new eB(this.apiClient),this.locales=new ek(this.apiClient),this.microservices=new ej(this.apiClient),this.migrationUtils=new eY(this.apiClient),this.permissions=new eH(this.apiClient),this.publicSettings=new ex(this.apiClient),this.roles=new e$(this.apiClient),this.roleTypes=new eX(this.apiClient),this.secretNotes=new eZ(this.apiClient),this.sessions=new e1(this.apiClient),this.tablePresets=new e4(this.apiClient),this.tags=new e5(this.apiClient),this.userDetails=new e8(this.apiClient),this.usersCommon=new te(this.apiClient),this.watchmenAuth=new ts(this.apiClient),this.watchmenInstances=new tn(this.apiClient)}}L(ei,eo),L(ei,ea),L(module.exports,U),L(module.exports,ee),L(module.exports,ei);
|
|
2
|
+
//# sourceMappingURL=index.js.map
|