using DodoSSH.Client.Domain;
using DodoSSH.Client.Storage;
namespace DodoSSH.Client.Sync;
///
/// The buckets in this vault, decrypted, with unpushed local changes laid over them.
///
///
/// The eighth facade over the same generic repository, and the pattern has not needed a change since the
/// fourth — which is the point of the item-kind seam. Nothing here is on a transfer's data path: a bucket is
/// read when the file screen's picker is built, and the object-store client is constructed from the result.
///
public sealed class ObjectStoreRepository(
ItemStore items,
OutboxStore outbox,
VaultKeyring keyring,
IActivityLogSink? activity = null)
{
private readonly VaultItemRepository stores =
new(ObjectStoreKind.Instance, items, outbox, keyring, activity);
///
public Task> ListAsync(
Guid vaultId,
CancellationToken cancellationToken) =>
stores.ListAsync(vaultId, cancellationToken);
///
public Task CreateAsync(
Guid vaultId,
ObjectStoreSecret store,
CancellationToken cancellationToken) =>
stores.CreateAsync(vaultId, store, cancellationToken);
///
public Task UpdateAsync(
Guid vaultId,
Guid entityId,
ObjectStoreSecret store,
CancellationToken cancellationToken) =>
stores.UpdateAsync(vaultId, entityId, store, cancellationToken);
///
public Task DeleteAsync(Guid vaultId, Guid entityId, CancellationToken cancellationToken) =>
stores.DeleteAsync(vaultId, entityId, cancellationToken);
}