revox 0.0.2 → 0.2.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 (128) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +96 -0
  3. data/README.md +88 -22
  4. data/lib/revox/client.rb +19 -1
  5. data/lib/revox/internal/transport/base_client.rb +5 -0
  6. data/lib/revox/internal/type/base_model.rb +3 -3
  7. data/lib/revox/internal/util.rb +53 -7
  8. data/lib/revox/models/assistant_create_params.rb +1036 -11
  9. data/lib/revox/models/assistant_create_response.rb +1071 -11
  10. data/lib/revox/models/assistant_delete_params.rb +7 -1
  11. data/lib/revox/models/assistant_list_response.rb +1070 -11
  12. data/lib/revox/models/assistant_retrieve_params.rb +7 -1
  13. data/lib/revox/models/assistant_retrieve_response.rb +1066 -11
  14. data/lib/revox/models/assistant_update_params.rb +1043 -11
  15. data/lib/revox/models/assistant_update_response.rb +1097 -12
  16. data/lib/revox/models/call_create_params.rb +1063 -11
  17. data/lib/revox/models/call_create_response.rb +2507 -87
  18. data/lib/revox/models/call_retrieve_params.rb +7 -1
  19. data/lib/revox/models/call_retrieve_response.rb +2512 -87
  20. data/lib/revox/models/campaign_cancel_params.rb +20 -0
  21. data/lib/revox/models/campaign_cancel_response.rb +16 -0
  22. data/lib/revox/models/campaign_create_params.rb +239 -0
  23. data/lib/revox/models/campaign_create_response.rb +2030 -0
  24. data/lib/revox/models/campaign_delete_params.rb +20 -0
  25. data/lib/revox/models/campaign_delete_response.rb +16 -0
  26. data/lib/revox/models/campaign_export_rows_params.rb +20 -0
  27. data/lib/revox/models/campaign_export_rows_response.rb +22 -0
  28. data/lib/revox/models/campaign_get_rows_params.rb +20 -0
  29. data/lib/revox/models/campaign_get_rows_response.rb +3176 -0
  30. data/lib/revox/models/campaign_list_params.rb +14 -0
  31. data/lib/revox/models/campaign_list_response.rb +2024 -0
  32. data/lib/revox/models/campaign_retrieve_params.rb +20 -0
  33. data/lib/revox/models/campaign_retrieve_response.rb +2032 -0
  34. data/lib/revox/models/users/me_retrieve_response.rb +13 -1
  35. data/lib/revox/models/users/me_update_response.rb +13 -1
  36. data/lib/revox/models/voice_list_response.rb +55 -1
  37. data/lib/revox/models/voice_preview_params.rb +43 -3
  38. data/lib/revox/models/voice_retrieve_params.rb +7 -1
  39. data/lib/revox/models.rb +14 -2
  40. data/lib/revox/resources/assistants.rb +138 -6
  41. data/lib/revox/resources/call.rb +10 -27
  42. data/lib/revox/resources/campaigns.rb +176 -0
  43. data/lib/revox/resources/voices.rb +17 -7
  44. data/lib/revox/version.rb +1 -1
  45. data/lib/revox.rb +15 -2
  46. data/rbi/revox/client.rbi +3 -0
  47. data/rbi/revox/internal/util.rbi +28 -0
  48. data/rbi/revox/models/assistant_create_params.rbi +2135 -102
  49. data/rbi/revox/models/assistant_create_response.rbi +2454 -199
  50. data/rbi/revox/models/assistant_delete_params.rbi +11 -5
  51. data/rbi/revox/models/assistant_list_response.rbi +2448 -195
  52. data/rbi/revox/models/assistant_retrieve_params.rbi +11 -5
  53. data/rbi/revox/models/assistant_retrieve_response.rbi +2401 -210
  54. data/rbi/revox/models/assistant_update_params.rbi +2139 -100
  55. data/rbi/revox/models/assistant_update_response.rbi +2504 -198
  56. data/rbi/revox/models/call_create_params.rbi +2377 -222
  57. data/rbi/revox/models/call_create_response.rbi +5840 -594
  58. data/rbi/revox/models/call_retrieve_params.rbi +11 -5
  59. data/rbi/revox/models/call_retrieve_response.rbi +5872 -618
  60. data/rbi/revox/models/campaign_cancel_params.rbi +33 -0
  61. data/rbi/revox/models/campaign_cancel_response.rbi +23 -0
  62. data/rbi/revox/models/campaign_create_params.rbi +433 -0
  63. data/rbi/revox/models/campaign_create_response.rbi +4170 -0
  64. data/rbi/revox/models/campaign_delete_params.rbi +33 -0
  65. data/rbi/revox/models/campaign_delete_response.rbi +23 -0
  66. data/rbi/revox/models/campaign_export_rows_params.rbi +33 -0
  67. data/rbi/revox/models/campaign_export_rows_response.rbi +29 -0
  68. data/rbi/revox/models/campaign_get_rows_params.rbi +33 -0
  69. data/rbi/revox/models/campaign_get_rows_response.rbi +6706 -0
  70. data/rbi/revox/models/campaign_list_params.rbi +27 -0
  71. data/rbi/revox/models/campaign_list_response.rbi +4156 -0
  72. data/rbi/revox/models/campaign_retrieve_params.rbi +33 -0
  73. data/rbi/revox/models/campaign_retrieve_response.rbi +4175 -0
  74. data/rbi/revox/models/users/me_retrieve_response.rbi +13 -3
  75. data/rbi/revox/models/users/me_update_response.rbi +13 -3
  76. data/rbi/revox/models/voice_list_response.rbi +105 -3
  77. data/rbi/revox/models/voice_preview_params.rbi +60 -2
  78. data/rbi/revox/models/voice_retrieve_params.rbi +6 -1
  79. data/rbi/revox/models.rbi +14 -2
  80. data/rbi/revox/resources/assistants.rbi +301 -6
  81. data/rbi/revox/resources/call.rbi +10 -19
  82. data/rbi/revox/resources/campaigns.rbi +121 -0
  83. data/rbi/revox/resources/voices.rbi +15 -5
  84. data/sig/revox/client.rbs +2 -0
  85. data/sig/revox/internal/util.rbs +14 -0
  86. data/sig/revox/models/assistant_create_params.rbs +841 -4
  87. data/sig/revox/models/assistant_create_response.rbs +860 -3
  88. data/sig/revox/models/assistant_delete_params.rbs +8 -3
  89. data/sig/revox/models/assistant_list_response.rbs +860 -3
  90. data/sig/revox/models/assistant_retrieve_params.rbs +8 -3
  91. data/sig/revox/models/assistant_retrieve_response.rbs +859 -3
  92. data/sig/revox/models/assistant_update_params.rbs +846 -4
  93. data/sig/revox/models/assistant_update_response.rbs +886 -6
  94. data/sig/revox/models/call_create_params.rbs +844 -6
  95. data/sig/revox/models/call_create_response.rbs +2166 -79
  96. data/sig/revox/models/call_retrieve_params.rbs +9 -3
  97. data/sig/revox/models/call_retrieve_response.rbs +2166 -79
  98. data/sig/revox/models/campaign_cancel_params.rbs +20 -0
  99. data/sig/revox/models/campaign_cancel_response.rbs +13 -0
  100. data/sig/revox/models/campaign_create_params.rbs +203 -0
  101. data/sig/revox/models/campaign_create_response.rbs +1694 -0
  102. data/sig/revox/models/campaign_delete_params.rbs +20 -0
  103. data/sig/revox/models/campaign_delete_response.rbs +13 -0
  104. data/sig/revox/models/campaign_export_rows_params.rbs +20 -0
  105. data/sig/revox/models/campaign_export_rows_response.rbs +15 -0
  106. data/sig/revox/models/campaign_get_rows_params.rbs +20 -0
  107. data/sig/revox/models/campaign_get_rows_response.rbs +2688 -0
  108. data/sig/revox/models/campaign_list_params.rbs +14 -0
  109. data/sig/revox/models/campaign_list_response.rbs +1694 -0
  110. data/sig/revox/models/campaign_retrieve_params.rbs +20 -0
  111. data/sig/revox/models/campaign_retrieve_response.rbs +1694 -0
  112. data/sig/revox/models/users/me_retrieve_response.rbs +8 -3
  113. data/sig/revox/models/users/me_update_response.rbs +8 -3
  114. data/sig/revox/models/voice_list_response.rbs +45 -3
  115. data/sig/revox/models/voice_preview_params.rbs +35 -1
  116. data/sig/revox/models/voice_retrieve_params.rbs +5 -1
  117. data/sig/revox/models.rbs +14 -2
  118. data/sig/revox/resources/assistants.rbs +54 -0
  119. data/sig/revox/resources/call.rbs +0 -6
  120. data/sig/revox/resources/campaigns.rbs +49 -0
  121. data/sig/revox/resources/voices.rbs +3 -0
  122. metadata +47 -8
  123. data/lib/revox/models/call_list_params.rb +0 -29
  124. data/lib/revox/models/call_list_response.rb +0 -197
  125. data/rbi/revox/models/call_list_params.rbi +0 -47
  126. data/rbi/revox/models/call_list_response.rbi +0 -401
  127. data/sig/revox/models/call_list_params.rbs +0 -28
  128. data/sig/revox/models/call_list_response.rbs +0 -171
@@ -18,8 +18,26 @@ module Revox
18
18
  sig { returns(String) }
19
19
  attr_accessor :prompt
20
20
 
21
- # The background sound to play during the call. Useful to give the impression that
22
- # your AI agent is in an office, in the street, or anywhere else you want.
21
+ # Which call outcomes trigger the after-call SMS. When empty or null, no
22
+ # after-call SMS is sent. E.g. ["interested", "completed", "none"]. Use "none"
23
+ # when outcome is null.
24
+ sig do
25
+ returns(
26
+ T.nilable(
27
+ T::Array[
28
+ Revox::AssistantCreateParams::AfterCallSMSOutcome::OrSymbol
29
+ ]
30
+ )
31
+ )
32
+ end
33
+ attr_accessor :after_call_sms_outcomes
34
+
35
+ # Prompt / instructions for the after-call SMS. Supports {{variable}}
36
+ # placeholders. When null, no after-call SMS is sent.
37
+ sig { returns(T.nilable(String)) }
38
+ attr_accessor :after_call_sms_prompt
39
+
40
+ # Ambient background sound to play during the call. null/omitted disables it.
23
41
  sig do
24
42
  returns(
25
43
  T.nilable(Revox::AssistantCreateParams::BackgroundSound::OrSymbol)
@@ -27,6 +45,13 @@ module Revox
27
45
  end
28
46
  attr_accessor :background_sound
29
47
 
48
+ # Volume of the ambient background sound (0 = silent, 1 = max).
49
+ sig { returns(T.nilable(Float)) }
50
+ attr_reader :background_sound_volume
51
+
52
+ sig { params(background_sound_volume: Float).void }
53
+ attr_writer :background_sound_volume
54
+
30
55
  sig { returns(T.nilable(Revox::AssistantCreateParams::Calendly)) }
31
56
  attr_reader :calendly
32
57
 
@@ -50,6 +75,56 @@ module Revox
50
75
  end
51
76
  attr_writer :call_retry_config
52
77
 
78
+ # Optional Cartesia pronunciation dictionary ID to use for this assistant's calls.
79
+ # Set null to unlink it.
80
+ sig { returns(T.nilable(String)) }
81
+ attr_accessor :cartesia_dictionary_pronunciation_id
82
+
83
+ # Custom API tools the assistant can call during conversations. Each tool defines
84
+ # an HTTP endpoint with variable substitution.
85
+ sig do
86
+ returns(T.nilable(T::Array[Revox::AssistantCreateParams::CustomTool]))
87
+ end
88
+ attr_accessor :custom_tools
89
+
90
+ # Email address(es) to receive notifications when a call ends with a matching
91
+ # outcome. Accepts a single email or a comma-separated list (e.g. "alice@x.com,
92
+ # bob@y.com").
93
+ sig { returns(T.nilable(String)) }
94
+ attr_accessor :email_notification_address
95
+
96
+ # The language used for the notification email content. One of "en" or "fr".
97
+ # Defaults to "en".
98
+ sig do
99
+ returns(
100
+ T.nilable(
101
+ Revox::AssistantCreateParams::EmailNotificationLanguage::OrSymbol
102
+ )
103
+ )
104
+ end
105
+ attr_reader :email_notification_language
106
+
107
+ sig do
108
+ params(
109
+ email_notification_language:
110
+ Revox::AssistantCreateParams::EmailNotificationLanguage::OrSymbol
111
+ ).void
112
+ end
113
+ attr_writer :email_notification_language
114
+
115
+ # Which call outcomes trigger an email notification. E.g. ["interested",
116
+ # "completed", "none"]. Use "none" when outcome is null.
117
+ sig do
118
+ returns(
119
+ T.nilable(
120
+ T::Array[
121
+ Revox::AssistantCreateParams::EmailNotificationOutcome::OrSymbol
122
+ ]
123
+ )
124
+ )
125
+ end
126
+ attr_accessor :email_notification_outcomes
127
+
53
128
  # Optional message to say when the agent decides to end the call.
54
129
  sig { returns(T.nilable(String)) }
55
130
  attr_reader :end_of_call_sentence
@@ -104,6 +179,21 @@ module Revox
104
179
  end
105
180
  attr_writer :first_sentence_mode
106
181
 
182
+ # Override the default outbound phone number for calls placed with this assistant.
183
+ # Must be a phone number owned by the organization in E.164 format (e.g.
184
+ # +1234567890). When null, the organization's default phone number is used.
185
+ sig { returns(T.nilable(String)) }
186
+ attr_accessor :from_phone_number
187
+
188
+ # When transfer_phone_number is set: "warm" (AI bridges) or "cold" (SIP REFER;
189
+ # trunk must allow REFER/PSTN). Omit or null when transfer is disabled.
190
+ sig do
191
+ returns(
192
+ T.nilable(Revox::AssistantCreateParams::HumanTransferMode::OrSymbol)
193
+ )
194
+ end
195
+ attr_accessor :human_transfer_mode
196
+
107
197
  # Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
108
198
  # skip turns to navigate phone menus.
109
199
  sig { returns(T.nilable(T::Boolean)) }
@@ -117,7 +207,9 @@ module Revox
117
207
  T.nilable(
118
208
  T.any(
119
209
  Revox::AssistantCreateParams::LlmModel::UnionMember0,
120
- Revox::AssistantCreateParams::LlmModel::UnionMember1
210
+ Revox::AssistantCreateParams::LlmModel::UnionMember1,
211
+ Revox::AssistantCreateParams::LlmModel::UnionMember2,
212
+ Revox::AssistantCreateParams::LlmModel::UnionMember3
121
213
  )
122
214
  )
123
215
  )
@@ -129,12 +221,19 @@ module Revox
129
221
  llm_model:
130
222
  T.any(
131
223
  Revox::AssistantCreateParams::LlmModel::UnionMember0::OrHash,
132
- Revox::AssistantCreateParams::LlmModel::UnionMember1::OrHash
224
+ Revox::AssistantCreateParams::LlmModel::UnionMember1::OrHash,
225
+ Revox::AssistantCreateParams::LlmModel::UnionMember2::OrHash,
226
+ Revox::AssistantCreateParams::LlmModel::UnionMember3::OrHash
133
227
  )
134
228
  ).void
135
229
  end
136
230
  attr_writer :llm_model
137
231
 
232
+ # Public URL of the brand logo shown on the assistant's demo page. Upload a new
233
+ # logo via POST /assistants/:id/logo. Set explicitly to null to clear it.
234
+ sig { returns(T.nilable(String)) }
235
+ attr_accessor :logo_url
236
+
138
237
  # The maximum duration of the call in seconds. This is the maximum time the call
139
238
  # will be allowed to run.
140
239
  sig { returns(T.nilable(Float)) }
@@ -143,6 +242,63 @@ module Revox
143
242
  sig { params(max_call_duration_secs: Float).void }
144
243
  attr_writer :max_call_duration_secs
145
244
 
245
+ # Optional message the agent will say, without being interruptible, when the call
246
+ # reaches its max duration. Kept short so it fits inside the farewell buffer. If
247
+ # not set, the call ends silently.
248
+ sig { returns(T.nilable(String)) }
249
+ attr_accessor :max_duration_end_message
250
+
251
+ # Canvas position of this assistant's node in its multi-step flow editor.
252
+ sig { returns(T.nilable(Revox::AssistantCreateParams::Position)) }
253
+ attr_reader :position
254
+
255
+ sig do
256
+ params(
257
+ position: T.nilable(Revox::AssistantCreateParams::Position::OrHash)
258
+ ).void
259
+ end
260
+ attr_writer :position
261
+
262
+ # Visual prompt constructor data (nodes, edges, positions). Used by the UI to
263
+ # re-open the visual editor. Does not affect call behavior — the flattened prompt
264
+ # field is what the LLM receives.
265
+ sig { returns(T.nilable(Revox::AssistantCreateParams::PromptFlow)) }
266
+ attr_reader :prompt_flow
267
+
268
+ sig do
269
+ params(
270
+ prompt_flow:
271
+ T.nilable(Revox::AssistantCreateParams::PromptFlow::OrHash)
272
+ ).void
273
+ end
274
+ attr_writer :prompt_flow
275
+
276
+ # Slack notification config. When set, posts a message to the chosen channel after
277
+ # a call ends with one of the configured outcomes.
278
+ sig { returns(T.nilable(Revox::AssistantCreateParams::Slack)) }
279
+ attr_reader :slack
280
+
281
+ sig do
282
+ params(
283
+ slack: T.nilable(Revox::AssistantCreateParams::Slack::OrHash)
284
+ ).void
285
+ end
286
+ attr_writer :slack
287
+
288
+ # Enable SMS tool during calls. When enabled, the agent can send SMS messages to
289
+ # the user on the call.
290
+ sig { returns(T.nilable(T::Boolean)) }
291
+ attr_reader :sms_enabled
292
+
293
+ sig { params(sms_enabled: T::Boolean).void }
294
+ attr_writer :sms_enabled
295
+
296
+ # Hardcoded SMS template to send during calls. When set, this exact text is sent
297
+ # instead of letting the agent generate the message. Supports {{variable}}
298
+ # placeholders.
299
+ sig { returns(T.nilable(String)) }
300
+ attr_accessor :sms_template
301
+
146
302
  # The structured output config to use for the call. This is used to extract the
147
303
  # data from the call (like email, name, company name, etc.).
148
304
  sig do
@@ -164,11 +320,77 @@ module Revox
164
320
  end
165
321
  attr_writer :structured_output_config
166
322
 
323
+ # Custom prompt for structured data extraction. If not provided, a default prompt
324
+ # is used. Available variables: {{transcript}}, {{call_direction}},
325
+ # {{user_phone_number}}, {{agent_phone_number}}.
326
+ sig { returns(T.nilable(String)) }
327
+ attr_accessor :structured_output_prompt
328
+
329
+ # Assistant-level speech-to-text context: structured `general` key/value pairs
330
+ # plus a list of domain `terms`. Prompt-derived context is merged in without
331
+ # replacing existing entries.
332
+ sig { returns(T.nilable(Revox::AssistantCreateParams::SttContext)) }
333
+ attr_reader :stt_context
334
+
335
+ sig do
336
+ params(
337
+ stt_context:
338
+ T.nilable(Revox::AssistantCreateParams::SttContext::OrHash)
339
+ ).void
340
+ end
341
+ attr_writer :stt_context
342
+
343
+ # Transcriber (speech-to-text) model. Defaults to the newest Soniox realtime model
344
+ # when omitted.
345
+ sig do
346
+ returns(T.nilable(Revox::AssistantCreateParams::SttModel::OrSymbol))
347
+ end
348
+ attr_reader :stt_model
349
+
350
+ sig do
351
+ params(stt_model: Revox::AssistantCreateParams::SttModel::OrSymbol).void
352
+ end
353
+ attr_writer :stt_model
354
+
355
+ # Audio clip to play while the agent is processing a response. One of the built-in
356
+ # LiveKit audio clips; null/omitted disables it.
357
+ sig do
358
+ returns(
359
+ T.nilable(Revox::AssistantCreateParams::ThinkingSound::OrSymbol)
360
+ )
361
+ end
362
+ attr_accessor :thinking_sound
363
+
364
+ # Probability [0..1] that the thinking sound plays on any given turn; otherwise
365
+ # the agent is silent while thinking.
366
+ sig { returns(T.nilable(Float)) }
367
+ attr_reader :thinking_sound_probability
368
+
369
+ sig { params(thinking_sound_probability: Float).void }
370
+ attr_writer :thinking_sound_probability
371
+
372
+ # Volume of the thinking sound (0 = silent, 1 = max).
373
+ sig { returns(T.nilable(Float)) }
374
+ attr_reader :thinking_sound_volume
375
+
376
+ sig { params(thinking_sound_volume: Float).void }
377
+ attr_writer :thinking_sound_volume
378
+
167
379
  # Phone number to transfer calls to when users request to speak to a human agent
168
380
  # in E.164 format (e.g. +1234567890).
169
381
  sig { returns(T.nilable(String)) }
170
382
  attr_accessor :transfer_phone_number
171
383
 
384
+ # Assistant kind. 'standalone' (default) is a normal assistant, 'multi-step'
385
+ # orchestrates a flow of sub-assistants, 'sub-assistant' is a step inside a
386
+ # multi-step flow (hidden from the assistants list). Flow transitions are managed
387
+ # via the /assistants/:id/edges endpoints, not on the assistant itself.
388
+ sig { returns(T.nilable(Revox::AssistantCreateParams::Type::OrSymbol)) }
389
+ attr_reader :type
390
+
391
+ sig { params(type: Revox::AssistantCreateParams::Type::OrSymbol).void }
392
+ attr_writer :type
393
+
172
394
  # The voice to use for the call. You can get the list of voices using the /voices
173
395
  # endpoint
174
396
  sig { returns(T.nilable(Revox::AssistantCreateParams::Voice)) }
@@ -182,6 +404,17 @@ module Revox
182
404
  sig { returns(T.nilable(String)) }
183
405
  attr_accessor :voicemail_message
184
406
 
407
+ # SMS message to send when the call reaches voicemail. Supports {{variable}}
408
+ # placeholders. When null, no SMS is sent on voicemail.
409
+ sig { returns(T.nilable(String)) }
410
+ attr_accessor :voicemail_sms_prompt
411
+
412
+ # When using warm transfer: extra instructions for the supervisor handoff summary.
413
+ # If null or empty, the API uses the product default briefing when the call is
414
+ # loaded for the agent.
415
+ sig { returns(T.nilable(String)) }
416
+ attr_accessor :warm_transfer_summary_instructions
417
+
185
418
  # The webhook URL to call when the call is completed.
186
419
  sig { returns(T.nilable(String)) }
187
420
  attr_reader :webhook_url
@@ -189,36 +422,96 @@ module Revox
189
422
  sig { params(webhook_url: String).void }
190
423
  attr_writer :webhook_url
191
424
 
425
+ # Zoho CRM integration config. When set, upserts the prospect (keyed on phone)
426
+ # into the chosen module and attaches a Note with the call summary after a call
427
+ # ends with one of the configured outcomes.
428
+ sig { returns(T.nilable(Revox::AssistantCreateParams::Zoho)) }
429
+ attr_reader :zoho
430
+
431
+ sig do
432
+ params(zoho: T.nilable(Revox::AssistantCreateParams::Zoho::OrHash)).void
433
+ end
434
+ attr_writer :zoho
435
+
192
436
  sig do
193
437
  params(
194
438
  name: String,
195
439
  prompt: String,
440
+ after_call_sms_outcomes:
441
+ T.nilable(
442
+ T::Array[
443
+ Revox::AssistantCreateParams::AfterCallSMSOutcome::OrSymbol
444
+ ]
445
+ ),
446
+ after_call_sms_prompt: T.nilable(String),
196
447
  background_sound:
197
448
  T.nilable(Revox::AssistantCreateParams::BackgroundSound::OrSymbol),
449
+ background_sound_volume: Float,
198
450
  calendly: T.nilable(Revox::AssistantCreateParams::Calendly::OrHash),
199
451
  call_retry_config:
200
452
  Revox::AssistantCreateParams::CallRetryConfig::OrHash,
453
+ cartesia_dictionary_pronunciation_id: T.nilable(String),
454
+ custom_tools:
455
+ T.nilable(
456
+ T::Array[Revox::AssistantCreateParams::CustomTool::OrHash]
457
+ ),
458
+ email_notification_address: T.nilable(String),
459
+ email_notification_language:
460
+ Revox::AssistantCreateParams::EmailNotificationLanguage::OrSymbol,
461
+ email_notification_outcomes:
462
+ T.nilable(
463
+ T::Array[
464
+ Revox::AssistantCreateParams::EmailNotificationOutcome::OrSymbol
465
+ ]
466
+ ),
201
467
  end_of_call_sentence: String,
202
468
  faq_items: T::Array[Revox::AssistantCreateParams::FaqItem::OrHash],
203
469
  first_sentence: String,
204
470
  first_sentence_delay_ms: Integer,
205
471
  first_sentence_mode:
206
472
  Revox::AssistantCreateParams::FirstSentenceMode::OrSymbol,
473
+ from_phone_number: T.nilable(String),
474
+ human_transfer_mode:
475
+ T.nilable(
476
+ Revox::AssistantCreateParams::HumanTransferMode::OrSymbol
477
+ ),
207
478
  ivr_navigation_enabled: T::Boolean,
208
479
  llm_model:
209
480
  T.any(
210
481
  Revox::AssistantCreateParams::LlmModel::UnionMember0::OrHash,
211
- Revox::AssistantCreateParams::LlmModel::UnionMember1::OrHash
482
+ Revox::AssistantCreateParams::LlmModel::UnionMember1::OrHash,
483
+ Revox::AssistantCreateParams::LlmModel::UnionMember2::OrHash,
484
+ Revox::AssistantCreateParams::LlmModel::UnionMember3::OrHash
212
485
  ),
486
+ logo_url: T.nilable(String),
213
487
  max_call_duration_secs: Float,
488
+ max_duration_end_message: T.nilable(String),
489
+ position: T.nilable(Revox::AssistantCreateParams::Position::OrHash),
490
+ prompt_flow:
491
+ T.nilable(Revox::AssistantCreateParams::PromptFlow::OrHash),
492
+ slack: T.nilable(Revox::AssistantCreateParams::Slack::OrHash),
493
+ sms_enabled: T::Boolean,
494
+ sms_template: T.nilable(String),
214
495
  structured_output_config:
215
496
  T::Array[
216
497
  Revox::AssistantCreateParams::StructuredOutputConfig::OrHash
217
498
  ],
499
+ structured_output_prompt: T.nilable(String),
500
+ stt_context:
501
+ T.nilable(Revox::AssistantCreateParams::SttContext::OrHash),
502
+ stt_model: Revox::AssistantCreateParams::SttModel::OrSymbol,
503
+ thinking_sound:
504
+ T.nilable(Revox::AssistantCreateParams::ThinkingSound::OrSymbol),
505
+ thinking_sound_probability: Float,
506
+ thinking_sound_volume: Float,
218
507
  transfer_phone_number: T.nilable(String),
508
+ type: Revox::AssistantCreateParams::Type::OrSymbol,
219
509
  voice: Revox::AssistantCreateParams::Voice::OrHash,
220
510
  voicemail_message: T.nilable(String),
511
+ voicemail_sms_prompt: T.nilable(String),
512
+ warm_transfer_summary_instructions: T.nilable(String),
221
513
  webhook_url: String,
514
+ zoho: T.nilable(Revox::AssistantCreateParams::Zoho::OrHash),
222
515
  request_options: Revox::RequestOptions::OrHash
223
516
  ).returns(T.attached_class)
224
517
  end
@@ -226,13 +519,37 @@ module Revox
226
519
  name:,
227
520
  # The prompt to use for the call. This will be given to the LLM (gpt-4.1)
228
521
  prompt:,
229
- # The background sound to play during the call. Useful to give the impression that
230
- # your AI agent is in an office, in the street, or anywhere else you want.
522
+ # Which call outcomes trigger the after-call SMS. When empty or null, no
523
+ # after-call SMS is sent. E.g. ["interested", "completed", "none"]. Use "none"
524
+ # when outcome is null.
525
+ after_call_sms_outcomes: nil,
526
+ # Prompt / instructions for the after-call SMS. Supports {{variable}}
527
+ # placeholders. When null, no after-call SMS is sent.
528
+ after_call_sms_prompt: nil,
529
+ # Ambient background sound to play during the call. null/omitted disables it.
231
530
  background_sound: nil,
531
+ # Volume of the ambient background sound (0 = silent, 1 = max).
532
+ background_sound_volume: nil,
232
533
  calendly: nil,
233
534
  # Configuration for call retry behavior including time windows, delays, and max
234
535
  # iterations. If not provided, defaults will be used.
235
536
  call_retry_config: nil,
537
+ # Optional Cartesia pronunciation dictionary ID to use for this assistant's calls.
538
+ # Set null to unlink it.
539
+ cartesia_dictionary_pronunciation_id: nil,
540
+ # Custom API tools the assistant can call during conversations. Each tool defines
541
+ # an HTTP endpoint with variable substitution.
542
+ custom_tools: nil,
543
+ # Email address(es) to receive notifications when a call ends with a matching
544
+ # outcome. Accepts a single email or a comma-separated list (e.g. "alice@x.com,
545
+ # bob@y.com").
546
+ email_notification_address: nil,
547
+ # The language used for the notification email content. One of "en" or "fr".
548
+ # Defaults to "en".
549
+ email_notification_language: nil,
550
+ # Which call outcomes trigger an email notification. E.g. ["interested",
551
+ # "completed", "none"]. Use "none" when outcome is null.
552
+ email_notification_outcomes: nil,
236
553
  # Optional message to say when the agent decides to end the call.
237
554
  end_of_call_sentence: nil,
238
555
  # FAQ items to associate with this assistant. When provided, replaces all existing
@@ -247,27 +564,92 @@ module Revox
247
564
  # first_sentence will be spoken exactly as provided. "none" means the agent will
248
565
  # not speak first and will wait for the user.
249
566
  first_sentence_mode: nil,
567
+ # Override the default outbound phone number for calls placed with this assistant.
568
+ # Must be a phone number owned by the organization in E.164 format (e.g.
569
+ # +1234567890). When null, the organization's default phone number is used.
570
+ from_phone_number: nil,
571
+ # When transfer_phone_number is set: "warm" (AI bridges) or "cold" (SIP REFER;
572
+ # trunk must allow REFER/PSTN). Omit or null when transfer is disabled.
573
+ human_transfer_mode: nil,
250
574
  # Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
251
575
  # skip turns to navigate phone menus.
252
576
  ivr_navigation_enabled: nil,
253
577
  llm_model: nil,
578
+ # Public URL of the brand logo shown on the assistant's demo page. Upload a new
579
+ # logo via POST /assistants/:id/logo. Set explicitly to null to clear it.
580
+ logo_url: nil,
254
581
  # The maximum duration of the call in seconds. This is the maximum time the call
255
582
  # will be allowed to run.
256
583
  max_call_duration_secs: nil,
584
+ # Optional message the agent will say, without being interruptible, when the call
585
+ # reaches its max duration. Kept short so it fits inside the farewell buffer. If
586
+ # not set, the call ends silently.
587
+ max_duration_end_message: nil,
588
+ # Canvas position of this assistant's node in its multi-step flow editor.
589
+ position: nil,
590
+ # Visual prompt constructor data (nodes, edges, positions). Used by the UI to
591
+ # re-open the visual editor. Does not affect call behavior — the flattened prompt
592
+ # field is what the LLM receives.
593
+ prompt_flow: nil,
594
+ # Slack notification config. When set, posts a message to the chosen channel after
595
+ # a call ends with one of the configured outcomes.
596
+ slack: nil,
597
+ # Enable SMS tool during calls. When enabled, the agent can send SMS messages to
598
+ # the user on the call.
599
+ sms_enabled: nil,
600
+ # Hardcoded SMS template to send during calls. When set, this exact text is sent
601
+ # instead of letting the agent generate the message. Supports {{variable}}
602
+ # placeholders.
603
+ sms_template: nil,
257
604
  # The structured output config to use for the call. This is used to extract the
258
605
  # data from the call (like email, name, company name, etc.).
259
606
  structured_output_config: nil,
607
+ # Custom prompt for structured data extraction. If not provided, a default prompt
608
+ # is used. Available variables: {{transcript}}, {{call_direction}},
609
+ # {{user_phone_number}}, {{agent_phone_number}}.
610
+ structured_output_prompt: nil,
611
+ # Assistant-level speech-to-text context: structured `general` key/value pairs
612
+ # plus a list of domain `terms`. Prompt-derived context is merged in without
613
+ # replacing existing entries.
614
+ stt_context: nil,
615
+ # Transcriber (speech-to-text) model. Defaults to the newest Soniox realtime model
616
+ # when omitted.
617
+ stt_model: nil,
618
+ # Audio clip to play while the agent is processing a response. One of the built-in
619
+ # LiveKit audio clips; null/omitted disables it.
620
+ thinking_sound: nil,
621
+ # Probability [0..1] that the thinking sound plays on any given turn; otherwise
622
+ # the agent is silent while thinking.
623
+ thinking_sound_probability: nil,
624
+ # Volume of the thinking sound (0 = silent, 1 = max).
625
+ thinking_sound_volume: nil,
260
626
  # Phone number to transfer calls to when users request to speak to a human agent
261
627
  # in E.164 format (e.g. +1234567890).
262
628
  transfer_phone_number: nil,
629
+ # Assistant kind. 'standalone' (default) is a normal assistant, 'multi-step'
630
+ # orchestrates a flow of sub-assistants, 'sub-assistant' is a step inside a
631
+ # multi-step flow (hidden from the assistants list). Flow transitions are managed
632
+ # via the /assistants/:id/edges endpoints, not on the assistant itself.
633
+ type: nil,
263
634
  # The voice to use for the call. You can get the list of voices using the /voices
264
635
  # endpoint
265
636
  voice: nil,
266
637
  # If set, when voicemail is detected the agent will speak this message then hang
267
638
  # up; if null, hang up immediately.
268
639
  voicemail_message: nil,
640
+ # SMS message to send when the call reaches voicemail. Supports {{variable}}
641
+ # placeholders. When null, no SMS is sent on voicemail.
642
+ voicemail_sms_prompt: nil,
643
+ # When using warm transfer: extra instructions for the supervisor handoff summary.
644
+ # If null or empty, the API uses the product default briefing when the call is
645
+ # loaded for the agent.
646
+ warm_transfer_summary_instructions: nil,
269
647
  # The webhook URL to call when the call is completed.
270
648
  webhook_url: nil,
649
+ # Zoho CRM integration config. When set, upserts the prospect (keyed on phone)
650
+ # into the chosen module and attaches a Note with the call summary after a call
651
+ # ends with one of the configured outcomes.
652
+ zoho: nil,
271
653
  request_options: {}
272
654
  )
273
655
  end
@@ -277,31 +659,76 @@ module Revox
277
659
  {
278
660
  name: String,
279
661
  prompt: String,
662
+ after_call_sms_outcomes:
663
+ T.nilable(
664
+ T::Array[
665
+ Revox::AssistantCreateParams::AfterCallSMSOutcome::OrSymbol
666
+ ]
667
+ ),
668
+ after_call_sms_prompt: T.nilable(String),
280
669
  background_sound:
281
670
  T.nilable(
282
671
  Revox::AssistantCreateParams::BackgroundSound::OrSymbol
283
672
  ),
673
+ background_sound_volume: Float,
284
674
  calendly: T.nilable(Revox::AssistantCreateParams::Calendly),
285
675
  call_retry_config: Revox::AssistantCreateParams::CallRetryConfig,
676
+ cartesia_dictionary_pronunciation_id: T.nilable(String),
677
+ custom_tools:
678
+ T.nilable(T::Array[Revox::AssistantCreateParams::CustomTool]),
679
+ email_notification_address: T.nilable(String),
680
+ email_notification_language:
681
+ Revox::AssistantCreateParams::EmailNotificationLanguage::OrSymbol,
682
+ email_notification_outcomes:
683
+ T.nilable(
684
+ T::Array[
685
+ Revox::AssistantCreateParams::EmailNotificationOutcome::OrSymbol
686
+ ]
687
+ ),
286
688
  end_of_call_sentence: String,
287
689
  faq_items: T::Array[Revox::AssistantCreateParams::FaqItem],
288
690
  first_sentence: String,
289
691
  first_sentence_delay_ms: Integer,
290
692
  first_sentence_mode:
291
693
  Revox::AssistantCreateParams::FirstSentenceMode::OrSymbol,
694
+ from_phone_number: T.nilable(String),
695
+ human_transfer_mode:
696
+ T.nilable(
697
+ Revox::AssistantCreateParams::HumanTransferMode::OrSymbol
698
+ ),
292
699
  ivr_navigation_enabled: T::Boolean,
293
700
  llm_model:
294
701
  T.any(
295
702
  Revox::AssistantCreateParams::LlmModel::UnionMember0,
296
- Revox::AssistantCreateParams::LlmModel::UnionMember1
703
+ Revox::AssistantCreateParams::LlmModel::UnionMember1,
704
+ Revox::AssistantCreateParams::LlmModel::UnionMember2,
705
+ Revox::AssistantCreateParams::LlmModel::UnionMember3
297
706
  ),
707
+ logo_url: T.nilable(String),
298
708
  max_call_duration_secs: Float,
709
+ max_duration_end_message: T.nilable(String),
710
+ position: T.nilable(Revox::AssistantCreateParams::Position),
711
+ prompt_flow: T.nilable(Revox::AssistantCreateParams::PromptFlow),
712
+ slack: T.nilable(Revox::AssistantCreateParams::Slack),
713
+ sms_enabled: T::Boolean,
714
+ sms_template: T.nilable(String),
299
715
  structured_output_config:
300
716
  T::Array[Revox::AssistantCreateParams::StructuredOutputConfig],
717
+ structured_output_prompt: T.nilable(String),
718
+ stt_context: T.nilable(Revox::AssistantCreateParams::SttContext),
719
+ stt_model: Revox::AssistantCreateParams::SttModel::OrSymbol,
720
+ thinking_sound:
721
+ T.nilable(Revox::AssistantCreateParams::ThinkingSound::OrSymbol),
722
+ thinking_sound_probability: Float,
723
+ thinking_sound_volume: Float,
301
724
  transfer_phone_number: T.nilable(String),
725
+ type: Revox::AssistantCreateParams::Type::OrSymbol,
302
726
  voice: Revox::AssistantCreateParams::Voice,
303
727
  voicemail_message: T.nilable(String),
728
+ voicemail_sms_prompt: T.nilable(String),
729
+ warm_transfer_summary_instructions: T.nilable(String),
304
730
  webhook_url: String,
731
+ zoho: T.nilable(Revox::AssistantCreateParams::Zoho),
305
732
  request_options: Revox::RequestOptions
306
733
  }
307
734
  )
@@ -309,8 +736,68 @@ module Revox
309
736
  def to_hash
310
737
  end
311
738
 
312
- # The background sound to play during the call. Useful to give the impression that
313
- # your AI agent is in an office, in the street, or anywhere else you want.
739
+ module AfterCallSMSOutcome
740
+ extend Revox::Internal::Type::Enum
741
+
742
+ TaggedSymbol =
743
+ T.type_alias do
744
+ T.all(Symbol, Revox::AssistantCreateParams::AfterCallSMSOutcome)
745
+ end
746
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
747
+
748
+ NOT_INTERESTED =
749
+ T.let(
750
+ :not_interested,
751
+ Revox::AssistantCreateParams::AfterCallSMSOutcome::TaggedSymbol
752
+ )
753
+ INTERESTED =
754
+ T.let(
755
+ :interested,
756
+ Revox::AssistantCreateParams::AfterCallSMSOutcome::TaggedSymbol
757
+ )
758
+ COMPLETED =
759
+ T.let(
760
+ :completed,
761
+ Revox::AssistantCreateParams::AfterCallSMSOutcome::TaggedSymbol
762
+ )
763
+ REQUESTED_CALLBACK_LATER =
764
+ T.let(
765
+ :requested_callback_later,
766
+ Revox::AssistantCreateParams::AfterCallSMSOutcome::TaggedSymbol
767
+ )
768
+ REQUESTED_CALLBACK_NEW_NUMBER =
769
+ T.let(
770
+ :requested_callback_new_number,
771
+ Revox::AssistantCreateParams::AfterCallSMSOutcome::TaggedSymbol
772
+ )
773
+ DO_NOT_CONTACT =
774
+ T.let(
775
+ :do_not_contact,
776
+ Revox::AssistantCreateParams::AfterCallSMSOutcome::TaggedSymbol
777
+ )
778
+ AI_AVERSE =
779
+ T.let(
780
+ :ai_averse,
781
+ Revox::AssistantCreateParams::AfterCallSMSOutcome::TaggedSymbol
782
+ )
783
+ NONE =
784
+ T.let(
785
+ :none,
786
+ Revox::AssistantCreateParams::AfterCallSMSOutcome::TaggedSymbol
787
+ )
788
+
789
+ sig do
790
+ override.returns(
791
+ T::Array[
792
+ Revox::AssistantCreateParams::AfterCallSMSOutcome::TaggedSymbol
793
+ ]
794
+ )
795
+ end
796
+ def self.values
797
+ end
798
+ end
799
+
800
+ # Ambient background sound to play during the call. null/omitted disables it.
314
801
  module BackgroundSound
315
802
  extend Revox::Internal::Type::Enum
316
803
 
@@ -385,6 +872,24 @@ module Revox
385
872
  )
386
873
  end
387
874
 
875
+ # Days of the week when calls are allowed, in the recipient's timezone. Default:
876
+ # Monday through Friday.
877
+ sig do
878
+ returns(
879
+ T::Array[
880
+ Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::OrSymbol
881
+ ]
882
+ )
883
+ end
884
+ attr_accessor :allowed_days
885
+
886
+ # If true and max_retry_attempts >= 2, attempt #2 fires immediately (skipping
887
+ # retry_delay_seconds) when attempt #1 didn't reach a human.
888
+ # Calling-window/allowed-days checks still apply. Only affects the 1→2 transition.
889
+ # Default: false.
890
+ sig { returns(T::Boolean) }
891
+ attr_accessor :call_twice_in_a_row
892
+
388
893
  sig do
389
894
  returns(
390
895
  T::Array[
@@ -408,6 +913,11 @@ module Revox
408
913
  # iterations. If not provided, defaults will be used.
409
914
  sig do
410
915
  params(
916
+ allowed_days:
917
+ T::Array[
918
+ Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::OrSymbol
919
+ ],
920
+ call_twice_in_a_row: T::Boolean,
411
921
  calling_windows:
412
922
  T::Array[
413
923
  Revox::AssistantCreateParams::CallRetryConfig::CallingWindow::OrHash
@@ -417,6 +927,14 @@ module Revox
417
927
  ).returns(T.attached_class)
418
928
  end
419
929
  def self.new(
930
+ # Days of the week when calls are allowed, in the recipient's timezone. Default:
931
+ # Monday through Friday.
932
+ allowed_days:,
933
+ # If true and max_retry_attempts >= 2, attempt #2 fires immediately (skipping
934
+ # retry_delay_seconds) when attempt #1 didn't reach a human.
935
+ # Calling-window/allowed-days checks still apply. Only affects the 1→2 transition.
936
+ # Default: false.
937
+ call_twice_in_a_row:,
420
938
  calling_windows:,
421
939
  # Maximum number of call retry attempts. Default: 3.
422
940
  max_retry_attempts:,
@@ -430,6 +948,11 @@ module Revox
430
948
  sig do
431
949
  override.returns(
432
950
  {
951
+ allowed_days:
952
+ T::Array[
953
+ Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::OrSymbol
954
+ ],
955
+ call_twice_in_a_row: T::Boolean,
433
956
  calling_windows:
434
957
  T::Array[
435
958
  Revox::AssistantCreateParams::CallRetryConfig::CallingWindow
@@ -442,6 +965,65 @@ module Revox
442
965
  def to_hash
443
966
  end
444
967
 
968
+ module AllowedDay
969
+ extend Revox::Internal::Type::Enum
970
+
971
+ TaggedSymbol =
972
+ T.type_alias do
973
+ T.all(
974
+ Symbol,
975
+ Revox::AssistantCreateParams::CallRetryConfig::AllowedDay
976
+ )
977
+ end
978
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
979
+
980
+ MONDAY =
981
+ T.let(
982
+ :monday,
983
+ Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
984
+ )
985
+ TUESDAY =
986
+ T.let(
987
+ :tuesday,
988
+ Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
989
+ )
990
+ WEDNESDAY =
991
+ T.let(
992
+ :wednesday,
993
+ Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
994
+ )
995
+ THURSDAY =
996
+ T.let(
997
+ :thursday,
998
+ Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
999
+ )
1000
+ FRIDAY =
1001
+ T.let(
1002
+ :friday,
1003
+ Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
1004
+ )
1005
+ SATURDAY =
1006
+ T.let(
1007
+ :saturday,
1008
+ Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
1009
+ )
1010
+ SUNDAY =
1011
+ T.let(
1012
+ :sunday,
1013
+ Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
1014
+ )
1015
+
1016
+ sig do
1017
+ override.returns(
1018
+ T::Array[
1019
+ Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
1020
+ ]
1021
+ )
1022
+ end
1023
+ def self.values
1024
+ end
1025
+ end
1026
+
445
1027
  class CallingWindow < Revox::Internal::Type::BaseModel
446
1028
  OrHash =
447
1029
  T.type_alias do
@@ -502,56 +1084,500 @@ module Revox
502
1084
  end
503
1085
  end
504
1086
 
505
- class FaqItem < Revox::Internal::Type::BaseModel
1087
+ class CustomTool < Revox::Internal::Type::BaseModel
506
1088
  OrHash =
507
1089
  T.type_alias do
508
1090
  T.any(
509
- Revox::AssistantCreateParams::FaqItem,
1091
+ Revox::AssistantCreateParams::CustomTool,
510
1092
  Revox::Internal::AnyHash
511
1093
  )
512
1094
  end
513
1095
 
514
- sig { returns(String) }
515
- attr_accessor :answer
1096
+ # JSON body template for the request. Use quoted {{variable}} placeholders (e.g.
1097
+ # "{{name}}") for dynamic values
1098
+ sig { returns(T.nilable(String)) }
1099
+ attr_accessor :body_template
516
1100
 
1101
+ # Human-readable description of what the tool does, used by the LLM to decide when
1102
+ # to call it
517
1103
  sig { returns(String) }
518
- attr_accessor :question
1104
+ attr_accessor :description
519
1105
 
1106
+ # HTTP headers to include in the request. Values support {{variable}} placeholders
520
1107
  sig do
521
- params(answer: String, question: String).returns(T.attached_class)
522
- end
523
- def self.new(answer:, question:)
1108
+ returns(T::Array[Revox::AssistantCreateParams::CustomTool::Header])
524
1109
  end
1110
+ attr_accessor :headers
525
1111
 
526
- sig { override.returns({ answer: String, question: String }) }
527
- def to_hash
1112
+ # Schema defining the parameters the LLM should extract from the conversation to
1113
+ # pass to this tool
1114
+ sig do
1115
+ returns(
1116
+ T::Array[Revox::AssistantCreateParams::CustomTool::InputSchema]
1117
+ )
528
1118
  end
529
- end
1119
+ attr_accessor :input_schema
530
1120
 
531
- # How the first sentence should be handled. "generated" means the LLM will
532
- # generate a response based on the first_sentence instruction. "static" means the
533
- # first_sentence will be spoken exactly as provided. "none" means the agent will
534
- # not speak first and will wait for the user.
535
- module FirstSentenceMode
536
- extend Revox::Internal::Type::Enum
1121
+ # HTTP method to use when calling the API endpoint
1122
+ sig do
1123
+ returns(Revox::AssistantCreateParams::CustomTool::Method::OrSymbol)
1124
+ end
1125
+ attr_accessor :method_
537
1126
 
538
- TaggedSymbol =
539
- T.type_alias do
540
- T.all(Symbol, Revox::AssistantCreateParams::FirstSentenceMode)
541
- end
542
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1127
+ # Unique tool name in lowercase_snake_case (e.g. check_inventory)
1128
+ sig { returns(String) }
1129
+ attr_accessor :name
543
1130
 
544
- GENERATED =
545
- T.let(
546
- :generated,
547
- Revox::AssistantCreateParams::FirstSentenceMode::TaggedSymbol
548
- )
549
- STATIC =
550
- T.let(
551
- :static,
552
- Revox::AssistantCreateParams::FirstSentenceMode::TaggedSymbol
1131
+ # Query string parameters appended to the URL. Values support {{variable}}
1132
+ # placeholders
1133
+ sig do
1134
+ returns(
1135
+ T::Array[Revox::AssistantCreateParams::CustomTool::QueryParam]
553
1136
  )
554
- NONE =
1137
+ end
1138
+ attr_accessor :query_params
1139
+
1140
+ # Full URL of the API endpoint. Supports {{variable}} placeholders for dynamic
1141
+ # values
1142
+ sig { returns(String) }
1143
+ attr_accessor :url
1144
+
1145
+ sig do
1146
+ params(
1147
+ body_template: T.nilable(String),
1148
+ description: String,
1149
+ headers:
1150
+ T::Array[
1151
+ Revox::AssistantCreateParams::CustomTool::Header::OrHash
1152
+ ],
1153
+ input_schema:
1154
+ T::Array[
1155
+ Revox::AssistantCreateParams::CustomTool::InputSchema::OrHash
1156
+ ],
1157
+ method_: Revox::AssistantCreateParams::CustomTool::Method::OrSymbol,
1158
+ name: String,
1159
+ query_params:
1160
+ T::Array[
1161
+ Revox::AssistantCreateParams::CustomTool::QueryParam::OrHash
1162
+ ],
1163
+ url: String
1164
+ ).returns(T.attached_class)
1165
+ end
1166
+ def self.new(
1167
+ # JSON body template for the request. Use quoted {{variable}} placeholders (e.g.
1168
+ # "{{name}}") for dynamic values
1169
+ body_template:,
1170
+ # Human-readable description of what the tool does, used by the LLM to decide when
1171
+ # to call it
1172
+ description:,
1173
+ # HTTP headers to include in the request. Values support {{variable}} placeholders
1174
+ headers:,
1175
+ # Schema defining the parameters the LLM should extract from the conversation to
1176
+ # pass to this tool
1177
+ input_schema:,
1178
+ # HTTP method to use when calling the API endpoint
1179
+ method_:,
1180
+ # Unique tool name in lowercase_snake_case (e.g. check_inventory)
1181
+ name:,
1182
+ # Query string parameters appended to the URL. Values support {{variable}}
1183
+ # placeholders
1184
+ query_params:,
1185
+ # Full URL of the API endpoint. Supports {{variable}} placeholders for dynamic
1186
+ # values
1187
+ url:
1188
+ )
1189
+ end
1190
+
1191
+ sig do
1192
+ override.returns(
1193
+ {
1194
+ body_template: T.nilable(String),
1195
+ description: String,
1196
+ headers:
1197
+ T::Array[Revox::AssistantCreateParams::CustomTool::Header],
1198
+ input_schema:
1199
+ T::Array[Revox::AssistantCreateParams::CustomTool::InputSchema],
1200
+ method_:
1201
+ Revox::AssistantCreateParams::CustomTool::Method::OrSymbol,
1202
+ name: String,
1203
+ query_params:
1204
+ T::Array[Revox::AssistantCreateParams::CustomTool::QueryParam],
1205
+ url: String
1206
+ }
1207
+ )
1208
+ end
1209
+ def to_hash
1210
+ end
1211
+
1212
+ class Header < Revox::Internal::Type::BaseModel
1213
+ OrHash =
1214
+ T.type_alias do
1215
+ T.any(
1216
+ Revox::AssistantCreateParams::CustomTool::Header,
1217
+ Revox::Internal::AnyHash
1218
+ )
1219
+ end
1220
+
1221
+ sig { returns(String) }
1222
+ attr_accessor :key
1223
+
1224
+ sig { returns(String) }
1225
+ attr_accessor :value
1226
+
1227
+ sig { params(key: String, value: String).returns(T.attached_class) }
1228
+ def self.new(key:, value:)
1229
+ end
1230
+
1231
+ sig { override.returns({ key: String, value: String }) }
1232
+ def to_hash
1233
+ end
1234
+ end
1235
+
1236
+ class InputSchema < Revox::Internal::Type::BaseModel
1237
+ OrHash =
1238
+ T.type_alias do
1239
+ T.any(
1240
+ Revox::AssistantCreateParams::CustomTool::InputSchema,
1241
+ Revox::Internal::AnyHash
1242
+ )
1243
+ end
1244
+
1245
+ sig { returns(String) }
1246
+ attr_accessor :name
1247
+
1248
+ sig { returns(T::Boolean) }
1249
+ attr_accessor :required
1250
+
1251
+ sig do
1252
+ returns(
1253
+ Revox::AssistantCreateParams::CustomTool::InputSchema::Type::OrSymbol
1254
+ )
1255
+ end
1256
+ attr_accessor :type
1257
+
1258
+ sig { returns(T.nilable(String)) }
1259
+ attr_reader :description
1260
+
1261
+ sig { params(description: String).void }
1262
+ attr_writer :description
1263
+
1264
+ sig { returns(T.nilable(T::Array[String])) }
1265
+ attr_reader :enum_options
1266
+
1267
+ sig { params(enum_options: T::Array[String]).void }
1268
+ attr_writer :enum_options
1269
+
1270
+ sig do
1271
+ params(
1272
+ name: String,
1273
+ required: T::Boolean,
1274
+ type:
1275
+ Revox::AssistantCreateParams::CustomTool::InputSchema::Type::OrSymbol,
1276
+ description: String,
1277
+ enum_options: T::Array[String]
1278
+ ).returns(T.attached_class)
1279
+ end
1280
+ def self.new(
1281
+ name:,
1282
+ required:,
1283
+ type:,
1284
+ description: nil,
1285
+ enum_options: nil
1286
+ )
1287
+ end
1288
+
1289
+ sig do
1290
+ override.returns(
1291
+ {
1292
+ name: String,
1293
+ required: T::Boolean,
1294
+ type:
1295
+ Revox::AssistantCreateParams::CustomTool::InputSchema::Type::OrSymbol,
1296
+ description: String,
1297
+ enum_options: T::Array[String]
1298
+ }
1299
+ )
1300
+ end
1301
+ def to_hash
1302
+ end
1303
+
1304
+ module Type
1305
+ extend Revox::Internal::Type::Enum
1306
+
1307
+ TaggedSymbol =
1308
+ T.type_alias do
1309
+ T.all(
1310
+ Symbol,
1311
+ Revox::AssistantCreateParams::CustomTool::InputSchema::Type
1312
+ )
1313
+ end
1314
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1315
+
1316
+ STRING =
1317
+ T.let(
1318
+ :string,
1319
+ Revox::AssistantCreateParams::CustomTool::InputSchema::Type::TaggedSymbol
1320
+ )
1321
+ NUMBER =
1322
+ T.let(
1323
+ :number,
1324
+ Revox::AssistantCreateParams::CustomTool::InputSchema::Type::TaggedSymbol
1325
+ )
1326
+ BOOLEAN =
1327
+ T.let(
1328
+ :boolean,
1329
+ Revox::AssistantCreateParams::CustomTool::InputSchema::Type::TaggedSymbol
1330
+ )
1331
+ ENUM =
1332
+ T.let(
1333
+ :enum,
1334
+ Revox::AssistantCreateParams::CustomTool::InputSchema::Type::TaggedSymbol
1335
+ )
1336
+ DATE =
1337
+ T.let(
1338
+ :date,
1339
+ Revox::AssistantCreateParams::CustomTool::InputSchema::Type::TaggedSymbol
1340
+ )
1341
+ DATETIME =
1342
+ T.let(
1343
+ :datetime,
1344
+ Revox::AssistantCreateParams::CustomTool::InputSchema::Type::TaggedSymbol
1345
+ )
1346
+
1347
+ sig do
1348
+ override.returns(
1349
+ T::Array[
1350
+ Revox::AssistantCreateParams::CustomTool::InputSchema::Type::TaggedSymbol
1351
+ ]
1352
+ )
1353
+ end
1354
+ def self.values
1355
+ end
1356
+ end
1357
+ end
1358
+
1359
+ # HTTP method to use when calling the API endpoint
1360
+ module Method
1361
+ extend Revox::Internal::Type::Enum
1362
+
1363
+ TaggedSymbol =
1364
+ T.type_alias do
1365
+ T.all(Symbol, Revox::AssistantCreateParams::CustomTool::Method)
1366
+ end
1367
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1368
+
1369
+ GET =
1370
+ T.let(
1371
+ :GET,
1372
+ Revox::AssistantCreateParams::CustomTool::Method::TaggedSymbol
1373
+ )
1374
+ POST =
1375
+ T.let(
1376
+ :POST,
1377
+ Revox::AssistantCreateParams::CustomTool::Method::TaggedSymbol
1378
+ )
1379
+ PUT =
1380
+ T.let(
1381
+ :PUT,
1382
+ Revox::AssistantCreateParams::CustomTool::Method::TaggedSymbol
1383
+ )
1384
+ PATCH =
1385
+ T.let(
1386
+ :PATCH,
1387
+ Revox::AssistantCreateParams::CustomTool::Method::TaggedSymbol
1388
+ )
1389
+ DELETE =
1390
+ T.let(
1391
+ :DELETE,
1392
+ Revox::AssistantCreateParams::CustomTool::Method::TaggedSymbol
1393
+ )
1394
+
1395
+ sig do
1396
+ override.returns(
1397
+ T::Array[
1398
+ Revox::AssistantCreateParams::CustomTool::Method::TaggedSymbol
1399
+ ]
1400
+ )
1401
+ end
1402
+ def self.values
1403
+ end
1404
+ end
1405
+
1406
+ class QueryParam < Revox::Internal::Type::BaseModel
1407
+ OrHash =
1408
+ T.type_alias do
1409
+ T.any(
1410
+ Revox::AssistantCreateParams::CustomTool::QueryParam,
1411
+ Revox::Internal::AnyHash
1412
+ )
1413
+ end
1414
+
1415
+ sig { returns(String) }
1416
+ attr_accessor :key
1417
+
1418
+ sig { returns(String) }
1419
+ attr_accessor :value
1420
+
1421
+ sig { params(key: String, value: String).returns(T.attached_class) }
1422
+ def self.new(key:, value:)
1423
+ end
1424
+
1425
+ sig { override.returns({ key: String, value: String }) }
1426
+ def to_hash
1427
+ end
1428
+ end
1429
+ end
1430
+
1431
+ # The language used for the notification email content. One of "en" or "fr".
1432
+ # Defaults to "en".
1433
+ module EmailNotificationLanguage
1434
+ extend Revox::Internal::Type::Enum
1435
+
1436
+ TaggedSymbol =
1437
+ T.type_alias do
1438
+ T.all(
1439
+ Symbol,
1440
+ Revox::AssistantCreateParams::EmailNotificationLanguage
1441
+ )
1442
+ end
1443
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1444
+
1445
+ EN =
1446
+ T.let(
1447
+ :en,
1448
+ Revox::AssistantCreateParams::EmailNotificationLanguage::TaggedSymbol
1449
+ )
1450
+ FR =
1451
+ T.let(
1452
+ :fr,
1453
+ Revox::AssistantCreateParams::EmailNotificationLanguage::TaggedSymbol
1454
+ )
1455
+
1456
+ sig do
1457
+ override.returns(
1458
+ T::Array[
1459
+ Revox::AssistantCreateParams::EmailNotificationLanguage::TaggedSymbol
1460
+ ]
1461
+ )
1462
+ end
1463
+ def self.values
1464
+ end
1465
+ end
1466
+
1467
+ module EmailNotificationOutcome
1468
+ extend Revox::Internal::Type::Enum
1469
+
1470
+ TaggedSymbol =
1471
+ T.type_alias do
1472
+ T.all(
1473
+ Symbol,
1474
+ Revox::AssistantCreateParams::EmailNotificationOutcome
1475
+ )
1476
+ end
1477
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1478
+
1479
+ NOT_INTERESTED =
1480
+ T.let(
1481
+ :not_interested,
1482
+ Revox::AssistantCreateParams::EmailNotificationOutcome::TaggedSymbol
1483
+ )
1484
+ INTERESTED =
1485
+ T.let(
1486
+ :interested,
1487
+ Revox::AssistantCreateParams::EmailNotificationOutcome::TaggedSymbol
1488
+ )
1489
+ COMPLETED =
1490
+ T.let(
1491
+ :completed,
1492
+ Revox::AssistantCreateParams::EmailNotificationOutcome::TaggedSymbol
1493
+ )
1494
+ REQUESTED_CALLBACK_LATER =
1495
+ T.let(
1496
+ :requested_callback_later,
1497
+ Revox::AssistantCreateParams::EmailNotificationOutcome::TaggedSymbol
1498
+ )
1499
+ REQUESTED_CALLBACK_NEW_NUMBER =
1500
+ T.let(
1501
+ :requested_callback_new_number,
1502
+ Revox::AssistantCreateParams::EmailNotificationOutcome::TaggedSymbol
1503
+ )
1504
+ DO_NOT_CONTACT =
1505
+ T.let(
1506
+ :do_not_contact,
1507
+ Revox::AssistantCreateParams::EmailNotificationOutcome::TaggedSymbol
1508
+ )
1509
+ AI_AVERSE =
1510
+ T.let(
1511
+ :ai_averse,
1512
+ Revox::AssistantCreateParams::EmailNotificationOutcome::TaggedSymbol
1513
+ )
1514
+ NONE =
1515
+ T.let(
1516
+ :none,
1517
+ Revox::AssistantCreateParams::EmailNotificationOutcome::TaggedSymbol
1518
+ )
1519
+
1520
+ sig do
1521
+ override.returns(
1522
+ T::Array[
1523
+ Revox::AssistantCreateParams::EmailNotificationOutcome::TaggedSymbol
1524
+ ]
1525
+ )
1526
+ end
1527
+ def self.values
1528
+ end
1529
+ end
1530
+
1531
+ class FaqItem < Revox::Internal::Type::BaseModel
1532
+ OrHash =
1533
+ T.type_alias do
1534
+ T.any(
1535
+ Revox::AssistantCreateParams::FaqItem,
1536
+ Revox::Internal::AnyHash
1537
+ )
1538
+ end
1539
+
1540
+ sig { returns(String) }
1541
+ attr_accessor :answer
1542
+
1543
+ sig { returns(String) }
1544
+ attr_accessor :question
1545
+
1546
+ sig do
1547
+ params(answer: String, question: String).returns(T.attached_class)
1548
+ end
1549
+ def self.new(answer:, question:)
1550
+ end
1551
+
1552
+ sig { override.returns({ answer: String, question: String }) }
1553
+ def to_hash
1554
+ end
1555
+ end
1556
+
1557
+ # How the first sentence should be handled. "generated" means the LLM will
1558
+ # generate a response based on the first_sentence instruction. "static" means the
1559
+ # first_sentence will be spoken exactly as provided. "none" means the agent will
1560
+ # not speak first and will wait for the user.
1561
+ module FirstSentenceMode
1562
+ extend Revox::Internal::Type::Enum
1563
+
1564
+ TaggedSymbol =
1565
+ T.type_alias do
1566
+ T.all(Symbol, Revox::AssistantCreateParams::FirstSentenceMode)
1567
+ end
1568
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1569
+
1570
+ GENERATED =
1571
+ T.let(
1572
+ :generated,
1573
+ Revox::AssistantCreateParams::FirstSentenceMode::TaggedSymbol
1574
+ )
1575
+ STATIC =
1576
+ T.let(
1577
+ :static,
1578
+ Revox::AssistantCreateParams::FirstSentenceMode::TaggedSymbol
1579
+ )
1580
+ NONE =
555
1581
  T.let(
556
1582
  :none,
557
1583
  Revox::AssistantCreateParams::FirstSentenceMode::TaggedSymbol
@@ -568,85 +1594,333 @@ module Revox
568
1594
  end
569
1595
  end
570
1596
 
571
- module LlmModel
572
- extend Revox::Internal::Type::Union
1597
+ # When transfer_phone_number is set: "warm" (AI bridges) or "cold" (SIP REFER;
1598
+ # trunk must allow REFER/PSTN). Omit or null when transfer is disabled.
1599
+ module HumanTransferMode
1600
+ extend Revox::Internal::Type::Enum
1601
+
1602
+ TaggedSymbol =
1603
+ T.type_alias do
1604
+ T.all(Symbol, Revox::AssistantCreateParams::HumanTransferMode)
1605
+ end
1606
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1607
+
1608
+ WARM =
1609
+ T.let(
1610
+ :warm,
1611
+ Revox::AssistantCreateParams::HumanTransferMode::TaggedSymbol
1612
+ )
1613
+ COLD =
1614
+ T.let(
1615
+ :cold,
1616
+ Revox::AssistantCreateParams::HumanTransferMode::TaggedSymbol
1617
+ )
1618
+
1619
+ sig do
1620
+ override.returns(
1621
+ T::Array[
1622
+ Revox::AssistantCreateParams::HumanTransferMode::TaggedSymbol
1623
+ ]
1624
+ )
1625
+ end
1626
+ def self.values
1627
+ end
1628
+ end
1629
+
1630
+ module LlmModel
1631
+ extend Revox::Internal::Type::Union
1632
+
1633
+ Variants =
1634
+ T.type_alias do
1635
+ T.any(
1636
+ Revox::AssistantCreateParams::LlmModel::UnionMember0,
1637
+ Revox::AssistantCreateParams::LlmModel::UnionMember1,
1638
+ Revox::AssistantCreateParams::LlmModel::UnionMember2,
1639
+ Revox::AssistantCreateParams::LlmModel::UnionMember3
1640
+ )
1641
+ end
1642
+
1643
+ class UnionMember0 < Revox::Internal::Type::BaseModel
1644
+ OrHash =
1645
+ T.type_alias do
1646
+ T.any(
1647
+ Revox::AssistantCreateParams::LlmModel::UnionMember0,
1648
+ Revox::Internal::AnyHash
1649
+ )
1650
+ end
1651
+
1652
+ sig do
1653
+ returns(
1654
+ Revox::AssistantCreateParams::LlmModel::UnionMember0::Name::OrSymbol
1655
+ )
1656
+ end
1657
+ attr_accessor :name
1658
+
1659
+ sig { returns(Symbol) }
1660
+ attr_accessor :type
1661
+
1662
+ sig do
1663
+ params(
1664
+ name:
1665
+ Revox::AssistantCreateParams::LlmModel::UnionMember0::Name::OrSymbol,
1666
+ type: Symbol
1667
+ ).returns(T.attached_class)
1668
+ end
1669
+ def self.new(name:, type: :"dedicated-instance")
1670
+ end
1671
+
1672
+ sig do
1673
+ override.returns(
1674
+ {
1675
+ name:
1676
+ Revox::AssistantCreateParams::LlmModel::UnionMember0::Name::OrSymbol,
1677
+ type: Symbol
1678
+ }
1679
+ )
1680
+ end
1681
+ def to_hash
1682
+ end
1683
+
1684
+ module Name
1685
+ extend Revox::Internal::Type::Enum
1686
+
1687
+ TaggedSymbol =
1688
+ T.type_alias do
1689
+ T.all(
1690
+ Symbol,
1691
+ Revox::AssistantCreateParams::LlmModel::UnionMember0::Name
1692
+ )
1693
+ end
1694
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1695
+
1696
+ GPT_4_1 =
1697
+ T.let(
1698
+ :"gpt-4.1",
1699
+ Revox::AssistantCreateParams::LlmModel::UnionMember0::Name::TaggedSymbol
1700
+ )
1701
+ MINISTRAL_3_8B_INSTRUCT =
1702
+ T.let(
1703
+ :"ministral-3-8b-instruct",
1704
+ Revox::AssistantCreateParams::LlmModel::UnionMember0::Name::TaggedSymbol
1705
+ )
1706
+
1707
+ sig do
1708
+ override.returns(
1709
+ T::Array[
1710
+ Revox::AssistantCreateParams::LlmModel::UnionMember0::Name::TaggedSymbol
1711
+ ]
1712
+ )
1713
+ end
1714
+ def self.values
1715
+ end
1716
+ end
1717
+ end
1718
+
1719
+ class UnionMember1 < Revox::Internal::Type::BaseModel
1720
+ OrHash =
1721
+ T.type_alias do
1722
+ T.any(
1723
+ Revox::AssistantCreateParams::LlmModel::UnionMember1,
1724
+ Revox::Internal::AnyHash
1725
+ )
1726
+ end
1727
+
1728
+ # The model ID to use from OpenRouter. eg: openai/gpt-4.1
1729
+ sig { returns(String) }
1730
+ attr_accessor :openrouter_model_id
1731
+
1732
+ # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
1733
+ sig { returns(String) }
1734
+ attr_accessor :openrouter_provider
1735
+
1736
+ # Use a model from OpenRouter.
1737
+ sig { returns(Symbol) }
1738
+ attr_accessor :type
1739
+
1740
+ sig do
1741
+ params(
1742
+ openrouter_model_id: String,
1743
+ openrouter_provider: String,
1744
+ type: Symbol
1745
+ ).returns(T.attached_class)
1746
+ end
1747
+ def self.new(
1748
+ # The model ID to use from OpenRouter. eg: openai/gpt-4.1
1749
+ openrouter_model_id:,
1750
+ # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
1751
+ openrouter_provider:,
1752
+ # Use a model from OpenRouter.
1753
+ type: :openrouter
1754
+ )
1755
+ end
1756
+
1757
+ sig do
1758
+ override.returns(
1759
+ {
1760
+ openrouter_model_id: String,
1761
+ openrouter_provider: String,
1762
+ type: Symbol
1763
+ }
1764
+ )
1765
+ end
1766
+ def to_hash
1767
+ end
1768
+ end
1769
+
1770
+ class UnionMember2 < Revox::Internal::Type::BaseModel
1771
+ OrHash =
1772
+ T.type_alias do
1773
+ T.any(
1774
+ Revox::AssistantCreateParams::LlmModel::UnionMember2,
1775
+ Revox::Internal::AnyHash
1776
+ )
1777
+ end
1778
+
1779
+ # API key sent as Bearer token to the custom endpoint.
1780
+ sig { returns(String) }
1781
+ attr_accessor :api_key
1782
+
1783
+ # Base URL for the OpenAI-compatible API, e.g. https://api.together.xyz/v1
1784
+ sig { returns(String) }
1785
+ attr_accessor :api_url
573
1786
 
574
- Variants =
575
- T.type_alias do
576
- T.any(
577
- Revox::AssistantCreateParams::LlmModel::UnionMember0,
578
- Revox::AssistantCreateParams::LlmModel::UnionMember1
1787
+ # Model name as expected by the provider, e.g. meta-llama/llama-3-70b
1788
+ sig { returns(String) }
1789
+ attr_accessor :model_name
1790
+
1791
+ # OpenAI-compatible chat completions API (bring your own endpoint and key).
1792
+ sig { returns(Symbol) }
1793
+ attr_accessor :type
1794
+
1795
+ sig do
1796
+ params(
1797
+ api_key: String,
1798
+ api_url: String,
1799
+ model_name: String,
1800
+ type: Symbol
1801
+ ).returns(T.attached_class)
1802
+ end
1803
+ def self.new(
1804
+ # API key sent as Bearer token to the custom endpoint.
1805
+ api_key:,
1806
+ # Base URL for the OpenAI-compatible API, e.g. https://api.together.xyz/v1
1807
+ api_url:,
1808
+ # Model name as expected by the provider, e.g. meta-llama/llama-3-70b
1809
+ model_name:,
1810
+ # OpenAI-compatible chat completions API (bring your own endpoint and key).
1811
+ type: :custom
1812
+ )
1813
+ end
1814
+
1815
+ sig do
1816
+ override.returns(
1817
+ {
1818
+ api_key: String,
1819
+ api_url: String,
1820
+ model_name: String,
1821
+ type: Symbol
1822
+ }
579
1823
  )
580
1824
  end
1825
+ def to_hash
1826
+ end
1827
+ end
581
1828
 
582
- class UnionMember0 < Revox::Internal::Type::BaseModel
1829
+ class UnionMember3 < Revox::Internal::Type::BaseModel
583
1830
  OrHash =
584
1831
  T.type_alias do
585
1832
  T.any(
586
- Revox::AssistantCreateParams::LlmModel::UnionMember0,
1833
+ Revox::AssistantCreateParams::LlmModel::UnionMember3,
587
1834
  Revox::Internal::AnyHash
588
1835
  )
589
1836
  end
590
1837
 
1838
+ # The provider to use from Realtime. eg: openai, google.
591
1839
  sig do
592
1840
  returns(
593
- Revox::AssistantCreateParams::LlmModel::UnionMember0::Name::OrSymbol
1841
+ Revox::AssistantCreateParams::LlmModel::UnionMember3::Provider::OrSymbol
594
1842
  )
595
1843
  end
596
- attr_accessor :name
1844
+ attr_accessor :provider
1845
+
1846
+ # The model ID to use from Realtime. eg: gpt-4.1
1847
+ sig { returns(String) }
1848
+ attr_accessor :realtime_model_id
597
1849
 
1850
+ # Use a model from Realtime.
598
1851
  sig { returns(Symbol) }
599
1852
  attr_accessor :type
600
1853
 
1854
+ # Output voice for the realtime provider (e.g. OpenAI: marin; Gemini: Puck).
1855
+ sig { returns(T.nilable(String)) }
1856
+ attr_reader :realtime_voice_id
1857
+
1858
+ sig { params(realtime_voice_id: String).void }
1859
+ attr_writer :realtime_voice_id
1860
+
601
1861
  sig do
602
1862
  params(
603
- name:
604
- Revox::AssistantCreateParams::LlmModel::UnionMember0::Name::OrSymbol,
1863
+ provider:
1864
+ Revox::AssistantCreateParams::LlmModel::UnionMember3::Provider::OrSymbol,
1865
+ realtime_model_id: String,
1866
+ realtime_voice_id: String,
605
1867
  type: Symbol
606
1868
  ).returns(T.attached_class)
607
1869
  end
608
- def self.new(name:, type: :"dedicated-instance")
1870
+ def self.new(
1871
+ # The provider to use from Realtime. eg: openai, google.
1872
+ provider:,
1873
+ # The model ID to use from Realtime. eg: gpt-4.1
1874
+ realtime_model_id:,
1875
+ # Output voice for the realtime provider (e.g. OpenAI: marin; Gemini: Puck).
1876
+ realtime_voice_id: nil,
1877
+ # Use a model from Realtime.
1878
+ type: :realtime
1879
+ )
609
1880
  end
610
1881
 
611
1882
  sig do
612
1883
  override.returns(
613
1884
  {
614
- name:
615
- Revox::AssistantCreateParams::LlmModel::UnionMember0::Name::OrSymbol,
616
- type: Symbol
1885
+ provider:
1886
+ Revox::AssistantCreateParams::LlmModel::UnionMember3::Provider::OrSymbol,
1887
+ realtime_model_id: String,
1888
+ type: Symbol,
1889
+ realtime_voice_id: String
617
1890
  }
618
1891
  )
619
1892
  end
620
1893
  def to_hash
621
1894
  end
622
1895
 
623
- module Name
1896
+ # The provider to use from Realtime. eg: openai, google.
1897
+ module Provider
624
1898
  extend Revox::Internal::Type::Enum
625
1899
 
626
1900
  TaggedSymbol =
627
1901
  T.type_alias do
628
1902
  T.all(
629
1903
  Symbol,
630
- Revox::AssistantCreateParams::LlmModel::UnionMember0::Name
1904
+ Revox::AssistantCreateParams::LlmModel::UnionMember3::Provider
631
1905
  )
632
1906
  end
633
1907
  OrSymbol = T.type_alias { T.any(Symbol, String) }
634
1908
 
635
- GPT_4_1 =
1909
+ OPENAI =
636
1910
  T.let(
637
- :"gpt-4.1",
638
- Revox::AssistantCreateParams::LlmModel::UnionMember0::Name::TaggedSymbol
1911
+ :openai,
1912
+ Revox::AssistantCreateParams::LlmModel::UnionMember3::Provider::TaggedSymbol
639
1913
  )
640
- MINISTRAL_3_8B_INSTRUCT =
1914
+ GOOGLE =
641
1915
  T.let(
642
- :"ministral-3-8b-instruct",
643
- Revox::AssistantCreateParams::LlmModel::UnionMember0::Name::TaggedSymbol
1916
+ :google,
1917
+ Revox::AssistantCreateParams::LlmModel::UnionMember3::Provider::TaggedSymbol
644
1918
  )
645
1919
 
646
1920
  sig do
647
1921
  override.returns(
648
1922
  T::Array[
649
- Revox::AssistantCreateParams::LlmModel::UnionMember0::Name::TaggedSymbol
1923
+ Revox::AssistantCreateParams::LlmModel::UnionMember3::Provider::TaggedSymbol
650
1924
  ]
651
1925
  )
652
1926
  end
@@ -655,64 +1929,377 @@ module Revox
655
1929
  end
656
1930
  end
657
1931
 
658
- class UnionMember1 < Revox::Internal::Type::BaseModel
1932
+ sig do
1933
+ override.returns(
1934
+ T::Array[Revox::AssistantCreateParams::LlmModel::Variants]
1935
+ )
1936
+ end
1937
+ def self.variants
1938
+ end
1939
+ end
1940
+
1941
+ class Position < Revox::Internal::Type::BaseModel
1942
+ OrHash =
1943
+ T.type_alias do
1944
+ T.any(
1945
+ Revox::AssistantCreateParams::Position,
1946
+ Revox::Internal::AnyHash
1947
+ )
1948
+ end
1949
+
1950
+ sig { returns(Float) }
1951
+ attr_accessor :x
1952
+
1953
+ sig { returns(Float) }
1954
+ attr_accessor :y_
1955
+
1956
+ # Canvas position of this assistant's node in its multi-step flow editor.
1957
+ sig { params(x: Float, y_: Float).returns(T.attached_class) }
1958
+ def self.new(x:, y_:)
1959
+ end
1960
+
1961
+ sig { override.returns({ x: Float, y_: Float }) }
1962
+ def to_hash
1963
+ end
1964
+ end
1965
+
1966
+ class PromptFlow < Revox::Internal::Type::BaseModel
1967
+ OrHash =
1968
+ T.type_alias do
1969
+ T.any(
1970
+ Revox::AssistantCreateParams::PromptFlow,
1971
+ Revox::Internal::AnyHash
1972
+ )
1973
+ end
1974
+
1975
+ sig do
1976
+ returns(T::Array[Revox::AssistantCreateParams::PromptFlow::Edge])
1977
+ end
1978
+ attr_accessor :edges
1979
+
1980
+ sig do
1981
+ returns(T::Array[Revox::AssistantCreateParams::PromptFlow::Node])
1982
+ end
1983
+ attr_accessor :nodes
1984
+
1985
+ # Visual prompt constructor data (nodes, edges, positions). Used by the UI to
1986
+ # re-open the visual editor. Does not affect call behavior — the flattened prompt
1987
+ # field is what the LLM receives.
1988
+ sig do
1989
+ params(
1990
+ edges:
1991
+ T::Array[Revox::AssistantCreateParams::PromptFlow::Edge::OrHash],
1992
+ nodes:
1993
+ T::Array[Revox::AssistantCreateParams::PromptFlow::Node::OrHash]
1994
+ ).returns(T.attached_class)
1995
+ end
1996
+ def self.new(edges:, nodes:)
1997
+ end
1998
+
1999
+ sig do
2000
+ override.returns(
2001
+ {
2002
+ edges: T::Array[Revox::AssistantCreateParams::PromptFlow::Edge],
2003
+ nodes: T::Array[Revox::AssistantCreateParams::PromptFlow::Node]
2004
+ }
2005
+ )
2006
+ end
2007
+ def to_hash
2008
+ end
2009
+
2010
+ class Edge < Revox::Internal::Type::BaseModel
659
2011
  OrHash =
660
2012
  T.type_alias do
661
2013
  T.any(
662
- Revox::AssistantCreateParams::LlmModel::UnionMember1,
2014
+ Revox::AssistantCreateParams::PromptFlow::Edge,
663
2015
  Revox::Internal::AnyHash
664
2016
  )
665
2017
  end
666
2018
 
667
- # The model ID to use from OpenRouter. eg: openai/gpt-4.1
668
2019
  sig { returns(String) }
669
- attr_accessor :openrouter_model_id
2020
+ attr_accessor :id
670
2021
 
671
- # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
672
2022
  sig { returns(String) }
673
- attr_accessor :openrouter_provider
2023
+ attr_accessor :source
2024
+
2025
+ sig { returns(String) }
2026
+ attr_accessor :target
2027
+
2028
+ sig do
2029
+ params(id: String, source: String, target: String).returns(
2030
+ T.attached_class
2031
+ )
2032
+ end
2033
+ def self.new(id:, source:, target:)
2034
+ end
2035
+
2036
+ sig do
2037
+ override.returns({ id: String, source: String, target: String })
2038
+ end
2039
+ def to_hash
2040
+ end
2041
+ end
2042
+
2043
+ class Node < Revox::Internal::Type::BaseModel
2044
+ OrHash =
2045
+ T.type_alias do
2046
+ T.any(
2047
+ Revox::AssistantCreateParams::PromptFlow::Node,
2048
+ Revox::Internal::AnyHash
2049
+ )
2050
+ end
2051
+
2052
+ sig { returns(String) }
2053
+ attr_accessor :id
2054
+
2055
+ sig { returns(Revox::AssistantCreateParams::PromptFlow::Node::Data) }
2056
+ attr_reader :data
2057
+
2058
+ sig do
2059
+ params(
2060
+ data: Revox::AssistantCreateParams::PromptFlow::Node::Data::OrHash
2061
+ ).void
2062
+ end
2063
+ attr_writer :data
2064
+
2065
+ sig do
2066
+ returns(Revox::AssistantCreateParams::PromptFlow::Node::Position)
2067
+ end
2068
+ attr_reader :position
2069
+
2070
+ sig do
2071
+ params(
2072
+ position:
2073
+ Revox::AssistantCreateParams::PromptFlow::Node::Position::OrHash
2074
+ ).void
2075
+ end
2076
+ attr_writer :position
674
2077
 
675
- # Use a model from OpenRouter.
676
2078
  sig { returns(Symbol) }
677
2079
  attr_accessor :type
678
2080
 
679
2081
  sig do
680
2082
  params(
681
- openrouter_model_id: String,
682
- openrouter_provider: String,
2083
+ id: String,
2084
+ data:
2085
+ Revox::AssistantCreateParams::PromptFlow::Node::Data::OrHash,
2086
+ position:
2087
+ Revox::AssistantCreateParams::PromptFlow::Node::Position::OrHash,
683
2088
  type: Symbol
684
2089
  ).returns(T.attached_class)
685
2090
  end
686
- def self.new(
687
- # The model ID to use from OpenRouter. eg: openai/gpt-4.1
688
- openrouter_model_id:,
689
- # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
690
- openrouter_provider:,
691
- # Use a model from OpenRouter.
692
- type: :openrouter
693
- )
2091
+ def self.new(id:, data:, position:, type: :promptBlock)
2092
+ end
2093
+
2094
+ sig do
2095
+ override.returns(
2096
+ {
2097
+ id: String,
2098
+ data: Revox::AssistantCreateParams::PromptFlow::Node::Data,
2099
+ position:
2100
+ Revox::AssistantCreateParams::PromptFlow::Node::Position,
2101
+ type: Symbol
2102
+ }
2103
+ )
2104
+ end
2105
+ def to_hash
2106
+ end
2107
+
2108
+ class Data < Revox::Internal::Type::BaseModel
2109
+ OrHash =
2110
+ T.type_alias do
2111
+ T.any(
2112
+ Revox::AssistantCreateParams::PromptFlow::Node::Data,
2113
+ Revox::Internal::AnyHash
2114
+ )
2115
+ end
2116
+
2117
+ sig { returns(String) }
2118
+ attr_accessor :body
2119
+
2120
+ sig { returns(String) }
2121
+ attr_accessor :title
2122
+
2123
+ sig do
2124
+ params(body: String, title: String).returns(T.attached_class)
2125
+ end
2126
+ def self.new(body:, title:)
2127
+ end
2128
+
2129
+ sig { override.returns({ body: String, title: String }) }
2130
+ def to_hash
2131
+ end
2132
+ end
2133
+
2134
+ class Position < Revox::Internal::Type::BaseModel
2135
+ OrHash =
2136
+ T.type_alias do
2137
+ T.any(
2138
+ Revox::AssistantCreateParams::PromptFlow::Node::Position,
2139
+ Revox::Internal::AnyHash
2140
+ )
2141
+ end
2142
+
2143
+ sig { returns(Float) }
2144
+ attr_accessor :x
2145
+
2146
+ sig { returns(Float) }
2147
+ attr_accessor :y_
2148
+
2149
+ sig { params(x: Float, y_: Float).returns(T.attached_class) }
2150
+ def self.new(x:, y_:)
2151
+ end
2152
+
2153
+ sig { override.returns({ x: Float, y_: Float }) }
2154
+ def to_hash
2155
+ end
694
2156
  end
2157
+ end
2158
+ end
2159
+
2160
+ class Slack < Revox::Internal::Type::BaseModel
2161
+ OrHash =
2162
+ T.type_alias do
2163
+ T.any(Revox::AssistantCreateParams::Slack, Revox::Internal::AnyHash)
2164
+ end
2165
+
2166
+ # The Slack channel ID where the notification will be posted.
2167
+ sig { returns(String) }
2168
+ attr_accessor :channel_id
2169
+
2170
+ # The Nango connection ID linking the org's Slack workspace to Revox.
2171
+ sig { returns(String) }
2172
+ attr_accessor :connection_id
2173
+
2174
+ # Which call outcomes trigger a Slack notification (e.g. ['interested', 'none']).
2175
+ # Use 'none' to notify when outcome is null.
2176
+ sig do
2177
+ returns(
2178
+ T::Array[Revox::AssistantCreateParams::Slack::Outcome::OrSymbol]
2179
+ )
2180
+ end
2181
+ attr_accessor :outcomes
2182
+
2183
+ # Human-readable Slack channel name, cached for display in the UI.
2184
+ sig { returns(T.nilable(String)) }
2185
+ attr_accessor :channel_name
2186
+
2187
+ # Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
2188
+ # {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{first_name}},
2189
+ # {{last_name}}, {{email}}, {{company}}, {{contact_name}}, {{contact_line}}, plus
2190
+ # prompt_variables and structured_output keys. When null/empty a default template
2191
+ # is used.
2192
+ sig { returns(T.nilable(String)) }
2193
+ attr_accessor :template
2194
+
2195
+ # Slack notification config. When set, posts a message to the chosen channel after
2196
+ # a call ends with one of the configured outcomes.
2197
+ sig do
2198
+ params(
2199
+ channel_id: String,
2200
+ connection_id: String,
2201
+ outcomes:
2202
+ T::Array[Revox::AssistantCreateParams::Slack::Outcome::OrSymbol],
2203
+ channel_name: T.nilable(String),
2204
+ template: T.nilable(String)
2205
+ ).returns(T.attached_class)
2206
+ end
2207
+ def self.new(
2208
+ # The Slack channel ID where the notification will be posted.
2209
+ channel_id:,
2210
+ # The Nango connection ID linking the org's Slack workspace to Revox.
2211
+ connection_id:,
2212
+ # Which call outcomes trigger a Slack notification (e.g. ['interested', 'none']).
2213
+ # Use 'none' to notify when outcome is null.
2214
+ outcomes:,
2215
+ # Human-readable Slack channel name, cached for display in the UI.
2216
+ channel_name: nil,
2217
+ # Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
2218
+ # {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{first_name}},
2219
+ # {{last_name}}, {{email}}, {{company}}, {{contact_name}}, {{contact_line}}, plus
2220
+ # prompt_variables and structured_output keys. When null/empty a default template
2221
+ # is used.
2222
+ template: nil
2223
+ )
2224
+ end
2225
+
2226
+ sig do
2227
+ override.returns(
2228
+ {
2229
+ channel_id: String,
2230
+ connection_id: String,
2231
+ outcomes:
2232
+ T::Array[
2233
+ Revox::AssistantCreateParams::Slack::Outcome::OrSymbol
2234
+ ],
2235
+ channel_name: T.nilable(String),
2236
+ template: T.nilable(String)
2237
+ }
2238
+ )
2239
+ end
2240
+ def to_hash
2241
+ end
2242
+
2243
+ module Outcome
2244
+ extend Revox::Internal::Type::Enum
2245
+
2246
+ TaggedSymbol =
2247
+ T.type_alias do
2248
+ T.all(Symbol, Revox::AssistantCreateParams::Slack::Outcome)
2249
+ end
2250
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2251
+
2252
+ NOT_INTERESTED =
2253
+ T.let(
2254
+ :not_interested,
2255
+ Revox::AssistantCreateParams::Slack::Outcome::TaggedSymbol
2256
+ )
2257
+ INTERESTED =
2258
+ T.let(
2259
+ :interested,
2260
+ Revox::AssistantCreateParams::Slack::Outcome::TaggedSymbol
2261
+ )
2262
+ COMPLETED =
2263
+ T.let(
2264
+ :completed,
2265
+ Revox::AssistantCreateParams::Slack::Outcome::TaggedSymbol
2266
+ )
2267
+ REQUESTED_CALLBACK_LATER =
2268
+ T.let(
2269
+ :requested_callback_later,
2270
+ Revox::AssistantCreateParams::Slack::Outcome::TaggedSymbol
2271
+ )
2272
+ REQUESTED_CALLBACK_NEW_NUMBER =
2273
+ T.let(
2274
+ :requested_callback_new_number,
2275
+ Revox::AssistantCreateParams::Slack::Outcome::TaggedSymbol
2276
+ )
2277
+ DO_NOT_CONTACT =
2278
+ T.let(
2279
+ :do_not_contact,
2280
+ Revox::AssistantCreateParams::Slack::Outcome::TaggedSymbol
2281
+ )
2282
+ AI_AVERSE =
2283
+ T.let(
2284
+ :ai_averse,
2285
+ Revox::AssistantCreateParams::Slack::Outcome::TaggedSymbol
2286
+ )
2287
+ NONE =
2288
+ T.let(
2289
+ :none,
2290
+ Revox::AssistantCreateParams::Slack::Outcome::TaggedSymbol
2291
+ )
695
2292
 
696
2293
  sig do
697
2294
  override.returns(
698
- {
699
- openrouter_model_id: String,
700
- openrouter_provider: String,
701
- type: Symbol
702
- }
2295
+ T::Array[
2296
+ Revox::AssistantCreateParams::Slack::Outcome::TaggedSymbol
2297
+ ]
703
2298
  )
704
2299
  end
705
- def to_hash
2300
+ def self.values
706
2301
  end
707
2302
  end
708
-
709
- sig do
710
- override.returns(
711
- T::Array[Revox::AssistantCreateParams::LlmModel::Variants]
712
- )
713
- end
714
- def self.variants
715
- end
716
2303
  end
717
2304
 
718
2305
  class StructuredOutputConfig < Revox::Internal::Type::BaseModel
@@ -838,6 +2425,190 @@ module Revox
838
2425
  end
839
2426
  end
840
2427
 
2428
+ class SttContext < Revox::Internal::Type::BaseModel
2429
+ OrHash =
2430
+ T.type_alias do
2431
+ T.any(
2432
+ Revox::AssistantCreateParams::SttContext,
2433
+ Revox::Internal::AnyHash
2434
+ )
2435
+ end
2436
+
2437
+ sig do
2438
+ returns(T::Array[Revox::AssistantCreateParams::SttContext::General])
2439
+ end
2440
+ attr_accessor :general
2441
+
2442
+ sig { returns(T::Array[String]) }
2443
+ attr_accessor :terms
2444
+
2445
+ # Assistant-level speech-to-text context: structured `general` key/value pairs
2446
+ # plus a list of domain `terms`. Prompt-derived context is merged in without
2447
+ # replacing existing entries.
2448
+ sig do
2449
+ params(
2450
+ general:
2451
+ T::Array[
2452
+ Revox::AssistantCreateParams::SttContext::General::OrHash
2453
+ ],
2454
+ terms: T::Array[String]
2455
+ ).returns(T.attached_class)
2456
+ end
2457
+ def self.new(general:, terms:)
2458
+ end
2459
+
2460
+ sig do
2461
+ override.returns(
2462
+ {
2463
+ general:
2464
+ T::Array[Revox::AssistantCreateParams::SttContext::General],
2465
+ terms: T::Array[String]
2466
+ }
2467
+ )
2468
+ end
2469
+ def to_hash
2470
+ end
2471
+
2472
+ class General < Revox::Internal::Type::BaseModel
2473
+ OrHash =
2474
+ T.type_alias do
2475
+ T.any(
2476
+ Revox::AssistantCreateParams::SttContext::General,
2477
+ Revox::Internal::AnyHash
2478
+ )
2479
+ end
2480
+
2481
+ sig { returns(String) }
2482
+ attr_accessor :key
2483
+
2484
+ sig { returns(String) }
2485
+ attr_accessor :value
2486
+
2487
+ sig { params(key: String, value: String).returns(T.attached_class) }
2488
+ def self.new(key:, value:)
2489
+ end
2490
+
2491
+ sig { override.returns({ key: String, value: String }) }
2492
+ def to_hash
2493
+ end
2494
+ end
2495
+ end
2496
+
2497
+ # Transcriber (speech-to-text) model. Defaults to the newest Soniox realtime model
2498
+ # when omitted.
2499
+ module SttModel
2500
+ extend Revox::Internal::Type::Enum
2501
+
2502
+ TaggedSymbol =
2503
+ T.type_alias { T.all(Symbol, Revox::AssistantCreateParams::SttModel) }
2504
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2505
+
2506
+ STT_RT_V4 =
2507
+ T.let(
2508
+ :"stt-rt-v4",
2509
+ Revox::AssistantCreateParams::SttModel::TaggedSymbol
2510
+ )
2511
+ STT_RT_V5 =
2512
+ T.let(
2513
+ :"stt-rt-v5",
2514
+ Revox::AssistantCreateParams::SttModel::TaggedSymbol
2515
+ )
2516
+
2517
+ sig do
2518
+ override.returns(
2519
+ T::Array[Revox::AssistantCreateParams::SttModel::TaggedSymbol]
2520
+ )
2521
+ end
2522
+ def self.values
2523
+ end
2524
+ end
2525
+
2526
+ # Audio clip to play while the agent is processing a response. One of the built-in
2527
+ # LiveKit audio clips; null/omitted disables it.
2528
+ module ThinkingSound
2529
+ extend Revox::Internal::Type::Enum
2530
+
2531
+ TaggedSymbol =
2532
+ T.type_alias do
2533
+ T.all(Symbol, Revox::AssistantCreateParams::ThinkingSound)
2534
+ end
2535
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2536
+
2537
+ CITY_AMBIENCE_OGG =
2538
+ T.let(
2539
+ :"city-ambience.ogg",
2540
+ Revox::AssistantCreateParams::ThinkingSound::TaggedSymbol
2541
+ )
2542
+ FOREST_AMBIENCE_OGG =
2543
+ T.let(
2544
+ :"forest-ambience.ogg",
2545
+ Revox::AssistantCreateParams::ThinkingSound::TaggedSymbol
2546
+ )
2547
+ OFFICE_AMBIENCE_OGG =
2548
+ T.let(
2549
+ :"office-ambience.ogg",
2550
+ Revox::AssistantCreateParams::ThinkingSound::TaggedSymbol
2551
+ )
2552
+ CROWDED_ROOM_OGG =
2553
+ T.let(
2554
+ :"crowded-room.ogg",
2555
+ Revox::AssistantCreateParams::ThinkingSound::TaggedSymbol
2556
+ )
2557
+ KEYBOARD_TYPING_OGG =
2558
+ T.let(
2559
+ :"keyboard-typing.ogg",
2560
+ Revox::AssistantCreateParams::ThinkingSound::TaggedSymbol
2561
+ )
2562
+ KEYBOARD_TYPING2_OGG =
2563
+ T.let(
2564
+ :"keyboard-typing2.ogg",
2565
+ Revox::AssistantCreateParams::ThinkingSound::TaggedSymbol
2566
+ )
2567
+ HOLD_MUSIC_OGG =
2568
+ T.let(
2569
+ :"hold_music.ogg",
2570
+ Revox::AssistantCreateParams::ThinkingSound::TaggedSymbol
2571
+ )
2572
+
2573
+ sig do
2574
+ override.returns(
2575
+ T::Array[Revox::AssistantCreateParams::ThinkingSound::TaggedSymbol]
2576
+ )
2577
+ end
2578
+ def self.values
2579
+ end
2580
+ end
2581
+
2582
+ # Assistant kind. 'standalone' (default) is a normal assistant, 'multi-step'
2583
+ # orchestrates a flow of sub-assistants, 'sub-assistant' is a step inside a
2584
+ # multi-step flow (hidden from the assistants list). Flow transitions are managed
2585
+ # via the /assistants/:id/edges endpoints, not on the assistant itself.
2586
+ module Type
2587
+ extend Revox::Internal::Type::Enum
2588
+
2589
+ TaggedSymbol =
2590
+ T.type_alias { T.all(Symbol, Revox::AssistantCreateParams::Type) }
2591
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2592
+
2593
+ STANDALONE =
2594
+ T.let(:standalone, Revox::AssistantCreateParams::Type::TaggedSymbol)
2595
+ MULTI_STEP =
2596
+ T.let(:"multi-step", Revox::AssistantCreateParams::Type::TaggedSymbol)
2597
+ SUB_ASSISTANT =
2598
+ T.let(
2599
+ :"sub-assistant",
2600
+ Revox::AssistantCreateParams::Type::TaggedSymbol
2601
+ )
2602
+
2603
+ sig do
2604
+ override.returns(
2605
+ T::Array[Revox::AssistantCreateParams::Type::TaggedSymbol]
2606
+ )
2607
+ end
2608
+ def self.values
2609
+ end
2610
+ end
2611
+
841
2612
  class Voice < Revox::Internal::Type::BaseModel
842
2613
  OrHash =
843
2614
  T.type_alias do
@@ -852,6 +2623,22 @@ module Revox
852
2623
  sig { returns(Revox::AssistantCreateParams::Voice::Provider::OrSymbol) }
853
2624
  attr_accessor :provider
854
2625
 
2626
+ # Cartesia TTS model (Cartesia only). Defaults to sonic-3 when omitted. Ignored
2627
+ # for other providers.
2628
+ sig do
2629
+ returns(
2630
+ T.nilable(Revox::AssistantCreateParams::Voice::Model::OrSymbol)
2631
+ )
2632
+ end
2633
+ attr_reader :model
2634
+
2635
+ sig do
2636
+ params(
2637
+ model: Revox::AssistantCreateParams::Voice::Model::OrSymbol
2638
+ ).void
2639
+ end
2640
+ attr_writer :model
2641
+
855
2642
  # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
856
2643
  # 0.7–1.2. Default is 1.0.
857
2644
  sig { returns(T.nilable(Float)) }
@@ -860,13 +2647,23 @@ module Revox
860
2647
  sig { params(speed: Float).void }
861
2648
  attr_writer :speed
862
2649
 
2650
+ # Volume of the voice (Cartesia only). 0.5–2.0, default 1.0. Ignored for other
2651
+ # providers.
2652
+ sig { returns(T.nilable(Float)) }
2653
+ attr_reader :volume
2654
+
2655
+ sig { params(volume: Float).void }
2656
+ attr_writer :volume
2657
+
863
2658
  # The voice to use for the call. You can get the list of voices using the /voices
864
2659
  # endpoint
865
2660
  sig do
866
2661
  params(
867
2662
  id: String,
868
2663
  provider: Revox::AssistantCreateParams::Voice::Provider::OrSymbol,
869
- speed: Float
2664
+ model: Revox::AssistantCreateParams::Voice::Model::OrSymbol,
2665
+ speed: Float,
2666
+ volume: Float
870
2667
  ).returns(T.attached_class)
871
2668
  end
872
2669
  def self.new(
@@ -874,9 +2671,15 @@ module Revox
874
2671
  id:,
875
2672
  # The provider of the voice.
876
2673
  provider:,
2674
+ # Cartesia TTS model (Cartesia only). Defaults to sonic-3 when omitted. Ignored
2675
+ # for other providers.
2676
+ model: nil,
877
2677
  # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
878
2678
  # 0.7–1.2. Default is 1.0.
879
- speed: nil
2679
+ speed: nil,
2680
+ # Volume of the voice (Cartesia only). 0.5–2.0, default 1.0. Ignored for other
2681
+ # providers.
2682
+ volume: nil
880
2683
  )
881
2684
  end
882
2685
 
@@ -885,7 +2688,9 @@ module Revox
885
2688
  {
886
2689
  id: String,
887
2690
  provider: Revox::AssistantCreateParams::Voice::Provider::OrSymbol,
888
- speed: Float
2691
+ model: Revox::AssistantCreateParams::Voice::Model::OrSymbol,
2692
+ speed: Float,
2693
+ volume: Float
889
2694
  }
890
2695
  )
891
2696
  end
@@ -923,6 +2728,234 @@ module Revox
923
2728
  def self.values
924
2729
  end
925
2730
  end
2731
+
2732
+ # Cartesia TTS model (Cartesia only). Defaults to sonic-3 when omitted. Ignored
2733
+ # for other providers.
2734
+ module Model
2735
+ extend Revox::Internal::Type::Enum
2736
+
2737
+ TaggedSymbol =
2738
+ T.type_alias do
2739
+ T.all(Symbol, Revox::AssistantCreateParams::Voice::Model)
2740
+ end
2741
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2742
+
2743
+ SONIC_3 =
2744
+ T.let(
2745
+ :"sonic-3",
2746
+ Revox::AssistantCreateParams::Voice::Model::TaggedSymbol
2747
+ )
2748
+ SONIC_3_5 =
2749
+ T.let(
2750
+ :"sonic-3.5",
2751
+ Revox::AssistantCreateParams::Voice::Model::TaggedSymbol
2752
+ )
2753
+
2754
+ sig do
2755
+ override.returns(
2756
+ T::Array[Revox::AssistantCreateParams::Voice::Model::TaggedSymbol]
2757
+ )
2758
+ end
2759
+ def self.values
2760
+ end
2761
+ end
2762
+ end
2763
+
2764
+ class Zoho < Revox::Internal::Type::BaseModel
2765
+ OrHash =
2766
+ T.type_alias do
2767
+ T.any(Revox::AssistantCreateParams::Zoho, Revox::Internal::AnyHash)
2768
+ end
2769
+
2770
+ # The Nango connection ID linking the org's Zoho CRM account to Revox.
2771
+ sig { returns(String) }
2772
+ attr_accessor :connection_id
2773
+
2774
+ # Maps extracted call fields (structured_output / prompt variables) onto Zoho
2775
+ # field API names on the upserted record.
2776
+ sig do
2777
+ returns(T::Array[Revox::AssistantCreateParams::Zoho::FieldMapping])
2778
+ end
2779
+ attr_accessor :field_mapping
2780
+
2781
+ # When true, also log the call as a record in Zoho's Calls module (related to the
2782
+ # upserted prospect via Who_Id).
2783
+ sig { returns(T::Boolean) }
2784
+ attr_accessor :log_call_activity
2785
+
2786
+ # Zoho module the prospect record is upserted into (e.g. 'Leads' or 'Contacts').
2787
+ sig { returns(String) }
2788
+ attr_accessor :module_
2789
+
2790
+ # Which call outcomes trigger the Zoho push (e.g. ['interested', 'none']). Use
2791
+ # 'none' to push when outcome is null.
2792
+ sig do
2793
+ returns(
2794
+ T::Array[Revox::AssistantCreateParams::Zoho::Outcome::OrSymbol]
2795
+ )
2796
+ end
2797
+ attr_accessor :outcomes
2798
+
2799
+ # Optional Note body template. Supports {{summary}}, {{outcome}}, {{phone}},
2800
+ # {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{transcript}}, plus
2801
+ # prompt_variables and structured_output keys. When null/empty a default note
2802
+ # (outcome + summary + auto-listed extracted fields) is used.
2803
+ sig { returns(T.nilable(String)) }
2804
+ attr_accessor :template
2805
+
2806
+ # Zoho CRM integration config. When set, upserts the prospect (keyed on phone)
2807
+ # into the chosen module and attaches a Note with the call summary after a call
2808
+ # ends with one of the configured outcomes.
2809
+ sig do
2810
+ params(
2811
+ connection_id: String,
2812
+ field_mapping:
2813
+ T::Array[
2814
+ Revox::AssistantCreateParams::Zoho::FieldMapping::OrHash
2815
+ ],
2816
+ log_call_activity: T::Boolean,
2817
+ module_: String,
2818
+ outcomes:
2819
+ T::Array[Revox::AssistantCreateParams::Zoho::Outcome::OrSymbol],
2820
+ template: T.nilable(String)
2821
+ ).returns(T.attached_class)
2822
+ end
2823
+ def self.new(
2824
+ # The Nango connection ID linking the org's Zoho CRM account to Revox.
2825
+ connection_id:,
2826
+ # Maps extracted call fields (structured_output / prompt variables) onto Zoho
2827
+ # field API names on the upserted record.
2828
+ field_mapping:,
2829
+ # When true, also log the call as a record in Zoho's Calls module (related to the
2830
+ # upserted prospect via Who_Id).
2831
+ log_call_activity:,
2832
+ # Zoho module the prospect record is upserted into (e.g. 'Leads' or 'Contacts').
2833
+ module_:,
2834
+ # Which call outcomes trigger the Zoho push (e.g. ['interested', 'none']). Use
2835
+ # 'none' to push when outcome is null.
2836
+ outcomes:,
2837
+ # Optional Note body template. Supports {{summary}}, {{outcome}}, {{phone}},
2838
+ # {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{transcript}}, plus
2839
+ # prompt_variables and structured_output keys. When null/empty a default note
2840
+ # (outcome + summary + auto-listed extracted fields) is used.
2841
+ template: nil
2842
+ )
2843
+ end
2844
+
2845
+ sig do
2846
+ override.returns(
2847
+ {
2848
+ connection_id: String,
2849
+ field_mapping:
2850
+ T::Array[Revox::AssistantCreateParams::Zoho::FieldMapping],
2851
+ log_call_activity: T::Boolean,
2852
+ module_: String,
2853
+ outcomes:
2854
+ T::Array[Revox::AssistantCreateParams::Zoho::Outcome::OrSymbol],
2855
+ template: T.nilable(String)
2856
+ }
2857
+ )
2858
+ end
2859
+ def to_hash
2860
+ end
2861
+
2862
+ class FieldMapping < Revox::Internal::Type::BaseModel
2863
+ OrHash =
2864
+ T.type_alias do
2865
+ T.any(
2866
+ Revox::AssistantCreateParams::Zoho::FieldMapping,
2867
+ Revox::Internal::AnyHash
2868
+ )
2869
+ end
2870
+
2871
+ # Source key to read from the call: a structured_output field name, falling back
2872
+ # to a prompt variable of the same name.
2873
+ sig { returns(String) }
2874
+ attr_accessor :source
2875
+
2876
+ # Destination Zoho field API name on the upserted record (e.g. 'Email', 'Company',
2877
+ # or a custom 'Budget\_\_c').
2878
+ sig { returns(String) }
2879
+ attr_accessor :zoho_field
2880
+
2881
+ sig do
2882
+ params(source: String, zoho_field: String).returns(T.attached_class)
2883
+ end
2884
+ def self.new(
2885
+ # Source key to read from the call: a structured_output field name, falling back
2886
+ # to a prompt variable of the same name.
2887
+ source:,
2888
+ # Destination Zoho field API name on the upserted record (e.g. 'Email', 'Company',
2889
+ # or a custom 'Budget\_\_c').
2890
+ zoho_field:
2891
+ )
2892
+ end
2893
+
2894
+ sig { override.returns({ source: String, zoho_field: String }) }
2895
+ def to_hash
2896
+ end
2897
+ end
2898
+
2899
+ module Outcome
2900
+ extend Revox::Internal::Type::Enum
2901
+
2902
+ TaggedSymbol =
2903
+ T.type_alias do
2904
+ T.all(Symbol, Revox::AssistantCreateParams::Zoho::Outcome)
2905
+ end
2906
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2907
+
2908
+ NOT_INTERESTED =
2909
+ T.let(
2910
+ :not_interested,
2911
+ Revox::AssistantCreateParams::Zoho::Outcome::TaggedSymbol
2912
+ )
2913
+ INTERESTED =
2914
+ T.let(
2915
+ :interested,
2916
+ Revox::AssistantCreateParams::Zoho::Outcome::TaggedSymbol
2917
+ )
2918
+ COMPLETED =
2919
+ T.let(
2920
+ :completed,
2921
+ Revox::AssistantCreateParams::Zoho::Outcome::TaggedSymbol
2922
+ )
2923
+ REQUESTED_CALLBACK_LATER =
2924
+ T.let(
2925
+ :requested_callback_later,
2926
+ Revox::AssistantCreateParams::Zoho::Outcome::TaggedSymbol
2927
+ )
2928
+ REQUESTED_CALLBACK_NEW_NUMBER =
2929
+ T.let(
2930
+ :requested_callback_new_number,
2931
+ Revox::AssistantCreateParams::Zoho::Outcome::TaggedSymbol
2932
+ )
2933
+ DO_NOT_CONTACT =
2934
+ T.let(
2935
+ :do_not_contact,
2936
+ Revox::AssistantCreateParams::Zoho::Outcome::TaggedSymbol
2937
+ )
2938
+ AI_AVERSE =
2939
+ T.let(
2940
+ :ai_averse,
2941
+ Revox::AssistantCreateParams::Zoho::Outcome::TaggedSymbol
2942
+ )
2943
+ NONE =
2944
+ T.let(
2945
+ :none,
2946
+ Revox::AssistantCreateParams::Zoho::Outcome::TaggedSymbol
2947
+ )
2948
+
2949
+ sig do
2950
+ override.returns(
2951
+ T::Array[
2952
+ Revox::AssistantCreateParams::Zoho::Outcome::TaggedSymbol
2953
+ ]
2954
+ )
2955
+ end
2956
+ def self.values
2957
+ end
2958
+ end
926
2959
  end
927
2960
  end
928
2961
  end