@factset/frontgate-js-sdk 6.9.1 → 6.10.0
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/CHANGELOG.md +24 -0
- package/dist/lib/esnext/FrontgateClient.js +16 -14
- package/dist/lib/esnext/FrontgateClient.js.map +1 -1
- package/dist/lib/esnext/mixins/AuthTokenRequestMixin.js +5 -0
- package/dist/lib/esnext/mixins/AuthTokenRequestMixin.js.map +1 -1
- package/dist/lib/esnext/mixins/PingMixin.js +31 -0
- package/dist/lib/esnext/mixins/PingMixin.js.map +1 -0
- package/dist/lib/esnext/mixins/auth/index.js +1 -0
- package/dist/lib/esnext/mixins/auth/index.js.map +1 -1
- package/dist/lib/esnext/mixins/index.js +1 -0
- package/dist/lib/esnext/mixins/index.js.map +1 -1
- package/dist/lib/esnext/version.js +1 -1
- package/dist/lib/esnext/version.js.map +1 -1
- package/dist/lib/node/FrontgateClient.js +16 -14
- package/dist/lib/node/FrontgateClient.js.map +1 -1
- package/dist/lib/node/mixins/AuthTokenRequestMixin.js +5 -0
- package/dist/lib/node/mixins/AuthTokenRequestMixin.js.map +1 -1
- package/dist/lib/node/mixins/PingMixin.js +35 -0
- package/dist/lib/node/mixins/PingMixin.js.map +1 -0
- package/dist/lib/node/mixins/auth/index.js +1 -0
- package/dist/lib/node/mixins/auth/index.js.map +1 -1
- package/dist/lib/node/mixins/index.js +1 -0
- package/dist/lib/node/mixins/index.js.map +1 -1
- package/dist/lib/node/version.js +1 -1
- package/dist/lib/node/version.js.map +1 -1
- package/dist/lib/types/mixins/AuthTokenRequestMixin.d.ts +3 -0
- package/dist/lib/types/mixins/PingMixin.d.ts +17 -0
- package/dist/lib/types/mixins/index.d.ts +2 -1
- package/dist/lib/umd/mdg2.client.min.umd.js +5 -5
- package/dist/lib/umd/mdg2.client.umd.js +53 -16
- package/package.json +1 -1
|
@@ -2298,7 +2298,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
2298
2298
|
function isSubscriptionLossMessage(response) {
|
|
2299
2299
|
return response.name === "Foundation::SubscriptionLossMessage";
|
|
2300
2300
|
}
|
|
2301
|
-
const PACKAGE_JSON = { version: "6.
|
|
2301
|
+
const PACKAGE_JSON = { version: "6.10.0", package: "@factset/frontgate-js-sdk" };
|
|
2302
2302
|
function getClientInformation() {
|
|
2303
2303
|
const navigator2 = getNavigator();
|
|
2304
2304
|
return {
|
|
@@ -3092,6 +3092,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3092
3092
|
const rejectReason = `Request timeout reached (${timeOutInMs} ms) for ${msg.message.Message}`;
|
|
3093
3093
|
return useTimeout(timeOutInMs, rejectReason, promise);
|
|
3094
3094
|
}
|
|
3095
|
+
async requestAuthenticationTokenForCookieTokenAuthentication(lifetimeSeconds = 30, idUser = 0, idApplication = 0, timeOutInMs = this.defaultTimeoutInMs) {
|
|
3096
|
+
const token = await this.requestAuthenticationToken(lifetimeSeconds, idUser, idApplication, timeOutInMs);
|
|
3097
|
+
return new CookieTokenAuthenticationFactors(token.token);
|
|
3098
|
+
}
|
|
3095
3099
|
};
|
|
3096
3100
|
};
|
|
3097
3101
|
return createExtendedMixinFactory(mixinAuthTokenRequestable, {
|
|
@@ -4210,7 +4214,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4210
4214
|
},
|
|
4211
4215
|
setPeerInfo: (peerInfo) => {
|
|
4212
4216
|
base.log(LogLevel.INFO, "Peer info:", peerInfo);
|
|
4213
|
-
}
|
|
4217
|
+
},
|
|
4218
|
+
// Necessary for compatibility with the UserPasswordAuthentication and UserCredentialAuthentication classes which cannot be changed
|
|
4219
|
+
// as long as the old Mdg2Client is still arround.
|
|
4220
|
+
auth: {}
|
|
4214
4221
|
};
|
|
4215
4222
|
};
|
|
4216
4223
|
const reconnect = () => {
|
|
@@ -5447,6 +5454,33 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5447
5454
|
featureGroups: ["Misc"]
|
|
5448
5455
|
});
|
|
5449
5456
|
};
|
|
5457
|
+
const pingRequests = () => {
|
|
5458
|
+
const mixinPingable = (Base) => {
|
|
5459
|
+
return class extends Base {
|
|
5460
|
+
async ping(timeOutInMs = this.defaultTimeoutInMs) {
|
|
5461
|
+
const request = new PingRequest();
|
|
5462
|
+
const msg = {
|
|
5463
|
+
message: request.getPtlMessage(),
|
|
5464
|
+
callbackType: "response",
|
|
5465
|
+
callbackId: "PingResponse"
|
|
5466
|
+
};
|
|
5467
|
+
await this.hooks.callHook("frontgateConnection:sendMessage", msg);
|
|
5468
|
+
const promise = new Promise((resolve) => {
|
|
5469
|
+
this.hooks.hookOnce(`frontgateConnection:response:${msg.callbackId}`, (response) => {
|
|
5470
|
+
const pong = new PingResponse(response);
|
|
5471
|
+
resolve(pong);
|
|
5472
|
+
});
|
|
5473
|
+
});
|
|
5474
|
+
const rejectReason = `Request timeout reached (${timeOutInMs} ms) for ${msg.message.Message}`;
|
|
5475
|
+
return useTimeout(timeOutInMs, rejectReason, promise);
|
|
5476
|
+
}
|
|
5477
|
+
};
|
|
5478
|
+
};
|
|
5479
|
+
return createExtendedMixinFactory(mixinPingable, {
|
|
5480
|
+
featureName: "Pingable",
|
|
5481
|
+
featureGroups: ["Misc"]
|
|
5482
|
+
});
|
|
5483
|
+
};
|
|
5450
5484
|
const createExtendedMixinFactory = (mixinFactory, options) => {
|
|
5451
5485
|
const extendedMixinFactory = mixinFactory;
|
|
5452
5486
|
extendedMixinFactory.featureName = options.featureName;
|
|
@@ -8701,22 +8735,24 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
8701
8735
|
if (!featureName) {
|
|
8702
8736
|
throw new Error("Feature name is missing");
|
|
8703
8737
|
}
|
|
8704
|
-
|
|
8705
|
-
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
8709
|
-
|
|
8738
|
+
if (featureName !== "Custom") {
|
|
8739
|
+
__privateMethod(this, _FrontgateClientBuilder_instances, assertFeatureNotUsed_fn).call(this, featureName);
|
|
8740
|
+
__privateMethod(this, _FrontgateClientBuilder_instances, assertFeatureNotDisabled_fn).call(this, featureName);
|
|
8741
|
+
__privateGet(this, _alreadyUsedMethods).push(featureName);
|
|
8742
|
+
if (featureGroups && featureGroups.length > 0) {
|
|
8743
|
+
for (const featureGroup of featureGroups) {
|
|
8744
|
+
__privateMethod(this, _FrontgateClientBuilder_instances, assertGroupNotDisabled_fn).call(this, featureGroup);
|
|
8745
|
+
}
|
|
8710
8746
|
}
|
|
8711
|
-
|
|
8712
|
-
|
|
8713
|
-
|
|
8714
|
-
|
|
8747
|
+
if (disabledFeatures && disabledFeatures.length > 0) {
|
|
8748
|
+
for (const disabledFeature of disabledFeatures) {
|
|
8749
|
+
__privateMethod(this, _FrontgateClientBuilder_instances, addDisabledFeature_fn).call(this, featureName, disabledFeature);
|
|
8750
|
+
}
|
|
8715
8751
|
}
|
|
8716
|
-
|
|
8717
|
-
|
|
8718
|
-
|
|
8719
|
-
|
|
8752
|
+
if (disabledFeatureGroups && disabledFeatureGroups.length > 0) {
|
|
8753
|
+
for (const disabledFeatureGroup of disabledFeatureGroups) {
|
|
8754
|
+
__privateMethod(this, _FrontgateClientBuilder_instances, addDisabledGroup_fn).call(this, featureName, disabledFeatureGroup);
|
|
8755
|
+
}
|
|
8720
8756
|
}
|
|
8721
8757
|
}
|
|
8722
8758
|
const MixedConstructor = mixinFactory(__privateGet(this, _clientConstructor));
|
|
@@ -8851,6 +8887,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
8851
8887
|
exports2.objectFromFetchHeaders = objectFromFetchHeaders;
|
|
8852
8888
|
exports2.openTelemetry = openTelemetry;
|
|
8853
8889
|
exports2.parseConnectionConfiguration = parseConnectionConfiguration;
|
|
8890
|
+
exports2.pingRequests = pingRequests;
|
|
8854
8891
|
exports2.rawSubscriptions = rawSubscriptions;
|
|
8855
8892
|
exports2.reconnect = reconnect;
|
|
8856
8893
|
exports2.requests = requests;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@factset/frontgate-js-sdk",
|
|
3
3
|
"author": "Factset GmbH",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.10.0",
|
|
5
5
|
"description": "Typescript based client to request and subscribe values from mdg2 (frontgate)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "./dist/lib/node/index.js",
|