public interface IIdempotencyService { /// /// Returns the cached response if the key was already used, or null if this is a new key. /// Task GetExistingAsync(string idempotencyKey, string operationName); /// /// Stores the result of an operation for future deduplication. /// Must be called within the same transaction as the operation. /// Task SaveAsync(string idempotencyKey, string operationName, Guid resourceId, int httpStatusCode, object responseBody, TimeSpan? ttl = null); }