snaptrade-typescript-sdk 13.1.4 → 13.1.6

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
@@ -4760,74 +4760,143 @@ var ExperimentalEndpointsApi = class extends ExperimentalEndpointsApiGenerated {
4760
4760
  * @export
4761
4761
  */
4762
4762
  const ManagementApiAxiosParamCreator = function(configuration) {
4763
- return {
4764
- /**
4765
- * Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated.
4766
- * @summary Get usage stats
4767
- * @param {string} [currency] ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
4768
- * @param {*} [options] Override http request option.
4769
- * @throws {RequiredError}
4770
- */
4771
- getStats: async (currency, options = {}) => {
4772
- const localVarPath = `/snapTrade/stats`;
4773
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4774
- let baseOptions;
4775
- if (configuration) baseOptions = configuration.baseOptions;
4776
- const localVarRequestOptions = {
4777
- method: "GET",
4778
- ...baseOptions,
4779
- ...options
4780
- };
4781
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
4782
- const localVarQueryParameter = {};
4783
- if (configuration?.authMode === "commercialApiKey") await setApiKeyToObject({
4784
- object: localVarQueryParameter,
4785
- key: "clientId",
4786
- keyParamName: "clientId",
4787
- configuration
4788
- });
4789
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4790
- object: localVarQueryParameter,
4791
- key: "clientId",
4792
- keyParamName: "clientId",
4793
- configuration
4794
- });
4795
- if (currency !== void 0) localVarQueryParameter["currency"] = currency;
4796
- const localVarOperationAuth = {
4797
- authModes: ["commercialApiKey", "personalApiKey"],
4798
- requestSigningByAuthMode: {
4799
- "commercialApiKey": {
4800
- secretParameter: "consumerKey",
4801
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4763
+ return {
4764
+ /**
4765
+ * **Beta.** This endpoint and its response schema may change. Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `connected_assets_calculated_at` indicates when it was last calculated.
4766
+ * @summary Get usage stats (beta)
4767
+ * @param {string} [currency] ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
4768
+ * @param {*} [options] Override http request option.
4769
+ * @throws {RequiredError}
4770
+ */
4771
+ getStats: async (currency, options = {}) => {
4772
+ const localVarPath = `/management/stats`;
4773
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4774
+ let baseOptions;
4775
+ if (configuration) baseOptions = configuration.baseOptions;
4776
+ const localVarRequestOptions = {
4777
+ method: "GET",
4778
+ ...baseOptions,
4779
+ ...options
4780
+ };
4781
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
4782
+ const localVarQueryParameter = {};
4783
+ if (configuration?.authMode === "commercialApiKey") await setApiKeyToObject({
4784
+ object: localVarQueryParameter,
4785
+ key: "clientId",
4786
+ keyParamName: "clientId",
4787
+ configuration
4788
+ });
4789
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4790
+ object: localVarQueryParameter,
4791
+ key: "clientId",
4792
+ keyParamName: "clientId",
4793
+ configuration
4794
+ });
4795
+ if (currency !== void 0) localVarQueryParameter["currency"] = currency;
4796
+ const localVarOperationAuth = {
4797
+ authModes: ["commercialApiKey", "personalApiKey"],
4798
+ requestSigningByAuthMode: {
4799
+ "commercialApiKey": {
4800
+ secretParameter: "consumerKey",
4801
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4802
+ },
4803
+ "personalApiKey": {
4804
+ secretParameter: "consumerKey",
4805
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4806
+ }
4802
4807
  },
4803
- "personalApiKey": {
4804
- secretParameter: "consumerKey",
4805
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4806
- }
4807
- },
4808
- selectedAuthMode: configuration?.authMode
4809
- };
4810
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4811
- localVarRequestOptions.headers = {
4812
- ...localVarHeaderParameter,
4813
- ...headersFromBaseOptions,
4814
- ...options.headers
4815
- };
4816
- requestBeforeHook({
4817
- queryParameters: localVarQueryParameter,
4818
- requestConfig: localVarRequestOptions,
4819
- path: localVarPath,
4820
- configuration,
4821
- pathTemplate: "/snapTrade/stats",
4822
- httpMethod: "GET",
4823
- operationAuth: localVarOperationAuth
4824
- });
4825
- setSearchParams(localVarUrlObj, localVarQueryParameter);
4826
- return {
4827
- url: toPathString(localVarUrlObj),
4828
- options: localVarRequestOptions
4829
- };
4830
- } };
4808
+ selectedAuthMode: configuration?.authMode
4809
+ };
4810
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4811
+ localVarRequestOptions.headers = {
4812
+ ...localVarHeaderParameter,
4813
+ ...headersFromBaseOptions,
4814
+ ...options.headers
4815
+ };
4816
+ requestBeforeHook({
4817
+ queryParameters: localVarQueryParameter,
4818
+ requestConfig: localVarRequestOptions,
4819
+ path: localVarPath,
4820
+ configuration,
4821
+ pathTemplate: "/management/stats",
4822
+ httpMethod: "GET",
4823
+ operationAuth: localVarOperationAuth
4824
+ });
4825
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4826
+ return {
4827
+ url: toPathString(localVarUrlObj),
4828
+ options: localVarRequestOptions
4829
+ };
4830
+ },
4831
+ /**
4832
+ * **Deprecated.** Use `GET /management/stats` for the beta response with connected asset field names. Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated.
4833
+ * @summary Get usage stats (deprecated)
4834
+ * @param {string} [currency] ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
4835
+ * @param {*} [options] Override http request option.
4836
+ * @deprecated
4837
+ * @throws {RequiredError}
4838
+ */
4839
+ getStatsLegacy: async (currency, options = {}) => {
4840
+ const localVarPath = `/snapTrade/stats`;
4841
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4842
+ let baseOptions;
4843
+ if (configuration) baseOptions = configuration.baseOptions;
4844
+ const localVarRequestOptions = {
4845
+ method: "GET",
4846
+ ...baseOptions,
4847
+ ...options
4848
+ };
4849
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
4850
+ const localVarQueryParameter = {};
4851
+ if (configuration?.authMode === "commercialApiKey") await setApiKeyToObject({
4852
+ object: localVarQueryParameter,
4853
+ key: "clientId",
4854
+ keyParamName: "clientId",
4855
+ configuration
4856
+ });
4857
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4858
+ object: localVarQueryParameter,
4859
+ key: "clientId",
4860
+ keyParamName: "clientId",
4861
+ configuration
4862
+ });
4863
+ if (currency !== void 0) localVarQueryParameter["currency"] = currency;
4864
+ const localVarOperationAuth = {
4865
+ authModes: ["commercialApiKey", "personalApiKey"],
4866
+ requestSigningByAuthMode: {
4867
+ "commercialApiKey": {
4868
+ secretParameter: "consumerKey",
4869
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4870
+ },
4871
+ "personalApiKey": {
4872
+ secretParameter: "consumerKey",
4873
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4874
+ }
4875
+ },
4876
+ selectedAuthMode: configuration?.authMode
4877
+ };
4878
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4879
+ localVarRequestOptions.headers = {
4880
+ ...localVarHeaderParameter,
4881
+ ...headersFromBaseOptions,
4882
+ ...options.headers
4883
+ };
4884
+ requestBeforeHook({
4885
+ queryParameters: localVarQueryParameter,
4886
+ requestConfig: localVarRequestOptions,
4887
+ path: localVarPath,
4888
+ configuration,
4889
+ pathTemplate: "/snapTrade/stats",
4890
+ httpMethod: "GET",
4891
+ operationAuth: localVarOperationAuth
4892
+ });
4893
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4894
+ return {
4895
+ url: toPathString(localVarUrlObj),
4896
+ options: localVarRequestOptions
4897
+ };
4898
+ }
4899
+ };
4831
4900
  };
4832
4901
  /**
4833
4902
  * ManagementApi - functional programming interface
@@ -4835,30 +4904,55 @@ getStats: async (currency, options = {}) => {
4835
4904
  */
4836
4905
  const ManagementApiFp = function(configuration) {
4837
4906
  const localVarAxiosParamCreator = ManagementApiAxiosParamCreator(configuration);
4838
- return {
4839
- /**
4840
- * Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated.
4841
- * @summary Get usage stats
4842
- * @param {ManagementApiGetStatsRequest<TAuth>} requestParameters Request parameters.
4843
- * @param {*} [options] Override http request option.
4844
- * @throws {RequiredError}
4845
- */
4846
- async getStats(...args) {
4847
- const [requestParameters = {}, options] = args;
4848
- return createRequestFunction(await localVarAxiosParamCreator.getStats(requestParameters.currency, options), globalAxios, BASE_PATH, configuration, {
4849
- authModes: ["commercialApiKey", "personalApiKey"],
4850
- requestSigningByAuthMode: {
4851
- "commercialApiKey": {
4852
- secretParameter: "consumerKey",
4853
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4854
- },
4855
- "personalApiKey": {
4856
- secretParameter: "consumerKey",
4857
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4907
+ return {
4908
+ /**
4909
+ * **Beta.** This endpoint and its response schema may change. Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `connected_assets_calculated_at` indicates when it was last calculated.
4910
+ * @summary Get usage stats (beta)
4911
+ * @param {ManagementApiGetStatsRequest<TAuth>} requestParameters Request parameters.
4912
+ * @param {*} [options] Override http request option.
4913
+ * @throws {RequiredError}
4914
+ */
4915
+ async getStats(...args) {
4916
+ const [requestParameters = {}, options] = args;
4917
+ return createRequestFunction(await localVarAxiosParamCreator.getStats(requestParameters.currency, options), globalAxios, BASE_PATH, configuration, {
4918
+ authModes: ["commercialApiKey", "personalApiKey"],
4919
+ requestSigningByAuthMode: {
4920
+ "commercialApiKey": {
4921
+ secretParameter: "consumerKey",
4922
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4923
+ },
4924
+ "personalApiKey": {
4925
+ secretParameter: "consumerKey",
4926
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4927
+ }
4858
4928
  }
4859
- }
4860
- });
4861
- } };
4929
+ });
4930
+ },
4931
+ /**
4932
+ * **Deprecated.** Use `GET /management/stats` for the beta response with connected asset field names. Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated.
4933
+ * @summary Get usage stats (deprecated)
4934
+ * @param {ManagementApiGetStatsLegacyRequest<TAuth>} requestParameters Request parameters.
4935
+ * @param {*} [options] Override http request option.
4936
+ * @deprecated
4937
+ * @throws {RequiredError}
4938
+ */
4939
+ async getStatsLegacy(...args) {
4940
+ const [requestParameters = {}, options] = args;
4941
+ return createRequestFunction(await localVarAxiosParamCreator.getStatsLegacy(requestParameters.currency, options), globalAxios, BASE_PATH, configuration, {
4942
+ authModes: ["commercialApiKey", "personalApiKey"],
4943
+ requestSigningByAuthMode: {
4944
+ "commercialApiKey": {
4945
+ secretParameter: "consumerKey",
4946
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4947
+ },
4948
+ "personalApiKey": {
4949
+ secretParameter: "consumerKey",
4950
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4951
+ }
4952
+ }
4953
+ });
4954
+ }
4955
+ };
4862
4956
  };
4863
4957
  /**
4864
4958
  * ManagementApi - factory interface
@@ -4866,17 +4960,29 @@ async getStats(...args) {
4866
4960
  */
4867
4961
  const ManagementApiFactory = function(configuration, basePath, axios) {
4868
4962
  const localVarFp = ManagementApiFp(configuration);
4869
- return {
4870
- /**
4871
- * Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated.
4872
- * @summary Get usage stats
4873
- * @param {ManagementApiGetStatsRequest<TAuth>} requestParameters Request parameters.
4874
- * @param {*} [options] Override http request option.
4875
- * @throws {RequiredError}
4876
- */
4877
- getStats(...args) {
4878
- return localVarFp.getStats(...args).then((request) => request(axios, basePath));
4879
- } };
4963
+ return {
4964
+ /**
4965
+ * **Beta.** This endpoint and its response schema may change. Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `connected_assets_calculated_at` indicates when it was last calculated.
4966
+ * @summary Get usage stats (beta)
4967
+ * @param {ManagementApiGetStatsRequest<TAuth>} requestParameters Request parameters.
4968
+ * @param {*} [options] Override http request option.
4969
+ * @throws {RequiredError}
4970
+ */
4971
+ getStats(...args) {
4972
+ return localVarFp.getStats(...args).then((request) => request(axios, basePath));
4973
+ },
4974
+ /**
4975
+ * **Deprecated.** Use `GET /management/stats` for the beta response with connected asset field names. Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated.
4976
+ * @summary Get usage stats (deprecated)
4977
+ * @param {ManagementApiGetStatsLegacyRequest<TAuth>} requestParameters Request parameters.
4978
+ * @param {*} [options] Override http request option.
4979
+ * @deprecated
4980
+ * @throws {RequiredError}
4981
+ */
4982
+ getStatsLegacy(...args) {
4983
+ return localVarFp.getStatsLegacy(...args).then((request) => request(axios, basePath));
4984
+ }
4985
+ };
4880
4986
  };
4881
4987
  /**
4882
4988
  * ManagementApiGenerated - object-oriented interface
@@ -4886,8 +4992,8 @@ getStats(...args) {
4886
4992
  */
4887
4993
  var ManagementApiGenerated = class extends BaseAPI {
4888
4994
  /**
4889
- * Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated.
4890
- * @summary Get usage stats
4995
+ * **Beta.** This endpoint and its response schema may change. Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `connected_assets_calculated_at` indicates when it was last calculated.
4996
+ * @summary Get usage stats (beta)
4891
4997
  * @param {ManagementApiGetStatsRequest<TAuth>} requestParameters Request parameters.
4892
4998
  * @param {*} [options] Override http request option.
4893
4999
  * @throws {RequiredError}
@@ -4896,6 +5002,18 @@ var ManagementApiGenerated = class extends BaseAPI {
4896
5002
  getStats(...args) {
4897
5003
  return ManagementApiFp(this.configuration).getStats(...args).then((request) => request(this.axios, this.basePath));
4898
5004
  }
5005
+ /**
5006
+ * **Deprecated.** Use `GET /management/stats` for the beta response with connected asset field names. Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated.
5007
+ * @summary Get usage stats (deprecated)
5008
+ * @param {ManagementApiGetStatsLegacyRequest<TAuth>} requestParameters Request parameters.
5009
+ * @param {*} [options] Override http request option.
5010
+ * @deprecated
5011
+ * @throws {RequiredError}
5012
+ * @memberof ManagementApiGenerated
5013
+ */
5014
+ getStatsLegacy(...args) {
5015
+ return ManagementApiFp(this.configuration).getStatsLegacy(...args).then((request) => request(this.axios, this.basePath));
5016
+ }
4899
5017
  };
4900
5018
  //#endregion
4901
5019
  //#region api/management-api.ts
@@ -7765,7 +7883,7 @@ var Configuration = class {
7765
7883
  }
7766
7884
  this.basePath = param.basePath;
7767
7885
  this.baseOptions = param.baseOptions ?? {};
7768
- this.userAgent = param.userAgent === void 0 ? "Konfig/13.1.4/typescript" : param.userAgent;
7886
+ this.userAgent = param.userAgent === void 0 ? "Konfig/13.1.6/typescript" : param.userAgent;
7769
7887
  this.formDataCtor = param.formDataCtor;
7770
7888
  }
7771
7889
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snaptrade-typescript-sdk",
3
- "version": "13.1.4",
3
+ "version": "13.1.6",
4
4
  "description": "Client for SnapTrade",
5
5
  "author": "Konfig",
6
6
  "engines": {
@@ -50,6 +50,7 @@
50
50
  "axios": "1.20.0"
51
51
  },
52
52
  "resolutions": {
53
+ "follow-redirects": "^1.16.1",
53
54
  "semver": "^7.5.2",
54
55
  "@babel/traverse": "^7.23.2"
55
56
  },