snaptrade-typescript-sdk 12.2.5 → 12.2.7

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/dist/index.cjs CHANGED
@@ -491,7 +491,7 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
491
491
  };
492
492
  },
493
493
  /**
494
- * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
494
+ * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
495
495
  * @summary List all account positions
496
496
  * @param {string} accountId
497
497
  * @param {string} [userId]
@@ -1288,7 +1288,7 @@ const AccountInformationApiFp = function(configuration) {
1288
1288
  });
1289
1289
  },
1290
1290
  /**
1291
- * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1291
+ * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1292
1292
  * @summary List all account positions
1293
1293
  * @param {AccountInformationApiGetAllAccountPositionsRequest<TAuth>} requestParameters Request parameters.
1294
1294
  * @param {*} [options] Override http request option.
@@ -1549,7 +1549,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$8)
1549
1549
  return localVarFp.getAccountBalanceHistory(...args).then((request) => request(axios$8, basePath));
1550
1550
  },
1551
1551
  /**
1552
- * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1552
+ * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1553
1553
  * @summary List all account positions
1554
1554
  * @param {AccountInformationApiGetAllAccountPositionsRequest<TAuth>} requestParameters Request parameters.
1555
1555
  * @param {*} [options] Override http request option.
@@ -1681,7 +1681,7 @@ var AccountInformationApiGenerated = class extends BaseAPI {
1681
1681
  return AccountInformationApiFp(this.configuration).getAccountBalanceHistory(...args).then((request) => request(this.axios, this.basePath));
1682
1682
  }
1683
1683
  /**
1684
- * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1684
+ * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1685
1685
  * @summary List all account positions
1686
1686
  * @param {AccountInformationApiGetAllAccountPositionsRequest<TAuth>} requestParameters Request parameters.
1687
1687
  * @param {*} [options] Override http request option.
@@ -2823,6 +2823,79 @@ const ConnectionsApiAxiosParamCreator = function(configuration) {
2823
2823
  };
2824
2824
  },
2825
2825
  /**
2826
+ * Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape. Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
2827
+ * @summary List accounts for a connection (discriminated union)
2828
+ * @param {string} connectionId
2829
+ * @param {string} [userId]
2830
+ * @param {string} [userSecret]
2831
+ * @param {*} [options] Override http request option.
2832
+ * @throws {RequiredError}
2833
+ */
2834
+ listConnectionAccounts: async (connectionId, userId, userSecret, options = {}) => {
2835
+ assertParamExists("listConnectionAccounts", "connectionId", connectionId);
2836
+ const localVarPath = `/connections/{connectionId}/accounts`.replace(`{connectionId}`, encodeURIComponent(String(connectionId !== void 0 ? connectionId : `-connectionId-`)));
2837
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2838
+ let baseOptions;
2839
+ if (configuration) baseOptions = configuration.baseOptions;
2840
+ const localVarRequestOptions = {
2841
+ method: "GET",
2842
+ ...baseOptions,
2843
+ ...options
2844
+ };
2845
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
2846
+ const localVarQueryParameter = {};
2847
+ if (configuration?.authMode === "commercialApiKey") {
2848
+ await setApiKeyToObject({
2849
+ object: localVarQueryParameter,
2850
+ key: "clientId",
2851
+ keyParamName: "clientId",
2852
+ configuration
2853
+ });
2854
+ if (userId !== void 0) localVarQueryParameter["userId"] = userId;
2855
+ if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
2856
+ }
2857
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
2858
+ object: localVarQueryParameter,
2859
+ key: "clientId",
2860
+ keyParamName: "clientId",
2861
+ configuration
2862
+ });
2863
+ const localVarOperationAuth = {
2864
+ authModes: ["commercialApiKey", "personalApiKey"],
2865
+ requestSigningByAuthMode: {
2866
+ "commercialApiKey": {
2867
+ secretParameter: "consumerKey",
2868
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
2869
+ },
2870
+ "personalApiKey": {
2871
+ secretParameter: "consumerKey",
2872
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
2873
+ }
2874
+ },
2875
+ selectedAuthMode: configuration?.authMode
2876
+ };
2877
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2878
+ localVarRequestOptions.headers = {
2879
+ ...localVarHeaderParameter,
2880
+ ...headersFromBaseOptions,
2881
+ ...options.headers
2882
+ };
2883
+ requestBeforeHook({
2884
+ queryParameters: localVarQueryParameter,
2885
+ requestConfig: localVarRequestOptions,
2886
+ path: localVarPath,
2887
+ configuration,
2888
+ pathTemplate: "/connections/{connectionId}/accounts",
2889
+ httpMethod: "GET",
2890
+ operationAuth: localVarOperationAuth
2891
+ });
2892
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2893
+ return {
2894
+ url: toPathString(localVarUrlObj),
2895
+ options: localVarRequestOptions
2896
+ };
2897
+ },
2898
+ /**
2826
2899
  * Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)** **Please note this endpoint is disabled for Real-time plans (Personal and Pay as you go) unless SnapTrade uses delayed data for the connection. Real-time connections do not benefit from this feature since data is refreshed when calls are made. Refer to `data_freshness_mode.snaptrade` on a connection to determine this.**
2827
2900
  * @summary Refresh holdings for a connection
2828
2901
  * @param {string} authorizationId
@@ -3168,6 +3241,29 @@ const ConnectionsApiFp = function(configuration) {
3168
3241
  });
3169
3242
  },
3170
3243
  /**
3244
+ * Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape. Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
3245
+ * @summary List accounts for a connection (discriminated union)
3246
+ * @param {ConnectionsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
3247
+ * @param {*} [options] Override http request option.
3248
+ * @throws {RequiredError}
3249
+ */
3250
+ async listConnectionAccounts(...args) {
3251
+ const [requestParameters = {}, options] = args;
3252
+ return createRequestFunction(await localVarAxiosParamCreator.listConnectionAccounts(requestParameters.connectionId, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
3253
+ authModes: ["commercialApiKey", "personalApiKey"],
3254
+ requestSigningByAuthMode: {
3255
+ "commercialApiKey": {
3256
+ secretParameter: "consumerKey",
3257
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
3258
+ },
3259
+ "personalApiKey": {
3260
+ secretParameter: "consumerKey",
3261
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
3262
+ }
3263
+ }
3264
+ });
3265
+ },
3266
+ /**
3171
3267
  * Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)** **Please note this endpoint is disabled for Real-time plans (Personal and Pay as you go) unless SnapTrade uses delayed data for the connection. Real-time connections do not benefit from this feature since data is refreshed when calls are made. Refer to `data_freshness_mode.snaptrade` on a connection to determine this.**
3172
3268
  * @summary Refresh holdings for a connection
3173
3269
  * @param {ConnectionsApiRefreshBrokerageAuthorizationRequest<TAuth>} requestParameters Request parameters.
@@ -3296,6 +3392,16 @@ const ConnectionsApiFactory = function(configuration, basePath, axios$5) {
3296
3392
  return localVarFp.listBrokerageAuthorizations(...args).then((request) => request(axios$5, basePath));
3297
3393
  },
3298
3394
  /**
3395
+ * Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape. Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
3396
+ * @summary List accounts for a connection (discriminated union)
3397
+ * @param {ConnectionsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
3398
+ * @param {*} [options] Override http request option.
3399
+ * @throws {RequiredError}
3400
+ */
3401
+ listConnectionAccounts(...args) {
3402
+ return localVarFp.listConnectionAccounts(...args).then((request) => request(axios$5, basePath));
3403
+ },
3404
+ /**
3299
3405
  * Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)** **Please note this endpoint is disabled for Real-time plans (Personal and Pay as you go) unless SnapTrade uses delayed data for the connection. Real-time connections do not benefit from this feature since data is refreshed when calls are made. Refer to `data_freshness_mode.snaptrade` on a connection to determine this.**
3300
3406
  * @summary Refresh holdings for a connection
3301
3407
  * @param {ConnectionsApiRefreshBrokerageAuthorizationRequest<TAuth>} requestParameters Request parameters.
@@ -3390,6 +3496,17 @@ var ConnectionsApiGenerated = class extends BaseAPI {
3390
3496
  return ConnectionsApiFp(this.configuration).listBrokerageAuthorizations(...args).then((request) => request(this.axios, this.basePath));
3391
3497
  }
3392
3498
  /**
3499
+ * Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape. Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
3500
+ * @summary List accounts for a connection (discriminated union)
3501
+ * @param {ConnectionsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
3502
+ * @param {*} [options] Override http request option.
3503
+ * @throws {RequiredError}
3504
+ * @memberof ConnectionsApiGenerated
3505
+ */
3506
+ listConnectionAccounts(...args) {
3507
+ return ConnectionsApiFp(this.configuration).listConnectionAccounts(...args).then((request) => request(this.axios, this.basePath));
3508
+ }
3509
+ /**
3393
3510
  * Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)** **Please note this endpoint is disabled for Real-time plans (Personal and Pay as you go) unless SnapTrade uses delayed data for the connection. Real-time connections do not benefit from this feature since data is refreshed when calls are made. Refer to `data_freshness_mode.snaptrade` on a connection to determine this.**
3394
3511
  * @summary Refresh holdings for a connection
3395
3512
  * @param {ConnectionsApiRefreshBrokerageAuthorizationRequest<TAuth>} requestParameters Request parameters.
@@ -3808,79 +3925,6 @@ const ExperimentalEndpointsApiAxiosParamCreator = function(configuration) {
3808
3925
  };
3809
3926
  },
3810
3927
  /**
3811
- * Experimental and subject to change without notice. Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape. Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
3812
- * @summary List accounts for a connection (discriminated union)
3813
- * @param {string} connectionId
3814
- * @param {string} [userId]
3815
- * @param {string} [userSecret]
3816
- * @param {*} [options] Override http request option.
3817
- * @throws {RequiredError}
3818
- */
3819
- listConnectionAccounts: async (connectionId, userId, userSecret, options = {}) => {
3820
- assertParamExists("listConnectionAccounts", "connectionId", connectionId);
3821
- const localVarPath = `/connections/{connectionId}/accounts`.replace(`{connectionId}`, encodeURIComponent(String(connectionId !== void 0 ? connectionId : `-connectionId-`)));
3822
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3823
- let baseOptions;
3824
- if (configuration) baseOptions = configuration.baseOptions;
3825
- const localVarRequestOptions = {
3826
- method: "GET",
3827
- ...baseOptions,
3828
- ...options
3829
- };
3830
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
3831
- const localVarQueryParameter = {};
3832
- if (configuration?.authMode === "commercialApiKey") {
3833
- await setApiKeyToObject({
3834
- object: localVarQueryParameter,
3835
- key: "clientId",
3836
- keyParamName: "clientId",
3837
- configuration
3838
- });
3839
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
3840
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
3841
- }
3842
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
3843
- object: localVarQueryParameter,
3844
- key: "clientId",
3845
- keyParamName: "clientId",
3846
- configuration
3847
- });
3848
- const localVarOperationAuth = {
3849
- authModes: ["commercialApiKey", "personalApiKey"],
3850
- requestSigningByAuthMode: {
3851
- "commercialApiKey": {
3852
- secretParameter: "consumerKey",
3853
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
3854
- },
3855
- "personalApiKey": {
3856
- secretParameter: "consumerKey",
3857
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
3858
- }
3859
- },
3860
- selectedAuthMode: configuration?.authMode
3861
- };
3862
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3863
- localVarRequestOptions.headers = {
3864
- ...localVarHeaderParameter,
3865
- ...headersFromBaseOptions,
3866
- ...options.headers
3867
- };
3868
- requestBeforeHook({
3869
- queryParameters: localVarQueryParameter,
3870
- requestConfig: localVarRequestOptions,
3871
- path: localVarPath,
3872
- configuration,
3873
- pathTemplate: "/connections/{connectionId}/accounts",
3874
- httpMethod: "GET",
3875
- operationAuth: localVarOperationAuth
3876
- });
3877
- setSearchParams(localVarUrlObj, localVarQueryParameter);
3878
- return {
3879
- url: toPathString(localVarUrlObj),
3880
- options: localVarRequestOptions
3881
- };
3882
- },
3883
- /**
3884
3928
  * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
3885
3929
  * @summary List active Trade Detection subscriptions
3886
3930
  * @param {*} [options] Override http request option.
@@ -4075,29 +4119,6 @@ const ExperimentalEndpointsApiFp = function(configuration) {
4075
4119
  });
4076
4120
  },
4077
4121
  /**
4078
- * Experimental and subject to change without notice. Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape. Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
4079
- * @summary List accounts for a connection (discriminated union)
4080
- * @param {ExperimentalEndpointsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
4081
- * @param {*} [options] Override http request option.
4082
- * @throws {RequiredError}
4083
- */
4084
- async listConnectionAccounts(...args) {
4085
- const [requestParameters = {}, options] = args;
4086
- return createRequestFunction(await localVarAxiosParamCreator.listConnectionAccounts(requestParameters.connectionId, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
4087
- authModes: ["commercialApiKey", "personalApiKey"],
4088
- requestSigningByAuthMode: {
4089
- "commercialApiKey": {
4090
- secretParameter: "consumerKey",
4091
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4092
- },
4093
- "personalApiKey": {
4094
- secretParameter: "consumerKey",
4095
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4096
- }
4097
- }
4098
- });
4099
- },
4100
- /**
4101
4122
  * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
4102
4123
  * @summary List active Trade Detection subscriptions
4103
4124
  * @param {*} [options] Override http request option.
@@ -4179,16 +4200,6 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
4179
4200
  return localVarFp.getUserAccountRecentOrdersV2(...args).then((request) => request(axios$4, basePath));
4180
4201
  },
4181
4202
  /**
4182
- * Experimental and subject to change without notice. Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape. Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
4183
- * @summary List accounts for a connection (discriminated union)
4184
- * @param {ExperimentalEndpointsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
4185
- * @param {*} [options] Override http request option.
4186
- * @throws {RequiredError}
4187
- */
4188
- listConnectionAccounts(...args) {
4189
- return localVarFp.listConnectionAccounts(...args).then((request) => request(axios$4, basePath));
4190
- },
4191
- /**
4192
4203
  * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
4193
4204
  * @summary List active Trade Detection subscriptions
4194
4205
  * @param {*} [options] Override http request option.
@@ -4262,17 +4273,6 @@ var ExperimentalEndpointsApiGenerated = class extends BaseAPI {
4262
4273
  return ExperimentalEndpointsApiFp(this.configuration).getUserAccountRecentOrdersV2(...args).then((request) => request(this.axios, this.basePath));
4263
4274
  }
4264
4275
  /**
4265
- * Experimental and subject to change without notice. Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape. Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
4266
- * @summary List accounts for a connection (discriminated union)
4267
- * @param {ExperimentalEndpointsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
4268
- * @param {*} [options] Override http request option.
4269
- * @throws {RequiredError}
4270
- * @memberof ExperimentalEndpointsApiGenerated
4271
- */
4272
- listConnectionAccounts(...args) {
4273
- return ExperimentalEndpointsApiFp(this.configuration).listConnectionAccounts(...args).then((request) => request(this.axios, this.basePath));
4274
- }
4275
- /**
4276
4276
  * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
4277
4277
  * @summary List active Trade Detection subscriptions
4278
4278
  * @param {*} [options] Override http request option.
@@ -7080,7 +7080,7 @@ var Configuration = class {
7080
7080
  }
7081
7081
  this.basePath = param.basePath;
7082
7082
  this.baseOptions = param.baseOptions ?? {};
7083
- this.userAgent = param.userAgent === void 0 ? "Konfig/12.2.5/typescript" : param.userAgent;
7083
+ this.userAgent = param.userAgent === void 0 ? "Konfig/12.2.7/typescript" : param.userAgent;
7084
7084
  this.formDataCtor = param.formDataCtor;
7085
7085
  }
7086
7086
  /**