gd-sprest 9.6.9 → 9.7.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.
@@ -86,6 +86,9 @@ export interface ITargetInfoProps {
86
86
  /** The request type. */
87
87
  requestType?: number;
88
88
 
89
+ /** The property that contains the request response. */
90
+ returnProp?: string;
91
+
89
92
  /** The url of the site/web to execute the request against. */
90
93
  url?: string;
91
94
  }
@@ -3796,6 +3796,7 @@ exports.Mapper = {
3796
3796
  },
3797
3797
  validateGroupName: {
3798
3798
  argNames: ["displayName", "alias"],
3799
+ returnProp: "ValidateGroupName"
3799
3800
  },
3800
3801
  },
3801
3802
  "SP.Directory.Group": {
@@ -5315,6 +5316,7 @@ exports.Mapper = {
5315
5316
  getUserEffectivePermissions: {
5316
5317
  argNames: ["userName"],
5317
5318
  name: "getUserEffectivePermissions(@user)?@user='[[userName]]'",
5319
+ returnProp: "GetUserEffectivePermissions",
5318
5320
  requestType: utils_1.RequestType.GetReplace
5319
5321
  },
5320
5322
  getView: {
@@ -5552,6 +5554,7 @@ exports.Mapper = {
5552
5554
  getUserEffectivePermissions: {
5553
5555
  argNames: ["userName"],
5554
5556
  name: "getUserEffectivePermissions(@user)?@user='[[userName]]'",
5557
+ returnProp: "GetUserEffectivePermissions",
5555
5558
  requestType: utils_1.RequestType.GetReplace
5556
5559
  },
5557
5560
  getVersionById: {
@@ -8521,6 +8524,7 @@ exports.Mapper = {
8521
8524
  getUserEffectivePermissions: {
8522
8525
  argNames: ["userName"],
8523
8526
  name: "getUserEffectivePermissions(@user)?@user='[[userName]]'",
8527
+ returnProp: "GetUserEffectivePermissions",
8524
8528
  requestType: utils_1.RequestType.GetReplace
8525
8529
  },
8526
8530
  getViewFromPath: {
@@ -9012,6 +9016,7 @@ exports.Mapper = {
9012
9016
  getUserEffectivePermissions: {
9013
9017
  argNames: ["userName"],
9014
9018
  name: "getUserEffectivePermissions(@user)?@user='[[userName]]'",
9019
+ returnProp: "GetUserEffectivePermissions",
9015
9020
  requestType: utils_1.RequestType.GetReplace
9016
9021
  },
9017
9022
  getVersionById: {
@@ -91,6 +91,7 @@ exports.Helper = {
91
91
  targetInfo.method = methodInfo.requestMethod;
92
92
  targetInfo.requestDigest = typeof (targetInfo.requestDigest) === "undefined" && base.base && base.base.targetInfo.requestDigest ? base.base.targetInfo.requestDigest : targetInfo.requestDigest;
93
93
  targetInfo.requestType = methodConfig.requestType;
94
+ targetInfo.returnProp = methodConfig.returnProp;
94
95
  // See if we are appending the endpoint
95
96
  if (methodInfo.appendEndpointFl) {
96
97
  // Append to the endpoint
@@ -217,6 +217,13 @@ exports.Request = {
217
217
  }
218
218
  }
219
219
  }
220
+ // See if a return property was set and value exists
221
+ if (base.targetInfo.returnProp && data[base.targetInfo.returnProp]) {
222
+ // Parse the data properties
223
+ for (var key in data[base.targetInfo.returnProp]) {
224
+ base[key] = data[base.targetInfo.returnProp][key];
225
+ }
226
+ }
220
227
  },
221
228
  // Method to execute the request
222
229
  execute: function (base, args) {
@@ -7707,6 +7707,9 @@ declare module 'gd-sprest/utils/targetInfo' {
7707
7707
  /** The request type. */
7708
7708
  requestType?: number;
7709
7709
 
7710
+ /** The property that contains the request response. */
7711
+ returnProp?: string;
7712
+
7710
7713
  /** The url of the site/web to execute the request against. */
7711
7714
  url?: string;
7712
7715
  }