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 account is granted exactly the libraries every member can already reach, so it can never /// be used to see more than any one member could alone. /// /// The members whose passwords will unlock the account. At least two. /// An explicit account name, or null to generate one from the member names. /// The created group. Task CreateGroupAsync(IReadOnlyList memberIds, string? name); /// /// 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); }