zavudev 0.14.0 → 0.16.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 (91) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/README.md +7 -7
  4. data/lib/zavudev/models/broadcast_channel.rb +0 -3
  5. data/lib/zavudev/models/channel.rb +5 -1
  6. data/lib/zavudev/models/contact_channel.rb +1 -0
  7. data/lib/zavudev/models/contact_create_params.rb +1 -0
  8. data/lib/zavudev/models/contacts/channel_add_params.rb +1 -0
  9. data/lib/zavudev/models/invitation.rb +27 -1
  10. data/lib/zavudev/models/invitation_create_params.rb +28 -1
  11. data/lib/zavudev/models/message.rb +12 -8
  12. data/lib/zavudev/models/message_list_params.rb +40 -7
  13. data/lib/zavudev/models/message_send_params.rb +6 -3
  14. data/lib/zavudev/models/phone_number_type.rb +1 -1
  15. data/lib/zavudev/models/url_list_verified_params.rb +1 -0
  16. data/lib/zavudev/models/verified_url.rb +1 -0
  17. data/lib/zavudev/models.rb +0 -12
  18. data/lib/zavudev/resources/exports.rb +0 -75
  19. data/lib/zavudev/resources/invitations.rb +15 -4
  20. data/lib/zavudev/resources/messages.rb +3 -3
  21. data/lib/zavudev/resources/plan.rb +0 -19
  22. data/lib/zavudev/resources/usage.rb +0 -19
  23. data/lib/zavudev/version.rb +1 -1
  24. data/lib/zavudev.rb +0 -10
  25. data/rbi/zavudev/models/broadcast_channel.rbi +0 -3
  26. data/rbi/zavudev/models/channel.rbi +5 -1
  27. data/rbi/zavudev/models/contact_channel.rbi +2 -0
  28. data/rbi/zavudev/models/contact_create_params.rbi +5 -0
  29. data/rbi/zavudev/models/contacts/channel_add_params.rbi +5 -0
  30. data/rbi/zavudev/models/invitation.rbi +48 -0
  31. data/rbi/zavudev/models/invitation_create_params.rbi +63 -0
  32. data/rbi/zavudev/models/message.rbi +16 -8
  33. data/rbi/zavudev/models/message_list_params.rbi +74 -10
  34. data/rbi/zavudev/models/message_send_params.rbi +10 -4
  35. data/rbi/zavudev/models/phone_number_type.rbi +1 -1
  36. data/rbi/zavudev/models/url_list_verified_params.rbi +5 -0
  37. data/rbi/zavudev/models/verified_url.rbi +2 -0
  38. data/rbi/zavudev/models.rbi +0 -12
  39. data/rbi/zavudev/resources/exports.rbi +0 -50
  40. data/rbi/zavudev/resources/invitations.rbi +19 -3
  41. data/rbi/zavudev/resources/messages.rbi +9 -5
  42. data/rbi/zavudev/resources/plan.rbi +0 -10
  43. data/rbi/zavudev/resources/usage.rbi +0 -10
  44. data/sig/zavudev/models/broadcast_channel.rbs +1 -12
  45. data/sig/zavudev/models/channel.rbs +2 -0
  46. data/sig/zavudev/models/contact_channel.rbs +3 -1
  47. data/sig/zavudev/models/contact_create_params.rbs +8 -1
  48. data/sig/zavudev/models/contacts/channel_add_params.rbs +8 -1
  49. data/sig/zavudev/models/invitation.rbs +20 -0
  50. data/sig/zavudev/models/invitation_create_params.rbs +20 -0
  51. data/sig/zavudev/models/message_list_params.rbs +54 -11
  52. data/sig/zavudev/models/phone_number_type.rbs +2 -2
  53. data/sig/zavudev/models/url_list_verified_params.rbs +2 -1
  54. data/sig/zavudev/models/verified_url.rbs +2 -1
  55. data/sig/zavudev/models.rbs +0 -12
  56. data/sig/zavudev/resources/exports.rbs +0 -19
  57. data/sig/zavudev/resources/invitations.rbs +1 -0
  58. data/sig/zavudev/resources/messages.rbs +2 -2
  59. data/sig/zavudev/resources/plan.rbs +0 -4
  60. data/sig/zavudev/resources/usage.rbs +0 -4
  61. metadata +2 -32
  62. data/lib/zavudev/models/data_export.rb +0 -122
  63. data/lib/zavudev/models/export_create_params.rb +0 -54
  64. data/lib/zavudev/models/export_create_response.rb +0 -16
  65. data/lib/zavudev/models/export_list_params.rb +0 -49
  66. data/lib/zavudev/models/export_retrieve_params.rb +0 -20
  67. data/lib/zavudev/models/export_retrieve_response.rb +0 -16
  68. data/lib/zavudev/models/plan_retrieve_params.rb +0 -14
  69. data/lib/zavudev/models/plan_retrieve_response.rb +0 -155
  70. data/lib/zavudev/models/usage_retrieve_params.rb +0 -14
  71. data/lib/zavudev/models/usage_retrieve_response.rb +0 -77
  72. data/rbi/zavudev/models/data_export.rbi +0 -151
  73. data/rbi/zavudev/models/export_create_params.rbi +0 -106
  74. data/rbi/zavudev/models/export_create_response.rbi +0 -31
  75. data/rbi/zavudev/models/export_list_params.rbi +0 -89
  76. data/rbi/zavudev/models/export_retrieve_params.rbi +0 -35
  77. data/rbi/zavudev/models/export_retrieve_response.rbi +0 -31
  78. data/rbi/zavudev/models/plan_retrieve_params.rbi +0 -27
  79. data/rbi/zavudev/models/plan_retrieve_response.rbi +0 -306
  80. data/rbi/zavudev/models/usage_retrieve_params.rbi +0 -27
  81. data/rbi/zavudev/models/usage_retrieve_response.rbi +0 -150
  82. data/sig/zavudev/models/data_export.rbs +0 -102
  83. data/sig/zavudev/models/export_create_params.rbs +0 -59
  84. data/sig/zavudev/models/export_create_response.rbs +0 -13
  85. data/sig/zavudev/models/export_list_params.rbs +0 -57
  86. data/sig/zavudev/models/export_retrieve_params.rbs +0 -23
  87. data/sig/zavudev/models/export_retrieve_response.rbs +0 -13
  88. data/sig/zavudev/models/plan_retrieve_params.rbs +0 -15
  89. data/sig/zavudev/models/plan_retrieve_response.rbs +0 -158
  90. data/sig/zavudev/models/usage_retrieve_params.rbs +0 -15
  91. data/sig/zavudev/models/usage_retrieve_response.rbs +0 -69
@@ -3,25 +3,6 @@
3
3
  module Zavudev
4
4
  module Resources
5
5
  class Usage
6
- # Get the current month's usage counters for A2P messages and emails, along with
7
- # the tier limits.
8
- #
9
- # @overload retrieve(request_options: {})
10
- #
11
- # @param request_options [Zavudev::RequestOptions, Hash{Symbol=>Object}, nil]
12
- #
13
- # @return [Zavudev::Models::UsageRetrieveResponse]
14
- #
15
- # @see Zavudev::Models::UsageRetrieveParams
16
- def retrieve(params = {})
17
- @client.request(
18
- method: :get,
19
- path: "v1/usage",
20
- model: Zavudev::Models::UsageRetrieveResponse,
21
- options: params[:request_options]
22
- )
23
- end
24
-
25
6
  # @api private
26
7
  #
27
8
  # @param client [Zavudev::Client]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Zavudev
4
- VERSION = "0.14.0"
4
+ VERSION = "0.16.0"
5
5
  end
data/lib/zavudev.rb CHANGED
@@ -113,12 +113,6 @@ require_relative "zavudev/models/contacts/channel_set_primary_response"
113
113
  require_relative "zavudev/models/contacts/channel_update_params"
114
114
  require_relative "zavudev/models/contacts/channel_update_response"
115
115
  require_relative "zavudev/models/contact_update_params"
116
- require_relative "zavudev/models/data_export"
117
- require_relative "zavudev/models/export_create_params"
118
- require_relative "zavudev/models/export_create_response"
119
- require_relative "zavudev/models/export_list_params"
120
- require_relative "zavudev/models/export_retrieve_params"
121
- require_relative "zavudev/models/export_retrieve_response"
122
116
  require_relative "zavudev/models/function_create_params"
123
117
  require_relative "zavudev/models/function_create_response"
124
118
  require_relative "zavudev/models/function_delete_params"
@@ -214,8 +208,6 @@ require_relative "zavudev/models/phone_number_status"
214
208
  require_relative "zavudev/models/phone_number_type"
215
209
  require_relative "zavudev/models/phone_number_update_params"
216
210
  require_relative "zavudev/models/phone_number_update_response"
217
- require_relative "zavudev/models/plan_retrieve_params"
218
- require_relative "zavudev/models/plan_retrieve_response"
219
211
  require_relative "zavudev/models/regulatory_document"
220
212
  require_relative "zavudev/models/regulatory_document_create_params"
221
213
  require_relative "zavudev/models/regulatory_document_create_response"
@@ -332,8 +324,6 @@ require_relative "zavudev/models/url_retrieve_details_params"
332
324
  require_relative "zavudev/models/url_retrieve_details_response"
333
325
  require_relative "zavudev/models/url_submit_for_verification_params"
334
326
  require_relative "zavudev/models/url_submit_for_verification_response"
335
- require_relative "zavudev/models/usage_retrieve_params"
336
- require_relative "zavudev/models/usage_retrieve_response"
337
327
  require_relative "zavudev/models/verified_url"
338
328
  require_relative "zavudev/models/webhook_event"
339
329
  require_relative "zavudev/models/webhook_secret_response"
@@ -15,9 +15,6 @@ module Zavudev
15
15
  WHATSAPP = T.let(:whatsapp, Zavudev::BroadcastChannel::TaggedSymbol)
16
16
  TELEGRAM = T.let(:telegram, Zavudev::BroadcastChannel::TaggedSymbol)
17
17
  EMAIL = T.let(:email, Zavudev::BroadcastChannel::TaggedSymbol)
18
- INSTAGRAM = T.let(:instagram, Zavudev::BroadcastChannel::TaggedSymbol)
19
- MESSENGER = T.let(:messenger, Zavudev::BroadcastChannel::TaggedSymbol)
20
- VOICE = T.let(:voice, Zavudev::BroadcastChannel::TaggedSymbol)
21
18
 
22
19
  sig do
23
20
  override.returns(T::Array[Zavudev::BroadcastChannel::TaggedSymbol])
@@ -2,7 +2,10 @@
2
2
 
3
3
  module Zavudev
4
4
  module Models
5
- # Delivery channel. Use 'auto' for intelligent routing.
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.
6
9
  module Channel
7
10
  extend Zavudev::Internal::Type::Enum
8
11
 
@@ -13,6 +16,7 @@ module Zavudev
13
16
  SMS = T.let(:sms, Zavudev::Channel::TaggedSymbol)
14
17
  SMS_ONEWAY = T.let(:sms_oneway, Zavudev::Channel::TaggedSymbol)
15
18
  WHATSAPP = T.let(:whatsapp, Zavudev::Channel::TaggedSymbol)
19
+ WHATSAPP_ALT = T.let(:whatsapp_alt, Zavudev::Channel::TaggedSymbol)
16
20
  TELEGRAM = T.let(:telegram, Zavudev::Channel::TaggedSymbol)
17
21
  EMAIL = T.let(:email, Zavudev::Channel::TaggedSymbol)
18
22
  INSTAGRAM = T.let(:instagram, Zavudev::Channel::TaggedSymbol)
@@ -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
+ INSTAGRAM =
150
+ T.let(:instagram, Zavudev::ContactChannel::Channel::TaggedSymbol)
149
151
  MESSENGER =
150
152
  T.let(:messenger, Zavudev::ContactChannel::Channel::TaggedSymbol)
151
153
  VOICE = T.let(:voice, Zavudev::ContactChannel::Channel::TaggedSymbol)
@@ -169,6 +169,11 @@ module Zavudev
169
169
  :telegram,
170
170
  Zavudev::ContactCreateParams::Channel::Channel::TaggedSymbol
171
171
  )
172
+ INSTAGRAM =
173
+ T.let(
174
+ :instagram,
175
+ Zavudev::ContactCreateParams::Channel::Channel::TaggedSymbol
176
+ )
172
177
  MESSENGER =
173
178
  T.let(
174
179
  :messenger,
@@ -120,6 +120,11 @@ module Zavudev
120
120
  :telegram,
121
121
  Zavudev::Contacts::ChannelAddParams::Channel::TaggedSymbol
122
122
  )
123
+ INSTAGRAM =
124
+ T.let(
125
+ :instagram,
126
+ Zavudev::Contacts::ChannelAddParams::Channel::TaggedSymbol
127
+ )
123
128
  MESSENGER =
124
129
  T.let(
125
130
  :messenger,
@@ -42,6 +42,20 @@ module Zavudev
42
42
  sig { returns(T.nilable(Time)) }
43
43
  attr_accessor :completed_at
44
44
 
45
+ # How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
46
+ # embedded signup) or `whatsapp_alt` (QR-linked).
47
+ sig do
48
+ returns(T.nilable(Zavudev::Invitation::ConnectionType::TaggedSymbol))
49
+ end
50
+ attr_reader :connection_type
51
+
52
+ sig do
53
+ params(
54
+ connection_type: Zavudev::Invitation::ConnectionType::OrSymbol
55
+ ).void
56
+ end
57
+ attr_writer :connection_type
58
+
45
59
  # ID of a pre-assigned Zavu phone number for WhatsApp registration.
46
60
  sig { returns(T.nilable(String)) }
47
61
  attr_accessor :phone_number_id
@@ -69,6 +83,7 @@ module Zavudev
69
83
  client_name: T.nilable(String),
70
84
  client_phone: T.nilable(String),
71
85
  completed_at: T.nilable(Time),
86
+ connection_type: Zavudev::Invitation::ConnectionType::OrSymbol,
72
87
  phone_number_id: T.nilable(String),
73
88
  sender_id: T.nilable(String),
74
89
  started_at: T.nilable(Time),
@@ -90,6 +105,9 @@ module Zavudev
90
105
  client_name: nil,
91
106
  client_phone: nil,
92
107
  completed_at: nil,
108
+ # How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
109
+ # embedded signup) or `whatsapp_alt` (QR-linked).
110
+ connection_type: nil,
93
111
  # ID of a pre-assigned Zavu phone number for WhatsApp registration.
94
112
  phone_number_id: nil,
95
113
  # ID of the sender created when invitation is completed.
@@ -113,6 +131,7 @@ module Zavudev
113
131
  client_name: T.nilable(String),
114
132
  client_phone: T.nilable(String),
115
133
  completed_at: T.nilable(Time),
134
+ connection_type: Zavudev::Invitation::ConnectionType::TaggedSymbol,
116
135
  phone_number_id: T.nilable(String),
117
136
  sender_id: T.nilable(String),
118
137
  started_at: T.nilable(Time),
@@ -144,6 +163,35 @@ module Zavudev
144
163
  def self.values
145
164
  end
146
165
  end
166
+
167
+ # How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
168
+ # embedded signup) or `whatsapp_alt` (QR-linked).
169
+ module ConnectionType
170
+ extend Zavudev::Internal::Type::Enum
171
+
172
+ TaggedSymbol =
173
+ T.type_alias { T.all(Symbol, Zavudev::Invitation::ConnectionType) }
174
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
175
+
176
+ WHATSAPP_WABA =
177
+ T.let(
178
+ :whatsapp_waba,
179
+ Zavudev::Invitation::ConnectionType::TaggedSymbol
180
+ )
181
+ WHATSAPP_ALT =
182
+ T.let(
183
+ :whatsapp_alt,
184
+ Zavudev::Invitation::ConnectionType::TaggedSymbol
185
+ )
186
+
187
+ sig do
188
+ override.returns(
189
+ T::Array[Zavudev::Invitation::ConnectionType::TaggedSymbol]
190
+ )
191
+ end
192
+ def self.values
193
+ end
194
+ end
147
195
  end
148
196
  end
149
197
  end
@@ -39,6 +39,25 @@ module Zavudev
39
39
  sig { params(client_phone: String).void }
40
40
  attr_writer :client_phone
41
41
 
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.
46
+ sig do
47
+ returns(
48
+ T.nilable(Zavudev::InvitationCreateParams::ConnectionType::OrSymbol)
49
+ )
50
+ end
51
+ attr_reader :connection_type
52
+
53
+ sig do
54
+ params(
55
+ connection_type:
56
+ Zavudev::InvitationCreateParams::ConnectionType::OrSymbol
57
+ ).void
58
+ end
59
+ attr_writer :connection_type
60
+
42
61
  # Number of days until the invitation expires.
43
62
  sig { returns(T.nilable(Integer)) }
44
63
  attr_reader :expires_in_days
@@ -60,6 +79,8 @@ module Zavudev
60
79
  client_email: String,
61
80
  client_name: String,
62
81
  client_phone: String,
82
+ connection_type:
83
+ Zavudev::InvitationCreateParams::ConnectionType::OrSymbol,
63
84
  expires_in_days: Integer,
64
85
  phone_number_id: String,
65
86
  request_options: Zavudev::RequestOptions::OrHash
@@ -74,6 +95,11 @@ module Zavudev
74
95
  client_name: nil,
75
96
  # Phone number of the client in E.164 format.
76
97
  client_phone: nil,
98
+ # 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.
102
+ connection_type: nil,
77
103
  # Number of days until the invitation expires.
78
104
  expires_in_days: nil,
79
105
  # ID of a Zavu phone number to pre-assign for WhatsApp registration. If provided,
@@ -90,6 +116,8 @@ module Zavudev
90
116
  client_email: String,
91
117
  client_name: String,
92
118
  client_phone: String,
119
+ connection_type:
120
+ Zavudev::InvitationCreateParams::ConnectionType::OrSymbol,
93
121
  expires_in_days: Integer,
94
122
  phone_number_id: String,
95
123
  request_options: Zavudev::RequestOptions
@@ -98,6 +126,41 @@ module Zavudev
98
126
  end
99
127
  def to_hash
100
128
  end
129
+
130
+ # 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.
134
+ module ConnectionType
135
+ extend Zavudev::Internal::Type::Enum
136
+
137
+ TaggedSymbol =
138
+ T.type_alias do
139
+ T.all(Symbol, Zavudev::InvitationCreateParams::ConnectionType)
140
+ end
141
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
142
+
143
+ WHATSAPP_WABA =
144
+ T.let(
145
+ :whatsapp_waba,
146
+ Zavudev::InvitationCreateParams::ConnectionType::TaggedSymbol
147
+ )
148
+ WHATSAPP_ALT =
149
+ T.let(
150
+ :whatsapp_alt,
151
+ Zavudev::InvitationCreateParams::ConnectionType::TaggedSymbol
152
+ )
153
+
154
+ sig do
155
+ override.returns(
156
+ T::Array[
157
+ Zavudev::InvitationCreateParams::ConnectionType::TaggedSymbol
158
+ ]
159
+ )
160
+ end
161
+ def self.values
162
+ end
163
+ end
101
164
  end
102
165
  end
103
166
  end
@@ -9,7 +9,10 @@ module Zavudev
9
9
  sig { returns(String) }
10
10
  attr_accessor :id
11
11
 
12
- # Delivery channel. Use 'auto' for intelligent routing.
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.
13
16
  sig { returns(Zavudev::Channel::TaggedSymbol) }
14
17
  attr_accessor :channel
15
18
 
@@ -34,15 +37,16 @@ module Zavudev
34
37
  sig { params(content: Zavudev::MessageContent::OrHash).void }
35
38
  attr_writer :content
36
39
 
37
- # MAU cost in USD (charged for first contact of the month).
40
+ # Zavu platform charge in USD for this message. Messaging is billed against your
41
+ # plan's monthly limits plus usage-based overage.
38
42
  sig { returns(T.nilable(Float)) }
39
43
  attr_accessor :cost
40
44
 
41
- # Provider cost in USD (Telnyx, SES, etc.).
45
+ # Carrier and delivery cost in USD.
42
46
  sig { returns(T.nilable(Float)) }
43
47
  attr_accessor :cost_provider
44
48
 
45
- # Total cost in USD (MAU + provider cost).
49
+ # Total cost in USD (platform charge + delivery cost).
46
50
  sig { returns(T.nilable(Float)) }
47
51
  attr_accessor :cost_total
48
52
 
@@ -114,7 +118,10 @@ module Zavudev
114
118
  end
115
119
  def self.new(
116
120
  id:,
117
- # Delivery channel. Use 'auto' for intelligent routing.
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.
118
125
  channel:,
119
126
  created_at:,
120
127
  # Type of message. Non-text types are supported by WhatsApp and Telegram (varies
@@ -124,11 +131,12 @@ module Zavudev
124
131
  to:,
125
132
  # Content for non-text message types (WhatsApp and Telegram).
126
133
  content: nil,
127
- # MAU cost in USD (charged for first contact of the month).
134
+ # Zavu platform charge in USD for this message. Messaging is billed against your
135
+ # plan's monthly limits plus usage-based overage.
128
136
  cost: nil,
129
- # Provider cost in USD (Telnyx, SES, etc.).
137
+ # Carrier and delivery cost in USD.
130
138
  cost_provider: nil,
131
- # Total cost in USD (MAU + provider cost).
139
+ # Total cost in USD (platform charge + delivery cost).
132
140
  cost_total: nil,
133
141
  error_code: nil,
134
142
  error_message: nil,
@@ -11,11 +11,13 @@ module Zavudev
11
11
  T.any(Zavudev::MessageListParams, Zavudev::Internal::AnyHash)
12
12
  end
13
13
 
14
- # Delivery channel. Use 'auto' for intelligent routing.
15
- sig { returns(T.nilable(Zavudev::Channel::OrSymbol)) }
14
+ # Filter by delivery channel.
15
+ sig { returns(T.nilable(Zavudev::MessageListParams::Channel::OrSymbol)) }
16
16
  attr_reader :channel
17
17
 
18
- sig { params(channel: Zavudev::Channel::OrSymbol).void }
18
+ sig do
19
+ params(channel: Zavudev::MessageListParams::Channel::OrSymbol).void
20
+ end
19
21
  attr_writer :channel
20
22
 
21
23
  sig { returns(T.nilable(String)) }
@@ -30,10 +32,11 @@ module Zavudev
30
32
  sig { params(limit: Integer).void }
31
33
  attr_writer :limit
32
34
 
33
- sig { returns(T.nilable(Zavudev::MessageStatus::OrSymbol)) }
35
+ # Filter by status. Not all stored statuses are filterable.
36
+ sig { returns(T.nilable(Zavudev::MessageListParams::Status::OrSymbol)) }
34
37
  attr_reader :status
35
38
 
36
- sig { params(status: Zavudev::MessageStatus::OrSymbol).void }
39
+ sig { params(status: Zavudev::MessageListParams::Status::OrSymbol).void }
37
40
  attr_writer :status
38
41
 
39
42
  sig { returns(T.nilable(String)) }
@@ -44,19 +47,20 @@ module Zavudev
44
47
 
45
48
  sig do
46
49
  params(
47
- channel: Zavudev::Channel::OrSymbol,
50
+ channel: Zavudev::MessageListParams::Channel::OrSymbol,
48
51
  cursor: String,
49
52
  limit: Integer,
50
- status: Zavudev::MessageStatus::OrSymbol,
53
+ status: Zavudev::MessageListParams::Status::OrSymbol,
51
54
  to: String,
52
55
  request_options: Zavudev::RequestOptions::OrHash
53
56
  ).returns(T.attached_class)
54
57
  end
55
58
  def self.new(
56
- # Delivery channel. Use 'auto' for intelligent routing.
59
+ # Filter by delivery channel.
57
60
  channel: nil,
58
61
  cursor: nil,
59
62
  limit: nil,
63
+ # Filter by status. Not all stored statuses are filterable.
60
64
  status: nil,
61
65
  to: nil,
62
66
  request_options: {}
@@ -66,10 +70,10 @@ module Zavudev
66
70
  sig do
67
71
  override.returns(
68
72
  {
69
- channel: Zavudev::Channel::OrSymbol,
73
+ channel: Zavudev::MessageListParams::Channel::OrSymbol,
70
74
  cursor: String,
71
75
  limit: Integer,
72
- status: Zavudev::MessageStatus::OrSymbol,
76
+ status: Zavudev::MessageListParams::Status::OrSymbol,
73
77
  to: String,
74
78
  request_options: Zavudev::RequestOptions
75
79
  }
@@ -77,6 +81,66 @@ module Zavudev
77
81
  end
78
82
  def to_hash
79
83
  end
84
+
85
+ # Filter by delivery channel.
86
+ module Channel
87
+ extend Zavudev::Internal::Type::Enum
88
+
89
+ TaggedSymbol =
90
+ T.type_alias { T.all(Symbol, Zavudev::MessageListParams::Channel) }
91
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
92
+
93
+ SMS = T.let(:sms, Zavudev::MessageListParams::Channel::TaggedSymbol)
94
+ SMS_ONEWAY =
95
+ T.let(:sms_oneway, Zavudev::MessageListParams::Channel::TaggedSymbol)
96
+ WHATSAPP =
97
+ T.let(:whatsapp, Zavudev::MessageListParams::Channel::TaggedSymbol)
98
+ EMAIL = T.let(:email, Zavudev::MessageListParams::Channel::TaggedSymbol)
99
+ TELEGRAM =
100
+ T.let(:telegram, Zavudev::MessageListParams::Channel::TaggedSymbol)
101
+ INSTAGRAM =
102
+ T.let(:instagram, Zavudev::MessageListParams::Channel::TaggedSymbol)
103
+ MESSENGER =
104
+ T.let(:messenger, Zavudev::MessageListParams::Channel::TaggedSymbol)
105
+ VOICE = T.let(:voice, Zavudev::MessageListParams::Channel::TaggedSymbol)
106
+
107
+ sig do
108
+ override.returns(
109
+ T::Array[Zavudev::MessageListParams::Channel::TaggedSymbol]
110
+ )
111
+ end
112
+ def self.values
113
+ end
114
+ end
115
+
116
+ # Filter by status. Not all stored statuses are filterable.
117
+ module Status
118
+ extend Zavudev::Internal::Type::Enum
119
+
120
+ TaggedSymbol =
121
+ T.type_alias { T.all(Symbol, Zavudev::MessageListParams::Status) }
122
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
123
+
124
+ QUEUED =
125
+ T.let(:queued, Zavudev::MessageListParams::Status::TaggedSymbol)
126
+ SENDING =
127
+ T.let(:sending, Zavudev::MessageListParams::Status::TaggedSymbol)
128
+ SENT = T.let(:sent, Zavudev::MessageListParams::Status::TaggedSymbol)
129
+ DELIVERED =
130
+ T.let(:delivered, Zavudev::MessageListParams::Status::TaggedSymbol)
131
+ FAILED =
132
+ T.let(:failed, Zavudev::MessageListParams::Status::TaggedSymbol)
133
+ RECEIVED =
134
+ T.let(:received, Zavudev::MessageListParams::Status::TaggedSymbol)
135
+
136
+ sig do
137
+ override.returns(
138
+ T::Array[Zavudev::MessageListParams::Status::TaggedSymbol]
139
+ )
140
+ end
141
+ def self.values
142
+ end
143
+ end
80
144
  end
81
145
  end
82
146
  end
@@ -11,8 +11,11 @@ module Zavudev
11
11
  T.any(Zavudev::MessageSendParams, Zavudev::Internal::AnyHash)
12
12
  end
13
13
 
14
- # Recipient phone number in E.164 format, email address, or numeric chat ID (for
15
- # Telegram/Instagram/Messenger).
14
+ # Recipient phone number in E.164 format, email address, WhatsApp business-scoped
15
+ # user ID (BSUID, e.g. `US.13491208655302741918`), or numeric chat ID (for
16
+ # Telegram/Instagram/Messenger). A BSUID is routed to WhatsApp and sent via the
17
+ # `recipient` field; use it to message a contact who adopted a username and whose
18
+ # phone number is hidden.
16
19
  sig { returns(String) }
17
20
  attr_accessor :to
18
21
 
@@ -138,8 +141,11 @@ module Zavudev
138
141
  ).returns(T.attached_class)
139
142
  end
140
143
  def self.new(
141
- # Recipient phone number in E.164 format, email address, or numeric chat ID (for
142
- # Telegram/Instagram/Messenger).
144
+ # Recipient phone number in E.164 format, email address, WhatsApp business-scoped
145
+ # user ID (BSUID, e.g. `US.13491208655302741918`), or numeric chat ID (for
146
+ # Telegram/Instagram/Messenger). A BSUID is routed to WhatsApp and sent via the
147
+ # `recipient` field; use it to message a contact who adopted a username and whose
148
+ # phone number is hidden.
143
149
  to:,
144
150
  # Email attachments. Only supported when channel is 'email'. Maximum 40MB total
145
151
  # size.
@@ -9,7 +9,7 @@ module Zavudev
9
9
  OrSymbol = T.type_alias { T.any(Symbol, String) }
10
10
 
11
11
  LOCAL = T.let(:local, Zavudev::PhoneNumberType::TaggedSymbol)
12
- MOBILE = T.let(:mobile, Zavudev::PhoneNumberType::TaggedSymbol)
12
+ NATIONAL = T.let(:national, Zavudev::PhoneNumberType::TaggedSymbol)
13
13
  TOLL_FREE = T.let(:tollFree, Zavudev::PhoneNumberType::TaggedSymbol)
14
14
 
15
15
  sig { override.returns(T::Array[Zavudev::PhoneNumberType::TaggedSymbol]) }
@@ -78,6 +78,11 @@ module Zavudev
78
78
  T.let(:approved, Zavudev::URLListVerifiedParams::Status::TaggedSymbol)
79
79
  REJECTED =
80
80
  T.let(:rejected, Zavudev::URLListVerifiedParams::Status::TaggedSymbol)
81
+ ESCALATED =
82
+ T.let(
83
+ :escalated,
84
+ Zavudev::URLListVerifiedParams::Status::TaggedSymbol
85
+ )
81
86
  MALICIOUS =
82
87
  T.let(
83
88
  :malicious,
@@ -94,6 +94,8 @@ module Zavudev
94
94
  PENDING = T.let(:pending, Zavudev::VerifiedURL::Status::TaggedSymbol)
95
95
  APPROVED = T.let(:approved, Zavudev::VerifiedURL::Status::TaggedSymbol)
96
96
  REJECTED = T.let(:rejected, Zavudev::VerifiedURL::Status::TaggedSymbol)
97
+ ESCALATED =
98
+ T.let(:escalated, Zavudev::VerifiedURL::Status::TaggedSymbol)
97
99
  MALICIOUS =
98
100
  T.let(:malicious, Zavudev::VerifiedURL::Status::TaggedSymbol)
99
101
 
@@ -82,14 +82,6 @@ module Zavudev
82
82
 
83
83
  ContactUpdateParams = Zavudev::Models::ContactUpdateParams
84
84
 
85
- DataExport = Zavudev::Models::DataExport
86
-
87
- ExportCreateParams = Zavudev::Models::ExportCreateParams
88
-
89
- ExportListParams = Zavudev::Models::ExportListParams
90
-
91
- ExportRetrieveParams = Zavudev::Models::ExportRetrieveParams
92
-
93
85
  FunctionCreateParams = Zavudev::Models::FunctionCreateParams
94
86
 
95
87
  FunctionDeleteParams = Zavudev::Models::FunctionDeleteParams
@@ -171,8 +163,6 @@ module Zavudev
171
163
 
172
164
  PhoneNumberUpdateParams = Zavudev::Models::PhoneNumberUpdateParams
173
165
 
174
- PlanRetrieveParams = Zavudev::Models::PlanRetrieveParams
175
-
176
166
  RegulatoryDocument = Zavudev::Models::RegulatoryDocument
177
167
 
178
168
  RegulatoryDocumentCreateParams =
@@ -258,8 +248,6 @@ module Zavudev
258
248
  URLSubmitForVerificationParams =
259
249
  Zavudev::Models::URLSubmitForVerificationParams
260
250
 
261
- UsageRetrieveParams = Zavudev::Models::UsageRetrieveParams
262
-
263
251
  VerifiedURL = Zavudev::Models::VerifiedURL
264
252
 
265
253
  WebhookEvent = Zavudev::Models::WebhookEvent
@@ -3,56 +3,6 @@
3
3
  module Zavudev
4
4
  module Resources
5
5
  class Exports
6
- # Create a new data export job. The export will be processed asynchronously and
7
- # the download URL will be available when status is 'completed'. Export links
8
- # expire after 24 hours.
9
- sig do
10
- params(
11
- data_types: T::Array[Zavudev::ExportCreateParams::DataType::OrSymbol],
12
- date_from: Time,
13
- date_to: Time,
14
- request_options: Zavudev::RequestOptions::OrHash
15
- ).returns(Zavudev::Models::ExportCreateResponse)
16
- end
17
- def create(
18
- # List of data types to include in the export.
19
- data_types:,
20
- # Start date for data to export (inclusive).
21
- date_from: nil,
22
- # End date for data to export (inclusive).
23
- date_to: nil,
24
- request_options: {}
25
- )
26
- end
27
-
28
- # Get details of a specific data export, including download URL when completed.
29
- sig do
30
- params(
31
- export_id: String,
32
- request_options: Zavudev::RequestOptions::OrHash
33
- ).returns(Zavudev::Models::ExportRetrieveResponse)
34
- end
35
- def retrieve(export_id, request_options: {})
36
- end
37
-
38
- # List data exports for this project.
39
- sig do
40
- params(
41
- cursor: String,
42
- limit: Integer,
43
- status: Zavudev::ExportListParams::Status::OrSymbol,
44
- request_options: Zavudev::RequestOptions::OrHash
45
- ).returns(Zavudev::Internal::Cursor[Zavudev::DataExport])
46
- end
47
- def list(
48
- cursor: nil,
49
- limit: nil,
50
- # Status of a data export job.
51
- status: nil,
52
- request_options: {}
53
- )
54
- end
55
-
56
6
  # @api private
57
7
  sig { params(client: Zavudev::Client).returns(T.attached_class) }
58
8
  def self.new(client:)