using System; using System.Collections.Generic; using System.Threading.Tasks; using Jellyfin.Plugin.WatchedTogether.Configuration; namespace Jellyfin.Plugin.WatchedTogether.Services; /// /// Creates, updates and removes shared accounts and their groups. /// public interface IProvisioningService { /// /// Creates a shared account for the given members and records the group. /// /// The members whose passwords will unlock the account. At least two. /// An explicit account name, or null to generate one from the member names. /// Whether the shared account may access all libraries. /// Explicit library identifiers, used when is false. /// The created group. Task CreateGroupAsync( IReadOnlyList memberIds, string? name, bool enableAllFolders, IReadOnlyList? enabledFolders); /// /// Replaces the membership and options of an existing group. /// /// The shared account identifying the group. /// The new member list. At least two. /// Whether unwatched state propagates too. /// Whether play counts are raised on watch. /// Whether the group is suspended. /// The updated group. Task UpdateGroupAsync( Guid sharedUserId, IReadOnlyList memberIds, bool syncUnwatched, bool syncPlayCount, bool isDisabled); /// /// Removes a group, optionally deleting its shared account. /// /// The shared account identifying the group. /// Whether to delete the shared Jellyfin account as well. /// A task representing the removal. Task DeleteGroupAsync(Guid sharedUserId, bool deleteSharedUser); }