想知道其他人是否对“@pnp/sp/lists”getChanges方法有疑问。以下内容不会在我的 Node Azure 函数中返回任何更改:
const changeQuery: IChangeQuery = {
Add: true,
ChangeTokenEnd: null,
ChangeTokenStart: null,
DeleteObject: true,
Rename: true,
Restore: true,
Update: true
};
const changes = await sp.web.lists.getByTitle("My Library").getChanges(changeQuery);
以下 PowerShell 确实返回更改
$list = Get-PnPList -Identity 'Bamert AP Documents'
$cq = new-object Microsoft.Sharepoint.Client.ChangeQuery($true,$true)
$changes=$list.GetChanges($cq)
$list.Context.Load($changes)
$list.Context.ExecuteQuery()
$changes.count
#returns 1000