gd-sprest 8.6.5 → 8.6.6
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/v2/sites.d.ts +4 -4
- package/build/rest.js +1 -1
- package/build/v2/sites.js +8 -8
- package/dist/gd-sprest.d.ts +4 -4
- package/dist/gd-sprest.js +1 -1
- package/dist/gd-sprest.min.js +1 -1
- package/package.json +1 -1
package/@types/v2/sites.d.ts
CHANGED
|
@@ -58,10 +58,7 @@ export interface Isites {
|
|
|
58
58
|
(props?: { siteId?: string, webId?: string, targetInfo?: ITargetInfoProps }): IBaseQuery<site> & siteMethods;
|
|
59
59
|
|
|
60
60
|
/** Returns the current site. */
|
|
61
|
-
static
|
|
62
|
-
|
|
63
|
-
/** Returns the current web. */
|
|
64
|
-
static getCurrentWeb(): IBaseQuery<site> & siteMethods;
|
|
61
|
+
static getCurrent(): IBaseQuery<site> & siteMethods;
|
|
65
62
|
|
|
66
63
|
/** Returns a drive for a site. */
|
|
67
64
|
static getDrive(props: IsiteGetDriveProps): PromiseLike<IBaseQuery<drive> & driveMethods>;
|
|
@@ -74,4 +71,7 @@ export interface Isites {
|
|
|
74
71
|
|
|
75
72
|
/** Returns the url to the site, web, list or file. */
|
|
76
73
|
static getIdByUrl(url: string): PromiseLike<IsiteIdResult>;
|
|
74
|
+
|
|
75
|
+
/** Returns the root site of the current site. */
|
|
76
|
+
static getRoot(): IBaseQuery<site> & siteMethods;
|
|
77
77
|
}
|
package/build/rest.js
CHANGED
package/build/v2/sites.js
CHANGED
|
@@ -18,7 +18,7 @@ exports.sites = (function (props) {
|
|
|
18
18
|
common_1.init();
|
|
19
19
|
// Default the properties
|
|
20
20
|
sites.targetInfo.defaultToWebFl = true;
|
|
21
|
-
sites.targetInfo.endpoint = "_api/v2.0/sites"
|
|
21
|
+
sites.targetInfo.endpoint = "_api/v2.0/sites";
|
|
22
22
|
sites.targetInfo.requestType = utils_1.RequestType.GraphGet;
|
|
23
23
|
// Default the url
|
|
24
24
|
sites.targetInfo.url = ((_a = props === null || props === void 0 ? void 0 : props.targetInfo) === null || _a === void 0 ? void 0 : _a.url) || contextInfo_1.ContextInfo.webServerRelativeUrl;
|
|
@@ -38,13 +38,7 @@ exports.sites = (function (props) {
|
|
|
38
38
|
return sites;
|
|
39
39
|
});
|
|
40
40
|
/** Returns the current site. */
|
|
41
|
-
exports.sites.
|
|
42
|
-
return exports.sites({
|
|
43
|
-
siteId: contextInfo_1.ContextInfo.siteId
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
/** Returns the current web. */
|
|
47
|
-
exports.sites.getCurrentWeb = function () {
|
|
41
|
+
exports.sites.getCurrent = function () {
|
|
48
42
|
return exports.sites({
|
|
49
43
|
siteId: contextInfo_1.ContextInfo.siteId,
|
|
50
44
|
webId: contextInfo_1.ContextInfo.webId
|
|
@@ -176,3 +170,9 @@ exports.sites.getIdByUrl = function (url) {
|
|
|
176
170
|
});
|
|
177
171
|
});
|
|
178
172
|
};
|
|
173
|
+
/** Returns the root site of the current site. */
|
|
174
|
+
exports.sites.getRoot = function () {
|
|
175
|
+
return exports.sites({
|
|
176
|
+
siteId: contextInfo_1.ContextInfo.siteId
|
|
177
|
+
});
|
|
178
|
+
};
|
package/dist/gd-sprest.d.ts
CHANGED
|
@@ -4571,10 +4571,7 @@ declare module 'gd-sprest/v2/sites' {
|
|
|
4571
4571
|
(props?: { siteId?: string, webId?: string, targetInfo?: ITargetInfoProps }): IBaseQuery<site> & siteMethods;
|
|
4572
4572
|
|
|
4573
4573
|
/** Returns the current site. */
|
|
4574
|
-
static
|
|
4575
|
-
|
|
4576
|
-
/** Returns the current web. */
|
|
4577
|
-
static getCurrentWeb(): IBaseQuery<site> & siteMethods;
|
|
4574
|
+
static getCurrent(): IBaseQuery<site> & siteMethods;
|
|
4578
4575
|
|
|
4579
4576
|
/** Returns a drive for a site. */
|
|
4580
4577
|
static getDrive(props: IsiteGetDriveProps): PromiseLike<IBaseQuery<drive> & driveMethods>;
|
|
@@ -4587,6 +4584,9 @@ declare module 'gd-sprest/v2/sites' {
|
|
|
4587
4584
|
|
|
4588
4585
|
/** Returns the url to the site, web, list or file. */
|
|
4589
4586
|
static getIdByUrl(url: string): PromiseLike<IsiteIdResult>;
|
|
4587
|
+
|
|
4588
|
+
/** Returns the root site of the current site. */
|
|
4589
|
+
static getRoot(): IBaseQuery<site> & siteMethods;
|
|
4590
4590
|
}
|
|
4591
4591
|
}
|
|
4592
4592
|
|