zavudev 0.13.0 → 0.14.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.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/zavudev/internal/transport/base_client.rb +4 -1
  5. data/lib/zavudev/models/broadcast_channel.rb +1 -0
  6. data/lib/zavudev/models/channel.rb +1 -0
  7. data/lib/zavudev/models/contact.rb +1 -0
  8. data/lib/zavudev/models/contact_channel.rb +1 -0
  9. data/lib/zavudev/models/contact_create_params.rb +1 -0
  10. data/lib/zavudev/models/contact_update_params.rb +1 -0
  11. data/lib/zavudev/models/contacts/channel_add_params.rb +1 -0
  12. data/lib/zavudev/models/message_send_params.rb +1 -1
  13. data/lib/zavudev/models/webhook_event.rb +6 -1
  14. data/lib/zavudev/version.rb +1 -1
  15. data/rbi/zavudev/models/broadcast_channel.rbi +1 -0
  16. data/rbi/zavudev/models/channel.rbi +1 -0
  17. data/rbi/zavudev/models/contact.rbi +2 -0
  18. data/rbi/zavudev/models/contact_channel.rbi +2 -0
  19. data/rbi/zavudev/models/contact_create_params.rbi +5 -0
  20. data/rbi/zavudev/models/contact_update_params.rbi +5 -0
  21. data/rbi/zavudev/models/contacts/channel_add_params.rbi +5 -0
  22. data/rbi/zavudev/models/message_send_params.rbi +2 -2
  23. data/rbi/zavudev/models/webhook_event.rbi +6 -1
  24. data/rbi/zavudev/resources/messages.rbi +1 -1
  25. data/sig/zavudev/models/broadcast_channel.rbs +2 -0
  26. data/sig/zavudev/models/channel.rbs +2 -0
  27. data/sig/zavudev/models/contact.rbs +2 -1
  28. data/sig/zavudev/models/contact_channel.rbs +2 -1
  29. data/sig/zavudev/models/contact_create_params.rbs +3 -1
  30. data/sig/zavudev/models/contact_update_params.rbs +2 -1
  31. data/sig/zavudev/models/contacts/channel_add_params.rbs +3 -1
  32. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7acd7e0349acb65eada647202880714e47e5b9cfcfa12583f77e27db11993f82
4
- data.tar.gz: bf70c460648a96d443e2bd79b8be6a678306be02d38fdde537c186aec4ba77d3
3
+ metadata.gz: 63ea4333bf7d9cacb1962cce25ca702e648e38d19a6fb59374748677cf06afc9
4
+ data.tar.gz: 52f27580e65daf098c06f8fa38aa923b5c5b7345eea19c083737f5732e346c11
5
5
  SHA512:
6
- metadata.gz: 751db02e34b4d9766f38893a15353ebdca10307eec404418c8ea0a690c0c566f65d1e6fe5d25297872b17a877d0d13c5c230cfc0cd094445c4d97a6e54a12cce
7
- data.tar.gz: 636bc3237e0a5048dc8f955d3335d23bd2c7bb45e894597bdc6c936386cb1b44599b0f5433b57b31f921d99cbacc0b748668667b63ce043f15cb0d198614cc32
6
+ metadata.gz: 4dd0ec176a9dbedc41566fe2cdfd5525019579c545e8f89e4d4b57b9d47f75c09d0adcd61446f1f8eb55cc94f4f423386f3687adf7ee6235e041682380d78a77
7
+ data.tar.gz: d6c282c7e7c92577e8a5738666e263ea567622602a3eba177219129b1dbec1540431b7fb69419971a6727d7409be17a8221871179dbd86fb2f439b5ff9814541
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.14.0 (2026-06-24)
4
+
5
+ Full Changelog: [v0.13.0...v0.14.0](https://github.com/zavudev/sdk-ruby/compare/v0.13.0...v0.14.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([6a691cd](https://github.com/zavudev/sdk-ruby/commit/6a691cd596deb8fa5cb32118684e8f811798cc50))
10
+ * **api:** api update ([91a78af](https://github.com/zavudev/sdk-ruby/commit/91a78af6beed7c6a17abb0928965532976d5eac5))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **client:** send content-type header for requests with an omitted optional body ([73b6654](https://github.com/zavudev/sdk-ruby/commit/73b66544a2756aaf64f189c9eb47ba66cd09f305))
16
+
3
17
  ## 0.13.0 (2026-06-07)
4
18
 
5
19
  Full Changelog: [v0.12.0...v0.13.0](https://github.com/zavudev/sdk-ruby/compare/v0.12.0...v0.13.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.13.0"
29
+ gem "zavudev", "~> 0.14.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -306,7 +306,10 @@ module Zavudev
306
306
  Zavudev::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
307
307
  end
308
308
 
309
- headers.delete("content-type") if body.nil?
309
+ # Generated methods always pass `req[:body]` for operations that define a
310
+ # request body, so only elide the content-type header when the operation
311
+ # has no body at all, not when an optional body param was omitted.
312
+ headers.delete("content-type") if body.nil? && !req.key?(:body)
310
313
 
311
314
  url = Zavudev::Internal::Util.join_parsed_uri(
312
315
  @base_url_components,
@@ -13,6 +13,7 @@ module Zavudev
13
13
  TELEGRAM = :telegram
14
14
  EMAIL = :email
15
15
  INSTAGRAM = :instagram
16
+ MESSENGER = :messenger
16
17
  VOICE = :voice
17
18
 
18
19
  # @!method self.values
@@ -13,6 +13,7 @@ module Zavudev
13
13
  TELEGRAM = :telegram
14
14
  EMAIL = :email
15
15
  INSTAGRAM = :instagram
16
+ MESSENGER = :messenger
16
17
  VOICE = :voice
17
18
 
18
19
  # @!method self.values
@@ -131,6 +131,7 @@ module Zavudev
131
131
  TELEGRAM = :telegram
132
132
  EMAIL = :email
133
133
  INSTAGRAM = :instagram
134
+ MESSENGER = :messenger
134
135
  VOICE = :voice
135
136
 
136
137
  # @!method self.values
@@ -108,6 +108,7 @@ module Zavudev
108
108
  WHATSAPP = :whatsapp
109
109
  EMAIL = :email
110
110
  TELEGRAM = :telegram
111
+ MESSENGER = :messenger
111
112
  VOICE = :voice
112
113
 
113
114
  # @!method self.values
@@ -88,6 +88,7 @@ module Zavudev
88
88
  WHATSAPP = :whatsapp
89
89
  EMAIL = :email
90
90
  TELEGRAM = :telegram
91
+ MESSENGER = :messenger
91
92
  VOICE = :voice
92
93
 
93
94
  # @!method self.values
@@ -44,6 +44,7 @@ module Zavudev
44
44
  TELEGRAM = :telegram
45
45
  EMAIL = :email
46
46
  INSTAGRAM = :instagram
47
+ MESSENGER = :messenger
47
48
  VOICE = :voice
48
49
 
49
50
  # @!method self.values
@@ -66,6 +66,7 @@ module Zavudev
66
66
  WHATSAPP = :whatsapp
67
67
  EMAIL = :email
68
68
  TELEGRAM = :telegram
69
+ MESSENGER = :messenger
69
70
  VOICE = :voice
70
71
 
71
72
  # @!method self.values
@@ -9,7 +9,7 @@ module Zavudev
9
9
 
10
10
  # @!attribute to
11
11
  # Recipient phone number in E.164 format, email address, or numeric chat ID (for
12
- # Telegram/Instagram).
12
+ # Telegram/Instagram/Messenger).
13
13
  #
14
14
  # @return [String]
15
15
  required :to, String
@@ -21,7 +21,12 @@ module Zavudev
21
21
  # delivered as `message.inbound` with `messageType='reaction'`. When the contact
22
22
  # replied to (quoted) an earlier message, `data.content` carries the reply
23
23
  # context: `replyToMessageId`, `replyToProviderMessageId`, `replyToFrom`,
24
- # `replyToText`, and `replyToMessageType`.
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.
25
30
  # - `message.unsupported`: Received a message type that is not supported
26
31
  #
27
32
  # **Broadcast events:**
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Zavudev
4
- VERSION = "0.13.0"
4
+ VERSION = "0.14.0"
5
5
  end
@@ -16,6 +16,7 @@ module Zavudev
16
16
  TELEGRAM = T.let(:telegram, Zavudev::BroadcastChannel::TaggedSymbol)
17
17
  EMAIL = T.let(:email, Zavudev::BroadcastChannel::TaggedSymbol)
18
18
  INSTAGRAM = T.let(:instagram, Zavudev::BroadcastChannel::TaggedSymbol)
19
+ MESSENGER = T.let(:messenger, Zavudev::BroadcastChannel::TaggedSymbol)
19
20
  VOICE = T.let(:voice, Zavudev::BroadcastChannel::TaggedSymbol)
20
21
 
21
22
  sig do
@@ -16,6 +16,7 @@ module Zavudev
16
16
  TELEGRAM = T.let(:telegram, Zavudev::Channel::TaggedSymbol)
17
17
  EMAIL = T.let(:email, Zavudev::Channel::TaggedSymbol)
18
18
  INSTAGRAM = T.let(:instagram, Zavudev::Channel::TaggedSymbol)
19
+ MESSENGER = T.let(:messenger, Zavudev::Channel::TaggedSymbol)
19
20
  VOICE = T.let(:voice, Zavudev::Channel::TaggedSymbol)
20
21
 
21
22
  sig { override.returns(T::Array[Zavudev::Channel::TaggedSymbol]) }
@@ -178,6 +178,8 @@ module Zavudev
178
178
  EMAIL = T.let(:email, Zavudev::Contact::DefaultChannel::TaggedSymbol)
179
179
  INSTAGRAM =
180
180
  T.let(:instagram, Zavudev::Contact::DefaultChannel::TaggedSymbol)
181
+ MESSENGER =
182
+ T.let(:messenger, Zavudev::Contact::DefaultChannel::TaggedSymbol)
181
183
  VOICE = T.let(:voice, Zavudev::Contact::DefaultChannel::TaggedSymbol)
182
184
 
183
185
  sig do
@@ -146,6 +146,8 @@ module Zavudev
146
146
  EMAIL = T.let(:email, Zavudev::ContactChannel::Channel::TaggedSymbol)
147
147
  TELEGRAM =
148
148
  T.let(:telegram, Zavudev::ContactChannel::Channel::TaggedSymbol)
149
+ MESSENGER =
150
+ T.let(:messenger, Zavudev::ContactChannel::Channel::TaggedSymbol)
149
151
  VOICE = T.let(:voice, Zavudev::ContactChannel::Channel::TaggedSymbol)
150
152
 
151
153
  sig do
@@ -169,6 +169,11 @@ module Zavudev
169
169
  :telegram,
170
170
  Zavudev::ContactCreateParams::Channel::Channel::TaggedSymbol
171
171
  )
172
+ MESSENGER =
173
+ T.let(
174
+ :messenger,
175
+ Zavudev::ContactCreateParams::Channel::Channel::TaggedSymbol
176
+ )
172
177
  VOICE =
173
178
  T.let(
174
179
  :voice,
@@ -95,6 +95,11 @@ module Zavudev
95
95
  :instagram,
96
96
  Zavudev::ContactUpdateParams::DefaultChannel::TaggedSymbol
97
97
  )
98
+ MESSENGER =
99
+ T.let(
100
+ :messenger,
101
+ Zavudev::ContactUpdateParams::DefaultChannel::TaggedSymbol
102
+ )
98
103
  VOICE =
99
104
  T.let(
100
105
  :voice,
@@ -120,6 +120,11 @@ module Zavudev
120
120
  :telegram,
121
121
  Zavudev::Contacts::ChannelAddParams::Channel::TaggedSymbol
122
122
  )
123
+ MESSENGER =
124
+ T.let(
125
+ :messenger,
126
+ Zavudev::Contacts::ChannelAddParams::Channel::TaggedSymbol
127
+ )
123
128
  VOICE =
124
129
  T.let(
125
130
  :voice,
@@ -12,7 +12,7 @@ module Zavudev
12
12
  end
13
13
 
14
14
  # Recipient phone number in E.164 format, email address, or numeric chat ID (for
15
- # Telegram/Instagram).
15
+ # Telegram/Instagram/Messenger).
16
16
  sig { returns(String) }
17
17
  attr_accessor :to
18
18
 
@@ -139,7 +139,7 @@ module Zavudev
139
139
  end
140
140
  def self.new(
141
141
  # Recipient phone number in E.164 format, email address, or numeric chat ID (for
142
- # Telegram/Instagram).
142
+ # Telegram/Instagram/Messenger).
143
143
  to:,
144
144
  # Email attachments. Only supported when channel is 'email'. Maximum 40MB total
145
145
  # size.
@@ -21,7 +21,12 @@ module Zavudev
21
21
  # delivered as `message.inbound` with `messageType='reaction'`. When the contact
22
22
  # replied to (quoted) an earlier message, `data.content` carries the reply
23
23
  # context: `replyToMessageId`, `replyToProviderMessageId`, `replyToFrom`,
24
- # `replyToText`, and `replyToMessageType`.
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.
25
30
  # - `message.unsupported`: Received a message type that is not supported
26
31
  #
27
32
  # **Broadcast events:**
@@ -95,7 +95,7 @@ module Zavudev
95
95
  end
96
96
  def send_(
97
97
  # Body param: Recipient phone number in E.164 format, email address, or numeric
98
- # chat ID (for Telegram/Instagram).
98
+ # chat ID (for Telegram/Instagram/Messenger).
99
99
  to:,
100
100
  # Body param: Email attachments. Only supported when channel is 'email'. Maximum
101
101
  # 40MB total size.
@@ -8,6 +8,7 @@ module Zavudev
8
8
  | :telegram
9
9
  | :email
10
10
  | :instagram
11
+ | :messenger
11
12
  | :voice
12
13
 
13
14
  module BroadcastChannel
@@ -20,6 +21,7 @@ module Zavudev
20
21
  TELEGRAM: :telegram
21
22
  EMAIL: :email
22
23
  INSTAGRAM: :instagram
24
+ MESSENGER: :messenger
23
25
  VOICE: :voice
24
26
 
25
27
  def self?.values: -> ::Array[Zavudev::Models::broadcast_channel]
@@ -8,6 +8,7 @@ module Zavudev
8
8
  | :telegram
9
9
  | :email
10
10
  | :instagram
11
+ | :messenger
11
12
  | :voice
12
13
 
13
14
  module Channel
@@ -20,6 +21,7 @@ module Zavudev
20
21
  TELEGRAM: :telegram
21
22
  EMAIL: :email
22
23
  INSTAGRAM: :instagram
24
+ MESSENGER: :messenger
23
25
  VOICE: :voice
24
26
 
25
27
  def self?.values: -> ::Array[Zavudev::Models::channel]
@@ -109,7 +109,7 @@ module Zavudev
109
109
  }
110
110
 
111
111
  type default_channel =
112
- :sms | :whatsapp | :telegram | :email | :instagram | :voice
112
+ :sms | :whatsapp | :telegram | :email | :instagram | :messenger | :voice
113
113
 
114
114
  module DefaultChannel
115
115
  extend Zavudev::Internal::Type::Enum
@@ -119,6 +119,7 @@ module Zavudev
119
119
  TELEGRAM: :telegram
120
120
  EMAIL: :email
121
121
  INSTAGRAM: :instagram
122
+ MESSENGER: :messenger
122
123
  VOICE: :voice
123
124
 
124
125
  def self?.values: -> ::Array[Zavudev::Models::Contact::default_channel]
@@ -85,7 +85,7 @@ module Zavudev
85
85
  updated_at: Time
86
86
  }
87
87
 
88
- type channel = :sms | :whatsapp | :email | :telegram | :voice
88
+ type channel = :sms | :whatsapp | :email | :telegram | :messenger | :voice
89
89
 
90
90
  module Channel
91
91
  extend Zavudev::Internal::Type::Enum
@@ -94,6 +94,7 @@ module Zavudev
94
94
  WHATSAPP: :whatsapp
95
95
  EMAIL: :email
96
96
  TELEGRAM: :telegram
97
+ MESSENGER: :messenger
97
98
  VOICE: :voice
98
99
 
99
100
  def self?.values: -> ::Array[Zavudev::Models::ContactChannel::channel]
@@ -78,7 +78,8 @@ module Zavudev
78
78
  label: String
79
79
  }
80
80
 
81
- type channel = :sms | :whatsapp | :email | :telegram | :voice
81
+ type channel =
82
+ :sms | :whatsapp | :email | :telegram | :messenger | :voice
82
83
 
83
84
  module Channel
84
85
  extend Zavudev::Internal::Type::Enum
@@ -87,6 +88,7 @@ module Zavudev
87
88
  WHATSAPP: :whatsapp
88
89
  EMAIL: :email
89
90
  TELEGRAM: :telegram
91
+ MESSENGER: :messenger
90
92
  VOICE: :voice
91
93
 
92
94
  def self?.values: -> ::Array[Zavudev::Models::ContactCreateParams::Channel::channel]
@@ -35,7 +35,7 @@ module Zavudev
35
35
  }
36
36
 
37
37
  type default_channel =
38
- :sms | :whatsapp | :telegram | :email | :instagram | :voice
38
+ :sms | :whatsapp | :telegram | :email | :instagram | :messenger | :voice
39
39
 
40
40
  module DefaultChannel
41
41
  extend Zavudev::Internal::Type::Enum
@@ -45,6 +45,7 @@ module Zavudev
45
45
  TELEGRAM: :telegram
46
46
  EMAIL: :email
47
47
  INSTAGRAM: :instagram
48
+ MESSENGER: :messenger
48
49
  VOICE: :voice
49
50
 
50
51
  def self?.values: -> ::Array[Zavudev::Models::ContactUpdateParams::default_channel]
@@ -54,7 +54,8 @@ module Zavudev
54
54
  request_options: Zavudev::RequestOptions
55
55
  }
56
56
 
57
- type channel = :sms | :whatsapp | :email | :telegram | :voice
57
+ type channel =
58
+ :sms | :whatsapp | :email | :telegram | :messenger | :voice
58
59
 
59
60
  module Channel
60
61
  extend Zavudev::Internal::Type::Enum
@@ -63,6 +64,7 @@ module Zavudev
63
64
  WHATSAPP: :whatsapp
64
65
  EMAIL: :email
65
66
  TELEGRAM: :telegram
67
+ MESSENGER: :messenger
66
68
  VOICE: :voice
67
69
 
68
70
  def self?.values: -> ::Array[Zavudev::Models::Contacts::ChannelAddParams::channel]
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.13.0
4
+ version: 0.14.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-06-08 00:00:00.000000000 Z
11
+ date: 2026-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi