feat(mvp): complete MVP hardening — API, Web, config system, SignalR, tests
This commit is contained in:
1 parent
3fc42be4b2
commit
c2837af089
59 files changed
+4920
-81
No files matched your search
@@ -0,0 +1,59 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Heimdall.Application.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// A global application setting visible to all agents unless overridden.
|
||||
/// </summary>
|
||||
public sealed record AppSettingDto(
|
||||
[property: JsonPropertyName("id")] Guid Id,
|
||||
[property: JsonPropertyName("key")] string Key,
|
||||
[property: JsonPropertyName("value")] string Value,
|
||||
[property: JsonPropertyName("description")] string? Description,
|
||||
[property: JsonPropertyName("category")] string Category,
|
||||
[property: JsonPropertyName("valueType")] string ValueType,
|
||||
[property: JsonPropertyName("allowedValues")] string? AllowedValues,
|
||||
[property: JsonPropertyName("updatedAt")] DateTime UpdatedAt
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Per-agent setting override.
|
||||
/// </summary>
|
||||
public sealed record AgentSettingDto(
|
||||
[property: JsonPropertyName("id")] Guid Id,
|
||||
[property: JsonPropertyName("agentId")] Guid AgentId,
|
||||
[property: JsonPropertyName("key")] string Key,
|
||||
[property: JsonPropertyName("value")] string Value,
|
||||
[property: JsonPropertyName("updatedAt")] DateTime UpdatedAt
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Request to create a new global setting.
|
||||
/// </summary>
|
||||
public sealed record CreateAppSettingRequest(
|
||||
[property: JsonPropertyName("key")] string Key,
|
||||
[property: JsonPropertyName("value")] string Value,
|
||||
[property: JsonPropertyName("category")] string Category = "General",
|
||||
[property: JsonPropertyName("description")] string? Description = null,
|
||||
[property: JsonPropertyName("valueType")] string ValueType = "string",
|
||||
[property: JsonPropertyName("allowedValues")] string? AllowedValues = null
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Request to update an existing global setting value.
|
||||
/// </summary>
|
||||
public sealed record UpdateAppSettingRequest(
|
||||
[property: JsonPropertyName("value")] string Value,
|
||||
[property: JsonPropertyName("description")] string? Description = null,
|
||||
[property: JsonPropertyName("category")] string? Category = null,
|
||||
[property: JsonPropertyName("valueType")] string? ValueType = null,
|
||||
[property: JsonPropertyName("allowedValues")] string? AllowedValues = null
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Request to set a per-agent setting override.
|
||||
/// </summary>
|
||||
public sealed record SetAgentSettingRequest(
|
||||
[property: JsonPropertyName("key")] string Key,
|
||||
[property: JsonPropertyName("value")] string Value
|
||||
);
|
||||
Reference in new issue
Block a user