gd-sprest 7.7.6 → 7.7.8

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.
@@ -160,6 +160,9 @@ export interface IListFormProps {
160
160
  /** OData query used when loading an item */
161
161
  query?: IODataQuery;
162
162
 
163
+ /** The request digest value to use w/ the requests */
164
+ requestDigest?: string;
165
+
163
166
  /** The relative web url containing the list */
164
167
  webUrl?: string;
165
168
  }
@@ -198,6 +201,9 @@ export interface IListFormResult {
198
201
  /** The list. */
199
202
  list: List;
200
203
 
204
+ /** The request digest value to use w/ the requests */
205
+ requestDigest?: string;
206
+
201
207
  /** The relative web url containing the list. */
202
208
  webUrl?: string;
203
209
  }
@@ -20,7 +20,8 @@ exports.ListForm = {
20
20
  // Clear the information
21
21
  _info = {
22
22
  item: _props.item,
23
- query: _props.query || {}
23
+ query: _props.query || {},
24
+ requestDigest: _props.requestDigest
24
25
  };
25
26
  // Load the list data
26
27
  loadListData().then(
@@ -235,7 +236,7 @@ exports.ListForm = {
235
236
  return;
236
237
  }
237
238
  // Get the web
238
- __1.Web(_props.webUrl, { disableCache: true })
239
+ __1.Web(_props.webUrl, { disableCache: true, requestDigest: _props.requestDigest })
239
240
  // Get the list
240
241
  .Lists(_props.listName)
241
242
  // Execute the request
@@ -383,7 +384,7 @@ exports.ListForm = {
383
384
  var itemId = info.item ? info.item.Id : info.itemId;
384
385
  if (itemId > 0) {
385
386
  // Get the web
386
- __1.Web(info.webUrl)
387
+ __1.Web(info.webUrl, { requestDigest: info.requestDigest })
387
388
  // Get the list
388
389
  .Lists(info.listName)
389
390
  // Get the item
@@ -449,7 +450,7 @@ exports.ListForm = {
449
450
  var attachment = info.attachments[i];
450
451
  if (attachment.FileName == fileName) {
451
452
  // Get the web
452
- __1.Web(info.webUrl)
453
+ __1.Web(info.webUrl, { requestDigest: info.requestDigest })
453
454
  // Get the file
454
455
  .getFileByServerRelativeUrl(attachment.ServerRelativeUrl)
455
456
  // Delete the file
@@ -479,7 +480,7 @@ exports.ListForm = {
479
480
  var itemId = info.item ? info.item.Id : info.itemId;
480
481
  if (itemId > 0) {
481
482
  // Get the web
482
- var attachments = __1.Web(info.webUrl)
483
+ var attachments = __1.Web(info.webUrl, { requestDigest: info.requestDigest })
483
484
  // Get the lists
484
485
  .Lists(info.listName)
485
486
  // Get the item
package/build/rest.js CHANGED
@@ -8,7 +8,7 @@ var sptypes_1 = require("./sptypes");
8
8
  * SharePoint REST Library
9
9
  */
10
10
  exports.$REST = {
11
- __ver: 7.75,
11
+ __ver: 7.78,
12
12
  AppContext: function (siteUrl) { return Lib.Site.getAppContext(siteUrl); },
13
13
  Apps: Lib.Apps,
14
14
  ContextInfo: Lib.ContextInfo,
@@ -2497,6 +2497,9 @@ declare module 'gd-sprest/helper/listForm' {
2497
2497
  /** OData query used when loading an item */
2498
2498
  query?: IODataQuery;
2499
2499
 
2500
+ /** The request digest value to use w/ the requests */
2501
+ requestDigest?: string;
2502
+
2500
2503
  /** The relative web url containing the list */
2501
2504
  webUrl?: string;
2502
2505
  }
@@ -2535,6 +2538,9 @@ declare module 'gd-sprest/helper/listForm' {
2535
2538
  /** The list. */
2536
2539
  list: List;
2537
2540
 
2541
+ /** The request digest value to use w/ the requests */
2542
+ requestDigest?: string;
2543
+
2538
2544
  /** The relative web url containing the list. */
2539
2545
  webUrl?: string;
2540
2546
  }