Merge branch 'main' of https://git.azuze.fr/kawa/Sharepoint-Toolbox
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using Microsoft.SharePoint.Client;
|
||||
using SharepointToolbox.Core.Models;
|
||||
|
||||
namespace SharepointToolbox.Services;
|
||||
|
||||
public interface IVersionCleanupService
|
||||
{
|
||||
/// <summary>
|
||||
/// Enumerates document libraries (filtered by <see cref="VersionCleanupOptions.LibraryTitles"/>
|
||||
/// when non-empty) and deletes historical file versions per file according to
|
||||
/// <see cref="VersionCleanupOptions.KeepLast"/> and <see cref="VersionCleanupOptions.KeepFirst"/>.
|
||||
/// The current published version is never touched. Returns one result row per file
|
||||
/// where at least one version was inspected.
|
||||
/// </summary>
|
||||
Task<IReadOnlyList<VersionCleanupResult>> DeleteOldVersionsAsync(
|
||||
ClientContext ctx,
|
||||
VersionCleanupOptions options,
|
||||
IProgress<OperationProgress> progress,
|
||||
CancellationToken ct);
|
||||
|
||||
/// <summary>
|
||||
/// Lists non-hidden document libraries on the site. Used by the library picker
|
||||
/// so callers can present a checkbox UI.
|
||||
/// </summary>
|
||||
Task<IReadOnlyList<string>> ListLibraryTitlesAsync(
|
||||
ClientContext ctx,
|
||||
CancellationToken ct);
|
||||
}
|
||||
Reference in New Issue
Block a user