gd-sprest 9.5.3 → 9.5.5

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.
@@ -837,8 +837,11 @@ var _ContextInfo = /** @class */ (function () {
837
837
  this._worker = (0, webWorker_1.WebWorker)(function () {
838
838
  // Refresh the REST API token
839
839
  refreshREST();
840
- // Refresh the Graph API token
841
- refreshGraph();
840
+ // Ensure this is SPO
841
+ if (_this.isSPO) {
842
+ // Refresh the Graph API token
843
+ refreshGraph();
844
+ }
842
845
  }, 1000);
843
846
  // Start the process
844
847
  this._worker.start();
@@ -877,8 +880,8 @@ var _ContextInfo = /** @class */ (function () {
877
880
  _ContextInfo._worker = null;
878
881
  _ContextInfo._onRefresh = [];
879
882
  // Value in minutes to refresh the token
880
- // Default is 5 minutes prior to it expiring
881
- _ContextInfo._refreshToken = 5;
883
+ // Default is 15 minutes prior to it expiring
884
+ _ContextInfo._refreshToken = 15;
882
885
  return _ContextInfo;
883
886
  }());
884
887
  exports.ContextInfo = _ContextInfo;
package/build/rest.js CHANGED
@@ -9,7 +9,7 @@ var sptypes_1 = require("./sptypes");
9
9
  * SharePoint REST Library
10
10
  */
11
11
  exports.$REST = {
12
- __ver: 9.53,
12
+ __ver: 9.55,
13
13
  AppContext: function (siteUrl) { return Lib.Site.getAppContext(siteUrl); },
14
14
  Apps: Lib.Apps,
15
15
  ContextInfo: Lib.ContextInfo,
@@ -66,7 +66,7 @@ exports.Helper = {
66
66
  // Copy the target information
67
67
  targetInfo = Object.create(base.targetInfo);
68
68
  // See if this is a graph request and an id exists for the parent
69
- if (base["@odata.etag"] && base["id"]) {
69
+ if ((base["@odata.etag"] || base.parent["@odata.context"]) && base["id"]) {
70
70
  // Append the id
71
71
  targetInfo.endpoint += "/" + base["id"];
72
72
  }