snaptrade-typescript-sdk 8.7.0 → 8.8.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/README.md +1 -2
- package/dist/api/portfolio-management-api.d.ts +0 -47
- package/dist/api/portfolio-management-api.js +0 -103
- package/dist/configuration.js +1 -1
- package/package.json +4 -1
- package/.konfig/generate-id.txt +0 -1
- package/.konfigignore +0 -3
- package/api/account-information-api-custom.ts +0 -3
- package/api/account-information-api.ts +0 -1062
- package/api/api-disclaimer-api-custom.ts +0 -3
- package/api/api-disclaimer-api.ts +0 -183
- package/api/api-status-api-custom.ts +0 -3
- package/api/api-status-api.ts +0 -128
- package/api/authentication-api-custom.ts +0 -3
- package/api/authentication-api.ts +0 -568
- package/api/connections-api-custom.ts +0 -3
- package/api/connections-api.ts +0 -544
- package/api/error-logs-api-custom.ts +0 -3
- package/api/error-logs-api.ts +0 -174
- package/api/options-api-custom.ts +0 -3
- package/api/options-api.ts +0 -739
- package/api/portfolio-management-api-custom.ts +0 -3
- package/api/portfolio-management-api.ts +0 -3301
- package/api/reference-data-api-custom.ts +0 -3
- package/api/reference-data-api.ts +0 -1031
- package/api/trading-api-custom.ts +0 -3
- package/api/trading-api.ts +0 -1304
- package/api/transactions-and-reporting-api-custom.ts +0 -3
- package/api/transactions-and-reporting-api.ts +0 -408
- package/api.ts +0 -27
- package/base.ts +0 -70
- package/client-custom.ts +0 -5
- package/client.ts +0 -59
- package/common.ts +0 -163
- package/configuration.ts +0 -131
- package/docs/AccountInformationApi.md +0 -469
- package/docs/ApiDisclaimerApi.md +0 -64
- package/docs/ApiStatusApi.md +0 -58
- package/docs/AuthenticationApi.md +0 -293
- package/docs/ConnectionsApi.md +0 -238
- package/docs/ErrorLogsApi.md +0 -62
- package/docs/OptionsApi.md +0 -312
- package/docs/PortfolioManagementApi.md +0 -1785
- package/docs/ReferenceDataApi.md +0 -568
- package/docs/TradingApi.md +0 -596
- package/docs/TransactionsAndReportingApi.md +0 -144
- package/index.test.ts +0 -177
- package/index.ts +0 -18
- package/jest.config.ts +0 -11
- package/models/account-holdings-account.ts +0 -61
- package/models/account-holdings.ts +0 -61
- package/models/account-order-record-status.ts +0 -48
- package/models/account-order-record.ts +0 -151
- package/models/account-simple.ts +0 -52
- package/models/account-sync-status.ts +0 -32
- package/models/account.ts +0 -91
- package/models/action.ts +0 -30
- package/models/apidisclaimer-accept-request.ts +0 -29
- package/models/authentication-login-snap-trade-user200-response.ts +0 -31
- package/models/balance.ts +0 -40
- package/models/brokerage-authorization-type-read-only-brokerage.ts +0 -43
- package/models/brokerage-authorization-type-read-only.ts +0 -68
- package/models/brokerage-authorization-type.ts +0 -39
- package/models/brokerage-authorization.ts +0 -82
- package/models/brokerage-symbol.ts +0 -61
- package/models/brokerage-type.ts +0 -37
- package/models/brokerage.ts +0 -136
- package/models/calculated-trade.ts +0 -40
- package/models/cash-restriction.ts +0 -63
- package/models/connections-session-events200-response-inner.ts +0 -25
- package/models/currency.ts +0 -43
- package/models/delete-user-response.ts +0 -37
- package/models/dividend-at-date.ts +0 -43
- package/models/encrypted-response-encrypted-message-data.ts +0 -43
- package/models/encrypted-response.ts +0 -38
- package/models/exchange-rate-pairs.ts +0 -46
- package/models/exchange.ts +0 -73
- package/models/excluded-asset.ts +0 -34
- package/models/index.ts +0 -109
- package/models/jwt.ts +0 -31
- package/models/login-redirect-uri.ts +0 -35
- package/models/manual-trade-and-impact.ts +0 -49
- package/models/manual-trade-balance.ts +0 -49
- package/models/manual-trade-form.ts +0 -80
- package/models/manual-trade-symbol.ts +0 -64
- package/models/manual-trade.ts +0 -88
- package/models/model-asset-class-details.ts +0 -41
- package/models/model-asset-class-target.ts +0 -34
- package/models/model-asset-class.ts +0 -37
- package/models/model-portfolio-asset-class.ts +0 -40
- package/models/model-portfolio-details.ts +0 -50
- package/models/model-portfolio-security.ts +0 -40
- package/models/model-portfolio.ts +0 -52
- package/models/model400-failed-request-response.ts +0 -37
- package/models/model401-failed-request-response.ts +0 -37
- package/models/model403-failed-request-response.ts +0 -37
- package/models/model404-failed-request-response.ts +0 -37
- package/models/monthly-dividends.ts +0 -40
- package/models/net-contributions.ts +0 -43
- package/models/net-dividend.ts +0 -46
- package/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.ts +0 -43
- package/models/option-chain-inner-chain-per-root-inner.ts +0 -46
- package/models/option-chain-inner.ts +0 -58
- package/models/option-leg.ts +0 -53
- package/models/option-strategy-legs-inner.ts +0 -47
- package/models/option-strategy.ts +0 -61
- package/models/options-get-option-strategy-request.ts +0 -51
- package/models/options-holdings.ts +0 -67
- package/models/options-place-option-strategy-request.ts +0 -57
- package/models/options-position.ts +0 -73
- package/models/options-symbol.ts +0 -94
- package/models/order-type.ts +0 -32
- package/models/partner-data.ts +0 -100
- package/models/past-value.ts +0 -43
- package/models/performance-custom.ts +0 -154
- package/models/portfolio-group-info.ts +0 -115
- package/models/portfolio-group-position.ts +0 -46
- package/models/portfolio-group-settings.ts +0 -58
- package/models/portfolio-group.ts +0 -37
- package/models/position-symbol.ts +0 -64
- package/models/position.ts +0 -64
- package/models/redirect-tokenand-pin.ts +0 -37
- package/models/security-type.ts +0 -49
- package/models/session-event.ts +0 -80
- package/models/snap-trade-apidisclaimer-accept-status.ts +0 -37
- package/models/snap-trade-holdings-account-account-id.ts +0 -82
- package/models/snap-trade-holdings-account.ts +0 -79
- package/models/snap-trade-holdings-total-value.ts +0 -37
- package/models/snap-trade-login-user-request-body.ts +0 -61
- package/models/snap-trade-register-user-request-body.ts +0 -35
- package/models/status.ts +0 -43
- package/models/strategy-impact-legs-inner.ts +0 -67
- package/models/strategy-impact.ts +0 -94
- package/models/strategy-order-place-orders-inner-legs-inner.ts +0 -67
- package/models/strategy-order-place-orders-inner.ts +0 -286
- package/models/strategy-order-place.ts +0 -40
- package/models/strategy-order-record.ts +0 -133
- package/models/strategy-quotes-greek.ts +0 -55
- package/models/strategy-quotes.ts +0 -67
- package/models/sub-period-return-rate.ts +0 -43
- package/models/symbol-query.ts +0 -29
- package/models/symbol.ts +0 -76
- package/models/symbols-quotes.ts +0 -64
- package/models/target-asset.ts +0 -62
- package/models/time-in-force.ts +0 -31
- package/models/trade-execution-status.ts +0 -105
- package/models/trade-impact.ts +0 -61
- package/models/trade.ts +0 -88
- package/models/trading-cancel-user-account-order-request.ts +0 -29
- package/models/trading-place-ocoorder-request.ts +0 -35
- package/models/transactions-status.ts +0 -35
- package/models/underlying-symbol.ts +0 -76
- package/models/universal-activity.ts +0 -127
- package/models/universal-symbol-ticker.ts +0 -82
- package/models/universal-symbol.ts +0 -80
- package/models/user-error-log.ts +0 -61
- package/models/user-idand-secret.ts +0 -37
- package/models/user-settings.ts +0 -88
- package/models/usexchange.ts +0 -79
- package/pagination/page-types.ts +0 -34
- package/pagination/page.ts +0 -58
- package/pagination/pageable.ts +0 -113
- package/pagination/paginate.ts +0 -41
- package/requestAfterHook.ts +0 -53
- package/requestBeforeHook.ts +0 -15
- package/tsconfig.json +0 -22
- package/tsconfig.test.json +0 -6
|
@@ -1,568 +0,0 @@
|
|
|
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, 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 { AuthenticationLoginSnapTradeUser200Response } from '../models';
|
|
24
|
-
// @ts-ignore
|
|
25
|
-
import { DeleteUserResponse } from '../models';
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
import { EncryptedResponse } from '../models';
|
|
28
|
-
// @ts-ignore
|
|
29
|
-
import { Model400FailedRequestResponse } from '../models';
|
|
30
|
-
// @ts-ignore
|
|
31
|
-
import { Model403FailedRequestResponse } from '../models';
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
import { Model404FailedRequestResponse } from '../models';
|
|
34
|
-
// @ts-ignore
|
|
35
|
-
import { SnapTradeLoginUserRequestBody } from '../models';
|
|
36
|
-
// @ts-ignore
|
|
37
|
-
import { SnapTradeRegisterUserRequestBody } from '../models';
|
|
38
|
-
// @ts-ignore
|
|
39
|
-
import { UserIDandSecret } from '../models';
|
|
40
|
-
import { paginate } from "../pagination/paginate";
|
|
41
|
-
import { requestBeforeHook } from '../requestBeforeHook';
|
|
42
|
-
import { AuthenticationApiCustom } from "./authentication-api-custom";
|
|
43
|
-
/**
|
|
44
|
-
* AuthenticationApi - axios parameter creator
|
|
45
|
-
* @export
|
|
46
|
-
*/
|
|
47
|
-
export const AuthenticationApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
48
|
-
return {
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* @summary Delete user from SnapTrade, disabling all brokerage authorizations and permanently deleting all data associated with the user
|
|
52
|
-
* @param {string} userId
|
|
53
|
-
* @param {*} [options] Override http request option.
|
|
54
|
-
* @throws {RequiredError}
|
|
55
|
-
*/
|
|
56
|
-
deleteSnapTradeUser: async (userId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
57
|
-
// verify required parameter 'userId' is not null or undefined
|
|
58
|
-
assertParamExists('deleteSnapTradeUser', 'userId', userId)
|
|
59
|
-
const localVarPath = `/snapTrade/deleteUser`;
|
|
60
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
61
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
62
|
-
let baseOptions;
|
|
63
|
-
if (configuration) {
|
|
64
|
-
baseOptions = configuration.baseOptions;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options};
|
|
68
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
69
|
-
const localVarQueryParameter = {} as any;
|
|
70
|
-
|
|
71
|
-
// authentication PartnerClientId required
|
|
72
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
73
|
-
// authentication PartnerSignature required
|
|
74
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
75
|
-
// authentication PartnerTimestamp required
|
|
76
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
77
|
-
if (userId !== undefined) {
|
|
78
|
-
localVarQueryParameter['userId'] = userId;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
84
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
85
|
-
requestBeforeHook({
|
|
86
|
-
queryParameters: localVarQueryParameter,
|
|
87
|
-
requestConfig: localVarRequestOptions,
|
|
88
|
-
path: localVarPath,
|
|
89
|
-
configuration
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
93
|
-
return {
|
|
94
|
-
url: toPathString(localVarUrlObj),
|
|
95
|
-
options: localVarRequestOptions,
|
|
96
|
-
};
|
|
97
|
-
},
|
|
98
|
-
/**
|
|
99
|
-
*
|
|
100
|
-
* @summary Obtains an encrypted JWT tokens that should be decrypted on a user\'s local device
|
|
101
|
-
* @param {string} userId
|
|
102
|
-
* @param {string} userSecret
|
|
103
|
-
* @param {*} [options] Override http request option.
|
|
104
|
-
* @throws {RequiredError}
|
|
105
|
-
*/
|
|
106
|
-
getUserJWT: async (userId: string, userSecret: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
107
|
-
// verify required parameter 'userId' is not null or undefined
|
|
108
|
-
assertParamExists('getUserJWT', 'userId', userId)
|
|
109
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
110
|
-
assertParamExists('getUserJWT', 'userSecret', userSecret)
|
|
111
|
-
const localVarPath = `/snapTrade/encryptedJWT`;
|
|
112
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
113
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
114
|
-
let baseOptions;
|
|
115
|
-
if (configuration) {
|
|
116
|
-
baseOptions = configuration.baseOptions;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
120
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
121
|
-
const localVarQueryParameter = {} as any;
|
|
122
|
-
|
|
123
|
-
// authentication PartnerClientId required
|
|
124
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
125
|
-
// authentication PartnerSignature required
|
|
126
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
127
|
-
// authentication PartnerTimestamp required
|
|
128
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
129
|
-
if (userId !== undefined) {
|
|
130
|
-
localVarQueryParameter['userId'] = userId;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
if (userSecret !== undefined) {
|
|
134
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
140
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
141
|
-
requestBeforeHook({
|
|
142
|
-
queryParameters: localVarQueryParameter,
|
|
143
|
-
requestConfig: localVarRequestOptions,
|
|
144
|
-
path: localVarPath,
|
|
145
|
-
configuration
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
149
|
-
return {
|
|
150
|
-
url: toPathString(localVarUrlObj),
|
|
151
|
-
options: localVarRequestOptions,
|
|
152
|
-
};
|
|
153
|
-
},
|
|
154
|
-
/**
|
|
155
|
-
*
|
|
156
|
-
* @summary Get a list of all SnapTrade users you\'ve registered on our platform
|
|
157
|
-
* @param {*} [options] Override http request option.
|
|
158
|
-
* @throws {RequiredError}
|
|
159
|
-
*/
|
|
160
|
-
listSnapTradeUsers: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
161
|
-
const localVarPath = `/snapTrade/listUsers`;
|
|
162
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
163
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
164
|
-
let baseOptions;
|
|
165
|
-
if (configuration) {
|
|
166
|
-
baseOptions = configuration.baseOptions;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
170
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
171
|
-
const localVarQueryParameter = {} as any;
|
|
172
|
-
|
|
173
|
-
// authentication PartnerClientId required
|
|
174
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
175
|
-
// authentication PartnerSignature required
|
|
176
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
177
|
-
// authentication PartnerTimestamp required
|
|
178
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
182
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
183
|
-
requestBeforeHook({
|
|
184
|
-
queryParameters: localVarQueryParameter,
|
|
185
|
-
requestConfig: localVarRequestOptions,
|
|
186
|
-
path: localVarPath,
|
|
187
|
-
configuration
|
|
188
|
-
});
|
|
189
|
-
|
|
190
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
191
|
-
return {
|
|
192
|
-
url: toPathString(localVarUrlObj),
|
|
193
|
-
options: localVarRequestOptions,
|
|
194
|
-
};
|
|
195
|
-
},
|
|
196
|
-
/**
|
|
197
|
-
*
|
|
198
|
-
* @summary Generate a redirect URI to securely login a user to the SnapTrade Connection Portal
|
|
199
|
-
* @param {string} userId
|
|
200
|
-
* @param {string} userSecret
|
|
201
|
-
* @param {SnapTradeLoginUserRequestBody} [snapTradeLoginUserRequestBody]
|
|
202
|
-
* @param {*} [options] Override http request option.
|
|
203
|
-
* @throws {RequiredError}
|
|
204
|
-
*/
|
|
205
|
-
loginSnapTradeUser: async (userId: string, userSecret: string, snapTradeLoginUserRequestBody?: SnapTradeLoginUserRequestBody, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
206
|
-
// verify required parameter 'userId' is not null or undefined
|
|
207
|
-
assertParamExists('loginSnapTradeUser', 'userId', userId)
|
|
208
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
209
|
-
assertParamExists('loginSnapTradeUser', 'userSecret', userSecret)
|
|
210
|
-
const localVarPath = `/snapTrade/login`;
|
|
211
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
212
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
213
|
-
let baseOptions;
|
|
214
|
-
if (configuration) {
|
|
215
|
-
baseOptions = configuration.baseOptions;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
219
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
220
|
-
const localVarQueryParameter = {} as any;
|
|
221
|
-
|
|
222
|
-
// authentication PartnerClientId required
|
|
223
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
224
|
-
// authentication PartnerSignature required
|
|
225
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
226
|
-
// authentication PartnerTimestamp required
|
|
227
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
228
|
-
if (userId !== undefined) {
|
|
229
|
-
localVarQueryParameter['userId'] = userId;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
if (userSecret !== undefined) {
|
|
233
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
239
|
-
|
|
240
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
241
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
242
|
-
requestBeforeHook({
|
|
243
|
-
requestBody: snapTradeLoginUserRequestBody,
|
|
244
|
-
queryParameters: localVarQueryParameter,
|
|
245
|
-
requestConfig: localVarRequestOptions,
|
|
246
|
-
path: localVarPath,
|
|
247
|
-
configuration
|
|
248
|
-
});
|
|
249
|
-
localVarRequestOptions.data = serializeDataIfNeeded(snapTradeLoginUserRequestBody, localVarRequestOptions, configuration)
|
|
250
|
-
|
|
251
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
252
|
-
return {
|
|
253
|
-
url: toPathString(localVarUrlObj),
|
|
254
|
-
options: localVarRequestOptions,
|
|
255
|
-
};
|
|
256
|
-
},
|
|
257
|
-
/**
|
|
258
|
-
*
|
|
259
|
-
* @summary Register user with SnapTrade in order to create secure brokerage authorizations
|
|
260
|
-
* @param {SnapTradeRegisterUserRequestBody} snapTradeRegisterUserRequestBody
|
|
261
|
-
* @param {*} [options] Override http request option.
|
|
262
|
-
* @throws {RequiredError}
|
|
263
|
-
*/
|
|
264
|
-
registerSnapTradeUser: async (snapTradeRegisterUserRequestBody: SnapTradeRegisterUserRequestBody, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
265
|
-
// verify required parameter 'snapTradeRegisterUserRequestBody' is not null or undefined
|
|
266
|
-
assertParamExists('registerSnapTradeUser', 'snapTradeRegisterUserRequestBody', snapTradeRegisterUserRequestBody)
|
|
267
|
-
const localVarPath = `/snapTrade/registerUser`;
|
|
268
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
269
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
270
|
-
let baseOptions;
|
|
271
|
-
if (configuration) {
|
|
272
|
-
baseOptions = configuration.baseOptions;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
276
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
277
|
-
const localVarQueryParameter = {} as any;
|
|
278
|
-
|
|
279
|
-
// authentication PartnerClientId required
|
|
280
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
281
|
-
// authentication PartnerSignature required
|
|
282
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
283
|
-
// authentication PartnerTimestamp required
|
|
284
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
288
|
-
|
|
289
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
290
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
291
|
-
requestBeforeHook({
|
|
292
|
-
requestBody: snapTradeRegisterUserRequestBody,
|
|
293
|
-
queryParameters: localVarQueryParameter,
|
|
294
|
-
requestConfig: localVarRequestOptions,
|
|
295
|
-
path: localVarPath,
|
|
296
|
-
configuration
|
|
297
|
-
});
|
|
298
|
-
localVarRequestOptions.data = serializeDataIfNeeded(snapTradeRegisterUserRequestBody, localVarRequestOptions, configuration)
|
|
299
|
-
|
|
300
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
301
|
-
return {
|
|
302
|
-
url: toPathString(localVarUrlObj),
|
|
303
|
-
options: localVarRequestOptions,
|
|
304
|
-
};
|
|
305
|
-
},
|
|
306
|
-
}
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* AuthenticationApi - functional programming interface
|
|
311
|
-
* @export
|
|
312
|
-
*/
|
|
313
|
-
export const AuthenticationApiFp = function(configuration?: Configuration) {
|
|
314
|
-
const localVarAxiosParamCreator = AuthenticationApiAxiosParamCreator(configuration)
|
|
315
|
-
return {
|
|
316
|
-
/**
|
|
317
|
-
*
|
|
318
|
-
* @summary Delete user from SnapTrade, disabling all brokerage authorizations and permanently deleting all data associated with the user
|
|
319
|
-
* @param {AuthenticationApiDeleteSnapTradeUserRequest} requestParameters Request parameters.
|
|
320
|
-
* @param {*} [options] Override http request option.
|
|
321
|
-
* @throws {RequiredError}
|
|
322
|
-
*/
|
|
323
|
-
async deleteSnapTradeUser(requestParameters: AuthenticationApiDeleteSnapTradeUserRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteUserResponse>> {
|
|
324
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSnapTradeUser(requestParameters.userId, options);
|
|
325
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
326
|
-
},
|
|
327
|
-
/**
|
|
328
|
-
*
|
|
329
|
-
* @summary Obtains an encrypted JWT tokens that should be decrypted on a user\'s local device
|
|
330
|
-
* @param {AuthenticationApiGetUserJWTRequest} requestParameters Request parameters.
|
|
331
|
-
* @param {*} [options] Override http request option.
|
|
332
|
-
* @throws {RequiredError}
|
|
333
|
-
*/
|
|
334
|
-
async getUserJWT(requestParameters: AuthenticationApiGetUserJWTRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EncryptedResponse>> {
|
|
335
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getUserJWT(requestParameters.userId, requestParameters.userSecret, options);
|
|
336
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
337
|
-
},
|
|
338
|
-
/**
|
|
339
|
-
*
|
|
340
|
-
* @summary Get a list of all SnapTrade users you\'ve registered on our platform
|
|
341
|
-
* @param {*} [options] Override http request option.
|
|
342
|
-
* @throws {RequiredError}
|
|
343
|
-
*/
|
|
344
|
-
async listSnapTradeUsers(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<string>>> {
|
|
345
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listSnapTradeUsers(options);
|
|
346
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
347
|
-
},
|
|
348
|
-
/**
|
|
349
|
-
*
|
|
350
|
-
* @summary Generate a redirect URI to securely login a user to the SnapTrade Connection Portal
|
|
351
|
-
* @param {AuthenticationApiLoginSnapTradeUserRequest} requestParameters Request parameters.
|
|
352
|
-
* @param {*} [options] Override http request option.
|
|
353
|
-
* @throws {RequiredError}
|
|
354
|
-
*/
|
|
355
|
-
async loginSnapTradeUser(requestParameters: AuthenticationApiLoginSnapTradeUserRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthenticationLoginSnapTradeUser200Response>> {
|
|
356
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.loginSnapTradeUser(requestParameters.userId, requestParameters.userSecret, requestParameters, options);
|
|
357
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
358
|
-
},
|
|
359
|
-
/**
|
|
360
|
-
*
|
|
361
|
-
* @summary Register user with SnapTrade in order to create secure brokerage authorizations
|
|
362
|
-
* @param {AuthenticationApiRegisterSnapTradeUserRequest} requestParameters Request parameters.
|
|
363
|
-
* @param {*} [options] Override http request option.
|
|
364
|
-
* @throws {RequiredError}
|
|
365
|
-
*/
|
|
366
|
-
async registerSnapTradeUser(requestParameters: AuthenticationApiRegisterSnapTradeUserRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserIDandSecret>> {
|
|
367
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.registerSnapTradeUser(requestParameters, options);
|
|
368
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
369
|
-
},
|
|
370
|
-
}
|
|
371
|
-
};
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
* AuthenticationApi - factory interface
|
|
375
|
-
* @export
|
|
376
|
-
*/
|
|
377
|
-
export const AuthenticationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
378
|
-
const localVarFp = AuthenticationApiFp(configuration)
|
|
379
|
-
return {
|
|
380
|
-
/**
|
|
381
|
-
*
|
|
382
|
-
* @summary Delete user from SnapTrade, disabling all brokerage authorizations and permanently deleting all data associated with the user
|
|
383
|
-
* @param {AuthenticationApiDeleteSnapTradeUserRequest} requestParameters Request parameters.
|
|
384
|
-
* @param {*} [options] Override http request option.
|
|
385
|
-
* @throws {RequiredError}
|
|
386
|
-
*/
|
|
387
|
-
deleteSnapTradeUser(requestParameters: AuthenticationApiDeleteSnapTradeUserRequest, options?: AxiosRequestConfig): AxiosPromise<DeleteUserResponse> {
|
|
388
|
-
return localVarFp.deleteSnapTradeUser(requestParameters, options).then((request) => request(axios, basePath));
|
|
389
|
-
},
|
|
390
|
-
/**
|
|
391
|
-
*
|
|
392
|
-
* @summary Obtains an encrypted JWT tokens that should be decrypted on a user\'s local device
|
|
393
|
-
* @param {AuthenticationApiGetUserJWTRequest} requestParameters Request parameters.
|
|
394
|
-
* @param {*} [options] Override http request option.
|
|
395
|
-
* @throws {RequiredError}
|
|
396
|
-
*/
|
|
397
|
-
getUserJWT(requestParameters: AuthenticationApiGetUserJWTRequest, options?: AxiosRequestConfig): AxiosPromise<EncryptedResponse> {
|
|
398
|
-
return localVarFp.getUserJWT(requestParameters, options).then((request) => request(axios, basePath));
|
|
399
|
-
},
|
|
400
|
-
/**
|
|
401
|
-
*
|
|
402
|
-
* @summary Get a list of all SnapTrade users you\'ve registered on our platform
|
|
403
|
-
* @param {*} [options] Override http request option.
|
|
404
|
-
* @throws {RequiredError}
|
|
405
|
-
*/
|
|
406
|
-
listSnapTradeUsers(options?: AxiosRequestConfig): AxiosPromise<Array<string>> {
|
|
407
|
-
return localVarFp.listSnapTradeUsers(options).then((request) => request(axios, basePath));
|
|
408
|
-
},
|
|
409
|
-
/**
|
|
410
|
-
*
|
|
411
|
-
* @summary Generate a redirect URI to securely login a user to the SnapTrade Connection Portal
|
|
412
|
-
* @param {AuthenticationApiLoginSnapTradeUserRequest} requestParameters Request parameters.
|
|
413
|
-
* @param {*} [options] Override http request option.
|
|
414
|
-
* @throws {RequiredError}
|
|
415
|
-
*/
|
|
416
|
-
loginSnapTradeUser(requestParameters: AuthenticationApiLoginSnapTradeUserRequest, options?: AxiosRequestConfig): AxiosPromise<AuthenticationLoginSnapTradeUser200Response> {
|
|
417
|
-
return localVarFp.loginSnapTradeUser(requestParameters, options).then((request) => request(axios, basePath));
|
|
418
|
-
},
|
|
419
|
-
/**
|
|
420
|
-
*
|
|
421
|
-
* @summary Register user with SnapTrade in order to create secure brokerage authorizations
|
|
422
|
-
* @param {AuthenticationApiRegisterSnapTradeUserRequest} requestParameters Request parameters.
|
|
423
|
-
* @param {*} [options] Override http request option.
|
|
424
|
-
* @throws {RequiredError}
|
|
425
|
-
*/
|
|
426
|
-
registerSnapTradeUser(requestParameters: AuthenticationApiRegisterSnapTradeUserRequest, options?: AxiosRequestConfig): AxiosPromise<UserIDandSecret> {
|
|
427
|
-
return localVarFp.registerSnapTradeUser(requestParameters, options).then((request) => request(axios, basePath));
|
|
428
|
-
},
|
|
429
|
-
};
|
|
430
|
-
};
|
|
431
|
-
|
|
432
|
-
/**
|
|
433
|
-
* Request parameters for deleteSnapTradeUser operation in AuthenticationApi.
|
|
434
|
-
* @export
|
|
435
|
-
* @interface AuthenticationApiDeleteSnapTradeUserRequest
|
|
436
|
-
*/
|
|
437
|
-
export type AuthenticationApiDeleteSnapTradeUserRequest = {
|
|
438
|
-
|
|
439
|
-
/**
|
|
440
|
-
*
|
|
441
|
-
* @type {string}
|
|
442
|
-
* @memberof AuthenticationApiDeleteSnapTradeUser
|
|
443
|
-
*/
|
|
444
|
-
readonly userId: string
|
|
445
|
-
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
* Request parameters for getUserJWT operation in AuthenticationApi.
|
|
450
|
-
* @export
|
|
451
|
-
* @interface AuthenticationApiGetUserJWTRequest
|
|
452
|
-
*/
|
|
453
|
-
export type AuthenticationApiGetUserJWTRequest = {
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
*
|
|
457
|
-
* @type {string}
|
|
458
|
-
* @memberof AuthenticationApiGetUserJWT
|
|
459
|
-
*/
|
|
460
|
-
readonly userId: string
|
|
461
|
-
|
|
462
|
-
/**
|
|
463
|
-
*
|
|
464
|
-
* @type {string}
|
|
465
|
-
* @memberof AuthenticationApiGetUserJWT
|
|
466
|
-
*/
|
|
467
|
-
readonly userSecret: string
|
|
468
|
-
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
/**
|
|
472
|
-
* Request parameters for loginSnapTradeUser operation in AuthenticationApi.
|
|
473
|
-
* @export
|
|
474
|
-
* @interface AuthenticationApiLoginSnapTradeUserRequest
|
|
475
|
-
*/
|
|
476
|
-
export type AuthenticationApiLoginSnapTradeUserRequest = {
|
|
477
|
-
|
|
478
|
-
/**
|
|
479
|
-
*
|
|
480
|
-
* @type {string}
|
|
481
|
-
* @memberof AuthenticationApiLoginSnapTradeUser
|
|
482
|
-
*/
|
|
483
|
-
readonly userId: string
|
|
484
|
-
|
|
485
|
-
/**
|
|
486
|
-
*
|
|
487
|
-
* @type {string}
|
|
488
|
-
* @memberof AuthenticationApiLoginSnapTradeUser
|
|
489
|
-
*/
|
|
490
|
-
readonly userSecret: string
|
|
491
|
-
|
|
492
|
-
} & SnapTradeLoginUserRequestBody
|
|
493
|
-
|
|
494
|
-
/**
|
|
495
|
-
* Request parameters for registerSnapTradeUser operation in AuthenticationApi.
|
|
496
|
-
* @export
|
|
497
|
-
* @interface AuthenticationApiRegisterSnapTradeUserRequest
|
|
498
|
-
*/
|
|
499
|
-
export type AuthenticationApiRegisterSnapTradeUserRequest = {
|
|
500
|
-
|
|
501
|
-
} & SnapTradeRegisterUserRequestBody
|
|
502
|
-
|
|
503
|
-
/**
|
|
504
|
-
* AuthenticationApi - object-oriented interface
|
|
505
|
-
* @export
|
|
506
|
-
* @class AuthenticationApi
|
|
507
|
-
* @extends {BaseAPI}
|
|
508
|
-
*/
|
|
509
|
-
export class AuthenticationApi extends AuthenticationApiCustom {
|
|
510
|
-
/**
|
|
511
|
-
*
|
|
512
|
-
* @summary Delete user from SnapTrade, disabling all brokerage authorizations and permanently deleting all data associated with the user
|
|
513
|
-
* @param {AuthenticationApiDeleteSnapTradeUserRequest} requestParameters Request parameters.
|
|
514
|
-
* @param {*} [options] Override http request option.
|
|
515
|
-
* @throws {RequiredError}
|
|
516
|
-
* @memberof AuthenticationApi
|
|
517
|
-
*/
|
|
518
|
-
public deleteSnapTradeUser(requestParameters: AuthenticationApiDeleteSnapTradeUserRequest, options?: AxiosRequestConfig) {
|
|
519
|
-
return AuthenticationApiFp(this.configuration).deleteSnapTradeUser(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
/**
|
|
523
|
-
*
|
|
524
|
-
* @summary Obtains an encrypted JWT tokens that should be decrypted on a user\'s local device
|
|
525
|
-
* @param {AuthenticationApiGetUserJWTRequest} requestParameters Request parameters.
|
|
526
|
-
* @param {*} [options] Override http request option.
|
|
527
|
-
* @throws {RequiredError}
|
|
528
|
-
* @memberof AuthenticationApi
|
|
529
|
-
*/
|
|
530
|
-
public getUserJWT(requestParameters: AuthenticationApiGetUserJWTRequest, options?: AxiosRequestConfig) {
|
|
531
|
-
return AuthenticationApiFp(this.configuration).getUserJWT(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
*
|
|
536
|
-
* @summary Get a list of all SnapTrade users you\'ve registered on our platform
|
|
537
|
-
* @param {*} [options] Override http request option.
|
|
538
|
-
* @throws {RequiredError}
|
|
539
|
-
* @memberof AuthenticationApi
|
|
540
|
-
*/
|
|
541
|
-
public listSnapTradeUsers(options?: AxiosRequestConfig) {
|
|
542
|
-
return AuthenticationApiFp(this.configuration).listSnapTradeUsers(options).then((request) => request(this.axios, this.basePath));
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
-
*
|
|
547
|
-
* @summary Generate a redirect URI to securely login a user to the SnapTrade Connection Portal
|
|
548
|
-
* @param {AuthenticationApiLoginSnapTradeUserRequest} requestParameters Request parameters.
|
|
549
|
-
* @param {*} [options] Override http request option.
|
|
550
|
-
* @throws {RequiredError}
|
|
551
|
-
* @memberof AuthenticationApi
|
|
552
|
-
*/
|
|
553
|
-
public loginSnapTradeUser(requestParameters: AuthenticationApiLoginSnapTradeUserRequest, options?: AxiosRequestConfig) {
|
|
554
|
-
return AuthenticationApiFp(this.configuration).loginSnapTradeUser(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
/**
|
|
558
|
-
*
|
|
559
|
-
* @summary Register user with SnapTrade in order to create secure brokerage authorizations
|
|
560
|
-
* @param {AuthenticationApiRegisterSnapTradeUserRequest} requestParameters Request parameters.
|
|
561
|
-
* @param {*} [options] Override http request option.
|
|
562
|
-
* @throws {RequiredError}
|
|
563
|
-
* @memberof AuthenticationApi
|
|
564
|
-
*/
|
|
565
|
-
public registerSnapTradeUser(requestParameters: AuthenticationApiRegisterSnapTradeUserRequest, options?: AxiosRequestConfig) {
|
|
566
|
-
return AuthenticationApiFp(this.configuration).registerSnapTradeUser(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
567
|
-
}
|
|
568
|
-
}
|