feat: expand cockpit integrations and support workflows
Add Phoenix remote desktop, action connector, documentation engine, and gamification support. Refactor support-case processing and search/action UI, and update installer assets and dependencies.
This commit is contained in:
41
F4SD-ActionConnector/Models/ActionResult.cs
Normal file
41
F4SD-ActionConnector/Models/ActionResult.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System.Collections.Generic;
|
||||
using F4SD.ActionConnector.Enumerations;
|
||||
|
||||
namespace F4SD.ActionConnector.Models
|
||||
{
|
||||
public sealed class ActionResult
|
||||
{
|
||||
public string ActionId { get; set; }
|
||||
public ActionResultStatus Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// HTTP status code for HttpCall actions; null for other types.
|
||||
/// </summary>
|
||||
public int? HttpStatusCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Raw response body (HttpCall) or serialized output (QuickAction).
|
||||
/// </summary>
|
||||
public string RawResponse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Named fields extracted from the response via jsonPath mappings.
|
||||
/// Populated when DisplayInCockpit is true.
|
||||
/// </summary>
|
||||
public IDictionary<string, string> MappedFields { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Human-readable error message; set when Status is Failure.
|
||||
/// </summary>
|
||||
public string ErrorMessage { get; set; }
|
||||
|
||||
public static ActionResult Ok(string actionId, string rawResponse = null)
|
||||
=> new ActionResult { ActionId = actionId, Status = ActionResultStatus.Success, RawResponse = rawResponse };
|
||||
|
||||
public static ActionResult Fail(string actionId, string errorMessage)
|
||||
=> new ActionResult { ActionId = actionId, Status = ActionResultStatus.Failure, ErrorMessage = errorMessage };
|
||||
|
||||
public static ActionResult Skip(string actionId)
|
||||
=> new ActionResult { ActionId = actionId, Status = ActionResultStatus.Skipped };
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user