spscript
spscript copied to clipboard
JavaScript library that simplifies working with the SharePoint Rest API
Add this? [https://codesnippets.dev/droopytersen/portalsdev/mms.ts](https://codesnippets.dev/droopytersen/portalsdev/mms.ts)
Where would they go on the SPScript global? ```javascript async function getSiteDesign(siteUrl, siteDesignName) { const ctx = SPScript.createContext(siteUrl); // GetSiteDesigns actually requires a POST let data = await ctx.authorizedPost( "/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.GetSiteDesigns"...
`ctx.themes` namespace? - getTheme(themeName) - getThemes() - applyTheme(themeName) - createTheme - deleteTheme ```javascript const findTheme = async function(siteUrl, themeName) { let ctx = SPScript.createContext(siteUrl); let response = await ctx.get("/thememanager/GetTenantThemingOptions").then(SPScript.utils.validateODataV2); let...
```typescript addClientsideComponent(name:string, location, componentId:string, componentProperties?:any) ```
Hi, I've noticed that update/delete list item doesn't work when using sp-rest-proxy (local development with data from SP server), because in methods updateItem and deleteItem you use URL returned from...
With this library how would I paginate responses? myList.getItems('$top=1000'); Then at a later time... myList.getItems('$top=1000'&$skip=1000'); Except Sharepoint online does not support $skip; and I cannot figure out a simple way...
Hello, I was trying to use the upload file method with version 4.2 of the script but it does not seem to be working. I get the following error: `Uncaught...