Henara.Grpc.Client.Dakota 2.2.0

Henara.Grpc.Client.Dakota

gRPC client library for the Dakota pipeline gateway and reporting service. Usable from any .NET host (ASP.NET Core, WinForms, MAUI, console). Authentication is supplied by an ICallTokenProvider; the clients carry no static API token.

If your native host already owns a Keycloak session (it logs the user in and refreshes tokens itself), use Henara.Grpc.Client.DakotaSlim instead — it adapts your existing token with one registration and no second refresh-token rotator.

Endpoints

Two environment variables, validated at registration (throws if missing):

Variable Value
URL_DAKOTA_PIPELINE Dakota pipeline gateway gRPC URL
URL_DAKOTA_REPORTER Dakota reporting gRPC URL

Registration

Native client (interactive Keycloak login). The app performs an Authorization Code + PKCE login in a webview against the public client henara-main-sso, then seeds the provider with the resulting tokens:

services.AddNativeKeycloakAuth(o =>
{
    o.TokenEndpoint = "https://auth.praxx.me/realms/henara/protocol/openid-connect/token";
    o.ClientId      = "henara-main-sso";
});
services.AddDakotaExternalGrpcClients();

// after the login completes, seed the tokens from the login response:
var auth = provider.GetRequiredService<KeycloakRefreshingTokenProvider>();
auth.Initialize(accessToken, refreshToken, expiresInSeconds);

The provider refreshes the access token before expiry (rotating the refresh token). If a refresh fails, the next call throws — re-run the login and call Initialize(...) again.

Inside our stack. Register any ICallTokenProvider that yields a valid Keycloak bearer (e.g. the Blazor frontend's KeycloakUserCallTokenProvider), then the clients:

services.AddScoped<ICallTokenProvider, KeycloakUserCallTokenProvider>();
services.AddDakotaExternalGrpcClients();

AddDakotaExternalGrpcClients registers IDakotaGatewayClient (pipeline) and IDakotaReporterClient (reporting). Inject them where needed.

Pipeline — IDakotaGatewayClient

IAsyncEnumerable<DakotaDispatchResult> DispatchDakotaProcess(
    List<DakotaPairRequest> pairs, CancellationToken ct = default);

Task<Result<bool, Failure>> IsPipelineStepRetryDispatched(Guid tickerId);

Task<Result<CustomerRoutingInfo, Failure>> GetCustomerRoutingInfo(
    string customerId, CancellationToken ct = default);

DispatchDakotaProcess streams one ESOL/AUF file pair per DakotaPairRequest and yields one result per pair. The intake gate authorises each pair by the sender (praxis) IK carried in the file; a rejected pair returns IsDispatched == false with a Message.

GetCustomerRoutingInfo resolves an 8-digit customer id to its routing: the customer's own LEB-IK, the referenced AZ-IK, and IsSelbstabrechner. A customer with no mapping (Selbstabrechner) returns IsSelbstabrechner == true with both IKs empty; a mapped customer returns the two IKs with IsSelbstabrechner == false. An id that fails the expected pattern returns a Failure.

var pairs = new List<DakotaPairRequest>
{
    new(new FileRequestInfoDto(esolBytes, aufBytes, "file.con"),
        CustomerId: 20131386, Channel: ChannelTypeEnum.Production,
        IsEsolPreprocessed: false, OverwriteRecipient: null)
};

await foreach (var r in gateway.DispatchDakotaProcess(pairs, ct))
    Console.WriteLine(r.IsDispatched ? $"{r.FileName} -> {r.PipelineId}" : $"rejected: {r.Message}");

Reporting — IDakotaReporterClient

The server scopes all results to the caller's customer id(s); Henara admins see everything.

IAsyncEnumerable<DakotaProcessInfoDto> GetDakotaStati(DakotaFilter? filter = null);

Task<(IReadOnlyList<DakotaFileRowDto> Rows, long Total)> GetFilesPaged(int page, int pageSize, string search);

IAsyncEnumerable<SingleIlFileInfoDto> DownloadFiles(List<(int oid, DownloadFileTypeEnum type)> filesToDownload);
  • GetDakotaStati — process-status aggregates; DakotaFilter (all members optional) narrows by customer id, receiver IK, time range, pipeline step, status, or file name; null returns all the caller may see.
  • GetFilesPaged — server-paged, searchable file list (search matches file name / receiver IK, empty matches all); returns page rows and total count.
  • DownloadFiles — raw file contents for the given object ids; Dakota types are DownloadFileTypeEnum.DakotaEsol / DakotaAuf.
var filter = new DakotaFilter { CustomerId = new MatchesIntFilterDto(20131386) };
await foreach (var p in reporter.GetDakotaStati(filter))
    Console.WriteLine($"{p.CreatedAt:o} {p.ReceiverIk} {p.FileName}");

var (rows, total) = await reporter.GetFilesPaged(page: 0, pageSize: 100, search: "");

DTO reference

Type Shape
DakotaPairRequest (FileRequestInfoDto FilePair, int CustomerId, ChannelTypeEnum Channel, bool IsEsolPreprocessed, string? OverwriteRecipient)
FileRequestInfoDto (byte[] EsolFile, byte[] AufFile, string FileName)
ChannelTypeEnum Test, Staging, Production
DakotaDispatchResult (bool IsDispatched, Guid? PipelineId, string FileName, string? Message)
CustomerRoutingInfo (string LebIk, string AzIk, bool IsSelbstabrechner)
DakotaFileRowDto (int DataOid, DateTimeOffset CreatedAt, string FileName, string FileType, Guid ProcessId, string ReceiverIk, int Step)
SingleIlFileInfoDto (Guid ProcessId, byte[] FileData, string FileType, string FileName, int Oid)
DownloadFileTypeEnum DakotaEsol, DakotaAuf

Showing the top 20 packages that depend on Henara.Grpc.Client.Dakota.

Packages Downloads
Henara.Grpc.Client.DakotaSlim
Slim native gRPC client wiring for hosts that already own a Keycloak session (e.g. SmartVO). Adapts a host-supplied access token to the Dakota external clients; contains no interactive login and no token refresh of its own.
122
Henara.Grpc.Client.DakotaSlim
Slim native gRPC client wiring for hosts that already own a Keycloak session (e.g. SmartVO). Adapts a host-supplied access token to the Dakota external clients; contains no interactive login and no token refresh of its own.
3
Henara.Grpc.Client.DakotaSlim
Slim native gRPC client wiring for hosts that already own a Keycloak session (e.g. SmartVO). Adapts a host-supplied access token to the Dakota external clients; contains no interactive login and no token refresh of its own.
2
Henara.Grpc.Client.DakotaSlim
Slim native gRPC client wiring for hosts that already own a Keycloak session (e.g. SmartVO). Adapts a host-supplied access token to the Dakota external clients; contains no interactive login and no token refresh of its own.
0

Version Downloads Last updated
2.2.0 125 07/13/2026
2.1.0 6 07/09/2026
2.0.0 3 07/05/2026
1.3.0 4 06/25/2026
1.2.0 1 06/25/2026
1.1.0 1 06/25/2026
1.0.0 2 06/25/2026