using System.Text.Json.Serialization; namespace Heimdall.Application.DTOs; /// /// A global application setting visible to all agents unless overridden. /// 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, [property: JsonPropertyName("agentScoped")] bool AgentScoped = true ); /// /// Per-agent setting override. /// 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 ); /// /// Request to create a new global setting. /// 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, [property: JsonPropertyName("agentScoped")] bool AgentScoped = true ); /// /// Request to update an existing global setting value. /// 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, [property: JsonPropertyName("agentScoped")] bool? AgentScoped = null ); /// /// Request to set a per-agent setting override. /// public sealed record SetAgentSettingRequest( [property: JsonPropertyName("key")] string Key, [property: JsonPropertyName("value")] string Value );