snaptrade-typescript-sdk 3.0.0 → 4.0.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.
Files changed (401) hide show
  1. package/.konfig/generate-id.txt +1 -1
  2. package/.konfigignore +3 -1
  3. package/README.md +107 -23
  4. package/api/account-information-api.ts +1075 -0
  5. package/api/api-disclaimer-api.ts +190 -0
  6. package/api/api-status-api.ts +128 -0
  7. package/api/authentication-api.ts +591 -0
  8. package/api/connections-api.ts +425 -0
  9. package/api/error-logs-api.ts +175 -0
  10. package/api/options-api.ts +758 -0
  11. package/api/portfolio-management-api.ts +3402 -0
  12. package/api/reference-data-api.ts +1076 -0
  13. package/api/trading-api.ts +1339 -0
  14. package/api/transactions-and-reporting-api.ts +391 -0
  15. package/api.ts +12 -11530
  16. package/base.ts +1 -2
  17. package/client.ts +55 -0
  18. package/common.ts +16 -54
  19. package/configuration.ts +33 -10
  20. package/dist/api/account-information-api.d.ts +525 -0
  21. package/dist/api/account-information-api.js +1049 -0
  22. package/dist/api/api-disclaimer-api.d.ts +102 -0
  23. package/dist/api/api-disclaimer-api.js +245 -0
  24. package/dist/api/api-status-api.d.ts +70 -0
  25. package/dist/api/api-status-api.js +203 -0
  26. package/dist/api/authentication-api.d.ts +280 -0
  27. package/dist/api/authentication-api.js +659 -0
  28. package/dist/api/connections-api.d.ts +214 -0
  29. package/dist/api/connections-api.js +470 -0
  30. package/dist/api/error-logs-api.d.ts +94 -0
  31. package/dist/api/error-logs-api.js +240 -0
  32. package/dist/api/options-api.d.ts +381 -0
  33. package/dist/api/options-api.js +728 -0
  34. package/dist/api/portfolio-management-api.d.ts +1624 -0
  35. package/dist/api/portfolio-management-api.js +3574 -0
  36. package/dist/api/reference-data-api.d.ts +481 -0
  37. package/dist/api/reference-data-api.js +1244 -0
  38. package/dist/api/trading-api.d.ts +662 -0
  39. package/dist/api/trading-api.js +1276 -0
  40. package/dist/api/transactions-and-reporting-api.d.ts +204 -0
  41. package/dist/api/transactions-and-reporting-api.js +387 -0
  42. package/dist/api.d.ts +12 -7363
  43. package/dist/api.js +24 -9175
  44. package/dist/base.d.ts +1 -1
  45. package/dist/base.js +1 -2
  46. package/dist/client.d.ts +27 -0
  47. package/dist/client.js +34 -0
  48. package/dist/common.d.ts +1 -6
  49. package/dist/common.js +26 -81
  50. package/dist/configuration.d.ts +21 -6
  51. package/dist/configuration.js +13 -8
  52. package/dist/index.d.ts +3 -1
  53. package/dist/index.js +3 -2
  54. package/dist/index.test.js +84 -14
  55. package/dist/jest.config.js +0 -1
  56. package/dist/models/account-holdings.d.ts +47 -0
  57. package/dist/models/account-holdings.js +15 -0
  58. package/dist/models/account-order-record-status.d.ts +39 -0
  59. package/dist/models/account-order-record-status.js +43 -0
  60. package/dist/models/account-order-record.d.ts +126 -0
  61. package/dist/models/account-order-record.js +15 -0
  62. package/dist/models/account-simple.d.ts +37 -0
  63. package/dist/models/account-simple.js +15 -0
  64. package/dist/models/account.d.ts +76 -0
  65. package/dist/models/account.js +15 -0
  66. package/dist/models/action.d.ts +21 -0
  67. package/dist/models/action.js +25 -0
  68. package/dist/models/apidisclaimer-accept-request.d.ts +24 -0
  69. package/dist/models/apidisclaimer-accept-request.js +15 -0
  70. package/dist/models/authentication-login-snap-trade-user200-response.d.ts +18 -0
  71. package/dist/models/authentication-login-snap-trade-user200-response.js +15 -0
  72. package/dist/models/balance.d.ts +32 -0
  73. package/dist/models/balance.js +15 -0
  74. package/dist/models/brokerage-authorization-type-read-only-brokerage.d.ts +37 -0
  75. package/dist/models/brokerage-authorization-type-read-only-brokerage.js +15 -0
  76. package/dist/models/brokerage-authorization-type-read-only.d.ts +56 -0
  77. package/dist/models/brokerage-authorization-type-read-only.js +26 -0
  78. package/dist/models/brokerage-authorization-type.d.ts +30 -0
  79. package/dist/models/brokerage-authorization-type.js +20 -0
  80. package/dist/models/brokerage-authorization.d.ts +76 -0
  81. package/dist/models/brokerage-authorization.js +15 -0
  82. package/dist/models/brokerage-symbol.d.ts +51 -0
  83. package/dist/models/brokerage-symbol.js +15 -0
  84. package/dist/models/brokerage-type.d.ts +31 -0
  85. package/dist/models/brokerage-type.js +15 -0
  86. package/dist/models/brokerage.d.ts +128 -0
  87. package/dist/models/brokerage.js +15 -0
  88. package/dist/models/calculated-trade.d.ts +32 -0
  89. package/dist/models/calculated-trade.js +15 -0
  90. package/dist/models/cash-restriction.d.ts +54 -0
  91. package/dist/models/cash-restriction.js +20 -0
  92. package/dist/models/currency.d.ts +37 -0
  93. package/dist/models/currency.js +15 -0
  94. package/dist/models/delete-user-response.d.ts +31 -0
  95. package/dist/models/delete-user-response.js +15 -0
  96. package/dist/models/dividend-at-date.d.ts +37 -0
  97. package/dist/models/dividend-at-date.js +15 -0
  98. package/dist/models/encrypted-response-encrypted-message-data.d.ts +37 -0
  99. package/dist/models/encrypted-response-encrypted-message-data.js +15 -0
  100. package/dist/models/encrypted-response.d.ts +31 -0
  101. package/dist/models/encrypted-response.js +15 -0
  102. package/dist/models/exchange-rate-pairs.d.ts +38 -0
  103. package/dist/models/exchange-rate-pairs.js +15 -0
  104. package/dist/models/exchange.d.ts +67 -0
  105. package/dist/models/exchange.js +15 -0
  106. package/dist/models/excluded-asset.d.ts +26 -0
  107. package/dist/models/excluded-asset.js +15 -0
  108. package/dist/models/index.d.ts +102 -0
  109. package/dist/models/index.js +118 -0
  110. package/dist/models/jwt.d.ts +25 -0
  111. package/dist/models/jwt.js +15 -0
  112. package/dist/models/login-redirect-uri.d.ts +30 -0
  113. package/dist/models/login-redirect-uri.js +15 -0
  114. package/dist/models/manual-trade-and-impact.d.ts +39 -0
  115. package/dist/models/manual-trade-and-impact.js +15 -0
  116. package/dist/models/manual-trade-balance.d.ts +39 -0
  117. package/dist/models/manual-trade-balance.js +15 -0
  118. package/dist/models/manual-trade-form.d.ts +69 -0
  119. package/dist/models/manual-trade-form.js +15 -0
  120. package/dist/models/manual-trade-symbol.d.ts +56 -0
  121. package/dist/models/manual-trade-symbol.js +15 -0
  122. package/dist/models/manual-trade.d.ts +72 -0
  123. package/dist/models/manual-trade.js +15 -0
  124. package/dist/models/model-asset-class-details.d.ts +32 -0
  125. package/dist/models/model-asset-class-details.js +15 -0
  126. package/dist/models/model-asset-class-target.d.ts +26 -0
  127. package/dist/models/model-asset-class-target.js +15 -0
  128. package/dist/models/model-asset-class.d.ts +31 -0
  129. package/dist/models/model-asset-class.js +15 -0
  130. package/dist/models/model-portfolio-asset-class.d.ts +32 -0
  131. package/dist/models/model-portfolio-asset-class.js +15 -0
  132. package/dist/models/model-portfolio-details.d.ts +39 -0
  133. package/dist/models/model-portfolio-details.js +15 -0
  134. package/dist/models/model-portfolio-security.d.ts +32 -0
  135. package/dist/models/model-portfolio-security.js +15 -0
  136. package/dist/models/model-portfolio.d.ts +43 -0
  137. package/dist/models/model-portfolio.js +21 -0
  138. package/dist/models/model400-failed-request-response.d.ts +31 -0
  139. package/dist/models/model400-failed-request-response.js +15 -0
  140. package/dist/models/model401-failed-request-response.d.ts +31 -0
  141. package/dist/models/model401-failed-request-response.js +15 -0
  142. package/dist/models/model403-failed-request-response.d.ts +31 -0
  143. package/dist/models/model403-failed-request-response.js +15 -0
  144. package/dist/models/model404-failed-request-response.d.ts +31 -0
  145. package/dist/models/model404-failed-request-response.js +15 -0
  146. package/dist/models/monthly-dividends.d.ts +32 -0
  147. package/dist/models/monthly-dividends.js +15 -0
  148. package/dist/models/net-contributions.d.ts +37 -0
  149. package/dist/models/net-contributions.js +15 -0
  150. package/dist/models/net-dividend.d.ts +38 -0
  151. package/dist/models/net-dividend.js +15 -0
  152. package/dist/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.d.ts +37 -0
  153. package/dist/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.js +15 -0
  154. package/dist/models/option-chain-inner-chain-per-root-inner.d.ts +38 -0
  155. package/dist/models/option-chain-inner-chain-per-root-inner.js +15 -0
  156. package/dist/models/option-chain-inner.d.ts +50 -0
  157. package/dist/models/option-chain-inner.js +15 -0
  158. package/dist/models/option-leg.d.ts +44 -0
  159. package/dist/models/option-leg.js +22 -0
  160. package/dist/models/option-strategy-legs-inner.d.ts +42 -0
  161. package/dist/models/option-strategy-legs-inner.js +15 -0
  162. package/dist/models/option-strategy.d.ts +51 -0
  163. package/dist/models/option-strategy.js +15 -0
  164. package/dist/models/options-get-option-strategy-request.d.ts +41 -0
  165. package/dist/models/options-get-option-strategy-request.js +19 -0
  166. package/dist/models/options-holdings.d.ts +57 -0
  167. package/dist/models/options-holdings.js +15 -0
  168. package/dist/models/options-place-option-strategy-request.d.ts +48 -0
  169. package/dist/models/options-place-option-strategy-request.js +26 -0
  170. package/dist/models/options-position.d.ts +63 -0
  171. package/dist/models/options-position.js +15 -0
  172. package/dist/models/options-symbol.d.ts +86 -0
  173. package/dist/models/options-symbol.js +15 -0
  174. package/dist/models/order-type.d.ts +23 -0
  175. package/dist/models/order-type.js +27 -0
  176. package/dist/models/partner-data.d.ts +92 -0
  177. package/dist/models/partner-data.js +15 -0
  178. package/dist/models/past-value.d.ts +37 -0
  179. package/dist/models/past-value.js +15 -0
  180. package/dist/models/performance-custom.d.ts +138 -0
  181. package/dist/models/performance-custom.js +15 -0
  182. package/dist/models/portfolio-group-info.d.ts +93 -0
  183. package/dist/models/portfolio-group-info.js +15 -0
  184. package/dist/models/portfolio-group-position.d.ts +38 -0
  185. package/dist/models/portfolio-group-position.js +15 -0
  186. package/dist/models/portfolio-group-settings.d.ts +50 -0
  187. package/dist/models/portfolio-group-settings.js +15 -0
  188. package/dist/models/portfolio-group.d.ts +31 -0
  189. package/dist/models/portfolio-group.js +15 -0
  190. package/dist/models/position-symbol.d.ts +56 -0
  191. package/dist/models/position-symbol.js +15 -0
  192. package/dist/models/position.d.ts +56 -0
  193. package/dist/models/position.js +15 -0
  194. package/dist/models/redirect-tokenand-pin.d.ts +31 -0
  195. package/dist/models/redirect-tokenand-pin.js +15 -0
  196. package/dist/models/security-type.d.ts +43 -0
  197. package/dist/models/security-type.js +15 -0
  198. package/dist/models/snap-trade-apidisclaimer-accept-status.d.ts +31 -0
  199. package/dist/models/snap-trade-apidisclaimer-accept-status.js +15 -0
  200. package/dist/models/snap-trade-holdings-account.d.ts +64 -0
  201. package/dist/models/snap-trade-holdings-account.js +15 -0
  202. package/dist/models/snap-trade-holdings-total-value.d.ts +31 -0
  203. package/dist/models/snap-trade-holdings-total-value.js +15 -0
  204. package/dist/models/snap-trade-login-user-request-body.d.ts +53 -0
  205. package/dist/models/snap-trade-login-user-request-body.js +20 -0
  206. package/dist/models/snap-trade-register-user-request-body.d.ts +30 -0
  207. package/dist/models/snap-trade-register-user-request-body.js +15 -0
  208. package/dist/models/status.d.ts +37 -0
  209. package/dist/models/status.js +15 -0
  210. package/dist/models/strategy-impact-legs-inner.d.ts +61 -0
  211. package/dist/models/strategy-impact-legs-inner.js +15 -0
  212. package/dist/models/strategy-impact.d.ts +86 -0
  213. package/dist/models/strategy-impact.js +15 -0
  214. package/dist/models/strategy-order-place-orders-inner-legs-inner.d.ts +61 -0
  215. package/dist/models/strategy-order-place-orders-inner-legs-inner.js +15 -0
  216. package/dist/models/strategy-order-place-orders-inner.d.ts +278 -0
  217. package/dist/models/strategy-order-place-orders-inner.js +15 -0
  218. package/dist/models/strategy-order-place.d.ts +32 -0
  219. package/dist/models/strategy-order-place.js +15 -0
  220. package/dist/models/strategy-order-record.d.ts +120 -0
  221. package/dist/models/strategy-order-record.js +47 -0
  222. package/dist/models/strategy-quotes-greek.d.ts +49 -0
  223. package/dist/models/strategy-quotes-greek.js +15 -0
  224. package/dist/models/strategy-quotes.d.ts +57 -0
  225. package/dist/models/strategy-quotes.js +15 -0
  226. package/dist/models/sub-period-return-rate.d.ts +37 -0
  227. package/dist/models/sub-period-return-rate.js +15 -0
  228. package/dist/models/symbol-query.d.ts +24 -0
  229. package/dist/models/symbol-query.js +15 -0
  230. package/dist/models/symbol.d.ts +51 -0
  231. package/dist/models/symbol.js +15 -0
  232. package/dist/models/symbols-quotes.d.ts +56 -0
  233. package/dist/models/symbols-quotes.js +15 -0
  234. package/dist/models/target-asset.d.ts +55 -0
  235. package/dist/models/target-asset.js +15 -0
  236. package/dist/models/time-in-force.d.ts +22 -0
  237. package/dist/models/time-in-force.js +26 -0
  238. package/dist/models/trade-execution-status.d.ts +91 -0
  239. package/dist/models/trade-execution-status.js +27 -0
  240. package/dist/models/trade-impact.d.ts +51 -0
  241. package/dist/models/trade-impact.js +15 -0
  242. package/dist/models/trade.d.ts +74 -0
  243. package/dist/models/trade.js +20 -0
  244. package/dist/models/trading-place-ocoorder-request.d.ts +30 -0
  245. package/dist/models/trading-place-ocoorder-request.js +15 -0
  246. package/dist/models/underlying-symbol.d.ts +64 -0
  247. package/dist/models/underlying-symbol.js +15 -0
  248. package/dist/models/universal-activity.d.ts +134 -0
  249. package/dist/models/universal-activity.js +36 -0
  250. package/dist/models/universal-symbol-ticker.d.ts +70 -0
  251. package/dist/models/universal-symbol-ticker.js +15 -0
  252. package/dist/models/universal-symbol.d.ts +69 -0
  253. package/dist/models/universal-symbol.js +15 -0
  254. package/dist/models/user-error-log.d.ts +55 -0
  255. package/dist/models/user-error-log.js +15 -0
  256. package/dist/models/user-idand-secret.d.ts +31 -0
  257. package/dist/models/user-idand-secret.js +15 -0
  258. package/dist/models/user-settings.d.ts +80 -0
  259. package/dist/models/user-settings.js +15 -0
  260. package/dist/models/usexchange.d.ts +73 -0
  261. package/dist/models/usexchange.js +15 -0
  262. package/dist/pagination/page.d.ts +31 -0
  263. package/dist/pagination/page.js +58 -0
  264. package/dist/pagination/pageable.d.ts +53 -0
  265. package/dist/pagination/pageable.js +128 -0
  266. package/dist/pagination/paginate.d.ts +17 -0
  267. package/dist/pagination/paginate.js +78 -0
  268. package/dist/requestAfterHook.d.ts +8 -0
  269. package/dist/requestAfterHook.js +45 -0
  270. package/dist/requestBeforeHook.d.ts +8 -0
  271. package/dist/requestBeforeHook.js +8 -0
  272. package/docs/AccountInformationApi.md +485 -0
  273. package/docs/ApiDisclaimerApi.md +69 -0
  274. package/docs/ApiStatusApi.md +60 -0
  275. package/docs/AuthenticationApi.md +307 -0
  276. package/docs/ConnectionsApi.md +186 -0
  277. package/docs/ErrorLogsApi.md +65 -0
  278. package/docs/OptionsApi.md +321 -0
  279. package/docs/PortfolioManagementApi.md +1866 -0
  280. package/docs/ReferenceDataApi.md +597 -0
  281. package/docs/TradingApi.md +629 -0
  282. package/docs/TransactionsAndReportingApi.md +141 -0
  283. package/index.test.ts +62 -13
  284. package/index.ts +3 -3
  285. package/models/account-holdings.ts +61 -0
  286. package/models/account-order-record-status.ts +48 -0
  287. package/models/account-order-record.ts +142 -0
  288. package/models/account-simple.ts +43 -0
  289. package/models/account.ts +82 -0
  290. package/models/action.ts +30 -0
  291. package/models/apidisclaimer-accept-request.ts +29 -0
  292. package/models/authentication-login-snap-trade-user200-response.ts +31 -0
  293. package/models/balance.ts +40 -0
  294. package/models/brokerage-authorization-type-read-only-brokerage.ts +43 -0
  295. package/models/brokerage-authorization-type-read-only.ts +68 -0
  296. package/models/brokerage-authorization-type.ts +39 -0
  297. package/models/brokerage-authorization.ts +82 -0
  298. package/models/brokerage-symbol.ts +61 -0
  299. package/models/brokerage-type.ts +37 -0
  300. package/models/brokerage.ts +136 -0
  301. package/models/calculated-trade.ts +40 -0
  302. package/models/cash-restriction.ts +63 -0
  303. package/models/currency.ts +43 -0
  304. package/models/delete-user-response.ts +37 -0
  305. package/models/dividend-at-date.ts +43 -0
  306. package/models/encrypted-response-encrypted-message-data.ts +43 -0
  307. package/models/encrypted-response.ts +38 -0
  308. package/models/exchange-rate-pairs.ts +46 -0
  309. package/models/exchange.ts +73 -0
  310. package/models/excluded-asset.ts +34 -0
  311. package/models/index.ts +102 -0
  312. package/models/jwt.ts +31 -0
  313. package/models/login-redirect-uri.ts +35 -0
  314. package/models/manual-trade-and-impact.ts +49 -0
  315. package/models/manual-trade-balance.ts +49 -0
  316. package/models/manual-trade-form.ts +80 -0
  317. package/models/manual-trade-symbol.ts +64 -0
  318. package/models/manual-trade.ts +88 -0
  319. package/models/model-asset-class-details.ts +41 -0
  320. package/models/model-asset-class-target.ts +34 -0
  321. package/models/model-asset-class.ts +37 -0
  322. package/models/model-portfolio-asset-class.ts +40 -0
  323. package/models/model-portfolio-details.ts +50 -0
  324. package/models/model-portfolio-security.ts +40 -0
  325. package/models/model-portfolio.ts +52 -0
  326. package/models/model400-failed-request-response.ts +37 -0
  327. package/models/model401-failed-request-response.ts +37 -0
  328. package/models/model403-failed-request-response.ts +37 -0
  329. package/models/model404-failed-request-response.ts +37 -0
  330. package/models/monthly-dividends.ts +40 -0
  331. package/models/net-contributions.ts +43 -0
  332. package/models/net-dividend.ts +46 -0
  333. package/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.ts +43 -0
  334. package/models/option-chain-inner-chain-per-root-inner.ts +46 -0
  335. package/models/option-chain-inner.ts +58 -0
  336. package/models/option-leg.ts +53 -0
  337. package/models/option-strategy-legs-inner.ts +47 -0
  338. package/models/option-strategy.ts +61 -0
  339. package/models/options-get-option-strategy-request.ts +51 -0
  340. package/models/options-holdings.ts +67 -0
  341. package/models/options-place-option-strategy-request.ts +57 -0
  342. package/models/options-position.ts +73 -0
  343. package/models/options-symbol.ts +94 -0
  344. package/models/order-type.ts +32 -0
  345. package/models/partner-data.ts +100 -0
  346. package/models/past-value.ts +43 -0
  347. package/models/performance-custom.ts +154 -0
  348. package/models/portfolio-group-info.ts +115 -0
  349. package/models/portfolio-group-position.ts +46 -0
  350. package/models/portfolio-group-settings.ts +58 -0
  351. package/models/portfolio-group.ts +37 -0
  352. package/models/position-symbol.ts +64 -0
  353. package/models/position.ts +64 -0
  354. package/models/redirect-tokenand-pin.ts +37 -0
  355. package/models/security-type.ts +49 -0
  356. package/models/snap-trade-apidisclaimer-accept-status.ts +37 -0
  357. package/models/snap-trade-holdings-account.ts +70 -0
  358. package/models/snap-trade-holdings-total-value.ts +37 -0
  359. package/models/snap-trade-login-user-request-body.ts +61 -0
  360. package/models/snap-trade-register-user-request-body.ts +35 -0
  361. package/models/status.ts +43 -0
  362. package/models/strategy-impact-legs-inner.ts +67 -0
  363. package/models/strategy-impact.ts +94 -0
  364. package/models/strategy-order-place-orders-inner-legs-inner.ts +67 -0
  365. package/models/strategy-order-place-orders-inner.ts +286 -0
  366. package/models/strategy-order-place.ts +40 -0
  367. package/models/strategy-order-record.ts +133 -0
  368. package/models/strategy-quotes-greek.ts +55 -0
  369. package/models/strategy-quotes.ts +67 -0
  370. package/models/sub-period-return-rate.ts +43 -0
  371. package/models/symbol-query.ts +29 -0
  372. package/models/symbol.ts +61 -0
  373. package/models/symbols-quotes.ts +64 -0
  374. package/models/target-asset.ts +62 -0
  375. package/models/time-in-force.ts +31 -0
  376. package/models/trade-execution-status.ts +105 -0
  377. package/models/trade-impact.ts +61 -0
  378. package/models/trade.ts +88 -0
  379. package/models/trading-place-ocoorder-request.ts +35 -0
  380. package/models/underlying-symbol.ts +76 -0
  381. package/models/universal-activity.ts +151 -0
  382. package/models/universal-symbol-ticker.ts +82 -0
  383. package/models/universal-symbol.ts +80 -0
  384. package/models/user-error-log.ts +61 -0
  385. package/models/user-idand-secret.ts +37 -0
  386. package/models/user-settings.ts +88 -0
  387. package/models/usexchange.ts +79 -0
  388. package/package.json +1 -1
  389. package/pagination/page.ts +50 -0
  390. package/pagination/pageable.ts +107 -0
  391. package/pagination/paginate.ts +40 -0
  392. package/requestAfterHook.ts +53 -0
  393. package/requestBeforeHook.ts +14 -0
  394. package/tsconfig.json +0 -1
  395. package/dist/api.js.map +0 -1
  396. package/dist/base.js.map +0 -1
  397. package/dist/common.js.map +0 -1
  398. package/dist/configuration.js.map +0 -1
  399. package/dist/index.js.map +0 -1
  400. package/dist/index.test.js.map +0 -1
  401. package/dist/jest.config.js.map +0 -1
@@ -0,0 +1,3574 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * SnapTrade
6
+ * Connect brokerage accounts to your app for live positions and trading
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: api@snaptrade.com
10
+ *
11
+ * NOTE: This file is auto generated by Konfig (https://konfigthis.com).
12
+ * https://konfigthis.com
13
+ * Do not edit the class manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ Object.defineProperty(exports, "__esModule", { value: true });
78
+ exports.PortfolioManagementApi = exports.PortfolioManagementApiFactory = exports.PortfolioManagementApiFp = exports.PortfolioManagementApiAxiosParamCreator = void 0;
79
+ var axios_1 = require("axios");
80
+ // Some imports not used depending on template conditions
81
+ // @ts-ignore
82
+ var common_1 = require("../common");
83
+ // @ts-ignore
84
+ var base_1 = require("../base");
85
+ var requestBeforeHook_1 = require("../requestBeforeHook");
86
+ /**
87
+ * PortfolioManagementApi - axios parameter creator
88
+ * @export
89
+ */
90
+ var PortfolioManagementApiAxiosParamCreator = function (configuration) {
91
+ var _this = this;
92
+ return {
93
+ /**
94
+ *
95
+ * @summary Adds an asset to exclude to a portfolio group
96
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup under which to exclude an asset.
97
+ * @param {UniversalSymbol} [universalSymbol]
98
+ * @param {*} [options] Override http request option.
99
+ * @throws {RequiredError}
100
+ */
101
+ addPortfolioExcludedAsset: function (portfolioGroupId, universalSymbol, options) {
102
+ if (options === void 0) { options = {}; }
103
+ return __awaiter(_this, void 0, void 0, function () {
104
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
105
+ return __generator(this, function (_a) {
106
+ switch (_a.label) {
107
+ case 0:
108
+ // verify required parameter 'portfolioGroupId' is not null or undefined
109
+ (0, common_1.assertParamExists)('addPortfolioExcludedAsset', 'portfolioGroupId', portfolioGroupId);
110
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/excludedassets"
111
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)));
112
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
113
+ if (configuration) {
114
+ baseOptions = configuration.baseOptions;
115
+ }
116
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
117
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
118
+ localVarQueryParameter = {};
119
+ // authentication PartnerClientId required
120
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
121
+ // authentication PartnerSignature required
122
+ ];
123
+ case 1:
124
+ // authentication PartnerClientId required
125
+ _a.sent();
126
+ // authentication PartnerSignature required
127
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
128
+ // authentication PartnerTimestamp required
129
+ ];
130
+ case 2:
131
+ // authentication PartnerSignature required
132
+ _a.sent();
133
+ // authentication PartnerTimestamp required
134
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
135
+ case 3:
136
+ // authentication PartnerTimestamp required
137
+ _a.sent();
138
+ localVarHeaderParameter['Content-Type'] = 'application/json';
139
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
140
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
141
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(universalSymbol, localVarRequestOptions, configuration);
142
+ (0, requestBeforeHook_1.requestBeforeHook)({
143
+ queryParameters: localVarQueryParameter,
144
+ requestConfig: localVarRequestOptions,
145
+ path: localVarPath,
146
+ configuration: configuration
147
+ });
148
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
149
+ return [2 /*return*/, {
150
+ url: (0, common_1.toPathString)(localVarUrlObj),
151
+ options: localVarRequestOptions,
152
+ }];
153
+ }
154
+ });
155
+ });
156
+ },
157
+ /**
158
+ *
159
+ * @summary Create new portfolio group
160
+ * @param {string} userId
161
+ * @param {string} userSecret
162
+ * @param {{ [key: string]: any; }} requestBody
163
+ * @param {*} [options] Override http request option.
164
+ * @throws {RequiredError}
165
+ */
166
+ create: function (userId, userSecret, requestBody, options) {
167
+ if (options === void 0) { options = {}; }
168
+ return __awaiter(_this, void 0, void 0, function () {
169
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
170
+ return __generator(this, function (_a) {
171
+ switch (_a.label) {
172
+ case 0:
173
+ // verify required parameter 'userId' is not null or undefined
174
+ (0, common_1.assertParamExists)('create', 'userId', userId);
175
+ // verify required parameter 'userSecret' is not null or undefined
176
+ (0, common_1.assertParamExists)('create', 'userSecret', userSecret);
177
+ // verify required parameter 'requestBody' is not null or undefined
178
+ (0, common_1.assertParamExists)('create', 'requestBody', requestBody);
179
+ localVarPath = "/portfolioGroups";
180
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
181
+ if (configuration) {
182
+ baseOptions = configuration.baseOptions;
183
+ }
184
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
185
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
186
+ localVarQueryParameter = {};
187
+ // authentication PartnerClientId required
188
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
189
+ // authentication PartnerSignature required
190
+ ];
191
+ case 1:
192
+ // authentication PartnerClientId required
193
+ _a.sent();
194
+ // authentication PartnerSignature required
195
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
196
+ // authentication PartnerTimestamp required
197
+ ];
198
+ case 2:
199
+ // authentication PartnerSignature required
200
+ _a.sent();
201
+ // authentication PartnerTimestamp required
202
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
203
+ case 3:
204
+ // authentication PartnerTimestamp required
205
+ _a.sent();
206
+ if (userId !== undefined) {
207
+ localVarQueryParameter['userId'] = userId;
208
+ }
209
+ if (userSecret !== undefined) {
210
+ localVarQueryParameter['userSecret'] = userSecret;
211
+ }
212
+ localVarHeaderParameter['Content-Type'] = 'application/json';
213
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
214
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
215
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(requestBody, localVarRequestOptions, configuration);
216
+ (0, requestBeforeHook_1.requestBeforeHook)({
217
+ queryParameters: localVarQueryParameter,
218
+ requestConfig: localVarRequestOptions,
219
+ path: localVarPath,
220
+ configuration: configuration
221
+ });
222
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
223
+ return [2 /*return*/, {
224
+ url: (0, common_1.toPathString)(localVarUrlObj),
225
+ options: localVarRequestOptions,
226
+ }];
227
+ }
228
+ });
229
+ });
230
+ },
231
+ /**
232
+ *
233
+ * @summary Create a new model asset class
234
+ * @param {*} [options] Override http request option.
235
+ * @throws {RequiredError}
236
+ */
237
+ createAssetClass: function (options) {
238
+ if (options === void 0) { options = {}; }
239
+ return __awaiter(_this, void 0, void 0, function () {
240
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
241
+ return __generator(this, function (_a) {
242
+ switch (_a.label) {
243
+ case 0:
244
+ localVarPath = "/modelAssetClass";
245
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
246
+ if (configuration) {
247
+ baseOptions = configuration.baseOptions;
248
+ }
249
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
250
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
251
+ localVarQueryParameter = {};
252
+ // authentication PartnerClientId required
253
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
254
+ // authentication PartnerSignature required
255
+ ];
256
+ case 1:
257
+ // authentication PartnerClientId required
258
+ _a.sent();
259
+ // authentication PartnerSignature required
260
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
261
+ // authentication PartnerTimestamp required
262
+ ];
263
+ case 2:
264
+ // authentication PartnerSignature required
265
+ _a.sent();
266
+ // authentication PartnerTimestamp required
267
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
268
+ case 3:
269
+ // authentication PartnerTimestamp required
270
+ _a.sent();
271
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
272
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
273
+ (0, requestBeforeHook_1.requestBeforeHook)({
274
+ queryParameters: localVarQueryParameter,
275
+ requestConfig: localVarRequestOptions,
276
+ path: localVarPath,
277
+ configuration: configuration
278
+ });
279
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
280
+ return [2 /*return*/, {
281
+ url: (0, common_1.toPathString)(localVarUrlObj),
282
+ options: localVarRequestOptions,
283
+ }];
284
+ }
285
+ });
286
+ });
287
+ },
288
+ /**
289
+ *
290
+ * @summary Creates a new model portfolio
291
+ * @param {*} [options] Override http request option.
292
+ * @throws {RequiredError}
293
+ */
294
+ createModelPortfolio: function (options) {
295
+ if (options === void 0) { options = {}; }
296
+ return __awaiter(_this, void 0, void 0, function () {
297
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
298
+ return __generator(this, function (_a) {
299
+ switch (_a.label) {
300
+ case 0:
301
+ localVarPath = "/modelPortfolio";
302
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
303
+ if (configuration) {
304
+ baseOptions = configuration.baseOptions;
305
+ }
306
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
307
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
308
+ localVarQueryParameter = {};
309
+ // authentication PartnerClientId required
310
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
311
+ // authentication PartnerSignature required
312
+ ];
313
+ case 1:
314
+ // authentication PartnerClientId required
315
+ _a.sent();
316
+ // authentication PartnerSignature required
317
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
318
+ // authentication PartnerTimestamp required
319
+ ];
320
+ case 2:
321
+ // authentication PartnerSignature required
322
+ _a.sent();
323
+ // authentication PartnerTimestamp required
324
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
325
+ case 3:
326
+ // authentication PartnerTimestamp required
327
+ _a.sent();
328
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
329
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
330
+ (0, requestBeforeHook_1.requestBeforeHook)({
331
+ queryParameters: localVarQueryParameter,
332
+ requestConfig: localVarRequestOptions,
333
+ path: localVarPath,
334
+ configuration: configuration
335
+ });
336
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
337
+ return [2 /*return*/, {
338
+ url: (0, common_1.toPathString)(localVarUrlObj),
339
+ options: localVarRequestOptions,
340
+ }];
341
+ }
342
+ });
343
+ });
344
+ },
345
+ /**
346
+ *
347
+ * @summary Deletes a model asset class
348
+ * @param {string} modelAssetClassId The ID of the model asset class to delete.
349
+ * @param {*} [options] Override http request option.
350
+ * @throws {RequiredError}
351
+ */
352
+ deleteAssetClass: function (modelAssetClassId, options) {
353
+ if (options === void 0) { options = {}; }
354
+ return __awaiter(_this, void 0, void 0, function () {
355
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
356
+ return __generator(this, function (_a) {
357
+ switch (_a.label) {
358
+ case 0:
359
+ // verify required parameter 'modelAssetClassId' is not null or undefined
360
+ (0, common_1.assertParamExists)('deleteAssetClass', 'modelAssetClassId', modelAssetClassId);
361
+ localVarPath = "/modelAssetClass/{modelAssetClassId}"
362
+ .replace("{".concat("modelAssetClassId", "}"), encodeURIComponent(String(modelAssetClassId)));
363
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
364
+ if (configuration) {
365
+ baseOptions = configuration.baseOptions;
366
+ }
367
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
368
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
369
+ localVarQueryParameter = {};
370
+ // authentication PartnerClientId required
371
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
372
+ // authentication PartnerSignature required
373
+ ];
374
+ case 1:
375
+ // authentication PartnerClientId required
376
+ _a.sent();
377
+ // authentication PartnerSignature required
378
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
379
+ // authentication PartnerTimestamp required
380
+ ];
381
+ case 2:
382
+ // authentication PartnerSignature required
383
+ _a.sent();
384
+ // authentication PartnerTimestamp required
385
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
386
+ case 3:
387
+ // authentication PartnerTimestamp required
388
+ _a.sent();
389
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
390
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
391
+ (0, requestBeforeHook_1.requestBeforeHook)({
392
+ queryParameters: localVarQueryParameter,
393
+ requestConfig: localVarRequestOptions,
394
+ path: localVarPath,
395
+ configuration: configuration
396
+ });
397
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
398
+ return [2 /*return*/, {
399
+ url: (0, common_1.toPathString)(localVarUrlObj),
400
+ options: localVarRequestOptions,
401
+ }];
402
+ }
403
+ });
404
+ });
405
+ },
406
+ /**
407
+ *
408
+ * @summary Unexclude an asset from a portfolio group
409
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup under which to unexclude an asset.
410
+ * @param {string} symbolId The ID of the excluded asset Symbol to delete.
411
+ * @param {*} [options] Override http request option.
412
+ * @throws {RequiredError}
413
+ */
414
+ deleteExcludedAsset: function (portfolioGroupId, symbolId, options) {
415
+ if (options === void 0) { options = {}; }
416
+ return __awaiter(_this, void 0, void 0, function () {
417
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
418
+ return __generator(this, function (_a) {
419
+ switch (_a.label) {
420
+ case 0:
421
+ // verify required parameter 'portfolioGroupId' is not null or undefined
422
+ (0, common_1.assertParamExists)('deleteExcludedAsset', 'portfolioGroupId', portfolioGroupId);
423
+ // verify required parameter 'symbolId' is not null or undefined
424
+ (0, common_1.assertParamExists)('deleteExcludedAsset', 'symbolId', symbolId);
425
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/excludedassets/{symbolId}"
426
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)))
427
+ .replace("{".concat("symbolId", "}"), encodeURIComponent(String(symbolId)));
428
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
429
+ if (configuration) {
430
+ baseOptions = configuration.baseOptions;
431
+ }
432
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
433
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
434
+ localVarQueryParameter = {};
435
+ // authentication PartnerClientId required
436
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
437
+ // authentication PartnerSignature required
438
+ ];
439
+ case 1:
440
+ // authentication PartnerClientId required
441
+ _a.sent();
442
+ // authentication PartnerSignature required
443
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
444
+ // authentication PartnerTimestamp required
445
+ ];
446
+ case 2:
447
+ // authentication PartnerSignature required
448
+ _a.sent();
449
+ // authentication PartnerTimestamp required
450
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
451
+ case 3:
452
+ // authentication PartnerTimestamp required
453
+ _a.sent();
454
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
455
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
456
+ (0, requestBeforeHook_1.requestBeforeHook)({
457
+ queryParameters: localVarQueryParameter,
458
+ requestConfig: localVarRequestOptions,
459
+ path: localVarPath,
460
+ configuration: configuration
461
+ });
462
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
463
+ return [2 /*return*/, {
464
+ url: (0, common_1.toPathString)(localVarUrlObj),
465
+ options: localVarRequestOptions,
466
+ }];
467
+ }
468
+ });
469
+ });
470
+ },
471
+ /**
472
+ *
473
+ * @summary Deletes a model portfolio
474
+ * @param {string} modelPortfolioId The ID of the model portfolio to delete.
475
+ * @param {*} [options] Override http request option.
476
+ * @throws {RequiredError}
477
+ */
478
+ deleteModelPortfolioById: function (modelPortfolioId, options) {
479
+ if (options === void 0) { options = {}; }
480
+ return __awaiter(_this, void 0, void 0, function () {
481
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
482
+ return __generator(this, function (_a) {
483
+ switch (_a.label) {
484
+ case 0:
485
+ // verify required parameter 'modelPortfolioId' is not null or undefined
486
+ (0, common_1.assertParamExists)('deleteModelPortfolioById', 'modelPortfolioId', modelPortfolioId);
487
+ localVarPath = "/modelPortfolio/{modelPortfolioId}"
488
+ .replace("{".concat("modelPortfolioId", "}"), encodeURIComponent(String(modelPortfolioId)));
489
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
490
+ if (configuration) {
491
+ baseOptions = configuration.baseOptions;
492
+ }
493
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
494
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
495
+ localVarQueryParameter = {};
496
+ // authentication PartnerClientId required
497
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
498
+ // authentication PartnerSignature required
499
+ ];
500
+ case 1:
501
+ // authentication PartnerClientId required
502
+ _a.sent();
503
+ // authentication PartnerSignature required
504
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
505
+ // authentication PartnerTimestamp required
506
+ ];
507
+ case 2:
508
+ // authentication PartnerSignature required
509
+ _a.sent();
510
+ // authentication PartnerTimestamp required
511
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
512
+ case 3:
513
+ // authentication PartnerTimestamp required
514
+ _a.sent();
515
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
516
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
517
+ (0, requestBeforeHook_1.requestBeforeHook)({
518
+ queryParameters: localVarQueryParameter,
519
+ requestConfig: localVarRequestOptions,
520
+ path: localVarPath,
521
+ configuration: configuration
522
+ });
523
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
524
+ return [2 /*return*/, {
525
+ url: (0, common_1.toPathString)(localVarUrlObj),
526
+ options: localVarRequestOptions,
527
+ }];
528
+ }
529
+ });
530
+ });
531
+ },
532
+ /**
533
+ *
534
+ * @summary Remove a target portfolio.
535
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup to delete.
536
+ * @param {*} [options] Override http request option.
537
+ * @throws {RequiredError}
538
+ */
539
+ deletePortfoli: function (portfolioGroupId, options) {
540
+ if (options === void 0) { options = {}; }
541
+ return __awaiter(_this, void 0, void 0, function () {
542
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
543
+ return __generator(this, function (_a) {
544
+ switch (_a.label) {
545
+ case 0:
546
+ // verify required parameter 'portfolioGroupId' is not null or undefined
547
+ (0, common_1.assertParamExists)('deletePortfoli', 'portfolioGroupId', portfolioGroupId);
548
+ localVarPath = "/portfolioGroups/{portfolioGroupId}"
549
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)));
550
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
551
+ if (configuration) {
552
+ baseOptions = configuration.baseOptions;
553
+ }
554
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
555
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
556
+ localVarQueryParameter = {};
557
+ // authentication PartnerClientId required
558
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
559
+ // authentication PartnerSignature required
560
+ ];
561
+ case 1:
562
+ // authentication PartnerClientId required
563
+ _a.sent();
564
+ // authentication PartnerSignature required
565
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
566
+ // authentication PartnerTimestamp required
567
+ ];
568
+ case 2:
569
+ // authentication PartnerSignature required
570
+ _a.sent();
571
+ // authentication PartnerTimestamp required
572
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
573
+ case 3:
574
+ // authentication PartnerTimestamp required
575
+ _a.sent();
576
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
577
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
578
+ (0, requestBeforeHook_1.requestBeforeHook)({
579
+ queryParameters: localVarQueryParameter,
580
+ requestConfig: localVarRequestOptions,
581
+ path: localVarPath,
582
+ configuration: configuration
583
+ });
584
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
585
+ return [2 /*return*/, {
586
+ url: (0, common_1.toPathString)(localVarUrlObj),
587
+ options: localVarRequestOptions,
588
+ }];
589
+ }
590
+ });
591
+ });
592
+ },
593
+ /**
594
+ *
595
+ * @summary Remove a TargetAsset.
596
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup under which to remove the target asset.
597
+ * @param {string} targetAssetId The ID of the TargetAsset to delete.
598
+ * @param {*} [options] Override http request option.
599
+ * @throws {RequiredError}
600
+ */
601
+ deletePortfolioTargetById: function (portfolioGroupId, targetAssetId, options) {
602
+ if (options === void 0) { options = {}; }
603
+ return __awaiter(_this, void 0, void 0, function () {
604
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
605
+ return __generator(this, function (_a) {
606
+ switch (_a.label) {
607
+ case 0:
608
+ // verify required parameter 'portfolioGroupId' is not null or undefined
609
+ (0, common_1.assertParamExists)('deletePortfolioTargetById', 'portfolioGroupId', portfolioGroupId);
610
+ // verify required parameter 'targetAssetId' is not null or undefined
611
+ (0, common_1.assertParamExists)('deletePortfolioTargetById', 'targetAssetId', targetAssetId);
612
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/targets/{targetAssetId}"
613
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)))
614
+ .replace("{".concat("targetAssetId", "}"), encodeURIComponent(String(targetAssetId)));
615
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
616
+ if (configuration) {
617
+ baseOptions = configuration.baseOptions;
618
+ }
619
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
620
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
621
+ localVarQueryParameter = {};
622
+ // authentication PartnerClientId required
623
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
624
+ // authentication PartnerSignature required
625
+ ];
626
+ case 1:
627
+ // authentication PartnerClientId required
628
+ _a.sent();
629
+ // authentication PartnerSignature required
630
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
631
+ // authentication PartnerTimestamp required
632
+ ];
633
+ case 2:
634
+ // authentication PartnerSignature required
635
+ _a.sent();
636
+ // authentication PartnerTimestamp required
637
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
638
+ case 3:
639
+ // authentication PartnerTimestamp required
640
+ _a.sent();
641
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
642
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
643
+ (0, requestBeforeHook_1.requestBeforeHook)({
644
+ queryParameters: localVarQueryParameter,
645
+ requestConfig: localVarRequestOptions,
646
+ path: localVarPath,
647
+ configuration: configuration
648
+ });
649
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
650
+ return [2 /*return*/, {
651
+ url: (0, common_1.toPathString)(localVarUrlObj),
652
+ options: localVarRequestOptions,
653
+ }];
654
+ }
655
+ });
656
+ });
657
+ },
658
+ /**
659
+ *
660
+ * @summary Get details of a model asset class
661
+ * @param {string} modelAssetClassId The ID of the model asset class to get.
662
+ * @param {*} [options] Override http request option.
663
+ * @throws {RequiredError}
664
+ */
665
+ detailAssetClass: function (modelAssetClassId, options) {
666
+ if (options === void 0) { options = {}; }
667
+ return __awaiter(_this, void 0, void 0, function () {
668
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
669
+ return __generator(this, function (_a) {
670
+ switch (_a.label) {
671
+ case 0:
672
+ // verify required parameter 'modelAssetClassId' is not null or undefined
673
+ (0, common_1.assertParamExists)('detailAssetClass', 'modelAssetClassId', modelAssetClassId);
674
+ localVarPath = "/modelAssetClass/{modelAssetClassId}"
675
+ .replace("{".concat("modelAssetClassId", "}"), encodeURIComponent(String(modelAssetClassId)));
676
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
677
+ if (configuration) {
678
+ baseOptions = configuration.baseOptions;
679
+ }
680
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
681
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
682
+ localVarQueryParameter = {};
683
+ // authentication PartnerClientId required
684
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
685
+ // authentication PartnerSignature required
686
+ ];
687
+ case 1:
688
+ // authentication PartnerClientId required
689
+ _a.sent();
690
+ // authentication PartnerSignature required
691
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
692
+ // authentication PartnerTimestamp required
693
+ ];
694
+ case 2:
695
+ // authentication PartnerSignature required
696
+ _a.sent();
697
+ // authentication PartnerTimestamp required
698
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
699
+ case 3:
700
+ // authentication PartnerTimestamp required
701
+ _a.sent();
702
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
703
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
704
+ (0, requestBeforeHook_1.requestBeforeHook)({
705
+ queryParameters: localVarQueryParameter,
706
+ requestConfig: localVarRequestOptions,
707
+ path: localVarPath,
708
+ configuration: configuration
709
+ });
710
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
711
+ return [2 /*return*/, {
712
+ url: (0, common_1.toPathString)(localVarUrlObj),
713
+ options: localVarRequestOptions,
714
+ }];
715
+ }
716
+ });
717
+ });
718
+ },
719
+ /**
720
+ *
721
+ * @summary Return an individual trade
722
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup to perform rebalancing calculations
723
+ * @param {string} calculatedTradeId The ID of calculated trade to get account impact
724
+ * @param {string} tradeId The ID of trade object
725
+ * @param {*} [options] Override http request option.
726
+ * @throws {RequiredError}
727
+ */
728
+ getCalculatedTradeById: function (portfolioGroupId, calculatedTradeId, tradeId, options) {
729
+ if (options === void 0) { options = {}; }
730
+ return __awaiter(_this, void 0, void 0, function () {
731
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
732
+ return __generator(this, function (_a) {
733
+ switch (_a.label) {
734
+ case 0:
735
+ // verify required parameter 'portfolioGroupId' is not null or undefined
736
+ (0, common_1.assertParamExists)('getCalculatedTradeById', 'portfolioGroupId', portfolioGroupId);
737
+ // verify required parameter 'calculatedTradeId' is not null or undefined
738
+ (0, common_1.assertParamExists)('getCalculatedTradeById', 'calculatedTradeId', calculatedTradeId);
739
+ // verify required parameter 'tradeId' is not null or undefined
740
+ (0, common_1.assertParamExists)('getCalculatedTradeById', 'tradeId', tradeId);
741
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/calculatedtrades/{calculatedTradeId}/{TradeId}"
742
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)))
743
+ .replace("{".concat("calculatedTradeId", "}"), encodeURIComponent(String(calculatedTradeId)))
744
+ .replace("{".concat("TradeId", "}"), encodeURIComponent(String(tradeId)));
745
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
746
+ if (configuration) {
747
+ baseOptions = configuration.baseOptions;
748
+ }
749
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
750
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
751
+ localVarQueryParameter = {};
752
+ // authentication PartnerClientId required
753
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
754
+ // authentication PartnerSignature required
755
+ ];
756
+ case 1:
757
+ // authentication PartnerClientId required
758
+ _a.sent();
759
+ // authentication PartnerSignature required
760
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
761
+ // authentication PartnerTimestamp required
762
+ ];
763
+ case 2:
764
+ // authentication PartnerSignature required
765
+ _a.sent();
766
+ // authentication PartnerTimestamp required
767
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
768
+ case 3:
769
+ // authentication PartnerTimestamp required
770
+ _a.sent();
771
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
772
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
773
+ (0, requestBeforeHook_1.requestBeforeHook)({
774
+ queryParameters: localVarQueryParameter,
775
+ requestConfig: localVarRequestOptions,
776
+ path: localVarPath,
777
+ configuration: configuration
778
+ });
779
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
780
+ return [2 /*return*/, {
781
+ url: (0, common_1.toPathString)(localVarUrlObj),
782
+ options: localVarRequestOptions,
783
+ }];
784
+ }
785
+ });
786
+ });
787
+ },
788
+ /**
789
+ *
790
+ * @summary Get details of a model portfolio
791
+ * @param {string} modelPortfolioId The ID of the model portfolio to get.
792
+ * @param {*} [options] Override http request option.
793
+ * @throws {RequiredError}
794
+ */
795
+ getModelDetailsById: function (modelPortfolioId, options) {
796
+ if (options === void 0) { options = {}; }
797
+ return __awaiter(_this, void 0, void 0, function () {
798
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
799
+ return __generator(this, function (_a) {
800
+ switch (_a.label) {
801
+ case 0:
802
+ // verify required parameter 'modelPortfolioId' is not null or undefined
803
+ (0, common_1.assertParamExists)('getModelDetailsById', 'modelPortfolioId', modelPortfolioId);
804
+ localVarPath = "/modelPortfolio/{modelPortfolioId}"
805
+ .replace("{".concat("modelPortfolioId", "}"), encodeURIComponent(String(modelPortfolioId)));
806
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
807
+ if (configuration) {
808
+ baseOptions = configuration.baseOptions;
809
+ }
810
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
811
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
812
+ localVarQueryParameter = {};
813
+ // authentication PartnerClientId required
814
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
815
+ // authentication PartnerSignature required
816
+ ];
817
+ case 1:
818
+ // authentication PartnerClientId required
819
+ _a.sent();
820
+ // authentication PartnerSignature required
821
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
822
+ // authentication PartnerTimestamp required
823
+ ];
824
+ case 2:
825
+ // authentication PartnerSignature required
826
+ _a.sent();
827
+ // authentication PartnerTimestamp required
828
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
829
+ case 3:
830
+ // authentication PartnerTimestamp required
831
+ _a.sent();
832
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
833
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
834
+ (0, requestBeforeHook_1.requestBeforeHook)({
835
+ queryParameters: localVarQueryParameter,
836
+ requestConfig: localVarRequestOptions,
837
+ path: localVarPath,
838
+ configuration: configuration
839
+ });
840
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
841
+ return [2 /*return*/, {
842
+ url: (0, common_1.toPathString)(localVarUrlObj),
843
+ options: localVarRequestOptions,
844
+ }];
845
+ }
846
+ });
847
+ });
848
+ },
849
+ /**
850
+ *
851
+ * @summary Get sum of cash balances in portfolio group
852
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup under which to create the target asset.
853
+ * @param {*} [options] Override http request option.
854
+ * @throws {RequiredError}
855
+ */
856
+ getPortfolioBalances: function (portfolioGroupId, options) {
857
+ if (options === void 0) { options = {}; }
858
+ return __awaiter(_this, void 0, void 0, function () {
859
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
860
+ return __generator(this, function (_a) {
861
+ switch (_a.label) {
862
+ case 0:
863
+ // verify required parameter 'portfolioGroupId' is not null or undefined
864
+ (0, common_1.assertParamExists)('getPortfolioBalances', 'portfolioGroupId', portfolioGroupId);
865
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/balances"
866
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)));
867
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
868
+ if (configuration) {
869
+ baseOptions = configuration.baseOptions;
870
+ }
871
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
872
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
873
+ localVarQueryParameter = {};
874
+ // authentication PartnerClientId required
875
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
876
+ // authentication PartnerSignature required
877
+ ];
878
+ case 1:
879
+ // authentication PartnerClientId required
880
+ _a.sent();
881
+ // authentication PartnerSignature required
882
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
883
+ // authentication PartnerTimestamp required
884
+ ];
885
+ case 2:
886
+ // authentication PartnerSignature required
887
+ _a.sent();
888
+ // authentication PartnerTimestamp required
889
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
890
+ case 3:
891
+ // authentication PartnerTimestamp required
892
+ _a.sent();
893
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
894
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
895
+ (0, requestBeforeHook_1.requestBeforeHook)({
896
+ queryParameters: localVarQueryParameter,
897
+ requestConfig: localVarRequestOptions,
898
+ path: localVarPath,
899
+ configuration: configuration
900
+ });
901
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
902
+ return [2 /*return*/, {
903
+ url: (0, common_1.toPathString)(localVarUrlObj),
904
+ options: localVarRequestOptions,
905
+ }];
906
+ }
907
+ });
908
+ });
909
+ },
910
+ /**
911
+ *
912
+ * @summary Get details of a target portfolio
913
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup to get.
914
+ * @param {*} [options] Override http request option.
915
+ * @throws {RequiredError}
916
+ */
917
+ getPortfolioDetailsById: function (portfolioGroupId, options) {
918
+ if (options === void 0) { options = {}; }
919
+ return __awaiter(_this, void 0, void 0, function () {
920
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
921
+ return __generator(this, function (_a) {
922
+ switch (_a.label) {
923
+ case 0:
924
+ // verify required parameter 'portfolioGroupId' is not null or undefined
925
+ (0, common_1.assertParamExists)('getPortfolioDetailsById', 'portfolioGroupId', portfolioGroupId);
926
+ localVarPath = "/portfolioGroups/{portfolioGroupId}"
927
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)));
928
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
929
+ if (configuration) {
930
+ baseOptions = configuration.baseOptions;
931
+ }
932
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
933
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
934
+ localVarQueryParameter = {};
935
+ // authentication PartnerClientId required
936
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
937
+ // authentication PartnerSignature required
938
+ ];
939
+ case 1:
940
+ // authentication PartnerClientId required
941
+ _a.sent();
942
+ // authentication PartnerSignature required
943
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
944
+ // authentication PartnerTimestamp required
945
+ ];
946
+ case 2:
947
+ // authentication PartnerSignature required
948
+ _a.sent();
949
+ // authentication PartnerTimestamp required
950
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
951
+ case 3:
952
+ // authentication PartnerTimestamp required
953
+ _a.sent();
954
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
955
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
956
+ (0, requestBeforeHook_1.requestBeforeHook)({
957
+ queryParameters: localVarQueryParameter,
958
+ requestConfig: localVarRequestOptions,
959
+ path: localVarPath,
960
+ configuration: configuration
961
+ });
962
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
963
+ return [2 /*return*/, {
964
+ url: (0, common_1.toPathString)(localVarUrlObj),
965
+ options: localVarRequestOptions,
966
+ }];
967
+ }
968
+ });
969
+ });
970
+ },
971
+ /**
972
+ *
973
+ * @summary Return a whole bunch of relevant information relating to a portfolio group.
974
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup under which to create the target asset.
975
+ * @param {*} [options] Override http request option.
976
+ * @throws {RequiredError}
977
+ */
978
+ getPortfolioInfo: function (portfolioGroupId, options) {
979
+ if (options === void 0) { options = {}; }
980
+ return __awaiter(_this, void 0, void 0, function () {
981
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
982
+ return __generator(this, function (_a) {
983
+ switch (_a.label) {
984
+ case 0:
985
+ // verify required parameter 'portfolioGroupId' is not null or undefined
986
+ (0, common_1.assertParamExists)('getPortfolioInfo', 'portfolioGroupId', portfolioGroupId);
987
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/info"
988
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)));
989
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
990
+ if (configuration) {
991
+ baseOptions = configuration.baseOptions;
992
+ }
993
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
994
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
995
+ localVarQueryParameter = {};
996
+ // authentication PartnerClientId required
997
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
998
+ // authentication PartnerSignature required
999
+ ];
1000
+ case 1:
1001
+ // authentication PartnerClientId required
1002
+ _a.sent();
1003
+ // authentication PartnerSignature required
1004
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
1005
+ // authentication PartnerTimestamp required
1006
+ ];
1007
+ case 2:
1008
+ // authentication PartnerSignature required
1009
+ _a.sent();
1010
+ // authentication PartnerTimestamp required
1011
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
1012
+ case 3:
1013
+ // authentication PartnerTimestamp required
1014
+ _a.sent();
1015
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1016
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1017
+ (0, requestBeforeHook_1.requestBeforeHook)({
1018
+ queryParameters: localVarQueryParameter,
1019
+ requestConfig: localVarRequestOptions,
1020
+ path: localVarPath,
1021
+ configuration: configuration
1022
+ });
1023
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1024
+ return [2 /*return*/, {
1025
+ url: (0, common_1.toPathString)(localVarUrlObj),
1026
+ options: localVarRequestOptions,
1027
+ }];
1028
+ }
1029
+ });
1030
+ });
1031
+ },
1032
+ /**
1033
+ *
1034
+ * @summary Get total of each postions owned in portfolio group
1035
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup under which to create the target asset.
1036
+ * @param {*} [options] Override http request option.
1037
+ * @throws {RequiredError}
1038
+ */
1039
+ getPortfolioPositions: function (portfolioGroupId, options) {
1040
+ if (options === void 0) { options = {}; }
1041
+ return __awaiter(_this, void 0, void 0, function () {
1042
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1043
+ return __generator(this, function (_a) {
1044
+ switch (_a.label) {
1045
+ case 0:
1046
+ // verify required parameter 'portfolioGroupId' is not null or undefined
1047
+ (0, common_1.assertParamExists)('getPortfolioPositions', 'portfolioGroupId', portfolioGroupId);
1048
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/positions"
1049
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)));
1050
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1051
+ if (configuration) {
1052
+ baseOptions = configuration.baseOptions;
1053
+ }
1054
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1055
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
1056
+ localVarQueryParameter = {};
1057
+ // authentication PartnerClientId required
1058
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
1059
+ // authentication PartnerSignature required
1060
+ ];
1061
+ case 1:
1062
+ // authentication PartnerClientId required
1063
+ _a.sent();
1064
+ // authentication PartnerSignature required
1065
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
1066
+ // authentication PartnerTimestamp required
1067
+ ];
1068
+ case 2:
1069
+ // authentication PartnerSignature required
1070
+ _a.sent();
1071
+ // authentication PartnerTimestamp required
1072
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
1073
+ case 3:
1074
+ // authentication PartnerTimestamp required
1075
+ _a.sent();
1076
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1077
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1078
+ (0, requestBeforeHook_1.requestBeforeHook)({
1079
+ queryParameters: localVarQueryParameter,
1080
+ requestConfig: localVarRequestOptions,
1081
+ path: localVarPath,
1082
+ configuration: configuration
1083
+ });
1084
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1085
+ return [2 /*return*/, {
1086
+ url: (0, common_1.toPathString)(localVarUrlObj),
1087
+ options: localVarRequestOptions,
1088
+ }];
1089
+ }
1090
+ });
1091
+ });
1092
+ },
1093
+ /**
1094
+ *
1095
+ * @summary Get portfolio group settings
1096
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup under which to get the settings.
1097
+ * @param {*} [options] Override http request option.
1098
+ * @throws {RequiredError}
1099
+ */
1100
+ getPortfolioSettings: function (portfolioGroupId, options) {
1101
+ if (options === void 0) { options = {}; }
1102
+ return __awaiter(_this, void 0, void 0, function () {
1103
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1104
+ return __generator(this, function (_a) {
1105
+ switch (_a.label) {
1106
+ case 0:
1107
+ // verify required parameter 'portfolioGroupId' is not null or undefined
1108
+ (0, common_1.assertParamExists)('getPortfolioSettings', 'portfolioGroupId', portfolioGroupId);
1109
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/settings"
1110
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)));
1111
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1112
+ if (configuration) {
1113
+ baseOptions = configuration.baseOptions;
1114
+ }
1115
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1116
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
1117
+ localVarQueryParameter = {};
1118
+ // authentication PartnerClientId required
1119
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
1120
+ // authentication PartnerSignature required
1121
+ ];
1122
+ case 1:
1123
+ // authentication PartnerClientId required
1124
+ _a.sent();
1125
+ // authentication PartnerSignature required
1126
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
1127
+ // authentication PartnerTimestamp required
1128
+ ];
1129
+ case 2:
1130
+ // authentication PartnerSignature required
1131
+ _a.sent();
1132
+ // authentication PartnerTimestamp required
1133
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
1134
+ case 3:
1135
+ // authentication PartnerTimestamp required
1136
+ _a.sent();
1137
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1138
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1139
+ (0, requestBeforeHook_1.requestBeforeHook)({
1140
+ queryParameters: localVarQueryParameter,
1141
+ requestConfig: localVarRequestOptions,
1142
+ path: localVarPath,
1143
+ configuration: configuration
1144
+ });
1145
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1146
+ return [2 /*return*/, {
1147
+ url: (0, common_1.toPathString)(localVarUrlObj),
1148
+ options: localVarRequestOptions,
1149
+ }];
1150
+ }
1151
+ });
1152
+ });
1153
+ },
1154
+ /**
1155
+ *
1156
+ * @summary Get a specific target from a portfolio group
1157
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup under which to get the target asset.
1158
+ * @param {string} targetAssetId The ID of the TargetAsset to get.
1159
+ * @param {*} [options] Override http request option.
1160
+ * @throws {RequiredError}
1161
+ */
1162
+ getPortfolioTargetById: function (portfolioGroupId, targetAssetId, options) {
1163
+ if (options === void 0) { options = {}; }
1164
+ return __awaiter(_this, void 0, void 0, function () {
1165
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1166
+ return __generator(this, function (_a) {
1167
+ switch (_a.label) {
1168
+ case 0:
1169
+ // verify required parameter 'portfolioGroupId' is not null or undefined
1170
+ (0, common_1.assertParamExists)('getPortfolioTargetById', 'portfolioGroupId', portfolioGroupId);
1171
+ // verify required parameter 'targetAssetId' is not null or undefined
1172
+ (0, common_1.assertParamExists)('getPortfolioTargetById', 'targetAssetId', targetAssetId);
1173
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/targets/{targetAssetId}"
1174
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)))
1175
+ .replace("{".concat("targetAssetId", "}"), encodeURIComponent(String(targetAssetId)));
1176
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1177
+ if (configuration) {
1178
+ baseOptions = configuration.baseOptions;
1179
+ }
1180
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1181
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
1182
+ localVarQueryParameter = {};
1183
+ // authentication PartnerClientId required
1184
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
1185
+ // authentication PartnerSignature required
1186
+ ];
1187
+ case 1:
1188
+ // authentication PartnerClientId required
1189
+ _a.sent();
1190
+ // authentication PartnerSignature required
1191
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
1192
+ // authentication PartnerTimestamp required
1193
+ ];
1194
+ case 2:
1195
+ // authentication PartnerSignature required
1196
+ _a.sent();
1197
+ // authentication PartnerTimestamp required
1198
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
1199
+ case 3:
1200
+ // authentication PartnerTimestamp required
1201
+ _a.sent();
1202
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1203
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1204
+ (0, requestBeforeHook_1.requestBeforeHook)({
1205
+ queryParameters: localVarQueryParameter,
1206
+ requestConfig: localVarRequestOptions,
1207
+ path: localVarPath,
1208
+ configuration: configuration
1209
+ });
1210
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1211
+ return [2 /*return*/, {
1212
+ url: (0, common_1.toPathString)(localVarUrlObj),
1213
+ options: localVarRequestOptions,
1214
+ }];
1215
+ }
1216
+ });
1217
+ });
1218
+ },
1219
+ /**
1220
+ *
1221
+ * @summary Get all target assets under the specified PortfolioGroup.
1222
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup under which to create the target asset.
1223
+ * @param {*} [options] Override http request option.
1224
+ * @throws {RequiredError}
1225
+ */
1226
+ getPortfolioTargets: function (portfolioGroupId, options) {
1227
+ if (options === void 0) { options = {}; }
1228
+ return __awaiter(_this, void 0, void 0, function () {
1229
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1230
+ return __generator(this, function (_a) {
1231
+ switch (_a.label) {
1232
+ case 0:
1233
+ // verify required parameter 'portfolioGroupId' is not null or undefined
1234
+ (0, common_1.assertParamExists)('getPortfolioTargets', 'portfolioGroupId', portfolioGroupId);
1235
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/targets"
1236
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)));
1237
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1238
+ if (configuration) {
1239
+ baseOptions = configuration.baseOptions;
1240
+ }
1241
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1242
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
1243
+ localVarQueryParameter = {};
1244
+ // authentication PartnerClientId required
1245
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
1246
+ // authentication PartnerSignature required
1247
+ ];
1248
+ case 1:
1249
+ // authentication PartnerClientId required
1250
+ _a.sent();
1251
+ // authentication PartnerSignature required
1252
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
1253
+ // authentication PartnerTimestamp required
1254
+ ];
1255
+ case 2:
1256
+ // authentication PartnerSignature required
1257
+ _a.sent();
1258
+ // authentication PartnerTimestamp required
1259
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
1260
+ case 3:
1261
+ // authentication PartnerTimestamp required
1262
+ _a.sent();
1263
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1264
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1265
+ (0, requestBeforeHook_1.requestBeforeHook)({
1266
+ queryParameters: localVarQueryParameter,
1267
+ requestConfig: localVarRequestOptions,
1268
+ path: localVarPath,
1269
+ configuration: configuration
1270
+ });
1271
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1272
+ return [2 /*return*/, {
1273
+ url: (0, common_1.toPathString)(localVarUrlObj),
1274
+ options: localVarRequestOptions,
1275
+ }];
1276
+ }
1277
+ });
1278
+ });
1279
+ },
1280
+ /**
1281
+ *
1282
+ * @summary Get an array of excluded assets associated with a portfolio group\\
1283
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup under which the excluded assets are linked.
1284
+ * @param {*} [options] Override http request option.
1285
+ * @throws {RequiredError}
1286
+ */
1287
+ getPortoflioExcludedAssets: function (portfolioGroupId, options) {
1288
+ if (options === void 0) { options = {}; }
1289
+ return __awaiter(_this, void 0, void 0, function () {
1290
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1291
+ return __generator(this, function (_a) {
1292
+ switch (_a.label) {
1293
+ case 0:
1294
+ // verify required parameter 'portfolioGroupId' is not null or undefined
1295
+ (0, common_1.assertParamExists)('getPortoflioExcludedAssets', 'portfolioGroupId', portfolioGroupId);
1296
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/excludedassets"
1297
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)));
1298
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1299
+ if (configuration) {
1300
+ baseOptions = configuration.baseOptions;
1301
+ }
1302
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1303
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
1304
+ localVarQueryParameter = {};
1305
+ // authentication PartnerClientId required
1306
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
1307
+ // authentication PartnerSignature required
1308
+ ];
1309
+ case 1:
1310
+ // authentication PartnerClientId required
1311
+ _a.sent();
1312
+ // authentication PartnerSignature required
1313
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
1314
+ // authentication PartnerTimestamp required
1315
+ ];
1316
+ case 2:
1317
+ // authentication PartnerSignature required
1318
+ _a.sent();
1319
+ // authentication PartnerTimestamp required
1320
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
1321
+ case 3:
1322
+ // authentication PartnerTimestamp required
1323
+ _a.sent();
1324
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1325
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1326
+ (0, requestBeforeHook_1.requestBeforeHook)({
1327
+ queryParameters: localVarQueryParameter,
1328
+ requestConfig: localVarRequestOptions,
1329
+ path: localVarPath,
1330
+ configuration: configuration
1331
+ });
1332
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1333
+ return [2 /*return*/, {
1334
+ url: (0, common_1.toPathString)(localVarUrlObj),
1335
+ options: localVarRequestOptions,
1336
+ }];
1337
+ }
1338
+ });
1339
+ });
1340
+ },
1341
+ /**
1342
+ *
1343
+ * @summary Import target allocation based on portfolio group
1344
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup under which to create the target asset.
1345
+ * @param {*} [options] Override http request option.
1346
+ * @throws {RequiredError}
1347
+ */
1348
+ importModelPortfolio: function (portfolioGroupId, options) {
1349
+ if (options === void 0) { options = {}; }
1350
+ return __awaiter(_this, void 0, void 0, function () {
1351
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1352
+ return __generator(this, function (_a) {
1353
+ switch (_a.label) {
1354
+ case 0:
1355
+ // verify required parameter 'portfolioGroupId' is not null or undefined
1356
+ (0, common_1.assertParamExists)('importModelPortfolio', 'portfolioGroupId', portfolioGroupId);
1357
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/import"
1358
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)));
1359
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1360
+ if (configuration) {
1361
+ baseOptions = configuration.baseOptions;
1362
+ }
1363
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
1364
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
1365
+ localVarQueryParameter = {};
1366
+ // authentication PartnerClientId required
1367
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
1368
+ // authentication PartnerSignature required
1369
+ ];
1370
+ case 1:
1371
+ // authentication PartnerClientId required
1372
+ _a.sent();
1373
+ // authentication PartnerSignature required
1374
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
1375
+ // authentication PartnerTimestamp required
1376
+ ];
1377
+ case 2:
1378
+ // authentication PartnerSignature required
1379
+ _a.sent();
1380
+ // authentication PartnerTimestamp required
1381
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
1382
+ case 3:
1383
+ // authentication PartnerTimestamp required
1384
+ _a.sent();
1385
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1386
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1387
+ (0, requestBeforeHook_1.requestBeforeHook)({
1388
+ queryParameters: localVarQueryParameter,
1389
+ requestConfig: localVarRequestOptions,
1390
+ path: localVarPath,
1391
+ configuration: configuration
1392
+ });
1393
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1394
+ return [2 /*return*/, {
1395
+ url: (0, common_1.toPathString)(localVarUrlObj),
1396
+ options: localVarRequestOptions,
1397
+ }];
1398
+ }
1399
+ });
1400
+ });
1401
+ },
1402
+ /**
1403
+ *
1404
+ * @summary List all portfolio groups
1405
+ * @param {string} userId
1406
+ * @param {string} userSecret
1407
+ * @param {*} [options] Override http request option.
1408
+ * @throws {RequiredError}
1409
+ */
1410
+ list: function (userId, userSecret, options) {
1411
+ if (options === void 0) { options = {}; }
1412
+ return __awaiter(_this, void 0, void 0, function () {
1413
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1414
+ return __generator(this, function (_a) {
1415
+ switch (_a.label) {
1416
+ case 0:
1417
+ // verify required parameter 'userId' is not null or undefined
1418
+ (0, common_1.assertParamExists)('list', 'userId', userId);
1419
+ // verify required parameter 'userSecret' is not null or undefined
1420
+ (0, common_1.assertParamExists)('list', 'userSecret', userSecret);
1421
+ localVarPath = "/portfolioGroups";
1422
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1423
+ if (configuration) {
1424
+ baseOptions = configuration.baseOptions;
1425
+ }
1426
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1427
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
1428
+ localVarQueryParameter = {};
1429
+ // authentication PartnerClientId required
1430
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
1431
+ // authentication PartnerSignature required
1432
+ ];
1433
+ case 1:
1434
+ // authentication PartnerClientId required
1435
+ _a.sent();
1436
+ // authentication PartnerSignature required
1437
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
1438
+ // authentication PartnerTimestamp required
1439
+ ];
1440
+ case 2:
1441
+ // authentication PartnerSignature required
1442
+ _a.sent();
1443
+ // authentication PartnerTimestamp required
1444
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
1445
+ case 3:
1446
+ // authentication PartnerTimestamp required
1447
+ _a.sent();
1448
+ if (userId !== undefined) {
1449
+ localVarQueryParameter['userId'] = userId;
1450
+ }
1451
+ if (userSecret !== undefined) {
1452
+ localVarQueryParameter['userSecret'] = userSecret;
1453
+ }
1454
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1455
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1456
+ (0, requestBeforeHook_1.requestBeforeHook)({
1457
+ queryParameters: localVarQueryParameter,
1458
+ requestConfig: localVarRequestOptions,
1459
+ path: localVarPath,
1460
+ configuration: configuration
1461
+ });
1462
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1463
+ return [2 /*return*/, {
1464
+ url: (0, common_1.toPathString)(localVarUrlObj),
1465
+ options: localVarRequestOptions,
1466
+ }];
1467
+ }
1468
+ });
1469
+ });
1470
+ },
1471
+ /**
1472
+ *
1473
+ * @summary List of model asset class
1474
+ * @param {*} [options] Override http request option.
1475
+ * @throws {RequiredError}
1476
+ */
1477
+ listAssetClasses: function (options) {
1478
+ if (options === void 0) { options = {}; }
1479
+ return __awaiter(_this, void 0, void 0, function () {
1480
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1481
+ return __generator(this, function (_a) {
1482
+ switch (_a.label) {
1483
+ case 0:
1484
+ localVarPath = "/modelAssetClass";
1485
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1486
+ if (configuration) {
1487
+ baseOptions = configuration.baseOptions;
1488
+ }
1489
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1490
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
1491
+ localVarQueryParameter = {};
1492
+ // authentication PartnerClientId required
1493
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
1494
+ // authentication PartnerSignature required
1495
+ ];
1496
+ case 1:
1497
+ // authentication PartnerClientId required
1498
+ _a.sent();
1499
+ // authentication PartnerSignature required
1500
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
1501
+ // authentication PartnerTimestamp required
1502
+ ];
1503
+ case 2:
1504
+ // authentication PartnerSignature required
1505
+ _a.sent();
1506
+ // authentication PartnerTimestamp required
1507
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
1508
+ case 3:
1509
+ // authentication PartnerTimestamp required
1510
+ _a.sent();
1511
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1512
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1513
+ (0, requestBeforeHook_1.requestBeforeHook)({
1514
+ queryParameters: localVarQueryParameter,
1515
+ requestConfig: localVarRequestOptions,
1516
+ path: localVarPath,
1517
+ configuration: configuration
1518
+ });
1519
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1520
+ return [2 /*return*/, {
1521
+ url: (0, common_1.toPathString)(localVarUrlObj),
1522
+ options: localVarRequestOptions,
1523
+ }];
1524
+ }
1525
+ });
1526
+ });
1527
+ },
1528
+ /**
1529
+ *
1530
+ * @summary List of trades to make to rebalance portfolio group
1531
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup to perform rebalancing calculations
1532
+ * @param {*} [options] Override http request option.
1533
+ * @throws {RequiredError}
1534
+ */
1535
+ listCalculatedTrades: function (portfolioGroupId, options) {
1536
+ if (options === void 0) { options = {}; }
1537
+ return __awaiter(_this, void 0, void 0, function () {
1538
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1539
+ return __generator(this, function (_a) {
1540
+ switch (_a.label) {
1541
+ case 0:
1542
+ // verify required parameter 'portfolioGroupId' is not null or undefined
1543
+ (0, common_1.assertParamExists)('listCalculatedTrades', 'portfolioGroupId', portfolioGroupId);
1544
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/calculatedtrades"
1545
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)));
1546
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1547
+ if (configuration) {
1548
+ baseOptions = configuration.baseOptions;
1549
+ }
1550
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1551
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
1552
+ localVarQueryParameter = {};
1553
+ // authentication PartnerClientId required
1554
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
1555
+ // authentication PartnerSignature required
1556
+ ];
1557
+ case 1:
1558
+ // authentication PartnerClientId required
1559
+ _a.sent();
1560
+ // authentication PartnerSignature required
1561
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
1562
+ // authentication PartnerTimestamp required
1563
+ ];
1564
+ case 2:
1565
+ // authentication PartnerSignature required
1566
+ _a.sent();
1567
+ // authentication PartnerTimestamp required
1568
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
1569
+ case 3:
1570
+ // authentication PartnerTimestamp required
1571
+ _a.sent();
1572
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1573
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1574
+ (0, requestBeforeHook_1.requestBeforeHook)({
1575
+ queryParameters: localVarQueryParameter,
1576
+ requestConfig: localVarRequestOptions,
1577
+ path: localVarPath,
1578
+ configuration: configuration
1579
+ });
1580
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1581
+ return [2 /*return*/, {
1582
+ url: (0, common_1.toPathString)(localVarUrlObj),
1583
+ options: localVarRequestOptions,
1584
+ }];
1585
+ }
1586
+ });
1587
+ });
1588
+ },
1589
+ /**
1590
+ *
1591
+ * @summary List of model portfolio
1592
+ * @param {*} [options] Override http request option.
1593
+ * @throws {RequiredError}
1594
+ */
1595
+ listModelPortfolio: function (options) {
1596
+ if (options === void 0) { options = {}; }
1597
+ return __awaiter(_this, void 0, void 0, function () {
1598
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1599
+ return __generator(this, function (_a) {
1600
+ switch (_a.label) {
1601
+ case 0:
1602
+ localVarPath = "/modelPortfolio";
1603
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1604
+ if (configuration) {
1605
+ baseOptions = configuration.baseOptions;
1606
+ }
1607
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1608
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
1609
+ localVarQueryParameter = {};
1610
+ // authentication PartnerClientId required
1611
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
1612
+ // authentication PartnerSignature required
1613
+ ];
1614
+ case 1:
1615
+ // authentication PartnerClientId required
1616
+ _a.sent();
1617
+ // authentication PartnerSignature required
1618
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
1619
+ // authentication PartnerTimestamp required
1620
+ ];
1621
+ case 2:
1622
+ // authentication PartnerSignature required
1623
+ _a.sent();
1624
+ // authentication PartnerTimestamp required
1625
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
1626
+ case 3:
1627
+ // authentication PartnerTimestamp required
1628
+ _a.sent();
1629
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1630
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1631
+ (0, requestBeforeHook_1.requestBeforeHook)({
1632
+ queryParameters: localVarQueryParameter,
1633
+ requestConfig: localVarRequestOptions,
1634
+ path: localVarPath,
1635
+ configuration: configuration
1636
+ });
1637
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1638
+ return [2 /*return*/, {
1639
+ url: (0, common_1.toPathString)(localVarUrlObj),
1640
+ options: localVarRequestOptions,
1641
+ }];
1642
+ }
1643
+ });
1644
+ });
1645
+ },
1646
+ /**
1647
+ *
1648
+ * @summary Get all accounts associated with a portfolio group
1649
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup under which the accounts are linked.
1650
+ * @param {*} [options] Override http request option.
1651
+ * @throws {RequiredError}
1652
+ */
1653
+ listPortfolioAccounts: function (portfolioGroupId, options) {
1654
+ if (options === void 0) { options = {}; }
1655
+ return __awaiter(_this, void 0, void 0, function () {
1656
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1657
+ return __generator(this, function (_a) {
1658
+ switch (_a.label) {
1659
+ case 0:
1660
+ // verify required parameter 'portfolioGroupId' is not null or undefined
1661
+ (0, common_1.assertParamExists)('listPortfolioAccounts', 'portfolioGroupId', portfolioGroupId);
1662
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/accounts"
1663
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)));
1664
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1665
+ if (configuration) {
1666
+ baseOptions = configuration.baseOptions;
1667
+ }
1668
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1669
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
1670
+ localVarQueryParameter = {};
1671
+ // authentication PartnerClientId required
1672
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
1673
+ // authentication PartnerSignature required
1674
+ ];
1675
+ case 1:
1676
+ // authentication PartnerClientId required
1677
+ _a.sent();
1678
+ // authentication PartnerSignature required
1679
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
1680
+ // authentication PartnerTimestamp required
1681
+ ];
1682
+ case 2:
1683
+ // authentication PartnerSignature required
1684
+ _a.sent();
1685
+ // authentication PartnerTimestamp required
1686
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
1687
+ case 3:
1688
+ // authentication PartnerTimestamp required
1689
+ _a.sent();
1690
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1691
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1692
+ (0, requestBeforeHook_1.requestBeforeHook)({
1693
+ queryParameters: localVarQueryParameter,
1694
+ requestConfig: localVarRequestOptions,
1695
+ path: localVarPath,
1696
+ configuration: configuration
1697
+ });
1698
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1699
+ return [2 /*return*/, {
1700
+ url: (0, common_1.toPathString)(localVarUrlObj),
1701
+ options: localVarRequestOptions,
1702
+ }];
1703
+ }
1704
+ });
1705
+ });
1706
+ },
1707
+ /**
1708
+ *
1709
+ * @summary Updates model portfolio object
1710
+ * @param {string} modelPortfolioId The ID of the model portfolio to update.
1711
+ * @param {ModelPortfolioDetails} modelPortfolioDetails Use this endpoint change model asset class name and to add or remove a model portfolio security/model portfolio asset class. &lt;br /&gt;&lt;br /&gt; * The model portfolio name and model portfolio model type is required. &lt;br /&gt; * The model portfolio model type must be either 0 or 1. [0 -&gt; Securities based, 1 -&gt; Asset Class based] &lt;br /&gt;&lt;br /&gt; * If the model portfolio type is 0, the model portfolio asset class must be an empty array. &lt;br /&gt; * If the model portfolio type is 1, the model portfolio security must be an empty array. &lt;br /&gt;&lt;br /&gt; * When updating the model portfolio security, the percent is required. Only the symbol id is required for the symbol object &lt;br /&gt; * When updating the model portfolio asset classes, the percent is required. Only the model asset class id is required for the model asset class object &lt;br /&gt;&lt;br /&gt; * To remove all model portfolio securities or model portfolio asset class, set then to an empty array
1712
+ * @param {*} [options] Override http request option.
1713
+ * @throws {RequiredError}
1714
+ */
1715
+ modifyModelPortfolioById: function (modelPortfolioId, modelPortfolioDetails, options) {
1716
+ if (options === void 0) { options = {}; }
1717
+ return __awaiter(_this, void 0, void 0, function () {
1718
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1719
+ return __generator(this, function (_a) {
1720
+ switch (_a.label) {
1721
+ case 0:
1722
+ // verify required parameter 'modelPortfolioId' is not null or undefined
1723
+ (0, common_1.assertParamExists)('modifyModelPortfolioById', 'modelPortfolioId', modelPortfolioId);
1724
+ // verify required parameter 'modelPortfolioDetails' is not null or undefined
1725
+ (0, common_1.assertParamExists)('modifyModelPortfolioById', 'modelPortfolioDetails', modelPortfolioDetails);
1726
+ localVarPath = "/modelPortfolio/{modelPortfolioId}"
1727
+ .replace("{".concat("modelPortfolioId", "}"), encodeURIComponent(String(modelPortfolioId)));
1728
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1729
+ if (configuration) {
1730
+ baseOptions = configuration.baseOptions;
1731
+ }
1732
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
1733
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
1734
+ localVarQueryParameter = {};
1735
+ // authentication PartnerClientId required
1736
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
1737
+ // authentication PartnerSignature required
1738
+ ];
1739
+ case 1:
1740
+ // authentication PartnerClientId required
1741
+ _a.sent();
1742
+ // authentication PartnerSignature required
1743
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
1744
+ // authentication PartnerTimestamp required
1745
+ ];
1746
+ case 2:
1747
+ // authentication PartnerSignature required
1748
+ _a.sent();
1749
+ // authentication PartnerTimestamp required
1750
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
1751
+ case 3:
1752
+ // authentication PartnerTimestamp required
1753
+ _a.sent();
1754
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1755
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1756
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1757
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(modelPortfolioDetails, localVarRequestOptions, configuration);
1758
+ (0, requestBeforeHook_1.requestBeforeHook)({
1759
+ queryParameters: localVarQueryParameter,
1760
+ requestConfig: localVarRequestOptions,
1761
+ path: localVarPath,
1762
+ configuration: configuration
1763
+ });
1764
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1765
+ return [2 /*return*/, {
1766
+ url: (0, common_1.toPathString)(localVarUrlObj),
1767
+ options: localVarRequestOptions,
1768
+ }];
1769
+ }
1770
+ });
1771
+ });
1772
+ },
1773
+ /**
1774
+ *
1775
+ * @summary Update an existing target portfolio.
1776
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup to update.
1777
+ * @param {{ [key: string]: any; }} requestBody
1778
+ * @param {*} [options] Override http request option.
1779
+ * @throws {RequiredError}
1780
+ */
1781
+ savePortfolio: function (portfolioGroupId, requestBody, options) {
1782
+ if (options === void 0) { options = {}; }
1783
+ return __awaiter(_this, void 0, void 0, function () {
1784
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1785
+ return __generator(this, function (_a) {
1786
+ switch (_a.label) {
1787
+ case 0:
1788
+ // verify required parameter 'portfolioGroupId' is not null or undefined
1789
+ (0, common_1.assertParamExists)('savePortfolio', 'portfolioGroupId', portfolioGroupId);
1790
+ // verify required parameter 'requestBody' is not null or undefined
1791
+ (0, common_1.assertParamExists)('savePortfolio', 'requestBody', requestBody);
1792
+ localVarPath = "/portfolioGroups/{portfolioGroupId}"
1793
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)));
1794
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1795
+ if (configuration) {
1796
+ baseOptions = configuration.baseOptions;
1797
+ }
1798
+ localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
1799
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
1800
+ localVarQueryParameter = {};
1801
+ // authentication PartnerClientId required
1802
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
1803
+ // authentication PartnerSignature required
1804
+ ];
1805
+ case 1:
1806
+ // authentication PartnerClientId required
1807
+ _a.sent();
1808
+ // authentication PartnerSignature required
1809
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
1810
+ // authentication PartnerTimestamp required
1811
+ ];
1812
+ case 2:
1813
+ // authentication PartnerSignature required
1814
+ _a.sent();
1815
+ // authentication PartnerTimestamp required
1816
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
1817
+ case 3:
1818
+ // authentication PartnerTimestamp required
1819
+ _a.sent();
1820
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1821
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1822
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1823
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(requestBody, localVarRequestOptions, configuration);
1824
+ (0, requestBeforeHook_1.requestBeforeHook)({
1825
+ queryParameters: localVarQueryParameter,
1826
+ requestConfig: localVarRequestOptions,
1827
+ path: localVarPath,
1828
+ configuration: configuration
1829
+ });
1830
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1831
+ return [2 /*return*/, {
1832
+ url: (0, common_1.toPathString)(localVarUrlObj),
1833
+ options: localVarRequestOptions,
1834
+ }];
1835
+ }
1836
+ });
1837
+ });
1838
+ },
1839
+ /**
1840
+ *
1841
+ * @summary Search for symbols limited to brokerages under the specified portfolio group
1842
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup to search under
1843
+ * @param {SymbolQuery} [symbolQuery]
1844
+ * @param {*} [options] Override http request option.
1845
+ * @throws {RequiredError}
1846
+ */
1847
+ searchPortfolioSymbols: function (portfolioGroupId, symbolQuery, options) {
1848
+ if (options === void 0) { options = {}; }
1849
+ return __awaiter(_this, void 0, void 0, function () {
1850
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1851
+ return __generator(this, function (_a) {
1852
+ switch (_a.label) {
1853
+ case 0:
1854
+ // verify required parameter 'portfolioGroupId' is not null or undefined
1855
+ (0, common_1.assertParamExists)('searchPortfolioSymbols', 'portfolioGroupId', portfolioGroupId);
1856
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/symbols"
1857
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)));
1858
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1859
+ if (configuration) {
1860
+ baseOptions = configuration.baseOptions;
1861
+ }
1862
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
1863
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
1864
+ localVarQueryParameter = {};
1865
+ // authentication PartnerClientId required
1866
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
1867
+ // authentication PartnerSignature required
1868
+ ];
1869
+ case 1:
1870
+ // authentication PartnerClientId required
1871
+ _a.sent();
1872
+ // authentication PartnerSignature required
1873
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
1874
+ // authentication PartnerTimestamp required
1875
+ ];
1876
+ case 2:
1877
+ // authentication PartnerSignature required
1878
+ _a.sent();
1879
+ // authentication PartnerTimestamp required
1880
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
1881
+ case 3:
1882
+ // authentication PartnerTimestamp required
1883
+ _a.sent();
1884
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1885
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1886
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1887
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(symbolQuery, localVarRequestOptions, configuration);
1888
+ (0, requestBeforeHook_1.requestBeforeHook)({
1889
+ queryParameters: localVarQueryParameter,
1890
+ requestConfig: localVarRequestOptions,
1891
+ path: localVarPath,
1892
+ configuration: configuration
1893
+ });
1894
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1895
+ return [2 /*return*/, {
1896
+ url: (0, common_1.toPathString)(localVarUrlObj),
1897
+ options: localVarRequestOptions,
1898
+ }];
1899
+ }
1900
+ });
1901
+ });
1902
+ },
1903
+ /**
1904
+ *
1905
+ * @summary Set a new list of target assets under the specified PortfolioGroup. All existing target assets under this portfolio group will be replaced with the new list.
1906
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup under which to create the target asset.
1907
+ * @param {Array<TargetAsset>} [targetAsset]
1908
+ * @param {*} [options] Override http request option.
1909
+ * @throws {RequiredError}
1910
+ */
1911
+ setPortfolioTargets: function (portfolioGroupId, targetAsset, options) {
1912
+ if (options === void 0) { options = {}; }
1913
+ return __awaiter(_this, void 0, void 0, function () {
1914
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1915
+ return __generator(this, function (_a) {
1916
+ switch (_a.label) {
1917
+ case 0:
1918
+ // verify required parameter 'portfolioGroupId' is not null or undefined
1919
+ (0, common_1.assertParamExists)('setPortfolioTargets', 'portfolioGroupId', portfolioGroupId);
1920
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/targets"
1921
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)));
1922
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1923
+ if (configuration) {
1924
+ baseOptions = configuration.baseOptions;
1925
+ }
1926
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
1927
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
1928
+ localVarQueryParameter = {};
1929
+ // authentication PartnerClientId required
1930
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
1931
+ // authentication PartnerSignature required
1932
+ ];
1933
+ case 1:
1934
+ // authentication PartnerClientId required
1935
+ _a.sent();
1936
+ // authentication PartnerSignature required
1937
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
1938
+ // authentication PartnerTimestamp required
1939
+ ];
1940
+ case 2:
1941
+ // authentication PartnerSignature required
1942
+ _a.sent();
1943
+ // authentication PartnerTimestamp required
1944
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
1945
+ case 3:
1946
+ // authentication PartnerTimestamp required
1947
+ _a.sent();
1948
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1949
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1950
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1951
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(targetAsset, localVarRequestOptions, configuration);
1952
+ (0, requestBeforeHook_1.requestBeforeHook)({
1953
+ queryParameters: localVarQueryParameter,
1954
+ requestConfig: localVarRequestOptions,
1955
+ path: localVarPath,
1956
+ configuration: configuration
1957
+ });
1958
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1959
+ return [2 /*return*/, {
1960
+ url: (0, common_1.toPathString)(localVarUrlObj),
1961
+ options: localVarRequestOptions,
1962
+ }];
1963
+ }
1964
+ });
1965
+ });
1966
+ },
1967
+ /**
1968
+ *
1969
+ * @summary Updates model asset class objects
1970
+ * @param {string} modelAssetClassId The ID of the model asset class to update.
1971
+ * @param {ModelAssetClassDetails} modelAssetClassDetails Use this endpoint change model asset class name and to add or remove a model asset class target. &lt;br /&gt;&lt;br /&gt; * Only the model asset class name is required for the model asset class object. &lt;br /&gt; * Only the symbol id is required for the symbol object in the model asset class target object. &lt;br /&gt; * To remove all model asset class targets, set the model asset class target as an empty array
1972
+ * @param {*} [options] Override http request option.
1973
+ * @throws {RequiredError}
1974
+ */
1975
+ updateAssetClass: function (modelAssetClassId, modelAssetClassDetails, options) {
1976
+ if (options === void 0) { options = {}; }
1977
+ return __awaiter(_this, void 0, void 0, function () {
1978
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1979
+ return __generator(this, function (_a) {
1980
+ switch (_a.label) {
1981
+ case 0:
1982
+ // verify required parameter 'modelAssetClassId' is not null or undefined
1983
+ (0, common_1.assertParamExists)('updateAssetClass', 'modelAssetClassId', modelAssetClassId);
1984
+ // verify required parameter 'modelAssetClassDetails' is not null or undefined
1985
+ (0, common_1.assertParamExists)('updateAssetClass', 'modelAssetClassDetails', modelAssetClassDetails);
1986
+ localVarPath = "/modelAssetClass/{modelAssetClassId}"
1987
+ .replace("{".concat("modelAssetClassId", "}"), encodeURIComponent(String(modelAssetClassId)));
1988
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1989
+ if (configuration) {
1990
+ baseOptions = configuration.baseOptions;
1991
+ }
1992
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
1993
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
1994
+ localVarQueryParameter = {};
1995
+ // authentication PartnerClientId required
1996
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
1997
+ // authentication PartnerSignature required
1998
+ ];
1999
+ case 1:
2000
+ // authentication PartnerClientId required
2001
+ _a.sent();
2002
+ // authentication PartnerSignature required
2003
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
2004
+ // authentication PartnerTimestamp required
2005
+ ];
2006
+ case 2:
2007
+ // authentication PartnerSignature required
2008
+ _a.sent();
2009
+ // authentication PartnerTimestamp required
2010
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
2011
+ case 3:
2012
+ // authentication PartnerTimestamp required
2013
+ _a.sent();
2014
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2015
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2016
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2017
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(modelAssetClassDetails, localVarRequestOptions, configuration);
2018
+ (0, requestBeforeHook_1.requestBeforeHook)({
2019
+ queryParameters: localVarQueryParameter,
2020
+ requestConfig: localVarRequestOptions,
2021
+ path: localVarPath,
2022
+ configuration: configuration
2023
+ });
2024
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2025
+ return [2 /*return*/, {
2026
+ url: (0, common_1.toPathString)(localVarUrlObj),
2027
+ options: localVarRequestOptions,
2028
+ }];
2029
+ }
2030
+ });
2031
+ });
2032
+ },
2033
+ /**
2034
+ *
2035
+ * @summary Updates portfolio group settings
2036
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup under which to patch the settings.
2037
+ * @param {*} [options] Override http request option.
2038
+ * @throws {RequiredError}
2039
+ */
2040
+ updatePortfolioSettings: function (portfolioGroupId, options) {
2041
+ if (options === void 0) { options = {}; }
2042
+ return __awaiter(_this, void 0, void 0, function () {
2043
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
2044
+ return __generator(this, function (_a) {
2045
+ switch (_a.label) {
2046
+ case 0:
2047
+ // verify required parameter 'portfolioGroupId' is not null or undefined
2048
+ (0, common_1.assertParamExists)('updatePortfolioSettings', 'portfolioGroupId', portfolioGroupId);
2049
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/settings"
2050
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)));
2051
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2052
+ if (configuration) {
2053
+ baseOptions = configuration.baseOptions;
2054
+ }
2055
+ localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
2056
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
2057
+ localVarQueryParameter = {};
2058
+ // authentication PartnerClientId required
2059
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
2060
+ // authentication PartnerSignature required
2061
+ ];
2062
+ case 1:
2063
+ // authentication PartnerClientId required
2064
+ _a.sent();
2065
+ // authentication PartnerSignature required
2066
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
2067
+ // authentication PartnerTimestamp required
2068
+ ];
2069
+ case 2:
2070
+ // authentication PartnerSignature required
2071
+ _a.sent();
2072
+ // authentication PartnerTimestamp required
2073
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
2074
+ case 3:
2075
+ // authentication PartnerTimestamp required
2076
+ _a.sent();
2077
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2078
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2079
+ (0, requestBeforeHook_1.requestBeforeHook)({
2080
+ queryParameters: localVarQueryParameter,
2081
+ requestConfig: localVarRequestOptions,
2082
+ path: localVarPath,
2083
+ configuration: configuration
2084
+ });
2085
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2086
+ return [2 /*return*/, {
2087
+ url: (0, common_1.toPathString)(localVarUrlObj),
2088
+ options: localVarRequestOptions,
2089
+ }];
2090
+ }
2091
+ });
2092
+ });
2093
+ },
2094
+ /**
2095
+ *
2096
+ * @summary Update a TargetAsset under the specified PortfolioGroup.
2097
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup under which to patch the target asset.
2098
+ * @param {string} targetAssetId The ID of the TargetAsset to patch.
2099
+ * @param {TargetAsset} targetAsset
2100
+ * @param {*} [options] Override http request option.
2101
+ * @throws {RequiredError}
2102
+ */
2103
+ updatePortfolioTargetById: function (portfolioGroupId, targetAssetId, targetAsset, options) {
2104
+ if (options === void 0) { options = {}; }
2105
+ return __awaiter(_this, void 0, void 0, function () {
2106
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
2107
+ return __generator(this, function (_a) {
2108
+ switch (_a.label) {
2109
+ case 0:
2110
+ // verify required parameter 'portfolioGroupId' is not null or undefined
2111
+ (0, common_1.assertParamExists)('updatePortfolioTargetById', 'portfolioGroupId', portfolioGroupId);
2112
+ // verify required parameter 'targetAssetId' is not null or undefined
2113
+ (0, common_1.assertParamExists)('updatePortfolioTargetById', 'targetAssetId', targetAssetId);
2114
+ // verify required parameter 'targetAsset' is not null or undefined
2115
+ (0, common_1.assertParamExists)('updatePortfolioTargetById', 'targetAsset', targetAsset);
2116
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/targets/{targetAssetId}"
2117
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)))
2118
+ .replace("{".concat("targetAssetId", "}"), encodeURIComponent(String(targetAssetId)));
2119
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2120
+ if (configuration) {
2121
+ baseOptions = configuration.baseOptions;
2122
+ }
2123
+ localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
2124
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
2125
+ localVarQueryParameter = {};
2126
+ // authentication PartnerClientId required
2127
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
2128
+ // authentication PartnerSignature required
2129
+ ];
2130
+ case 1:
2131
+ // authentication PartnerClientId required
2132
+ _a.sent();
2133
+ // authentication PartnerSignature required
2134
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
2135
+ // authentication PartnerTimestamp required
2136
+ ];
2137
+ case 2:
2138
+ // authentication PartnerSignature required
2139
+ _a.sent();
2140
+ // authentication PartnerTimestamp required
2141
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
2142
+ case 3:
2143
+ // authentication PartnerTimestamp required
2144
+ _a.sent();
2145
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2146
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2147
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2148
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(targetAsset, localVarRequestOptions, configuration);
2149
+ (0, requestBeforeHook_1.requestBeforeHook)({
2150
+ queryParameters: localVarQueryParameter,
2151
+ requestConfig: localVarRequestOptions,
2152
+ path: localVarPath,
2153
+ configuration: configuration
2154
+ });
2155
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2156
+ return [2 /*return*/, {
2157
+ url: (0, common_1.toPathString)(localVarUrlObj),
2158
+ options: localVarRequestOptions,
2159
+ }];
2160
+ }
2161
+ });
2162
+ });
2163
+ },
2164
+ };
2165
+ };
2166
+ exports.PortfolioManagementApiAxiosParamCreator = PortfolioManagementApiAxiosParamCreator;
2167
+ /**
2168
+ * PortfolioManagementApi - functional programming interface
2169
+ * @export
2170
+ */
2171
+ var PortfolioManagementApiFp = function (configuration) {
2172
+ var localVarAxiosParamCreator = (0, exports.PortfolioManagementApiAxiosParamCreator)(configuration);
2173
+ return {
2174
+ /**
2175
+ *
2176
+ * @summary Adds an asset to exclude to a portfolio group
2177
+ * @param {PortfolioManagementApiAddPortfolioExcludedAssetRequest} requestParameters Request parameters.
2178
+ * @param {*} [options] Override http request option.
2179
+ * @throws {RequiredError}
2180
+ */
2181
+ addPortfolioExcludedAsset: function (requestParameters, options) {
2182
+ return __awaiter(this, void 0, void 0, function () {
2183
+ var localVarAxiosArgs;
2184
+ return __generator(this, function (_a) {
2185
+ switch (_a.label) {
2186
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.addPortfolioExcludedAsset(requestParameters.portfolioGroupId, requestParameters.requestBody, options)];
2187
+ case 1:
2188
+ localVarAxiosArgs = _a.sent();
2189
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2190
+ }
2191
+ });
2192
+ });
2193
+ },
2194
+ /**
2195
+ *
2196
+ * @summary Create new portfolio group
2197
+ * @param {PortfolioManagementApiCreateRequest} requestParameters Request parameters.
2198
+ * @param {*} [options] Override http request option.
2199
+ * @throws {RequiredError}
2200
+ */
2201
+ create: function (requestParameters, options) {
2202
+ return __awaiter(this, void 0, void 0, function () {
2203
+ var localVarAxiosArgs;
2204
+ return __generator(this, function (_a) {
2205
+ switch (_a.label) {
2206
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.create(requestParameters.userId, requestParameters.userSecret, requestParameters.requestBody, options)];
2207
+ case 1:
2208
+ localVarAxiosArgs = _a.sent();
2209
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2210
+ }
2211
+ });
2212
+ });
2213
+ },
2214
+ /**
2215
+ *
2216
+ * @summary Create a new model asset class
2217
+ * @param {*} [options] Override http request option.
2218
+ * @throws {RequiredError}
2219
+ */
2220
+ createAssetClass: function (options) {
2221
+ return __awaiter(this, void 0, void 0, function () {
2222
+ var localVarAxiosArgs;
2223
+ return __generator(this, function (_a) {
2224
+ switch (_a.label) {
2225
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createAssetClass(options)];
2226
+ case 1:
2227
+ localVarAxiosArgs = _a.sent();
2228
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2229
+ }
2230
+ });
2231
+ });
2232
+ },
2233
+ /**
2234
+ *
2235
+ * @summary Creates a new model portfolio
2236
+ * @param {*} [options] Override http request option.
2237
+ * @throws {RequiredError}
2238
+ */
2239
+ createModelPortfolio: function (options) {
2240
+ return __awaiter(this, void 0, void 0, function () {
2241
+ var localVarAxiosArgs;
2242
+ return __generator(this, function (_a) {
2243
+ switch (_a.label) {
2244
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createModelPortfolio(options)];
2245
+ case 1:
2246
+ localVarAxiosArgs = _a.sent();
2247
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2248
+ }
2249
+ });
2250
+ });
2251
+ },
2252
+ /**
2253
+ *
2254
+ * @summary Deletes a model asset class
2255
+ * @param {PortfolioManagementApiDeleteAssetClassRequest} requestParameters Request parameters.
2256
+ * @param {*} [options] Override http request option.
2257
+ * @throws {RequiredError}
2258
+ */
2259
+ deleteAssetClass: function (requestParameters, options) {
2260
+ return __awaiter(this, void 0, void 0, function () {
2261
+ var localVarAxiosArgs;
2262
+ return __generator(this, function (_a) {
2263
+ switch (_a.label) {
2264
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteAssetClass(requestParameters.modelAssetClassId, options)];
2265
+ case 1:
2266
+ localVarAxiosArgs = _a.sent();
2267
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2268
+ }
2269
+ });
2270
+ });
2271
+ },
2272
+ /**
2273
+ *
2274
+ * @summary Unexclude an asset from a portfolio group
2275
+ * @param {PortfolioManagementApiDeleteExcludedAssetRequest} requestParameters Request parameters.
2276
+ * @param {*} [options] Override http request option.
2277
+ * @throws {RequiredError}
2278
+ */
2279
+ deleteExcludedAsset: function (requestParameters, options) {
2280
+ return __awaiter(this, void 0, void 0, function () {
2281
+ var localVarAxiosArgs;
2282
+ return __generator(this, function (_a) {
2283
+ switch (_a.label) {
2284
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteExcludedAsset(requestParameters.portfolioGroupId, requestParameters.symbolId, options)];
2285
+ case 1:
2286
+ localVarAxiosArgs = _a.sent();
2287
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2288
+ }
2289
+ });
2290
+ });
2291
+ },
2292
+ /**
2293
+ *
2294
+ * @summary Deletes a model portfolio
2295
+ * @param {PortfolioManagementApiDeleteModelPortfolioByIdRequest} requestParameters Request parameters.
2296
+ * @param {*} [options] Override http request option.
2297
+ * @throws {RequiredError}
2298
+ */
2299
+ deleteModelPortfolioById: function (requestParameters, options) {
2300
+ return __awaiter(this, void 0, void 0, function () {
2301
+ var localVarAxiosArgs;
2302
+ return __generator(this, function (_a) {
2303
+ switch (_a.label) {
2304
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteModelPortfolioById(requestParameters.modelPortfolioId, options)];
2305
+ case 1:
2306
+ localVarAxiosArgs = _a.sent();
2307
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2308
+ }
2309
+ });
2310
+ });
2311
+ },
2312
+ /**
2313
+ *
2314
+ * @summary Remove a target portfolio.
2315
+ * @param {PortfolioManagementApiDeletePortfoliRequest} requestParameters Request parameters.
2316
+ * @param {*} [options] Override http request option.
2317
+ * @throws {RequiredError}
2318
+ */
2319
+ deletePortfoli: function (requestParameters, options) {
2320
+ return __awaiter(this, void 0, void 0, function () {
2321
+ var localVarAxiosArgs;
2322
+ return __generator(this, function (_a) {
2323
+ switch (_a.label) {
2324
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deletePortfoli(requestParameters.portfolioGroupId, options)];
2325
+ case 1:
2326
+ localVarAxiosArgs = _a.sent();
2327
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2328
+ }
2329
+ });
2330
+ });
2331
+ },
2332
+ /**
2333
+ *
2334
+ * @summary Remove a TargetAsset.
2335
+ * @param {PortfolioManagementApiDeletePortfolioTargetByIdRequest} requestParameters Request parameters.
2336
+ * @param {*} [options] Override http request option.
2337
+ * @throws {RequiredError}
2338
+ */
2339
+ deletePortfolioTargetById: function (requestParameters, options) {
2340
+ return __awaiter(this, void 0, void 0, function () {
2341
+ var localVarAxiosArgs;
2342
+ return __generator(this, function (_a) {
2343
+ switch (_a.label) {
2344
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deletePortfolioTargetById(requestParameters.portfolioGroupId, requestParameters.targetAssetId, options)];
2345
+ case 1:
2346
+ localVarAxiosArgs = _a.sent();
2347
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2348
+ }
2349
+ });
2350
+ });
2351
+ },
2352
+ /**
2353
+ *
2354
+ * @summary Get details of a model asset class
2355
+ * @param {PortfolioManagementApiDetailAssetClassRequest} requestParameters Request parameters.
2356
+ * @param {*} [options] Override http request option.
2357
+ * @throws {RequiredError}
2358
+ */
2359
+ detailAssetClass: function (requestParameters, options) {
2360
+ return __awaiter(this, void 0, void 0, function () {
2361
+ var localVarAxiosArgs;
2362
+ return __generator(this, function (_a) {
2363
+ switch (_a.label) {
2364
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.detailAssetClass(requestParameters.modelAssetClassId, options)];
2365
+ case 1:
2366
+ localVarAxiosArgs = _a.sent();
2367
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2368
+ }
2369
+ });
2370
+ });
2371
+ },
2372
+ /**
2373
+ *
2374
+ * @summary Return an individual trade
2375
+ * @param {PortfolioManagementApiGetCalculatedTradeByIdRequest} requestParameters Request parameters.
2376
+ * @param {*} [options] Override http request option.
2377
+ * @throws {RequiredError}
2378
+ */
2379
+ getCalculatedTradeById: function (requestParameters, options) {
2380
+ return __awaiter(this, void 0, void 0, function () {
2381
+ var localVarAxiosArgs;
2382
+ return __generator(this, function (_a) {
2383
+ switch (_a.label) {
2384
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getCalculatedTradeById(requestParameters.portfolioGroupId, requestParameters.calculatedTradeId, requestParameters.tradeId, options)];
2385
+ case 1:
2386
+ localVarAxiosArgs = _a.sent();
2387
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2388
+ }
2389
+ });
2390
+ });
2391
+ },
2392
+ /**
2393
+ *
2394
+ * @summary Get details of a model portfolio
2395
+ * @param {PortfolioManagementApiGetModelDetailsByIdRequest} requestParameters Request parameters.
2396
+ * @param {*} [options] Override http request option.
2397
+ * @throws {RequiredError}
2398
+ */
2399
+ getModelDetailsById: function (requestParameters, options) {
2400
+ return __awaiter(this, void 0, void 0, function () {
2401
+ var localVarAxiosArgs;
2402
+ return __generator(this, function (_a) {
2403
+ switch (_a.label) {
2404
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getModelDetailsById(requestParameters.modelPortfolioId, options)];
2405
+ case 1:
2406
+ localVarAxiosArgs = _a.sent();
2407
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2408
+ }
2409
+ });
2410
+ });
2411
+ },
2412
+ /**
2413
+ *
2414
+ * @summary Get sum of cash balances in portfolio group
2415
+ * @param {PortfolioManagementApiGetPortfolioBalancesRequest} requestParameters Request parameters.
2416
+ * @param {*} [options] Override http request option.
2417
+ * @throws {RequiredError}
2418
+ */
2419
+ getPortfolioBalances: function (requestParameters, options) {
2420
+ return __awaiter(this, void 0, void 0, function () {
2421
+ var localVarAxiosArgs;
2422
+ return __generator(this, function (_a) {
2423
+ switch (_a.label) {
2424
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPortfolioBalances(requestParameters.portfolioGroupId, options)];
2425
+ case 1:
2426
+ localVarAxiosArgs = _a.sent();
2427
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2428
+ }
2429
+ });
2430
+ });
2431
+ },
2432
+ /**
2433
+ *
2434
+ * @summary Get details of a target portfolio
2435
+ * @param {PortfolioManagementApiGetPortfolioDetailsByIdRequest} requestParameters Request parameters.
2436
+ * @param {*} [options] Override http request option.
2437
+ * @throws {RequiredError}
2438
+ */
2439
+ getPortfolioDetailsById: function (requestParameters, options) {
2440
+ return __awaiter(this, void 0, void 0, function () {
2441
+ var localVarAxiosArgs;
2442
+ return __generator(this, function (_a) {
2443
+ switch (_a.label) {
2444
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPortfolioDetailsById(requestParameters.portfolioGroupId, options)];
2445
+ case 1:
2446
+ localVarAxiosArgs = _a.sent();
2447
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2448
+ }
2449
+ });
2450
+ });
2451
+ },
2452
+ /**
2453
+ *
2454
+ * @summary Return a whole bunch of relevant information relating to a portfolio group.
2455
+ * @param {PortfolioManagementApiGetPortfolioInfoRequest} requestParameters Request parameters.
2456
+ * @param {*} [options] Override http request option.
2457
+ * @throws {RequiredError}
2458
+ */
2459
+ getPortfolioInfo: function (requestParameters, options) {
2460
+ return __awaiter(this, void 0, void 0, function () {
2461
+ var localVarAxiosArgs;
2462
+ return __generator(this, function (_a) {
2463
+ switch (_a.label) {
2464
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPortfolioInfo(requestParameters.portfolioGroupId, options)];
2465
+ case 1:
2466
+ localVarAxiosArgs = _a.sent();
2467
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2468
+ }
2469
+ });
2470
+ });
2471
+ },
2472
+ /**
2473
+ *
2474
+ * @summary Get total of each postions owned in portfolio group
2475
+ * @param {PortfolioManagementApiGetPortfolioPositionsRequest} requestParameters Request parameters.
2476
+ * @param {*} [options] Override http request option.
2477
+ * @throws {RequiredError}
2478
+ */
2479
+ getPortfolioPositions: function (requestParameters, options) {
2480
+ return __awaiter(this, void 0, void 0, function () {
2481
+ var localVarAxiosArgs;
2482
+ return __generator(this, function (_a) {
2483
+ switch (_a.label) {
2484
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPortfolioPositions(requestParameters.portfolioGroupId, options)];
2485
+ case 1:
2486
+ localVarAxiosArgs = _a.sent();
2487
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2488
+ }
2489
+ });
2490
+ });
2491
+ },
2492
+ /**
2493
+ *
2494
+ * @summary Get portfolio group settings
2495
+ * @param {PortfolioManagementApiGetPortfolioSettingsRequest} requestParameters Request parameters.
2496
+ * @param {*} [options] Override http request option.
2497
+ * @throws {RequiredError}
2498
+ */
2499
+ getPortfolioSettings: function (requestParameters, options) {
2500
+ return __awaiter(this, void 0, void 0, function () {
2501
+ var localVarAxiosArgs;
2502
+ return __generator(this, function (_a) {
2503
+ switch (_a.label) {
2504
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPortfolioSettings(requestParameters.portfolioGroupId, options)];
2505
+ case 1:
2506
+ localVarAxiosArgs = _a.sent();
2507
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2508
+ }
2509
+ });
2510
+ });
2511
+ },
2512
+ /**
2513
+ *
2514
+ * @summary Get a specific target from a portfolio group
2515
+ * @param {PortfolioManagementApiGetPortfolioTargetByIdRequest} requestParameters Request parameters.
2516
+ * @param {*} [options] Override http request option.
2517
+ * @throws {RequiredError}
2518
+ */
2519
+ getPortfolioTargetById: function (requestParameters, options) {
2520
+ return __awaiter(this, void 0, void 0, function () {
2521
+ var localVarAxiosArgs;
2522
+ return __generator(this, function (_a) {
2523
+ switch (_a.label) {
2524
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPortfolioTargetById(requestParameters.portfolioGroupId, requestParameters.targetAssetId, options)];
2525
+ case 1:
2526
+ localVarAxiosArgs = _a.sent();
2527
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2528
+ }
2529
+ });
2530
+ });
2531
+ },
2532
+ /**
2533
+ *
2534
+ * @summary Get all target assets under the specified PortfolioGroup.
2535
+ * @param {PortfolioManagementApiGetPortfolioTargetsRequest} requestParameters Request parameters.
2536
+ * @param {*} [options] Override http request option.
2537
+ * @throws {RequiredError}
2538
+ */
2539
+ getPortfolioTargets: function (requestParameters, options) {
2540
+ return __awaiter(this, void 0, void 0, function () {
2541
+ var localVarAxiosArgs;
2542
+ return __generator(this, function (_a) {
2543
+ switch (_a.label) {
2544
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPortfolioTargets(requestParameters.portfolioGroupId, options)];
2545
+ case 1:
2546
+ localVarAxiosArgs = _a.sent();
2547
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2548
+ }
2549
+ });
2550
+ });
2551
+ },
2552
+ /**
2553
+ *
2554
+ * @summary Get an array of excluded assets associated with a portfolio group\\
2555
+ * @param {PortfolioManagementApiGetPortoflioExcludedAssetsRequest} requestParameters Request parameters.
2556
+ * @param {*} [options] Override http request option.
2557
+ * @throws {RequiredError}
2558
+ */
2559
+ getPortoflioExcludedAssets: function (requestParameters, options) {
2560
+ return __awaiter(this, void 0, void 0, function () {
2561
+ var localVarAxiosArgs;
2562
+ return __generator(this, function (_a) {
2563
+ switch (_a.label) {
2564
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPortoflioExcludedAssets(requestParameters.portfolioGroupId, options)];
2565
+ case 1:
2566
+ localVarAxiosArgs = _a.sent();
2567
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2568
+ }
2569
+ });
2570
+ });
2571
+ },
2572
+ /**
2573
+ *
2574
+ * @summary Import target allocation based on portfolio group
2575
+ * @param {PortfolioManagementApiImportModelPortfolioRequest} requestParameters Request parameters.
2576
+ * @param {*} [options] Override http request option.
2577
+ * @throws {RequiredError}
2578
+ */
2579
+ importModelPortfolio: function (requestParameters, options) {
2580
+ return __awaiter(this, void 0, void 0, function () {
2581
+ var localVarAxiosArgs;
2582
+ return __generator(this, function (_a) {
2583
+ switch (_a.label) {
2584
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.importModelPortfolio(requestParameters.portfolioGroupId, options)];
2585
+ case 1:
2586
+ localVarAxiosArgs = _a.sent();
2587
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2588
+ }
2589
+ });
2590
+ });
2591
+ },
2592
+ /**
2593
+ *
2594
+ * @summary List all portfolio groups
2595
+ * @param {PortfolioManagementApiListRequest} requestParameters Request parameters.
2596
+ * @param {*} [options] Override http request option.
2597
+ * @throws {RequiredError}
2598
+ */
2599
+ list: function (requestParameters, options) {
2600
+ return __awaiter(this, void 0, void 0, function () {
2601
+ var localVarAxiosArgs;
2602
+ return __generator(this, function (_a) {
2603
+ switch (_a.label) {
2604
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.list(requestParameters.userId, requestParameters.userSecret, options)];
2605
+ case 1:
2606
+ localVarAxiosArgs = _a.sent();
2607
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2608
+ }
2609
+ });
2610
+ });
2611
+ },
2612
+ /**
2613
+ *
2614
+ * @summary List of model asset class
2615
+ * @param {*} [options] Override http request option.
2616
+ * @throws {RequiredError}
2617
+ */
2618
+ listAssetClasses: function (options) {
2619
+ return __awaiter(this, void 0, void 0, function () {
2620
+ var localVarAxiosArgs;
2621
+ return __generator(this, function (_a) {
2622
+ switch (_a.label) {
2623
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listAssetClasses(options)];
2624
+ case 1:
2625
+ localVarAxiosArgs = _a.sent();
2626
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2627
+ }
2628
+ });
2629
+ });
2630
+ },
2631
+ /**
2632
+ *
2633
+ * @summary List of trades to make to rebalance portfolio group
2634
+ * @param {PortfolioManagementApiListCalculatedTradesRequest} requestParameters Request parameters.
2635
+ * @param {*} [options] Override http request option.
2636
+ * @throws {RequiredError}
2637
+ */
2638
+ listCalculatedTrades: function (requestParameters, options) {
2639
+ return __awaiter(this, void 0, void 0, function () {
2640
+ var localVarAxiosArgs;
2641
+ return __generator(this, function (_a) {
2642
+ switch (_a.label) {
2643
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listCalculatedTrades(requestParameters.portfolioGroupId, options)];
2644
+ case 1:
2645
+ localVarAxiosArgs = _a.sent();
2646
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2647
+ }
2648
+ });
2649
+ });
2650
+ },
2651
+ /**
2652
+ *
2653
+ * @summary List of model portfolio
2654
+ * @param {*} [options] Override http request option.
2655
+ * @throws {RequiredError}
2656
+ */
2657
+ listModelPortfolio: function (options) {
2658
+ return __awaiter(this, void 0, void 0, function () {
2659
+ var localVarAxiosArgs;
2660
+ return __generator(this, function (_a) {
2661
+ switch (_a.label) {
2662
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listModelPortfolio(options)];
2663
+ case 1:
2664
+ localVarAxiosArgs = _a.sent();
2665
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2666
+ }
2667
+ });
2668
+ });
2669
+ },
2670
+ /**
2671
+ *
2672
+ * @summary Get all accounts associated with a portfolio group
2673
+ * @param {PortfolioManagementApiListPortfolioAccountsRequest} requestParameters Request parameters.
2674
+ * @param {*} [options] Override http request option.
2675
+ * @throws {RequiredError}
2676
+ */
2677
+ listPortfolioAccounts: function (requestParameters, options) {
2678
+ return __awaiter(this, void 0, void 0, function () {
2679
+ var localVarAxiosArgs;
2680
+ return __generator(this, function (_a) {
2681
+ switch (_a.label) {
2682
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPortfolioAccounts(requestParameters.portfolioGroupId, options)];
2683
+ case 1:
2684
+ localVarAxiosArgs = _a.sent();
2685
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2686
+ }
2687
+ });
2688
+ });
2689
+ },
2690
+ /**
2691
+ *
2692
+ * @summary Updates model portfolio object
2693
+ * @param {PortfolioManagementApiModifyModelPortfolioByIdRequest} requestParameters Request parameters.
2694
+ * @param {*} [options] Override http request option.
2695
+ * @throws {RequiredError}
2696
+ */
2697
+ modifyModelPortfolioById: function (requestParameters, options) {
2698
+ return __awaiter(this, void 0, void 0, function () {
2699
+ var localVarAxiosArgs;
2700
+ return __generator(this, function (_a) {
2701
+ switch (_a.label) {
2702
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.modifyModelPortfolioById(requestParameters.modelPortfolioId, requestParameters.requestBody, options)];
2703
+ case 1:
2704
+ localVarAxiosArgs = _a.sent();
2705
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2706
+ }
2707
+ });
2708
+ });
2709
+ },
2710
+ /**
2711
+ *
2712
+ * @summary Update an existing target portfolio.
2713
+ * @param {PortfolioManagementApiSavePortfolioRequest} requestParameters Request parameters.
2714
+ * @param {*} [options] Override http request option.
2715
+ * @throws {RequiredError}
2716
+ */
2717
+ savePortfolio: function (requestParameters, options) {
2718
+ return __awaiter(this, void 0, void 0, function () {
2719
+ var localVarAxiosArgs;
2720
+ return __generator(this, function (_a) {
2721
+ switch (_a.label) {
2722
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.savePortfolio(requestParameters.portfolioGroupId, requestParameters.requestBody, options)];
2723
+ case 1:
2724
+ localVarAxiosArgs = _a.sent();
2725
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2726
+ }
2727
+ });
2728
+ });
2729
+ },
2730
+ /**
2731
+ *
2732
+ * @summary Search for symbols limited to brokerages under the specified portfolio group
2733
+ * @param {PortfolioManagementApiSearchPortfolioSymbolsRequest} requestParameters Request parameters.
2734
+ * @param {*} [options] Override http request option.
2735
+ * @throws {RequiredError}
2736
+ */
2737
+ searchPortfolioSymbols: function (requestParameters, options) {
2738
+ return __awaiter(this, void 0, void 0, function () {
2739
+ var localVarAxiosArgs;
2740
+ return __generator(this, function (_a) {
2741
+ switch (_a.label) {
2742
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.searchPortfolioSymbols(requestParameters.portfolioGroupId, requestParameters.requestBody, options)];
2743
+ case 1:
2744
+ localVarAxiosArgs = _a.sent();
2745
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2746
+ }
2747
+ });
2748
+ });
2749
+ },
2750
+ /**
2751
+ *
2752
+ * @summary Set a new list of target assets under the specified PortfolioGroup. All existing target assets under this portfolio group will be replaced with the new list.
2753
+ * @param {PortfolioManagementApiSetPortfolioTargetsRequest} requestParameters Request parameters.
2754
+ * @param {*} [options] Override http request option.
2755
+ * @throws {RequiredError}
2756
+ */
2757
+ setPortfolioTargets: function (requestParameters, options) {
2758
+ return __awaiter(this, void 0, void 0, function () {
2759
+ var localVarAxiosArgs;
2760
+ return __generator(this, function (_a) {
2761
+ switch (_a.label) {
2762
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.setPortfolioTargets(requestParameters.portfolioGroupId, requestParameters.requestBody, options)];
2763
+ case 1:
2764
+ localVarAxiosArgs = _a.sent();
2765
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2766
+ }
2767
+ });
2768
+ });
2769
+ },
2770
+ /**
2771
+ *
2772
+ * @summary Updates model asset class objects
2773
+ * @param {PortfolioManagementApiUpdateAssetClassRequest} requestParameters Request parameters.
2774
+ * @param {*} [options] Override http request option.
2775
+ * @throws {RequiredError}
2776
+ */
2777
+ updateAssetClass: function (requestParameters, options) {
2778
+ return __awaiter(this, void 0, void 0, function () {
2779
+ var localVarAxiosArgs;
2780
+ return __generator(this, function (_a) {
2781
+ switch (_a.label) {
2782
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateAssetClass(requestParameters.modelAssetClassId, requestParameters.requestBody, options)];
2783
+ case 1:
2784
+ localVarAxiosArgs = _a.sent();
2785
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2786
+ }
2787
+ });
2788
+ });
2789
+ },
2790
+ /**
2791
+ *
2792
+ * @summary Updates portfolio group settings
2793
+ * @param {PortfolioManagementApiUpdatePortfolioSettingsRequest} requestParameters Request parameters.
2794
+ * @param {*} [options] Override http request option.
2795
+ * @throws {RequiredError}
2796
+ */
2797
+ updatePortfolioSettings: function (requestParameters, options) {
2798
+ return __awaiter(this, void 0, void 0, function () {
2799
+ var localVarAxiosArgs;
2800
+ return __generator(this, function (_a) {
2801
+ switch (_a.label) {
2802
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updatePortfolioSettings(requestParameters.portfolioGroupId, options)];
2803
+ case 1:
2804
+ localVarAxiosArgs = _a.sent();
2805
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2806
+ }
2807
+ });
2808
+ });
2809
+ },
2810
+ /**
2811
+ *
2812
+ * @summary Update a TargetAsset under the specified PortfolioGroup.
2813
+ * @param {PortfolioManagementApiUpdatePortfolioTargetByIdRequest} requestParameters Request parameters.
2814
+ * @param {*} [options] Override http request option.
2815
+ * @throws {RequiredError}
2816
+ */
2817
+ updatePortfolioTargetById: function (requestParameters, options) {
2818
+ return __awaiter(this, void 0, void 0, function () {
2819
+ var localVarAxiosArgs;
2820
+ return __generator(this, function (_a) {
2821
+ switch (_a.label) {
2822
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updatePortfolioTargetById(requestParameters.portfolioGroupId, requestParameters.targetAssetId, requestParameters.requestBody, options)];
2823
+ case 1:
2824
+ localVarAxiosArgs = _a.sent();
2825
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
2826
+ }
2827
+ });
2828
+ });
2829
+ },
2830
+ };
2831
+ };
2832
+ exports.PortfolioManagementApiFp = PortfolioManagementApiFp;
2833
+ /**
2834
+ * PortfolioManagementApi - factory interface
2835
+ * @export
2836
+ */
2837
+ var PortfolioManagementApiFactory = function (configuration, basePath, axios) {
2838
+ var localVarFp = (0, exports.PortfolioManagementApiFp)(configuration);
2839
+ return {
2840
+ /**
2841
+ *
2842
+ * @summary Adds an asset to exclude to a portfolio group
2843
+ * @param {PortfolioManagementApiAddPortfolioExcludedAssetRequest} requestParameters Request parameters.
2844
+ * @param {*} [options] Override http request option.
2845
+ * @throws {RequiredError}
2846
+ */
2847
+ addPortfolioExcludedAsset: function (requestParameters, options) {
2848
+ return localVarFp.addPortfolioExcludedAsset(requestParameters, options).then(function (request) { return request(axios, basePath); });
2849
+ },
2850
+ /**
2851
+ *
2852
+ * @summary Create new portfolio group
2853
+ * @param {PortfolioManagementApiCreateRequest} requestParameters Request parameters.
2854
+ * @param {*} [options] Override http request option.
2855
+ * @throws {RequiredError}
2856
+ */
2857
+ create: function (requestParameters, options) {
2858
+ return localVarFp.create(requestParameters, options).then(function (request) { return request(axios, basePath); });
2859
+ },
2860
+ /**
2861
+ *
2862
+ * @summary Create a new model asset class
2863
+ * @param {*} [options] Override http request option.
2864
+ * @throws {RequiredError}
2865
+ */
2866
+ createAssetClass: function (options) {
2867
+ return localVarFp.createAssetClass(options).then(function (request) { return request(axios, basePath); });
2868
+ },
2869
+ /**
2870
+ *
2871
+ * @summary Creates a new model portfolio
2872
+ * @param {*} [options] Override http request option.
2873
+ * @throws {RequiredError}
2874
+ */
2875
+ createModelPortfolio: function (options) {
2876
+ return localVarFp.createModelPortfolio(options).then(function (request) { return request(axios, basePath); });
2877
+ },
2878
+ /**
2879
+ *
2880
+ * @summary Deletes a model asset class
2881
+ * @param {PortfolioManagementApiDeleteAssetClassRequest} requestParameters Request parameters.
2882
+ * @param {*} [options] Override http request option.
2883
+ * @throws {RequiredError}
2884
+ */
2885
+ deleteAssetClass: function (requestParameters, options) {
2886
+ return localVarFp.deleteAssetClass(requestParameters, options).then(function (request) { return request(axios, basePath); });
2887
+ },
2888
+ /**
2889
+ *
2890
+ * @summary Unexclude an asset from a portfolio group
2891
+ * @param {PortfolioManagementApiDeleteExcludedAssetRequest} requestParameters Request parameters.
2892
+ * @param {*} [options] Override http request option.
2893
+ * @throws {RequiredError}
2894
+ */
2895
+ deleteExcludedAsset: function (requestParameters, options) {
2896
+ return localVarFp.deleteExcludedAsset(requestParameters, options).then(function (request) { return request(axios, basePath); });
2897
+ },
2898
+ /**
2899
+ *
2900
+ * @summary Deletes a model portfolio
2901
+ * @param {PortfolioManagementApiDeleteModelPortfolioByIdRequest} requestParameters Request parameters.
2902
+ * @param {*} [options] Override http request option.
2903
+ * @throws {RequiredError}
2904
+ */
2905
+ deleteModelPortfolioById: function (requestParameters, options) {
2906
+ return localVarFp.deleteModelPortfolioById(requestParameters, options).then(function (request) { return request(axios, basePath); });
2907
+ },
2908
+ /**
2909
+ *
2910
+ * @summary Remove a target portfolio.
2911
+ * @param {PortfolioManagementApiDeletePortfoliRequest} requestParameters Request parameters.
2912
+ * @param {*} [options] Override http request option.
2913
+ * @throws {RequiredError}
2914
+ */
2915
+ deletePortfoli: function (requestParameters, options) {
2916
+ return localVarFp.deletePortfoli(requestParameters, options).then(function (request) { return request(axios, basePath); });
2917
+ },
2918
+ /**
2919
+ *
2920
+ * @summary Remove a TargetAsset.
2921
+ * @param {PortfolioManagementApiDeletePortfolioTargetByIdRequest} requestParameters Request parameters.
2922
+ * @param {*} [options] Override http request option.
2923
+ * @throws {RequiredError}
2924
+ */
2925
+ deletePortfolioTargetById: function (requestParameters, options) {
2926
+ return localVarFp.deletePortfolioTargetById(requestParameters, options).then(function (request) { return request(axios, basePath); });
2927
+ },
2928
+ /**
2929
+ *
2930
+ * @summary Get details of a model asset class
2931
+ * @param {PortfolioManagementApiDetailAssetClassRequest} requestParameters Request parameters.
2932
+ * @param {*} [options] Override http request option.
2933
+ * @throws {RequiredError}
2934
+ */
2935
+ detailAssetClass: function (requestParameters, options) {
2936
+ return localVarFp.detailAssetClass(requestParameters, options).then(function (request) { return request(axios, basePath); });
2937
+ },
2938
+ /**
2939
+ *
2940
+ * @summary Return an individual trade
2941
+ * @param {PortfolioManagementApiGetCalculatedTradeByIdRequest} requestParameters Request parameters.
2942
+ * @param {*} [options] Override http request option.
2943
+ * @throws {RequiredError}
2944
+ */
2945
+ getCalculatedTradeById: function (requestParameters, options) {
2946
+ return localVarFp.getCalculatedTradeById(requestParameters, options).then(function (request) { return request(axios, basePath); });
2947
+ },
2948
+ /**
2949
+ *
2950
+ * @summary Get details of a model portfolio
2951
+ * @param {PortfolioManagementApiGetModelDetailsByIdRequest} requestParameters Request parameters.
2952
+ * @param {*} [options] Override http request option.
2953
+ * @throws {RequiredError}
2954
+ */
2955
+ getModelDetailsById: function (requestParameters, options) {
2956
+ return localVarFp.getModelDetailsById(requestParameters, options).then(function (request) { return request(axios, basePath); });
2957
+ },
2958
+ /**
2959
+ *
2960
+ * @summary Get sum of cash balances in portfolio group
2961
+ * @param {PortfolioManagementApiGetPortfolioBalancesRequest} requestParameters Request parameters.
2962
+ * @param {*} [options] Override http request option.
2963
+ * @throws {RequiredError}
2964
+ */
2965
+ getPortfolioBalances: function (requestParameters, options) {
2966
+ return localVarFp.getPortfolioBalances(requestParameters, options).then(function (request) { return request(axios, basePath); });
2967
+ },
2968
+ /**
2969
+ *
2970
+ * @summary Get details of a target portfolio
2971
+ * @param {PortfolioManagementApiGetPortfolioDetailsByIdRequest} requestParameters Request parameters.
2972
+ * @param {*} [options] Override http request option.
2973
+ * @throws {RequiredError}
2974
+ */
2975
+ getPortfolioDetailsById: function (requestParameters, options) {
2976
+ return localVarFp.getPortfolioDetailsById(requestParameters, options).then(function (request) { return request(axios, basePath); });
2977
+ },
2978
+ /**
2979
+ *
2980
+ * @summary Return a whole bunch of relevant information relating to a portfolio group.
2981
+ * @param {PortfolioManagementApiGetPortfolioInfoRequest} requestParameters Request parameters.
2982
+ * @param {*} [options] Override http request option.
2983
+ * @throws {RequiredError}
2984
+ */
2985
+ getPortfolioInfo: function (requestParameters, options) {
2986
+ return localVarFp.getPortfolioInfo(requestParameters, options).then(function (request) { return request(axios, basePath); });
2987
+ },
2988
+ /**
2989
+ *
2990
+ * @summary Get total of each postions owned in portfolio group
2991
+ * @param {PortfolioManagementApiGetPortfolioPositionsRequest} requestParameters Request parameters.
2992
+ * @param {*} [options] Override http request option.
2993
+ * @throws {RequiredError}
2994
+ */
2995
+ getPortfolioPositions: function (requestParameters, options) {
2996
+ return localVarFp.getPortfolioPositions(requestParameters, options).then(function (request) { return request(axios, basePath); });
2997
+ },
2998
+ /**
2999
+ *
3000
+ * @summary Get portfolio group settings
3001
+ * @param {PortfolioManagementApiGetPortfolioSettingsRequest} requestParameters Request parameters.
3002
+ * @param {*} [options] Override http request option.
3003
+ * @throws {RequiredError}
3004
+ */
3005
+ getPortfolioSettings: function (requestParameters, options) {
3006
+ return localVarFp.getPortfolioSettings(requestParameters, options).then(function (request) { return request(axios, basePath); });
3007
+ },
3008
+ /**
3009
+ *
3010
+ * @summary Get a specific target from a portfolio group
3011
+ * @param {PortfolioManagementApiGetPortfolioTargetByIdRequest} requestParameters Request parameters.
3012
+ * @param {*} [options] Override http request option.
3013
+ * @throws {RequiredError}
3014
+ */
3015
+ getPortfolioTargetById: function (requestParameters, options) {
3016
+ return localVarFp.getPortfolioTargetById(requestParameters, options).then(function (request) { return request(axios, basePath); });
3017
+ },
3018
+ /**
3019
+ *
3020
+ * @summary Get all target assets under the specified PortfolioGroup.
3021
+ * @param {PortfolioManagementApiGetPortfolioTargetsRequest} requestParameters Request parameters.
3022
+ * @param {*} [options] Override http request option.
3023
+ * @throws {RequiredError}
3024
+ */
3025
+ getPortfolioTargets: function (requestParameters, options) {
3026
+ return localVarFp.getPortfolioTargets(requestParameters, options).then(function (request) { return request(axios, basePath); });
3027
+ },
3028
+ /**
3029
+ *
3030
+ * @summary Get an array of excluded assets associated with a portfolio group\\
3031
+ * @param {PortfolioManagementApiGetPortoflioExcludedAssetsRequest} requestParameters Request parameters.
3032
+ * @param {*} [options] Override http request option.
3033
+ * @throws {RequiredError}
3034
+ */
3035
+ getPortoflioExcludedAssets: function (requestParameters, options) {
3036
+ return localVarFp.getPortoflioExcludedAssets(requestParameters, options).then(function (request) { return request(axios, basePath); });
3037
+ },
3038
+ /**
3039
+ *
3040
+ * @summary Import target allocation based on portfolio group
3041
+ * @param {PortfolioManagementApiImportModelPortfolioRequest} requestParameters Request parameters.
3042
+ * @param {*} [options] Override http request option.
3043
+ * @throws {RequiredError}
3044
+ */
3045
+ importModelPortfolio: function (requestParameters, options) {
3046
+ return localVarFp.importModelPortfolio(requestParameters, options).then(function (request) { return request(axios, basePath); });
3047
+ },
3048
+ /**
3049
+ *
3050
+ * @summary List all portfolio groups
3051
+ * @param {PortfolioManagementApiListRequest} requestParameters Request parameters.
3052
+ * @param {*} [options] Override http request option.
3053
+ * @throws {RequiredError}
3054
+ */
3055
+ list: function (requestParameters, options) {
3056
+ return localVarFp.list(requestParameters, options).then(function (request) { return request(axios, basePath); });
3057
+ },
3058
+ /**
3059
+ *
3060
+ * @summary List of model asset class
3061
+ * @param {*} [options] Override http request option.
3062
+ * @throws {RequiredError}
3063
+ */
3064
+ listAssetClasses: function (options) {
3065
+ return localVarFp.listAssetClasses(options).then(function (request) { return request(axios, basePath); });
3066
+ },
3067
+ /**
3068
+ *
3069
+ * @summary List of trades to make to rebalance portfolio group
3070
+ * @param {PortfolioManagementApiListCalculatedTradesRequest} requestParameters Request parameters.
3071
+ * @param {*} [options] Override http request option.
3072
+ * @throws {RequiredError}
3073
+ */
3074
+ listCalculatedTrades: function (requestParameters, options) {
3075
+ return localVarFp.listCalculatedTrades(requestParameters, options).then(function (request) { return request(axios, basePath); });
3076
+ },
3077
+ /**
3078
+ *
3079
+ * @summary List of model portfolio
3080
+ * @param {*} [options] Override http request option.
3081
+ * @throws {RequiredError}
3082
+ */
3083
+ listModelPortfolio: function (options) {
3084
+ return localVarFp.listModelPortfolio(options).then(function (request) { return request(axios, basePath); });
3085
+ },
3086
+ /**
3087
+ *
3088
+ * @summary Get all accounts associated with a portfolio group
3089
+ * @param {PortfolioManagementApiListPortfolioAccountsRequest} requestParameters Request parameters.
3090
+ * @param {*} [options] Override http request option.
3091
+ * @throws {RequiredError}
3092
+ */
3093
+ listPortfolioAccounts: function (requestParameters, options) {
3094
+ return localVarFp.listPortfolioAccounts(requestParameters, options).then(function (request) { return request(axios, basePath); });
3095
+ },
3096
+ /**
3097
+ *
3098
+ * @summary Updates model portfolio object
3099
+ * @param {PortfolioManagementApiModifyModelPortfolioByIdRequest} requestParameters Request parameters.
3100
+ * @param {*} [options] Override http request option.
3101
+ * @throws {RequiredError}
3102
+ */
3103
+ modifyModelPortfolioById: function (requestParameters, options) {
3104
+ return localVarFp.modifyModelPortfolioById(requestParameters, options).then(function (request) { return request(axios, basePath); });
3105
+ },
3106
+ /**
3107
+ *
3108
+ * @summary Update an existing target portfolio.
3109
+ * @param {PortfolioManagementApiSavePortfolioRequest} requestParameters Request parameters.
3110
+ * @param {*} [options] Override http request option.
3111
+ * @throws {RequiredError}
3112
+ */
3113
+ savePortfolio: function (requestParameters, options) {
3114
+ return localVarFp.savePortfolio(requestParameters, options).then(function (request) { return request(axios, basePath); });
3115
+ },
3116
+ /**
3117
+ *
3118
+ * @summary Search for symbols limited to brokerages under the specified portfolio group
3119
+ * @param {PortfolioManagementApiSearchPortfolioSymbolsRequest} requestParameters Request parameters.
3120
+ * @param {*} [options] Override http request option.
3121
+ * @throws {RequiredError}
3122
+ */
3123
+ searchPortfolioSymbols: function (requestParameters, options) {
3124
+ return localVarFp.searchPortfolioSymbols(requestParameters, options).then(function (request) { return request(axios, basePath); });
3125
+ },
3126
+ /**
3127
+ *
3128
+ * @summary Set a new list of target assets under the specified PortfolioGroup. All existing target assets under this portfolio group will be replaced with the new list.
3129
+ * @param {PortfolioManagementApiSetPortfolioTargetsRequest} requestParameters Request parameters.
3130
+ * @param {*} [options] Override http request option.
3131
+ * @throws {RequiredError}
3132
+ */
3133
+ setPortfolioTargets: function (requestParameters, options) {
3134
+ return localVarFp.setPortfolioTargets(requestParameters, options).then(function (request) { return request(axios, basePath); });
3135
+ },
3136
+ /**
3137
+ *
3138
+ * @summary Updates model asset class objects
3139
+ * @param {PortfolioManagementApiUpdateAssetClassRequest} requestParameters Request parameters.
3140
+ * @param {*} [options] Override http request option.
3141
+ * @throws {RequiredError}
3142
+ */
3143
+ updateAssetClass: function (requestParameters, options) {
3144
+ return localVarFp.updateAssetClass(requestParameters, options).then(function (request) { return request(axios, basePath); });
3145
+ },
3146
+ /**
3147
+ *
3148
+ * @summary Updates portfolio group settings
3149
+ * @param {PortfolioManagementApiUpdatePortfolioSettingsRequest} requestParameters Request parameters.
3150
+ * @param {*} [options] Override http request option.
3151
+ * @throws {RequiredError}
3152
+ */
3153
+ updatePortfolioSettings: function (requestParameters, options) {
3154
+ return localVarFp.updatePortfolioSettings(requestParameters, options).then(function (request) { return request(axios, basePath); });
3155
+ },
3156
+ /**
3157
+ *
3158
+ * @summary Update a TargetAsset under the specified PortfolioGroup.
3159
+ * @param {PortfolioManagementApiUpdatePortfolioTargetByIdRequest} requestParameters Request parameters.
3160
+ * @param {*} [options] Override http request option.
3161
+ * @throws {RequiredError}
3162
+ */
3163
+ updatePortfolioTargetById: function (requestParameters, options) {
3164
+ return localVarFp.updatePortfolioTargetById(requestParameters, options).then(function (request) { return request(axios, basePath); });
3165
+ },
3166
+ };
3167
+ };
3168
+ exports.PortfolioManagementApiFactory = PortfolioManagementApiFactory;
3169
+ /**
3170
+ * PortfolioManagementApi - object-oriented interface
3171
+ * @export
3172
+ * @class PortfolioManagementApi
3173
+ * @extends {BaseAPI}
3174
+ */
3175
+ var PortfolioManagementApi = /** @class */ (function (_super) {
3176
+ __extends(PortfolioManagementApi, _super);
3177
+ function PortfolioManagementApi() {
3178
+ return _super !== null && _super.apply(this, arguments) || this;
3179
+ }
3180
+ /**
3181
+ *
3182
+ * @summary Adds an asset to exclude to a portfolio group
3183
+ * @param {PortfolioManagementApiAddPortfolioExcludedAssetRequest} requestParameters Request parameters.
3184
+ * @param {*} [options] Override http request option.
3185
+ * @throws {RequiredError}
3186
+ * @memberof PortfolioManagementApi
3187
+ */
3188
+ PortfolioManagementApi.prototype.addPortfolioExcludedAsset = function (requestParameters, options) {
3189
+ var _this = this;
3190
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).addPortfolioExcludedAsset(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3191
+ };
3192
+ /**
3193
+ *
3194
+ * @summary Create new portfolio group
3195
+ * @param {PortfolioManagementApiCreateRequest} requestParameters Request parameters.
3196
+ * @param {*} [options] Override http request option.
3197
+ * @throws {RequiredError}
3198
+ * @memberof PortfolioManagementApi
3199
+ */
3200
+ PortfolioManagementApi.prototype.create = function (requestParameters, options) {
3201
+ var _this = this;
3202
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).create(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3203
+ };
3204
+ /**
3205
+ *
3206
+ * @summary Create a new model asset class
3207
+ * @param {*} [options] Override http request option.
3208
+ * @throws {RequiredError}
3209
+ * @memberof PortfolioManagementApi
3210
+ */
3211
+ PortfolioManagementApi.prototype.createAssetClass = function (options) {
3212
+ var _this = this;
3213
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).createAssetClass(options).then(function (request) { return request(_this.axios, _this.basePath); });
3214
+ };
3215
+ /**
3216
+ *
3217
+ * @summary Creates a new model portfolio
3218
+ * @param {*} [options] Override http request option.
3219
+ * @throws {RequiredError}
3220
+ * @memberof PortfolioManagementApi
3221
+ */
3222
+ PortfolioManagementApi.prototype.createModelPortfolio = function (options) {
3223
+ var _this = this;
3224
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).createModelPortfolio(options).then(function (request) { return request(_this.axios, _this.basePath); });
3225
+ };
3226
+ /**
3227
+ *
3228
+ * @summary Deletes a model asset class
3229
+ * @param {PortfolioManagementApiDeleteAssetClassRequest} requestParameters Request parameters.
3230
+ * @param {*} [options] Override http request option.
3231
+ * @throws {RequiredError}
3232
+ * @memberof PortfolioManagementApi
3233
+ */
3234
+ PortfolioManagementApi.prototype.deleteAssetClass = function (requestParameters, options) {
3235
+ var _this = this;
3236
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).deleteAssetClass(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3237
+ };
3238
+ /**
3239
+ *
3240
+ * @summary Unexclude an asset from a portfolio group
3241
+ * @param {PortfolioManagementApiDeleteExcludedAssetRequest} requestParameters Request parameters.
3242
+ * @param {*} [options] Override http request option.
3243
+ * @throws {RequiredError}
3244
+ * @memberof PortfolioManagementApi
3245
+ */
3246
+ PortfolioManagementApi.prototype.deleteExcludedAsset = function (requestParameters, options) {
3247
+ var _this = this;
3248
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).deleteExcludedAsset(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3249
+ };
3250
+ /**
3251
+ *
3252
+ * @summary Deletes a model portfolio
3253
+ * @param {PortfolioManagementApiDeleteModelPortfolioByIdRequest} requestParameters Request parameters.
3254
+ * @param {*} [options] Override http request option.
3255
+ * @throws {RequiredError}
3256
+ * @memberof PortfolioManagementApi
3257
+ */
3258
+ PortfolioManagementApi.prototype.deleteModelPortfolioById = function (requestParameters, options) {
3259
+ var _this = this;
3260
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).deleteModelPortfolioById(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3261
+ };
3262
+ /**
3263
+ *
3264
+ * @summary Remove a target portfolio.
3265
+ * @param {PortfolioManagementApiDeletePortfoliRequest} requestParameters Request parameters.
3266
+ * @param {*} [options] Override http request option.
3267
+ * @throws {RequiredError}
3268
+ * @memberof PortfolioManagementApi
3269
+ */
3270
+ PortfolioManagementApi.prototype.deletePortfoli = function (requestParameters, options) {
3271
+ var _this = this;
3272
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).deletePortfoli(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3273
+ };
3274
+ /**
3275
+ *
3276
+ * @summary Remove a TargetAsset.
3277
+ * @param {PortfolioManagementApiDeletePortfolioTargetByIdRequest} requestParameters Request parameters.
3278
+ * @param {*} [options] Override http request option.
3279
+ * @throws {RequiredError}
3280
+ * @memberof PortfolioManagementApi
3281
+ */
3282
+ PortfolioManagementApi.prototype.deletePortfolioTargetById = function (requestParameters, options) {
3283
+ var _this = this;
3284
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).deletePortfolioTargetById(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3285
+ };
3286
+ /**
3287
+ *
3288
+ * @summary Get details of a model asset class
3289
+ * @param {PortfolioManagementApiDetailAssetClassRequest} requestParameters Request parameters.
3290
+ * @param {*} [options] Override http request option.
3291
+ * @throws {RequiredError}
3292
+ * @memberof PortfolioManagementApi
3293
+ */
3294
+ PortfolioManagementApi.prototype.detailAssetClass = function (requestParameters, options) {
3295
+ var _this = this;
3296
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).detailAssetClass(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3297
+ };
3298
+ /**
3299
+ *
3300
+ * @summary Return an individual trade
3301
+ * @param {PortfolioManagementApiGetCalculatedTradeByIdRequest} requestParameters Request parameters.
3302
+ * @param {*} [options] Override http request option.
3303
+ * @throws {RequiredError}
3304
+ * @memberof PortfolioManagementApi
3305
+ */
3306
+ PortfolioManagementApi.prototype.getCalculatedTradeById = function (requestParameters, options) {
3307
+ var _this = this;
3308
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).getCalculatedTradeById(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3309
+ };
3310
+ /**
3311
+ *
3312
+ * @summary Get details of a model portfolio
3313
+ * @param {PortfolioManagementApiGetModelDetailsByIdRequest} requestParameters Request parameters.
3314
+ * @param {*} [options] Override http request option.
3315
+ * @throws {RequiredError}
3316
+ * @memberof PortfolioManagementApi
3317
+ */
3318
+ PortfolioManagementApi.prototype.getModelDetailsById = function (requestParameters, options) {
3319
+ var _this = this;
3320
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).getModelDetailsById(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3321
+ };
3322
+ /**
3323
+ *
3324
+ * @summary Get sum of cash balances in portfolio group
3325
+ * @param {PortfolioManagementApiGetPortfolioBalancesRequest} requestParameters Request parameters.
3326
+ * @param {*} [options] Override http request option.
3327
+ * @throws {RequiredError}
3328
+ * @memberof PortfolioManagementApi
3329
+ */
3330
+ PortfolioManagementApi.prototype.getPortfolioBalances = function (requestParameters, options) {
3331
+ var _this = this;
3332
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).getPortfolioBalances(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3333
+ };
3334
+ /**
3335
+ *
3336
+ * @summary Get details of a target portfolio
3337
+ * @param {PortfolioManagementApiGetPortfolioDetailsByIdRequest} requestParameters Request parameters.
3338
+ * @param {*} [options] Override http request option.
3339
+ * @throws {RequiredError}
3340
+ * @memberof PortfolioManagementApi
3341
+ */
3342
+ PortfolioManagementApi.prototype.getPortfolioDetailsById = function (requestParameters, options) {
3343
+ var _this = this;
3344
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).getPortfolioDetailsById(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3345
+ };
3346
+ /**
3347
+ *
3348
+ * @summary Return a whole bunch of relevant information relating to a portfolio group.
3349
+ * @param {PortfolioManagementApiGetPortfolioInfoRequest} requestParameters Request parameters.
3350
+ * @param {*} [options] Override http request option.
3351
+ * @throws {RequiredError}
3352
+ * @memberof PortfolioManagementApi
3353
+ */
3354
+ PortfolioManagementApi.prototype.getPortfolioInfo = function (requestParameters, options) {
3355
+ var _this = this;
3356
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).getPortfolioInfo(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3357
+ };
3358
+ /**
3359
+ *
3360
+ * @summary Get total of each postions owned in portfolio group
3361
+ * @param {PortfolioManagementApiGetPortfolioPositionsRequest} requestParameters Request parameters.
3362
+ * @param {*} [options] Override http request option.
3363
+ * @throws {RequiredError}
3364
+ * @memberof PortfolioManagementApi
3365
+ */
3366
+ PortfolioManagementApi.prototype.getPortfolioPositions = function (requestParameters, options) {
3367
+ var _this = this;
3368
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).getPortfolioPositions(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3369
+ };
3370
+ /**
3371
+ *
3372
+ * @summary Get portfolio group settings
3373
+ * @param {PortfolioManagementApiGetPortfolioSettingsRequest} requestParameters Request parameters.
3374
+ * @param {*} [options] Override http request option.
3375
+ * @throws {RequiredError}
3376
+ * @memberof PortfolioManagementApi
3377
+ */
3378
+ PortfolioManagementApi.prototype.getPortfolioSettings = function (requestParameters, options) {
3379
+ var _this = this;
3380
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).getPortfolioSettings(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3381
+ };
3382
+ /**
3383
+ *
3384
+ * @summary Get a specific target from a portfolio group
3385
+ * @param {PortfolioManagementApiGetPortfolioTargetByIdRequest} requestParameters Request parameters.
3386
+ * @param {*} [options] Override http request option.
3387
+ * @throws {RequiredError}
3388
+ * @memberof PortfolioManagementApi
3389
+ */
3390
+ PortfolioManagementApi.prototype.getPortfolioTargetById = function (requestParameters, options) {
3391
+ var _this = this;
3392
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).getPortfolioTargetById(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3393
+ };
3394
+ /**
3395
+ *
3396
+ * @summary Get all target assets under the specified PortfolioGroup.
3397
+ * @param {PortfolioManagementApiGetPortfolioTargetsRequest} requestParameters Request parameters.
3398
+ * @param {*} [options] Override http request option.
3399
+ * @throws {RequiredError}
3400
+ * @memberof PortfolioManagementApi
3401
+ */
3402
+ PortfolioManagementApi.prototype.getPortfolioTargets = function (requestParameters, options) {
3403
+ var _this = this;
3404
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).getPortfolioTargets(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3405
+ };
3406
+ /**
3407
+ *
3408
+ * @summary Get an array of excluded assets associated with a portfolio group\\
3409
+ * @param {PortfolioManagementApiGetPortoflioExcludedAssetsRequest} requestParameters Request parameters.
3410
+ * @param {*} [options] Override http request option.
3411
+ * @throws {RequiredError}
3412
+ * @memberof PortfolioManagementApi
3413
+ */
3414
+ PortfolioManagementApi.prototype.getPortoflioExcludedAssets = function (requestParameters, options) {
3415
+ var _this = this;
3416
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).getPortoflioExcludedAssets(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3417
+ };
3418
+ /**
3419
+ *
3420
+ * @summary Import target allocation based on portfolio group
3421
+ * @param {PortfolioManagementApiImportModelPortfolioRequest} requestParameters Request parameters.
3422
+ * @param {*} [options] Override http request option.
3423
+ * @throws {RequiredError}
3424
+ * @memberof PortfolioManagementApi
3425
+ */
3426
+ PortfolioManagementApi.prototype.importModelPortfolio = function (requestParameters, options) {
3427
+ var _this = this;
3428
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).importModelPortfolio(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3429
+ };
3430
+ /**
3431
+ *
3432
+ * @summary List all portfolio groups
3433
+ * @param {PortfolioManagementApiListRequest} requestParameters Request parameters.
3434
+ * @param {*} [options] Override http request option.
3435
+ * @throws {RequiredError}
3436
+ * @memberof PortfolioManagementApi
3437
+ */
3438
+ PortfolioManagementApi.prototype.list = function (requestParameters, options) {
3439
+ var _this = this;
3440
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).list(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3441
+ };
3442
+ /**
3443
+ *
3444
+ * @summary List of model asset class
3445
+ * @param {*} [options] Override http request option.
3446
+ * @throws {RequiredError}
3447
+ * @memberof PortfolioManagementApi
3448
+ */
3449
+ PortfolioManagementApi.prototype.listAssetClasses = function (options) {
3450
+ var _this = this;
3451
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).listAssetClasses(options).then(function (request) { return request(_this.axios, _this.basePath); });
3452
+ };
3453
+ /**
3454
+ *
3455
+ * @summary List of trades to make to rebalance portfolio group
3456
+ * @param {PortfolioManagementApiListCalculatedTradesRequest} requestParameters Request parameters.
3457
+ * @param {*} [options] Override http request option.
3458
+ * @throws {RequiredError}
3459
+ * @memberof PortfolioManagementApi
3460
+ */
3461
+ PortfolioManagementApi.prototype.listCalculatedTrades = function (requestParameters, options) {
3462
+ var _this = this;
3463
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).listCalculatedTrades(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3464
+ };
3465
+ /**
3466
+ *
3467
+ * @summary List of model portfolio
3468
+ * @param {*} [options] Override http request option.
3469
+ * @throws {RequiredError}
3470
+ * @memberof PortfolioManagementApi
3471
+ */
3472
+ PortfolioManagementApi.prototype.listModelPortfolio = function (options) {
3473
+ var _this = this;
3474
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).listModelPortfolio(options).then(function (request) { return request(_this.axios, _this.basePath); });
3475
+ };
3476
+ /**
3477
+ *
3478
+ * @summary Get all accounts associated with a portfolio group
3479
+ * @param {PortfolioManagementApiListPortfolioAccountsRequest} requestParameters Request parameters.
3480
+ * @param {*} [options] Override http request option.
3481
+ * @throws {RequiredError}
3482
+ * @memberof PortfolioManagementApi
3483
+ */
3484
+ PortfolioManagementApi.prototype.listPortfolioAccounts = function (requestParameters, options) {
3485
+ var _this = this;
3486
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).listPortfolioAccounts(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3487
+ };
3488
+ /**
3489
+ *
3490
+ * @summary Updates model portfolio object
3491
+ * @param {PortfolioManagementApiModifyModelPortfolioByIdRequest} requestParameters Request parameters.
3492
+ * @param {*} [options] Override http request option.
3493
+ * @throws {RequiredError}
3494
+ * @memberof PortfolioManagementApi
3495
+ */
3496
+ PortfolioManagementApi.prototype.modifyModelPortfolioById = function (requestParameters, options) {
3497
+ var _this = this;
3498
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).modifyModelPortfolioById(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3499
+ };
3500
+ /**
3501
+ *
3502
+ * @summary Update an existing target portfolio.
3503
+ * @param {PortfolioManagementApiSavePortfolioRequest} requestParameters Request parameters.
3504
+ * @param {*} [options] Override http request option.
3505
+ * @throws {RequiredError}
3506
+ * @memberof PortfolioManagementApi
3507
+ */
3508
+ PortfolioManagementApi.prototype.savePortfolio = function (requestParameters, options) {
3509
+ var _this = this;
3510
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).savePortfolio(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3511
+ };
3512
+ /**
3513
+ *
3514
+ * @summary Search for symbols limited to brokerages under the specified portfolio group
3515
+ * @param {PortfolioManagementApiSearchPortfolioSymbolsRequest} requestParameters Request parameters.
3516
+ * @param {*} [options] Override http request option.
3517
+ * @throws {RequiredError}
3518
+ * @memberof PortfolioManagementApi
3519
+ */
3520
+ PortfolioManagementApi.prototype.searchPortfolioSymbols = function (requestParameters, options) {
3521
+ var _this = this;
3522
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).searchPortfolioSymbols(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3523
+ };
3524
+ /**
3525
+ *
3526
+ * @summary Set a new list of target assets under the specified PortfolioGroup. All existing target assets under this portfolio group will be replaced with the new list.
3527
+ * @param {PortfolioManagementApiSetPortfolioTargetsRequest} requestParameters Request parameters.
3528
+ * @param {*} [options] Override http request option.
3529
+ * @throws {RequiredError}
3530
+ * @memberof PortfolioManagementApi
3531
+ */
3532
+ PortfolioManagementApi.prototype.setPortfolioTargets = function (requestParameters, options) {
3533
+ var _this = this;
3534
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).setPortfolioTargets(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3535
+ };
3536
+ /**
3537
+ *
3538
+ * @summary Updates model asset class objects
3539
+ * @param {PortfolioManagementApiUpdateAssetClassRequest} requestParameters Request parameters.
3540
+ * @param {*} [options] Override http request option.
3541
+ * @throws {RequiredError}
3542
+ * @memberof PortfolioManagementApi
3543
+ */
3544
+ PortfolioManagementApi.prototype.updateAssetClass = function (requestParameters, options) {
3545
+ var _this = this;
3546
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).updateAssetClass(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3547
+ };
3548
+ /**
3549
+ *
3550
+ * @summary Updates portfolio group settings
3551
+ * @param {PortfolioManagementApiUpdatePortfolioSettingsRequest} requestParameters Request parameters.
3552
+ * @param {*} [options] Override http request option.
3553
+ * @throws {RequiredError}
3554
+ * @memberof PortfolioManagementApi
3555
+ */
3556
+ PortfolioManagementApi.prototype.updatePortfolioSettings = function (requestParameters, options) {
3557
+ var _this = this;
3558
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).updatePortfolioSettings(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3559
+ };
3560
+ /**
3561
+ *
3562
+ * @summary Update a TargetAsset under the specified PortfolioGroup.
3563
+ * @param {PortfolioManagementApiUpdatePortfolioTargetByIdRequest} requestParameters Request parameters.
3564
+ * @param {*} [options] Override http request option.
3565
+ * @throws {RequiredError}
3566
+ * @memberof PortfolioManagementApi
3567
+ */
3568
+ PortfolioManagementApi.prototype.updatePortfolioTargetById = function (requestParameters, options) {
3569
+ var _this = this;
3570
+ return (0, exports.PortfolioManagementApiFp)(this.configuration).updatePortfolioTargetById(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
3571
+ };
3572
+ return PortfolioManagementApi;
3573
+ }(base_1.BaseAPI));
3574
+ exports.PortfolioManagementApi = PortfolioManagementApi;