gd-sprest 8.2.7 → 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.
@@ -10,5 +10,5 @@ export const Executor: IExecutor;
10
10
  * Executor
11
11
  */
12
12
  export interface IExecutor {
13
- <T = any>(methodParams: Array<T>, method: (param: T) => PromiseLike<any | undefined> | void, onExecuted?: (...args) => PromiseLike<any | undefined> | void): PromiseLike<any | undefined>;
13
+ <T = any>(methodParams: Array<T>, method: (param: T) => PromiseLike<any | void> | void, onExecuted?: (...args) => PromiseLike<any | undefined> | void): PromiseLike<any | undefined>;
14
14
  }
@@ -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;
@@ -1059,6 +1059,8 @@ exports.SPConfig = function (cfg, webUrl) {
1059
1059
  view.ViewFields().removeAllViewFields().execute(true);
1060
1060
  // Parse the view fields
1061
1061
  for (var i = 0; i < cfg.ViewFields.length; i++) {
1062
+ // Log
1063
+ logMessage("[gd-sprest][View] Add view field '" + cfg.ViewFields[i] + "' to the view.");
1062
1064
  // Add the view field
1063
1065
  view.ViewFields().addViewField(cfg.ViewFields[i]).execute(true);
1064
1066
  }
@@ -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
@@ -6936,12 +6936,23 @@ exports.Mapper = {
6936
6936
  },
6937
6937
  setShowInDisplayForm: {
6938
6938
  argNames: ["value"],
6939
+ requestType: utils_1.RequestType.PostWithArgsValueOnly
6939
6940
  },
6940
6941
  setShowInEditForm: {
6941
6942
  argNames: ["value"],
6943
+ requestType: utils_1.RequestType.PostWithArgsValueOnly
6942
6944
  },
6943
6945
  setShowInNewForm: {
6944
6946
  argNames: ["value"],
6947
+ requestType: utils_1.RequestType.PostWithArgsValueOnly
6948
+ },
6949
+ update: {
6950
+ argNames: ["properties"],
6951
+ inheritMetadataType: true,
6952
+ metadataType: "SP.Field",
6953
+ name: "",
6954
+ requestMethod: "MERGE",
6955
+ requestType: utils_1.RequestType.PostBodyNoArgs
6945
6956
  },
6946
6957
  },
6947
6958
  "SP.TenantSettings": {
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.27,
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;
@@ -2125,7 +2126,7 @@ declare module 'gd-sprest/helper/executor' {
2125
2126
  * Executor
2126
2127
  */
2127
2128
  export interface IExecutor {
2128
- <T = any>(methodParams: Array<T>, method: (param: T) => PromiseLike<any | undefined> | void, onExecuted?: (...args) => PromiseLike<any | undefined> | void): PromiseLike<any | undefined>;
2129
+ <T = any>(methodParams: Array<T>, method: (param: T) => PromiseLike<any | void> | void, onExecuted?: (...args) => PromiseLike<any | undefined> | void): PromiseLike<any | undefined>;
2129
2130
  }
2130
2131
  }
2131
2132