snaptrade-typescript-sdk 8.16.0 → 8.18.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 (288) hide show
  1. package/README.md +147 -183
  2. package/dist/api/account-information-api-custom.d.ts +3 -3
  3. package/dist/api/account-information-api-custom.js +27 -27
  4. package/dist/api/account-information-api.d.ts +526 -527
  5. package/dist/api/account-information-api.js +1049 -1050
  6. package/dist/api/api-status-api-custom.d.ts +3 -3
  7. package/dist/api/api-status-api-custom.js +27 -27
  8. package/dist/api/api-status-api.d.ts +70 -71
  9. package/dist/api/api-status-api.js +203 -204
  10. package/dist/api/authentication-api-custom.d.ts +3 -3
  11. package/dist/api/authentication-api-custom.js +27 -27
  12. package/dist/api/authentication-api.d.ts +267 -268
  13. package/dist/api/authentication-api.js +661 -662
  14. package/dist/api/connections-api-custom.d.ts +3 -3
  15. package/dist/api/connections-api-custom.js +27 -27
  16. package/dist/api/connections-api.d.ts +275 -276
  17. package/dist/api/connections-api.js +583 -584
  18. package/dist/api/error-logs-api-custom.d.ts +3 -3
  19. package/dist/api/error-logs-api-custom.js +27 -27
  20. package/dist/api/error-logs-api.d.ts +94 -95
  21. package/dist/api/error-logs-api.js +240 -241
  22. package/dist/api/options-api-custom.d.ts +3 -3
  23. package/dist/api/options-api-custom.js +27 -27
  24. package/dist/api/options-api.d.ts +369 -370
  25. package/dist/api/options-api.js +730 -731
  26. package/dist/api/reference-data-api-custom.d.ts +3 -3
  27. package/dist/api/reference-data-api-custom.js +27 -27
  28. package/dist/api/reference-data-api.d.ts +468 -469
  29. package/dist/api/reference-data-api.js +1246 -1247
  30. package/dist/api/trading-api-custom.d.ts +3 -3
  31. package/dist/api/trading-api-custom.js +27 -27
  32. package/dist/api/trading-api.d.ts +403 -634
  33. package/dist/api/trading-api.js +841 -1282
  34. package/dist/api/transactions-and-reporting-api-custom.d.ts +3 -3
  35. package/dist/api/transactions-and-reporting-api-custom.js +27 -27
  36. package/dist/api/transactions-and-reporting-api.d.ts +218 -219
  37. package/dist/api/transactions-and-reporting-api.js +403 -404
  38. package/dist/api.d.ts +19 -21
  39. package/dist/api.js +37 -39
  40. package/dist/base.d.ts +54 -55
  41. package/dist/base.js +81 -82
  42. package/dist/client-custom.d.ts +4 -4
  43. package/dist/client-custom.js +9 -9
  44. package/dist/client.d.ts +25 -27
  45. package/dist/client.js +50 -52
  46. package/dist/common.d.ts +67 -67
  47. package/dist/common.js +236 -233
  48. package/dist/configuration.d.ts +99 -100
  49. package/dist/configuration.js +55 -56
  50. package/dist/index.d.ts +14 -15
  51. package/dist/index.js +32 -33
  52. package/dist/jest.config.d.ts +3 -3
  53. package/dist/jest.config.js +13 -13
  54. package/dist/models/account-holdings-account.d.ts +53 -54
  55. package/dist/models/account-holdings-account.js +14 -15
  56. package/dist/models/account-holdings.d.ts +46 -47
  57. package/dist/models/account-holdings.js +14 -15
  58. package/dist/models/account-order-record-status.d.ts +16 -17
  59. package/dist/models/account-order-record-status.js +14 -15
  60. package/dist/models/account-order-record.d.ts +132 -133
  61. package/dist/models/account-order-record.js +14 -15
  62. package/dist/models/account-simple.d.ts +43 -44
  63. package/dist/models/account-simple.js +14 -15
  64. package/dist/models/account-sync-status.d.ts +24 -25
  65. package/dist/models/account-sync-status.js +14 -15
  66. package/dist/models/account.d.ts +82 -83
  67. package/dist/models/account.js +14 -15
  68. package/dist/models/action.d.ts +16 -17
  69. package/dist/models/action.js +14 -15
  70. package/dist/models/authentication-login-snap-trade-user200-response.d.ts +17 -18
  71. package/dist/models/authentication-login-snap-trade-user200-response.js +14 -15
  72. package/dist/models/balance.d.ts +31 -32
  73. package/dist/models/balance.js +14 -15
  74. package/dist/models/brokerage-authorization-type-read-only-brokerage.d.ts +36 -37
  75. package/dist/models/brokerage-authorization-type-read-only-brokerage.js +14 -15
  76. package/dist/models/brokerage-authorization-type-read-only.d.ts +46 -47
  77. package/dist/models/brokerage-authorization-type-read-only.js +14 -15
  78. package/dist/models/brokerage-authorization-type.d.ts +26 -27
  79. package/dist/models/brokerage-authorization-type.js +14 -15
  80. package/dist/models/brokerage-authorization.d.ts +75 -76
  81. package/dist/models/brokerage-authorization.js +14 -15
  82. package/dist/models/brokerage-symbol.d.ts +50 -51
  83. package/dist/models/brokerage-symbol.js +14 -15
  84. package/dist/models/brokerage-type.d.ts +30 -31
  85. package/dist/models/brokerage-type.js +14 -15
  86. package/dist/models/brokerage.d.ts +127 -128
  87. package/dist/models/brokerage.js +14 -15
  88. package/dist/models/calculated-trade.d.ts +31 -32
  89. package/dist/models/calculated-trade.js +14 -15
  90. package/dist/models/cash-restriction.d.ts +50 -51
  91. package/dist/models/cash-restriction.js +14 -15
  92. package/dist/models/connections-session-events200-response-inner.d.ts +16 -17
  93. package/dist/models/connections-session-events200-response-inner.js +14 -15
  94. package/dist/models/currency.d.ts +36 -37
  95. package/dist/models/currency.js +14 -15
  96. package/dist/models/delete-user-response.d.ts +30 -31
  97. package/dist/models/delete-user-response.js +14 -15
  98. package/dist/models/dividend-at-date.d.ts +36 -37
  99. package/dist/models/dividend-at-date.js +14 -15
  100. package/dist/models/encrypted-response-encrypted-message-data.d.ts +36 -37
  101. package/dist/models/encrypted-response-encrypted-message-data.js +14 -15
  102. package/dist/models/encrypted-response.d.ts +30 -31
  103. package/dist/models/encrypted-response.js +14 -15
  104. package/dist/models/exchange-rate-pairs.d.ts +37 -38
  105. package/dist/models/exchange-rate-pairs.js +14 -15
  106. package/dist/models/exchange.d.ts +66 -67
  107. package/dist/models/exchange.js +14 -15
  108. package/dist/models/excluded-asset.d.ts +25 -26
  109. package/dist/models/excluded-asset.js +14 -15
  110. package/dist/models/index.d.ts +108 -108
  111. package/dist/models/index.js +124 -124
  112. package/dist/models/jwt.d.ts +24 -25
  113. package/dist/models/jwt.js +14 -15
  114. package/dist/models/login-redirect-uri.d.ts +29 -30
  115. package/dist/models/login-redirect-uri.js +14 -15
  116. package/dist/models/manual-trade-and-impact.d.ts +38 -39
  117. package/dist/models/manual-trade-and-impact.js +14 -15
  118. package/dist/models/manual-trade-balance.d.ts +38 -39
  119. package/dist/models/manual-trade-balance.js +14 -15
  120. package/dist/models/manual-trade-form.d.ts +68 -69
  121. package/dist/models/manual-trade-form.js +14 -15
  122. package/dist/models/manual-trade-symbol.d.ts +55 -56
  123. package/dist/models/manual-trade-symbol.js +14 -15
  124. package/dist/models/manual-trade.d.ts +70 -71
  125. package/dist/models/manual-trade.js +14 -15
  126. package/dist/models/model-asset-class-details.d.ts +32 -32
  127. package/dist/models/model-asset-class-details.js +14 -15
  128. package/dist/models/model-asset-class-target.d.ts +25 -26
  129. package/dist/models/model-asset-class-target.js +14 -15
  130. package/dist/models/model-asset-class.d.ts +30 -31
  131. package/dist/models/model-asset-class.js +14 -15
  132. package/dist/models/model-portfolio-asset-class.d.ts +31 -32
  133. package/dist/models/model-portfolio-asset-class.js +14 -15
  134. package/dist/models/model-portfolio-details.d.ts +39 -39
  135. package/dist/models/model-portfolio-details.js +14 -15
  136. package/dist/models/model-portfolio-security.d.ts +31 -32
  137. package/dist/models/model-portfolio-security.js +14 -15
  138. package/dist/models/model-portfolio.d.ts +38 -39
  139. package/dist/models/model-portfolio.js +14 -15
  140. package/dist/models/model400-failed-request-response.d.ts +30 -31
  141. package/dist/models/model400-failed-request-response.js +14 -15
  142. package/dist/models/model401-failed-request-response.d.ts +30 -31
  143. package/dist/models/model401-failed-request-response.js +14 -15
  144. package/dist/models/model403-failed-request-response.d.ts +30 -31
  145. package/dist/models/model403-failed-request-response.js +14 -15
  146. package/dist/models/model404-failed-request-response.d.ts +30 -31
  147. package/dist/models/model404-failed-request-response.js +14 -15
  148. package/dist/models/monthly-dividends.d.ts +31 -32
  149. package/dist/models/monthly-dividends.js +14 -15
  150. package/dist/models/net-contributions.d.ts +36 -37
  151. package/dist/models/net-contributions.js +14 -15
  152. package/dist/models/net-dividend.d.ts +37 -38
  153. package/dist/models/net-dividend.js +14 -15
  154. package/dist/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.d.ts +36 -37
  155. package/dist/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.js +14 -15
  156. package/dist/models/option-chain-inner-chain-per-root-inner.d.ts +37 -38
  157. package/dist/models/option-chain-inner-chain-per-root-inner.js +14 -15
  158. package/dist/models/option-chain-inner.d.ts +49 -50
  159. package/dist/models/option-chain-inner.js +14 -15
  160. package/dist/models/option-leg.d.ts +38 -39
  161. package/dist/models/option-leg.js +14 -15
  162. package/dist/models/option-strategy-legs-inner.d.ts +41 -42
  163. package/dist/models/option-strategy-legs-inner.js +14 -15
  164. package/dist/models/option-strategy.d.ts +50 -51
  165. package/dist/models/option-strategy.js +14 -15
  166. package/dist/models/options-get-option-strategy-request.d.ts +38 -39
  167. package/dist/models/options-get-option-strategy-request.js +14 -15
  168. package/dist/models/options-holdings.d.ts +56 -57
  169. package/dist/models/options-holdings.js +14 -15
  170. package/dist/models/options-place-option-strategy-request.d.ts +38 -39
  171. package/dist/models/options-place-option-strategy-request.js +14 -15
  172. package/dist/models/options-position.d.ts +62 -63
  173. package/dist/models/options-position.js +14 -15
  174. package/dist/models/options-symbol.d.ts +85 -86
  175. package/dist/models/options-symbol.js +14 -15
  176. package/dist/models/order-type.d.ts +16 -17
  177. package/dist/models/order-type.js +14 -15
  178. package/dist/models/partner-data.d.ts +91 -92
  179. package/dist/models/partner-data.js +14 -15
  180. package/dist/models/past-value.d.ts +36 -37
  181. package/dist/models/past-value.js +14 -15
  182. package/dist/models/performance-custom.d.ts +137 -138
  183. package/dist/models/performance-custom.js +14 -15
  184. package/dist/models/portfolio-group-info.d.ts +92 -93
  185. package/dist/models/portfolio-group-info.js +14 -15
  186. package/dist/models/portfolio-group-position.d.ts +37 -38
  187. package/dist/models/portfolio-group-position.js +14 -15
  188. package/dist/models/portfolio-group-settings.d.ts +49 -50
  189. package/dist/models/portfolio-group-settings.js +14 -15
  190. package/dist/models/portfolio-group.d.ts +30 -31
  191. package/dist/models/portfolio-group.js +14 -15
  192. package/dist/models/position-symbol.d.ts +55 -56
  193. package/dist/models/position-symbol.js +14 -15
  194. package/dist/models/position.d.ts +55 -56
  195. package/dist/models/position.js +14 -15
  196. package/dist/models/redirect-tokenand-pin.d.ts +30 -31
  197. package/dist/models/redirect-tokenand-pin.js +14 -15
  198. package/dist/models/security-type.d.ts +42 -43
  199. package/dist/models/security-type.js +14 -15
  200. package/dist/models/session-event.d.ts +62 -63
  201. package/dist/models/session-event.js +14 -15
  202. package/dist/models/snap-trade-apidisclaimer-accept-status.d.ts +30 -31
  203. package/dist/models/snap-trade-apidisclaimer-accept-status.js +14 -15
  204. package/dist/models/snap-trade-holdings-account-account-id.d.ts +75 -76
  205. package/dist/models/snap-trade-holdings-account-account-id.js +14 -15
  206. package/dist/models/snap-trade-holdings-account.d.ts +70 -71
  207. package/dist/models/snap-trade-holdings-account.js +14 -15
  208. package/dist/models/snap-trade-holdings-total-value.d.ts +30 -31
  209. package/dist/models/snap-trade-holdings-total-value.js +14 -15
  210. package/dist/models/snap-trade-login-user-request-body.d.ts +49 -50
  211. package/dist/models/snap-trade-login-user-request-body.js +14 -15
  212. package/dist/models/snap-trade-register-user-request-body.d.ts +29 -30
  213. package/dist/models/snap-trade-register-user-request-body.js +14 -15
  214. package/dist/models/status.d.ts +36 -37
  215. package/dist/models/status.js +14 -15
  216. package/dist/models/strategy-impact-legs-inner.d.ts +60 -61
  217. package/dist/models/strategy-impact-legs-inner.js +14 -15
  218. package/dist/models/strategy-impact.d.ts +85 -86
  219. package/dist/models/strategy-impact.js +14 -15
  220. package/dist/models/strategy-order-place-orders-inner-legs-inner.d.ts +60 -61
  221. package/dist/models/strategy-order-place-orders-inner-legs-inner.js +14 -15
  222. package/dist/models/strategy-order-place-orders-inner.d.ts +277 -278
  223. package/dist/models/strategy-order-place-orders-inner.js +14 -15
  224. package/dist/models/strategy-order-place.d.ts +31 -32
  225. package/dist/models/strategy-order-place.js +14 -15
  226. package/dist/models/strategy-order-record.d.ts +89 -90
  227. package/dist/models/strategy-order-record.js +14 -15
  228. package/dist/models/strategy-quotes-greek.d.ts +48 -49
  229. package/dist/models/strategy-quotes-greek.js +14 -15
  230. package/dist/models/strategy-quotes.d.ts +56 -57
  231. package/dist/models/strategy-quotes.js +14 -15
  232. package/dist/models/sub-period-return-rate.d.ts +36 -37
  233. package/dist/models/sub-period-return-rate.js +14 -15
  234. package/dist/models/symbol-query.d.ts +23 -24
  235. package/dist/models/symbol-query.js +14 -15
  236. package/dist/models/symbol.d.ts +63 -64
  237. package/dist/models/symbol.js +14 -15
  238. package/dist/models/symbols-quotes-inner.d.ts +54 -55
  239. package/dist/models/symbols-quotes-inner.js +14 -15
  240. package/dist/models/target-asset.d.ts +57 -57
  241. package/dist/models/target-asset.js +14 -15
  242. package/dist/models/time-in-force.d.ts +16 -17
  243. package/dist/models/time-in-force.js +14 -15
  244. package/dist/models/trade-execution-status.d.ts +80 -81
  245. package/dist/models/trade-execution-status.js +14 -15
  246. package/dist/models/trade-impact.d.ts +50 -51
  247. package/dist/models/trade-impact.js +14 -15
  248. package/dist/models/trade.d.ts +71 -71
  249. package/dist/models/trade.js +14 -15
  250. package/dist/models/trading-cancel-user-account-order-request.d.ts +23 -24
  251. package/dist/models/trading-cancel-user-account-order-request.js +14 -15
  252. package/dist/models/trading-place-ocoorder-request.d.ts +29 -30
  253. package/dist/models/trading-place-ocoorder-request.js +14 -15
  254. package/dist/models/transactions-status.d.ts +29 -30
  255. package/dist/models/transactions-status.js +14 -15
  256. package/dist/models/underlying-symbol.d.ts +63 -64
  257. package/dist/models/underlying-symbol.js +14 -15
  258. package/dist/models/universal-activity.d.ts +118 -119
  259. package/dist/models/universal-activity.js +14 -15
  260. package/dist/models/universal-symbol-ticker.d.ts +69 -70
  261. package/dist/models/universal-symbol-ticker.js +14 -15
  262. package/dist/models/universal-symbol.d.ts +69 -69
  263. package/dist/models/universal-symbol.js +14 -15
  264. package/dist/models/user-error-log.d.ts +54 -55
  265. package/dist/models/user-error-log.js +14 -15
  266. package/dist/models/user-idand-secret.d.ts +30 -31
  267. package/dist/models/user-idand-secret.js +14 -15
  268. package/dist/models/user-settings.d.ts +79 -80
  269. package/dist/models/user-settings.js +14 -15
  270. package/dist/models/usexchange.d.ts +72 -73
  271. package/dist/models/usexchange.js +14 -15
  272. package/dist/pagination/page-types.d.ts +26 -27
  273. package/dist/pagination/page-types.js +12 -13
  274. package/dist/pagination/page.d.ts +35 -36
  275. package/dist/pagination/page.js +60 -61
  276. package/dist/pagination/pageable.d.ts +57 -58
  277. package/dist/pagination/pageable.js +126 -127
  278. package/dist/pagination/paginate.d.ts +16 -17
  279. package/dist/pagination/paginate.js +77 -78
  280. package/dist/requestAfterHook.d.ts +8 -8
  281. package/dist/requestAfterHook.js +45 -45
  282. package/dist/requestBeforeHook.d.ts +9 -9
  283. package/dist/requestBeforeHook.js +8 -8
  284. package/package.json +42 -42
  285. package/dist/api/portfolio-management-api-custom.d.ts +0 -3
  286. package/dist/api/portfolio-management-api-custom.js +0 -27
  287. package/dist/api/portfolio-management-api.d.ts +0 -1612
  288. package/dist/api/portfolio-management-api.js +0 -3534
@@ -1,1050 +1,1049 @@
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.AccountInformationApi = exports.AccountInformationApiFactory = exports.AccountInformationApiFp = exports.AccountInformationApiAxiosParamCreator = 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
- var account_information_api_custom_1 = require("./account-information-api-custom");
87
- /**
88
- * AccountInformationApi - axios parameter creator
89
- * @export
90
- */
91
- var AccountInformationApiAxiosParamCreator = function (configuration) {
92
- var _this = this;
93
- return {
94
- /**
95
- *
96
- * @summary List all accounts for the user, plus balances and positions for each account.
97
- * @param {string} userId
98
- * @param {string} userSecret
99
- * @param {string} [brokerageAuthorizations] Optional. Comma seperated list of authorization IDs (only use if filtering is needed on one or more authorizations).
100
- * @param {*} [options] Override http request option.
101
- * @throws {RequiredError}
102
- */
103
- getAllUserHoldings: function (userId, userSecret, brokerageAuthorizations, options) {
104
- if (options === void 0) { options = {}; }
105
- return __awaiter(_this, void 0, void 0, function () {
106
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
107
- return __generator(this, function (_a) {
108
- switch (_a.label) {
109
- case 0:
110
- // verify required parameter 'userId' is not null or undefined
111
- (0, common_1.assertParamExists)('getAllUserHoldings', 'userId', userId);
112
- // verify required parameter 'userSecret' is not null or undefined
113
- (0, common_1.assertParamExists)('getAllUserHoldings', 'userSecret', userSecret);
114
- localVarPath = "/holdings";
115
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
116
- if (configuration) {
117
- baseOptions = configuration.baseOptions;
118
- }
119
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
120
- localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
121
- localVarQueryParameter = {};
122
- // authentication PartnerClientId required
123
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
124
- // authentication PartnerSignature required
125
- ];
126
- case 1:
127
- // authentication PartnerClientId required
128
- _a.sent();
129
- // authentication PartnerSignature required
130
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
131
- // authentication PartnerTimestamp required
132
- ];
133
- case 2:
134
- // authentication PartnerSignature required
135
- _a.sent();
136
- // authentication PartnerTimestamp required
137
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
138
- case 3:
139
- // authentication PartnerTimestamp required
140
- _a.sent();
141
- if (userId !== undefined) {
142
- localVarQueryParameter['userId'] = userId;
143
- }
144
- if (userSecret !== undefined) {
145
- localVarQueryParameter['userSecret'] = userSecret;
146
- }
147
- if (brokerageAuthorizations !== undefined) {
148
- localVarQueryParameter['brokerage_authorizations'] = brokerageAuthorizations;
149
- }
150
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
151
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
152
- (0, requestBeforeHook_1.requestBeforeHook)({
153
- queryParameters: localVarQueryParameter,
154
- requestConfig: localVarRequestOptions,
155
- path: localVarPath,
156
- configuration: configuration
157
- });
158
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
159
- return [2 /*return*/, {
160
- url: (0, common_1.toPathString)(localVarUrlObj),
161
- options: localVarRequestOptions,
162
- }];
163
- }
164
- });
165
- });
166
- },
167
- /**
168
- *
169
- * @summary Get all cash balances of an investment account
170
- * @param {string} userId
171
- * @param {string} userSecret
172
- * @param {string} accountId The ID of the account get positions.
173
- * @param {*} [options] Override http request option.
174
- * @throws {RequiredError}
175
- */
176
- getUserAccountBalance: function (userId, userSecret, accountId, options) {
177
- if (options === void 0) { options = {}; }
178
- return __awaiter(_this, void 0, void 0, function () {
179
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
180
- return __generator(this, function (_a) {
181
- switch (_a.label) {
182
- case 0:
183
- // verify required parameter 'userId' is not null or undefined
184
- (0, common_1.assertParamExists)('getUserAccountBalance', 'userId', userId);
185
- // verify required parameter 'userSecret' is not null or undefined
186
- (0, common_1.assertParamExists)('getUserAccountBalance', 'userSecret', userSecret);
187
- // verify required parameter 'accountId' is not null or undefined
188
- (0, common_1.assertParamExists)('getUserAccountBalance', 'accountId', accountId);
189
- localVarPath = "/accounts/{accountId}/balances"
190
- .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
191
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
192
- if (configuration) {
193
- baseOptions = configuration.baseOptions;
194
- }
195
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
196
- localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
197
- localVarQueryParameter = {};
198
- // authentication PartnerClientId required
199
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
200
- // authentication PartnerSignature required
201
- ];
202
- case 1:
203
- // authentication PartnerClientId required
204
- _a.sent();
205
- // authentication PartnerSignature required
206
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
207
- // authentication PartnerTimestamp required
208
- ];
209
- case 2:
210
- // authentication PartnerSignature required
211
- _a.sent();
212
- // authentication PartnerTimestamp required
213
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
214
- case 3:
215
- // authentication PartnerTimestamp required
216
- _a.sent();
217
- if (userId !== undefined) {
218
- localVarQueryParameter['userId'] = userId;
219
- }
220
- if (userSecret !== undefined) {
221
- localVarQueryParameter['userSecret'] = userSecret;
222
- }
223
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
224
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
225
- (0, requestBeforeHook_1.requestBeforeHook)({
226
- queryParameters: localVarQueryParameter,
227
- requestConfig: localVarRequestOptions,
228
- path: localVarPath,
229
- configuration: configuration
230
- });
231
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
232
- return [2 /*return*/, {
233
- url: (0, common_1.toPathString)(localVarUrlObj),
234
- options: localVarRequestOptions,
235
- }];
236
- }
237
- });
238
- });
239
- },
240
- /**
241
- *
242
- * @summary Return details of a specific investment account
243
- * @param {string} userId
244
- * @param {string} userSecret
245
- * @param {string} accountId The ID of the account to get detail of.
246
- * @param {*} [options] Override http request option.
247
- * @throws {RequiredError}
248
- */
249
- getUserAccountDetails: function (userId, userSecret, accountId, options) {
250
- if (options === void 0) { options = {}; }
251
- return __awaiter(_this, void 0, void 0, function () {
252
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
253
- return __generator(this, function (_a) {
254
- switch (_a.label) {
255
- case 0:
256
- // verify required parameter 'userId' is not null or undefined
257
- (0, common_1.assertParamExists)('getUserAccountDetails', 'userId', userId);
258
- // verify required parameter 'userSecret' is not null or undefined
259
- (0, common_1.assertParamExists)('getUserAccountDetails', 'userSecret', userSecret);
260
- // verify required parameter 'accountId' is not null or undefined
261
- (0, common_1.assertParamExists)('getUserAccountDetails', 'accountId', accountId);
262
- localVarPath = "/accounts/{accountId}"
263
- .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
264
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
265
- if (configuration) {
266
- baseOptions = configuration.baseOptions;
267
- }
268
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
269
- localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
270
- localVarQueryParameter = {};
271
- // authentication PartnerClientId required
272
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
273
- // authentication PartnerSignature required
274
- ];
275
- case 1:
276
- // authentication PartnerClientId required
277
- _a.sent();
278
- // authentication PartnerSignature required
279
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
280
- // authentication PartnerTimestamp required
281
- ];
282
- case 2:
283
- // authentication PartnerSignature required
284
- _a.sent();
285
- // authentication PartnerTimestamp required
286
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
287
- case 3:
288
- // authentication PartnerTimestamp required
289
- _a.sent();
290
- if (userId !== undefined) {
291
- localVarQueryParameter['userId'] = userId;
292
- }
293
- if (userSecret !== undefined) {
294
- localVarQueryParameter['userSecret'] = userSecret;
295
- }
296
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
297
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
298
- (0, requestBeforeHook_1.requestBeforeHook)({
299
- queryParameters: localVarQueryParameter,
300
- requestConfig: localVarRequestOptions,
301
- path: localVarPath,
302
- configuration: configuration
303
- });
304
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
305
- return [2 /*return*/, {
306
- url: (0, common_1.toPathString)(localVarUrlObj),
307
- options: localVarRequestOptions,
308
- }];
309
- }
310
- });
311
- });
312
- },
313
- /**
314
- *
315
- * @summary Get all history of orders placed in account
316
- * @param {string} userId
317
- * @param {string} userSecret
318
- * @param {string} accountId The ID of the account get positions.
319
- * @param {'all' | 'open' | 'executed'} [state] defaults value is set to \&quot;all\&quot;
320
- * @param {*} [options] Override http request option.
321
- * @throws {RequiredError}
322
- */
323
- getUserAccountOrders: function (userId, userSecret, accountId, state, options) {
324
- if (options === void 0) { options = {}; }
325
- return __awaiter(_this, void 0, void 0, function () {
326
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
327
- return __generator(this, function (_a) {
328
- switch (_a.label) {
329
- case 0:
330
- // verify required parameter 'userId' is not null or undefined
331
- (0, common_1.assertParamExists)('getUserAccountOrders', 'userId', userId);
332
- // verify required parameter 'userSecret' is not null or undefined
333
- (0, common_1.assertParamExists)('getUserAccountOrders', 'userSecret', userSecret);
334
- // verify required parameter 'accountId' is not null or undefined
335
- (0, common_1.assertParamExists)('getUserAccountOrders', 'accountId', accountId);
336
- localVarPath = "/accounts/{accountId}/orders"
337
- .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
338
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
339
- if (configuration) {
340
- baseOptions = configuration.baseOptions;
341
- }
342
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
343
- localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
344
- localVarQueryParameter = {};
345
- // authentication PartnerClientId required
346
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
347
- // authentication PartnerSignature required
348
- ];
349
- case 1:
350
- // authentication PartnerClientId required
351
- _a.sent();
352
- // authentication PartnerSignature required
353
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
354
- // authentication PartnerTimestamp required
355
- ];
356
- case 2:
357
- // authentication PartnerSignature required
358
- _a.sent();
359
- // authentication PartnerTimestamp required
360
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
361
- case 3:
362
- // authentication PartnerTimestamp required
363
- _a.sent();
364
- if (userId !== undefined) {
365
- localVarQueryParameter['userId'] = userId;
366
- }
367
- if (userSecret !== undefined) {
368
- localVarQueryParameter['userSecret'] = userSecret;
369
- }
370
- if (state !== undefined) {
371
- localVarQueryParameter['state'] = state;
372
- }
373
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
374
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
375
- (0, requestBeforeHook_1.requestBeforeHook)({
376
- queryParameters: localVarQueryParameter,
377
- requestConfig: localVarRequestOptions,
378
- path: localVarPath,
379
- configuration: configuration
380
- });
381
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
382
- return [2 /*return*/, {
383
- url: (0, common_1.toPathString)(localVarUrlObj),
384
- options: localVarRequestOptions,
385
- }];
386
- }
387
- });
388
- });
389
- },
390
- /**
391
- *
392
- * @summary Get all positions of an investment account
393
- * @param {string} userId
394
- * @param {string} userSecret
395
- * @param {string} accountId The ID of the account get positions.
396
- * @param {*} [options] Override http request option.
397
- * @throws {RequiredError}
398
- */
399
- getUserAccountPositions: function (userId, userSecret, accountId, options) {
400
- if (options === void 0) { options = {}; }
401
- return __awaiter(_this, void 0, void 0, function () {
402
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
403
- return __generator(this, function (_a) {
404
- switch (_a.label) {
405
- case 0:
406
- // verify required parameter 'userId' is not null or undefined
407
- (0, common_1.assertParamExists)('getUserAccountPositions', 'userId', userId);
408
- // verify required parameter 'userSecret' is not null or undefined
409
- (0, common_1.assertParamExists)('getUserAccountPositions', 'userSecret', userSecret);
410
- // verify required parameter 'accountId' is not null or undefined
411
- (0, common_1.assertParamExists)('getUserAccountPositions', 'accountId', accountId);
412
- localVarPath = "/accounts/{accountId}/positions"
413
- .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
414
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
415
- if (configuration) {
416
- baseOptions = configuration.baseOptions;
417
- }
418
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
419
- localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
420
- localVarQueryParameter = {};
421
- // authentication PartnerClientId required
422
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
423
- // authentication PartnerSignature required
424
- ];
425
- case 1:
426
- // authentication PartnerClientId required
427
- _a.sent();
428
- // authentication PartnerSignature required
429
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
430
- // authentication PartnerTimestamp required
431
- ];
432
- case 2:
433
- // authentication PartnerSignature required
434
- _a.sent();
435
- // authentication PartnerTimestamp required
436
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
437
- case 3:
438
- // authentication PartnerTimestamp required
439
- _a.sent();
440
- if (userId !== undefined) {
441
- localVarQueryParameter['userId'] = userId;
442
- }
443
- if (userSecret !== undefined) {
444
- localVarQueryParameter['userSecret'] = userSecret;
445
- }
446
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
447
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
448
- (0, requestBeforeHook_1.requestBeforeHook)({
449
- queryParameters: localVarQueryParameter,
450
- requestConfig: localVarRequestOptions,
451
- path: localVarPath,
452
- configuration: configuration
453
- });
454
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
455
- return [2 /*return*/, {
456
- url: (0, common_1.toPathString)(localVarUrlObj),
457
- options: localVarRequestOptions,
458
- }];
459
- }
460
- });
461
- });
462
- },
463
- /**
464
- *
465
- * @summary List balances, positions and orders for the specified account.
466
- * @param {string} accountId The ID of the account to fetch holdings for.
467
- * @param {string} userId
468
- * @param {string} userSecret
469
- * @param {*} [options] Override http request option.
470
- * @throws {RequiredError}
471
- */
472
- getUserHoldings: function (accountId, userId, userSecret, options) {
473
- if (options === void 0) { options = {}; }
474
- return __awaiter(_this, void 0, void 0, function () {
475
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
476
- return __generator(this, function (_a) {
477
- switch (_a.label) {
478
- case 0:
479
- // verify required parameter 'accountId' is not null or undefined
480
- (0, common_1.assertParamExists)('getUserHoldings', 'accountId', accountId);
481
- // verify required parameter 'userId' is not null or undefined
482
- (0, common_1.assertParamExists)('getUserHoldings', 'userId', userId);
483
- // verify required parameter 'userSecret' is not null or undefined
484
- (0, common_1.assertParamExists)('getUserHoldings', 'userSecret', userSecret);
485
- localVarPath = "/accounts/{accountId}/holdings"
486
- .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
487
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
488
- if (configuration) {
489
- baseOptions = configuration.baseOptions;
490
- }
491
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
492
- localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
493
- localVarQueryParameter = {};
494
- // authentication PartnerClientId required
495
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
496
- // authentication PartnerSignature required
497
- ];
498
- case 1:
499
- // authentication PartnerClientId required
500
- _a.sent();
501
- // authentication PartnerSignature required
502
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
503
- // authentication PartnerTimestamp required
504
- ];
505
- case 2:
506
- // authentication PartnerSignature required
507
- _a.sent();
508
- // authentication PartnerTimestamp required
509
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
510
- case 3:
511
- // authentication PartnerTimestamp required
512
- _a.sent();
513
- if (userId !== undefined) {
514
- localVarQueryParameter['userId'] = userId;
515
- }
516
- if (userSecret !== undefined) {
517
- localVarQueryParameter['userSecret'] = userSecret;
518
- }
519
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
520
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
521
- (0, requestBeforeHook_1.requestBeforeHook)({
522
- queryParameters: localVarQueryParameter,
523
- requestConfig: localVarRequestOptions,
524
- path: localVarPath,
525
- configuration: configuration
526
- });
527
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
528
- return [2 /*return*/, {
529
- url: (0, common_1.toPathString)(localVarUrlObj),
530
- options: localVarRequestOptions,
531
- }];
532
- }
533
- });
534
- });
535
- },
536
- /**
537
- *
538
- * @summary List all investment accounts for the user
539
- * @param {string} userId
540
- * @param {string} userSecret
541
- * @param {*} [options] Override http request option.
542
- * @throws {RequiredError}
543
- */
544
- listUserAccounts: function (userId, userSecret, options) {
545
- if (options === void 0) { options = {}; }
546
- return __awaiter(_this, void 0, void 0, function () {
547
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
548
- return __generator(this, function (_a) {
549
- switch (_a.label) {
550
- case 0:
551
- // verify required parameter 'userId' is not null or undefined
552
- (0, common_1.assertParamExists)('listUserAccounts', 'userId', userId);
553
- // verify required parameter 'userSecret' is not null or undefined
554
- (0, common_1.assertParamExists)('listUserAccounts', 'userSecret', userSecret);
555
- localVarPath = "/accounts";
556
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
557
- if (configuration) {
558
- baseOptions = configuration.baseOptions;
559
- }
560
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
561
- localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
562
- localVarQueryParameter = {};
563
- // authentication PartnerClientId required
564
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
565
- // authentication PartnerSignature required
566
- ];
567
- case 1:
568
- // authentication PartnerClientId required
569
- _a.sent();
570
- // authentication PartnerSignature required
571
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
572
- // authentication PartnerTimestamp required
573
- ];
574
- case 2:
575
- // authentication PartnerSignature required
576
- _a.sent();
577
- // authentication PartnerTimestamp required
578
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
579
- case 3:
580
- // authentication PartnerTimestamp required
581
- _a.sent();
582
- if (userId !== undefined) {
583
- localVarQueryParameter['userId'] = userId;
584
- }
585
- if (userSecret !== undefined) {
586
- localVarQueryParameter['userSecret'] = userSecret;
587
- }
588
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
589
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
590
- (0, requestBeforeHook_1.requestBeforeHook)({
591
- queryParameters: localVarQueryParameter,
592
- requestConfig: localVarRequestOptions,
593
- path: localVarPath,
594
- configuration: configuration
595
- });
596
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
597
- return [2 /*return*/, {
598
- url: (0, common_1.toPathString)(localVarUrlObj),
599
- options: localVarRequestOptions,
600
- }];
601
- }
602
- });
603
- });
604
- },
605
- /**
606
- *
607
- * @summary Update details of an investment account
608
- * @param {string} userId
609
- * @param {string} userSecret
610
- * @param {string} accountId The ID of the account to update.
611
- * @param {*} [options] Override http request option.
612
- * @throws {RequiredError}
613
- */
614
- updateUserAccount: function (userId, userSecret, accountId, options) {
615
- if (options === void 0) { options = {}; }
616
- return __awaiter(_this, void 0, void 0, function () {
617
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
618
- return __generator(this, function (_a) {
619
- switch (_a.label) {
620
- case 0:
621
- // verify required parameter 'userId' is not null or undefined
622
- (0, common_1.assertParamExists)('updateUserAccount', 'userId', userId);
623
- // verify required parameter 'userSecret' is not null or undefined
624
- (0, common_1.assertParamExists)('updateUserAccount', 'userSecret', userSecret);
625
- // verify required parameter 'accountId' is not null or undefined
626
- (0, common_1.assertParamExists)('updateUserAccount', 'accountId', accountId);
627
- localVarPath = "/accounts/{accountId}"
628
- .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
629
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
630
- if (configuration) {
631
- baseOptions = configuration.baseOptions;
632
- }
633
- localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
634
- localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
635
- localVarQueryParameter = {};
636
- // authentication PartnerClientId required
637
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
638
- // authentication PartnerSignature required
639
- ];
640
- case 1:
641
- // authentication PartnerClientId required
642
- _a.sent();
643
- // authentication PartnerSignature required
644
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
645
- // authentication PartnerTimestamp required
646
- ];
647
- case 2:
648
- // authentication PartnerSignature required
649
- _a.sent();
650
- // authentication PartnerTimestamp required
651
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
652
- case 3:
653
- // authentication PartnerTimestamp required
654
- _a.sent();
655
- if (userId !== undefined) {
656
- localVarQueryParameter['userId'] = userId;
657
- }
658
- if (userSecret !== undefined) {
659
- localVarQueryParameter['userSecret'] = userSecret;
660
- }
661
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
662
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
663
- (0, requestBeforeHook_1.requestBeforeHook)({
664
- queryParameters: localVarQueryParameter,
665
- requestConfig: localVarRequestOptions,
666
- path: localVarPath,
667
- configuration: configuration
668
- });
669
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
670
- return [2 /*return*/, {
671
- url: (0, common_1.toPathString)(localVarUrlObj),
672
- options: localVarRequestOptions,
673
- }];
674
- }
675
- });
676
- });
677
- },
678
- };
679
- };
680
- exports.AccountInformationApiAxiosParamCreator = AccountInformationApiAxiosParamCreator;
681
- /**
682
- * AccountInformationApi - functional programming interface
683
- * @export
684
- */
685
- var AccountInformationApiFp = function (configuration) {
686
- var localVarAxiosParamCreator = (0, exports.AccountInformationApiAxiosParamCreator)(configuration);
687
- return {
688
- /**
689
- *
690
- * @summary List all accounts for the user, plus balances and positions for each account.
691
- * @param {AccountInformationApiGetAllUserHoldingsRequest} requestParameters Request parameters.
692
- * @param {*} [options] Override http request option.
693
- * @throws {RequiredError}
694
- */
695
- getAllUserHoldings: function (requestParameters, options) {
696
- return __awaiter(this, void 0, void 0, function () {
697
- var localVarAxiosArgs;
698
- return __generator(this, function (_a) {
699
- switch (_a.label) {
700
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAllUserHoldings(requestParameters.userId, requestParameters.userSecret, requestParameters.brokerageAuthorizations, options)];
701
- case 1:
702
- localVarAxiosArgs = _a.sent();
703
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
704
- }
705
- });
706
- });
707
- },
708
- /**
709
- *
710
- * @summary Get all cash balances of an investment account
711
- * @param {AccountInformationApiGetUserAccountBalanceRequest} requestParameters Request parameters.
712
- * @param {*} [options] Override http request option.
713
- * @throws {RequiredError}
714
- */
715
- getUserAccountBalance: function (requestParameters, options) {
716
- return __awaiter(this, void 0, void 0, function () {
717
- var localVarAxiosArgs;
718
- return __generator(this, function (_a) {
719
- switch (_a.label) {
720
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getUserAccountBalance(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options)];
721
- case 1:
722
- localVarAxiosArgs = _a.sent();
723
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
724
- }
725
- });
726
- });
727
- },
728
- /**
729
- *
730
- * @summary Return details of a specific investment account
731
- * @param {AccountInformationApiGetUserAccountDetailsRequest} requestParameters Request parameters.
732
- * @param {*} [options] Override http request option.
733
- * @throws {RequiredError}
734
- */
735
- getUserAccountDetails: function (requestParameters, options) {
736
- return __awaiter(this, void 0, void 0, function () {
737
- var localVarAxiosArgs;
738
- return __generator(this, function (_a) {
739
- switch (_a.label) {
740
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getUserAccountDetails(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options)];
741
- case 1:
742
- localVarAxiosArgs = _a.sent();
743
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
744
- }
745
- });
746
- });
747
- },
748
- /**
749
- *
750
- * @summary Get all history of orders placed in account
751
- * @param {AccountInformationApiGetUserAccountOrdersRequest} requestParameters Request parameters.
752
- * @param {*} [options] Override http request option.
753
- * @throws {RequiredError}
754
- */
755
- getUserAccountOrders: function (requestParameters, options) {
756
- return __awaiter(this, void 0, void 0, function () {
757
- var localVarAxiosArgs;
758
- return __generator(this, function (_a) {
759
- switch (_a.label) {
760
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getUserAccountOrders(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, requestParameters.state, options)];
761
- case 1:
762
- localVarAxiosArgs = _a.sent();
763
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
764
- }
765
- });
766
- });
767
- },
768
- /**
769
- *
770
- * @summary Get all positions of an investment account
771
- * @param {AccountInformationApiGetUserAccountPositionsRequest} requestParameters Request parameters.
772
- * @param {*} [options] Override http request option.
773
- * @throws {RequiredError}
774
- */
775
- getUserAccountPositions: function (requestParameters, options) {
776
- return __awaiter(this, void 0, void 0, function () {
777
- var localVarAxiosArgs;
778
- return __generator(this, function (_a) {
779
- switch (_a.label) {
780
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getUserAccountPositions(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options)];
781
- case 1:
782
- localVarAxiosArgs = _a.sent();
783
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
784
- }
785
- });
786
- });
787
- },
788
- /**
789
- *
790
- * @summary List balances, positions and orders for the specified account.
791
- * @param {AccountInformationApiGetUserHoldingsRequest} requestParameters Request parameters.
792
- * @param {*} [options] Override http request option.
793
- * @throws {RequiredError}
794
- */
795
- getUserHoldings: function (requestParameters, options) {
796
- return __awaiter(this, void 0, void 0, function () {
797
- var localVarAxiosArgs;
798
- return __generator(this, function (_a) {
799
- switch (_a.label) {
800
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getUserHoldings(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, options)];
801
- case 1:
802
- localVarAxiosArgs = _a.sent();
803
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
804
- }
805
- });
806
- });
807
- },
808
- /**
809
- *
810
- * @summary List all investment accounts for the user
811
- * @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
812
- * @param {*} [options] Override http request option.
813
- * @throws {RequiredError}
814
- */
815
- listUserAccounts: function (requestParameters, options) {
816
- return __awaiter(this, void 0, void 0, function () {
817
- var localVarAxiosArgs;
818
- return __generator(this, function (_a) {
819
- switch (_a.label) {
820
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listUserAccounts(requestParameters.userId, requestParameters.userSecret, options)];
821
- case 1:
822
- localVarAxiosArgs = _a.sent();
823
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
824
- }
825
- });
826
- });
827
- },
828
- /**
829
- *
830
- * @summary Update details of an investment account
831
- * @param {AccountInformationApiUpdateUserAccountRequest} requestParameters Request parameters.
832
- * @param {*} [options] Override http request option.
833
- * @throws {RequiredError}
834
- */
835
- updateUserAccount: function (requestParameters, options) {
836
- return __awaiter(this, void 0, void 0, function () {
837
- var localVarAxiosArgs;
838
- return __generator(this, function (_a) {
839
- switch (_a.label) {
840
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateUserAccount(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options)];
841
- case 1:
842
- localVarAxiosArgs = _a.sent();
843
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
844
- }
845
- });
846
- });
847
- },
848
- };
849
- };
850
- exports.AccountInformationApiFp = AccountInformationApiFp;
851
- /**
852
- * AccountInformationApi - factory interface
853
- * @export
854
- */
855
- var AccountInformationApiFactory = function (configuration, basePath, axios) {
856
- var localVarFp = (0, exports.AccountInformationApiFp)(configuration);
857
- return {
858
- /**
859
- *
860
- * @summary List all accounts for the user, plus balances and positions for each account.
861
- * @param {AccountInformationApiGetAllUserHoldingsRequest} requestParameters Request parameters.
862
- * @param {*} [options] Override http request option.
863
- * @throws {RequiredError}
864
- */
865
- getAllUserHoldings: function (requestParameters, options) {
866
- return localVarFp.getAllUserHoldings(requestParameters, options).then(function (request) { return request(axios, basePath); });
867
- },
868
- /**
869
- *
870
- * @summary Get all cash balances of an investment account
871
- * @param {AccountInformationApiGetUserAccountBalanceRequest} requestParameters Request parameters.
872
- * @param {*} [options] Override http request option.
873
- * @throws {RequiredError}
874
- */
875
- getUserAccountBalance: function (requestParameters, options) {
876
- return localVarFp.getUserAccountBalance(requestParameters, options).then(function (request) { return request(axios, basePath); });
877
- },
878
- /**
879
- *
880
- * @summary Return details of a specific investment account
881
- * @param {AccountInformationApiGetUserAccountDetailsRequest} requestParameters Request parameters.
882
- * @param {*} [options] Override http request option.
883
- * @throws {RequiredError}
884
- */
885
- getUserAccountDetails: function (requestParameters, options) {
886
- return localVarFp.getUserAccountDetails(requestParameters, options).then(function (request) { return request(axios, basePath); });
887
- },
888
- /**
889
- *
890
- * @summary Get all history of orders placed in account
891
- * @param {AccountInformationApiGetUserAccountOrdersRequest} requestParameters Request parameters.
892
- * @param {*} [options] Override http request option.
893
- * @throws {RequiredError}
894
- */
895
- getUserAccountOrders: function (requestParameters, options) {
896
- return localVarFp.getUserAccountOrders(requestParameters, options).then(function (request) { return request(axios, basePath); });
897
- },
898
- /**
899
- *
900
- * @summary Get all positions of an investment account
901
- * @param {AccountInformationApiGetUserAccountPositionsRequest} requestParameters Request parameters.
902
- * @param {*} [options] Override http request option.
903
- * @throws {RequiredError}
904
- */
905
- getUserAccountPositions: function (requestParameters, options) {
906
- return localVarFp.getUserAccountPositions(requestParameters, options).then(function (request) { return request(axios, basePath); });
907
- },
908
- /**
909
- *
910
- * @summary List balances, positions and orders for the specified account.
911
- * @param {AccountInformationApiGetUserHoldingsRequest} requestParameters Request parameters.
912
- * @param {*} [options] Override http request option.
913
- * @throws {RequiredError}
914
- */
915
- getUserHoldings: function (requestParameters, options) {
916
- return localVarFp.getUserHoldings(requestParameters, options).then(function (request) { return request(axios, basePath); });
917
- },
918
- /**
919
- *
920
- * @summary List all investment accounts for the user
921
- * @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
922
- * @param {*} [options] Override http request option.
923
- * @throws {RequiredError}
924
- */
925
- listUserAccounts: function (requestParameters, options) {
926
- return localVarFp.listUserAccounts(requestParameters, options).then(function (request) { return request(axios, basePath); });
927
- },
928
- /**
929
- *
930
- * @summary Update details of an investment account
931
- * @param {AccountInformationApiUpdateUserAccountRequest} requestParameters Request parameters.
932
- * @param {*} [options] Override http request option.
933
- * @throws {RequiredError}
934
- */
935
- updateUserAccount: function (requestParameters, options) {
936
- return localVarFp.updateUserAccount(requestParameters, options).then(function (request) { return request(axios, basePath); });
937
- },
938
- };
939
- };
940
- exports.AccountInformationApiFactory = AccountInformationApiFactory;
941
- /**
942
- * AccountInformationApi - object-oriented interface
943
- * @export
944
- * @class AccountInformationApi
945
- * @extends {BaseAPI}
946
- */
947
- var AccountInformationApi = /** @class */ (function (_super) {
948
- __extends(AccountInformationApi, _super);
949
- function AccountInformationApi() {
950
- return _super !== null && _super.apply(this, arguments) || this;
951
- }
952
- /**
953
- *
954
- * @summary List all accounts for the user, plus balances and positions for each account.
955
- * @param {AccountInformationApiGetAllUserHoldingsRequest} requestParameters Request parameters.
956
- * @param {*} [options] Override http request option.
957
- * @throws {RequiredError}
958
- * @memberof AccountInformationApi
959
- */
960
- AccountInformationApi.prototype.getAllUserHoldings = function (requestParameters, options) {
961
- var _this = this;
962
- return (0, exports.AccountInformationApiFp)(this.configuration).getAllUserHoldings(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
963
- };
964
- /**
965
- *
966
- * @summary Get all cash balances of an investment account
967
- * @param {AccountInformationApiGetUserAccountBalanceRequest} requestParameters Request parameters.
968
- * @param {*} [options] Override http request option.
969
- * @throws {RequiredError}
970
- * @memberof AccountInformationApi
971
- */
972
- AccountInformationApi.prototype.getUserAccountBalance = function (requestParameters, options) {
973
- var _this = this;
974
- return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountBalance(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
975
- };
976
- /**
977
- *
978
- * @summary Return details of a specific investment account
979
- * @param {AccountInformationApiGetUserAccountDetailsRequest} requestParameters Request parameters.
980
- * @param {*} [options] Override http request option.
981
- * @throws {RequiredError}
982
- * @memberof AccountInformationApi
983
- */
984
- AccountInformationApi.prototype.getUserAccountDetails = function (requestParameters, options) {
985
- var _this = this;
986
- return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountDetails(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
987
- };
988
- /**
989
- *
990
- * @summary Get all history of orders placed in account
991
- * @param {AccountInformationApiGetUserAccountOrdersRequest} requestParameters Request parameters.
992
- * @param {*} [options] Override http request option.
993
- * @throws {RequiredError}
994
- * @memberof AccountInformationApi
995
- */
996
- AccountInformationApi.prototype.getUserAccountOrders = function (requestParameters, options) {
997
- var _this = this;
998
- return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountOrders(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
999
- };
1000
- /**
1001
- *
1002
- * @summary Get all positions of an investment account
1003
- * @param {AccountInformationApiGetUserAccountPositionsRequest} requestParameters Request parameters.
1004
- * @param {*} [options] Override http request option.
1005
- * @throws {RequiredError}
1006
- * @memberof AccountInformationApi
1007
- */
1008
- AccountInformationApi.prototype.getUserAccountPositions = function (requestParameters, options) {
1009
- var _this = this;
1010
- return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountPositions(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1011
- };
1012
- /**
1013
- *
1014
- * @summary List balances, positions and orders for the specified account.
1015
- * @param {AccountInformationApiGetUserHoldingsRequest} requestParameters Request parameters.
1016
- * @param {*} [options] Override http request option.
1017
- * @throws {RequiredError}
1018
- * @memberof AccountInformationApi
1019
- */
1020
- AccountInformationApi.prototype.getUserHoldings = function (requestParameters, options) {
1021
- var _this = this;
1022
- return (0, exports.AccountInformationApiFp)(this.configuration).getUserHoldings(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1023
- };
1024
- /**
1025
- *
1026
- * @summary List all investment accounts for the user
1027
- * @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
1028
- * @param {*} [options] Override http request option.
1029
- * @throws {RequiredError}
1030
- * @memberof AccountInformationApi
1031
- */
1032
- AccountInformationApi.prototype.listUserAccounts = function (requestParameters, options) {
1033
- var _this = this;
1034
- return (0, exports.AccountInformationApiFp)(this.configuration).listUserAccounts(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1035
- };
1036
- /**
1037
- *
1038
- * @summary Update details of an investment account
1039
- * @param {AccountInformationApiUpdateUserAccountRequest} requestParameters Request parameters.
1040
- * @param {*} [options] Override http request option.
1041
- * @throws {RequiredError}
1042
- * @memberof AccountInformationApi
1043
- */
1044
- AccountInformationApi.prototype.updateUserAccount = function (requestParameters, options) {
1045
- var _this = this;
1046
- return (0, exports.AccountInformationApiFp)(this.configuration).updateUserAccount(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1047
- };
1048
- return AccountInformationApi;
1049
- }(account_information_api_custom_1.AccountInformationApiCustom));
1050
- exports.AccountInformationApi = AccountInformationApi;
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
+ * Do not edit the class manually.
13
+ */
14
+ var __extends = (this && this.__extends) || (function () {
15
+ var extendStatics = function (d, b) {
16
+ extendStatics = Object.setPrototypeOf ||
17
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
18
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
19
+ return extendStatics(d, b);
20
+ };
21
+ return function (d, b) {
22
+ if (typeof b !== "function" && b !== null)
23
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
24
+ extendStatics(d, b);
25
+ function __() { this.constructor = d; }
26
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
27
+ };
28
+ })();
29
+ var __assign = (this && this.__assign) || function () {
30
+ __assign = Object.assign || function(t) {
31
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
32
+ s = arguments[i];
33
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
34
+ t[p] = s[p];
35
+ }
36
+ return t;
37
+ };
38
+ return __assign.apply(this, arguments);
39
+ };
40
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
41
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
42
+ return new (P || (P = Promise))(function (resolve, reject) {
43
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
44
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
45
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
46
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
47
+ });
48
+ };
49
+ var __generator = (this && this.__generator) || function (thisArg, body) {
50
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
51
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
52
+ function verb(n) { return function (v) { return step([n, v]); }; }
53
+ function step(op) {
54
+ if (f) throw new TypeError("Generator is already executing.");
55
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
56
+ 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;
57
+ if (y = 0, t) op = [op[0] & 2, t.value];
58
+ switch (op[0]) {
59
+ case 0: case 1: t = op; break;
60
+ case 4: _.label++; return { value: op[1], done: false };
61
+ case 5: _.label++; y = op[1]; op = [0]; continue;
62
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
63
+ default:
64
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
65
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
66
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
67
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
68
+ if (t[2]) _.ops.pop();
69
+ _.trys.pop(); continue;
70
+ }
71
+ op = body.call(thisArg, _);
72
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
73
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
74
+ }
75
+ };
76
+ Object.defineProperty(exports, "__esModule", { value: true });
77
+ exports.AccountInformationApi = exports.AccountInformationApiFactory = exports.AccountInformationApiFp = exports.AccountInformationApiAxiosParamCreator = void 0;
78
+ var axios_1 = require("axios");
79
+ // Some imports not used depending on template conditions
80
+ // @ts-ignore
81
+ var common_1 = require("../common");
82
+ // @ts-ignore
83
+ var base_1 = require("../base");
84
+ var requestBeforeHook_1 = require("../requestBeforeHook");
85
+ var account_information_api_custom_1 = require("./account-information-api-custom");
86
+ /**
87
+ * AccountInformationApi - axios parameter creator
88
+ * @export
89
+ */
90
+ var AccountInformationApiAxiosParamCreator = function (configuration) {
91
+ var _this = this;
92
+ return {
93
+ /**
94
+ *
95
+ * @summary List all accounts for the user, plus balances and positions for each account.
96
+ * @param {string} userId
97
+ * @param {string} userSecret
98
+ * @param {string} [brokerageAuthorizations] Optional. Comma seperated list of authorization IDs (only use if filtering is needed on one or more authorizations).
99
+ * @param {*} [options] Override http request option.
100
+ * @throws {RequiredError}
101
+ */
102
+ getAllUserHoldings: function (userId, userSecret, brokerageAuthorizations, options) {
103
+ if (options === void 0) { options = {}; }
104
+ return __awaiter(_this, void 0, void 0, function () {
105
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
106
+ return __generator(this, function (_a) {
107
+ switch (_a.label) {
108
+ case 0:
109
+ // verify required parameter 'userId' is not null or undefined
110
+ (0, common_1.assertParamExists)('getAllUserHoldings', 'userId', userId);
111
+ // verify required parameter 'userSecret' is not null or undefined
112
+ (0, common_1.assertParamExists)('getAllUserHoldings', 'userSecret', userSecret);
113
+ localVarPath = "/holdings";
114
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
115
+ if (configuration) {
116
+ baseOptions = configuration.baseOptions;
117
+ }
118
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
119
+ localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
120
+ localVarQueryParameter = {};
121
+ // authentication PartnerClientId required
122
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
123
+ // authentication PartnerSignature required
124
+ ];
125
+ case 1:
126
+ // authentication PartnerClientId required
127
+ _a.sent();
128
+ // authentication PartnerSignature required
129
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
130
+ // authentication PartnerTimestamp required
131
+ ];
132
+ case 2:
133
+ // authentication PartnerSignature required
134
+ _a.sent();
135
+ // authentication PartnerTimestamp required
136
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
137
+ case 3:
138
+ // authentication PartnerTimestamp required
139
+ _a.sent();
140
+ if (userId !== undefined) {
141
+ localVarQueryParameter['userId'] = userId;
142
+ }
143
+ if (userSecret !== undefined) {
144
+ localVarQueryParameter['userSecret'] = userSecret;
145
+ }
146
+ if (brokerageAuthorizations !== undefined) {
147
+ localVarQueryParameter['brokerage_authorizations'] = brokerageAuthorizations;
148
+ }
149
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
150
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
151
+ (0, requestBeforeHook_1.requestBeforeHook)({
152
+ queryParameters: localVarQueryParameter,
153
+ requestConfig: localVarRequestOptions,
154
+ path: localVarPath,
155
+ configuration: configuration
156
+ });
157
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
158
+ return [2 /*return*/, {
159
+ url: (0, common_1.toPathString)(localVarUrlObj),
160
+ options: localVarRequestOptions,
161
+ }];
162
+ }
163
+ });
164
+ });
165
+ },
166
+ /**
167
+ *
168
+ * @summary Get all cash balances of an investment account
169
+ * @param {string} userId
170
+ * @param {string} userSecret
171
+ * @param {string} accountId The ID of the account get positions.
172
+ * @param {*} [options] Override http request option.
173
+ * @throws {RequiredError}
174
+ */
175
+ getUserAccountBalance: function (userId, userSecret, accountId, options) {
176
+ if (options === void 0) { options = {}; }
177
+ return __awaiter(_this, void 0, void 0, function () {
178
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
179
+ return __generator(this, function (_a) {
180
+ switch (_a.label) {
181
+ case 0:
182
+ // verify required parameter 'userId' is not null or undefined
183
+ (0, common_1.assertParamExists)('getUserAccountBalance', 'userId', userId);
184
+ // verify required parameter 'userSecret' is not null or undefined
185
+ (0, common_1.assertParamExists)('getUserAccountBalance', 'userSecret', userSecret);
186
+ // verify required parameter 'accountId' is not null or undefined
187
+ (0, common_1.assertParamExists)('getUserAccountBalance', 'accountId', accountId);
188
+ localVarPath = "/accounts/{accountId}/balances"
189
+ .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
190
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
191
+ if (configuration) {
192
+ baseOptions = configuration.baseOptions;
193
+ }
194
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
195
+ localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
196
+ localVarQueryParameter = {};
197
+ // authentication PartnerClientId required
198
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
199
+ // authentication PartnerSignature required
200
+ ];
201
+ case 1:
202
+ // authentication PartnerClientId required
203
+ _a.sent();
204
+ // authentication PartnerSignature required
205
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
206
+ // authentication PartnerTimestamp required
207
+ ];
208
+ case 2:
209
+ // authentication PartnerSignature required
210
+ _a.sent();
211
+ // authentication PartnerTimestamp required
212
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
213
+ case 3:
214
+ // authentication PartnerTimestamp required
215
+ _a.sent();
216
+ if (userId !== undefined) {
217
+ localVarQueryParameter['userId'] = userId;
218
+ }
219
+ if (userSecret !== undefined) {
220
+ localVarQueryParameter['userSecret'] = userSecret;
221
+ }
222
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
223
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
224
+ (0, requestBeforeHook_1.requestBeforeHook)({
225
+ queryParameters: localVarQueryParameter,
226
+ requestConfig: localVarRequestOptions,
227
+ path: localVarPath,
228
+ configuration: configuration
229
+ });
230
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
231
+ return [2 /*return*/, {
232
+ url: (0, common_1.toPathString)(localVarUrlObj),
233
+ options: localVarRequestOptions,
234
+ }];
235
+ }
236
+ });
237
+ });
238
+ },
239
+ /**
240
+ *
241
+ * @summary Return details of a specific investment account
242
+ * @param {string} userId
243
+ * @param {string} userSecret
244
+ * @param {string} accountId The ID of the account to get detail of.
245
+ * @param {*} [options] Override http request option.
246
+ * @throws {RequiredError}
247
+ */
248
+ getUserAccountDetails: function (userId, userSecret, accountId, options) {
249
+ if (options === void 0) { options = {}; }
250
+ return __awaiter(_this, void 0, void 0, function () {
251
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
252
+ return __generator(this, function (_a) {
253
+ switch (_a.label) {
254
+ case 0:
255
+ // verify required parameter 'userId' is not null or undefined
256
+ (0, common_1.assertParamExists)('getUserAccountDetails', 'userId', userId);
257
+ // verify required parameter 'userSecret' is not null or undefined
258
+ (0, common_1.assertParamExists)('getUserAccountDetails', 'userSecret', userSecret);
259
+ // verify required parameter 'accountId' is not null or undefined
260
+ (0, common_1.assertParamExists)('getUserAccountDetails', 'accountId', accountId);
261
+ localVarPath = "/accounts/{accountId}"
262
+ .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
263
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
264
+ if (configuration) {
265
+ baseOptions = configuration.baseOptions;
266
+ }
267
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
268
+ localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
269
+ localVarQueryParameter = {};
270
+ // authentication PartnerClientId required
271
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
272
+ // authentication PartnerSignature required
273
+ ];
274
+ case 1:
275
+ // authentication PartnerClientId required
276
+ _a.sent();
277
+ // authentication PartnerSignature required
278
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
279
+ // authentication PartnerTimestamp required
280
+ ];
281
+ case 2:
282
+ // authentication PartnerSignature required
283
+ _a.sent();
284
+ // authentication PartnerTimestamp required
285
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
286
+ case 3:
287
+ // authentication PartnerTimestamp required
288
+ _a.sent();
289
+ if (userId !== undefined) {
290
+ localVarQueryParameter['userId'] = userId;
291
+ }
292
+ if (userSecret !== undefined) {
293
+ localVarQueryParameter['userSecret'] = userSecret;
294
+ }
295
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
296
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
297
+ (0, requestBeforeHook_1.requestBeforeHook)({
298
+ queryParameters: localVarQueryParameter,
299
+ requestConfig: localVarRequestOptions,
300
+ path: localVarPath,
301
+ configuration: configuration
302
+ });
303
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
304
+ return [2 /*return*/, {
305
+ url: (0, common_1.toPathString)(localVarUrlObj),
306
+ options: localVarRequestOptions,
307
+ }];
308
+ }
309
+ });
310
+ });
311
+ },
312
+ /**
313
+ *
314
+ * @summary Get all history of orders placed in account
315
+ * @param {string} userId
316
+ * @param {string} userSecret
317
+ * @param {string} accountId The ID of the account get positions.
318
+ * @param {'all' | 'open' | 'executed'} [state] defaults value is set to \&quot;all\&quot;
319
+ * @param {*} [options] Override http request option.
320
+ * @throws {RequiredError}
321
+ */
322
+ getUserAccountOrders: function (userId, userSecret, accountId, state, options) {
323
+ if (options === void 0) { options = {}; }
324
+ return __awaiter(_this, void 0, void 0, function () {
325
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
326
+ return __generator(this, function (_a) {
327
+ switch (_a.label) {
328
+ case 0:
329
+ // verify required parameter 'userId' is not null or undefined
330
+ (0, common_1.assertParamExists)('getUserAccountOrders', 'userId', userId);
331
+ // verify required parameter 'userSecret' is not null or undefined
332
+ (0, common_1.assertParamExists)('getUserAccountOrders', 'userSecret', userSecret);
333
+ // verify required parameter 'accountId' is not null or undefined
334
+ (0, common_1.assertParamExists)('getUserAccountOrders', 'accountId', accountId);
335
+ localVarPath = "/accounts/{accountId}/orders"
336
+ .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
337
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
338
+ if (configuration) {
339
+ baseOptions = configuration.baseOptions;
340
+ }
341
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
342
+ localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
343
+ localVarQueryParameter = {};
344
+ // authentication PartnerClientId required
345
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
346
+ // authentication PartnerSignature required
347
+ ];
348
+ case 1:
349
+ // authentication PartnerClientId required
350
+ _a.sent();
351
+ // authentication PartnerSignature required
352
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
353
+ // authentication PartnerTimestamp required
354
+ ];
355
+ case 2:
356
+ // authentication PartnerSignature required
357
+ _a.sent();
358
+ // authentication PartnerTimestamp required
359
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
360
+ case 3:
361
+ // authentication PartnerTimestamp required
362
+ _a.sent();
363
+ if (userId !== undefined) {
364
+ localVarQueryParameter['userId'] = userId;
365
+ }
366
+ if (userSecret !== undefined) {
367
+ localVarQueryParameter['userSecret'] = userSecret;
368
+ }
369
+ if (state !== undefined) {
370
+ localVarQueryParameter['state'] = state;
371
+ }
372
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
373
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
374
+ (0, requestBeforeHook_1.requestBeforeHook)({
375
+ queryParameters: localVarQueryParameter,
376
+ requestConfig: localVarRequestOptions,
377
+ path: localVarPath,
378
+ configuration: configuration
379
+ });
380
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
381
+ return [2 /*return*/, {
382
+ url: (0, common_1.toPathString)(localVarUrlObj),
383
+ options: localVarRequestOptions,
384
+ }];
385
+ }
386
+ });
387
+ });
388
+ },
389
+ /**
390
+ *
391
+ * @summary Get all positions of an investment account
392
+ * @param {string} userId
393
+ * @param {string} userSecret
394
+ * @param {string} accountId The ID of the account get positions.
395
+ * @param {*} [options] Override http request option.
396
+ * @throws {RequiredError}
397
+ */
398
+ getUserAccountPositions: function (userId, userSecret, accountId, options) {
399
+ if (options === void 0) { options = {}; }
400
+ return __awaiter(_this, void 0, void 0, function () {
401
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
402
+ return __generator(this, function (_a) {
403
+ switch (_a.label) {
404
+ case 0:
405
+ // verify required parameter 'userId' is not null or undefined
406
+ (0, common_1.assertParamExists)('getUserAccountPositions', 'userId', userId);
407
+ // verify required parameter 'userSecret' is not null or undefined
408
+ (0, common_1.assertParamExists)('getUserAccountPositions', 'userSecret', userSecret);
409
+ // verify required parameter 'accountId' is not null or undefined
410
+ (0, common_1.assertParamExists)('getUserAccountPositions', 'accountId', accountId);
411
+ localVarPath = "/accounts/{accountId}/positions"
412
+ .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
413
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
414
+ if (configuration) {
415
+ baseOptions = configuration.baseOptions;
416
+ }
417
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
418
+ localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
419
+ localVarQueryParameter = {};
420
+ // authentication PartnerClientId required
421
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
422
+ // authentication PartnerSignature required
423
+ ];
424
+ case 1:
425
+ // authentication PartnerClientId required
426
+ _a.sent();
427
+ // authentication PartnerSignature required
428
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
429
+ // authentication PartnerTimestamp required
430
+ ];
431
+ case 2:
432
+ // authentication PartnerSignature required
433
+ _a.sent();
434
+ // authentication PartnerTimestamp required
435
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
436
+ case 3:
437
+ // authentication PartnerTimestamp required
438
+ _a.sent();
439
+ if (userId !== undefined) {
440
+ localVarQueryParameter['userId'] = userId;
441
+ }
442
+ if (userSecret !== undefined) {
443
+ localVarQueryParameter['userSecret'] = userSecret;
444
+ }
445
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
446
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
447
+ (0, requestBeforeHook_1.requestBeforeHook)({
448
+ queryParameters: localVarQueryParameter,
449
+ requestConfig: localVarRequestOptions,
450
+ path: localVarPath,
451
+ configuration: configuration
452
+ });
453
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
454
+ return [2 /*return*/, {
455
+ url: (0, common_1.toPathString)(localVarUrlObj),
456
+ options: localVarRequestOptions,
457
+ }];
458
+ }
459
+ });
460
+ });
461
+ },
462
+ /**
463
+ *
464
+ * @summary List balances, positions and orders for the specified account.
465
+ * @param {string} accountId The ID of the account to fetch holdings for.
466
+ * @param {string} userId
467
+ * @param {string} userSecret
468
+ * @param {*} [options] Override http request option.
469
+ * @throws {RequiredError}
470
+ */
471
+ getUserHoldings: function (accountId, userId, userSecret, options) {
472
+ if (options === void 0) { options = {}; }
473
+ return __awaiter(_this, void 0, void 0, function () {
474
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
475
+ return __generator(this, function (_a) {
476
+ switch (_a.label) {
477
+ case 0:
478
+ // verify required parameter 'accountId' is not null or undefined
479
+ (0, common_1.assertParamExists)('getUserHoldings', 'accountId', accountId);
480
+ // verify required parameter 'userId' is not null or undefined
481
+ (0, common_1.assertParamExists)('getUserHoldings', 'userId', userId);
482
+ // verify required parameter 'userSecret' is not null or undefined
483
+ (0, common_1.assertParamExists)('getUserHoldings', 'userSecret', userSecret);
484
+ localVarPath = "/accounts/{accountId}/holdings"
485
+ .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
486
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
487
+ if (configuration) {
488
+ baseOptions = configuration.baseOptions;
489
+ }
490
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
491
+ localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
492
+ localVarQueryParameter = {};
493
+ // authentication PartnerClientId required
494
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
495
+ // authentication PartnerSignature required
496
+ ];
497
+ case 1:
498
+ // authentication PartnerClientId required
499
+ _a.sent();
500
+ // authentication PartnerSignature required
501
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
502
+ // authentication PartnerTimestamp required
503
+ ];
504
+ case 2:
505
+ // authentication PartnerSignature required
506
+ _a.sent();
507
+ // authentication PartnerTimestamp required
508
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
509
+ case 3:
510
+ // authentication PartnerTimestamp required
511
+ _a.sent();
512
+ if (userId !== undefined) {
513
+ localVarQueryParameter['userId'] = userId;
514
+ }
515
+ if (userSecret !== undefined) {
516
+ localVarQueryParameter['userSecret'] = userSecret;
517
+ }
518
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
519
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
520
+ (0, requestBeforeHook_1.requestBeforeHook)({
521
+ queryParameters: localVarQueryParameter,
522
+ requestConfig: localVarRequestOptions,
523
+ path: localVarPath,
524
+ configuration: configuration
525
+ });
526
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
527
+ return [2 /*return*/, {
528
+ url: (0, common_1.toPathString)(localVarUrlObj),
529
+ options: localVarRequestOptions,
530
+ }];
531
+ }
532
+ });
533
+ });
534
+ },
535
+ /**
536
+ *
537
+ * @summary List all investment accounts for the user
538
+ * @param {string} userId
539
+ * @param {string} userSecret
540
+ * @param {*} [options] Override http request option.
541
+ * @throws {RequiredError}
542
+ */
543
+ listUserAccounts: function (userId, userSecret, options) {
544
+ if (options === void 0) { options = {}; }
545
+ return __awaiter(_this, void 0, void 0, function () {
546
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
547
+ return __generator(this, function (_a) {
548
+ switch (_a.label) {
549
+ case 0:
550
+ // verify required parameter 'userId' is not null or undefined
551
+ (0, common_1.assertParamExists)('listUserAccounts', 'userId', userId);
552
+ // verify required parameter 'userSecret' is not null or undefined
553
+ (0, common_1.assertParamExists)('listUserAccounts', 'userSecret', userSecret);
554
+ localVarPath = "/accounts";
555
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
556
+ if (configuration) {
557
+ baseOptions = configuration.baseOptions;
558
+ }
559
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
560
+ localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
561
+ localVarQueryParameter = {};
562
+ // authentication PartnerClientId required
563
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
564
+ // authentication PartnerSignature required
565
+ ];
566
+ case 1:
567
+ // authentication PartnerClientId required
568
+ _a.sent();
569
+ // authentication PartnerSignature required
570
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
571
+ // authentication PartnerTimestamp required
572
+ ];
573
+ case 2:
574
+ // authentication PartnerSignature required
575
+ _a.sent();
576
+ // authentication PartnerTimestamp required
577
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
578
+ case 3:
579
+ // authentication PartnerTimestamp required
580
+ _a.sent();
581
+ if (userId !== undefined) {
582
+ localVarQueryParameter['userId'] = userId;
583
+ }
584
+ if (userSecret !== undefined) {
585
+ localVarQueryParameter['userSecret'] = userSecret;
586
+ }
587
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
588
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
589
+ (0, requestBeforeHook_1.requestBeforeHook)({
590
+ queryParameters: localVarQueryParameter,
591
+ requestConfig: localVarRequestOptions,
592
+ path: localVarPath,
593
+ configuration: configuration
594
+ });
595
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
596
+ return [2 /*return*/, {
597
+ url: (0, common_1.toPathString)(localVarUrlObj),
598
+ options: localVarRequestOptions,
599
+ }];
600
+ }
601
+ });
602
+ });
603
+ },
604
+ /**
605
+ *
606
+ * @summary Update details of an investment account
607
+ * @param {string} userId
608
+ * @param {string} userSecret
609
+ * @param {string} accountId The ID of the account to update.
610
+ * @param {*} [options] Override http request option.
611
+ * @throws {RequiredError}
612
+ */
613
+ updateUserAccount: function (userId, userSecret, accountId, options) {
614
+ if (options === void 0) { options = {}; }
615
+ return __awaiter(_this, void 0, void 0, function () {
616
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
617
+ return __generator(this, function (_a) {
618
+ switch (_a.label) {
619
+ case 0:
620
+ // verify required parameter 'userId' is not null or undefined
621
+ (0, common_1.assertParamExists)('updateUserAccount', 'userId', userId);
622
+ // verify required parameter 'userSecret' is not null or undefined
623
+ (0, common_1.assertParamExists)('updateUserAccount', 'userSecret', userSecret);
624
+ // verify required parameter 'accountId' is not null or undefined
625
+ (0, common_1.assertParamExists)('updateUserAccount', 'accountId', accountId);
626
+ localVarPath = "/accounts/{accountId}"
627
+ .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
628
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
629
+ if (configuration) {
630
+ baseOptions = configuration.baseOptions;
631
+ }
632
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
633
+ localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
634
+ localVarQueryParameter = {};
635
+ // authentication PartnerClientId required
636
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
637
+ // authentication PartnerSignature required
638
+ ];
639
+ case 1:
640
+ // authentication PartnerClientId required
641
+ _a.sent();
642
+ // authentication PartnerSignature required
643
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
644
+ // authentication PartnerTimestamp required
645
+ ];
646
+ case 2:
647
+ // authentication PartnerSignature required
648
+ _a.sent();
649
+ // authentication PartnerTimestamp required
650
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
651
+ case 3:
652
+ // authentication PartnerTimestamp required
653
+ _a.sent();
654
+ if (userId !== undefined) {
655
+ localVarQueryParameter['userId'] = userId;
656
+ }
657
+ if (userSecret !== undefined) {
658
+ localVarQueryParameter['userSecret'] = userSecret;
659
+ }
660
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
661
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
662
+ (0, requestBeforeHook_1.requestBeforeHook)({
663
+ queryParameters: localVarQueryParameter,
664
+ requestConfig: localVarRequestOptions,
665
+ path: localVarPath,
666
+ configuration: configuration
667
+ });
668
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
669
+ return [2 /*return*/, {
670
+ url: (0, common_1.toPathString)(localVarUrlObj),
671
+ options: localVarRequestOptions,
672
+ }];
673
+ }
674
+ });
675
+ });
676
+ },
677
+ };
678
+ };
679
+ exports.AccountInformationApiAxiosParamCreator = AccountInformationApiAxiosParamCreator;
680
+ /**
681
+ * AccountInformationApi - functional programming interface
682
+ * @export
683
+ */
684
+ var AccountInformationApiFp = function (configuration) {
685
+ var localVarAxiosParamCreator = (0, exports.AccountInformationApiAxiosParamCreator)(configuration);
686
+ return {
687
+ /**
688
+ *
689
+ * @summary List all accounts for the user, plus balances and positions for each account.
690
+ * @param {AccountInformationApiGetAllUserHoldingsRequest} requestParameters Request parameters.
691
+ * @param {*} [options] Override http request option.
692
+ * @throws {RequiredError}
693
+ */
694
+ getAllUserHoldings: function (requestParameters, options) {
695
+ return __awaiter(this, void 0, void 0, function () {
696
+ var localVarAxiosArgs;
697
+ return __generator(this, function (_a) {
698
+ switch (_a.label) {
699
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAllUserHoldings(requestParameters.userId, requestParameters.userSecret, requestParameters.brokerageAuthorizations, options)];
700
+ case 1:
701
+ localVarAxiosArgs = _a.sent();
702
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
703
+ }
704
+ });
705
+ });
706
+ },
707
+ /**
708
+ *
709
+ * @summary Get all cash balances of an investment account
710
+ * @param {AccountInformationApiGetUserAccountBalanceRequest} requestParameters Request parameters.
711
+ * @param {*} [options] Override http request option.
712
+ * @throws {RequiredError}
713
+ */
714
+ getUserAccountBalance: function (requestParameters, options) {
715
+ return __awaiter(this, void 0, void 0, function () {
716
+ var localVarAxiosArgs;
717
+ return __generator(this, function (_a) {
718
+ switch (_a.label) {
719
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getUserAccountBalance(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options)];
720
+ case 1:
721
+ localVarAxiosArgs = _a.sent();
722
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
723
+ }
724
+ });
725
+ });
726
+ },
727
+ /**
728
+ *
729
+ * @summary Return details of a specific investment account
730
+ * @param {AccountInformationApiGetUserAccountDetailsRequest} requestParameters Request parameters.
731
+ * @param {*} [options] Override http request option.
732
+ * @throws {RequiredError}
733
+ */
734
+ getUserAccountDetails: function (requestParameters, options) {
735
+ return __awaiter(this, void 0, void 0, function () {
736
+ var localVarAxiosArgs;
737
+ return __generator(this, function (_a) {
738
+ switch (_a.label) {
739
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getUserAccountDetails(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options)];
740
+ case 1:
741
+ localVarAxiosArgs = _a.sent();
742
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
743
+ }
744
+ });
745
+ });
746
+ },
747
+ /**
748
+ *
749
+ * @summary Get all history of orders placed in account
750
+ * @param {AccountInformationApiGetUserAccountOrdersRequest} requestParameters Request parameters.
751
+ * @param {*} [options] Override http request option.
752
+ * @throws {RequiredError}
753
+ */
754
+ getUserAccountOrders: function (requestParameters, options) {
755
+ return __awaiter(this, void 0, void 0, function () {
756
+ var localVarAxiosArgs;
757
+ return __generator(this, function (_a) {
758
+ switch (_a.label) {
759
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getUserAccountOrders(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, requestParameters.state, options)];
760
+ case 1:
761
+ localVarAxiosArgs = _a.sent();
762
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
763
+ }
764
+ });
765
+ });
766
+ },
767
+ /**
768
+ *
769
+ * @summary Get all positions of an investment account
770
+ * @param {AccountInformationApiGetUserAccountPositionsRequest} requestParameters Request parameters.
771
+ * @param {*} [options] Override http request option.
772
+ * @throws {RequiredError}
773
+ */
774
+ getUserAccountPositions: function (requestParameters, options) {
775
+ return __awaiter(this, void 0, void 0, function () {
776
+ var localVarAxiosArgs;
777
+ return __generator(this, function (_a) {
778
+ switch (_a.label) {
779
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getUserAccountPositions(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options)];
780
+ case 1:
781
+ localVarAxiosArgs = _a.sent();
782
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
783
+ }
784
+ });
785
+ });
786
+ },
787
+ /**
788
+ *
789
+ * @summary List balances, positions and orders for the specified account.
790
+ * @param {AccountInformationApiGetUserHoldingsRequest} requestParameters Request parameters.
791
+ * @param {*} [options] Override http request option.
792
+ * @throws {RequiredError}
793
+ */
794
+ getUserHoldings: function (requestParameters, options) {
795
+ return __awaiter(this, void 0, void 0, function () {
796
+ var localVarAxiosArgs;
797
+ return __generator(this, function (_a) {
798
+ switch (_a.label) {
799
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getUserHoldings(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, options)];
800
+ case 1:
801
+ localVarAxiosArgs = _a.sent();
802
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
803
+ }
804
+ });
805
+ });
806
+ },
807
+ /**
808
+ *
809
+ * @summary List all investment accounts for the user
810
+ * @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
811
+ * @param {*} [options] Override http request option.
812
+ * @throws {RequiredError}
813
+ */
814
+ listUserAccounts: function (requestParameters, options) {
815
+ return __awaiter(this, void 0, void 0, function () {
816
+ var localVarAxiosArgs;
817
+ return __generator(this, function (_a) {
818
+ switch (_a.label) {
819
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listUserAccounts(requestParameters.userId, requestParameters.userSecret, options)];
820
+ case 1:
821
+ localVarAxiosArgs = _a.sent();
822
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
823
+ }
824
+ });
825
+ });
826
+ },
827
+ /**
828
+ *
829
+ * @summary Update details of an investment account
830
+ * @param {AccountInformationApiUpdateUserAccountRequest} requestParameters Request parameters.
831
+ * @param {*} [options] Override http request option.
832
+ * @throws {RequiredError}
833
+ */
834
+ updateUserAccount: function (requestParameters, options) {
835
+ return __awaiter(this, void 0, void 0, function () {
836
+ var localVarAxiosArgs;
837
+ return __generator(this, function (_a) {
838
+ switch (_a.label) {
839
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateUserAccount(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options)];
840
+ case 1:
841
+ localVarAxiosArgs = _a.sent();
842
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
843
+ }
844
+ });
845
+ });
846
+ },
847
+ };
848
+ };
849
+ exports.AccountInformationApiFp = AccountInformationApiFp;
850
+ /**
851
+ * AccountInformationApi - factory interface
852
+ * @export
853
+ */
854
+ var AccountInformationApiFactory = function (configuration, basePath, axios) {
855
+ var localVarFp = (0, exports.AccountInformationApiFp)(configuration);
856
+ return {
857
+ /**
858
+ *
859
+ * @summary List all accounts for the user, plus balances and positions for each account.
860
+ * @param {AccountInformationApiGetAllUserHoldingsRequest} requestParameters Request parameters.
861
+ * @param {*} [options] Override http request option.
862
+ * @throws {RequiredError}
863
+ */
864
+ getAllUserHoldings: function (requestParameters, options) {
865
+ return localVarFp.getAllUserHoldings(requestParameters, options).then(function (request) { return request(axios, basePath); });
866
+ },
867
+ /**
868
+ *
869
+ * @summary Get all cash balances of an investment account
870
+ * @param {AccountInformationApiGetUserAccountBalanceRequest} requestParameters Request parameters.
871
+ * @param {*} [options] Override http request option.
872
+ * @throws {RequiredError}
873
+ */
874
+ getUserAccountBalance: function (requestParameters, options) {
875
+ return localVarFp.getUserAccountBalance(requestParameters, options).then(function (request) { return request(axios, basePath); });
876
+ },
877
+ /**
878
+ *
879
+ * @summary Return details of a specific investment account
880
+ * @param {AccountInformationApiGetUserAccountDetailsRequest} requestParameters Request parameters.
881
+ * @param {*} [options] Override http request option.
882
+ * @throws {RequiredError}
883
+ */
884
+ getUserAccountDetails: function (requestParameters, options) {
885
+ return localVarFp.getUserAccountDetails(requestParameters, options).then(function (request) { return request(axios, basePath); });
886
+ },
887
+ /**
888
+ *
889
+ * @summary Get all history of orders placed in account
890
+ * @param {AccountInformationApiGetUserAccountOrdersRequest} requestParameters Request parameters.
891
+ * @param {*} [options] Override http request option.
892
+ * @throws {RequiredError}
893
+ */
894
+ getUserAccountOrders: function (requestParameters, options) {
895
+ return localVarFp.getUserAccountOrders(requestParameters, options).then(function (request) { return request(axios, basePath); });
896
+ },
897
+ /**
898
+ *
899
+ * @summary Get all positions of an investment account
900
+ * @param {AccountInformationApiGetUserAccountPositionsRequest} requestParameters Request parameters.
901
+ * @param {*} [options] Override http request option.
902
+ * @throws {RequiredError}
903
+ */
904
+ getUserAccountPositions: function (requestParameters, options) {
905
+ return localVarFp.getUserAccountPositions(requestParameters, options).then(function (request) { return request(axios, basePath); });
906
+ },
907
+ /**
908
+ *
909
+ * @summary List balances, positions and orders for the specified account.
910
+ * @param {AccountInformationApiGetUserHoldingsRequest} requestParameters Request parameters.
911
+ * @param {*} [options] Override http request option.
912
+ * @throws {RequiredError}
913
+ */
914
+ getUserHoldings: function (requestParameters, options) {
915
+ return localVarFp.getUserHoldings(requestParameters, options).then(function (request) { return request(axios, basePath); });
916
+ },
917
+ /**
918
+ *
919
+ * @summary List all investment accounts for the user
920
+ * @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
921
+ * @param {*} [options] Override http request option.
922
+ * @throws {RequiredError}
923
+ */
924
+ listUserAccounts: function (requestParameters, options) {
925
+ return localVarFp.listUserAccounts(requestParameters, options).then(function (request) { return request(axios, basePath); });
926
+ },
927
+ /**
928
+ *
929
+ * @summary Update details of an investment account
930
+ * @param {AccountInformationApiUpdateUserAccountRequest} requestParameters Request parameters.
931
+ * @param {*} [options] Override http request option.
932
+ * @throws {RequiredError}
933
+ */
934
+ updateUserAccount: function (requestParameters, options) {
935
+ return localVarFp.updateUserAccount(requestParameters, options).then(function (request) { return request(axios, basePath); });
936
+ },
937
+ };
938
+ };
939
+ exports.AccountInformationApiFactory = AccountInformationApiFactory;
940
+ /**
941
+ * AccountInformationApi - object-oriented interface
942
+ * @export
943
+ * @class AccountInformationApi
944
+ * @extends {BaseAPI}
945
+ */
946
+ var AccountInformationApi = /** @class */ (function (_super) {
947
+ __extends(AccountInformationApi, _super);
948
+ function AccountInformationApi() {
949
+ return _super !== null && _super.apply(this, arguments) || this;
950
+ }
951
+ /**
952
+ *
953
+ * @summary List all accounts for the user, plus balances and positions for each account.
954
+ * @param {AccountInformationApiGetAllUserHoldingsRequest} requestParameters Request parameters.
955
+ * @param {*} [options] Override http request option.
956
+ * @throws {RequiredError}
957
+ * @memberof AccountInformationApi
958
+ */
959
+ AccountInformationApi.prototype.getAllUserHoldings = function (requestParameters, options) {
960
+ var _this = this;
961
+ return (0, exports.AccountInformationApiFp)(this.configuration).getAllUserHoldings(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
962
+ };
963
+ /**
964
+ *
965
+ * @summary Get all cash balances of an investment account
966
+ * @param {AccountInformationApiGetUserAccountBalanceRequest} requestParameters Request parameters.
967
+ * @param {*} [options] Override http request option.
968
+ * @throws {RequiredError}
969
+ * @memberof AccountInformationApi
970
+ */
971
+ AccountInformationApi.prototype.getUserAccountBalance = function (requestParameters, options) {
972
+ var _this = this;
973
+ return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountBalance(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
974
+ };
975
+ /**
976
+ *
977
+ * @summary Return details of a specific investment account
978
+ * @param {AccountInformationApiGetUserAccountDetailsRequest} requestParameters Request parameters.
979
+ * @param {*} [options] Override http request option.
980
+ * @throws {RequiredError}
981
+ * @memberof AccountInformationApi
982
+ */
983
+ AccountInformationApi.prototype.getUserAccountDetails = function (requestParameters, options) {
984
+ var _this = this;
985
+ return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountDetails(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
986
+ };
987
+ /**
988
+ *
989
+ * @summary Get all history of orders placed in account
990
+ * @param {AccountInformationApiGetUserAccountOrdersRequest} requestParameters Request parameters.
991
+ * @param {*} [options] Override http request option.
992
+ * @throws {RequiredError}
993
+ * @memberof AccountInformationApi
994
+ */
995
+ AccountInformationApi.prototype.getUserAccountOrders = function (requestParameters, options) {
996
+ var _this = this;
997
+ return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountOrders(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
998
+ };
999
+ /**
1000
+ *
1001
+ * @summary Get all positions of an investment account
1002
+ * @param {AccountInformationApiGetUserAccountPositionsRequest} requestParameters Request parameters.
1003
+ * @param {*} [options] Override http request option.
1004
+ * @throws {RequiredError}
1005
+ * @memberof AccountInformationApi
1006
+ */
1007
+ AccountInformationApi.prototype.getUserAccountPositions = function (requestParameters, options) {
1008
+ var _this = this;
1009
+ return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountPositions(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1010
+ };
1011
+ /**
1012
+ *
1013
+ * @summary List balances, positions and orders for the specified account.
1014
+ * @param {AccountInformationApiGetUserHoldingsRequest} requestParameters Request parameters.
1015
+ * @param {*} [options] Override http request option.
1016
+ * @throws {RequiredError}
1017
+ * @memberof AccountInformationApi
1018
+ */
1019
+ AccountInformationApi.prototype.getUserHoldings = function (requestParameters, options) {
1020
+ var _this = this;
1021
+ return (0, exports.AccountInformationApiFp)(this.configuration).getUserHoldings(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1022
+ };
1023
+ /**
1024
+ *
1025
+ * @summary List all investment accounts for the user
1026
+ * @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
1027
+ * @param {*} [options] Override http request option.
1028
+ * @throws {RequiredError}
1029
+ * @memberof AccountInformationApi
1030
+ */
1031
+ AccountInformationApi.prototype.listUserAccounts = function (requestParameters, options) {
1032
+ var _this = this;
1033
+ return (0, exports.AccountInformationApiFp)(this.configuration).listUserAccounts(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1034
+ };
1035
+ /**
1036
+ *
1037
+ * @summary Update details of an investment account
1038
+ * @param {AccountInformationApiUpdateUserAccountRequest} requestParameters Request parameters.
1039
+ * @param {*} [options] Override http request option.
1040
+ * @throws {RequiredError}
1041
+ * @memberof AccountInformationApi
1042
+ */
1043
+ AccountInformationApi.prototype.updateUserAccount = function (requestParameters, options) {
1044
+ var _this = this;
1045
+ return (0, exports.AccountInformationApiFp)(this.configuration).updateUserAccount(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1046
+ };
1047
+ return AccountInformationApi;
1048
+ }(account_information_api_custom_1.AccountInformationApiCustom));
1049
+ exports.AccountInformationApi = AccountInformationApi;