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

gd-sprest-def

Package Overview
Dependencies
Maintainers
0
Versions
184
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gd-sprest-def - npm Package Compare versions

Comparing version 1.6.4 to 1.6.5

18

main.js

@@ -696,3 +696,3 @@ let fs = require("fs");

content = [
"import { IBaseCollection, IBaseQuery } from \"../../base\";",
"import { IBaseCollection, IBaseQuery, IBaseResults } from \"../../base\";",
"import * as ComplexTypes from \"./complexTypes.d\";",

@@ -727,2 +727,3 @@ "import * as EnumTypes from \"./enumTypes.d\";"

let methods = [];
let odataMethods = [];
for (let method of entity.methods) {

@@ -737,4 +738,12 @@ // Add the method

let returnType = getGraphType(method.returnType, true) || "void";
let methodsType = returnType == "void" || returnType.indexOf("ComplexTypes.") == 0 || returnType.indexOf("[]") > 0 ? "" : " & " + returnType.replace(/\[\]$/, '') + "Methods";
methods.push(`\t${method.name}(${argStrings.join(", ")}): ${returnType.indexOf("[]") > 0 ? "IBaseCollection" : "IBaseQuery"}<${returnType.replace(/\[\]$/, '')}>${methodsType}${method.returnType2 && getGraphType(method.returnType2, true) ? " & " + getGraphType(method.returnType2, true) : ""};`);
let isCollection = returnType.indexOf("[]") > 0;
let isComplexType = returnType.indexOf("ComplexTypes.") == 0;
let returnTypeName = returnType.replace(/\[\]$/, '');
let methodsType = returnType == "void" || isComplexType || isCollection ? "" : " & " + returnTypeName + "Methods";
methods.push(`\t${method.name}(${argStrings.join(", ")}): ${isCollection ? "IBaseCollection" : "IBaseQuery"}<${returnTypeName}${isCollection && !isComplexType ? ", " + returnTypeName + "OData" : ""}>${methodsType}${method.returnType2 && getGraphType(method.returnType2, true) ? " & " + getGraphType(method.returnType2, true) : ""};`);
// See if this is a collection
if (isCollection) {
odataMethods.push(`\t${method.name}: ${isCollection ? "IBaseResults<" : ""}${returnTypeName}${isCollection ? ">" : ""};`);
}
}

@@ -752,2 +761,5 @@

${methods.join('\n')}
}
export interface ${name}OData {
${odataMethods.join('\n')}
}`);

@@ -754,0 +766,0 @@ }

2

package.json
{
"name": "gd-sprest-def",
"version": "1.6.4",
"version": "1.6.5",
"description": "TypeScript definition files generated from the $metadata REST endpoint in SharePoint.",

@@ -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

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