Skip to content

Releases: gunjandatta/sprest

More Intellisense

03 Feb 15:16
b3de0fb
Compare
Choose a tag to compare

This major update removes all intellisense files related to the SharePoint REST API. The gd-sprest-def library generates the interfaces for this library. The interfaces are generated from the $metadata endpoint in the SharePoint REST API.

This update may require some minor code updates, but only if you are referencing the types.

Please report any issues here.

Intellisense Updated

21 Jan 16:12
6d9a86f
Compare
Choose a tag to compare

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.

Batch Request Updated

12 Dec 22:55
c903395
Compare
Choose a tag to compare

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

Permissions

08 Nov 00:50
c444f0b
Compare
Choose a tag to compare

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

Intellisense Update

28 Oct 22:07
641b84d
Compare
Choose a tag to compare

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.

Reject Added to Execution

27 Sep 11:42
f8a3b85
Compare
Choose a tag to compare

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.

Activate & Deactivate Site/Web Features

20 Aug 22:23
d06e5b6
Compare
Choose a tag to compare

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

New Helper Methods

23 Jul 22:26
1936403
Compare
Choose a tag to compare

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.

WebPack Externals

16 Jul 21:50
f82de69
Compare
Choose a tag to compare

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

New Helper Method "Executor"

04 Jul 13:08
212a3e5
Compare
Choose a tag to compare

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.