@factset/frontgate-js-sdk 6.9.3 → 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.
@@ -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.9.3", package: "@factset/frontgate-js-sdk" };
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, {
@@ -5450,6 +5454,33 @@ var __privateWrapper = (obj, member, setter, getter) => ({
5450
5454
  featureGroups: ["Misc"]
5451
5455
  });
5452
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
+ };
5453
5484
  const createExtendedMixinFactory = (mixinFactory, options) => {
5454
5485
  const extendedMixinFactory = mixinFactory;
5455
5486
  extendedMixinFactory.featureName = options.featureName;
@@ -8704,22 +8735,24 @@ var __privateWrapper = (obj, member, setter, getter) => ({
8704
8735
  if (!featureName) {
8705
8736
  throw new Error("Feature name is missing");
8706
8737
  }
8707
- __privateMethod(this, _FrontgateClientBuilder_instances, assertFeatureNotUsed_fn).call(this, featureName);
8708
- __privateMethod(this, _FrontgateClientBuilder_instances, assertFeatureNotDisabled_fn).call(this, featureName);
8709
- __privateGet(this, _alreadyUsedMethods).push(featureName);
8710
- if (featureGroups && featureGroups.length > 0) {
8711
- for (const featureGroup of featureGroups) {
8712
- __privateMethod(this, _FrontgateClientBuilder_instances, assertGroupNotDisabled_fn).call(this, featureGroup);
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
+ }
8713
8746
  }
8714
- }
8715
- if (disabledFeatures && disabledFeatures.length > 0) {
8716
- for (const disabledFeature of disabledFeatures) {
8717
- __privateMethod(this, _FrontgateClientBuilder_instances, addDisabledFeature_fn).call(this, featureName, disabledFeature);
8747
+ if (disabledFeatures && disabledFeatures.length > 0) {
8748
+ for (const disabledFeature of disabledFeatures) {
8749
+ __privateMethod(this, _FrontgateClientBuilder_instances, addDisabledFeature_fn).call(this, featureName, disabledFeature);
8750
+ }
8718
8751
  }
8719
- }
8720
- if (disabledFeatureGroups && disabledFeatureGroups.length > 0) {
8721
- for (const disabledFeatureGroup of disabledFeatureGroups) {
8722
- __privateMethod(this, _FrontgateClientBuilder_instances, addDisabledGroup_fn).call(this, featureName, disabledFeatureGroup);
8752
+ if (disabledFeatureGroups && disabledFeatureGroups.length > 0) {
8753
+ for (const disabledFeatureGroup of disabledFeatureGroups) {
8754
+ __privateMethod(this, _FrontgateClientBuilder_instances, addDisabledGroup_fn).call(this, featureName, disabledFeatureGroup);
8755
+ }
8723
8756
  }
8724
8757
  }
8725
8758
  const MixedConstructor = mixinFactory(__privateGet(this, _clientConstructor));
@@ -8854,6 +8887,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
8854
8887
  exports2.objectFromFetchHeaders = objectFromFetchHeaders;
8855
8888
  exports2.openTelemetry = openTelemetry;
8856
8889
  exports2.parseConnectionConfiguration = parseConnectionConfiguration;
8890
+ exports2.pingRequests = pingRequests;
8857
8891
  exports2.rawSubscriptions = rawSubscriptions;
8858
8892
  exports2.reconnect = reconnect;
8859
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.9.3",
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",