Runbox.Scenario.OutputAction.V2.Incident (runbox v26.0.0)

View Source

Parameters for output action Incident.

The resulting output action creates an incident.

Summary

Types

t()

Incident

User actions that can be fired on the incident.

Types

severity()

@type severity() :: 1..4

t()

@type t() :: %Runbox.Scenario.OutputAction.V2.Incident{
  access_tags: [String.t()],
  actors:
    %{
      required(key :: String.t()) =>
        Runbox.Scenario.OutputAction.IncidentActor.t()
    }
    | nil,
  additional_attributes: map() | nil,
  future: [Runbox.Scenario.OutputAction.IncidentFuture.t()],
  history: [Runbox.Scenario.OutputAction.V2.IncidentHistory.t()],
  id: String.t(),
  resolved: boolean(),
  severity: severity(),
  status: String.t(),
  subject: Runbox.Scenario.OutputAction.interpolable(),
  type: String.t(),
  user_actions: user_actions() | nil
}

Incident

user_actions()

@type user_actions() :: %{optional(key :: String) => Joken.bearer_token()}

User actions that can be fired on the incident.

The value of a user action is a JWT obtained by calling Runbox.Scenario.UserAction.pack/3.

Each user action has a key by which it can later be referenced in Runbox.Scenario.OutputAction.V2.IncidentPatch and either modified or deleted.

Example

{:ok, action} = UserAction.pack("cam_actions", "close_incident", %{...})
%{"close" => action}