zavudev 0.19.0 → 0.20.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 (112) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +1 -1
  4. data/lib/zavudev/models/function_create_params.rb +36 -4
  5. data/lib/zavudev/models/function_create_response.rb +4 -2
  6. data/lib/zavudev/models/function_deploy_params.rb +31 -3
  7. data/lib/zavudev/models/function_deploy_response.rb +20 -3
  8. data/lib/zavudev/models/function_get_deployment_response.rb +20 -3
  9. data/lib/zavudev/models/function_retrieve_response.rb +4 -2
  10. data/lib/zavudev/models/function_update_params.rb +41 -3
  11. data/lib/zavudev/models/function_update_response.rb +4 -2
  12. data/lib/zavudev/models/invitation.rb +101 -8
  13. data/lib/zavudev/models/invitation_create_params.rb +34 -8
  14. data/lib/zavudev/models/invitation_list_params.rb +14 -0
  15. data/lib/zavudev/models/message.rb +14 -0
  16. data/lib/zavudev/models/message_type.rb +16 -0
  17. data/lib/zavudev/models/phone_number_pricing.rb +7 -2
  18. data/lib/zavudev/models/phone_number_search_available_params.rb +13 -1
  19. data/lib/zavudev/models/sender.rb +12 -1
  20. data/lib/zavudev/models/sender_create_params.rb +72 -4
  21. data/lib/zavudev/models/sender_update_params.rb +65 -1
  22. data/lib/zavudev/models/sender_webhook.rb +47 -1
  23. data/lib/zavudev/models/senders/agent/agent_tool.rb +19 -1
  24. data/lib/zavudev/models/senders/agent/tool_create_params.rb +7 -2
  25. data/lib/zavudev/models/senders/agent/tool_test_response.rb +90 -5
  26. data/lib/zavudev/models/senders/agent.rb +198 -1
  27. data/lib/zavudev/models/senders/agent_create_params.rb +188 -1
  28. data/lib/zavudev/models/senders/agent_execution.rb +26 -1
  29. data/lib/zavudev/models/senders/agent_update_params.rb +188 -1
  30. data/lib/zavudev/models/template.rb +1 -0
  31. data/lib/zavudev/models/template_create_params.rb +19 -9
  32. data/lib/zavudev/models/webhook_event.rb +31 -1
  33. data/lib/zavudev/resources/broadcasts.rb +20 -4
  34. data/lib/zavudev/resources/functions.rb +35 -10
  35. data/lib/zavudev/resources/invitations.rb +19 -6
  36. data/lib/zavudev/resources/messages.rb +13 -4
  37. data/lib/zavudev/resources/number_10dlc/brands.rb +5 -1
  38. data/lib/zavudev/resources/number_10dlc/campaigns.rb +6 -1
  39. data/lib/zavudev/resources/phone_numbers.rb +12 -3
  40. data/lib/zavudev/resources/senders/agent/executions.rb +5 -0
  41. data/lib/zavudev/resources/senders/agent/tools.rb +14 -2
  42. data/lib/zavudev/resources/senders/agent.rb +18 -2
  43. data/lib/zavudev/resources/senders.rb +15 -3
  44. data/lib/zavudev/version.rb +1 -1
  45. data/rbi/zavudev/models/function_create_params.rbi +50 -2
  46. data/rbi/zavudev/models/function_create_response.rbi +6 -2
  47. data/rbi/zavudev/models/function_deploy_params.rbi +42 -2
  48. data/rbi/zavudev/models/function_deploy_response.rbi +20 -0
  49. data/rbi/zavudev/models/function_get_deployment_response.rbi +20 -0
  50. data/rbi/zavudev/models/function_retrieve_response.rbi +6 -2
  51. data/rbi/zavudev/models/function_update_params.rbi +57 -2
  52. data/rbi/zavudev/models/function_update_response.rbi +6 -2
  53. data/rbi/zavudev/models/invitation.rbi +162 -8
  54. data/rbi/zavudev/models/invitation_create_params.rbi +54 -10
  55. data/rbi/zavudev/models/invitation_list_params.rbi +17 -0
  56. data/rbi/zavudev/models/message.rbi +28 -0
  57. data/rbi/zavudev/models/message_type.rbi +18 -0
  58. data/rbi/zavudev/models/phone_number_pricing.rbi +6 -2
  59. data/rbi/zavudev/models/phone_number_search_available_params.rbi +13 -0
  60. data/rbi/zavudev/models/sender.rbi +17 -0
  61. data/rbi/zavudev/models/sender_create_params.rbi +136 -4
  62. data/rbi/zavudev/models/sender_update_params.rbi +124 -0
  63. data/rbi/zavudev/models/sender_webhook.rbi +69 -0
  64. data/rbi/zavudev/models/senders/agent/agent_tool.rbi +26 -3
  65. data/rbi/zavudev/models/senders/agent/tool_create_params.rbi +6 -2
  66. data/rbi/zavudev/models/senders/agent/tool_test_response.rbi +130 -5
  67. data/rbi/zavudev/models/senders/agent.rbi +320 -3
  68. data/rbi/zavudev/models/senders/agent_create_params.rbi +304 -0
  69. data/rbi/zavudev/models/senders/agent_execution.rbi +31 -3
  70. data/rbi/zavudev/models/senders/agent_update_params.rbi +304 -0
  71. data/rbi/zavudev/models/template.rbi +5 -0
  72. data/rbi/zavudev/models/template_create_params.rbi +27 -6
  73. data/rbi/zavudev/models/webhook_event.rbi +35 -1
  74. data/rbi/zavudev/resources/broadcasts.rbi +20 -4
  75. data/rbi/zavudev/resources/functions.rbi +62 -6
  76. data/rbi/zavudev/resources/invitations.rbi +37 -8
  77. data/rbi/zavudev/resources/messages.rbi +12 -3
  78. data/rbi/zavudev/resources/number_10dlc/brands.rbi +5 -1
  79. data/rbi/zavudev/resources/number_10dlc/campaigns.rbi +6 -1
  80. data/rbi/zavudev/resources/phone_numbers.rbi +10 -2
  81. data/rbi/zavudev/resources/senders/agent/executions.rbi +5 -0
  82. data/rbi/zavudev/resources/senders/agent/tools.rbi +13 -2
  83. data/rbi/zavudev/resources/senders/agent.rbi +16 -0
  84. data/rbi/zavudev/resources/senders.rbi +56 -2
  85. data/sig/zavudev/models/function_create_params.rbs +14 -0
  86. data/sig/zavudev/models/function_deploy_params.rbs +14 -0
  87. data/sig/zavudev/models/function_deploy_response.rbs +5 -0
  88. data/sig/zavudev/models/function_get_deployment_response.rbs +5 -0
  89. data/sig/zavudev/models/function_update_params.rbs +21 -0
  90. data/sig/zavudev/models/invitation.rbs +58 -2
  91. data/sig/zavudev/models/invitation_create_params.rbs +2 -1
  92. data/sig/zavudev/models/invitation_list_params.rbs +3 -1
  93. data/sig/zavudev/models/message_type.rbs +4 -0
  94. data/sig/zavudev/models/phone_number_search_available_params.rbs +7 -0
  95. data/sig/zavudev/models/sender.rbs +7 -0
  96. data/sig/zavudev/models/sender_create_params.rbs +35 -0
  97. data/sig/zavudev/models/sender_update_params.rbs +35 -0
  98. data/sig/zavudev/models/sender_webhook.rbs +17 -0
  99. data/sig/zavudev/models/senders/agent/agent_tool.rbs +10 -3
  100. data/sig/zavudev/models/senders/agent/tool_test_response.rbs +68 -4
  101. data/sig/zavudev/models/senders/agent.rbs +161 -3
  102. data/sig/zavudev/models/senders/agent_create_params.rbs +152 -1
  103. data/sig/zavudev/models/senders/agent_execution.rbs +13 -3
  104. data/sig/zavudev/models/senders/agent_update_params.rbs +152 -1
  105. data/sig/zavudev/models/template.rbs +2 -1
  106. data/sig/zavudev/models/template_create_params.rbs +9 -6
  107. data/sig/zavudev/models/webhook_event.rbs +10 -0
  108. data/sig/zavudev/resources/functions.rbs +7 -0
  109. data/sig/zavudev/resources/phone_numbers.rbs +1 -0
  110. data/sig/zavudev/resources/senders/agent.rbs +2 -0
  111. data/sig/zavudev/resources/senders.rbs +6 -0
  112. metadata +2 -2
@@ -13,16 +13,141 @@ module Zavudev
13
13
  )
14
14
  end
15
15
 
16
- sig { returns(T::Boolean) }
17
- attr_accessor :scheduled
16
+ # One run of a tool triggered from the test endpoint. Recorded so a test is
17
+ # verifiable after the fact rather than only visible in the response.
18
+ sig do
19
+ returns(Zavudev::Models::Senders::Agent::ToolTestResponse::Run)
20
+ end
21
+ attr_reader :run
22
+
23
+ sig do
24
+ params(
25
+ run:
26
+ Zavudev::Models::Senders::Agent::ToolTestResponse::Run::OrHash
27
+ ).void
28
+ end
29
+ attr_writer :run
18
30
 
19
- sig { params(scheduled: T::Boolean).returns(T.attached_class) }
20
- def self.new(scheduled:)
31
+ sig do
32
+ params(
33
+ run:
34
+ Zavudev::Models::Senders::Agent::ToolTestResponse::Run::OrHash
35
+ ).returns(T.attached_class)
36
+ end
37
+ def self.new(
38
+ # One run of a tool triggered from the test endpoint. Recorded so a test is
39
+ # verifiable after the fact rather than only visible in the response.
40
+ run:
41
+ )
21
42
  end
22
43
 
23
- sig { override.returns({ scheduled: T::Boolean }) }
44
+ sig do
45
+ override.returns(
46
+ { run: Zavudev::Models::Senders::Agent::ToolTestResponse::Run }
47
+ )
48
+ end
24
49
  def to_hash
25
50
  end
51
+
52
+ class Run < Zavudev::Internal::Type::BaseModel
53
+ OrHash =
54
+ T.type_alias do
55
+ T.any(
56
+ Zavudev::Models::Senders::Agent::ToolTestResponse::Run,
57
+ Zavudev::Internal::AnyHash
58
+ )
59
+ end
60
+
61
+ sig { returns(String) }
62
+ attr_accessor :id
63
+
64
+ sig { returns(Time) }
65
+ attr_accessor :created_at
66
+
67
+ sig { returns(Integer) }
68
+ attr_accessor :duration_ms
69
+
70
+ # Whether the tool returned without error. A tool that answered with a non-2xx
71
+ # status is a failed run, not an error of this endpoint.
72
+ sig { returns(T::Boolean) }
73
+ attr_accessor :success
74
+
75
+ sig { returns(String) }
76
+ attr_accessor :tool_id
77
+
78
+ # Why the run failed, when it did.
79
+ sig { returns(T.nilable(String)) }
80
+ attr_accessor :error
81
+
82
+ # The parameters the tool was called with.
83
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
84
+ attr_reader :params
85
+
86
+ sig { params(params: T::Hash[Symbol, T.anything]).void }
87
+ attr_writer :params
88
+
89
+ # The tool's response body, truncated.
90
+ sig { returns(T.nilable(String)) }
91
+ attr_accessor :response
92
+
93
+ # HTTP status the tool's webhook returned. Absent for tools that do not go over
94
+ # HTTP.
95
+ sig { returns(T.nilable(Integer)) }
96
+ attr_accessor :status_code
97
+
98
+ # One run of a tool triggered from the test endpoint. Recorded so a test is
99
+ # verifiable after the fact rather than only visible in the response.
100
+ sig do
101
+ params(
102
+ id: String,
103
+ created_at: Time,
104
+ duration_ms: Integer,
105
+ success: T::Boolean,
106
+ tool_id: String,
107
+ error: T.nilable(String),
108
+ params: T::Hash[Symbol, T.anything],
109
+ response: T.nilable(String),
110
+ status_code: T.nilable(Integer)
111
+ ).returns(T.attached_class)
112
+ end
113
+ def self.new(
114
+ id:,
115
+ created_at:,
116
+ duration_ms:,
117
+ # Whether the tool returned without error. A tool that answered with a non-2xx
118
+ # status is a failed run, not an error of this endpoint.
119
+ success:,
120
+ tool_id:,
121
+ # Why the run failed, when it did.
122
+ error: nil,
123
+ # The parameters the tool was called with.
124
+ params: nil,
125
+ # The tool's response body, truncated.
126
+ response: nil,
127
+ # HTTP status the tool's webhook returned. Absent for tools that do not go over
128
+ # HTTP.
129
+ status_code: nil
130
+ )
131
+ end
132
+
133
+ sig do
134
+ override.returns(
135
+ {
136
+ id: String,
137
+ created_at: Time,
138
+ duration_ms: Integer,
139
+ success: T::Boolean,
140
+ tool_id: String,
141
+ error: T.nilable(String),
142
+ params: T::Hash[Symbol, T.anything],
143
+ response: T.nilable(String),
144
+ status_code: T.nilable(Integer)
145
+ }
146
+ )
147
+ end
148
+ def to_hash
149
+ end
150
+ end
26
151
  end
27
152
  end
28
153
  end
@@ -58,6 +58,14 @@ module Zavudev
58
58
  sig { returns(T.nilable(Integer)) }
59
59
  attr_accessor :max_tokens
60
60
 
61
+ # Senders this agent answers on. An agent can serve several; `senderId` remains
62
+ # the primary one, for compatibility.
63
+ sig { returns(T.nilable(T::Array[String])) }
64
+ attr_reader :sender_ids
65
+
66
+ sig { params(sender_ids: T::Array[String]).void }
67
+ attr_writer :sender_ids
68
+
61
69
  sig { returns(T.nilable(Zavudev::Senders::SendersAgent::Stats)) }
62
70
  attr_reader :stats
63
71
 
@@ -84,6 +92,17 @@ module Zavudev
84
92
  sig { params(trigger_on_message_types: T::Array[String]).void }
85
93
  attr_writer :trigger_on_message_types
86
94
 
95
+ # Voice Agent configuration. When present and enabled, the agent can answer
96
+ # inbound phone calls and place outbound calls with Zavu's managed voice pipeline.
97
+ # Requires the Voice Agents feature to be enabled for your team.
98
+ sig { returns(T.nilable(Zavudev::Senders::SendersAgent::Voice)) }
99
+ attr_reader :voice
100
+
101
+ sig do
102
+ params(voice: Zavudev::Senders::SendersAgent::Voice::OrHash).void
103
+ end
104
+ attr_writer :voice
105
+
87
106
  # AI Agent configuration for a sender.
88
107
  sig do
89
108
  params(
@@ -99,10 +118,12 @@ module Zavudev
99
118
  context_window_messages: Integer,
100
119
  include_contact_metadata: T::Boolean,
101
120
  max_tokens: T.nilable(Integer),
121
+ sender_ids: T::Array[String],
102
122
  stats: Zavudev::Senders::SendersAgent::Stats::OrHash,
103
123
  temperature: T.nilable(Float),
104
124
  trigger_on_channels: T::Array[String],
105
- trigger_on_message_types: T::Array[String]
125
+ trigger_on_message_types: T::Array[String],
126
+ voice: Zavudev::Senders::SendersAgent::Voice::OrHash
106
127
  ).returns(T.attached_class)
107
128
  end
108
129
  def self.new(
@@ -125,13 +146,20 @@ module Zavudev
125
146
  include_contact_metadata: nil,
126
147
  # Maximum tokens for LLM response.
127
148
  max_tokens: nil,
149
+ # Senders this agent answers on. An agent can serve several; `senderId` remains
150
+ # the primary one, for compatibility.
151
+ sender_ids: nil,
128
152
  stats: nil,
129
153
  # LLM temperature (0-2).
130
154
  temperature: nil,
131
155
  # Channels that trigger the agent.
132
156
  trigger_on_channels: nil,
133
157
  # Message types that trigger the agent.
134
- trigger_on_message_types: nil
158
+ trigger_on_message_types: nil,
159
+ # Voice Agent configuration. When present and enabled, the agent can answer
160
+ # inbound phone calls and place outbound calls with Zavu's managed voice pipeline.
161
+ # Requires the Voice Agents feature to be enabled for your team.
162
+ voice: nil
135
163
  )
136
164
  end
137
165
 
@@ -150,10 +178,12 @@ module Zavudev
150
178
  context_window_messages: Integer,
151
179
  include_contact_metadata: T::Boolean,
152
180
  max_tokens: T.nilable(Integer),
181
+ sender_ids: T::Array[String],
153
182
  stats: Zavudev::Senders::SendersAgent::Stats,
154
183
  temperature: T.nilable(Float),
155
184
  trigger_on_channels: T::Array[String],
156
- trigger_on_message_types: T::Array[String]
185
+ trigger_on_message_types: T::Array[String],
186
+ voice: Zavudev::Senders::SendersAgent::Voice
157
187
  }
158
188
  )
159
189
  end
@@ -215,6 +245,293 @@ module Zavudev
215
245
  def to_hash
216
246
  end
217
247
  end
248
+
249
+ class Voice < Zavudev::Internal::Type::BaseModel
250
+ OrHash =
251
+ T.type_alias do
252
+ T.any(
253
+ Zavudev::Senders::SendersAgent::Voice,
254
+ Zavudev::Internal::AnyHash
255
+ )
256
+ end
257
+
258
+ # Whether the agent handles voice calls. When false, the sender's number is not
259
+ # answered by the voice agent and outbound calls are rejected.
260
+ sig { returns(T::Boolean) }
261
+ attr_accessor :enabled
262
+
263
+ # Opening line the agent speaks when the call connects. If omitted, the agent
264
+ # waits for the caller to speak first.
265
+ sig { returns(T.nilable(String)) }
266
+ attr_reader :greeting
267
+
268
+ sig { params(greeting: String).void }
269
+ attr_writer :greeting
270
+
271
+ # Greeting per language, keyed by language code. Used when the caller's language
272
+ # differs from the one `greeting` is written in.
273
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
274
+ attr_reader :greetings
275
+
276
+ sig { params(greetings: T::Hash[Symbol, String]).void }
277
+ attr_writer :greetings
278
+
279
+ # Whether the caller can interrupt the agent while it is speaking (barge-in). When
280
+ # true, the agent stops talking as soon as the caller starts.
281
+ sig { returns(T.nilable(T::Boolean)) }
282
+ attr_reader :interruptible
283
+
284
+ sig { params(interruptible: T::Boolean).void }
285
+ attr_writer :interruptible
286
+
287
+ # BCP-47 language code used for both speech recognition and speech synthesis (e.g.
288
+ # `en`, `es`, `pt-BR`). Auto-detected from the recipient when omitted.
289
+ sig { returns(T.nilable(String)) }
290
+ attr_reader :language
291
+
292
+ sig { params(language: String).void }
293
+ attr_writer :language
294
+
295
+ # Hard limit on call length in minutes. The call ends automatically when reached.
296
+ sig { returns(T.nilable(Integer)) }
297
+ attr_reader :max_call_duration_minutes
298
+
299
+ sig { params(max_call_duration_minutes: Integer).void }
300
+ attr_writer :max_call_duration_minutes
301
+
302
+ # How long the agent waits during silence before ending the call.
303
+ sig { returns(T.nilable(Integer)) }
304
+ attr_reader :max_idle_seconds
305
+
306
+ sig { params(max_idle_seconds: Integer).void }
307
+ attr_writer :max_idle_seconds
308
+
309
+ # Model that runs the conversation, co-located in the voice network for lowest
310
+ # latency. Independent of the model used for text messaging. Derived from the
311
+ # agent's text model when omitted.
312
+ sig { returns(T.nilable(String)) }
313
+ attr_reader :model
314
+
315
+ sig { params(model: String).void }
316
+ attr_writer :model
317
+
318
+ # Whether the call audio is recorded.
319
+ sig { returns(T.nilable(T::Boolean)) }
320
+ attr_reader :record_calls
321
+
322
+ sig { params(record_calls: T::Boolean).void }
323
+ attr_writer :record_calls
324
+
325
+ # Speech-recognition model. Uses the default when omitted.
326
+ sig { returns(T.nilable(String)) }
327
+ attr_reader :stt_model
328
+
329
+ sig { params(stt_model: String).void }
330
+ attr_writer :stt_model
331
+
332
+ # Speech-recognition provider. Uses the default when omitted.
333
+ sig { returns(T.nilable(String)) }
334
+ attr_reader :stt_provider
335
+
336
+ sig { params(stt_provider: String).void }
337
+ attr_writer :stt_provider
338
+
339
+ # E.164 phone number the agent can transfer the call to. When set, the agent is
340
+ # given a transfer tool it can use to hand the call to a human.
341
+ sig { returns(T.nilable(String)) }
342
+ attr_reader :transfer_phone_number
343
+
344
+ sig { params(transfer_phone_number: String).void }
345
+ attr_writer :transfer_phone_number
346
+
347
+ # Speech-synthesis provider. Uses the default when omitted.
348
+ sig { returns(T.nilable(String)) }
349
+ attr_reader :tts_provider
350
+
351
+ sig { params(tts_provider: String).void }
352
+ attr_writer :tts_provider
353
+
354
+ # Identifier of the synthesized voice that speaks. Choose from the voices
355
+ # available in the dashboard. Uses a neutral default when omitted.
356
+ sig { returns(T.nilable(String)) }
357
+ attr_reader :tts_voice_id
358
+
359
+ sig { params(tts_voice_id: String).void }
360
+ attr_writer :tts_voice_id
361
+
362
+ # What the agent does when an answering machine or voicemail is detected on an
363
+ # outbound call.
364
+ sig do
365
+ returns(
366
+ T.nilable(
367
+ Zavudev::Senders::SendersAgent::Voice::VoicemailAction::TaggedSymbol
368
+ )
369
+ )
370
+ end
371
+ attr_reader :voicemail_action
372
+
373
+ sig do
374
+ params(
375
+ voicemail_action:
376
+ Zavudev::Senders::SendersAgent::Voice::VoicemailAction::OrSymbol
377
+ ).void
378
+ end
379
+ attr_writer :voicemail_action
380
+
381
+ # Message spoken when `voicemailAction` is `leave_message`. Falls back to
382
+ # `greeting` when omitted.
383
+ sig { returns(T.nilable(String)) }
384
+ attr_reader :voicemail_message
385
+
386
+ sig { params(voicemail_message: String).void }
387
+ attr_writer :voicemail_message
388
+
389
+ # Speech rate. 1.0 is natural. Only honoured by voices that support rate control;
390
+ # ignored by the others.
391
+ sig { returns(T.nilable(Float)) }
392
+ attr_reader :voice_speed
393
+
394
+ sig { params(voice_speed: Float).void }
395
+ attr_writer :voice_speed
396
+
397
+ # Voice Agent configuration. When present and enabled, the agent can answer
398
+ # inbound phone calls and place outbound calls with Zavu's managed voice pipeline.
399
+ # Requires the Voice Agents feature to be enabled for your team.
400
+ sig do
401
+ params(
402
+ enabled: T::Boolean,
403
+ greeting: String,
404
+ greetings: T::Hash[Symbol, String],
405
+ interruptible: T::Boolean,
406
+ language: String,
407
+ max_call_duration_minutes: Integer,
408
+ max_idle_seconds: Integer,
409
+ model: String,
410
+ record_calls: T::Boolean,
411
+ stt_model: String,
412
+ stt_provider: String,
413
+ transfer_phone_number: String,
414
+ tts_provider: String,
415
+ tts_voice_id: String,
416
+ voicemail_action:
417
+ Zavudev::Senders::SendersAgent::Voice::VoicemailAction::OrSymbol,
418
+ voicemail_message: String,
419
+ voice_speed: Float
420
+ ).returns(T.attached_class)
421
+ end
422
+ def self.new(
423
+ # Whether the agent handles voice calls. When false, the sender's number is not
424
+ # answered by the voice agent and outbound calls are rejected.
425
+ enabled:,
426
+ # Opening line the agent speaks when the call connects. If omitted, the agent
427
+ # waits for the caller to speak first.
428
+ greeting: nil,
429
+ # Greeting per language, keyed by language code. Used when the caller's language
430
+ # differs from the one `greeting` is written in.
431
+ greetings: nil,
432
+ # Whether the caller can interrupt the agent while it is speaking (barge-in). When
433
+ # true, the agent stops talking as soon as the caller starts.
434
+ interruptible: nil,
435
+ # BCP-47 language code used for both speech recognition and speech synthesis (e.g.
436
+ # `en`, `es`, `pt-BR`). Auto-detected from the recipient when omitted.
437
+ language: nil,
438
+ # Hard limit on call length in minutes. The call ends automatically when reached.
439
+ max_call_duration_minutes: nil,
440
+ # How long the agent waits during silence before ending the call.
441
+ max_idle_seconds: nil,
442
+ # Model that runs the conversation, co-located in the voice network for lowest
443
+ # latency. Independent of the model used for text messaging. Derived from the
444
+ # agent's text model when omitted.
445
+ model: nil,
446
+ # Whether the call audio is recorded.
447
+ record_calls: nil,
448
+ # Speech-recognition model. Uses the default when omitted.
449
+ stt_model: nil,
450
+ # Speech-recognition provider. Uses the default when omitted.
451
+ stt_provider: nil,
452
+ # E.164 phone number the agent can transfer the call to. When set, the agent is
453
+ # given a transfer tool it can use to hand the call to a human.
454
+ transfer_phone_number: nil,
455
+ # Speech-synthesis provider. Uses the default when omitted.
456
+ tts_provider: nil,
457
+ # Identifier of the synthesized voice that speaks. Choose from the voices
458
+ # available in the dashboard. Uses a neutral default when omitted.
459
+ tts_voice_id: nil,
460
+ # What the agent does when an answering machine or voicemail is detected on an
461
+ # outbound call.
462
+ voicemail_action: nil,
463
+ # Message spoken when `voicemailAction` is `leave_message`. Falls back to
464
+ # `greeting` when omitted.
465
+ voicemail_message: nil,
466
+ # Speech rate. 1.0 is natural. Only honoured by voices that support rate control;
467
+ # ignored by the others.
468
+ voice_speed: nil
469
+ )
470
+ end
471
+
472
+ sig do
473
+ override.returns(
474
+ {
475
+ enabled: T::Boolean,
476
+ greeting: String,
477
+ greetings: T::Hash[Symbol, String],
478
+ interruptible: T::Boolean,
479
+ language: String,
480
+ max_call_duration_minutes: Integer,
481
+ max_idle_seconds: Integer,
482
+ model: String,
483
+ record_calls: T::Boolean,
484
+ stt_model: String,
485
+ stt_provider: String,
486
+ transfer_phone_number: String,
487
+ tts_provider: String,
488
+ tts_voice_id: String,
489
+ voicemail_action:
490
+ Zavudev::Senders::SendersAgent::Voice::VoicemailAction::TaggedSymbol,
491
+ voicemail_message: String,
492
+ voice_speed: Float
493
+ }
494
+ )
495
+ end
496
+ def to_hash
497
+ end
498
+
499
+ # What the agent does when an answering machine or voicemail is detected on an
500
+ # outbound call.
501
+ module VoicemailAction
502
+ extend Zavudev::Internal::Type::Enum
503
+
504
+ TaggedSymbol =
505
+ T.type_alias do
506
+ T.all(
507
+ Symbol,
508
+ Zavudev::Senders::SendersAgent::Voice::VoicemailAction
509
+ )
510
+ end
511
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
512
+
513
+ HANGUP =
514
+ T.let(
515
+ :hangup,
516
+ Zavudev::Senders::SendersAgent::Voice::VoicemailAction::TaggedSymbol
517
+ )
518
+ LEAVE_MESSAGE =
519
+ T.let(
520
+ :leave_message,
521
+ Zavudev::Senders::SendersAgent::Voice::VoicemailAction::TaggedSymbol
522
+ )
523
+
524
+ sig do
525
+ override.returns(
526
+ T::Array[
527
+ Zavudev::Senders::SendersAgent::Voice::VoicemailAction::TaggedSymbol
528
+ ]
529
+ )
530
+ end
531
+ def self.values
532
+ end
533
+ end
534
+ end
218
535
  end
219
536
  end
220
537
  end