PushX.Test.Push (PushX v0.15.0)

Copy Markdown View Source

One recorded push. Fields:

  • :provider:apns | :fcm | :webpush

  • :target — device token, for FCM {:topic, name} / {:condition, expr}, for Web Push the subscription map
  • :payload — the decoded wire payload PushX would have sent: for APNS the %{"aps" => ...} map, for FCM the %{"message" => ...} envelope, for Web Push the plaintext (decoded JSON, or the raw binary) before encryption
  • :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 | :webpush,
  result: {:ok, PushX.Response.t()} | {:error, PushX.Response.t()},
  sent_at: DateTime.t(),
  target: PushX.target()
}