22 lines
857 B
C#
22 lines
857 B
C#
namespace Kbx.Shared.Providers;
|
|
|
|
public enum KbxProviderResultKind { Success, NoData, TransientFailure, PermanentFailure }
|
|
|
|
public sealed record KbxProviderResult<T>(KbxProviderResultKind Kind,T? Value=null,string? Code=null,string? Message=null,int? HttpStatus=null)
|
|
{
|
|
public bool IsSuccess => Kind is KbxProviderResultKind.Success or KbxProviderResultKind.NoData;
|
|
}
|
|
|
|
public interface IKbxProviderSecretStore
|
|
{
|
|
ValueTask<string> GetRequiredAsync(string configurationKey, CancellationToken cancellationToken);
|
|
}
|
|
|
|
public interface IKbxExternalProviderAdapter
|
|
{
|
|
string ProviderId { get; }
|
|
}
|
|
|
|
public sealed record KrxApprovedServiceRequest(HttpMethod Method, Uri ServiceUri, IReadOnlyDictionary<string,string?> Query, string? Body = null);
|
|
public sealed record KisCurrentPriceRequest(string MarketDivisionCode,string StockCode,bool Sandbox=false);
|