snaptrade-typescript-sdk 12.2.16 → 12.2.17

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.mjs CHANGED
@@ -3674,6 +3674,79 @@ const ExperimentalEndpointsApiAxiosParamCreator = function(configuration) {
3674
3674
  };
3675
3675
  },
3676
3676
  /**
3677
+ * Experimental and subject to change without notice. Returns the specified account for the authenticated user, using the `kind`-discriminated account shape. Use the `kind` discriminator to determine the shape of the account, which can be an investment, deposit, or line of credit account. On Pay as you Go / Real-time, this endpoint refreshes the 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. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
3678
+ * @summary Get account details
3679
+ * @param {string} accountId
3680
+ * @param {string} [userId]
3681
+ * @param {string} [userSecret]
3682
+ * @param {*} [options] Override http request option.
3683
+ * @throws {RequiredError}
3684
+ */
3685
+ getAccountDetails: async (accountId, userId, userSecret, options = {}) => {
3686
+ assertParamExists("getAccountDetails", "accountId", accountId);
3687
+ const localVarPath = `/accounts/{accountId}/details`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`)));
3688
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3689
+ let baseOptions;
3690
+ if (configuration) baseOptions = configuration.baseOptions;
3691
+ const localVarRequestOptions = {
3692
+ method: "GET",
3693
+ ...baseOptions,
3694
+ ...options
3695
+ };
3696
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
3697
+ const localVarQueryParameter = {};
3698
+ if (configuration?.authMode === "commercialApiKey") {
3699
+ await setApiKeyToObject({
3700
+ object: localVarQueryParameter,
3701
+ key: "clientId",
3702
+ keyParamName: "clientId",
3703
+ configuration
3704
+ });
3705
+ if (userId !== void 0) localVarQueryParameter["userId"] = userId;
3706
+ if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
3707
+ }
3708
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
3709
+ object: localVarQueryParameter,
3710
+ key: "clientId",
3711
+ keyParamName: "clientId",
3712
+ configuration
3713
+ });
3714
+ const localVarOperationAuth = {
3715
+ authModes: ["commercialApiKey", "personalApiKey"],
3716
+ requestSigningByAuthMode: {
3717
+ "commercialApiKey": {
3718
+ secretParameter: "consumerKey",
3719
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
3720
+ },
3721
+ "personalApiKey": {
3722
+ secretParameter: "consumerKey",
3723
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
3724
+ }
3725
+ },
3726
+ selectedAuthMode: configuration?.authMode
3727
+ };
3728
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3729
+ localVarRequestOptions.headers = {
3730
+ ...localVarHeaderParameter,
3731
+ ...headersFromBaseOptions,
3732
+ ...options.headers
3733
+ };
3734
+ requestBeforeHook({
3735
+ queryParameters: localVarQueryParameter,
3736
+ requestConfig: localVarRequestOptions,
3737
+ path: localVarPath,
3738
+ configuration,
3739
+ pathTemplate: "/accounts/{accountId}/details",
3740
+ httpMethod: "GET",
3741
+ operationAuth: localVarOperationAuth
3742
+ });
3743
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3744
+ return {
3745
+ url: toPathString(localVarUrlObj),
3746
+ options: localVarRequestOptions
3747
+ };
3748
+ },
3749
+ /**
3677
3750
  * Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
3678
3751
  * @summary Get account order detail (V2)
3679
3752
  * @param {string} accountId
@@ -3901,6 +3974,77 @@ const ExperimentalEndpointsApiAxiosParamCreator = function(configuration) {
3901
3974
  };
3902
3975
  },
3903
3976
  /**
3977
+ * Experimental and subject to change without notice. Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
3978
+ * @summary List all user accounts
3979
+ * @param {string} [userId]
3980
+ * @param {string} [userSecret]
3981
+ * @param {*} [options] Override http request option.
3982
+ * @throws {RequiredError}
3983
+ */
3984
+ listAllUserAccounts: async (userId, userSecret, options = {}) => {
3985
+ const localVarPath = `/accounts/all`;
3986
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3987
+ let baseOptions;
3988
+ if (configuration) baseOptions = configuration.baseOptions;
3989
+ const localVarRequestOptions = {
3990
+ method: "GET",
3991
+ ...baseOptions,
3992
+ ...options
3993
+ };
3994
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
3995
+ const localVarQueryParameter = {};
3996
+ if (configuration?.authMode === "commercialApiKey") {
3997
+ await setApiKeyToObject({
3998
+ object: localVarQueryParameter,
3999
+ key: "clientId",
4000
+ keyParamName: "clientId",
4001
+ configuration
4002
+ });
4003
+ if (userId !== void 0) localVarQueryParameter["userId"] = userId;
4004
+ if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
4005
+ }
4006
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4007
+ object: localVarQueryParameter,
4008
+ key: "clientId",
4009
+ keyParamName: "clientId",
4010
+ configuration
4011
+ });
4012
+ const localVarOperationAuth = {
4013
+ authModes: ["commercialApiKey", "personalApiKey"],
4014
+ requestSigningByAuthMode: {
4015
+ "commercialApiKey": {
4016
+ secretParameter: "consumerKey",
4017
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4018
+ },
4019
+ "personalApiKey": {
4020
+ secretParameter: "consumerKey",
4021
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4022
+ }
4023
+ },
4024
+ selectedAuthMode: configuration?.authMode
4025
+ };
4026
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4027
+ localVarRequestOptions.headers = {
4028
+ ...localVarHeaderParameter,
4029
+ ...headersFromBaseOptions,
4030
+ ...options.headers
4031
+ };
4032
+ requestBeforeHook({
4033
+ queryParameters: localVarQueryParameter,
4034
+ requestConfig: localVarRequestOptions,
4035
+ path: localVarPath,
4036
+ configuration,
4037
+ pathTemplate: "/accounts/all",
4038
+ httpMethod: "GET",
4039
+ operationAuth: localVarOperationAuth
4040
+ });
4041
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4042
+ return {
4043
+ url: toPathString(localVarUrlObj),
4044
+ options: localVarRequestOptions
4045
+ };
4046
+ },
4047
+ /**
3904
4048
  * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
3905
4049
  * @summary List active Trade Detection subscriptions
3906
4050
  * @param {*} [options] Override http request option.
@@ -4026,6 +4170,29 @@ const ExperimentalEndpointsApiFp = function(configuration) {
4026
4170
  });
4027
4171
  },
4028
4172
  /**
4173
+ * Experimental and subject to change without notice. Returns the specified account for the authenticated user, using the `kind`-discriminated account shape. Use the `kind` discriminator to determine the shape of the account, which can be an investment, deposit, or line of credit account. On Pay as you Go / Real-time, this endpoint refreshes the 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. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
4174
+ * @summary Get account details
4175
+ * @param {ExperimentalEndpointsApiGetAccountDetailsRequest<TAuth>} requestParameters Request parameters.
4176
+ * @param {*} [options] Override http request option.
4177
+ * @throws {RequiredError}
4178
+ */
4179
+ async getAccountDetails(...args) {
4180
+ const [requestParameters = {}, options] = args;
4181
+ return createRequestFunction(await localVarAxiosParamCreator.getAccountDetails(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, options), globalAxios, BASE_PATH, configuration, {
4182
+ authModes: ["commercialApiKey", "personalApiKey"],
4183
+ requestSigningByAuthMode: {
4184
+ "commercialApiKey": {
4185
+ secretParameter: "consumerKey",
4186
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4187
+ },
4188
+ "personalApiKey": {
4189
+ secretParameter: "consumerKey",
4190
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4191
+ }
4192
+ }
4193
+ });
4194
+ },
4195
+ /**
4029
4196
  * Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
4030
4197
  * @summary Get account order detail (V2)
4031
4198
  * @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request<TAuth>} requestParameters Request parameters.
@@ -4095,6 +4262,29 @@ const ExperimentalEndpointsApiFp = function(configuration) {
4095
4262
  });
4096
4263
  },
4097
4264
  /**
4265
+ * Experimental and subject to change without notice. Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
4266
+ * @summary List all user accounts
4267
+ * @param {ExperimentalEndpointsApiListAllUserAccountsRequest<TAuth>} requestParameters Request parameters.
4268
+ * @param {*} [options] Override http request option.
4269
+ * @throws {RequiredError}
4270
+ */
4271
+ async listAllUserAccounts(...args) {
4272
+ const [requestParameters = {}, options] = args;
4273
+ return createRequestFunction(await localVarAxiosParamCreator.listAllUserAccounts(requestParameters.userId, requestParameters.userSecret, options), globalAxios, BASE_PATH, configuration, {
4274
+ authModes: ["commercialApiKey", "personalApiKey"],
4275
+ requestSigningByAuthMode: {
4276
+ "commercialApiKey": {
4277
+ secretParameter: "consumerKey",
4278
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4279
+ },
4280
+ "personalApiKey": {
4281
+ secretParameter: "consumerKey",
4282
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4283
+ }
4284
+ }
4285
+ });
4286
+ },
4287
+ /**
4098
4288
  * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
4099
4289
  * @summary List active Trade Detection subscriptions
4100
4290
  * @param {*} [options] Override http request option.
@@ -4146,6 +4336,16 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios)
4146
4336
  return localVarFp.cancelSubscription(...args).then((request) => request(axios, basePath));
4147
4337
  },
4148
4338
  /**
4339
+ * Experimental and subject to change without notice. Returns the specified account for the authenticated user, using the `kind`-discriminated account shape. Use the `kind` discriminator to determine the shape of the account, which can be an investment, deposit, or line of credit account. On Pay as you Go / Real-time, this endpoint refreshes the 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. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
4340
+ * @summary Get account details
4341
+ * @param {ExperimentalEndpointsApiGetAccountDetailsRequest<TAuth>} requestParameters Request parameters.
4342
+ * @param {*} [options] Override http request option.
4343
+ * @throws {RequiredError}
4344
+ */
4345
+ getAccountDetails(...args) {
4346
+ return localVarFp.getAccountDetails(...args).then((request) => request(axios, basePath));
4347
+ },
4348
+ /**
4149
4349
  * Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
4150
4350
  * @summary Get account order detail (V2)
4151
4351
  * @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request<TAuth>} requestParameters Request parameters.
@@ -4176,6 +4376,16 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios)
4176
4376
  return localVarFp.getUserAccountRecentOrdersV2(...args).then((request) => request(axios, basePath));
4177
4377
  },
4178
4378
  /**
4379
+ * Experimental and subject to change without notice. Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
4380
+ * @summary List all user accounts
4381
+ * @param {ExperimentalEndpointsApiListAllUserAccountsRequest<TAuth>} requestParameters Request parameters.
4382
+ * @param {*} [options] Override http request option.
4383
+ * @throws {RequiredError}
4384
+ */
4385
+ listAllUserAccounts(...args) {
4386
+ return localVarFp.listAllUserAccounts(...args).then((request) => request(axios, basePath));
4387
+ },
4388
+ /**
4179
4389
  * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
4180
4390
  * @summary List active Trade Detection subscriptions
4181
4391
  * @param {*} [options] Override http request option.
@@ -4216,6 +4426,17 @@ var ExperimentalEndpointsApiGenerated = class extends BaseAPI {
4216
4426
  return ExperimentalEndpointsApiFp(this.configuration).cancelSubscription(...args).then((request) => request(this.axios, this.basePath));
4217
4427
  }
4218
4428
  /**
4429
+ * Experimental and subject to change without notice. Returns the specified account for the authenticated user, using the `kind`-discriminated account shape. Use the `kind` discriminator to determine the shape of the account, which can be an investment, deposit, or line of credit account. On Pay as you Go / Real-time, this endpoint refreshes the 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. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
4430
+ * @summary Get account details
4431
+ * @param {ExperimentalEndpointsApiGetAccountDetailsRequest<TAuth>} requestParameters Request parameters.
4432
+ * @param {*} [options] Override http request option.
4433
+ * @throws {RequiredError}
4434
+ * @memberof ExperimentalEndpointsApiGenerated
4435
+ */
4436
+ getAccountDetails(...args) {
4437
+ return ExperimentalEndpointsApiFp(this.configuration).getAccountDetails(...args).then((request) => request(this.axios, this.basePath));
4438
+ }
4439
+ /**
4219
4440
  * Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
4220
4441
  * @summary Get account order detail (V2)
4221
4442
  * @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request<TAuth>} requestParameters Request parameters.
@@ -4249,6 +4470,17 @@ var ExperimentalEndpointsApiGenerated = class extends BaseAPI {
4249
4470
  return ExperimentalEndpointsApiFp(this.configuration).getUserAccountRecentOrdersV2(...args).then((request) => request(this.axios, this.basePath));
4250
4471
  }
4251
4472
  /**
4473
+ * Experimental and subject to change without notice. Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
4474
+ * @summary List all user accounts
4475
+ * @param {ExperimentalEndpointsApiListAllUserAccountsRequest<TAuth>} requestParameters Request parameters.
4476
+ * @param {*} [options] Override http request option.
4477
+ * @throws {RequiredError}
4478
+ * @memberof ExperimentalEndpointsApiGenerated
4479
+ */
4480
+ listAllUserAccounts(...args) {
4481
+ return ExperimentalEndpointsApiFp(this.configuration).listAllUserAccounts(...args).then((request) => request(this.axios, this.basePath));
4482
+ }
4483
+ /**
4252
4484
  * Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
4253
4485
  * @summary List active Trade Detection subscriptions
4254
4486
  * @param {*} [options] Override http request option.
@@ -7127,7 +7359,7 @@ var Configuration = class {
7127
7359
  }
7128
7360
  this.basePath = param.basePath;
7129
7361
  this.baseOptions = param.baseOptions ?? {};
7130
- this.userAgent = param.userAgent === void 0 ? "Konfig/12.2.16/typescript" : param.userAgent;
7362
+ this.userAgent = param.userAgent === void 0 ? "Konfig/12.2.17/typescript" : param.userAgent;
7131
7363
  this.formDataCtor = param.formDataCtor;
7132
7364
  }
7133
7365
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snaptrade-typescript-sdk",
3
- "version": "12.2.16",
3
+ "version": "12.2.17",
4
4
  "description": "Client for SnapTrade",
5
5
  "author": "Konfig",
6
6
  "engines": {