Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gd-sprest

Package Overview
Dependencies
Maintainers
0
Versions
841
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gd-sprest - npm Package Compare versions

Comparing version 8.6.2 to 8.6.3

4

@types/v2/drive.d.ts

@@ -7,3 +7,3 @@ import { IBaseExecution } from "gd-sprest-def/lib/base";

* #### REST API
* _api/v2.1/drive
* _api/v2.0/drive
*

@@ -24,3 +24,3 @@ * #### Get the default library for a site.

* Drive
* The v2.1 REST endpoint.
* The v2.0 REST endpoint.
* @category Drive

@@ -27,0 +27,0 @@ */

@@ -7,3 +7,3 @@ import { IBaseExecution } from "gd-sprest-def/lib/base";

* #### REST API
* _api/v2.1/drives
* _api/v2.0/drives
*

@@ -24,3 +24,3 @@ * #### Get the libraries for a site.

* Drives
* The v2.1 REST endpoint.
* The v2.0 REST endpoint.
* @category Drives

@@ -27,0 +27,0 @@ */

@@ -10,3 +10,3 @@ import { IBaseExecution, IBaseQuery } from "gd-sprest-def/lib/base";

* #### REST API
* _api/v2.1/sites
* _api/v2.0/sites
*

@@ -49,3 +49,3 @@ * #### Get the current site

* Sites
* The v2.1 REST endpoint.
* The v2.0 REST endpoint.
* @category Sites

@@ -52,0 +52,0 @@ */

@@ -12,3 +12,3 @@ "use strict";

exports.$REST = {
__ver: 8.62,
__ver: 8.63,
AppContext: function (siteUrl) { return Lib.Site.getAppContext(siteUrl); },

@@ -15,0 +15,0 @@ Apps: Lib.Apps,

@@ -257,3 +257,3 @@ "use strict";

var metadataType = (obj["@odata.context"] || objType);
var values = metadataType.split("_api/v2.1/$metadata#");
var values = metadataType.split("_api/v2.0/$metadata#");
if (values.length > 1) {

@@ -260,0 +260,0 @@ objType = values[1];

@@ -38,3 +38,3 @@ "use strict";

var objType = metadata && metadata.type ? metadata.type : obj.targetInfo.endpoint;
var isV2 = ((_b = (_a = obj === null || obj === void 0 ? void 0 : obj.parent) === null || _a === void 0 ? void 0 : _a.targetInfo) === null || _b === void 0 ? void 0 : _b.endpoint.startsWith("_api/v2.1/")) ||
var isV2 = ((_b = (_a = obj === null || obj === void 0 ? void 0 : obj.parent) === null || _a === void 0 ? void 0 : _a.targetInfo) === null || _b === void 0 ? void 0 : _b.endpoint.startsWith("_api/v2.0/")) ||
obj["@odata.context"] || objType.startsWith("@odata.context") ? true : false;

@@ -50,3 +50,3 @@ if (isV2) {

var metadataType = (obj["@odata.context"] || objType);
var values = metadataType.split("_api/v2.1/$metadata#");
var values = metadataType.split("_api/v2.0/$metadata#");
if (values.length > 1) {

@@ -53,0 +53,0 @@ objType = values[1];

@@ -46,3 +46,3 @@ "use strict";

var _a;
return ((_a = this.props.endpoint) === null || _a === void 0 ? void 0 : _a.startsWith("_api/v2.1/")) ||
return ((_a = this.props.endpoint) === null || _a === void 0 ? void 0 : _a.startsWith("_api/v2.0/")) ||
this.props.requestType == _1.RequestType.GraphGet || this.props.requestType == _1.RequestType.GraphPost ||

@@ -49,0 +49,0 @@ this.props.requestType == _1.RequestType.GraphGetReplace || this.props.requestType == _1.RequestType.GraphPostReplace;

@@ -26,5 +26,5 @@ "use strict";

// Default the endpoint
drive.targetInfo.endpoint = "_api/v2.1/" + (props.siteId ? "sites/" + props.siteId.replace(/[{}]/g, '') : "") + "drive";
drive.targetInfo.endpoint = "_api/v2.0/" + (props.siteId ? "sites/" + props.siteId.replace(/[{}]/g, '') : "") + "drive";
// Add the methods
utils_1.Request.addMethods(drive, { __metadata: { type: "@odata.context/_api/v2.1/$metadata#drive" } });
utils_1.Request.addMethods(drive, { __metadata: { type: "@odata.context/_api/v2.0/$metadata#drive" } });
}

@@ -31,0 +31,0 @@ // Return the default library

@@ -26,3 +26,3 @@ "use strict";

// Default the endpoint
drives.targetInfo.endpoint = "_api/v2.1/" + (props.siteId ? "sites/" + props.siteId.replace(/[{}]/g, '') : "") + "drives";
drives.targetInfo.endpoint = "_api/v2.0/" + (props.siteId ? "sites/" + props.siteId.replace(/[{}]/g, '') : "") + "drives";
// See if the drive id was provided

@@ -33,7 +33,7 @@ if (props.driveId) {

// Add the methods
utils_1.Request.addMethods(drives, { __metadata: { type: "@odata.context/_api/v2.1/$metadata#drive" } });
utils_1.Request.addMethods(drives, { __metadata: { type: "@odata.context/_api/v2.0/$metadata#drive" } });
}
else {
// Add the methods
utils_1.Request.addMethods(drives, { __metadata: { type: "@odata.context/_api/v2.1/$metadata#drives" } });
utils_1.Request.addMethods(drives, { __metadata: { type: "@odata.context/_api/v2.0/$metadata#drives" } });
}

@@ -40,0 +40,0 @@ }

@@ -20,3 +20,3 @@ "use strict";

sites.targetInfo.defaultToWebFl = true;
sites.targetInfo.endpoint = "_api/v2.1/sites" + (props.siteId ? "/" + props.siteId : "");
sites.targetInfo.endpoint = "_api/v2.0/sites" + (props.siteId ? "/" + props.siteId : "");
sites.targetInfo.requestType = utils_1.RequestType.GraphGet;

@@ -34,3 +34,3 @@ // See if the site id was provided

// Add the methods
utils_1.Request.addMethods(sites, { __metadata: { type: "@odata.context/_api/v2.1/$metadata#sites" } });
utils_1.Request.addMethods(sites, { __metadata: { type: "@odata.context/_api/v2.0/$metadata#sites" } });
// Return the sites

@@ -37,0 +37,0 @@ return sites;

{
"name": "gd-sprest",
"version": "8.6.2",
"version": "8.6.3",
"description": "An easy way to develop against the SharePoint REST API.",

@@ -5,0 +5,0 @@ "author": "Gunjan Datta <me@dattabase.com> (https://gunjandatta.github.io)",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc