namespace WebhookServer.Core.Models; public sealed class EndpointConfig { public Guid Id { get; set; } = Guid.NewGuid(); public string Slug { get; set; } = ""; public string? Description { get; set; } public bool Enabled { get; set; } = true; public List AllowedClients { get; set; } = new(); public AuthMode AuthMode { get; set; } = AuthMode.None; public BearerOptions? Bearer { get; set; } public HmacOptions? Hmac { get; set; } public ExecutorType ExecutorType { get; set; } = ExecutorType.WindowsPowerShell; /// Path to a script file (.ps1, .bat, .cmd) when applicable. public string? ScriptPath { get; set; } /// Inline command body when no script file is used (PowerShell -Command, cmd /c). public string? InlineCommand { get; set; } /// Path to the executable when ExecutorType = Executable. public string? ExecutablePath { get; set; } /// Static argv prefix for Executable mode; the rendered ArgTemplate appends after. public List ExecutableArgs { get; set; } = new(); public string? WorkingDirectory { get; set; } public DataPassingOptions DataPassing { get; set; } = new(); public ResponseMode ResponseMode { get; set; } = ResponseMode.Sync; public int TimeoutSeconds { get; set; } = 60; /// If true, a non-zero process exit produces 502 in sync mode (default true). public bool FailOnNonZeroExit { get; set; } = true; /// If true, requests are processed one at a time per endpoint. public bool Serialize { get; set; } public CallbackConfig? Callback { get; set; } public RunAsConfig? RunAs { get; set; } }