LogpointApi.Data.EmailNotification (logpoint_api v2.2.0)

Copy Markdown View Source

Builder for email notification structs.

Wraps the Email Notification for Alert Rules API. Start with LogpointApi.email_notification/2 and pipe through the builder functions to set subject, template, and other options.

Summary

Types

t()

@type t() :: %LogpointApi.Data.EmailNotification{
  disable_search_link: boolean() | nil,
  dispatch_option: String.t() | nil,
  email_emails: [String.t()],
  email_subject: String.t() | nil,
  email_template: String.t() | nil,
  ids: [String.t()],
  logo_enable: boolean() | nil,
  logo_type: String.t() | nil,
  logo_value: String.t() | nil,
  notify_email: boolean() | nil,
  simple_view: boolean() | nil,
  threshold_option: String.t() | nil,
  threshold_value: number() | nil
}

Functions

disable_search_link(notif, disabled)

dispatch_option(notif, option)

logo(notif, type, value)

new(ids, emails)

notify_email(notif, enabled)

simple_view(notif, enabled)

subject(notif, subject)

template(notif, template)

threshold(notif, option, value)

to_map(notif)

Convert an EmailNotification struct into the flat map format expected by the Logpoint API.

validate(notif)

@spec validate(t()) :: :ok | {:error, [String.t()]}