namespace OTSSignsOrchestrator.Core.Services;
///
/// Abstraction for storing and retrieving secrets via Bitwarden Secrets Manager.
///
public interface IBitwardenSecretService
{
///
/// Returns true if Bitwarden is configured (access token + org ID are set).
///
Task IsConfiguredAsync();
///
/// Creates a new secret in the configured Bitwarden project.
///
/// The ID of the created secret.
Task CreateSecretAsync(string key, string value, string note = "");
///
/// Retrieves a secret by its Bitwarden ID.
///
Task GetSecretAsync(string secretId);
///
/// Updates the value of an existing secret in place.
///
Task UpdateSecretAsync(string secretId, string key, string value, string note = "");
///
/// Lists all secrets in the configured project.
///
Task> ListSecretsAsync();
}
public class BitwardenSecret
{
public string Id { get; set; } = string.Empty;
public string Key { get; set; } = string.Empty;
public string Value { get; set; } = string.Empty;
public string Note { get; set; } = string.Empty;
public DateTime CreationDate { get; set; }
}
public class BitwardenSecretSummary
{
public string Id { get; set; } = string.Empty;
public string Key { get; set; } = string.Empty;
public DateTime CreationDate { get; set; }
}