gd-sprest 9.8.1 → 9.8.3

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.
@@ -380,7 +380,7 @@ export const FieldSchemaXML = (fieldInfo, targetWebUrl) => {
380
380
  let createUser = (fieldInfo, props) => {
381
381
  let schemaXml = null;
382
382
  // Set the field type
383
- props["Type"] = "User";
383
+ props["Type"] = fieldInfo.multi ? "UserMulti" : "User";
384
384
  // Set the user properties
385
385
  if (fieldInfo.multi) {
386
386
  props["Mult"] = "TRUE";
package/build/rest.js CHANGED
@@ -6,7 +6,7 @@ import { GraphTypes, SPTypes } from "./sptypes";
6
6
  * SharePoint REST Library
7
7
  */
8
8
  export const $REST = {
9
- __ver: 9.81,
9
+ __ver: 9.82,
10
10
  AppContext: (siteUrl) => { return Lib.Site.getAppContext(siteUrl); },
11
11
  Apps: Lib.Apps,
12
12
  ContextInfo: Lib.ContextInfo,
@@ -712,9 +712,9 @@ export const Request = {
712
712
  targetInfo.url = data["@odata.nextLink"] || data.d.__next;
713
713
  // Set the sleep value to prevent throttling
714
714
  let sleepInMS = 0;
715
- if (xhr.rateLimit && xhr.rateLimit.remaining < 50) {
716
- // Set the rate
717
- sleepInMS = xhr.rateLimit.reset * 1000;
715
+ if (xhr.rateLimit) {
716
+ // Set the sleep time to be twice the amount of suggested
717
+ sleepInMS = xhr.rateLimit.reset * 2000;
718
718
  // Log
719
719
  console.info("[gd-sprest] Throttle approaching... Waiting " + sleepInMS + "ms before sending the next request.", xhr.rateLimit);
720
720
  }