Module to help use SharePoint REST endpoints easily. Provides a comprehensive JavaScript class for interacting with SharePoint's REST API, including file/folder management, list item manipulation, user/group handling, commenting, versioning, and recycle bin operations. Current version 2.0.10, last major update December 2021. Built with Axios, includes automatic X-RequestDigest token handling. Key differentiator: singleton instance with pre-configured Axios interceptors, supports both default and custom instances.
npm install sp-serviceNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates importing the singleton, creating a list item, and querying items with OData parameters.
import { SharePoint } from 'sp-service'; const sp = new SharePoint({ baseUrl: '...' });Set VITE_APP_URL or pass baseUrl in constructor: new SharePoint({ baseUrl: 'https://your-site' })Check the latest API by inspecting the index.js source.
Ensure user is authenticated to SharePoint site before using this module.
Use default import directly: import SP from 'sp-service'; SP.createItem(...)
Set VITE_APP_URL or VUE_APP_URL environment variable, or pass baseUrl to constructor.
Run 'npm install axios' alongside 'sp-service'.