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,425 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* SnapTrade
|
|
5
|
+
* Connect brokerage accounts to your app for live positions and trading
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: api@snaptrade.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This file is auto generated by Konfig (https://konfigthis.com).
|
|
11
|
+
* https://konfigthis.com
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
16
|
+
import { Configuration } from '../configuration';
|
|
17
|
+
// Some imports not used depending on template conditions
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
import { BrokerageAuthorization } from '../models';
|
|
24
|
+
import { paginate } from "../pagination/paginate";
|
|
25
|
+
import { requestBeforeHook } from '../requestBeforeHook';
|
|
26
|
+
/**
|
|
27
|
+
* ConnectionsApi - axios parameter creator
|
|
28
|
+
* @export
|
|
29
|
+
*/
|
|
30
|
+
export const ConnectionsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
31
|
+
return {
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @summary Get detail of a specific brokerage authorizations for the user
|
|
35
|
+
* @param {string} authorizationId The ID of a brokerage authorization object.
|
|
36
|
+
* @param {string} userId
|
|
37
|
+
* @param {string} userSecret
|
|
38
|
+
* @param {*} [options] Override http request option.
|
|
39
|
+
* @throws {RequiredError}
|
|
40
|
+
*/
|
|
41
|
+
detailBrokerageAuthorization: async (authorizationId: string, userId: string, userSecret: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
42
|
+
// verify required parameter 'authorizationId' is not null or undefined
|
|
43
|
+
assertParamExists('detailBrokerageAuthorization', 'authorizationId', authorizationId)
|
|
44
|
+
// verify required parameter 'userId' is not null or undefined
|
|
45
|
+
assertParamExists('detailBrokerageAuthorization', 'userId', userId)
|
|
46
|
+
// verify required parameter 'userSecret' is not null or undefined
|
|
47
|
+
assertParamExists('detailBrokerageAuthorization', 'userSecret', userSecret)
|
|
48
|
+
const localVarPath = `/authorizations/{authorizationId}`
|
|
49
|
+
.replace(`{${"authorizationId"}}`, encodeURIComponent(String(authorizationId)));
|
|
50
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
51
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
52
|
+
let baseOptions;
|
|
53
|
+
if (configuration) {
|
|
54
|
+
baseOptions = configuration.baseOptions;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
58
|
+
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
59
|
+
const localVarQueryParameter = {} as any;
|
|
60
|
+
|
|
61
|
+
// authentication PartnerClientId required
|
|
62
|
+
await setApiKeyToObject(localVarQueryParameter, "clientId", configuration)
|
|
63
|
+
|
|
64
|
+
// authentication PartnerSignature required
|
|
65
|
+
await setApiKeyToObject(localVarHeaderParameter, "Signature", configuration)
|
|
66
|
+
|
|
67
|
+
// authentication PartnerTimestamp required
|
|
68
|
+
await setApiKeyToObject(localVarQueryParameter, "timestamp", configuration)
|
|
69
|
+
|
|
70
|
+
if (userId !== undefined) {
|
|
71
|
+
localVarQueryParameter['userId'] = userId;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (userSecret !== undefined) {
|
|
75
|
+
localVarQueryParameter['userSecret'] = userSecret;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
81
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
82
|
+
|
|
83
|
+
requestBeforeHook({
|
|
84
|
+
queryParameters: localVarQueryParameter,
|
|
85
|
+
requestConfig: localVarRequestOptions,
|
|
86
|
+
path: localVarPath,
|
|
87
|
+
configuration
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
91
|
+
return {
|
|
92
|
+
url: toPathString(localVarUrlObj),
|
|
93
|
+
options: localVarRequestOptions,
|
|
94
|
+
};
|
|
95
|
+
},
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @summary List all brokerage authorizations for the user
|
|
99
|
+
* @param {string} userId
|
|
100
|
+
* @param {string} userSecret
|
|
101
|
+
* @param {*} [options] Override http request option.
|
|
102
|
+
* @throws {RequiredError}
|
|
103
|
+
*/
|
|
104
|
+
listBrokerageAuthorizations: async (userId: string, userSecret: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
105
|
+
// verify required parameter 'userId' is not null or undefined
|
|
106
|
+
assertParamExists('listBrokerageAuthorizations', 'userId', userId)
|
|
107
|
+
// verify required parameter 'userSecret' is not null or undefined
|
|
108
|
+
assertParamExists('listBrokerageAuthorizations', 'userSecret', userSecret)
|
|
109
|
+
const localVarPath = `/authorizations`;
|
|
110
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
111
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
112
|
+
let baseOptions;
|
|
113
|
+
if (configuration) {
|
|
114
|
+
baseOptions = configuration.baseOptions;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
118
|
+
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
119
|
+
const localVarQueryParameter = {} as any;
|
|
120
|
+
|
|
121
|
+
// authentication PartnerClientId required
|
|
122
|
+
await setApiKeyToObject(localVarQueryParameter, "clientId", configuration)
|
|
123
|
+
|
|
124
|
+
// authentication PartnerSignature required
|
|
125
|
+
await setApiKeyToObject(localVarHeaderParameter, "Signature", configuration)
|
|
126
|
+
|
|
127
|
+
// authentication PartnerTimestamp required
|
|
128
|
+
await setApiKeyToObject(localVarQueryParameter, "timestamp", configuration)
|
|
129
|
+
|
|
130
|
+
if (userId !== undefined) {
|
|
131
|
+
localVarQueryParameter['userId'] = userId;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (userSecret !== undefined) {
|
|
135
|
+
localVarQueryParameter['userSecret'] = userSecret;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
141
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
142
|
+
|
|
143
|
+
requestBeforeHook({
|
|
144
|
+
queryParameters: localVarQueryParameter,
|
|
145
|
+
requestConfig: localVarRequestOptions,
|
|
146
|
+
path: localVarPath,
|
|
147
|
+
configuration
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
151
|
+
return {
|
|
152
|
+
url: toPathString(localVarUrlObj),
|
|
153
|
+
options: localVarRequestOptions,
|
|
154
|
+
};
|
|
155
|
+
},
|
|
156
|
+
/**
|
|
157
|
+
*
|
|
158
|
+
* @summary Remove a brokerage authorization.
|
|
159
|
+
* @param {string} authorizationId The ID of the Authorization to delete.
|
|
160
|
+
* @param {string} userId
|
|
161
|
+
* @param {string} userSecret
|
|
162
|
+
* @param {*} [options] Override http request option.
|
|
163
|
+
* @throws {RequiredError}
|
|
164
|
+
*/
|
|
165
|
+
removeBrokerageAuthorization: async (authorizationId: string, userId: string, userSecret: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
166
|
+
// verify required parameter 'authorizationId' is not null or undefined
|
|
167
|
+
assertParamExists('removeBrokerageAuthorization', 'authorizationId', authorizationId)
|
|
168
|
+
// verify required parameter 'userId' is not null or undefined
|
|
169
|
+
assertParamExists('removeBrokerageAuthorization', 'userId', userId)
|
|
170
|
+
// verify required parameter 'userSecret' is not null or undefined
|
|
171
|
+
assertParamExists('removeBrokerageAuthorization', 'userSecret', userSecret)
|
|
172
|
+
const localVarPath = `/authorizations/{authorizationId}`
|
|
173
|
+
.replace(`{${"authorizationId"}}`, encodeURIComponent(String(authorizationId)));
|
|
174
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
175
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
176
|
+
let baseOptions;
|
|
177
|
+
if (configuration) {
|
|
178
|
+
baseOptions = configuration.baseOptions;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const localVarRequestOptions: AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options};
|
|
182
|
+
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
183
|
+
const localVarQueryParameter = {} as any;
|
|
184
|
+
|
|
185
|
+
// authentication PartnerClientId required
|
|
186
|
+
await setApiKeyToObject(localVarQueryParameter, "clientId", configuration)
|
|
187
|
+
|
|
188
|
+
// authentication PartnerSignature required
|
|
189
|
+
await setApiKeyToObject(localVarHeaderParameter, "Signature", configuration)
|
|
190
|
+
|
|
191
|
+
// authentication PartnerTimestamp required
|
|
192
|
+
await setApiKeyToObject(localVarQueryParameter, "timestamp", configuration)
|
|
193
|
+
|
|
194
|
+
if (userId !== undefined) {
|
|
195
|
+
localVarQueryParameter['userId'] = userId;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if (userSecret !== undefined) {
|
|
199
|
+
localVarQueryParameter['userSecret'] = userSecret;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
205
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
206
|
+
|
|
207
|
+
requestBeforeHook({
|
|
208
|
+
queryParameters: localVarQueryParameter,
|
|
209
|
+
requestConfig: localVarRequestOptions,
|
|
210
|
+
path: localVarPath,
|
|
211
|
+
configuration
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
215
|
+
return {
|
|
216
|
+
url: toPathString(localVarUrlObj),
|
|
217
|
+
options: localVarRequestOptions,
|
|
218
|
+
};
|
|
219
|
+
},
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* ConnectionsApi - functional programming interface
|
|
225
|
+
* @export
|
|
226
|
+
*/
|
|
227
|
+
export const ConnectionsApiFp = function(configuration?: Configuration) {
|
|
228
|
+
const localVarAxiosParamCreator = ConnectionsApiAxiosParamCreator(configuration)
|
|
229
|
+
return {
|
|
230
|
+
/**
|
|
231
|
+
*
|
|
232
|
+
* @summary Get detail of a specific brokerage authorizations for the user
|
|
233
|
+
* @param {ConnectionsApiDetailBrokerageAuthorizationRequest} requestParameters Request parameters.
|
|
234
|
+
* @param {*} [options] Override http request option.
|
|
235
|
+
* @throws {RequiredError}
|
|
236
|
+
*/
|
|
237
|
+
async detailBrokerageAuthorization(requestParameters: ConnectionsApiDetailBrokerageAuthorizationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BrokerageAuthorization>> {
|
|
238
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.detailBrokerageAuthorization(requestParameters.authorizationId, requestParameters.userId, requestParameters.userSecret, options);
|
|
239
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
240
|
+
},
|
|
241
|
+
/**
|
|
242
|
+
*
|
|
243
|
+
* @summary List all brokerage authorizations for the user
|
|
244
|
+
* @param {ConnectionsApiListBrokerageAuthorizationsRequest} requestParameters Request parameters.
|
|
245
|
+
* @param {*} [options] Override http request option.
|
|
246
|
+
* @throws {RequiredError}
|
|
247
|
+
*/
|
|
248
|
+
async listBrokerageAuthorizations(requestParameters: ConnectionsApiListBrokerageAuthorizationsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<BrokerageAuthorization>>> {
|
|
249
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listBrokerageAuthorizations(requestParameters.userId, requestParameters.userSecret, options);
|
|
250
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
251
|
+
},
|
|
252
|
+
/**
|
|
253
|
+
*
|
|
254
|
+
* @summary Remove a brokerage authorization.
|
|
255
|
+
* @param {ConnectionsApiRemoveBrokerageAuthorizationRequest} requestParameters Request parameters.
|
|
256
|
+
* @param {*} [options] Override http request option.
|
|
257
|
+
* @throws {RequiredError}
|
|
258
|
+
*/
|
|
259
|
+
async removeBrokerageAuthorization(requestParameters: ConnectionsApiRemoveBrokerageAuthorizationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
260
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.removeBrokerageAuthorization(requestParameters.authorizationId, requestParameters.userId, requestParameters.userSecret, options);
|
|
261
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
262
|
+
},
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* ConnectionsApi - factory interface
|
|
268
|
+
* @export
|
|
269
|
+
*/
|
|
270
|
+
export const ConnectionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
271
|
+
const localVarFp = ConnectionsApiFp(configuration)
|
|
272
|
+
return {
|
|
273
|
+
/**
|
|
274
|
+
*
|
|
275
|
+
* @summary Get detail of a specific brokerage authorizations for the user
|
|
276
|
+
* @param {ConnectionsApiDetailBrokerageAuthorizationRequest} requestParameters Request parameters.
|
|
277
|
+
* @param {*} [options] Override http request option.
|
|
278
|
+
* @throws {RequiredError}
|
|
279
|
+
*/
|
|
280
|
+
detailBrokerageAuthorization(requestParameters: ConnectionsApiDetailBrokerageAuthorizationRequest, options?: AxiosRequestConfig): AxiosPromise<BrokerageAuthorization> {
|
|
281
|
+
return localVarFp.detailBrokerageAuthorization(requestParameters, options).then((request) => request(axios, basePath));
|
|
282
|
+
},
|
|
283
|
+
/**
|
|
284
|
+
*
|
|
285
|
+
* @summary List all brokerage authorizations for the user
|
|
286
|
+
* @param {ConnectionsApiListBrokerageAuthorizationsRequest} requestParameters Request parameters.
|
|
287
|
+
* @param {*} [options] Override http request option.
|
|
288
|
+
* @throws {RequiredError}
|
|
289
|
+
*/
|
|
290
|
+
listBrokerageAuthorizations(requestParameters: ConnectionsApiListBrokerageAuthorizationsRequest, options?: AxiosRequestConfig): AxiosPromise<Array<BrokerageAuthorization>> {
|
|
291
|
+
return localVarFp.listBrokerageAuthorizations(requestParameters, options).then((request) => request(axios, basePath));
|
|
292
|
+
},
|
|
293
|
+
/**
|
|
294
|
+
*
|
|
295
|
+
* @summary Remove a brokerage authorization.
|
|
296
|
+
* @param {ConnectionsApiRemoveBrokerageAuthorizationRequest} requestParameters Request parameters.
|
|
297
|
+
* @param {*} [options] Override http request option.
|
|
298
|
+
* @throws {RequiredError}
|
|
299
|
+
*/
|
|
300
|
+
removeBrokerageAuthorization(requestParameters: ConnectionsApiRemoveBrokerageAuthorizationRequest, options?: AxiosRequestConfig): AxiosPromise<void> {
|
|
301
|
+
return localVarFp.removeBrokerageAuthorization(requestParameters, options).then((request) => request(axios, basePath));
|
|
302
|
+
},
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Request parameters for detailBrokerageAuthorization operation in ConnectionsApi.
|
|
308
|
+
* @export
|
|
309
|
+
* @interface ConnectionsApiDetailBrokerageAuthorizationRequest
|
|
310
|
+
*/
|
|
311
|
+
export interface ConnectionsApiDetailBrokerageAuthorizationRequest {
|
|
312
|
+
/**
|
|
313
|
+
* The ID of a brokerage authorization object.
|
|
314
|
+
* @type {string}
|
|
315
|
+
* @memberof ConnectionsApiDetailBrokerageAuthorization
|
|
316
|
+
*/
|
|
317
|
+
readonly authorizationId: string
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
*
|
|
321
|
+
* @type {string}
|
|
322
|
+
* @memberof ConnectionsApiDetailBrokerageAuthorization
|
|
323
|
+
*/
|
|
324
|
+
readonly userId: string
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
*
|
|
328
|
+
* @type {string}
|
|
329
|
+
* @memberof ConnectionsApiDetailBrokerageAuthorization
|
|
330
|
+
*/
|
|
331
|
+
readonly userSecret: string
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Request parameters for listBrokerageAuthorizations operation in ConnectionsApi.
|
|
336
|
+
* @export
|
|
337
|
+
* @interface ConnectionsApiListBrokerageAuthorizationsRequest
|
|
338
|
+
*/
|
|
339
|
+
export interface ConnectionsApiListBrokerageAuthorizationsRequest {
|
|
340
|
+
/**
|
|
341
|
+
*
|
|
342
|
+
* @type {string}
|
|
343
|
+
* @memberof ConnectionsApiListBrokerageAuthorizations
|
|
344
|
+
*/
|
|
345
|
+
readonly userId: string
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
*
|
|
349
|
+
* @type {string}
|
|
350
|
+
* @memberof ConnectionsApiListBrokerageAuthorizations
|
|
351
|
+
*/
|
|
352
|
+
readonly userSecret: string
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Request parameters for removeBrokerageAuthorization operation in ConnectionsApi.
|
|
357
|
+
* @export
|
|
358
|
+
* @interface ConnectionsApiRemoveBrokerageAuthorizationRequest
|
|
359
|
+
*/
|
|
360
|
+
export interface ConnectionsApiRemoveBrokerageAuthorizationRequest {
|
|
361
|
+
/**
|
|
362
|
+
* The ID of the Authorization to delete.
|
|
363
|
+
* @type {string}
|
|
364
|
+
* @memberof ConnectionsApiRemoveBrokerageAuthorization
|
|
365
|
+
*/
|
|
366
|
+
readonly authorizationId: string
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
*
|
|
370
|
+
* @type {string}
|
|
371
|
+
* @memberof ConnectionsApiRemoveBrokerageAuthorization
|
|
372
|
+
*/
|
|
373
|
+
readonly userId: string
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
*
|
|
377
|
+
* @type {string}
|
|
378
|
+
* @memberof ConnectionsApiRemoveBrokerageAuthorization
|
|
379
|
+
*/
|
|
380
|
+
readonly userSecret: string
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* ConnectionsApi - object-oriented interface
|
|
385
|
+
* @export
|
|
386
|
+
* @class ConnectionsApi
|
|
387
|
+
* @extends {BaseAPI}
|
|
388
|
+
*/
|
|
389
|
+
export class ConnectionsApi extends BaseAPI {
|
|
390
|
+
/**
|
|
391
|
+
*
|
|
392
|
+
* @summary Get detail of a specific brokerage authorizations for the user
|
|
393
|
+
* @param {ConnectionsApiDetailBrokerageAuthorizationRequest} requestParameters Request parameters.
|
|
394
|
+
* @param {*} [options] Override http request option.
|
|
395
|
+
* @throws {RequiredError}
|
|
396
|
+
* @memberof ConnectionsApi
|
|
397
|
+
*/
|
|
398
|
+
public detailBrokerageAuthorization(requestParameters: ConnectionsApiDetailBrokerageAuthorizationRequest, options?: AxiosRequestConfig) {
|
|
399
|
+
return ConnectionsApiFp(this.configuration).detailBrokerageAuthorization(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
*
|
|
404
|
+
* @summary List all brokerage authorizations for the user
|
|
405
|
+
* @param {ConnectionsApiListBrokerageAuthorizationsRequest} requestParameters Request parameters.
|
|
406
|
+
* @param {*} [options] Override http request option.
|
|
407
|
+
* @throws {RequiredError}
|
|
408
|
+
* @memberof ConnectionsApi
|
|
409
|
+
*/
|
|
410
|
+
public listBrokerageAuthorizations(requestParameters: ConnectionsApiListBrokerageAuthorizationsRequest, options?: AxiosRequestConfig) {
|
|
411
|
+
return ConnectionsApiFp(this.configuration).listBrokerageAuthorizations(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
*
|
|
416
|
+
* @summary Remove a brokerage authorization.
|
|
417
|
+
* @param {ConnectionsApiRemoveBrokerageAuthorizationRequest} requestParameters Request parameters.
|
|
418
|
+
* @param {*} [options] Override http request option.
|
|
419
|
+
* @throws {RequiredError}
|
|
420
|
+
* @memberof ConnectionsApi
|
|
421
|
+
*/
|
|
422
|
+
public removeBrokerageAuthorization(requestParameters: ConnectionsApiRemoveBrokerageAuthorizationRequest, options?: AxiosRequestConfig) {
|
|
423
|
+
return ConnectionsApiFp(this.configuration).removeBrokerageAuthorization(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
424
|
+
}
|
|
425
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* SnapTrade
|
|
5
|
+
* Connect brokerage accounts to your app for live positions and trading
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: api@snaptrade.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This file is auto generated by Konfig (https://konfigthis.com).
|
|
11
|
+
* https://konfigthis.com
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
16
|
+
import { Configuration } from '../configuration';
|
|
17
|
+
// Some imports not used depending on template conditions
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
import { UserErrorLog } from '../models';
|
|
24
|
+
import { paginate } from "../pagination/paginate";
|
|
25
|
+
import { requestBeforeHook } from '../requestBeforeHook';
|
|
26
|
+
/**
|
|
27
|
+
* ErrorLogsApi - axios parameter creator
|
|
28
|
+
* @export
|
|
29
|
+
*/
|
|
30
|
+
export const ErrorLogsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
31
|
+
return {
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @summary Retrieve error logs on behalf of your SnapTrade users
|
|
35
|
+
* @param {string} userId
|
|
36
|
+
* @param {string} userSecret
|
|
37
|
+
* @param {*} [options] Override http request option.
|
|
38
|
+
* @throws {RequiredError}
|
|
39
|
+
*/
|
|
40
|
+
listUserErrors: async (userId: string, userSecret: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
41
|
+
// verify required parameter 'userId' is not null or undefined
|
|
42
|
+
assertParamExists('listUserErrors', 'userId', userId)
|
|
43
|
+
// verify required parameter 'userSecret' is not null or undefined
|
|
44
|
+
assertParamExists('listUserErrors', 'userSecret', userSecret)
|
|
45
|
+
const localVarPath = `/snapTrade/listUserErrors`;
|
|
46
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
47
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
48
|
+
let baseOptions;
|
|
49
|
+
if (configuration) {
|
|
50
|
+
baseOptions = configuration.baseOptions;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
54
|
+
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
55
|
+
const localVarQueryParameter = {} as any;
|
|
56
|
+
|
|
57
|
+
// authentication PartnerClientId required
|
|
58
|
+
await setApiKeyToObject(localVarQueryParameter, "clientId", configuration)
|
|
59
|
+
|
|
60
|
+
// authentication PartnerSignature required
|
|
61
|
+
await setApiKeyToObject(localVarHeaderParameter, "Signature", configuration)
|
|
62
|
+
|
|
63
|
+
// authentication PartnerTimestamp required
|
|
64
|
+
await setApiKeyToObject(localVarQueryParameter, "timestamp", configuration)
|
|
65
|
+
|
|
66
|
+
if (userId !== undefined) {
|
|
67
|
+
localVarQueryParameter['userId'] = userId;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (userSecret !== undefined) {
|
|
71
|
+
localVarQueryParameter['userSecret'] = userSecret;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
77
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
78
|
+
|
|
79
|
+
requestBeforeHook({
|
|
80
|
+
queryParameters: localVarQueryParameter,
|
|
81
|
+
requestConfig: localVarRequestOptions,
|
|
82
|
+
path: localVarPath,
|
|
83
|
+
configuration
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
87
|
+
return {
|
|
88
|
+
url: toPathString(localVarUrlObj),
|
|
89
|
+
options: localVarRequestOptions,
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* ErrorLogsApi - functional programming interface
|
|
97
|
+
* @export
|
|
98
|
+
*/
|
|
99
|
+
export const ErrorLogsApiFp = function(configuration?: Configuration) {
|
|
100
|
+
const localVarAxiosParamCreator = ErrorLogsApiAxiosParamCreator(configuration)
|
|
101
|
+
return {
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @summary Retrieve error logs on behalf of your SnapTrade users
|
|
105
|
+
* @param {ErrorLogsApiListUserErrorsRequest} requestParameters Request parameters.
|
|
106
|
+
* @param {*} [options] Override http request option.
|
|
107
|
+
* @throws {RequiredError}
|
|
108
|
+
*/
|
|
109
|
+
async listUserErrors(requestParameters: ErrorLogsApiListUserErrorsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<UserErrorLog>>> {
|
|
110
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listUserErrors(requestParameters.userId, requestParameters.userSecret, options);
|
|
111
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
112
|
+
},
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* ErrorLogsApi - factory interface
|
|
118
|
+
* @export
|
|
119
|
+
*/
|
|
120
|
+
export const ErrorLogsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
121
|
+
const localVarFp = ErrorLogsApiFp(configuration)
|
|
122
|
+
return {
|
|
123
|
+
/**
|
|
124
|
+
*
|
|
125
|
+
* @summary Retrieve error logs on behalf of your SnapTrade users
|
|
126
|
+
* @param {ErrorLogsApiListUserErrorsRequest} requestParameters Request parameters.
|
|
127
|
+
* @param {*} [options] Override http request option.
|
|
128
|
+
* @throws {RequiredError}
|
|
129
|
+
*/
|
|
130
|
+
listUserErrors(requestParameters: ErrorLogsApiListUserErrorsRequest, options?: AxiosRequestConfig): AxiosPromise<Array<UserErrorLog>> {
|
|
131
|
+
return localVarFp.listUserErrors(requestParameters, options).then((request) => request(axios, basePath));
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Request parameters for listUserErrors operation in ErrorLogsApi.
|
|
138
|
+
* @export
|
|
139
|
+
* @interface ErrorLogsApiListUserErrorsRequest
|
|
140
|
+
*/
|
|
141
|
+
export interface ErrorLogsApiListUserErrorsRequest {
|
|
142
|
+
/**
|
|
143
|
+
*
|
|
144
|
+
* @type {string}
|
|
145
|
+
* @memberof ErrorLogsApiListUserErrors
|
|
146
|
+
*/
|
|
147
|
+
readonly userId: string
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
*
|
|
151
|
+
* @type {string}
|
|
152
|
+
* @memberof ErrorLogsApiListUserErrors
|
|
153
|
+
*/
|
|
154
|
+
readonly userSecret: string
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* ErrorLogsApi - object-oriented interface
|
|
159
|
+
* @export
|
|
160
|
+
* @class ErrorLogsApi
|
|
161
|
+
* @extends {BaseAPI}
|
|
162
|
+
*/
|
|
163
|
+
export class ErrorLogsApi extends BaseAPI {
|
|
164
|
+
/**
|
|
165
|
+
*
|
|
166
|
+
* @summary Retrieve error logs on behalf of your SnapTrade users
|
|
167
|
+
* @param {ErrorLogsApiListUserErrorsRequest} requestParameters Request parameters.
|
|
168
|
+
* @param {*} [options] Override http request option.
|
|
169
|
+
* @throws {RequiredError}
|
|
170
|
+
* @memberof ErrorLogsApi
|
|
171
|
+
*/
|
|
172
|
+
public listUserErrors(requestParameters: ErrorLogsApiListUserErrorsRequest, options?: AxiosRequestConfig) {
|
|
173
|
+
return ErrorLogsApiFp(this.configuration).listUserErrors(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
174
|
+
}
|
|
175
|
+
}
|