snaptrade-typescript-sdk 13.1.5 → 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.cjs CHANGED
@@ -4784,74 +4784,143 @@ var ExperimentalEndpointsApi = class extends ExperimentalEndpointsApiGenerated {
4784
4784
  * @export
4785
4785
  */
4786
4786
  const ManagementApiAxiosParamCreator = function(configuration) {
4787
- return {
4788
- /**
4789
- * 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.
4790
- * @summary Get usage stats
4791
- * @param {string} [currency] ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
4792
- * @param {*} [options] Override http request option.
4793
- * @throws {RequiredError}
4794
- */
4795
- getStats: async (currency, options = {}) => {
4796
- const localVarPath = `/snapTrade/stats`;
4797
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4798
- let baseOptions;
4799
- if (configuration) baseOptions = configuration.baseOptions;
4800
- const localVarRequestOptions = {
4801
- method: "GET",
4802
- ...baseOptions,
4803
- ...options
4804
- };
4805
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
4806
- const localVarQueryParameter = {};
4807
- if (configuration?.authMode === "commercialApiKey") await setApiKeyToObject({
4808
- object: localVarQueryParameter,
4809
- key: "clientId",
4810
- keyParamName: "clientId",
4811
- configuration
4812
- });
4813
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4814
- object: localVarQueryParameter,
4815
- key: "clientId",
4816
- keyParamName: "clientId",
4817
- configuration
4818
- });
4819
- if (currency !== void 0) localVarQueryParameter["currency"] = currency;
4820
- const localVarOperationAuth = {
4821
- authModes: ["commercialApiKey", "personalApiKey"],
4822
- requestSigningByAuthMode: {
4823
- "commercialApiKey": {
4824
- secretParameter: "consumerKey",
4825
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4787
+ return {
4788
+ /**
4789
+ * **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.
4790
+ * @summary Get usage stats (beta)
4791
+ * @param {string} [currency] ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
4792
+ * @param {*} [options] Override http request option.
4793
+ * @throws {RequiredError}
4794
+ */
4795
+ getStats: async (currency, options = {}) => {
4796
+ const localVarPath = `/management/stats`;
4797
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4798
+ let baseOptions;
4799
+ if (configuration) baseOptions = configuration.baseOptions;
4800
+ const localVarRequestOptions = {
4801
+ method: "GET",
4802
+ ...baseOptions,
4803
+ ...options
4804
+ };
4805
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
4806
+ const localVarQueryParameter = {};
4807
+ if (configuration?.authMode === "commercialApiKey") await setApiKeyToObject({
4808
+ object: localVarQueryParameter,
4809
+ key: "clientId",
4810
+ keyParamName: "clientId",
4811
+ configuration
4812
+ });
4813
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4814
+ object: localVarQueryParameter,
4815
+ key: "clientId",
4816
+ keyParamName: "clientId",
4817
+ configuration
4818
+ });
4819
+ if (currency !== void 0) localVarQueryParameter["currency"] = currency;
4820
+ const localVarOperationAuth = {
4821
+ authModes: ["commercialApiKey", "personalApiKey"],
4822
+ requestSigningByAuthMode: {
4823
+ "commercialApiKey": {
4824
+ secretParameter: "consumerKey",
4825
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4826
+ },
4827
+ "personalApiKey": {
4828
+ secretParameter: "consumerKey",
4829
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4830
+ }
4826
4831
  },
4827
- "personalApiKey": {
4828
- secretParameter: "consumerKey",
4829
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4830
- }
4831
- },
4832
- selectedAuthMode: configuration?.authMode
4833
- };
4834
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4835
- localVarRequestOptions.headers = {
4836
- ...localVarHeaderParameter,
4837
- ...headersFromBaseOptions,
4838
- ...options.headers
4839
- };
4840
- requestBeforeHook({
4841
- queryParameters: localVarQueryParameter,
4842
- requestConfig: localVarRequestOptions,
4843
- path: localVarPath,
4844
- configuration,
4845
- pathTemplate: "/snapTrade/stats",
4846
- httpMethod: "GET",
4847
- operationAuth: localVarOperationAuth
4848
- });
4849
- setSearchParams(localVarUrlObj, localVarQueryParameter);
4850
- return {
4851
- url: toPathString(localVarUrlObj),
4852
- options: localVarRequestOptions
4853
- };
4854
- } };
4832
+ selectedAuthMode: configuration?.authMode
4833
+ };
4834
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4835
+ localVarRequestOptions.headers = {
4836
+ ...localVarHeaderParameter,
4837
+ ...headersFromBaseOptions,
4838
+ ...options.headers
4839
+ };
4840
+ requestBeforeHook({
4841
+ queryParameters: localVarQueryParameter,
4842
+ requestConfig: localVarRequestOptions,
4843
+ path: localVarPath,
4844
+ configuration,
4845
+ pathTemplate: "/management/stats",
4846
+ httpMethod: "GET",
4847
+ operationAuth: localVarOperationAuth
4848
+ });
4849
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4850
+ return {
4851
+ url: toPathString(localVarUrlObj),
4852
+ options: localVarRequestOptions
4853
+ };
4854
+ },
4855
+ /**
4856
+ * **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.
4857
+ * @summary Get usage stats (deprecated)
4858
+ * @param {string} [currency] ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
4859
+ * @param {*} [options] Override http request option.
4860
+ * @deprecated
4861
+ * @throws {RequiredError}
4862
+ */
4863
+ getStatsLegacy: async (currency, options = {}) => {
4864
+ const localVarPath = `/snapTrade/stats`;
4865
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4866
+ let baseOptions;
4867
+ if (configuration) baseOptions = configuration.baseOptions;
4868
+ const localVarRequestOptions = {
4869
+ method: "GET",
4870
+ ...baseOptions,
4871
+ ...options
4872
+ };
4873
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
4874
+ const localVarQueryParameter = {};
4875
+ if (configuration?.authMode === "commercialApiKey") await setApiKeyToObject({
4876
+ object: localVarQueryParameter,
4877
+ key: "clientId",
4878
+ keyParamName: "clientId",
4879
+ configuration
4880
+ });
4881
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4882
+ object: localVarQueryParameter,
4883
+ key: "clientId",
4884
+ keyParamName: "clientId",
4885
+ configuration
4886
+ });
4887
+ if (currency !== void 0) localVarQueryParameter["currency"] = currency;
4888
+ const localVarOperationAuth = {
4889
+ authModes: ["commercialApiKey", "personalApiKey"],
4890
+ requestSigningByAuthMode: {
4891
+ "commercialApiKey": {
4892
+ secretParameter: "consumerKey",
4893
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4894
+ },
4895
+ "personalApiKey": {
4896
+ secretParameter: "consumerKey",
4897
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4898
+ }
4899
+ },
4900
+ selectedAuthMode: configuration?.authMode
4901
+ };
4902
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4903
+ localVarRequestOptions.headers = {
4904
+ ...localVarHeaderParameter,
4905
+ ...headersFromBaseOptions,
4906
+ ...options.headers
4907
+ };
4908
+ requestBeforeHook({
4909
+ queryParameters: localVarQueryParameter,
4910
+ requestConfig: localVarRequestOptions,
4911
+ path: localVarPath,
4912
+ configuration,
4913
+ pathTemplate: "/snapTrade/stats",
4914
+ httpMethod: "GET",
4915
+ operationAuth: localVarOperationAuth
4916
+ });
4917
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4918
+ return {
4919
+ url: toPathString(localVarUrlObj),
4920
+ options: localVarRequestOptions
4921
+ };
4922
+ }
4923
+ };
4855
4924
  };
4856
4925
  /**
4857
4926
  * ManagementApi - functional programming interface
@@ -4859,30 +4928,55 @@ getStats: async (currency, options = {}) => {
4859
4928
  */
4860
4929
  const ManagementApiFp = function(configuration) {
4861
4930
  const localVarAxiosParamCreator = ManagementApiAxiosParamCreator(configuration);
4862
- return {
4863
- /**
4864
- * 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.
4865
- * @summary Get usage stats
4866
- * @param {ManagementApiGetStatsRequest<TAuth>} requestParameters Request parameters.
4867
- * @param {*} [options] Override http request option.
4868
- * @throws {RequiredError}
4869
- */
4870
- async getStats(...args) {
4871
- const [requestParameters = {}, options] = args;
4872
- return createRequestFunction(await localVarAxiosParamCreator.getStats(requestParameters.currency, options), axios.default, BASE_PATH, configuration, {
4873
- authModes: ["commercialApiKey", "personalApiKey"],
4874
- requestSigningByAuthMode: {
4875
- "commercialApiKey": {
4876
- secretParameter: "consumerKey",
4877
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4878
- },
4879
- "personalApiKey": {
4880
- secretParameter: "consumerKey",
4881
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4931
+ return {
4932
+ /**
4933
+ * **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.
4934
+ * @summary Get usage stats (beta)
4935
+ * @param {ManagementApiGetStatsRequest<TAuth>} requestParameters Request parameters.
4936
+ * @param {*} [options] Override http request option.
4937
+ * @throws {RequiredError}
4938
+ */
4939
+ async getStats(...args) {
4940
+ const [requestParameters = {}, options] = args;
4941
+ return createRequestFunction(await localVarAxiosParamCreator.getStats(requestParameters.currency, options), axios.default, 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
+ }
4882
4952
  }
4883
- }
4884
- });
4885
- } };
4953
+ });
4954
+ },
4955
+ /**
4956
+ * **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.
4957
+ * @summary Get usage stats (deprecated)
4958
+ * @param {ManagementApiGetStatsLegacyRequest<TAuth>} requestParameters Request parameters.
4959
+ * @param {*} [options] Override http request option.
4960
+ * @deprecated
4961
+ * @throws {RequiredError}
4962
+ */
4963
+ async getStatsLegacy(...args) {
4964
+ const [requestParameters = {}, options] = args;
4965
+ return createRequestFunction(await localVarAxiosParamCreator.getStatsLegacy(requestParameters.currency, options), axios.default, BASE_PATH, configuration, {
4966
+ authModes: ["commercialApiKey", "personalApiKey"],
4967
+ requestSigningByAuthMode: {
4968
+ "commercialApiKey": {
4969
+ secretParameter: "consumerKey",
4970
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4971
+ },
4972
+ "personalApiKey": {
4973
+ secretParameter: "consumerKey",
4974
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4975
+ }
4976
+ }
4977
+ });
4978
+ }
4979
+ };
4886
4980
  };
4887
4981
  /**
4888
4982
  * ManagementApi - factory interface
@@ -4890,17 +4984,29 @@ async getStats(...args) {
4890
4984
  */
4891
4985
  const ManagementApiFactory = function(configuration, basePath, axios$4) {
4892
4986
  const localVarFp = ManagementApiFp(configuration);
4893
- return {
4894
- /**
4895
- * 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.
4896
- * @summary Get usage stats
4897
- * @param {ManagementApiGetStatsRequest<TAuth>} requestParameters Request parameters.
4898
- * @param {*} [options] Override http request option.
4899
- * @throws {RequiredError}
4900
- */
4901
- getStats(...args) {
4902
- return localVarFp.getStats(...args).then((request) => request(axios$4, basePath));
4903
- } };
4987
+ return {
4988
+ /**
4989
+ * **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.
4990
+ * @summary Get usage stats (beta)
4991
+ * @param {ManagementApiGetStatsRequest<TAuth>} requestParameters Request parameters.
4992
+ * @param {*} [options] Override http request option.
4993
+ * @throws {RequiredError}
4994
+ */
4995
+ getStats(...args) {
4996
+ return localVarFp.getStats(...args).then((request) => request(axios$4, basePath));
4997
+ },
4998
+ /**
4999
+ * **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.
5000
+ * @summary Get usage stats (deprecated)
5001
+ * @param {ManagementApiGetStatsLegacyRequest<TAuth>} requestParameters Request parameters.
5002
+ * @param {*} [options] Override http request option.
5003
+ * @deprecated
5004
+ * @throws {RequiredError}
5005
+ */
5006
+ getStatsLegacy(...args) {
5007
+ return localVarFp.getStatsLegacy(...args).then((request) => request(axios$4, basePath));
5008
+ }
5009
+ };
4904
5010
  };
4905
5011
  /**
4906
5012
  * ManagementApiGenerated - object-oriented interface
@@ -4910,8 +5016,8 @@ getStats(...args) {
4910
5016
  */
4911
5017
  var ManagementApiGenerated = class extends BaseAPI {
4912
5018
  /**
4913
- * 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.
4914
- * @summary Get usage stats
5019
+ * **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.
5020
+ * @summary Get usage stats (beta)
4915
5021
  * @param {ManagementApiGetStatsRequest<TAuth>} requestParameters Request parameters.
4916
5022
  * @param {*} [options] Override http request option.
4917
5023
  * @throws {RequiredError}
@@ -4920,6 +5026,18 @@ var ManagementApiGenerated = class extends BaseAPI {
4920
5026
  getStats(...args) {
4921
5027
  return ManagementApiFp(this.configuration).getStats(...args).then((request) => request(this.axios, this.basePath));
4922
5028
  }
5029
+ /**
5030
+ * **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.
5031
+ * @summary Get usage stats (deprecated)
5032
+ * @param {ManagementApiGetStatsLegacyRequest<TAuth>} requestParameters Request parameters.
5033
+ * @param {*} [options] Override http request option.
5034
+ * @deprecated
5035
+ * @throws {RequiredError}
5036
+ * @memberof ManagementApiGenerated
5037
+ */
5038
+ getStatsLegacy(...args) {
5039
+ return ManagementApiFp(this.configuration).getStatsLegacy(...args).then((request) => request(this.axios, this.basePath));
5040
+ }
4923
5041
  };
4924
5042
  //#endregion
4925
5043
  //#region api/management-api.ts
@@ -7789,7 +7907,7 @@ var Configuration = class {
7789
7907
  }
7790
7908
  this.basePath = param.basePath;
7791
7909
  this.baseOptions = param.baseOptions ?? {};
7792
- this.userAgent = param.userAgent === void 0 ? "Konfig/13.1.5/typescript" : param.userAgent;
7910
+ this.userAgent = param.userAgent === void 0 ? "Konfig/13.1.6/typescript" : param.userAgent;
7793
7911
  this.formDataCtor = param.formDataCtor;
7794
7912
  }
7795
7913
  /**