Sprest Versions Save

An easy way to develop against the SharePoint 2013/Online REST api.

4.5.2

5 years ago

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.

4.4.2

5 years ago

This release includes minor bug fixes and intellisense updates.

The batch request has been updated to include:

  1. Allow callback and appendFl to be set
  2. Added an XML parser for responses returning XML data

4.3.6

5 years ago

This release adds the "hasPermissions" helper method. Refer to the permissions code examples for additional details on how to use it.

4.3.5

5 years ago

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.

4.2.7

5 years ago

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:

  • execute(resolve)
  • execute(boolean)
  • execute(resolve, boolean)
  • execute(resolve, reject, boolean)

Refer to the request execution documentation for additional information.

4.2.0

5 years ago

This release adds the ability to activate and deactivate web/site features, along with minor updates and bug fixes.

  • Activate/Deactivate web/site features
  • Major Bug Fix - List Item updates aren't working
  • Added the "JSLink" & "ReadOnly" property to the SPConfiguration Field generator

4.1.6

5 years ago

This release adds new "Helper" methods:

  • createDocSet - Creates a document set item using the _vti_bin/listdata.svc endpoint.
  • request - A generic method for executing requests using the XMLHttpRequest object.

4.1.3

5 years ago

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
});

4.1.0

5 years ago

Executor Helper Method

This release brings a new helper class for executing methods. Documentation has been provided to give an overview with code examples.

Updated Taxonomy Helper Class

The taxonomy helper class has been updated to include getting groups and term sets for a specified group.

Updated WebPart Helper Class

The webpart helper class has been updated to include a static method for adding webparts to a webpart page.

Update SPTypes

The SPTypes enumerator has been updated to include the web template types.

4.0.2

5 years ago

The following REST API endpoints were added in this release:

  • SP.AppContextSite
  • SP.RemoteWeb
  • SP.Site.GetUrlById