snaptrade-typescript-sdk 9.0.167 → 9.0.169
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 +41 -3
- package/dist/api/account-information-api-generated.d.ts +4 -4
- package/dist/api/account-information-api-generated.js +4 -4
- package/dist/api/connections-api-generated.d.ts +61 -0
- package/dist/api/connections-api-generated.js +89 -0
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/account-simple.d.ts +6 -0
- package/dist/models/account.d.ts +6 -0
- package/dist/models/delete-connection-confirmation.d.ts +20 -0
- package/dist/models/delete-connection-confirmation.js +2 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/operationParameterMap.js +13 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Connect brokerage accounts to your app for live positions and trading
|
|
8
8
|
|
|
9
|
-
[](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/9.0.169)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -36,6 +36,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
36
36
|
* [`snaptrade.authentication.loginSnapTradeUser`](#snaptradeauthenticationloginsnaptradeuser)
|
|
37
37
|
* [`snaptrade.authentication.registerSnapTradeUser`](#snaptradeauthenticationregistersnaptradeuser)
|
|
38
38
|
* [`snaptrade.authentication.resetSnapTradeUserSecret`](#snaptradeauthenticationresetsnaptradeusersecret)
|
|
39
|
+
* [`snaptrade.connections.deleteConnection`](#snaptradeconnectionsdeleteconnection)
|
|
39
40
|
* [`snaptrade.connections.detailBrokerageAuthorization`](#snaptradeconnectionsdetailbrokerageauthorization)
|
|
40
41
|
* [`snaptrade.connections.disableBrokerageAuthorization`](#snaptradeconnectionsdisablebrokerageauthorization)
|
|
41
42
|
* [`snaptrade.connections.listBrokerageAuthorizations`](#snaptradeconnectionslistbrokerageauthorizations)
|
|
@@ -662,9 +663,11 @@ const getUserHoldingsResponse =
|
|
|
662
663
|
|
|
663
664
|
Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
|
|
664
665
|
|
|
666
|
+
Please note that this data is cached and only refreshed once a day.
|
|
667
|
+
|
|
665
668
|
Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
666
|
-
- If you do,
|
|
667
|
-
- If you don't, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization)
|
|
669
|
+
- If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails).
|
|
670
|
+
- If you don't, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
668
671
|
|
|
669
672
|
|
|
670
673
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
@@ -955,6 +958,41 @@ SnapTrade User Secret. This is a randomly generated string and should be stored
|
|
|
955
958
|
---
|
|
956
959
|
|
|
957
960
|
|
|
961
|
+
### `snaptrade.connections.deleteConnection`<a id="snaptradeconnectionsdeleteconnection"></a>
|
|
962
|
+
|
|
963
|
+
Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is asynchronous, a 200 response indicates that a task has been queued to delete the connection. Listen for the [`CONNECTION_DELETED` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-connection_deleted) webhook to know when the deletion has been completed and the data has been removed.
|
|
964
|
+
|
|
965
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
966
|
+
|
|
967
|
+
```typescript
|
|
968
|
+
const deleteConnectionResponse = await snaptrade.connections.deleteConnection({
|
|
969
|
+
connectionId: "87b24961-b51e-4db8-9226-f198f6518a89",
|
|
970
|
+
userId: "snaptrade-user-123",
|
|
971
|
+
userSecret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
972
|
+
});
|
|
973
|
+
```
|
|
974
|
+
|
|
975
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
976
|
+
|
|
977
|
+
##### connectionId: `string`<a id="connectionid-string"></a>
|
|
978
|
+
|
|
979
|
+
##### userId: `string`<a id="userid-string"></a>
|
|
980
|
+
|
|
981
|
+
##### userSecret: `string`<a id="usersecret-string"></a>
|
|
982
|
+
|
|
983
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
|
984
|
+
|
|
985
|
+
[DeleteConnectionConfirmation](./models/delete-connection-confirmation.ts)
|
|
986
|
+
|
|
987
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
988
|
+
|
|
989
|
+
`/connection/{connectionId}` `DELETE`
|
|
990
|
+
|
|
991
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
992
|
+
|
|
993
|
+
---
|
|
994
|
+
|
|
995
|
+
|
|
958
996
|
### `snaptrade.connections.detailBrokerageAuthorization`<a id="snaptradeconnectionsdetailbrokerageauthorization"></a>
|
|
959
997
|
|
|
960
998
|
Returns a single connection for the specified ID.
|
|
@@ -127,7 +127,7 @@ export declare const AccountInformationApiAxiosParamCreator: (configuration?: Co
|
|
|
127
127
|
*/
|
|
128
128
|
getUserHoldings: (accountId: string, userId: string, userSecret: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
129
129
|
/**
|
|
130
|
-
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do,
|
|
130
|
+
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Please note that this data is cached and only refreshed once a day. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails). - If you don\'t, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
131
131
|
* @summary List accounts
|
|
132
132
|
* @param {string} userId
|
|
133
133
|
* @param {string} userSecret
|
|
@@ -233,7 +233,7 @@ export declare const AccountInformationApiFp: (configuration?: Configuration) =>
|
|
|
233
233
|
*/
|
|
234
234
|
getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccountHoldingsAccount>>;
|
|
235
235
|
/**
|
|
236
|
-
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do,
|
|
236
|
+
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Please note that this data is cached and only refreshed once a day. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails). - If you don\'t, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
237
237
|
* @summary List accounts
|
|
238
238
|
* @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
|
|
239
239
|
* @param {*} [options] Override http request option.
|
|
@@ -336,7 +336,7 @@ export declare const AccountInformationApiFactory: (configuration?: Configuratio
|
|
|
336
336
|
*/
|
|
337
337
|
getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): AxiosPromise<AccountHoldingsAccount>;
|
|
338
338
|
/**
|
|
339
|
-
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do,
|
|
339
|
+
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Please note that this data is cached and only refreshed once a day. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails). - If you don\'t, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
340
340
|
* @summary List accounts
|
|
341
341
|
* @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
|
|
342
342
|
* @param {*} [options] Override http request option.
|
|
@@ -793,7 +793,7 @@ export declare class AccountInformationApiGenerated extends BaseAPI {
|
|
|
793
793
|
*/
|
|
794
794
|
getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountHoldingsAccount, any>>;
|
|
795
795
|
/**
|
|
796
|
-
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do,
|
|
796
|
+
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Please note that this data is cached and only refreshed once a day. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails). - If you don\'t, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
797
797
|
* @summary List accounts
|
|
798
798
|
* @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
|
|
799
799
|
* @param {*} [options] Override http request option.
|
|
@@ -629,7 +629,7 @@ const AccountInformationApiAxiosParamCreator = function (configuration) {
|
|
|
629
629
|
};
|
|
630
630
|
}),
|
|
631
631
|
/**
|
|
632
|
-
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do,
|
|
632
|
+
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Please note that this data is cached and only refreshed once a day. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails). - If you don\'t, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
633
633
|
* @summary List accounts
|
|
634
634
|
* @param {string} userId
|
|
635
635
|
* @param {string} userSecret
|
|
@@ -879,7 +879,7 @@ const AccountInformationApiFp = function (configuration) {
|
|
|
879
879
|
});
|
|
880
880
|
},
|
|
881
881
|
/**
|
|
882
|
-
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do,
|
|
882
|
+
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Please note that this data is cached and only refreshed once a day. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails). - If you don\'t, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
883
883
|
* @summary List accounts
|
|
884
884
|
* @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
|
|
885
885
|
* @param {*} [options] Override http request option.
|
|
@@ -1016,7 +1016,7 @@ const AccountInformationApiFactory = function (configuration, basePath, axios) {
|
|
|
1016
1016
|
return localVarFp.getUserHoldings(requestParameters, options).then((request) => request(axios, basePath));
|
|
1017
1017
|
},
|
|
1018
1018
|
/**
|
|
1019
|
-
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do,
|
|
1019
|
+
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Please note that this data is cached and only refreshed once a day. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails). - If you don\'t, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
1020
1020
|
* @summary List accounts
|
|
1021
1021
|
* @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
|
|
1022
1022
|
* @param {*} [options] Override http request option.
|
|
@@ -1157,7 +1157,7 @@ class AccountInformationApiGenerated extends base_1.BaseAPI {
|
|
|
1157
1157
|
return (0, exports.AccountInformationApiFp)(this.configuration).getUserHoldings(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1158
1158
|
}
|
|
1159
1159
|
/**
|
|
1160
|
-
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do,
|
|
1160
|
+
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Please note that this data is cached and only refreshed once a day. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails). - If you don\'t, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
1161
1161
|
* @summary List accounts
|
|
1162
1162
|
* @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
|
|
1163
1163
|
* @param {*} [options] Override http request option.
|
|
@@ -5,12 +5,23 @@ import { BrokerageAuthorization } from '../models';
|
|
|
5
5
|
import { BrokerageAuthorizationDisabledConfirmation } from '../models';
|
|
6
6
|
import { BrokerageAuthorizationRefreshConfirmation } from '../models';
|
|
7
7
|
import { ConnectionsSessionEvents200ResponseInner } from '../models';
|
|
8
|
+
import { DeleteConnectionConfirmation } from '../models';
|
|
8
9
|
import { RateOfReturnResponse } from '../models';
|
|
9
10
|
/**
|
|
10
11
|
* ConnectionsApi - axios parameter creator
|
|
11
12
|
* @export
|
|
12
13
|
*/
|
|
13
14
|
export declare const ConnectionsApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
15
|
+
/**
|
|
16
|
+
* Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is asynchronous, a 200 response indicates that a task has been queued to delete the connection. Listen for the [`CONNECTION_DELETED` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-connection_deleted) webhook to know when the deletion has been completed and the data has been removed.
|
|
17
|
+
* @summary Delete connection
|
|
18
|
+
* @param {string} connectionId
|
|
19
|
+
* @param {string} userId
|
|
20
|
+
* @param {string} userSecret
|
|
21
|
+
* @param {*} [options] Override http request option.
|
|
22
|
+
* @throws {RequiredError}
|
|
23
|
+
*/
|
|
24
|
+
deleteConnection: (connectionId: string, userId: string, userSecret: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
14
25
|
/**
|
|
15
26
|
* Returns a single connection for the specified ID.
|
|
16
27
|
* @summary Get connection detail
|
|
@@ -86,6 +97,14 @@ export declare const ConnectionsApiAxiosParamCreator: (configuration?: Configura
|
|
|
86
97
|
* @export
|
|
87
98
|
*/
|
|
88
99
|
export declare const ConnectionsApiFp: (configuration?: Configuration) => {
|
|
100
|
+
/**
|
|
101
|
+
* Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is asynchronous, a 200 response indicates that a task has been queued to delete the connection. Listen for the [`CONNECTION_DELETED` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-connection_deleted) webhook to know when the deletion has been completed and the data has been removed.
|
|
102
|
+
* @summary Delete connection
|
|
103
|
+
* @param {ConnectionsApiDeleteConnectionRequest} requestParameters Request parameters.
|
|
104
|
+
* @param {*} [options] Override http request option.
|
|
105
|
+
* @throws {RequiredError}
|
|
106
|
+
*/
|
|
107
|
+
deleteConnection(requestParameters: ConnectionsApiDeleteConnectionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteConnectionConfirmation>>;
|
|
89
108
|
/**
|
|
90
109
|
* Returns a single connection for the specified ID.
|
|
91
110
|
* @summary Get connection detail
|
|
@@ -148,6 +167,14 @@ export declare const ConnectionsApiFp: (configuration?: Configuration) => {
|
|
|
148
167
|
* @export
|
|
149
168
|
*/
|
|
150
169
|
export declare const ConnectionsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
170
|
+
/**
|
|
171
|
+
* Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is asynchronous, a 200 response indicates that a task has been queued to delete the connection. Listen for the [`CONNECTION_DELETED` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-connection_deleted) webhook to know when the deletion has been completed and the data has been removed.
|
|
172
|
+
* @summary Delete connection
|
|
173
|
+
* @param {ConnectionsApiDeleteConnectionRequest} requestParameters Request parameters.
|
|
174
|
+
* @param {*} [options] Override http request option.
|
|
175
|
+
* @throws {RequiredError}
|
|
176
|
+
*/
|
|
177
|
+
deleteConnection(requestParameters: ConnectionsApiDeleteConnectionRequest, options?: AxiosRequestConfig): AxiosPromise<DeleteConnectionConfirmation>;
|
|
151
178
|
/**
|
|
152
179
|
* Returns a single connection for the specified ID.
|
|
153
180
|
* @summary Get connection detail
|
|
@@ -205,6 +232,31 @@ export declare const ConnectionsApiFactory: (configuration?: Configuration, base
|
|
|
205
232
|
*/
|
|
206
233
|
sessionEvents(requestParameters: ConnectionsApiSessionEventsRequest, options?: AxiosRequestConfig): AxiosPromise<Array<ConnectionsSessionEvents200ResponseInner>>;
|
|
207
234
|
};
|
|
235
|
+
/**
|
|
236
|
+
* Request parameters for deleteConnection operation in ConnectionsApi.
|
|
237
|
+
* @export
|
|
238
|
+
* @interface ConnectionsApiDeleteConnectionRequest
|
|
239
|
+
*/
|
|
240
|
+
export type ConnectionsApiDeleteConnectionRequest = {
|
|
241
|
+
/**
|
|
242
|
+
*
|
|
243
|
+
* @type {string}
|
|
244
|
+
* @memberof ConnectionsApiDeleteConnection
|
|
245
|
+
*/
|
|
246
|
+
readonly connectionId: string;
|
|
247
|
+
/**
|
|
248
|
+
*
|
|
249
|
+
* @type {string}
|
|
250
|
+
* @memberof ConnectionsApiDeleteConnection
|
|
251
|
+
*/
|
|
252
|
+
readonly userId: string;
|
|
253
|
+
/**
|
|
254
|
+
*
|
|
255
|
+
* @type {string}
|
|
256
|
+
* @memberof ConnectionsApiDeleteConnection
|
|
257
|
+
*/
|
|
258
|
+
readonly userSecret: string;
|
|
259
|
+
};
|
|
208
260
|
/**
|
|
209
261
|
* Request parameters for detailBrokerageAuthorization operation in ConnectionsApi.
|
|
210
262
|
* @export
|
|
@@ -381,6 +433,15 @@ export type ConnectionsApiSessionEventsRequest = {
|
|
|
381
433
|
* @extends {BaseAPI}
|
|
382
434
|
*/
|
|
383
435
|
export declare class ConnectionsApiGenerated extends BaseAPI {
|
|
436
|
+
/**
|
|
437
|
+
* Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is asynchronous, a 200 response indicates that a task has been queued to delete the connection. Listen for the [`CONNECTION_DELETED` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-connection_deleted) webhook to know when the deletion has been completed and the data has been removed.
|
|
438
|
+
* @summary Delete connection
|
|
439
|
+
* @param {ConnectionsApiDeleteConnectionRequest} requestParameters Request parameters.
|
|
440
|
+
* @param {*} [options] Override http request option.
|
|
441
|
+
* @throws {RequiredError}
|
|
442
|
+
* @memberof ConnectionsApiGenerated
|
|
443
|
+
*/
|
|
444
|
+
deleteConnection(requestParameters: ConnectionsApiDeleteConnectionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DeleteConnectionConfirmation, any>>;
|
|
384
445
|
/**
|
|
385
446
|
* Returns a single connection for the specified ID.
|
|
386
447
|
* @summary Get connection detail
|
|
@@ -35,6 +35,61 @@ const requestBeforeHook_1 = require("../requestBeforeHook");
|
|
|
35
35
|
*/
|
|
36
36
|
const ConnectionsApiAxiosParamCreator = function (configuration) {
|
|
37
37
|
return {
|
|
38
|
+
/**
|
|
39
|
+
* Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is asynchronous, a 200 response indicates that a task has been queued to delete the connection. Listen for the [`CONNECTION_DELETED` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-connection_deleted) webhook to know when the deletion has been completed and the data has been removed.
|
|
40
|
+
* @summary Delete connection
|
|
41
|
+
* @param {string} connectionId
|
|
42
|
+
* @param {string} userId
|
|
43
|
+
* @param {string} userSecret
|
|
44
|
+
* @param {*} [options] Override http request option.
|
|
45
|
+
* @throws {RequiredError}
|
|
46
|
+
*/
|
|
47
|
+
deleteConnection: (connectionId, userId, userSecret, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
// verify required parameter 'connectionId' is not null or undefined
|
|
49
|
+
(0, common_1.assertParamExists)('deleteConnection', 'connectionId', connectionId);
|
|
50
|
+
// verify required parameter 'userId' is not null or undefined
|
|
51
|
+
(0, common_1.assertParamExists)('deleteConnection', 'userId', userId);
|
|
52
|
+
// verify required parameter 'userSecret' is not null or undefined
|
|
53
|
+
(0, common_1.assertParamExists)('deleteConnection', 'userSecret', userSecret);
|
|
54
|
+
const localVarPath = `/connection/{connectionId}`
|
|
55
|
+
.replace(`{${"connectionId"}}`, encodeURIComponent(String(connectionId !== undefined ? connectionId : `-connectionId-`)));
|
|
56
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
57
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
58
|
+
let baseOptions;
|
|
59
|
+
if (configuration) {
|
|
60
|
+
baseOptions = configuration.baseOptions;
|
|
61
|
+
}
|
|
62
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
63
|
+
const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
|
|
64
|
+
const localVarQueryParameter = {};
|
|
65
|
+
// authentication PartnerClientId required
|
|
66
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
|
|
67
|
+
// authentication PartnerSignature required
|
|
68
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
|
|
69
|
+
// authentication PartnerTimestamp required
|
|
70
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
|
|
71
|
+
if (userId !== undefined) {
|
|
72
|
+
localVarQueryParameter['userId'] = userId;
|
|
73
|
+
}
|
|
74
|
+
if (userSecret !== undefined) {
|
|
75
|
+
localVarQueryParameter['userSecret'] = userSecret;
|
|
76
|
+
}
|
|
77
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
78
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
79
|
+
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
80
|
+
queryParameters: localVarQueryParameter,
|
|
81
|
+
requestConfig: localVarRequestOptions,
|
|
82
|
+
path: localVarPath,
|
|
83
|
+
configuration,
|
|
84
|
+
pathTemplate: '/connection/{connectionId}',
|
|
85
|
+
httpMethod: 'DELETE'
|
|
86
|
+
});
|
|
87
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
88
|
+
return {
|
|
89
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
90
|
+
options: localVarRequestOptions,
|
|
91
|
+
};
|
|
92
|
+
}),
|
|
38
93
|
/**
|
|
39
94
|
* Returns a single connection for the specified ID.
|
|
40
95
|
* @summary Get connection detail
|
|
@@ -424,6 +479,19 @@ exports.ConnectionsApiAxiosParamCreator = ConnectionsApiAxiosParamCreator;
|
|
|
424
479
|
const ConnectionsApiFp = function (configuration) {
|
|
425
480
|
const localVarAxiosParamCreator = (0, exports.ConnectionsApiAxiosParamCreator)(configuration);
|
|
426
481
|
return {
|
|
482
|
+
/**
|
|
483
|
+
* Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is asynchronous, a 200 response indicates that a task has been queued to delete the connection. Listen for the [`CONNECTION_DELETED` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-connection_deleted) webhook to know when the deletion has been completed and the data has been removed.
|
|
484
|
+
* @summary Delete connection
|
|
485
|
+
* @param {ConnectionsApiDeleteConnectionRequest} requestParameters Request parameters.
|
|
486
|
+
* @param {*} [options] Override http request option.
|
|
487
|
+
* @throws {RequiredError}
|
|
488
|
+
*/
|
|
489
|
+
deleteConnection(requestParameters, options) {
|
|
490
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
491
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteConnection(requestParameters.connectionId, requestParameters.userId, requestParameters.userSecret, options);
|
|
492
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
493
|
+
});
|
|
494
|
+
},
|
|
427
495
|
/**
|
|
428
496
|
* Returns a single connection for the specified ID.
|
|
429
497
|
* @summary Get connection detail
|
|
@@ -525,6 +593,16 @@ exports.ConnectionsApiFp = ConnectionsApiFp;
|
|
|
525
593
|
const ConnectionsApiFactory = function (configuration, basePath, axios) {
|
|
526
594
|
const localVarFp = (0, exports.ConnectionsApiFp)(configuration);
|
|
527
595
|
return {
|
|
596
|
+
/**
|
|
597
|
+
* Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is asynchronous, a 200 response indicates that a task has been queued to delete the connection. Listen for the [`CONNECTION_DELETED` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-connection_deleted) webhook to know when the deletion has been completed and the data has been removed.
|
|
598
|
+
* @summary Delete connection
|
|
599
|
+
* @param {ConnectionsApiDeleteConnectionRequest} requestParameters Request parameters.
|
|
600
|
+
* @param {*} [options] Override http request option.
|
|
601
|
+
* @throws {RequiredError}
|
|
602
|
+
*/
|
|
603
|
+
deleteConnection(requestParameters, options) {
|
|
604
|
+
return localVarFp.deleteConnection(requestParameters, options).then((request) => request(axios, basePath));
|
|
605
|
+
},
|
|
528
606
|
/**
|
|
529
607
|
* Returns a single connection for the specified ID.
|
|
530
608
|
* @summary Get connection detail
|
|
@@ -605,6 +683,17 @@ exports.ConnectionsApiFactory = ConnectionsApiFactory;
|
|
|
605
683
|
* @extends {BaseAPI}
|
|
606
684
|
*/
|
|
607
685
|
class ConnectionsApiGenerated extends base_1.BaseAPI {
|
|
686
|
+
/**
|
|
687
|
+
* Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is asynchronous, a 200 response indicates that a task has been queued to delete the connection. Listen for the [`CONNECTION_DELETED` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-connection_deleted) webhook to know when the deletion has been completed and the data has been removed.
|
|
688
|
+
* @summary Delete connection
|
|
689
|
+
* @param {ConnectionsApiDeleteConnectionRequest} requestParameters Request parameters.
|
|
690
|
+
* @param {*} [options] Override http request option.
|
|
691
|
+
* @throws {RequiredError}
|
|
692
|
+
* @memberof ConnectionsApiGenerated
|
|
693
|
+
*/
|
|
694
|
+
deleteConnection(requestParameters, options) {
|
|
695
|
+
return (0, exports.ConnectionsApiFp)(this.configuration).deleteConnection(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
696
|
+
}
|
|
608
697
|
/**
|
|
609
698
|
* Returns a single connection for the specified ID.
|
|
610
699
|
* @summary Get connection detail
|