gd-sprest 8.3.5 → 8.3.7

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.
@@ -1398,6 +1398,23 @@ export type IRoleType = {
1398
1398
  WebDesigner: number
1399
1399
  };
1400
1400
 
1401
+ /**
1402
+ * Search Scope
1403
+ */
1404
+ export interface ISearchScope {
1405
+ /* Default behavior for the site */
1406
+ Default: number,
1407
+
1408
+ /* Across all sites in the hub */
1409
+ Hub: number,
1410
+
1411
+ /* The site */
1412
+ Site: number,
1413
+
1414
+ /* Across all sites in the tenant */
1415
+ Tenant: number
1416
+ }
1417
+
1401
1418
  /**
1402
1419
  * Status Pri Color
1403
1420
  */
@@ -35,7 +35,7 @@ exports.Graph.Version = "";
35
35
  // Method to get the graph token from a classic page
36
36
  exports.Graph.getAccessToken = function (resource) {
37
37
  // Set the data
38
- var data = { "resource": resource || sptypes_1.SPTypes.CloudEnvironment.Default };
38
+ var data = { "resource": resource || exports.Graph.Cloud || sptypes_1.SPTypes.CloudEnvironment.Default };
39
39
  // Get the access token
40
40
  return new utils_1.Base({
41
41
  endpoint: "SP.OAuth.Token/Acquire",
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: 8.35,
12
+ __ver: 8.37,
13
13
  AppContext: function (siteUrl) { return Lib.Site.getAppContext(siteUrl); },
14
14
  Apps: Lib.Apps,
15
15
  ContextInfo: Lib.ContextInfo,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebTemplateType = exports.ViewType = exports.UserCustomActionRegistrationType = exports.URLZones = exports.UrlFormatType = exports.StatusPriColor = exports.RoleType = exports.ReorderingRuleMatchType = exports.RenderListDataOptions = exports.RelationshipDeleteBehaviorType = exports.PropertyPaneType = exports.PrincipalTypes = exports.PrincipalSources = exports.PersonalSiteCapabilities = exports.PersonalizationScope = exports.PageType = exports.ModalDialogResult = exports.LocaleLCIDType = exports.ListTemplateType = exports.ListExperienceOptions = exports.FriendlyDateFormat = exports.FormDisplayMode = exports.FileTemplateType = exports.FileLevelType = exports.FieldUserSelectionType = exports.FieldType = exports.FieldResultType = exports.FieldNumberType = exports.FieldNoteType = exports.FieldIndexStatus = exports.EnvironmentType = exports.EventReceiverType = exports.EventReceiverSynchronizationType = exports.DraftVisibilityType = exports.DisplayMode = exports.DateFormat = exports.ControlMode = exports.CloudEnvironment = exports.ClientTemplatesUtility = exports.ClientSidePageLayout = exports.ChoiceFormatType = exports.CheckOutType = exports.CheckInType = exports.CalendarTypes = exports.BasePermissionTypes = void 0;
3
+ exports.WebTemplateType = exports.ViewType = exports.UserCustomActionRegistrationType = exports.URLZones = exports.UrlFormatType = exports.StatusPriColor = exports.SearchScope = exports.RoleType = exports.ReorderingRuleMatchType = exports.RenderListDataOptions = exports.RelationshipDeleteBehaviorType = exports.PropertyPaneType = exports.PrincipalTypes = exports.PrincipalSources = exports.PersonalSiteCapabilities = exports.PersonalizationScope = exports.PageType = exports.ModalDialogResult = exports.LocaleLCIDType = exports.ListTemplateType = exports.ListExperienceOptions = exports.FriendlyDateFormat = exports.FormDisplayMode = exports.FileTemplateType = exports.FileLevelType = exports.FieldUserSelectionType = exports.FieldType = exports.FieldResultType = exports.FieldNumberType = exports.FieldNoteType = exports.FieldIndexStatus = exports.EnvironmentType = exports.EventReceiverType = exports.EventReceiverSynchronizationType = exports.DraftVisibilityType = exports.DisplayMode = exports.DateFormat = exports.ControlMode = exports.CloudEnvironment = exports.ClientTemplatesUtility = exports.ClientSidePageLayout = exports.ChoiceFormatType = exports.CheckOutType = exports.CheckInType = exports.CalendarTypes = exports.BasePermissionTypes = void 0;
4
4
  /**
5
5
  * Base Permission Types
6
6
  */
@@ -726,6 +726,15 @@ exports.RoleType = {
726
726
  Reader: 2,
727
727
  WebDesigner: 4
728
728
  };
729
+ /**
730
+ * Search Scope
731
+ */
732
+ exports.SearchScope = {
733
+ Default: 0,
734
+ Tenant: 1,
735
+ Hub: 2,
736
+ Site: 3
737
+ };
729
738
  /**
730
739
  * Status Pri Color
731
740
  */
@@ -220,7 +220,7 @@ var MethodInfo = /** @class */ (function () {
220
220
  if (this.passDataInBody) {
221
221
  var data = this.methodData || this.methodParams;
222
222
  // Stringify the data to be passed in the body
223
- this.methodData = data ? JSON.stringify(data) : null;
223
+ this.methodData = data ? (typeof (data) === "string" ? data : JSON.stringify(data)) : null;
224
224
  }
225
225
  // See if we are passing the data in the query string as a variable
226
226
  if (this.passDataInQSAsVar) {
@@ -5952,6 +5952,19 @@ declare module 'gd-sprest/sptypes/sptypes' {
5952
5952
  WebDesigner: number
5953
5953
  };
5954
5954
 
5955
+ /**
5956
+ * Search Scope
5957
+ */
5958
+ export interface ISearchScope {
5959
+ Default: number,
5960
+
5961
+ Hub: number,
5962
+
5963
+ Site: number,
5964
+
5965
+ Tenant: number
5966
+ }
5967
+
5955
5968
  /**
5956
5969
  * Status Pri Color
5957
5970
  */