snaptrade-typescript-sdk 13.0.1 → 13.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -1
- package/dist/browser.umd.js +7 -7
- package/dist/index.cjs +199 -46
- package/dist/index.d.cts +274 -61
- package/dist/index.d.mts +274 -61
- package/dist/index.d.ts +274 -61
- package/dist/index.mjs +150 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4637,6 +4637,153 @@ var ExperimentalEndpointsApiGenerated = class extends BaseAPI {
|
|
|
4637
4637
|
//#region api/experimental-endpoints-api.ts
|
|
4638
4638
|
var ExperimentalEndpointsApi = class extends ExperimentalEndpointsApiGenerated {};
|
|
4639
4639
|
//#endregion
|
|
4640
|
+
//#region api/management-api-generated.ts
|
|
4641
|
+
/**
|
|
4642
|
+
* ManagementApi - axios parameter creator
|
|
4643
|
+
* @export
|
|
4644
|
+
*/
|
|
4645
|
+
const ManagementApiAxiosParamCreator = function(configuration) {
|
|
4646
|
+
return {
|
|
4647
|
+
/**
|
|
4648
|
+
* 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.
|
|
4649
|
+
* @summary Get usage stats
|
|
4650
|
+
* @param {string} [currency] ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
|
|
4651
|
+
* @param {*} [options] Override http request option.
|
|
4652
|
+
* @throws {RequiredError}
|
|
4653
|
+
*/
|
|
4654
|
+
getStats: async (currency, options = {}) => {
|
|
4655
|
+
const localVarPath = `/snapTrade/stats`;
|
|
4656
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4657
|
+
let baseOptions;
|
|
4658
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
4659
|
+
const localVarRequestOptions = {
|
|
4660
|
+
method: "GET",
|
|
4661
|
+
...baseOptions,
|
|
4662
|
+
...options
|
|
4663
|
+
};
|
|
4664
|
+
const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
|
|
4665
|
+
const localVarQueryParameter = {};
|
|
4666
|
+
if (configuration?.authMode === "commercialApiKey") await setApiKeyToObject({
|
|
4667
|
+
object: localVarQueryParameter,
|
|
4668
|
+
key: "clientId",
|
|
4669
|
+
keyParamName: "clientId",
|
|
4670
|
+
configuration
|
|
4671
|
+
});
|
|
4672
|
+
if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
|
|
4673
|
+
object: localVarQueryParameter,
|
|
4674
|
+
key: "clientId",
|
|
4675
|
+
keyParamName: "clientId",
|
|
4676
|
+
configuration
|
|
4677
|
+
});
|
|
4678
|
+
if (currency !== void 0) localVarQueryParameter["currency"] = currency;
|
|
4679
|
+
const localVarOperationAuth = {
|
|
4680
|
+
authModes: ["commercialApiKey", "personalApiKey"],
|
|
4681
|
+
requestSigningByAuthMode: {
|
|
4682
|
+
"commercialApiKey": {
|
|
4683
|
+
secretParameter: "consumerKey",
|
|
4684
|
+
signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
|
|
4685
|
+
},
|
|
4686
|
+
"personalApiKey": {
|
|
4687
|
+
secretParameter: "consumerKey",
|
|
4688
|
+
signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
|
|
4689
|
+
}
|
|
4690
|
+
},
|
|
4691
|
+
selectedAuthMode: configuration?.authMode
|
|
4692
|
+
};
|
|
4693
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4694
|
+
localVarRequestOptions.headers = {
|
|
4695
|
+
...localVarHeaderParameter,
|
|
4696
|
+
...headersFromBaseOptions,
|
|
4697
|
+
...options.headers
|
|
4698
|
+
};
|
|
4699
|
+
requestBeforeHook({
|
|
4700
|
+
queryParameters: localVarQueryParameter,
|
|
4701
|
+
requestConfig: localVarRequestOptions,
|
|
4702
|
+
path: localVarPath,
|
|
4703
|
+
configuration,
|
|
4704
|
+
pathTemplate: "/snapTrade/stats",
|
|
4705
|
+
httpMethod: "GET",
|
|
4706
|
+
operationAuth: localVarOperationAuth
|
|
4707
|
+
});
|
|
4708
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4709
|
+
return {
|
|
4710
|
+
url: toPathString(localVarUrlObj),
|
|
4711
|
+
options: localVarRequestOptions
|
|
4712
|
+
};
|
|
4713
|
+
} };
|
|
4714
|
+
};
|
|
4715
|
+
/**
|
|
4716
|
+
* ManagementApi - functional programming interface
|
|
4717
|
+
* @export
|
|
4718
|
+
*/
|
|
4719
|
+
const ManagementApiFp = function(configuration) {
|
|
4720
|
+
const localVarAxiosParamCreator = ManagementApiAxiosParamCreator(configuration);
|
|
4721
|
+
return {
|
|
4722
|
+
/**
|
|
4723
|
+
* 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.
|
|
4724
|
+
* @summary Get usage stats
|
|
4725
|
+
* @param {ManagementApiGetStatsRequest<TAuth>} requestParameters Request parameters.
|
|
4726
|
+
* @param {*} [options] Override http request option.
|
|
4727
|
+
* @throws {RequiredError}
|
|
4728
|
+
*/
|
|
4729
|
+
async getStats(...args) {
|
|
4730
|
+
const [requestParameters = {}, options] = args;
|
|
4731
|
+
return createRequestFunction(await localVarAxiosParamCreator.getStats(requestParameters.currency, options), globalAxios, BASE_PATH, configuration, {
|
|
4732
|
+
authModes: ["commercialApiKey", "personalApiKey"],
|
|
4733
|
+
requestSigningByAuthMode: {
|
|
4734
|
+
"commercialApiKey": {
|
|
4735
|
+
secretParameter: "consumerKey",
|
|
4736
|
+
signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
|
|
4737
|
+
},
|
|
4738
|
+
"personalApiKey": {
|
|
4739
|
+
secretParameter: "consumerKey",
|
|
4740
|
+
signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
|
|
4741
|
+
}
|
|
4742
|
+
}
|
|
4743
|
+
});
|
|
4744
|
+
} };
|
|
4745
|
+
};
|
|
4746
|
+
/**
|
|
4747
|
+
* ManagementApi - factory interface
|
|
4748
|
+
* @export
|
|
4749
|
+
*/
|
|
4750
|
+
const ManagementApiFactory = function(configuration, basePath, axios) {
|
|
4751
|
+
const localVarFp = ManagementApiFp(configuration);
|
|
4752
|
+
return {
|
|
4753
|
+
/**
|
|
4754
|
+
* 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.
|
|
4755
|
+
* @summary Get usage stats
|
|
4756
|
+
* @param {ManagementApiGetStatsRequest<TAuth>} requestParameters Request parameters.
|
|
4757
|
+
* @param {*} [options] Override http request option.
|
|
4758
|
+
* @throws {RequiredError}
|
|
4759
|
+
*/
|
|
4760
|
+
getStats(...args) {
|
|
4761
|
+
return localVarFp.getStats(...args).then((request) => request(axios, basePath));
|
|
4762
|
+
} };
|
|
4763
|
+
};
|
|
4764
|
+
/**
|
|
4765
|
+
* ManagementApiGenerated - object-oriented interface
|
|
4766
|
+
* @export
|
|
4767
|
+
* @class ManagementApiGenerated
|
|
4768
|
+
* @extends {BaseAPI}
|
|
4769
|
+
*/
|
|
4770
|
+
var ManagementApiGenerated = class extends BaseAPI {
|
|
4771
|
+
/**
|
|
4772
|
+
* 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.
|
|
4773
|
+
* @summary Get usage stats
|
|
4774
|
+
* @param {ManagementApiGetStatsRequest<TAuth>} requestParameters Request parameters.
|
|
4775
|
+
* @param {*} [options] Override http request option.
|
|
4776
|
+
* @throws {RequiredError}
|
|
4777
|
+
* @memberof ManagementApiGenerated
|
|
4778
|
+
*/
|
|
4779
|
+
getStats(...args) {
|
|
4780
|
+
return ManagementApiFp(this.configuration).getStats(...args).then((request) => request(this.axios, this.basePath));
|
|
4781
|
+
}
|
|
4782
|
+
};
|
|
4783
|
+
//#endregion
|
|
4784
|
+
//#region api/management-api.ts
|
|
4785
|
+
var ManagementApi = class extends ManagementApiGenerated {};
|
|
4786
|
+
//#endregion
|
|
4640
4787
|
//#region api/reference-data-api-generated.ts
|
|
4641
4788
|
/**
|
|
4642
4789
|
* ReferenceDataApi - axios parameter creator
|
|
@@ -7501,7 +7648,7 @@ var Configuration = class {
|
|
|
7501
7648
|
}
|
|
7502
7649
|
this.basePath = param.basePath;
|
|
7503
7650
|
this.baseOptions = param.baseOptions ?? {};
|
|
7504
|
-
this.userAgent = param.userAgent === void 0 ? "Konfig/13.
|
|
7651
|
+
this.userAgent = param.userAgent === void 0 ? "Konfig/13.1.1/typescript" : param.userAgent;
|
|
7505
7652
|
this.formDataCtor = param.formDataCtor;
|
|
7506
7653
|
}
|
|
7507
7654
|
/**
|
|
@@ -7534,9 +7681,10 @@ var Snaptrade = class extends SnaptradeCustom {
|
|
|
7534
7681
|
this.authentication = new AuthenticationApi(configuration);
|
|
7535
7682
|
this.connections = new ConnectionsApi(configuration);
|
|
7536
7683
|
this.experimentalEndpoints = new ExperimentalEndpointsApi(configuration);
|
|
7684
|
+
this.management = new ManagementApi(configuration);
|
|
7537
7685
|
this.referenceData = new ReferenceDataApi(configuration);
|
|
7538
7686
|
this.trading = new TradingApi(configuration);
|
|
7539
7687
|
}
|
|
7540
7688
|
};
|
|
7541
7689
|
//#endregion
|
|
7542
|
-
export { AccountInformationApi, AccountInformationApiAxiosParamCreator, AccountInformationApiFactory, AccountInformationApiFp, AccountInformationApiGenerated, ApiStatusApi, ApiStatusApiAxiosParamCreator, ApiStatusApiFactory, ApiStatusApiFp, ApiStatusApiGenerated, AuthenticationApi, AuthenticationApiAxiosParamCreator, AuthenticationApiFactory, AuthenticationApiFp, AuthenticationApiGenerated, CommercialApiKeyAuth, Configuration, ConnectionsApi, ConnectionsApiAxiosParamCreator, ConnectionsApiFactory, ConnectionsApiFp, ConnectionsApiGenerated, ExperimentalEndpointsApi, ExperimentalEndpointsApiAxiosParamCreator, ExperimentalEndpointsApiFactory, ExperimentalEndpointsApiFp, ExperimentalEndpointsApiGenerated, PersonalApiKeyAuth, ReferenceDataApi, ReferenceDataApiAxiosParamCreator, ReferenceDataApiFactory, ReferenceDataApiFp, ReferenceDataApiGenerated, Snaptrade, SnaptradeAuth, SnaptradeError, TradingApi, TradingApiAxiosParamCreator, TradingApiFactory, TradingApiFp, TradingApiGenerated, parseIfJson, readableStreamToString };
|
|
7690
|
+
export { AccountInformationApi, AccountInformationApiAxiosParamCreator, AccountInformationApiFactory, AccountInformationApiFp, AccountInformationApiGenerated, ApiStatusApi, ApiStatusApiAxiosParamCreator, ApiStatusApiFactory, ApiStatusApiFp, ApiStatusApiGenerated, AuthenticationApi, AuthenticationApiAxiosParamCreator, AuthenticationApiFactory, AuthenticationApiFp, AuthenticationApiGenerated, CommercialApiKeyAuth, Configuration, ConnectionsApi, ConnectionsApiAxiosParamCreator, ConnectionsApiFactory, ConnectionsApiFp, ConnectionsApiGenerated, ExperimentalEndpointsApi, ExperimentalEndpointsApiAxiosParamCreator, ExperimentalEndpointsApiFactory, ExperimentalEndpointsApiFp, ExperimentalEndpointsApiGenerated, ManagementApi, ManagementApiAxiosParamCreator, ManagementApiFactory, ManagementApiFp, ManagementApiGenerated, PersonalApiKeyAuth, ReferenceDataApi, ReferenceDataApiAxiosParamCreator, ReferenceDataApiFactory, ReferenceDataApiFp, ReferenceDataApiGenerated, Snaptrade, SnaptradeAuth, SnaptradeError, TradingApi, TradingApiAxiosParamCreator, TradingApiFactory, TradingApiFp, TradingApiGenerated, parseIfJson, readableStreamToString };
|