gd-sprest 8.9.0 → 8.9.2
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/@types/utils/requestType.d.ts +1 -0
- package/build/mapper/v2.js +21 -6
- package/build/rest.js +1 -1
- package/build/utils/methodInfo.js +4 -0
- package/build/utils/requestType.js +5 -4
- package/build/utils/xhrRequest.js +6 -1
- package/dist/gd-sprest.d.ts +1 -0
- package/dist/gd-sprest.js +1 -1
- package/dist/gd-sprest.min.js +1 -1
- package/package.json +2 -2
package/build/mapper/v2.js
CHANGED
|
@@ -2002,13 +2002,16 @@ exports.MapperV2 = {
|
|
|
2002
2002
|
},
|
|
2003
2003
|
columnDefinition: {
|
|
2004
2004
|
properties: [],
|
|
2005
|
-
delete: { requestType: utils_1.RequestType.
|
|
2005
|
+
delete: { requestType: utils_1.RequestType.GraphDelete },
|
|
2006
2006
|
query: { argNames: ["oData"], requestType: utils_1.RequestType.OData },
|
|
2007
2007
|
sourceColumn: {
|
|
2008
2008
|
returnType: "columnDefinition"
|
|
2009
2009
|
},
|
|
2010
2010
|
update: {
|
|
2011
2011
|
argNames: ["values"],
|
|
2012
|
+
name: "",
|
|
2013
|
+
requestMethod: "PATCH",
|
|
2014
|
+
requestType: utils_1.RequestType.PostBodyNoArgs
|
|
2012
2015
|
},
|
|
2013
2016
|
},
|
|
2014
2017
|
columnDefinitions: {
|
|
@@ -2182,7 +2185,7 @@ exports.MapperV2 = {
|
|
|
2182
2185
|
properties: [
|
|
2183
2186
|
"baseTypes|contentTypes|/[Name]|contentType", "columnLinks|columnLinks|/[Name]|columnLink", "columnPositions|columnDefinitions|/[Name]|columnDefinition", "columns|columnDefinitions|/[Name]|columnDefinition"
|
|
2184
2187
|
],
|
|
2185
|
-
delete: { requestType: utils_1.RequestType.
|
|
2188
|
+
delete: { requestType: utils_1.RequestType.GraphDelete },
|
|
2186
2189
|
query: { argNames: ["oData"], requestType: utils_1.RequestType.OData },
|
|
2187
2190
|
base: {
|
|
2188
2191
|
returnType: "contentType"
|
|
@@ -2205,6 +2208,9 @@ exports.MapperV2 = {
|
|
|
2205
2208
|
},
|
|
2206
2209
|
update: {
|
|
2207
2210
|
argNames: ["values"],
|
|
2211
|
+
name: "",
|
|
2212
|
+
requestMethod: "PATCH",
|
|
2213
|
+
requestType: utils_1.RequestType.PostBodyNoArgs
|
|
2208
2214
|
},
|
|
2209
2215
|
publish: {
|
|
2210
2216
|
requestType: utils_1.RequestType.PostWithArgsInBody,
|
|
@@ -3517,7 +3523,7 @@ exports.MapperV2 = {
|
|
|
3517
3523
|
properties: [
|
|
3518
3524
|
"children|driveItems|/[Name]|driveItem", "permissions|permissions|/[Name]|permission", "subscriptions|subscriptions|/[Name]|subscription", "thumbnails|thumbnailSets|/[Name]|thumbnailSet", "versions|driveItemVersions|/[Name]|driveItemVersion"
|
|
3519
3525
|
],
|
|
3520
|
-
delete: { requestType: utils_1.RequestType.
|
|
3526
|
+
delete: { requestType: utils_1.RequestType.GraphDelete },
|
|
3521
3527
|
query: { argNames: ["oData"], requestType: utils_1.RequestType.OData },
|
|
3522
3528
|
workbook: {
|
|
3523
3529
|
returnType: "workbook"
|
|
@@ -5423,7 +5429,7 @@ exports.MapperV2 = {
|
|
|
5423
5429
|
requestType: utils_1.RequestType.Get,
|
|
5424
5430
|
returnType: "contentTypes"
|
|
5425
5431
|
},
|
|
5426
|
-
delete: { requestType: utils_1.RequestType.
|
|
5432
|
+
delete: { requestType: utils_1.RequestType.GraphDelete },
|
|
5427
5433
|
drive: {
|
|
5428
5434
|
returnType: "drive"
|
|
5429
5435
|
},
|
|
@@ -5441,6 +5447,9 @@ exports.MapperV2 = {
|
|
|
5441
5447
|
},
|
|
5442
5448
|
update: {
|
|
5443
5449
|
argNames: ["values"],
|
|
5450
|
+
name: "",
|
|
5451
|
+
requestMethod: "PATCH",
|
|
5452
|
+
requestType: utils_1.RequestType.PostBodyNoArgs
|
|
5444
5453
|
},
|
|
5445
5454
|
},
|
|
5446
5455
|
lists: {
|
|
@@ -5454,7 +5463,7 @@ exports.MapperV2 = {
|
|
|
5454
5463
|
analytics: {
|
|
5455
5464
|
returnType: "itemAnalytics"
|
|
5456
5465
|
},
|
|
5457
|
-
delete: { requestType: utils_1.RequestType.
|
|
5466
|
+
delete: { requestType: utils_1.RequestType.GraphDelete },
|
|
5458
5467
|
documentSetVersions: {
|
|
5459
5468
|
requestType: utils_1.RequestType.Get,
|
|
5460
5469
|
returnType: "documentSetVersions"
|
|
@@ -5471,6 +5480,9 @@ exports.MapperV2 = {
|
|
|
5471
5480
|
},
|
|
5472
5481
|
update: {
|
|
5473
5482
|
argNames: ["values"],
|
|
5483
|
+
name: "",
|
|
5484
|
+
requestMethod: "PATCH",
|
|
5485
|
+
requestType: utils_1.RequestType.PostBodyNoArgs
|
|
5474
5486
|
},
|
|
5475
5487
|
createLink: {
|
|
5476
5488
|
argNames: ["type", "scope", "expirationDateTime", "password", "message", "recipients", "retainInheritedPermissions", "sendNotification"],
|
|
@@ -6715,10 +6727,13 @@ exports.MapperV2 = {
|
|
|
6715
6727
|
},
|
|
6716
6728
|
permission: {
|
|
6717
6729
|
properties: [],
|
|
6718
|
-
delete: { requestType: utils_1.RequestType.
|
|
6730
|
+
delete: { requestType: utils_1.RequestType.GraphDelete },
|
|
6719
6731
|
query: { argNames: ["oData"], requestType: utils_1.RequestType.OData },
|
|
6720
6732
|
update: {
|
|
6721
6733
|
argNames: ["values"],
|
|
6734
|
+
name: "",
|
|
6735
|
+
requestMethod: "PATCH",
|
|
6736
|
+
requestType: utils_1.RequestType.PostBodyNoArgs
|
|
6722
6737
|
},
|
|
6723
6738
|
grant: {
|
|
6724
6739
|
argNames: ["roles", "recipients"],
|
package/build/rest.js
CHANGED
|
@@ -62,7 +62,11 @@ var MethodInfo = /** @class */ (function () {
|
|
|
62
62
|
}
|
|
63
63
|
// Determine the request method, based on the request type
|
|
64
64
|
switch (this.methodInfo.requestType) {
|
|
65
|
+
case _1.RequestType.GraphDelete:
|
|
66
|
+
return "DELETE";
|
|
65
67
|
case _1.RequestType.Delete:
|
|
68
|
+
case _1.RequestType.GraphPost:
|
|
69
|
+
case _1.RequestType.GraphPostReplace:
|
|
66
70
|
case _1.RequestType.Post:
|
|
67
71
|
case _1.RequestType.PostBodyNoArgs:
|
|
68
72
|
case _1.RequestType.PostReplace:
|
|
@@ -20,10 +20,11 @@ exports.RequestType = {
|
|
|
20
20
|
GetWithArgsValueOnly: 16,
|
|
21
21
|
GetReplace: 17,
|
|
22
22
|
// Graph Requests
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
GraphDelete: 20,
|
|
24
|
+
GraphGet: 21,
|
|
25
|
+
GraphGetReplace: 22,
|
|
26
|
+
GraphPost: 23,
|
|
27
|
+
GraphPostReplace: 24,
|
|
27
28
|
// Post Requests
|
|
28
29
|
Post: 30,
|
|
29
30
|
PostBodyNoArgs: 31,
|
|
@@ -240,7 +240,12 @@ var XHRRequest = /** @class */ (function () {
|
|
|
240
240
|
return null;
|
|
241
241
|
}
|
|
242
242
|
// Open the request
|
|
243
|
-
|
|
243
|
+
if (this.isGraph) {
|
|
244
|
+
this.xhr.open(this.targetInfo.requestMethod, this.targetInfo.requestUrl, this.asyncFl);
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
this.xhr.open(this.targetInfo.requestMethod == "GET" ? "GET" : "POST", this.targetInfo.requestUrl, this.asyncFl);
|
|
248
|
+
}
|
|
244
249
|
// See if we are making an asynchronous request
|
|
245
250
|
if (this.asyncFl) {
|
|
246
251
|
// Set the state change event
|