@slates-integrations/sharepoint 0.2.0-rc.9 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/SPEC.md CHANGED
@@ -41,7 +41,9 @@ Key SharePoint-related scopes for Microsoft Graph include:
41
41
  - `User.Read`, `offline_access`
42
42
  - `Sites.Selected` — restricts an application's access to specific site collections. Now lists, list items, folders, and files are also supported, and all Selected scopes support delegated and application modes.
43
43
 
44
- Application permissions typically require admin consent. Access tokens generated for Microsoft Graph resources are not valid for the SharePoint REST API use the correct audience (`https://graph.microsoft.com` vs. `https://{tenant}.sharepoint.com`) depending on which API you call.
44
+ SharePoint REST-backed list and column operations require the Office 365 SharePoint Online delegated `AllSites.Manage` permission. Microsoft Graph `Sites.Manage.All` is a separate permission and does not authorize SharePoint REST calls. Custom Entra applications must configure both API resources, grant tenant consent when required, and reconnect after permission changes.
45
+
46
+ Application permissions typically require admin consent. Access tokens generated for Microsoft Graph resources are not valid for the SharePoint REST API — use the correct audience (`https://graph.microsoft.com` vs. `https://{tenant}.sharepoint.com`) depending on which API you call. SharePoint REST-backed tools derive the tenant SharePoint host from Microsoft Graph and exchange the refresh token for a SharePoint resource token. Connection health requires complete, unexpired auth state for both resources.
45
47
 
46
48
  ### Certificate-Based Authentication
47
49
 
@@ -57,6 +59,12 @@ The SharePoint API in Microsoft Graph supports access to SharePoint sites, lists
57
59
 
58
60
  Lists are the foundation for data storage in SharePoint. You can create lists to store a variety of business data, from a simple customer contact list to a custom business application. When you use columns to define your schema, SharePoint can protect the integrity of your data as well as enable rich indexing, querying, and search capabilities. The API supports full CRUD operations on lists and list items, including defining custom columns.
59
61
 
62
+ SharePoint URL/Hyperlink columns use the SharePoint `URL` field type with `Url` and `Description` values. Microsoft Graph list column metadata can omit the `hyperlinkOrPicture` facet for list columns, so list item updates for Hyperlink object values use SharePoint REST field metadata and `SP.FieldUrlValue` while ordinary scalar field updates continue to use Microsoft Graph.
63
+
64
+ ### Site Users and Person Fields
65
+
66
+ SharePoint Person/Group list columns store the numeric site-scoped user ID, not the user's Microsoft Entra object ID. The SharePoint REST API exposes site users through `/_api/web/siteusers`, including `GetByEmail(email)`, which returns the numeric `Id`, `LoginName`, `Email`, and `Title` values needed to update Person/Group fields through Graph list item field payloads such as `{fieldName}LookupId`.
67
+
60
68
  ### Document Libraries and Files
61
69
 
62
70
  SharePoint stores files in a special list type called a document library. You can use the OneDrive API to work with a library as a drive, or the SharePoint API to work with it as a list. Just like a regular list, you can extend the schema of a Document Library to support your business needs with custom columns. This includes uploading, downloading, moving, copying, and versioning files.
package/package.json CHANGED
@@ -4,19 +4,22 @@
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "bunx @vercel/ncc build src/index.ts -o dist -m -s",
7
+ "test": "vitest run --config vitest.config.ts --passWithNoTests",
7
8
  "typecheck": "tsc --noEmit"
8
9
  },
9
10
  "dependencies": {
10
- "@slates/oauth-microsoft": "1.0.0-rc.5",
11
+ "@slates/oauth-microsoft": "1.0.0-rc.6",
11
12
  "@lowerdeck/error": "^1.1.0",
12
13
  "@types/node": "^20",
13
- "slates": "1.0.0-rc.14",
14
+ "slates": "1.0.0-rc.17",
14
15
  "zod": "^4.2"
15
16
  },
16
17
  "devDependencies": {
18
+ "@slates/test": "1.0.0-rc.14",
19
+ "vitest": "^3.1.2",
17
20
  "typescript": "^5"
18
21
  },
19
- "version": "0.2.0-rc.9",
22
+ "version": "0.3.0",
20
23
  "files": [
21
24
  "dist/**",
22
25
  "docs/**",
package/slate.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "@microsoft/sharepoint",
3
- "description": "Manage SharePoint sites, document libraries, lists, and files. Create, read, update, and delete lists and list items with custom columns. Upload, download, move, copy, and version files in document libraries. Search across sites, files, folders, lists, and list items using Microsoft Search. Manage permissions at site, list, and item levels with granular access control. Define and manage content types and site columns. Subscribe to webhooks for list and library change notifications. Retrieve site properties and search for sites across Microsoft 365.",
3
+ "description": "Manage SharePoint sites, document libraries, lists, and files. Create, read, update, and delete lists and list items with custom columns. Resolve site users to numeric Person/Group LookupId values. Upload, download, move, copy, and version files in document libraries. Search across sites, files, folders, lists, and list items using Microsoft Search. Manage permissions at site, list, and item levels with granular access control. Define and manage content types and site columns. Subscribe to webhooks for list and library change notifications. Retrieve site properties and search for sites across Microsoft 365.",
4
4
  "categories": ["apis-and-http-requests", "document-processing", "email-and-messaging"],
5
5
  "skills": [
6
6
  "manage sites and libraries",
7
7
  "upload and download files",
8
8
  "create and manage lists",
9
9
  "CRUD list items",
10
+ "resolve site users",
11
+ "populate person fields",
10
12
  "search files and sites",
11
13
  "manage permissions",
12
14
  "define content types",