feat(Core): update DTOs and shared models
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace FinlyticCore.Dtos.News;
|
||||
|
||||
/// <summary>
|
||||
/// Payload representing the pre-filtered asset configuration dispatched to n8n.
|
||||
/// </summary>
|
||||
public record FilteredAssetPayload(
|
||||
[property: JsonPropertyName("Name")] string Name,
|
||||
[property: JsonPropertyName("Isin")] string Isin
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Webhook payload structure dispatched to the n8n workflow.
|
||||
/// </summary>
|
||||
public record N8nRequestPayload(
|
||||
[property: JsonPropertyName("article")] string Article,
|
||||
[property: JsonPropertyName("filtered_assets")] List<FilteredAssetPayload> FilteredAssets
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Matched asset returned by the n8n AI workflow classification.
|
||||
/// </summary>
|
||||
public record N8nMatchedAssetPayload(
|
||||
[property: JsonPropertyName("ticker")] string? Ticker,
|
||||
[property: JsonPropertyName("name")] string Name,
|
||||
[property: JsonPropertyName("confidence_score")] double ConfidenceScore
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Enriched response payload returned by the n8n workflow webhook.
|
||||
/// </summary>
|
||||
public record N8nResponsePayload(
|
||||
[property: JsonPropertyName("title")] string Title,
|
||||
[property: JsonPropertyName("author")] string? Author,
|
||||
[property: JsonPropertyName("published_at")] string? PublishedAt,
|
||||
[property: JsonPropertyName("scraped_at")] string? ScrapedAt,
|
||||
[property: JsonPropertyName("source_url")] string SourceUrl,
|
||||
[property: JsonPropertyName("summary")] string? Summary,
|
||||
[property: JsonPropertyName("content_raw")] string ContentRaw,
|
||||
[property: JsonPropertyName("language")] string? Language,
|
||||
[property: JsonPropertyName("matched_assets")] List<N8nMatchedAssetPayload> MatchedAssets
|
||||
);
|
||||
Reference in New Issue
Block a user