Initial commit: Add project files
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using FastEndpoints;
|
||||
using KArtSell.Modules.ModelOperations.FeedbackLoop;
|
||||
|
||||
namespace KArtSell.Modules.ModelOperations.Features.GetModelFeedbackLoop;
|
||||
|
||||
public sealed class Endpoint : EndpointWithoutRequest<Response>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Get("/model-operations/feedback-loop");
|
||||
Roles("Quant", "Risk", "Compliance", "Operations", "Administrator");
|
||||
Summary(x =>
|
||||
{
|
||||
x.Summary = "Returns the governed continuous model feedback plan.";
|
||||
x.Description = "This endpoint exposes evaluation/proposal stages only. It cannot activate a model or submit an order.";
|
||||
});
|
||||
}
|
||||
|
||||
public override Task HandleAsync(CancellationToken ct)
|
||||
{
|
||||
var stages = ModelFeedbackPlan.Stages.Select(x => new ModelFeedbackStageResponse(
|
||||
x.Order, x.StageCode, x.OperationCode, x.Name, x.AutomationBoundary,
|
||||
x.RequiredEvidence, x.HumanDecision, x.FailureAction)).ToArray();
|
||||
return Send.OkAsync(new Response(ModelFeedbackPlan.Boundary, stages), ct);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace KArtSell.Modules.ModelOperations.Features.GetModelFeedbackLoop;
|
||||
|
||||
public sealed record ModelFeedbackStageResponse(
|
||||
int Order,
|
||||
string StageCode,
|
||||
string OperationCode,
|
||||
string Name,
|
||||
string AutomationBoundary,
|
||||
string RequiredEvidence,
|
||||
string HumanDecision,
|
||||
string FailureAction);
|
||||
|
||||
public sealed record Response(string Boundary, IReadOnlyList<ModelFeedbackStageResponse> Stages);
|
||||
Reference in New Issue
Block a user