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,659 @@
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.AuthenticationApi = exports.AuthenticationApiFactory = exports.AuthenticationApiFp = exports.AuthenticationApiAxiosParamCreator = 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
+ * AuthenticationApi - axios parameter creator
88
+ * @export
89
+ */
90
+ var AuthenticationApiAxiosParamCreator = function (configuration) {
91
+ var _this = this;
92
+ return {
93
+ /**
94
+ *
95
+ * @summary Delete user from SnapTrade, disabling all brokerage authorizations and permanently deleting all data associated with the user
96
+ * @param {string} userId
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ */
100
+ deleteSnapTradeUser: function (userId, options) {
101
+ if (options === void 0) { options = {}; }
102
+ return __awaiter(_this, void 0, void 0, function () {
103
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
104
+ return __generator(this, function (_a) {
105
+ switch (_a.label) {
106
+ case 0:
107
+ // verify required parameter 'userId' is not null or undefined
108
+ (0, common_1.assertParamExists)('deleteSnapTradeUser', 'userId', userId);
109
+ localVarPath = "/snapTrade/deleteUser";
110
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
111
+ if (configuration) {
112
+ baseOptions = configuration.baseOptions;
113
+ }
114
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
115
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
116
+ localVarQueryParameter = {};
117
+ // authentication PartnerClientId required
118
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
119
+ // authentication PartnerSignature required
120
+ ];
121
+ case 1:
122
+ // authentication PartnerClientId required
123
+ _a.sent();
124
+ // authentication PartnerSignature required
125
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
126
+ // authentication PartnerTimestamp required
127
+ ];
128
+ case 2:
129
+ // authentication PartnerSignature required
130
+ _a.sent();
131
+ // authentication PartnerTimestamp required
132
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
133
+ case 3:
134
+ // authentication PartnerTimestamp required
135
+ _a.sent();
136
+ if (userId !== undefined) {
137
+ localVarQueryParameter['userId'] = userId;
138
+ }
139
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
140
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
141
+ (0, requestBeforeHook_1.requestBeforeHook)({
142
+ queryParameters: localVarQueryParameter,
143
+ requestConfig: localVarRequestOptions,
144
+ path: localVarPath,
145
+ configuration: configuration
146
+ });
147
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
148
+ return [2 /*return*/, {
149
+ url: (0, common_1.toPathString)(localVarUrlObj),
150
+ options: localVarRequestOptions,
151
+ }];
152
+ }
153
+ });
154
+ });
155
+ },
156
+ /**
157
+ *
158
+ * @summary Obtains an encrypted JWT tokens that should be decrypted on a user\'s local device
159
+ * @param {string} userId
160
+ * @param {string} userSecret
161
+ * @param {*} [options] Override http request option.
162
+ * @throws {RequiredError}
163
+ */
164
+ getUserJWT: function (userId, userSecret, options) {
165
+ if (options === void 0) { options = {}; }
166
+ return __awaiter(_this, void 0, void 0, function () {
167
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
168
+ return __generator(this, function (_a) {
169
+ switch (_a.label) {
170
+ case 0:
171
+ // verify required parameter 'userId' is not null or undefined
172
+ (0, common_1.assertParamExists)('getUserJWT', 'userId', userId);
173
+ // verify required parameter 'userSecret' is not null or undefined
174
+ (0, common_1.assertParamExists)('getUserJWT', 'userSecret', userSecret);
175
+ localVarPath = "/snapTrade/encryptedJWT";
176
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
177
+ if (configuration) {
178
+ baseOptions = configuration.baseOptions;
179
+ }
180
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
181
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
182
+ localVarQueryParameter = {};
183
+ // authentication PartnerClientId required
184
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
185
+ // authentication PartnerSignature required
186
+ ];
187
+ case 1:
188
+ // authentication PartnerClientId required
189
+ _a.sent();
190
+ // authentication PartnerSignature required
191
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
192
+ // authentication PartnerTimestamp required
193
+ ];
194
+ case 2:
195
+ // authentication PartnerSignature required
196
+ _a.sent();
197
+ // authentication PartnerTimestamp required
198
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
199
+ case 3:
200
+ // authentication PartnerTimestamp required
201
+ _a.sent();
202
+ if (userId !== undefined) {
203
+ localVarQueryParameter['userId'] = userId;
204
+ }
205
+ if (userSecret !== undefined) {
206
+ localVarQueryParameter['userSecret'] = userSecret;
207
+ }
208
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
209
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
210
+ (0, requestBeforeHook_1.requestBeforeHook)({
211
+ queryParameters: localVarQueryParameter,
212
+ requestConfig: localVarRequestOptions,
213
+ path: localVarPath,
214
+ configuration: configuration
215
+ });
216
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
217
+ return [2 /*return*/, {
218
+ url: (0, common_1.toPathString)(localVarUrlObj),
219
+ options: localVarRequestOptions,
220
+ }];
221
+ }
222
+ });
223
+ });
224
+ },
225
+ /**
226
+ *
227
+ * @summary Get a list of all SnapTrade users you\'ve registered on our platform
228
+ * @param {*} [options] Override http request option.
229
+ * @throws {RequiredError}
230
+ */
231
+ listSnapTradeUsers: function (options) {
232
+ if (options === void 0) { options = {}; }
233
+ return __awaiter(_this, void 0, void 0, function () {
234
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
235
+ return __generator(this, function (_a) {
236
+ switch (_a.label) {
237
+ case 0:
238
+ localVarPath = "/snapTrade/listUsers";
239
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
240
+ if (configuration) {
241
+ baseOptions = configuration.baseOptions;
242
+ }
243
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
244
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
245
+ localVarQueryParameter = {};
246
+ // authentication PartnerClientId required
247
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
248
+ // authentication PartnerSignature required
249
+ ];
250
+ case 1:
251
+ // authentication PartnerClientId required
252
+ _a.sent();
253
+ // authentication PartnerSignature required
254
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
255
+ // authentication PartnerTimestamp required
256
+ ];
257
+ case 2:
258
+ // authentication PartnerSignature required
259
+ _a.sent();
260
+ // authentication PartnerTimestamp required
261
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
262
+ case 3:
263
+ // authentication PartnerTimestamp required
264
+ _a.sent();
265
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
266
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
267
+ (0, requestBeforeHook_1.requestBeforeHook)({
268
+ queryParameters: localVarQueryParameter,
269
+ requestConfig: localVarRequestOptions,
270
+ path: localVarPath,
271
+ configuration: configuration
272
+ });
273
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
274
+ return [2 /*return*/, {
275
+ url: (0, common_1.toPathString)(localVarUrlObj),
276
+ options: localVarRequestOptions,
277
+ }];
278
+ }
279
+ });
280
+ });
281
+ },
282
+ /**
283
+ *
284
+ * @summary Generate a redirect URI to securely login a user to the SnapTrade Connection Portal
285
+ * @param {string} userId
286
+ * @param {string} userSecret
287
+ * @param {SnapTradeLoginUserRequestBody} [snapTradeLoginUserRequestBody]
288
+ * @param {*} [options] Override http request option.
289
+ * @throws {RequiredError}
290
+ */
291
+ loginSnapTradeUser: function (userId, userSecret, snapTradeLoginUserRequestBody, options) {
292
+ if (options === void 0) { options = {}; }
293
+ return __awaiter(_this, void 0, void 0, function () {
294
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
295
+ return __generator(this, function (_a) {
296
+ switch (_a.label) {
297
+ case 0:
298
+ // verify required parameter 'userId' is not null or undefined
299
+ (0, common_1.assertParamExists)('loginSnapTradeUser', 'userId', userId);
300
+ // verify required parameter 'userSecret' is not null or undefined
301
+ (0, common_1.assertParamExists)('loginSnapTradeUser', 'userSecret', userSecret);
302
+ localVarPath = "/snapTrade/login";
303
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
304
+ if (configuration) {
305
+ baseOptions = configuration.baseOptions;
306
+ }
307
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
308
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
309
+ localVarQueryParameter = {};
310
+ // authentication PartnerClientId required
311
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
312
+ // authentication PartnerSignature required
313
+ ];
314
+ case 1:
315
+ // authentication PartnerClientId required
316
+ _a.sent();
317
+ // authentication PartnerSignature required
318
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
319
+ // authentication PartnerTimestamp required
320
+ ];
321
+ case 2:
322
+ // authentication PartnerSignature required
323
+ _a.sent();
324
+ // authentication PartnerTimestamp required
325
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
326
+ case 3:
327
+ // authentication PartnerTimestamp required
328
+ _a.sent();
329
+ if (userId !== undefined) {
330
+ localVarQueryParameter['userId'] = userId;
331
+ }
332
+ if (userSecret !== undefined) {
333
+ localVarQueryParameter['userSecret'] = userSecret;
334
+ }
335
+ localVarHeaderParameter['Content-Type'] = 'application/json';
336
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
337
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
338
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(snapTradeLoginUserRequestBody, localVarRequestOptions, configuration);
339
+ (0, requestBeforeHook_1.requestBeforeHook)({
340
+ queryParameters: localVarQueryParameter,
341
+ requestConfig: localVarRequestOptions,
342
+ path: localVarPath,
343
+ configuration: configuration
344
+ });
345
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
346
+ return [2 /*return*/, {
347
+ url: (0, common_1.toPathString)(localVarUrlObj),
348
+ options: localVarRequestOptions,
349
+ }];
350
+ }
351
+ });
352
+ });
353
+ },
354
+ /**
355
+ *
356
+ * @summary Register user with SnapTrade in order to create secure brokerage authorizations
357
+ * @param {SnapTradeRegisterUserRequestBody} snapTradeRegisterUserRequestBody
358
+ * @param {*} [options] Override http request option.
359
+ * @throws {RequiredError}
360
+ */
361
+ registerSnapTradeUser: function (snapTradeRegisterUserRequestBody, options) {
362
+ if (options === void 0) { options = {}; }
363
+ return __awaiter(_this, void 0, void 0, function () {
364
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
365
+ return __generator(this, function (_a) {
366
+ switch (_a.label) {
367
+ case 0:
368
+ // verify required parameter 'snapTradeRegisterUserRequestBody' is not null or undefined
369
+ (0, common_1.assertParamExists)('registerSnapTradeUser', 'snapTradeRegisterUserRequestBody', snapTradeRegisterUserRequestBody);
370
+ localVarPath = "/snapTrade/registerUser";
371
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
372
+ if (configuration) {
373
+ baseOptions = configuration.baseOptions;
374
+ }
375
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
376
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
377
+ localVarQueryParameter = {};
378
+ // authentication PartnerClientId required
379
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
380
+ // authentication PartnerSignature required
381
+ ];
382
+ case 1:
383
+ // authentication PartnerClientId required
384
+ _a.sent();
385
+ // authentication PartnerSignature required
386
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
387
+ // authentication PartnerTimestamp required
388
+ ];
389
+ case 2:
390
+ // authentication PartnerSignature required
391
+ _a.sent();
392
+ // authentication PartnerTimestamp required
393
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
394
+ case 3:
395
+ // authentication PartnerTimestamp required
396
+ _a.sent();
397
+ localVarHeaderParameter['Content-Type'] = 'application/json';
398
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
399
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
400
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(snapTradeRegisterUserRequestBody, localVarRequestOptions, configuration);
401
+ (0, requestBeforeHook_1.requestBeforeHook)({
402
+ queryParameters: localVarQueryParameter,
403
+ requestConfig: localVarRequestOptions,
404
+ path: localVarPath,
405
+ configuration: configuration
406
+ });
407
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
408
+ return [2 /*return*/, {
409
+ url: (0, common_1.toPathString)(localVarUrlObj),
410
+ options: localVarRequestOptions,
411
+ }];
412
+ }
413
+ });
414
+ });
415
+ },
416
+ };
417
+ };
418
+ exports.AuthenticationApiAxiosParamCreator = AuthenticationApiAxiosParamCreator;
419
+ /**
420
+ * AuthenticationApi - functional programming interface
421
+ * @export
422
+ */
423
+ var AuthenticationApiFp = function (configuration) {
424
+ var localVarAxiosParamCreator = (0, exports.AuthenticationApiAxiosParamCreator)(configuration);
425
+ return {
426
+ /**
427
+ *
428
+ * @summary Delete user from SnapTrade, disabling all brokerage authorizations and permanently deleting all data associated with the user
429
+ * @param {AuthenticationApiDeleteSnapTradeUserRequest} requestParameters Request parameters.
430
+ * @param {*} [options] Override http request option.
431
+ * @throws {RequiredError}
432
+ */
433
+ deleteSnapTradeUser: function (requestParameters, options) {
434
+ return __awaiter(this, void 0, void 0, function () {
435
+ var localVarAxiosArgs;
436
+ return __generator(this, function (_a) {
437
+ switch (_a.label) {
438
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteSnapTradeUser(requestParameters.userId, options)];
439
+ case 1:
440
+ localVarAxiosArgs = _a.sent();
441
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
442
+ }
443
+ });
444
+ });
445
+ },
446
+ /**
447
+ *
448
+ * @summary Obtains an encrypted JWT tokens that should be decrypted on a user\'s local device
449
+ * @param {AuthenticationApiGetUserJWTRequest} requestParameters Request parameters.
450
+ * @param {*} [options] Override http request option.
451
+ * @throws {RequiredError}
452
+ */
453
+ getUserJWT: function (requestParameters, options) {
454
+ return __awaiter(this, void 0, void 0, function () {
455
+ var localVarAxiosArgs;
456
+ return __generator(this, function (_a) {
457
+ switch (_a.label) {
458
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getUserJWT(requestParameters.userId, requestParameters.userSecret, options)];
459
+ case 1:
460
+ localVarAxiosArgs = _a.sent();
461
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
462
+ }
463
+ });
464
+ });
465
+ },
466
+ /**
467
+ *
468
+ * @summary Get a list of all SnapTrade users you\'ve registered on our platform
469
+ * @param {*} [options] Override http request option.
470
+ * @throws {RequiredError}
471
+ */
472
+ listSnapTradeUsers: function (options) {
473
+ return __awaiter(this, void 0, void 0, function () {
474
+ var localVarAxiosArgs;
475
+ return __generator(this, function (_a) {
476
+ switch (_a.label) {
477
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listSnapTradeUsers(options)];
478
+ case 1:
479
+ localVarAxiosArgs = _a.sent();
480
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
481
+ }
482
+ });
483
+ });
484
+ },
485
+ /**
486
+ *
487
+ * @summary Generate a redirect URI to securely login a user to the SnapTrade Connection Portal
488
+ * @param {AuthenticationApiLoginSnapTradeUserRequest} requestParameters Request parameters.
489
+ * @param {*} [options] Override http request option.
490
+ * @throws {RequiredError}
491
+ */
492
+ loginSnapTradeUser: function (requestParameters, options) {
493
+ return __awaiter(this, void 0, void 0, function () {
494
+ var localVarAxiosArgs;
495
+ return __generator(this, function (_a) {
496
+ switch (_a.label) {
497
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.loginSnapTradeUser(requestParameters.userId, requestParameters.userSecret, requestParameters.requestBody, options)];
498
+ case 1:
499
+ localVarAxiosArgs = _a.sent();
500
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
501
+ }
502
+ });
503
+ });
504
+ },
505
+ /**
506
+ *
507
+ * @summary Register user with SnapTrade in order to create secure brokerage authorizations
508
+ * @param {AuthenticationApiRegisterSnapTradeUserRequest} requestParameters Request parameters.
509
+ * @param {*} [options] Override http request option.
510
+ * @throws {RequiredError}
511
+ */
512
+ registerSnapTradeUser: function (requestParameters, options) {
513
+ return __awaiter(this, void 0, void 0, function () {
514
+ var localVarAxiosArgs;
515
+ return __generator(this, function (_a) {
516
+ switch (_a.label) {
517
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.registerSnapTradeUser(requestParameters.requestBody, options)];
518
+ case 1:
519
+ localVarAxiosArgs = _a.sent();
520
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
521
+ }
522
+ });
523
+ });
524
+ },
525
+ };
526
+ };
527
+ exports.AuthenticationApiFp = AuthenticationApiFp;
528
+ /**
529
+ * AuthenticationApi - factory interface
530
+ * @export
531
+ */
532
+ var AuthenticationApiFactory = function (configuration, basePath, axios) {
533
+ var localVarFp = (0, exports.AuthenticationApiFp)(configuration);
534
+ return {
535
+ /**
536
+ *
537
+ * @summary Delete user from SnapTrade, disabling all brokerage authorizations and permanently deleting all data associated with the user
538
+ * @param {AuthenticationApiDeleteSnapTradeUserRequest} requestParameters Request parameters.
539
+ * @param {*} [options] Override http request option.
540
+ * @throws {RequiredError}
541
+ */
542
+ deleteSnapTradeUser: function (requestParameters, options) {
543
+ return localVarFp.deleteSnapTradeUser(requestParameters, options).then(function (request) { return request(axios, basePath); });
544
+ },
545
+ /**
546
+ *
547
+ * @summary Obtains an encrypted JWT tokens that should be decrypted on a user\'s local device
548
+ * @param {AuthenticationApiGetUserJWTRequest} requestParameters Request parameters.
549
+ * @param {*} [options] Override http request option.
550
+ * @throws {RequiredError}
551
+ */
552
+ getUserJWT: function (requestParameters, options) {
553
+ return localVarFp.getUserJWT(requestParameters, options).then(function (request) { return request(axios, basePath); });
554
+ },
555
+ /**
556
+ *
557
+ * @summary Get a list of all SnapTrade users you\'ve registered on our platform
558
+ * @param {*} [options] Override http request option.
559
+ * @throws {RequiredError}
560
+ */
561
+ listSnapTradeUsers: function (options) {
562
+ return localVarFp.listSnapTradeUsers(options).then(function (request) { return request(axios, basePath); });
563
+ },
564
+ /**
565
+ *
566
+ * @summary Generate a redirect URI to securely login a user to the SnapTrade Connection Portal
567
+ * @param {AuthenticationApiLoginSnapTradeUserRequest} requestParameters Request parameters.
568
+ * @param {*} [options] Override http request option.
569
+ * @throws {RequiredError}
570
+ */
571
+ loginSnapTradeUser: function (requestParameters, options) {
572
+ return localVarFp.loginSnapTradeUser(requestParameters, options).then(function (request) { return request(axios, basePath); });
573
+ },
574
+ /**
575
+ *
576
+ * @summary Register user with SnapTrade in order to create secure brokerage authorizations
577
+ * @param {AuthenticationApiRegisterSnapTradeUserRequest} requestParameters Request parameters.
578
+ * @param {*} [options] Override http request option.
579
+ * @throws {RequiredError}
580
+ */
581
+ registerSnapTradeUser: function (requestParameters, options) {
582
+ return localVarFp.registerSnapTradeUser(requestParameters, options).then(function (request) { return request(axios, basePath); });
583
+ },
584
+ };
585
+ };
586
+ exports.AuthenticationApiFactory = AuthenticationApiFactory;
587
+ /**
588
+ * AuthenticationApi - object-oriented interface
589
+ * @export
590
+ * @class AuthenticationApi
591
+ * @extends {BaseAPI}
592
+ */
593
+ var AuthenticationApi = /** @class */ (function (_super) {
594
+ __extends(AuthenticationApi, _super);
595
+ function AuthenticationApi() {
596
+ return _super !== null && _super.apply(this, arguments) || this;
597
+ }
598
+ /**
599
+ *
600
+ * @summary Delete user from SnapTrade, disabling all brokerage authorizations and permanently deleting all data associated with the user
601
+ * @param {AuthenticationApiDeleteSnapTradeUserRequest} requestParameters Request parameters.
602
+ * @param {*} [options] Override http request option.
603
+ * @throws {RequiredError}
604
+ * @memberof AuthenticationApi
605
+ */
606
+ AuthenticationApi.prototype.deleteSnapTradeUser = function (requestParameters, options) {
607
+ var _this = this;
608
+ return (0, exports.AuthenticationApiFp)(this.configuration).deleteSnapTradeUser(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
609
+ };
610
+ /**
611
+ *
612
+ * @summary Obtains an encrypted JWT tokens that should be decrypted on a user\'s local device
613
+ * @param {AuthenticationApiGetUserJWTRequest} requestParameters Request parameters.
614
+ * @param {*} [options] Override http request option.
615
+ * @throws {RequiredError}
616
+ * @memberof AuthenticationApi
617
+ */
618
+ AuthenticationApi.prototype.getUserJWT = function (requestParameters, options) {
619
+ var _this = this;
620
+ return (0, exports.AuthenticationApiFp)(this.configuration).getUserJWT(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
621
+ };
622
+ /**
623
+ *
624
+ * @summary Get a list of all SnapTrade users you\'ve registered on our platform
625
+ * @param {*} [options] Override http request option.
626
+ * @throws {RequiredError}
627
+ * @memberof AuthenticationApi
628
+ */
629
+ AuthenticationApi.prototype.listSnapTradeUsers = function (options) {
630
+ var _this = this;
631
+ return (0, exports.AuthenticationApiFp)(this.configuration).listSnapTradeUsers(options).then(function (request) { return request(_this.axios, _this.basePath); });
632
+ };
633
+ /**
634
+ *
635
+ * @summary Generate a redirect URI to securely login a user to the SnapTrade Connection Portal
636
+ * @param {AuthenticationApiLoginSnapTradeUserRequest} requestParameters Request parameters.
637
+ * @param {*} [options] Override http request option.
638
+ * @throws {RequiredError}
639
+ * @memberof AuthenticationApi
640
+ */
641
+ AuthenticationApi.prototype.loginSnapTradeUser = function (requestParameters, options) {
642
+ var _this = this;
643
+ return (0, exports.AuthenticationApiFp)(this.configuration).loginSnapTradeUser(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
644
+ };
645
+ /**
646
+ *
647
+ * @summary Register user with SnapTrade in order to create secure brokerage authorizations
648
+ * @param {AuthenticationApiRegisterSnapTradeUserRequest} requestParameters Request parameters.
649
+ * @param {*} [options] Override http request option.
650
+ * @throws {RequiredError}
651
+ * @memberof AuthenticationApi
652
+ */
653
+ AuthenticationApi.prototype.registerSnapTradeUser = function (requestParameters, options) {
654
+ var _this = this;
655
+ return (0, exports.AuthenticationApiFp)(this.configuration).registerSnapTradeUser(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
656
+ };
657
+ return AuthenticationApi;
658
+ }(base_1.BaseAPI));
659
+ exports.AuthenticationApi = AuthenticationApi;