gd-sprest 8.2.8 → 8.2.9

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.
@@ -13,6 +13,7 @@ export const Search: ISearch;
13
13
  * Search Post Query
14
14
  */
15
15
  export interface ISearchPostQuery {
16
+ getAllItems?: boolean;
16
17
  onQueryCompleted?: (results: SearchResult) => void;
17
18
  query: SearchRequest
18
19
  targetInfo?: ITargetInfoProps;
@@ -46,6 +46,8 @@ exports.Search.postQuery = function (props) {
46
46
  // Return a promise
47
47
  return new Promise(function (resolve, reject) {
48
48
  var queryProps = props.query;
49
+ // Set the get all items flag
50
+ var getAllItems = typeof (props.getAllItems) === "boolean" ? props.getAllItems : false;
49
51
  // Compute the row count
50
52
  var rowCount = 500;
51
53
  if (typeof (queryProps.RowLimit) === "number") {
@@ -78,7 +80,7 @@ exports.Search.postQuery = function (props) {
78
80
  props.onQueryCompleted ? props.onQueryCompleted(request.postquery) : null;
79
81
  // See if more results exist
80
82
  var results = request.postquery.PrimaryQueryResult.RelevantResults;
81
- if (results.TotalRows > results.RowCount) {
83
+ if (getAllItems && results.TotalRows > results.RowCount) {
82
84
  var search = exports.Search(props.url, props.targetInfo);
83
85
  var useBatch = typeof (props.useBatch) === "boolean" ? props.useBatch : true;
84
86
  // Compute the total # of requests that we need to make
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.28,
12
+ __ver: 8.29,
13
13
  AppContext: function (siteUrl) { return Lib.Site.getAppContext(siteUrl); },
14
14
  Apps: Lib.Apps,
15
15
  ContextInfo: Lib.ContextInfo,
@@ -1613,6 +1613,7 @@ declare module 'gd-sprest/lib/search' {
1613
1613
  * Search Post Query
1614
1614
  */
1615
1615
  export interface ISearchPostQuery {
1616
+ getAllItems?: boolean;
1616
1617
  onQueryCompleted?: (results: SearchResult) => void;
1617
1618
  query: SearchRequest
1618
1619
  targetInfo?: ITargetInfoProps;