Module: Zavudev::Models::WebhookEvent

Extended by:
Internal::Type::Enum
Defined in:
lib/zavudev/models/webhook_event.rb,
sig/zavudev/models/webhook_event.rbs

Overview

Type of event that triggers the webhook.

Message lifecycle events:

  • message.queued: Message created and queued for sending. data.status = queued
  • message.sent: Message accepted by the provider. data.status = sent
  • message.delivered: Message delivered to recipient. data.status = delivered
  • message.read: Message was read by the recipient (WhatsApp only). data.status = read
  • message.failed: Message failed to send. data.status = failed

Inbound events:

  • message.inbound: New message received from a contact. Reactions are delivered as message.inbound with messageType='reaction'. When the contact replied to (quoted) an earlier message, data.content carries the reply context: replyToMessageId, replyToProviderMessageId, replyToFrom, replyToText, and replyToMessageType. data.providerTimestamp is the provider's original receive time in Unix milliseconds (the moment the channel received the message from the contact — WhatsApp, Telegram, Instagram, Messenger; null for SMS and email). Compare it against the top-level timestamp (when Zavu dispatched the webhook) to detect and ignore delayed deliveries.
  • message.unsupported: Received a message type that is not supported

Broadcast events:

  • broadcast.status_changed: Broadcast status changed (pending_review, approved, rejected, sending, completed, cancelled)

Other events:

  • conversation.new: New conversation started with a contact
  • template.status_changed: WhatsApp template approval status changed

Partner events:

  • invitation.status_changed: A partner invitation status changed (pending, in_progress, completed, cancelled)

Custom domain events:

  • domain.verified: A custom email domain passed verification (DKIM, and SPF/DMARC/MAIL FROM if enhanced records are enabled)
  • domain.failed: A custom email domain failed verification or is partially verified

Constant Summary collapse

MESSAGE_QUEUED =

Returns:

  • (:"message.queued")
:"message.queued"
MESSAGE_SENT =

Returns:

  • (:"message.sent")
:"message.sent"
MESSAGE_DELIVERED =

Returns:

  • (:"message.delivered")
:"message.delivered"
MESSAGE_READ =

Returns:

  • (:"message.read")
:"message.read"
MESSAGE_FAILED =

Returns:

  • (:"message.failed")
:"message.failed"
MESSAGE_INBOUND =

Returns:

  • (:"message.inbound")
:"message.inbound"
MESSAGE_UNSUPPORTED =

Returns:

  • (:"message.unsupported")
:"message.unsupported"
BROADCAST_STATUS_CHANGED =

Returns:

  • (:"broadcast.status_changed")
:"broadcast.status_changed"
CONVERSATION_NEW =

Returns:

  • (:"conversation.new")
:"conversation.new"
TEMPLATE_STATUS_CHANGED =

Returns:

  • (:"template.status_changed")
:"template.status_changed"
INVITATION_STATUS_CHANGED =

Returns:

  • (:"invitation.status_changed")
:"invitation.status_changed"
DOMAIN_VERIFIED =

Returns:

  • (:"domain.verified")
:"domain.verified"
DOMAIN_FAILED =

Returns:

  • (:"domain.failed")
:"domain.failed"

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::Enum

==, ===, coerce, dump, hash, inspect, to_sorbet_type, values

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/zavudev/models/webhook_event.rb', line 70

Instance Method Details

#self?.values::Array[Zavudev::Models::webhook_event]

Returns:

  • (::Array[Zavudev::Models::webhook_event])


35
# File 'sig/zavudev/models/webhook_event.rbs', line 35

def self?.values: -> ::Array[Zavudev::Models::webhook_event]