using DigitalData.Core.Abstractions.Client;
using Microsoft.Extensions.Caching.Distributed;
namespace EnvelopeGenerator.Application.Configurations.GtxMessaging
{
///
/// https://www.gtx-messaging.com/en/api-docs/sms-rest-api/
///
public class SmsParams : IHttpClientOptions
{
public required string Uri { get; init; }
public string? Path { get; init; }
public Dictionary? Headers { get; init; }
public Dictionary? QueryParams { get; init; }
public string RecipientQueryParamName { get; init; } = "to";
public string MessageQueryParamName { get; init; } = "text";
public int CodeLength { get; init; } = 5;
///
/// Gets the cache key format for SMS codes.
/// The placeholder {0} represents the envelopeReceiverId.
///
public string CodeCacheKeyFormat { get; init; } = "sms-code-{0}";
///
/// Gets the cache expiration key format for SMS codes.
/// The placeholder {0} represents the envelopeReceiverId.
///
public string CodeExpirationCacheKeyFormat { get; init; } = "sms-code-expiration-{0}";
public TimeSpan CodeCacheValidityPeriod { get; init; } = new(0, 5, 0);
}
}