snaptrade-typescript-sdk 2.4.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.konfig/generate-id.txt +1 -1
- package/.konfigignore +3 -1
- package/README.md +107 -23
- package/api/account-information-api.ts +1075 -0
- package/api/api-disclaimer-api.ts +190 -0
- package/api/api-status-api.ts +128 -0
- package/api/authentication-api.ts +591 -0
- package/api/connections-api.ts +425 -0
- package/api/error-logs-api.ts +175 -0
- package/api/options-api.ts +758 -0
- package/api/portfolio-management-api.ts +3402 -0
- package/api/reference-data-api.ts +1076 -0
- package/api/trading-api.ts +1339 -0
- package/api/transactions-and-reporting-api.ts +391 -0
- package/api.ts +12 -11530
- package/base.ts +1 -2
- package/client.ts +55 -0
- package/common.ts +16 -54
- package/configuration.ts +33 -10
- package/dist/api/account-information-api.d.ts +525 -0
- package/dist/api/account-information-api.js +1049 -0
- package/dist/api/api-disclaimer-api.d.ts +102 -0
- package/dist/api/api-disclaimer-api.js +245 -0
- package/dist/api/api-status-api.d.ts +70 -0
- package/dist/api/api-status-api.js +203 -0
- package/dist/api/authentication-api.d.ts +280 -0
- package/dist/api/authentication-api.js +659 -0
- package/dist/api/connections-api.d.ts +214 -0
- package/dist/api/connections-api.js +470 -0
- package/dist/api/error-logs-api.d.ts +94 -0
- package/dist/api/error-logs-api.js +240 -0
- package/dist/api/options-api.d.ts +381 -0
- package/dist/api/options-api.js +728 -0
- package/dist/api/portfolio-management-api.d.ts +1624 -0
- package/dist/api/portfolio-management-api.js +3574 -0
- package/dist/api/reference-data-api.d.ts +481 -0
- package/dist/api/reference-data-api.js +1244 -0
- package/dist/api/trading-api.d.ts +662 -0
- package/dist/api/trading-api.js +1276 -0
- package/dist/api/transactions-and-reporting-api.d.ts +204 -0
- package/dist/api/transactions-and-reporting-api.js +387 -0
- package/dist/api.d.ts +12 -7363
- package/dist/api.js +24 -9175
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -2
- package/dist/client.d.ts +27 -0
- package/dist/client.js +34 -0
- package/dist/common.d.ts +1 -6
- package/dist/common.js +26 -81
- package/dist/configuration.d.ts +21 -6
- package/dist/configuration.js +13 -8
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -2
- package/dist/index.test.js +84 -14
- package/dist/jest.config.js +0 -1
- package/dist/models/account-holdings.d.ts +47 -0
- package/dist/models/account-holdings.js +15 -0
- package/dist/models/account-order-record-status.d.ts +39 -0
- package/dist/models/account-order-record-status.js +43 -0
- package/dist/models/account-order-record.d.ts +126 -0
- package/dist/models/account-order-record.js +15 -0
- package/dist/models/account-simple.d.ts +37 -0
- package/dist/models/account-simple.js +15 -0
- package/dist/models/account.d.ts +76 -0
- package/dist/models/account.js +15 -0
- package/dist/models/action.d.ts +21 -0
- package/dist/models/action.js +25 -0
- package/dist/models/apidisclaimer-accept-request.d.ts +24 -0
- package/dist/models/apidisclaimer-accept-request.js +15 -0
- package/dist/models/authentication-login-snap-trade-user200-response.d.ts +18 -0
- package/dist/models/authentication-login-snap-trade-user200-response.js +15 -0
- package/dist/models/balance.d.ts +32 -0
- package/dist/models/balance.js +15 -0
- package/dist/models/brokerage-authorization-type-read-only-brokerage.d.ts +37 -0
- package/dist/models/brokerage-authorization-type-read-only-brokerage.js +15 -0
- package/dist/models/brokerage-authorization-type-read-only.d.ts +56 -0
- package/dist/models/brokerage-authorization-type-read-only.js +26 -0
- package/dist/models/brokerage-authorization-type.d.ts +30 -0
- package/dist/models/brokerage-authorization-type.js +20 -0
- package/dist/models/brokerage-authorization.d.ts +76 -0
- package/dist/models/brokerage-authorization.js +15 -0
- package/dist/models/brokerage-symbol.d.ts +51 -0
- package/dist/models/brokerage-symbol.js +15 -0
- package/dist/models/brokerage-type.d.ts +31 -0
- package/dist/models/brokerage-type.js +15 -0
- package/dist/models/brokerage.d.ts +128 -0
- package/dist/models/brokerage.js +15 -0
- package/dist/models/calculated-trade.d.ts +32 -0
- package/dist/models/calculated-trade.js +15 -0
- package/dist/models/cash-restriction.d.ts +54 -0
- package/dist/models/cash-restriction.js +20 -0
- package/dist/models/currency.d.ts +37 -0
- package/dist/models/currency.js +15 -0
- package/dist/models/delete-user-response.d.ts +31 -0
- package/dist/models/delete-user-response.js +15 -0
- package/dist/models/dividend-at-date.d.ts +37 -0
- package/dist/models/dividend-at-date.js +15 -0
- package/dist/models/encrypted-response-encrypted-message-data.d.ts +37 -0
- package/dist/models/encrypted-response-encrypted-message-data.js +15 -0
- package/dist/models/encrypted-response.d.ts +31 -0
- package/dist/models/encrypted-response.js +15 -0
- package/dist/models/exchange-rate-pairs.d.ts +38 -0
- package/dist/models/exchange-rate-pairs.js +15 -0
- package/dist/models/exchange.d.ts +67 -0
- package/dist/models/exchange.js +15 -0
- package/dist/models/excluded-asset.d.ts +26 -0
- package/dist/models/excluded-asset.js +15 -0
- package/dist/models/index.d.ts +102 -0
- package/dist/models/index.js +118 -0
- package/dist/models/jwt.d.ts +25 -0
- package/dist/models/jwt.js +15 -0
- package/dist/models/login-redirect-uri.d.ts +30 -0
- package/dist/models/login-redirect-uri.js +15 -0
- package/dist/models/manual-trade-and-impact.d.ts +39 -0
- package/dist/models/manual-trade-and-impact.js +15 -0
- package/dist/models/manual-trade-balance.d.ts +39 -0
- package/dist/models/manual-trade-balance.js +15 -0
- package/dist/models/manual-trade-form.d.ts +69 -0
- package/dist/models/manual-trade-form.js +15 -0
- package/dist/models/manual-trade-symbol.d.ts +56 -0
- package/dist/models/manual-trade-symbol.js +15 -0
- package/dist/models/manual-trade.d.ts +72 -0
- package/dist/models/manual-trade.js +15 -0
- package/dist/models/model-asset-class-details.d.ts +32 -0
- package/dist/models/model-asset-class-details.js +15 -0
- package/dist/models/model-asset-class-target.d.ts +26 -0
- package/dist/models/model-asset-class-target.js +15 -0
- package/dist/models/model-asset-class.d.ts +31 -0
- package/dist/models/model-asset-class.js +15 -0
- package/dist/models/model-portfolio-asset-class.d.ts +32 -0
- package/dist/models/model-portfolio-asset-class.js +15 -0
- package/dist/models/model-portfolio-details.d.ts +39 -0
- package/dist/models/model-portfolio-details.js +15 -0
- package/dist/models/model-portfolio-security.d.ts +32 -0
- package/dist/models/model-portfolio-security.js +15 -0
- package/dist/models/model-portfolio.d.ts +43 -0
- package/dist/models/model-portfolio.js +21 -0
- package/dist/models/model400-failed-request-response.d.ts +31 -0
- package/dist/models/model400-failed-request-response.js +15 -0
- package/dist/models/model401-failed-request-response.d.ts +31 -0
- package/dist/models/model401-failed-request-response.js +15 -0
- package/dist/models/model403-failed-request-response.d.ts +31 -0
- package/dist/models/model403-failed-request-response.js +15 -0
- package/dist/models/model404-failed-request-response.d.ts +31 -0
- package/dist/models/model404-failed-request-response.js +15 -0
- package/dist/models/monthly-dividends.d.ts +32 -0
- package/dist/models/monthly-dividends.js +15 -0
- package/dist/models/net-contributions.d.ts +37 -0
- package/dist/models/net-contributions.js +15 -0
- package/dist/models/net-dividend.d.ts +38 -0
- package/dist/models/net-dividend.js +15 -0
- package/dist/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.d.ts +37 -0
- package/dist/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.js +15 -0
- package/dist/models/option-chain-inner-chain-per-root-inner.d.ts +38 -0
- package/dist/models/option-chain-inner-chain-per-root-inner.js +15 -0
- package/dist/models/option-chain-inner.d.ts +50 -0
- package/dist/models/option-chain-inner.js +15 -0
- package/dist/models/option-leg.d.ts +44 -0
- package/dist/models/option-leg.js +22 -0
- package/dist/models/option-strategy-legs-inner.d.ts +42 -0
- package/dist/models/option-strategy-legs-inner.js +15 -0
- package/dist/models/option-strategy.d.ts +51 -0
- package/dist/models/option-strategy.js +15 -0
- package/dist/models/options-get-option-strategy-request.d.ts +41 -0
- package/dist/models/options-get-option-strategy-request.js +19 -0
- package/dist/models/options-holdings.d.ts +57 -0
- package/dist/models/options-holdings.js +15 -0
- package/dist/models/options-place-option-strategy-request.d.ts +48 -0
- package/dist/models/options-place-option-strategy-request.js +26 -0
- package/dist/models/options-position.d.ts +63 -0
- package/dist/models/options-position.js +15 -0
- package/dist/models/options-symbol.d.ts +86 -0
- package/dist/models/options-symbol.js +15 -0
- package/dist/models/order-type.d.ts +23 -0
- package/dist/models/order-type.js +27 -0
- package/dist/models/partner-data.d.ts +92 -0
- package/dist/models/partner-data.js +15 -0
- package/dist/models/past-value.d.ts +37 -0
- package/dist/models/past-value.js +15 -0
- package/dist/models/performance-custom.d.ts +138 -0
- package/dist/models/performance-custom.js +15 -0
- package/dist/models/portfolio-group-info.d.ts +93 -0
- package/dist/models/portfolio-group-info.js +15 -0
- package/dist/models/portfolio-group-position.d.ts +38 -0
- package/dist/models/portfolio-group-position.js +15 -0
- package/dist/models/portfolio-group-settings.d.ts +50 -0
- package/dist/models/portfolio-group-settings.js +15 -0
- package/dist/models/portfolio-group.d.ts +31 -0
- package/dist/models/portfolio-group.js +15 -0
- package/dist/models/position-symbol.d.ts +56 -0
- package/dist/models/position-symbol.js +15 -0
- package/dist/models/position.d.ts +56 -0
- package/dist/models/position.js +15 -0
- package/dist/models/redirect-tokenand-pin.d.ts +31 -0
- package/dist/models/redirect-tokenand-pin.js +15 -0
- package/dist/models/security-type.d.ts +43 -0
- package/dist/models/security-type.js +15 -0
- package/dist/models/snap-trade-apidisclaimer-accept-status.d.ts +31 -0
- package/dist/models/snap-trade-apidisclaimer-accept-status.js +15 -0
- package/dist/models/snap-trade-holdings-account.d.ts +64 -0
- package/dist/models/snap-trade-holdings-account.js +15 -0
- package/dist/models/snap-trade-holdings-total-value.d.ts +31 -0
- package/dist/models/snap-trade-holdings-total-value.js +15 -0
- package/dist/models/snap-trade-login-user-request-body.d.ts +53 -0
- package/dist/models/snap-trade-login-user-request-body.js +20 -0
- package/dist/models/snap-trade-register-user-request-body.d.ts +30 -0
- package/dist/models/snap-trade-register-user-request-body.js +15 -0
- package/dist/models/status.d.ts +37 -0
- package/dist/models/status.js +15 -0
- package/dist/models/strategy-impact-legs-inner.d.ts +61 -0
- package/dist/models/strategy-impact-legs-inner.js +15 -0
- package/dist/models/strategy-impact.d.ts +86 -0
- package/dist/models/strategy-impact.js +15 -0
- package/dist/models/strategy-order-place-orders-inner-legs-inner.d.ts +61 -0
- package/dist/models/strategy-order-place-orders-inner-legs-inner.js +15 -0
- package/dist/models/strategy-order-place-orders-inner.d.ts +278 -0
- package/dist/models/strategy-order-place-orders-inner.js +15 -0
- package/dist/models/strategy-order-place.d.ts +32 -0
- package/dist/models/strategy-order-place.js +15 -0
- package/dist/models/strategy-order-record.d.ts +120 -0
- package/dist/models/strategy-order-record.js +47 -0
- package/dist/models/strategy-quotes-greek.d.ts +49 -0
- package/dist/models/strategy-quotes-greek.js +15 -0
- package/dist/models/strategy-quotes.d.ts +57 -0
- package/dist/models/strategy-quotes.js +15 -0
- package/dist/models/sub-period-return-rate.d.ts +37 -0
- package/dist/models/sub-period-return-rate.js +15 -0
- package/dist/models/symbol-query.d.ts +24 -0
- package/dist/models/symbol-query.js +15 -0
- package/dist/models/symbol.d.ts +51 -0
- package/dist/models/symbol.js +15 -0
- package/dist/models/symbols-quotes.d.ts +56 -0
- package/dist/models/symbols-quotes.js +15 -0
- package/dist/models/target-asset.d.ts +55 -0
- package/dist/models/target-asset.js +15 -0
- package/dist/models/time-in-force.d.ts +22 -0
- package/dist/models/time-in-force.js +26 -0
- package/dist/models/trade-execution-status.d.ts +91 -0
- package/dist/models/trade-execution-status.js +27 -0
- package/dist/models/trade-impact.d.ts +51 -0
- package/dist/models/trade-impact.js +15 -0
- package/dist/models/trade.d.ts +74 -0
- package/dist/models/trade.js +20 -0
- package/dist/models/trading-place-ocoorder-request.d.ts +30 -0
- package/dist/models/trading-place-ocoorder-request.js +15 -0
- package/dist/models/underlying-symbol.d.ts +64 -0
- package/dist/models/underlying-symbol.js +15 -0
- package/dist/models/universal-activity.d.ts +134 -0
- package/dist/models/universal-activity.js +36 -0
- package/dist/models/universal-symbol-ticker.d.ts +70 -0
- package/dist/models/universal-symbol-ticker.js +15 -0
- package/dist/models/universal-symbol.d.ts +69 -0
- package/dist/models/universal-symbol.js +15 -0
- package/dist/models/user-error-log.d.ts +55 -0
- package/dist/models/user-error-log.js +15 -0
- package/dist/models/user-idand-secret.d.ts +31 -0
- package/dist/models/user-idand-secret.js +15 -0
- package/dist/models/user-settings.d.ts +80 -0
- package/dist/models/user-settings.js +15 -0
- package/dist/models/usexchange.d.ts +73 -0
- package/dist/models/usexchange.js +15 -0
- package/dist/pagination/page.d.ts +31 -0
- package/dist/pagination/page.js +58 -0
- package/dist/pagination/pageable.d.ts +53 -0
- package/dist/pagination/pageable.js +128 -0
- package/dist/pagination/paginate.d.ts +17 -0
- package/dist/pagination/paginate.js +78 -0
- package/dist/requestAfterHook.d.ts +8 -0
- package/dist/requestAfterHook.js +45 -0
- package/dist/requestBeforeHook.d.ts +8 -0
- package/dist/requestBeforeHook.js +8 -0
- package/docs/AccountInformationApi.md +485 -0
- package/docs/ApiDisclaimerApi.md +69 -0
- package/docs/ApiStatusApi.md +60 -0
- package/docs/AuthenticationApi.md +307 -0
- package/docs/ConnectionsApi.md +186 -0
- package/docs/ErrorLogsApi.md +65 -0
- package/docs/OptionsApi.md +321 -0
- package/docs/PortfolioManagementApi.md +1866 -0
- package/docs/ReferenceDataApi.md +597 -0
- package/docs/TradingApi.md +629 -0
- package/docs/TransactionsAndReportingApi.md +141 -0
- package/index.test.ts +62 -13
- package/index.ts +3 -3
- package/models/account-holdings.ts +61 -0
- package/models/account-order-record-status.ts +48 -0
- package/models/account-order-record.ts +142 -0
- package/models/account-simple.ts +43 -0
- package/models/account.ts +82 -0
- package/models/action.ts +30 -0
- package/models/apidisclaimer-accept-request.ts +29 -0
- package/models/authentication-login-snap-trade-user200-response.ts +31 -0
- package/models/balance.ts +40 -0
- package/models/brokerage-authorization-type-read-only-brokerage.ts +43 -0
- package/models/brokerage-authorization-type-read-only.ts +68 -0
- package/models/brokerage-authorization-type.ts +39 -0
- package/models/brokerage-authorization.ts +82 -0
- package/models/brokerage-symbol.ts +61 -0
- package/models/brokerage-type.ts +37 -0
- package/models/brokerage.ts +136 -0
- package/models/calculated-trade.ts +40 -0
- package/models/cash-restriction.ts +63 -0
- package/models/currency.ts +43 -0
- package/models/delete-user-response.ts +37 -0
- package/models/dividend-at-date.ts +43 -0
- package/models/encrypted-response-encrypted-message-data.ts +43 -0
- package/models/encrypted-response.ts +38 -0
- package/models/exchange-rate-pairs.ts +46 -0
- package/models/exchange.ts +73 -0
- package/models/excluded-asset.ts +34 -0
- package/models/index.ts +102 -0
- package/models/jwt.ts +31 -0
- package/models/login-redirect-uri.ts +35 -0
- package/models/manual-trade-and-impact.ts +49 -0
- package/models/manual-trade-balance.ts +49 -0
- package/models/manual-trade-form.ts +80 -0
- package/models/manual-trade-symbol.ts +64 -0
- package/models/manual-trade.ts +88 -0
- package/models/model-asset-class-details.ts +41 -0
- package/models/model-asset-class-target.ts +34 -0
- package/models/model-asset-class.ts +37 -0
- package/models/model-portfolio-asset-class.ts +40 -0
- package/models/model-portfolio-details.ts +50 -0
- package/models/model-portfolio-security.ts +40 -0
- package/models/model-portfolio.ts +52 -0
- package/models/model400-failed-request-response.ts +37 -0
- package/models/model401-failed-request-response.ts +37 -0
- package/models/model403-failed-request-response.ts +37 -0
- package/models/model404-failed-request-response.ts +37 -0
- package/models/monthly-dividends.ts +40 -0
- package/models/net-contributions.ts +43 -0
- package/models/net-dividend.ts +46 -0
- package/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.ts +43 -0
- package/models/option-chain-inner-chain-per-root-inner.ts +46 -0
- package/models/option-chain-inner.ts +58 -0
- package/models/option-leg.ts +53 -0
- package/models/option-strategy-legs-inner.ts +47 -0
- package/models/option-strategy.ts +61 -0
- package/models/options-get-option-strategy-request.ts +51 -0
- package/models/options-holdings.ts +67 -0
- package/models/options-place-option-strategy-request.ts +57 -0
- package/models/options-position.ts +73 -0
- package/models/options-symbol.ts +94 -0
- package/models/order-type.ts +32 -0
- package/models/partner-data.ts +100 -0
- package/models/past-value.ts +43 -0
- package/models/performance-custom.ts +154 -0
- package/models/portfolio-group-info.ts +115 -0
- package/models/portfolio-group-position.ts +46 -0
- package/models/portfolio-group-settings.ts +58 -0
- package/models/portfolio-group.ts +37 -0
- package/models/position-symbol.ts +64 -0
- package/models/position.ts +64 -0
- package/models/redirect-tokenand-pin.ts +37 -0
- package/models/security-type.ts +49 -0
- package/models/snap-trade-apidisclaimer-accept-status.ts +37 -0
- package/models/snap-trade-holdings-account.ts +70 -0
- package/models/snap-trade-holdings-total-value.ts +37 -0
- package/models/snap-trade-login-user-request-body.ts +61 -0
- package/models/snap-trade-register-user-request-body.ts +35 -0
- package/models/status.ts +43 -0
- package/models/strategy-impact-legs-inner.ts +67 -0
- package/models/strategy-impact.ts +94 -0
- package/models/strategy-order-place-orders-inner-legs-inner.ts +67 -0
- package/models/strategy-order-place-orders-inner.ts +286 -0
- package/models/strategy-order-place.ts +40 -0
- package/models/strategy-order-record.ts +133 -0
- package/models/strategy-quotes-greek.ts +55 -0
- package/models/strategy-quotes.ts +67 -0
- package/models/sub-period-return-rate.ts +43 -0
- package/models/symbol-query.ts +29 -0
- package/models/symbol.ts +61 -0
- package/models/symbols-quotes.ts +64 -0
- package/models/target-asset.ts +62 -0
- package/models/time-in-force.ts +31 -0
- package/models/trade-execution-status.ts +105 -0
- package/models/trade-impact.ts +61 -0
- package/models/trade.ts +88 -0
- package/models/trading-place-ocoorder-request.ts +35 -0
- package/models/underlying-symbol.ts +76 -0
- package/models/universal-activity.ts +151 -0
- package/models/universal-symbol-ticker.ts +82 -0
- package/models/universal-symbol.ts +80 -0
- package/models/user-error-log.ts +61 -0
- package/models/user-idand-secret.ts +37 -0
- package/models/user-settings.ts +88 -0
- package/models/usexchange.ts +79 -0
- package/package.json +1 -1
- package/pagination/page.ts +50 -0
- package/pagination/pageable.ts +107 -0
- package/pagination/paginate.ts +40 -0
- package/requestAfterHook.ts +53 -0
- package/requestBeforeHook.ts +14 -0
- package/tsconfig.json +0 -1
- package/dist/api.js.map +0 -1
- package/dist/base.js.map +0 -1
- package/dist/common.js.map +0 -1
- package/dist/configuration.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.test.js.map +0 -1
- package/dist/jest.config.js.map +0 -1
- package/git_push.sh +0 -57
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SnapTrade
|
|
3
|
+
* Connect brokerage accounts to your app for live positions and trading
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: api@snaptrade.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This file is auto generated by Konfig (https://konfigthis.com).
|
|
9
|
+
* https://konfigthis.com
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
13
|
+
import { Configuration } from '../configuration';
|
|
14
|
+
import { RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import { PerformanceCustom } from '../models';
|
|
16
|
+
import { UniversalActivity } from '../models';
|
|
17
|
+
/**
|
|
18
|
+
* TransactionsAndReportingApi - axios parameter creator
|
|
19
|
+
* @export
|
|
20
|
+
*/
|
|
21
|
+
export declare const TransactionsAndReportingApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
22
|
+
/**
|
|
23
|
+
* Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
|
|
24
|
+
* @summary Get transaction history for a user
|
|
25
|
+
* @param {string} userId
|
|
26
|
+
* @param {string} userSecret
|
|
27
|
+
* @param {string} [startDate]
|
|
28
|
+
* @param {string} [endDate]
|
|
29
|
+
* @param {string} [accounts] Optional comma seperated list of account IDs used to filter the request on specific accounts
|
|
30
|
+
* @param {*} [options] Override http request option.
|
|
31
|
+
* @throws {RequiredError}
|
|
32
|
+
*/
|
|
33
|
+
getActivities: (userId: string, userSecret: string, startDate?: string, endDate?: string, accounts?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
34
|
+
/**
|
|
35
|
+
* Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
|
|
36
|
+
* @summary Get performance information for a specific timeframe
|
|
37
|
+
* @param {string} startDate
|
|
38
|
+
* @param {string} endDate
|
|
39
|
+
* @param {string} userId
|
|
40
|
+
* @param {string} userSecret
|
|
41
|
+
* @param {string} [accounts] Optional comma seperated list of account IDs used to filter the request on specific accounts
|
|
42
|
+
* @param {boolean} [detailed] Optional, increases frequency of data points for the total value and contribution charts if set to true
|
|
43
|
+
* @param {string} [frequency] Optional frequency for the rate of return chart (defaults to monthly). Possible values are daily, weekly, monthly, quarterly, yearly.
|
|
44
|
+
* @param {*} [options] Override http request option.
|
|
45
|
+
* @throws {RequiredError}
|
|
46
|
+
*/
|
|
47
|
+
getReportingCustomRange: (startDate: string, endDate: string, userId: string, userSecret: string, accounts?: string, detailed?: boolean, frequency?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* TransactionsAndReportingApi - functional programming interface
|
|
51
|
+
* @export
|
|
52
|
+
*/
|
|
53
|
+
export declare const TransactionsAndReportingApiFp: (configuration?: Configuration) => {
|
|
54
|
+
/**
|
|
55
|
+
* Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
|
|
56
|
+
* @summary Get transaction history for a user
|
|
57
|
+
* @param {TransactionsAndReportingApiGetActivitiesRequest} requestParameters Request parameters.
|
|
58
|
+
* @param {*} [options] Override http request option.
|
|
59
|
+
* @throws {RequiredError}
|
|
60
|
+
*/
|
|
61
|
+
getActivities(requestParameters: TransactionsAndReportingApiGetActivitiesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<UniversalActivity>>>;
|
|
62
|
+
/**
|
|
63
|
+
* Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
|
|
64
|
+
* @summary Get performance information for a specific timeframe
|
|
65
|
+
* @param {TransactionsAndReportingApiGetReportingCustomRangeRequest} requestParameters Request parameters.
|
|
66
|
+
* @param {*} [options] Override http request option.
|
|
67
|
+
* @throws {RequiredError}
|
|
68
|
+
*/
|
|
69
|
+
getReportingCustomRange(requestParameters: TransactionsAndReportingApiGetReportingCustomRangeRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PerformanceCustom>>;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* TransactionsAndReportingApi - factory interface
|
|
73
|
+
* @export
|
|
74
|
+
*/
|
|
75
|
+
export declare const TransactionsAndReportingApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
76
|
+
/**
|
|
77
|
+
* Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
|
|
78
|
+
* @summary Get transaction history for a user
|
|
79
|
+
* @param {TransactionsAndReportingApiGetActivitiesRequest} requestParameters Request parameters.
|
|
80
|
+
* @param {*} [options] Override http request option.
|
|
81
|
+
* @throws {RequiredError}
|
|
82
|
+
*/
|
|
83
|
+
getActivities(requestParameters: TransactionsAndReportingApiGetActivitiesRequest, options?: AxiosRequestConfig): AxiosPromise<Array<UniversalActivity>>;
|
|
84
|
+
/**
|
|
85
|
+
* Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
|
|
86
|
+
* @summary Get performance information for a specific timeframe
|
|
87
|
+
* @param {TransactionsAndReportingApiGetReportingCustomRangeRequest} requestParameters Request parameters.
|
|
88
|
+
* @param {*} [options] Override http request option.
|
|
89
|
+
* @throws {RequiredError}
|
|
90
|
+
*/
|
|
91
|
+
getReportingCustomRange(requestParameters: TransactionsAndReportingApiGetReportingCustomRangeRequest, options?: AxiosRequestConfig): AxiosPromise<PerformanceCustom>;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Request parameters for getActivities operation in TransactionsAndReportingApi.
|
|
95
|
+
* @export
|
|
96
|
+
* @interface TransactionsAndReportingApiGetActivitiesRequest
|
|
97
|
+
*/
|
|
98
|
+
export interface TransactionsAndReportingApiGetActivitiesRequest {
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* @type {string}
|
|
102
|
+
* @memberof TransactionsAndReportingApiGetActivities
|
|
103
|
+
*/
|
|
104
|
+
readonly userId: string;
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
* @type {string}
|
|
108
|
+
* @memberof TransactionsAndReportingApiGetActivities
|
|
109
|
+
*/
|
|
110
|
+
readonly userSecret: string;
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
* @type {string}
|
|
114
|
+
* @memberof TransactionsAndReportingApiGetActivities
|
|
115
|
+
*/
|
|
116
|
+
readonly startDate?: string;
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
* @type {string}
|
|
120
|
+
* @memberof TransactionsAndReportingApiGetActivities
|
|
121
|
+
*/
|
|
122
|
+
readonly endDate?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Optional comma seperated list of account IDs used to filter the request on specific accounts
|
|
125
|
+
* @type {string}
|
|
126
|
+
* @memberof TransactionsAndReportingApiGetActivities
|
|
127
|
+
*/
|
|
128
|
+
readonly accounts?: string;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Request parameters for getReportingCustomRange operation in TransactionsAndReportingApi.
|
|
132
|
+
* @export
|
|
133
|
+
* @interface TransactionsAndReportingApiGetReportingCustomRangeRequest
|
|
134
|
+
*/
|
|
135
|
+
export interface TransactionsAndReportingApiGetReportingCustomRangeRequest {
|
|
136
|
+
/**
|
|
137
|
+
*
|
|
138
|
+
* @type {string}
|
|
139
|
+
* @memberof TransactionsAndReportingApiGetReportingCustomRange
|
|
140
|
+
*/
|
|
141
|
+
readonly startDate: string;
|
|
142
|
+
/**
|
|
143
|
+
*
|
|
144
|
+
* @type {string}
|
|
145
|
+
* @memberof TransactionsAndReportingApiGetReportingCustomRange
|
|
146
|
+
*/
|
|
147
|
+
readonly endDate: string;
|
|
148
|
+
/**
|
|
149
|
+
*
|
|
150
|
+
* @type {string}
|
|
151
|
+
* @memberof TransactionsAndReportingApiGetReportingCustomRange
|
|
152
|
+
*/
|
|
153
|
+
readonly userId: string;
|
|
154
|
+
/**
|
|
155
|
+
*
|
|
156
|
+
* @type {string}
|
|
157
|
+
* @memberof TransactionsAndReportingApiGetReportingCustomRange
|
|
158
|
+
*/
|
|
159
|
+
readonly userSecret: string;
|
|
160
|
+
/**
|
|
161
|
+
* Optional comma seperated list of account IDs used to filter the request on specific accounts
|
|
162
|
+
* @type {string}
|
|
163
|
+
* @memberof TransactionsAndReportingApiGetReportingCustomRange
|
|
164
|
+
*/
|
|
165
|
+
readonly accounts?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Optional, increases frequency of data points for the total value and contribution charts if set to true
|
|
168
|
+
* @type {boolean}
|
|
169
|
+
* @memberof TransactionsAndReportingApiGetReportingCustomRange
|
|
170
|
+
*/
|
|
171
|
+
readonly detailed?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Optional frequency for the rate of return chart (defaults to monthly). Possible values are daily, weekly, monthly, quarterly, yearly.
|
|
174
|
+
* @type {string}
|
|
175
|
+
* @memberof TransactionsAndReportingApiGetReportingCustomRange
|
|
176
|
+
*/
|
|
177
|
+
readonly frequency?: string;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* TransactionsAndReportingApi - object-oriented interface
|
|
181
|
+
* @export
|
|
182
|
+
* @class TransactionsAndReportingApi
|
|
183
|
+
* @extends {BaseAPI}
|
|
184
|
+
*/
|
|
185
|
+
export declare class TransactionsAndReportingApi extends BaseAPI {
|
|
186
|
+
/**
|
|
187
|
+
* Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
|
|
188
|
+
* @summary Get transaction history for a user
|
|
189
|
+
* @param {TransactionsAndReportingApiGetActivitiesRequest} requestParameters Request parameters.
|
|
190
|
+
* @param {*} [options] Override http request option.
|
|
191
|
+
* @throws {RequiredError}
|
|
192
|
+
* @memberof TransactionsAndReportingApi
|
|
193
|
+
*/
|
|
194
|
+
getActivities(requestParameters: TransactionsAndReportingApiGetActivitiesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UniversalActivity[], any>>;
|
|
195
|
+
/**
|
|
196
|
+
* Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
|
|
197
|
+
* @summary Get performance information for a specific timeframe
|
|
198
|
+
* @param {TransactionsAndReportingApiGetReportingCustomRangeRequest} requestParameters Request parameters.
|
|
199
|
+
* @param {*} [options] Override http request option.
|
|
200
|
+
* @throws {RequiredError}
|
|
201
|
+
* @memberof TransactionsAndReportingApi
|
|
202
|
+
*/
|
|
203
|
+
getReportingCustomRange(requestParameters: TransactionsAndReportingApiGetReportingCustomRangeRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PerformanceCustom, any>>;
|
|
204
|
+
}
|
|
@@ -0,0 +1,387 @@
|
|
|
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.TransactionsAndReportingApi = exports.TransactionsAndReportingApiFactory = exports.TransactionsAndReportingApiFp = exports.TransactionsAndReportingApiAxiosParamCreator = void 0;
|
|
79
|
+
var axios_1 = require("axios");
|
|
80
|
+
// Some imports not used depending on template conditions
|
|
81
|
+
// @ts-ignore
|
|
82
|
+
var common_1 = require("../common");
|
|
83
|
+
// @ts-ignore
|
|
84
|
+
var base_1 = require("../base");
|
|
85
|
+
var requestBeforeHook_1 = require("../requestBeforeHook");
|
|
86
|
+
/**
|
|
87
|
+
* TransactionsAndReportingApi - axios parameter creator
|
|
88
|
+
* @export
|
|
89
|
+
*/
|
|
90
|
+
var TransactionsAndReportingApiAxiosParamCreator = function (configuration) {
|
|
91
|
+
var _this = this;
|
|
92
|
+
return {
|
|
93
|
+
/**
|
|
94
|
+
* Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
|
|
95
|
+
* @summary Get transaction history for a user
|
|
96
|
+
* @param {string} userId
|
|
97
|
+
* @param {string} userSecret
|
|
98
|
+
* @param {string} [startDate]
|
|
99
|
+
* @param {string} [endDate]
|
|
100
|
+
* @param {string} [accounts] Optional comma seperated list of account IDs used to filter the request on specific accounts
|
|
101
|
+
* @param {*} [options] Override http request option.
|
|
102
|
+
* @throws {RequiredError}
|
|
103
|
+
*/
|
|
104
|
+
getActivities: function (userId, userSecret, startDate, endDate, accounts, options) {
|
|
105
|
+
if (options === void 0) { options = {}; }
|
|
106
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
107
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
108
|
+
return __generator(this, function (_a) {
|
|
109
|
+
switch (_a.label) {
|
|
110
|
+
case 0:
|
|
111
|
+
// verify required parameter 'userId' is not null or undefined
|
|
112
|
+
(0, common_1.assertParamExists)('getActivities', 'userId', userId);
|
|
113
|
+
// verify required parameter 'userSecret' is not null or undefined
|
|
114
|
+
(0, common_1.assertParamExists)('getActivities', 'userSecret', userSecret);
|
|
115
|
+
localVarPath = "/activities";
|
|
116
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
117
|
+
if (configuration) {
|
|
118
|
+
baseOptions = configuration.baseOptions;
|
|
119
|
+
}
|
|
120
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
121
|
+
localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
|
|
122
|
+
localVarQueryParameter = {};
|
|
123
|
+
// authentication PartnerClientId required
|
|
124
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
|
|
125
|
+
// authentication PartnerSignature required
|
|
126
|
+
];
|
|
127
|
+
case 1:
|
|
128
|
+
// authentication PartnerClientId required
|
|
129
|
+
_a.sent();
|
|
130
|
+
// authentication PartnerSignature required
|
|
131
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
|
|
132
|
+
// authentication PartnerTimestamp required
|
|
133
|
+
];
|
|
134
|
+
case 2:
|
|
135
|
+
// authentication PartnerSignature required
|
|
136
|
+
_a.sent();
|
|
137
|
+
// authentication PartnerTimestamp required
|
|
138
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
|
|
139
|
+
case 3:
|
|
140
|
+
// authentication PartnerTimestamp required
|
|
141
|
+
_a.sent();
|
|
142
|
+
if (startDate !== undefined) {
|
|
143
|
+
localVarQueryParameter['startDate'] = startDate;
|
|
144
|
+
}
|
|
145
|
+
if (endDate !== undefined) {
|
|
146
|
+
localVarQueryParameter['endDate'] = endDate;
|
|
147
|
+
}
|
|
148
|
+
if (accounts !== undefined) {
|
|
149
|
+
localVarQueryParameter['accounts'] = accounts;
|
|
150
|
+
}
|
|
151
|
+
if (userId !== undefined) {
|
|
152
|
+
localVarQueryParameter['userId'] = userId;
|
|
153
|
+
}
|
|
154
|
+
if (userSecret !== undefined) {
|
|
155
|
+
localVarQueryParameter['userSecret'] = userSecret;
|
|
156
|
+
}
|
|
157
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
158
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
159
|
+
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
160
|
+
queryParameters: localVarQueryParameter,
|
|
161
|
+
requestConfig: localVarRequestOptions,
|
|
162
|
+
path: localVarPath,
|
|
163
|
+
configuration: configuration
|
|
164
|
+
});
|
|
165
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
166
|
+
return [2 /*return*/, {
|
|
167
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
168
|
+
options: localVarRequestOptions,
|
|
169
|
+
}];
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
},
|
|
174
|
+
/**
|
|
175
|
+
* Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
|
|
176
|
+
* @summary Get performance information for a specific timeframe
|
|
177
|
+
* @param {string} startDate
|
|
178
|
+
* @param {string} endDate
|
|
179
|
+
* @param {string} userId
|
|
180
|
+
* @param {string} userSecret
|
|
181
|
+
* @param {string} [accounts] Optional comma seperated list of account IDs used to filter the request on specific accounts
|
|
182
|
+
* @param {boolean} [detailed] Optional, increases frequency of data points for the total value and contribution charts if set to true
|
|
183
|
+
* @param {string} [frequency] Optional frequency for the rate of return chart (defaults to monthly). Possible values are daily, weekly, monthly, quarterly, yearly.
|
|
184
|
+
* @param {*} [options] Override http request option.
|
|
185
|
+
* @throws {RequiredError}
|
|
186
|
+
*/
|
|
187
|
+
getReportingCustomRange: function (startDate, endDate, userId, userSecret, accounts, detailed, frequency, options) {
|
|
188
|
+
if (options === void 0) { options = {}; }
|
|
189
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
190
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
191
|
+
return __generator(this, function (_a) {
|
|
192
|
+
switch (_a.label) {
|
|
193
|
+
case 0:
|
|
194
|
+
// verify required parameter 'startDate' is not null or undefined
|
|
195
|
+
(0, common_1.assertParamExists)('getReportingCustomRange', 'startDate', startDate);
|
|
196
|
+
// verify required parameter 'endDate' is not null or undefined
|
|
197
|
+
(0, common_1.assertParamExists)('getReportingCustomRange', 'endDate', endDate);
|
|
198
|
+
// verify required parameter 'userId' is not null or undefined
|
|
199
|
+
(0, common_1.assertParamExists)('getReportingCustomRange', 'userId', userId);
|
|
200
|
+
// verify required parameter 'userSecret' is not null or undefined
|
|
201
|
+
(0, common_1.assertParamExists)('getReportingCustomRange', 'userSecret', userSecret);
|
|
202
|
+
localVarPath = "/performance/custom";
|
|
203
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
204
|
+
if (configuration) {
|
|
205
|
+
baseOptions = configuration.baseOptions;
|
|
206
|
+
}
|
|
207
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
208
|
+
localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
|
|
209
|
+
localVarQueryParameter = {};
|
|
210
|
+
// authentication PartnerClientId required
|
|
211
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
|
|
212
|
+
// authentication PartnerSignature required
|
|
213
|
+
];
|
|
214
|
+
case 1:
|
|
215
|
+
// authentication PartnerClientId required
|
|
216
|
+
_a.sent();
|
|
217
|
+
// authentication PartnerSignature required
|
|
218
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
|
|
219
|
+
// authentication PartnerTimestamp required
|
|
220
|
+
];
|
|
221
|
+
case 2:
|
|
222
|
+
// authentication PartnerSignature required
|
|
223
|
+
_a.sent();
|
|
224
|
+
// authentication PartnerTimestamp required
|
|
225
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
|
|
226
|
+
case 3:
|
|
227
|
+
// authentication PartnerTimestamp required
|
|
228
|
+
_a.sent();
|
|
229
|
+
if (startDate !== undefined) {
|
|
230
|
+
localVarQueryParameter['startDate'] = startDate;
|
|
231
|
+
}
|
|
232
|
+
if (endDate !== undefined) {
|
|
233
|
+
localVarQueryParameter['endDate'] = endDate;
|
|
234
|
+
}
|
|
235
|
+
if (accounts !== undefined) {
|
|
236
|
+
localVarQueryParameter['accounts'] = accounts;
|
|
237
|
+
}
|
|
238
|
+
if (detailed !== undefined) {
|
|
239
|
+
localVarQueryParameter['detailed'] = detailed;
|
|
240
|
+
}
|
|
241
|
+
if (frequency !== undefined) {
|
|
242
|
+
localVarQueryParameter['frequency'] = frequency;
|
|
243
|
+
}
|
|
244
|
+
if (userId !== undefined) {
|
|
245
|
+
localVarQueryParameter['userId'] = userId;
|
|
246
|
+
}
|
|
247
|
+
if (userSecret !== undefined) {
|
|
248
|
+
localVarQueryParameter['userSecret'] = userSecret;
|
|
249
|
+
}
|
|
250
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
251
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
252
|
+
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
253
|
+
queryParameters: localVarQueryParameter,
|
|
254
|
+
requestConfig: localVarRequestOptions,
|
|
255
|
+
path: localVarPath,
|
|
256
|
+
configuration: configuration
|
|
257
|
+
});
|
|
258
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
259
|
+
return [2 /*return*/, {
|
|
260
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
261
|
+
options: localVarRequestOptions,
|
|
262
|
+
}];
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
},
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
exports.TransactionsAndReportingApiAxiosParamCreator = TransactionsAndReportingApiAxiosParamCreator;
|
|
270
|
+
/**
|
|
271
|
+
* TransactionsAndReportingApi - functional programming interface
|
|
272
|
+
* @export
|
|
273
|
+
*/
|
|
274
|
+
var TransactionsAndReportingApiFp = function (configuration) {
|
|
275
|
+
var localVarAxiosParamCreator = (0, exports.TransactionsAndReportingApiAxiosParamCreator)(configuration);
|
|
276
|
+
return {
|
|
277
|
+
/**
|
|
278
|
+
* Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
|
|
279
|
+
* @summary Get transaction history for a user
|
|
280
|
+
* @param {TransactionsAndReportingApiGetActivitiesRequest} requestParameters Request parameters.
|
|
281
|
+
* @param {*} [options] Override http request option.
|
|
282
|
+
* @throws {RequiredError}
|
|
283
|
+
*/
|
|
284
|
+
getActivities: function (requestParameters, options) {
|
|
285
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
286
|
+
var localVarAxiosArgs;
|
|
287
|
+
return __generator(this, function (_a) {
|
|
288
|
+
switch (_a.label) {
|
|
289
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getActivities(requestParameters.userId, requestParameters.userSecret, requestParameters.startDate, requestParameters.endDate, requestParameters.accounts, options)];
|
|
290
|
+
case 1:
|
|
291
|
+
localVarAxiosArgs = _a.sent();
|
|
292
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
},
|
|
297
|
+
/**
|
|
298
|
+
* Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
|
|
299
|
+
* @summary Get performance information for a specific timeframe
|
|
300
|
+
* @param {TransactionsAndReportingApiGetReportingCustomRangeRequest} requestParameters Request parameters.
|
|
301
|
+
* @param {*} [options] Override http request option.
|
|
302
|
+
* @throws {RequiredError}
|
|
303
|
+
*/
|
|
304
|
+
getReportingCustomRange: function (requestParameters, options) {
|
|
305
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
306
|
+
var localVarAxiosArgs;
|
|
307
|
+
return __generator(this, function (_a) {
|
|
308
|
+
switch (_a.label) {
|
|
309
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getReportingCustomRange(requestParameters.startDate, requestParameters.endDate, requestParameters.userId, requestParameters.userSecret, requestParameters.accounts, requestParameters.detailed, requestParameters.frequency, options)];
|
|
310
|
+
case 1:
|
|
311
|
+
localVarAxiosArgs = _a.sent();
|
|
312
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
},
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
exports.TransactionsAndReportingApiFp = TransactionsAndReportingApiFp;
|
|
320
|
+
/**
|
|
321
|
+
* TransactionsAndReportingApi - factory interface
|
|
322
|
+
* @export
|
|
323
|
+
*/
|
|
324
|
+
var TransactionsAndReportingApiFactory = function (configuration, basePath, axios) {
|
|
325
|
+
var localVarFp = (0, exports.TransactionsAndReportingApiFp)(configuration);
|
|
326
|
+
return {
|
|
327
|
+
/**
|
|
328
|
+
* Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
|
|
329
|
+
* @summary Get transaction history for a user
|
|
330
|
+
* @param {TransactionsAndReportingApiGetActivitiesRequest} requestParameters Request parameters.
|
|
331
|
+
* @param {*} [options] Override http request option.
|
|
332
|
+
* @throws {RequiredError}
|
|
333
|
+
*/
|
|
334
|
+
getActivities: function (requestParameters, options) {
|
|
335
|
+
return localVarFp.getActivities(requestParameters, options).then(function (request) { return request(axios, basePath); });
|
|
336
|
+
},
|
|
337
|
+
/**
|
|
338
|
+
* Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
|
|
339
|
+
* @summary Get performance information for a specific timeframe
|
|
340
|
+
* @param {TransactionsAndReportingApiGetReportingCustomRangeRequest} requestParameters Request parameters.
|
|
341
|
+
* @param {*} [options] Override http request option.
|
|
342
|
+
* @throws {RequiredError}
|
|
343
|
+
*/
|
|
344
|
+
getReportingCustomRange: function (requestParameters, options) {
|
|
345
|
+
return localVarFp.getReportingCustomRange(requestParameters, options).then(function (request) { return request(axios, basePath); });
|
|
346
|
+
},
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
exports.TransactionsAndReportingApiFactory = TransactionsAndReportingApiFactory;
|
|
350
|
+
/**
|
|
351
|
+
* TransactionsAndReportingApi - object-oriented interface
|
|
352
|
+
* @export
|
|
353
|
+
* @class TransactionsAndReportingApi
|
|
354
|
+
* @extends {BaseAPI}
|
|
355
|
+
*/
|
|
356
|
+
var TransactionsAndReportingApi = /** @class */ (function (_super) {
|
|
357
|
+
__extends(TransactionsAndReportingApi, _super);
|
|
358
|
+
function TransactionsAndReportingApi() {
|
|
359
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
|
|
363
|
+
* @summary Get transaction history for a user
|
|
364
|
+
* @param {TransactionsAndReportingApiGetActivitiesRequest} requestParameters Request parameters.
|
|
365
|
+
* @param {*} [options] Override http request option.
|
|
366
|
+
* @throws {RequiredError}
|
|
367
|
+
* @memberof TransactionsAndReportingApi
|
|
368
|
+
*/
|
|
369
|
+
TransactionsAndReportingApi.prototype.getActivities = function (requestParameters, options) {
|
|
370
|
+
var _this = this;
|
|
371
|
+
return (0, exports.TransactionsAndReportingApiFp)(this.configuration).getActivities(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
372
|
+
};
|
|
373
|
+
/**
|
|
374
|
+
* Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
|
|
375
|
+
* @summary Get performance information for a specific timeframe
|
|
376
|
+
* @param {TransactionsAndReportingApiGetReportingCustomRangeRequest} requestParameters Request parameters.
|
|
377
|
+
* @param {*} [options] Override http request option.
|
|
378
|
+
* @throws {RequiredError}
|
|
379
|
+
* @memberof TransactionsAndReportingApi
|
|
380
|
+
*/
|
|
381
|
+
TransactionsAndReportingApi.prototype.getReportingCustomRange = function (requestParameters, options) {
|
|
382
|
+
var _this = this;
|
|
383
|
+
return (0, exports.TransactionsAndReportingApiFp)(this.configuration).getReportingCustomRange(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
384
|
+
};
|
|
385
|
+
return TransactionsAndReportingApi;
|
|
386
|
+
}(base_1.BaseAPI));
|
|
387
|
+
exports.TransactionsAndReportingApi = TransactionsAndReportingApi;
|