PushX.Test.Push (PushX v0.14.0)

Copy Markdown View Source

One recorded push. Fields:

  • :provider:apns | :fcm

  • :target — device token, or for FCM {:topic, name} / {:condition, expr}
  • :payload — the decoded wire payload PushX would have sent: for APNS the %{"aps" => ...} map, for FCM the %{"message" => ...} envelope
  • :opts — the send options after PushX.Message delivery fields were merged in (:topic, :push_type, :priority, :collapse_id, ...)
  • :instance — the named instance, or nil for the static configuration
  • :result — what the caller received ({:ok, %Response{}} or a stubbed error)
  • :id — the generated message id ("test-N"), also on the response
  • :sent_atDateTime of the send

Summary

Types

t()

@type t() :: %PushX.Test.Push{
  id: String.t(),
  instance: atom() | nil,
  opts: keyword(),
  payload: map(),
  provider: :apns | :fcm,
  result: {:ok, PushX.Response.t()} | {:error, PushX.Response.t()},
  sent_at: DateTime.t(),
  target: PushX.target()
}