gd-sprest 7.1.1 → 7.1.4
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.
- package/build/helper/executor.js +3 -2
- package/build/helper/spCfg.js +3 -3
- package/build/mapper/def.js +27 -8
- package/build/rest.js +1 -1
- package/dist/gd-sprest.js +1 -1
- package/dist/gd-sprest.min.js +1 -1
- package/package.json +2 -2
- package/pnpm-lock.yaml +4 -4
package/build/helper/executor.js
CHANGED
|
@@ -11,6 +11,7 @@ function Executor(methodParams, method, onExecuted) {
|
|
|
11
11
|
var _this = this;
|
|
12
12
|
if (methodParams === void 0) { methodParams = []; }
|
|
13
13
|
var _resolve = null;
|
|
14
|
+
var _reject = null;
|
|
14
15
|
// Method to execute the methods
|
|
15
16
|
var executeMethods = function (idx) {
|
|
16
17
|
if (idx === void 0) { idx = 0; }
|
|
@@ -43,7 +44,7 @@ function Executor(methodParams, method, onExecuted) {
|
|
|
43
44
|
// Execute the next method
|
|
44
45
|
executeMethods(idx + 1);
|
|
45
46
|
}
|
|
46
|
-
});
|
|
47
|
+
}, _reject);
|
|
47
48
|
}
|
|
48
49
|
// Else, see if additional methods need to be executed
|
|
49
50
|
else if (idx < methodParams.length) {
|
|
@@ -52,7 +53,6 @@ function Executor(methodParams, method, onExecuted) {
|
|
|
52
53
|
}
|
|
53
54
|
// Else, resolve the promise
|
|
54
55
|
else {
|
|
55
|
-
// Resolve the promise
|
|
56
56
|
_resolve();
|
|
57
57
|
}
|
|
58
58
|
};
|
|
@@ -60,6 +60,7 @@ function Executor(methodParams, method, onExecuted) {
|
|
|
60
60
|
return new Promise(function (resolve, reject) {
|
|
61
61
|
// Set the resolve reference
|
|
62
62
|
_resolve = resolve;
|
|
63
|
+
_reject = reject;
|
|
63
64
|
// See if params exist
|
|
64
65
|
if (methodParams.length > 0) {
|
|
65
66
|
// Execute the methods
|
package/build/helper/spCfg.js
CHANGED
|
@@ -233,11 +233,11 @@ exports.SPConfig = function (cfg, webUrl) {
|
|
|
233
233
|
}
|
|
234
234
|
}, reject);
|
|
235
235
|
});
|
|
236
|
-
}).then(resolve);
|
|
236
|
+
}).then(resolve, reject);
|
|
237
237
|
}, reject);
|
|
238
238
|
});
|
|
239
239
|
};
|
|
240
|
-
// Method to create the fields
|
|
240
|
+
// Method to create the fields
|
|
241
241
|
var createFields = function (fields, cfgFields, list) {
|
|
242
242
|
// Return a promise
|
|
243
243
|
return new Promise(function (resolve, reject) {
|
|
@@ -381,7 +381,7 @@ exports.SPConfig = function (cfg, webUrl) {
|
|
|
381
381
|
updateLists(cfgLists).then(function () {
|
|
382
382
|
// Resolve the promise
|
|
383
383
|
resolve();
|
|
384
|
-
});
|
|
384
|
+
}, reject);
|
|
385
385
|
});
|
|
386
386
|
});
|
|
387
387
|
};
|
package/build/mapper/def.js
CHANGED
|
@@ -4109,6 +4109,7 @@ exports.Mapper = {
|
|
|
4109
4109
|
},
|
|
4110
4110
|
setCommentsDisabled: {
|
|
4111
4111
|
argNames: ["value"],
|
|
4112
|
+
requestType: utils_1.RequestType.PostWithArgsInBody
|
|
4112
4113
|
},
|
|
4113
4114
|
setComplianceTag: {
|
|
4114
4115
|
argNames: ["complianceTag", "isTagPolicyHold", "isTagPolicyRecord", "isEventBasedTag", "isTagSuperLock", "isUnlockedAsDefault"],
|
|
@@ -4438,12 +4439,16 @@ exports.Mapper = {
|
|
|
4438
4439
|
requestType: utils_1.RequestType.Post
|
|
4439
4440
|
},
|
|
4440
4441
|
createNewsCopy: {},
|
|
4441
|
-
demoteFromNews: {
|
|
4442
|
+
demoteFromNews: {
|
|
4443
|
+
requestType: utils_1.RequestType.Post
|
|
4444
|
+
},
|
|
4442
4445
|
discardPage: {},
|
|
4443
4446
|
getVersion: {
|
|
4444
4447
|
argNames: ["versionId"],
|
|
4445
4448
|
},
|
|
4446
|
-
promoteToNews: {
|
|
4449
|
+
promoteToNews: {
|
|
4450
|
+
requestType: utils_1.RequestType.Post
|
|
4451
|
+
},
|
|
4447
4452
|
publish: {},
|
|
4448
4453
|
saveDraft: {
|
|
4449
4454
|
argNames: ["sitePage"],
|
|
@@ -4579,12 +4584,16 @@ exports.Mapper = {
|
|
|
4579
4584
|
requestType: utils_1.RequestType.Post
|
|
4580
4585
|
},
|
|
4581
4586
|
createNewsCopy: {},
|
|
4582
|
-
demoteFromNews: {
|
|
4587
|
+
demoteFromNews: {
|
|
4588
|
+
requestType: utils_1.RequestType.Post
|
|
4589
|
+
},
|
|
4583
4590
|
discardPage: {},
|
|
4584
4591
|
getVersion: {
|
|
4585
4592
|
argNames: ["versionId"],
|
|
4586
4593
|
},
|
|
4587
|
-
promoteToNews: {
|
|
4594
|
+
promoteToNews: {
|
|
4595
|
+
requestType: utils_1.RequestType.Post
|
|
4596
|
+
},
|
|
4588
4597
|
publish: {},
|
|
4589
4598
|
saveDraft: {
|
|
4590
4599
|
argNames: ["sitePage"],
|
|
@@ -4706,6 +4715,7 @@ exports.Mapper = {
|
|
|
4706
4715
|
requestType: utils_1.RequestType.Post
|
|
4707
4716
|
},
|
|
4708
4717
|
update: {
|
|
4718
|
+
argNames: ["properties"],
|
|
4709
4719
|
metadataType: "",
|
|
4710
4720
|
name: "",
|
|
4711
4721
|
requestMethod: "MERGE",
|
|
@@ -4768,12 +4778,16 @@ exports.Mapper = {
|
|
|
4768
4778
|
argNames: ["sitePageFlags", "isNews"],
|
|
4769
4779
|
},
|
|
4770
4780
|
createNewsCopy: {},
|
|
4771
|
-
demoteFromNews: {
|
|
4781
|
+
demoteFromNews: {
|
|
4782
|
+
requestType: utils_1.RequestType.Post
|
|
4783
|
+
},
|
|
4772
4784
|
discardPage: {},
|
|
4773
4785
|
getVersion: {
|
|
4774
4786
|
argNames: ["versionId"],
|
|
4775
4787
|
},
|
|
4776
|
-
promoteToNews: {
|
|
4788
|
+
promoteToNews: {
|
|
4789
|
+
requestType: utils_1.RequestType.Post
|
|
4790
|
+
},
|
|
4777
4791
|
publish: {},
|
|
4778
4792
|
saveDraft: {
|
|
4779
4793
|
argNames: ["sitePage"],
|
|
@@ -4888,12 +4902,16 @@ exports.Mapper = {
|
|
|
4888
4902
|
argNames: ["sitePageFlags", "isNews"],
|
|
4889
4903
|
},
|
|
4890
4904
|
createNewsCopy: {},
|
|
4891
|
-
demoteFromNews: {
|
|
4905
|
+
demoteFromNews: {
|
|
4906
|
+
requestType: utils_1.RequestType.Post
|
|
4907
|
+
},
|
|
4892
4908
|
discardPage: {},
|
|
4893
4909
|
getVersion: {
|
|
4894
4910
|
argNames: ["versionId"],
|
|
4895
4911
|
},
|
|
4896
|
-
promoteToNews: {
|
|
4912
|
+
promoteToNews: {
|
|
4913
|
+
requestType: utils_1.RequestType.Post
|
|
4914
|
+
},
|
|
4897
4915
|
publish: {},
|
|
4898
4916
|
saveDraft: {
|
|
4899
4917
|
argNames: ["sitePage"],
|
|
@@ -6872,6 +6890,7 @@ exports.Mapper = {
|
|
|
6872
6890
|
resetRoleInheritance: {},
|
|
6873
6891
|
setCommentsDisabled: {
|
|
6874
6892
|
argNames: ["value"],
|
|
6893
|
+
requestType: utils_1.RequestType.PostWithArgsInBody
|
|
6875
6894
|
},
|
|
6876
6895
|
setComplianceTag: {
|
|
6877
6896
|
argNames: ["complianceTag", "isTagPolicyHold", "isTagPolicyRecord", "isEventBasedTag", "isTagSuperLock", "isUnlockedAsDefault"],
|
package/build/rest.js
CHANGED