snaptrade-typescript-sdk 9.0.199 → 10.0.1
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/README.md +42 -2
- package/dist/chunk-e9Ob2GDo.mjs +26 -0
- package/dist/index.cjs +6594 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.mts +10422 -0
- package/dist/index.d.ts +1 -5
- package/dist/index.mjs +6527 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +27 -13
- package/dist/api/account-information-api-generated.d.ts +0 -950
- package/dist/api/account-information-api-generated.js +0 -1372
- package/dist/api/account-information-api.d.ts +0 -4
- package/dist/api/account-information-api.js +0 -22
- package/dist/api/api-status-api-generated.d.ts +0 -59
- package/dist/api/api-status-api-generated.js +0 -133
- package/dist/api/api-status-api.d.ts +0 -4
- package/dist/api/api-status-api.js +0 -22
- package/dist/api/authentication-api-generated.d.ts +0 -241
- package/dist/api/authentication-api-generated.js +0 -482
- package/dist/api/authentication-api.d.ts +0 -4
- package/dist/api/authentication-api.js +0 -22
- package/dist/api/connections-api-generated.d.ts +0 -576
- package/dist/api/connections-api-generated.js +0 -868
- package/dist/api/connections-api.d.ts +0 -4
- package/dist/api/connections-api.js +0 -22
- package/dist/api/options-api-generated.d.ts +0 -90
- package/dist/api/options-api-generated.js +0 -158
- package/dist/api/options-api.d.ts +0 -4
- package/dist/api/options-api.js +0 -22
- package/dist/api/reference-data-api-generated.d.ts +0 -497
- package/dist/api/reference-data-api-generated.js +0 -973
- package/dist/api/reference-data-api.d.ts +0 -4
- package/dist/api/reference-data-api.js +0 -22
- package/dist/api/trading-api-generated.d.ts +0 -1054
- package/dist/api/trading-api-generated.js +0 -1684
- package/dist/api/trading-api.d.ts +0 -4
- package/dist/api/trading-api.js +0 -22
- package/dist/api/transactions-and-reporting-api-generated.d.ts +0 -215
- package/dist/api/transactions-and-reporting-api-generated.js +0 -299
- package/dist/api/transactions-and-reporting-api.d.ts +0 -4
- package/dist/api/transactions-and-reporting-api.js +0 -22
- package/dist/api.d.ts +0 -8
- package/dist/api.js +0 -36
- package/dist/base.d.ts +0 -44
- package/dist/base.js +0 -60
- package/dist/browser.js +0 -2
- package/dist/browser.js.LICENSE.txt +0 -1
- package/dist/client-custom.d.ts +0 -4
- package/dist/client-custom.js +0 -7
- package/dist/client.d.ts +0 -14
- package/dist/client.js +0 -31
- package/dist/common.d.ts +0 -61
- package/dist/common.js +0 -220
- package/dist/configuration.d.ts +0 -98
- package/dist/configuration.js +0 -53
- package/dist/error.d.ts +0 -46
- package/dist/error.js +0 -105
- package/dist/index.js +0 -33
- package/dist/jest.config.d.ts +0 -3
- package/dist/jest.config.js +0 -13
- package/dist/mock.test.d.ts +0 -1
- package/dist/mock.test.js +0 -29
- package/dist/models/account-balance-total.d.ts +0 -19
- package/dist/models/account-balance-total.js +0 -2
- package/dist/models/account-balance.d.ts +0 -14
- package/dist/models/account-balance.js +0 -2
- package/dist/models/account-holdings-account.d.ts +0 -51
- package/dist/models/account-holdings-account.js +0 -2
- package/dist/models/account-holdings.d.ts +0 -37
- package/dist/models/account-holdings.js +0 -2
- package/dist/models/account-information-get-user-account-order-detail-request.d.ts +0 -13
- package/dist/models/account-information-get-user-account-order-detail-request.js +0 -2
- package/dist/models/account-order-record-child-brokerage-order-ids.d.ts +0 -19
- package/dist/models/account-order-record-child-brokerage-order-ids.js +0 -2
- package/dist/models/account-order-record-leg-instrument.d.ts +0 -38
- package/dist/models/account-order-record-leg-instrument.js +0 -2
- package/dist/models/account-order-record-leg.d.ts +0 -58
- package/dist/models/account-order-record-leg.js +0 -2
- package/dist/models/account-order-record-option-symbol.d.ts +0 -52
- package/dist/models/account-order-record-option-symbol.js +0 -2
- package/dist/models/account-order-record-quote-currency.d.ts +0 -25
- package/dist/models/account-order-record-quote-currency.js +0 -2
- package/dist/models/account-order-record-quote-universal-symbol.d.ts +0 -73
- package/dist/models/account-order-record-quote-universal-symbol.js +0 -2
- package/dist/models/account-order-record-status-v2.d.ts +0 -6
- package/dist/models/account-order-record-status-v2.js +0 -2
- package/dist/models/account-order-record-status.d.ts +0 -6
- package/dist/models/account-order-record-status.js +0 -2
- package/dist/models/account-order-record-trailing-stop.d.ts +0 -21
- package/dist/models/account-order-record-trailing-stop.js +0 -2
- package/dist/models/account-order-record-universal-symbol.d.ts +0 -73
- package/dist/models/account-order-record-universal-symbol.js +0 -2
- package/dist/models/account-order-record-v2.d.ts +0 -97
- package/dist/models/account-order-record-v2.js +0 -2
- package/dist/models/account-order-record.d.ts +0 -168
- package/dist/models/account-order-record.js +0 -2
- package/dist/models/account-orders-v2-response.d.ts +0 -15
- package/dist/models/account-orders-v2-response.js +0 -2
- package/dist/models/account-position.d.ts +0 -52
- package/dist/models/account-position.js +0 -2
- package/dist/models/account-simple.d.ts +0 -39
- package/dist/models/account-simple.js +0 -2
- package/dist/models/account-sync-status.d.ts +0 -21
- package/dist/models/account-sync-status.js +0 -2
- package/dist/models/account-universal-activity-currency.d.ts +0 -25
- package/dist/models/account-universal-activity-currency.js +0 -2
- package/dist/models/account-universal-activity-option-symbol.d.ts +0 -52
- package/dist/models/account-universal-activity-option-symbol.js +0 -2
- package/dist/models/account-universal-activity-symbol.d.ts +0 -65
- package/dist/models/account-universal-activity-symbol.js +0 -2
- package/dist/models/account-universal-activity.d.ts +0 -107
- package/dist/models/account-universal-activity.js +0 -2
- package/dist/models/account-value-history-item.d.ts +0 -20
- package/dist/models/account-value-history-item.js +0 -2
- package/dist/models/account-value-history-response.d.ts +0 -21
- package/dist/models/account-value-history-response.js +0 -2
- package/dist/models/account.d.ts +0 -126
- package/dist/models/account.js +0 -2
- package/dist/models/action-strict-with-options.d.ts +0 -6
- package/dist/models/action-strict-with-options.js +0 -2
- package/dist/models/action-strict.d.ts +0 -6
- package/dist/models/action-strict.js +0 -2
- package/dist/models/adr-instrument.d.ts +0 -59
- package/dist/models/adr-instrument.js +0 -2
- package/dist/models/all-account-positions-response.d.ts +0 -15
- package/dist/models/all-account-positions-response.js +0 -2
- package/dist/models/authentication-login-snap-trade-user200-response.d.ts +0 -7
- package/dist/models/authentication-login-snap-trade-user200-response.js +0 -2
- package/dist/models/balance-currency.d.ts +0 -25
- package/dist/models/balance-currency.js +0 -2
- package/dist/models/balance.d.ts +0 -27
- package/dist/models/balance.js +0 -2
- package/dist/models/brokerage-authorization-disabled-confirmation.d.ts +0 -14
- package/dist/models/brokerage-authorization-disabled-confirmation.js +0 -2
- package/dist/models/brokerage-authorization-refresh-confirmation.d.ts +0 -14
- package/dist/models/brokerage-authorization-refresh-confirmation.js +0 -2
- package/dist/models/brokerage-authorization-transactions-sync-confirmation.d.ts +0 -14
- package/dist/models/brokerage-authorization-transactions-sync-confirmation.js +0 -2
- package/dist/models/brokerage-authorization-type-read-only-brokerage.d.ts +0 -26
- package/dist/models/brokerage-authorization-type-read-only-brokerage.js +0 -2
- package/dist/models/brokerage-authorization-type-read-only.d.ts +0 -36
- package/dist/models/brokerage-authorization-type-read-only.js +0 -2
- package/dist/models/brokerage-authorization.d.ts +0 -73
- package/dist/models/brokerage-authorization.js +0 -2
- package/dist/models/brokerage-instrument.d.ts +0 -38
- package/dist/models/brokerage-instrument.js +0 -2
- package/dist/models/brokerage-instruments-response.d.ts +0 -15
- package/dist/models/brokerage-instruments-response.js +0 -2
- package/dist/models/brokerage-type.d.ts +0 -20
- package/dist/models/brokerage-type.js +0 -2
- package/dist/models/brokerage.d.ts +0 -122
- package/dist/models/brokerage.js +0 -2
- package/dist/models/cancel-order-response.d.ts +0 -22
- package/dist/models/cancel-order-response.js +0 -2
- package/dist/models/cef-instrument.d.ts +0 -59
- package/dist/models/cef-instrument.js +0 -2
- package/dist/models/child-brokerage-order-ids.d.ts +0 -20
- package/dist/models/child-brokerage-order-ids.js +0 -2
- package/dist/models/complex-order-leg.d.ts +0 -62
- package/dist/models/complex-order-leg.js +0 -2
- package/dist/models/complex-order-response.d.ts +0 -22
- package/dist/models/complex-order-response.js +0 -2
- package/dist/models/connections-session-events200-response-inner.d.ts +0 -6
- package/dist/models/connections-session-events200-response-inner.js +0 -2
- package/dist/models/crypto-instrument.d.ts +0 -59
- package/dist/models/crypto-instrument.js +0 -2
- package/dist/models/crypto-order-form.d.ts +0 -66
- package/dist/models/crypto-order-form.js +0 -2
- package/dist/models/crypto-order-preview-estimated-fee.d.ts +0 -20
- package/dist/models/crypto-order-preview-estimated-fee.js +0 -2
- package/dist/models/crypto-order-preview.d.ts +0 -15
- package/dist/models/crypto-order-preview.js +0 -2
- package/dist/models/crypto-trading-instrument.d.ts +0 -22
- package/dist/models/crypto-trading-instrument.js +0 -2
- package/dist/models/cryptocurrency-pair-quote.d.ts +0 -32
- package/dist/models/cryptocurrency-pair-quote.js +0 -2
- package/dist/models/cryptocurrency-pair.d.ts +0 -32
- package/dist/models/cryptocurrency-pair.js +0 -2
- package/dist/models/currency.d.ts +0 -26
- package/dist/models/currency.js +0 -2
- package/dist/models/delete-connection-confirmation.d.ts +0 -20
- package/dist/models/delete-connection-confirmation.js +0 -2
- package/dist/models/delete-user-response.d.ts +0 -26
- package/dist/models/delete-user-response.js +0 -2
- package/dist/models/dividend-at-date.d.ts +0 -26
- package/dist/models/dividend-at-date.js +0 -2
- package/dist/models/encrypted-response-encrypted-message-data.d.ts +0 -26
- package/dist/models/encrypted-response-encrypted-message-data.js +0 -2
- package/dist/models/encrypted-response.d.ts +0 -20
- package/dist/models/encrypted-response.js +0 -2
- package/dist/models/etf-instrument.d.ts +0 -59
- package/dist/models/etf-instrument.js +0 -2
- package/dist/models/exchange-rate-pairs.d.ts +0 -27
- package/dist/models/exchange-rate-pairs.js +0 -2
- package/dist/models/exchange.d.ts +0 -56
- package/dist/models/exchange.js +0 -2
- package/dist/models/figi-instrument.d.ts +0 -20
- package/dist/models/figi-instrument.js +0 -2
- package/dist/models/future-instrument.d.ts +0 -64
- package/dist/models/future-instrument.js +0 -2
- package/dist/models/holdings-status.d.ts +0 -19
- package/dist/models/holdings-status.js +0 -2
- package/dist/models/index.d.ts +0 -173
- package/dist/models/index.js +0 -189
- package/dist/models/instrument.d.ts +0 -33
- package/dist/models/instrument.js +0 -2
- package/dist/models/login-redirect-uri.d.ts +0 -19
- package/dist/models/login-redirect-uri.js +0 -2
- package/dist/models/manual-trade-and-impact.d.ts +0 -29
- package/dist/models/manual-trade-and-impact.js +0 -2
- package/dist/models/manual-trade-balance.d.ts +0 -28
- package/dist/models/manual-trade-balance.js +0 -2
- package/dist/models/manual-trade-form-bracket.d.ts +0 -67
- package/dist/models/manual-trade-form-bracket.js +0 -2
- package/dist/models/manual-trade-form-complex.d.ts +0 -28
- package/dist/models/manual-trade-form-complex.js +0 -2
- package/dist/models/manual-trade-form-notional-value.d.ts +0 -6
- package/dist/models/manual-trade-form-notional-value.js +0 -2
- package/dist/models/manual-trade-form-with-options.d.ts +0 -78
- package/dist/models/manual-trade-form-with-options.js +0 -2
- package/dist/models/manual-trade-form.d.ts +0 -65
- package/dist/models/manual-trade-form.js +0 -2
- package/dist/models/manual-trade-impact.d.ts +0 -38
- package/dist/models/manual-trade-impact.js +0 -2
- package/dist/models/manual-trade-replace-form.d.ts +0 -58
- package/dist/models/manual-trade-replace-form.js +0 -2
- package/dist/models/manual-trade-symbol.d.ts +0 -49
- package/dist/models/manual-trade-symbol.js +0 -2
- package/dist/models/manual-trade.d.ts +0 -60
- package/dist/models/manual-trade.js +0 -2
- package/dist/models/mleg-action-strict.d.ts +0 -6
- package/dist/models/mleg-action-strict.js +0 -2
- package/dist/models/mleg-instrument-type.d.ts +0 -6
- package/dist/models/mleg-instrument-type.js +0 -2
- package/dist/models/mleg-leg.d.ts +0 -28
- package/dist/models/mleg-leg.js +0 -2
- package/dist/models/mleg-order-response.d.ts +0 -21
- package/dist/models/mleg-order-response.js +0 -2
- package/dist/models/mleg-order-type-strict.d.ts +0 -6
- package/dist/models/mleg-order-type-strict.js +0 -2
- package/dist/models/mleg-price-effect-strict.d.ts +0 -6
- package/dist/models/mleg-price-effect-strict.js +0 -2
- package/dist/models/mleg-trade-form.d.ts +0 -47
- package/dist/models/mleg-trade-form.js +0 -2
- package/dist/models/mleg-trading-instrument.d.ts +0 -21
- package/dist/models/mleg-trading-instrument.js +0 -2
- package/dist/models/model400-failed-request-response.d.ts +0 -20
- package/dist/models/model400-failed-request-response.js +0 -2
- package/dist/models/model401-failed-request-response.d.ts +0 -20
- package/dist/models/model401-failed-request-response.js +0 -2
- package/dist/models/model402-brokerage-auth-already-disabled-exception.d.ts +0 -20
- package/dist/models/model402-brokerage-auth-already-disabled-exception.js +0 -2
- package/dist/models/model402-brokerage-auth-disabled-response.d.ts +0 -20
- package/dist/models/model402-brokerage-auth-disabled-response.js +0 -2
- package/dist/models/model403-failed-request-response.d.ts +0 -20
- package/dist/models/model403-failed-request-response.js +0 -2
- package/dist/models/model403-feature-not-enabled-response.d.ts +0 -20
- package/dist/models/model403-feature-not-enabled-response.js +0 -2
- package/dist/models/model404-failed-request-response.d.ts +0 -20
- package/dist/models/model404-failed-request-response.js +0 -2
- package/dist/models/model425-failed-request-response.d.ts +0 -20
- package/dist/models/model425-failed-request-response.js +0 -2
- package/dist/models/model500-unexpected-exception-response.d.ts +0 -26
- package/dist/models/model500-unexpected-exception-response.js +0 -2
- package/dist/models/monthly-dividends.d.ts +0 -21
- package/dist/models/monthly-dividends.js +0 -2
- package/dist/models/mutual-fund-instrument.d.ts +0 -59
- package/dist/models/mutual-fund-instrument.js +0 -2
- package/dist/models/net-contributions.d.ts +0 -26
- package/dist/models/net-contributions.js +0 -2
- package/dist/models/net-dividend.d.ts +0 -27
- package/dist/models/net-dividend.js +0 -2
- package/dist/models/notional-value.d.ts +0 -6
- package/dist/models/notional-value.js +0 -2
- package/dist/models/option-brokerage-symbol.d.ts +0 -29
- package/dist/models/option-brokerage-symbol.js +0 -2
- package/dist/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.d.ts +0 -26
- package/dist/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.js +0 -2
- package/dist/models/option-chain-inner-chain-per-root-inner.d.ts +0 -27
- package/dist/models/option-chain-inner-chain-per-root-inner.js +0 -2
- package/dist/models/option-chain-inner.d.ts +0 -39
- package/dist/models/option-chain-inner.js +0 -2
- package/dist/models/option-impact.d.ts +0 -28
- package/dist/models/option-impact.js +0 -2
- package/dist/models/option-instrument.d.ts +0 -60
- package/dist/models/option-instrument.js +0 -2
- package/dist/models/option-leg.d.ts +0 -28
- package/dist/models/option-leg.js +0 -2
- package/dist/models/option-quote-greeks.d.ts +0 -32
- package/dist/models/option-quote-greeks.js +0 -2
- package/dist/models/option-quote.d.ts +0 -39
- package/dist/models/option-quote.js +0 -2
- package/dist/models/option-strategy-legs-inner.d.ts +0 -31
- package/dist/models/option-strategy-legs-inner.js +0 -2
- package/dist/models/option-strategy.d.ts +0 -40
- package/dist/models/option-strategy.js +0 -2
- package/dist/models/options-position-currency.d.ts +0 -25
- package/dist/models/options-position-currency.js +0 -2
- package/dist/models/options-position.d.ts +0 -41
- package/dist/models/options-position.js +0 -2
- package/dist/models/options-symbol.d.ts +0 -53
- package/dist/models/options-symbol.js +0 -2
- package/dist/models/order-type-strict.d.ts +0 -6
- package/dist/models/order-type-strict.js +0 -2
- package/dist/models/order-updated-response-order.d.ts +0 -167
- package/dist/models/order-updated-response-order.js +0 -2
- package/dist/models/order-updated-response.d.ts +0 -21
- package/dist/models/order-updated-response.js +0 -2
- package/dist/models/other-instrument.d.ts +0 -59
- package/dist/models/other-instrument.js +0 -2
- package/dist/models/paginated-universal-activity.d.ts +0 -22
- package/dist/models/paginated-universal-activity.js +0 -2
- package/dist/models/pagination-details.d.ts +0 -26
- package/dist/models/pagination-details.js +0 -2
- package/dist/models/partner-data.d.ts +0 -82
- package/dist/models/partner-data.js +0 -2
- package/dist/models/past-value.d.ts +0 -26
- package/dist/models/past-value.js +0 -2
- package/dist/models/performance-custom.d.ts +0 -127
- package/dist/models/performance-custom.js +0 -2
- package/dist/models/position-currency.d.ts +0 -25
- package/dist/models/position-currency.js +0 -2
- package/dist/models/position-symbol.d.ts +0 -50
- package/dist/models/position-symbol.js +0 -2
- package/dist/models/position.d.ts +0 -66
- package/dist/models/position.js +0 -2
- package/dist/models/rate-of-return-object.d.ts +0 -28
- package/dist/models/rate-of-return-object.js +0 -2
- package/dist/models/rate-of-return-response.d.ts +0 -15
- package/dist/models/rate-of-return-response.js +0 -2
- package/dist/models/recent-orders-response.d.ts +0 -15
- package/dist/models/recent-orders-response.js +0 -2
- package/dist/models/security-type.d.ts +0 -33
- package/dist/models/security-type.js +0 -2
- package/dist/models/session-event.d.ts +0 -52
- package/dist/models/session-event.js +0 -2
- package/dist/models/simple-order-form.d.ts +0 -67
- package/dist/models/simple-order-form.js +0 -2
- package/dist/models/snap-trade-holdings-account.d.ts +0 -60
- package/dist/models/snap-trade-holdings-account.js +0 -2
- package/dist/models/snap-trade-holdings-total-value.d.ts +0 -20
- package/dist/models/snap-trade-holdings-total-value.js +0 -2
- package/dist/models/snap-trade-login-user-request-body.d.ts +0 -58
- package/dist/models/snap-trade-login-user-request-body.js +0 -2
- package/dist/models/snap-trade-register-user-request-body.d.ts +0 -13
- package/dist/models/snap-trade-register-user-request-body.js +0 -2
- package/dist/models/status.d.ts +0 -26
- package/dist/models/status.js +0 -2
- package/dist/models/stock-instrument-figi-instrument.d.ts +0 -19
- package/dist/models/stock-instrument-figi-instrument.js +0 -2
- package/dist/models/stock-instrument.d.ts +0 -59
- package/dist/models/stock-instrument.js +0 -2
- package/dist/models/stop-loss.d.ts +0 -20
- package/dist/models/stop-loss.js +0 -2
- package/dist/models/strategy-order-record.d.ts +0 -77
- package/dist/models/strategy-order-record.js +0 -2
- package/dist/models/strategy-quotes-greek.d.ts +0 -38
- package/dist/models/strategy-quotes-greek.js +0 -2
- package/dist/models/strategy-quotes.d.ts +0 -46
- package/dist/models/strategy-quotes.js +0 -2
- package/dist/models/sub-period-return-rate.d.ts +0 -26
- package/dist/models/sub-period-return-rate.js +0 -2
- package/dist/models/symbol-currency.d.ts +0 -25
- package/dist/models/symbol-currency.js +0 -2
- package/dist/models/symbol-exchange.d.ts +0 -55
- package/dist/models/symbol-exchange.js +0 -2
- package/dist/models/symbol-query.d.ts +0 -13
- package/dist/models/symbol-query.js +0 -2
- package/dist/models/symbol.d.ts +0 -66
- package/dist/models/symbol.js +0 -2
- package/dist/models/symbols-quotes-inner.d.ts +0 -44
- package/dist/models/symbols-quotes-inner.js +0 -2
- package/dist/models/take-profit.d.ts +0 -14
- package/dist/models/take-profit.js +0 -2
- package/dist/models/tax-lot.d.ts +0 -50
- package/dist/models/tax-lot.js +0 -2
- package/dist/models/time-in-force-strict.d.ts +0 -6
- package/dist/models/time-in-force-strict.js +0 -2
- package/dist/models/trade-detection-cancel-subscription-response.d.ts +0 -14
- package/dist/models/trade-detection-cancel-subscription-response.js +0 -2
- package/dist/models/trade-detection-subscription.d.ts +0 -26
- package/dist/models/trade-detection-subscription.js +0 -2
- package/dist/models/trading-instrument.d.ts +0 -22
- package/dist/models/trading-instrument.js +0 -2
- package/dist/models/trading-search-cryptocurrency-pair-instruments200-response.d.ts +0 -15
- package/dist/models/trading-search-cryptocurrency-pair-instruments200-response.js +0 -2
- package/dist/models/trading-session.d.ts +0 -6
- package/dist/models/trading-session.js +0 -2
- package/dist/models/trailing-stop.d.ts +0 -22
- package/dist/models/trailing-stop.js +0 -2
- package/dist/models/transactions-status.d.ts +0 -25
- package/dist/models/transactions-status.js +0 -2
- package/dist/models/underlying-option-instrument.d.ts +0 -27
- package/dist/models/underlying-option-instrument.js +0 -2
- package/dist/models/underlying-symbol-exchange.d.ts +0 -61
- package/dist/models/underlying-symbol-exchange.js +0 -2
- package/dist/models/underlying-symbol-type.d.ts +0 -32
- package/dist/models/underlying-symbol-type.js +0 -2
- package/dist/models/underlying-symbol.d.ts +0 -74
- package/dist/models/underlying-symbol.js +0 -2
- package/dist/models/universal-activity.d.ts +0 -114
- package/dist/models/universal-activity.js +0 -2
- package/dist/models/universal-symbol.d.ts +0 -74
- package/dist/models/universal-symbol.js +0 -2
- package/dist/models/user-idand-secret.d.ts +0 -19
- package/dist/models/user-idand-secret.js +0 -2
- package/dist/models/usexchange.d.ts +0 -62
- package/dist/models/usexchange.js +0 -2
- package/dist/models/validated-trade-body.d.ts +0 -13
- package/dist/models/validated-trade-body.js +0 -2
- package/dist/operationParameterMap.d.ts +0 -8
- package/dist/operationParameterMap.js +0 -966
- package/dist/pagination/page-types.d.ts +0 -16
- package/dist/pagination/page-types.js +0 -12
- package/dist/pagination/page.d.ts +0 -25
- package/dist/pagination/page.js +0 -32
- package/dist/pagination/pageable.d.ts +0 -47
- package/dist/pagination/pageable.js +0 -70
- package/dist/pagination/paginate.d.ts +0 -6
- package/dist/pagination/paginate.js +0 -39
- package/dist/requestAfterHook.d.ts +0 -8
- package/dist/requestAfterHook.js +0 -82
- package/dist/requestBeforeHook.d.ts +0 -10
- package/dist/requestBeforeHook.js +0 -8
- package/dist/requestBeforeUrlHook.d.ts +0 -7
- package/dist/requestBeforeUrlHook.js +0 -5
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Pageable, PageParametersBase } from "./pageable";
|
|
2
|
-
/**
|
|
3
|
-
* The set of parameters that appear in a paginated operation (requestBody or parameters)
|
|
4
|
-
*/
|
|
5
|
-
export type PageParameterProperties = {
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
};
|
|
8
|
-
export type PageParameters = PageParametersBase<PageParameterProperties>;
|
|
9
|
-
/**
|
|
10
|
-
* The set of properties that appear in a paginated operation's response
|
|
11
|
-
*/
|
|
12
|
-
export interface PageInfo {
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}
|
|
15
|
-
export interface PageBase<Data extends PageInfo, Parameters extends PageParameters> extends Pageable<Data, Parameters> {
|
|
16
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
SnapTrade
|
|
4
|
-
|
|
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
|
-
*/
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Pageable, PageParametersBase, PageRequest } from "./pageable";
|
|
2
|
-
/**
|
|
3
|
-
* The set of parameters that appear in a paginated operation (requestBody or parameters)
|
|
4
|
-
*/
|
|
5
|
-
export type PageParameterProperties = {
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
};
|
|
8
|
-
export type PageParameters = PageParametersBase<PageParameterProperties>;
|
|
9
|
-
/**
|
|
10
|
-
* The set of properties that appear in a paginated operation's response
|
|
11
|
-
*/
|
|
12
|
-
export interface PageInfo {
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}
|
|
15
|
-
export declare class Page<Data extends PageInfo, Parameters extends PageParameters> extends Pageable<Data, Parameters> {
|
|
16
|
-
make(parameters: {
|
|
17
|
-
data: Data;
|
|
18
|
-
initialParameters: Parameters;
|
|
19
|
-
request: PageRequest<Data, Parameters>;
|
|
20
|
-
}): Pageable<Data, Parameters>;
|
|
21
|
-
protected get previousParameters(): PageParameterProperties | null;
|
|
22
|
-
protected get nextParameters(): PageParameterProperties | null;
|
|
23
|
-
hasPrevious(): boolean;
|
|
24
|
-
hasNext(): boolean;
|
|
25
|
-
}
|
package/dist/pagination/page.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
SnapTrade
|
|
4
|
-
|
|
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
|
-
*/
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.Page = void 0;
|
|
14
|
-
const pageable_1 = require("./pageable");
|
|
15
|
-
class Page extends pageable_1.Pageable {
|
|
16
|
-
make(parameters) {
|
|
17
|
-
throw new Error("Method not implemented.");
|
|
18
|
-
}
|
|
19
|
-
get previousParameters() {
|
|
20
|
-
throw Error("Stub");
|
|
21
|
-
}
|
|
22
|
-
get nextParameters() {
|
|
23
|
-
throw Error("Stub");
|
|
24
|
-
}
|
|
25
|
-
hasPrevious() {
|
|
26
|
-
throw Error("Stub");
|
|
27
|
-
}
|
|
28
|
-
hasNext() {
|
|
29
|
-
throw Error("Stub");
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.Page = Page;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { AxiosPromise } from "axios";
|
|
2
|
-
import { PageBase, PageInfo, PageParameterProperties, PageParameters } from "./page-types";
|
|
3
|
-
export type PageParametersBase<Parameters> = Parameters & {
|
|
4
|
-
requestBody?: Parameters;
|
|
5
|
-
};
|
|
6
|
-
export type PageRequest<Data extends PageInfo, Parameters extends PageParameters> = (parameters: Parameters) => AxiosPromise<Data>;
|
|
7
|
-
export declare abstract class Pageable<Data extends PageInfo, Parameters extends PageParameters> {
|
|
8
|
-
readonly data: Data;
|
|
9
|
-
protected readonly initialParameters: Parameters;
|
|
10
|
-
private readonly _request;
|
|
11
|
-
previous(): Promise<PageBase<Data, Parameters>>;
|
|
12
|
-
next(): Promise<PageBase<Data, Parameters>>;
|
|
13
|
-
/**
|
|
14
|
-
* Generate minimal set of parameters needed to get the previous page
|
|
15
|
-
*/
|
|
16
|
-
protected abstract get previousParameters(): PageParameterProperties | null;
|
|
17
|
-
/**
|
|
18
|
-
* Generate minimal set of parameters needed to get the next page
|
|
19
|
-
*/
|
|
20
|
-
protected abstract get nextParameters(): PageParameterProperties | null;
|
|
21
|
-
/**
|
|
22
|
-
* Is there a previous page based on PageInfo?
|
|
23
|
-
*/
|
|
24
|
-
abstract hasPrevious(): boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Is there a next page based on PageInfo?
|
|
27
|
-
*/
|
|
28
|
-
abstract hasNext(): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Helper for invoking a request. Handles request body and parameter based pagination
|
|
31
|
-
*/
|
|
32
|
-
private makeRequest;
|
|
33
|
-
/**
|
|
34
|
-
* Helper for creating new page
|
|
35
|
-
*/
|
|
36
|
-
private withData;
|
|
37
|
-
constructor({ data, initialParameters, request, }: {
|
|
38
|
-
data: Data;
|
|
39
|
-
initialParameters: Parameters;
|
|
40
|
-
request: PageRequest<Data, Parameters>;
|
|
41
|
-
});
|
|
42
|
-
abstract make(parameters: {
|
|
43
|
-
data: Data;
|
|
44
|
-
initialParameters: Parameters;
|
|
45
|
-
request: PageRequest<Data, Parameters>;
|
|
46
|
-
}): Pageable<Data, Parameters>;
|
|
47
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
SnapTrade
|
|
4
|
-
|
|
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
|
-
*/
|
|
12
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.Pageable = void 0;
|
|
23
|
-
class Pageable {
|
|
24
|
-
previous() {
|
|
25
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
if (!this.hasPrevious())
|
|
27
|
-
return this;
|
|
28
|
-
if (this.previousParameters === null)
|
|
29
|
-
return this;
|
|
30
|
-
const response = yield this.makeRequest(this.previousParameters);
|
|
31
|
-
return this.withData(response.data);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
next() {
|
|
35
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
if (!this.hasNext())
|
|
37
|
-
return this;
|
|
38
|
-
if (this.nextParameters === null)
|
|
39
|
-
return this;
|
|
40
|
-
const response = yield this.makeRequest(this.nextParameters);
|
|
41
|
-
return this.withData(response.data);
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Helper for invoking a request. Handles request body and parameter based pagination
|
|
46
|
-
*/
|
|
47
|
-
makeRequest(parameters) {
|
|
48
|
-
// Handle request body pagination
|
|
49
|
-
if (this.initialParameters.requestBody !== undefined) {
|
|
50
|
-
return this._request(Object.assign(Object.assign({}, this.initialParameters), { requestBody: Object.assign(Object.assign({}, this.initialParameters.requestBody), parameters) }));
|
|
51
|
-
}
|
|
52
|
-
return this._request(Object.assign(Object.assign({}, this.initialParameters), parameters));
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Helper for creating new page
|
|
56
|
-
*/
|
|
57
|
-
withData(data) {
|
|
58
|
-
return this.make({
|
|
59
|
-
data,
|
|
60
|
-
initialParameters: this.initialParameters,
|
|
61
|
-
request: this._request,
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
constructor({ data, initialParameters, request, }) {
|
|
65
|
-
this.data = data;
|
|
66
|
-
this._request = request;
|
|
67
|
-
this.initialParameters = initialParameters;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
exports.Pageable = Pageable;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PageBase, PageInfo, PageParameters } from "./page-types";
|
|
2
|
-
import { PageRequest } from "./pageable";
|
|
3
|
-
export declare const paginate: <Data extends PageInfo, Parameters_1 extends PageParameters>({ request, initialParameters, }: {
|
|
4
|
-
request: PageRequest<Data, Parameters_1>;
|
|
5
|
-
initialParameters: Parameters_1;
|
|
6
|
-
}) => Promise<PageBase<Data, Parameters_1>>;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
SnapTrade
|
|
4
|
-
|
|
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
|
-
*/
|
|
12
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.paginate = void 0;
|
|
23
|
-
const page_1 = require("./page");
|
|
24
|
-
const paginate = ({ request, initialParameters, }) => {
|
|
25
|
-
return new Promise((resolve, reject) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
-
try {
|
|
27
|
-
const data = yield request(initialParameters);
|
|
28
|
-
resolve(new page_1.Page({
|
|
29
|
-
data: data.data,
|
|
30
|
-
initialParameters,
|
|
31
|
-
request: (parameters) => request(parameters),
|
|
32
|
-
}));
|
|
33
|
-
}
|
|
34
|
-
catch (error) {
|
|
35
|
-
reject(error);
|
|
36
|
-
}
|
|
37
|
-
}));
|
|
38
|
-
};
|
|
39
|
-
exports.paginate = paginate;
|
package/dist/requestAfterHook.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.requestAfterHook = void 0;
|
|
13
|
-
// Function to check if the code is running in a Node.js environment
|
|
14
|
-
function isNodeEnvironment() {
|
|
15
|
-
return (typeof process !== "undefined" && process.versions && process.versions.node);
|
|
16
|
-
}
|
|
17
|
-
// Compute HMAC SHA256
|
|
18
|
-
function computeHmacSha256(message, key) {
|
|
19
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
if (isNodeEnvironment()) {
|
|
21
|
-
// Node.js environment
|
|
22
|
-
const crypto = require("crypto");
|
|
23
|
-
const hmac = crypto.createHmac("sha256", key);
|
|
24
|
-
hmac.update(message);
|
|
25
|
-
return hmac.digest("base64"); // or return Buffer if you want raw bytes
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
// Browser environment
|
|
29
|
-
const encoder = new TextEncoder();
|
|
30
|
-
const keyBuffer = encoder.encode(key);
|
|
31
|
-
const msgBuffer = encoder.encode(message);
|
|
32
|
-
const cryptoKey = yield globalThis.crypto.subtle.importKey("raw", keyBuffer, { name: "HMAC", hash: "SHA-256" }, false, ["sign"]);
|
|
33
|
-
const signature = yield globalThis.crypto.subtle.sign("HMAC", cryptoKey, msgBuffer);
|
|
34
|
-
const byteArray = Array.from(new Uint8Array(signature));
|
|
35
|
-
// Convert byte array to base64
|
|
36
|
-
const base64 = btoa(String.fromCharCode.apply(null, byteArray));
|
|
37
|
-
return base64;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
const JSONstringifyOrder = (obj) => {
|
|
42
|
-
var allKeys = [];
|
|
43
|
-
var seen = {};
|
|
44
|
-
JSON.stringify(obj, function (key, value) {
|
|
45
|
-
if (!(key in seen)) {
|
|
46
|
-
allKeys.push(key);
|
|
47
|
-
seen[key] = null;
|
|
48
|
-
}
|
|
49
|
-
return value;
|
|
50
|
-
});
|
|
51
|
-
allKeys.sort();
|
|
52
|
-
return JSON.stringify(obj, allKeys);
|
|
53
|
-
};
|
|
54
|
-
function requestAfterHook(request) {
|
|
55
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
const { configuration, basePath, axiosArgs, url } = request;
|
|
57
|
-
if ((configuration === null || configuration === void 0 ? void 0 : configuration.consumerKey) === undefined)
|
|
58
|
-
throw Error("Consumer key is required");
|
|
59
|
-
const consumerKey = encodeURI(configuration.consumerKey);
|
|
60
|
-
const requestData = axiosArgs.options.data === undefined || axiosArgs.options.data === "{}"
|
|
61
|
-
? null
|
|
62
|
-
: JSON.parse(axiosArgs.options.data);
|
|
63
|
-
const path = axiosArgs.url.indexOf("?") === -1
|
|
64
|
-
? `${axiosArgs.url}`
|
|
65
|
-
: `${axiosArgs.url.split("?")[0]}`;
|
|
66
|
-
const requestPath = `/api/v1${path}`;
|
|
67
|
-
const requestQuery = url
|
|
68
|
-
.replace(basePath, "")
|
|
69
|
-
.replace(path, "")
|
|
70
|
-
.replace("?", "");
|
|
71
|
-
const sigObject = {
|
|
72
|
-
content: requestData,
|
|
73
|
-
path: requestPath,
|
|
74
|
-
query: requestQuery,
|
|
75
|
-
};
|
|
76
|
-
const sigContent = JSONstringifyOrder(sigObject);
|
|
77
|
-
const signature = yield computeHmacSha256(sigContent, consumerKey);
|
|
78
|
-
if (axiosArgs.options.headers)
|
|
79
|
-
axiosArgs.options.headers["Signature"] = signature;
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
exports.requestAfterHook = requestAfterHook;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Configuration } from "./configuration";
|
|
2
|
-
import { AxiosRequestConfig } from "axios";
|
|
3
|
-
export declare function requestBeforeHook(request: {
|
|
4
|
-
requestBody?: any;
|
|
5
|
-
queryParameters: Record<string, any>;
|
|
6
|
-
path: string;
|
|
7
|
-
requestConfig: AxiosRequestConfig;
|
|
8
|
-
configuration?: Configuration;
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}): void;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.requestBeforeHook = void 0;
|
|
4
|
-
function requestBeforeHook(request) {
|
|
5
|
-
const { queryParameters } = request;
|
|
6
|
-
queryParameters["timestamp"] = Math.round(new Date().getTime() / 1000).toString();
|
|
7
|
-
}
|
|
8
|
-
exports.requestBeforeHook = requestBeforeHook;
|