gd-sprest 9.1.4 → 9.1.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/drive.d.ts +2 -1
- package/@types/v2/drives.d.ts +1 -1
- package/build/rest.js +1 -1
- package/build/v2/drive.js +8 -2
- package/build/v2/drives.js +3 -12
- package/dist/gd-sprest.d.ts +3 -2
- package/dist/gd-sprest.js +1 -1
- package/dist/gd-sprest.min.js +1 -1
- package/package.json +2 -2
package/@types/v2/drive.d.ts
CHANGED
|
@@ -26,8 +26,9 @@ export const drive: Idrive;
|
|
|
26
26
|
export interface Idrive {
|
|
27
27
|
/**
|
|
28
28
|
* Get the default library for a site.
|
|
29
|
+
* @param driveId - (Optional) Sets the drive to get, otherwise gets the default drive for the site.
|
|
29
30
|
* @param siteId - (Optional) The site id to target, current by default.
|
|
30
31
|
* @param targetInfo - (Optional) The target information.
|
|
31
32
|
*/
|
|
32
|
-
(props?: { siteId?: string, siteUrl?: string, targetInfo?: ITargetInfoProps }): IBaseExecution<drive>;
|
|
33
|
+
(props?: { driveId?: string, siteId?: string, siteUrl?: string, targetInfo?: ITargetInfoProps }): IBaseExecution<drive>;
|
|
33
34
|
}
|
package/@types/v2/drives.d.ts
CHANGED
|
@@ -31,5 +31,5 @@ export interface Idrives {
|
|
|
31
31
|
* @param siteUrl - (Optional) The site url to target, current by default.
|
|
32
32
|
* @param targetInfo - (Optional) The target information.
|
|
33
33
|
*/
|
|
34
|
-
(props?: {
|
|
34
|
+
(props?: { siteId?: string, siteUrl?: string, targetInfo?: ITargetInfoProps }): driveCollection;
|
|
35
35
|
}
|
package/build/rest.js
CHANGED
package/build/v2/drive.js
CHANGED
|
@@ -18,8 +18,14 @@ exports.drive = (function (props) {
|
|
|
18
18
|
drive.targetInfo.url = props.siteUrl || ((_a = props === null || props === void 0 ? void 0 : props.targetInfo) === null || _a === void 0 ? void 0 : _a.url) || contextInfo_1.ContextInfo.webServerRelativeUrl;
|
|
19
19
|
// See if an endpoint is not defined
|
|
20
20
|
if (drive.targetInfo.endpoint == undefined) {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
if (props.driveId) {
|
|
22
|
+
// Set the endpoint
|
|
23
|
+
drive.targetInfo.endpoint = "_api/v2.0/".concat(props.siteId ? "sites/" + props.siteId.replace(/[{}]/g, '') + "/" : "", "drives/").concat(props.driveId);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
// Default the endpoint
|
|
27
|
+
drive.targetInfo.endpoint = "_api/v2.0/".concat(props.siteId ? "sites/" + props.siteId.replace(/[{}]/g, '') + "/" : "", "drive");
|
|
28
|
+
}
|
|
23
29
|
// Add the methods
|
|
24
30
|
utils_1.Request.addMethods(drive, { __metadata: { type: "@odata.context/_api/v2.0/$metadata#drive" } });
|
|
25
31
|
}
|
package/build/v2/drives.js
CHANGED
|
@@ -19,18 +19,9 @@ exports.drives = (function (props) {
|
|
|
19
19
|
// See if an endpoint is not defined
|
|
20
20
|
if (drives.targetInfo.endpoint == undefined) {
|
|
21
21
|
// Default the endpoint
|
|
22
|
-
drives.targetInfo.endpoint = "_api/v2.0/".concat(props.siteId ? "sites/" + props.siteId.replace(/[{}]/g, '') : "", "drives");
|
|
23
|
-
//
|
|
24
|
-
|
|
25
|
-
// Append the id
|
|
26
|
-
drives.targetInfo.endpoint += "/" + props.driveId;
|
|
27
|
-
// Add the methods
|
|
28
|
-
utils_1.Request.addMethods(drives, { __metadata: { type: "@odata.context/_api/v2.0/$metadata#drive" } });
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
// Add the methods
|
|
32
|
-
utils_1.Request.addMethods(drives, { __metadata: { type: "@odata.context/_api/v2.0/$metadata#drives" } });
|
|
33
|
-
}
|
|
22
|
+
drives.targetInfo.endpoint = "_api/v2.0/".concat(props.siteId ? "sites/" + props.siteId.replace(/[{}]/g, '') + "/" : "", "drives");
|
|
23
|
+
// Add the methods
|
|
24
|
+
utils_1.Request.addMethods(drives, { __metadata: { type: "@odata.context/_api/v2.0/$metadata#drives" } });
|
|
34
25
|
}
|
|
35
26
|
// Return the libraries
|
|
36
27
|
return drives;
|
package/dist/gd-sprest.d.ts
CHANGED
|
@@ -4483,10 +4483,11 @@ declare module 'gd-sprest/v2/drive' {
|
|
|
4483
4483
|
export interface Idrive {
|
|
4484
4484
|
/**
|
|
4485
4485
|
* Get the default library for a site.
|
|
4486
|
+
* @param driveId - (Optional) Sets the drive to get, otherwise gets the default drive for the site.
|
|
4486
4487
|
* @param siteId - (Optional) The site id to target, current by default.
|
|
4487
4488
|
* @param targetInfo - (Optional) The target information.
|
|
4488
4489
|
*/
|
|
4489
|
-
(props?: { siteId?: string, siteUrl?: string, targetInfo?: ITargetInfoProps }): IBaseExecution<drive>;
|
|
4490
|
+
(props?: { driveId?: string, siteId?: string, siteUrl?: string, targetInfo?: ITargetInfoProps }): IBaseExecution<drive>;
|
|
4490
4491
|
}
|
|
4491
4492
|
}
|
|
4492
4493
|
|
|
@@ -4524,7 +4525,7 @@ declare module 'gd-sprest/v2/drives' {
|
|
|
4524
4525
|
* @param siteUrl - (Optional) The site url to target, current by default.
|
|
4525
4526
|
* @param targetInfo - (Optional) The target information.
|
|
4526
4527
|
*/
|
|
4527
|
-
(props?: {
|
|
4528
|
+
(props?: { siteId?: string, siteUrl?: string, targetInfo?: ITargetInfoProps }): driveCollection;
|
|
4528
4529
|
}
|
|
4529
4530
|
}
|
|
4530
4531
|
|