Publish curated Knowledge Hub source from 2ed833f290b439a7bc91e5fd19b042c269e3bee9

This commit is contained in:
Public Source Publisher committed 2026-10-03 17:07:21 +00:00
1 parent 10f2edcd29
commit 59f15b2d08
218 files changed
+23995 -1849

No files matched your search

@@ -4,13 +4,15 @@ using ItWorx.KnowledgeHub.Domain.Ingestion;
namespace ItWorx.KnowledgeHub.Application.Ingestion.UseCases;
public sealed record CreateIngestionProposalCommand(Guid WorkspaceId, Guid ActorId, string Manifest, string CorrelationId,
string? IdempotencyKey, IngestionPublication? Publication = null);
string? IdempotencyKey, IngestionPublication? Publication = null,
int MaxPublishRetries = IngestionProposal.DefaultMaxPublishRetries);
public sealed class CreateIngestionProposalUseCase(IIngestionProposalRepository proposals, TimeProvider timeProvider)
{
public async Task<OperationResultValue<Guid>> ExecuteAsync(CreateIngestionProposalCommand command, CancellationToken cancellationToken)
{
if (command.WorkspaceId == Guid.Empty || command.ActorId == Guid.Empty || string.IsNullOrWhiteSpace(command.Manifest) || command.Manifest.Length > 100_000)
if (command.WorkspaceId == Guid.Empty || command.ActorId == Guid.Empty || string.IsNullOrWhiteSpace(command.Manifest)
|| command.Manifest.Length > 100_000 || command.MaxPublishRetries is < 1 or > 3)
return OperationResultValue.Failure<Guid>(OperationStatus.ValidationFailed, ["Ongeldig voorstel."]);
if (!string.IsNullOrWhiteSpace(command.IdempotencyKey))
@@ -22,7 +24,7 @@ public sealed class CreateIngestionProposalUseCase(IIngestionProposalRepository
var proposal = IngestionProposal.Create(command.WorkspaceId, command.ActorId,
string.IsNullOrWhiteSpace(command.CorrelationId) ? "ingestion" : command.CorrelationId,
command.Manifest, IngestionProposal.DefaultMaxPublishRetries);
command.Manifest, command.MaxPublishRetries);
if (!string.IsNullOrWhiteSpace(command.IdempotencyKey)) proposal.AssignIdempotencyKey(command.IdempotencyKey);
if (command.Publication is not null)
{