using DodoSSH.Client.Domain; using DodoSSH.Client.Storage; namespace DodoSSH.Client.Sync; /// /// The snippets in this vault, decrypted, with unpushed local changes laid over them. /// /// /// The sixth facade over the same generic repository. Nothing here is on the terminal's write path: a snippet /// is read when the screen that lists them opens, and inserting one hands text to the renderer rather than /// coming back through the vault. /// public sealed class SnippetRepository( ItemStore items, OutboxStore outbox, VaultKeyring keyring, IActivityLogSink? activity = null) { private readonly VaultItemRepository snippets = new(SnippetKind.Instance, items, outbox, keyring, activity); /// public Task> ListAsync( Guid vaultId, CancellationToken cancellationToken) => snippets.ListAsync(vaultId, cancellationToken); /// public Task CreateAsync( Guid vaultId, SnippetSecret snippet, CancellationToken cancellationToken) => snippets.CreateAsync(vaultId, snippet, cancellationToken); /// public Task UpdateAsync( Guid vaultId, Guid entityId, SnippetSecret snippet, CancellationToken cancellationToken) => snippets.UpdateAsync(vaultId, entityId, snippet, cancellationToken); /// public Task DeleteAsync(Guid vaultId, Guid entityId, CancellationToken cancellationToken) => snippets.DeleteAsync(vaultId, entityId, cancellationToken); }