An easy way to develop against the SharePoint 2013/Online REST api.
This release fixes minor bugs, but the main update has been the intellisense. The Types property is no longer there, so there may be a need to do some minor updates for imports.
import { Types.SP, Types.Helper } -> import { SP, Helper }
The intellisense has been updated to reduce the amount of functions and properties that are displayed.
This release includes minor bug fixes and intellisense updates.
The batch request has been updated to include:
This release adds the "hasPermissions" helper method. Refer to the permissions code examples for additional details on how to use it.
This release adds a reference to the gd-sprest-def library. This library takes the $metadata api endpoint in SharePoint and generates TypeScript definition files. This update removed about 20k lines of code that were used for the SharePoint intellisense, making it much easier to maintain.
This update will enhance the overall intellisense, since it includes much more information than we previous had.
Updating to the latest MAY require minor code updates. These updates can easily be done via a global search and replace. Most likely you will need to do a search and replace for "Helper.Types" to "Types.Helper".
Please post issues here, and they will be fixed within 24-48 hours.
This release includes minor bug fixes and intellisense updates. Along with these, the "execute" method adds the "reject" method, for requests that are not successful. Existing code does not need to be updated, it will still support the following ways:
Refer to the request execution documentation for additional information.
This release adds the ability to activate and deactivate web/site features, along with minor updates and bug fixes.
This release adds new "Helper" methods:
This major release fixes issue 166, related to the library not working as an external library in webpack. The webpack configuration for the gd-sprest and gd-sprest-js libraries can be configured as:
webpack.config.js
// WebPack Config
module.exports = {
// External Libs
externals: {
"gd-sprest": "$REST",
"gd-sprest-js": "$REST.JS"
}
}
The libraries have been updated to match the $REST global variable, which will require code updates for existing solutions. The code update is very minimal and straight forward. The libraries no longer require the "new" instance, for example:
TypeScript
import { List } from "gd-sprest";
// Old Way
(new List("Style Library")).Items().execute(items => {
// Code goes here
});
// New Way
List("Style Library").Items().execute(items => {
// Code goes here
});
This release brings a new helper class for executing methods. Documentation has been provided to give an overview with code examples.
The taxonomy helper class has been updated to include getting groups and term sets for a specified group.
The webpart helper class has been updated to include a static method for adding webparts to a webpart page.
The SPTypes enumerator has been updated to include the web template types.
The following REST API endpoints were added in this release: