zavudev 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0950796060af0403bdc55fe702c2ca0e1dccc89b62dad96f07fd2091c09a8e84'
4
- data.tar.gz: '09a3b580f8bfcd5b9c1ebe6fc476c9ecca06a0a43b7bf902c4f4f143c80a5cf2'
3
+ metadata.gz: ac627d26a28d5901c971cff42e8d371b2d3d7dd0e33cce968fec7ed022b5e313
4
+ data.tar.gz: 8ae1361683e68009bdf39773686a547d8b52e9f09a03c51bc5cf0760e94cb2cd
5
5
  SHA512:
6
- metadata.gz: 2b0d38348c027224bcbb54238392f4f923e1b8d904f30048bdceca9bc0a0cc07794c34199c15b9ac9d853877afb02de7197623493e3472c27abc0db0d3f31ca3
7
- data.tar.gz: 3f888722850154270aeb1d7dff45e8501f42f4d47293310f64b95a5f71b7892f39b9cc95e1a7bfd0faa58875244199f88a38f283bb0d74f09750de607b70cfd9
6
+ metadata.gz: 8d404f2e36a900ead47771f278bc535196df248578a09eb2e1f60aee91b748c3715dff3c54b69583d243d8b5f6552eeeb9cc33e47d9d6af432bfce1acb2a7d59
7
+ data.tar.gz: a1bcb630fc1cd3cd1211d21a2683cc5e643aca7cf13b192df10ec38c42ca806844e4ec5c100c6354c2b141db05b3ba64f1a06c0008a76531df68b0c64e1ca8f1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.19.0 (2026-07-23)
4
+
5
+ Full Changelog: [v0.18.0...v0.19.0](https://github.com/zavudev/sdk-ruby/compare/v0.18.0...v0.19.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([e230076](https://github.com/zavudev/sdk-ruby/commit/e230076406ec38c134526941aaf8c13c0538d3f6))
10
+ * **api:** api update ([901e2c2](https://github.com/zavudev/sdk-ruby/commit/901e2c29b4d1dbd840571683072bebbb17793e34))
11
+ * **api:** api update ([e3e62c2](https://github.com/zavudev/sdk-ruby/commit/e3e62c2e9e5e9b7f1c7ffc15a0fb6553b290d7b3))
12
+ * **stlc:** configurable CI runner and private-production-repo support in workflow templates ([e3cd9e9](https://github.com/zavudev/sdk-ruby/commit/e3cd9e94605059e0af8bef2b856805ef59bcdf30))
13
+
3
14
  ## 0.18.0 (2026-07-15)
4
15
 
5
16
  Full Changelog: [v0.17.0...v0.18.0](https://github.com/zavudev/sdk-ruby/compare/v0.17.0...v0.18.0)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "zavudev", "~> 0.18.0"
29
+ gem "zavudev", "~> 0.19.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -2,10 +2,7 @@
2
2
 
3
3
  module Zavudev
4
4
  module Models
5
- # Delivery channel. Use 'auto' for intelligent routing. `whatsapp_alt` is the
6
- # QR-linked WhatsApp channel and is only accepted for teams with the WhatsApp
7
- # Alternative feature enabled; the sender must have a connected whatsapp_alt
8
- # session.
5
+ # Delivery channel. Use 'auto' for intelligent routing.
9
6
  module Channel
10
7
  extend Zavudev::Internal::Type::Enum
11
8
 
@@ -13,7 +10,6 @@ module Zavudev
13
10
  SMS = :sms
14
11
  SMS_ONEWAY = :sms_oneway
15
12
  WHATSAPP = :whatsapp
16
- WHATSAPP_ALT = :whatsapp_alt
17
13
  TELEGRAM = :telegram
18
14
  EMAIL = :email
19
15
  INSTAGRAM = :instagram
@@ -64,7 +64,7 @@ module Zavudev
64
64
 
65
65
  # @!attribute connection_type
66
66
  # How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
67
- # embedded signup) or `whatsapp_alt` (QR-linked).
67
+ # embedded signup).
68
68
  #
69
69
  # @return [Symbol, Zavudev::Models::Invitation::ConnectionType, nil]
70
70
  optional :connection_type, enum: -> { Zavudev::Invitation::ConnectionType }, api_name: :connectionType
@@ -144,14 +144,13 @@ module Zavudev
144
144
  end
145
145
 
146
146
  # How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
147
- # embedded signup) or `whatsapp_alt` (QR-linked).
147
+ # embedded signup).
148
148
  #
149
149
  # @see Zavudev::Models::Invitation#connection_type
150
150
  module ConnectionType
151
151
  extend Zavudev::Internal::Type::Enum
152
152
 
153
153
  WHATSAPP_WABA = :whatsapp_waba
154
- WHATSAPP_ALT = :whatsapp_alt
155
154
 
156
155
  # @!method self.values
157
156
  # @return [Array<Symbol>]
@@ -35,9 +35,7 @@ module Zavudev
35
35
 
36
36
  # @!attribute connection_type
37
37
  # How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
38
- # signup to link an official WhatsApp Business Account. `whatsapp_alt` links the
39
- # number by scanning a QR code — available only to teams with the WhatsApp
40
- # Alternative feature enabled.
38
+ # signup to link an official WhatsApp Business Account.
41
39
  #
42
40
  # @return [Symbol, Zavudev::Models::InvitationCreateParams::ConnectionType, nil]
43
41
  optional :connection_type,
@@ -78,14 +76,11 @@ module Zavudev
78
76
  # @param request_options [Zavudev::RequestOptions, Hash{Symbol=>Object}]
79
77
 
80
78
  # How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
81
- # signup to link an official WhatsApp Business Account. `whatsapp_alt` links the
82
- # number by scanning a QR code — available only to teams with the WhatsApp
83
- # Alternative feature enabled.
79
+ # signup to link an official WhatsApp Business Account.
84
80
  module ConnectionType
85
81
  extend Zavudev::Internal::Type::Enum
86
82
 
87
83
  WHATSAPP_WABA = :whatsapp_waba
88
- WHATSAPP_ALT = :whatsapp_alt
89
84
 
90
85
  # @!method self.values
91
86
  # @return [Array<Symbol>]
@@ -10,10 +10,7 @@ module Zavudev
10
10
  required :id, String
11
11
 
12
12
  # @!attribute channel
13
- # Delivery channel. Use 'auto' for intelligent routing. `whatsapp_alt` is the
14
- # QR-linked WhatsApp channel and is only accepted for teams with the WhatsApp
15
- # Alternative feature enabled; the sender must have a connected whatsapp_alt
16
- # session.
13
+ # Delivery channel. Use 'auto' for intelligent routing.
17
14
  #
18
15
  # @return [Symbol, Zavudev::Models::Channel]
19
16
  required :channel, enum: -> { Zavudev::Channel }
@@ -46,6 +43,15 @@ module Zavudev
46
43
  # @return [Zavudev::Models::MessageContent, nil]
47
44
  optional :content, -> { Zavudev::MessageContent }
48
45
 
46
+ # @!attribute conversation_id
47
+ # ID of the conversation (inbox thread) this message belongs to. Use it to build a
48
+ # direct dashboard link:
49
+ # `https://dashboard.zavu.dev/{locale}/inbox?conv={conversationId}`. Omitted only
50
+ # on legacy messages created before conversation threading.
51
+ #
52
+ # @return [String, nil]
53
+ optional :conversation_id, String, api_name: :conversationId
54
+
49
55
  # @!attribute cost
50
56
  # Zavu platform charge in USD for this message. Messaging is billed against your
51
57
  # plan's monthly limits plus usage-based overage.
@@ -107,13 +113,13 @@ module Zavudev
107
113
  # @return [Time, nil]
108
114
  optional :updated_at, Time, api_name: :updatedAt
109
115
 
110
- # @!method initialize(id:, channel:, created_at:, message_type:, status:, to:, content: nil, cost: nil, cost_provider: nil, cost_total: nil, error_code: nil, error_message: nil, from: nil, metadata: nil, provider_message_id: nil, sender_id: nil, text: nil, updated_at: nil)
116
+ # @!method initialize(id:, channel:, created_at:, message_type:, status:, to:, content: nil, conversation_id: nil, cost: nil, cost_provider: nil, cost_total: nil, error_code: nil, error_message: nil, from: nil, metadata: nil, provider_message_id: nil, sender_id: nil, text: nil, updated_at: nil)
111
117
  # Some parameter documentations has been truncated, see {Zavudev::Models::Message}
112
118
  # for more details.
113
119
  #
114
120
  # @param id [String]
115
121
  #
116
- # @param channel [Symbol, Zavudev::Models::Channel] Delivery channel. Use 'auto' for intelligent routing. `whatsapp_alt` is the QR-l
122
+ # @param channel [Symbol, Zavudev::Models::Channel] Delivery channel. Use 'auto' for intelligent routing.
117
123
  #
118
124
  # @param created_at [Time]
119
125
  #
@@ -125,6 +131,8 @@ module Zavudev
125
131
  #
126
132
  # @param content [Zavudev::Models::MessageContent] Content for non-text message types (WhatsApp and Telegram).
127
133
  #
134
+ # @param conversation_id [String] ID of the conversation (inbox thread) this message belongs to. Use it to build a
135
+ #
128
136
  # @param cost [Float, nil] Zavu platform charge in USD for this message. Messaging is billed against your p
129
137
  #
130
138
  # @param cost_provider [Float, nil] Carrier and delivery cost in USD.
@@ -9,13 +9,10 @@ module Zavudev
9
9
 
10
10
  # @!attribute to
11
11
  # Recipient phone number in E.164 format, email address, WhatsApp business-scoped
12
- # user ID (BSUID, e.g. `US.13491208655302741918`), WhatsApp group JID
13
- # (`<id>@g.us`, e.g. `120363000000000000@g.us`), or numeric chat ID (for
12
+ # user ID (BSUID, e.g. `US.13491208655302741918`), or numeric chat ID (for
14
13
  # Telegram/Instagram/Messenger). A BSUID is routed to WhatsApp and sent via the
15
14
  # `recipient` field; use it to message a contact who adopted a username and whose
16
- # phone number is hidden. A group JID is only valid on the `whatsapp_alt` channel
17
- # and supports text and media (image, video, audio, document, sticker, location,
18
- # contact).
15
+ # phone number is hidden.
19
16
  #
20
17
  # @return [String]
21
18
  required :to, String
@@ -17,22 +17,21 @@ module Zavudev
17
17
  #
18
18
  # **Inbound events:**
19
19
  #
20
- # - `message.inbound`: New message received from a contact. Reactions are
21
- # delivered as `message.inbound` with `messageType='reaction'`. When the contact
22
- # replied to (quoted) an earlier message, `data.content` carries the reply
23
- # context: `replyToMessageId`, `replyToProviderMessageId`, `replyToFrom`,
24
- # `replyToText`, and `replyToMessageType`. `data.providerTimestamp` is the
25
- # provider's original receive time in Unix milliseconds (the moment the channel
26
- # received the message from the contact WhatsApp, Telegram, Instagram,
27
- # Messenger; `null` for SMS and email). Compare it against the top-level
28
- # `timestamp` (when Zavu dispatched the webhook) to detect and ignore delayed
29
- # deliveries.
30
- # - `message.status`: A contact posted a WhatsApp status/story (currently WhatsApp
31
- # Alternative only). It is NOT a conversation message and never enters the inbox
32
- # it is delivered only if you subscribe to `message.status`. `data` carries
33
- # `from` (the author in E.164), `messageType` (`text`, `image`, `video`,
34
- # `audio`), `text` (caption/text when present), `mimetype` (for media stories),
35
- # and `providerTimestamp`. Media bytes are not included.
20
+ # - `message.inbound`: New message received from a contact. `data.conversationId`
21
+ # is the inbox thread id (deep-link with
22
+ # `https://dashboard.zavu.dev/{locale}/inbox?conv={conversationId}`); it is
23
+ # `null` while the conversation row is still being created (the first message of
24
+ # a brand-new thread, or several near-simultaneous first messages), where
25
+ # `conversation.new` carries the id instead `GET /v1/messages/{messageId}`
26
+ # always has it. Reactions are delivered as `message.inbound` with
27
+ # `messageType='reaction'`. When the contact replied to (quoted) an earlier
28
+ # message, `data.content` carries the reply context: `replyToMessageId`,
29
+ # `replyToProviderMessageId`, `replyToFrom`, `replyToText`, and
30
+ # `replyToMessageType`. `data.providerTimestamp` is the provider's original
31
+ # receive time in Unix milliseconds (the moment the channel received the message
32
+ # from the contact WhatsApp, Telegram, Instagram, Messenger; `null` for SMS
33
+ # and email). Compare it against the top-level `timestamp` (when Zavu dispatched
34
+ # the webhook) to detect and ignore delayed deliveries.
36
35
  # - `message.unsupported`: Received a message type that is not supported
37
36
  #
38
37
  # **Broadcast events:**
@@ -42,7 +41,11 @@ module Zavudev
42
41
  #
43
42
  # **Other events:**
44
43
  #
45
- # - `conversation.new`: New conversation started with a contact
44
+ # - `conversation.new`: New conversation started with a contact. `data` carries
45
+ # `conversationId` (the inbox thread id — deep-link with
46
+ # `https://dashboard.zavu.dev/{locale}/inbox?conv={conversationId}`), the
47
+ # `phoneNumber` or `email` key, `channel`, `firstMessageId`, `firstMessageText`,
48
+ # and `profileName`.
46
49
  # - `template.status_changed`: WhatsApp template approval status changed
47
50
  #
48
51
  # **Partner events:**
@@ -65,7 +68,6 @@ module Zavudev
65
68
  MESSAGE_READ = :"message.read"
66
69
  MESSAGE_FAILED = :"message.failed"
67
70
  MESSAGE_INBOUND = :"message.inbound"
68
- MESSAGE_STATUS = :"message.status"
69
71
  MESSAGE_UNSUPPORTED = :"message.unsupported"
70
72
  BROADCAST_STATUS_CHANGED = :"broadcast.status_changed"
71
73
  CONVERSATION_NEW = :"conversation.new"
@@ -7,17 +7,10 @@ module Zavudev
7
7
  # {Zavudev::Models::InvitationCreateParams} for more details.
8
8
  #
9
9
  # Create a partner invitation link for a client to connect WhatsApp. The client
10
- # opens the returned `url` and connects. Set `connectionType` to choose how they
11
- # connect:
12
- #
13
- # - `whatsapp_waba` (default): the client completes Meta's embedded signup,
14
- # linking an official WhatsApp Business Account.
15
- # - `whatsapp_alt`: the client links their number by scanning a QR code. Requires
16
- # the WhatsApp Alternative feature to be enabled for your team (otherwise
17
- # returns 400).
18
- #
19
- # Either way, the resulting sender is created in your project when the client
20
- # completes the flow, and the invitation transitions to `completed`.
10
+ # opens the returned `url` and completes Meta's embedded signup, linking an
11
+ # official WhatsApp Business Account. The resulting sender is created in your
12
+ # project when the client completes the flow, and the invitation transitions to
13
+ # `completed`.
21
14
  #
22
15
  # @overload create(allowed_phone_countries: nil, client_email: nil, client_name: nil, client_phone: nil, connection_type: nil, expires_in_days: nil, phone_number_id: nil, request_options: {})
23
16
  #
@@ -107,6 +107,17 @@ module Zavudev
107
107
  # - Unverified accounts: 200 messages per channel per day
108
108
  # - Complete KYC verification to increase limits to 10,000/day
109
109
  #
110
+ # **Email recipient pre-flight:** Email messages are validated automatically
111
+ # before dispatch. Sends that would be a guaranteed hard bounce are failed instead
112
+ # of sent, protecting your bounce rate: the message transitions to `failed`
113
+ # (visible via `GET /v1/messages/{messageId}` and the `message.failed` webhook)
114
+ # with `errorCode` set to `EMAIL_INVALID_RECIPIENT` (malformed address),
115
+ # `EMAIL_DOMAIN_NOT_FOUND` (recipient domain has no MX or A records), or
116
+ # `EMAIL_RECIPIENT_SUPPRESSED` (address is on your suppression list after a
117
+ # previous bounce or complaint). Advisory signals (role addresses, disposable
118
+ # domains) do not block sends — check them beforehand with
119
+ # `POST /v1/introspect/email`.
120
+ #
110
121
  # @overload send_(to:, attachments: nil, channel: nil, content: nil, fallback_enabled: nil, html_body: nil, idempotency_key: nil, message_type: nil, metadata: nil, reply_to: nil, subject: nil, text: nil, voice_language: nil, zavu_sender: nil, request_options: {})
111
122
  #
112
123
  # @param to [String] Body param: Recipient phone number in E.164 format, email address, WhatsApp busi
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Zavudev
4
- VERSION = "0.18.0"
4
+ VERSION = "0.19.0"
5
5
  end
@@ -2,10 +2,7 @@
2
2
 
3
3
  module Zavudev
4
4
  module Models
5
- # Delivery channel. Use 'auto' for intelligent routing. `whatsapp_alt` is the
6
- # QR-linked WhatsApp channel and is only accepted for teams with the WhatsApp
7
- # Alternative feature enabled; the sender must have a connected whatsapp_alt
8
- # session.
5
+ # Delivery channel. Use 'auto' for intelligent routing.
9
6
  module Channel
10
7
  extend Zavudev::Internal::Type::Enum
11
8
 
@@ -16,7 +13,6 @@ module Zavudev
16
13
  SMS = T.let(:sms, Zavudev::Channel::TaggedSymbol)
17
14
  SMS_ONEWAY = T.let(:sms_oneway, Zavudev::Channel::TaggedSymbol)
18
15
  WHATSAPP = T.let(:whatsapp, Zavudev::Channel::TaggedSymbol)
19
- WHATSAPP_ALT = T.let(:whatsapp_alt, Zavudev::Channel::TaggedSymbol)
20
16
  TELEGRAM = T.let(:telegram, Zavudev::Channel::TaggedSymbol)
21
17
  EMAIL = T.let(:email, Zavudev::Channel::TaggedSymbol)
22
18
  INSTAGRAM = T.let(:instagram, Zavudev::Channel::TaggedSymbol)
@@ -43,7 +43,7 @@ module Zavudev
43
43
  attr_accessor :completed_at
44
44
 
45
45
  # How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
46
- # embedded signup) or `whatsapp_alt` (QR-linked).
46
+ # embedded signup).
47
47
  sig do
48
48
  returns(T.nilable(Zavudev::Invitation::ConnectionType::TaggedSymbol))
49
49
  end
@@ -106,7 +106,7 @@ module Zavudev
106
106
  client_phone: nil,
107
107
  completed_at: nil,
108
108
  # How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
109
- # embedded signup) or `whatsapp_alt` (QR-linked).
109
+ # embedded signup).
110
110
  connection_type: nil,
111
111
  # ID of a pre-assigned Zavu phone number for WhatsApp registration.
112
112
  phone_number_id: nil,
@@ -165,7 +165,7 @@ module Zavudev
165
165
  end
166
166
 
167
167
  # How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
168
- # embedded signup) or `whatsapp_alt` (QR-linked).
168
+ # embedded signup).
169
169
  module ConnectionType
170
170
  extend Zavudev::Internal::Type::Enum
171
171
 
@@ -178,11 +178,6 @@ module Zavudev
178
178
  :whatsapp_waba,
179
179
  Zavudev::Invitation::ConnectionType::TaggedSymbol
180
180
  )
181
- WHATSAPP_ALT =
182
- T.let(
183
- :whatsapp_alt,
184
- Zavudev::Invitation::ConnectionType::TaggedSymbol
185
- )
186
181
 
187
182
  sig do
188
183
  override.returns(
@@ -40,9 +40,7 @@ module Zavudev
40
40
  attr_writer :client_phone
41
41
 
42
42
  # How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
43
- # signup to link an official WhatsApp Business Account. `whatsapp_alt` links the
44
- # number by scanning a QR code — available only to teams with the WhatsApp
45
- # Alternative feature enabled.
43
+ # signup to link an official WhatsApp Business Account.
46
44
  sig do
47
45
  returns(
48
46
  T.nilable(Zavudev::InvitationCreateParams::ConnectionType::OrSymbol)
@@ -96,9 +94,7 @@ module Zavudev
96
94
  # Phone number of the client in E.164 format.
97
95
  client_phone: nil,
98
96
  # How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
99
- # signup to link an official WhatsApp Business Account. `whatsapp_alt` links the
100
- # number by scanning a QR code — available only to teams with the WhatsApp
101
- # Alternative feature enabled.
97
+ # signup to link an official WhatsApp Business Account.
102
98
  connection_type: nil,
103
99
  # Number of days until the invitation expires.
104
100
  expires_in_days: nil,
@@ -128,9 +124,7 @@ module Zavudev
128
124
  end
129
125
 
130
126
  # How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
131
- # signup to link an official WhatsApp Business Account. `whatsapp_alt` links the
132
- # number by scanning a QR code — available only to teams with the WhatsApp
133
- # Alternative feature enabled.
127
+ # signup to link an official WhatsApp Business Account.
134
128
  module ConnectionType
135
129
  extend Zavudev::Internal::Type::Enum
136
130
 
@@ -145,11 +139,6 @@ module Zavudev
145
139
  :whatsapp_waba,
146
140
  Zavudev::InvitationCreateParams::ConnectionType::TaggedSymbol
147
141
  )
148
- WHATSAPP_ALT =
149
- T.let(
150
- :whatsapp_alt,
151
- Zavudev::InvitationCreateParams::ConnectionType::TaggedSymbol
152
- )
153
142
 
154
143
  sig do
155
144
  override.returns(
@@ -9,10 +9,7 @@ module Zavudev
9
9
  sig { returns(String) }
10
10
  attr_accessor :id
11
11
 
12
- # Delivery channel. Use 'auto' for intelligent routing. `whatsapp_alt` is the
13
- # QR-linked WhatsApp channel and is only accepted for teams with the WhatsApp
14
- # Alternative feature enabled; the sender must have a connected whatsapp_alt
15
- # session.
12
+ # Delivery channel. Use 'auto' for intelligent routing.
16
13
  sig { returns(Zavudev::Channel::TaggedSymbol) }
17
14
  attr_accessor :channel
18
15
 
@@ -37,6 +34,16 @@ module Zavudev
37
34
  sig { params(content: Zavudev::MessageContent::OrHash).void }
38
35
  attr_writer :content
39
36
 
37
+ # ID of the conversation (inbox thread) this message belongs to. Use it to build a
38
+ # direct dashboard link:
39
+ # `https://dashboard.zavu.dev/{locale}/inbox?conv={conversationId}`. Omitted only
40
+ # on legacy messages created before conversation threading.
41
+ sig { returns(T.nilable(String)) }
42
+ attr_reader :conversation_id
43
+
44
+ sig { params(conversation_id: String).void }
45
+ attr_writer :conversation_id
46
+
40
47
  # Zavu platform charge in USD for this message. Messaging is billed against your
41
48
  # plan's monthly limits plus usage-based overage.
42
49
  sig { returns(T.nilable(Float)) }
@@ -103,6 +110,7 @@ module Zavudev
103
110
  status: Zavudev::MessageStatus::OrSymbol,
104
111
  to: String,
105
112
  content: Zavudev::MessageContent::OrHash,
113
+ conversation_id: String,
106
114
  cost: T.nilable(Float),
107
115
  cost_provider: T.nilable(Float),
108
116
  cost_total: T.nilable(Float),
@@ -118,10 +126,7 @@ module Zavudev
118
126
  end
119
127
  def self.new(
120
128
  id:,
121
- # Delivery channel. Use 'auto' for intelligent routing. `whatsapp_alt` is the
122
- # QR-linked WhatsApp channel and is only accepted for teams with the WhatsApp
123
- # Alternative feature enabled; the sender must have a connected whatsapp_alt
124
- # session.
129
+ # Delivery channel. Use 'auto' for intelligent routing.
125
130
  channel:,
126
131
  created_at:,
127
132
  # Type of message. Non-text types are supported by WhatsApp and Telegram (varies
@@ -131,6 +136,11 @@ module Zavudev
131
136
  to:,
132
137
  # Content for non-text message types (WhatsApp and Telegram).
133
138
  content: nil,
139
+ # ID of the conversation (inbox thread) this message belongs to. Use it to build a
140
+ # direct dashboard link:
141
+ # `https://dashboard.zavu.dev/{locale}/inbox?conv={conversationId}`. Omitted only
142
+ # on legacy messages created before conversation threading.
143
+ conversation_id: nil,
134
144
  # Zavu platform charge in USD for this message. Messaging is billed against your
135
145
  # plan's monthly limits plus usage-based overage.
136
146
  cost: nil,
@@ -161,6 +171,7 @@ module Zavudev
161
171
  status: Zavudev::MessageStatus::TaggedSymbol,
162
172
  to: String,
163
173
  content: Zavudev::MessageContent,
174
+ conversation_id: String,
164
175
  cost: T.nilable(Float),
165
176
  cost_provider: T.nilable(Float),
166
177
  cost_total: T.nilable(Float),
@@ -12,13 +12,10 @@ module Zavudev
12
12
  end
13
13
 
14
14
  # Recipient phone number in E.164 format, email address, WhatsApp business-scoped
15
- # user ID (BSUID, e.g. `US.13491208655302741918`), WhatsApp group JID
16
- # (`<id>@g.us`, e.g. `120363000000000000@g.us`), or numeric chat ID (for
15
+ # user ID (BSUID, e.g. `US.13491208655302741918`), or numeric chat ID (for
17
16
  # Telegram/Instagram/Messenger). A BSUID is routed to WhatsApp and sent via the
18
17
  # `recipient` field; use it to message a contact who adopted a username and whose
19
- # phone number is hidden. A group JID is only valid on the `whatsapp_alt` channel
20
- # and supports text and media (image, video, audio, document, sticker, location,
21
- # contact).
18
+ # phone number is hidden.
22
19
  sig { returns(String) }
23
20
  attr_accessor :to
24
21
 
@@ -145,13 +142,10 @@ module Zavudev
145
142
  end
146
143
  def self.new(
147
144
  # Recipient phone number in E.164 format, email address, WhatsApp business-scoped
148
- # user ID (BSUID, e.g. `US.13491208655302741918`), WhatsApp group JID
149
- # (`<id>@g.us`, e.g. `120363000000000000@g.us`), or numeric chat ID (for
145
+ # user ID (BSUID, e.g. `US.13491208655302741918`), or numeric chat ID (for
150
146
  # Telegram/Instagram/Messenger). A BSUID is routed to WhatsApp and sent via the
151
147
  # `recipient` field; use it to message a contact who adopted a username and whose
152
- # phone number is hidden. A group JID is only valid on the `whatsapp_alt` channel
153
- # and supports text and media (image, video, audio, document, sticker, location,
154
- # contact).
148
+ # phone number is hidden.
155
149
  to:,
156
150
  # Email attachments. Only supported when channel is 'email'. Maximum 40MB total
157
151
  # size.
@@ -17,22 +17,21 @@ module Zavudev
17
17
  #
18
18
  # **Inbound events:**
19
19
  #
20
- # - `message.inbound`: New message received from a contact. Reactions are
21
- # delivered as `message.inbound` with `messageType='reaction'`. When the contact
22
- # replied to (quoted) an earlier message, `data.content` carries the reply
23
- # context: `replyToMessageId`, `replyToProviderMessageId`, `replyToFrom`,
24
- # `replyToText`, and `replyToMessageType`. `data.providerTimestamp` is the
25
- # provider's original receive time in Unix milliseconds (the moment the channel
26
- # received the message from the contact WhatsApp, Telegram, Instagram,
27
- # Messenger; `null` for SMS and email). Compare it against the top-level
28
- # `timestamp` (when Zavu dispatched the webhook) to detect and ignore delayed
29
- # deliveries.
30
- # - `message.status`: A contact posted a WhatsApp status/story (currently WhatsApp
31
- # Alternative only). It is NOT a conversation message and never enters the inbox
32
- # it is delivered only if you subscribe to `message.status`. `data` carries
33
- # `from` (the author in E.164), `messageType` (`text`, `image`, `video`,
34
- # `audio`), `text` (caption/text when present), `mimetype` (for media stories),
35
- # and `providerTimestamp`. Media bytes are not included.
20
+ # - `message.inbound`: New message received from a contact. `data.conversationId`
21
+ # is the inbox thread id (deep-link with
22
+ # `https://dashboard.zavu.dev/{locale}/inbox?conv={conversationId}`); it is
23
+ # `null` while the conversation row is still being created (the first message of
24
+ # a brand-new thread, or several near-simultaneous first messages), where
25
+ # `conversation.new` carries the id instead `GET /v1/messages/{messageId}`
26
+ # always has it. Reactions are delivered as `message.inbound` with
27
+ # `messageType='reaction'`. When the contact replied to (quoted) an earlier
28
+ # message, `data.content` carries the reply context: `replyToMessageId`,
29
+ # `replyToProviderMessageId`, `replyToFrom`, `replyToText`, and
30
+ # `replyToMessageType`. `data.providerTimestamp` is the provider's original
31
+ # receive time in Unix milliseconds (the moment the channel received the message
32
+ # from the contact WhatsApp, Telegram, Instagram, Messenger; `null` for SMS
33
+ # and email). Compare it against the top-level `timestamp` (when Zavu dispatched
34
+ # the webhook) to detect and ignore delayed deliveries.
36
35
  # - `message.unsupported`: Received a message type that is not supported
37
36
  #
38
37
  # **Broadcast events:**
@@ -42,7 +41,11 @@ module Zavudev
42
41
  #
43
42
  # **Other events:**
44
43
  #
45
- # - `conversation.new`: New conversation started with a contact
44
+ # - `conversation.new`: New conversation started with a contact. `data` carries
45
+ # `conversationId` (the inbox thread id — deep-link with
46
+ # `https://dashboard.zavu.dev/{locale}/inbox?conv={conversationId}`), the
47
+ # `phoneNumber` or `email` key, `channel`, `firstMessageId`, `firstMessageText`,
48
+ # and `profileName`.
46
49
  # - `template.status_changed`: WhatsApp template approval status changed
47
50
  #
48
51
  # **Partner events:**
@@ -72,8 +75,6 @@ module Zavudev
72
75
  T.let(:"message.failed", Zavudev::WebhookEvent::TaggedSymbol)
73
76
  MESSAGE_INBOUND =
74
77
  T.let(:"message.inbound", Zavudev::WebhookEvent::TaggedSymbol)
75
- MESSAGE_STATUS =
76
- T.let(:"message.status", Zavudev::WebhookEvent::TaggedSymbol)
77
78
  MESSAGE_UNSUPPORTED =
78
79
  T.let(:"message.unsupported", Zavudev::WebhookEvent::TaggedSymbol)
79
80
  BROADCAST_STATUS_CHANGED =
@@ -4,17 +4,10 @@ module Zavudev
4
4
  module Resources
5
5
  class Invitations
6
6
  # Create a partner invitation link for a client to connect WhatsApp. The client
7
- # opens the returned `url` and connects. Set `connectionType` to choose how they
8
- # connect:
9
- #
10
- # - `whatsapp_waba` (default): the client completes Meta's embedded signup,
11
- # linking an official WhatsApp Business Account.
12
- # - `whatsapp_alt`: the client links their number by scanning a QR code. Requires
13
- # the WhatsApp Alternative feature to be enabled for your team (otherwise
14
- # returns 400).
15
- #
16
- # Either way, the resulting sender is created in your project when the client
17
- # completes the flow, and the invitation transitions to `completed`.
7
+ # opens the returned `url` and completes Meta's embedded signup, linking an
8
+ # official WhatsApp Business Account. The resulting sender is created in your
9
+ # project when the client completes the flow, and the invitation transitions to
10
+ # `completed`.
18
11
  sig do
19
12
  params(
20
13
  allowed_phone_countries: T::Array[String],
@@ -38,9 +31,7 @@ module Zavudev
38
31
  # Phone number of the client in E.164 format.
39
32
  client_phone: nil,
40
33
  # How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
41
- # signup to link an official WhatsApp Business Account. `whatsapp_alt` links the
42
- # number by scanning a QR code — available only to teams with the WhatsApp
43
- # Alternative feature enabled.
34
+ # signup to link an official WhatsApp Business Account.
44
35
  connection_type: nil,
45
36
  # Number of days until the invitation expires.
46
37
  expires_in_days: nil,
@@ -75,6 +75,17 @@ module Zavudev
75
75
  #
76
76
  # - Unverified accounts: 200 messages per channel per day
77
77
  # - Complete KYC verification to increase limits to 10,000/day
78
+ #
79
+ # **Email recipient pre-flight:** Email messages are validated automatically
80
+ # before dispatch. Sends that would be a guaranteed hard bounce are failed instead
81
+ # of sent, protecting your bounce rate: the message transitions to `failed`
82
+ # (visible via `GET /v1/messages/{messageId}` and the `message.failed` webhook)
83
+ # with `errorCode` set to `EMAIL_INVALID_RECIPIENT` (malformed address),
84
+ # `EMAIL_DOMAIN_NOT_FOUND` (recipient domain has no MX or A records), or
85
+ # `EMAIL_RECIPIENT_SUPPRESSED` (address is on your suppression list after a
86
+ # previous bounce or complaint). Advisory signals (role addresses, disposable
87
+ # domains) do not block sends — check them beforehand with
88
+ # `POST /v1/introspect/email`.
78
89
  sig do
79
90
  params(
80
91
  to: String,
@@ -96,13 +107,10 @@ module Zavudev
96
107
  end
97
108
  def send_(
98
109
  # Body param: Recipient phone number in E.164 format, email address, WhatsApp
99
- # business-scoped user ID (BSUID, e.g. `US.13491208655302741918`), WhatsApp group
100
- # JID (`<id>@g.us`, e.g. `120363000000000000@g.us`), or numeric chat ID (for
101
- # Telegram/Instagram/Messenger). A BSUID is routed to WhatsApp and sent via the
102
- # `recipient` field; use it to message a contact who adopted a username and whose
103
- # phone number is hidden. A group JID is only valid on the `whatsapp_alt` channel
104
- # and supports text and media (image, video, audio, document, sticker, location,
105
- # contact).
110
+ # business-scoped user ID (BSUID, e.g. `US.13491208655302741918`), or numeric chat
111
+ # ID (for Telegram/Instagram/Messenger). A BSUID is routed to WhatsApp and sent
112
+ # via the `recipient` field; use it to message a contact who adopted a username
113
+ # and whose phone number is hidden.
106
114
  to:,
107
115
  # Body param: Email attachments. Only supported when channel is 'email'. Maximum
108
116
  # 40MB total size.
@@ -5,7 +5,6 @@ module Zavudev
5
5
  | :sms
6
6
  | :sms_oneway
7
7
  | :whatsapp
8
- | :whatsapp_alt
9
8
  | :telegram
10
9
  | :email
11
10
  | :instagram
@@ -19,7 +18,6 @@ module Zavudev
19
18
  SMS: :sms
20
19
  SMS_ONEWAY: :sms_oneway
21
20
  WHATSAPP: :whatsapp
22
- WHATSAPP_ALT: :whatsapp_alt
23
21
  TELEGRAM: :telegram
24
22
  EMAIL: :email
25
23
  INSTAGRAM: :instagram
@@ -109,13 +109,12 @@ module Zavudev
109
109
  def self?.values: -> ::Array[Zavudev::Models::Invitation::status]
110
110
  end
111
111
 
112
- type connection_type = :whatsapp_waba | :whatsapp_alt
112
+ type connection_type = :whatsapp_waba
113
113
 
114
114
  module ConnectionType
115
115
  extend Zavudev::Internal::Type::Enum
116
116
 
117
117
  WHATSAPP_WABA: :whatsapp_waba
118
- WHATSAPP_ALT: :whatsapp_alt
119
118
 
120
119
  def self?.values: -> ::Array[Zavudev::Models::Invitation::connection_type]
121
120
  end
@@ -68,13 +68,12 @@ module Zavudev
68
68
  request_options: Zavudev::RequestOptions
69
69
  }
70
70
 
71
- type connection_type = :whatsapp_waba | :whatsapp_alt
71
+ type connection_type = :whatsapp_waba
72
72
 
73
73
  module ConnectionType
74
74
  extend Zavudev::Internal::Type::Enum
75
75
 
76
76
  WHATSAPP_WABA: :whatsapp_waba
77
- WHATSAPP_ALT: :whatsapp_alt
78
77
 
79
78
  def self?.values: -> ::Array[Zavudev::Models::InvitationCreateParams::connection_type]
80
79
  end
@@ -9,6 +9,7 @@ module Zavudev
9
9
  status: Zavudev::Models::message_status,
10
10
  to: String,
11
11
  content: Zavudev::MessageContent,
12
+ conversation_id: String,
12
13
  cost: Float?,
13
14
  cost_provider: Float?,
14
15
  cost_total: Float?,
@@ -39,6 +40,10 @@ module Zavudev
39
40
 
40
41
  def content=: (Zavudev::MessageContent) -> Zavudev::MessageContent
41
42
 
43
+ attr_reader conversation_id: String?
44
+
45
+ def conversation_id=: (String) -> String
46
+
42
47
  attr_accessor cost: Float?
43
48
 
44
49
  attr_accessor cost_provider: Float?
@@ -81,6 +86,7 @@ module Zavudev
81
86
  status: Zavudev::Models::message_status,
82
87
  to: String,
83
88
  ?content: Zavudev::MessageContent,
89
+ ?conversation_id: String,
84
90
  ?cost: Float?,
85
91
  ?cost_provider: Float?,
86
92
  ?cost_total: Float?,
@@ -102,6 +108,7 @@ module Zavudev
102
108
  status: Zavudev::Models::message_status,
103
109
  to: String,
104
110
  content: Zavudev::MessageContent,
111
+ conversation_id: String,
105
112
  cost: Float?,
106
113
  cost_provider: Float?,
107
114
  cost_total: Float?,
@@ -7,7 +7,6 @@ module Zavudev
7
7
  | :"message.read"
8
8
  | :"message.failed"
9
9
  | :"message.inbound"
10
- | :"message.status"
11
10
  | :"message.unsupported"
12
11
  | :"broadcast.status_changed"
13
12
  | :"conversation.new"
@@ -25,7 +24,6 @@ module Zavudev
25
24
  MESSAGE_READ: :"message.read"
26
25
  MESSAGE_FAILED: :"message.failed"
27
26
  MESSAGE_INBOUND: :"message.inbound"
28
- MESSAGE_STATUS: :"message.status"
29
27
  MESSAGE_UNSUPPORTED: :"message.unsupported"
30
28
  BROADCAST_STATUS_CHANGED: :"broadcast.status_changed"
31
29
  CONVERSATION_NEW: :"conversation.new"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zavudev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zavudev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-07-16 00:00:00.000000000 Z
11
+ date: 2026-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi